Print this page
8548 want memset_s(3C)
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/feature_tests.h
          +++ new/usr/src/uts/common/sys/feature_tests.h
↓ open down ↓ 76 lines elided ↑ open up ↑
  77   77   *                      Standard. See additional comments for GNU C differences.
  78   78   *
  79   79   * _STDC_C99            __STDC_VERSION__ is specified by the C standards and
  80   80   *                      defined by the compiler and indicates the version of
  81   81   *                      the C standard. A value of 199901L indicates a
  82   82   *                      compiler that complies with ISO/IEC 9899:1999, other-
  83   83   *                      wise known as the C99 standard.
  84   84   *
  85   85   * _STDC_C11            Like _STDC_C99 except that the value of __STDC_VERSION__
  86   86   *                      is 201112L indicating a compiler that compiles with
  87      - *                      ISO/IEXC 9899:2011, otherwise known as the C11 standard.
       87 + *                      ISO/IEC 9899:2011, otherwise known as the C11 standard.
  88   88   *
  89   89   * _STRICT_SYMBOLS      Used in cases where symbol visibility is restricted
  90   90   *                      by the standards, and the user has not explicitly
  91   91   *                      relaxed the strictness via __EXTENSIONS__.
  92   92   */
  93   93  
  94   94  #if defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE)
  95   95  #define __XOPEN_OR_POSIX
  96   96  #endif
  97   97  
↓ open down ↓ 25 lines elided ↑ open up ↑
 123  123   * of __STDC__ as follows when using the following options:
 124  124   *
 125  125   *                              Value of __STDC__  __STRICT_ANSI__
 126  126   *
 127  127   * cc -Xa (default)                     0             undefined
 128  128   * cc -Xt (transitional)                0             undefined
 129  129   * cc -Xc (strictly conforming)         1             undefined
 130  130   * cc -Xs (K&R C)                   undefined         undefined
 131  131   *
 132  132   * gcc (default)                        1             undefined
 133      - * gcc -ansi, -std={c89, c99,...)       1              defined
      133 + * gcc -ansi, -std={c89, c99,...)       1               defined
 134  134   * gcc -traditional (K&R)           undefined         undefined
 135  135   *
 136  136   * The default compilation modes for Sun C compilers versus GNU C compilers
 137  137   * results in a differing value for __STDC__ which results in a more
 138  138   * restricted namespace when using Sun compilers. To allow both GNU and Sun
 139  139   * interpretations to peacefully co-exist, we use the following Sun
 140  140   * implementation _STRICT_STDC_ macro:
 141  141   */
 142  142  
 143  143  #if (__STDC__ - 0 == 1 && !defined(__GNUC__)) || \
↓ open down ↓ 40 lines elided ↑ open up ↑
 184  184   *
 185  185   * Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
 186  186   * well.
 187  187   *
 188  188   * The large file interfaces are made visible regardless of the initial values
 189  189   * of the feature test macros under certain circumstances:
 190  190   *    - If no explicit standards-conforming environment is requested (neither
 191  191   *      of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
 192  192   *      __STDC__ does not imply standards conformance).
 193  193   *    - Extended system interfaces are explicitly requested (__EXTENSIONS__
 194      - *      is defined).
      194 + *      is defined).
 195  195   *    - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
 196  196   *      defined).  (Note that this dependency is an artifact of the current
 197  197   *      kernel implementation and may change in future releases.)
 198  198   */
 199  199  #if     (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 200  200                  defined(_KERNEL) || defined(_KMEMUSER) || \
 201  201                  defined(__EXTENSIONS__)
 202  202  #undef  _LARGEFILE64_SOURCE
 203  203  #define _LARGEFILE64_SOURCE     1
 204  204  #endif
↓ open down ↓ 224 lines elided ↑ open up ↑
 429  429   * an ISO C11 compiler is used and "" (null string) if any other
 430  430   * compiler is used. This allows for the use of single prototype
 431  431   * declarations regardless of compiler version.
 432  432   */
 433  433  #if (defined(__STDC__) && defined(_STDC_C11)) && !defined(__cplusplus)
 434  434  #define _NORETURN_KYWD  _Noreturn
 435  435  #else
 436  436  #define _NORETURN_KYWD
 437  437  #endif
 438  438  
      439 +/* ISO/IEC 9899:2011 Annex K */
      440 +#if !defined(_STRICT_SYMBOLS)
      441 +#define __EXT1_VISIBLE  1
      442 +#else
      443 +#define __EXT1_VISIBLE  0
      444 +#endif
 439  445  
      446 +#if defined(__STDC_WANT_LIB_EXT1__)
      447 +#undef  __EXT1_VISIBLE
      448 +#if __STDC_WANT_LIB_EXT1__
      449 +#define __EXT1_VISIBLE          1
      450 +#else
      451 +#define __EXT1_VISIBLE          0
      452 +#endif
      453 +#endif /* __STDC_WANT_LIB_EXT1__ */
      454 +
 440  455  /*
 441  456   * The following macro indicates header support for the ANSI C++
 442  457   * standard.  The ISO/IEC designation for this is ISO/IEC FDIS 14882.
 443  458   */
 444  459  #define _ISO_CPP_14882_1998
 445  460  
 446  461  /*
 447  462   * The following macro indicates header support for the C99 standard,
 448  463   * ISO/IEC 9899:1999, Programming Languages - C.
 449  464   */
 450  465  #define _ISO_C_9899_1999
 451  466  
 452  467  /*
 453      - * The following macro indicates header support for the C99 standard,
      468 + * The following macro indicates header support for the C11 standard,
 454  469   * ISO/IEC 9899:2011, Programming Languages - C.
 455  470   */
 456  471  #define _ISO_C_9899_2011
 457  472  
 458  473  /*
      474 + * The following macro indicates header support for the C11 standard,
      475 + * ISO/IEC 9899:2011 Annex K, Programming Languages - C.
      476 + */
      477 +#undef  __STDC_LIB_EXT1__
      478 +
      479 +/*
 459  480   * The following macro indicates header support for DTrace. The value is an
 460  481   * integer that corresponds to the major version number for DTrace.
 461  482   */
 462  483  #define _DTRACE_VERSION 1
 463  484  
 464  485  #ifdef  __cplusplus
 465  486  }
 466  487  #endif
 467  488  
 468  489  #endif  /* _SYS_FEATURE_TESTS_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX