diff options
Diffstat (limited to 'system/include')
114 files changed, 10502 insertions, 6319 deletions
diff --git a/system/include/libc/_ansi.h b/system/include/libc/_ansi.h index 8548e0fe..c38e22e8 100644 --- a/system/include/libc/_ansi.h +++ b/system/include/libc/_ansi.h @@ -105,9 +105,9 @@ #ifndef _ATTRIBUTE /* XXX Emscripten */ #ifdef __GNUC__ -#define _ATTRIBUTE(attrs) __attribute__ (attrs) +#define _ATTRIBUTE(attr) __attribute__ ((attr)) #else -#define _ATTRIBUTE(attrs) +#define _ATTRIBUTE(attr) #endif #endif /* XXX Emscripten */ diff --git a/system/include/libc/assert.h b/system/include/libc/assert.h index 6035227f..8d112839 100644 --- a/system/include/libc/assert.h +++ b/system/include/libc/assert.h @@ -36,10 +36,10 @@ extern "C" { # endif /* !__ASSERT_FUNC */ #endif /* !NDEBUG */ -void _EXFUN(__assert, (const char *, int, const char *)); -/* _ATTRIBUTE ((__noreturn__))); */ -void _EXFUN(__assert_func, (const char *, int, const char *, const char *)); -/* _ATTRIBUTE ((__noreturn__))); */ +void _EXFUN(__assert, (const char *, int, const char *) + _ATTRIBUTE(noreturn)); +void _EXFUN(__assert_func, (const char *, int, const char *, const char *) + _ATTRIBUTE(noreturn)); #ifdef __cplusplus } diff --git a/system/include/libc/math.h b/system/include/libc/math.h index e2f8cdef..3bd0621c 100644 --- a/system/include/libc/math.h +++ b/system/include/libc/math.h @@ -145,9 +145,10 @@ extern double fmod _PARAMS((double, double)); #ifndef FLT_EVAL_METHOD #define FLT_EVAL_METHOD 0 +#endif /* FLT_EVAL_METHOD */ +/* XXX EMSCRIPTEN: moved these out of previous if */ typedef float float_t; typedef double double_t; -#endif /* FLT_EVAL_METHOD */ #define FP_NAN 0 #define FP_INFINITE 1 diff --git a/system/include/libc/stdio.h b/system/include/libc/stdio.h index 4e14df79..19e11039 100644 --- a/system/include/libc/stdio.h +++ b/system/include/libc/stdio.h @@ -184,22 +184,22 @@ int _EXFUN(fflush, (FILE *)); FILE * _EXFUN(freopen, (const char *, const char *, FILE *)); void _EXFUN(setbuf, (FILE *, char *)); int _EXFUN(setvbuf, (FILE *, char *, int, size_t)); -int _EXFUN(fprintf, (FILE *, const char *, ...)); -/* XXX Emscripten_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); */ -int _EXFUN(fscanf, (FILE *, const char *, ...)); -/* _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); */ -int _EXFUN(printf, (const char *, ...)); -/* _ATTRIBUTE ((__format__ (__printf__, 1, 2)))); */ -int _EXFUN(scanf, (const char *, ...)); -/* _ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); */ -int _EXFUN(sscanf, (const char *, const char *, ...)); -/* _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); */ -int _EXFUN(vfprintf, (FILE *, const char *, __VALIST)); -/* _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); */ -int _EXFUN(vprintf, (const char *, __VALIST)); -/* _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); */ -int _EXFUN(vsprintf, (char *, const char *, __VALIST)); -/* _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); */ +int _EXFUN(fprintf, (FILE *, const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 2, 3))); +int _EXFUN(fscanf, (FILE *, const char *, ...) + _ATTRIBUTE (__format__ (__scanf__, 2, 3))); +int _EXFUN(printf, (const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 1, 2))); +int _EXFUN(scanf, (const char *, ...) + _ATTRIBUTE (__format__ (__scanf__, 1, 2))); +int _EXFUN(sscanf, (const char *, const char *, ...) + _ATTRIBUTE (__format__ (__scanf__, 2, 3))); +int _EXFUN(vfprintf, (FILE *, const char *, __VALIST) + _ATTRIBUTE (__format__ (__printf__, 2, 0))); +int _EXFUN(vprintf, (const char *, __VALIST) + _ATTRIBUTE (__format__ (__printf__, 1, 0))); +int _EXFUN(vsprintf, (char *, const char *, __VALIST) + _ATTRIBUTE (__format__ (__printf__, 2, 0))); int _EXFUN(fgetc, (FILE *)); char * _EXFUN(fgets, (char *, int, FILE *)); int _EXFUN(fputc, (int, FILE *)); @@ -232,8 +232,8 @@ int _EXFUN(ferror, (FILE *)); void _EXFUN(perror, (const char *)); #ifndef _REENT_ONLY FILE * _EXFUN(fopen, (const char *_name, const char *_type)); -int _EXFUN(sprintf, (char *, const char *, ...)); -/* XXX EMSCRIPTEN _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); */ +int _EXFUN(sprintf, (char *, const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 2, 3))); int _EXFUN(remove, (const char *)); int _EXFUN(rename, (const char *, const char *)); #endif @@ -248,68 +248,68 @@ off_t _EXFUN(ftello, ( FILE *)); #endif #if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) #ifndef _REENT_ONLY -int _EXFUN(asiprintf, (char **, const char *, ...)); -/* XXX EMSCRIPTEN _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); */ -char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...)); -/* _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); */ -char * _EXFUN(asnprintf, (char *, size_t *, const char *, ...)); -/* _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); */ -int _EXFUN(asprintf, (char **, const char *, ...)); -/* _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); */ +int _EXFUN(asiprintf, (char **, const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 2, 3))); +char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 3, 4))); +char * _EXFUN(asnprintf, (char *, size_t *, const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 3, 4))); +int _EXFUN(asprintf, (char **, const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 2, 3))); #ifndef diprintf -int _EXFUN(diprintf, (int, const char *, ...)); -/* _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); */ +int _EXFUN(diprintf, (int, const char *, ...) + _ATTRIBUTE (__format__ (__printf__, 2, 3))); #endif int _EXFUN(fcloseall, (_VOID)); -int _EXFUN(fiprintf, (FILE *, c |