diff --git a/icu4c/source/common/putil.c b/icu4c/source/common/putil.c index a99f64adc0..8aafb9f37e 100644 --- a/icu4c/source/common/putil.c +++ b/icu4c/source/common/putil.c @@ -36,13 +36,16 @@ ****************************************************************************** */ -#ifndef PTX - /* Define _XOPEN_SOURCE for Solaris and friends. */ /* NetBSD needs it to be >= 4 */ #ifndef _XOPEN_SOURCE +#if __STDC_VERSION__ >= 199901L +/* It is invalid to compile an XPG3, XPG4, XPG4v2 or XPG5 application using c99 */ +#define _XOPEN_SOURCE 600 +#else #define _XOPEN_SOURCE 4 #endif +#endif /* Define __USE_POSIX and __USE_XOPEN for Linux and glibc. */ #ifndef __USE_POSIX @@ -52,8 +55,6 @@ #define __USE_XOPEN #endif -#endif /* PTX */ - /* include ICU headers */ #include "unicode/utypes.h" #include "unicode/putil.h"