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


  26 
  27 /*      Copyright (c) 1988 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 
  31 /*
  32  * An application should not include this header directly.  Instead it
  33  * should be included only through the inclusion of other Sun headers.
  34  *
  35  * The contents of this header is limited to identifiers specified in the
  36  * C Standard.  Any new identifiers specified in future amendments to the
  37  * C Standard must be placed in this header.  If these new identifiers
  38  * are required to also be in the C++ Standard "std" namespace, then for
  39  * anything other than macro definitions, corresponding "using" directives
  40  * must also be added to <locale.h>.
  41  */
  42 
  43 #ifndef _ISO_STDLIB_ISO_H
  44 #define _ISO_STDLIB_ISO_H
  45 
  46 #pragma ident   "%Z%%M% %I%     %E% SMI"
  47 
  48 #include <sys/feature_tests.h>
  49 
  50 #ifdef  __cplusplus
  51 extern "C" {
  52 #endif
  53 
  54 #if defined(__STDC__)
  55 extern unsigned char    __ctype[];
  56 #define MB_CUR_MAX      __ctype[520]
  57 #else
  58 extern unsigned char    _ctype[];
  59 #define MB_CUR_MAX      _ctype[520]
  60 #endif
  61 
  62 #if __cplusplus >= 199711L
  63 namespace std {
  64 #endif
  65 
  66 typedef struct {
  67         int     quot;


 111 #ifndef _WCHAR_T
 112 #define _WCHAR_T
 113 #if defined(_LP64)
 114 typedef int     wchar_t;
 115 #else
 116 typedef long    wchar_t;
 117 #endif
 118 #endif  /* !_WCHAR_T */
 119 #endif  /* !defined(__cplusplus) ... */
 120 
 121 #if defined(__STDC__)
 122 
 123 extern void abort(void) __NORETURN;
 124 extern int abs(int);
 125 extern int atexit(void (*)(void));
 126 extern double atof(const char *);
 127 extern int atoi(const char *);
 128 extern long int atol(const char *);
 129 extern void *bsearch(const void *, const void *, size_t, size_t,
 130         int (*)(const void *, const void *));
 131 #if __cplusplus >= 199711L
 132 extern "C++" {
 133         void *bsearch(const void *, const void *, size_t, size_t,
 134                 int (*)(const void *, const void *));
 135 }
 136 #endif /* __cplusplus >= 199711L */
 137 extern void *calloc(size_t, size_t);
 138 extern div_t div(int, int);
 139 extern void exit(int)
 140         __NORETURN;
 141 extern void free(void *);
 142 extern char *getenv(const char *);
 143 extern long int labs(long);
 144 extern ldiv_t ldiv(long, long);
 145 extern void *malloc(size_t);
 146 extern int mblen(const char *, size_t);
 147 extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
 148         size_t);
 149 extern int mbtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
 150 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
 151 #if __cplusplus >= 199711L
 152 extern "C++" {
 153         void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
 154 }
 155 #endif /* __cplusplus >= 199711L */
 156 extern int rand(void);
 157 extern void *realloc(void *, size_t);
 158 extern void srand(unsigned int);
 159 extern double strtod(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
 160 extern long int strtol(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD, int);
 161 extern unsigned long int strtoul(const char *_RESTRICT_KYWD,
 162         char **_RESTRICT_KYWD, int);
 163 extern int system(const char *);
 164 extern int wctomb(char *, wchar_t);
 165 extern size_t wcstombs(char *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
 166         size_t);
 167 
 168 #if __cplusplus >= 199711L
 169 extern "C++" {
 170         inline long   abs(long _l) { return labs(_l); }
 171         inline ldiv_t div(long _l1, long _l2) { return ldiv(_l1, _l2); }
 172 }
 173 #endif /* __cplusplus */
 174 
 175 #else /* not __STDC__ */




  26 
  27 /*      Copyright (c) 1988 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 
  31 /*
  32  * An application should not include this header directly.  Instead it
  33  * should be included only through the inclusion of other Sun headers.
  34  *
  35  * The contents of this header is limited to identifiers specified in the
  36  * C Standard.  Any new identifiers specified in future amendments to the
  37  * C Standard must be placed in this header.  If these new identifiers
  38  * are required to also be in the C++ Standard "std" namespace, then for
  39  * anything other than macro definitions, corresponding "using" directives
  40  * must also be added to <locale.h>.
  41  */
  42 
  43 #ifndef _ISO_STDLIB_ISO_H
  44 #define _ISO_STDLIB_ISO_H
  45 


  46 #include <sys/feature_tests.h>
  47 
  48 #ifdef  __cplusplus
  49 extern "C" {
  50 #endif
  51 
  52 #if defined(__STDC__)
  53 extern unsigned char    __ctype[];
  54 #define MB_CUR_MAX      __ctype[520]
  55 #else
  56 extern unsigned char    _ctype[];
  57 #define MB_CUR_MAX      _ctype[520]
  58 #endif
  59 
  60 #if __cplusplus >= 199711L
  61 namespace std {
  62 #endif
  63 
  64 typedef struct {
  65         int     quot;


 109 #ifndef _WCHAR_T
 110 #define _WCHAR_T
 111 #if defined(_LP64)
 112 typedef int     wchar_t;
 113 #else
 114 typedef long    wchar_t;
 115 #endif
 116 #endif  /* !_WCHAR_T */
 117 #endif  /* !defined(__cplusplus) ... */
 118 
 119 #if defined(__STDC__)
 120 
 121 extern void abort(void) __NORETURN;
 122 extern int abs(int);
 123 extern int atexit(void (*)(void));
 124 extern double atof(const char *);
 125 extern int atoi(const char *);
 126 extern long int atol(const char *);
 127 extern void *bsearch(const void *, const void *, size_t, size_t,
 128         int (*)(const void *, const void *));
 129 #if __cplusplus >= 199711L && defined(__SUNPRO_CC)
 130 extern "C++" {
 131         void *bsearch(const void *, const void *, size_t, size_t,
 132                 int (*)(const void *, const void *));
 133 }
 134 #endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */
 135 extern void *calloc(size_t, size_t);
 136 extern div_t div(int, int);
 137 extern void exit(int)
 138         __NORETURN;
 139 extern void free(void *);
 140 extern char *getenv(const char *);
 141 extern long int labs(long);
 142 extern ldiv_t ldiv(long, long);
 143 extern void *malloc(size_t);
 144 extern int mblen(const char *, size_t);
 145 extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
 146         size_t);
 147 extern int mbtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
 148 extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
 149 #if __cplusplus >= 199711L && defined(__SUNPRO_CC)
 150 extern "C++" {
 151         void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
 152 }
 153 #endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */
 154 extern int rand(void);
 155 extern void *realloc(void *, size_t);
 156 extern void srand(unsigned int);
 157 extern double strtod(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD);
 158 extern long int strtol(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD, int);
 159 extern unsigned long int strtoul(const char *_RESTRICT_KYWD,
 160         char **_RESTRICT_KYWD, int);
 161 extern int system(const char *);
 162 extern int wctomb(char *, wchar_t);
 163 extern size_t wcstombs(char *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
 164         size_t);
 165 
 166 #if __cplusplus >= 199711L
 167 extern "C++" {
 168         inline long   abs(long _l) { return labs(_l); }
 169         inline ldiv_t div(long _l1, long _l2) { return ldiv(_l1, _l2); }
 170 }
 171 #endif /* __cplusplus */
 172 
 173 #else /* not __STDC__ */