diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/alloca.in.h | 2 | ||||
-rw-r--r-- | lib/fnmatch.c | 2 | ||||
-rw-r--r-- | lib/get-rusage-as.c | 2 | ||||
-rw-r--r-- | lib/glob.c | 4 | ||||
-rw-r--r-- | lib/math.in.h | 5 | ||||
-rw-r--r-- | lib/ptsname_r.c | 5 |
6 files changed, 17 insertions, 3 deletions
diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 0c15b7a127..2c6936557a 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h @@ -51,6 +51,8 @@ extern "C" void *_alloca (unsigned short); # pragma intrinsic (_alloca) # define alloca _alloca +# elif defined __MVS__ +# include <stdlib.h> # else # include <stddef.h> # ifdef __cplusplus diff --git a/lib/fnmatch.c b/lib/fnmatch.c index c06696d7b5..9b3f716103 100644 --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -22,7 +22,7 @@ # define _GNU_SOURCE 1 #endif -#if ! defined __builtin_expect && __GNUC__ < 3 +#if ! defined __builtin_expect && defined __GNUC__ && __GNUC__ < 3 # define __builtin_expect(expr, expected) (expr) #endif diff --git a/lib/get-rusage-as.c b/lib/get-rusage-as.c index 2e2d084bf5..fb05b191b2 100644 --- a/lib/get-rusage-as.c +++ b/lib/get-rusage-as.c @@ -355,7 +355,7 @@ get_rusage_as_via_iterator (void) uintptr_t get_rusage_as (void) { -#if (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __CYGWIN__ /* Mac OS X, AIX, Cygwin */ +#if (defined __APPLE__ && defined __MACH__) || defined _AIX || defined __CYGWIN__ || defined __MVS__ /* Mac OS X, AIX, Cygwin, z/OS */ /* get_rusage_as_via_setrlimit() does not work. Prefer get_rusage_as_via_iterator(). */ return get_rusage_as_via_iterator (); diff --git a/lib/glob.c b/lib/glob.c index c9f629176a..a2b7c86c3a 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -80,7 +80,9 @@ # define __stat64(fname, buf) stat (fname, buf) # define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag) # define struct_stat64 struct stat -# define __alloca alloca +# ifndef __MVS__ +# define __alloca alloca +# endif # define __readdir readdir # define __glob_pattern_p glob_pattern_p # define COMPILE_GLOB64 diff --git a/lib/math.in.h b/lib/math.in.h index e3fd99437d..b7a00298d1 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -406,6 +406,7 @@ _GL_WARN_ON_USE (ceilf, "ceilf is unportable - " #if @GNULIB_CEIL@ # if @REPLACE_CEIL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ceil # define ceil rpl_ceil # endif _GL_FUNCDECL_RPL (ceil, double, (double x)); @@ -753,6 +754,7 @@ _GL_WARN_ON_USE (floorf, "floorf is unportable - " #if @GNULIB_FLOOR@ # if @REPLACE_FLOOR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef floor # define floor rpl_floor # endif _GL_FUNCDECL_RPL (floor, double, (double x)); @@ -973,6 +975,7 @@ _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " #if @GNULIB_FREXP@ # if @REPLACE_FREXP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef frexp # define frexp rpl_frexp # endif _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); @@ -1958,6 +1961,7 @@ _GL_WARN_ON_USE (tanhf, "tanhf is unportable - " #if @GNULIB_TRUNCF@ # if @REPLACE_TRUNCF@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef truncf # define truncf rpl_truncf # endif _GL_FUNCDECL_RPL (truncf, float, (float x)); @@ -1980,6 +1984,7 @@ _GL_WARN_ON_USE (truncf, "truncf is unportable - " #if @GNULIB_TRUNC@ # if @REPLACE_TRUNC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef trunc # define trunc rpl_trunc # endif _GL_FUNCDECL_RPL (trunc, double, (double x)); diff --git a/lib/ptsname_r.c b/lib/ptsname_r.c index 14c36d61af..f4887bc97f 100644 --- a/lib/ptsname_r.c +++ b/lib/ptsname_r.c @@ -34,6 +34,11 @@ # define _PATH_DEV "/dev/" # endif +# undef __set_errno +# undef __stat +# undef __ttyname_r +# undef __ptsname_r + # define __set_errno(e) errno = (e) # define __isatty isatty # define __stat stat |