Print this page
Fix clang errors
3781 gcc4.7 __cplusplus change incompatibility
3781 gcc4.7 __cplusplus change incompatibility

Split Close
Expand all
Collapse all
          --- old/usr/src/head/iso/stdlib_iso.h
          +++ new/usr/src/head/iso/stdlib_iso.h
↓ open down ↓ 35 lines elided ↑ open up ↑
  36   36   * C Standard.  Any new identifiers specified in future amendments to the
  37   37   * C Standard must be placed in this header.  If these new identifiers
  38   38   * are required to also be in the C++ Standard "std" namespace, then for
  39   39   * anything other than macro definitions, corresponding "using" directives
  40   40   * must also be added to <locale.h>.
  41   41   */
  42   42  
  43   43  #ifndef _ISO_STDLIB_ISO_H
  44   44  #define _ISO_STDLIB_ISO_H
  45   45  
  46      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  47      -
  48   46  #include <sys/feature_tests.h>
  49   47  
  50   48  #ifdef  __cplusplus
  51   49  extern "C" {
  52   50  #endif
  53   51  
  54   52  #if defined(__STDC__)
  55   53  extern unsigned char    __ctype[];
  56   54  #define MB_CUR_MAX      __ctype[520]
  57   55  #else
↓ open down ↓ 63 lines elided ↑ open up ↑
 121  119  #if defined(__STDC__)
 122  120  
 123  121  extern void abort(void) __NORETURN;
 124  122  extern int abs(int);
 125  123  extern int atexit(void (*)(void));
 126  124  extern double atof(const char *);
 127  125  extern int atoi(const char *);
 128  126  extern long int atol(const char *);
 129  127  extern void *bsearch(const void *, const void *, size_t, size_t,
 130  128          int (*)(const void *, const void *));
 131      -#if __cplusplus >= 199711L
      129 +#if __cplusplus >= 199711L && defined(__SUNPRO_CC)
 132  130  extern "C++" {
 133  131          void *bsearch(const void *, const void *, size_t, size_t,
 134  132                  int (*)(const void *, const void *));
 135  133  }
 136      -#endif /* __cplusplus >= 199711L */
      134 +#endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */
 137  135  extern void *calloc(size_t, size_t);
 138  136  extern div_t div(int, int);
 139  137  extern void exit(int)
 140  138          __NORETURN;
 141  139  extern void free(void *);
 142  140  extern char *getenv(const char *);
 143  141  extern long int labs(long);
 144  142  extern ldiv_t ldiv(long, long);
 145  143  extern void *malloc(size_t);
 146  144  extern int mblen(const char *, size_t);
 147  145  extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
 148  146          size_t);
 149  147  extern int mbtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
 150  148  extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
 151      -#if __cplusplus >= 199711L
      149 +#if __cplusplus >= 199711L && defined(__SUNPRO_CC)
 152  150  extern "C++" {
 153  151          void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
 154  152  }
 155      -#endif /* __cplusplus >= 199711L */
      153 +#endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */
 156  154  extern int rand(void);
 157  155  extern void *realloc(void *, size_t);
 158  156  extern void srand(unsigned int);
 159  157  extern double strtod(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
 160  158  extern long int strtol(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD, int);
 161  159  extern unsigned long int strtoul(const char *_RESTRICT_KYWD,
 162  160          char **_RESTRICT_KYWD, int);
 163  161  extern int system(const char *);
 164  162  extern int wctomb(char *, wchar_t);
 165  163  extern size_t wcstombs(char *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
↓ open down ↓ 51 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX