Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
d95312c
zopen enhancements:
IgorTodorovskiIBM Apr 22, 2024
11eeb20
Add missing header netiniet
IgorTodorovskiIBM Jun 25, 2024
ebe82e0
Add support for getline, getdelim, sysconf, memset
IgorTodorovskiIBM Jun 26, 2024
b32dcd4
Add utimesat and PTHREAD_RWLOCK_INITIALIZER
IgorTodorovskiIBM Jun 27, 2024
7d497c6
Add readlink override to resolve PARMLIB variables like
IgorTodorovskiIBM Jul 11, 2024
8253dfe
Fix getdelim and readlink override
IgorTodorovskiIBM Jul 16, 2024
153ef5f
Fix typo
IgorTodorovskiIBM Jul 16, 2024
b7074a5
Fix getdelim again
IgorTodorovskiIBM Jul 16, 2024
b0cd547
Fix missing }
IgorTodorovskiIBM Jul 16, 2024
276feb4
Address comments
IgorTodorovskiIBM Jul 16, 2024
827486b
Address comments
IgorTodorovskiIBM Jul 16, 2024
4145cf9
Add __threading_support - needed for boost and clang 1.1 builds
IgorTodorovskiIBM Jul 19, 2024
040105d
Update memmem
IgorTodorovskiIBM Jul 22, 2024
8c0764d
Add strverscmp from musl c
IgorTodorovskiIBM Jul 23, 2024
504ba77
Fix readlink and mkostemp - after further testing with zopen tools
IgorTodorovskiIBM Jul 24, 2024
5a1b34b
Fix readlink and mkostemp - after further testing with zopen tools
IgorTodorovskiIBM Jul 24, 2024
b36a272
Add code for profiling instrumentation
IgorTodorovskiIBM Aug 19, 2024
325ed89
Fix typos
IgorTodorovskiIBM Aug 19, 2024
6f56563
Fix typos
IgorTodorovskiIBM Aug 20, 2024
63e621e
replace bzero with calloc (#68)
kishkulk Aug 20, 2024
c098335
revise json
IgorTodorovskiIBM Aug 20, 2024
b548649
Fix tid in instrumentation json
IgorTodorovskiIBM Aug 20, 2024
b1ae73f
Update zos-instrumentation.cc
IgorTodorovskiIBM Aug 20, 2024
51f5dd0
Resolve clang related build issues
IgorTodorovskiIBM Aug 21, 2024
d847fc3
Resolve clang related build issues
IgorTodorovskiIBM Aug 21, 2024
b87bc46
Change dsa to __dsa and use traceEvent objects to make ns the default…
IgorTodorovskiIBM Aug 21, 2024
7738105
Gzip the json file once completed
IgorTodorovskiIBM Aug 21, 2024
0756b23
Only activate __get_stack_start on non-quick startup
IgorTodorovskiIBM Aug 28, 2024
5d413b7
Propagate ZOSLIB_QUICK_STARTUP in cmake
IgorTodorovskiIBM Aug 28, 2024
659b1d5
Change the arch level to arch10 for clang (and arch14 only for zos-ge…
IgorTodorovskiIBM Aug 29, 2024
d2aed54
Add tracing for allocation
IgorTodorovskiIBM Sep 19, 2024
3a4cb7f
Add malloc/free overrides
IgorTodorovskiIBM Sep 19, 2024
9a69e8e
Add export to __readlink
IgorTodorovskiIBM Sep 23, 2024
4e8ca92
Update zos-v2r5-symbolfixes.h
IgorTodorovskiIBM Sep 24, 2024
2dc1f9b
Resolve issue when malloc/free are used as function pointers
IgorTodorovskiIBM Sep 24, 2024
ac3adb8
Add pthread_condattr_setclock to v2r5 symbol list
IgorTodorovskiIBM Oct 9, 2024
6c843ab
Add asprintf and vasprintf to v2r5 symbol list
IgorTodorovskiIBM Oct 9, 2024
ab0e6fa
Update unistd.h - use __asm
IgorTodorovskiIBM Nov 13, 2024
cdd2f75
Fix up product name & remove the c++ copied dir (#70)
perry-ca Nov 15, 2024
3a5c17f
Add dependant code for script command (#71)
sachintu47 Nov 26, 2024
bac1675
Add vasprintf and strcasestr - needed by htop
IgorTodorovskiIBM Jan 3, 2025
a6f5da1
Add a fix for symlinks with $ literals in the beginning
IgorTodorovskiIBM Jan 27, 2025
68f947f
TODO one readlink test that fails on sysplex only
IgorTodorovskiIBM Jan 28, 2025
ab82da4
Update zos-v2r5-symbolfixes.h
IgorTodorovskiIBM Jan 30, 2025
d050048
Update zos-v2r5-symbolfixes.h - add madvise
IgorTodorovskiIBM Feb 6, 2025
c8defc5
Update zos-v2r5-symbolfixes.h
IgorTodorovskiIBM Feb 18, 2025
1418dca
Correct openpty implementation - use posix_openpt
IgorTodorovskiIBM Feb 26, 2025
af5d965
override writev call (#73)
sachintu47 Mar 14, 2025
46a433a
Add test case for writev (#74)
sachintu47 Mar 18, 2025
8292957
remove clone from zos-v2r5-symbolfixes as it breaks googletests projects
IgorTodorovskiIBM Mar 31, 2025
3e39ee0
Override readv call (#76)
sachintu47 Apr 1, 2025
c126f1d
file conversion to ascii for untagged file fix (#75)
sabi789 Apr 1, 2025
0328777
Add asprintf and semaphore.h
IgorTodorovskiIBM Apr 8, 2025
89d218f
Add locale disable macro, dprintf, reallocarray (#77)
sachintu47 Apr 21, 2025
caf3960
Add signalfd, ttydefaults.h (#78)
sachintu47 Apr 23, 2025
6e173c3
Add macro to set getopt_long definition, Update path header (#79)
sachintu47 Apr 25, 2025
00970f4
Add NAME_MAX to limits.h
IgorTodorovskiIBM May 7, 2025
ae22cec
Update zos-signalfd.c (#80)
kishkulk May 8, 2025
3b0b241
Add warning message for ambiguous file
sabi789 May 12, 2025
1a1843b
Message fix
sabi789 May 13, 2025
34a0067
Redefine v2r5 symbols for 2.5 and up if _XPLATFORM_SOURCE _POSIX_C_SO…
IgorTodorovskiIBM May 14, 2025
c3ff9d7
V2R5 considerations, malloc and posix_memalign changes
IgorTodorovskiIBM May 15, 2025
2826707
Fix condition in v2r5 symbosl check
IgorTodorovskiIBM May 15, 2025
8c3872e
Avoid defining XPLAT and cleanup override headers (#82)
IgorTodorovskiIBM May 27, 2025
5d82be6
Add sys/poll.h
IgorTodorovskiIBM May 28, 2025
0821373
Update to v2r5 (#83)
sachintu47 Jun 2, 2025
404cf6f
Use fcntl F_SETTAG instead of __fchattr for __tag_new_file so that it…
IgorTodorovskiIBM Jun 5, 2025
6bdd87e
Introduce __tag_new_file_fp for FILE services so as not to affect ope…
IgorTodorovskiIBM Jun 5, 2025
04aabf5
Update poll.h - fix extra _ in #define for sys/poll.h
IgorTodorovskiIBM Jun 6, 2025
0819051
zoslib fixes: statfs, fdopendir, strerror (#84)
apatel896 Jun 24, 2025
338e49a
invoke ascii strerror_r (#87)
sachintu47 Jul 8, 2025
232a618
Aligned operator new and delete (#88)
apatel896 Jul 16, 2025
e7295d4
Add initial implementation of ptrace + test cases (#85)
IgorTodorovskiIBM Jul 17, 2025
7584f6a
Add error() routine and resolve zoslib compiler warnings (#89)
IgorTodorovskiIBM Jul 21, 2025
fb6f6e3
Add fnmatch code (#90)
sachintu47 Jul 23, 2025
caa88f6
Use __asm instead of asm which is a gnu extension
IgorTodorovskiIBM Jul 25, 2025
7d0fe23
Add mount readonly flag, spawn setsigdefault (#91)
sachintu47 Aug 8, 2025
8fb09ef
Correct locale macro check (#92)
sachintu47 Aug 8, 2025
fdccdad
Fix locale issue when stdlib included (#93)
sachintu47 Aug 13, 2025
9e9de33
Add scandir, timegm, portable_remove_all implementation (#94)
sachintu47 Aug 25, 2025
a39f737
Update zos-io.cc - update __chgpathccsid to set txtflag if ccsid != 0
IgorTodorovskiIBM Sep 22, 2025
0e6da67
undef strnlen, strpcpy, and strsignal from string.h
IgorTodorovskiIBM Sep 23, 2025
19364de
Update string.h - remove faulty functions in LE
IgorTodorovskiIBM Sep 23, 2025
aba8e73
Update string.h - fix typos
IgorTodorovskiIBM Sep 23, 2025
bd296d5
Add pkgconfig
sachintu47 Nov 17, 2025
f96d9f9
Add FTS (File Tree Stream) implementation from musl-fts
sachintu47 Nov 24, 2025
2b9235e
feat: Add __UNTAGGED_FILE_ENCODING envar
IgorTodorovskiIBM Oct 16, 2025
45267d8
Fix error() function and expose only if ZOSLIB_OVERRIDE_CLIB_ERROR is…
IgorTodorovskiIBM Nov 26, 2025
e5599f3
Revert "feat: Add __UNTAGGED_FILE_ENCODING envar"
IgorTodorovskiIBM Nov 26, 2025
6201eca
Remove fprintf statement in ptrace
IgorTodorovskiIBM Dec 4, 2025
48c1422
Add optimized solution to get exec path
sachintu47 Dec 18, 2025
e0dc4cf
Fix issues related to oel3 clang
sachintu47 Dec 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
cmake_minimum_required(VERSION 3.24)
project(libzoslib CXX C ASM)

if(${CMAKE_C_COMPILER} MATCHES xlclang)
include_directories(BEFORE include)
else()
include_directories(BEFORE include include/c++/v1)
endif()
include_directories(BEFORE include)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
Expand All @@ -36,6 +32,7 @@ list(APPEND zoslib_defines
_OPEN_MSGQ_EXT
_OPEN_SYS_FILE_EXT=1
_OPEN_SYS_SOCK_IPV6
_Packed=
PATH_MAX=1024
_UNIX03_SOURCE
_UNIX03_THREADS
Expand All @@ -53,6 +50,10 @@ if(ZOSLIB_GENERIC)
ZOSLIB_GENERIC)
endif()

if(ZOSLIB_QUICK_STARTUP)
list(APPEND zoslib_defines
ZOSLIB_QUICK_STARTUP)
endif()

if(DEFINED ENV{BUILD_VERSION})
list(APPEND zoslib_defines BUILD_VERSION="$ENV{BUILD_VERSION}")
Expand Down Expand Up @@ -81,8 +82,8 @@ else()
list(APPEND zoslib_cflags
-fgnu-keywords
-m64
-march=arch14
-mzos-target=zosv2r4
-march=z13
-mzos-target=zosv2r5
-fno-short-enums
-fzos-le-char-mode=ascii)

Expand All @@ -102,3 +103,17 @@ endif()
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX "." CACHE PATH "install path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

set(ZOSLIB_PC_LIBS "" CACHE STRING "Extra libraries for zoslib.pc Libs line")
set(ZOSLIB_PC_CFLAGS "" CACHE STRING "Extra CFLAGS for zoslib.pc Cflags line")

configure_file(
${CMAKE_SOURCE_DIR}/zoslib.pc.in
${CMAKE_BINARY_DIR}/zoslib.pc
@ONLY
)

install(
FILES ${CMAKE_BINARY_DIR}/zoslib.pc
DESTINATION lib/pkgconfig
)
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ ZOSLIB is supported on the following hardware:
* CMake 3.24.2-zos+
* GNU Make 4.3+
* IBM XL C/C++ V2.3.1 for z/OS V2.3 web deliverable (xlclang/xlcang++) or
IBM Open XL C/C++ 2.0 (clang/clang++)
IBM C/C++ for Open Enterprise Languages on z/OS 2.0.0 (clang/clang++) or
IBM Open XL C/C++ 2.1 for z/OS, version 2.1 (ibm-clang64/ibm-clang++64)
* Git
* Ninja (optional)

Expand Down
42 changes: 42 additions & 0 deletions include/dirent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

///////////////////////////////////////////////////////////////////////////////
// Licensed Materials - Property of IBM
// ZOSLIB
// (C) Copyright IBM Corp. 2021. All Rights Reserved.
// US Government Users Restricted Rights - Use, duplication
// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
///////////////////////////////////////////////////////////////////////////////

#ifndef ZOS_DIRENT_H_
#define ZOS_DIRENT_H_

#include "zos-macros.h"
#include <features.h>


#if defined(ZOSLIB_OVERRIDE_CLIB) || defined(ZOSLIB_OVERRIDE_CLIB_DIRENT)
/* Modify function names in header to avoid conflict with new prototypes
TODO: remove this when LE's fdopendir is fixed */

#undef fdopendir
#define fdopendir __fdopendir_replaced
#endif
#include_next <dirent.h>

#if defined(ZOSLIB_OVERRIDE_CLIB) || defined(ZOSLIB_OVERRIDE_CLIB_DIRENT)

#undef fdopendir

#endif

#ifdef __cplusplus
extern "C" {
#endif
int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));

#ifdef __cplusplus
}
#endif

#endif

28 changes: 28 additions & 0 deletions include/error.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
///////////////////////////////////////////////////////////////////////////////
// Licensed Materials - Property of IBM
// ZOSLIB
// (C) Copyright IBM Corp. 2020, 2024. All Rights Reserved.
// US Government Users Restricted Rights - Use, duplication
// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
///////////////////////////////////////////////////////////////////////////////

#ifndef ZOS_ERROR_H_
#define ZOS_ERROR_H_

#include "zos-macros.h"

#ifdef __cplusplus
extern "C" {
#endif

__Z_EXPORT void __error(int status, int errnum, const char *format, ...);

#ifdef ZOSLIB_OVERRIDE_CLIB_ERROR
__Z_EXPORT void error(int status, int errnum, const char *format, ...) __asm("__error");
#endif

#ifdef __cplusplus
}
#endif

#endif // ZOS_ERROR_H_
10 changes: 0 additions & 10 deletions include/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#include "zos-macros.h"
#include <sys/types.h>

#define __XPLAT 1

#if defined(__cplusplus)
extern "C" {
#endif
Expand Down Expand Up @@ -53,12 +51,4 @@ __Z_EXPORT extern int creat(const char *filename, mode_t mode) __asm("__creat_as

#endif

#if (__EDC_TARGET < 0x42050000) && defined(ZOSLIB_ENABLE_V2R5_FEATURES)
#define O_CLOEXEC 0x00001000
#define O_DIRECT 0x00002000
#define O_NOFOLLOW 0x00004000
#define O_DIRECTORY 0x00008000
#define O_PATH 0x00080000
#endif

#endif
26 changes: 26 additions & 0 deletions include/fnmatch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef _FNMATCH_H
#define _FNMATCH_H

#ifdef __cplusplus
extern "C" {
#endif

#define FNM_EXTMATCH 0

#define FNM_PATHNAME 0x1
#define FNM_NOESCAPE 0x2
#define FNM_PERIOD 0x4
#define FNM_LEADING_DIR 0x8
#define FNM_CASEFOLD 0x10
#define FNM_FILE_NAME FNM_PATHNAME

#define FNM_NOMATCH 1
#define FNM_NOSYS (-1)

int fnmatch(const char *, const char *, int);

#ifdef __cplusplus
}
#endif

#endif
156 changes: 156 additions & 0 deletions include/fts.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
/* $NetBSD: fts.h,v 1.19 2009/08/16 19:33:38 christos Exp $ */

/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)fts.h 8.3 (Berkeley) 8/14/94
*/

#ifndef _FTS_H_
#define _FTS_H_

#include "zos-macros.h"
#include <stdint.h>
#include <sys/types.h>

#ifndef __fts_stat_t
#define __fts_stat_t struct stat
#endif
#ifndef __fts_nlink_t
#define __fts_nlink_t nlink_t
#endif
#ifndef __fts_ino_t
#define __fts_ino_t ino_t
#endif
#ifndef __fts_length_t
#define __fts_length_t unsigned int
#endif
#ifndef __fts_number_t
#define __fts_number_t int64_t
#endif
#ifndef __fts_dev_t
#define __fts_dev_t dev_t
#endif
#ifndef __fts_level_t
#define __fts_level_t int
#endif

typedef struct {
struct _ftsent *fts_cur; /* current node */
struct _ftsent *fts_child; /* linked list of children */
struct _ftsent **fts_array; /* sort array */
dev_t fts_dev; /* starting device # */
char *fts_path; /* path for this descent */
int fts_rfd; /* fd for root */
unsigned int fts_pathlen; /* sizeof(path) */
unsigned int fts_nitems; /* elements in the sort array */
int (*fts_compar) /* compare function */
(const struct _ftsent **, const struct _ftsent **);

#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */
#define FTS_LOGICAL 0x002 /* logical walk */
#define FTS_NOCHDIR 0x004 /* don't change directories */
#define FTS_NOSTAT 0x008 /* don't get stat info */
#define FTS_PHYSICAL 0x010 /* physical walk */
#define FTS_SEEDOT 0x020 /* return dot and dot-dot */
#define FTS_XDEV 0x040 /* don't cross devices */
#define FTS_WHITEOUT 0x080 /* return whiteout information */
#define FTS_OPTIONMASK 0x0ff /* valid user option mask */

#define FTS_NAMEONLY 0x100 /* (private) child names only */
#define FTS_STOP 0x200 /* (private) unrecoverable error */
int fts_options; /* fts_open options, global flags */
} FTS;

typedef struct _ftsent {
struct _ftsent *fts_cycle; /* cycle node */
struct _ftsent *fts_parent; /* parent directory */
struct _ftsent *fts_link; /* next file in directory */
__fts_number_t fts_number; /* local numeric value */
void *fts_pointer; /* local address value */
char *fts_accpath; /* access path */
char *fts_path; /* root path */
int fts_errno; /* errno for this node */
int fts_symfd; /* fd for symlink */
__fts_length_t fts_pathlen; /* strlen(fts_path) */
__fts_length_t fts_namelen; /* strlen(fts_name) */

__fts_ino_t fts_ino; /* inode */
__fts_dev_t fts_dev; /* device */
__fts_nlink_t fts_nlink; /* link count */

#define FTS_ROOTPARENTLEVEL -1
#define FTS_ROOTLEVEL 0
__fts_level_t fts_level; /* depth (-1 to N) */

#define FTS_D 1 /* preorder directory */
#define FTS_DC 2 /* directory that causes cycles */
#define FTS_DEFAULT 3 /* none of the above */
#define FTS_DNR 4 /* unreadable directory */
#define FTS_DOT 5 /* dot or dot-dot */
#define FTS_DP 6 /* postorder directory */
#define FTS_ERR 7 /* error; errno is set */
#define FTS_F 8 /* regular file */
#define FTS_INIT 9 /* initialized only */
#define FTS_NS 10 /* stat(2) failed */
#define FTS_NSOK 11 /* no stat(2) requested */
#define FTS_SL 12 /* symbolic link */
#define FTS_SLNONE 13 /* symbolic link without target */
#define FTS_W 14 /* whiteout object */
unsigned short fts_info; /* user flags for FTSENT structure */

#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
#define FTS_ISW 0x04 /* this is a whiteout object */
unsigned short fts_flags; /* private flags for FTSENT structure */

#define FTS_AGAIN 1 /* read node again */
#define FTS_FOLLOW 2 /* follow symbolic link */
#define FTS_NOINSTR 3 /* no instructions */
#define FTS_SKIP 4 /* discard node */
unsigned short fts_instr; /* fts_set() instructions */

__fts_stat_t *fts_statp; /* stat(2) information */
char fts_name[1]; /* file name */
} FTSENT;

#ifdef __cplusplus
extern "C" {
#endif
__Z_EXPORT FTSENT *fts_children(FTS *, int);
__Z_EXPORT int fts_close(FTS *);
__Z_EXPORT FTS *fts_open(char * const *, int,
int (*)(const FTSENT **, const FTSENT **));
__Z_EXPORT FTSENT *fts_read(FTS *);
__Z_EXPORT int fts_set(FTS *, FTSENT *, int);
#ifdef __cplusplus
}
#endif


#endif /* !_FTS_H_ */
4 changes: 4 additions & 0 deletions include/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
#define PATH_MAX _XOPEN_PATH_MAX
#endif

#ifndef NAME_MAX
#define NAME_MAX 255
#endif

#endif
8 changes: 6 additions & 2 deletions include/locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
// For xlclang++, exclude these declarations unless ZOSLIB_OVERRIDE_CLIB_LOCALE
// is defined even if ZOSLIB_OVERRIDE_CLIB is defined.

#if !defined(__ibmxl__) && (defined(ZOSLIB_OVERRIDE_CLIB) || defined(ZOSLIB_OVERRIDE_CLIB_LOCALE))
#if !defined(__ibmxl__) && \
(defined(ZOSLIB_OVERRIDE_CLIB) || defined(ZOSLIB_OVERRIDE_CLIB_LOCALE)) && \
(!defined(ZOSLIB_OVERRIDE_CLIB_LOCALE_FORCE) || ZOSLIB_OVERRIDE_CLIB_LOCALE_FORCE == 1)

#include "zos-macros.h"

#undef newlocale
Expand Down Expand Up @@ -53,7 +56,8 @@ __Z_EXPORT extern locale_t __c_locale() __asm("__zlc_locale_a");
__Z_EXPORT extern locale_t newlocale(int category_mask, const char* locale, locale_t base) __asm("__zlnewlocale_a");
__Z_EXPORT extern void freelocale(locale_t locobj) __asm("__zlfreelocale");
__Z_EXPORT extern locale_t uselocale(locale_t newloc) __asm("__zluselocale_a");

__Z_EXPORT extern const char *getlocalename_l(int category, locale_t locale);
__Z_EXPORT extern locale_t duplocale(locale_t old);

#if defined(__cplusplus)
}
Expand Down
19 changes: 19 additions & 0 deletions include/netinet/in_systm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
///////////////////////////////////////////////////////////////////////////////
// Licensed Materials - Property of IBM
// ZOSLIB
// (C) Copyright IBM Corp. 2024. All Rights Reserved.
// US Government Users Restricted Rights - Use, duplication
// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
///////////////////////////////////////////////////////////////////////////////

#ifndef ZOS_IN_SYSTM_H_
#define ZOS_IN_SYSTM_H_

#include <stdint.h>

// Network types
typedef uint16_t n_short;
typedef uint32_t n_long;
typedef uint32_t n_time;

#endif
Loading