Changeset 2187 for trunk


Ignore:
Timestamp:
Jul 3, 2005, 8:20:51 AM (20 years ago)
Author:
bird
Message:

Updated features.h and the gnu cdefs.h to 2.3.x CVS. level

Location:
trunk/src/emx/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/features.h

    • Property cvs2svn:cvs-rev changed from 1.9 to 1.10
    r2186 r2187  
    4343   _POSIX_C_SOURCE      If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
    4444                        if >=199309L, add IEEE Std 1003.1b-1993;
    45                         if >=199506L, add IEEE Std 1003.1c-1995
     45                        if >=199506L, add IEEE Std 1003.1c-1995;
     46                        if >=200112L, all of IEEE 1003.1-2004
    4647   _XOPEN_SOURCE        Includes POSIX and XPG things.  Set to 500 if
    4748                        Single Unix conformance is wanted, to 600 for the
     
    5657   _REENTRANT           Select additionally reentrant object.
    5758   _THREAD_SAFE         Same as _REENTRANT, often used by other systems.
     59   _FORTIFY_SOURCE      If set to numeric value > 0 additional security
     60                        measures are defined, according to level.
    5861
    5962   The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
     
    8487   __USE_GNU            Define GNU extensions.
    8588   __USE_REENTRANT      Define reentrant/thread-safe *_r functions.
     89   __USE_FORTIFY_LEVEL  Additional security measures used, according to level.
    8690   __FAVOR_BSD          Favor 4.3BSD things in cases of conflict.
    8791
     
    116120#undef  __USE_GNU
    117121#undef  __USE_REENTRANT
     122#undef  __USE_FORTIFY_LEVEL
    118123#undef  __FAVOR_BSD
    119124#undef  __KERNEL_STRICT_NAMES
     
    128133/* Always use ISO C things.  */
    129134#define __USE_ANSI      1
     135
     136/* Convenience macros to test the versions of glibc and gcc.
     137   Use them like this:
     138   #if __GNUC_PREREQ (2,8)
     139   ... code requiring gcc 2.8 or later ...
     140   #endif
     141   Note - they won't work for gcc1 or glibc1, since the _MINOR macros
     142   were not defined then.  */
     143#if defined __GNUC__ && defined __GNUC_MINOR__
     144# define __GNUC_PREREQ(maj, min) \
     145        ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
     146#else
     147# define __GNUC_PREREQ(maj, min) 0
     148#endif
    130149
    131150
     
    218237#endif
    219238
     239
     240#if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L /* bird: check if defined, -Wundef. */
     241# define __USE_XOPEN2K          1
     242#endif
     243
    220244#ifdef  _XOPEN_SOURCE
    221245# define __USE_XOPEN    1
     
    262286# define __USE_BSD      1
    263287/* bird: __USE_BSD == __BSD_VISIBLE, make sure it's defined. */
    264 # if 1 /*def __EMX__ */
    265 #  undef __BSD_VISIBLE
    266 #  define __BSD_VISIBLE  1
    267 # endif
     288# undef __BSD_VISIBLE
     289# define __BSD_VISIBLE  1
    268290/* bird: end */
    269291#endif
     
    283305#if defined _REENTRANT || defined _THREAD_SAFE
    284306# define __USE_REENTRANT        1
     307#endif
     308
     309#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && __GNUC_PREREQ (4, 1) && defined (__OPTIMIZE__) && __OPTIMIZE__ > 0 /* bird: check if defined, -Wundef. */
     310# if _FORTIFY_SOURCE == 1
     311#  define __USE_FORTIFY_LEVEL 1
     312# elif _FORTIFY_SOURCE > 1
     313#  define __USE_FORTIFY_LEVEL 2
     314# endif
    285315#endif
    286316
     
    305335   these macros to test for features in specific releases.  */
    306336#define __GLIBC__       2
    307 #define __GLIBC_MINOR__ 3
     337#define __GLIBC_MINOR__ 4
    308338#endif /*bird*/
    309 
    310 /* Convenience macros to test the versions of glibc and gcc.
    311    Use them like this:
    312    #if __GNUC_PREREQ (2,8)
    313    ... code requiring gcc 2.8 or later ...
    314    #endif
    315    Note - they won't work for gcc1 or glibc1, since the _MINOR macros
    316    were not defined then.  */
    317 #if defined __GNUC__ && defined __GNUC_MINOR__
    318 # define __GNUC_PREREQ(maj, min) \
    319         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
    320 #else
    321 # define __GNUC_PREREQ(maj, min) 0
    322 #endif
    323339
    324340#define __GLIBC_PREREQ(maj, min) \
  • trunk/src/emx/include/sys/gnu/cdefs.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r2186 r2187  
    1 /* Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
     1/* Copyright (C) 1992-2001, 2002, 2004, 2005 Free Software Foundation, Inc.
    22   This file is part of the GNU C Library.
    33
     
    1818
    1919/**
    20  * GLIBC v2.3.2
     20 * GLIBC v2.3.4 CVS
    2121 * @changed bird: #ifndef'ed out a few clashes with the BSD cdefs.h.
    2222 * @changed bird: Workaround for RC & mozilla.
     
    4646/* GCC can always grok prototypes.  For C++ programs we add throw()
    4747   to help it optimize the function calls.  But this works only with
    48    gcc 2.8.x and egcs.  */
     48   gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
     49   as non-throwing using a function attribute since programs can use
     50   the -fexceptions options for C code as well.  */
     51# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
     52#  define __THROW       __attribute__ ((__nothrow__))
     53#  define __NTH(fct)    __attribute__ ((__nothrow__)) fct
     54# else
    4955# if defined __cplusplus && __GNUC_PREREQ (2,8)
    5056#  define __THROW       throw ()
     57#   define __NTH(fct)   fct throw ()
    5158# else
    5259#  define __THROW
    53 # endif
    54 # define __P(args)      args __THROW
    55 /* This macro will be used for functions which might take C++ callback
    56    functions.  */
    57 # define __PMT(args)    args
     60#   define __NTH(fct)   fct
     61#  endif
     62# endif
    5863
    5964#else   /* Not GCC.  */
     
    6267
    6368# define __THROW
    64 # define __P(args)      args
    65 # define __PMT(args)    args
     69# define __NTH(fct)     fct
    6670
    6771# define __const        const
     
    7074
    7175#endif  /* GCC.  */
     76
     77/* These two macros are not used in glibc anymore.  They are kept here
     78   only because some other projects expect the macros to be defined.  */
     79#define __P(args)       args
     80#define __PMT(args)     args
    7281
    7382/* For these things, GCC behaves the ANSI way normally,
     
    129138
    130139
     140/* Fortify support.  */
     141#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
     142#define __bos0(ptr) __builtin_object_size (ptr, 0)
     143#define __warndecl(name, msg) extern void name (void)
     144
     145
    131146/* Support for flexible arrays.  */
    132147#if __GNUC_PREREQ (2,97)
     
    160175
    161176# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
     177# ifdef __cplusplus
     178#  define __REDIRECT_NTH(name, proto, alias) \
     179     name proto __THROW __asm__ (__ASMNAME (#alias))
     180# else
     181#  define __REDIRECT_NTH(name, proto, alias) \
     182     name proto __asm__ (__ASMNAME (#alias)) __THROW
     183# endif
    162184# define __ASMNAME(cname)  __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
    163185# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
     
    237259#endif
    238260
     261/* The nonull function attribute allows to mark pointer parameters which
     262   must not be NULL.  */
     263#if __GNUC_PREREQ (3,3)
     264# define __nonnull_glibc(params) __attribute__ ((__nonnull__ params))
     265#else
     266# define __nonnull_glibc(params)
     267#endif
     268
     269/* If fortification mode, we warn about unused results of certain
     270   function calls which can lead to problems.  */
     271#if __GNUC_PREREQ (3,4)
     272# define __attribute_warn_unused_result__ \
     273   __attribute__ ((__warn_unused_result__))
     274# if __USE_FORTIFY_LEVEL > 0
     275#  define __wur __attribute_warn_unused_result__
     276# endif
     277#else
     278# define __attribute_warn_unused_result__ /* empty */
     279#endif
     280#ifndef __wur
     281# define __wur /* Ignore */
     282#endif
     283
     284/* Forces a function to be always inlined.  */
     285#ifndef __always_inline /* bird */
     286#if __GNUC_PREREQ (3,2)
     287# define __always_inline __inline __attribute__ ((__always_inline__))
     288#else
     289# define __always_inline __inline
     290#endif
     291#endif                  /* bird */
     292
    239293/* It is possible to compile containing GCC extensions even if GCC is
    240294   run in pedantic mode if the uses are carefully marked using the
Note: See TracChangeset for help on using the changeset viewer.