Merge pull request #571 from ourairquality/newlib-300

Newlib: update to version 3.0.0
This commit is contained in:
Ruslan V. Uss 2018-02-19 10:16:58 +05:00 committed by GitHub
commit 49343e9c68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 1536 additions and 1651 deletions

View file

@ -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 * [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/). * [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). For details of how third party libraries are integrated, [see the wiki page](https://github.com/SuperHouse/esp-open-rtos/wiki/Third-Party-Libraries).

View file

@ -194,9 +194,9 @@ __attribute__((weak, alias("syscall_returns_enosys")))
off_t _lseek_r(struct _reent *r, int fd, off_t offset, int whence); off_t _lseek_r(struct _reent *r, int fd, off_t offset, int whence);
__attribute__((weak, alias("_gettimeofday_r"))) __attribute__((weak, alias("_gettimeofday_r")))
int _gettimeofday_r _PARAMS ((struct _reent *r, struct timeval *now, void *p)) { int _gettimeofday_r (struct _reent *ptr, struct timeval *ptimeval, void *ptimezone) {
now->tv_sec = 0; ptimeval->tv_sec = 0;
now->tv_usec = 0; ptimeval->tv_usec = 0;
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;
} }

View file

@ -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

View file

@ -1,11 +1,6 @@
/* Provide support for both ANSI and non-ANSI environments. */ /* Provide support for both ANSI and non-ANSI environments. */
/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be /* To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will
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
"comment out" the non-ANSI parts of the ANSI header files (non-ANSI header "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
files aren't affected). */ files aren't affected). */
@ -15,14 +10,6 @@
#include <newlib.h> #include <newlib.h>
#include <sys/config.h> #include <sys/config.h>
/* 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++. */ /* ISO C++. */
#ifdef __cplusplus #ifdef __cplusplus
@ -46,54 +33,9 @@
#define _NOTHROW #define _NOTHROW
#endif #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 #ifndef _LONG_DOUBLE
#define _LONG_DOUBLE long double #define _LONG_DOUBLE long double
#endif #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. */ /* Support gcc's __attribute__ facility. */

View file

@ -3,9 +3,9 @@
#ifndef _NEWLIB_VERSION_H__ #ifndef _NEWLIB_VERSION_H__
#define _NEWLIB_VERSION_H__ 1 #define _NEWLIB_VERSION_H__ 1
#define _NEWLIB_VERSION "2.5.0" #define _NEWLIB_VERSION "3.0.0"
#define __NEWLIB__ 2 #define __NEWLIB__ 3
#define __NEWLIB_MINOR__ 5 #define __NEWLIB_MINOR__ 0
#define __NEWLIB_PATCHLEVEL__ 0 #define __NEWLIB_PATCHLEVEL__ 0
#endif /* !_NEWLIB_VERSION_H__ */ #endif /* !_NEWLIB_VERSION_H__ */

View file

@ -15,7 +15,7 @@
#ifdef __GNUC__ #ifdef __GNUC__
#define alloca(size) __builtin_alloca(size) #define alloca(size) __builtin_alloca(size)
#else #else
void * _EXFUN(alloca,(size_t)); void * alloca (size_t);
#endif #endif
#endif #endif

View file

@ -36,10 +36,10 @@ extern "C" {
# endif /* !__ASSERT_FUNC */ # endif /* !__ASSERT_FUNC */
#endif /* !NDEBUG */ #endif /* !NDEBUG */
void _EXFUN(__assert, (const char *, int, const char *) void __assert (const char *, int, const char *)
_ATTRIBUTE ((__noreturn__))); _ATTRIBUTE ((__noreturn__));
void _EXFUN(__assert_func, (const char *, int, const char *, const char *) void __assert_func (const char *, int, const char *, const char *)
_ATTRIBUTE ((__noreturn__))); _ATTRIBUTE ((__noreturn__));
#if __STDC_VERSION__ >= 201112L && !defined __cplusplus #if __STDC_VERSION__ >= 201112L && !defined __cplusplus
# define static_assert _Static_assert # define static_assert _Static_assert

View file

@ -10,27 +10,27 @@
_BEGIN_STD_C _BEGIN_STD_C
int _EXFUN(isalnum, (int __c)); int isalnum (int __c);
int _EXFUN(isalpha, (int __c)); int isalpha (int __c);
int _EXFUN(iscntrl, (int __c)); int iscntrl (int __c);
int _EXFUN(isdigit, (int __c)); int isdigit (int __c);
int _EXFUN(isgraph, (int __c)); int isgraph (int __c);
int _EXFUN(islower, (int __c)); int islower (int __c);
int _EXFUN(isprint, (int __c)); int isprint (int __c);
int _EXFUN(ispunct, (int __c)); int ispunct (int __c);
int _EXFUN(isspace, (int __c)); int isspace (int __c);
int _EXFUN(isupper, (int __c)); int isupper (int __c);
int _EXFUN(isxdigit,(int __c)); int isxdigit (int __c);
int _EXFUN(tolower, (int __c)); int tolower (int __c);
int _EXFUN(toupper, (int __c)); int toupper (int __c);
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
int _EXFUN(isblank, (int __c)); int isblank (int __c);
#endif #endif
#if __MISC_VISIBLE || __XSI_VISIBLE #if __MISC_VISIBLE || __XSI_VISIBLE
int _EXFUN(isascii, (int __c)); int isascii (int __c);
int _EXFUN(toascii, (int __c)); int toascii (int __c);
#define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a') #define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a')
#define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A') #define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A')
#endif #endif
@ -162,7 +162,7 @@ const char *__locale_ctype_ptr_l (locale_t);
#endif /* !__cplusplus */ #endif /* !__cplusplus */
/* For C++ backward-compatibility only. */ /* For C++ backward-compatibility only. */
extern __IMPORT _CONST char _ctype_[]; extern __IMPORT const char _ctype_[];
_END_STD_C _END_STD_C

View file

@ -9,7 +9,7 @@
#define ENV_LOCK __env_lock(reent_ptr) #define ENV_LOCK __env_lock(reent_ptr)
#define ENV_UNLOCK __env_unlock(reent_ptr) #define ENV_UNLOCK __env_unlock(reent_ptr)
void _EXFUN(__env_lock,(struct _reent *reent)); void __env_lock (struct _reent *reent);
void _EXFUN(__env_unlock,(struct _reent *reent)); void __env_unlock (struct _reent *reent);
#endif /* _INCLUDE_ENVLOCK_H_ */ #endif /* _INCLUDE_ENVLOCK_H_ */

View file

@ -153,31 +153,25 @@ extern "C"
extern int optopt; extern int optopt;
/* function prototypes */ /* function prototypes */
int _EXFUN (getopt, int getopt (int __argc, char *const __argv[], const char *__optstring);
(int __argc, char *const __argv[], const char *__optstring));
int _EXFUN (getopt_long, int getopt_long (int __argc, char *const __argv[], const char *__shortopts,
(int __argc, char *const __argv[], const char *__shortopts, const struct option * __longopts, int *__longind);
const struct option * __longopts, int *__longind));
int _EXFUN (getopt_long_only, int getopt_long_only (int __argc, char *const __argv[], const char *__shortopts,
(int __argc, char *const __argv[], const char *__shortopts, const struct option * __longopts, int *__longind);
const struct option * __longopts, int *__longind));
#ifdef __need_getopt_newlib #ifdef __need_getopt_newlib
int _EXFUN (__getopt_r, int __getopt_r (int __argc, char *const __argv[], const char *__optstring,
(int __argc, char *const __argv[], const char *__optstring, struct getopt_data * __data);
struct getopt_data * __data));
int _EXFUN (__getopt_long_r, int __getopt_long_r (int __argc, char *const __argv[], const char *__shortopts,
(int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind, const struct option * __longopts, int *__longind,
struct getopt_data * __data)); struct getopt_data * __data);
int _EXFUN (__getopt_long_only_r, int __getopt_long_only_r (int __argc, char *const __argv[], const char *__shortopts,
(int __argc, char *const __argv[], const char *__shortopts,
const struct option * __longopts, int *__longind, const struct option * __longopts, int *__longind,
struct getopt_data * __data)); struct getopt_data * __data);
#endif /* __need_getopt_newlib */ #endif /* __need_getopt_newlib */
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -38,25 +38,25 @@ _BEGIN_STD_C
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
iconv_t iconv_t
_EXFUN(iconv_open, (_CONST char *, _CONST char *)); iconv_open (const char *, const char *);
size_t size_t
_EXFUN(iconv, (iconv_t, char **__restrict, size_t *__restrict, iconv (iconv_t, char **__restrict, size_t *__restrict,
char **__restrict, size_t *__restrict)); char **__restrict, size_t *__restrict);
int int
_EXFUN(iconv_close, (iconv_t)); iconv_close (iconv_t);
#endif #endif
iconv_t iconv_t
_EXFUN(_iconv_open_r, (struct _reent *, _CONST char *, _CONST char *)); _iconv_open_r (struct _reent *, const char *, const char *);
size_t size_t
_EXFUN(_iconv_r, (struct _reent *, iconv_t, _CONST char **, _iconv_r (struct _reent *, iconv_t, const char **,
size_t *, char **, size_t *)); size_t *, char **, size_t *);
int int
_EXFUN(_iconv_close_r, (struct _reent *, iconv_t)); _iconv_close_r (struct _reent *, iconv_t);
_END_STD_C _END_STD_C

View file

@ -215,8 +215,8 @@ typedef int fp_rnd;
#define FP_RP 2 /* Round up */ #define FP_RP 2 /* Round up */
#define FP_RZ 3 /* Round to zero (trunate) */ #define FP_RZ 3 /* Round to zero (trunate) */
fp_rnd _EXFUN(fpgetround,(void)); fp_rnd fpgetround (void);
fp_rnd _EXFUN(fpsetround, (fp_rnd)); fp_rnd fpsetround (fp_rnd);
/* EXCEPTIONS */ /* EXCEPTIONS */
@ -227,10 +227,10 @@ typedef int fp_except;
#define FP_X_UFL 0x02 /* Underflow exception */ #define FP_X_UFL 0x02 /* Underflow exception */
#define FP_X_IMP 0x01 /* imprecise exception */ #define FP_X_IMP 0x01 /* imprecise exception */
fp_except _EXFUN(fpgetmask,(void)); fp_except fpgetmask (void);
fp_except _EXFUN(fpsetmask,(fp_except)); fp_except fpsetmask (fp_except);
fp_except _EXFUN(fpgetsticky,(void)); fp_except fpgetsticky (void);
fp_except _EXFUN(fpsetsticky, (fp_except)); fp_except fpsetsticky (fp_except);
/* INTEGER ROUNDING */ /* INTEGER ROUNDING */
@ -238,8 +238,8 @@ typedef int fp_rdi;
#define FP_RDI_TOZ 0 /* Round to Zero */ #define FP_RDI_TOZ 0 /* Round to Zero */
#define FP_RDI_RD 1 /* Follow float mode */ #define FP_RDI_RD 1 /* Follow float mode */
fp_rdi _EXFUN(fpgetroundtoi,(void)); fp_rdi fpgetroundtoi (void);
fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi)); fp_rdi fpsetroundtoi (fp_rdi);
#define __IEEE_DBL_EXPBIAS 1023 #define __IEEE_DBL_EXPBIAS 1023
#define __IEEE_FLT_EXPBIAS 127 #define __IEEE_FLT_EXPBIAS 127

View file

@ -36,7 +36,10 @@
#include <xlocale.h> #include <xlocale.h>
#endif #endif
#ifndef _NL_ITEM_DECLARED
typedef int nl_item; typedef int nl_item;
#define _NL_ITEM_DECLARED
#endif
enum __nl_item enum __nl_item
{ {

View file

@ -26,8 +26,8 @@ extern "C" {
sure here. */ sure here. */
#undef basename #undef basename
#define basename __xpg_basename #define basename __xpg_basename
char *_EXFUN(basename, (char *)) __asm__(__ASMNAME("basename")); char *basename (char *) __asm__(__ASMNAME("basename"));
char *_EXFUN(dirname, (char *)); char *dirname (char *);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -68,8 +68,8 @@ struct lconv
}; };
struct _reent; struct _reent;
char *_EXFUN(_setlocale_r,(struct _reent *, int, const char *)); char *_setlocale_r (struct _reent *, int, const char *);
struct lconv *_EXFUN(_localeconv_r,(struct _reent *)); struct lconv *_localeconv_r (struct _reent *);
struct __locale_t *_newlocale_r (struct _reent *, int, const char *, struct __locale_t *_newlocale_r (struct _reent *, int, const char *,
struct __locale_t *); struct __locale_t *);
@ -79,8 +79,8 @@ struct __locale_t *_uselocale_r (struct _reent *, struct __locale_t *);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
char *_EXFUN(setlocale,(int, const char *)); char *setlocale (int, const char *);
struct lconv *_EXFUN(localeconv,(void)); struct lconv *localeconv (void);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
locale_t newlocale (int, const char *, locale_t); locale_t newlocale (int, const char *, locale_t);

View file

@ -46,7 +46,6 @@ double EXFUN(fast_loge,(double));
#define log2(x) fast_log2(x) #define log2(x) fast_log2(x)
#define loge(x) fast_loge(x) #define loge(x) fast_loge(x)
#ifdef _HAVE_STDC
/* These functions are in assembler, they really do take floats. This /* These functions are in assembler, they really do take floats. This
can only be used with a real ANSI compiler */ 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 log10f(x) fast_log10f(x)
#define log2f(x) fast_log2f(x) #define log2f(x) fast_log2f(x)
#define logef(x) fast_logef(x) #define logef(x) fast_logef(x)
#endif
/* Override the functions defined in math.h */ /* Override the functions defined in math.h */
#endif /* __sysvnecv70_target */ #endif /* __sysvnecv70_target */

View file

@ -78,7 +78,9 @@
# else # else
# define __IEEE_BIG_ENDIAN # define __IEEE_BIG_ENDIAN
# endif # endif
# define __OBSOLETE_MATH_DEFAULT 0 # if __ARM_FP & 0x8
# define __OBSOLETE_MATH_DEFAULT 0
# endif
#else #else
# define __IEEE_BIG_ENDIAN # define __IEEE_BIG_ENDIAN
# ifdef __ARMEL__ # ifdef __ARMEL__

View file

@ -386,7 +386,9 @@ _BEGIN_STD_C
#endif #endif
#ifdef __riscv #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 #ifdef __riscv_32e
#define _JBLEN ((4*sizeof(long))/sizeof(long)) #define _JBLEN ((4*sizeof(long))/sizeof(long))
#else #else

View file

@ -34,113 +34,113 @@ struct mallinfo {
/* The routines. */ /* The routines. */
extern _PTR malloc _PARAMS ((size_t)); extern void *malloc (size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _malloc_r #undef _malloc_r
#define _malloc_r(r, s) malloc (s) #define _malloc_r(r, s) malloc (s)
#else #else
extern _PTR _malloc_r _PARAMS ((struct _reent *, size_t)); extern void *_malloc_r (struct _reent *, size_t);
#endif #endif
extern _VOID free _PARAMS ((_PTR)); extern void free (void *);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _free_r #undef _free_r
#define _free_r(r, p) free (p) #define _free_r(r, p) free (p)
#else #else
extern _VOID _free_r _PARAMS ((struct _reent *, _PTR)); extern void _free_r (struct _reent *, void *);
#endif #endif
extern _PTR realloc _PARAMS ((_PTR, size_t)); extern void *realloc (void *, size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _realloc_r #undef _realloc_r
#define _realloc_r(r, p, s) realloc (p, s) #define _realloc_r(r, p, s) realloc (p, s)
#else #else
extern _PTR _realloc_r _PARAMS ((struct _reent *, _PTR, size_t)); extern void *_realloc_r (struct _reent *, void *, size_t);
#endif #endif
extern _PTR calloc _PARAMS ((size_t, size_t)); extern void *calloc (size_t, size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _calloc_r #undef _calloc_r
#define _calloc_r(r, s1, s2) calloc (s1, s2); #define _calloc_r(r, s1, s2) calloc (s1, s2);
#else #else
extern _PTR _calloc_r _PARAMS ((struct _reent *, size_t, size_t)); extern void *_calloc_r (struct _reent *, size_t, size_t);
#endif #endif
extern _PTR memalign _PARAMS ((size_t, size_t)); extern void *memalign (size_t, size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _memalign_r #undef _memalign_r
#define _memalign_r(r, s1, s2) memalign (s1, s2); #define _memalign_r(r, s1, s2) memalign (s1, s2);
#else #else
extern _PTR _memalign_r _PARAMS ((struct _reent *, size_t, size_t)); extern void *_memalign_r (struct _reent *, size_t, size_t);
#endif #endif
extern struct mallinfo mallinfo _PARAMS ((void)); extern struct mallinfo mallinfo (void);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _mallinfo_r #undef _mallinfo_r
#define _mallinfo_r(r) mallinfo () #define _mallinfo_r(r) mallinfo ()
#else #else
extern struct mallinfo _mallinfo_r _PARAMS ((struct _reent *)); extern struct mallinfo _mallinfo_r (struct _reent *);
#endif #endif
extern void malloc_stats _PARAMS ((void)); extern void malloc_stats (void);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _malloc_stats_r #undef _malloc_stats_r
#define _malloc_stats_r(r) malloc_stats () #define _malloc_stats_r(r) malloc_stats ()
#else #else
extern void _malloc_stats_r _PARAMS ((struct _reent *)); extern void _malloc_stats_r (struct _reent *);
#endif #endif
extern int mallopt _PARAMS ((int, int)); extern int mallopt (int, int);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _mallopt_r #undef _mallopt_r
#define _mallopt_r(i1, i2) mallopt (i1, i2) #define _mallopt_r(i1, i2) mallopt (i1, i2)
#else #else
extern int _mallopt_r _PARAMS ((struct _reent *, int, int)); extern int _mallopt_r (struct _reent *, int, int);
#endif #endif
extern size_t malloc_usable_size _PARAMS ((_PTR)); extern size_t malloc_usable_size (void *);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _malloc_usable_size_r #undef _malloc_usable_size_r
#define _malloc_usable_size_r(r, p) malloc_usable_size (p) #define _malloc_usable_size_r(r, p) malloc_usable_size (p)
#else #else
extern size_t _malloc_usable_size_r _PARAMS ((struct _reent *, _PTR)); extern size_t _malloc_usable_size_r (struct _reent *, void *);
#endif #endif
/* These aren't too useful on an embedded system, but we define them /* These aren't too useful on an embedded system, but we define them
anyhow. */ anyhow. */
extern _PTR valloc _PARAMS ((size_t)); extern void *valloc (size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _valloc_r #undef _valloc_r
#define _valloc_r(r, s) valloc (s) #define _valloc_r(r, s) valloc (s)
#else #else
extern _PTR _valloc_r _PARAMS ((struct _reent *, size_t)); extern void *_valloc_r (struct _reent *, size_t);
#endif #endif
extern _PTR pvalloc _PARAMS ((size_t)); extern void *pvalloc (size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _pvalloc_r #undef _pvalloc_r
#define _pvalloc_r(r, s) pvalloc (s) #define _pvalloc_r(r, s) pvalloc (s)
#else #else
extern _PTR _pvalloc_r _PARAMS ((struct _reent *, size_t)); extern void *_pvalloc_r (struct _reent *, size_t);
#endif #endif
extern int malloc_trim _PARAMS ((size_t)); extern int malloc_trim (size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _malloc_trim_r #undef _malloc_trim_r
#define _malloc_trim_r(r, s) malloc_trim (s) #define _malloc_trim_r(r, s) malloc_trim (s)
#else #else
extern int _malloc_trim_r _PARAMS ((struct _reent *, size_t)); extern int _malloc_trim_r (struct _reent *, size_t);
#endif #endif
/* A compatibility routine for an earlier version of the allocator. */ /* A compatibility routine for an earlier version of the allocator. */
extern _VOID mstats _PARAMS ((char *)); extern void mstats (char *);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _mstats_r #undef _mstats_r
#define _mstats_r(r, p) mstats (p) #define _mstats_r(r, p) mstats (p)
#else #else
extern _VOID _mstats_r _PARAMS ((struct _reent *, char *)); extern void _mstats_r (struct _reent *, char *);
#endif #endif
/* SVID2/XPG mallopt options */ /* SVID2/XPG mallopt options */
@ -159,7 +159,7 @@ extern _VOID _mstats_r _PARAMS ((struct _reent *, char *));
#ifndef __CYGWIN__ #ifndef __CYGWIN__
/* Some systems provide this, so do too for compatibility. */ /* Some systems provide this, so do too for compatibility. */
extern void cfree _PARAMS ((_PTR)); extern void cfree (void *);
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -83,54 +83,54 @@ _BEGIN_STD_C
/* Reentrant ANSI C functions. */ /* Reentrant ANSI C functions. */
#ifndef __math_68881 #ifndef __math_68881
extern double atan _PARAMS((double)); extern double atan (double);
extern double cos _PARAMS((double)); extern double cos (double);
extern double sin _PARAMS((double)); extern double sin (double);
extern double tan _PARAMS((double)); extern double tan (double);
extern double tanh _PARAMS((double)); extern double tanh (double);
extern double frexp _PARAMS((double, int *)); extern double frexp (double, int *);
extern double modf _PARAMS((double, double *)); extern double modf (double, double *);
extern double ceil _PARAMS((double)); extern double ceil (double);
extern double fabs _PARAMS((double)); extern double fabs (double);
extern double floor _PARAMS((double)); extern double floor (double);
#endif /* ! defined (__math_68881) */ #endif /* ! defined (__math_68881) */
/* Non reentrant ANSI C functions. */ /* Non reentrant ANSI C functions. */
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#ifndef __math_68881 #ifndef __math_68881
extern double acos _PARAMS((double)); extern double acos (double);
extern double asin _PARAMS((double)); extern double asin (double);
extern double atan2 _PARAMS((double, double)); extern double atan2 (double, double);
extern double cosh _PARAMS((double)); extern double cosh (double);
extern double sinh _PARAMS((double)); extern double sinh (double);
extern double exp _PARAMS((double)); extern double exp (double);
extern double ldexp _PARAMS((double, int)); extern double ldexp (double, int);
extern double log _PARAMS((double)); extern double log (double);
extern double log10 _PARAMS((double)); extern double log10 (double);
extern double pow _PARAMS((double, double)); extern double pow (double, double);
extern double sqrt _PARAMS((double)); extern double sqrt (double);
extern double fmod _PARAMS((double, double)); extern double fmod (double, double);
#endif /* ! defined (__math_68881) */ #endif /* ! defined (__math_68881) */
#endif /* ! defined (_REENT_ONLY) */ #endif /* ! defined (_REENT_ONLY) */
#if __MISC_VISIBLE #if __MISC_VISIBLE
extern int finite _PARAMS((double)); extern int finite (double);
extern int finitef _PARAMS((float)); extern int finitef (float);
extern int finitel _PARAMS((long double)); extern int finitel (long double);
extern int isinff _PARAMS((float)); extern int isinff (float);
extern int isnanf _PARAMS((float)); extern int isnanf (float);
#ifdef __CYGWIN__ /* not implemented in newlib yet */ #ifdef __CYGWIN__ /* not implemented in newlib yet */
extern int isinfl _PARAMS((long double)); extern int isinfl (long double);
extern int isnanl _PARAMS((long double)); extern int isnanl (long double);
#endif #endif
#if !defined(__cplusplus) || __cplusplus < 201103L #if !defined(__cplusplus) || __cplusplus < 201103L
extern int isinf _PARAMS((double)); extern int isinf (double);
#endif #endif
#endif /* __MISC_VISIBLE */ #endif /* __MISC_VISIBLE */
#if (__MISC_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)) \ #if (__MISC_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)) \
&& (!defined(__cplusplus) || __cplusplus < 201103L) && (!defined(__cplusplus) || __cplusplus < 201103L)
extern int isnan _PARAMS((double)); extern int isnan (double);
#endif #endif
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
@ -287,128 +287,128 @@ extern int __signbitd (double x);
/* Non ANSI double precision functions. */ /* Non ANSI double precision functions. */
extern double infinity _PARAMS((void)); extern double infinity (void);
extern double nan _PARAMS((const char *)); extern double nan (const char *);
extern double copysign _PARAMS((double, double)); extern double copysign (double, double);
extern double logb _PARAMS((double)); extern double logb (double);
extern int ilogb _PARAMS((double)); extern int ilogb (double);
extern double asinh _PARAMS((double)); extern double asinh (double);
extern double cbrt _PARAMS((double)); extern double cbrt (double);
extern double nextafter _PARAMS((double, double)); extern double nextafter (double, double);
extern double rint _PARAMS((double)); extern double rint (double);
extern double scalbn _PARAMS((double, int)); extern double scalbn (double, int);
extern double exp2 _PARAMS((double)); extern double exp2 (double);
extern double scalbln _PARAMS((double, long int)); extern double scalbln (double, long int);
extern double tgamma _PARAMS((double)); extern double tgamma (double);
extern double nearbyint _PARAMS((double)); extern double nearbyint (double);
extern long int lrint _PARAMS((double)); extern long int lrint (double);
extern long long int llrint _PARAMS((double)); extern long long int llrint (double);
extern double round _PARAMS((double)); extern double round (double);
extern long int lround _PARAMS((double)); extern long int lround (double);
extern long long int llround _PARAMS((double)); extern long long int llround (double);
extern double trunc _PARAMS((double)); extern double trunc (double);
extern double remquo _PARAMS((double, double, int *)); extern double remquo (double, double, int *);
extern double fdim _PARAMS((double, double)); extern double fdim (double, double);
extern double fmax _PARAMS((double, double)); extern double fmax (double, double);
extern double fmin _PARAMS((double, double)); extern double fmin (double, double);
extern double fma _PARAMS((double, double, double)); extern double fma (double, double, double);
#ifndef __math_68881 #ifndef __math_68881
extern double log1p _PARAMS((double)); extern double log1p (double);
extern double expm1 _PARAMS((double)); extern double expm1 (double);
#endif /* ! defined (__math_68881) */ #endif /* ! defined (__math_68881) */
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
extern double acosh _PARAMS((double)); extern double acosh (double);
extern double atanh _PARAMS((double)); extern double atanh (double);
extern double remainder _PARAMS((double, double)); extern double remainder (double, double);
extern double gamma _PARAMS((double)); extern double gamma (double);
extern double lgamma _PARAMS((double)); extern double lgamma (double);
extern double erf _PARAMS((double)); extern double erf (double);
extern double erfc _PARAMS((double)); extern double erfc (double);
extern double log2 _PARAMS((double)); extern double log2 (double);
#if !defined(__cplusplus) #if !defined(__cplusplus)
#define log2(x) (log (x) / _M_LN2) #define log2(x) (log (x) / _M_LN2)
#endif #endif
#ifndef __math_68881 #ifndef __math_68881
extern double hypot _PARAMS((double, double)); extern double hypot (double, double);
#endif #endif
#endif /* ! defined (_REENT_ONLY) */ #endif /* ! defined (_REENT_ONLY) */
/* Single precision versions of ANSI functions. */ /* Single precision versions of ANSI functions. */
extern float atanf _PARAMS((float)); extern float atanf (float);
extern float cosf _PARAMS((float)); extern float cosf (float);
extern float sinf _PARAMS((float)); extern float sinf (float);
extern float tanf _PARAMS((float)); extern float tanf (float);
extern float tanhf _PARAMS((float)); extern float tanhf (float);
extern float frexpf _PARAMS((float, int *)); extern float frexpf (float, int *);
extern float modff _PARAMS((float, float *)); extern float modff (float, float *);
extern float ceilf _PARAMS((float)); extern float ceilf (float);
extern float fabsf _PARAMS((float)); extern float fabsf (float);
extern float floorf _PARAMS((float)); extern float floorf (float);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
extern float acosf _PARAMS((float)); extern float acosf (float);
extern float asinf _PARAMS((float)); extern float asinf (float);
extern float atan2f _PARAMS((float, float)); extern float atan2f (float, float);
extern float coshf _PARAMS((float)); extern float coshf (float);
extern float sinhf _PARAMS((float)); extern float sinhf (float);
extern float expf _PARAMS((float)); extern float expf (float);
extern float ldexpf _PARAMS((float, int)); extern float ldexpf (float, int);
extern float logf _PARAMS((float)); extern float logf (float);
extern float log10f _PARAMS((float)); extern float log10f (float);
extern float powf _PARAMS((float, float)); extern float powf (float, float);
extern float sqrtf _PARAMS((float)); extern float sqrtf (float);
extern float fmodf _PARAMS((float, float)); extern float fmodf (float, float);
#endif /* ! defined (_REENT_ONLY) */ #endif /* ! defined (_REENT_ONLY) */
/* Other single precision functions. */ /* Other single precision functions. */
extern float exp2f _PARAMS((float)); extern float exp2f (float);
extern float scalblnf _PARAMS((float, long int)); extern float scalblnf (float, long int);
extern float tgammaf _PARAMS((float)); extern float tgammaf (float);
extern float nearbyintf _PARAMS((float)); extern float nearbyintf (float);
extern long int lrintf _PARAMS((float)); extern long int lrintf (float);
extern long long int llrintf _PARAMS((float)); extern long long int llrintf (float);
extern float roundf _PARAMS((float)); extern float roundf (float);
extern long int lroundf _PARAMS((float)); extern long int lroundf (float);
extern long long int llroundf _PARAMS((float)); extern long long int llroundf (float);
extern float truncf _PARAMS((float)); extern float truncf (float);
extern float remquof _PARAMS((float, float, int *)); extern float remquof (float, float, int *);
extern float fdimf _PARAMS((float, float)); extern float fdimf (float, float);
extern float fmaxf _PARAMS((float, float)); extern float fmaxf (float, float);
extern float fminf _PARAMS((float, float)); extern float fminf (float, float);
extern float fmaf _PARAMS((float, float, float)); extern float fmaf (float, float, float);
extern float infinityf _PARAMS((void)); extern float infinityf (void);
extern float nanf _PARAMS((const char *)); extern float nanf (const char *);
extern float copysignf _PARAMS((float, float)); extern float copysignf (float, float);
extern float logbf _PARAMS((float)); extern float logbf (float);
extern int ilogbf _PARAMS((float)); extern int ilogbf (float);
extern float asinhf _PARAMS((float)); extern float asinhf (float);
extern float cbrtf _PARAMS((float)); extern float cbrtf (float);
extern float nextafterf _PARAMS((float, float)); extern float nextafterf (float, float);
extern float rintf _PARAMS((float)); extern float rintf (float);
extern float scalbnf _PARAMS((float, int)); extern float scalbnf (float, int);
extern float log1pf _PARAMS((float)); extern float log1pf (float);
extern float expm1f _PARAMS((float)); extern float expm1f (float);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
extern float acoshf _PARAMS((float)); extern float acoshf (float);
extern float atanhf _PARAMS((float)); extern float atanhf (float);
extern float remainderf _PARAMS((float, float)); extern float remainderf (float, float);
extern float gammaf _PARAMS((float)); extern float gammaf (float);
extern float lgammaf _PARAMS((float)); extern float lgammaf (float);
extern float erff _PARAMS((float)); extern float erff (float);
extern float erfcf _PARAMS((float)); extern float erfcf (float);
extern float log2f _PARAMS((float)); extern float log2f (float);
extern float hypotf _PARAMS((float, float)); extern float hypotf (float, float);
#endif /* ! defined (_REENT_ONLY) */ #endif /* ! defined (_REENT_ONLY) */
/* Newlib doesn't fully support long double math functions so far. /* 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__) #if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__)
/* Reentrant ANSI C functions. */ /* Reentrant ANSI C functions. */
#ifndef __math_68881 #ifndef __math_68881
extern long double atanl _PARAMS((long double)); extern long double atanl (long double);
extern long double cosl _PARAMS((long double)); extern long double cosl (long double);
extern long double sinl _PARAMS((long double)); extern long double sinl (long double);
extern long double tanl _PARAMS((long double)); extern long double tanl (long double);
extern long double tanhl _PARAMS((long double)); extern long double tanhl (long double);
extern long double frexpl _PARAMS((long double, int *)); extern long double frexpl (long double, int *);
extern long double modfl _PARAMS((long double, long double *)); extern long double modfl (long double, long double *);
extern long double ceill _PARAMS((long double)); extern long double ceill (long double);
extern long double fabsl _PARAMS((long double)); extern long double fabsl (long double);
extern long double floorl _PARAMS((long double)); extern long double floorl (long double);
extern long double log1pl _PARAMS((long double)); extern long double log1pl (long double);
extern long double expm1l _PARAMS((long double)); extern long double expm1l (long double);
#endif /* ! defined (__math_68881) */ #endif /* ! defined (__math_68881) */
/* Non reentrant ANSI C functions. */ /* Non reentrant ANSI C functions. */
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#ifndef __math_68881 #ifndef __math_68881
extern long double acosl _PARAMS((long double)); extern long double acosl (long double);
extern long double asinl _PARAMS((long double)); extern long double asinl (long double);
extern long double atan2l _PARAMS((long double, long double)); extern long double atan2l (long double, long double);
extern long double coshl _PARAMS((long double)); extern long double coshl (long double);
extern long double sinhl _PARAMS((long double)); extern long double sinhl (long double);
extern long double expl _PARAMS((long double)); extern long double expl (long double);
extern long double ldexpl _PARAMS((long double, int)); extern long double ldexpl (long double, int);
extern long double logl _PARAMS((long double)); extern long double logl (long double);
extern long double log10l _PARAMS((long double)); extern long double log10l (long double);
extern long double powl _PARAMS((long double, long double)); extern long double powl (long double, long double);
extern long double sqrtl _PARAMS((long double)); extern long double sqrtl (long double);
extern long double fmodl _PARAMS((long double, long double)); extern long double fmodl (long double, long double);
extern long double hypotl _PARAMS((long double, long double)); extern long double hypotl (long double, long double);
#endif /* ! defined (__math_68881) */ #endif /* ! defined (__math_68881) */
#endif /* ! defined (_REENT_ONLY) */ #endif /* ! defined (_REENT_ONLY) */
extern long double copysignl _PARAMS((long double, long double)); extern long double copysignl (long double, long double);
extern long double nanl _PARAMS((const char *)); extern long double nanl (const char *);
extern int ilogbl _PARAMS((long double)); extern int ilogbl (long double);
extern long double asinhl _PARAMS((long double)); extern long double asinhl (long double);
extern long double cbrtl _PARAMS((long double)); extern long double cbrtl (long double);
extern long double nextafterl _PARAMS((long double, long double)); extern long double nextafterl (long double, long double);
extern float nexttowardf _PARAMS((float, long double)); extern float nexttowardf (float, long double);
extern double nexttoward _PARAMS((double, long double)); extern double nexttoward (double, long double);
extern long double nexttowardl _PARAMS((long double, long double)); extern long double nexttowardl (long double, long double);
extern long double logbl _PARAMS((long double)); extern long double logbl (long double);
extern long double log2l _PARAMS((long double)); extern long double log2l (long double);
extern long double rintl _PARAMS((long double)); extern long double rintl (long double);
extern long double scalbnl _PARAMS((long double, int)); extern long double scalbnl (long double, int);
extern long double exp2l _PARAMS((long double)); extern long double exp2l (long double);
extern long double scalblnl _PARAMS((long double, long)); extern long double scalblnl (long double, long);
extern long double tgammal _PARAMS((long double)); extern long double tgammal (long double);
extern long double nearbyintl _PARAMS((long double)); extern long double nearbyintl (long double);
extern long int lrintl _PARAMS((long double)); extern long int lrintl (long double);
extern long long int llrintl _PARAMS((long double)); extern long long int llrintl (long double);
extern long double roundl _PARAMS((long double)); extern long double roundl (long double);
extern long lroundl _PARAMS((long double)); extern long lroundl (long double);
extern long long int llroundl _PARAMS((long double)); extern long long int llroundl (long double);
extern long double truncl _PARAMS((long double)); extern long double truncl (long double);
extern long double remquol _PARAMS((long double, long double, int *)); extern long double remquol (long double, long double, int *);
extern long double fdiml _PARAMS((long double, long double)); extern long double fdiml (long double, long double);
extern long double fmaxl _PARAMS((long double, long double)); extern long double fmaxl (long double, long double);
extern long double fminl _PARAMS((long double, long double)); extern long double fminl (long double, long double);
extern long double fmal _PARAMS((long double, long double, long double)); extern long double fmal (long double, long double, long double);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
extern long double acoshl _PARAMS((long double)); extern long double acoshl (long double);
extern long double atanhl _PARAMS((long double)); extern long double atanhl (long double);
extern long double remainderl _PARAMS((long double, long double)); extern long double remainderl (long double, long double);
extern long double lgammal _PARAMS((long double)); extern long double lgammal (long double);
extern long double erfl _PARAMS((long double)); extern long double erfl (long double);
extern long double erfcl _PARAMS((long double)); extern long double erfcl (long double);
#endif /* ! defined (_REENT_ONLY) */ #endif /* ! defined (_REENT_ONLY) */
#else /* !_LDBL_EQ_DBL && !__CYGWIN__ */ #else /* !_LDBL_EQ_DBL && !__CYGWIN__ */
extern long double hypotl _PARAMS((long double, long double)); extern long double hypotl (long double, long double);
extern long double sqrtl _PARAMS((long double)); extern long double sqrtl (long double);
#ifdef __i386__ #ifdef __i386__
/* Other long double precision functions. */ /* Other long double precision functions. */
extern _LONG_DOUBLE rintl _PARAMS((_LONG_DOUBLE)); extern _LONG_DOUBLE rintl (_LONG_DOUBLE);
extern long int lrintl _PARAMS((_LONG_DOUBLE)); extern long int lrintl (_LONG_DOUBLE);
extern long long int llrintl _PARAMS((_LONG_DOUBLE)); extern long long int llrintl (_LONG_DOUBLE);
#endif /* __i386__ */ #endif /* __i386__ */
#endif /* !_LDBL_EQ_DBL && !__CYGWIN__ */ #endif /* !_LDBL_EQ_DBL && !__CYGWIN__ */
#endif /* __ISO_C_VISIBLE >= 1999 */ #endif /* __ISO_C_VISIBLE >= 1999 */
#if __MISC_VISIBLE #if __MISC_VISIBLE
extern double drem _PARAMS((double, double)); extern double drem (double, double);
extern float dremf _PARAMS((float, float)); extern float dremf (float, float);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
extern float dreml _PARAMS((long double, long double)); extern float dreml (long double, long double);
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
extern double gamma_r _PARAMS((double, int *)); extern double gamma_r (double, int *);
extern double lgamma_r _PARAMS((double, int *)); extern double lgamma_r (double, int *);
extern float gammaf_r _PARAMS((float, int *)); extern float gammaf_r (float, int *);
extern float lgammaf_r _PARAMS((float, int *)); extern float lgammaf_r (float, int *);
#endif #endif
#if __MISC_VISIBLE || __XSI_VISIBLE #if __MISC_VISIBLE || __XSI_VISIBLE
extern double y0 _PARAMS((double)); extern double y0 (double);
extern double y1 _PARAMS((double)); extern double y1 (double);
extern double yn _PARAMS((int, double)); extern double yn (int, double);
extern double j0 _PARAMS((double)); extern double j0 (double);
extern double j1 _PARAMS((double)); extern double j1 (double);
extern double jn _PARAMS((int, double)); extern double jn (int, double);
#endif #endif
#if __MISC_VISIBLE || __XSI_VISIBLE >= 600 #if __MISC_VISIBLE || __XSI_VISIBLE >= 600
extern float y0f _PARAMS((float)); extern float y0f (float);
extern float y1f _PARAMS((float)); extern float y1f (float);
extern float ynf _PARAMS((int, float)); extern float ynf (int, float);
extern float j0f _PARAMS((float)); extern float j0f (float);
extern float j1f _PARAMS((float)); extern float j1f (float);
extern float jnf _PARAMS((int, float)); extern float jnf (int, float);
#endif #endif
/* GNU extensions */ /* GNU extensions */
#if __GNU_VISIBLE #if __GNU_VISIBLE
extern void sincos _PARAMS((double, double *, double *)); extern void sincos (double, double *, double *);
extern void sincosf _PARAMS((float, float *, float *)); extern void sincosf (float, float *, float *);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
extern void sincosl _PARAMS((long double, long double *, long double *)); extern void sincosl (long double, long double *, long double *);
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
# ifndef exp10 # ifndef exp10
extern double exp10 _PARAMS((double)); extern double exp10 (double);
# endif # endif
# ifndef pow10 # ifndef pow10
extern double pow10 _PARAMS((double)); extern double pow10 (double);
# endif # endif
# ifndef exp10f # ifndef exp10f
extern float exp10f _PARAMS((float)); extern float exp10f (float);
# endif # endif
# ifndef pow10f # ifndef pow10f
extern float pow10f _PARAMS((float)); extern float pow10f (float);
# endif # endif
#ifdef __CYGWIN__ #ifdef __CYGWIN__
# ifndef exp10l # ifndef exp10l
extern float exp10l _PARAMS((float)); extern float exp10l (float);
# endif # endif
# ifndef pow10l # ifndef pow10l
extern float pow10l _PARAMS((float)); extern float pow10l (float);
# endif # endif
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
#endif /* __GNU_VISIBLE */ #endif /* __GNU_VISIBLE */
@ -562,7 +562,7 @@ extern float pow10l _PARAMS((float));
/* The gamma functions use a global variable, signgam. */ /* The gamma functions use a global variable, signgam. */
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#define signgam (*__signgam()) #define signgam (*__signgam())
extern int *__signgam _PARAMS((void)); extern int *__signgam (void);
#endif /* ! defined (_REENT_ONLY) */ #endif /* ! defined (_REENT_ONLY) */
#define __signgam_r(ptr) _REENT_SIGNGAM(ptr) #define __signgam_r(ptr) _REENT_SIGNGAM(ptr)
@ -587,9 +587,9 @@ struct exception
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern int matherr _PARAMS((struct __exception *e)); extern int matherr (struct __exception *e);
#else #else
extern int matherr _PARAMS((struct exception *e)); extern int matherr (struct exception *e);
#endif #endif
/* Values for the type field of struct exception. */ /* Values for the type field of struct exception. */

View file

@ -39,34 +39,32 @@ struct _pthread_cleanup_context {
}; };
/* Register Fork Handlers */ /* Register Fork Handlers */
int _EXFUN(pthread_atfork,(void (*prepare)(void), void (*parent)(void), int pthread_atfork (void (*prepare)(void), void (*parent)(void),
void (*child)(void))); void (*child)(void));
/* Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81 */ /* Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81 */
int _EXFUN(pthread_mutexattr_init, (pthread_mutexattr_t *__attr)); int pthread_mutexattr_init (pthread_mutexattr_t *__attr);
int _EXFUN(pthread_mutexattr_destroy, (pthread_mutexattr_t *__attr)); int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
int _EXFUN(pthread_mutexattr_getpshared, int pthread_mutexattr_getpshared (const pthread_mutexattr_t *__attr,
(_CONST pthread_mutexattr_t *__attr, int *__pshared)); int *__pshared);
int _EXFUN(pthread_mutexattr_setpshared, int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
(pthread_mutexattr_t *__attr, int __pshared)); int __pshared);
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/* Single UNIX Specification 2 Mutex Attributes types */ /* Single UNIX Specification 2 Mutex Attributes types */
int _EXFUN(pthread_mutexattr_gettype, int pthread_mutexattr_gettype (const pthread_mutexattr_t *__attr, int *__kind);
(_CONST pthread_mutexattr_t *__attr, int *__kind)); int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind);
int _EXFUN(pthread_mutexattr_settype,
(pthread_mutexattr_t *__attr, int __kind));
#endif #endif
/* Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87 */ /* Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87 */
int _EXFUN(pthread_mutex_init, int pthread_mutex_init (pthread_mutex_t *__mutex,
(pthread_mutex_t *__mutex, _CONST pthread_mutexattr_t *__attr)); const pthread_mutexattr_t *__attr);
int _EXFUN(pthread_mutex_destroy, (pthread_mutex_t *__mutex)); int pthread_mutex_destroy (pthread_mutex_t *__mutex);
/* This is used to statically initialize a pthread_mutex_t. Example: /* 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 /* Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */ NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29 */
int _EXFUN(pthread_mutex_lock, (pthread_mutex_t *__mutex)); int pthread_mutex_lock (pthread_mutex_t *__mutex);
int _EXFUN(pthread_mutex_trylock, (pthread_mutex_t *__mutex)); int pthread_mutex_trylock (pthread_mutex_t *__mutex);
int _EXFUN(pthread_mutex_unlock, (pthread_mutex_t *__mutex)); int pthread_mutex_unlock (pthread_mutex_t *__mutex);
#if defined(_POSIX_TIMEOUTS) #if defined(_POSIX_TIMEOUTS)
int _EXFUN(pthread_mutex_timedlock, int pthread_mutex_timedlock (pthread_mutex_t *__mutex,
(pthread_mutex_t *__mutex, _CONST struct timespec *__timeout)); const struct timespec *__timeout);
#endif /* _POSIX_TIMEOUTS */ #endif /* _POSIX_TIMEOUTS */
/* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */ /* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */
int _EXFUN(pthread_condattr_init, (pthread_condattr_t *__attr)); int pthread_condattr_init (pthread_condattr_t *__attr);
int _EXFUN(pthread_condattr_destroy, (pthread_condattr_t *__attr)); int pthread_condattr_destroy (pthread_condattr_t *__attr);
int _EXFUN(pthread_condattr_getclock, int pthread_condattr_getclock (const pthread_condattr_t *__restrict __attr,
(const pthread_condattr_t *__restrict __attr, clockid_t *__restrict __clock_id);
clockid_t *__restrict __clock_id)); int pthread_condattr_setclock (pthread_condattr_t *__attr,
int _EXFUN(pthread_condattr_setclock, clockid_t __clock_id);
(pthread_condattr_t *__attr, clockid_t __clock_id));
int _EXFUN(pthread_condattr_getpshared, int pthread_condattr_getpshared (const pthread_condattr_t *__attr,
(_CONST pthread_condattr_t *__attr, int *__pshared)); int *__pshared);
int _EXFUN(pthread_condattr_setpshared, int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared);
(pthread_condattr_t *__attr, int __pshared));
/* Initializing and Destroying a Condition Variable, P1003.1c/Draft 10, p. 87 */ /* Initializing and Destroying a Condition Variable, P1003.1c/Draft 10, p. 87 */
int _EXFUN(pthread_cond_init, int pthread_cond_init (pthread_cond_t *__cond,
(pthread_cond_t *__cond, _CONST pthread_condattr_t *__attr)); const pthread_condattr_t *__attr);
int _EXFUN(pthread_cond_destroy, (pthread_cond_t *__mutex)); int pthread_cond_destroy (pthread_cond_t *__mutex);
/* This is used to statically initialize a pthread_cond_t. Example: /* 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 */ /* Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 */
int _EXFUN(pthread_cond_signal, (pthread_cond_t *__cond)); int pthread_cond_signal (pthread_cond_t *__cond);
int _EXFUN(pthread_cond_broadcast, (pthread_cond_t *__cond)); int pthread_cond_broadcast (pthread_cond_t *__cond);
/* Waiting on a Condition, P1003.1c/Draft 10, p. 105 */ /* Waiting on a Condition, P1003.1c/Draft 10, p. 105 */
int _EXFUN(pthread_cond_wait, int pthread_cond_wait (pthread_cond_t *__cond, pthread_mutex_t *__mutex);
(pthread_cond_t *__cond, pthread_mutex_t *__mutex));
int _EXFUN(pthread_cond_timedwait, int pthread_cond_timedwait (pthread_cond_t *__cond,
(pthread_cond_t *__cond, pthread_mutex_t *__mutex, pthread_mutex_t *__mutex,
_CONST struct timespec *__abstime)); const struct timespec *__abstime);
#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
/* Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120 */ /* Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120 */
int _EXFUN(pthread_attr_setscope, int pthread_attr_setscope (pthread_attr_t *__attr, int __contentionscope);
(pthread_attr_t *__attr, int __contentionscope)); int pthread_attr_getscope (const pthread_attr_t *__attr,
int _EXFUN(pthread_attr_getscope, int *__contentionscope);
(_CONST pthread_attr_t *__attr, int *__contentionscope)); int pthread_attr_setinheritsched (pthread_attr_t *__attr,
int _EXFUN(pthread_attr_setinheritsched, int __inheritsched);
(pthread_attr_t *__attr, int __inheritsched)); int pthread_attr_getinheritsched (const pthread_attr_t *__attr,
int _EXFUN(pthread_attr_getinheritsched, int *__inheritsched);
(_CONST pthread_attr_t *__attr, int *__inheritsched)); int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy);
int _EXFUN(pthread_attr_setschedpolicy, int pthread_attr_getschedpolicy (const pthread_attr_t *__attr,
(pthread_attr_t *__attr, int __policy)); int *__policy);
int _EXFUN(pthread_attr_getschedpolicy,
(_CONST pthread_attr_t *__attr, int *__policy));
#endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */ #endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */
int _EXFUN(pthread_attr_setschedparam, int pthread_attr_setschedparam (pthread_attr_t *__attr,
(pthread_attr_t *__attr, _CONST struct sched_param *__param)); const struct sched_param *__param);
int _EXFUN(pthread_attr_getschedparam, int pthread_attr_getschedparam (const pthread_attr_t *__attr,
(_CONST pthread_attr_t *__attr, struct sched_param *__param)); struct sched_param *__param);
#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
/* Dynamic Thread Scheduling Parameters Access, P1003.1c/Draft 10, p. 124 */ /* Dynamic Thread Scheduling Parameters Access, P1003.1c/Draft 10, p. 124 */
int _EXFUN(pthread_getschedparam, int pthread_getschedparam (pthread_t __pthread, int *__policy,
(pthread_t __pthread, int *__policy, struct sched_param *__param)); struct sched_param *__param);
int _EXFUN(pthread_setschedparam, int pthread_setschedparam (pthread_t __pthread, int __policy,
(pthread_t __pthread, int __policy, struct sched_param *__param)); struct sched_param *__param);
/* Set Scheduling Priority of a Thread */ /* 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) */ #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 */ /* Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */
int _EXFUN(pthread_mutexattr_setprotocol, int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
(pthread_mutexattr_t *__attr, int __protocol)); int __protocol);
int _EXFUN(pthread_mutexattr_getprotocol, int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *__attr,
(_CONST pthread_mutexattr_t *__attr, int *__protocol)); int *__protocol);
int _EXFUN(pthread_mutexattr_setprioceiling, int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
(pthread_mutexattr_t *__attr, int __prioceiling)); int __prioceiling);
int _EXFUN(pthread_mutexattr_getprioceiling, int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *__attr,
(_CONST pthread_mutexattr_t *__attr, int *__prioceiling)); int *__prioceiling);
#endif /* _POSIX_THREAD_PRIO_INHERIT || _POSIX_THREAD_PRIO_PROTECT */ #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 */ /* Change the Priority Ceiling of a Mutex, P1003.1c/Draft 10, p. 131 */
int _EXFUN(pthread_mutex_setprioceiling, int pthread_mutex_setprioceiling (pthread_mutex_t *__mutex,
(pthread_mutex_t *__mutex, int __prioceiling, int *__old_ceiling)); int __prioceiling, int *__old_ceiling);
int _EXFUN(pthread_mutex_getprioceiling, int pthread_mutex_getprioceiling (pthread_mutex_t *__mutex,
(pthread_mutex_t *__mutex, int *__prioceiling)); int *__prioceiling);
#endif /* _POSIX_THREAD_PRIO_PROTECT */ #endif /* _POSIX_THREAD_PRIO_PROTECT */
/* Thread Creation Attributes, P1003.1c/Draft 10, p, 140 */ /* Thread Creation Attributes, P1003.1c/Draft 10, p, 140 */
int _EXFUN(pthread_attr_init, (pthread_attr_t *__attr)); int pthread_attr_init (pthread_attr_t *__attr);
int _EXFUN(pthread_attr_destroy, (pthread_attr_t *__attr)); int pthread_attr_destroy (pthread_attr_t *__attr);
int _EXFUN(pthread_attr_setstack, (pthread_attr_t *attr, int pthread_attr_setstack (pthread_attr_t *attr,
void *__stackaddr, size_t __stacksize)); void *__stackaddr, size_t __stacksize);
int _EXFUN(pthread_attr_getstack, (_CONST pthread_attr_t *attr, int pthread_attr_getstack (const pthread_attr_t *attr,
void **__stackaddr, size_t *__stacksize)); void **__stackaddr, size_t *__stacksize);
int _EXFUN(pthread_attr_getstacksize, int pthread_attr_getstacksize (const pthread_attr_t *__attr,
(_CONST pthread_attr_t *__attr, size_t *__stacksize)); size_t *__stacksize);
int _EXFUN(pthread_attr_setstacksize, int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize);
(pthread_attr_t *__attr, size_t __stacksize)); int pthread_attr_getstackaddr (const pthread_attr_t *__attr,
int _EXFUN(pthread_attr_getstackaddr, void **__stackaddr);
(_CONST pthread_attr_t *__attr, void **__stackaddr)); int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr);
int _EXFUN(pthread_attr_setstackaddr, int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
(pthread_attr_t *__attr, void *__stackaddr)); int *__detachstate);
int _EXFUN(pthread_attr_getdetachstate, int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate);
(_CONST pthread_attr_t *__attr, int *__detachstate)); int pthread_attr_getguardsize (const pthread_attr_t *__attr,
int _EXFUN(pthread_attr_setdetachstate, size_t *__guardsize);
(pthread_attr_t *__attr, int __detachstate)); int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize);
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));
/* POSIX thread APIs beyond the POSIX standard but provided /* POSIX thread APIs beyond the POSIX standard but provided
* in GNU/Linux. They may be provided by other OSes for * in GNU/Linux. They may be provided by other OSes for
@ -233,59 +222,55 @@ int _EXFUN(pthread_attr_setguardsize,
*/ */
#if __GNU_VISIBLE #if __GNU_VISIBLE
#if defined(__rtems__) #if defined(__rtems__)
int _EXFUN(pthread_attr_setaffinity_np, int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
(pthread_attr_t *__attr, size_t __cpusetsize, size_t __cpusetsize,
const cpu_set_t *__cpuset)); const cpu_set_t *__cpuset);
int _EXFUN(pthread_attr_getaffinity_np, int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
(const pthread_attr_t *__attr, size_t __cpusetsize, size_t __cpusetsize, cpu_set_t *__cpuset);
cpu_set_t *__cpuset));
int _EXFUN(pthread_setaffinity_np, int pthread_setaffinity_np (pthread_t __id, size_t __cpusetsize,
(pthread_t __id, size_t __cpusetsize, const cpu_set_t *__cpuset)); const cpu_set_t *__cpuset);
int _EXFUN(pthread_getaffinity_np, int pthread_getaffinity_np (const pthread_t __id, size_t __cpusetsize,
(const pthread_t __id, size_t __cpusetsize, cpu_set_t *__cpuset)); cpu_set_t *__cpuset);
int _EXFUN(pthread_getattr_np, int pthread_getattr_np (pthread_t __id, pthread_attr_t *__attr);
(pthread_t __id, pthread_attr_t *__attr));
#endif /* defined(__rtems__) */ #endif /* defined(__rtems__) */
#endif /* __GNU_VISIBLE */ #endif /* __GNU_VISIBLE */
/* Thread Creation, P1003.1c/Draft 10, p. 144 */ /* Thread Creation, P1003.1c/Draft 10, p. 144 */
int _EXFUN(pthread_create, int pthread_create (pthread_t *__pthread, const pthread_attr_t *__attr,
(pthread_t *__pthread, _CONST pthread_attr_t *__attr, void *(*__start_routine)(void *), void *__arg);
void *(*__start_routine)( void * ), void *__arg));
/* Wait for Thread Termination, P1003.1c/Draft 10, p. 147 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* Retrieve ID of a Thread's CPU Time Clock */
int _EXFUN(pthread_getcpuclockid, int pthread_getcpuclockid (pthread_t thread, clockid_t *clock_id);
(pthread_t thread, clockid_t *clock_id));
/* Get/Set Current Thread's Concurrency Level */ /* Get/Set Current Thread's Concurrency Level */
int _EXFUN(pthread_setconcurrency, (int new_level)); int pthread_setconcurrency (int new_level);
int _EXFUN(pthread_getconcurrency, (void)); int pthread_getconcurrency (void);
#if __BSD_VISIBLE || __GNU_VISIBLE #if __BSD_VISIBLE || __GNU_VISIBLE
void _EXFUN(pthread_yield, (void)); void pthread_yield (void);
#endif #endif
/* Dynamic Package Initialization */ /* Dynamic Package Initialization */
@ -298,23 +283,22 @@ void _EXFUN(pthread_yield, (void));
#define PTHREAD_ONCE_INIT _PTHREAD_ONCE_INIT #define PTHREAD_ONCE_INIT _PTHREAD_ONCE_INIT
int _EXFUN(pthread_once, int pthread_once (pthread_once_t *__once_control,
(pthread_once_t *__once_control, void (*__init_routine)(void))); void (*__init_routine)(void));
/* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */ /* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */
int _EXFUN(pthread_key_create, int pthread_key_create (pthread_key_t *__key,
(pthread_key_t *__key, void (*__destructor)( void * ))); void (*__destructor)(void *));
/* Thread-Specific Data Management, P1003.1c/Draft 10, p. 165 */ /* Thread-Specific Data Management, P1003.1c/Draft 10, p. 165 */
int _EXFUN(pthread_setspecific, int pthread_setspecific (pthread_key_t __key, const void *__value);
(pthread_key_t __key, _CONST void *__value)); void * pthread_getspecific (pthread_key_t __key);
void * _EXFUN(pthread_getspecific, (pthread_key_t __key));
/* Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ /* 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 */ /* 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) #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 */ /* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate)); int pthread_setcancelstate (int __state, int *__oldstate);
int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype)); int pthread_setcanceltype (int __type, int *__oldtype);
void _EXFUN(pthread_testcancel, (void)); void pthread_testcancel (void);
/* Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184 */ /* Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184 */
void _EXFUN(_pthread_cleanup_push, void _pthread_cleanup_push (struct _pthread_cleanup_context *_context,
(struct _pthread_cleanup_context *_context, void (*_routine)(void *), void *_arg);
void (*_routine)(void *), void *_arg));
void _EXFUN(_pthread_cleanup_pop, void _pthread_cleanup_pop (struct _pthread_cleanup_context *_context,
(struct _pthread_cleanup_context *_context, int _execute);
int _execute));
/* It is intentional to open and close the scope in two different macros */ /* It is intentional to open and close the scope in two different macros */
#define pthread_cleanup_push(_routine, _arg) \ #define pthread_cleanup_push(_routine, _arg) \
@ -355,13 +337,11 @@ void _EXFUN(_pthread_cleanup_pop,
} while (0) } while (0)
#if __GNU_VISIBLE #if __GNU_VISIBLE
void _EXFUN(_pthread_cleanup_push_defer, void _pthread_cleanup_push_defer (struct _pthread_cleanup_context *_context,
(struct _pthread_cleanup_context *_context, void (*_routine)(void *), void *_arg);
void (*_routine)(void *), void *_arg));
void _EXFUN(_pthread_cleanup_pop_restore, void _pthread_cleanup_pop_restore (struct _pthread_cleanup_context *_context,
(struct _pthread_cleanup_context *_context, int _execute);
int _execute));
/* It is intentional to open and close the scope in two different macros */ /* It is intentional to open and close the scope in two different macros */
#define pthread_cleanup_push_defer_np(_routine, _arg) \ #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 */ /* Accessing a Thread CPU-time Clock, P1003.4b/D8, p. 58 */
int _EXFUN(pthread_getcpuclockid, int pthread_getcpuclockid (pthread_t __pthread_id, clockid_t *__clock_id);
(pthread_t __pthread_id, clockid_t *__clock_id));
#endif /* defined(_POSIX_THREAD_CPUTIME) */ #endif /* defined(_POSIX_THREAD_CPUTIME) */
@ -388,31 +367,30 @@ int _EXFUN(pthread_getcpuclockid,
#if defined(_POSIX_BARRIERS) #if defined(_POSIX_BARRIERS)
int _EXFUN(pthread_barrierattr_init, (pthread_barrierattr_t *__attr)); int pthread_barrierattr_init (pthread_barrierattr_t *__attr);
int _EXFUN(pthread_barrierattr_destroy, (pthread_barrierattr_t *__attr)); int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr);
int _EXFUN(pthread_barrierattr_getpshared, int pthread_barrierattr_getpshared (const pthread_barrierattr_t *__attr,
(_CONST pthread_barrierattr_t *__attr, int *__pshared)); int *__pshared);
int _EXFUN(pthread_barrierattr_setpshared, int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
(pthread_barrierattr_t *__attr, int __pshared)); int __pshared);
#define PTHREAD_BARRIER_SERIAL_THREAD -1 #define PTHREAD_BARRIER_SERIAL_THREAD -1
int _EXFUN(pthread_barrier_init, int pthread_barrier_init (pthread_barrier_t *__barrier,
(pthread_barrier_t *__barrier, const pthread_barrierattr_t *__attr,
_CONST pthread_barrierattr_t *__attr, unsigned __count)); unsigned __count);
int _EXFUN(pthread_barrier_destroy, (pthread_barrier_t *__barrier)); int pthread_barrier_destroy (pthread_barrier_t *__barrier);
int _EXFUN(pthread_barrier_wait,(pthread_barrier_t *__barrier)); int pthread_barrier_wait (pthread_barrier_t *__barrier);
#endif /* defined(_POSIX_BARRIERS) */ #endif /* defined(_POSIX_BARRIERS) */
#if defined(_POSIX_SPIN_LOCKS) #if defined(_POSIX_SPIN_LOCKS)
int _EXFUN(pthread_spin_init, int pthread_spin_init (pthread_spinlock_t *__spinlock, int __pshared);
(pthread_spinlock_t *__spinlock, int __pshared)); int pthread_spin_destroy (pthread_spinlock_t *__spinlock);
int _EXFUN(pthread_spin_destroy, (pthread_spinlock_t *__spinlock)); int pthread_spin_lock (pthread_spinlock_t *__spinlock);
int _EXFUN(pthread_spin_lock, (pthread_spinlock_t *__spinlock)); int pthread_spin_trylock (pthread_spinlock_t *__spinlock);
int _EXFUN(pthread_spin_trylock, (pthread_spinlock_t *__spinlock)); int pthread_spin_unlock (pthread_spinlock_t *__spinlock);
int _EXFUN(pthread_spin_unlock, (pthread_spinlock_t *__spinlock));
#endif /* defined(_POSIX_SPIN_LOCKS) */ #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 #define PTHREAD_RWLOCK_INITIALIZER _PTHREAD_RWLOCK_INITIALIZER
int _EXFUN(pthread_rwlockattr_init, (pthread_rwlockattr_t *__attr)); int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr);
int _EXFUN(pthread_rwlockattr_destroy, (pthread_rwlockattr_t *__attr)); int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr);
int _EXFUN(pthread_rwlockattr_getpshared, int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *__attr,
(_CONST pthread_rwlockattr_t *__attr, int *__pshared)); int *__pshared);
int _EXFUN(pthread_rwlockattr_setpshared, int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
(pthread_rwlockattr_t *__attr, int __pshared)); int __pshared);
int _EXFUN(pthread_rwlock_init, int pthread_rwlock_init (pthread_rwlock_t *__rwlock,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); const pthread_rwlockattr_t *__attr);
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
int _EXFUN(pthread_rwlock_timedrdlock, int pthread_rwlock_timedrdlock (pthread_rwlock_t *__rwlock,
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); const struct timespec *__abstime);
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
int _EXFUN(pthread_rwlock_timedwrlock, int pthread_rwlock_timedwrlock (pthread_rwlock_t *__rwlock,
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); const struct timespec *__abstime);
#endif /* defined(_POSIX_READER_WRITER_LOCKS) */ #endif /* defined(_POSIX_READER_WRITER_LOCKS) */

View file

@ -136,29 +136,29 @@ struct timezone;
#else #else
/* Reentrant versions of system calls. */ /* Reentrant versions of system calls. */
extern int _close_r _PARAMS ((struct _reent *, int)); extern int _close_r (struct _reent *, int);
extern int _execve_r _PARAMS ((struct _reent *, const char *, char *const *, char *const *)); extern int _execve_r (struct _reent *, const char *, char *const *, char *const *);
extern int _fcntl_r _PARAMS ((struct _reent *, int, int, int)); extern int _fcntl_r (struct _reent *, int, int, int);
extern int _fork_r _PARAMS ((struct _reent *)); extern int _fork_r (struct _reent *);
extern int _fstat_r _PARAMS ((struct _reent *, int, struct stat *)); extern int _fstat_r (struct _reent *, int, struct stat *);
extern int _getpid_r _PARAMS ((struct _reent *)); extern int _getpid_r (struct _reent *);
extern int _isatty_r _PARAMS ((struct _reent *, int)); extern int _isatty_r (struct _reent *, int);
extern int _kill_r _PARAMS ((struct _reent *, int, int)); extern int _kill_r (struct _reent *, int, int);
extern int _link_r _PARAMS ((struct _reent *, const char *, const char *)); extern int _link_r (struct _reent *, const char *, const char *);
extern _off_t _lseek_r _PARAMS ((struct _reent *, int, _off_t, int)); extern _off_t _lseek_r (struct _reent *, int, _off_t, int);
extern int _mkdir_r _PARAMS ((struct _reent *, const char *, int)); extern int _mkdir_r (struct _reent *, const char *, int);
extern int _open_r _PARAMS ((struct _reent *, const char *, int, int)); extern int _open_r (struct _reent *, const char *, int, int);
extern _ssize_t _read_r _PARAMS ((struct _reent *, int, void *, size_t)); extern _ssize_t _read_r (struct _reent *, int, void *, size_t);
extern int _rename_r _PARAMS ((struct _reent *, const char *, const char *)); extern int _rename_r (struct _reent *, const char *, const char *);
extern void *_sbrk_r _PARAMS ((struct _reent *, ptrdiff_t)); extern void *_sbrk_r (struct _reent *, ptrdiff_t);
extern int _stat_r _PARAMS ((struct _reent *, const char *, struct stat *)); extern int _stat_r (struct _reent *, const char *, struct stat *);
extern _CLOCK_T_ _times_r _PARAMS ((struct _reent *, struct tms *)); extern _CLOCK_T_ _times_r (struct _reent *, struct tms *);
extern int _unlink_r _PARAMS ((struct _reent *, const char *)); extern int _unlink_r (struct _reent *, const char *);
extern int _wait_r _PARAMS ((struct _reent *, int *)); extern int _wait_r (struct _reent *, int *);
extern _ssize_t _write_r _PARAMS ((struct _reent *, int, const void *, size_t)); extern _ssize_t _write_r (struct _reent *, int, const void *, size_t);
/* This one is not guaranteed to be available on all targets. */ /* 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 #ifdef __LARGE64_FILES
@ -168,10 +168,10 @@ extern int _gettimeofday_r _PARAMS ((struct _reent *, struct timeval *__tp, void
#endif #endif
struct stat64; struct stat64;
extern _off64_t _lseek64_r _PARAMS ((struct _reent *, int, _off64_t, int)); extern _off64_t _lseek64_r (struct _reent *, int, _off64_t, int);
extern int _fstat64_r _PARAMS ((struct _reent *, int, struct stat64 *)); extern int _fstat64_r (struct _reent *, int, struct stat64 *);
extern int _open64_r _PARAMS ((struct _reent *, const char *, int, int)); extern int _open64_r (struct _reent *, const char *, int, int);
extern int _stat64_r _PARAMS ((struct _reent *, const char *, struct stat64 *)); extern int _stat64_r (struct _reent *, const char *, struct stat64 *);
/* Don't pollute namespace if not building newlib. */ /* Don't pollute namespace if not building newlib. */
#if defined (__CYGWIN__) && !defined (_COMPILING_NEWLIB) #if defined (__CYGWIN__) && !defined (_COMPILING_NEWLIB)

View file

@ -12,14 +12,12 @@
_BEGIN_STD_C _BEGIN_STD_C
#ifdef __GNUC__ #ifdef __GNUC__
void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)) void longjmp (jmp_buf __jmpb, int __retval)
__attribute__ ((__noreturn__)); __attribute__ ((__noreturn__));
#else #else
void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)); void longjmp (jmp_buf __jmpb, int __retval);
#endif #endif
int _EXFUN(setjmp,(jmp_buf __jmpb)); int setjmp (jmp_buf __jmpb);
#define setjmp(env) setjmp(env)
_END_STD_C _END_STD_C

View file

@ -21,13 +21,13 @@ typedef _sig_func_ptr sighandler_t; /* glibc naming */
struct _reent; struct _reent;
_sig_func_ptr _EXFUN(_signal_r, (struct _reent *, int, _sig_func_ptr)); _sig_func_ptr _signal_r (struct _reent *, int, _sig_func_ptr);
int _EXFUN(_raise_r, (struct _reent *, int)); int _raise_r (struct _reent *, int);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr)); _sig_func_ptr signal (int, _sig_func_ptr);
int _EXFUN(raise, (int)); int raise (int);
void _EXFUN(psignal, (int, const char *)); void psignal (int, const char *);
#endif #endif
_END_STD_C _END_STD_C

View file

@ -53,67 +53,52 @@ _BEGIN_STD_C
* XXX both arrays should be __restrict, but this does not work when GCC * XXX both arrays should be __restrict, but this does not work when GCC
* is invoked with -std=c99. * 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, const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
char * const [], char * const []) char * const [], char * const []);
); int posix_spawnp (pid_t * __restrict, const char * __restrict,
int _EXFUN(posix_spawnp, (pid_t * __restrict, const char * __restrict,
const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict, const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
char * const [], char * const []) char * const [], char * const []);
);
/* /*
* File descriptor actions * File descriptor actions
*/ */
int _EXFUN(posix_spawn_file_actions_init, (posix_spawn_file_actions_t *)); int 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_destroy (posix_spawn_file_actions_t *);
int _EXFUN(posix_spawn_file_actions_addopen, int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t * __restrict,
(posix_spawn_file_actions_t * __restrict, int, const char * __restrict, int, mode_t) int, const char * __restrict, int, mode_t);
); int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *, int, int);
int _EXFUN(posix_spawn_file_actions_adddup2, int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *, int);
(posix_spawn_file_actions_t *, int, int)
);
int _EXFUN(posix_spawn_file_actions_addclose,
(posix_spawn_file_actions_t *, int)
);
/* /*
* Spawn attributes * Spawn attributes
*/ */
int _EXFUN(posix_spawnattr_init, (posix_spawnattr_t *)); int posix_spawnattr_init (posix_spawnattr_t *);
int _EXFUN(posix_spawnattr_destroy, (posix_spawnattr_t *)); int posix_spawnattr_destroy (posix_spawnattr_t *);
int _EXFUN(posix_spawnattr_getflags, int posix_spawnattr_getflags (const posix_spawnattr_t * __restrict,
(const posix_spawnattr_t * __restrict, short * __restrict) short * __restrict);
); int posix_spawnattr_getpgroup (const posix_spawnattr_t * __restrict,
int _EXFUN(posix_spawnattr_getpgroup, pid_t * __restrict);
(const posix_spawnattr_t * __restrict, pid_t * __restrict)); int posix_spawnattr_getschedparam (const posix_spawnattr_t * __restrict,
int _EXFUN(posix_spawnattr_getschedparam, struct sched_param * __restrict);
(const posix_spawnattr_t * __restrict, struct sched_param * __restrict) int posix_spawnattr_getschedpolicy (const posix_spawnattr_t * __restrict,
); int * __restrict);
int _EXFUN(posix_spawnattr_getschedpolicy, int posix_spawnattr_getsigdefault (const posix_spawnattr_t * __restrict,
(const posix_spawnattr_t * __restrict, int * __restrict) sigset_t * __restrict);
); int posix_spawnattr_getsigmask (const posix_spawnattr_t * __restrict,
int _EXFUN(posix_spawnattr_getsigdefault, sigset_t * __restrict);
(const posix_spawnattr_t * __restrict, sigset_t * __restrict)
);
int _EXFUN(posix_spawnattr_getsigmask,
(const posix_spawnattr_t * __restrict, sigset_t * __restrict)
);
int _EXFUN(posix_spawnattr_setflags, (posix_spawnattr_t *, short)); int posix_spawnattr_setflags (posix_spawnattr_t *, short);
int _EXFUN(posix_spawnattr_setpgroup, (posix_spawnattr_t *, pid_t)); int posix_spawnattr_setpgroup (posix_spawnattr_t *, pid_t);
int _EXFUN(posix_spawnattr_setschedparam, int posix_spawnattr_setschedparam (posix_spawnattr_t * __restrict,
(posix_spawnattr_t * __restrict, const struct sched_param * __restrict) const struct sched_param * __restrict);
); int posix_spawnattr_setschedpolicy (posix_spawnattr_t *, int);
int _EXFUN(posix_spawnattr_setschedpolicy, (posix_spawnattr_t *, int)); int posix_spawnattr_setsigdefault (posix_spawnattr_t * __restrict,
int _EXFUN(posix_spawnattr_setsigdefault, const sigset_t * __restrict);
(posix_spawnattr_t * __restrict, const sigset_t * __restrict) int posix_spawnattr_setsigmask (posix_spawnattr_t * __restrict,
); const sigset_t * __restrict);
int _EXFUN(posix_spawnattr_setsigmask,
(posix_spawnattr_t * __restrict, const sigset_t * __restrict)
);
_END_STD_C _END_STD_C
#endif /* !_SPAWN_H_ */ #endif /* !_SPAWN_H_ */

View file

@ -178,155 +178,155 @@ typedef _fpos64_t fpos64_t;
#endif #endif
#if __POSIX_VISIBLE #if __POSIX_VISIBLE
char * _EXFUN(ctermid, (char *)); char * ctermid (char *);
#endif #endif
#if __XSI_VISIBLE && __XSI_VISIBLE < 600 #if __XSI_VISIBLE && __XSI_VISIBLE < 600
char * _EXFUN(cuserid, (char *)); char * cuserid (char *);
#endif #endif
FILE * _EXFUN(tmpfile, (void)); FILE * tmpfile (void);
char * _EXFUN(tmpnam, (char *)); char * tmpnam (char *);
#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 #if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
char * _EXFUN(tempnam, (const char *, const char *)); char * tempnam (const char *, const char *);
#endif #endif
int _EXFUN(fclose, (FILE *)); int fclose (FILE *);
int _EXFUN(fflush, (FILE *)); int fflush (FILE *);
FILE * _EXFUN(freopen, (const char *__restrict, const char *__restrict, FILE *__restrict)); FILE * freopen (const char *__restrict, const char *__restrict, FILE *__restrict);
void _EXFUN(setbuf, (FILE *__restrict, char *__restrict)); void setbuf (FILE *__restrict, char *__restrict);
int _EXFUN(setvbuf, (FILE *__restrict, char *__restrict, int, size_t)); int setvbuf (FILE *__restrict, char *__restrict, int, size_t);
int _EXFUN(fprintf, (FILE *__restrict, const char *__restrict, ...) int fprintf (FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int _EXFUN(fscanf, (FILE *__restrict, const char *__restrict, ...) int fscanf (FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 3)));
int _EXFUN(printf, (const char *__restrict, ...) int printf (const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 1, 2)))); _ATTRIBUTE ((__format__ (__printf__, 1, 2)));
int _EXFUN(scanf, (const char *__restrict, ...) int scanf (const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); _ATTRIBUTE ((__format__ (__scanf__, 1, 2)));
int _EXFUN(sscanf, (const char *__restrict, const char *__restrict, ...) int sscanf (const char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 3)));
int _EXFUN(vfprintf, (FILE *__restrict, const char *__restrict, __VALIST) int vfprintf (FILE *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
int _EXFUN(vprintf, (const char *, __VALIST) int vprintf (const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 1, 0)))); _ATTRIBUTE ((__format__ (__printf__, 1, 0)));
int _EXFUN(vsprintf, (char *__restrict, const char *__restrict, __VALIST) int vsprintf (char *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
int _EXFUN(fgetc, (FILE *)); int fgetc (FILE *);
char * _EXFUN(fgets, (char *__restrict, int, FILE *__restrict)); char * fgets (char *__restrict, int, FILE *__restrict);
int _EXFUN(fputc, (int, FILE *)); int fputc (int, FILE *);
int _EXFUN(fputs, (const char *__restrict, FILE *__restrict)); int fputs (const char *__restrict, FILE *__restrict);
int _EXFUN(getc, (FILE *)); int getc (FILE *);
int _EXFUN(getchar, (void)); int getchar (void);
char * _EXFUN(gets, (char *)); char * gets (char *);
int _EXFUN(putc, (int, FILE *)); int putc (int, FILE *);
int _EXFUN(putchar, (int)); int putchar (int);
int _EXFUN(puts, (const char *)); int puts (const char *);
int _EXFUN(ungetc, (int, FILE *)); int ungetc (int, FILE *);
size_t _EXFUN(fread, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); size_t fread (void *__restrict, size_t _size, size_t _n, FILE *__restrict);
size_t _EXFUN(fwrite, (const _PTR __restrict , size_t _size, size_t _n, FILE *)); size_t fwrite (const void *__restrict , size_t _size, size_t _n, FILE *);
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(fgetpos, (FILE *, _fpos_t *)); int fgetpos (FILE *, _fpos_t *);
#else #else
int _EXFUN(fgetpos, (FILE *__restrict, fpos_t *__restrict)); int fgetpos (FILE *__restrict, fpos_t *__restrict);
#endif #endif
int _EXFUN(fseek, (FILE *, long, int)); int fseek (FILE *, long, int);
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(fsetpos, (FILE *, const _fpos_t *)); int fsetpos (FILE *, const _fpos_t *);
#else #else
int _EXFUN(fsetpos, (FILE *, const fpos_t *)); int fsetpos (FILE *, const fpos_t *);
#endif #endif
long _EXFUN(ftell, ( FILE *)); long ftell ( FILE *);
void _EXFUN(rewind, (FILE *)); void rewind (FILE *);
void _EXFUN(clearerr, (FILE *)); void clearerr (FILE *);
int _EXFUN(feof, (FILE *)); int feof (FILE *);
int _EXFUN(ferror, (FILE *)); int ferror (FILE *);
void _EXFUN(perror, (const char *)); void perror (const char *);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
FILE * _EXFUN(fopen, (const char *__restrict _name, const char *__restrict _type)); FILE * fopen (const char *__restrict _name, const char *__restrict _type);
int _EXFUN(sprintf, (char *__restrict, const char *__restrict, ...) int sprintf (char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int _EXFUN(remove, (const char *)); int remove (const char *);
int _EXFUN(rename, (const char *, const char *)); int rename (const char *, const char *);
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(_rename, (const char *, const char *)); int _rename (const char *, const char *);
#endif #endif
#endif #endif
#if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112 #if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(fseeko, (FILE *, _off_t, int)); int fseeko (FILE *, _off_t, int);
_off_t _EXFUN(ftello, ( FILE *)); _off_t ftello (FILE *);
#else #else
int _EXFUN(fseeko, (FILE *, off_t, int)); int fseeko (FILE *, off_t, int);
off_t _EXFUN(ftello, ( FILE *)); off_t ftello (FILE *);
#endif #endif
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(fcloseall, (_VOID)); int fcloseall (void);
#endif #endif
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) int snprintf (char *__restrict, size_t, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) int vsnprintf (char *__restrict, size_t, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) int vfscanf (FILE *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 0)));
int _EXFUN(vscanf, (const char *, __VALIST) int vscanf (const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 1, 0)));
int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) int vsscanf (const char *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 0)));
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) int asprintf (char **__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int _EXFUN(vasprintf, (char **, const char *, __VALIST) int vasprintf (char **, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
#endif #endif
#if __MISC_VISIBLE /* Newlib-specific */ #if __MISC_VISIBLE /* Newlib-specific */
int _EXFUN(asiprintf, (char **, const char *, ...) int asiprintf (char **, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...) char * asniprintf (char *, size_t *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...) char * asnprintf (char *__restrict, size_t *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
#ifndef diprintf #ifndef diprintf
int _EXFUN(diprintf, (int, const char *, ...) int diprintf (int, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
#endif #endif
int _EXFUN(fiprintf, (FILE *, const char *, ...) int fiprintf (FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int _EXFUN(fiscanf, (FILE *, const char *, ...) int fiscanf (FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 3)));
int _EXFUN(iprintf, (const char *, ...) int iprintf (const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 1, 2)))); _ATTRIBUTE ((__format__ (__printf__, 1, 2)));
int _EXFUN(iscanf, (const char *, ...) int iscanf (const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); _ATTRIBUTE ((__format__ (__scanf__, 1, 2)));
int _EXFUN(siprintf, (char *, const char *, ...) int siprintf (char *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int _EXFUN(siscanf, (const char *, const char *, ...) int siscanf (const char *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 3)));
int _EXFUN(sniprintf, (char *, size_t, const char *, ...) int sniprintf (char *, size_t, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(vasiprintf, (char **, const char *, __VALIST) int vasiprintf (char **, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
char * _EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST) char * vasniprintf (char *, size_t *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST) char * vasnprintf (char *, size_t *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(vdiprintf, (int, const char *, __VALIST) int vdiprintf (int, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST) int vfiprintf (FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
int _EXFUN(vfiscanf, (FILE *, const char *, __VALIST) int vfiscanf (FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 0)));
int _EXFUN(viprintf, (const char *, __VALIST) int viprintf (const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 1, 0)))); _ATTRIBUTE ((__format__ (__printf__, 1, 0)));
int _EXFUN(viscanf, (const char *, __VALIST) int viscanf (const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 1, 0)));
int _EXFUN(vsiprintf, (char *, const char *, __VALIST) int vsiprintf (char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
int _EXFUN(vsiscanf, (const char *, const char *, __VALIST) int vsiscanf (const char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 0)));
int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) int vsniprintf (char *, size_t, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
#endif /* __MISC_VISIBLE */ #endif /* __MISC_VISIBLE */
#endif /* !_REENT_ONLY */ #endif /* !_REENT_ONLY */
@ -336,32 +336,32 @@ int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST)
#if __POSIX_VISIBLE #if __POSIX_VISIBLE
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
FILE * _EXFUN(fdopen, (int, const char *)); FILE * fdopen (int, const char *);
#endif #endif
int _EXFUN(fileno, (FILE *)); int fileno (FILE *);
#endif #endif
#if __MISC_VISIBLE || __POSIX_VISIBLE >= 199209 #if __MISC_VISIBLE || __POSIX_VISIBLE >= 199209
int _EXFUN(pclose, (FILE *)); int pclose (FILE *);
FILE * _EXFUN(popen, (const char *, const char *)); FILE * popen (const char *, const char *);
#endif #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
void _EXFUN(setbuffer, (FILE *, char *, int)); void setbuffer (FILE *, char *, int);
int _EXFUN(setlinebuf, (FILE *)); int setlinebuf (FILE *);
#endif #endif
#if __MISC_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) #if __MISC_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112)
int _EXFUN(getw, (FILE *)); int getw (FILE *);
int _EXFUN(putw, (int, FILE *)); int putw (int, FILE *);
#endif #endif
#if __MISC_VISIBLE || __POSIX_VISIBLE #if __MISC_VISIBLE || __POSIX_VISIBLE
int _EXFUN(getc_unlocked, (FILE *)); int getc_unlocked (FILE *);
int _EXFUN(getchar_unlocked, (void)); int getchar_unlocked (void);
void _EXFUN(flockfile, (FILE *)); void flockfile (FILE *);
int _EXFUN(ftrylockfile, (FILE *)); int ftrylockfile (FILE *);
void _EXFUN(funlockfile, (FILE *)); void funlockfile (FILE *);
int _EXFUN(putc_unlocked, (int, FILE *)); int putc_unlocked (int, FILE *);
int _EXFUN(putchar_unlocked, (int)); int putchar_unlocked (int);
#endif #endif
/* /*
@ -371,21 +371,21 @@ int _EXFUN(putchar_unlocked, (int));
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
# ifndef _REENT_ONLY # ifndef _REENT_ONLY
# ifndef dprintf # ifndef dprintf
int _EXFUN(dprintf, (int, const char *__restrict, ...) int dprintf (int, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
# endif # 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 */ /* getdelim - see __getdelim for now */
/* getline - see __getline for now */ /* getline - see __getline for now */
FILE * _EXFUN(open_memstream, (char **, size_t *)); FILE * open_memstream (char **, size_t *);
int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST) int vdprintf (int, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
# endif # endif
#endif #endif
#if __ATFILE_VISIBLE #if __ATFILE_VISIBLE
int _EXFUN(renameat, (int, const char *, int, const char *)); int renameat (int, const char *, int, const char *);
# ifdef __CYGWIN__ # 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
#endif #endif
@ -393,180 +393,180 @@ int _EXFUN(renameat2, (int, const char *, int, const char *, unsigned int));
* Recursive versions of the above. * Recursive versions of the above.
*/ */
int _EXFUN(_asiprintf_r, (struct _reent *, char **, const char *, ...) int _asiprintf_r (struct _reent *, char **, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
char * _EXFUN(_asniprintf_r, (struct _reent *, char *, size_t *, const char *, ...) char * _asniprintf_r (struct _reent *, char *, size_t *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5)))); _ATTRIBUTE ((__format__ (__printf__, 4, 5)));
char * _EXFUN(_asnprintf_r, (struct _reent *, char *__restrict, size_t *__restrict, const char *__restrict, ...) char * _asnprintf_r (struct _reent *, char *__restrict, size_t *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5)))); _ATTRIBUTE ((__format__ (__printf__, 4, 5)));
int _EXFUN(_asprintf_r, (struct _reent *, char **__restrict, const char *__restrict, ...) int _asprintf_r (struct _reent *, char **__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(_diprintf_r, (struct _reent *, int, const char *, ...) int _diprintf_r (struct _reent *, int, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(_dprintf_r, (struct _reent *, int, const char *__restrict, ...) int _dprintf_r (struct _reent *, int, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(_fclose_r, (struct _reent *, FILE *)); int _fclose_r (struct _reent *, FILE *);
int _EXFUN(_fcloseall_r, (struct _reent *)); int _fcloseall_r (struct _reent *);
FILE * _EXFUN(_fdopen_r, (struct _reent *, int, const char *)); FILE * _fdopen_r (struct _reent *, int, const char *);
int _EXFUN(_fflush_r, (struct _reent *, FILE *)); int _fflush_r (struct _reent *, FILE *);
int _EXFUN(_fgetc_r, (struct _reent *, FILE *)); int _fgetc_r (struct _reent *, FILE *);
int _EXFUN(_fgetc_unlocked_r, (struct _reent *, FILE *)); int _fgetc_unlocked_r (struct _reent *, FILE *);
char * _EXFUN(_fgets_r, (struct _reent *, char *__restrict, int, FILE *__restrict)); char * _fgets_r (struct _reent *, char *__restrict, int, FILE *__restrict);
char * _EXFUN(_fgets_unlocked_r, (struct _reent *, char *__restrict, int, FILE *__restrict)); char * _fgets_unlocked_r (struct _reent *, char *__restrict, int, FILE *__restrict);
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(_fgetpos_r, (struct _reent *, FILE *__restrict, _fpos_t *__restrict)); int _fgetpos_r (struct _reent *, FILE *__restrict, _fpos_t *__restrict);
int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const _fpos_t *)); int _fsetpos_r (struct _reent *, FILE *, const _fpos_t *);
#else #else
int _EXFUN(_fgetpos_r, (struct _reent *, FILE *, fpos_t *)); int _fgetpos_r (struct _reent *, FILE *, fpos_t *);
int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const fpos_t *)); int _fsetpos_r (struct _reent *, FILE *, const fpos_t *);
#endif #endif
int _EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...) int _fiprintf_r (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...) int _fiscanf_r (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 4)));
FILE * _EXFUN(_fmemopen_r, (struct _reent *, void *__restrict, size_t, const char *__restrict)); FILE * _fmemopen_r (struct _reent *, void *__restrict, size_t, const char *__restrict);
FILE * _EXFUN(_fopen_r, (struct _reent *, const char *__restrict, const char *__restrict)); FILE * _fopen_r (struct _reent *, const char *__restrict, const char *__restrict);
FILE * _EXFUN(_freopen_r, (struct _reent *, const char *__restrict, const char *__restrict, FILE *__restrict)); FILE * _freopen_r (struct _reent *, const char *__restrict, const char *__restrict, FILE *__restrict);
int _EXFUN(_fprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) int _fprintf_r (struct _reent *, FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(_fpurge_r, (struct _reent *, FILE *)); int _fpurge_r (struct _reent *, FILE *);
int _EXFUN(_fputc_r, (struct _reent *, int, FILE *)); int _fputc_r (struct _reent *, int, FILE *);
int _EXFUN(_fputc_unlocked_r, (struct _reent *, int, FILE *)); int _fputc_unlocked_r (struct _reent *, int, FILE *);
int _EXFUN(_fputs_r, (struct _reent *, const char *__restrict, FILE *__restrict)); int _fputs_r (struct _reent *, const char *__restrict, FILE *__restrict);
int _EXFUN(_fputs_unlocked_r, (struct _reent *, const char *__restrict, FILE *__restrict)); int _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 _fread_r (struct _reent *, void *__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)); size_t _fread_unlocked_r (struct _reent *, void *__restrict, size_t _size, size_t _n, FILE *__restrict);
int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) int _fscanf_r (struct _reent *, FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 4)));
int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int)); int _fseek_r (struct _reent *, FILE *, long, int);
int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int)); int _fseeko_r (struct _reent *, FILE *, _off_t, int);
long _EXFUN(_ftell_r, (struct _reent *, FILE *)); long _ftell_r (struct _reent *, FILE *);
_off_t _EXFUN(_ftello_r,(struct _reent *, FILE *)); _off_t _ftello_r (struct _reent *, FILE *);
void _EXFUN(_rewind_r, (struct _reent *, FILE *)); void _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 _fwrite_r (struct _reent *, const void *__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)); size_t _fwrite_unlocked_r (struct _reent *, const void *__restrict, size_t _size, size_t _n, FILE *__restrict);
int _EXFUN(_getc_r, (struct _reent *, FILE *)); int _getc_r (struct _reent *, FILE *);
int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *)); int _getc_unlocked_r (struct _reent *, FILE *);
int _EXFUN(_getchar_r, (struct _reent *)); int _getchar_r (struct _reent *);
int _EXFUN(_getchar_unlocked_r, (struct _reent *)); int _getchar_unlocked_r (struct _reent *);
char * _EXFUN(_gets_r, (struct _reent *, char *)); char * _gets_r (struct _reent *, char *);
int _EXFUN(_iprintf_r, (struct _reent *, const char *, ...) int _iprintf_r (struct _reent *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int _EXFUN(_iscanf_r, (struct _reent *, const char *, ...) int _iscanf_r (struct _reent *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 3)));
FILE * _EXFUN(_open_memstream_r, (struct _reent *, char **, size_t *)); FILE * _open_memstream_r (struct _reent *, char **, size_t *);
void _EXFUN(_perror_r, (struct _reent *, const char *)); void _perror_r (struct _reent *, const char *);
int _EXFUN(_printf_r, (struct _reent *, const char *__restrict, ...) int _printf_r (struct _reent *, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3)))); _ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int _EXFUN(_putc_r, (struct _reent *, int, FILE *)); int _putc_r (struct _reent *, int, FILE *);
int _EXFUN(_putc_unlocked_r, (struct _reent *, int, FILE *)); int _putc_unlocked_r (struct _reent *, int, FILE *);
int _EXFUN(_putchar_unlocked_r, (struct _reent *, int)); int _putchar_unlocked_r (struct _reent *, int);
int _EXFUN(_putchar_r, (struct _reent *, int)); int _putchar_r (struct _reent *, int);
int _EXFUN(_puts_r, (struct _reent *, const char *)); int _puts_r (struct _reent *, const char *);
int _EXFUN(_remove_r, (struct _reent *, const char *)); int _remove_r (struct _reent *, const char *);
int _EXFUN(_rename_r, (struct _reent *, int _rename_r (struct _reent *,
const char *_old, const char *_new)); const char *_old, const char *_new);
int _EXFUN(_scanf_r, (struct _reent *, const char *__restrict, ...) int _scanf_r (struct _reent *, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 3)));
int _EXFUN(_siprintf_r, (struct _reent *, char *, const char *, ...) int _siprintf_r (struct _reent *, char *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(_siscanf_r, (struct _reent *, const char *, const char *, ...) int _siscanf_r (struct _reent *, const char *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 4)));
int _EXFUN(_sniprintf_r, (struct _reent *, char *, size_t, const char *, ...) int _sniprintf_r (struct _reent *, char *, size_t, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5)))); _ATTRIBUTE ((__format__ (__printf__, 4, 5)));
int _EXFUN(_snprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, ...) int _snprintf_r (struct _reent *, char *__restrict, size_t, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5)))); _ATTRIBUTE ((__format__ (__printf__, 4, 5)));
int _EXFUN(_sprintf_r, (struct _reent *, char *__restrict, const char *__restrict, ...) int _sprintf_r (struct _reent *, char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4)))); _ATTRIBUTE ((__format__ (__printf__, 3, 4)));
int _EXFUN(_sscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, ...) int _sscanf_r (struct _reent *, const char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 4)));
char * _EXFUN(_tempnam_r, (struct _reent *, const char *, const char *)); char * _tempnam_r (struct _reent *, const char *, const char *);
FILE * _EXFUN(_tmpfile_r, (struct _reent *)); FILE * _tmpfile_r (struct _reent *);
char * _EXFUN(_tmpnam_r, (struct _reent *, char *)); char * _tmpnam_r (struct _reent *, char *);
int _EXFUN(_ungetc_r, (struct _reent *, int, FILE *)); int _ungetc_r (struct _reent *, int, FILE *);
int _EXFUN(_vasiprintf_r, (struct _reent *, char **, const char *, __VALIST) int _vasiprintf_r (struct _reent *, char **, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
char * _EXFUN(_vasniprintf_r, (struct _reent*, char *, size_t *, const char *, __VALIST) char * _vasniprintf_r (struct _reent*, char *, size_t *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 4, 0)))); _ATTRIBUTE ((__format__ (__printf__, 4, 0)));
char * _EXFUN(_vasnprintf_r, (struct _reent*, char *, size_t *, const char *, __VALIST) char * _vasnprintf_r (struct _reent*, char *, size_t *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 4, 0)))); _ATTRIBUTE ((__format__ (__printf__, 4, 0)));
int _EXFUN(_vasprintf_r, (struct _reent *, char **, const char *, __VALIST) int _vasprintf_r (struct _reent *, char **, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(_vdiprintf_r, (struct _reent *, int, const char *, __VALIST) int _vdiprintf_r (struct _reent *, int, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(_vdprintf_r, (struct _reent *, int, const char *__restrict, __VALIST) int _vdprintf_r (struct _reent *, int, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(_vfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST) int _vfiprintf_r (struct _reent *, FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(_vfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST) int _vfiscanf_r (struct _reent *, FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 0)));
int _EXFUN(_vfprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) int _vfprintf_r (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(_vfscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST) int _vfscanf_r (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 0)));
int _EXFUN(_viprintf_r, (struct _reent *, const char *, __VALIST) int _viprintf_r (struct _reent *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
int _EXFUN(_viscanf_r, (struct _reent *, const char *, __VALIST) int _viscanf_r (struct _reent *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 0)));
int _EXFUN(_vprintf_r, (struct _reent *, const char *__restrict, __VALIST) int _vprintf_r (struct _reent *, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0)))); _ATTRIBUTE ((__format__ (__printf__, 2, 0)));
int _EXFUN(_vscanf_r, (struct _reent *, const char *__restrict, __VALIST) int _vscanf_r (struct _reent *, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 2, 0)));
int _EXFUN(_vsiprintf_r, (struct _reent *, char *, const char *, __VALIST) int _vsiprintf_r (struct _reent *, char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(_vsiscanf_r, (struct _reent *, const char *, const char *, __VALIST) int _vsiscanf_r (struct _reent *, const char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 0)));
int _EXFUN(_vsniprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST) int _vsniprintf_r (struct _reent *, char *, size_t, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 4, 0)))); _ATTRIBUTE ((__format__ (__printf__, 4, 0)));
int _EXFUN(_vsnprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, __VALIST) int _vsnprintf_r (struct _reent *, char *__restrict, size_t, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 4, 0)))); _ATTRIBUTE ((__format__ (__printf__, 4, 0)));
int _EXFUN(_vsprintf_r, (struct _reent *, char *__restrict, const char *__restrict, __VALIST) int _vsprintf_r (struct _reent *, char *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0)))); _ATTRIBUTE ((__format__ (__printf__, 3, 0)));
int _EXFUN(_vsscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, __VALIST) int _vsscanf_r (struct _reent *, const char *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 0)));
/* Other extensions. */ /* Other extensions. */
int _EXFUN(fpurge, (FILE *)); int fpurge (FILE *);
ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *)); ssize_t __getdelim (char **, size_t *, int, FILE *);
ssize_t _EXFUN(__getline, (char **, size_t *, FILE *)); ssize_t __getline (char **, size_t *, FILE *);
#if __MISC_VISIBLE #if __MISC_VISIBLE
void _EXFUN(clearerr_unlocked, (FILE *)); void clearerr_unlocked (FILE *);
int _EXFUN(feof_unlocked, (FILE *)); int feof_unlocked (FILE *);
int _EXFUN(ferror_unlocked, (FILE *)); int ferror_unlocked (FILE *);
int _EXFUN(fileno_unlocked, (FILE *)); int fileno_unlocked (FILE *);
int _EXFUN(fflush_unlocked, (FILE *)); int fflush_unlocked (FILE *);
int _EXFUN(fgetc_unlocked, (FILE *)); int fgetc_unlocked (FILE *);
int _EXFUN(fputc_unlocked, (int, FILE *)); int fputc_unlocked (int, FILE *);
size_t _EXFUN(fread_unlocked, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); size_t fread_unlocked (void *__restrict, size_t _size, size_t _n, FILE *__restrict);
size_t _EXFUN(fwrite_unlocked, (const _PTR __restrict , size_t _size, size_t _n, FILE *)); size_t fwrite_unlocked (const void *__restrict , size_t _size, size_t _n, FILE *);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
char * _EXFUN(fgets_unlocked, (char *__restrict, int, FILE *__restrict)); char * fgets_unlocked (char *__restrict, int, FILE *__restrict);
int _EXFUN(fputs_unlocked, (const char *__restrict, FILE *__restrict)); int fputs_unlocked (const char *__restrict, FILE *__restrict);
#endif #endif
#ifdef __LARGE64_FILES #ifdef __LARGE64_FILES
#if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB) #if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB)
FILE * _EXFUN(fdopen64, (int, const char *)); FILE * fdopen64 (int, const char *);
FILE * _EXFUN(fopen64, (const char *, const char *)); FILE * fopen64 (const char *, const char *);
FILE * _EXFUN(freopen64, (_CONST char *, _CONST char *, FILE *)); FILE * freopen64 (const char *, const char *, FILE *);
_off64_t _EXFUN(ftello64, (FILE *)); _off64_t ftello64 (FILE *);
_off64_t _EXFUN(fseeko64, (FILE *, _off64_t, int)); _off64_t fseeko64 (FILE *, _off64_t, int);
int _EXFUN(fgetpos64, (FILE *, _fpos64_t *)); int fgetpos64 (FILE *, _fpos64_t *);
int _EXFUN(fsetpos64, (FILE *, const _fpos64_t *)); int fsetpos64 (FILE *, const _fpos64_t *);
FILE * _EXFUN(tmpfile64, (void)); FILE * tmpfile64 (void);
FILE * _EXFUN(_fdopen64_r, (struct _reent *, int, const char *)); FILE * _fdopen64_r (struct _reent *, int, const char *);
FILE * _EXFUN(_fopen64_r, (struct _reent *,const char *, const char *)); FILE * _fopen64_r (struct _reent *,const char *, const char *);
FILE * _EXFUN(_freopen64_r, (struct _reent *, _CONST char *, _CONST char *, FILE *)); FILE * _freopen64_r (struct _reent *, const char *, const char *, FILE *);
_off64_t _EXFUN(_ftello64_r, (struct _reent *, FILE *)); _off64_t _ftello64_r (struct _reent *, FILE *);
_off64_t _EXFUN(_fseeko64_r, (struct _reent *, FILE *, _off64_t, int)); _off64_t _fseeko64_r (struct _reent *, FILE *, _off64_t, int);
int _EXFUN(_fgetpos64_r, (struct _reent *, FILE *, _fpos64_t *)); int _fgetpos64_r (struct _reent *, FILE *, _fpos64_t *);
int _EXFUN(_fsetpos64_r, (struct _reent *, FILE *, const _fpos64_t *)); int _fsetpos64_r (struct _reent *, FILE *, const _fpos64_t *);
FILE * _EXFUN(_tmpfile64_r, (struct _reent *)); FILE * _tmpfile64_r (struct _reent *);
#endif /* !__CYGWIN__ */ #endif /* !__CYGWIN__ */
#endif /* __LARGE64_FILES */ #endif /* __LARGE64_FILES */
@ -574,8 +574,8 @@ FILE * _EXFUN(_tmpfile64_r, (struct _reent *));
* Routines internal to the implementation. * Routines internal to the implementation.
*/ */
int _EXFUN(__srget_r, (struct _reent *, FILE *)); int __srget_r (struct _reent *, FILE *);
int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *)); int __swbuf_r (struct _reent *, int, FILE *);
/* /*
* Stdio function-access interface. * Stdio function-access interface.
@ -583,35 +583,35 @@ int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *));
#if __BSD_VISIBLE #if __BSD_VISIBLE
# ifdef __LARGE64_FILES # ifdef __LARGE64_FILES
FILE *_EXFUN(funopen,(const _PTR __cookie, FILE *funopen (const void *__cookie,
int (*__readfn)(_PTR __c, char *__buf, int (*__readfn)(void *__c, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __c, const char *__buf, int (*__writefn)(void *__c, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence), _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
int (*__closefn)(_PTR __c))); int (*__closefn)(void *__c));
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie, FILE *_funopen_r (struct _reent *, const void *__cookie,
int (*__readfn)(_PTR __c, char *__buf, int (*__readfn)(void *__c, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __c, const char *__buf, int (*__writefn)(void *__c, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence), _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
int (*__closefn)(_PTR __c))); int (*__closefn)(void *__c));
# else # else
FILE *_EXFUN(funopen,(const _PTR __cookie, FILE *funopen (const void *__cookie,
int (*__readfn)(_PTR __cookie, char *__buf, int (*__readfn)(void *__cookie, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __cookie, const char *__buf, int (*__writefn)(void *__cookie, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence), fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence),
int (*__closefn)(_PTR __cookie))); int (*__closefn)(void *__cookie));
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie, FILE *_funopen_r (struct _reent *, const void *__cookie,
int (*__readfn)(_PTR __cookie, char *__buf, int (*__readfn)(void *__cookie, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __cookie, const char *__buf, int (*__writefn)(void *__cookie, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence), fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence),
int (*__closefn)(_PTR __cookie))); int (*__closefn)(void *__cookie));
# endif /* !__LARGE64_FILES */ # endif /* !__LARGE64_FILES */
# define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \ # define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \
@ -640,10 +640,10 @@ typedef struct
cookie_seek_function_t *seek; cookie_seek_function_t *seek;
cookie_close_function_t *close; cookie_close_function_t *close;
} cookie_io_functions_t; } cookie_io_functions_t;
FILE *_EXFUN(fopencookie,(void *__cookie, FILE *fopencookie (void *__cookie,
const char *__mode, cookie_io_functions_t __functions)); const char *__mode, cookie_io_functions_t __functions);
FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie, FILE *_fopencookie_r (struct _reent *, void *__cookie,
const char *__mode, cookie_io_functions_t __functions)); const char *__mode, cookie_io_functions_t __functions);
#endif /* __GNU_VISIBLE */ #endif /* __GNU_VISIBLE */
#ifndef __CUSTOM_FILE_IO__ #ifndef __CUSTOM_FILE_IO__

View file

@ -19,8 +19,8 @@
_BEGIN_STD_C _BEGIN_STD_C
void _EXFUN(__fpurge,(FILE *)); void __fpurge (FILE *);
int _EXFUN(__fsetlocking,(FILE *, int)); int __fsetlocking (FILE *, int);
/* TODO: /* TODO:
@ -52,13 +52,13 @@ __fpending (FILE *__fp) { return __fp->_p - __fp->_bf._base; }
#else #else
size_t _EXFUN(__fbufsize,(FILE *)); size_t __fbufsize (FILE *);
int _EXFUN(__freading,(FILE *)); int __freading (FILE *);
int _EXFUN(__fwriting,(FILE *)); int __fwriting (FILE *);
int _EXFUN(__freadable,(FILE *)); int __freadable (FILE *);
int _EXFUN(__fwritable,(FILE *)); int __fwritable (FILE *);
int _EXFUN(__flbf,(FILE *)); int __flbf (FILE *);
size_t _EXFUN(__fpending,(FILE *)); size_t __fpending (FILE *);
#ifndef __cplusplus #ifndef __cplusplus

View file

@ -54,7 +54,7 @@ typedef struct
#ifndef __compar_fn_t_defined #ifndef __compar_fn_t_defined
#define __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 #endif
#ifndef NULL #ifndef NULL
@ -66,110 +66,102 @@ typedef int (*__compar_fn_t) (const _PTR, const _PTR);
#define RAND_MAX __RAND_MAX #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() #define MB_CUR_MAX __locale_mb_cur_max()
_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((__noreturn__))); void abort (void) _ATTRIBUTE ((__noreturn__));
int _EXFUN(abs,(int)); int abs (int);
#if __BSD_VISIBLE #if __BSD_VISIBLE
__uint32_t _EXFUN(arc4random, (void)); __uint32_t arc4random (void);
__uint32_t _EXFUN(arc4random_uniform, (__uint32_t)); __uint32_t arc4random_uniform (__uint32_t);
void _EXFUN(arc4random_buf, (void *, size_t)); void arc4random_buf (void *, size_t);
#endif #endif
int _EXFUN(atexit,(_VOID (*__func)(_VOID))); int atexit (void (*__func)(void));
double _EXFUN(atof,(const char *__nptr)); double atof (const char *__nptr);
#if __MISC_VISIBLE #if __MISC_VISIBLE
float _EXFUN(atoff,(const char *__nptr)); float atoff (const char *__nptr);
#endif #endif
int _EXFUN(atoi,(const char *__nptr)); int atoi (const char *__nptr);
int _EXFUN(_atoi_r,(struct _reent *, const char *__nptr)); int _atoi_r (struct _reent *, const char *__nptr);
long _EXFUN(atol,(const char *__nptr)); long atol (const char *__nptr);
long _EXFUN(_atol_r,(struct _reent *, const char *__nptr)); long _atol_r (struct _reent *, const char *__nptr);
_PTR _EXFUN(bsearch,(const _PTR __key, void * bsearch (const void *__key,
const _PTR __base, const void *__base,
size_t __nmemb, size_t __nmemb,
size_t __size, size_t __size,
__compar_fn_t _compar)); __compar_fn_t _compar);
_PTR _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size)); void * calloc (size_t __nmemb, size_t __size) _NOTHROW;
div_t _EXFUN(div,(int __numer, int __denom)); div_t div (int __numer, int __denom);
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__))); void exit (int __status) _ATTRIBUTE ((__noreturn__));
_VOID _EXFUN_NOTHROW(free,(_PTR)); void free (void *) _NOTHROW;
char * _EXFUN(getenv,(const char *__string)); char * getenv (const char *__string);
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string)); char * _getenv_r (struct _reent *, const char *__string);
char * _EXFUN(_findenv,(_CONST char *, int *)); char * _findenv (const char *, int *);
char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *)); char * _findenv_r (struct _reent *, const char *, int *);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
extern char *suboptarg; /* getsubopt(3) external variable */ extern char *suboptarg; /* getsubopt(3) external variable */
int _EXFUN(getsubopt,(char **, char * const *, char **)); int getsubopt (char **, char * const *, char **);
#endif #endif
long _EXFUN(labs,(long)); long labs (long);
ldiv_t _EXFUN(ldiv,(long __numer, long __denom)); ldiv_t ldiv (long __numer, long __denom);
_PTR _EXFUN_NOTHROW(malloc,(size_t __size)); void * malloc (size_t __size) _NOTHROW;
int _EXFUN(mblen,(const char *, size_t)); int mblen (const char *, size_t);
int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *)); int _mblen_r (struct _reent *, const char *, size_t, _mbstate_t *);
int _EXFUN(mbtowc,(wchar_t *__restrict, const char *__restrict, size_t)); int 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 _mbtowc_r (struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *);
int _EXFUN(wctomb,(char *, wchar_t)); int wctomb (char *, wchar_t);
int _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, _mbstate_t *)); int _wctomb_r (struct _reent *, char *, wchar_t, _mbstate_t *);
size_t _EXFUN(mbstowcs,(wchar_t *__restrict, const char *__restrict, size_t)); size_t 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 _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 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 *)); size_t _wcstombs_r (struct _reent *, char *__restrict, const wchar_t *__restrict, size_t, _mbstate_t *);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
char * _EXFUN(mkdtemp,(char *)); char * mkdtemp (char *);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(mkostemp,(char *, int)); int mkostemp (char *, int);
int _EXFUN(mkostemps,(char *, int, int)); int mkostemps (char *, int, int);
#endif #endif
#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 #if __MISC_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4
int _EXFUN(mkstemp,(char *)); int mkstemp (char *);
#endif #endif
#if __MISC_VISIBLE #if __MISC_VISIBLE
int _EXFUN(mkstemps,(char *, int)); int mkstemps (char *, int);
#endif #endif
#if (__GNUC__ < 4) || defined(__XTENSA__)
char * _EXFUN(mktemp,(char *));
#else
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")))); char * mktemp (char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")));
#endif
#endif #endif
#endif /* !_REENT_ONLY */ #endif /* !_REENT_ONLY */
char * _EXFUN(_mkdtemp_r, (struct _reent *, char *)); char * _mkdtemp_r (struct _reent *, char *);
int _EXFUN(_mkostemp_r, (struct _reent *, char *, int)); int _mkostemp_r (struct _reent *, char *, int);
int _EXFUN(_mkostemps_r, (struct _reent *, char *, int, int)); int _mkostemps_r (struct _reent *, char *, int, int);
int _EXFUN(_mkstemp_r, (struct _reent *, char *)); int _mkstemp_r (struct _reent *, char *);
int _EXFUN(_mkstemps_r, (struct _reent *, char *, int)); int _mkstemps_r (struct _reent *, char *, int);
#if (__GNUC__ < 4) || defined(__XTENSA__) char * _mktemp_r (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")));
char * _EXFUN(_mktemp_r, (struct _reent *, char *)); void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar);
#else int rand (void);
char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")))); void * realloc (void *__r, size_t __size) _NOTHROW;
#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));
#if __BSD_VISIBLE #if __BSD_VISIBLE
void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
__alloc_size(3); __alloc_size(3);
_PTR _EXFUN(reallocf,(_PTR __r, size_t __size)); void * reallocf (void *__r, size_t __size);
#endif #endif
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 #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 #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(rpmatch, (const char *response)); int rpmatch (const char *response);
#endif #endif
#if __XSI_VISIBLE #if __XSI_VISIBLE
_VOID _EXFUN(setkey, (const char *__key)); void setkey (const char *__key);
#endif #endif
_VOID _EXFUN(srand,(unsigned __seed)); void srand (unsigned __seed);
double _EXFUN(strtod,(const char *__restrict __n, char **__restrict __end_PTR)); double strtod (const char *__restrict __n, char **__restrict __end_PTR);
double _EXFUN(_strtod_r,(struct _reent *,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 #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 #endif
#if __MISC_VISIBLE #if __MISC_VISIBLE
/* the following strtodf interface is deprecated...use strtof instead */ /* 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 # define strtodf strtof
# endif # endif
#endif #endif
long _EXFUN(strtol,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); long 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)); long _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 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)); unsigned long _strtoul_r (struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base);
#if __GNU_VISIBLE #if __GNU_VISIBLE
double strtod_l (const char *__restrict, char **__restrict, locale_t); 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); locale_t __loc);
#endif #endif
int _EXFUN(system,(const char *__string)); int system (const char *__string);
#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 #if __SVID_VISIBLE || __XSI_VISIBLE >= 4
long _EXFUN(a64l,(const char *__input)); long a64l (const char *__input);
char * _EXFUN(l64a,(long __input)); char * l64a (long __input);
char * _EXFUN(_l64a_r,(struct _reent *,long __input)); char * _l64a_r (struct _reent *,long __input);
#endif #endif
#if __MISC_VISIBLE #if __MISC_VISIBLE
int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg)); int on_exit (void (*__func)(int, void *),void *__arg);
#endif #endif
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__))); void _Exit (int __status) _ATTRIBUTE ((__noreturn__));
#endif #endif
#if __SVID_VISIBLE || __XSI_VISIBLE #if __SVID_VISIBLE || __XSI_VISIBLE
int _EXFUN(putenv,(char *__string)); int putenv (char *__string);
#endif #endif
int _EXFUN(_putenv_r,(struct _reent *, char *__string)); int _putenv_r (struct _reent *, char *__string);
_PTR _EXFUN(_reallocf_r,(struct _reent *, _PTR, size_t)); void * _reallocf_r (struct _reent *, void *, size_t);
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 #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 #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 #if __XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112
char * _EXFUN(gcvt,(double,int,char *)); char * gcvt (double,int,char *);
char * _EXFUN(gcvtf,(float,int,char *)); char * gcvtf (float,int,char *);
char * _EXFUN(fcvt,(double,int,int *,int *)); char * fcvt (double,int,int *,int *);
char * _EXFUN(fcvtf,(float,int,int *,int *)); char * fcvtf (float,int,int *,int *);
char * _EXFUN(ecvt,(double,int,int *,int *)); char * ecvt (double,int,int *,int *);
char * _EXFUN(ecvtbuf,(double, int, int*, int*, char *)); char * ecvtbuf (double, int, int*, int*, char *);
char * _EXFUN(fcvtbuf,(double, int, int*, int*, char *)); char * fcvtbuf (double, int, int*, int*, char *);
char * _EXFUN(ecvtf,(float,int,int *,int *)); char * ecvtf (float,int,int *,int *);
#endif #endif
char * _EXFUN(__itoa,(int, char *, int)); char * __itoa (int, char *, int);
char * _EXFUN(__utoa,(unsigned, char *, int)); char * __utoa (unsigned, char *, int);
#if __MISC_VISIBLE #if __MISC_VISIBLE
char * _EXFUN(itoa,(int, char *, int)); char * itoa (int, char *, int);
char * _EXFUN(utoa,(unsigned, char *, int)); char * utoa (unsigned, char *, int);
#endif #endif
#if __POSIX_VISIBLE #if __POSIX_VISIBLE
int _EXFUN(rand_r,(unsigned *__seed)); int rand_r (unsigned *__seed);
#endif #endif
#if __SVID_VISIBLE || __XSI_VISIBLE #if __SVID_VISIBLE || __XSI_VISIBLE
double _EXFUN(drand48,(_VOID)); double drand48 (void);
double _EXFUN(_drand48_r,(struct _reent *)); double _drand48_r (struct _reent *);
double _EXFUN(erand48,(unsigned short [3])); double erand48 (unsigned short [3]);
double _EXFUN(_erand48_r,(struct _reent *, unsigned short [3])); double _erand48_r (struct _reent *, unsigned short [3]);
long _EXFUN(jrand48,(unsigned short [3])); long jrand48 (unsigned short [3]);
long _EXFUN(_jrand48_r,(struct _reent *, unsigned short [3])); long _jrand48_r (struct _reent *, unsigned short [3]);
_VOID _EXFUN(lcong48,(unsigned short [7])); void lcong48 (unsigned short [7]);
_VOID _EXFUN(_lcong48_r,(struct _reent *, unsigned short [7])); void _lcong48_r (struct _reent *, unsigned short [7]);
long _EXFUN(lrand48,(_VOID)); long lrand48 (void);
long _EXFUN(_lrand48_r,(struct _reent *)); long _lrand48_r (struct _reent *);
long _EXFUN(mrand48,(_VOID)); long mrand48 (void);
long _EXFUN(_mrand48_r,(struct _reent *)); long _mrand48_r (struct _reent *);
long _EXFUN(nrand48,(unsigned short [3])); long nrand48 (unsigned short [3]);
long _EXFUN(_nrand48_r,(struct _reent *, unsigned short [3])); long _nrand48_r (struct _reent *, unsigned short [3]);
unsigned short * unsigned short *
_EXFUN(seed48,(unsigned short [3])); seed48 (unsigned short [3]);
unsigned short * unsigned short *
_EXFUN(_seed48_r,(struct _reent *, unsigned short [3])); _seed48_r (struct _reent *, unsigned short [3]);
_VOID _EXFUN(srand48,(long)); void srand48 (long);
_VOID _EXFUN(_srand48_r,(struct _reent *, long)); void _srand48_r (struct _reent *, long);
#endif /* __SVID_VISIBLE || __XSI_VISIBLE */ #endif /* __SVID_VISIBLE || __XSI_VISIBLE */
#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE #if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE
char * _EXFUN(initstate,(unsigned, char *, size_t)); char * initstate (unsigned, char *, size_t);
long _EXFUN(random,(_VOID)); long random (void);
char * _EXFUN(setstate,(char *)); char * setstate (char *);
_VOID _EXFUN(srandom,(unsigned)); void srandom (unsigned);
#endif #endif
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
long long _EXFUN(atoll,(const char *__nptr)); long long atoll (const char *__nptr);
#endif #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 #if __ISO_C_VISIBLE >= 1999
long long _EXFUN(llabs,(long long)); long long llabs (long long);
lldiv_t _EXFUN(lldiv,(long long __numer, long long __denom)); lldiv_t lldiv (long long __numer, long long __denom);
long long _EXFUN(strtoll,(const char *__restrict __n, char **__restrict __end_PTR, int __base)); long long strtoll (const char *__restrict __n, char **__restrict __end_PTR, int __base);
#endif #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 #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 #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__ #ifndef __CYGWIN__
#if __MISC_VISIBLE #if __MISC_VISIBLE
_VOID _EXFUN(cfree,(_PTR)); void cfree (void *);
#endif #endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(unsetenv,(const char *__string)); int unsetenv (const char *__string);
#endif #endif
int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string)); int _unsetenv_r (struct _reent *, const char *__string);
#endif /* !__CYGWIN__ */ #endif /* !__CYGWIN__ */
#if __POSIX_VISIBLE >= 200112 #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 #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__ #ifndef __CYGWIN__
_PTR _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t)); void * _malloc_r (struct _reent *, size_t) _NOTHROW;
_PTR _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t)); void * _calloc_r (struct _reent *, size_t, size_t) _NOTHROW;
_VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, _PTR)); void _free_r (struct _reent *, void *) _NOTHROW;
_PTR _EXFUN_NOTHROW(_realloc_r,(struct _reent *, _PTR, size_t)); void * _realloc_r (struct _reent *, void *, size_t) _NOTHROW;
_VOID _EXFUN(_mstats_r,(struct _reent *, char *)); void _mstats_r (struct _reent *, char *);
#endif #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 /* There are two common qsort_r variants. If you request
_BSD_SOURCE, you get the BSD version; otherwise you get the GNU _BSD_SOURCE, you get the BSD version; otherwise you get the GNU
version. We want that #undef qsort_r will still let you version. We want that #undef qsort_r will still let you
invoke the underlying function, but that requires gcc support. */ invoke the underlying function, but that requires gcc support. */
#if __GNU_VISIBLE #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 #elif __BSD_VISIBLE
# ifdef __GNUC__ # 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")); __asm__ (__ASMNAME ("__bsd_qsort_r"));
# else # 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 # define qsort_r __bsd_qsort_r
# endif # endif
#endif #endif

View file

@ -26,30 +26,30 @@
_BEGIN_STD_C _BEGIN_STD_C
_PTR _EXFUN(memchr,(const _PTR, int, size_t)); void * memchr (const void *, int, size_t);
int _EXFUN(memcmp,(const _PTR, const _PTR, size_t)); int memcmp (const void *, const void *, size_t);
_PTR _EXFUN(memcpy,(_PTR __restrict, const _PTR __restrict, size_t)); void * memcpy (void *__restrict, const void *__restrict, size_t);
_PTR _EXFUN(memmove,(_PTR, const _PTR, size_t)); void * memmove (void *, const void *, size_t);
_PTR _EXFUN(memset,(_PTR, int, size_t)); void * memset (void *, int, size_t);
char *_EXFUN(strcat,(char *__restrict, const char *__restrict)); char *strcat (char *__restrict, const char *__restrict);
char *_EXFUN(strchr,(const char *, int)); char *strchr (const char *, int);
int _EXFUN(strcmp,(const char *, const char *)); int strcmp (const char *, const char *);
int _EXFUN(strcoll,(const char *, const char *)); int strcoll (const char *, const char *);
char *_EXFUN(strcpy,(char *__restrict, const char *__restrict)); char *strcpy (char *__restrict, const char *__restrict);
size_t _EXFUN(strcspn,(const char *, const char *)); size_t strcspn (const char *, const char *);
char *_EXFUN(strerror,(int)); char *strerror (int);
size_t _EXFUN(strlen,(const char *)); size_t strlen (const char *);
char *_EXFUN(strncat,(char *__restrict, const char *__restrict, size_t)); char *strncat (char *__restrict, const char *__restrict, size_t);
int _EXFUN(strncmp,(const char *, const char *, size_t)); int strncmp (const char *, const char *, size_t);
char *_EXFUN(strncpy,(char *__restrict, const char *__restrict, size_t)); char *strncpy (char *__restrict, const char *__restrict, size_t);
char *_EXFUN(strpbrk,(const char *, const char *)); char *strpbrk (const char *, const char *);
char *_EXFUN(strrchr,(const char *, int)); char *strrchr (const char *, int);
size_t _EXFUN(strspn,(const char *, const char *)); size_t strspn (const char *, const char *);
char *_EXFUN(strstr,(const char *, const char *)); char *strstr (const char *, const char *);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
char *_EXFUN(strtok,(char *__restrict, const char *__restrict)); char *strtok (char *__restrict, const char *__restrict);
#endif #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 #if __POSIX_VISIBLE >= 200809
int strcoll_l (const char *, const char *, locale_t); 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); size_t strxfrm_l (char *__restrict, const char *__restrict, size_t, locale_t);
#endif #endif
#if __MISC_VISIBLE || __POSIX_VISIBLE #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 #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(timingsafe_bcmp,(const void *, const void *, size_t)); int timingsafe_bcmp (const void *, const void *, size_t);
int _EXFUN(timingsafe_memcmp,(const void *, const void *, size_t)); int timingsafe_memcmp (const void *, const void *, size_t);
#endif #endif
#if __MISC_VISIBLE || __POSIX_VISIBLE #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 #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
_PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); void * mempcpy (void *, const void *, size_t);
_PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); void * memmem (const void *, size_t, const void *, size_t);
_PTR _EXFUN(memrchr,(const _PTR, int, size_t)); void * memrchr (const void *, int, size_t);
_PTR _EXFUN(rawmemchr,(const _PTR, int)); void * rawmemchr (const void *, int);
#endif #endif
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict)); char *stpcpy (char *__restrict, const char *__restrict);
char *_EXFUN(stpncpy,(char *__restrict, const char *__restrict, size_t)); char *stpncpy (char *__restrict, const char *__restrict, size_t);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
char *_EXFUN(strcasestr,(const char *, const char *)); char *strcasestr (const char *, const char *);
char *_EXFUN(strchrnul,(const char *, int)); char *strchrnul (const char *, int);
#endif #endif
#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 #if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4
char *_EXFUN(strdup,(const char *)); char *strdup (const char *);
#endif #endif
char *_EXFUN(_strdup_r,(struct _reent *, const char *)); char *_strdup_r (struct _reent *, const char *);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
char *_EXFUN(strndup,(const char *, size_t)); char *strndup (const char *, size_t);
#endif #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 /* There are two common strerror_r variants. If you request
_GNU_SOURCE, you get the GNU version; otherwise you get the POSIX _GNU_SOURCE, you get the GNU version; otherwise you get the POSIX
version. POSIX requires that #undef strerror_r will still let you version. POSIX requires that #undef strerror_r will still let you
invoke the underlying function, but that requires gcc support. */ invoke the underlying function, but that requires gcc support. */
#if __GNU_VISIBLE #if __GNU_VISIBLE
char *_EXFUN(strerror_r,(int, char *, size_t)); char *strerror_r (int, char *, size_t);
#elif __POSIX_VISIBLE >= 200112 #elif __POSIX_VISIBLE >= 200112
# ifdef __GNUC__ # ifdef __GNUC__
int _EXFUN(strerror_r,(int, char *, size_t)) int strerror_r (int, char *, size_t)
#ifdef __ASMNAME #ifdef __ASMNAME
__asm__ (__ASMNAME ("__xpg_strerror_r")) __asm__ (__ASMNAME ("__xpg_strerror_r"))
#endif #endif
; ;
# else # else
int _EXFUN(__xpg_strerror_r,(int, char *, size_t)); int __xpg_strerror_r (int, char *, size_t);
# define strerror_r __xpg_strerror_r # define strerror_r __xpg_strerror_r
# endif # endif
#endif #endif
/* Reentrant version of strerror. */ /* Reentrant version of strerror. */
char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *)); char * _strerror_r (struct _reent *, int, int, int *);
#if __BSD_VISIBLE #if __BSD_VISIBLE
size_t _EXFUN(strlcat,(char *, const char *, size_t)); size_t strlcat (char *, const char *, size_t);
size_t _EXFUN(strlcpy,(char *, const char *, size_t)); size_t strlcpy (char *, const char *, size_t);
#endif #endif
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
size_t _EXFUN(strnlen,(const char *, size_t)); size_t strnlen (const char *, size_t);
#endif #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
char *_EXFUN(strsep,(char **, const char *)); char *strsep (char **, const char *);
#endif #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
char *strnstr(const char *, const char *, size_t) __pure; char *strnstr(const char *, const char *, size_t) __pure;
#endif #endif
#if __MISC_VISIBLE #if __MISC_VISIBLE
char *_EXFUN(strlwr,(char *)); char *strlwr (char *);
char *_EXFUN(strupr,(char *)); char *strupr (char *);
#endif #endif
#ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ #ifndef DEFS_H /* Kludge to work around problem compiling in gdb */
char *_EXFUN(strsignal, (int __signo)); char *strsignal (int __signo);
#endif #endif
#ifdef __CYGWIN__ #ifdef __CYGWIN__
int _EXFUN(strtosigno, (const char *__name)); int strtosigno (const char *__name);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(strverscmp,(const char *, const char *)); int strverscmp (const char *, const char *);
#endif #endif
#if __GNU_VISIBLE && defined(__GNUC__) #if __GNU_VISIBLE && defined(__GNUC__)
@ -169,7 +169,7 @@ int _EXFUN(strverscmp,(const char *, const char *));
sure here. */ sure here. */
#if __GNU_VISIBLE && !defined(basename) #if __GNU_VISIBLE && !defined(basename)
# define basename 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 #endif
#include <sys/string.h> #include <sys/string.h>

View file

@ -199,27 +199,27 @@ struct eflock {
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> /* sigh. for the mode bits for open/creat */ #include <sys/stat.h> /* sigh. for the mode bits for open/creat */
extern int open _PARAMS ((const char *, int, ...)); extern int open (const char *, int, ...);
#if __ATFILE_VISIBLE #if __ATFILE_VISIBLE
extern int openat _PARAMS ((int, const char *, int, ...)); extern int openat (int, const char *, int, ...);
#endif #endif
extern int creat _PARAMS ((const char *, mode_t)); extern int creat (const char *, mode_t);
extern int fcntl _PARAMS ((int, int, ...)); extern int fcntl (int, int, ...);
#if __BSD_VISIBLE #if __BSD_VISIBLE
extern int flock _PARAMS ((int, int)); extern int flock (int, int);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
#include <sys/time.h> #include <sys/time.h>
extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); extern int futimesat (int, const char *, const struct timeval *);
#endif #endif
/* Provide _<systemcall> prototypes for functions provided by some versions /* Provide _<systemcall> prototypes for functions provided by some versions
of newlib. */ of newlib. */
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
extern int _open _PARAMS ((const char *, int, ...)); extern int _open (const char *, int, ...);
extern int _fcntl _PARAMS ((int, int, ...)); extern int _fcntl (int, int, ...);
#ifdef __LARGE64_FILES #ifdef __LARGE64_FILES
extern int _open64 _PARAMS ((const char *, int, ...)); extern int _open64 (const char *, int, ...);
#endif #endif
#endif #endif

View file

@ -385,7 +385,7 @@
#endif #endif
#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) #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 #else
#define __always_inline #define __always_inline
#endif #endif

View file

@ -12,12 +12,12 @@ extern "C" {
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#define errno (*__errno()) #define errno (*__errno())
extern int *__errno _PARAMS ((void)); extern int *__errno (void);
#endif #endif
/* Please don't use these variables directly. /* Please don't use these variables directly.
Use strerror instead. */ Use strerror instead. */
extern __IMPORT _CONST char * _CONST _sys_errlist[]; extern __IMPORT const char * const _sys_errlist[];
extern __IMPORT int _sys_nerr; extern __IMPORT int _sys_nerr;
#ifdef __CYGWIN__ #ifdef __CYGWIN__
extern __IMPORT const char * const sys_errlist[]; extern __IMPORT const char * const sys_errlist[];

View file

@ -44,34 +44,34 @@
#define ICONV_NLS_FROM 0 #define ICONV_NLS_FROM 0
#define ICONV_NLS_TO 1 #define ICONV_NLS_TO 1
_VOID void
_EXFUN(_iconv_nls_get_state, (iconv_t cd, mbstate_t *ps, int direction)); _iconv_nls_get_state (iconv_t cd, mbstate_t *ps, int direction);
int 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 int
_EXFUN(_iconv_nls_is_stateful, (iconv_t cd, int direction)); _iconv_nls_is_stateful (iconv_t cd, int direction);
int 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 size_t
_EXFUN(_iconv_nls_conv, (struct _reent *rptr, iconv_t cd, _iconv_nls_conv (struct _reent *rptr, iconv_t cd,
_CONST char **inbuf, size_t *inbytesleft, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)); char **outbuf, size_t *outbytesleft);
_CONST char * const char *
_EXFUN(_iconv_nls_construct_filename, (struct _reent *rptr, _CONST char *file, _iconv_nls_construct_filename (struct _reent *rptr, const char *file,
_CONST char *dir, _CONST char *ext)); const char *dir, const char *ext);
int int
_EXFUN(_iconv_nls_open, (struct _reent *rptr, _CONST char *encoding, _iconv_nls_open (struct _reent *rptr, const char *encoding,
iconv_t *towc, iconv_t *fromwc, int flag)); iconv_t *towc, iconv_t *fromwc, int flag);
char * 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__ */ #endif /* __SYS_ICONVNLS_H__ */

View file

@ -165,7 +165,7 @@ struct __sFILE_fake {
/* Following is needed both in libc/stdio and libc/stdlib so we put it /* 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. */ * 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) \ # define _REENT_SMALL_CHECK_INIT(ptr) \
do \ do \
@ -192,15 +192,15 @@ struct __sFILE {
#endif #endif
/* operations */ /* operations */
_PTR _cookie; /* cookie passed to io functions */ void * _cookie; /* cookie passed to io functions */
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR, _READ_WRITE_RETURN_TYPE (*_read) (struct _reent *, void *,
char *, _READ_WRITE_BUFSIZE_TYPE)); char *, _READ_WRITE_BUFSIZE_TYPE);
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR, _READ_WRITE_RETURN_TYPE (*_write) (struct _reent *, void *,
const char *, const char *,
_READ_WRITE_BUFSIZE_TYPE)); _READ_WRITE_BUFSIZE_TYPE);
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int);
int _EXFNPTR(_close, (struct _reent *, _PTR)); int (*_close) (struct _reent *, void *);
/* separate buffer for long sequences of ungetc() */ /* separate buffer for long sequences of ungetc() */
struct __sbuf _ub; /* ungetc buffer */ struct __sbuf _ub; /* ungetc buffer */
@ -248,15 +248,15 @@ struct __sFILE64 {
struct _reent *_data; struct _reent *_data;
/* operations */ /* operations */
_PTR _cookie; /* cookie passed to io functions */ void * _cookie; /* cookie passed to io functions */
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR, _READ_WRITE_RETURN_TYPE (*_read) (struct _reent *, void *,
char *, _READ_WRITE_BUFSIZE_TYPE)); char *, _READ_WRITE_BUFSIZE_TYPE);
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR, _READ_WRITE_RETURN_TYPE (*_write) (struct _reent *, void *,
const char *, const char *,
_READ_WRITE_BUFSIZE_TYPE)); _READ_WRITE_BUFSIZE_TYPE);
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int);
int _EXFNPTR(_close, (struct _reent *, _PTR)); int (*_close) (struct _reent *, void *);
/* separate buffer for long sequences of ungetc() */ /* separate buffer for long sequences of ungetc() */
struct __sbuf _ub; /* ungetc buffer */ struct __sbuf _ub; /* ungetc buffer */
@ -275,7 +275,7 @@ struct __sFILE64 {
int _flags2; /* for future use */ int _flags2; /* for future use */
_off64_t _offset; /* current lseek offset */ _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__ #ifndef __SINGLE_THREAD__
_flock_t _lock; /* for thread-safety locking */ _flock_t _lock; /* for thread-safety locking */
@ -391,7 +391,7 @@ struct _reent
struct _mprec *_mp; struct _mprec *_mp;
void _EXFNPTR(__cleanup, (struct _reent *)); void (*__cleanup) (struct _reent *);
int _gamma_signgam; int _gamma_signgam;
@ -584,7 +584,7 @@ struct _reent
int __sdidinit; /* 1 means stdio has been init'd */ int __sdidinit; /* 1 means stdio has been init'd */
void _EXFNPTR(__cleanup, (struct _reent *)); void (*__cleanup) (struct _reent *);
/* used by mprec routines */ /* used by mprec routines */
struct _Bigint *_result; struct _Bigint *_result;
@ -773,15 +773,15 @@ extern __FILE __sf[3];
#endif #endif
extern struct _reent *_impure_ptr __ATTRIBUTE_IMPURE_PTR__; 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 */ /* #define _REENT_ONLY define this to get only reentrant routines */
#if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__) #if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__)
#ifndef __getreent #ifndef __getreent
struct _reent * _EXFUN(__getreent, (void)); struct _reent * __getreent (void);
#endif #endif
# define _REENT (__getreent()) # define _REENT (__getreent())
#else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */ #else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */

View file

@ -11,7 +11,7 @@ struct rusage {
struct timeval ru_stime; /* system time used */ struct timeval ru_stime; /* system time used */
}; };
int _EXFUN(getrusage, (int, struct rusage*)); int getrusage (int, struct rusage*);
#endif #endif

View file

@ -1,14 +1,3 @@
/* select.h
Copyright 1998, 1999, 2000, 2001, 2005, 2009 Red Hat, Inc.
Written by Geoffrey Noer <noer@cygnus.com>
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 #ifndef _SYS_SELECT_H
#define _SYS_SELECT_H #define _SYS_SELECT_H

View file

@ -161,36 +161,34 @@ typedef struct sigaltstack {
#define SIG_BLOCK 1 /* set of signals to block */ #define SIG_BLOCK 1 /* set of signals to block */
#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */ #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 #endif
#if __POSIX_VISIBLE >= 199506 #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 #endif
#if defined(__CYGWIN__) || defined(__rtems__)
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(_kill, (pid_t, int)); int _kill (pid_t, int);
#endif /* _COMPILING_NEWLIB */ #endif /* _COMPILING_NEWLIB */
#endif /* __CYGWIN__ || __rtems__ */
#if __POSIX_VISIBLE #if __POSIX_VISIBLE
int _EXFUN(kill, (pid_t, int)); int kill (pid_t, int);
#endif #endif
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4
int _EXFUN(killpg, (pid_t, int)); int killpg (pid_t, int);
#endif #endif
#if __POSIX_VISIBLE #if __POSIX_VISIBLE
int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *)); int sigaction (int, const struct sigaction *, struct sigaction *);
int _EXFUN(sigaddset, (sigset_t *, const int)); int sigaddset (sigset_t *, const int);
int _EXFUN(sigdelset, (sigset_t *, const int)); int sigdelset (sigset_t *, const int);
int _EXFUN(sigismember, (const sigset_t *, int)); int sigismember (const sigset_t *, int);
int _EXFUN(sigfillset, (sigset_t *)); int sigfillset (sigset_t *);
int _EXFUN(sigemptyset, (sigset_t *)); int sigemptyset (sigset_t *);
int _EXFUN(sigpending, (sigset_t *)); int sigpending (sigset_t *);
int _EXFUN(sigsuspend, (const sigset_t *)); int sigsuspend (const sigset_t *);
int _EXFUN(sigwait, (const sigset_t *set, int *sig)); int sigwait (const sigset_t *set, int *sig);
#if !defined(__CYGWIN__) && !defined(__rtems__) #if !defined(__CYGWIN__) && !defined(__rtems__)
/* These depend upon the type of sigset_t, which right now /* 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. */ value. */
#if __XSI_VISIBLE && !defined(__INSIDE_CYGWIN__) #if __XSI_VISIBLE && !defined(__INSIDE_CYGWIN__)
# ifdef __GNUC__ # ifdef __GNUC__
int _EXFUN(sigpause, (int)) __asm__ (__ASMNAME ("__xpg_sigpause")); int sigpause (int) __asm__ (__ASMNAME ("__xpg_sigpause"));
# else # else
int _EXFUN(__xpg_sigpause, (int)); int __xpg_sigpause (int);
# define sigpause __xpg_sigpause # define sigpause __xpg_sigpause
# endif # endif
#elif __BSD_VISIBLE #elif __BSD_VISIBLE
int _EXFUN(sigpause, (int)); int sigpause (int);
#endif #endif
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 #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 #endif
#if __POSIX_VISIBLE >= 199506 #if __POSIX_VISIBLE >= 199506
int _EXFUN(pthread_kill, (pthread_t thread, int sig)); int pthread_kill (pthread_t thread, int sig);
#endif #endif
#if __POSIX_VISIBLE >= 199309 #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 /* 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
NOTE: P1003.1c/D10, p. 39 adds sigwait(). */ NOTE: P1003.1c/D10, p. 39 adds sigwait(). */
int _EXFUN(sigwaitinfo, (const sigset_t *set, siginfo_t *info)); int sigwaitinfo (const sigset_t *set, siginfo_t *info);
int _EXFUN(sigtimedwait, int sigtimedwait (const sigset_t *set, siginfo_t *info,
(const sigset_t *set, siginfo_t *info, const struct timespec *timeout) const struct timespec *timeout);
);
/* 3.3.9 Queue a Signal to a Process, P1003.1b-1993, p. 78 */ /* 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 */ #endif /* __POSIX_VISIBLE >= 199309 */

View file

@ -144,41 +144,41 @@ struct stat
#define UTIME_OMIT -1L #define UTIME_OMIT -1L
#endif #endif
int _EXFUN(chmod,( const char *__path, mode_t __mode )); int chmod (const char *__path, mode_t __mode );
int _EXFUN(fchmod,(int __fd, mode_t __mode)); int fchmod (int __fd, mode_t __mode);
int _EXFUN(fstat,( int __fd, struct stat *__sbuf )); int fstat (int __fd, struct stat *__sbuf );
int _EXFUN(mkdir,( const char *_path, mode_t __mode )); int mkdir (const char *_path, mode_t __mode );
int _EXFUN(mkfifo,( const char *__path, mode_t __mode )); int mkfifo (const char *__path, mode_t __mode );
int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf )); int stat (const char *__restrict __path, struct stat *__restrict __sbuf );
mode_t _EXFUN(umask,( mode_t __mask )); mode_t umask (mode_t __mask );
#if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__) #if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
int _EXFUN(lstat,( const char *__restrict __path, struct stat *__restrict __buf )); int lstat (const char *__restrict __path, struct stat *__restrict __buf );
int _EXFUN(mknod,( const char *__path, mode_t __mode, dev_t __dev )); int mknod (const char *__path, mode_t __mode, dev_t __dev );
#endif #endif
#if __ATFILE_VISIBLE && !defined(__INSIDE_CYGWIN__) #if __ATFILE_VISIBLE && !defined(__INSIDE_CYGWIN__)
int _EXFUN(fchmodat, (int, const char *, mode_t, int)); int fchmodat (int, const char *, mode_t, int);
int _EXFUN(fstatat, (int, const char *__restrict , struct stat *__restrict, int)); int fstatat (int, const char *__restrict , struct stat *__restrict, int);
int _EXFUN(mkdirat, (int, const char *, mode_t)); int mkdirat (int, const char *, mode_t);
int _EXFUN(mkfifoat, (int, const char *, mode_t)); int mkfifoat (int, const char *, mode_t);
int _EXFUN(mknodat, (int, const char *, mode_t, dev_t)); int mknodat (int, const char *, mode_t, dev_t);
int _EXFUN(utimensat, (int, const char *, const struct timespec *, int)); int utimensat (int, const char *, const struct timespec *, int);
#endif #endif
#if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__) #if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__)
int _EXFUN(futimens, (int, const struct timespec *)); int futimens (int, const struct timespec *);
#endif #endif
/* Provide prototypes for most of the _<systemcall> names that are /* Provide prototypes for most of the _<systemcall> names that are
provided in newlib for some compilers. */ provided in newlib for some compilers. */
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(_fstat,( int __fd, struct stat *__sbuf )); int _fstat (int __fd, struct stat *__sbuf );
int _EXFUN(_stat,( const char *__restrict __path, struct stat *__restrict __sbuf )); int _stat (const char *__restrict __path, struct stat *__restrict __sbuf );
int _EXFUN(_mkdir,( const char *_path, mode_t __mode )); int _mkdir (const char *_path, mode_t __mode );
#ifdef __LARGE64_FILES #ifdef __LARGE64_FILES
struct stat64; struct stat64;
int _EXFUN(_stat64,( const char *__restrict __path, struct stat64 *__restrict __sbuf )); int _stat64 (const char *__restrict __path, struct stat64 *__restrict __sbuf );
int _EXFUN(_fstat64,( int __fd, struct stat64 *__sbuf )); int _fstat64 (int __fd, struct stat64 *__sbuf );
#endif #endif
#endif #endif

View file

@ -12,7 +12,7 @@
#ifndef __SINGLE_THREAD__ #ifndef __SINGLE_THREAD__
# define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_acquire_recursive((fp)->_lock)) # define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_acquire_recursive((fp)->_lock))
#else #else
# define _flockfile(fp) (_CAST_VOID 0) # define _flockfile(fp) ((void) 0)
#endif #endif
#endif #endif
@ -20,7 +20,7 @@
#ifndef __SINGLE_THREAD__ #ifndef __SINGLE_THREAD__
# define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_release_recursive((fp)->_lock)) # define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_release_recursive((fp)->_lock))
#else #else
# define _funlockfile(fp) (_CAST_VOID 0) # define _funlockfile(fp) ((void) 0)
#endif #endif
#endif #endif

View file

@ -268,30 +268,30 @@ struct itimerval {
#include <time.h> #include <time.h>
__BEGIN_DECLS __BEGIN_DECLS
int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp)); int utimes (const char *__path, const struct timeval *__tvp);
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(adjtime, (const struct timeval *, struct timeval *)); int adjtime (const struct timeval *, struct timeval *);
int _EXFUN(futimes, (int, const struct timeval *)); int futimes (int, const struct timeval *);
int _EXFUN(lutimes, (const char *, const struct timeval *)); int lutimes (const char *, const struct timeval *);
int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *)); int settimeofday (const struct timeval *, const struct timezone *);
#endif #endif
#if __MISC_VISIBLE || __XSI_VISIBLE #if __MISC_VISIBLE || __XSI_VISIBLE
int _EXFUN(getitimer, (int __which, struct itimerval *__value)); int getitimer (int __which, struct itimerval *__value);
int _EXFUN(setitimer, (int __which, const struct itimerval *__restrict __value, int setitimer (int __which, const struct itimerval *__restrict __value,
struct itimerval *__restrict __ovalue)); struct itimerval *__restrict __ovalue);
#endif #endif
int _EXFUN(gettimeofday, (struct timeval *__restrict __p, int gettimeofday (struct timeval *__restrict __p,
void *__restrict __tz)); void *__restrict __tz);
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(futimesat, (int, const char *, const struct timeval [2])); int futimesat (int, const char *, const struct timeval [2]);
#endif #endif
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(_gettimeofday, (struct timeval *__p, void *__tz)); int _gettimeofday (struct timeval *__p, void *__tz);
#endif #endif
__END_DECLS __END_DECLS

View file

@ -31,7 +31,7 @@ struct timeb
short dstflag; short dstflag;
}; };
extern int ftime _PARAMS ((struct timeb *)); extern int ftime (struct timeb *);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -21,9 +21,9 @@ struct tms {
clock_t tms_cstime; /* system time, children */ clock_t tms_cstime; /* system time, children */
}; };
clock_t _EXFUN(times,(struct tms *)); clock_t times (struct tms *);
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
clock_t _EXFUN(_times,(struct tms *)); clock_t _times (struct tms *);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -15,234 +15,234 @@ extern "C" {
extern char **environ; extern char **environ;
void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((__noreturn__))); void _exit (int __status) _ATTRIBUTE ((__noreturn__));
int _EXFUN(access,(const char *__path, int __amode )); int access (const char *__path, int __amode);
unsigned _EXFUN(alarm, (unsigned __secs )); unsigned alarm (unsigned __secs);
int _EXFUN(chdir, (const char *__path )); int chdir (const char *__path);
int _EXFUN(chmod, (const char *__path, mode_t __mode )); int chmod (const char *__path, mode_t __mode);
#if !defined(__INSIDE_CYGWIN__) #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 #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
int _EXFUN(chroot, (const char *__path )); int chroot (const char *__path);
#endif #endif
int _EXFUN(close, (int __fildes )); int close (int __fildes);
#if __POSIX_VISIBLE >= 199209 #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 #endif
#if __XSI_VISIBLE #if __XSI_VISIBLE
char * _EXFUN(crypt, (const char *__key, const char *__salt)); char * crypt (const char *__key, const char *__salt);
#endif #endif
#if __XSI_VISIBLE && __XSI_VISIBLE < 700 #if __XSI_VISIBLE && __XSI_VISIBLE < 700
char * _EXFUN(ctermid, (char *__s )); char * ctermid (char *__s);
#endif #endif
#if __XSI_VISIBLE && __XSI_VISIBLE < 600 #if __XSI_VISIBLE && __XSI_VISIBLE < 600
char * _EXFUN(cuserid, (char *__s )); char * cuserid (char *__s);
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
int _EXFUN(daemon, (int nochdir, int noclose)); int daemon (int nochdir, int noclose);
#endif #endif
int _EXFUN(dup, (int __fildes )); int dup (int __fildes);
int _EXFUN(dup2, (int __fildes, int __fildes2 )); int dup2 (int __fildes, int __fildes2);
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(dup3, (int __fildes, int __fildes2, int flags)); int dup3 (int __fildes, int __fildes2, int flags);
int _EXFUN(eaccess, (const char *__path, int __mode)); int eaccess (const char *__path, int __mode);
#endif #endif
#if __XSI_VISIBLE #if __XSI_VISIBLE
void _EXFUN(encrypt, (char *__block, int __edflag)); void encrypt (char *__block, int __edflag);
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
void _EXFUN(endusershell, (void)); void endusershell (void);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(euidaccess, (const char *__path, int __mode)); int euidaccess (const char *__path, int __mode);
#endif #endif
int _EXFUN(execl, (const char *__path, const char *, ... )); int execl (const char *__path, const char *, ...);
int _EXFUN(execle, (const char *__path, const char *, ... )); int execle (const char *__path, const char *, ...);
int _EXFUN(execlp, (const char *__file, const char *, ... )); int execlp (const char *__file, const char *, ...);
#if __MISC_VISIBLE #if __MISC_VISIBLE
int _EXFUN(execlpe, (const char *__file, const char *, ... )); int execlpe (const char *__file, const char *, ...);
#endif #endif
int _EXFUN(execv, (const char *__path, char * const __argv[] )); int execv (const char *__path, char * const __argv[]);
int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] )); int execve (const char *__path, char * const __argv[], char * const __envp[]);
int _EXFUN(execvp, (const char *__file, char * const __argv[] )); int execvp (const char *__file, char * const __argv[]);
#if __GNU_VISIBLE #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 #endif
#if __ATFILE_VISIBLE #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 #endif
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
int _EXFUN(fchdir, (int __fildes)); int fchdir (int __fildes);
#endif #endif
#if __POSIX_VISIBLE >= 199309 #if __POSIX_VISIBLE >= 199309
int _EXFUN(fchmod, (int __fildes, mode_t __mode )); int fchmod (int __fildes, mode_t __mode);
#endif #endif
#if !defined(__INSIDE_CYGWIN__) #if !defined(__INSIDE_CYGWIN__)
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 #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
#endif #endif
#if __ATFILE_VISIBLE #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 #endif
#if __POSIX_VISIBLE >= 200809 #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 #endif
pid_t _EXFUN(fork, (void )); pid_t fork (void);
long _EXFUN(fpathconf, (int __fd, int __name )); long fpathconf (int __fd, int __name);
int _EXFUN(fsync, (int __fd)); int fsync (int __fd);
#if __POSIX_VISIBLE >= 199309 #if __POSIX_VISIBLE >= 199309
int _EXFUN(fdatasync, (int __fd)); int fdatasync (int __fd);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
char * _EXFUN(get_current_dir_name, (void)); char * get_current_dir_name (void);
#endif #endif
char * _EXFUN(getcwd, (char *__buf, size_t __size )); char * getcwd (char *__buf, size_t __size);
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
int _EXFUN(getdomainname ,(char *__name, size_t __len)); int getdomainname (char *__name, size_t __len);
#endif #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(getentropy, (void *, size_t)); int getentropy (void *, size_t);
#endif #endif
#if !defined(__INSIDE_CYGWIN__) #if !defined(__INSIDE_CYGWIN__)
gid_t _EXFUN(getegid, (void )); gid_t getegid (void);
uid_t _EXFUN(geteuid, (void )); uid_t geteuid (void);
gid_t _EXFUN(getgid, (void )); gid_t getgid (void);
#endif #endif
int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] )); int getgroups (int __gidsetsize, gid_t __grouplist[]);
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4
long _EXFUN(gethostid, (void)); long gethostid (void);
#endif #endif
char * _EXFUN(getlogin, (void )); char * getlogin (void);
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) #if defined(_POSIX_THREAD_SAFE_FUNCTIONS)
int _EXFUN(getlogin_r, (char *name, size_t namesize) ); int getlogin_r (char *name, size_t namesize) ;
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) #if __BSD_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112)
char * _EXFUN(getpass, (const char *__prompt)); char * getpass (const char *__prompt);
int _EXFUN(getpagesize, (void)); int getpagesize (void);
#endif #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(getpeereid, (int, uid_t *, gid_t *)); int getpeereid (int, uid_t *, gid_t *);
#endif #endif
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4
pid_t _EXFUN(getpgid, (pid_t)); pid_t getpgid (pid_t);
#endif #endif
pid_t _EXFUN(getpgrp, (void )); pid_t getpgrp (void);
pid_t _EXFUN(getpid, (void )); pid_t getpid (void);
pid_t _EXFUN(getppid, (void )); pid_t getppid (void);
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4
pid_t _EXFUN(getsid, (pid_t)); pid_t getsid (pid_t);
#endif #endif
#if !defined(__INSIDE_CYGWIN__) #if !defined(__INSIDE_CYGWIN__)
uid_t _EXFUN(getuid, (void )); uid_t getuid (void);
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
char * _EXFUN(getusershell, (void)); char * getusershell (void);
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809)
char * _EXFUN(getwd, (char *__buf )); char * getwd (char *__buf);
#endif #endif
#if __BSD_VISIBLE #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 #endif
int _EXFUN(isatty, (int __fildes )); int isatty (int __fildes);
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(issetugid, (void)); int issetugid (void);
#endif #endif
#if !defined(__INSIDE_CYGWIN__) #if !defined(__INSIDE_CYGWIN__)
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809 #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
#endif #endif
int _EXFUN(link, (const char *__path1, const char *__path2 )); int link (const char *__path1, const char *__path2);
#if __ATFILE_VISIBLE #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 #endif
#if __MISC_VISIBLE || __XSI_VISIBLE #if __MISC_VISIBLE || __XSI_VISIBLE
int _EXFUN(nice, (int __nice_value )); int nice (int __nice_value);
#endif #endif
#if !defined(__INSIDE_CYGWIN__) #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 #endif
#if __MISC_VISIBLE || __XSI_VISIBLE >= 4 #if __MISC_VISIBLE || __XSI_VISIBLE >= 4
#define F_ULOCK 0 #define F_ULOCK 0
#define F_LOCK 1 #define F_LOCK 1
#define F_TLOCK 2 #define F_TLOCK 2
#define F_TEST 3 #define F_TEST 3
int _EXFUN(lockf, (int __fd, int __cmd, off_t __len)); int lockf (int __fd, int __cmd, off_t __len);
#endif #endif
long _EXFUN(pathconf, (const char *__path, int __name )); long pathconf (const char *__path, int __name);
int _EXFUN(pause, (void )); int pause (void);
#if __POSIX_VISIBLE >= 199506 #if __POSIX_VISIBLE >= 199506
int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void))); int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
#endif #endif
int _EXFUN(pipe, (int __fildes[2] )); int pipe (int __fildes[2]);
#if __GNU_VISIBLE #if __GNU_VISIBLE
int _EXFUN(pipe2, (int __fildes[2], int flags)); int pipe2 (int __fildes[2], int flags);
#endif #endif
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500
ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset)); ssize_t 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 pwrite (int __fd, const void *__buf, size_t __nbytes, off_t __offset);
#endif #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 #if __BSD_VISIBLE
int _EXFUN(rresvport, (int *__alport)); int rresvport (int *__alport);
int _EXFUN(revoke, (char *__path)); int revoke (char *__path);
#endif #endif
int _EXFUN(rmdir, (const char *__path )); int rmdir (const char *__path);
#if __BSD_VISIBLE #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 #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
void * _EXFUN(sbrk, (ptrdiff_t __incr)); void * sbrk (ptrdiff_t __incr);
#endif #endif
#if !defined(__INSIDE_CYGWIN__) #if !defined(__INSIDE_CYGWIN__)
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(setegid, (gid_t __gid )); int setegid (gid_t __gid);
int _EXFUN(seteuid, (uid_t __uid )); int seteuid (uid_t __uid);
#endif #endif
int _EXFUN(setgid, (gid_t __gid )); int setgid (gid_t __gid);
#endif #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(setgroups, (int ngroups, const gid_t *grouplist )); int setgroups (int ngroups, const gid_t *grouplist);
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
int _EXFUN(sethostname, (const char *, size_t)); int sethostname (const char *, size_t);
#endif #endif
int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid )); int setpgid (pid_t __pid, pid_t __pgid);
#if __SVID_VISIBLE || __XSI_VISIBLE >= 500 #if __SVID_VISIBLE || __XSI_VISIBLE >= 500
int _EXFUN(setpgrp, (void )); int setpgrp (void);
#endif #endif
#if (__BSD_VISIBLE || __XSI_VISIBLE >= 4) && !defined(__INSIDE_CYGWIN__) #if (__BSD_VISIBLE || __XSI_VISIBLE >= 4) && !defined(__INSIDE_CYGWIN__)
int _EXFUN(setregid, (gid_t __rgid, gid_t __egid)); int setregid (gid_t __rgid, gid_t __egid);
int _EXFUN(setreuid, (uid_t __ruid, uid_t __euid)); int setreuid (uid_t __ruid, uid_t __euid);
#endif #endif
pid_t _EXFUN(setsid, (void )); pid_t setsid (void);
#if !defined(__INSIDE_CYGWIN__) #if !defined(__INSIDE_CYGWIN__)
int _EXFUN(setuid, (uid_t __uid )); int setuid (uid_t __uid);
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500) #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
void _EXFUN(setusershell, (void)); void setusershell (void);
#endif #endif
unsigned _EXFUN(sleep, (unsigned int __seconds )); unsigned sleep (unsigned int __seconds);
#if __XSI_VISIBLE #if __XSI_VISIBLE
void _EXFUN(swab, (const void *__restrict, void *__restrict, ssize_t)); void swab (const void *__restrict, void *__restrict, ssize_t);
#endif #endif
long _EXFUN(sysconf, (int __name )); long sysconf (int __name);
pid_t _EXFUN(tcgetpgrp, (int __fildes )); pid_t tcgetpgrp (int __fildes);
int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id )); int tcsetpgrp (int __fildes, pid_t __pgrp_id);
char * _EXFUN(ttyname, (int __fildes )); char * ttyname (int __fildes);
int _EXFUN(ttyname_r, (int, char *, size_t)); int ttyname_r (int, char *, size_t);
int _EXFUN(unlink, (const char *__path )); int unlink (const char *__path);
#if __XSI_VISIBLE >= 500 && __POSIX_VISIBLE < 200809 || __BSD_VISIBLE #if __XSI_VISIBLE >= 500 && __POSIX_VISIBLE < 200809 || __BSD_VISIBLE
int _EXFUN(usleep, (useconds_t __useconds)); int usleep (useconds_t __useconds);
#endif #endif
#if __BSD_VISIBLE #if __BSD_VISIBLE
int _EXFUN(vhangup, (void )); int vhangup (void);
#endif #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__ #ifdef __CYGWIN__
# define __UNISTD_GETOPT__ # define __UNISTD_GETOPT__
@ -256,69 +256,69 @@ extern int optreset; /* getopt(3) external variable */
#endif #endif
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809) #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809)
pid_t _EXFUN(vfork, (void )); pid_t vfork (void);
#endif #endif
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
/* Provide prototypes for most of the _<systemcall> names that are /* Provide prototypes for most of the _<systemcall> names that are
provided in newlib for some compilers. */ provided in newlib for some compilers. */
int _EXFUN(_close, (int __fildes )); int _close (int __fildes);
pid_t _EXFUN(_fork, (void )); pid_t _fork (void);
pid_t _EXFUN(_getpid, (void )); pid_t _getpid (void);
int _EXFUN(_isatty, (int __fildes )); int _isatty (int __fildes);
int _EXFUN(_link, (const char *__path1, const char *__path2 )); int _link (const char *__path1, const char *__path2);
_off_t _EXFUN(_lseek, (int __fildes, _off_t __offset, int __whence )); _off_t _lseek (int __fildes, _off_t __offset, int __whence);
#ifdef __LARGE64_FILES #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 #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);
void * _EXFUN(_sbrk, (ptrdiff_t __incr)); void * _sbrk (ptrdiff_t __incr);
int _EXFUN(_unlink, (const char *__path )); int _unlink (const char *__path);
_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);
int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] )); int _execve (const char *__path, char * const __argv[], char * const __envp[]);
#endif #endif
#if !defined(__INSIDE_CYGWIN__) #if !defined(__INSIDE_CYGWIN__)
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500
int _EXFUN(ftruncate, (int __fd, off_t __length)); int ftruncate (int __fd, off_t __length);
#endif #endif
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500
int _EXFUN(truncate, (const char *, off_t __length)); int truncate (const char *, off_t __length);
#endif #endif
#endif #endif
#if __BSD_VISIBLE || __POSIX_VISIBLE < 200112 #if __BSD_VISIBLE || __POSIX_VISIBLE < 200112
int _EXFUN(getdtablesize, (void)); int getdtablesize (void);
#endif #endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 500 #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 #endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 500
#if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) #if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
/* winsock[2].h defines as __stdcall, and with int as 2nd arg */ /* 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
#endif #endif
#if __MISC_VISIBLE #if __MISC_VISIBLE
int _EXFUN(setdtablesize, (int)); int setdtablesize (int);
#endif #endif
#if __BSD_VISIBLE || __XSI_VISIBLE >= 500 #if __BSD_VISIBLE || __XSI_VISIBLE >= 500
void _EXFUN(sync, (void)); void sync (void);
#endif #endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4
ssize_t _EXFUN(readlink, (const char *__restrict __path, ssize_t readlink (const char *__restrict __path,
char *__restrict __buf, size_t __buflen)); char *__restrict __buf, size_t __buflen);
int _EXFUN(symlink, (const char *__name1, const char *__name2)); int symlink (const char *__name1, const char *__name2);
#endif #endif
#if __ATFILE_VISIBLE #if __ATFILE_VISIBLE
ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__restrict __path, ssize_t readlinkat (int __dirfd1, const char *__restrict __path,
char *__restrict __buf, size_t __buflen)); char *__restrict __buf, size_t __buflen);
int _EXFUN(symlinkat, (const char *, int, const char *)); int symlinkat (const char *, int, const char *);
int _EXFUN(unlinkat, (int, const char *, int)); int unlinkat (int, const char *, int);
#endif #endif
#define F_OK 0 #define F_OK 0
@ -582,6 +582,10 @@ int _EXFUN(unlinkat, (int, const char *, int));
#define _CS_POSIX_V7_THREADS_LDFLAGS 19 #define _CS_POSIX_V7_THREADS_LDFLAGS 19
#define _CS_V7_ENV 20 #define _CS_V7_ENV 20
#define _CS_V6_ENV _CS_V7_ENV #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 #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -53,19 +53,19 @@ struct tm
#endif #endif
}; };
clock_t _EXFUN(clock, (void)); clock_t clock (void);
double _EXFUN(difftime, (time_t _time2, time_t _time1)); double difftime (time_t _time2, time_t _time1);
time_t _EXFUN(mktime, (struct tm *_timeptr)); time_t mktime (struct tm *_timeptr);
time_t _EXFUN(time, (time_t *_timer)); time_t time (time_t *_timer);
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
char *_EXFUN(asctime, (const struct tm *_tblock)); char *asctime (const struct tm *_tblock);
char *_EXFUN(ctime, (const time_t *_time)); char *ctime (const time_t *_time);
struct tm *_EXFUN(gmtime, (const time_t *_timer)); struct tm *gmtime (const time_t *_timer);
struct tm *_EXFUN(localtime,(const time_t *_timer)); struct tm *localtime (const time_t *_timer);
#endif #endif
size_t _EXFUN(strftime, (char *__restrict _s, size_t strftime (char *__restrict _s,
size_t _maxsize, const char *__restrict _fmt, size_t _maxsize, const char *__restrict _fmt,
const struct tm *__restrict _t)); const struct tm *__restrict _t);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
extern size_t strftime_l (char *__restrict _s, size_t _maxsize, 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); const struct tm *__restrict _t, locale_t _l);
#endif #endif
char *_EXFUN(asctime_r, (const struct tm *__restrict, char *asctime_r (const struct tm *__restrict,
char *__restrict)); char *__restrict);
char *_EXFUN(ctime_r, (const time_t *, char *)); char *ctime_r (const time_t *, char *);
struct tm *_EXFUN(gmtime_r, (const time_t *__restrict, struct tm *gmtime_r (const time_t *__restrict,
struct tm *__restrict)); struct tm *__restrict);
struct tm *_EXFUN(localtime_r, (const time_t *__restrict, struct tm *localtime_r (const time_t *__restrict,
struct tm *__restrict)); struct tm *__restrict);
_END_STD_C _END_STD_C
@ -88,9 +88,9 @@ extern "C" {
#endif #endif
#if __XSI_VISIBLE #if __XSI_VISIBLE
char *_EXFUN(strptime, (const char *__restrict, char *strptime (const char *__restrict,
const char *__restrict, const char *__restrict,
struct tm *__restrict)); struct tm *__restrict);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
char *strptime_l (const char *__restrict, const char *__restrict, char *strptime_l (const char *__restrict, const char *__restrict,
@ -98,9 +98,9 @@ char *strptime_l (const char *__restrict, const char *__restrict,
#endif #endif
#if __POSIX_VISIBLE #if __POSIX_VISIBLE
_VOID _EXFUN(tzset, (_VOID)); void tzset (void);
#endif #endif
_VOID _EXFUN(_tzset_r, (struct _reent *)); void _tzset_r (struct _reent *);
typedef struct __tzrule_struct typedef struct __tzrule_struct
{ {
@ -120,7 +120,7 @@ typedef struct __tzinfo_struct
__tzrule_type __tzrule[2]; __tzrule_type __tzrule[2];
} __tzinfo_type; } __tzinfo_type;
__tzinfo_type *_EXFUN (__gettzinfo, (_VOID)); __tzinfo_type *__gettzinfo (void);
/* getdate functions */ /* getdate functions */
@ -128,9 +128,9 @@ __tzinfo_type *_EXFUN (__gettzinfo, (_VOID));
#if __XSI_VISIBLE >= 4 #if __XSI_VISIBLE >= 4
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#define getdate_err (*__getdate_err()) #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. /* getdate_err is set to one of the following values to indicate the error.
1 the DATEMSK environment variable is null or undefined, 1 the DATEMSK environment variable is null or undefined,
2 the template file cannot be opened for reading, 2 the template file cannot be opened for reading,
@ -145,7 +145,7 @@ struct tm * _EXFUN(getdate, (const char *));
#if __GNU_VISIBLE #if __GNU_VISIBLE
/* getdate_r returns the error code as above */ /* 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 /* __GNU_VISIBLE */
#endif /* HAVE_GETDATE */ #endif /* HAVE_GETDATE */
@ -183,33 +183,31 @@ extern "C" {
/* Clocks, P1003.1b-1993, p. 263 */ /* Clocks, P1003.1b-1993, p. 263 */
int _EXFUN(clock_settime, (clockid_t clock_id, const struct timespec *tp)); int clock_settime (clockid_t clock_id, const struct timespec *tp);
int _EXFUN(clock_gettime, (clockid_t clock_id, struct timespec *tp)); int clock_gettime (clockid_t clock_id, struct timespec *tp);
int _EXFUN(clock_getres, (clockid_t clock_id, struct timespec *res)); int clock_getres (clockid_t clock_id, struct timespec *res);
/* Create a Per-Process Timer, P1003.1b-1993, p. 264 */ /* Create a Per-Process Timer, P1003.1b-1993, p. 264 */
int _EXFUN(timer_create, int timer_create (clockid_t clock_id,
(clockid_t clock_id,
struct sigevent *__restrict evp, struct sigevent *__restrict evp,
timer_t *__restrict timerid)); timer_t *__restrict timerid);
/* Delete a Per_process Timer, P1003.1b-1993, p. 266 */ /* 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 */ /* Per-Process Timers, P1003.1b-1993, p. 267 */
int _EXFUN(timer_settime, int timer_settime (timer_t timerid, int flags,
(timer_t timerid, int flags,
const struct itimerspec *__restrict value, const struct itimerspec *__restrict value,
struct itimerspec *__restrict ovalue)); struct itimerspec *__restrict ovalue);
int _EXFUN(timer_gettime, (timer_t timerid, struct itimerspec *value)); int timer_gettime (timer_t timerid, struct itimerspec *value);
int _EXFUN(timer_getoverrun, (timer_t timerid)); int timer_getoverrun (timer_t timerid);
/* High Resolution Sleep, P1003.1b-1993, p. 269 */ /* 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 #ifdef __cplusplus
} }
@ -222,9 +220,8 @@ int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp));
extern "C" { extern "C" {
#endif #endif
int _EXFUN(clock_nanosleep, int clock_nanosleep (clockid_t clock_id, int flags,
(clockid_t clock_id, int flags, const struct timespec *rqtp, const struct timespec *rqtp, struct timespec *rmtp);
struct timespec *rmtp));
#ifdef __cplusplus #ifdef __cplusplus
} }
@ -297,7 +294,7 @@ extern "C" {
/* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */ /* 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 */ #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 */ /* CPU-time Clock Attribute Access, P1003.4b/D8, p. 56 */
int _EXFUN(clock_setenable_attr, (clockid_t clock_id, int attr)); int clock_setenable_attr (clockid_t clock_id, int attr);
int _EXFUN(clock_getenable_attr, (clockid_t clock_id, int *attr)); int clock_getenable_attr (clockid_t clock_id, int *attr);
#endif /* _POSIX_CPUTIME or _POSIX_THREAD_CPUTIME */ #endif /* _POSIX_CPUTIME or _POSIX_THREAD_CPUTIME */

View file

@ -40,7 +40,7 @@
#define unctrl(c) __unctrl[(c) & 0xff] #define unctrl(c) __unctrl[(c) & 0xff]
#define unctrllen(ch) __unctrllen[(ch) & 0xff] #define unctrllen(ch) __unctrllen[(ch) & 0xff]
extern __IMPORT _CONST char * _CONST __unctrl[256]; /* Control strings. */ extern __IMPORT const char * const __unctrl[256]; /* Control strings. */
extern __IMPORT _CONST char __unctrllen[256]; /* Control strings length. */ extern __IMPORT const char __unctrllen[256]; /* Control strings length. */
#endif /* _UNCTRL_H_ */ #endif /* _UNCTRL_H_ */

View file

@ -86,93 +86,89 @@ struct tm;
typedef _mbstate_t mbstate_t; typedef _mbstate_t mbstate_t;
#endif /* _MBSTATE_T */ #endif /* _MBSTATE_T */
wint_t _EXFUN(btowc, (int)); wint_t btowc (int);
int _EXFUN(wctob, (wint_t)); int wctob (wint_t);
size_t _EXFUN(mbrlen, (const char *__restrict, size_t, mbstate_t *__restrict)); size_t mbrlen (const char *__restrict, size_t, mbstate_t *__restrict);
size_t _EXFUN(mbrtowc, (wchar_t *__restrict, const char *__restrict, size_t, size_t mbrtowc (wchar_t *__restrict, const char *__restrict, size_t,
mbstate_t *__restrict)); mbstate_t *__restrict);
size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * , size_t _mbrtowc_r (struct _reent *, wchar_t * , const char * ,
size_t, mbstate_t *)); size_t, mbstate_t *);
int _EXFUN(mbsinit, (const mbstate_t *)); int mbsinit (const mbstate_t *);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
size_t _EXFUN(mbsnrtowcs, (wchar_t *__restrict, const char **__restrict, size_t mbsnrtowcs (wchar_t *__restrict, const char **__restrict,
size_t, size_t, mbstate_t *__restrict)); size_t, size_t, mbstate_t *__restrict);
#endif #endif
size_t _EXFUN(_mbsnrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t _mbsnrtowcs_r (struct _reent *, wchar_t * , const char ** ,
size_t, size_t, mbstate_t *)); size_t, size_t, mbstate_t *);
size_t _EXFUN(mbsrtowcs, (wchar_t *__restrict, const char **__restrict, size_t, size_t mbsrtowcs (wchar_t *__restrict, const char **__restrict, size_t,
mbstate_t *__restrict)); mbstate_t *__restrict);
size_t _EXFUN(_mbsrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *)); size_t _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 wcrtomb (char *__restrict, wchar_t, mbstate_t *__restrict);
size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *)); size_t _wcrtomb_r (struct _reent *, char * , wchar_t, mbstate_t *);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
size_t _EXFUN(wcsnrtombs, (char *__restrict, const wchar_t **__restrict, size_t wcsnrtombs (char *__restrict, const wchar_t **__restrict,
size_t, size_t, mbstate_t *__restrict)); size_t, size_t, mbstate_t *__restrict);
#endif #endif
size_t _EXFUN(_wcsnrtombs_r, (struct _reent *, char * , const wchar_t ** , size_t _wcsnrtombs_r (struct _reent *, char * , const wchar_t ** ,
size_t, size_t, mbstate_t *)); size_t, size_t, mbstate_t *);
size_t _EXFUN(wcsrtombs, (char *__restrict, const wchar_t **__restrict, size_t wcsrtombs (char *__restrict, const wchar_t **__restrict,
size_t, mbstate_t *__restrict)); size_t, mbstate_t *__restrict);
size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** , size_t _wcsrtombs_r (struct _reent *, char * , const wchar_t ** ,
size_t, mbstate_t *)); size_t, mbstate_t *);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
int _EXFUN(wcscasecmp, (const wchar_t *, const wchar_t *)); int wcscasecmp (const wchar_t *, const wchar_t *);
#endif #endif
wchar_t *_EXFUN(wcscat, (wchar_t *__restrict, const wchar_t *__restrict)); wchar_t *wcscat (wchar_t *__restrict, const wchar_t *__restrict);
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t)); wchar_t *wcschr (const wchar_t *, wchar_t);
int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *)); int wcscmp (const wchar_t *, const wchar_t *);
int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *)); int wcscoll (const wchar_t *, const wchar_t *);
wchar_t *_EXFUN(wcscpy, (wchar_t *__restrict, const wchar_t *__restrict)); wchar_t *wcscpy (wchar_t *__restrict, const wchar_t *__restrict);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
wchar_t *_EXFUN(wcpcpy, (wchar_t *__restrict, wchar_t *wcpcpy (wchar_t *__restrict,
const wchar_t *__restrict)); const wchar_t *__restrict);
wchar_t *_EXFUN(wcsdup, (const wchar_t *)); wchar_t *wcsdup (const wchar_t *);
#endif #endif
wchar_t *_EXFUN(_wcsdup_r, (struct _reent *, const wchar_t * )); wchar_t *_wcsdup_r (struct _reent *, const wchar_t * );
size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *)); size_t wcscspn (const wchar_t *, const wchar_t *);
size_t _EXFUN(wcsftime, (wchar_t *__restrict, size_t, size_t wcsftime (wchar_t *__restrict, size_t,
const wchar_t *__restrict, const struct tm *__restrict)); const wchar_t *__restrict, const struct tm *__restrict);
#if __GNU_VISIBLE #if __GNU_VISIBLE
size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict, size_t wcsftime_l (wchar_t *__restrict, size_t, const wchar_t *__restrict,
const struct tm *__restrict, locale_t); const struct tm *__restrict, locale_t);
#endif #endif
size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t)); size_t wcslcat (wchar_t *, const wchar_t *, size_t);
size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t)); size_t wcslcpy (wchar_t *, const wchar_t *, size_t);
size_t _EXFUN(wcslen, (const wchar_t *)); size_t wcslen (const wchar_t *);
#if __POSIX_VISIBLE >= 200809 #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 #endif
wchar_t *_EXFUN(wcsncat, (wchar_t *__restrict, wchar_t *wcsncat (wchar_t *__restrict,
const wchar_t *__restrict, size_t)); const wchar_t *__restrict, size_t);
int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t)); int wcsncmp (const wchar_t *, const wchar_t *, size_t);
wchar_t *_EXFUN(wcsncpy, (wchar_t *__restrict, wchar_t *wcsncpy (wchar_t *__restrict,
const wchar_t *__restrict, size_t)); const wchar_t *__restrict, size_t);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
wchar_t *_EXFUN(wcpncpy, (wchar_t *__restrict, wchar_t *wcpncpy (wchar_t *__restrict,
const wchar_t *__restrict, size_t)); const wchar_t *__restrict, size_t);
size_t _EXFUN(wcsnlen, (const wchar_t *, size_t)); size_t wcsnlen (const wchar_t *, size_t);
#endif #endif
wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *)); wchar_t *wcspbrk (const wchar_t *, const wchar_t *);
wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t)); wchar_t *wcsrchr (const wchar_t *, wchar_t);
size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *)); size_t wcsspn (const wchar_t *, const wchar_t *);
wchar_t *_EXFUN(wcsstr, (const wchar_t *__restrict, wchar_t *wcsstr (const wchar_t *__restrict,
const wchar_t *__restrict)); const wchar_t *__restrict);
wchar_t *_EXFUN(wcstok, (wchar_t *__restrict, const wchar_t *__restrict, wchar_t *wcstok (wchar_t *__restrict, const wchar_t *__restrict,
wchar_t **__restrict)); wchar_t **__restrict);
double _EXFUN(wcstod, (const wchar_t *__restrict, wchar_t **__restrict)); double wcstod (const wchar_t *__restrict, wchar_t **__restrict);
double _EXFUN(_wcstod_r, (struct _reent *, const wchar_t *, wchar_t **)); double _wcstod_r (struct _reent *, const wchar_t *, wchar_t **);
#if __ISO_C_VISIBLE >= 1999 #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 #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 #if __XSI_VISIBLE
int _EXFUN(wcswidth, (const wchar_t *, size_t)); int wcswidth (const wchar_t *, size_t);
#endif #endif
size_t _EXFUN(wcsxfrm, (wchar_t *__restrict, const wchar_t *__restrict, size_t wcsxfrm (wchar_t *__restrict, const wchar_t *__restrict,
size_t)); size_t);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
extern int wcscasecmp_l (const wchar_t *, const wchar_t *, locale_t); 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); 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 #endif
#if __XSI_VISIBLE #if __XSI_VISIBLE
int _EXFUN(wcwidth, (const wchar_t)); int wcwidth (const wchar_t);
#endif #endif
wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t)); wchar_t *wmemchr (const wchar_t *, wchar_t, size_t);
int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t)); int wmemcmp (const wchar_t *, const wchar_t *, size_t);
wchar_t *_EXFUN(wmemcpy, (wchar_t *__restrict, const wchar_t *__restrict, wchar_t *wmemcpy (wchar_t *__restrict, const wchar_t *__restrict,
size_t)); size_t);
wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t)); wchar_t *wmemmove (wchar_t *, const wchar_t *, size_t);
#if __GNU_VISIBLE #if __GNU_VISIBLE
wchar_t *_EXFUN(wmempcpy, (wchar_t *__restrict, const wchar_t *__restrict, wchar_t *wmempcpy (wchar_t *__restrict, const wchar_t *__restrict,
size_t)); size_t);
#endif #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 #if __ISO_C_VISIBLE >= 1999
long long _EXFUN(wcstoll, (const wchar_t *__restrict, wchar_t **__restrict, long long wcstoll (const wchar_t *__restrict, wchar_t **__restrict,
int)); int);
#endif #endif
unsigned long _EXFUN(wcstoul, (const wchar_t *__restrict, wchar_t **__restrict, unsigned long wcstoul (const wchar_t *__restrict, wchar_t **__restrict,
int)); int);
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
unsigned long long _EXFUN(wcstoull, (const wchar_t *__restrict, unsigned long long wcstoull (const wchar_t *__restrict,
wchar_t **__restrict, int)); wchar_t **__restrict, int);
#endif #endif
long _EXFUN(_wcstol_r, (struct _reent *, const wchar_t *, wchar_t **, int)); long _wcstol_r (struct _reent *, const wchar_t *, wchar_t **, int);
long long _EXFUN(_wcstoll_r, (struct _reent *, const wchar_t *, wchar_t **, int)); long long _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 _wcstoul_r (struct _reent *, const wchar_t *, wchar_t **, int);
unsigned long long _EXFUN(_wcstoull_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 #if __ISO_C_VISIBLE >= 1999
long double _EXFUN(wcstold, (const wchar_t *, wchar_t **)); long double wcstold (const wchar_t *, wchar_t **);
#endif #endif
#if __GNU_VISIBLE #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); long double wcstold_l (const wchar_t *, wchar_t **, locale_t);
#endif #endif
wint_t _EXFUN(fgetwc, (__FILE *)); wint_t fgetwc (__FILE *);
wchar_t *_EXFUN(fgetws, (wchar_t *__restrict, int, __FILE *__restrict)); wchar_t *fgetws (wchar_t *__restrict, int, __FILE *__restrict);
wint_t _EXFUN(fputwc, (wchar_t, __FILE *)); wint_t fputwc (wchar_t, __FILE *);
int _EXFUN(fputws, (const wchar_t *__restrict, __FILE *__restrict)); int fputws (const wchar_t *__restrict, __FILE *__restrict);
#if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 #if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500
int _EXFUN (fwide, (__FILE *, int)); int fwide (__FILE *, int);
#endif #endif
wint_t _EXFUN (getwc, (__FILE *)); wint_t getwc (__FILE *);
wint_t _EXFUN (getwchar, (void)); wint_t getwchar (void);
wint_t _EXFUN(putwc, (wchar_t, __FILE *)); wint_t putwc (wchar_t, __FILE *);
wint_t _EXFUN(putwchar, (wchar_t)); wint_t putwchar (wchar_t);
wint_t _EXFUN (ungetwc, (wint_t wc, __FILE *)); wint_t ungetwc (wint_t wc, __FILE *);
wint_t _EXFUN(_fgetwc_r, (struct _reent *, __FILE *)); wint_t _fgetwc_r (struct _reent *, __FILE *);
wint_t _EXFUN(_fgetwc_unlocked_r, (struct _reent *, __FILE *)); wint_t _fgetwc_unlocked_r (struct _reent *, __FILE *);
wchar_t *_EXFUN(_fgetws_r, (struct _reent *, wchar_t *, int, __FILE *)); wchar_t *_fgetws_r (struct _reent *, wchar_t *, int, __FILE *);
wchar_t *_EXFUN(_fgetws_unlocked_r, (struct _reent *, wchar_t *, int, __FILE *)); wchar_t *_fgetws_unlocked_r (struct _reent *, wchar_t *, int, __FILE *);
wint_t _EXFUN(_fputwc_r, (struct _reent *, wchar_t, __FILE *)); wint_t _fputwc_r (struct _reent *, wchar_t, __FILE *);
wint_t _EXFUN(_fputwc_unlocked_r, (struct _reent *, wchar_t, __FILE *)); wint_t _fputwc_unlocked_r (struct _reent *, wchar_t, __FILE *);
int _EXFUN(_fputws_r, (struct _reent *, const wchar_t *, __FILE *)); int _fputws_r (struct _reent *, const wchar_t *, __FILE *);
int _EXFUN(_fputws_unlocked_r, (struct _reent *, const wchar_t *, __FILE *)); int _fputws_unlocked_r (struct _reent *, const wchar_t *, __FILE *);
int _EXFUN (_fwide_r, (struct _reent *, __FILE *, int)); int _fwide_r (struct _reent *, __FILE *, int);
wint_t _EXFUN (_getwc_r, (struct _reent *, __FILE *)); wint_t _getwc_r (struct _reent *, __FILE *);
wint_t _EXFUN (_getwc_unlocked_r, (struct _reent *, __FILE *)); wint_t _getwc_unlocked_r (struct _reent *, __FILE *);
wint_t _EXFUN (_getwchar_r, (struct _reent *ptr)); wint_t _getwchar_r (struct _reent *ptr);
wint_t _EXFUN (_getwchar_unlocked_r, (struct _reent *ptr)); wint_t _getwchar_unlocked_r (struct _reent *ptr);
wint_t _EXFUN(_putwc_r, (struct _reent *, wchar_t, __FILE *)); wint_t _putwc_r (struct _reent *, wchar_t, __FILE *);
wint_t _EXFUN(_putwc_unlocked_r, (struct _reent *, wchar_t, __FILE *)); wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *);
wint_t _EXFUN(_putwchar_r, (struct _reent *, wchar_t)); wint_t _putwchar_r (struct _reent *, wchar_t);
wint_t _EXFUN(_putwchar_unlocked_r, (struct _reent *, wchar_t)); wint_t _putwchar_unlocked_r (struct _reent *, wchar_t);
wint_t _EXFUN (_ungetwc_r, (struct _reent *, wint_t wc, __FILE *)); wint_t _ungetwc_r (struct _reent *, wint_t wc, __FILE *);
#if __GNU_VISIBLE #if __GNU_VISIBLE
wint_t _EXFUN(fgetwc_unlocked, (__FILE *)); wint_t fgetwc_unlocked (__FILE *);
wchar_t *_EXFUN(fgetws_unlocked, (wchar_t *__restrict, int, __FILE *__restrict)); wchar_t *fgetws_unlocked (wchar_t *__restrict, int, __FILE *__restrict);
wint_t _EXFUN(fputwc_unlocked, (wchar_t, __FILE *)); wint_t fputwc_unlocked (wchar_t, __FILE *);
int _EXFUN(fputws_unlocked, (const wchar_t *__restrict, __FILE *__restrict)); int fputws_unlocked (const wchar_t *__restrict, __FILE *__restrict);
wint_t _EXFUN(getwc_unlocked, (__FILE *)); wint_t getwc_unlocked (__FILE *);
wint_t _EXFUN(getwchar_unlocked, (void)); wint_t getwchar_unlocked (void);
wint_t _EXFUN(putwc_unlocked, (wchar_t, __FILE *)); wint_t putwc_unlocked (wchar_t, __FILE *);
wint_t _EXFUN(putwchar_unlocked, (wchar_t)); wint_t putwchar_unlocked (wchar_t);
#endif #endif
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
__FILE *_EXFUN (open_wmemstream, (wchar_t **, size_t *)); __FILE *open_wmemstream (wchar_t **, size_t *);
#endif #endif
__FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *)); __FILE *_open_wmemstream_r (struct _reent *, wchar_t **, size_t *);
#ifndef __VALIST #ifndef __VALIST
#ifdef __GNUC__ #ifdef __GNUC__
@ -284,42 +280,42 @@ __FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *));
#endif #endif
#if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 #if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500
int _EXFUN(fwprintf, (__FILE *__restrict, const wchar_t *__restrict, ...)); int fwprintf (__FILE *__restrict, const wchar_t *__restrict, ...);
int _EXFUN(swprintf, (wchar_t *__restrict, size_t, int swprintf (wchar_t *__restrict, size_t,
const wchar_t *__restrict, ...)); const wchar_t *__restrict, ...);
int _EXFUN(vfwprintf, (__FILE *__restrict, const wchar_t *__restrict, int vfwprintf (__FILE *__restrict, const wchar_t *__restrict,
__VALIST)); __VALIST);
int _EXFUN(vswprintf, (wchar_t *__restrict, size_t, int vswprintf (wchar_t *__restrict, size_t,
const wchar_t *__restrict, __VALIST)); const wchar_t *__restrict, __VALIST);
int _EXFUN(vwprintf, (const wchar_t *__restrict, __VALIST)); int vwprintf (const wchar_t *__restrict, __VALIST);
int _EXFUN(wprintf, (const wchar_t *__restrict, ...)); int wprintf (const wchar_t *__restrict, ...);
#endif #endif
int _EXFUN(_fwprintf_r, (struct _reent *, __FILE *, const wchar_t *, ...)); int _fwprintf_r (struct _reent *, __FILE *, const wchar_t *, ...);
int _EXFUN(_swprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, ...)); int _swprintf_r (struct _reent *, wchar_t *, size_t, const wchar_t *, ...);
int _EXFUN(_vfwprintf_r, (struct _reent *, __FILE *, const wchar_t *, __VALIST)); int _vfwprintf_r (struct _reent *, __FILE *, const wchar_t *, __VALIST);
int _EXFUN(_vswprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, __VALIST)); int _vswprintf_r (struct _reent *, wchar_t *, size_t, const wchar_t *, __VALIST);
int _EXFUN(_vwprintf_r, (struct _reent *, const wchar_t *, __VALIST)); int _vwprintf_r (struct _reent *, const wchar_t *, __VALIST);
int _EXFUN(_wprintf_r, (struct _reent *, const wchar_t *, ...)); int _wprintf_r (struct _reent *, const wchar_t *, ...);
#if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500 #if __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE >= 500
int _EXFUN(fwscanf, (__FILE *__restrict, const wchar_t *__restrict, ...)); int fwscanf (__FILE *__restrict, const wchar_t *__restrict, ...);
int _EXFUN(swscanf, (const wchar_t *__restrict, int swscanf (const wchar_t *__restrict,
const wchar_t *__restrict, ...)); const wchar_t *__restrict, ...);
int _EXFUN(vfwscanf, (__FILE *__restrict, const wchar_t *__restrict, int vfwscanf (__FILE *__restrict, const wchar_t *__restrict,
__VALIST)); __VALIST);
int _EXFUN(vswscanf, (const wchar_t *__restrict, const wchar_t *__restrict, int vswscanf (const wchar_t *__restrict, const wchar_t *__restrict,
__VALIST)); __VALIST);
int _EXFUN(vwscanf, (const wchar_t *__restrict, __VALIST)); int vwscanf (const wchar_t *__restrict, __VALIST);
int _EXFUN(wscanf, (const wchar_t *__restrict, ...)); int wscanf (const wchar_t *__restrict, ...);
#endif #endif
int _EXFUN(_fwscanf_r, (struct _reent *, __FILE *, const wchar_t *, ...)); int _fwscanf_r (struct _reent *, __FILE *, const wchar_t *, ...);
int _EXFUN(_swscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, ...)); int _swscanf_r (struct _reent *, const wchar_t *, const wchar_t *, ...);
int _EXFUN(_vfwscanf_r, (struct _reent *, __FILE *, const wchar_t *, __VALIST)); int _vfwscanf_r (struct _reent *, __FILE *, const wchar_t *, __VALIST);
int _EXFUN(_vswscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, __VALIST)); int _vswscanf_r (struct _reent *, const wchar_t *, const wchar_t *, __VALIST);
int _EXFUN(_vwscanf_r, (struct _reent *, const wchar_t *, __VALIST)); int _vwscanf_r (struct _reent *, const wchar_t *, __VALIST);
int _EXFUN(_wscanf_r, (struct _reent *, const wchar_t *, ...)); int _wscanf_r (struct _reent *, const wchar_t *, ...);
#define getwc(fp) fgetwc(fp) #define getwc(fp) fgetwc(fp)
#define putwc(wc,fp) fputwc((wc), (fp)) #define putwc(wc,fp) fputwc((wc), (fp))

View file

@ -27,26 +27,26 @@ typedef int wctype_t;
typedef int wctrans_t; typedef int wctrans_t;
#endif #endif
int _EXFUN(iswalpha, (wint_t)); int iswalpha (wint_t);
int _EXFUN(iswalnum, (wint_t)); int iswalnum (wint_t);
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
int _EXFUN(iswblank, (wint_t)); int iswblank (wint_t);
#endif #endif
int _EXFUN(iswcntrl, (wint_t)); int iswcntrl (wint_t);
int _EXFUN(iswctype, (wint_t, wctype_t)); int iswctype (wint_t, wctype_t);
int _EXFUN(iswdigit, (wint_t)); int iswdigit (wint_t);
int _EXFUN(iswgraph, (wint_t)); int iswgraph (wint_t);
int _EXFUN(iswlower, (wint_t)); int iswlower (wint_t);
int _EXFUN(iswprint, (wint_t)); int iswprint (wint_t);
int _EXFUN(iswpunct, (wint_t)); int iswpunct (wint_t);
int _EXFUN(iswspace, (wint_t)); int iswspace (wint_t);
int _EXFUN(iswupper, (wint_t)); int iswupper (wint_t);
int _EXFUN(iswxdigit, (wint_t)); int iswxdigit (wint_t);
wint_t _EXFUN(towctrans, (wint_t, wctrans_t)); wint_t towctrans (wint_t, wctrans_t);
wint_t _EXFUN(towupper, (wint_t)); wint_t towupper (wint_t);
wint_t _EXFUN(towlower, (wint_t)); wint_t towlower (wint_t);
wctrans_t _EXFUN(wctrans, (const char *)); wctrans_t wctrans (const char *);
wctype_t _EXFUN(wctype, (const char *)); wctype_t wctype (const char *);
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
extern int iswalpha_l (wint_t, locale_t); extern int iswalpha_l (wint_t, locale_t);

Binary file not shown.

Binary file not shown.

Binary file not shown.