diff --git a/lib/regex.h b/lib/regex.h index 6f3bae3..21fc00c 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -23,6 +23,12 @@ #include +/* IBM z/OS uses -D__string=1 as an inclusion guard. */ +#if defined __MVS__ && defined(__string) +# undef __string +# define __string __string +#endif + /* Allow the use in C++ code. */ #ifdef __cplusplus extern "C" { diff --git a/lib/string.in.h b/lib/string.in.h index b3356bb..fa438a4 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -44,6 +44,12 @@ #ifndef address@hidden@_STRING_H #define address@hidden@_STRING_H +/* IBM z/OS uses -D__string=1 as an inclusion guard. */ +#if defined __MVS__ && defined(__string) +# undef __string +# define __string __string +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include