intl/icu/source/common/uposixdefs.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /*
michael@0 2 *******************************************************************************
michael@0 3 * Copyright (C) 2011-2012, International Business Machines
michael@0 4 * Corporation and others. All Rights Reserved.
michael@0 5 *******************************************************************************
michael@0 6 * file name: uposixdefs.h
michael@0 7 * encoding: US-ASCII
michael@0 8 * tab size: 8 (not used)
michael@0 9 * indentation:4
michael@0 10 *
michael@0 11 * created on: 2011jul25
michael@0 12 * created by: Markus W. Scherer
michael@0 13 *
michael@0 14 * Common definitions for implementation files working with POSIX functions.
michael@0 15 * *Important*: #include this file before any other header files!
michael@0 16 */
michael@0 17
michael@0 18 #ifndef __UPOSIXDEFS_H__
michael@0 19 #define __UPOSIXDEFS_H__
michael@0 20
michael@0 21 /*
michael@0 22 * Define _XOPEN_SOURCE for access to POSIX functions.
michael@0 23 *
michael@0 24 * We cannot use U_PLATFORM from platform.h/utypes.h because
michael@0 25 * "The Open Group Base Specifications"
michael@0 26 * chapter "2.2 The Compilation Environment" says:
michael@0 27 * "In the compilation of an application that #defines a feature test macro
michael@0 28 * specified by IEEE Std 1003.1-2001,
michael@0 29 * no header defined by IEEE Std 1003.1-2001 shall be included prior to
michael@0 30 * the definition of the feature test macro."
michael@0 31 */
michael@0 32 #ifdef _XOPEN_SOURCE
michael@0 33 /* Use the predefined value. */
michael@0 34 #else
michael@0 35 /*
michael@0 36 * Version 6.0:
michael@0 37 * The Open Group Base Specifications Issue 6 (IEEE Std 1003.1, 2004 Edition)
michael@0 38 * also known as
michael@0 39 * SUSv3 = Open Group Single UNIX Specification, Version 3 (UNIX03)
michael@0 40 *
michael@0 41 * Note: This definition used to be in C source code (e.g., putil.c)
michael@0 42 * and define _XOPEN_SOURCE to different values depending on __STDC_VERSION__.
michael@0 43 * In C++ source code (e.g., putil.cpp), __STDC_VERSION__ is not defined at all.
michael@0 44 */
michael@0 45 # define _XOPEN_SOURCE 600
michael@0 46 #endif
michael@0 47
michael@0 48 /*
michael@0 49 * Make sure things like readlink and such functions work.
michael@0 50 * Poorly upgraded Solaris machines can't have this defined.
michael@0 51 * Cleanly installed Solaris can use this #define.
michael@0 52 *
michael@0 53 * z/OS needs this definition for timeval and to get usleep.
michael@0 54 */
michael@0 55 #if !defined(_XOPEN_SOURCE_EXTENDED)
michael@0 56 # define _XOPEN_SOURCE_EXTENDED 1
michael@0 57 #endif
michael@0 58
michael@0 59 /*
michael@0 60 * There is an issue with turning on _XOPEN_SOURCE_EXTENDED on certain platforms.
michael@0 61 * A compatibility issue exists between turning on _XOPEN_SOURCE_EXTENDED and using
michael@0 62 * standard C++ string class. As a result, standard C++ string class needs to be
michael@0 63 * turned off for the follwing platforms:
michael@0 64 * -AIX/VACPP
michael@0 65 * -Solaris/GCC
michael@0 66 */
michael@0 67 #if (U_PLATFORM == U_PF_AIX && !defined(__GNUC__)) || (U_PLATFORM == U_PF_SOLARIS && defined(__GNUC__))
michael@0 68 # if _XOPEN_SOURCE_EXTENDED && !defined(U_HAVE_STD_STRING)
michael@0 69 # define U_HAVE_STD_STRING 0
michael@0 70 # endif
michael@0 71 #endif
michael@0 72
michael@0 73 #endif /* __UPOSIXDEFS_H__ */

mercurial