diff --git a/README.md b/README.md index 798d1c2..e2fd083 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Current status is alpha quality, actively developed. AP STATION mode (ie wifi cl * [FreeRTOS](http://www.freertos.org/) V10.0.1 * [lwIP](http://lwip.wikia.com/wiki/LwIP_Wiki) v2.0.3, with [some modifications](https://github.com/ourairquality/lwip/). -* [newlib](https://github.com/ourairquality/newlib) v2.5.0, with patches for xtensa support and locking stubs for thread-safe operation on FreeRTOS. +* [newlib](https://github.com/ourairquality/newlib) v3.0.0, with patches for xtensa support and locking stubs for thread-safe operation on FreeRTOS. For details of how third party libraries are integrated, [see the wiki page](https://github.com/SuperHouse/esp-open-rtos/wiki/Third-Party-Libraries). diff --git a/core/newlib_syscalls.c b/core/newlib_syscalls.c index b8b062b..452e51d 100644 --- a/core/newlib_syscalls.c +++ b/core/newlib_syscalls.c @@ -194,9 +194,9 @@ __attribute__((weak, alias("syscall_returns_enosys"))) off_t _lseek_r(struct _reent *r, int fd, off_t offset, int whence); __attribute__((weak, alias("_gettimeofday_r"))) -int _gettimeofday_r _PARAMS ((struct _reent *r, struct timeval *now, void *p)) { - now->tv_sec = 0; - now->tv_usec = 0; +int _gettimeofday_r (struct _reent *ptr, struct timeval *ptimeval, void *ptimezone) { + ptimeval->tv_sec = 0; + ptimeval->tv_usec = 0; errno = ENOSYS; return -1; } diff --git a/libc/README.md b/libc/README.md index f4d8199..4869531 100644 --- a/libc/README.md +++ b/libc/README.md @@ -1 +1,9 @@ -Newlib from git://sourceware.org/git/newlib-cygwin.git with xtensa & locking patches see https://github.com/ourairquality/newlib and built from commit 7bcbbff5f7e3600806f352e88ec23ae0300edc29 +Newlib from git://sourceware.org/git/newlib-cygwin.git with xtensa & locking patches see https://github.com/ourairquality/newlib and built from commit 7558d27f9dba58ba0e51e37a2aa3ea6be7214799 + +The build commands were: + +mkdir build +cd build +../configure --with-newlib --enable-multilib --disable-newlib-io-c99-formats --enable-newlib-supplied-syscalls --enable-target-optspace --program-transform-name="s&^&xtensa-lx106-elf-&" --disable-option-checking --with-target-subdir=xtensa-lx106-elf --target=xtensa-lx106-elf --enable-newlib-nano-malloc --enable-newlib-nano-formatted-io --enable-newlib-reent-small --disable-newlib-mb --prefix=/tmp/libc +env CROSS_CFLAGS="-DSIGNAL_PROVIDED -DABORT_PROVIDED" make +make install diff --git a/libc/xtensa-lx106-elf/include/_ansi.h b/libc/xtensa-lx106-elf/include/_ansi.h index 5fb9907..6c7497e 100644 --- a/libc/xtensa-lx106-elf/include/_ansi.h +++ b/libc/xtensa-lx106-elf/include/_ansi.h @@ -1,11 +1,6 @@ /* Provide support for both ANSI and non-ANSI environments. */ -/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be - relied upon to have it's intended meaning. Therefore we must use our own - concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib - sources! - - To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will +/* To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header files aren't affected). */ @@ -15,14 +10,6 @@ #include #include -/* First try to figure out whether we really are in an ANSI C environment. */ -/* FIXME: This probably needs some work. Perhaps sys/config.h can be - prevailed upon to give us a clue. */ - -#ifdef __STDC__ -#define _HAVE_STDC -#endif - /* ISO C++. */ #ifdef __cplusplus @@ -46,54 +33,9 @@ #define _NOTHROW #endif -#ifdef _HAVE_STDC -#define _PTR void * -#define _AND , -#define _NOARGS void -#define _CONST const -#define _VOLATILE volatile -#define _SIGNED signed -#define _DOTS , ... -#define _VOID void -#ifdef __CYGWIN__ -#define _EXFUN_NOTHROW(name, proto) __cdecl name proto _NOTHROW -#define _EXFUN(name, proto) __cdecl name proto -#define _EXPARM(name, proto) (* __cdecl name) proto -#define _EXFNPTR(name, proto) (__cdecl * name) proto -#else -#define _EXFUN_NOTHROW(name, proto) name proto _NOTHROW -#define _EXFUN(name, proto) name proto -#define _EXPARM(name, proto) (* name) proto -#define _EXFNPTR(name, proto) (* name) proto -#endif -#define _DEFUN(name, arglist, args) name(args) -#define _DEFUN_VOID(name) name(_NOARGS) -#define _CAST_VOID (void) #ifndef _LONG_DOUBLE #define _LONG_DOUBLE long double #endif -#ifndef _PARAMS -#define _PARAMS(paramlist) paramlist -#endif -#else -#define _PTR char * -#define _AND ; -#define _NOARGS -#define _CONST -#define _VOLATILE -#define _SIGNED -#define _DOTS -#define _VOID void -#define _EXFUN(name, proto) name() -#define _EXFUN_NOTHROW(name, proto) name() -#define _DEFUN(name, arglist, args) name arglist args; -#define _DEFUN_VOID(name) name() -#define _CAST_VOID -#define _LONG_DOUBLE double -#ifndef _PARAMS -#define _PARAMS(paramlist) () -#endif -#endif /* Support gcc's __attribute__ facility. */ diff --git a/libc/xtensa-lx106-elf/include/_newlib_version.h b/libc/xtensa-lx106-elf/include/_newlib_version.h index 73b527e..5250a84 100644 --- a/libc/xtensa-lx106-elf/include/_newlib_version.h +++ b/libc/xtensa-lx106-elf/include/_newlib_version.h @@ -3,9 +3,9 @@ #ifndef _NEWLIB_VERSION_H__ #define _NEWLIB_VERSION_H__ 1 -#define _NEWLIB_VERSION "2.5.0" -#define __NEWLIB__ 2 -#define __NEWLIB_MINOR__ 5 +#define _NEWLIB_VERSION "3.0.0" +#define __NEWLIB__ 3 +#define __NEWLIB_MINOR__ 0 #define __NEWLIB_PATCHLEVEL__ 0 #endif /* !_NEWLIB_VERSION_H__ */ diff --git a/libc/xtensa-lx106-elf/include/alloca.h b/libc/xtensa-lx106-elf/include/alloca.h index 2ea0fd9..5d36318 100644 --- a/libc/xtensa-lx106-elf/include/alloca.h +++ b/libc/xtensa-lx106-elf/include/alloca.h @@ -15,7 +15,7 @@ #ifdef __GNUC__ #define alloca(size) __builtin_alloca(size) #else -void * _EXFUN(alloca,(size_t)); +void * alloca (size_t); #endif #endif diff --git a/libc/xtensa-lx106-elf/include/assert.h b/libc/xtensa-lx106-elf/include/assert.h index 91bb040..b9e5e9b 100644 --- a/libc/xtensa-lx106-elf/include/assert.h +++ b/libc/xtensa-lx106-elf/include/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 __assert (const char *, int, const char *) + _ATTRIBUTE ((__noreturn__)); +void __assert_func (const char *, int, const char *, const char *) + _ATTRIBUTE ((__noreturn__)); #if __STDC_VERSION__ >= 201112L && !defined __cplusplus # define static_assert _Static_assert diff --git a/libc/xtensa-lx106-elf/include/ctype.h b/libc/xtensa-lx106-elf/include/ctype.h index 06458cb..f74b349 100644 --- a/libc/xtensa-lx106-elf/include/ctype.h +++ b/libc/xtensa-lx106-elf/include/ctype.h @@ -10,27 +10,27 @@ _BEGIN_STD_C -int _EXFUN(isalnum, (int __c)); -int _EXFUN(isalpha, (int __c)); -int _EXFUN(iscntrl, (int __c)); -int _EXFUN(isdigit, (int __c)); -int _EXFUN(isgraph, (int __c)); -int _EXFUN(islower, (int __c)); -int _EXFUN(isprint, (int __c)); -int _EXFUN(ispunct, (int __c)); -int _EXFUN(isspace, (int __c)); -int _EXFUN(isupper, (int __c)); -int _EXFUN(isxdigit,(int __c)); -int _EXFUN(tolower, (int __c)); -int _EXFUN(toupper, (int __c)); +int isalnum (int __c); +int isalpha (int __c); +int iscntrl (int __c); +int isdigit (int __c); +int isgraph (int __c); +int islower (int __c); +int isprint (int __c); +int ispunct (int __c); +int isspace (int __c); +int isupper (int __c); +int isxdigit (int __c); +int tolower (int __c); +int toupper (int __c); #if __ISO_C_VISIBLE >= 1999 -int _EXFUN(isblank, (int __c)); +int isblank (int __c); #endif #if __MISC_VISIBLE || __XSI_VISIBLE -int _EXFUN(isascii, (int __c)); -int _EXFUN(toascii, (int __c)); +int isascii (int __c); +int toascii (int __c); #define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a') #define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A') #endif @@ -162,7 +162,7 @@ const char *__locale_ctype_ptr_l (locale_t); #endif /* !__cplusplus */ /* For C++ backward-compatibility only. */ -extern __IMPORT _CONST char _ctype_[]; +extern __IMPORT const char _ctype_[]; _END_STD_C diff --git a/libc/xtensa-lx106-elf/include/envlock.h b/libc/xtensa-lx106-elf/include/envlock.h index 9bb6a81..799cf7f 100644 --- a/libc/xtensa-lx106-elf/include/envlock.h +++ b/libc/xtensa-lx106-elf/include/envlock.h @@ -9,7 +9,7 @@ #define ENV_LOCK __env_lock(reent_ptr) #define ENV_UNLOCK __env_unlock(reent_ptr) -void _EXFUN(__env_lock,(struct _reent *reent)); -void _EXFUN(__env_unlock,(struct _reent *reent)); +void __env_lock (struct _reent *reent); +void __env_unlock (struct _reent *reent); #endif /* _INCLUDE_ENVLOCK_H_ */ diff --git a/libc/xtensa-lx106-elf/include/getopt.h b/libc/xtensa-lx106-elf/include/getopt.h index e12d253..9bced42 100644 --- a/libc/xtensa-lx106-elf/include/getopt.h +++ b/libc/xtensa-lx106-elf/include/getopt.h @@ -153,31 +153,25 @@ extern "C" extern int optopt; /* function prototypes */ - int _EXFUN (getopt, - (int __argc, char *const __argv[], const char *__optstring)); + int getopt (int __argc, char *const __argv[], const char *__optstring); - int _EXFUN (getopt_long, - (int __argc, char *const __argv[], const char *__shortopts, - const struct option * __longopts, int *__longind)); + int getopt_long (int __argc, char *const __argv[], const char *__shortopts, + const struct option * __longopts, int *__longind); - int _EXFUN (getopt_long_only, - (int __argc, char *const __argv[], const char *__shortopts, - const struct option * __longopts, int *__longind)); + int getopt_long_only (int __argc, char *const __argv[], const char *__shortopts, + const struct option * __longopts, int *__longind); #ifdef __need_getopt_newlib - int _EXFUN (__getopt_r, - (int __argc, char *const __argv[], const char *__optstring, - struct getopt_data * __data)); + int __getopt_r (int __argc, char *const __argv[], const char *__optstring, + struct getopt_data * __data); - int _EXFUN (__getopt_long_r, - (int __argc, char *const __argv[], const char *__shortopts, + int __getopt_long_r (int __argc, char *const __argv[], const char *__shortopts, const struct option * __longopts, int *__longind, - struct getopt_data * __data)); + struct getopt_data * __data); - int _EXFUN (__getopt_long_only_r, - (int __argc, char *const __argv[], const char *__shortopts, + int __getopt_long_only_r (int __argc, char *const __argv[], const char *__shortopts, const struct option * __longopts, int *__longind, - struct getopt_data * __data)); + struct getopt_data * __data); #endif /* __need_getopt_newlib */ #ifdef __cplusplus diff --git a/libc/xtensa-lx106-elf/include/iconv.h b/libc/xtensa-lx106-elf/include/iconv.h index 4c023e9..37feb88 100644 --- a/libc/xtensa-lx106-elf/include/iconv.h +++ b/libc/xtensa-lx106-elf/include/iconv.h @@ -38,25 +38,25 @@ _BEGIN_STD_C #ifndef _REENT_ONLY iconv_t -_EXFUN(iconv_open, (_CONST char *, _CONST char *)); +iconv_open (const char *, const char *); size_t -_EXFUN(iconv, (iconv_t, char **__restrict, size_t *__restrict, - char **__restrict, size_t *__restrict)); +iconv (iconv_t, char **__restrict, size_t *__restrict, + char **__restrict, size_t *__restrict); int -_EXFUN(iconv_close, (iconv_t)); +iconv_close (iconv_t); #endif iconv_t -_EXFUN(_iconv_open_r, (struct _reent *, _CONST char *, _CONST char *)); +_iconv_open_r (struct _reent *, const char *, const char *); size_t -_EXFUN(_iconv_r, (struct _reent *, iconv_t, _CONST char **, - size_t *, char **, size_t *)); +_iconv_r (struct _reent *, iconv_t, const char **, + size_t *, char **, size_t *); int -_EXFUN(_iconv_close_r, (struct _reent *, iconv_t)); +_iconv_close_r (struct _reent *, iconv_t); _END_STD_C diff --git a/libc/xtensa-lx106-elf/include/ieeefp.h b/libc/xtensa-lx106-elf/include/ieeefp.h index 2c04284..2d6421a 100644 --- a/libc/xtensa-lx106-elf/include/ieeefp.h +++ b/libc/xtensa-lx106-elf/include/ieeefp.h @@ -215,8 +215,8 @@ typedef int fp_rnd; #define FP_RP 2 /* Round up */ #define FP_RZ 3 /* Round to zero (trunate) */ -fp_rnd _EXFUN(fpgetround,(void)); -fp_rnd _EXFUN(fpsetround, (fp_rnd)); +fp_rnd fpgetround (void); +fp_rnd fpsetround (fp_rnd); /* EXCEPTIONS */ @@ -227,10 +227,10 @@ typedef int fp_except; #define FP_X_UFL 0x02 /* Underflow exception */ #define FP_X_IMP 0x01 /* imprecise exception */ -fp_except _EXFUN(fpgetmask,(void)); -fp_except _EXFUN(fpsetmask,(fp_except)); -fp_except _EXFUN(fpgetsticky,(void)); -fp_except _EXFUN(fpsetsticky, (fp_except)); +fp_except fpgetmask (void); +fp_except fpsetmask (fp_except); +fp_except fpgetsticky (void); +fp_except fpsetsticky (fp_except); /* INTEGER ROUNDING */ @@ -238,8 +238,8 @@ typedef int fp_rdi; #define FP_RDI_TOZ 0 /* Round to Zero */ #define FP_RDI_RD 1 /* Follow float mode */ -fp_rdi _EXFUN(fpgetroundtoi,(void)); -fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi)); +fp_rdi fpgetroundtoi (void); +fp_rdi fpsetroundtoi (fp_rdi); #define __IEEE_DBL_EXPBIAS 1023 #define __IEEE_FLT_EXPBIAS 127 diff --git a/libc/xtensa-lx106-elf/include/langinfo.h b/libc/xtensa-lx106-elf/include/langinfo.h index 59381d6..458b925 100644 --- a/libc/xtensa-lx106-elf/include/langinfo.h +++ b/libc/xtensa-lx106-elf/include/langinfo.h @@ -36,7 +36,10 @@ #include #endif +#ifndef _NL_ITEM_DECLARED typedef int nl_item; +#define _NL_ITEM_DECLARED +#endif enum __nl_item { diff --git a/libc/xtensa-lx106-elf/include/libgen.h b/libc/xtensa-lx106-elf/include/libgen.h index 3c717c5..414b5aa 100644 --- a/libc/xtensa-lx106-elf/include/libgen.h +++ b/libc/xtensa-lx106-elf/include/libgen.h @@ -26,8 +26,8 @@ extern "C" { sure here. */ #undef basename #define basename __xpg_basename -char *_EXFUN(basename, (char *)) __asm__(__ASMNAME("basename")); -char *_EXFUN(dirname, (char *)); +char *basename (char *) __asm__(__ASMNAME("basename")); +char *dirname (char *); #ifdef __cplusplus } diff --git a/libc/xtensa-lx106-elf/include/locale.h b/libc/xtensa-lx106-elf/include/locale.h index 8ba88a9..d11eb00 100644 --- a/libc/xtensa-lx106-elf/include/locale.h +++ b/libc/xtensa-lx106-elf/include/locale.h @@ -68,8 +68,8 @@ struct lconv }; struct _reent; -char *_EXFUN(_setlocale_r,(struct _reent *, int, const char *)); -struct lconv *_EXFUN(_localeconv_r,(struct _reent *)); +char *_setlocale_r (struct _reent *, int, const char *); +struct lconv *_localeconv_r (struct _reent *); struct __locale_t *_newlocale_r (struct _reent *, int, const char *, struct __locale_t *); @@ -79,8 +79,8 @@ struct __locale_t *_uselocale_r (struct _reent *, struct __locale_t *); #ifndef _REENT_ONLY -char *_EXFUN(setlocale,(int, const char *)); -struct lconv *_EXFUN(localeconv,(void)); +char *setlocale (int, const char *); +struct lconv *localeconv (void); #if __POSIX_VISIBLE >= 200809 locale_t newlocale (int, const char *, locale_t); diff --git a/libc/xtensa-lx106-elf/include/machine/fastmath.h b/libc/xtensa-lx106-elf/include/machine/fastmath.h index b13befa..d13ab3b 100644 --- a/libc/xtensa-lx106-elf/include/machine/fastmath.h +++ b/libc/xtensa-lx106-elf/include/machine/fastmath.h @@ -46,7 +46,6 @@ double EXFUN(fast_loge,(double)); #define log2(x) fast_log2(x) #define loge(x) fast_loge(x) -#ifdef _HAVE_STDC /* These functions are in assembler, they really do take floats. This can only be used with a real ANSI compiler */ @@ -94,7 +93,6 @@ float EXFUN(fast_logef,(float)); #define log10f(x) fast_log10f(x) #define log2f(x) fast_log2f(x) #define logef(x) fast_logef(x) -#endif /* Override the functions defined in math.h */ #endif /* __sysvnecv70_target */ diff --git a/libc/xtensa-lx106-elf/include/machine/ieeefp.h b/libc/xtensa-lx106-elf/include/machine/ieeefp.h index 19cc723..4780b1b 100644 --- a/libc/xtensa-lx106-elf/include/machine/ieeefp.h +++ b/libc/xtensa-lx106-elf/include/machine/ieeefp.h @@ -78,7 +78,9 @@ # else # define __IEEE_BIG_ENDIAN # endif -# define __OBSOLETE_MATH_DEFAULT 0 +# if __ARM_FP & 0x8 +# define __OBSOLETE_MATH_DEFAULT 0 +# endif #else # define __IEEE_BIG_ENDIAN # ifdef __ARMEL__ diff --git a/libc/xtensa-lx106-elf/include/machine/setjmp.h b/libc/xtensa-lx106-elf/include/machine/setjmp.h index d93636b..5366c4f 100644 --- a/libc/xtensa-lx106-elf/include/machine/setjmp.h +++ b/libc/xtensa-lx106-elf/include/machine/setjmp.h @@ -386,7 +386,9 @@ _BEGIN_STD_C #endif #ifdef __riscv -#define _JBTYPE long +/* _JBTYPE using long long to make sure the alignment is align to 8 byte, + otherwise in rv32imafd, store/restore FPR may mis-align. */ +#define _JBTYPE long long #ifdef __riscv_32e #define _JBLEN ((4*sizeof(long))/sizeof(long)) #else diff --git a/libc/xtensa-lx106-elf/include/malloc.h b/libc/xtensa-lx106-elf/include/malloc.h index 41b5efd..e12a132 100644 --- a/libc/xtensa-lx106-elf/include/malloc.h +++ b/libc/xtensa-lx106-elf/include/malloc.h @@ -34,113 +34,113 @@ struct mallinfo { /* The routines. */ -extern _PTR malloc _PARAMS ((size_t)); +extern void *malloc (size_t); #ifdef __CYGWIN__ #undef _malloc_r #define _malloc_r(r, s) malloc (s) #else -extern _PTR _malloc_r _PARAMS ((struct _reent *, size_t)); +extern void *_malloc_r (struct _reent *, size_t); #endif -extern _VOID free _PARAMS ((_PTR)); +extern void free (void *); #ifdef __CYGWIN__ #undef _free_r #define _free_r(r, p) free (p) #else -extern _VOID _free_r _PARAMS ((struct _reent *, _PTR)); +extern void _free_r (struct _reent *, void *); #endif -extern _PTR realloc _PARAMS ((_PTR, size_t)); +extern void *realloc (void *, size_t); #ifdef __CYGWIN__ #undef _realloc_r #define _realloc_r(r, p, s) realloc (p, s) #else -extern _PTR _realloc_r _PARAMS ((struct _reent *, _PTR, size_t)); +extern void *_realloc_r (struct _reent *, void *, size_t); #endif -extern _PTR calloc _PARAMS ((size_t, size_t)); +extern void *calloc (size_t, size_t); #ifdef __CYGWIN__ #undef _calloc_r #define _calloc_r(r, s1, s2) calloc (s1, s2); #else -extern _PTR _calloc_r _PARAMS ((struct _reent *, size_t, size_t)); +extern void *_calloc_r (struct _reent *, size_t, size_t); #endif -extern _PTR memalign _PARAMS ((size_t, size_t)); +extern void *memalign (size_t, size_t); #ifdef __CYGWIN__ #undef _memalign_r #define _memalign_r(r, s1, s2) memalign (s1, s2); #else -extern _PTR _memalign_r _PARAMS ((struct _reent *, size_t, size_t)); +extern void *_memalign_r (struct _reent *, size_t, size_t); #endif -extern struct mallinfo mallinfo _PARAMS ((void)); +extern struct mallinfo mallinfo (void); #ifdef __CYGWIN__ #undef _mallinfo_r #define _mallinfo_r(r) mallinfo () #else -extern struct mallinfo _mallinfo_r _PARAMS ((struct _reent *)); +extern struct mallinfo _mallinfo_r (struct _reent *); #endif -extern void malloc_stats _PARAMS ((void)); +extern void malloc_stats (void); #ifdef __CYGWIN__ #undef _malloc_stats_r #define _malloc_stats_r(r) malloc_stats () #else -extern void _malloc_stats_r _PARAMS ((struct _reent *)); +extern void _malloc_stats_r (struct _reent *); #endif -extern int mallopt _PARAMS ((int, int)); +extern int mallopt (int, int); #ifdef __CYGWIN__ #undef _mallopt_r #define _mallopt_r(i1, i2) mallopt (i1, i2) #else -extern int _mallopt_r _PARAMS ((struct _reent *, int, int)); +extern int _mallopt_r (struct _reent *, int, int); #endif -extern size_t malloc_usable_size _PARAMS ((_PTR)); +extern size_t malloc_usable_size (void *); #ifdef __CYGWIN__ #undef _malloc_usable_size_r #define _malloc_usable_size_r(r, p) malloc_usable_size (p) #else -extern size_t _malloc_usable_size_r _PARAMS ((struct _reent *, _PTR)); +extern size_t _malloc_usable_size_r (struct _reent *, void *); #endif /* These aren't too useful on an embedded system, but we define them anyhow. */ -extern _PTR valloc _PARAMS ((size_t)); +extern void *valloc (size_t); #ifdef __CYGWIN__ #undef _valloc_r #define _valloc_r(r, s) valloc (s) #else -extern _PTR _valloc_r _PARAMS ((struct _reent *, size_t)); +extern void *_valloc_r (struct _reent *, size_t); #endif -extern _PTR pvalloc _PARAMS ((size_t)); +extern void *pvalloc (size_t); #ifdef __CYGWIN__ #undef _pvalloc_r #define _pvalloc_r(r, s) pvalloc (s) #else -extern _PTR _pvalloc_r _PARAMS ((struct _reent *, size_t)); +extern void *_pvalloc_r (struct _reent *, size_t); #endif -extern int malloc_trim _PARAMS ((size_t)); +extern int malloc_trim (size_t); #ifdef __CYGWIN__ #undef _malloc_trim_r #define _malloc_trim_r(r, s) malloc_trim (s) #else -extern int _malloc_trim_r _PARAMS ((struct _reent *, size_t)); +extern int _malloc_trim_r (struct _reent *, size_t); #endif /* A compatibility routine for an earlier version of the allocator. */ -extern _VOID mstats _PARAMS ((char *)); +extern void mstats (char *); #ifdef __CYGWIN__ #undef _mstats_r #define _mstats_r(r, p) mstats (p) #else -extern _VOID _mstats_r _PARAMS ((struct _reent *, char *)); +extern void _mstats_r (struct _reent *, char *); #endif /* SVID2/XPG mallopt options */ @@ -159,7 +159,7 @@ extern _VOID _mstats_r _PARAMS ((struct _reent *, char *)); #ifndef __CYGWIN__ /* Some systems provide this, so do too for compatibility. */ -extern void cfree _PARAMS ((_PTR)); +extern void cfree (void *); #endif /* __CYGWIN__ */ #ifdef __cplusplus diff --git a/libc/xtensa-lx106-elf/include/math.h b/libc/xtensa-lx106-elf/include/math.h index 2a322ee..893a5d0 100644 --- a/libc/xtensa-lx106-elf/include/math.h +++ b/libc/xtensa-lx106-elf/include/math.h @@ -83,54 +83,54 @@ _BEGIN_STD_C /* Reentrant ANSI C functions. */ #ifndef __math_68881 -extern double atan _PARAMS((double)); -extern double cos _PARAMS((double)); -extern double sin _PARAMS((double)); -extern double tan _PARAMS((double)); -extern double tanh _PARAMS((double)); -extern double frexp _PARAMS((double, int *)); -extern double modf _PARAMS((double, double *)); -extern double ceil _PARAMS((double)); -extern double fabs _PARAMS((double)); -extern double floor _PARAMS((double)); +extern double atan (double); +extern double cos (double); +extern double sin (double); +extern double tan (double); +extern double tanh (double); +extern double frexp (double, int *); +extern double modf (double, double *); +extern double ceil (double); +extern double fabs (double); +extern double floor (double); #endif /* ! defined (__math_68881) */ /* Non reentrant ANSI C functions. */ #ifndef _REENT_ONLY #ifndef __math_68881 -extern double acos _PARAMS((double)); -extern double asin _PARAMS((double)); -extern double atan2 _PARAMS((double, double)); -extern double cosh _PARAMS((double)); -extern double sinh _PARAMS((double)); -extern double exp _PARAMS((double)); -extern double ldexp _PARAMS((double, int)); -extern double log _PARAMS((double)); -extern double log10 _PARAMS((double)); -extern double pow _PARAMS((double, double)); -extern double sqrt _PARAMS((double)); -extern double fmod _PARAMS((double, double)); +extern double acos (double); +extern double asin (double); +extern double atan2 (double, double); +extern double cosh (double); +extern double sinh (double); +extern double exp (double); +extern double ldexp (double, int); +extern double log (double); +extern double log10 (double); +extern double pow (double, double); +extern double sqrt (double); +extern double fmod (double, double); #endif /* ! defined (__math_68881) */ #endif /* ! defined (_REENT_ONLY) */ #if __MISC_VISIBLE -extern int finite _PARAMS((double)); -extern int finitef _PARAMS((float)); -extern int finitel _PARAMS((long double)); -extern int isinff _PARAMS((float)); -extern int isnanf _PARAMS((float)); +extern int finite (double); +extern int finitef (float); +extern int finitel (long double); +extern int isinff (float); +extern int isnanf (float); #ifdef __CYGWIN__ /* not implemented in newlib yet */ -extern int isinfl _PARAMS((long double)); -extern int isnanl _PARAMS((long double)); +extern int isinfl (long double); +extern int isnanl (long double); #endif #if !defined(__cplusplus) || __cplusplus < 201103L -extern int isinf _PARAMS((double)); +extern int isinf (double); #endif #endif /* __MISC_VISIBLE */ #if (__MISC_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)) \ && (!defined(__cplusplus) || __cplusplus < 201103L) -extern int isnan _PARAMS((double)); +extern int isnan (double); #endif #if __ISO_C_VISIBLE >= 1999 @@ -287,128 +287,128 @@ extern int __signbitd (double x); /* Non ANSI double precision functions. */ -extern double infinity _PARAMS((void)); -extern double nan _PARAMS((const char *)); -extern double copysign _PARAMS((double, double)); -extern double logb _PARAMS((double)); -extern int ilogb _PARAMS((double)); +extern double infinity (void); +extern double nan (const char *); +extern double copysign (double, double); +extern double logb (double); +extern int ilogb (double); -extern double asinh _PARAMS((double)); -extern double cbrt _PARAMS((double)); -extern double nextafter _PARAMS((double, double)); -extern double rint _PARAMS((double)); -extern double scalbn _PARAMS((double, int)); +extern double asinh (double); +extern double cbrt (double); +extern double nextafter (double, double); +extern double rint (double); +extern double scalbn (double, int); -extern double exp2 _PARAMS((double)); -extern double scalbln _PARAMS((double, long int)); -extern double tgamma _PARAMS((double)); -extern double nearbyint _PARAMS((double)); -extern long int lrint _PARAMS((double)); -extern long long int llrint _PARAMS((double)); -extern double round _PARAMS((double)); -extern long int lround _PARAMS((double)); -extern long long int llround _PARAMS((double)); -extern double trunc _PARAMS((double)); -extern double remquo _PARAMS((double, double, int *)); -extern double fdim _PARAMS((double, double)); -extern double fmax _PARAMS((double, double)); -extern double fmin _PARAMS((double, double)); -extern double fma _PARAMS((double, double, double)); +extern double exp2 (double); +extern double scalbln (double, long int); +extern double tgamma (double); +extern double nearbyint (double); +extern long int lrint (double); +extern long long int llrint (double); +extern double round (double); +extern long int lround (double); +extern long long int llround (double); +extern double trunc (double); +extern double remquo (double, double, int *); +extern double fdim (double, double); +extern double fmax (double, double); +extern double fmin (double, double); +extern double fma (double, double, double); #ifndef __math_68881 -extern double log1p _PARAMS((double)); -extern double expm1 _PARAMS((double)); +extern double log1p (double); +extern double expm1 (double); #endif /* ! defined (__math_68881) */ #ifndef _REENT_ONLY -extern double acosh _PARAMS((double)); -extern double atanh _PARAMS((double)); -extern double remainder _PARAMS((double, double)); -extern double gamma _PARAMS((double)); -extern double lgamma _PARAMS((double)); -extern double erf _PARAMS((double)); -extern double erfc _PARAMS((double)); -extern double log2 _PARAMS((double)); +extern double acosh (double); +extern double atanh (double); +extern double remainder (double, double); +extern double gamma (double); +extern double lgamma (double); +extern double erf (double); +extern double erfc (double); +extern double log2 (double); #if !defined(__cplusplus) #define log2(x) (log (x) / _M_LN2) #endif #ifndef __math_68881 -extern double hypot _PARAMS((double, double)); +extern double hypot (double, double); #endif #endif /* ! defined (_REENT_ONLY) */ /* Single precision versions of ANSI functions. */ -extern float atanf _PARAMS((float)); -extern float cosf _PARAMS((float)); -extern float sinf _PARAMS((float)); -extern float tanf _PARAMS((float)); -extern float tanhf _PARAMS((float)); -extern float frexpf _PARAMS((float, int *)); -extern float modff _PARAMS((float, float *)); -extern float ceilf _PARAMS((float)); -extern float fabsf _PARAMS((float)); -extern float floorf _PARAMS((float)); +extern float atanf (float); +extern float cosf (float); +extern float sinf (float); +extern float tanf (float); +extern float tanhf (float); +extern float frexpf (float, int *); +extern float modff (float, float *); +extern float ceilf (float); +extern float fabsf (float); +extern float floorf (float); #ifndef _REENT_ONLY -extern float acosf _PARAMS((float)); -extern float asinf _PARAMS((float)); -extern float atan2f _PARAMS((float, float)); -extern float coshf _PARAMS((float)); -extern float sinhf _PARAMS((float)); -extern float expf _PARAMS((float)); -extern float ldexpf _PARAMS((float, int)); -extern float logf _PARAMS((float)); -extern float log10f _PARAMS((float)); -extern float powf _PARAMS((float, float)); -extern float sqrtf _PARAMS((float)); -extern float fmodf _PARAMS((float, float)); +extern float acosf (float); +extern float asinf (float); +extern float atan2f (float, float); +extern float coshf (float); +extern float sinhf (float); +extern float expf (float); +extern float ldexpf (float, int); +extern float logf (float); +extern float log10f (float); +extern float powf (float, float); +extern float sqrtf (float); +extern float fmodf (float, float); #endif /* ! defined (_REENT_ONLY) */ /* Other single precision functions. */ -extern float exp2f _PARAMS((float)); -extern float scalblnf _PARAMS((float, long int)); -extern float tgammaf _PARAMS((float)); -extern float nearbyintf _PARAMS((float)); -extern long int lrintf _PARAMS((float)); -extern long long int llrintf _PARAMS((float)); -extern float roundf _PARAMS((float)); -extern long int lroundf _PARAMS((float)); -extern long long int llroundf _PARAMS((float)); -extern float truncf _PARAMS((float)); -extern float remquof _PARAMS((float, float, int *)); -extern float fdimf _PARAMS((float, float)); -extern float fmaxf _PARAMS((float, float)); -extern float fminf _PARAMS((float, float)); -extern float fmaf _PARAMS((float, float, float)); +extern float exp2f (float); +extern float scalblnf (float, long int); +extern float tgammaf (float); +extern float nearbyintf (float); +extern long int lrintf (float); +extern long long int llrintf (float); +extern float roundf (float); +extern long int lroundf (float); +extern long long int llroundf (float); +extern float truncf (float); +extern float remquof (float, float, int *); +extern float fdimf (float, float); +extern float fmaxf (float, float); +extern float fminf (float, float); +extern float fmaf (float, float, float); -extern float infinityf _PARAMS((void)); -extern float nanf _PARAMS((const char *)); -extern float copysignf _PARAMS((float, float)); -extern float logbf _PARAMS((float)); -extern int ilogbf _PARAMS((float)); +extern float infinityf (void); +extern float nanf (const char *); +extern float copysignf (float, float); +extern float logbf (float); +extern int ilogbf (float); -extern float asinhf _PARAMS((float)); -extern float cbrtf _PARAMS((float)); -extern float nextafterf _PARAMS((float, float)); -extern float rintf _PARAMS((float)); -extern float scalbnf _PARAMS((float, int)); -extern float log1pf _PARAMS((float)); -extern float expm1f _PARAMS((float)); +extern float asinhf (float); +extern float cbrtf (float); +extern float nextafterf (float, float); +extern float rintf (float); +extern float scalbnf (float, int); +extern float log1pf (float); +extern float expm1f (float); #ifndef _REENT_ONLY -extern float acoshf _PARAMS((float)); -extern float atanhf _PARAMS((float)); -extern float remainderf _PARAMS((float, float)); -extern float gammaf _PARAMS((float)); -extern float lgammaf _PARAMS((float)); -extern float erff _PARAMS((float)); -extern float erfcf _PARAMS((float)); -extern float log2f _PARAMS((float)); -extern float hypotf _PARAMS((float, float)); +extern float acoshf (float); +extern float atanhf (float); +extern float remainderf (float, float); +extern float gammaf (float); +extern float lgammaf (float); +extern float erff (float); +extern float erfcf (float); +extern float log2f (float); +extern float hypotf (float, float); #endif /* ! defined (_REENT_ONLY) */ /* Newlib doesn't fully support long double math functions so far. @@ -419,141 +419,141 @@ extern float hypotf _PARAMS((float, float)); #if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__) /* Reentrant ANSI C functions. */ #ifndef __math_68881 -extern long double atanl _PARAMS((long double)); -extern long double cosl _PARAMS((long double)); -extern long double sinl _PARAMS((long double)); -extern long double tanl _PARAMS((long double)); -extern long double tanhl _PARAMS((long double)); -extern long double frexpl _PARAMS((long double, int *)); -extern long double modfl _PARAMS((long double, long double *)); -extern long double ceill _PARAMS((long double)); -extern long double fabsl _PARAMS((long double)); -extern long double floorl _PARAMS((long double)); -extern long double log1pl _PARAMS((long double)); -extern long double expm1l _PARAMS((long double)); +extern long double atanl (long double); +extern long double cosl (long double); +extern long double sinl (long double); +extern long double tanl (long double); +extern long double tanhl (long double); +extern long double frexpl (long double, int *); +extern long double modfl (long double, long double *); +extern long double ceill (long double); +extern long double fabsl (long double); +extern long double floorl (long double); +extern long double log1pl (long double); +extern long double expm1l (long double); #endif /* ! defined (__math_68881) */ /* Non reentrant ANSI C functions. */ #ifndef _REENT_ONLY #ifndef __math_68881 -extern long double acosl _PARAMS((long double)); -extern long double asinl _PARAMS((long double)); -extern long double atan2l _PARAMS((long double, long double)); -extern long double coshl _PARAMS((long double)); -extern long double sinhl _PARAMS((long double)); -extern long double expl _PARAMS((long double)); -extern long double ldexpl _PARAMS((long double, int)); -extern long double logl _PARAMS((long double)); -extern long double log10l _PARAMS((long double)); -extern long double powl _PARAMS((long double, long double)); -extern long double sqrtl _PARAMS((long double)); -extern long double fmodl _PARAMS((long double, long double)); -extern long double hypotl _PARAMS((long double, long double)); +extern long double acosl (long double); +extern long double asinl (long double); +extern long double atan2l (long double, long double); +extern long double coshl (long double); +extern long double sinhl (long double); +extern long double expl (long double); +extern long double ldexpl (long double, int); +extern long double logl (long double); +extern long double log10l (long double); +extern long double powl (long double, long double); +extern long double sqrtl (long double); +extern long double fmodl (long double, long double); +extern long double hypotl (long double, long double); #endif /* ! defined (__math_68881) */ #endif /* ! defined (_REENT_ONLY) */ -extern long double copysignl _PARAMS((long double, long double)); -extern long double nanl _PARAMS((const char *)); -extern int ilogbl _PARAMS((long double)); -extern long double asinhl _PARAMS((long double)); -extern long double cbrtl _PARAMS((long double)); -extern long double nextafterl _PARAMS((long double, long double)); -extern float nexttowardf _PARAMS((float, long double)); -extern double nexttoward _PARAMS((double, long double)); -extern long double nexttowardl _PARAMS((long double, long double)); -extern long double logbl _PARAMS((long double)); -extern long double log2l _PARAMS((long double)); -extern long double rintl _PARAMS((long double)); -extern long double scalbnl _PARAMS((long double, int)); -extern long double exp2l _PARAMS((long double)); -extern long double scalblnl _PARAMS((long double, long)); -extern long double tgammal _PARAMS((long double)); -extern long double nearbyintl _PARAMS((long double)); -extern long int lrintl _PARAMS((long double)); -extern long long int llrintl _PARAMS((long double)); -extern long double roundl _PARAMS((long double)); -extern long lroundl _PARAMS((long double)); -extern long long int llroundl _PARAMS((long double)); -extern long double truncl _PARAMS((long double)); -extern long double remquol _PARAMS((long double, long double, int *)); -extern long double fdiml _PARAMS((long double, long double)); -extern long double fmaxl _PARAMS((long double, long double)); -extern long double fminl _PARAMS((long double, long double)); -extern long double fmal _PARAMS((long double, long double, long double)); +extern long double copysignl (long double, long double); +extern long double nanl (const char *); +extern int ilogbl (long double); +extern long double asinhl (long double); +extern long double cbrtl (long double); +extern long double nextafterl (long double, long double); +extern float nexttowardf (float, long double); +extern double nexttoward (double, long double); +extern long double nexttowardl (long double, long double); +extern long double logbl (long double); +extern long double log2l (long double); +extern long double rintl (long double); +extern long double scalbnl (long double, int); +extern long double exp2l (long double); +extern long double scalblnl (long double, long); +extern long double tgammal (long double); +extern long double nearbyintl (long double); +extern long int lrintl (long double); +extern long long int llrintl (long double); +extern long double roundl (long double); +extern long lroundl (long double); +extern long long int llroundl (long double); +extern long double truncl (long double); +extern long double remquol (long double, long double, int *); +extern long double fdiml (long double, long double); +extern long double fmaxl (long double, long double); +extern long double fminl (long double, long double); +extern long double fmal (long double, long double, long double); #ifndef _REENT_ONLY -extern long double acoshl _PARAMS((long double)); -extern long double atanhl _PARAMS((long double)); -extern long double remainderl _PARAMS((long double, long double)); -extern long double lgammal _PARAMS((long double)); -extern long double erfl _PARAMS((long double)); -extern long double erfcl _PARAMS((long double)); +extern long double acoshl (long double); +extern long double atanhl (long double); +extern long double remainderl (long double, long double); +extern long double lgammal (long double); +extern long double erfl (long double); +extern long double erfcl (long double); #endif /* ! defined (_REENT_ONLY) */ #else /* !_LDBL_EQ_DBL && !__CYGWIN__ */ -extern long double hypotl _PARAMS((long double, long double)); -extern long double sqrtl _PARAMS((long double)); +extern long double hypotl (long double, long double); +extern long double sqrtl (long double); #ifdef __i386__ /* Other long double precision functions. */ -extern _LONG_DOUBLE rintl _PARAMS((_LONG_DOUBLE)); -extern long int lrintl _PARAMS((_LONG_DOUBLE)); -extern long long int llrintl _PARAMS((_LONG_DOUBLE)); +extern _LONG_DOUBLE rintl (_LONG_DOUBLE); +extern long int lrintl (_LONG_DOUBLE); +extern long long int llrintl (_LONG_DOUBLE); #endif /* __i386__ */ #endif /* !_LDBL_EQ_DBL && !__CYGWIN__ */ #endif /* __ISO_C_VISIBLE >= 1999 */ #if __MISC_VISIBLE -extern double drem _PARAMS((double, double)); -extern float dremf _PARAMS((float, float)); +extern double drem (double, double); +extern float dremf (float, float); #ifdef __CYGWIN__ -extern float dreml _PARAMS((long double, long double)); +extern float dreml (long double, long double); #endif /* __CYGWIN__ */ -extern double gamma_r _PARAMS((double, int *)); -extern double lgamma_r _PARAMS((double, int *)); -extern float gammaf_r _PARAMS((float, int *)); -extern float lgammaf_r _PARAMS((float, int *)); +extern double gamma_r (double, int *); +extern double lgamma_r (double, int *); +extern float gammaf_r (float, int *); +extern float lgammaf_r (float, int *); #endif #if __MISC_VISIBLE || __XSI_VISIBLE -extern double y0 _PARAMS((double)); -extern double y1 _PARAMS((double)); -extern double yn _PARAMS((int, double)); -extern double j0 _PARAMS((double)); -extern double j1 _PARAMS((double)); -extern double jn _PARAMS((int, double)); +extern double y0 (double); +extern double y1 (double); +extern double yn (int, double); +extern double j0 (double); +extern double j1 (double); +extern double jn (int, double); #endif #if __MISC_VISIBLE || __XSI_VISIBLE >= 600 -extern float y0f _PARAMS((float)); -extern float y1f _PARAMS((float)); -extern float ynf _PARAMS((int, float)); -extern float j0f _PARAMS((float)); -extern float j1f _PARAMS((float)); -extern float jnf _PARAMS((int, float)); +extern float y0f (float); +extern float y1f (float); +extern float ynf (int, float); +extern float j0f (float); +extern float j1f (float); +extern float jnf (int, float); #endif /* GNU extensions */ #if __GNU_VISIBLE -extern void sincos _PARAMS((double, double *, double *)); -extern void sincosf _PARAMS((float, float *, float *)); +extern void sincos (double, double *, double *); +extern void sincosf (float, float *, float *); #ifdef __CYGWIN__ -extern void sincosl _PARAMS((long double, long double *, long double *)); +extern void sincosl (long double, long double *, long double *); #endif /* __CYGWIN__ */ # ifndef exp10 -extern double exp10 _PARAMS((double)); +extern double exp10 (double); # endif # ifndef pow10 -extern double pow10 _PARAMS((double)); +extern double pow10 (double); # endif # ifndef exp10f -extern float exp10f _PARAMS((float)); +extern float exp10f (float); # endif # ifndef pow10f -extern float pow10f _PARAMS((float)); +extern float pow10f (float); # endif #ifdef __CYGWIN__ # ifndef exp10l -extern float exp10l _PARAMS((float)); +extern float exp10l (float); # endif # ifndef pow10l -extern float pow10l _PARAMS((float)); +extern float pow10l (float); # endif #endif /* __CYGWIN__ */ #endif /* __GNU_VISIBLE */ @@ -562,7 +562,7 @@ extern float pow10l _PARAMS((float)); /* The gamma functions use a global variable, signgam. */ #ifndef _REENT_ONLY #define signgam (*__signgam()) -extern int *__signgam _PARAMS((void)); +extern int *__signgam (void); #endif /* ! defined (_REENT_ONLY) */ #define __signgam_r(ptr) _REENT_SIGNGAM(ptr) @@ -587,9 +587,9 @@ struct exception }; #ifdef __cplusplus -extern int matherr _PARAMS((struct __exception *e)); +extern int matherr (struct __exception *e); #else -extern int matherr _PARAMS((struct exception *e)); +extern int matherr (struct exception *e); #endif /* Values for the type field of struct exception. */ diff --git a/libc/xtensa-lx106-elf/include/pthread.h b/libc/xtensa-lx106-elf/include/pthread.h index fb2fa93..3dee1c9 100644 --- a/libc/xtensa-lx106-elf/include/pthread.h +++ b/libc/xtensa-lx106-elf/include/pthread.h @@ -39,34 +39,32 @@ struct _pthread_cleanup_context { }; /* Register Fork Handlers */ -int _EXFUN(pthread_atfork,(void (*prepare)(void), void (*parent)(void), - void (*child)(void))); +int pthread_atfork (void (*prepare)(void), void (*parent)(void), + void (*child)(void)); /* Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81 */ -int _EXFUN(pthread_mutexattr_init, (pthread_mutexattr_t *__attr)); -int _EXFUN(pthread_mutexattr_destroy, (pthread_mutexattr_t *__attr)); -int _EXFUN(pthread_mutexattr_getpshared, - (_CONST pthread_mutexattr_t *__attr, int *__pshared)); -int _EXFUN(pthread_mutexattr_setpshared, - (pthread_mutexattr_t *__attr, int __pshared)); +int pthread_mutexattr_init (pthread_mutexattr_t *__attr); +int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); +int pthread_mutexattr_getpshared (const pthread_mutexattr_t *__attr, + int *__pshared); +int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared); #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* Single UNIX Specification 2 Mutex Attributes types */ -int _EXFUN(pthread_mutexattr_gettype, - (_CONST pthread_mutexattr_t *__attr, int *__kind)); -int _EXFUN(pthread_mutexattr_settype, - (pthread_mutexattr_t *__attr, int __kind)); +int pthread_mutexattr_gettype (const pthread_mutexattr_t *__attr, int *__kind); +int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind); #endif /* Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87 */ -int _EXFUN(pthread_mutex_init, - (pthread_mutex_t *__mutex, _CONST pthread_mutexattr_t *__attr)); -int _EXFUN(pthread_mutex_destroy, (pthread_mutex_t *__mutex)); +int pthread_mutex_init (pthread_mutex_t *__mutex, + const pthread_mutexattr_t *__attr); +int pthread_mutex_destroy (pthread_mutex_t *__mutex); /* This is used to statically initialize a pthread_mutex_t. Example: @@ -78,38 +76,36 @@ int _EXFUN(pthread_mutex_destroy, (pthread_mutex_t *__mutex)); /* Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */ -int _EXFUN(pthread_mutex_lock, (pthread_mutex_t *__mutex)); -int _EXFUN(pthread_mutex_trylock, (pthread_mutex_t *__mutex)); -int _EXFUN(pthread_mutex_unlock, (pthread_mutex_t *__mutex)); +int pthread_mutex_lock (pthread_mutex_t *__mutex); +int pthread_mutex_trylock (pthread_mutex_t *__mutex); +int pthread_mutex_unlock (pthread_mutex_t *__mutex); #if defined(_POSIX_TIMEOUTS) -int _EXFUN(pthread_mutex_timedlock, - (pthread_mutex_t *__mutex, _CONST struct timespec *__timeout)); +int pthread_mutex_timedlock (pthread_mutex_t *__mutex, + const struct timespec *__timeout); #endif /* _POSIX_TIMEOUTS */ /* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */ -int _EXFUN(pthread_condattr_init, (pthread_condattr_t *__attr)); -int _EXFUN(pthread_condattr_destroy, (pthread_condattr_t *__attr)); +int pthread_condattr_init (pthread_condattr_t *__attr); +int pthread_condattr_destroy (pthread_condattr_t *__attr); -int _EXFUN(pthread_condattr_getclock, - (const pthread_condattr_t *__restrict __attr, - clockid_t *__restrict __clock_id)); -int _EXFUN(pthread_condattr_setclock, - (pthread_condattr_t *__attr, clockid_t __clock_id)); +int pthread_condattr_getclock (const pthread_condattr_t *__restrict __attr, + clockid_t *__restrict __clock_id); +int pthread_condattr_setclock (pthread_condattr_t *__attr, + clockid_t __clock_id); -int _EXFUN(pthread_condattr_getpshared, - (_CONST pthread_condattr_t *__attr, int *__pshared)); -int _EXFUN(pthread_condattr_setpshared, - (pthread_condattr_t *__attr, int __pshared)); +int pthread_condattr_getpshared (const pthread_condattr_t *__attr, + int *__pshared); +int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared); /* Initializing and Destroying a Condition Variable, P1003.1c/Draft 10, p. 87 */ -int _EXFUN(pthread_cond_init, - (pthread_cond_t *__cond, _CONST pthread_condattr_t *__attr)); -int _EXFUN(pthread_cond_destroy, (pthread_cond_t *__mutex)); +int pthread_cond_init (pthread_cond_t *__cond, + const pthread_condattr_t *__attr); +int pthread_cond_destroy (pthread_cond_t *__mutex); /* This is used to statically initialize a pthread_cond_t. Example: @@ -120,53 +116,50 @@ int _EXFUN(pthread_cond_destroy, (pthread_cond_t *__mutex)); /* Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 */ -int _EXFUN(pthread_cond_signal, (pthread_cond_t *__cond)); -int _EXFUN(pthread_cond_broadcast, (pthread_cond_t *__cond)); +int pthread_cond_signal (pthread_cond_t *__cond); +int pthread_cond_broadcast (pthread_cond_t *__cond); /* Waiting on a Condition, P1003.1c/Draft 10, p. 105 */ -int _EXFUN(pthread_cond_wait, - (pthread_cond_t *__cond, pthread_mutex_t *__mutex)); +int pthread_cond_wait (pthread_cond_t *__cond, pthread_mutex_t *__mutex); -int _EXFUN(pthread_cond_timedwait, - (pthread_cond_t *__cond, pthread_mutex_t *__mutex, - _CONST struct timespec *__abstime)); +int pthread_cond_timedwait (pthread_cond_t *__cond, + pthread_mutex_t *__mutex, + const struct timespec *__abstime); #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) /* Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120 */ -int _EXFUN(pthread_attr_setscope, - (pthread_attr_t *__attr, int __contentionscope)); -int _EXFUN(pthread_attr_getscope, - (_CONST pthread_attr_t *__attr, int *__contentionscope)); -int _EXFUN(pthread_attr_setinheritsched, - (pthread_attr_t *__attr, int __inheritsched)); -int _EXFUN(pthread_attr_getinheritsched, - (_CONST pthread_attr_t *__attr, int *__inheritsched)); -int _EXFUN(pthread_attr_setschedpolicy, - (pthread_attr_t *__attr, int __policy)); -int _EXFUN(pthread_attr_getschedpolicy, - (_CONST pthread_attr_t *__attr, int *__policy)); +int pthread_attr_setscope (pthread_attr_t *__attr, int __contentionscope); +int pthread_attr_getscope (const pthread_attr_t *__attr, + int *__contentionscope); +int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inheritsched); +int pthread_attr_getinheritsched (const pthread_attr_t *__attr, + int *__inheritsched); +int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy); +int pthread_attr_getschedpolicy (const pthread_attr_t *__attr, + int *__policy); #endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ -int _EXFUN(pthread_attr_setschedparam, - (pthread_attr_t *__attr, _CONST struct sched_param *__param)); -int _EXFUN(pthread_attr_getschedparam, - (_CONST pthread_attr_t *__attr, struct sched_param *__param)); +int pthread_attr_setschedparam (pthread_attr_t *__attr, + const struct sched_param *__param); +int pthread_attr_getschedparam (const pthread_attr_t *__attr, + struct sched_param *__param); #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) /* Dynamic Thread Scheduling Parameters Access, P1003.1c/Draft 10, p. 124 */ -int _EXFUN(pthread_getschedparam, - (pthread_t __pthread, int *__policy, struct sched_param *__param)); -int _EXFUN(pthread_setschedparam, - (pthread_t __pthread, int __policy, struct sched_param *__param)); +int pthread_getschedparam (pthread_t __pthread, int *__policy, + struct sched_param *__param); +int pthread_setschedparam (pthread_t __pthread, int __policy, + struct sched_param *__param); /* Set Scheduling Priority of a Thread */ -int _EXFUN(pthread_setschedprio, (pthread_t thread, int prio)); +int pthread_setschedprio (pthread_t thread, int prio); #endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ @@ -180,14 +173,14 @@ int pthread_setname_np(pthread_t, const char *) __nonnull((2)); /* Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */ -int _EXFUN(pthread_mutexattr_setprotocol, - (pthread_mutexattr_t *__attr, int __protocol)); -int _EXFUN(pthread_mutexattr_getprotocol, - (_CONST pthread_mutexattr_t *__attr, int *__protocol)); -int _EXFUN(pthread_mutexattr_setprioceiling, - (pthread_mutexattr_t *__attr, int __prioceiling)); -int _EXFUN(pthread_mutexattr_getprioceiling, - (_CONST pthread_mutexattr_t *__attr, int *__prioceiling)); +int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol); +int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *__attr, + int *__protocol); +int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling); +int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *__attr, + int *__prioceiling); #endif /* _POSIX_THREAD_PRIO_INHERIT || _POSIX_THREAD_PRIO_PROTECT */ @@ -195,37 +188,33 @@ int _EXFUN(pthread_mutexattr_getprioceiling, /* Change the Priority Ceiling of a Mutex, P1003.1c/Draft 10, p. 131 */ -int _EXFUN(pthread_mutex_setprioceiling, - (pthread_mutex_t *__mutex, int __prioceiling, int *__old_ceiling)); -int _EXFUN(pthread_mutex_getprioceiling, - (pthread_mutex_t *__mutex, int *__prioceiling)); +int pthread_mutex_setprioceiling (pthread_mutex_t *__mutex, + int __prioceiling, int *__old_ceiling); +int pthread_mutex_getprioceiling (pthread_mutex_t *__mutex, + int *__prioceiling); #endif /* _POSIX_THREAD_PRIO_PROTECT */ /* Thread Creation Attributes, P1003.1c/Draft 10, p, 140 */ -int _EXFUN(pthread_attr_init, (pthread_attr_t *__attr)); -int _EXFUN(pthread_attr_destroy, (pthread_attr_t *__attr)); -int _EXFUN(pthread_attr_setstack, (pthread_attr_t *attr, - void *__stackaddr, size_t __stacksize)); -int _EXFUN(pthread_attr_getstack, (_CONST pthread_attr_t *attr, - void **__stackaddr, size_t *__stacksize)); -int _EXFUN(pthread_attr_getstacksize, - (_CONST pthread_attr_t *__attr, size_t *__stacksize)); -int _EXFUN(pthread_attr_setstacksize, - (pthread_attr_t *__attr, size_t __stacksize)); -int _EXFUN(pthread_attr_getstackaddr, - (_CONST pthread_attr_t *__attr, void **__stackaddr)); -int _EXFUN(pthread_attr_setstackaddr, - (pthread_attr_t *__attr, void *__stackaddr)); -int _EXFUN(pthread_attr_getdetachstate, - (_CONST pthread_attr_t *__attr, int *__detachstate)); -int _EXFUN(pthread_attr_setdetachstate, - (pthread_attr_t *__attr, int __detachstate)); -int _EXFUN(pthread_attr_getguardsize, - (_CONST pthread_attr_t *__attr, size_t *__guardsize)); -int _EXFUN(pthread_attr_setguardsize, - (pthread_attr_t *__attr, size_t __guardsize)); +int pthread_attr_init (pthread_attr_t *__attr); +int pthread_attr_destroy (pthread_attr_t *__attr); +int pthread_attr_setstack (pthread_attr_t *attr, + void *__stackaddr, size_t __stacksize); +int pthread_attr_getstack (const pthread_attr_t *attr, + void **__stackaddr, size_t *__stacksize); +int pthread_attr_getstacksize (const pthread_attr_t *__attr, + size_t *__stacksize); +int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); +int pthread_attr_getstackaddr (const pthread_attr_t *__attr, + void **__stackaddr); +int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr); +int pthread_attr_getdetachstate (const pthread_attr_t *__attr, + int *__detachstate); +int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate); +int pthread_attr_getguardsize (const pthread_attr_t *__attr, + size_t *__guardsize); +int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize); /* POSIX thread APIs beyond the POSIX standard but provided * in GNU/Linux. They may be provided by other OSes for @@ -233,59 +222,55 @@ int _EXFUN(pthread_attr_setguardsize, */ #if __GNU_VISIBLE #if defined(__rtems__) -int _EXFUN(pthread_attr_setaffinity_np, - (pthread_attr_t *__attr, size_t __cpusetsize, - const cpu_set_t *__cpuset)); -int _EXFUN(pthread_attr_getaffinity_np, - (const pthread_attr_t *__attr, size_t __cpusetsize, - cpu_set_t *__cpuset)); +int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + const cpu_set_t *__cpuset); +int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, + size_t __cpusetsize, cpu_set_t *__cpuset); -int _EXFUN(pthread_setaffinity_np, - (pthread_t __id, size_t __cpusetsize, const cpu_set_t *__cpuset)); -int _EXFUN(pthread_getaffinity_np, - (const pthread_t __id, size_t __cpusetsize, cpu_set_t *__cpuset)); +int pthread_setaffinity_np (pthread_t __id, size_t __cpusetsize, + const cpu_set_t *__cpuset); +int pthread_getaffinity_np (const pthread_t __id, size_t __cpusetsize, + cpu_set_t *__cpuset); -int _EXFUN(pthread_getattr_np, - (pthread_t __id, pthread_attr_t *__attr)); +int pthread_getattr_np (pthread_t __id, pthread_attr_t *__attr); #endif /* defined(__rtems__) */ #endif /* __GNU_VISIBLE */ /* Thread Creation, P1003.1c/Draft 10, p. 144 */ -int _EXFUN(pthread_create, - (pthread_t *__pthread, _CONST pthread_attr_t *__attr, - void *(*__start_routine)( void * ), void *__arg)); +int pthread_create (pthread_t *__pthread, const pthread_attr_t *__attr, + void *(*__start_routine)(void *), void *__arg); /* Wait for Thread Termination, P1003.1c/Draft 10, p. 147 */ -int _EXFUN(pthread_join, (pthread_t __pthread, void **__value_ptr)); +int pthread_join (pthread_t __pthread, void **__value_ptr); /* Detaching a Thread, P1003.1c/Draft 10, p. 149 */ -int _EXFUN(pthread_detach, (pthread_t __pthread)); +int pthread_detach (pthread_t __pthread); /* Thread Termination, p1003.1c/Draft 10, p. 150 */ -void _EXFUN(pthread_exit, (void *__value_ptr)) __dead2; +void pthread_exit (void *__value_ptr) __dead2; /* Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */ -pthread_t _EXFUN(pthread_self, (void)); +pthread_t pthread_self (void); /* Compare Thread IDs, p1003.1c/Draft 10, p. 153 */ -int _EXFUN(pthread_equal, (pthread_t __t1, pthread_t __t2)); +int pthread_equal (pthread_t __t1, pthread_t __t2); /* Retrieve ID of a Thread's CPU Time Clock */ -int _EXFUN(pthread_getcpuclockid, - (pthread_t thread, clockid_t *clock_id)); +int pthread_getcpuclockid (pthread_t thread, clockid_t *clock_id); /* Get/Set Current Thread's Concurrency Level */ -int _EXFUN(pthread_setconcurrency, (int new_level)); -int _EXFUN(pthread_getconcurrency, (void)); +int pthread_setconcurrency (int new_level); +int pthread_getconcurrency (void); #if __BSD_VISIBLE || __GNU_VISIBLE -void _EXFUN(pthread_yield, (void)); +void pthread_yield (void); #endif /* Dynamic Package Initialization */ @@ -298,23 +283,22 @@ void _EXFUN(pthread_yield, (void)); #define PTHREAD_ONCE_INIT _PTHREAD_ONCE_INIT -int _EXFUN(pthread_once, - (pthread_once_t *__once_control, void (*__init_routine)(void))); +int pthread_once (pthread_once_t *__once_control, + void (*__init_routine)(void)); /* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */ -int _EXFUN(pthread_key_create, - (pthread_key_t *__key, void (*__destructor)( void * ))); +int pthread_key_create (pthread_key_t *__key, + void (*__destructor)(void *)); /* Thread-Specific Data Management, P1003.1c/Draft 10, p. 165 */ -int _EXFUN(pthread_setspecific, - (pthread_key_t __key, _CONST void *__value)); -void * _EXFUN(pthread_getspecific, (pthread_key_t __key)); +int pthread_setspecific (pthread_key_t __key, const void *__value); +void * pthread_getspecific (pthread_key_t __key); /* Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ -int _EXFUN(pthread_key_delete, (pthread_key_t __key)); +int pthread_key_delete (pthread_key_t __key); /* Execution of a Thread, P1003.1c/Draft 10, p. 181 */ @@ -326,23 +310,21 @@ int _EXFUN(pthread_key_delete, (pthread_key_t __key)); #define PTHREAD_CANCELED ((void *) -1) -int _EXFUN(pthread_cancel, (pthread_t __pthread)); +int pthread_cancel (pthread_t __pthread); /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ -int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); -int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); -void _EXFUN(pthread_testcancel, (void)); +int pthread_setcancelstate (int __state, int *__oldstate); +int pthread_setcanceltype (int __type, int *__oldtype); +void pthread_testcancel (void); /* Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184 */ -void _EXFUN(_pthread_cleanup_push, - (struct _pthread_cleanup_context *_context, - void (*_routine)(void *), void *_arg)); +void _pthread_cleanup_push (struct _pthread_cleanup_context *_context, + void (*_routine)(void *), void *_arg); -void _EXFUN(_pthread_cleanup_pop, - (struct _pthread_cleanup_context *_context, - int _execute)); +void _pthread_cleanup_pop (struct _pthread_cleanup_context *_context, + int _execute); /* It is intentional to open and close the scope in two different macros */ #define pthread_cleanup_push(_routine, _arg) \ @@ -355,13 +337,11 @@ void _EXFUN(_pthread_cleanup_pop, } while (0) #if __GNU_VISIBLE -void _EXFUN(_pthread_cleanup_push_defer, - (struct _pthread_cleanup_context *_context, - void (*_routine)(void *), void *_arg)); +void _pthread_cleanup_push_defer (struct _pthread_cleanup_context *_context, + void (*_routine)(void *), void *_arg); -void _EXFUN(_pthread_cleanup_pop_restore, - (struct _pthread_cleanup_context *_context, - int _execute)); +void _pthread_cleanup_pop_restore (struct _pthread_cleanup_context *_context, + int _execute); /* It is intentional to open and close the scope in two different macros */ #define pthread_cleanup_push_defer_np(_routine, _arg) \ @@ -378,8 +358,7 @@ void _EXFUN(_pthread_cleanup_pop_restore, /* Accessing a Thread CPU-time Clock, P1003.4b/D8, p. 58 */ -int _EXFUN(pthread_getcpuclockid, - (pthread_t __pthread_id, clockid_t *__clock_id)); +int pthread_getcpuclockid (pthread_t __pthread_id, clockid_t *__clock_id); #endif /* defined(_POSIX_THREAD_CPUTIME) */ @@ -388,31 +367,30 @@ int _EXFUN(pthread_getcpuclockid, #if defined(_POSIX_BARRIERS) -int _EXFUN(pthread_barrierattr_init, (pthread_barrierattr_t *__attr)); -int _EXFUN(pthread_barrierattr_destroy, (pthread_barrierattr_t *__attr)); -int _EXFUN(pthread_barrierattr_getpshared, - (_CONST pthread_barrierattr_t *__attr, int *__pshared)); -int _EXFUN(pthread_barrierattr_setpshared, - (pthread_barrierattr_t *__attr, int __pshared)); +int pthread_barrierattr_init (pthread_barrierattr_t *__attr); +int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr); +int pthread_barrierattr_getpshared (const pthread_barrierattr_t *__attr, + int *__pshared); +int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared); #define PTHREAD_BARRIER_SERIAL_THREAD -1 -int _EXFUN(pthread_barrier_init, - (pthread_barrier_t *__barrier, - _CONST pthread_barrierattr_t *__attr, unsigned __count)); -int _EXFUN(pthread_barrier_destroy, (pthread_barrier_t *__barrier)); -int _EXFUN(pthread_barrier_wait,(pthread_barrier_t *__barrier)); +int pthread_barrier_init (pthread_barrier_t *__barrier, + const pthread_barrierattr_t *__attr, + unsigned __count); +int pthread_barrier_destroy (pthread_barrier_t *__barrier); +int pthread_barrier_wait (pthread_barrier_t *__barrier); #endif /* defined(_POSIX_BARRIERS) */ #if defined(_POSIX_SPIN_LOCKS) -int _EXFUN(pthread_spin_init, - (pthread_spinlock_t *__spinlock, int __pshared)); -int _EXFUN(pthread_spin_destroy, (pthread_spinlock_t *__spinlock)); -int _EXFUN(pthread_spin_lock, (pthread_spinlock_t *__spinlock)); -int _EXFUN(pthread_spin_trylock, (pthread_spinlock_t *__spinlock)); -int _EXFUN(pthread_spin_unlock, (pthread_spinlock_t *__spinlock)); +int pthread_spin_init (pthread_spinlock_t *__spinlock, int __pshared); +int pthread_spin_destroy (pthread_spinlock_t *__spinlock); +int pthread_spin_lock (pthread_spinlock_t *__spinlock); +int pthread_spin_trylock (pthread_spinlock_t *__spinlock); +int pthread_spin_unlock (pthread_spinlock_t *__spinlock); #endif /* defined(_POSIX_SPIN_LOCKS) */ @@ -425,25 +403,25 @@ int _EXFUN(pthread_spin_unlock, (pthread_spinlock_t *__spinlock)); #define PTHREAD_RWLOCK_INITIALIZER _PTHREAD_RWLOCK_INITIALIZER -int _EXFUN(pthread_rwlockattr_init, (pthread_rwlockattr_t *__attr)); -int _EXFUN(pthread_rwlockattr_destroy, (pthread_rwlockattr_t *__attr)); -int _EXFUN(pthread_rwlockattr_getpshared, - (_CONST pthread_rwlockattr_t *__attr, int *__pshared)); -int _EXFUN(pthread_rwlockattr_setpshared, - (pthread_rwlockattr_t *__attr, int __pshared)); +int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr); +int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr); +int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *__attr, + int *__pshared); +int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared); -int _EXFUN(pthread_rwlock_init, - (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); -int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); -int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); -int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); -int _EXFUN(pthread_rwlock_timedrdlock, - (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); -int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); -int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); -int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); -int _EXFUN(pthread_rwlock_timedwrlock, - (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); +int pthread_rwlock_init (pthread_rwlock_t *__rwlock, + const pthread_rwlockattr_t *__attr); +int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); +int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); +int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); +int pthread_rwlock_timedrdlock (pthread_rwlock_t *__rwlock, + const struct timespec *__abstime); +int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); +int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); +int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); +int pthread_rwlock_timedwrlock (pthread_rwlock_t *__rwlock, + const struct timespec *__abstime); #endif /* defined(_POSIX_READER_WRITER_LOCKS) */ diff --git a/libc/xtensa-lx106-elf/include/reent.h b/libc/xtensa-lx106-elf/include/reent.h index b7664b0..2b01fbe 100644 --- a/libc/xtensa-lx106-elf/include/reent.h +++ b/libc/xtensa-lx106-elf/include/reent.h @@ -136,29 +136,29 @@ struct timezone; #else /* Reentrant versions of system calls. */ -extern int _close_r _PARAMS ((struct _reent *, int)); -extern int _execve_r _PARAMS ((struct _reent *, const char *, char *const *, char *const *)); -extern int _fcntl_r _PARAMS ((struct _reent *, int, int, int)); -extern int _fork_r _PARAMS ((struct _reent *)); -extern int _fstat_r _PARAMS ((struct _reent *, int, struct stat *)); -extern int _getpid_r _PARAMS ((struct _reent *)); -extern int _isatty_r _PARAMS ((struct _reent *, int)); -extern int _kill_r _PARAMS ((struct _reent *, int, int)); -extern int _link_r _PARAMS ((struct _reent *, const char *, const char *)); -extern _off_t _lseek_r _PARAMS ((struct _reent *, int, _off_t, int)); -extern int _mkdir_r _PARAMS ((struct _reent *, const char *, int)); -extern int _open_r _PARAMS ((struct _reent *, const char *, int, int)); -extern _ssize_t _read_r _PARAMS ((struct _reent *, int, void *, size_t)); -extern int _rename_r _PARAMS ((struct _reent *, const char *, const char *)); -extern void *_sbrk_r _PARAMS ((struct _reent *, ptrdiff_t)); -extern int _stat_r _PARAMS ((struct _reent *, const char *, struct stat *)); -extern _CLOCK_T_ _times_r _PARAMS ((struct _reent *, struct tms *)); -extern int _unlink_r _PARAMS ((struct _reent *, const char *)); -extern int _wait_r _PARAMS ((struct _reent *, int *)); -extern _ssize_t _write_r _PARAMS ((struct _reent *, int, const void *, size_t)); +extern int _close_r (struct _reent *, int); +extern int _execve_r (struct _reent *, const char *, char *const *, char *const *); +extern int _fcntl_r (struct _reent *, int, int, int); +extern int _fork_r (struct _reent *); +extern int _fstat_r (struct _reent *, int, struct stat *); +extern int _getpid_r (struct _reent *); +extern int _isatty_r (struct _reent *, int); +extern int _kill_r (struct _reent *, int, int); +extern int _link_r (struct _reent *, const char *, const char *); +extern _off_t _lseek_r (struct _reent *, int, _off_t, int); +extern int _mkdir_r (struct _reent *, const char *, int); +extern int _open_r (struct _reent *, const char *, int, int); +extern _ssize_t _read_r (struct _reent *, int, void *, size_t); +extern int _rename_r (struct _reent *, const char *, const char *); +extern void *_sbrk_r (struct _reent *, ptrdiff_t); +extern int _stat_r (struct _reent *, const char *, struct stat *); +extern _CLOCK_T_ _times_r (struct _reent *, struct tms *); +extern int _unlink_r (struct _reent *, const char *); +extern int _wait_r (struct _reent *, int *); +extern _ssize_t _write_r (struct _reent *, int, const void *, size_t); /* This one is not guaranteed to be available on all targets. */ -extern int _gettimeofday_r _PARAMS ((struct _reent *, struct timeval *__tp, void *__tzp)); +extern int _gettimeofday_r (struct _reent *, struct timeval *__tp, void *__tzp); #ifdef __LARGE64_FILES @@ -168,10 +168,10 @@ extern int _gettimeofday_r _PARAMS ((struct _reent *, struct timeval *__tp, void #endif struct stat64; -extern _off64_t _lseek64_r _PARAMS ((struct _reent *, int, _off64_t, int)); -extern int _fstat64_r _PARAMS ((struct _reent *, int, struct stat64 *)); -extern int _open64_r _PARAMS ((struct _reent *, const char *, int, int)); -extern int _stat64_r _PARAMS ((struct _reent *, const char *, struct stat64 *)); +extern _off64_t _lseek64_r (struct _reent *, int, _off64_t, int); +extern int _fstat64_r (struct _reent *, int, struct stat64 *); +extern int _open64_r (struct _reent *, const char *, int, int); +extern int _stat64_r (struct _reent *, const char *, struct stat64 *); /* Don't pollute namespace if not building newlib. */ #if defined (__CYGWIN__) && !defined (_COMPILING_NEWLIB) diff --git a/libc/xtensa-lx106-elf/include/setjmp.h b/libc/xtensa-lx106-elf/include/setjmp.h index 3d815d9..a2830b2 100644 --- a/libc/xtensa-lx106-elf/include/setjmp.h +++ b/libc/xtensa-lx106-elf/include/setjmp.h @@ -12,14 +12,12 @@ _BEGIN_STD_C #ifdef __GNUC__ -void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)) +void longjmp (jmp_buf __jmpb, int __retval) __attribute__ ((__noreturn__)); #else -void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)); +void longjmp (jmp_buf __jmpb, int __retval); #endif -int _EXFUN(setjmp,(jmp_buf __jmpb)); -#define setjmp(env) setjmp(env) - +int setjmp (jmp_buf __jmpb); _END_STD_C diff --git a/libc/xtensa-lx106-elf/include/signal.h b/libc/xtensa-lx106-elf/include/signal.h index 0324ae7..23a9863 100644 --- a/libc/xtensa-lx106-elf/include/signal.h +++ b/libc/xtensa-lx106-elf/include/signal.h @@ -21,13 +21,13 @@ typedef _sig_func_ptr sighandler_t; /* glibc naming */ struct _reent; -_sig_func_ptr _EXFUN(_signal_r, (struct _reent *, int, _sig_func_ptr)); -int _EXFUN(_raise_r, (struct _reent *, int)); +_sig_func_ptr _signal_r (struct _reent *, int, _sig_func_ptr); +int _raise_r (struct _reent *, int); #ifndef _REENT_ONLY -_sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr)); -int _EXFUN(raise, (int)); -void _EXFUN(psignal, (int, const char *)); +_sig_func_ptr signal (int, _sig_func_ptr); +int raise (int); +void psignal (int, const char *); #endif _END_STD_C diff --git a/libc/xtensa-lx106-elf/include/spawn.h b/libc/xtensa-lx106-elf/include/spawn.h index 5a6692f..d172177 100644 --- a/libc/xtensa-lx106-elf/include/spawn.h +++ b/libc/xtensa-lx106-elf/include/spawn.h @@ -53,67 +53,52 @@ _BEGIN_STD_C * XXX both arrays should be __restrict, but this does not work when GCC * is invoked with -std=c99. */ -int _EXFUN(posix_spawn, (pid_t * __restrict, const char * __restrict, +int posix_spawn (pid_t * __restrict, const char * __restrict, const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, - char * const [], char * const []) -); -int _EXFUN(posix_spawnp, (pid_t * __restrict, const char * __restrict, + char * const [], char * const []); +int posix_spawnp (pid_t * __restrict, const char * __restrict, const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, - char * const [], char * const []) -); + char * const [], char * const []); /* * File descriptor actions */ -int _EXFUN(posix_spawn_file_actions_init, (posix_spawn_file_actions_t *)); -int _EXFUN(posix_spawn_file_actions_destroy, (posix_spawn_file_actions_t *)); +int posix_spawn_file_actions_init (posix_spawn_file_actions_t *); +int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *); -int _EXFUN(posix_spawn_file_actions_addopen, - (posix_spawn_file_actions_t * __restrict, int, const char * __restrict, int, mode_t) -); -int _EXFUN(posix_spawn_file_actions_adddup2, - (posix_spawn_file_actions_t *, int, int) -); -int _EXFUN(posix_spawn_file_actions_addclose, - (posix_spawn_file_actions_t *, int) -); +int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t * __restrict, + int, const char * __restrict, int, mode_t); +int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *, int, int); +int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *, int); /* * Spawn attributes */ -int _EXFUN(posix_spawnattr_init, (posix_spawnattr_t *)); -int _EXFUN(posix_spawnattr_destroy, (posix_spawnattr_t *)); +int posix_spawnattr_init (posix_spawnattr_t *); +int posix_spawnattr_destroy (posix_spawnattr_t *); -int _EXFUN(posix_spawnattr_getflags, - (const posix_spawnattr_t * __restrict, short * __restrict) -); -int _EXFUN(posix_spawnattr_getpgroup, - (const posix_spawnattr_t * __restrict, pid_t * __restrict)); -int _EXFUN(posix_spawnattr_getschedparam, - (const posix_spawnattr_t * __restrict, struct sched_param * __restrict) -); -int _EXFUN(posix_spawnattr_getschedpolicy, - (const posix_spawnattr_t * __restrict, int * __restrict) -); -int _EXFUN(posix_spawnattr_getsigdefault, - (const posix_spawnattr_t * __restrict, sigset_t * __restrict) -); -int _EXFUN(posix_spawnattr_getsigmask, - (const posix_spawnattr_t * __restrict, sigset_t * __restrict) -); +int posix_spawnattr_getflags (const posix_spawnattr_t * __restrict, + short * __restrict); +int posix_spawnattr_getpgroup (const posix_spawnattr_t * __restrict, + pid_t * __restrict); +int posix_spawnattr_getschedparam (const posix_spawnattr_t * __restrict, + struct sched_param * __restrict); +int posix_spawnattr_getschedpolicy (const posix_spawnattr_t * __restrict, + int * __restrict); +int posix_spawnattr_getsigdefault (const posix_spawnattr_t * __restrict, + sigset_t * __restrict); +int posix_spawnattr_getsigmask (const posix_spawnattr_t * __restrict, + sigset_t * __restrict); -int _EXFUN(posix_spawnattr_setflags, (posix_spawnattr_t *, short)); -int _EXFUN(posix_spawnattr_setpgroup, (posix_spawnattr_t *, pid_t)); -int _EXFUN(posix_spawnattr_setschedparam, - (posix_spawnattr_t * __restrict, const struct sched_param * __restrict) -); -int _EXFUN(posix_spawnattr_setschedpolicy, (posix_spawnattr_t *, int)); -int _EXFUN(posix_spawnattr_setsigdefault, - (posix_spawnattr_t * __restrict, const sigset_t * __restrict) -); -int _EXFUN(posix_spawnattr_setsigmask, - (posix_spawnattr_t * __restrict, const sigset_t * __restrict) -); +int posix_spawnattr_setflags (posix_spawnattr_t *, short); +int posix_spawnattr_setpgroup (posix_spawnattr_t *, pid_t); +int posix_spawnattr_setschedparam (posix_spawnattr_t * __restrict, + const struct sched_param * __restrict); +int posix_spawnattr_setschedpolicy (posix_spawnattr_t *, int); +int posix_spawnattr_setsigdefault (posix_spawnattr_t * __restrict, + const sigset_t * __restrict); +int posix_spawnattr_setsigmask (posix_spawnattr_t * __restrict, + const sigset_t * __restrict); _END_STD_C #endif /* !_SPAWN_H_ */ diff --git a/libc/xtensa-lx106-elf/include/stdio.h b/libc/xtensa-lx106-elf/include/stdio.h index b648e62..cbc0fa9 100644 --- a/libc/xtensa-lx106-elf/include/stdio.h +++ b/libc/xtensa-lx106-elf/include/stdio.h @@ -178,155 +178,155 @@ typedef _fpos64_t fpos64_t; #endif #if __POSIX_VISIBLE -char * _EXFUN(ctermid, (char *)); +char * ctermid (char *); #endif #if __XSI_VISIBLE && __XSI_VISIBLE < 600 -char * _EXFUN(cuserid, (char *)); +char * cuserid (char *); #endif -FILE * _EXFUN(tmpfile, (void)); -char * _EXFUN(tmpnam, (char *)); +FILE * tmpfile (void); +char * tmpnam (char *); #if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 -char * _EXFUN(tempnam, (const char *, const char *)); +char * tempnam (const char *, const char *); #endif -int _EXFUN(fclose, (FILE *)); -int _EXFUN(fflush, (FILE *)); -FILE * _EXFUN(freopen, (const char *__restrict, const char *__restrict, FILE *__restrict)); -void _EXFUN(setbuf, (FILE *__restrict, char *__restrict)); -int _EXFUN(setvbuf, (FILE *__restrict, char *__restrict, int, size_t)); -int _EXFUN(fprintf, (FILE *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); -int _EXFUN(fscanf, (FILE *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); -int _EXFUN(printf, (const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 1, 2)))); -int _EXFUN(scanf, (const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); -int _EXFUN(sscanf, (const char *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); -int _EXFUN(vfprintf, (FILE *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -int _EXFUN(vprintf, (const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); -int _EXFUN(vsprintf, (char *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -int _EXFUN(fgetc, (FILE *)); -char * _EXFUN(fgets, (char *__restrict, int, FILE *__restrict)); -int _EXFUN(fputc, (int, FILE *)); -int _EXFUN(fputs, (const char *__restrict, FILE *__restrict)); -int _EXFUN(getc, (FILE *)); -int _EXFUN(getchar, (void)); -char * _EXFUN(gets, (char *)); -int _EXFUN(putc, (int, FILE *)); -int _EXFUN(putchar, (int)); -int _EXFUN(puts, (const char *)); -int _EXFUN(ungetc, (int, FILE *)); -size_t _EXFUN(fread, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); -size_t _EXFUN(fwrite, (const _PTR __restrict , size_t _size, size_t _n, FILE *)); +int fclose (FILE *); +int fflush (FILE *); +FILE * freopen (const char *__restrict, const char *__restrict, FILE *__restrict); +void setbuf (FILE *__restrict, char *__restrict); +int setvbuf (FILE *__restrict, char *__restrict, int, size_t); +int fprintf (FILE *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +int fscanf (FILE *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__scanf__, 2, 3))); +int printf (const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 1, 2))); +int scanf (const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__scanf__, 1, 2))); +int sscanf (const char *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__scanf__, 2, 3))); +int vfprintf (FILE *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +int vprintf (const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 1, 0))); +int vsprintf (char *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +int fgetc (FILE *); +char * fgets (char *__restrict, int, FILE *__restrict); +int fputc (int, FILE *); +int fputs (const char *__restrict, FILE *__restrict); +int getc (FILE *); +int getchar (void); +char * gets (char *); +int putc (int, FILE *); +int putchar (int); +int puts (const char *); +int ungetc (int, FILE *); +size_t fread (void *__restrict, size_t _size, size_t _n, FILE *__restrict); +size_t fwrite (const void *__restrict , size_t _size, size_t _n, FILE *); #ifdef _COMPILING_NEWLIB -int _EXFUN(fgetpos, (FILE *, _fpos_t *)); +int fgetpos (FILE *, _fpos_t *); #else -int _EXFUN(fgetpos, (FILE *__restrict, fpos_t *__restrict)); +int fgetpos (FILE *__restrict, fpos_t *__restrict); #endif -int _EXFUN(fseek, (FILE *, long, int)); +int fseek (FILE *, long, int); #ifdef _COMPILING_NEWLIB -int _EXFUN(fsetpos, (FILE *, const _fpos_t *)); +int fsetpos (FILE *, const _fpos_t *); #else -int _EXFUN(fsetpos, (FILE *, const fpos_t *)); +int fsetpos (FILE *, const fpos_t *); #endif -long _EXFUN(ftell, ( FILE *)); -void _EXFUN(rewind, (FILE *)); -void _EXFUN(clearerr, (FILE *)); -int _EXFUN(feof, (FILE *)); -int _EXFUN(ferror, (FILE *)); -void _EXFUN(perror, (const char *)); +long ftell ( FILE *); +void rewind (FILE *); +void clearerr (FILE *); +int feof (FILE *); +int ferror (FILE *); +void perror (const char *); #ifndef _REENT_ONLY -FILE * _EXFUN(fopen, (const char *__restrict _name, const char *__restrict _type)); -int _EXFUN(sprintf, (char *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); -int _EXFUN(remove, (const char *)); -int _EXFUN(rename, (const char *, const char *)); +FILE * fopen (const char *__restrict _name, const char *__restrict _type); +int sprintf (char *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +int remove (const char *); +int rename (const char *, const char *); #ifdef _COMPILING_NEWLIB -int _EXFUN(_rename, (const char *, const char *)); +int _rename (const char *, const char *); #endif #endif #if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112 #ifdef _COMPILING_NEWLIB -int _EXFUN(fseeko, (FILE *, _off_t, int)); -_off_t _EXFUN(ftello, ( FILE *)); +int fseeko (FILE *, _off_t, int); +_off_t ftello (FILE *); #else -int _EXFUN(fseeko, (FILE *, off_t, int)); -off_t _EXFUN(ftello, ( FILE *)); +int fseeko (FILE *, off_t, int); +off_t ftello (FILE *); #endif #endif #if __GNU_VISIBLE -int _EXFUN(fcloseall, (_VOID)); +int fcloseall (void); #endif #ifndef _REENT_ONLY #if __ISO_C_VISIBLE >= 1999 -int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); -int _EXFUN(vscanf, (const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); -int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); +int snprintf (char *__restrict, size_t, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int vsnprintf (char *__restrict, size_t, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int vfscanf (FILE *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0))); +int vscanf (const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 1, 0))); +int vsscanf (const char *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0))); #endif #if __GNU_VISIBLE -int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); -int _EXFUN(vasprintf, (char **, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); +int asprintf (char **__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +int vasprintf (char **, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); #endif #if __MISC_VISIBLE /* Newlib-specific */ -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 *__restrict, size_t *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); +int asiprintf (char **, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +char * asniprintf (char *, size_t *, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +char * asnprintf (char *__restrict, size_t *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); #ifndef diprintf -int _EXFUN(diprintf, (int, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); +int diprintf (int, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); #endif -int _EXFUN(fiprintf, (FILE *, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); -int _EXFUN(fiscanf, (FILE *, const char *, ...) - _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); -int _EXFUN(iprintf, (const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 1, 2)))); -int _EXFUN(iscanf, (const char *, ...) - _ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); -int _EXFUN(siprintf, (char *, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); -int _EXFUN(siscanf, (const char *, const char *, ...) - _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); -int _EXFUN(sniprintf, (char *, size_t, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(vasiprintf, (char **, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -char * _EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(vdiprintf, (int, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -int _EXFUN(vfiscanf, (FILE *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); -int _EXFUN(viprintf, (const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); -int _EXFUN(viscanf, (const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); -int _EXFUN(vsiprintf, (char *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -int _EXFUN(vsiscanf, (const char *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); -int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); +int fiprintf (FILE *, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +int fiscanf (FILE *, const char *, ...) + _ATTRIBUTE ((__format__ (__scanf__, 2, 3))); +int iprintf (const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 1, 2))); +int iscanf (const char *, ...) + _ATTRIBUTE ((__format__ (__scanf__, 1, 2))); +int siprintf (char *, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +int siscanf (const char *, const char *, ...) + _ATTRIBUTE ((__format__ (__scanf__, 2, 3))); +int sniprintf (char *, size_t, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int vasiprintf (char **, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +char * vasniprintf (char *, size_t *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +char * vasnprintf (char *, size_t *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int vdiprintf (int, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +int vfiprintf (FILE *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +int vfiscanf (FILE *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0))); +int viprintf (const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 1, 0))); +int viscanf (const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 1, 0))); +int vsiprintf (char *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +int vsiscanf (const char *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0))); +int vsniprintf (char *, size_t, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); #endif /* __MISC_VISIBLE */ #endif /* !_REENT_ONLY */ @@ -336,32 +336,32 @@ int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) #if __POSIX_VISIBLE #ifndef _REENT_ONLY -FILE * _EXFUN(fdopen, (int, const char *)); +FILE * fdopen (int, const char *); #endif -int _EXFUN(fileno, (FILE *)); +int fileno (FILE *); #endif #if __MISC_VISIBLE || __POSIX_VISIBLE >= 199209 -int _EXFUN(pclose, (FILE *)); -FILE * _EXFUN(popen, (const char *, const char *)); +int pclose (FILE *); +FILE * popen (const char *, const char *); #endif #if __BSD_VISIBLE -void _EXFUN(setbuffer, (FILE *, char *, int)); -int _EXFUN(setlinebuf, (FILE *)); +void setbuffer (FILE *, char *, int); +int setlinebuf (FILE *); #endif #if __MISC_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) -int _EXFUN(getw, (FILE *)); -int _EXFUN(putw, (int, FILE *)); +int getw (FILE *); +int putw (int, FILE *); #endif #if __MISC_VISIBLE || __POSIX_VISIBLE -int _EXFUN(getc_unlocked, (FILE *)); -int _EXFUN(getchar_unlocked, (void)); -void _EXFUN(flockfile, (FILE *)); -int _EXFUN(ftrylockfile, (FILE *)); -void _EXFUN(funlockfile, (FILE *)); -int _EXFUN(putc_unlocked, (int, FILE *)); -int _EXFUN(putchar_unlocked, (int)); +int getc_unlocked (FILE *); +int getchar_unlocked (void); +void flockfile (FILE *); +int ftrylockfile (FILE *); +void funlockfile (FILE *); +int putc_unlocked (int, FILE *); +int putchar_unlocked (int); #endif /* @@ -371,21 +371,21 @@ int _EXFUN(putchar_unlocked, (int)); #if __POSIX_VISIBLE >= 200809 # ifndef _REENT_ONLY # ifndef dprintf -int _EXFUN(dprintf, (int, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); +int dprintf (int, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); # endif -FILE * _EXFUN(fmemopen, (void *__restrict, size_t, const char *__restrict)); +FILE * fmemopen (void *__restrict, size_t, const char *__restrict); /* getdelim - see __getdelim for now */ /* getline - see __getline for now */ -FILE * _EXFUN(open_memstream, (char **, size_t *)); -int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); +FILE * open_memstream (char **, size_t *); +int vdprintf (int, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); # endif #endif #if __ATFILE_VISIBLE -int _EXFUN(renameat, (int, const char *, int, const char *)); +int renameat (int, const char *, int, const char *); # ifdef __CYGWIN__ -int _EXFUN(renameat2, (int, const char *, int, const char *, unsigned int)); +int renameat2 (int, const char *, int, const char *, unsigned int); # endif #endif @@ -393,180 +393,180 @@ int _EXFUN(renameat2, (int, const char *, int, const char *, unsigned int)); * Recursive versions of the above. */ -int _EXFUN(_asiprintf_r, (struct _reent *, char **, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -char * _EXFUN(_asniprintf_r, (struct _reent *, char *, size_t *, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); -char * _EXFUN(_asnprintf_r, (struct _reent *, char *__restrict, size_t *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); -int _EXFUN(_asprintf_r, (struct _reent *, char **__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(_diprintf_r, (struct _reent *, int, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(_dprintf_r, (struct _reent *, int, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(_fclose_r, (struct _reent *, FILE *)); -int _EXFUN(_fcloseall_r, (struct _reent *)); -FILE * _EXFUN(_fdopen_r, (struct _reent *, int, const char *)); -int _EXFUN(_fflush_r, (struct _reent *, FILE *)); -int _EXFUN(_fgetc_r, (struct _reent *, FILE *)); -int _EXFUN(_fgetc_unlocked_r, (struct _reent *, FILE *)); -char * _EXFUN(_fgets_r, (struct _reent *, char *__restrict, int, FILE *__restrict)); -char * _EXFUN(_fgets_unlocked_r, (struct _reent *, char *__restrict, int, FILE *__restrict)); +int _asiprintf_r (struct _reent *, char **, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +char * _asniprintf_r (struct _reent *, char *, size_t *, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 4, 5))); +char * _asnprintf_r (struct _reent *, char *__restrict, size_t *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 4, 5))); +int _asprintf_r (struct _reent *, char **__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int _diprintf_r (struct _reent *, int, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int _dprintf_r (struct _reent *, int, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int _fclose_r (struct _reent *, FILE *); +int _fcloseall_r (struct _reent *); +FILE * _fdopen_r (struct _reent *, int, const char *); +int _fflush_r (struct _reent *, FILE *); +int _fgetc_r (struct _reent *, FILE *); +int _fgetc_unlocked_r (struct _reent *, FILE *); +char * _fgets_r (struct _reent *, char *__restrict, int, FILE *__restrict); +char * _fgets_unlocked_r (struct _reent *, char *__restrict, int, FILE *__restrict); #ifdef _COMPILING_NEWLIB -int _EXFUN(_fgetpos_r, (struct _reent *, FILE *__restrict, _fpos_t *__restrict)); -int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const _fpos_t *)); +int _fgetpos_r (struct _reent *, FILE *__restrict, _fpos_t *__restrict); +int _fsetpos_r (struct _reent *, FILE *, const _fpos_t *); #else -int _EXFUN(_fgetpos_r, (struct _reent *, FILE *, fpos_t *)); -int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const fpos_t *)); +int _fgetpos_r (struct _reent *, FILE *, fpos_t *); +int _fsetpos_r (struct _reent *, FILE *, const fpos_t *); #endif -int _EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...) - _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); -FILE * _EXFUN(_fmemopen_r, (struct _reent *, void *__restrict, size_t, const char *__restrict)); -FILE * _EXFUN(_fopen_r, (struct _reent *, const char *__restrict, const char *__restrict)); -FILE * _EXFUN(_freopen_r, (struct _reent *, const char *__restrict, const char *__restrict, FILE *__restrict)); -int _EXFUN(_fprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(_fpurge_r, (struct _reent *, FILE *)); -int _EXFUN(_fputc_r, (struct _reent *, int, FILE *)); -int _EXFUN(_fputc_unlocked_r, (struct _reent *, int, FILE *)); -int _EXFUN(_fputs_r, (struct _reent *, const char *__restrict, FILE *__restrict)); -int _EXFUN(_fputs_unlocked_r, (struct _reent *, const char *__restrict, FILE *__restrict)); -size_t _EXFUN(_fread_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); -size_t _EXFUN(_fread_unlocked_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); -int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); -int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int)); -int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int)); -long _EXFUN(_ftell_r, (struct _reent *, FILE *)); -_off_t _EXFUN(_ftello_r,(struct _reent *, FILE *)); -void _EXFUN(_rewind_r, (struct _reent *, FILE *)); -size_t _EXFUN(_fwrite_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); -size_t _EXFUN(_fwrite_unlocked_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); -int _EXFUN(_getc_r, (struct _reent *, FILE *)); -int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *)); -int _EXFUN(_getchar_r, (struct _reent *)); -int _EXFUN(_getchar_unlocked_r, (struct _reent *)); -char * _EXFUN(_gets_r, (struct _reent *, char *)); -int _EXFUN(_iprintf_r, (struct _reent *, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); -int _EXFUN(_iscanf_r, (struct _reent *, const char *, ...) - _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); -FILE * _EXFUN(_open_memstream_r, (struct _reent *, char **, size_t *)); -void _EXFUN(_perror_r, (struct _reent *, const char *)); -int _EXFUN(_printf_r, (struct _reent *, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); -int _EXFUN(_putc_r, (struct _reent *, int, FILE *)); -int _EXFUN(_putc_unlocked_r, (struct _reent *, int, FILE *)); -int _EXFUN(_putchar_unlocked_r, (struct _reent *, int)); -int _EXFUN(_putchar_r, (struct _reent *, int)); -int _EXFUN(_puts_r, (struct _reent *, const char *)); -int _EXFUN(_remove_r, (struct _reent *, const char *)); -int _EXFUN(_rename_r, (struct _reent *, - const char *_old, const char *_new)); -int _EXFUN(_scanf_r, (struct _reent *, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); -int _EXFUN(_siprintf_r, (struct _reent *, char *, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(_siscanf_r, (struct _reent *, const char *, const char *, ...) - _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); -int _EXFUN(_sniprintf_r, (struct _reent *, char *, size_t, const char *, ...) - _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); -int _EXFUN(_snprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 4, 5)))); -int _EXFUN(_sprintf_r, (struct _reent *, char *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); -int _EXFUN(_sscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, ...) - _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); -char * _EXFUN(_tempnam_r, (struct _reent *, const char *, const char *)); -FILE * _EXFUN(_tmpfile_r, (struct _reent *)); -char * _EXFUN(_tmpnam_r, (struct _reent *, char *)); -int _EXFUN(_ungetc_r, (struct _reent *, int, FILE *)); -int _EXFUN(_vasiprintf_r, (struct _reent *, char **, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -char * _EXFUN(_vasniprintf_r, (struct _reent*, char *, size_t *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 4, 0)))); -char * _EXFUN(_vasnprintf_r, (struct _reent*, char *, size_t *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 4, 0)))); -int _EXFUN(_vasprintf_r, (struct _reent *, char **, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_vdiprintf_r, (struct _reent *, int, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_vdprintf_r, (struct _reent *, int, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_vfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_vfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); -int _EXFUN(_vfprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_vfscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); -int _EXFUN(_viprintf_r, (struct _reent *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -int _EXFUN(_viscanf_r, (struct _reent *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); -int _EXFUN(_vprintf_r, (struct _reent *, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); -int _EXFUN(_vscanf_r, (struct _reent *, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); -int _EXFUN(_vsiprintf_r, (struct _reent *, char *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_vsiscanf_r, (struct _reent *, const char *, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); -int _EXFUN(_vsniprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 4, 0)))); -int _EXFUN(_vsnprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 4, 0)))); -int _EXFUN(_vsprintf_r, (struct _reent *, char *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_vsscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, __VALIST) - _ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); +int _fiprintf_r (struct _reent *, FILE *, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int _fiscanf_r (struct _reent *, FILE *, const char *, ...) + _ATTRIBUTE ((__format__ (__scanf__, 3, 4))); +FILE * _fmemopen_r (struct _reent *, void *__restrict, size_t, const char *__restrict); +FILE * _fopen_r (struct _reent *, const char *__restrict, const char *__restrict); +FILE * _freopen_r (struct _reent *, const char *__restrict, const char *__restrict, FILE *__restrict); +int _fprintf_r (struct _reent *, FILE *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int _fpurge_r (struct _reent *, FILE *); +int _fputc_r (struct _reent *, int, FILE *); +int _fputc_unlocked_r (struct _reent *, int, FILE *); +int _fputs_r (struct _reent *, const char *__restrict, FILE *__restrict); +int _fputs_unlocked_r (struct _reent *, const char *__restrict, FILE *__restrict); +size_t _fread_r (struct _reent *, void *__restrict, size_t _size, size_t _n, FILE *__restrict); +size_t _fread_unlocked_r (struct _reent *, void *__restrict, size_t _size, size_t _n, FILE *__restrict); +int _fscanf_r (struct _reent *, FILE *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__scanf__, 3, 4))); +int _fseek_r (struct _reent *, FILE *, long, int); +int _fseeko_r (struct _reent *, FILE *, _off_t, int); +long _ftell_r (struct _reent *, FILE *); +_off_t _ftello_r (struct _reent *, FILE *); +void _rewind_r (struct _reent *, FILE *); +size_t _fwrite_r (struct _reent *, const void *__restrict, size_t _size, size_t _n, FILE *__restrict); +size_t _fwrite_unlocked_r (struct _reent *, const void *__restrict, size_t _size, size_t _n, FILE *__restrict); +int _getc_r (struct _reent *, FILE *); +int _getc_unlocked_r (struct _reent *, FILE *); +int _getchar_r (struct _reent *); +int _getchar_unlocked_r (struct _reent *); +char * _gets_r (struct _reent *, char *); +int _iprintf_r (struct _reent *, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +int _iscanf_r (struct _reent *, const char *, ...) + _ATTRIBUTE ((__format__ (__scanf__, 2, 3))); +FILE * _open_memstream_r (struct _reent *, char **, size_t *); +void _perror_r (struct _reent *, const char *); +int _printf_r (struct _reent *, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 2, 3))); +int _putc_r (struct _reent *, int, FILE *); +int _putc_unlocked_r (struct _reent *, int, FILE *); +int _putchar_unlocked_r (struct _reent *, int); +int _putchar_r (struct _reent *, int); +int _puts_r (struct _reent *, const char *); +int _remove_r (struct _reent *, const char *); +int _rename_r (struct _reent *, + const char *_old, const char *_new); +int _scanf_r (struct _reent *, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__scanf__, 2, 3))); +int _siprintf_r (struct _reent *, char *, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int _siscanf_r (struct _reent *, const char *, const char *, ...) + _ATTRIBUTE ((__format__ (__scanf__, 3, 4))); +int _sniprintf_r (struct _reent *, char *, size_t, const char *, ...) + _ATTRIBUTE ((__format__ (__printf__, 4, 5))); +int _snprintf_r (struct _reent *, char *__restrict, size_t, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 4, 5))); +int _sprintf_r (struct _reent *, char *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__printf__, 3, 4))); +int _sscanf_r (struct _reent *, const char *__restrict, const char *__restrict, ...) + _ATTRIBUTE ((__format__ (__scanf__, 3, 4))); +char * _tempnam_r (struct _reent *, const char *, const char *); +FILE * _tmpfile_r (struct _reent *); +char * _tmpnam_r (struct _reent *, char *); +int _ungetc_r (struct _reent *, int, FILE *); +int _vasiprintf_r (struct _reent *, char **, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +char * _vasniprintf_r (struct _reent*, char *, size_t *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 4, 0))); +char * _vasnprintf_r (struct _reent*, char *, size_t *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 4, 0))); +int _vasprintf_r (struct _reent *, char **, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int _vdiprintf_r (struct _reent *, int, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int _vdprintf_r (struct _reent *, int, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int _vfiprintf_r (struct _reent *, FILE *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int _vfiscanf_r (struct _reent *, FILE *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 3, 0))); +int _vfprintf_r (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int _vfscanf_r (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 3, 0))); +int _viprintf_r (struct _reent *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +int _viscanf_r (struct _reent *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0))); +int _vprintf_r (struct _reent *, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 2, 0))); +int _vscanf_r (struct _reent *, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 2, 0))); +int _vsiprintf_r (struct _reent *, char *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int _vsiscanf_r (struct _reent *, const char *, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 3, 0))); +int _vsniprintf_r (struct _reent *, char *, size_t, const char *, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 4, 0))); +int _vsnprintf_r (struct _reent *, char *__restrict, size_t, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 4, 0))); +int _vsprintf_r (struct _reent *, char *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__printf__, 3, 0))); +int _vsscanf_r (struct _reent *, const char *__restrict, const char *__restrict, __VALIST) + _ATTRIBUTE ((__format__ (__scanf__, 3, 0))); /* Other extensions. */ -int _EXFUN(fpurge, (FILE *)); -ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *)); -ssize_t _EXFUN(__getline, (char **, size_t *, FILE *)); +int fpurge (FILE *); +ssize_t __getdelim (char **, size_t *, int, FILE *); +ssize_t __getline (char **, size_t *, FILE *); #if __MISC_VISIBLE -void _EXFUN(clearerr_unlocked, (FILE *)); -int _EXFUN(feof_unlocked, (FILE *)); -int _EXFUN(ferror_unlocked, (FILE *)); -int _EXFUN(fileno_unlocked, (FILE *)); -int _EXFUN(fflush_unlocked, (FILE *)); -int _EXFUN(fgetc_unlocked, (FILE *)); -int _EXFUN(fputc_unlocked, (int, FILE *)); -size_t _EXFUN(fread_unlocked, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); -size_t _EXFUN(fwrite_unlocked, (const _PTR __restrict , size_t _size, size_t _n, FILE *)); +void clearerr_unlocked (FILE *); +int feof_unlocked (FILE *); +int ferror_unlocked (FILE *); +int fileno_unlocked (FILE *); +int fflush_unlocked (FILE *); +int fgetc_unlocked (FILE *); +int fputc_unlocked (int, FILE *); +size_t fread_unlocked (void *__restrict, size_t _size, size_t _n, FILE *__restrict); +size_t fwrite_unlocked (const void *__restrict , size_t _size, size_t _n, FILE *); #endif #if __GNU_VISIBLE -char * _EXFUN(fgets_unlocked, (char *__restrict, int, FILE *__restrict)); -int _EXFUN(fputs_unlocked, (const char *__restrict, FILE *__restrict)); +char * fgets_unlocked (char *__restrict, int, FILE *__restrict); +int fputs_unlocked (const char *__restrict, FILE *__restrict); #endif #ifdef __LARGE64_FILES #if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB) -FILE * _EXFUN(fdopen64, (int, const char *)); -FILE * _EXFUN(fopen64, (const char *, const char *)); -FILE * _EXFUN(freopen64, (_CONST char *, _CONST char *, FILE *)); -_off64_t _EXFUN(ftello64, (FILE *)); -_off64_t _EXFUN(fseeko64, (FILE *, _off64_t, int)); -int _EXFUN(fgetpos64, (FILE *, _fpos64_t *)); -int _EXFUN(fsetpos64, (FILE *, const _fpos64_t *)); -FILE * _EXFUN(tmpfile64, (void)); +FILE * fdopen64 (int, const char *); +FILE * fopen64 (const char *, const char *); +FILE * freopen64 (const char *, const char *, FILE *); +_off64_t ftello64 (FILE *); +_off64_t fseeko64 (FILE *, _off64_t, int); +int fgetpos64 (FILE *, _fpos64_t *); +int fsetpos64 (FILE *, const _fpos64_t *); +FILE * tmpfile64 (void); -FILE * _EXFUN(_fdopen64_r, (struct _reent *, int, const char *)); -FILE * _EXFUN(_fopen64_r, (struct _reent *,const char *, const char *)); -FILE * _EXFUN(_freopen64_r, (struct _reent *, _CONST char *, _CONST char *, FILE *)); -_off64_t _EXFUN(_ftello64_r, (struct _reent *, FILE *)); -_off64_t _EXFUN(_fseeko64_r, (struct _reent *, FILE *, _off64_t, int)); -int _EXFUN(_fgetpos64_r, (struct _reent *, FILE *, _fpos64_t *)); -int _EXFUN(_fsetpos64_r, (struct _reent *, FILE *, const _fpos64_t *)); -FILE * _EXFUN(_tmpfile64_r, (struct _reent *)); +FILE * _fdopen64_r (struct _reent *, int, const char *); +FILE * _fopen64_r (struct _reent *,const char *, const char *); +FILE * _freopen64_r (struct _reent *, const char *, const char *, FILE *); +_off64_t _ftello64_r (struct _reent *, FILE *); +_off64_t _fseeko64_r (struct _reent *, FILE *, _off64_t, int); +int _fgetpos64_r (struct _reent *, FILE *, _fpos64_t *); +int _fsetpos64_r (struct _reent *, FILE *, const _fpos64_t *); +FILE * _tmpfile64_r (struct _reent *); #endif /* !__CYGWIN__ */ #endif /* __LARGE64_FILES */ @@ -574,8 +574,8 @@ FILE * _EXFUN(_tmpfile64_r, (struct _reent *)); * Routines internal to the implementation. */ -int _EXFUN(__srget_r, (struct _reent *, FILE *)); -int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *)); +int __srget_r (struct _reent *, FILE *); +int __swbuf_r (struct _reent *, int, FILE *); /* * Stdio function-access interface. @@ -583,35 +583,35 @@ int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *)); #if __BSD_VISIBLE # ifdef __LARGE64_FILES -FILE *_EXFUN(funopen,(const _PTR __cookie, - int (*__readfn)(_PTR __c, char *__buf, +FILE *funopen (const void *__cookie, + int (*__readfn)(void *__c, char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - int (*__writefn)(_PTR __c, const char *__buf, + int (*__writefn)(void *__c, const char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - _fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence), - int (*__closefn)(_PTR __c))); -FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie, - int (*__readfn)(_PTR __c, char *__buf, + _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence), + int (*__closefn)(void *__c)); +FILE *_funopen_r (struct _reent *, const void *__cookie, + int (*__readfn)(void *__c, char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - int (*__writefn)(_PTR __c, const char *__buf, + int (*__writefn)(void *__c, const char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - _fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence), - int (*__closefn)(_PTR __c))); + _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence), + int (*__closefn)(void *__c)); # else -FILE *_EXFUN(funopen,(const _PTR __cookie, - int (*__readfn)(_PTR __cookie, char *__buf, +FILE *funopen (const void *__cookie, + int (*__readfn)(void *__cookie, char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - int (*__writefn)(_PTR __cookie, const char *__buf, + int (*__writefn)(void *__cookie, const char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence), - int (*__closefn)(_PTR __cookie))); -FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie, - int (*__readfn)(_PTR __cookie, char *__buf, + fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence), + int (*__closefn)(void *__cookie)); +FILE *_funopen_r (struct _reent *, const void *__cookie, + int (*__readfn)(void *__cookie, char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - int (*__writefn)(_PTR __cookie, const char *__buf, + int (*__writefn)(void *__cookie, const char *__buf, _READ_WRITE_BUFSIZE_TYPE __n), - fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence), - int (*__closefn)(_PTR __cookie))); + fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence), + int (*__closefn)(void *__cookie)); # endif /* !__LARGE64_FILES */ # define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \ @@ -640,10 +640,10 @@ typedef struct cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; -FILE *_EXFUN(fopencookie,(void *__cookie, - const char *__mode, cookie_io_functions_t __functions)); -FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie, - const char *__mode, cookie_io_functions_t __functions)); +FILE *fopencookie (void *__cookie, + const char *__mode, cookie_io_functions_t __functions); +FILE *_fopencookie_r (struct _reent *, void *__cookie, + const char *__mode, cookie_io_functions_t __functions); #endif /* __GNU_VISIBLE */ #ifndef __CUSTOM_FILE_IO__ diff --git a/libc/xtensa-lx106-elf/include/stdio_ext.h b/libc/xtensa-lx106-elf/include/stdio_ext.h index 029ab02..231262d 100644 --- a/libc/xtensa-lx106-elf/include/stdio_ext.h +++ b/libc/xtensa-lx106-elf/include/stdio_ext.h @@ -19,8 +19,8 @@ _BEGIN_STD_C -void _EXFUN(__fpurge,(FILE *)); -int _EXFUN(__fsetlocking,(FILE *, int)); +void __fpurge (FILE *); +int __fsetlocking (FILE *, int); /* TODO: @@ -52,13 +52,13 @@ __fpending (FILE *__fp) { return __fp->_p - __fp->_bf._base; } #else -size_t _EXFUN(__fbufsize,(FILE *)); -int _EXFUN(__freading,(FILE *)); -int _EXFUN(__fwriting,(FILE *)); -int _EXFUN(__freadable,(FILE *)); -int _EXFUN(__fwritable,(FILE *)); -int _EXFUN(__flbf,(FILE *)); -size_t _EXFUN(__fpending,(FILE *)); +size_t __fbufsize (FILE *); +int __freading (FILE *); +int __fwriting (FILE *); +int __freadable (FILE *); +int __fwritable (FILE *); +int __flbf (FILE *); +size_t __fpending (FILE *); #ifndef __cplusplus diff --git a/libc/xtensa-lx106-elf/include/stdlib.h b/libc/xtensa-lx106-elf/include/stdlib.h index 02c1faa..5417ac0 100644 --- a/libc/xtensa-lx106-elf/include/stdlib.h +++ b/libc/xtensa-lx106-elf/include/stdlib.h @@ -54,7 +54,7 @@ typedef struct #ifndef __compar_fn_t_defined #define __compar_fn_t_defined -typedef int (*__compar_fn_t) (const _PTR, const _PTR); +typedef int (*__compar_fn_t) (const void *, const void *); #endif #ifndef NULL @@ -66,110 +66,102 @@ typedef int (*__compar_fn_t) (const _PTR, const _PTR); #define RAND_MAX __RAND_MAX -int _EXFUN(__locale_mb_cur_max,(_VOID)); +int __locale_mb_cur_max (void); #define MB_CUR_MAX __locale_mb_cur_max() -_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((__noreturn__))); -int _EXFUN(abs,(int)); +void abort (void) _ATTRIBUTE ((__noreturn__)); +int abs (int); #if __BSD_VISIBLE -__uint32_t _EXFUN(arc4random, (void)); -__uint32_t _EXFUN(arc4random_uniform, (__uint32_t)); -void _EXFUN(arc4random_buf, (void *, size_t)); +__uint32_t arc4random (void); +__uint32_t arc4random_uniform (__uint32_t); +void arc4random_buf (void *, size_t); #endif -int _EXFUN(atexit,(_VOID (*__func)(_VOID))); -double _EXFUN(atof,(const char *__nptr)); +int atexit (void (*__func)(void)); +double atof (const char *__nptr); #if __MISC_VISIBLE -float _EXFUN(atoff,(const char *__nptr)); +float atoff (const char *__nptr); #endif -int _EXFUN(atoi,(const char *__nptr)); -int _EXFUN(_atoi_r,(struct _reent *, const char *__nptr)); -long _EXFUN(atol,(const char *__nptr)); -long _EXFUN(_atol_r,(struct _reent *, const char *__nptr)); -_PTR _EXFUN(bsearch,(const _PTR __key, - const _PTR __base, +int atoi (const char *__nptr); +int _atoi_r (struct _reent *, const char *__nptr); +long atol (const char *__nptr); +long _atol_r (struct _reent *, const char *__nptr); +void * bsearch (const void *__key, + const void *__base, size_t __nmemb, size_t __size, - __compar_fn_t _compar)); -_PTR _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size)); -div_t _EXFUN(div,(int __numer, int __denom)); -_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__))); -_VOID _EXFUN_NOTHROW(free,(_PTR)); -char * _EXFUN(getenv,(const char *__string)); -char * _EXFUN(_getenv_r,(struct _reent *, const char *__string)); -char * _EXFUN(_findenv,(_CONST char *, int *)); -char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *)); + __compar_fn_t _compar); +void * calloc (size_t __nmemb, size_t __size) _NOTHROW; +div_t div (int __numer, int __denom); +void exit (int __status) _ATTRIBUTE ((__noreturn__)); +void free (void *) _NOTHROW; +char * getenv (const char *__string); +char * _getenv_r (struct _reent *, const char *__string); +char * _findenv (const char *, int *); +char * _findenv_r (struct _reent *, const char *, int *); #if __POSIX_VISIBLE >= 200809 extern char *suboptarg; /* getsubopt(3) external variable */ -int _EXFUN(getsubopt,(char **, char * const *, char **)); +int getsubopt (char **, char * const *, char **); #endif -long _EXFUN(labs,(long)); -ldiv_t _EXFUN(ldiv,(long __numer, long __denom)); -_PTR _EXFUN_NOTHROW(malloc,(size_t __size)); -int _EXFUN(mblen,(const char *, size_t)); -int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *)); -int _EXFUN(mbtowc,(wchar_t *__restrict, const char *__restrict, size_t)); -int _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *)); -int _EXFUN(wctomb,(char *, wchar_t)); -int _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, _mbstate_t *)); -size_t _EXFUN(mbstowcs,(wchar_t *__restrict, const char *__restrict, size_t)); -size_t _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *)); -size_t _EXFUN(wcstombs,(char *__restrict, const wchar_t *__restrict, size_t)); -size_t _EXFUN(_wcstombs_r,(struct _reent *, char *__restrict, const wchar_t *__restrict, size_t, _mbstate_t *)); +long labs (long); +ldiv_t ldiv (long __numer, long __denom); +void * malloc (size_t __size) _NOTHROW; +int mblen (const char *, size_t); +int _mblen_r (struct _reent *, const char *, size_t, _mbstate_t *); +int mbtowc (wchar_t *__restrict, const char *__restrict, size_t); +int _mbtowc_r (struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *); +int wctomb (char *, wchar_t); +int _wctomb_r (struct _reent *, char *, wchar_t, _mbstate_t *); +size_t mbstowcs (wchar_t *__restrict, const char *__restrict, size_t); +size_t _mbstowcs_r (struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *); +size_t wcstombs (char *__restrict, const wchar_t *__restrict, size_t); +size_t _wcstombs_r (struct _reent *, char *__restrict, const wchar_t *__restrict, size_t, _mbstate_t *); #ifndef _REENT_ONLY #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 -char * _EXFUN(mkdtemp,(char *)); +char * mkdtemp (char *); #endif #if __GNU_VISIBLE -int _EXFUN(mkostemp,(char *, int)); -int _EXFUN(mkostemps,(char *, int, int)); +int mkostemp (char *, int); +int mkostemps (char *, int, int); #endif #if __MISC_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 -int _EXFUN(mkstemp,(char *)); +int mkstemp (char *); #endif #if __MISC_VISIBLE -int _EXFUN(mkstemps,(char *, int)); +int mkstemps (char *, int); #endif -#if (__GNUC__ < 4) || defined(__XTENSA__) -char * _EXFUN(mktemp,(char *)); -#else #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) -char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")))); -#endif +char * mktemp (char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))); #endif #endif /* !_REENT_ONLY */ -char * _EXFUN(_mkdtemp_r, (struct _reent *, char *)); -int _EXFUN(_mkostemp_r, (struct _reent *, char *, int)); -int _EXFUN(_mkostemps_r, (struct _reent *, char *, int, int)); -int _EXFUN(_mkstemp_r, (struct _reent *, char *)); -int _EXFUN(_mkstemps_r, (struct _reent *, char *, int)); -#if (__GNUC__ < 4) || defined(__XTENSA__) -char * _EXFUN(_mktemp_r, (struct _reent *, char *)); -#else -char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")))); -#endif -_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, __compar_fn_t _compar)); -int _EXFUN(rand,(_VOID)); -_PTR _EXFUN_NOTHROW(realloc,(_PTR __r, size_t __size)); +char * _mkdtemp_r (struct _reent *, char *); +int _mkostemp_r (struct _reent *, char *, int); +int _mkostemps_r (struct _reent *, char *, int, int); +int _mkstemp_r (struct _reent *, char *); +int _mkstemps_r (struct _reent *, char *, int); +char * _mktemp_r (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))); +void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar); +int rand (void); +void * realloc (void *__r, size_t __size) _NOTHROW; #if __BSD_VISIBLE void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) __alloc_size(3); -_PTR _EXFUN(reallocf,(_PTR __r, size_t __size)); +void * reallocf (void *__r, size_t __size); #endif #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 -char * _EXFUN(realpath, (const char *__restrict path, char *__restrict resolved_path)); +char * realpath (const char *__restrict path, char *__restrict resolved_path); #endif #if __BSD_VISIBLE -int _EXFUN(rpmatch, (const char *response)); +int rpmatch (const char *response); #endif #if __XSI_VISIBLE -_VOID _EXFUN(setkey, (const char *__key)); +void setkey (const char *__key); #endif -_VOID _EXFUN(srand,(unsigned __seed)); -double _EXFUN(strtod,(const char *__restrict __n, char **__restrict __end_PTR)); -double _EXFUN(_strtod_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR)); +void srand (unsigned __seed); +double strtod (const char *__restrict __n, char **__restrict __end_PTR); +double _strtod_r (struct _reent *,const char *__restrict __n, char **__restrict __end_PTR); #if __ISO_C_VISIBLE >= 1999 -float _EXFUN(strtof,(const char *__restrict __n, char **__restrict __end_PTR)); +float strtof (const char *__restrict __n, char **__restrict __end_PTR); #endif #if __MISC_VISIBLE /* the following strtodf interface is deprecated...use strtof instead */ @@ -177,10 +169,10 @@ float _EXFUN(strtof,(const char *__restrict __n, char **__restrict __end_PTR)); # define strtodf strtof # endif #endif -long _EXFUN(strtol,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); -long _EXFUN(_strtol_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base)); -unsigned long _EXFUN(strtoul,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); -unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base)); +long strtol (const char *__restrict __n, char **__restrict __end_PTR, int __base); +long _strtol_r (struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base); +unsigned long strtoul (const char *__restrict __n, char **__restrict __end_PTR, int __base); +unsigned long _strtoul_r (struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base); #if __GNU_VISIBLE double strtod_l (const char *__restrict, char **__restrict, locale_t); @@ -197,130 +189,130 @@ unsigned long long strtoull_l (const char *__restrict, char **__restrict, int, locale_t __loc); #endif -int _EXFUN(system,(const char *__string)); +int system (const char *__string); #if __SVID_VISIBLE || __XSI_VISIBLE >= 4 -long _EXFUN(a64l,(const char *__input)); -char * _EXFUN(l64a,(long __input)); -char * _EXFUN(_l64a_r,(struct _reent *,long __input)); +long a64l (const char *__input); +char * l64a (long __input); +char * _l64a_r (struct _reent *,long __input); #endif #if __MISC_VISIBLE -int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg)); +int on_exit (void (*__func)(int, void *),void *__arg); #endif #if __ISO_C_VISIBLE >= 1999 -_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__))); +void _Exit (int __status) _ATTRIBUTE ((__noreturn__)); #endif #if __SVID_VISIBLE || __XSI_VISIBLE -int _EXFUN(putenv,(char *__string)); +int putenv (char *__string); #endif -int _EXFUN(_putenv_r,(struct _reent *, char *__string)); -_PTR _EXFUN(_reallocf_r,(struct _reent *, _PTR, size_t)); +int _putenv_r (struct _reent *, char *__string); +void * _reallocf_r (struct _reent *, void *, size_t); #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 -int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite)); +int setenv (const char *__string, const char *__value, int __overwrite); #endif -int _EXFUN(_setenv_r,(struct _reent *, const char *__string, const char *__value, int __overwrite)); +int _setenv_r (struct _reent *, const char *__string, const char *__value, int __overwrite); #if __XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112 -char * _EXFUN(gcvt,(double,int,char *)); -char * _EXFUN(gcvtf,(float,int,char *)); -char * _EXFUN(fcvt,(double,int,int *,int *)); -char * _EXFUN(fcvtf,(float,int,int *,int *)); -char * _EXFUN(ecvt,(double,int,int *,int *)); -char * _EXFUN(ecvtbuf,(double, int, int*, int*, char *)); -char * _EXFUN(fcvtbuf,(double, int, int*, int*, char *)); -char * _EXFUN(ecvtf,(float,int,int *,int *)); +char * gcvt (double,int,char *); +char * gcvtf (float,int,char *); +char * fcvt (double,int,int *,int *); +char * fcvtf (float,int,int *,int *); +char * ecvt (double,int,int *,int *); +char * ecvtbuf (double, int, int*, int*, char *); +char * fcvtbuf (double, int, int*, int*, char *); +char * ecvtf (float,int,int *,int *); #endif -char * _EXFUN(__itoa,(int, char *, int)); -char * _EXFUN(__utoa,(unsigned, char *, int)); +char * __itoa (int, char *, int); +char * __utoa (unsigned, char *, int); #if __MISC_VISIBLE -char * _EXFUN(itoa,(int, char *, int)); -char * _EXFUN(utoa,(unsigned, char *, int)); +char * itoa (int, char *, int); +char * utoa (unsigned, char *, int); #endif #if __POSIX_VISIBLE -int _EXFUN(rand_r,(unsigned *__seed)); +int rand_r (unsigned *__seed); #endif #if __SVID_VISIBLE || __XSI_VISIBLE -double _EXFUN(drand48,(_VOID)); -double _EXFUN(_drand48_r,(struct _reent *)); -double _EXFUN(erand48,(unsigned short [3])); -double _EXFUN(_erand48_r,(struct _reent *, unsigned short [3])); -long _EXFUN(jrand48,(unsigned short [3])); -long _EXFUN(_jrand48_r,(struct _reent *, unsigned short [3])); -_VOID _EXFUN(lcong48,(unsigned short [7])); -_VOID _EXFUN(_lcong48_r,(struct _reent *, unsigned short [7])); -long _EXFUN(lrand48,(_VOID)); -long _EXFUN(_lrand48_r,(struct _reent *)); -long _EXFUN(mrand48,(_VOID)); -long _EXFUN(_mrand48_r,(struct _reent *)); -long _EXFUN(nrand48,(unsigned short [3])); -long _EXFUN(_nrand48_r,(struct _reent *, unsigned short [3])); +double drand48 (void); +double _drand48_r (struct _reent *); +double erand48 (unsigned short [3]); +double _erand48_r (struct _reent *, unsigned short [3]); +long jrand48 (unsigned short [3]); +long _jrand48_r (struct _reent *, unsigned short [3]); +void lcong48 (unsigned short [7]); +void _lcong48_r (struct _reent *, unsigned short [7]); +long lrand48 (void); +long _lrand48_r (struct _reent *); +long mrand48 (void); +long _mrand48_r (struct _reent *); +long nrand48 (unsigned short [3]); +long _nrand48_r (struct _reent *, unsigned short [3]); unsigned short * - _EXFUN(seed48,(unsigned short [3])); + seed48 (unsigned short [3]); unsigned short * - _EXFUN(_seed48_r,(struct _reent *, unsigned short [3])); -_VOID _EXFUN(srand48,(long)); -_VOID _EXFUN(_srand48_r,(struct _reent *, long)); + _seed48_r (struct _reent *, unsigned short [3]); +void srand48 (long); +void _srand48_r (struct _reent *, long); #endif /* __SVID_VISIBLE || __XSI_VISIBLE */ #if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE -char * _EXFUN(initstate,(unsigned, char *, size_t)); -long _EXFUN(random,(_VOID)); -char * _EXFUN(setstate,(char *)); -_VOID _EXFUN(srandom,(unsigned)); +char * initstate (unsigned, char *, size_t); +long random (void); +char * setstate (char *); +void srandom (unsigned); #endif #if __ISO_C_VISIBLE >= 1999 -long long _EXFUN(atoll,(const char *__nptr)); +long long atoll (const char *__nptr); #endif -long long _EXFUN(_atoll_r,(struct _reent *, const char *__nptr)); +long long _atoll_r (struct _reent *, const char *__nptr); #if __ISO_C_VISIBLE >= 1999 -long long _EXFUN(llabs,(long long)); -lldiv_t _EXFUN(lldiv,(long long __numer, long long __denom)); -long long _EXFUN(strtoll,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); +long long llabs (long long); +lldiv_t lldiv (long long __numer, long long __denom); +long long strtoll (const char *__restrict __n, char **__restrict __end_PTR, int __base); #endif -long long _EXFUN(_strtoll_r,(struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base)); +long long _strtoll_r (struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base); #if __ISO_C_VISIBLE >= 1999 -unsigned long long _EXFUN(strtoull,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); +unsigned long long strtoull (const char *__restrict __n, char **__restrict __end_PTR, int __base); #endif -unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base)); +unsigned long long _strtoull_r (struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base); #ifndef __CYGWIN__ #if __MISC_VISIBLE -_VOID _EXFUN(cfree,(_PTR)); +void cfree (void *); #endif #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 -int _EXFUN(unsetenv,(const char *__string)); +int unsetenv (const char *__string); #endif -int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string)); +int _unsetenv_r (struct _reent *, const char *__string); #endif /* !__CYGWIN__ */ #if __POSIX_VISIBLE >= 200112 -int _EXFUN(__nonnull ((1)) posix_memalign,(void **, size_t, size_t)); +int __nonnull ((1)) posix_memalign (void **, size_t, size_t); #endif -char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**)); +char * _dtoa_r (struct _reent *, double, int, int, int *, int*, char**); #ifndef __CYGWIN__ -_PTR _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t)); -_PTR _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t)); -_VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, _PTR)); -_PTR _EXFUN_NOTHROW(_realloc_r,(struct _reent *, _PTR, size_t)); -_VOID _EXFUN(_mstats_r,(struct _reent *, char *)); +void * _malloc_r (struct _reent *, size_t) _NOTHROW; +void * _calloc_r (struct _reent *, size_t, size_t) _NOTHROW; +void _free_r (struct _reent *, void *) _NOTHROW; +void * _realloc_r (struct _reent *, void *, size_t) _NOTHROW; +void _mstats_r (struct _reent *, char *); #endif -int _EXFUN(_system_r,(struct _reent *, const char *)); +int _system_r (struct _reent *, const char *); -_VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *)); +void __eprintf (const char *, const char *, unsigned int, const char *); /* There are two common qsort_r variants. If you request _BSD_SOURCE, you get the BSD version; otherwise you get the GNU version. We want that #undef qsort_r will still let you invoke the underlying function, but that requires gcc support. */ #if __GNU_VISIBLE -_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, int (*_compar)(const _PTR, const _PTR, _PTR), _PTR __thunk)); +void qsort_r (void *__base, size_t __nmemb, size_t __size, int (*_compar)(const void *, const void *, void *), void *__thunk); #elif __BSD_VISIBLE # ifdef __GNUC__ -_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR))) +void qsort_r (void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)) __asm__ (__ASMNAME ("__bsd_qsort_r")); # else -_VOID _EXFUN(__bsd_qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR))); +void __bsd_qsort_r (void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)); # define qsort_r __bsd_qsort_r # endif #endif diff --git a/libc/xtensa-lx106-elf/include/string.h b/libc/xtensa-lx106-elf/include/string.h index b54b833..37febad 100644 --- a/libc/xtensa-lx106-elf/include/string.h +++ b/libc/xtensa-lx106-elf/include/string.h @@ -26,30 +26,30 @@ _BEGIN_STD_C -_PTR _EXFUN(memchr,(const _PTR, int, size_t)); -int _EXFUN(memcmp,(const _PTR, const _PTR, size_t)); -_PTR _EXFUN(memcpy,(_PTR __restrict, const _PTR __restrict, size_t)); -_PTR _EXFUN(memmove,(_PTR, const _PTR, size_t)); -_PTR _EXFUN(memset,(_PTR, int, size_t)); -char *_EXFUN(strcat,(char *__restrict, const char *__restrict)); -char *_EXFUN(strchr,(const char *, int)); -int _EXFUN(strcmp,(const char *, const char *)); -int _EXFUN(strcoll,(const char *, const char *)); -char *_EXFUN(strcpy,(char *__restrict, const char *__restrict)); -size_t _EXFUN(strcspn,(const char *, const char *)); -char *_EXFUN(strerror,(int)); -size_t _EXFUN(strlen,(const char *)); -char *_EXFUN(strncat,(char *__restrict, const char *__restrict, size_t)); -int _EXFUN(strncmp,(const char *, const char *, size_t)); -char *_EXFUN(strncpy,(char *__restrict, const char *__restrict, size_t)); -char *_EXFUN(strpbrk,(const char *, const char *)); -char *_EXFUN(strrchr,(const char *, int)); -size_t _EXFUN(strspn,(const char *, const char *)); -char *_EXFUN(strstr,(const char *, const char *)); +void * memchr (const void *, int, size_t); +int memcmp (const void *, const void *, size_t); +void * memcpy (void *__restrict, const void *__restrict, size_t); +void * memmove (void *, const void *, size_t); +void * memset (void *, int, size_t); +char *strcat (char *__restrict, const char *__restrict); +char *strchr (const char *, int); +int strcmp (const char *, const char *); +int strcoll (const char *, const char *); +char *strcpy (char *__restrict, const char *__restrict); +size_t strcspn (const char *, const char *); +char *strerror (int); +size_t strlen (const char *); +char *strncat (char *__restrict, const char *__restrict, size_t); +int strncmp (const char *, const char *, size_t); +char *strncpy (char *__restrict, const char *__restrict, size_t); +char *strpbrk (const char *, const char *); +char *strrchr (const char *, int); +size_t strspn (const char *, const char *); +char *strstr (const char *, const char *); #ifndef _REENT_ONLY -char *_EXFUN(strtok,(char *__restrict, const char *__restrict)); +char *strtok (char *__restrict, const char *__restrict); #endif -size_t _EXFUN(strxfrm,(char *__restrict, const char *__restrict, size_t)); +size_t strxfrm (char *__restrict, const char *__restrict, size_t); #if __POSIX_VISIBLE >= 200809 int strcoll_l (const char *, const char *, locale_t); @@ -57,89 +57,89 @@ char *strerror_l (int, locale_t); size_t strxfrm_l (char *__restrict, const char *__restrict, size_t, locale_t); #endif #if __MISC_VISIBLE || __POSIX_VISIBLE -char *_EXFUN(strtok_r,(char *__restrict, const char *__restrict, char **__restrict)); +char *strtok_r (char *__restrict, const char *__restrict, char **__restrict); #endif #if __BSD_VISIBLE -int _EXFUN(timingsafe_bcmp,(const void *, const void *, size_t)); -int _EXFUN(timingsafe_memcmp,(const void *, const void *, size_t)); +int timingsafe_bcmp (const void *, const void *, size_t); +int timingsafe_memcmp (const void *, const void *, size_t); #endif #if __MISC_VISIBLE || __POSIX_VISIBLE -_PTR _EXFUN(memccpy,(_PTR __restrict, const _PTR __restrict, int, size_t)); +void * memccpy (void *__restrict, const void *__restrict, int, size_t); #endif #if __GNU_VISIBLE -_PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); -_PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); -_PTR _EXFUN(memrchr,(const _PTR, int, size_t)); -_PTR _EXFUN(rawmemchr,(const _PTR, int)); +void * mempcpy (void *, const void *, size_t); +void * memmem (const void *, size_t, const void *, size_t); +void * memrchr (const void *, int, size_t); +void * rawmemchr (const void *, int); #endif #if __POSIX_VISIBLE >= 200809 -char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict)); -char *_EXFUN(stpncpy,(char *__restrict, const char *__restrict, size_t)); +char *stpcpy (char *__restrict, const char *__restrict); +char *stpncpy (char *__restrict, const char *__restrict, size_t); #endif #if __GNU_VISIBLE -char *_EXFUN(strcasestr,(const char *, const char *)); -char *_EXFUN(strchrnul,(const char *, int)); +char *strcasestr (const char *, const char *); +char *strchrnul (const char *, int); #endif #if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 -char *_EXFUN(strdup,(const char *)); +char *strdup (const char *); #endif -char *_EXFUN(_strdup_r,(struct _reent *, const char *)); +char *_strdup_r (struct _reent *, const char *); #if __POSIX_VISIBLE >= 200809 -char *_EXFUN(strndup,(const char *, size_t)); +char *strndup (const char *, size_t); #endif -char *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t)); +char *_strndup_r (struct _reent *, const char *, size_t); /* There are two common strerror_r variants. If you request _GNU_SOURCE, you get the GNU version; otherwise you get the POSIX version. POSIX requires that #undef strerror_r will still let you invoke the underlying function, but that requires gcc support. */ #if __GNU_VISIBLE -char *_EXFUN(strerror_r,(int, char *, size_t)); +char *strerror_r (int, char *, size_t); #elif __POSIX_VISIBLE >= 200112 # ifdef __GNUC__ -int _EXFUN(strerror_r,(int, char *, size_t)) +int strerror_r (int, char *, size_t) #ifdef __ASMNAME __asm__ (__ASMNAME ("__xpg_strerror_r")) #endif ; # else -int _EXFUN(__xpg_strerror_r,(int, char *, size_t)); +int __xpg_strerror_r (int, char *, size_t); # define strerror_r __xpg_strerror_r # endif #endif /* Reentrant version of strerror. */ -char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *)); +char * _strerror_r (struct _reent *, int, int, int *); #if __BSD_VISIBLE -size_t _EXFUN(strlcat,(char *, const char *, size_t)); -size_t _EXFUN(strlcpy,(char *, const char *, size_t)); +size_t strlcat (char *, const char *, size_t); +size_t strlcpy (char *, const char *, size_t); #endif #if __POSIX_VISIBLE >= 200809 -size_t _EXFUN(strnlen,(const char *, size_t)); +size_t strnlen (const char *, size_t); #endif #if __BSD_VISIBLE -char *_EXFUN(strsep,(char **, const char *)); +char *strsep (char **, const char *); #endif #if __BSD_VISIBLE char *strnstr(const char *, const char *, size_t) __pure; #endif #if __MISC_VISIBLE -char *_EXFUN(strlwr,(char *)); -char *_EXFUN(strupr,(char *)); +char *strlwr (char *); +char *strupr (char *); #endif #ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ -char *_EXFUN(strsignal, (int __signo)); +char *strsignal (int __signo); #endif #ifdef __CYGWIN__ -int _EXFUN(strtosigno, (const char *__name)); +int strtosigno (const char *__name); #endif #if __GNU_VISIBLE -int _EXFUN(strverscmp,(const char *, const char *)); +int strverscmp (const char *, const char *); #endif #if __GNU_VISIBLE && defined(__GNUC__) @@ -169,7 +169,7 @@ int _EXFUN(strverscmp,(const char *, const char *)); sure here. */ #if __GNU_VISIBLE && !defined(basename) # define basename basename -char *_EXFUN(__nonnull ((1)) basename,(const char *)) __asm__(__ASMNAME("__gnu_basename")); +char *__nonnull ((1)) basename (const char *) __asm__(__ASMNAME("__gnu_basename")); #endif #include diff --git a/libc/xtensa-lx106-elf/include/sys/_default_fcntl.h b/libc/xtensa-lx106-elf/include/sys/_default_fcntl.h index 006e4ef..33b4622 100644 --- a/libc/xtensa-lx106-elf/include/sys/_default_fcntl.h +++ b/libc/xtensa-lx106-elf/include/sys/_default_fcntl.h @@ -199,27 +199,27 @@ struct eflock { #include #include /* sigh. for the mode bits for open/creat */ -extern int open _PARAMS ((const char *, int, ...)); +extern int open (const char *, int, ...); #if __ATFILE_VISIBLE -extern int openat _PARAMS ((int, const char *, int, ...)); +extern int openat (int, const char *, int, ...); #endif -extern int creat _PARAMS ((const char *, mode_t)); -extern int fcntl _PARAMS ((int, int, ...)); +extern int creat (const char *, mode_t); +extern int fcntl (int, int, ...); #if __BSD_VISIBLE -extern int flock _PARAMS ((int, int)); +extern int flock (int, int); #endif #if __GNU_VISIBLE #include -extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); +extern int futimesat (int, const char *, const struct timeval *); #endif /* Provide _ prototypes for functions provided by some versions of newlib. */ #ifdef _COMPILING_NEWLIB -extern int _open _PARAMS ((const char *, int, ...)); -extern int _fcntl _PARAMS ((int, int, ...)); +extern int _open (const char *, int, ...); +extern int _fcntl (int, int, ...); #ifdef __LARGE64_FILES -extern int _open64 _PARAMS ((const char *, int, ...)); +extern int _open64 (const char *, int, ...); #endif #endif diff --git a/libc/xtensa-lx106-elf/include/sys/cdefs.h b/libc/xtensa-lx106-elf/include/sys/cdefs.h index db5f2bf..fc564a5 100644 --- a/libc/xtensa-lx106-elf/include/sys/cdefs.h +++ b/libc/xtensa-lx106-elf/include/sys/cdefs.h @@ -385,7 +385,7 @@ #endif #if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) -#define __always_inline __attribute__((__always_inline__)) +#define __always_inline __inline__ __attribute__((__always_inline__)) #else #define __always_inline #endif diff --git a/libc/xtensa-lx106-elf/include/sys/errno.h b/libc/xtensa-lx106-elf/include/sys/errno.h index a72c373..025b461 100644 --- a/libc/xtensa-lx106-elf/include/sys/errno.h +++ b/libc/xtensa-lx106-elf/include/sys/errno.h @@ -12,12 +12,12 @@ extern "C" { #ifndef _REENT_ONLY #define errno (*__errno()) -extern int *__errno _PARAMS ((void)); +extern int *__errno (void); #endif /* Please don't use these variables directly. Use strerror instead. */ -extern __IMPORT _CONST char * _CONST _sys_errlist[]; +extern __IMPORT const char * const _sys_errlist[]; extern __IMPORT int _sys_nerr; #ifdef __CYGWIN__ extern __IMPORT const char * const sys_errlist[]; diff --git a/libc/xtensa-lx106-elf/include/sys/iconvnls.h b/libc/xtensa-lx106-elf/include/sys/iconvnls.h index 09ea183..d4ee0b7 100644 --- a/libc/xtensa-lx106-elf/include/sys/iconvnls.h +++ b/libc/xtensa-lx106-elf/include/sys/iconvnls.h @@ -44,34 +44,34 @@ #define ICONV_NLS_FROM 0 #define ICONV_NLS_TO 1 -_VOID -_EXFUN(_iconv_nls_get_state, (iconv_t cd, mbstate_t *ps, int direction)); +void +_iconv_nls_get_state (iconv_t cd, mbstate_t *ps, int direction); int -_EXFUN(_iconv_nls_set_state, (iconv_t cd, mbstate_t *ps, int direction)); +_iconv_nls_set_state (iconv_t cd, mbstate_t *ps, int direction); int -_EXFUN(_iconv_nls_is_stateful, (iconv_t cd, int direction)); +_iconv_nls_is_stateful (iconv_t cd, int direction); int -_EXFUN(_iconv_nls_get_mb_cur_max, (iconv_t cd, int direction)); +_iconv_nls_get_mb_cur_max (iconv_t cd, int direction); size_t -_EXFUN(_iconv_nls_conv, (struct _reent *rptr, iconv_t cd, - _CONST char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft)); +_iconv_nls_conv (struct _reent *rptr, iconv_t cd, + const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft); -_CONST char * -_EXFUN(_iconv_nls_construct_filename, (struct _reent *rptr, _CONST char *file, - _CONST char *dir, _CONST char *ext)); +const char * +_iconv_nls_construct_filename (struct _reent *rptr, const char *file, + const char *dir, const char *ext); int -_EXFUN(_iconv_nls_open, (struct _reent *rptr, _CONST char *encoding, - iconv_t *towc, iconv_t *fromwc, int flag)); +_iconv_nls_open (struct _reent *rptr, const char *encoding, + iconv_t *towc, iconv_t *fromwc, int flag); char * -_EXFUN(_iconv_resolve_encoding_name, (struct _reent *rptr, _CONST char *ca)); +_iconv_resolve_encoding_name (struct _reent *rptr, const char *ca); #endif /* __SYS_ICONVNLS_H__ */ diff --git a/libc/xtensa-lx106-elf/include/sys/reent.h b/libc/xtensa-lx106-elf/include/sys/reent.h index c045ca5..1ef2261 100644 --- a/libc/xtensa-lx106-elf/include/sys/reent.h +++ b/libc/xtensa-lx106-elf/include/sys/reent.h @@ -165,7 +165,7 @@ struct __sFILE_fake { /* Following is needed both in libc/stdio and libc/stdlib so we put it * here instead of libc/stdio/local.h where it was previously. */ -extern _VOID _EXFUN(__sinit,(struct _reent *)); +extern void __sinit (struct _reent *); # define _REENT_SMALL_CHECK_INIT(ptr) \ do \ @@ -192,15 +192,15 @@ struct __sFILE { #endif /* operations */ - _PTR _cookie; /* cookie passed to io functions */ + void * _cookie; /* cookie passed to io functions */ - _READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR, - char *, _READ_WRITE_BUFSIZE_TYPE)); - _READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR, + _READ_WRITE_RETURN_TYPE (*_read) (struct _reent *, void *, + char *, _READ_WRITE_BUFSIZE_TYPE); + _READ_WRITE_RETURN_TYPE (*_write) (struct _reent *, void *, const char *, - _READ_WRITE_BUFSIZE_TYPE)); - _fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); - int _EXFNPTR(_close, (struct _reent *, _PTR)); + _READ_WRITE_BUFSIZE_TYPE); + _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int); + int (*_close) (struct _reent *, void *); /* separate buffer for long sequences of ungetc() */ struct __sbuf _ub; /* ungetc buffer */ @@ -248,15 +248,15 @@ struct __sFILE64 { struct _reent *_data; /* operations */ - _PTR _cookie; /* cookie passed to io functions */ + void * _cookie; /* cookie passed to io functions */ - _READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR, - char *, _READ_WRITE_BUFSIZE_TYPE)); - _READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR, + _READ_WRITE_RETURN_TYPE (*_read) (struct _reent *, void *, + char *, _READ_WRITE_BUFSIZE_TYPE); + _READ_WRITE_RETURN_TYPE (*_write) (struct _reent *, void *, const char *, - _READ_WRITE_BUFSIZE_TYPE)); - _fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); - int _EXFNPTR(_close, (struct _reent *, _PTR)); + _READ_WRITE_BUFSIZE_TYPE); + _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int); + int (*_close) (struct _reent *, void *); /* separate buffer for long sequences of ungetc() */ struct __sbuf _ub; /* ungetc buffer */ @@ -275,7 +275,7 @@ struct __sFILE64 { int _flags2; /* for future use */ _off64_t _offset; /* current lseek offset */ - _fpos64_t _EXFNPTR(_seek64, (struct _reent *, _PTR, _fpos64_t, int)); + _fpos64_t (*_seek64) (struct _reent *, void *, _fpos64_t, int); #ifndef __SINGLE_THREAD__ _flock_t _lock; /* for thread-safety locking */ @@ -391,7 +391,7 @@ struct _reent struct _mprec *_mp; - void _EXFNPTR(__cleanup, (struct _reent *)); + void (*__cleanup) (struct _reent *); int _gamma_signgam; @@ -584,7 +584,7 @@ struct _reent int __sdidinit; /* 1 means stdio has been init'd */ - void _EXFNPTR(__cleanup, (struct _reent *)); + void (*__cleanup) (struct _reent *); /* used by mprec routines */ struct _Bigint *_result; @@ -773,15 +773,15 @@ extern __FILE __sf[3]; #endif extern struct _reent *_impure_ptr __ATTRIBUTE_IMPURE_PTR__; -extern struct _reent *_CONST _global_impure_ptr __ATTRIBUTE_IMPURE_PTR__; +extern struct _reent *const _global_impure_ptr __ATTRIBUTE_IMPURE_PTR__; -void _reclaim_reent _PARAMS ((struct _reent *)); +void _reclaim_reent (struct _reent *); /* #define _REENT_ONLY define this to get only reentrant routines */ #if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__) #ifndef __getreent - struct _reent * _EXFUN(__getreent, (void)); + struct _reent * __getreent (void); #endif # define _REENT (__getreent()) #else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */ diff --git a/libc/xtensa-lx106-elf/include/sys/resource.h b/libc/xtensa-lx106-elf/include/sys/resource.h index c35ac2a..b99506b 100644 --- a/libc/xtensa-lx106-elf/include/sys/resource.h +++ b/libc/xtensa-lx106-elf/include/sys/resource.h @@ -11,7 +11,7 @@ struct rusage { struct timeval ru_stime; /* system time used */ }; -int _EXFUN(getrusage, (int, struct rusage*)); +int getrusage (int, struct rusage*); #endif diff --git a/libc/xtensa-lx106-elf/include/sys/select.h b/libc/xtensa-lx106-elf/include/sys/select.h index f5dc586..1e5d895 100644 --- a/libc/xtensa-lx106-elf/include/sys/select.h +++ b/libc/xtensa-lx106-elf/include/sys/select.h @@ -1,14 +1,3 @@ -/* select.h - Copyright 1998, 1999, 2000, 2001, 2005, 2009 Red Hat, Inc. - - Written by Geoffrey Noer - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - #ifndef _SYS_SELECT_H #define _SYS_SELECT_H diff --git a/libc/xtensa-lx106-elf/include/sys/signal.h b/libc/xtensa-lx106-elf/include/sys/signal.h index ab35718..7d0c594 100644 --- a/libc/xtensa-lx106-elf/include/sys/signal.h +++ b/libc/xtensa-lx106-elf/include/sys/signal.h @@ -161,36 +161,34 @@ typedef struct sigaltstack { #define SIG_BLOCK 1 /* set of signals to block */ #define SIG_UNBLOCK 2 /* set of signals to, well, unblock */ -int _EXFUN(sigprocmask, (int how, const sigset_t *set, sigset_t *oset)); +int sigprocmask (int how, const sigset_t *set, sigset_t *oset); #endif #if __POSIX_VISIBLE >= 199506 -int _EXFUN(pthread_sigmask, (int how, const sigset_t *set, sigset_t *oset)); +int pthread_sigmask (int how, const sigset_t *set, sigset_t *oset); #endif -#if defined(__CYGWIN__) || defined(__rtems__) #ifdef _COMPILING_NEWLIB -int _EXFUN(_kill, (pid_t, int)); +int _kill (pid_t, int); #endif /* _COMPILING_NEWLIB */ -#endif /* __CYGWIN__ || __rtems__ */ #if __POSIX_VISIBLE -int _EXFUN(kill, (pid_t, int)); +int kill (pid_t, int); #endif #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 -int _EXFUN(killpg, (pid_t, int)); +int killpg (pid_t, int); #endif #if __POSIX_VISIBLE -int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *)); -int _EXFUN(sigaddset, (sigset_t *, const int)); -int _EXFUN(sigdelset, (sigset_t *, const int)); -int _EXFUN(sigismember, (const sigset_t *, int)); -int _EXFUN(sigfillset, (sigset_t *)); -int _EXFUN(sigemptyset, (sigset_t *)); -int _EXFUN(sigpending, (sigset_t *)); -int _EXFUN(sigsuspend, (const sigset_t *)); -int _EXFUN(sigwait, (const sigset_t *set, int *sig)); +int sigaction (int, const struct sigaction *, struct sigaction *); +int sigaddset (sigset_t *, const int); +int sigdelset (sigset_t *, const int); +int sigismember (const sigset_t *, int); +int sigfillset (sigset_t *); +int sigemptyset (sigset_t *); +int sigpending (sigset_t *); +int sigsuspend (const sigset_t *); +int sigwait (const sigset_t *set, int *sig); #if !defined(__CYGWIN__) && !defined(__rtems__) /* These depend upon the type of sigset_t, which right now @@ -211,21 +209,21 @@ int _EXFUN(sigwait, (const sigset_t *set, int *sig)); value. */ #if __XSI_VISIBLE && !defined(__INSIDE_CYGWIN__) # ifdef __GNUC__ -int _EXFUN(sigpause, (int)) __asm__ (__ASMNAME ("__xpg_sigpause")); +int sigpause (int) __asm__ (__ASMNAME ("__xpg_sigpause")); # else -int _EXFUN(__xpg_sigpause, (int)); +int __xpg_sigpause (int); # define sigpause __xpg_sigpause # endif #elif __BSD_VISIBLE -int _EXFUN(sigpause, (int)); +int sigpause (int); #endif #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 -int _EXFUN(sigaltstack, (const stack_t *__restrict, stack_t *__restrict)); +int sigaltstack (const stack_t *__restrict, stack_t *__restrict); #endif #if __POSIX_VISIBLE >= 199506 -int _EXFUN(pthread_kill, (pthread_t thread, int sig)); +int pthread_kill (pthread_t thread, int sig); #endif #if __POSIX_VISIBLE >= 199309 @@ -233,12 +231,11 @@ int _EXFUN(pthread_kill, (pthread_t thread, int sig)); /* 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76 NOTE: P1003.1c/D10, p. 39 adds sigwait(). */ -int _EXFUN(sigwaitinfo, (const sigset_t *set, siginfo_t *info)); -int _EXFUN(sigtimedwait, - (const sigset_t *set, siginfo_t *info, const struct timespec *timeout) -); +int sigwaitinfo (const sigset_t *set, siginfo_t *info); +int sigtimedwait (const sigset_t *set, siginfo_t *info, + const struct timespec *timeout); /* 3.3.9 Queue a Signal to a Process, P1003.1b-1993, p. 78 */ -int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value)); +int sigqueue (pid_t pid, int signo, const union sigval value); #endif /* __POSIX_VISIBLE >= 199309 */ diff --git a/libc/xtensa-lx106-elf/include/sys/stat.h b/libc/xtensa-lx106-elf/include/sys/stat.h index 94a90c0..eee98db 100644 --- a/libc/xtensa-lx106-elf/include/sys/stat.h +++ b/libc/xtensa-lx106-elf/include/sys/stat.h @@ -144,41 +144,41 @@ struct stat #define UTIME_OMIT -1L #endif -int _EXFUN(chmod,( const char *__path, mode_t __mode )); -int _EXFUN(fchmod,(int __fd, mode_t __mode)); -int _EXFUN(fstat,( int __fd, struct stat *__sbuf )); -int _EXFUN(mkdir,( const char *_path, mode_t __mode )); -int _EXFUN(mkfifo,( const char *__path, mode_t __mode )); -int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf )); -mode_t _EXFUN(umask,( mode_t __mask )); +int chmod (const char *__path, mode_t __mode ); +int fchmod (int __fd, mode_t __mode); +int fstat (int __fd, struct stat *__sbuf ); +int mkdir (const char *_path, mode_t __mode ); +int mkfifo (const char *__path, mode_t __mode ); +int stat (const char *__restrict __path, struct stat *__restrict __sbuf ); +mode_t umask (mode_t __mask ); #if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__) -int _EXFUN(lstat,( const char *__restrict __path, struct stat *__restrict __buf )); -int _EXFUN(mknod,( const char *__path, mode_t __mode, dev_t __dev )); +int lstat (const char *__restrict __path, struct stat *__restrict __buf ); +int mknod (const char *__path, mode_t __mode, dev_t __dev ); #endif #if __ATFILE_VISIBLE && !defined(__INSIDE_CYGWIN__) -int _EXFUN(fchmodat, (int, const char *, mode_t, int)); -int _EXFUN(fstatat, (int, const char *__restrict , struct stat *__restrict, int)); -int _EXFUN(mkdirat, (int, const char *, mode_t)); -int _EXFUN(mkfifoat, (int, const char *, mode_t)); -int _EXFUN(mknodat, (int, const char *, mode_t, dev_t)); -int _EXFUN(utimensat, (int, const char *, const struct timespec *, int)); +int fchmodat (int, const char *, mode_t, int); +int fstatat (int, const char *__restrict , struct stat *__restrict, int); +int mkdirat (int, const char *, mode_t); +int mkfifoat (int, const char *, mode_t); +int mknodat (int, const char *, mode_t, dev_t); +int utimensat (int, const char *, const struct timespec *, int); #endif #if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__) -int _EXFUN(futimens, (int, const struct timespec *)); +int futimens (int, const struct timespec *); #endif /* Provide prototypes for most of the _ names that are provided in newlib for some compilers. */ #ifdef _COMPILING_NEWLIB -int _EXFUN(_fstat,( int __fd, struct stat *__sbuf )); -int _EXFUN(_stat,( const char *__restrict __path, struct stat *__restrict __sbuf )); -int _EXFUN(_mkdir,( const char *_path, mode_t __mode )); +int _fstat (int __fd, struct stat *__sbuf ); +int _stat (const char *__restrict __path, struct stat *__restrict __sbuf ); +int _mkdir (const char *_path, mode_t __mode ); #ifdef __LARGE64_FILES struct stat64; -int _EXFUN(_stat64,( const char *__restrict __path, struct stat64 *__restrict __sbuf )); -int _EXFUN(_fstat64,( int __fd, struct stat64 *__sbuf )); +int _stat64 (const char *__restrict __path, struct stat64 *__restrict __sbuf ); +int _fstat64 (int __fd, struct stat64 *__sbuf ); #endif #endif diff --git a/libc/xtensa-lx106-elf/include/sys/stdio.h b/libc/xtensa-lx106-elf/include/sys/stdio.h index 0918fe1..91a2745 100644 --- a/libc/xtensa-lx106-elf/include/sys/stdio.h +++ b/libc/xtensa-lx106-elf/include/sys/stdio.h @@ -12,7 +12,7 @@ #ifndef __SINGLE_THREAD__ # define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_acquire_recursive((fp)->_lock)) #else -# define _flockfile(fp) (_CAST_VOID 0) +# define _flockfile(fp) ((void) 0) #endif #endif @@ -20,7 +20,7 @@ #ifndef __SINGLE_THREAD__ # define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_release_recursive((fp)->_lock)) #else -# define _funlockfile(fp) (_CAST_VOID 0) +# define _funlockfile(fp) ((void) 0) #endif #endif diff --git a/libc/xtensa-lx106-elf/include/sys/time.h b/libc/xtensa-lx106-elf/include/sys/time.h index 5fdb667..ce2e667 100644 --- a/libc/xtensa-lx106-elf/include/sys/time.h +++ b/libc/xtensa-lx106-elf/include/sys/time.h @@ -268,30 +268,30 @@ struct itimerval { #include __BEGIN_DECLS -int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp)); +int utimes (const char *__path, const struct timeval *__tvp); #if __BSD_VISIBLE -int _EXFUN(adjtime, (const struct timeval *, struct timeval *)); -int _EXFUN(futimes, (int, const struct timeval *)); -int _EXFUN(lutimes, (const char *, const struct timeval *)); -int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *)); +int adjtime (const struct timeval *, struct timeval *); +int futimes (int, const struct timeval *); +int lutimes (const char *, const struct timeval *); +int settimeofday (const struct timeval *, const struct timezone *); #endif #if __MISC_VISIBLE || __XSI_VISIBLE -int _EXFUN(getitimer, (int __which, struct itimerval *__value)); -int _EXFUN(setitimer, (int __which, const struct itimerval *__restrict __value, - struct itimerval *__restrict __ovalue)); +int getitimer (int __which, struct itimerval *__value); +int setitimer (int __which, const struct itimerval *__restrict __value, + struct itimerval *__restrict __ovalue); #endif -int _EXFUN(gettimeofday, (struct timeval *__restrict __p, - void *__restrict __tz)); +int gettimeofday (struct timeval *__restrict __p, + void *__restrict __tz); #if __GNU_VISIBLE -int _EXFUN(futimesat, (int, const char *, const struct timeval [2])); +int futimesat (int, const char *, const struct timeval [2]); #endif #ifdef _COMPILING_NEWLIB -int _EXFUN(_gettimeofday, (struct timeval *__p, void *__tz)); +int _gettimeofday (struct timeval *__p, void *__tz); #endif __END_DECLS diff --git a/libc/xtensa-lx106-elf/include/sys/timeb.h b/libc/xtensa-lx106-elf/include/sys/timeb.h index 793b481..ccf6649 100644 --- a/libc/xtensa-lx106-elf/include/sys/timeb.h +++ b/libc/xtensa-lx106-elf/include/sys/timeb.h @@ -31,7 +31,7 @@ struct timeb short dstflag; }; -extern int ftime _PARAMS ((struct timeb *)); +extern int ftime (struct timeb *); #ifdef __cplusplus } diff --git a/libc/xtensa-lx106-elf/include/sys/times.h b/libc/xtensa-lx106-elf/include/sys/times.h index b1f1dc6..05b2547 100644 --- a/libc/xtensa-lx106-elf/include/sys/times.h +++ b/libc/xtensa-lx106-elf/include/sys/times.h @@ -21,9 +21,9 @@ struct tms { clock_t tms_cstime; /* system time, children */ }; -clock_t _EXFUN(times,(struct tms *)); +clock_t times (struct tms *); #ifdef _COMPILING_NEWLIB -clock_t _EXFUN(_times,(struct tms *)); +clock_t _times (struct tms *); #endif #ifdef __cplusplus diff --git a/libc/xtensa-lx106-elf/include/sys/unistd.h b/libc/xtensa-lx106-elf/include/sys/unistd.h index 0596221..5386bd4 100644 --- a/libc/xtensa-lx106-elf/include/sys/unistd.h +++ b/libc/xtensa-lx106-elf/include/sys/unistd.h @@ -15,234 +15,234 @@ extern "C" { extern char **environ; -void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((__noreturn__))); +void _exit (int __status) _ATTRIBUTE ((__noreturn__)); -int _EXFUN(access,(const char *__path, int __amode )); -unsigned _EXFUN(alarm, (unsigned __secs )); -int _EXFUN(chdir, (const char *__path )); -int _EXFUN(chmod, (const char *__path, mode_t __mode )); +int access (const char *__path, int __amode); +unsigned alarm (unsigned __secs); +int chdir (const char *__path); +int chmod (const char *__path, mode_t __mode); #if !defined(__INSIDE_CYGWIN__) -int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group )); +int chown (const char *__path, uid_t __owner, gid_t __group); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) -int _EXFUN(chroot, (const char *__path )); +int chroot (const char *__path); #endif -int _EXFUN(close, (int __fildes )); +int close (int __fildes); #if __POSIX_VISIBLE >= 199209 -size_t _EXFUN(confstr, (int __name, char *__buf, size_t __len)); +size_t confstr (int __name, char *__buf, size_t __len); #endif #if __XSI_VISIBLE -char * _EXFUN(crypt, (const char *__key, const char *__salt)); +char * crypt (const char *__key, const char *__salt); #endif #if __XSI_VISIBLE && __XSI_VISIBLE < 700 -char * _EXFUN(ctermid, (char *__s )); +char * ctermid (char *__s); #endif #if __XSI_VISIBLE && __XSI_VISIBLE < 600 -char * _EXFUN(cuserid, (char *__s )); +char * cuserid (char *__s); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) -int _EXFUN(daemon, (int nochdir, int noclose)); +int daemon (int nochdir, int noclose); #endif -int _EXFUN(dup, (int __fildes )); -int _EXFUN(dup2, (int __fildes, int __fildes2 )); +int dup (int __fildes); +int dup2 (int __fildes, int __fildes2); #if __GNU_VISIBLE -int _EXFUN(dup3, (int __fildes, int __fildes2, int flags)); -int _EXFUN(eaccess, (const char *__path, int __mode)); +int dup3 (int __fildes, int __fildes2, int flags); +int eaccess (const char *__path, int __mode); #endif #if __XSI_VISIBLE -void _EXFUN(encrypt, (char *__block, int __edflag)); +void encrypt (char *__block, int __edflag); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) -void _EXFUN(endusershell, (void)); +void endusershell (void); #endif #if __GNU_VISIBLE -int _EXFUN(euidaccess, (const char *__path, int __mode)); +int euidaccess (const char *__path, int __mode); #endif -int _EXFUN(execl, (const char *__path, const char *, ... )); -int _EXFUN(execle, (const char *__path, const char *, ... )); -int _EXFUN(execlp, (const char *__file, const char *, ... )); +int execl (const char *__path, const char *, ...); +int execle (const char *__path, const char *, ...); +int execlp (const char *__file, const char *, ...); #if __MISC_VISIBLE -int _EXFUN(execlpe, (const char *__file, const char *, ... )); +int execlpe (const char *__file, const char *, ...); #endif -int _EXFUN(execv, (const char *__path, char * const __argv[] )); -int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] )); -int _EXFUN(execvp, (const char *__file, char * const __argv[] )); +int execv (const char *__path, char * const __argv[]); +int execve (const char *__path, char * const __argv[], char * const __envp[]); +int execvp (const char *__file, char * const __argv[]); #if __GNU_VISIBLE -int _EXFUN(execvpe, (const char *__file, char * const __argv[], char * const __envp[] )); +int execvpe (const char *__file, char * const __argv[], char * const __envp[]); #endif #if __ATFILE_VISIBLE -int _EXFUN(faccessat, (int __dirfd, const char *__path, int __mode, int __flags)); +int faccessat (int __dirfd, const char *__path, int __mode, int __flags); #endif #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 -int _EXFUN(fchdir, (int __fildes)); +int fchdir (int __fildes); #endif #if __POSIX_VISIBLE >= 199309 -int _EXFUN(fchmod, (int __fildes, mode_t __mode )); +int fchmod (int __fildes, mode_t __mode); #endif #if !defined(__INSIDE_CYGWIN__) #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 -int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group )); +int fchown (int __fildes, uid_t __owner, gid_t __group); #endif #endif #if __ATFILE_VISIBLE -int _EXFUN(fchownat, (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags)); +int fchownat (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags); #endif #if __POSIX_VISIBLE >= 200809 -int _EXFUN(fexecve, (int __fd, char * const __argv[], char * const __envp[] )); +int fexecve (int __fd, char * const __argv[], char * const __envp[]); #endif -pid_t _EXFUN(fork, (void )); -long _EXFUN(fpathconf, (int __fd, int __name )); -int _EXFUN(fsync, (int __fd)); +pid_t fork (void); +long fpathconf (int __fd, int __name); +int fsync (int __fd); #if __POSIX_VISIBLE >= 199309 -int _EXFUN(fdatasync, (int __fd)); +int fdatasync (int __fd); #endif #if __GNU_VISIBLE -char * _EXFUN(get_current_dir_name, (void)); +char * get_current_dir_name (void); #endif -char * _EXFUN(getcwd, (char *__buf, size_t __size )); +char * getcwd (char *__buf, size_t __size); #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) -int _EXFUN(getdomainname ,(char *__name, size_t __len)); +int getdomainname (char *__name, size_t __len); #endif #if __BSD_VISIBLE -int _EXFUN(getentropy, (void *, size_t)); +int getentropy (void *, size_t); #endif #if !defined(__INSIDE_CYGWIN__) -gid_t _EXFUN(getegid, (void )); -uid_t _EXFUN(geteuid, (void )); -gid_t _EXFUN(getgid, (void )); +gid_t getegid (void); +uid_t geteuid (void); +gid_t getgid (void); #endif -int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] )); +int getgroups (int __gidsetsize, gid_t __grouplist[]); #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 -long _EXFUN(gethostid, (void)); +long gethostid (void); #endif -char * _EXFUN(getlogin, (void )); +char * getlogin (void); #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) -int _EXFUN(getlogin_r, (char *name, size_t namesize) ); +int getlogin_r (char *name, size_t namesize) ; #endif #if __BSD_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) -char * _EXFUN(getpass, (const char *__prompt)); -int _EXFUN(getpagesize, (void)); +char * getpass (const char *__prompt); +int getpagesize (void); #endif #if __BSD_VISIBLE -int _EXFUN(getpeereid, (int, uid_t *, gid_t *)); +int getpeereid (int, uid_t *, gid_t *); #endif #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 -pid_t _EXFUN(getpgid, (pid_t)); +pid_t getpgid (pid_t); #endif -pid_t _EXFUN(getpgrp, (void )); -pid_t _EXFUN(getpid, (void )); -pid_t _EXFUN(getppid, (void )); +pid_t getpgrp (void); +pid_t getpid (void); +pid_t getppid (void); #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 -pid_t _EXFUN(getsid, (pid_t)); +pid_t getsid (pid_t); #endif #if !defined(__INSIDE_CYGWIN__) -uid_t _EXFUN(getuid, (void )); +uid_t getuid (void); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) -char * _EXFUN(getusershell, (void)); +char * getusershell (void); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) -char * _EXFUN(getwd, (char *__buf )); +char * getwd (char *__buf); #endif #if __BSD_VISIBLE -int _EXFUN(iruserok, (unsigned long raddr, int superuser, const char *ruser, const char *luser)); +int iruserok (unsigned long raddr, int superuser, const char *ruser, const char *luser); #endif -int _EXFUN(isatty, (int __fildes )); +int isatty (int __fildes); #if __BSD_VISIBLE -int _EXFUN(issetugid, (void)); +int issetugid (void); #endif #if !defined(__INSIDE_CYGWIN__) #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 -int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group )); +int lchown (const char *__path, uid_t __owner, gid_t __group); #endif #endif -int _EXFUN(link, (const char *__path1, const char *__path2 )); +int link (const char *__path1, const char *__path2); #if __ATFILE_VISIBLE -int _EXFUN(linkat, (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags )); +int linkat (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags); #endif #if __MISC_VISIBLE || __XSI_VISIBLE -int _EXFUN(nice, (int __nice_value )); +int nice (int __nice_value); #endif #if !defined(__INSIDE_CYGWIN__) -off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence )); +off_t lseek (int __fildes, off_t __offset, int __whence); #endif #if __MISC_VISIBLE || __XSI_VISIBLE >= 4 #define F_ULOCK 0 #define F_LOCK 1 #define F_TLOCK 2 #define F_TEST 3 -int _EXFUN(lockf, (int __fd, int __cmd, off_t __len)); +int lockf (int __fd, int __cmd, off_t __len); #endif -long _EXFUN(pathconf, (const char *__path, int __name )); -int _EXFUN(pause, (void )); +long pathconf (const char *__path, int __name); +int pause (void); #if __POSIX_VISIBLE >= 199506 -int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void))); +int pthread_atfork (void (*)(void), void (*)(void), void (*)(void)); #endif -int _EXFUN(pipe, (int __fildes[2] )); +int pipe (int __fildes[2]); #if __GNU_VISIBLE -int _EXFUN(pipe2, (int __fildes[2], int flags)); +int pipe2 (int __fildes[2], int flags); #endif #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 -ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset)); -ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset)); +ssize_t pread (int __fd, void *__buf, size_t __nbytes, off_t __offset); +ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, off_t __offset); #endif -_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte )); +_READ_WRITE_RETURN_TYPE read (int __fd, void *__buf, size_t __nbyte); #if __BSD_VISIBLE -int _EXFUN(rresvport, (int *__alport)); -int _EXFUN(revoke, (char *__path)); +int rresvport (int *__alport); +int revoke (char *__path); #endif -int _EXFUN(rmdir, (const char *__path )); +int rmdir (const char *__path); #if __BSD_VISIBLE -int _EXFUN(ruserok, (const char *rhost, int superuser, const char *ruser, const char *luser)); +int ruserok (const char *rhost, int superuser, const char *ruser, const char *luser); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) -void * _EXFUN(sbrk, (ptrdiff_t __incr)); +void * sbrk (ptrdiff_t __incr); #endif #if !defined(__INSIDE_CYGWIN__) #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 -int _EXFUN(setegid, (gid_t __gid )); -int _EXFUN(seteuid, (uid_t __uid )); +int setegid (gid_t __gid); +int seteuid (uid_t __uid); #endif -int _EXFUN(setgid, (gid_t __gid )); +int setgid (gid_t __gid); #endif #if __BSD_VISIBLE -int _EXFUN(setgroups, (int ngroups, const gid_t *grouplist )); +int setgroups (int ngroups, const gid_t *grouplist); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) -int _EXFUN(sethostname, (const char *, size_t)); +int sethostname (const char *, size_t); #endif -int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid )); +int setpgid (pid_t __pid, pid_t __pgid); #if __SVID_VISIBLE || __XSI_VISIBLE >= 500 -int _EXFUN(setpgrp, (void )); +int setpgrp (void); #endif #if (__BSD_VISIBLE || __XSI_VISIBLE >= 4) && !defined(__INSIDE_CYGWIN__) -int _EXFUN(setregid, (gid_t __rgid, gid_t __egid)); -int _EXFUN(setreuid, (uid_t __ruid, uid_t __euid)); +int setregid (gid_t __rgid, gid_t __egid); +int setreuid (uid_t __ruid, uid_t __euid); #endif -pid_t _EXFUN(setsid, (void )); +pid_t setsid (void); #if !defined(__INSIDE_CYGWIN__) -int _EXFUN(setuid, (uid_t __uid )); +int setuid (uid_t __uid); #endif #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) -void _EXFUN(setusershell, (void)); +void setusershell (void); #endif -unsigned _EXFUN(sleep, (unsigned int __seconds )); +unsigned sleep (unsigned int __seconds); #if __XSI_VISIBLE -void _EXFUN(swab, (const void *__restrict, void *__restrict, ssize_t)); +void swab (const void *__restrict, void *__restrict, ssize_t); #endif -long _EXFUN(sysconf, (int __name )); -pid_t _EXFUN(tcgetpgrp, (int __fildes )); -int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id )); -char * _EXFUN(ttyname, (int __fildes )); -int _EXFUN(ttyname_r, (int, char *, size_t)); -int _EXFUN(unlink, (const char *__path )); +long sysconf (int __name); +pid_t tcgetpgrp (int __fildes); +int tcsetpgrp (int __fildes, pid_t __pgrp_id); +char * ttyname (int __fildes); +int ttyname_r (int, char *, size_t); +int unlink (const char *__path); #if __XSI_VISIBLE >= 500 && __POSIX_VISIBLE < 200809 || __BSD_VISIBLE -int _EXFUN(usleep, (useconds_t __useconds)); +int usleep (useconds_t __useconds); #endif #if __BSD_VISIBLE -int _EXFUN(vhangup, (void )); +int vhangup (void); #endif -_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte )); +_READ_WRITE_RETURN_TYPE write (int __fd, const void *__buf, size_t __nbyte); #ifdef __CYGWIN__ # define __UNISTD_GETOPT__ @@ -256,69 +256,69 @@ extern int optreset; /* getopt(3) external variable */ #endif #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) -pid_t _EXFUN(vfork, (void )); +pid_t vfork (void); #endif #ifdef _COMPILING_NEWLIB /* Provide prototypes for most of the _ names that are provided in newlib for some compilers. */ -int _EXFUN(_close, (int __fildes )); -pid_t _EXFUN(_fork, (void )); -pid_t _EXFUN(_getpid, (void )); -int _EXFUN(_isatty, (int __fildes )); -int _EXFUN(_link, (const char *__path1, const char *__path2 )); -_off_t _EXFUN(_lseek, (int __fildes, _off_t __offset, int __whence )); +int _close (int __fildes); +pid_t _fork (void); +pid_t _getpid (void); +int _isatty (int __fildes); +int _link (const char *__path1, const char *__path2); +_off_t _lseek (int __fildes, _off_t __offset, int __whence); #ifdef __LARGE64_FILES -_off64_t _EXFUN(_lseek64, (int __filedes, _off64_t __offset, int __whence )); +_off64_t _lseek64 (int __filedes, _off64_t __offset, int __whence); #endif -_READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte )); -void * _EXFUN(_sbrk, (ptrdiff_t __incr)); -int _EXFUN(_unlink, (const char *__path )); -_READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte )); -int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] )); +_READ_WRITE_RETURN_TYPE _read (int __fd, void *__buf, size_t __nbyte); +void * _sbrk (ptrdiff_t __incr); +int _unlink (const char *__path); +_READ_WRITE_RETURN_TYPE _write (int __fd, const void *__buf, size_t __nbyte); +int _execve (const char *__path, char * const __argv[], char * const __envp[]); #endif #if !defined(__INSIDE_CYGWIN__) #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 -int _EXFUN(ftruncate, (int __fd, off_t __length)); +int ftruncate (int __fd, off_t __length); #endif #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 -int _EXFUN(truncate, (const char *, off_t __length)); +int truncate (const char *, off_t __length); #endif #endif #if __BSD_VISIBLE || __POSIX_VISIBLE < 200112 -int _EXFUN(getdtablesize, (void)); +int getdtablesize (void); #endif #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 -useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval)); +useconds_t ualarm (useconds_t __useconds, useconds_t __interval); #endif #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 #if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) /* winsock[2].h defines as __stdcall, and with int as 2nd arg */ - int _EXFUN(gethostname, (char *__name, size_t __len)); + int gethostname (char *__name, size_t __len); #endif #endif #if __MISC_VISIBLE -int _EXFUN(setdtablesize, (int)); +int setdtablesize (int); #endif #if __BSD_VISIBLE || __XSI_VISIBLE >= 500 -void _EXFUN(sync, (void)); +void sync (void); #endif #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 -ssize_t _EXFUN(readlink, (const char *__restrict __path, - char *__restrict __buf, size_t __buflen)); -int _EXFUN(symlink, (const char *__name1, const char *__name2)); +ssize_t readlink (const char *__restrict __path, + char *__restrict __buf, size_t __buflen); +int symlink (const char *__name1, const char *__name2); #endif #if __ATFILE_VISIBLE -ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__restrict __path, - char *__restrict __buf, size_t __buflen)); -int _EXFUN(symlinkat, (const char *, int, const char *)); -int _EXFUN(unlinkat, (int, const char *, int)); +ssize_t readlinkat (int __dirfd1, const char *__restrict __path, + char *__restrict __buf, size_t __buflen); +int symlinkat (const char *, int, const char *); +int unlinkat (int, const char *, int); #endif #define F_OK 0 @@ -582,6 +582,10 @@ int _EXFUN(unlinkat, (int, const char *, int)); #define _CS_POSIX_V7_THREADS_LDFLAGS 19 #define _CS_V7_ENV 20 #define _CS_V6_ENV _CS_V7_ENV +#define _CS_LFS_CFLAGS 21 +#define _CS_LFS_LDFLAGS 22 +#define _CS_LFS_LIBS 23 +#define _CS_LFS_LINTFLAGS 24 #endif #ifdef __cplusplus diff --git a/libc/xtensa-lx106-elf/include/time.h b/libc/xtensa-lx106-elf/include/time.h index 8806b98..a2efcc1 100644 --- a/libc/xtensa-lx106-elf/include/time.h +++ b/libc/xtensa-lx106-elf/include/time.h @@ -53,19 +53,19 @@ struct tm #endif }; -clock_t _EXFUN(clock, (void)); -double _EXFUN(difftime, (time_t _time2, time_t _time1)); -time_t _EXFUN(mktime, (struct tm *_timeptr)); -time_t _EXFUN(time, (time_t *_timer)); +clock_t clock (void); +double difftime (time_t _time2, time_t _time1); +time_t mktime (struct tm *_timeptr); +time_t time (time_t *_timer); #ifndef _REENT_ONLY -char *_EXFUN(asctime, (const struct tm *_tblock)); -char *_EXFUN(ctime, (const time_t *_time)); -struct tm *_EXFUN(gmtime, (const time_t *_timer)); -struct tm *_EXFUN(localtime,(const time_t *_timer)); +char *asctime (const struct tm *_tblock); +char *ctime (const time_t *_time); +struct tm *gmtime (const time_t *_timer); +struct tm *localtime (const time_t *_timer); #endif -size_t _EXFUN(strftime, (char *__restrict _s, +size_t strftime (char *__restrict _s, size_t _maxsize, const char *__restrict _fmt, - const struct tm *__restrict _t)); + const struct tm *__restrict _t); #if __POSIX_VISIBLE >= 200809 extern size_t strftime_l (char *__restrict _s, size_t _maxsize, @@ -73,13 +73,13 @@ extern size_t strftime_l (char *__restrict _s, size_t _maxsize, const struct tm *__restrict _t, locale_t _l); #endif -char *_EXFUN(asctime_r, (const struct tm *__restrict, - char *__restrict)); -char *_EXFUN(ctime_r, (const time_t *, char *)); -struct tm *_EXFUN(gmtime_r, (const time_t *__restrict, - struct tm *__restrict)); -struct tm *_EXFUN(localtime_r, (const time_t *__restrict, - struct tm *__restrict)); +char *asctime_r (const struct tm *__restrict, + char *__restrict); +char *ctime_r (const time_t *, char *); +struct tm *gmtime_r (const time_t *__restrict, + struct tm *__restrict); +struct tm *localtime_r (const time_t *__restrict, + struct tm *__restrict); _END_STD_C @@ -88,9 +88,9 @@ extern "C" { #endif #if __XSI_VISIBLE -char *_EXFUN(strptime, (const char *__restrict, +char *strptime (const char *__restrict, const char *__restrict, - struct tm *__restrict)); + struct tm *__restrict); #endif #if __GNU_VISIBLE char *strptime_l (const char *__restrict, const char *__restrict, @@ -98,9 +98,9 @@ char *strptime_l (const char *__restrict, const char *__restrict, #endif #if __POSIX_VISIBLE -_VOID _EXFUN(tzset, (_VOID)); +void tzset (void); #endif -_VOID _EXFUN(_tzset_r, (struct _reent *)); +void _tzset_r (struct _reent *); typedef struct __tzrule_struct { @@ -120,7 +120,7 @@ typedef struct __tzinfo_struct __tzrule_type __tzrule[2]; } __tzinfo_type; -__tzinfo_type *_EXFUN (__gettzinfo, (_VOID)); +__tzinfo_type *__gettzinfo (void); /* getdate functions */ @@ -128,9 +128,9 @@ __tzinfo_type *_EXFUN (__gettzinfo, (_VOID)); #if __XSI_VISIBLE >= 4 #ifndef _REENT_ONLY #define getdate_err (*__getdate_err()) -int *_EXFUN(__getdate_err,(_VOID)); +int *__getdate_err (void); -struct tm * _EXFUN(getdate, (const char *)); +struct tm * getdate (const char *); /* getdate_err is set to one of the following values to indicate the error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, @@ -145,7 +145,7 @@ struct tm * _EXFUN(getdate, (const char *)); #if __GNU_VISIBLE /* getdate_r returns the error code as above */ -int _EXFUN(getdate_r, (const char *, struct tm *)); +int getdate_r (const char *, struct tm *); #endif /* __GNU_VISIBLE */ #endif /* HAVE_GETDATE */ @@ -183,33 +183,31 @@ extern "C" { /* Clocks, P1003.1b-1993, p. 263 */ -int _EXFUN(clock_settime, (clockid_t clock_id, const struct timespec *tp)); -int _EXFUN(clock_gettime, (clockid_t clock_id, struct timespec *tp)); -int _EXFUN(clock_getres, (clockid_t clock_id, struct timespec *res)); +int clock_settime (clockid_t clock_id, const struct timespec *tp); +int clock_gettime (clockid_t clock_id, struct timespec *tp); +int clock_getres (clockid_t clock_id, struct timespec *res); /* Create a Per-Process Timer, P1003.1b-1993, p. 264 */ -int _EXFUN(timer_create, - (clockid_t clock_id, +int timer_create (clockid_t clock_id, struct sigevent *__restrict evp, - timer_t *__restrict timerid)); + timer_t *__restrict timerid); /* Delete a Per_process Timer, P1003.1b-1993, p. 266 */ -int _EXFUN(timer_delete, (timer_t timerid)); +int timer_delete (timer_t timerid); /* Per-Process Timers, P1003.1b-1993, p. 267 */ -int _EXFUN(timer_settime, - (timer_t timerid, int flags, +int timer_settime (timer_t timerid, int flags, const struct itimerspec *__restrict value, - struct itimerspec *__restrict ovalue)); -int _EXFUN(timer_gettime, (timer_t timerid, struct itimerspec *value)); -int _EXFUN(timer_getoverrun, (timer_t timerid)); + struct itimerspec *__restrict ovalue); +int timer_gettime (timer_t timerid, struct itimerspec *value); +int timer_getoverrun (timer_t timerid); /* High Resolution Sleep, P1003.1b-1993, p. 269 */ -int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp)); +int nanosleep (const struct timespec *rqtp, struct timespec *rmtp); #ifdef __cplusplus } @@ -222,9 +220,8 @@ int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp)); extern "C" { #endif -int _EXFUN(clock_nanosleep, - (clockid_t clock_id, int flags, const struct timespec *rqtp, - struct timespec *rmtp)); +int clock_nanosleep (clockid_t clock_id, int flags, + const struct timespec *rqtp, struct timespec *rmtp); #ifdef __cplusplus } @@ -297,7 +294,7 @@ extern "C" { /* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */ -int _EXFUN(clock_getcpuclockid, (pid_t pid, clockid_t *clock_id)); +int clock_getcpuclockid (pid_t pid, clockid_t *clock_id); #endif /* _POSIX_CPUTIME */ @@ -305,8 +302,8 @@ int _EXFUN(clock_getcpuclockid, (pid_t pid, clockid_t *clock_id)); /* CPU-time Clock Attribute Access, P1003.4b/D8, p. 56 */ -int _EXFUN(clock_setenable_attr, (clockid_t clock_id, int attr)); -int _EXFUN(clock_getenable_attr, (clockid_t clock_id, int *attr)); +int clock_setenable_attr (clockid_t clock_id, int attr); +int clock_getenable_attr (clockid_t clock_id, int *attr); #endif /* _POSIX_CPUTIME or _POSIX_THREAD_CPUTIME */ diff --git a/libc/xtensa-lx106-elf/include/unctrl.h b/libc/xtensa-lx106-elf/include/unctrl.h index 0040752..010812f 100644 --- a/libc/xtensa-lx106-elf/include/unctrl.h +++ b/libc/xtensa-lx106-elf/include/unctrl.h @@ -40,7 +40,7 @@ #define unctrl(c) __unctrl[(c) & 0xff] #define unctrllen(ch) __unctrllen[(ch) & 0xff] -extern __IMPORT _CONST char * _CONST __unctrl[256]; /* Control strings. */ -extern __IMPORT _CONST char __unctrllen[256]; /* Control strings length. */ +extern __IMPORT const char * const __unctrl[256]; /* Control strings. */ +extern __IMPORT const char __unctrllen[256]; /* Control strings length. */ #endif /* _UNCTRL_H_ */ diff --git a/libc/xtensa-lx106-elf/include/wchar.h b/libc/xtensa-lx106-elf/include/wchar.h index 3d98363..accbb8c 100644 --- a/libc/xtensa-lx106-elf/include/wchar.h +++ b/libc/xtensa-lx106-elf/include/wchar.h @@ -86,93 +86,89 @@ struct tm; typedef _mbstate_t mbstate_t; #endif /* _MBSTATE_T */ -wint_t _EXFUN(btowc, (int)); -int _EXFUN(wctob, (wint_t)); -size_t _EXFUN(mbrlen, (const char *__restrict, size_t, mbstate_t *__restrict)); -size_t _EXFUN(mbrtowc, (wchar_t *__restrict, const char *__restrict, size_t, - mbstate_t *__restrict)); -size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * , - size_t, mbstate_t *)); -int _EXFUN(mbsinit, (const mbstate_t *)); +wint_t btowc (int); +int wctob (wint_t); +size_t mbrlen (const char *__restrict, size_t, mbstate_t *__restrict); +size_t mbrtowc (wchar_t *__restrict, const char *__restrict, size_t, + mbstate_t *__restrict); +size_t _mbrtowc_r (struct _reent *, wchar_t * , const char * , + size_t, mbstate_t *); +int mbsinit (const mbstate_t *); #if __POSIX_VISIBLE >= 200809 -size_t _EXFUN(mbsnrtowcs, (wchar_t *__restrict, const char **__restrict, - size_t, size_t, mbstate_t *__restrict)); +size_t mbsnrtowcs (wchar_t *__restrict, const char **__restrict, + size_t, size_t, mbstate_t *__restrict); #endif -size_t _EXFUN(_mbsnrtowcs_r, (struct _reent *, wchar_t * , const char ** , - size_t, size_t, mbstate_t *)); -size_t _EXFUN(mbsrtowcs, (wchar_t *__restrict, const char **__restrict, size_t, - mbstate_t *__restrict)); -size_t _EXFUN(_mbsrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *)); -size_t _EXFUN(wcrtomb, (char *__restrict, wchar_t, mbstate_t *__restrict)); -size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *)); +size_t _mbsnrtowcs_r (struct _reent *, wchar_t * , const char ** , + size_t, size_t, mbstate_t *); +size_t mbsrtowcs (wchar_t *__restrict, const char **__restrict, size_t, + mbstate_t *__restrict); +size_t _mbsrtowcs_r (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *); +size_t wcrtomb (char *__restrict, wchar_t, mbstate_t *__restrict); +size_t _wcrtomb_r (struct _reent *, char * , wchar_t, mbstate_t *); #if __POSIX_VISIBLE >= 200809 -size_t _EXFUN(wcsnrtombs, (char *__restrict, const wchar_t **__restrict, - size_t, size_t, mbstate_t *__restrict)); +size_t wcsnrtombs (char *__restrict, const wchar_t **__restrict, + size_t, size_t, mbstate_t *__restrict); #endif -size_t _EXFUN(_wcsnrtombs_r, (struct _reent *, char * , const wchar_t ** , - size_t, size_t, mbstate_t *)); -size_t _EXFUN(wcsrtombs, (char *__restrict, const wchar_t **__restrict, - size_t, mbstate_t *__restrict)); -size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** , - size_t, mbstate_t *)); +size_t _wcsnrtombs_r (struct _reent *, char * , const wchar_t ** , + size_t, size_t, mbstate_t *); +size_t wcsrtombs (char *__restrict, const wchar_t **__restrict, + size_t, mbstate_t *__restrict); +size_t _wcsrtombs_r (struct _reent *, char * , const wchar_t ** , + size_t, mbstate_t *); #if __POSIX_VISIBLE >= 200809 -int _EXFUN(wcscasecmp, (const wchar_t *, const wchar_t *)); +int wcscasecmp (const wchar_t *, const wchar_t *); #endif -wchar_t *_EXFUN(wcscat, (wchar_t *__restrict, const wchar_t *__restrict)); -wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t)); -int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *)); -int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *)); -wchar_t *_EXFUN(wcscpy, (wchar_t *__restrict, const wchar_t *__restrict)); +wchar_t *wcscat (wchar_t *__restrict, const wchar_t *__restrict); +wchar_t *wcschr (const wchar_t *, wchar_t); +int wcscmp (const wchar_t *, const wchar_t *); +int wcscoll (const wchar_t *, const wchar_t *); +wchar_t *wcscpy (wchar_t *__restrict, const wchar_t *__restrict); #if __POSIX_VISIBLE >= 200809 -wchar_t *_EXFUN(wcpcpy, (wchar_t *__restrict, - const wchar_t *__restrict)); -wchar_t *_EXFUN(wcsdup, (const wchar_t *)); +wchar_t *wcpcpy (wchar_t *__restrict, + const wchar_t *__restrict); +wchar_t *wcsdup (const wchar_t *); #endif -wchar_t *_EXFUN(_wcsdup_r, (struct _reent *, const wchar_t * )); -size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *)); -size_t _EXFUN(wcsftime, (wchar_t *__restrict, size_t, - const wchar_t *__restrict, const struct tm *__restrict)); +wchar_t *_wcsdup_r (struct _reent *, const wchar_t * ); +size_t wcscspn (const wchar_t *, const wchar_t *); +size_t wcsftime (wchar_t *__restrict, size_t, + const wchar_t *__restrict, const struct tm *__restrict); #if __GNU_VISIBLE size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, const struct tm *__restrict, locale_t); #endif -size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t)); -size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t)); -size_t _EXFUN(wcslen, (const wchar_t *)); +size_t wcslcat (wchar_t *, const wchar_t *, size_t); +size_t wcslcpy (wchar_t *, const wchar_t *, size_t); +size_t wcslen (const wchar_t *); #if __POSIX_VISIBLE >= 200809 -int _EXFUN(wcsncasecmp, (const wchar_t *, const wchar_t *, size_t)); +int wcsncasecmp (const wchar_t *, const wchar_t *, size_t); #endif -wchar_t *_EXFUN(wcsncat, (wchar_t *__restrict, - const wchar_t *__restrict, size_t)); -int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t)); -wchar_t *_EXFUN(wcsncpy, (wchar_t *__restrict, - const wchar_t *__restrict, size_t)); +wchar_t *wcsncat (wchar_t *__restrict, + const wchar_t *__restrict, size_t); +int wcsncmp (const wchar_t *, const wchar_t *, size_t); +wchar_t *wcsncpy (wchar_t *__restrict, + const wchar_t *__restrict, size_t); #if __POSIX_VISIBLE >= 200809 -wchar_t *_EXFUN(wcpncpy, (wchar_t *__restrict, - const wchar_t *__restrict, size_t)); -size_t _EXFUN(wcsnlen, (const wchar_t *, size_t)); +wchar_t *wcpncpy (wchar_t *__restrict, + const wchar_t *__restrict, size_t); +size_t wcsnlen (const wchar_t *, size_t); #endif -wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *)); -wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t)); -size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *)); -wchar_t *_EXFUN(wcsstr, (const wchar_t *__restrict, - const wchar_t *__restrict)); -wchar_t *_EXFUN(wcstok, (wchar_t *__restrict, const wchar_t *__restrict, - wchar_t **__restrict)); -double _EXFUN(wcstod, (const wchar_t *__restrict, wchar_t **__restrict)); -double _EXFUN(_wcstod_r, (struct _reent *, const wchar_t *, wchar_t **)); +wchar_t *wcspbrk (const wchar_t *, const wchar_t *); +wchar_t *wcsrchr (const wchar_t *, wchar_t); +size_t wcsspn (const wchar_t *, const wchar_t *); +wchar_t *wcsstr (const wchar_t *__restrict, + const wchar_t *__restrict); +wchar_t *wcstok (wchar_t *__restrict, const wchar_t *__restrict, + wchar_t **__restrict); +double wcstod (const wchar_t *__restrict, wchar_t **__restrict); +double _wcstod_r (struct _reent *, const wchar_t *, wchar_t **); #if __ISO_C_VISIBLE >= 1999 -float _EXFUN(wcstof, (const wchar_t *__restrict, wchar_t **__restrict)); +float wcstof (const wchar_t *__restrict, wchar_t **__restrict); #endif -float _EXFUN(_wcstof_r, (struct _reent *, const wchar_t *, wchar_t **)); -#ifdef _LDBL_EQ_DBL -long double _EXFUN(wcstold, (const wchar_t *, wchar_t **)); -#endif /* _LDBL_EQ_DBL */ #if __XSI_VISIBLE -int _EXFUN(wcswidth, (const wchar_t *, size_t)); +int wcswidth (const wchar_t *, size_t); #endif -size_t _EXFUN(wcsxfrm, (wchar_t *__restrict, const wchar_t *__restrict, - size_t)); +size_t wcsxfrm (wchar_t *__restrict, const wchar_t *__restrict, + size_t); #if __POSIX_VISIBLE >= 200809 extern int wcscasecmp_l (const wchar_t *, const wchar_t *, locale_t); extern int wcsncasecmp_l (const wchar_t *, const wchar_t *, size_t, locale_t); @@ -182,36 +178,36 @@ extern size_t wcsxfrm_l (wchar_t *__restrict, const wchar_t *__restrict, size_t, #endif #if __XSI_VISIBLE -int _EXFUN(wcwidth, (const wchar_t)); +int wcwidth (const wchar_t); #endif -wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t)); -int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t)); -wchar_t *_EXFUN(wmemcpy, (wchar_t *__restrict, const wchar_t *__restrict, - size_t)); -wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t)); +wchar_t *wmemchr (const wchar_t *, wchar_t, size_t); +int wmemcmp (const wchar_t *, const wchar_t *, size_t); +wchar_t *wmemcpy (wchar_t *__restrict, const wchar_t *__restrict, + size_t); +wchar_t *wmemmove (wchar_t *, const wchar_t *, size_t); #if __GNU_VISIBLE -wchar_t *_EXFUN(wmempcpy, (wchar_t *__restrict, const wchar_t *__restrict, - size_t)); +wchar_t *wmempcpy (wchar_t *__restrict, const wchar_t *__restrict, + size_t); #endif -wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t)); +wchar_t *wmemset (wchar_t *, wchar_t, size_t); -long _EXFUN(wcstol, (const wchar_t *__restrict, wchar_t **__restrict, int)); +long wcstol (const wchar_t *__restrict, wchar_t **__restrict, int); #if __ISO_C_VISIBLE >= 1999 -long long _EXFUN(wcstoll, (const wchar_t *__restrict, wchar_t **__restrict, - int)); +long long wcstoll (const wchar_t *__restrict, wchar_t **__restrict, + int); #endif -unsigned long _EXFUN(wcstoul, (const wchar_t *__restrict, wchar_t **__restrict, - int)); +unsigned long wcstoul (const wchar_t *__restrict, wchar_t **__restrict, + int); #if __ISO_C_VISIBLE >= 1999 -unsigned long long _EXFUN(wcstoull, (const wchar_t *__restrict, - wchar_t **__restrict, int)); +unsigned long long wcstoull (const wchar_t *__restrict, + wchar_t **__restrict, int); #endif -long _EXFUN(_wcstol_r, (struct _reent *, const wchar_t *, wchar_t **, int)); -long long _EXFUN(_wcstoll_r, (struct _reent *, const wchar_t *, wchar_t **, int)); -unsigned long _EXFUN(_wcstoul_r, (struct _reent *, const wchar_t *, wchar_t **, int)); -unsigned long long _EXFUN(_wcstoull_r, (struct _reent *, const wchar_t *, wchar_t **, int)); +long _wcstol_r (struct _reent *, const wchar_t *, wchar_t **, int); +long long _wcstoll_r (struct _reent *, const wchar_t *, wchar_t **, int); +unsigned long _wcstoul_r (struct _reent *, const wchar_t *, wchar_t **, int); +unsigned long long _wcstoull_r (struct _reent *, const wchar_t *, wchar_t **, int); #if __ISO_C_VISIBLE >= 1999 -long double _EXFUN(wcstold, (const wchar_t *, wchar_t **)); +long double wcstold (const wchar_t *, wchar_t **); #endif #if __GNU_VISIBLE @@ -227,53 +223,53 @@ float wcstof_l (const wchar_t *, wchar_t **, locale_t); long double wcstold_l (const wchar_t *, wchar_t **, locale_t); #endif -wint_t _EXFUN(fgetwc, (__FILE *)); -wchar_t *_EXFUN(fgetws, (wchar_t *__restrict, int, __FILE *__restrict)); -wint_t _EXFUN(fputwc, (wchar_t, __FILE *)); -int _EXFUN(fputws, (const wchar_t *__restrict, __FILE *__restrict)); +wint_t fgetwc (__FILE *); +wchar_t *fgetws (wchar_t *__restrict, int, __FILE *__restrict); +wint_t fputwc (wchar_t, __FILE *); +int fputws (const wchar_t *__restrict, __FILE *__restrict); #if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 -int _EXFUN (fwide, (__FILE *, int)); +int fwide (__FILE *, int); #endif -wint_t _EXFUN (getwc, (__FILE *)); -wint_t _EXFUN (getwchar, (void)); -wint_t _EXFUN(putwc, (wchar_t, __FILE *)); -wint_t _EXFUN(putwchar, (wchar_t)); -wint_t _EXFUN (ungetwc, (wint_t wc, __FILE *)); +wint_t getwc (__FILE *); +wint_t getwchar (void); +wint_t putwc (wchar_t, __FILE *); +wint_t putwchar (wchar_t); +wint_t ungetwc (wint_t wc, __FILE *); -wint_t _EXFUN(_fgetwc_r, (struct _reent *, __FILE *)); -wint_t _EXFUN(_fgetwc_unlocked_r, (struct _reent *, __FILE *)); -wchar_t *_EXFUN(_fgetws_r, (struct _reent *, wchar_t *, int, __FILE *)); -wchar_t *_EXFUN(_fgetws_unlocked_r, (struct _reent *, wchar_t *, int, __FILE *)); -wint_t _EXFUN(_fputwc_r, (struct _reent *, wchar_t, __FILE *)); -wint_t _EXFUN(_fputwc_unlocked_r, (struct _reent *, wchar_t, __FILE *)); -int _EXFUN(_fputws_r, (struct _reent *, const wchar_t *, __FILE *)); -int _EXFUN(_fputws_unlocked_r, (struct _reent *, const wchar_t *, __FILE *)); -int _EXFUN (_fwide_r, (struct _reent *, __FILE *, int)); -wint_t _EXFUN (_getwc_r, (struct _reent *, __FILE *)); -wint_t _EXFUN (_getwc_unlocked_r, (struct _reent *, __FILE *)); -wint_t _EXFUN (_getwchar_r, (struct _reent *ptr)); -wint_t _EXFUN (_getwchar_unlocked_r, (struct _reent *ptr)); -wint_t _EXFUN(_putwc_r, (struct _reent *, wchar_t, __FILE *)); -wint_t _EXFUN(_putwc_unlocked_r, (struct _reent *, wchar_t, __FILE *)); -wint_t _EXFUN(_putwchar_r, (struct _reent *, wchar_t)); -wint_t _EXFUN(_putwchar_unlocked_r, (struct _reent *, wchar_t)); -wint_t _EXFUN (_ungetwc_r, (struct _reent *, wint_t wc, __FILE *)); +wint_t _fgetwc_r (struct _reent *, __FILE *); +wint_t _fgetwc_unlocked_r (struct _reent *, __FILE *); +wchar_t *_fgetws_r (struct _reent *, wchar_t *, int, __FILE *); +wchar_t *_fgetws_unlocked_r (struct _reent *, wchar_t *, int, __FILE *); +wint_t _fputwc_r (struct _reent *, wchar_t, __FILE *); +wint_t _fputwc_unlocked_r (struct _reent *, wchar_t, __FILE *); +int _fputws_r (struct _reent *, const wchar_t *, __FILE *); +int _fputws_unlocked_r (struct _reent *, const wchar_t *, __FILE *); +int _fwide_r (struct _reent *, __FILE *, int); +wint_t _getwc_r (struct _reent *, __FILE *); +wint_t _getwc_unlocked_r (struct _reent *, __FILE *); +wint_t _getwchar_r (struct _reent *ptr); +wint_t _getwchar_unlocked_r (struct _reent *ptr); +wint_t _putwc_r (struct _reent *, wchar_t, __FILE *); +wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *); +wint_t _putwchar_r (struct _reent *, wchar_t); +wint_t _putwchar_unlocked_r (struct _reent *, wchar_t); +wint_t _ungetwc_r (struct _reent *, wint_t wc, __FILE *); #if __GNU_VISIBLE -wint_t _EXFUN(fgetwc_unlocked, (__FILE *)); -wchar_t *_EXFUN(fgetws_unlocked, (wchar_t *__restrict, int, __FILE *__restrict)); -wint_t _EXFUN(fputwc_unlocked, (wchar_t, __FILE *)); -int _EXFUN(fputws_unlocked, (const wchar_t *__restrict, __FILE *__restrict)); -wint_t _EXFUN(getwc_unlocked, (__FILE *)); -wint_t _EXFUN(getwchar_unlocked, (void)); -wint_t _EXFUN(putwc_unlocked, (wchar_t, __FILE *)); -wint_t _EXFUN(putwchar_unlocked, (wchar_t)); +wint_t fgetwc_unlocked (__FILE *); +wchar_t *fgetws_unlocked (wchar_t *__restrict, int, __FILE *__restrict); +wint_t fputwc_unlocked (wchar_t, __FILE *); +int fputws_unlocked (const wchar_t *__restrict, __FILE *__restrict); +wint_t getwc_unlocked (__FILE *); +wint_t getwchar_unlocked (void); +wint_t putwc_unlocked (wchar_t, __FILE *); +wint_t putwchar_unlocked (wchar_t); #endif #if __POSIX_VISIBLE >= 200809 -__FILE *_EXFUN (open_wmemstream, (wchar_t **, size_t *)); +__FILE *open_wmemstream (wchar_t **, size_t *); #endif -__FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *)); +__FILE *_open_wmemstream_r (struct _reent *, wchar_t **, size_t *); #ifndef __VALIST #ifdef __GNUC__ @@ -284,42 +280,42 @@ __FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *)); #endif #if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 -int _EXFUN(fwprintf, (__FILE *__restrict, const wchar_t *__restrict, ...)); -int _EXFUN(swprintf, (wchar_t *__restrict, size_t, - const wchar_t *__restrict, ...)); -int _EXFUN(vfwprintf, (__FILE *__restrict, const wchar_t *__restrict, - __VALIST)); -int _EXFUN(vswprintf, (wchar_t *__restrict, size_t, - const wchar_t *__restrict, __VALIST)); -int _EXFUN(vwprintf, (const wchar_t *__restrict, __VALIST)); -int _EXFUN(wprintf, (const wchar_t *__restrict, ...)); +int fwprintf (__FILE *__restrict, const wchar_t *__restrict, ...); +int swprintf (wchar_t *__restrict, size_t, + const wchar_t *__restrict, ...); +int vfwprintf (__FILE *__restrict, const wchar_t *__restrict, + __VALIST); +int vswprintf (wchar_t *__restrict, size_t, + const wchar_t *__restrict, __VALIST); +int vwprintf (const wchar_t *__restrict, __VALIST); +int wprintf (const wchar_t *__restrict, ...); #endif -int _EXFUN(_fwprintf_r, (struct _reent *, __FILE *, const wchar_t *, ...)); -int _EXFUN(_swprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, ...)); -int _EXFUN(_vfwprintf_r, (struct _reent *, __FILE *, const wchar_t *, __VALIST)); -int _EXFUN(_vswprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, __VALIST)); -int _EXFUN(_vwprintf_r, (struct _reent *, const wchar_t *, __VALIST)); -int _EXFUN(_wprintf_r, (struct _reent *, const wchar_t *, ...)); +int _fwprintf_r (struct _reent *, __FILE *, const wchar_t *, ...); +int _swprintf_r (struct _reent *, wchar_t *, size_t, const wchar_t *, ...); +int _vfwprintf_r (struct _reent *, __FILE *, const wchar_t *, __VALIST); +int _vswprintf_r (struct _reent *, wchar_t *, size_t, const wchar_t *, __VALIST); +int _vwprintf_r (struct _reent *, const wchar_t *, __VALIST); +int _wprintf_r (struct _reent *, const wchar_t *, ...); #if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 -int _EXFUN(fwscanf, (__FILE *__restrict, const wchar_t *__restrict, ...)); -int _EXFUN(swscanf, (const wchar_t *__restrict, - const wchar_t *__restrict, ...)); -int _EXFUN(vfwscanf, (__FILE *__restrict, const wchar_t *__restrict, - __VALIST)); -int _EXFUN(vswscanf, (const wchar_t *__restrict, const wchar_t *__restrict, - __VALIST)); -int _EXFUN(vwscanf, (const wchar_t *__restrict, __VALIST)); -int _EXFUN(wscanf, (const wchar_t *__restrict, ...)); +int fwscanf (__FILE *__restrict, const wchar_t *__restrict, ...); +int swscanf (const wchar_t *__restrict, + const wchar_t *__restrict, ...); +int vfwscanf (__FILE *__restrict, const wchar_t *__restrict, + __VALIST); +int vswscanf (const wchar_t *__restrict, const wchar_t *__restrict, + __VALIST); +int vwscanf (const wchar_t *__restrict, __VALIST); +int wscanf (const wchar_t *__restrict, ...); #endif -int _EXFUN(_fwscanf_r, (struct _reent *, __FILE *, const wchar_t *, ...)); -int _EXFUN(_swscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, ...)); -int _EXFUN(_vfwscanf_r, (struct _reent *, __FILE *, const wchar_t *, __VALIST)); -int _EXFUN(_vswscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, __VALIST)); -int _EXFUN(_vwscanf_r, (struct _reent *, const wchar_t *, __VALIST)); -int _EXFUN(_wscanf_r, (struct _reent *, const wchar_t *, ...)); +int _fwscanf_r (struct _reent *, __FILE *, const wchar_t *, ...); +int _swscanf_r (struct _reent *, const wchar_t *, const wchar_t *, ...); +int _vfwscanf_r (struct _reent *, __FILE *, const wchar_t *, __VALIST); +int _vswscanf_r (struct _reent *, const wchar_t *, const wchar_t *, __VALIST); +int _vwscanf_r (struct _reent *, const wchar_t *, __VALIST); +int _wscanf_r (struct _reent *, const wchar_t *, ...); #define getwc(fp) fgetwc(fp) #define putwc(wc,fp) fputwc((wc), (fp)) diff --git a/libc/xtensa-lx106-elf/include/wctype.h b/libc/xtensa-lx106-elf/include/wctype.h index 3d36d5a..9b71090 100644 --- a/libc/xtensa-lx106-elf/include/wctype.h +++ b/libc/xtensa-lx106-elf/include/wctype.h @@ -27,26 +27,26 @@ typedef int wctype_t; typedef int wctrans_t; #endif -int _EXFUN(iswalpha, (wint_t)); -int _EXFUN(iswalnum, (wint_t)); +int iswalpha (wint_t); +int iswalnum (wint_t); #if __ISO_C_VISIBLE >= 1999 -int _EXFUN(iswblank, (wint_t)); +int iswblank (wint_t); #endif -int _EXFUN(iswcntrl, (wint_t)); -int _EXFUN(iswctype, (wint_t, wctype_t)); -int _EXFUN(iswdigit, (wint_t)); -int _EXFUN(iswgraph, (wint_t)); -int _EXFUN(iswlower, (wint_t)); -int _EXFUN(iswprint, (wint_t)); -int _EXFUN(iswpunct, (wint_t)); -int _EXFUN(iswspace, (wint_t)); -int _EXFUN(iswupper, (wint_t)); -int _EXFUN(iswxdigit, (wint_t)); -wint_t _EXFUN(towctrans, (wint_t, wctrans_t)); -wint_t _EXFUN(towupper, (wint_t)); -wint_t _EXFUN(towlower, (wint_t)); -wctrans_t _EXFUN(wctrans, (const char *)); -wctype_t _EXFUN(wctype, (const char *)); +int iswcntrl (wint_t); +int iswctype (wint_t, wctype_t); +int iswdigit (wint_t); +int iswgraph (wint_t); +int iswlower (wint_t); +int iswprint (wint_t); +int iswpunct (wint_t); +int iswspace (wint_t); +int iswupper (wint_t); +int iswxdigit (wint_t); +wint_t towctrans (wint_t, wctrans_t); +wint_t towupper (wint_t); +wint_t towlower (wint_t); +wctrans_t wctrans (const char *); +wctype_t wctype (const char *); #if __POSIX_VISIBLE >= 200809 extern int iswalpha_l (wint_t, locale_t); diff --git a/libc/xtensa-lx106-elf/lib/libc.a b/libc/xtensa-lx106-elf/lib/libc.a index d875129..4dffe9f 100644 Binary files a/libc/xtensa-lx106-elf/lib/libc.a and b/libc/xtensa-lx106-elf/lib/libc.a differ diff --git a/libc/xtensa-lx106-elf/lib/libg.a b/libc/xtensa-lx106-elf/lib/libg.a index d875129..4dffe9f 100644 Binary files a/libc/xtensa-lx106-elf/lib/libg.a and b/libc/xtensa-lx106-elf/lib/libg.a differ diff --git a/libc/xtensa-lx106-elf/lib/libm.a b/libc/xtensa-lx106-elf/lib/libm.a index b4822cc..9978674 100644 Binary files a/libc/xtensa-lx106-elf/lib/libm.a and b/libc/xtensa-lx106-elf/lib/libm.a differ