diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1999-10-09 21:56:43 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1999-10-09 21:56:43 +0000 |
| commit | c1422e5b7cdb4400f934c91bcefa3a1a96d789fb (patch) | |
| tree | 7f8981b86c4ce4b5bb899f690eeb03d6645826a5 /stdlib | |
| parent | a4a1492eb94de4f5c5ec84a5898e994fca5f317b (diff) | |
| download | glibc-c1422e5b7cdb4400f934c91bcefa3a1a96d789fb.tar.xz glibc-c1422e5b7cdb4400f934c91bcefa3a1a96d789fb.zip | |
Update.
Patch by khendricks@ivey.uwo.ca [libc/1382].
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/alloca.h | 4 | ||||
| -rw-r--r-- | stdlib/fmtmsg.h | 8 | ||||
| -rw-r--r-- | stdlib/monetary.h | 10 | ||||
| -rw-r--r-- | stdlib/stdlib.h | 415 | ||||
| -rw-r--r-- | stdlib/ucontext.h | 12 |
5 files changed, 224 insertions, 225 deletions
diff --git a/stdlib/alloca.h b/stdlib/alloca.h index 741eca7431..374f6bb9f6 100644 --- a/stdlib/alloca.h +++ b/stdlib/alloca.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,7 +30,7 @@ __BEGIN_DECLS #undef alloca /* Allocate a block that will be freed when the calling function exits. */ -extern __ptr_t alloca __P ((size_t __size)); +extern void *alloca (size_t __size) __THROW; #ifdef __GNUC__ # define alloca(size) __builtin_alloca (size) diff --git a/stdlib/fmtmsg.h b/stdlib/fmtmsg.h index 56139b9a25..ae166840cd 100644 --- a/stdlib/fmtmsg.h +++ b/stdlib/fmtmsg.h @@ -92,13 +92,13 @@ enum /* Print message with given CLASSIFICATION, LABEL, SEVERITY, TEXT, ACTION and TAG to console or standard error. */ -extern int fmtmsg __P ((long int __classification, __const char *__label, - int __severity, __const char *__text, - __const char *__action, __const char *__tag)); +extern int fmtmsg (long int __classification, __const char *__label, + int __severity, __const char *__text, + __const char *__action, __const char *__tag) __THROW; #ifdef __USE_SVID /* Add or remove severity level. */ -extern int addseverity __P ((int __severity, __const char *__string)); +extern int addseverity (int __severity, __const char *__string) __THROW; #endif __END_DECLS diff --git a/stdlib/monetary.h b/stdlib/monetary.h index de288a208b..e665f07e8f 100644 --- a/stdlib/monetary.h +++ b/stdlib/monetary.h @@ -36,16 +36,16 @@ typedef __ssize_t ssize_t; __BEGIN_DECLS /* Formatting a monetary value according to the current locale. */ -extern ssize_t strfmon __P ((char *__restrict __s, size_t __maxsize, - __const char *__restrict __format, ...)); +extern ssize_t strfmon (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, ...) __THROW; #ifdef __USE_GNU # include <xlocale.h> /* Formatting a monetary value according to the current locale. */ -extern ssize_t __strfmon_l __P ((char *__restrict __s, size_t __maxsize, - __locale_t loc, - __const char *__restrict __format, ...)); +extern ssize_t __strfmon_l (char *__restrict __s, size_t __maxsize, + __locale_t loc, + __const char *__restrict __format, ...) __THROW; #endif __END_DECLS diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 70a975edf9..30a10831e1 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -77,52 +77,52 @@ __extension__ typedef struct /* Maximum length of a multibyte character in the current locale. */ #define MB_CUR_MAX (__ctype_get_mb_cur_max ()) -extern size_t __ctype_get_mb_cur_max __P ((void)); +extern size_t __ctype_get_mb_cur_max (void) __THROW; /* Convert a string to a floating-point number. */ -extern double atof __P ((__const char *__nptr)); +extern double atof (__const char *__nptr) __THROW; /* Convert a string to an integer. */ -extern int atoi __P ((__const char *__nptr)); +extern int atoi (__const char *__nptr) __THROW; /* Convert a string to a long integer. */ -extern long int atol __P ((__const char *__nptr)); +extern long int atol (__const char *__nptr) __THROW; #if defined __USE_ISOC9X || (defined __GNUC__ && defined __USE_MISC) /* These functions will part of the standard C library in ISO C 9X. */ -__extension__ extern long long int atoll __P ((__const char *__nptr)); +__extension__ extern long long int atoll (__const char *__nptr) __THROW; #endif /* Convert a string to a floating-point number. */ -extern double strtod __P ((__const char *__restrict __nptr, - char **__restrict __endptr)); +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) __THROW; #ifdef __USE_ISOC9X /* Likewise for `float' and `long double' sizes of floating-point numbers. */ -extern float strtof __P ((__const char *__restrict __nptr, - char **__restrict __endptr)); +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __THROW; -extern __long_double_t strtold __P ((__const char *__restrict __nptr, - char **__restrict __endptr)); +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) __THROW; #endif /* Convert a string to a long integer. */ -extern long int strtol __P ((__const char *__restrict __nptr, - char **__restrict __endptr, int __base)); +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __THROW; /* Convert a string to an unsigned long integer. */ -extern unsigned long int strtoul __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - int __base)); +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __THROW; #if defined __GNUC__ && defined __USE_BSD /* Convert a string to a quadword integer. */ __extension__ -extern long long int strtoq __P ((__const char *__restrict __nptr, - char **__restrict __endptr, int __base)); +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __THROW; /* Convert a string to an unsigned quadword integer. */ __extension__ -extern unsigned long long int strtouq __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - int __base)); +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __THROW; #endif /* GCC and use BSD. */ #if defined __USE_ISOC9X || (defined __GNUC__ && defined __USE_MISC) @@ -130,13 +130,13 @@ extern unsigned long long int strtouq __P ((__const char *__restrict __nptr, /* Convert a string to a quadword integer. */ __extension__ -extern long long int strtoll __P ((__const char *__restrict __nptr, - char **__restrict __endptr, int __base)); +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __THROW; /* Convert a string to an unsigned quadword integer. */ __extension__ -extern unsigned long long int strtoull __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - int __base)); +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __THROW; #endif /* ISO C 9X or GCC and use MISC. */ @@ -158,79 +158,77 @@ extern unsigned long long int strtoull __P ((__const char *__restrict __nptr, /* Special versions of the functions above which take the locale to use as an additional parameter. */ -extern long int __strtol_l __P ((__const char *__restrict __nptr, - char **__restrict __endptr, int __base, - __locale_t __loc)); +extern long int __strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __THROW; -extern unsigned long int __strtoul_l __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - int __base, __locale_t __loc)); +extern unsigned long int __strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) __THROW; __extension__ -extern long long int __strtoll_l __P ((__const char *__restrict __nptr, - char **__restrict __endptr, int __base, - __locale_t __loc)); +extern long long int __strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __THROW; __extension__ -extern unsigned long long int __strtoull_l __P ((__const char *__restrict - __nptr, - char **__restrict __endptr, - int __base, - __locale_t __loc)); +extern unsigned long long int __strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __THROW; -extern double __strtod_l __P ((__const char *__restrict __nptr, - char **__restrict __endptr, __locale_t __loc)); +extern double __strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __THROW; -extern float __strtof_l __P ((__const char *__restrict __nptr, - char **__restrict __endptr, __locale_t __loc)); +extern float __strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) __THROW; -extern __long_double_t __strtold_l __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - __locale_t __loc)); +extern long double __strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) __THROW; #endif /* GNU */ /* The internal entry points for `strtoX' take an extra flag argument saying whether or not to parse locale-dependent number grouping. */ -extern double __strtod_internal __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - int __group)); -extern float __strtof_internal __P ((__const char *__restrict __nptr, - char **__restrict __endptr, int __group)); -extern __long_double_t __strtold_internal __P ((__const char * - __restrict __nptr, - char **__restrict __endptr, - int __group)); +extern double __strtod_internal (__const char *__restrict __nptr, + char **__restrict __endptr, int __group) + __THROW; +extern float __strtof_internal (__const char *__restrict __nptr, + char **__restrict __endptr, int __group) + __THROW; +extern long double __strtold_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __group) __THROW; #ifndef __strtol_internal_defined -extern long int __strtol_internal __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - int __base, int __group)); +extern long int __strtol_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) __THROW; # define __strtol_internal_defined 1 #endif #ifndef __strtoul_internal_defined -extern unsigned long int __strtoul_internal __P ((__const char * - __restrict __nptr, - char **__restrict __endptr, - int __base, int __group)); +extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) __THROW; # define __strtoul_internal_defined 1 #endif #if defined __GNUC__ || defined __USE_ISOC9X # ifndef __strtoll_internal_defined __extension__ -extern long long int __strtoll_internal __P ((__const char *__restrict __nptr, - char **__restrict __endptr, - int __base, int __group)); +extern long long int __strtoll_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) __THROW; # define __strtoll_internal_defined 1 # endif # ifndef __strtoull_internal_defined __extension__ -extern unsigned long long int __strtoull_internal __P ((__const char * - __restrict __nptr, - char ** - __restrict __endptr, - int __base, - int __group)); +extern unsigned long long int __strtoull_internal (__const char * + __restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __THROW; # define __strtoull_internal_defined 1 # endif #endif /* GCC */ @@ -263,7 +261,7 @@ strtof (__const char *__restrict __nptr, char **__restrict __endptr) __THROW { return __strtof_internal (__nptr, __endptr, 0); } -extern __inline __long_double_t +extern __inline long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) __THROW { return __strtold_internal (__nptr, __endptr, 0); @@ -330,10 +328,10 @@ atoll (__const char *__nptr) __THROW /* Convert N to base 64 using the digits "./0-9A-Za-z", least-significant digit first. Returns a pointer to static storage overwritten by the next call. */ -extern char *l64a __P ((long int __n)); +extern char *l64a (long int __n) __THROW; /* Read a number from a string S in base 64 as above. */ -extern long int a64l __P ((__const char *__s)); +extern long int a64l (__const char *__s) __THROW; # include <sys/types.h> /* we need int32_t... */ @@ -343,21 +341,21 @@ extern long int a64l __P ((__const char *__s)); The `rand' and `srand' functions are required by the ANSI standard. We provide both interfaces to the same random number generator. */ /* Return a random long integer between 0 and RAND_MAX inclusive. */ -extern int32_t random __P ((void)); +extern int32_t random (void) __THROW; /* Seed the random number generator with the given number. */ -extern void srandom __P ((unsigned int __seed)); +extern void srandom (unsigned int __seed) __THROW; /* Initialize the random number generator to use state buffer STATEBUF, of length STATELEN, and seed it with SEED. Optimal lengths are 8, 16, 32, 64, 128 and 256, the bigger the better; values less than 8 will cause an error and values greater than 256 will be rounded down. */ -extern __ptr_t initstate __P ((unsigned int __seed, __ptr_t __statebuf, - size_t __statelen)); +extern void *initstate (unsigned int __seed, void *__statebuf, + size_t __statelen) __THROW; /* Switch the random number generator to state buffer STATEBUF, which should have been previously initialized by `initstate'. */ -extern __ptr_t setstate __P ((__ptr_t __statebuf)); +extern void *setstate (void *__statebuf) __THROW; # ifdef __USE_MISC @@ -376,30 +374,29 @@ struct random_data int32_t *end_ptr; /* Pointer behind state table. */ }; -extern int random_r __P ((struct random_data *__restrict __buf, - int32_t *__restrict __result)); +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __THROW; -extern int srandom_r __P ((unsigned int __seed, struct random_data *__buf)); +extern int srandom_r (unsigned int __seed, struct random_data *__buf) __THROW; -extern int initstate_r __P ((unsigned int __seed, - __ptr_t __restrict __statebuf, - size_t __statelen, - struct random_data *__restrict __buf)); +extern int initstate_r (unsigned int __seed, void *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) __THROW; -extern int setstate_r __P ((__ptr_t __restrict __statebuf, - struct random_data *__restrict __buf)); +extern int setstate_r (void *__restrict __statebuf, + struct random_data *__restrict __buf) __THROW; # endif /* Use misc. */ #endif /* Use SVID || extended X/Open. */ /* Return a random integer between 0 and RAND_MAX inclusive. */ -extern int rand __P ((void)); +extern int rand (void) __THROW; /* Seed the random number generator with the given number. */ -extern void srand __P ((unsigned int __seed)); +extern void srand (unsigned int __seed) __THROW; #ifdef __USE_POSIX /* Reentrant interface according to POSIX.1. */ -extern int rand_r __P ((unsigned int *__seed)); +extern int rand_r (unsigned int *__seed) __THROW; #endif @@ -407,21 +404,21 @@ extern int rand_r __P ((unsigned int *__seed)); /* System V style 48-bit random number generator functions. */ /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ -extern double drand48 __P ((void)); -extern double erand48 __P ((unsigned short int __xsubi[3])); +extern double drand48 (void) __THROW; +extern double erand48 (unsigned short int __xsubi[3]) __THROW; /* Return non-negative, long integer in [0,2^31). */ -extern long int lrand48 __P ((void)); -extern long int nrand48 __P ((unsigned short int __xsubi[3])); +extern long int lrand48 (void) __THROW; +extern long int nrand48 (unsigned short int __xsubi[3]) __THROW; /* Return signed, long integers in [-2^31,2^31). */ -extern long int mrand48 __P ((void)); -extern long int jrand48 __P ((unsigned short int __xsubi[3])); +extern long int mrand48 (void) __THROW; +extern long int jrand48 (unsigned short int __xsubi[3]) __THROW; /* Seed random number generator. */ -extern void srand48 __P ((long int __seedval)); -extern unsigned short int *seed48 __P ((unsigned short int __seed16v[3])); -extern void lcong48 __P ((unsigned short int __param[7])); +extern void srand48 (long int __seedval) __THROW; +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __THROW; +extern void lcong48 (unsigned short int __param[7]) __THROW; /* Data structure for communication with thread safe versions. */ struct drand48_data @@ -435,34 +432,35 @@ struct drand48_data # ifdef __USE_MISC /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ -extern int drand48_r __P ((struct drand48_data *__restrict __buffer, - double *__restrict __result)); -extern int erand48_r __P ((unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - double *__restrict __result)); +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __THROW; +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __THROW; /* Return non-negative, long integer in [0,2^31). */ -extern int lrand48_r __P ((struct drand48_data *__restrict __buffer, - long int *__restrict __result)); -extern int nrand48_r __P ((unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - long int *__restrict __result)); +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) __THROW; +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) __THROW; /* Return signed, long integers in [-2^31,2^31). */ -extern int mrand48_r __P ((struct drand48_data *__restrict __buffer, - long int *__restrict __result)); -extern int jrand48_r __P ((unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - long int *__restrict __result)); +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) __THROW; +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) __THROW; /* Seed random number generator. */ -extern int srand48_r __P ((long int __seedval, struct drand48_data *__buffer)); +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __THROW; -extern int seed48_r __P ((unsigned short int __seed16v[3], - struct drand48_data *__buffer)); +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __THROW; -extern int lcong48_r __P ((unsigned short int __param[7], - struct drand48_data *__buffer)); +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) __THROW; # endif /* Use misc. */ #endif /* Use SVID or X/Open. */ @@ -471,21 +469,21 @@ extern int lcong48_r __P ((unsigned short int __param[7], #ifndef __malloc_and_calloc_defined #define __malloc_and_calloc_defined /* Allocate SIZE bytes of memory. */ -extern __ptr_t malloc __P ((size_t __size)); +extern void *malloc (size_t __size) __THROW; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ -extern __ptr_t calloc __P ((size_t __nmemb, size_t __size)); +extern void *calloc (size_t __nmemb, size_t __size) __THROW; #endif #ifndef __need_malloc_and_calloc /* Re-allocate the previously allocated block - in __ptr_t, making the new block SIZE bytes long. */ -extern __ptr_t realloc __P ((__ptr_t __ptr, size_t __size)); + in PTR, making the new block SIZE bytes long. */ +extern void *realloc (void *__ptr, size_t __size) __THROW; /* Free a block allocated by `malloc', `realloc' or `calloc'. */ -extern void free __P ((__ptr_t __ptr)); +extern void free (void *__ptr) __THROW; #ifdef __USE_MISC /* Free a block. An alias for `free'. (Sun Unices). */ -extern void cfree __P ((__ptr_t __ptr)); +extern void cfree (void *__ptr) __THROW; #endif /* Use misc. */ #if defined __USE_GNU || defined __USE_BSD || defined __USE_MISC @@ -494,67 +492,67 @@ extern void cfree __P ((__ptr_t __ptr)); #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ -extern __ptr_t valloc __P ((size_t __size)); +extern void *valloc (size_t __size) __THROW; #endif /* Abort execution and generate a core-dump. */ -extern void abort __P ((void)) __attribute__ ((__noreturn__)); +extern void abort (void) __THROW __attribute__ ((__noreturn__)); /* Register a function to be called when `exit' is called. */ -extern int atexit __P ((void (*__func) (void))); +extern int atexit (void (*__func) (void)) __THROW; #ifdef __USE_MISC /* Register a function to be called with the status given to `exit' and the given argument. */ -extern int __on_exit __P ((void (*__func) (int __status, __ptr_t __arg), - __ptr_t __arg)); -extern int on_exit __P ((void (*__func) (int __status, __ptr_t __arg), - __ptr_t __arg)); +extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __THROW; +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __THROW; #endif /* Call all functions registered with `atexit' and `on_exit', in the reverse of the order in which they were registered perform stdio cleanup, and terminate program execution with STATUS. */ -extern void exit __P ((int __status)) __attribute__ ((__noreturn__)); +extern void exit (int __status) __THROW __attribute__ ((__noreturn__)); #ifdef __USE_ISOC9X /* Terminate the program with STATUS without calling any of the functions registered with `atexit' or `on_exit'. */ -extern void _Exit __P ((int __status)) __attribute__ ((__noreturn__)); +extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__)); #endif /* Return the value of envariable NAME, or NULL if it doesn't exist. */ -extern char *getenv __P ((__const char *__name)); +extern char *getenv (__const char *__name) __THROW; /* This function is similar to the above but returns NULL if the programs is running with SUID or SGID enabled. */ -extern char *__secure_getenv __P ((__const char *__name)); +extern char *__secure_getenv (__const char *__name) __THROW; #if defined __USE_SVID || defined __USE_XOPEN /* The SVID says this is in <stdio.h>, but this seems a better place. */ /* Put STRING, which is of the form "NAME=VALUE", in the environment. If there is no `=', remove NAME from the environment. */ -extern int putenv __P ((char *__string)); +extern int putenv (char *__string) __THROW; #endif #ifdef __USE_BSD /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ -extern int setenv __P ((__const char *__name, __const char *__value, - int __replace)); +extern int setenv (__const char *__name, __const char *__value, int __replace) + __THROW; /* Remove the variable NAME from the environment. */ -extern void unsetenv __P ((__const char *__name)); +extern void unsetenv (__const char *__name) __THROW; #endif #ifdef __USE_MISC /* The `clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ -extern int clearenv __P ((void)); +extern int clearenv (void) __THROW; #endif @@ -563,14 +561,14 @@ extern int clearenv __P ((void)); The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique file name. */ -extern char *mktemp __P ((char *__template)); +extern char *mktemp (char *__template) __THROW; |
