ICU-5469 Improve usage of _XOPEN_SOURCE_EXTENDED

X-SVN-Rev: 20540
This commit is contained in:
George Rhoten 2006-10-20 18:57:55 +00:00
parent 998387c94c
commit 01745ec4fc
2 changed files with 11 additions and 8 deletions

View file

@ -38,20 +38,15 @@
/* Define _XOPEN_SOURCE for Solaris and friends. */
/* NetBSD needs it to be >= 4 */
#ifndef _XOPEN_SOURCE
#if !defined(_XOPEN_SOURCE)
#if __STDC_VERSION__ >= 199901L
/* It is invalid to compile an XPG3, XPG4, XPG4v2 or XPG5 application using c99 */
/* It is invalid to compile an XPG3, XPG4, XPG4v2 or XPG5 application using c99 on Solaris */
#define _XOPEN_SOURCE 600
#else
#define _XOPEN_SOURCE 4
#endif
#endif
/* Make sure things like readlink and such functions work. */
#ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED 1
#endif
/* include ICU headers */
#include "unicode/utypes.h"
#include "unicode/putil.h"
@ -64,6 +59,14 @@
#include "locmap.h"
#include "ucln_cmn.h"
/* Make sure things like readlink and such functions work.
Poorly upgraded Solaris machines can't have this defined.
Cleanly installed Solaris can use this #define.
*/
#if !defined(_XOPEN_SOURCE_EXTENDED) && !defined(U_SOLARIS)
#define _XOPEN_SOURCE_EXTENDED 1
#endif
/* Include standard headers. */
#include <stdio.h>
#include <stdlib.h>

View file

@ -58,7 +58,7 @@ SHAREDLIBCXXFLAGS = -Wc,expo
# -+ means accept any file extension as a C++ file. By default only .C is accepted.
CFLAGS += -Wc,'langlvl(extended),spill(2000),ros,dll' $(ICU_IEEE)
CXXFLAGS += -Wc,'langlvl(extended),spill(2000),ros,dll' $(ICU_IEEE) -+
DEFS += -D_XOPEN_SOURCE_EXTENDED -D_MSE_PROTOS
DEFS += -D_MSE_PROTOS
ARFLAGS = -cr
ifeq (${OS390_XPLINK}, 1)