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 | |
parent | a4a1492eb94de4f5c5ec84a5898e994fca5f317b (diff) | |
download | glibc-c1422e5b7cdb4400f934c91bcefa3a1a96d789fb.zip glibc-c1422e5b7cdb4400f934c91bcefa3a1a96d789fb.tar.gz glibc-c1422e5b7cdb4400f934c91bcefa3a1a96d789fb.tar.bz2 |
Update.
Patch by khendricks@ivey.uwo.ca [libc/1382].
113 files changed, 2934 insertions, 2978 deletions
@@ -671,9 +671,11 @@ ifeq (yes, $(build-shared)) ifndef avoid-generated $(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \ $(wildcard $(patsubst %, $(..)%/shlib-versions,\ - $(add-ons))) \ + $(add-ons) \ + $(subdirs))) \ $(common-objpfx)config.make (file="$(wildcard $(patsubst %,$(..)%/shlib-versions,$(add-ons))) \ + $(wildcard $(patsubst %,$(..)%/shlib-versions,$(subdirs))) \ $(..)shlib-versions"; \ for f in $$file; do \ sed 's/#.*$$//' $$f | while read conf versions; do \ diff --git a/argp/argp.h b/argp/argp.h index cfa7116..adfc3e6 100644 --- a/argp/argp.h +++ b/argp/argp.h @@ -36,23 +36,6 @@ typedef int error_t; # define __error_t_defined #endif - -#ifndef __P -# ifdef __cplusplus -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7) -# define __P(args) args throw () -# else -# define __P(args) args -# endif -# define __PMT(args) args -# elif defined __STDC__ && __STDC__ > 0 -# define __P(args) args -# define __PMT(args) args -# else -# define __P(args) () -# define __PMT(args) () -# endif -#endif #ifdef __cplusplus extern "C" { @@ -133,8 +116,8 @@ struct argp_state; /* " */ struct argp_child; /* " */ /* The type of a pointer to an argp parsing function. */ -typedef error_t (*argp_parser_t) __PMT ((int key, char *arg, - struct argp_state *state)); +typedef error_t (*argp_parser_t) (int key, char *arg, + struct argp_state *state); /* What to return for unrecognized keys. For special ARGP_KEY_ keys, such returns will simply be ignored. For user keys, this error will be turned @@ -247,8 +230,7 @@ struct argp has been done, so if any of the replacement text also needs translation, that should be done by the filter function. INPUT is either the input supplied to argp_parse, or NULL, if argp_help was called directly. */ - char *(*help_filter) __PMT ((int __key, __const char *__text, - void *__input)); + char *(*help_filter) (int __key, __const char *__text, void *__input); /* If non-zero the strings used in the argp library are translated using the domain described by this string. Otherwise the currently installed @@ -391,15 +373,14 @@ struct argp_state routine returned a non-zero value, it is returned; otherwise 0 is returned. This function may also call exit unless the ARGP_NO_HELP flag is set. INPUT is a pointer to a value to be passed in to the parser. */ -extern error_t argp_parse __P ((__const struct argp *__restrict __argp, - int __argc, char **__restrict __argv, - unsigned __flags, int *__restrict __arg_index, - void *__restrict __input)); -extern error_t __argp_parse __P ((__const struct argp *__restrict __argp, - int __argc, char **__restrict __argv, - unsigned __flags, - int *__restrict __arg_index, - void *__restrict __input)); +extern error_t argp_parse (__const struct argp *__restrict __argp, + int __argc, char **__restrict __argv, + unsigned __flags, int *__restrict __arg_index, + void *__restrict __input) __THROW; +extern error_t __argp_parse (__const struct argp *__restrict __argp, + int __argc, char **__restrict __argv, + unsigned __flags, int *__restrict __arg_index, + void *__restrict __input) __THROW; /* Global variables. */ @@ -414,9 +395,9 @@ extern __const char *argp_program_version; calls this function with a stream to print the version to and a pointer to the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is used). This variable takes precedent over ARGP_PROGRAM_VERSION. */ -extern void (*argp_program_version_hook) __PMT ((FILE *__restrict __stream, - struct argp_state *__restrict - __state)); +extern void (*argp_program_version_hook) (FILE *__restrict __stream, + struct argp_state *__restrict + __state); /* If defined or set by the user program, it should point to string that is the bug-reporting address for the program. It will be printed by @@ -461,12 +442,12 @@ extern error_t argp_err_exit_status; /* Output a usage message for ARGP to STREAM. FLAGS are from the set ARGP_HELP_*. */ -extern void argp_help __P ((__const struct argp *__restrict __argp, - FILE *__restrict __stream, - unsigned __flags, char *__restrict __name)); -extern void __argp_help __P ((__const struct argp *__restrict __argp, - FILE *__restrict __stream, unsigned __flags, - char *__name)); +extern void argp_help (__const struct argp *__restrict __argp, + FILE *__restrict __stream, + unsigned __flags, char *__restrict __name) __THROW; +extern void __argp_help __P (__const struct argp *__restrict __argp, + FILE *__restrict __stream, unsigned __flags, + char *__name) __THROW; /* The following routines are intended to be called from within an argp parsing routine (thus taking an argp_state structure as the first @@ -478,27 +459,25 @@ extern void __argp_help __P ((__const struct argp *__restrict __argp, /* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are from the set ARGP_HELP_*. */ -extern void argp_state_help __P ((__const struct argp_state *__restrict - __state, - FILE *__restrict __stream, - unsigned int __flags)); -extern void __argp_state_help __P ((__const struct argp_state *__restrict - __state, - FILE *__restrict __stream, - unsigned int __flags)); +extern void argp_state_help (__const struct argp_state *__restrict __state, + FILE *__restrict __stream, + unsigned int __flags) __THROW; +extern void __argp_state_help (__const struct argp_state *__restrict __state, + FILE *__restrict __stream, + unsigned int __flags) __THROW; /* Possibly output the standard usage message for ARGP to stderr and exit. */ -extern void argp_usage __P ((__const struct argp_state *__state)); -extern void __argp_usage __P ((__const struct argp_state *__state)); +extern void argp_usage (__const struct argp_state *__state) __THROW; +extern void __argp_usage (__const struct argp_state *__state) __THROW; /* If appropriate, print the printf string FMT and following args, preceded by the program name and `:', to stderr, and followed by a `Try ... --help' message, then exit (1). */ -extern void argp_error __P ((__const struct argp_state *__restrict __state, - __const char *__restrict __fmt, ...)) +extern void argp_error (__const struct argp_state *__restrict __state, + __const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))); -extern void __argp_error __P ((__const struct argp_state *__restrict __state, - __const char *__restrict __fmt, ...)) +extern void __argp_error (__const struct argp_state *__restrict __state, + __const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 2, 3))); /* Similar to the standard gnu error-reporting function error(), but will @@ -509,31 +488,32 @@ extern void __argp_error __P ((__const struct argp_state *__restrict __state, difference between this function and argp_error is that the latter is for *parsing errors*, and the former is for other problems that occur during parsing but don't reflect a (syntactic) problem with the input. */ -extern void argp_failure __P ((__const struct argp_state *__restrict __state, - int __status, int __errnum, - __const char *__restrict __fmt, ...)) +extern void argp_failure (__const struct argp_state *__restrict __state, + int __status, int __errnum, + __const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 4, 5))); -extern void __argp_failure __P ((__const struct argp_state *__restrict __state, - int __status, int __errnum, - __const char *__restrict __fmt, ...)) +extern void __argp_failure (__const struct argp_state *__restrict __state, + int __status, int __errnum, + __const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 4, 5))); /* Returns true if the option OPT is a valid short option. */ -extern int _option_is_short __P ((__const struct argp_option *__opt)); -extern int __option_is_short __P ((__const struct argp_option *__opt)); +extern int _option_is_short (__const struct argp_option *__opt) __THROW; +extern int __option_is_short (__const struct argp_option *__opt) __THROW; /* Returns true if the option OPT is in fact the last (unused) entry in an options array. */ -extern int _option_is_end __P ((__const struct argp_option *__opt)); -extern int __option_is_end __P ((__const struct argp_option *__opt)); +extern int _option_is_end (__const struct argp_option *__opt) __THROW; +extern int __option_is_end (__const struct argp_option *__opt) __THROW; /* Return the input field for ARGP in the parser corresponding to STATE; used by the help routines. */ -extern void *_argp_input __P ((__const struct argp *__restrict __argp, - __const struct argp_state *__restrict __state)); -extern void *__argp_input __P ((__const struct argp *__restrict __argp, - __const struct argp_state *__restrict - __state)); +extern void *_argp_input (__const struct argp *__restrict __argp, + __const struct argp_state *__restrict __state) + __THROW; +extern void *__argp_input (__const struct argp *__restrict __argp, + __const struct argp_state *__restrict __state) + __THROW; #ifdef __USE_EXTERN_INLINES diff --git a/assert/assert.h b/assert/assert.h index 326183a..b37583c 100644 --- a/assert/assert.h +++ b/assert/assert.h @@ -58,18 +58,15 @@ __BEGIN_DECLS /* This prints an "Assertion failed" message and aborts. */ -extern void __assert_fail __P ((__const char *__assertion, - __const char *__file, - unsigned int __line, - __const char *__function)) - __attribute__ ((__noreturn__)); +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + __THROW __attribute__ ((__noreturn__)); /* Likewise, but prints the error text for ERRNUM. */ -extern void __assert_perror_fail __P ((int __errnum, - __const char *__file, - unsigned int __line, - __const char *__function)) - __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + __THROW __attribute__ ((__noreturn__)); __END_DECLS diff --git a/catgets/nl_types.h b/catgets/nl_types.h index 960edb5..7de084d 100644 --- a/catgets/nl_types.h +++ b/catgets/nl_types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -37,15 +37,15 @@ typedef void *nl_catd; typedef int nl_item; /* Open message catalog for later use, returning descriptor. */ -extern nl_catd catopen __P ((__const char *__cat_name, int __flag)); +extern nl_catd catopen (__const char *__cat_name, int __flag) __THROW; /* Return translation with NUMBER in SET of CATALOG; if not found return STRING. */ -extern char *catgets __P ((nl_catd __catalog, int __set, int __number, - __const char *__string)); +extern char *catgets (nl_catd __catalog, int __set, int __number, + __const char *__string) __THROW; /* Close message CATALOG. */ -extern int catclose __P ((nl_catd __catalog)); +extern int catclose (nl_catd __catalog) __THROW; __END_DECLS diff --git a/ctype/ctype.h b/ctype/ctype.h index f287568..fe8f4b1 100644 --- a/ctype/ctype.h +++ b/ctype/ctype.h @@ -82,7 +82,7 @@ extern __const __int32_t *__ctype_toupper; /* Case conversions. */ #define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */ #define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */ -#define __exctype(name) extern int name __P ((int)) +#define __exctype(name) extern int name (int) __THROW /* The following names are all functions: int isCHARACTERISTIC(int c); @@ -106,21 +106,21 @@ __exctype (isblank); /* Return the lowercase version of C. */ -extern int tolower __P ((int __c)); +extern int tolower (int __c) __THROW; /* Return the uppercase version of C. */ -extern int toupper __P ((int __c)); +extern int toupper (int __c) __THROW; #if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN /* Return nonzero iff C is in the ASCII set (i.e., is no more than 7 bits wide). */ -extern int isascii __P ((int __c)); +extern int isascii (int __c) __THROW; /* Return the part of C that is in the ASCII set (i.e., the low-order 7 bits of C). */ -extern int toascii __P ((int __c)); +extern int toascii (int __c) __THROW; /* These are the same as `toupper' and `tolower' except that they do not check the argument for being in the range of a `char'. */ @@ -128,6 +128,24 @@ __exctype (_toupper); __exctype (_tolower); #endif /* Use SVID or use misc. */ +/* This code is needed for the optimized mapping functions. */ +#define __tobody(c, f, a, args) \ + (__extension__ \ + ({ int __res; \ + if (sizeof (c) > 1) \ + { \ + if (__builtin_constant_p (c)) \ + { \ + int __c = (c); \ + __res = __c < -128 || __c > 255 ? __c : a[__c]; \ + } \ + else \ + __res = f args; \ + } \ + else \ + __res = a[(int) (c)]; \ + __res; })) + #ifndef __NO_CTYPE # define isalnum(c) __isctype((c), _ISalnum) # define isalpha(c) __isctype((c), _ISalpha) @@ -161,25 +179,8 @@ toupper (int __c) __THROW # endif # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus -# define __tobody(c, f, a) \ - (__extension__ \ - ({ int __res; \ - if (sizeof (c) > 1) \ - { \ - if (__builtin_constant_p (c)) \ - { \ - int __c = (c); \ - __res = __c < -128 || __c > 255 ? __c : a[__c]; \ - } \ - else \ - __res = f (c); \ - } \ - else \ - __res = a[(int) (c)]; \ - __res; })) - -# define tolower(c) __tobody (c, tolower, __ctype_tolower) -# define toupper(c) __tobody (c, toupper, __ctype_toupper) +# define tolower(c) __tobody (c, tolower, __ctype_tolower, (c)) +# define toupper(c) __tobody (c, toupper, __ctype_toupper, (c)) # endif /* Optimizing gcc */ # if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN @@ -211,13 +212,12 @@ toupper (int __c) __THROW /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ -# define __isctype_l(c, type, locale) \ +# ifdef __OPTIMIZE__ +# define __isctype_l(c, type, locale) \ ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) +# endif -# define __tolower_l(c, locale) ((int) (locale)->__ctype_tolower[(int) (c)]) -# define __toupper_l(c, locale) ((int) (locale)->__ctype_toupper[(int) (c)]) - -# define __exctype_l(name) extern int name __P ((int, __locale_t)) +# define __exctype_l(name) extern int name (int, __locale_t) __THROW /* The following names are all functions: int isCHARACTERISTIC(int c, locale_t *locale); @@ -239,10 +239,17 @@ __exctype_l (__isblank_l); /* Return the lowercase version of C in locale L. */ -extern int __tolower_l __P ((int __c, __locale_t __l)); +extern int __tolower_l (int __c, __locale_t __l) __THROW; /* Return the uppercase version of C. */ -extern int __toupper_l __P ((int __c, __locale_t __l)); +extern int __toupper_l (int __c, __locale_t __l) __THROW; + +# if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus +# define __tolower_l(c, locale) \ + __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale)) +# define __toupper_l(c, locale) \ + __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale)) +# endif /* Optimizing gcc */ # ifndef __NO_CTYPE @@ -117,14 +117,14 @@ typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; /* Access method description structure. */ typedef struct __db { DBTYPE type; /* Underlying db type. */ - int (*close) __PMT((struct __db *)); - int (*del) __PMT((const struct __db *, const DBT *, u_int)); - int (*get) __PMT((const struct __db *, const DBT *, DBT *, u_int)); - int (*put) __PMT((const struct __db *, DBT *, const DBT *, u_int)); - int (*seq) __PMT((const struct __db *, DBT *, DBT *, u_int)); - int (*sync) __PMT((const struct __db *, u_int)); + int (*close) (struct __db *); + int (*del) (const struct __db *, const DBT *, u_int); + int (*get) (const struct __db *, const DBT *, DBT *, u_int); + int (*put) (const struct __db *, DBT *, const DBT *, u_int); + int (*seq) (const struct __db *, DBT *, DBT *, u_int); + int (*sync) (const struct __db *, u_int); void *internal; /* Access method private. */ - int (*fd) __PMT((const struct __db *)); + int (*fd) (const struct __db *); } DB; #define BTREEMAGIC 0x053162 @@ -139,9 +139,9 @@ typedef struct { int minkeypage; /* minimum keys per page */ u_int psize; /* page size */ int (*compare) /* comparison function */ - __PMT((const DBT *, const DBT *)); + (const DBT *, const DBT *); size_t (*prefix) /* prefix function */ - __PMT((const DBT *, const DBT *)); + (const DBT *, const DBT *); int lorder; /* byte order */ } BTREEINFO; @@ -155,7 +155,7 @@ typedef struct { u_int nelem; /* number of elements */ u_int cachesize; /* bytes to cache */ u_int32_t /* hash function */ - (*hash) __PMT((const void *, size_t)); + (*hash) (const void *, size_t); int lorder; /* byte order */ } HASHINFO; @@ -170,7 +170,7 @@ typedef struct { int lorder; /* byte order */ size_t reclen; /* record length (fixed-length records) */ u_char bval; /* delimiting byte (variable-length records */ - char *bfname; /* btree file name */ + char *bfname; /* btree file name */ } RECNOINFO; #ifdef __DBINTERFACE_PRIVATE @@ -224,14 +224,14 @@ typedef struct { #endif __BEGIN_DECLS -DB *__dbopen __P((const char *, int, int, DBTYPE, const void *)); -DB *dbopen __P((const char *, int, int, DBTYPE, const void *)); +DB *__dbopen (const char *, int, int, DBTYPE, const void *) __THROW; +DB *dbopen (const char *, int, int, DBTYPE, const void *) __THROW; #ifdef __DBINTERFACE_PRIVATE -DB *__bt_open __P((const char *, int, int, const BTREEINFO *, int)); -DB *__hash_open __P((const char *, int, int, const HASHINFO *, int)); -DB *__rec_open __P((const char *, int, int, const RECNOINFO *, int)); -void __dbpanic __P((DB *dbp)); +DB *__bt_open (const char *, int, int, const BTREEINFO *, int) __THROW; +DB *__hash_open (const char *, int, int, const HASHINFO *, int) __THROW; +DB *__rec_open (const char *, int, int, const RECNOINFO *, int) __THROW; +void __dbpanic (DB *dbp) __THROW; #endif __END_DECLS @@ -63,17 +63,17 @@ typedef DB DBM; #define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE __BEGIN_DECLS -void dbm_close __P((DBM *)); -int dbm_delete __P((DBM *, datum)); -datum dbm_fetch __P((DBM *, datum)); -datum dbm_firstkey __P((DBM *)); -long dbm_forder __P((DBM *, datum)); -datum dbm_nextkey __P((DBM *)); -DBM *dbm_open __P((const char *, int, int)); -int dbm_store __P((DBM *, datum, datum, int)); -int dbm_dirfno __P((DBM *)); -int dbm_error __P((DBM *)); -int dbm_clearerr __P((DBM *)); +void dbm_close (DBM *); +int dbm_delete (DBM *, datum); +datum dbm_fetch (DBM *, datum); +datum dbm_firstkey (DBM *); +long dbm_forder (DBM *, datum); +datum dbm_nextkey (DBM *); +DBM *dbm_open (const char *, int, int); +int dbm_store (DBM *, datum, datum, int); +int dbm_dirfno (DBM *); +int dbm_error (DBM *); +int dbm_clearerr (DBM *); __END_DECLS #endif /* ndbm.h */ @@ -201,12 +201,12 @@ struct __db_env { int db_lorder; /* Byte order. */ /* Error message callback. */ - void (*db_errcall) __P((const char *, char *)); + void (*db_errcall) (const char *, char *); FILE *db_errfile; /* Error message file stream. */ const char *db_errpfx; /* Error message prefix. */ int db_verbose; /* Generate debugging messages. */ int db_panic; /* Panic flag, callback function. */ - void (*db_paniccall) __P((DB_ENV *, int)); + void (*db_paniccall) (DB_ENV *, int); /* User paths. */ char *db_home; /* Database home. */ @@ -237,7 +237,7 @@ struct __db_env { DB_TXNMGR *tx_info; /* Return from txn_open(). */ u_int32_t tx_max; /* Maximum number of transactions. */ int (*tx_recover) /* Dispatch function for recovery. */ - __P((DB_LOG *, DBT *, DB_LSN *, int, void *)); + (DB_LOG *, DBT *, DB_LSN *, int, void *); /* * XA support. @@ -293,23 +293,23 @@ struct __db_info { size_t db_pagesize; /* Underlying page size. */ /* Local heap allocation. */ - void *(*db_malloc) __P((size_t)); + void *(*db_malloc) (size_t); int (*dup_compare) /* Duplicate compare function. */ - __P((const DBT *, const DBT *)); + (const DBT *, const DBT *); /* Btree access method. */ u_int32_t bt_maxkey; /* Maximum keys per page. */ u_int32_t bt_minkey; /* Minimum keys per page. */ int (*bt_compare) /* Comparison function. */ - __P((const DBT *, const DBT *)); + (const DBT *, const DBT *); size_t (*bt_prefix) /* Prefix function. */ - __P((const DBT *, const DBT *)); + (const DBT *, const DBT *); /* Hash access method. */ u_int32_t h_ffactor; /* Fill factor. */ u_int32_t h_nelem; /* Number of elements. */ u_int32_t (*h_hash) /* Hash function. */ - __P((const void *, u_int32_t)); + (const void *, u_int32_t); /* Recno access method. */ int re_pad; /* Fixed-length padding byte. */ @@ -423,23 +423,23 @@ struct __db { size_t pgsize; /* Logical page size of file. */ /* Local heap allocation. */ - void *(*db_malloc) __P((size_t)); + void *(*db_malloc) (size_t); int (*dup_compare) /* Duplicate compare function. */ - __P((const DBT *, const DBT *)); + (const DBT *, const DBT *); u_int32_t (*h_hash) /* Hash function. */ - __P((const void *, u_int32_t)); + (const void *, u_int32_t); /* Functions. */ - int (*am_close) __P((DB *)); - int (*close) __P((DB *, u_int32_t)); - int (*cursor) __P((DB *, DB_TXN *, DBC **, u_int32_t)); - int (*del) __P((DB *, DB_TXN *, DBT *, u_int32_t)); - int (*fd) __P((DB *, int *)); - int (*get) __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); - int (*join) __P((DB *, DBC **, u_int32_t, DBC **)); - int (*put) __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); - int (*stat) __P((DB *, void *, void *(*)(size_t), u_int32_t)); - int (*sync) __P((DB *, u_int32_t)); + int (*am_close) (DB *); + int (*close) (DB *, u_int32_t); + int (*cursor) (DB *, DB_TXN *, DBC **, u_int32_t); + int (*del) (DB *, DB_TXN *, DBT *, u_int32_t); + int (*fd) (DB *, int *); + int (*get) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t); + int (*join) (DB *, DBC **, u_int32_t, DBC **); + int (*put) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t); + int (*stat) (DB *, void *, void *(*)(size_t), u_int32_t); + int (*sync) (DB *, u_int32_t); #define DB_AM_CDB 0x000001 /* Concurrent Access Methods. */ #define DB_AM_DUP 0x000002 /* DB_DUP (internal). */ @@ -491,12 +491,12 @@ struct __dbc { DBT rkey; /* Returned key. */ DBT rdata; /* Returned data. */ - int (*c_am_close) __P((DBC *)); - int (*c_am_destroy) __P((DBC *)); - int (*c_close) __P((DBC *)); - int (*c_del) __P((DBC *, u_int32_t)); - int (*c_get) __P((DBC *, DBT *, DBT *, u_int32_t)); - int (*c_put) __P((DBC *, DBT *, DBT *, u_int32_t)); + int (*c_am_close) (DBC *); + int (*c_am_destroy) (DBC *); + int (*c_close) (DBC *); + int (*c_del) (DBC *, u_int32_t); + int (*c_get) (DBC *, DBT *, DBT *, u_int32_t); + int (*c_put) (DBC *, DBT *, DBT *, u_int32_t); void *internal; /* Access method private. */ @@ -556,15 +556,14 @@ struct __db_h_stat { #if defined(__cplusplus) extern "C" { #endif -int db_appinit __P((const char *, char * const *, DB_ENV *, u_int32_t)); -int db_appexit __P((DB_ENV *)); -int db_jump_set __P((void *, int)); -int db_open __P((const char *, - DBTYPE, u_int32_t, int, DB_ENV *, DB_INFO *, DB **)); -int db_value_set __P((int, int)); -char *db_version __P((int *, int *, int *)); -int db_xa_open __P((const char *, - DBTYPE, u_int32_t, int, DB_INFO *, DB **)); +int db_appinit (const char *, char * const *, DB_ENV *, u_int32_t); +int db_appexit (DB_ENV *); +int db_jump_set (void *, int); +int db_open (const char *, + DBTYPE, u_int32_t, int, DB_ENV *, DB_INFO *, DB **); +int db_value_set (int, int); +char *db_version (int *, int *, int *); +int db_xa_open (const char *, DBTYPE, u_int32_t, int, DB_INFO *, DB **); #if defined(__cplusplus) } #endif @@ -674,22 +673,21 @@ struct __db_lock_stat { #if defined(__cplusplus) extern "C" { #endif -int lock_close __P((DB_LOCKTAB *)); -int lock_detect __P((DB_LOCKTAB *, u_int32_t, u_int32_t)); -int lock_get __P((DB_LOCKTAB *, - u_int32_t, u_int32_t, const DBT *, db_lockmode_t, DB_LOCK *)); -int lock_id __P((DB_LOCKTAB *, u_int32_t *)); -int lock_open __P((const char *, - u_int32_t, int, DB_ENV *, DB_LOCKTAB **)); -int lock_put __P((DB_LOCKTAB *, DB_LOCK)); -int lock_tget __P((DB_LOCKTAB *, - DB_TXN *, u_int32_t, const DBT *, db_lockmode_t, DB_LOCK *)); -int lock_stat __P((DB_LOCKTAB *, DB_LOCK_STAT **, void *(*)(size_t))); -int lock_unlink __P((const char *, int, DB_ENV *)); -int lock_vec __P((DB_LOCKTAB *, - u_int32_t, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **)); -int lock_tvec __P((DB_LOCKTAB *, - DB_TXN *, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **)); +int lock_close (DB_LOCKTAB *); +int lock_detect (DB_LOCKTAB *, u_int32_t, u_int32_t); +int lock_get (DB_LOCKTAB *, + u_int32_t, u_int32_t, const DBT *, db_lockmode_t, DB_LOCK *); +int lock_id (DB_LOCKTAB *, u_int32_t *); +int lock_open (const char *, u_int32_t, int, DB_ENV *, DB_LOCKTAB **); +int lock_put (DB_LOCKTAB *, DB_LOCK); +int lock_tget (DB_LOCKTAB *, + DB_TXN *, u_int32_t, const DBT *, db_lockmode_t, DB_LOCK *); +int lock_stat (DB_LOCKTAB *, DB_LOCK_STAT **, void *(*)(size_t)); +int lock_unlink (const char *, int, DB_ENV *); +int lock_vec (DB_LOCKTAB *, + u_int32_t, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **); +int lock_tvec (DB_LOCKTAB *, + DB_TXN *, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **); #if defined(__cplusplus) } #endif @@ -739,18 +737,18 @@ struct __db_log_stat { #if defined(__cplusplus) extern "C" { #endif -int log_archive __P((DB_LOG *, char **[], u_int32_t, void *(*)(size_t))); -int log_close __P((DB_LOG *)); -int log_compare __P((const DB_LSN *, const DB_LSN *)); -int log_file __P((DB_LOG *, const DB_LSN *, char *, size_t)); -int log_flush __P((DB_LOG *, const DB_LSN *)); -int log_get __P((DB_LOG *, DB_LSN *, DBT *, u_int32_t)); -int log_open __P((const char *, u_int32_t, int, DB_ENV *, DB_LOG **)); -int log_put __P((DB_LOG *, DB_LSN *, const DBT *, u_int32_t)); -int log_register __P((DB_LOG *, DB *, const char *, DBTYPE, u_int32_t *)); -int log_stat __P((DB_LOG *, DB_LOG_STAT **, void *(*)(size_t))); -int log_unlink __P((const char *, int, DB_ENV *)); -int log_unregister __P((DB_LOG *, u_int32_t)); +int log_archive (DB_LOG *, char **[], u_int32_t, void *(*)(size_t)); +int log_close (DB_LOG *); +int log_compare (const DB_LSN *, const DB_LSN *); +int log_file (DB_LOG *, const DB_LSN *, char *, size_t); +int log_flush (DB_LOG *, const DB_LSN *); +int log_get (DB_LOG *, DB_LSN *, DBT *, u_int32_t); +int log_open (const char *, u_int32_t, int, DB_ENV *, DB_LOG **); +int log_put (DB_LOG *, DB_LSN *, const DBT *, u_int32_t); +int log_register (DB_LOG *, DB *, const char *, DBTYPE, u_int32_t *); +int log_stat (DB_LOG *, DB_LOG_STAT **, void *(*)(size_t)); +int log_unlink (const char *, int, DB_ENV *); +int log_unregister (DB_LOG *, u_int32_t); #if defined(__cplusplus) } #endif @@ -816,23 +814,23 @@ struct __db_mpool_fstat { #if defined(__cplusplus) extern "C" { #endif -int memp_close __P((DB_MPOOL *)); -int memp_fclose __P((DB_MPOOLFILE *)); -int memp_fget __P((DB_MPOOLFILE *, db_pgno_t *, u_int32_t, void *)); -int memp_fopen __P((DB_MPOOL *, const char *, - u_int32_t, int, size_t, DB_MPOOL_FINFO *, DB_MPOOLFILE **)); -int memp_fput __P((DB_MPOOLFILE *, void *, u_int32_t)); -int memp_fset __P((DB_MPOOLFILE *, void *, u_int32_t)); -int memp_fsync __P((DB_MPOOLFILE *)); -int memp_open __P((const char *, u_int32_t, int, DB_ENV *, DB_MPOOL **)); -int memp_register __P((DB_MPOOL *, int, +int memp_close (DB_MPOOL *); +int memp_fclose (DB_MPOOLFILE *); +int memp_fget (DB_MPOOLFILE *, db_pgno_t *, u_int32_t, void *); +int memp_fopen (DB_MPOOL *, const char *, + u_int32_t, int, size_t, DB_MPOOL_FINFO *, DB_MPOOLFILE **); +int memp_fput (DB_MPOOLFILE *, void *, u_int32_t); +int memp_fset (DB_MPOOLFILE *, void *, u_int32_t); +int memp_fsync (DB_MPOOLFILE *); +int memp_open (const char *, u_int32_t, int, DB_ENV *, DB_MPOOL **); +int memp_register (DB_MPOOL *, int, int (*)(db_pgno_t, void *, DBT *), - int (*)(db_pgno_t, void *, DBT *))); -int memp_stat __P((DB_MPOOL *, - DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***, void *(*)(size_t))); -int memp_sync __P((DB_MPOOL *, DB_LSN *)); -int memp_trickle __P((DB_MPOOL *, int, int *)); -int memp_unlink __P((const char *, int, DB_ENV *)); + int (*)(db_pgno_t, void *, DBT *)); +int memp_stat (DB_MPOOL *, + DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***, void *(*)(size_t)); +int memp_sync (DB_MPOOL *, DB_LSN *); +int memp_trickle (DB_MPOOL *, int, int *); +int memp_unlink (const char *, int, DB_ENV *); #if defined(__cplusplus) } #endif @@ -879,16 +877,16 @@ struct __db_txn_stat { #if defined(__cplusplus) extern "C" { #endif -int txn_abort __P((DB_TXN *)); -int txn_begin __P((DB_TXNMGR *, DB_TXN *, DB_TXN **)); -int txn_checkpoint __P((const DB_TXNMGR *, u_int32_t, u_int32_t)); -int txn_commit __P((DB_TXN *)); -int txn_close __P((DB_TXNMGR *)); -u_int32_t txn_id __P((DB_TXN *)); -int txn_open __P((const char *, u_int32_t, int, DB_ENV *, DB_TXNMGR **)); -int txn_prepare __P((DB_TXN *)); -int txn_stat __P((DB_TXNMGR *, DB_TXN_STAT **, void *(*)(size_t))); -int txn_unlink __P((const char *, int, DB_ENV *)); +int txn_abort (DB_TXN *); +int txn_begin (DB_TXNMGR *, DB_TXN *, DB_TXN **); +int txn_checkpoint (const DB_TXNMGR *, u_int32_t, u_int32_t); +int txn_commit (DB_TXN *); +int txn_close (DB_TXNMGR *); +u_int32_t txn_id (DB_TXN *); +int txn_open (const char *, u_int32_t, int, DB_ENV *, DB_TXNMGR **); +int txn_prepare (DB_TXN *); +int txn_stat (DB_TXNMGR *, DB_TXN_STAT **, void *(*)(size_t)); +int txn_unlink (const char *, int, DB_ENV *); #if defined(__cplusplus) } #endif @@ -942,16 +940,16 @@ typedef struct { #if defined(__cplusplus) extern "C" { #endif -int __db_dbm_close __P((void)); -int __db_dbm_dbrdonly __P((void)); -int __db_dbm_delete __P((datum)); -int __db_dbm_dirf __P((void)); -datum __db_dbm_fetch __P((datum)); -datum __db_dbm_firstkey __P((void)); -int __db_dbm_init __P((char *)); -datum __db_dbm_nextkey __P((datum)); -int __db_dbm_pagf __P((void)); -int __db_dbm_store __P((datum, datum)); +int __db_dbm_close (void); +int __db_dbm_dbrdonly (void); +int __db_dbm_delete (datum); +int __db_dbm_dirf (void); +datum __db_dbm_fetch (datum); +datum __db_dbm_firstkey (void); +int __db_dbm_init (char *); +datum __db_dbm_nextkey (datum); +int __db_dbm_pagf (void); +int __db_dbm_store (datum, datum); #if defined(__cplusplus) } #endif @@ -977,18 +975,18 @@ int __db_dbm_store __P((datum, datum)); #if defined(__cplusplus) extern "C" { #endif -int __db_ndbm_clearerr __P((DBM *)); -void __db_ndbm_close __P((DBM *)); -int __db_ndbm_delete __P((DBM *, datum)); -int __db_ndbm_dirfno __P((DBM *)); -int __db_ndbm_error __P((DBM *)); -datum __db_ndbm_fetch __P((DBM *, datum)); -datum __db_ndbm_firstkey __P((DBM *)); -datum __db_ndbm_nextkey __P((DBM *)); -DBM *__db_ndbm_open __P((const char *, int, int)); -int __db_ndbm_pagfno __P((DBM *)); -int __db_ndbm_rdonly __P((DBM *)); -int __db_ndbm_store __P((DBM *, datum, datum, int)); +int __db_ndbm_clearerr (DBM *); +void __db_ndbm_close (DBM *); +int __db_ndbm_delete (DBM *, datum); +int __db_ndbm_dirfno (DBM *); +int __db_ndbm_error (DBM *); +datum __db_ndbm_fetch (DBM *, datum); +datum __db_ndbm_firstkey (DBM *); +datum __db_ndbm_nextkey (DBM *); +DBM *__db_ndbm_open (const char *, int, int); +int __db_ndbm_pagfno (DBM *); +int __db_ndbm_rdonly (DBM *); +int __db_ndbm_store (DBM *, datum, datum, int); #if defined(__cplusplus) } #endif @@ -1017,9 +1015,9 @@ typedef struct entry { #if defined(__cplusplus) extern "C" { #endif -int __db_hcreate __P((size_t)); -void __db_hdestroy __P((void)); -ENTRY *__db_hsearch __P((ENTRY, ACTION)); +int __db_hcreate (size_t); +void __db_hdestroy (void); +ENTRY *__db_hsearch (ENTRY, ACTION); #if defined(__cplusplus) } #endif diff --git a/db2/db_185.h b/db2/db_185.h index a928ca8..456a8b4 100644 --- a/db2/db_185.h +++ b/db2/db_185.h @@ -111,14 +111,14 @@ typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; /* Access method description structure. */ typedef struct __db { DBTYPE type; /* Underlying db type. */ - int (*close) __P((struct __db *)); - int (*del) __P((const struct __db *, const DBT *, u_int)); - int (*get) __P((const struct __db *, const DBT *, DBT *, u_int)); - int (*put) __P((const struct __db *, DBT *, const DBT *, u_int)); - int (*seq) __P((const struct __db *, DBT *, DBT *, u_int)); - int (*sync) __P((const struct __db *, u_int)); + int (*close) (struct __db *); + int (*del) (const struct __db *, const DBT *, u_int); + int (*get) (const struct __db *, const DBT *, DBT *, u_int); + int (*put) (const struct __db *, DBT *, const DBT *, u_int); + int (*seq) (const struct __db *, DBT *, DBT *, u_int); + int (*sync) (const struct __db *, u_int); void *internal; /* Access method private. */ - int (*fd) __P((const struct __db *)); + int (*fd) (const struct __db *); } DB; #define BTREEMAGIC 0x053162 @@ -133,9 +133,9 @@ typedef struct { u_int32_t minkeypage; /* minimum keys per page */ u_int32_t psize; /* page size */ int (*compare) /* comparison function */ - __P((const DBT *, const DBT *)); + (const DBT *, const DBT *); size_t (*prefix) /* prefix function */ - __P((const DBT *, const DBT *)); + (const DBT *, const DBT *); int lorder; /* byte order */ } BTREEINFO; @@ -149,7 +149,7 @@ typedef struct { u_int32_t nelem; /* number of elements */ u_int32_t cachesize; /* bytes to cache */ u_int32_t /* hash function */ - (*hash) __P((const void *, size_t)); + (*hash) (const void *, size_t); int lorder; /* byte order */ } HASHINFO; @@ -170,7 +170,7 @@ typedef struct { #if defined(__cplusplus) extern "C" { #endif -DB *dbopen __P((const char *, int, int, DBTYPE, const void *)); +DB *dbopen (const char *, int, int, DBTYPE, const void *); #if defined(__cplusplus) } diff --git a/debug/execinfo.h b/debug/execinfo.h index 9e0e551..87267fb 100644 --- a/debug/execinfo.h +++ b/debug/execinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -25,23 +25,19 @@ __BEGIN_DECLS /* Store up to SIZE return address of the current program state in ARRAY and return the exact number of values stored. */ -extern int __backtrace __P ((void **__array, int __size)); -extern int backtrace __P ((void **__array, int __size)); +extern int backtrace (void **__array, int __size) __THROW; /* Return names of functions from the backtrace list in ARRAY in a newly malloc()ed memory block. */ -extern char **__backtrace_symbols __P ((void *__const *__array, int __size)); -extern char **backtrace_symbols __P ((void *__const *__array, int __size)); +extern char **backtrace_symbols (void *__const *__array, int __size) __THROW; /* This function is similar to backtrace_symbols() but it writes the result immediately to a file and can therefore also be used in situations where malloc() is not usable anymore. */ -extern void __backtrace_symbols_fd __P ((void *__const *__array, int __size, - int __fd)); -extern void backtrace_symbols_fd __P ((void *__const *__array, int __size, - int __fd)); +extern void backtrace_symbols_fd (void *__const *__array, int __size, + int __fd) __THROW; __END_DECLS diff --git a/dirent/dirent.h b/dirent/dirent.h index 29b9cd5..8caa93c 100644 --- a/dirent/dirent.h +++ b/dirent/dirent.h @@ -127,11 +127,11 @@ typedef struct __dirstream DIR; /* Open a directory stream on NAME. Return a DIR stream on the directory, or NULL if it could not be opened. */ -extern DIR *opendir __P ((__const char *__name)); +extern DIR *opendir (__const char *__name) __THROW; /* Close the directory stream DIRP. Return 0 if successful, -1 if not. */ -extern int closedir __P ((DIR *__dirp)); +extern int closedir (DIR *__dirp) __THROW; /* Read a directory entry from DIRP. Return a pointer to a `struct dirent' describing the entry, or NULL for EOF or error. The @@ -141,61 +141,62 @@ extern int closedir __P ((DIR *__dirp)); If the Large File Support API is selected we have to use the appropriate interface. */ #ifndef __USE_FILE_OFFSET64 -extern struct dirent *readdir __P ((DIR *__dirp)); +extern struct dirent *readdir (DIR *__dirp) __THROW; #else # ifdef __REDIRECT -extern struct dirent *__REDIRECT (readdir, __P ((DIR *__dirp)), readdir64); +extern struct dirent *__REDIRECT (readdir, (DIR *__dirp) __THROW, readdir64); # else # define readdir readdir64 # endif #endif #ifdef __USE_LARGEFILE64 -extern struct dirent64 *readdir64 __P ((DIR *__dirp)); +extern struct dirent64 *readdir64 (DIR *__dirp) __THROW; #endif #if defined __USE_POSIX || defined __USE_MISC /* Reentrant version of `readdir'. Return in RESULT a pointer to the next entry. */ # ifndef __USE_FILE_OFFSET64 -extern int readdir_r __P ((DIR *__restrict __dirp, - struct dirent *__restrict __entry, - struct dirent **__restrict __result)); +extern int readdir_r (DIR *__restrict __dirp, + struct dirent *__restrict __entry, + struct dirent **__restrict __result) __THROW; # else # ifdef __REDIRECT -extern int __REDIRECT (readdir_r, __P ((DIR *__restrict __dirp, - struct dirent *__restrict __entry, - struct dirent **__restrict __result)), - readdir64_r); +extern int __REDIRECT (readdir_r, + (DIR *__restrict __dirp, + struct dirent *__restrict __entry, + struct dirent **__restrict __result) __THROW, + readdir64_r); # else # define readdir_r readdir64_r # endif # endif # ifdef __USE_LARGEFILE64 -extern int readdir64_r __P ((DIR *__restrict __dirp, - struct dirent64 *__restrict __entry, - struct dirent64 **__restrict __result)); +extern int readdir64_r (DIR *__restrict __dirp, + struct dirent64 *__restrict __entry, + struct dirent64 **__restrict __result) __THROW; # endif #endif /* POSIX or misc */ /* Rewind DIRP to the beginning of the directory. */ -extern void rewinddir __P ((DIR *__dirp)); +extern void rewinddir (DIR *__dirp) __THROW; #if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN # include <bits/types.h> /* Seek to position POS on DIRP. */ -extern void seekdir __P ((DIR *__dirp, long int __pos)); +extern void seekdir (DIR *__dirp, long int __pos) __THROW; /* Return the current position of DIRP. */ -extern long int telldir __P ((DIR *__dirp)); +extern long int telldir (DIR *__dirp) __THROW; #endif #if defined __USE_BSD || defined __USE_MISC /* Return the file descriptor used by DIRP. */ -extern int dirfd __P ((DIR *__dirp)); +extern int dirfd (DIR *__dirp) __THROW; # if defined __OPTIMIZE__ && defined _DIR_dirfd # define dirfd(dirp) _DIR_dirfd (dirp) @@ -221,17 +222,17 @@ extern int dirfd __P ((DIR *__dirp)); sorted using qsort with CMP, and collected in a malloc'd array in *NAMELIST. Returns the number of entries selected, or -1 on error. */ # ifndef __USE_FILE_OFFSET64 -extern int scandir __P ((__const char *__restrict __dir, - struct dirent ***__restrict __namelist, - int (*__selector) (__const struct dirent *), - int (*__cmp) (__const __ptr_t, __const __ptr_t))); +extern int scandir (__const char *__restrict __dir, + struct dirent ***__restrict __namelist, + int (*__selector) (__const struct dirent *), + int (*__cmp) (__const void *, __const void *)) __THROW; # else # ifdef __REDIRECT extern int __REDIRECT (scandir, - __P ((__const char *__restrict __dir, - struct dirent ***__restrict __namelist, - int (*__selector) (__const struct dirent *), - int (*__cmp) (__const __ptr_t, __const __ptr_t))), + (__const char *__restrict __dir, + struct dirent ***__restrict __namelist, + int (*__selector) (__const struct dirent *), + int (*__cmp) (__const void *, __const void *)) __THROW, scandir64); # else # define scandir scandir64 @@ -241,19 +242,19 @@ extern int __REDIRECT (scandir, # if defined __USE_GNU && defined __USE_LARGEFILE64 /* This function is like `scandir' but it uses the 64bit dirent structure. Please note that the CMP function must now work with struct dirent64 **. */ -extern int scandir64 __P ((__const char *__restrict __dir, - struct dirent64 ***__restrict __namelist, - int (*__selector) (__const struct dirent64 *), - int (*__cmp) (__const __ptr_t, __const __ptr_t))); +extern int scandir64 (__const char *__restrict __dir, + struct dirent64 ***__restrict __namelist, + int (*__selector) (__const struct dirent64 *), + int (*__cmp) (__const void *, __const void *)) __THROW; # endif /* Function to compare two `struct dirent's alphabetically. */ # ifndef __USE_FILE_OFFSET64 -extern int alphasort __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +extern int alphasort (__const void *__e1, __const void *__e2) __THROW; # else # ifdef __REDIRECT extern int __REDIRECT (alphasort, - __P ((__const __ptr_t __e1, __const __ptr_t __e2)), + (__const void *__e1, __const void *__e2) __THROW, alphasort64); # else # define alphasort alphasort64 @@ -261,17 +262,17 @@ extern int __REDIRECT (alphasort, # endif # if defined __USE_GNU && defined __USE_LARGEFILE64 -extern int alphasort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +extern int alphasort64 (__const void *__e1, __const void *__e2) __THROW; # endif # ifdef __USE_GNU /* Function to compare two `struct dirent's by name & version. */ # ifndef __USE_FILE_OFFSET64 -extern int versionsort __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +extern int versionsort (__const void *__e1, __const void *__e2) __THROW; # else # ifdef __REDIRECT extern int __REDIRECT (versionsort, - __P ((__const __ptr_t __e1, __const __ptr_t __e2)), + (__const void *__e1, __const void *__e2) __THROW, versionsort64); # else # define versionsort versionsort64 @@ -279,7 +280,7 @@ extern int __REDIRECT (versionsort, # endif # ifdef __USE_LARGEFILE64 -extern int versionsort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +extern int versionsort64 (__const void *__e1, __const void *__e2) __THROW; # endif # endif @@ -288,15 +289,15 @@ extern int versionsort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2)); position after reading. Returns the number of bytes read; zero when at end of directory; or -1 for errors. */ # ifndef __USE_FILE_OFFSET64 -extern __ssize_t getdirentries __P ((int __fd, char *__restrict __buf, - size_t __nbytes, - __off_t *__restrict __basep)); +extern __ssize_t getdirentries (int __fd, char *__restrict __buf, + size_t __nbytes, + __off_t *__restrict __basep) __THROW; # else # ifdef __REDIRECT extern __ssize_t __REDIRECT (getdirentries, - __P ((int __fd, char *__restrict __buf, - size_t __nbytes, - __off_t *__restrict __basep)), + (int __fd, char *__restrict __buf, + size_t __nbytes, + __off_t *__restrict __basep) __THROW, getdirentries64); # else # define getdirentries getdirentries64 @@ -304,9 +305,9 @@ extern __ssize_t __REDIRECT (getdirentries, # endif # ifdef __USE_LARGEFILE64 -extern __ssize_t getdirentries64 __P ((int __fd, char *__restrict __buf, - size_t __nbytes, - __off64_t *__restrict __basep)); +extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, + size_t __nbytes, + __off64_t *__restrict __basep) __THROW; # endif #endif /* Use BSD or misc. */ diff --git a/dlfcn/dlfcn.h b/dlfcn/dlfcn.h index 22ab9aa..b1c51c0 100644 --- a/dlfcn/dlfcn.h +++ b/dlfcn/dlfcn.h @@ -44,29 +44,29 @@ __BEGIN_DECLS /* Open the shared object FILE and map it in; return a handle that can be passed to `dlsym' to get symbol values from it. */ -extern void *dlopen __P ((__const char *__file, int __mode)); +extern void *dlopen (__const char *__file, int __mode) __THROW; /* Unmap and close a shared object opened by `dlopen'. The handle cannot be used again after calling `dlclose'. */ -extern int dlclose __P ((void *__handle)); +extern int dlclose (void *__handle) __THROW; /* Find the run-time address in the shared object HANDLE refers to of the symbol called NAME. */ -extern void *dlsym __P ((void *__restrict __handle, - __const char *__restrict __name)); +extern void *dlsym (void *__restrict __handle, + __const char *__restrict __name) __THROW; #ifdef __USE_GNU /* Find the run-time address in the shared object HANDLE refers to of the symbol called NAME with VERSION. */ -extern void *dlvsym __P ((void *__restrict __handle, - __const char *__restrict __name, - __const char *__restrict __version)); +extern void *dlvsym (void *__restrict __handle, + __const char *__restrict __name, + __const char *__restrict __version) __THROW; #endif /* When any of the above functions fails, call this function to return a string describing the error. Each call resets the error string so that a following call returns null. */ -extern char *dlerror __P ((void)); +extern char *dlerror (void) __THROW; #ifdef __USE_GNU /* Fill in *INFO with the following information about ADDRESS. @@ -78,7 +78,7 @@ typedef struct __const char *dli_sname; /* Name of nearest symbol. */ void *dli_saddr; /* Exact value of nearest symbol. */ } Dl_info; -extern int dladdr __P ((const void *__address, Dl_info *__info)); +extern int dladdr (const void *__address, Dl_info *__info) __THROW; /* To support profiling of shared objects it is a good idea to call the function found using `dlsym' using the following macro since @@ -94,7 +94,7 @@ extern int dladdr __P ((const void *__address, Dl_info *__info)); (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) /* This function calls the profiling functions. */ -extern void _dl_mcount_wrapper_check __P ((void *__selfpc)); +extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; #endif __END_DECLS diff --git a/gmon/sys/gmon.h b/gmon/sys/gmon.h index 0ae190e..bb17b75 100644 --- a/gmon/sys/gmon.h +++ b/gmon/sys/gmon.h @@ -165,11 +165,11 @@ extern struct gmonparam _gmonparam; __BEGIN_DECLS /* Set up data structures and start profiling. */ -extern void __monstartup __P ((u_long __lowpc, u_long __highpc)); -extern void monstartup __P ((u_long __lowpc, u_long __highpc)); +extern void __monstartup (u_long __lowpc, u_long __highpc) __THROW; +extern void monstartup (u_long __lowpc, u_long __highpc) __THROW; /* Clean up profiling and write out gmon.out. */ -extern void _mcleanup __P ((void)); +extern void _mcleanup (void) __THROW; __END_DECLS @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 95, 96, 97, 98, 99 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 @@ -57,31 +57,31 @@ struct group #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Rewind the group-file stream. */ -extern void setgrent __P ((void)); +extern void setgrent (void) __THROW; /* Close the group-file stream. */ -extern void endgrent __P ((void)); +extern void endgrent (void) __THROW; /* Read an entry from the group-file stream, opening it if necessary. */ -extern struct group *getgrent __P ((void)); +extern struct group *getgrent (void) __THROW; #endif #ifdef __USE_SVID /* Read a group entry from STREAM. */ -extern struct group *fgetgrent __P ((FILE *__stream)); +extern struct group *fgetgrent (FILE *__stream) __THROW; #endif #ifdef __USE_GNU /* Write the given entry onto the given stream. */ -extern int putgrent __P ((__const struct group *__restrict __p, - FILE *__restrict __f)); +extern int putgrent (__const struct group *__restrict __p, + FILE *__restrict __f) __THROW; #endif /* Search for an entry with a matching group ID. */ -extern struct group *getgrgid __P ((__gid_t __gid)); +extern struct group *getgrgid (__gid_t __gid) __THROW; /* Search for an entry with a matching group name. */ -extern struct group *getgrnam __P ((__const char *__name)); +extern struct group *getgrnam (__const char *__name) __THROW; #if defined __USE_POSIX || defined __USE_MISC @@ -100,30 +100,29 @@ extern struct group *getgrnam __P ((__const char *__name)); POSIX people would choose. */ # if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -extern int getgrent_r __P ((struct group *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result)); +extern int getgrent_r (struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result) __THROW; # endif /* Search for an entry with a matching group ID. */ -extern int getgrgid_r __P ((__gid_t __gid, - struct group *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result)); +extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result) __THROW; /* Search for an entry with a matching group name. */ -extern int getgrnam_r __P ((__const char *__restrict __name, - struct group *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result)); +extern int getgrnam_r (__const char *__restrict __name, + struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result) __THROW; # ifdef __USE_SVID /* Read a group entry from STREAM. This function is not standardized an probably never will. */ -extern int fgetgrent_r __P ((FILE *__restrict __stream, - struct group *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct group **__restrict __result)); +extern int fgetgrent_r (FILE *__restrict __stream, + struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result) __THROW; # endif #endif /* POSIX or reentrant */ @@ -135,12 +134,12 @@ extern int fgetgrent_r __P ((FILE *__restrict __stream, # include <stddef.h> /* Set the group set for the current user to GROUPS (N of them). */ -extern int setgroups __P ((size_t __n, __const __gid_t *__groups)); +extern int setgroups (size_t __n, __const __gid_t *__groups) __THROW; /* Initialize the group set for the current user by reading the group database and using all groups of which USER is a member. Also include GROUP. */ -extern int initgroups __P ((__const char *__user, __gid_t __group)); +extern int initgroups (__const char *__user, __gid_t __group) __THROW; #endif /* Use BSD. */ diff --git a/iconv/gconv.h b/iconv/gconv.h index f4a66c6..4d7022f 100644 --- a/iconv/gconv.h +++ b/iconv/gconv.h @@ -57,14 +57,13 @@ struct __gconv_loaded_object; /* Type of a conversion function. */ -typedef int (*__gconv_fct) __PMT ((struct __gconv_step *, - struct __gconv_step_data *, - __const unsigned char **, - __const unsigned char *, size_t *, int)); +typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, + __const unsigned char **, __const unsigned char *, + size_t *, int); /* Constructor and destructor for local data for conversion step. */ -typedef int (*__gconv_init_fct) __PMT ((struct __gconv_step *)); -typedef void (*__gconv_end_fct) __PMT ((struct __gconv_step *)); +typedef int (*__gconv_init_fct) (struct __gconv_step *); +typedef void (*__gconv_end_fct) (struct __gconv_step *); /* Description of a conversion step. */ diff --git a/iconv/iconv.h b/iconv/iconv.h index dac885b..217156c 100644 --- a/iconv/iconv.h +++ b/iconv/iconv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -32,20 +32,19 @@ typedef void *iconv_t; /* Allocate descriptor for code conversion from codeset FROMCODE to codeset TOCODE. */ -extern iconv_t iconv_open __P ((__const char *__tocode, - __const char *__fromcode)); +extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode) + __THROW; /* Convert at most *INBYTESLEFT bytes from *INBUF according to the code conversion algorithm specified by CD and place up to *OUTBYTESLEFT bytes in buffer at *OUTBUF. */ -extern size_t iconv __P ((iconv_t cd, - __const char **__restrict __inbuf, - size_t *__restrict __inbytesleft, - char **__restrict __outbuf, - size_t *__restrict __outbytesleft)); +extern size_t iconv (iconv_t cd, __const char **__restrict __inbuf, + size_t *__restrict __inbytesleft, + char **__restrict __outbuf, + size_t *__restrict __outbytesleft); /* Free resources allocated for descriptor CD for code conversion. */ -extern int iconv_close __P ((iconv_t __cd)); +extern int iconv_close (iconv_t __cd) __THROW; __END_DECLS diff --git a/include/execinfo.h b/include/execinfo.h index d5c5216..143a9cc 100644 --- a/include/execinfo.h +++ b/include/execinfo.h @@ -1 +1,11 @@ +#ifndef _EXECINFO_H #include <debug/execinfo.h> + +extern int __backtrace (void **__array, int __size); + +extern char **__backtrace_symbols (void *__const *__array, int __size); + +extern void __backtrace_symbols_fd (void *__const *__array, int __size, + int __fd); + +#endif diff --git a/inet/aliases.h b/inet/aliases.h index 8c47fe5..b050514 100644 --- a/inet/aliases.h +++ b/inet/aliases.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -37,28 +37,27 @@ struct aliasent /* Open alias data base files. */ -extern void setaliasent __P ((void)); +extern void setaliasent (void) __THROW; /* Close alias data base files. */ -extern void endaliasent __P ((void)); +extern void endaliasent (void) __THROW; /* Get the next entry from the alias data base. */ -extern struct aliasent *getaliasent __P ((void)); +extern struct aliasent *getaliasent (void) __THROW; /* Get the next entry from the alias data base and put it in RESULT_BUF. */ -extern int getaliasent_r __P ((struct aliasent *__restrict __result_buf, - char *__restrict __buffer, - size_t __buflen, - struct aliasent **__restrict __result)); +extern int getaliasent_r (struct aliasent *__restrict __result_buf, + char *__restrict __buffer, size_t __buflen, + struct aliasent **__restrict __result) __THROW; /* Get alias entry corresponding to NAME. */ -extern struct aliasent *getaliasbyname __P ((__const char *__name)); +extern struct aliasent *getaliasbyname (__const char *__name) __THROW; /* Get alias entry corresponding to NAME and put it in RESULT_BUF. */ -extern int getaliasbyname_r __P ((__const char *__restrict __name, - struct aliasent *__restrict __result_buf, - char *__restrict __buffer, size_t __buflen, - struct aliasent **__restrict __result)); +extern int getaliasbyname_r (__const char *__restrict __name, + struct aliasent *__restrict __result_buf, + char *__restrict __buffer, size_t __buflen, + struct aliasent **__restrict __result) __THROW; __END_DECLS diff --git a/inet/netinet/ether.h b/inet/netinet/ether.h index c7985d7..b4f9dea 100644 --- a/inet/netinet/ether.h +++ b/inet/netinet/ether.h @@ -1,5 +1,5 @@ /* Functions for storing Ethernet addresses in ASCII and mapping to hostnames. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -28,26 +28,26 @@ __BEGIN_DECLS /* Convert 48 bit Ethernet ADDRess to ASCII. */ -extern char *ether_ntoa __P ((__const struct ether_addr *__addr)); -extern char *ether_ntoa_r __P ((__const struct ether_addr *__addr, - char *__buf)); +extern char *ether_ntoa (__const struct ether_addr *__addr) __THROW; +extern char *ether_ntoa_r (__const struct ether_addr *__addr, char *__buf) + __THROW; /* Convert ASCII string S to 48 bit Ethernet address. */ -extern struct ether_addr *ether_aton __P ((__const char *__asc)); -extern struct ether_addr *ether_aton_r __P ((__const char *__asc, - struct ether_addr *__addr)); +extern struct ether_addr *ether_aton (__const char *__asc) __THROW; +extern struct ether_addr *ether_aton_r (__const char *__asc, + struct ether_addr *__addr) __THROW; /* Map 48 bit Ethernet number ADDR to HOSTNAME. */ -extern int ether_ntohost __P ((char *__hostname, - __const struct ether_addr *__addr)); +extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr) + __THROW; /* Map HOSTNAME to 48 bit Ethernet address. */ -extern int ether_hostton __P ((__const char *__hostname, - struct ether_addr *__addr)); +extern int ether_hostton (__const char *__hostname, struct ether_addr *__addr) + __THROW; /* Scan LINE and set ADDR and HOSTNAME. */ -extern int ether_line __P ((__const char *__line, struct ether_addr *__addr, - char *__hostname)); +extern int ether_line (__const char *__line, struct ether_addr *__addr, + char *__hostname) __THROW; __END_DECLS diff --git a/inet/netinet/in.h b/inet/netinet/in.h index e57d9e0..7d9f327 100644 --- a/inet/netinet/in.h +++ b/inet/netinet/in.h @@ -231,10 +231,13 @@ struct ipv6_mreq this was a short-sighted decision since on different systems the types may have different representations but the values are always the same. */ -extern uint32_t ntohl __P ((uint32_t __netlong)) __attribute__ ((__const__)); -extern uint16_t ntohs __P ((uint16_t __netshort)) __attribute__ ((__const__)); -extern uint32_t htonl __P ((uint32_t __hostlong)) __attribute__ ((__const__)); -extern uint16_t htons __P ((uint16_t __hostshort)) __attribute__ ((__const__)); +extern uint32_t ntohl (uint32_t __netlong) __THROW __attribute__ ((__const__)); +extern uint16_t ntohs (uint16_t __netshort) + __THROW __attribute__ ((__const__)); +extern uint32_t htonl (uint32_t __hostlong) + __THROW __attribute__ ((__const__)); +extern uint16_t htons (uint16_t __hostshort) + __THROW __attribute__ ((__const__)); #include <endian.h> @@ -288,7 +291,7 @@ extern uint16_t htons __P ((uint16_t __hostshort)) __attribute__ ((__const__)); (((uint32_t *) (a))[3] == ((uint32_t *) (b))[3])) /* Bind socket to a privileged IP port. */ -extern int bindresvport __P ((int __sockfd, struct sockaddr_in *__sock_in)); +extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW; diff --git a/intl/libintl.h b/intl/libintl.h index 1d35518..aec7ea4 100644 --- a/intl/libintl.h +++ b/intl/libintl.h @@ -1,6 +1,6 @@ /* Message catalogs for internationalization. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. + Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995. This file is derived from the file libgettext.h in the GNU gettext package. This file is part of the GNU C Library. Its master source is NOT part of @@ -35,32 +35,32 @@ __BEGIN_DECLS /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ -extern char *gettext __P ((__const char *__msgid)); +extern char *gettext (__const char *__msgid) __THROW; /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ -extern char *dgettext __P ((__const char *__domainname, - __const char *__msgid)); -extern char *__dgettext __P ((__const char *__domainname, - __const char *__msgid)); +extern char *dgettext (__const char *__domainname, + __const char *__msgid) __THROW; +extern char *__dgettext (__const char *__domainname, + __const char *__msgid) __THROW; /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ -extern char *dcgettext __P ((__const char *__domainname, - __const char *__msgid, int __category)); -extern char *__dcgettext __P ((__const char *__domainname, - __const char *__msgid, int __category)); +extern char *dcgettext (__const char *__domainname, + __const char *__msgid, int __category) __THROW; +extern char *__dcgettext (__const char *__domainname, + __const char *__msgid, int __category) __THROW; /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ -extern char *textdomain __P ((__const char *__domainname)); +extern char *textdomain (__const char *__domainname) __THROW; /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ -extern char *bindtextdomain __P ((__const char *__domainname, - __const char *__dirname)); +extern char *bindtextdomain (__const char *__domainname, + __const char *__dirname) __THROW; /* Optimized version of the function above. */ @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99 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 @@ -57,42 +57,42 @@ __BEGIN_DECLS /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. */ -extern int __fcntl __P ((int __fd, int __cmd, ...)); -extern int fcntl __P ((int __fd, int __cmd, ...)); +extern int __fcntl (int __fd, int __cmd, ...) __THROW; +extern int fcntl (int __fd, int __cmd, ...) __THROW; /* Open FILE and return a new file descriptor for it, or -1 on error. OFLAG determines the type of access used. If O_CREAT is on OFLAG, the third argument is taken as a `mode_t', the mode of the created file. */ -extern int __open __P ((__const char *__file, int __oflag, ...)); +extern int __open (__const char *__file, int __oflag, ...) __THROW; #ifndef __USE_FILE_OFFSET64 -extern int open __P ((__const char *__file, int __oflag, ...)); +extern int open (__const char *__file, int __oflag, ...) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (open, __P ((__const char *__file, int __oflag, ...)), +extern int __REDIRECT (open, (__const char *__file, int __oflag, ...) __THROW, open64); # else # define open open64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int open64 __P ((__const char *__file, int __oflag, ...)); +extern int open64 (__const char *__file, int __oflag, ...) __THROW; #endif /* Create and open FILE, with mode MODE. This takes an `int' MODE argument because that is what `mode_t' will be widened to. */ #ifndef __USE_FILE_OFFSET64 -extern int creat __P ((__const char *__file, __mode_t __mode)); +extern int creat (__const char *__file, __mode_t __mode) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (creat, __P ((__const char *__file, __mode_t __mode)), +extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode) __THROW, creat64); # else # define creat creat64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int creat64 __P ((__const char *__file, __mode_t __mode)); +extern int creat64 (__const char *__file, __mode_t __mode) __THROW; #endif #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \ @@ -111,17 +111,17 @@ extern int creat64 __P ((__const char *__file, __mode_t __mode)); # define F_TEST 3 /* Test a region for other processes locks. */ # ifndef __USE_FILE_OFFSET64 -extern int lockf __P ((int __fd, int __cmd, __off_t __len)); +extern int lockf (int __fd, int __cmd, __off_t __len) __THROW; # else # ifdef __REDIRECT -extern int __REDIRECT (lockf, __P ((int __fd, int __cmd, __off64_t __len)), +extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW, lockf64); # else # define lockf lockf64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int lockf64 __P ((int __fd, int __cmd, __off64_t __len)); +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW; # endif #endif @@ -44,7 +44,7 @@ typedef struct { int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ - int (*fts_compar) __PMT((const void *, const void *)); /* compare fn */ + int (*fts_compar) (const void *, const void *); /* compare fn */ #define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ #define FTS_LOGICAL 0x0002 /* logical walk */ @@ -113,12 +113,12 @@ typedef struct _ftsent { } FTSENT; __BEGIN_DECLS -FTSENT *fts_children __P((FTS *, int)); -int fts_close __P((FTS *)); -FTS *fts_open __P((char * const *, int, - int (*)(const FTSENT **, const FTSENT **))); -FTSENT *fts_read __P((FTS *)); -int fts_set __P((FTS *, FTSENT *, int)); +FTSENT *fts_children (FTS *, int) __THROW; +int fts_close (FTS *) __THROW; +FTS *fts_open (char * const *, int, + int (*)(const FTSENT **, const FTSENT **)) __THROW; +FTSENT *fts_read (FTS *) __THROW; +int fts_set (FTS *, FTSENT *, int) __THROW; __END_DECLS #endif /* fts.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 @@ -86,59 +86,57 @@ struct FTW /* Convenient types for callback functions. */ -typedef int (*__ftw_func_t) __PMT ((__const char *__filename, - __const struct stat *__status, - int __flag)); +typedef int (*__ftw_func_t) (__const char *__filename, + __const struct stat *__status, int __flag); #ifdef __USE_LARGEFILE64 -typedef int (*__ftw64_func_t) __PMT ((__const char *__filename, - __const struct stat64 *__status, - int __flag)); +typedef int (*__ftw64_func_t) (__const char *__filename, + __const struct stat64 *__status, int __flag); #endif #ifdef __USE_XOPEN_EXTENDED -typedef int (*__nftw_func_t) __PMT ((__const char *__filename, - __const struct stat *__status, int __flag, - struct FTW *__info)); +typedef int (*__nftw_func_t) (__const char *__filename, + __const struct stat *__status, int __flag, + struct FTW *__info); # ifdef __USE_LARGEFILE64 -typedef int (*__nftw64_func_t) __PMT ((__const char *__filename, - __const struct stat64 *__status, - int __flag, struct FTW *__info)); +typedef int (*__nftw64_func_t) (__const char *__filename, + __const struct stat64 *__status, + int __flag, struct FTW *__info); # endif #endif /* Call a function on every element in a directory tree. */ #ifndef __USE_FILE_OFFSET64 -extern int ftw __P ((__const char *__dir, __ftw_func_t __func, - int __descriptors)); +extern int ftw (__const char *__dir, __ftw_func_t __func, int __descriptors) + __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (ftw, __P ((__const char *__dir, __ftw_func_t __func, - int __descriptors)), ftw64); +extern int __REDIRECT (ftw, (__const char *__dir, __ftw_func_t __func, + int __descriptors) __THROW, ftw64); # else # define ftw ftw64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int ftw64 __P ((__const char *__dir, __ftw64_func_t __func, - int __descriptors)); +extern int ftw64 (__const char *__dir, __ftw64_func_t __func, + int __descriptors) __THROW; #endif #ifdef __USE_XOPEN_EXTENDED /* Call a function on every element in a directory tree. FLAG allows to specify the behaviour more detailed. */ # ifndef __USE_FILE_OFFSET64 -extern int nftw __P ((__const char *__dir, __nftw_func_t __func, - int __descriptors, int __flag)); +extern int nftw (__const char *__dir, __nftw_func_t __func, int __descriptors, + int __flag) __THROW; # else # ifdef __REDIRECT -extern int __REDIRECT (nftw, __P ((__const char *__dir, __nftw_func_t __func, - int __descriptors, int __flag)), nftw64); +extern int __REDIRECT (nftw, (__const char *__dir, __nftw_func_t __func, + int __descriptors, int __flag) __THROW, nftw64); # else # define nftw nftw64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int nftw64 __P ((__const char *__dir, __nftw64_func_t __func, - int __descriptors, int __flag)); +extern int nftw64 (__const char *__dir, __nftw64_func_t __func, + int __descriptors, int __flag) __THROW; # endif #endif diff --git a/io/sys/poll.h b/io/sys/poll.h index 9cb60e7..ac9c634 100644 --- a/io/sys/poll.h +++ b/io/sys/poll.h @@ -1,5 +1,5 @@ /* Compatibility definitions for System V `poll' interface. - Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1994, 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 @@ -41,10 +41,10 @@ struct pollfd an event to occur; if TIMEOUT is -1, block until an event occurs. Returns the number of file descriptors with events, zero if timed out, or -1 for errors. */ -extern int __poll __P ((struct pollfd *__fds, unsigned long int __nfds, - int __timeout)); -extern int poll __P ((struct pollfd *__fds, unsigned long int __nfds, - int __timeout)); +extern int __poll (struct pollfd *__fds, unsigned long int __nfds, + int __timeout) __THROW; +extern int poll (struct pollfd *__fds, unsigned long int __nfds, int __timeout) + __THROW; __END_DECLS diff --git a/io/sys/stat.h b/io/sys/stat.h index 97f7897..d6175dd 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -187,79 +187,81 @@ __BEGIN_DECLS #ifndef __USE_FILE_OFFSET64 /* Get file attributes for FILE and put them in BUF. */ -extern int stat __P ((__const char *__file, struct stat *__buf)); +extern int stat (__const char *__file, struct stat *__buf) __THROW; /* Get file attributes for the file, device, pipe, or socket that file descriptor FD is open on and put them in BUF. */ -extern int fstat __P ((int __fd, struct stat *__buf)); +extern int fstat (int __fd, struct stat *__buf) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (stat, __P ((__const char *__file, struct stat *__buf)), +extern int __REDIRECT (stat, + (__const char *__file, struct stat *__buf) __THROW, stat64); -extern int __REDIRECT (fstat, __P ((int __fd, struct stat *__buf)), fstat64); +extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64); # else # define stat stat64 # define fstat fstat64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int stat64 __P ((__const char *__file, struct stat64 *__buf)); -extern int fstat64 __P ((int __fd, struct stat64 *__buf)); +extern int stat64 (__const char *__file, struct stat64 *__buf) __THROW; +extern int fstat64 (int __fd, struct stat64 *__buf) __THROW; #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED # ifndef __USE_FILE_OFFSET64 /* Get file attributes about FILE and put them in BUF. If FILE is a symbolic link, do not follow it. */ -extern int lstat __P ((__const char *__file, struct stat *__buf)); +extern int lstat (__const char *__file, struct stat *__buf) __THROW; # else # ifdef __REDIRECT -extern int __REDIRECT (lstat, __P ((__const char *__file, struct stat *__buf)), +extern int __REDIRECT (lstat, + (__const char *__file, struct stat *__buf) __THROW, lstat64); # else # define lstat lstat64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int lstat64 __P ((__const char *__file, struct stat64 *__buf)); +extern int lstat64 (__const char *__file, struct stat64 *__buf) __THROW; # endif #endif /* Set file access permissions for FILE to MODE. This takes an `int' MODE argument because that is what `mode_t's get widened to. */ -extern int chmod __P ((__const char *__file, __mode_t __mode)); +extern int chmod (__const char *__file, __mode_t __mode) __THROW; /* Set file access permissions of the file FD is open on to MODE. */ #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED -extern int fchmod __P ((int __fd, __mode_t __mode)); +extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif /* Set the file creation mask of the current process to MASK, and return the old creation mask. */ -extern __mode_t umask __P ((__mode_t __mask)); +extern __mode_t umask (__mode_t __mask) __THROW; #ifdef __USE_GNU /* Get the current `umask' value without changing it. This function is only available under the GNU Hurd. */ -extern __mode_t getumask __P ((void)); +extern __mode_t getumask (void) __THROW; #endif /* Create a new directory named PATH, with permission bits MODE. */ -extern int mkdir __P ((__const char *__path, __mode_t __mode)); +extern int mkdir (__const char *__path, __mode_t __mode) __THROW; /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ #if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -extern int mknod __P ((__const char *__path, - __mode_t __mode, __dev_t __dev)); +extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) + __THROW; #endif /* Create a new FIFO named PATH, with permission bits MODE. */ -extern int mkfifo __P ((__const char *__path, __mode_t __mode)); +extern int mkfifo (__const char *__path, __mode_t __mode) __THROW; /* To allow the `struct stat' structure and the file type `mode_t' bits to vary without changing shared library major version number, @@ -285,20 +287,21 @@ extern int mkfifo __P ((__const char *__path, __mode_t __mode)); /* Wrappers for stat and mknod system calls. */ #ifndef __USE_FILE_OFFSET64 -extern int __fxstat __P ((int __ver, int __fildes, - struct stat *__stat_buf)); -extern int __xstat __P ((int __ver, __const char *__filename, - struct stat *__stat_buf)); -extern int __lxstat __P ((int __ver, __const char *__filename, - struct stat *__stat_buf)); +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __THROW; +extern int __xstat (int __ver, __const char *__filename, + struct stat *__stat_buf) __THROW; +extern int __lxstat (int __ver, __const char *__filename, + struct stat *__stat_buf) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (__fxstat, __P ((int __ver, int __fildes, - struct stat *__stat_buf)), __fxstat64); -extern int __REDIRECT (__xstat, __P ((int __ver, __const char *__filename, - struct stat *__stat_buf)), __xstat64); -extern int __REDIRECT (__lxstat, __P ((int __ver, __const char *__filename, - struct stat *__stat_buf)), __lxstat64); +extern int __REDIRECT (__fxstat, (int __ver, int __fildes, + struct stat *__stat_buf) __THROW, + __fxstat64); +extern int __REDIRECT (__xstat, (int __ver, __const char *__filename, + struct stat *__stat_buf) __THROW, __xstat64); +extern int __REDIRECT (__lxstat, (int __ver, __const char *__filename, + struct stat *__stat_buf) __THROW, + __lxstat64); # else # define __fxstat __fxstat64 @@ -308,15 +311,15 @@ extern int __REDIRECT (__lxstat, __P ((int __ver, __const char *__filename, #endif #ifdef __USE_LARGEFILE64 -extern int __fxstat64 __P ((int __ver, int __fildes, - struct stat64 *__stat_buf)); -extern int __xstat64 __P ((int __ver, __const char *__filename, - struct stat64 *__stat_buf)); -extern int __lxstat64 __P ((int __ver, __const char *__filename, - struct stat64 *__stat_buf)); +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + __THROW; +extern int __xstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __THROW; +extern int __lxstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __THROW; #endif -extern int __xmknod __P ((int __ver, __const char *__path, - __mode_t __mode, __dev_t *__dev)); +extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, + __dev_t *__dev) __THROW; #if defined __GNUC__ && __GNUC__ >= 2 /* Inlined versions of the real stat and mknod functions. */ diff --git a/io/sys/statfs.h b/io/sys/statfs.h index be93bc9..f5258f8 100644 --- a/io/sys/statfs.h +++ b/io/sys/statfs.h @@ -1,5 +1,5 @@ /* Definitions for getting information about a filesystem. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 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 @@ -29,33 +29,34 @@ __BEGIN_DECLS /* Return information about the filesystem on which FILE resides. */ #ifndef __USE_FILE_OFFSET64 -extern int statfs __P ((__const char *__file, struct statfs *__buf)); +extern int statfs (__const char *__file, struct statfs *__buf) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (statfs, __P ((__const char *__file, - struct statfs *__buf)), statfs64); +extern int __REDIRECT (statfs, + (__const char *__file, struct statfs *__buf) __THROW, + statfs64); # else # define statfs statfs64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int statfs64 __P ((__const char *__file, struct statfs64 *__buf)); +extern int statfs64 (__const char *__file, struct statfs64 *__buf) __THROW; #endif /* Return information about the filesystem containing the file FILDES refers to. */ #ifndef __USE_FILE_OFFSET64 -extern int fstatfs __P ((int __fildes, struct statfs *__buf)); +extern int fstatfs (int __fildes, struct statfs *__buf) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (fstatfs, __P ((int __fildes, struct statfs *__buf)), +extern int __REDIRECT (fstatfs, (int __fildes, struct statfs *__buf) __THROW, fstatfs64); # else # define fstatfs fstatfs64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int fstatfs64 __P ((int __fildes, struct statfs64 *__buf)); +extern int fstatfs64 (int __fildes, struct statfs64 *__buf) __THROW; #endif __END_DECLS diff --git a/io/sys/statvfs.h b/io/sys/statvfs.h index 31d60df..6f497cc 100644 --- a/io/sys/statvfs.h +++ b/io/sys/statvfs.h @@ -1,5 +1,5 @@ /* Definitions for getting information about a filesystem. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 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 @@ -29,34 +29,34 @@ __BEGIN_DECLS /* Return information about the filesystem on which FILE resides. */ #ifndef __USE_FILE_OFFSET64 -extern int statvfs __P ((__const char *__file, struct statvfs *__buf)); +extern int statvfs (__const char *__file, struct statvfs *__buf) __THROW; #else # ifdef __REDIRECT extern int __REDIRECT (statvfs, - __P ((__const char *__file, struct statvfs *__buf)), + (__const char *__file, struct statvfs *__buf) __THROW, statvfs64); # else # define statvfs statvfs64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int statvfs64 __P ((__const char *__file, struct statvfs64 *__buf)); +extern int statvfs64 (__const char *__file, struct statvfs64 *__buf) __THROW; #endif /* Return information about the filesystem containing the file FILDES refers to. */ #ifndef __USE_FILE_OFFSET64 -extern int fstatvfs __P ((int __fildes, struct statvfs *__buf)); +extern int fstatvfs (int __fildes, struct statvfs *__buf) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (fstatvfs, __P ((int __fildes, struct statvfs *__buf)), +extern int __REDIRECT (fstatvfs, (int __fildes, struct statvfs *__buf) __THROW, fstatvfs64); # else # define fstatvfs fstatvfs64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int fstatvfs64 __P ((int __fildes, struct statvfs64 *__buf)); +extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf) __THROW; #endif __END_DECLS @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 96, 97, 98, 99 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 @@ -43,8 +43,8 @@ struct utimbuf /* Set the access and modification times of FILE to those given in *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */ -extern int utime __P ((__const char *__file, - __const struct utimbuf *__file_times)); +extern int utime (__const char *__file, + __const struct utimbuf *__file_times) __THROW; __END_DECLS diff --git a/libio/libio.h b/libio/libio.h index 9c65a02..c8f93ac 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -201,26 +201,26 @@ enum __codecvt_result of the virtual functions in the libstdc++ codecvt class. */ struct _IO_codecvt { - void (*__codecvt_destr) __PMT ((struct _IO_codecvt *)); - enum __codecvt_result (*__codecvt_do_out) __PMT ((struct _IO_codecvt *, - __mbstate_t *, - const wchar_t *, - const wchar_t *, - const wchar_t **, char *, - char *, char **)); - enum __codecvt_result (*__codecvt_do_unshift) __PMT ((struct _IO_codecvt *, - __mbstate_t *, char *, - char *, char **)); - enum __codecvt_result (*__codecvt_do_in) __PMT ((struct _IO_codecvt *, - __mbstate_t *, - const char *, const char *, - const char **, wchar_t *, - wchar_t *, wchar_t **)); - int (*__codecvt_do_encoding) __PMT ((struct _IO_codecvt *)); - int (*__codecvt_do_always_noconv) __PMT ((struct _IO_codecvt *)); - int (*__codecvt_do_length) __PMT ((struct _IO_codecvt *, __mbstate_t *, - const char *, const char *, _IO_size_t)); - int (*__codecvt_do_max_length) __PMT ((struct _IO_codecvt *)); + void (*__codecvt_destr) (struct _IO_codecvt *); + enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *, + __mbstate_t *, + const wchar_t *, + const wchar_t *, + const wchar_t **, char *, + char *, char **); + enum __codecvt_result (*__codecvt_do_unshift) (struct _IO_codecvt *, + __mbstate_t *, char *, + char *, char **); + enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *, + __mbstate_t *, + const char *, const char *, + const char **, wchar_t *, + wchar_t *, wchar_t **); + int (*__codecvt_do_encoding) (struct _IO_codecvt *); + int (*__codecvt_do_always_noconv) (struct _IO_codecvt *); + int (*__codecvt_do_length) (struct _IO_codecvt *, __mbstate_t *, + const char *, const char *, _IO_size_t); + int (*__codecvt_do_max_length) (struct _IO_codecvt *); _IO_iconv_t __cd_in; _IO_iconv_t __cd_out; @@ -329,8 +329,7 @@ extern _IO_FILE *_IO_stderr; /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ -typedef __ssize_t __io_read_fn __PMT ((__ptr_t __cookie, char *__buf, - size_t __nbytes)); +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); /* Write N bytes pointed to by BUF to COOKIE. Write all N bytes unless there is an error. Return number of bytes written, or -1 if @@ -338,8 +337,8 @@ typedef __ssize_t __io_read_fn __PMT ((__ptr_t __cookie, char *__buf, opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ -typedef __ssize_t __io_write_fn __PMT ((__ptr_t __cookie, __const char *__buf, - size_t __n)); +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), @@ -347,10 +346,10 @@ typedef __ssize_t __io_write_fn __PMT ((__ptr_t __cookie, __const char *__buf, or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ -typedef int __io_seek_fn __PMT ((__ptr_t __cookie, _IO_off_t __pos, int __w)); +typedef int __io_seek_fn (void *__cookie, _IO_off_t __pos, int __w); /* Close COOKIE. */ -typedef int __io_close_fn __PMT ((__ptr_t __cookie)); +typedef int __io_close_fn (void *__cookie); #ifdef _GNU_SOURCE @@ -385,12 +384,12 @@ struct _IO_cookie_file extern "C" { #endif -extern int __underflow __P ((_IO_FILE *)); -extern int __uflow __P ((_IO_FILE *)); -extern int __overflow __P ((_IO_FILE *, int)); -extern _IO_wint_t __wunderflow __P ((_IO_FILE *)); -extern _IO_wint_t __wuflow __P ((_IO_FILE *)); -extern _IO_wint_t __woverflow __P ((_IO_FILE *, _IO_wint_t)); +extern int __underflow (_IO_FILE *) __THROW; +extern int __uflow (_IO_FILE *) __THROW; +extern int __overflow (_IO_FILE *, int) __THROW; +extern _IO_wint_t __wunderflow (_IO_FILE *) __THROW; +extern _IO_wint_t __wuflow (_IO_FILE *) __THROW; +extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t) __THROW; #define _IO_getc_unlocked(_fp) \ ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end ? __uflow (_fp) \ @@ -415,16 +414,16 @@ extern _IO_wint_t __woverflow __P ((_IO_FILE *, _IO_wint_t)); #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) -extern int _IO_getc __P ((_IO_FILE *__fp)); -extern int _IO_putc __P ((int __c, _IO_FILE *__fp)); -extern _IO_wint_t _IO_getwc __P ((_IO_FILE *__fp)); -extern _IO_wint_t _IO_putwc __P ((wchar_t __wc, _IO_FILE *__fp)); -extern int _IO_feof __P ((_IO_FILE *__fp)); -extern int _IO_ferror __P ((_IO_FILE *__fp)); +extern int _IO_getc (_IO_FILE *__fp) __THROW; +extern int _IO_putc (int __c, _IO_FILE *__fp) __THROW; +extern _IO_wint_t _IO_getwc (_IO_FILE *__fp) __THROW; +extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) __THROW; +extern int _IO_feof (_IO_FILE *__fp) __THROW; +extern int _IO_ferror (_IO_FILE *__fp) __THROW; -extern int _IO_peekc_locked __P ((_IO_FILE *__fp)); +extern int _IO_peekc_locked (_IO_FILE *__fp) __THROW; -extern int _IO_fwide __P ((_IO_FILE *__fp, int __mode)); +extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW; #if __GNUC__ >= 2 /* A special optimized version of the function above. It optimizes the case of initializing an unoriented byte stream. */ @@ -446,9 +445,9 @@ extern int _IO_fwide __P ((_IO_FILE *__fp, int __mode)); #define _IO_PENDING_OUTPUT_COUNT(_fp) \ ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) -extern void _IO_flockfile __P ((_IO_FILE *)); -extern void _IO_funlockfile __P ((_IO_FILE *)); -extern int _IO_ftrylockfile __P ((_IO_FILE *)); +extern void _IO_flockfile (_IO_FILE *) __THROW; +extern void _IO_funlockfile (_IO_FILE *) __THROW; +extern int _IO_ftrylockfile (_IO_FILE *) __THROW; #ifdef _IO_MTSAFE_IO # define _IO_peekc(_fp) _IO_peekc_locked (_fp) @@ -461,24 +460,23 @@ extern int _IO_ftrylockfile __P ((_IO_FILE *)); # define _IO_cleanup_region_end(_Doit) /**/ #endif /* !_IO_MTSAFE_IO */ -extern int _IO_vfscanf __P ((_IO_FILE * __restrict, const char * __restrict, - _IO_va_list, int *__restrict)); -extern int _IO_vfwscanf __P ((_IO_FILE * __restrict, - const wchar_t * __restrict, - _IO_va_list, int *__restrict)); -extern int _IO_vfprintf __P ((_IO_FILE *__restrict, const char *__restrict, - _IO_va_list)); -extern int _IO_vfwprintf __P ((_IO_FILE *__restrict, const wchar_t *__restrict, - _IO_va_list)); -extern _IO_ssize_t _IO_padn __P ((_IO_FILE *, int, _IO_ssize_t)); -extern _IO_ssize_t _IO_wpadn __P ((_IO_FILE *, wint_t, _IO_ssize_t)); -extern _IO_size_t _IO_sgetn __P ((_IO_FILE *, void *, _IO_size_t)); - -extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); -extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int)); - -extern void _IO_free_backup_area __P ((_IO_FILE *)); -extern void _IO_free_wbackup_area __P ((_IO_FILE *)); +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + _IO_va_list, int *__restrict) __THROW; +extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict, + _IO_va_list, int *__restrict) __THROW; +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + _IO_va_list) __THROW; +extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict, + _IO_va_list) __THROW; +extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t) __THROW; +extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t) __THROW; +extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t) __THROW; + +extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int) __THROW; +extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int) __THROW; + +extern void _IO_free_backup_area (_IO_FILE *) __THROW; +extern void _IO_free_wbackup_area (_IO_FILE *) __THROW; #ifdef __cplusplus } diff --git a/libio/stdio.h b/libio/stdio.h index 7b64903..128713b 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -120,31 +120,31 @@ extern FILE *stderr; /* Standard error output stream. */ #define stderr stderr /* Remove file FILENAME. */ -extern int remove __P ((__const char *__filename)); +extern int remove (__const char *__filename) __THROW; /* Rename file OLD to NEW. */ -extern int rename __P ((__const char *__old, __const char *__new)); +extern int rename (__const char *__old, __const char *__new) __THROW; /* Create a temporary file and open it read/write. */ #ifndef __USE_FILE_OFFSET64 -extern FILE *tmpfile __P ((void)); +extern FILE *tmpfile (void) __THROW; #else # ifdef __REDIRECT -extern FILE *__REDIRECT (tmpfile, __P ((void)), tmpfile64); +extern FILE *__REDIRECT (tmpfile, (void) __THROW, tmpfile64); # else # define tmpfile tmpfile64 # endif #endif #ifdef __USE_LARGEFILE64 -extern FILE *tmpfile64 __P ((void)); +extern FILE *tmpfile64 (void) __THROW; #endif /* Generate a temporary filename. */ -extern char *tmpnam __P ((char *__s)); +extern char *tmpnam (char *__s) __THROW; #ifdef __USE_MISC /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */ -extern char *tmpnam_r __P ((char *__s)); +extern char *tmpnam_r (char *__s) __THROW; #endif @@ -156,42 +156,42 @@ extern char *tmpnam_r __P ((char *__s)); If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ -extern char *tempnam __P ((__const char *__dir, __const char *__pfx)); +extern char *tempnam (__const char *__dir, __const char *__pfx) __THROW; #endif /* Close STREAM. */ -extern int fclose __P ((FILE *__stream)); +extern int fclose (FILE *__stream) __THROW; /* Flush STREAM, or all streams if STREAM is NULL. */ -extern int fflush __P ((FILE *__stream)); +extern int fflush (FILE *__stream) __THROW; #ifdef __USE_MISC /* Faster versions when locking is not required. */ -extern int fflush_unlocked __P ((FILE *__stream)); +extern int fflush_unlocked (FILE *__stream) __THROW; #endif #ifdef __USE_GNU /* Close all streams. */ -extern int fcloseall __P ((void)); +extern int fcloseall (void) __THROW; #endif #ifndef __USE_FILE_OFFSET64 /* Open a file and create a new stream for it. */ -extern FILE *fopen __P ((__const char *__restrict __filename, - __const char *__restrict __modes)); +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __THROW; /* Open a file, replacing an existing stream with it. */ -extern FILE *freopen __P ((__const char *__restrict __filename, - __const char *__restrict __modes, - FILE *__restrict __stream)); +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __THROW; #else # ifdef __REDIRECT -extern FILE *__REDIRECT (fopen, __P ((__const char *__restrict __filename, - __const char *__restrict __modes)), +extern FILE *__REDIRECT (fopen, (__const char *__restrict __filename, + __const char *__restrict __modes) __THROW, fopen64); -extern FILE *__REDIRECT (freopen, __P ((__const char *__restrict __filename, - __const char *__restrict __modes, - FILE *__restrict __stream)), +extern FILE *__REDIRECT (freopen, (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __THROW, freopen64); # else # define fopen fopen64 @@ -199,146 +199,140 @@ extern FILE *__REDIRECT (freopen, __P ((__const char *__restrict __filename, # endif #endif #ifdef __USE_LARGEFILE64 -extern FILE *fopen64 __P ((__const char *__restrict __filename, - __const char *__restrict __modes)); -extern FILE *freopen64 __P ((__const char *__restrict __filename, - __const char *__restrict __modes, - FILE *__restrict __stream)); +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __THROW; +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __THROW; #endif #ifdef __USE_POSIX /* Create a new stream that refers to an existing system file descriptor. */ -extern FILE *fdopen __P ((int __fd, __const char *__modes)); +extern FILE *fdopen (int __fd, __const char *__modes) __THROW; #endif #ifdef __USE_GNU /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ -extern FILE *fopencookie __P ((void *__restrict __magic_cookie, - __const char *__restrict __modes, - _IO_cookie_io_functions_t __io_funcs)); +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __THROW; /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ -extern FILE *open_memstream __P ((char **__restrict __bufloc, - size_t *__restrict __sizeloc)); +extern FILE *open_memstream (char **__restrict __bufloc, + size_t *__restrict __sizeloc) __THROW; #endif /* If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ. */ -extern void setbuf __P ((FILE *__restrict __stream, char *__restrict __buf)); +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ -extern int setvbuf __P ((FILE *__restrict __stream, char *__restrict __buf, - int __modes, size_t __n)); +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __THROW; #ifdef __USE_BSD /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ -extern void setbuffer __P ((FILE *__restrict __stream, char *__restrict __buf, - size_t __size)); +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __THROW; /* Make STREAM line-buffered. */ -extern void setlinebuf __P ((FILE *__stream)); +extern void setlinebuf (FILE *__stream) __THROW; #endif /* Write formatted output to STREAM. */ -extern int fprintf __P ((FILE *__restrict __stream, - __const char *__restrict __format, ...)); +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __THROW; /* Write formatted output to stdout. */ -extern int printf __P ((__const char *__restrict __format, ...)); +extern int printf (__const char *__restrict __format, ...) __THROW; /* Write formatted output to S. */ -extern int sprintf __P ((char *__restrict __s, - __const char *__restrict __format, ...)); +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __THROW; /* Write formatted output to S from argument list ARG. */ -extern int vfprintf __P ((FILE *__restrict __s, - __const char *__restrict __format, - _G_va_list __arg)); +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + _G_va_list __arg) __THROW; /* Write formatted output to stdout from argument list ARG. */ -extern int vprintf __P ((__const char *__restrict __format, - _G_va_list __arg)); +extern int vprintf (__const char *__restrict __format, _G_va_list __arg) + __THROW; /* Write formatted output to S from argument list ARG. */ -extern int vsprintf __P ((char *__restrict __s, - __const char *__restrict __format, - _G_va_list __arg)); +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + _G_va_list __arg) __THROW; #if defined __USE_BSD || defined __USE_ISOC9X || defined __USE_UNIX98 /* Maximum chars of output to write in MAXLEN. */ -extern int snprintf __P ((char *__restrict __s, size_t __maxlen, - __const char *__restrict __format, ...)) - __attribute__ ((__format__ (__printf__, 3, 4))); +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __THROW __attribute__ ((__format__ (__printf__, 3, 4))); -extern int __vsnprintf __P ((char *__restrict __s, size_t __maxlen, - __const char *__restrict __format, - _G_va_list __arg)) - __attribute__ ((__format__ (__printf__, 3, 0))); -extern int vsnprintf __P ((char *__restrict __s, size_t __maxlen, - __const char *__restrict __format, - _G_va_list __arg)) - __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, _G_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 3, 0))); +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, _G_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 3, 0))); #endif #ifdef __USE_GNU /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ -extern int vasprintf __P ((char **__restrict __ptr, - __const char *__restrict __f, _G_va_list __arg)) - __attribute__ ((__format__ (__printf__, 2, 0))); -extern int __asprintf __P ((char **__restrict __ptr, - __const char *__restrict __fmt, ...)) - __attribute__ ((__format__ (__printf__, 2, 3))); -extern int asprintf __P ((char **__restrict __ptr, - __const char *__restrict __fmt, ...)) - __attribute__ ((__format__ (__printf__, 2, 3))); +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + _G_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 2, 0))); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __THROW __attribute__ ((__format__ (__printf__, 2, 3))); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __THROW __attribute__ ((__format__ (__printf__, 2, 3))); /* Write formatted output to a file descriptor. */ -extern int vdprintf __P ((int __fd, __const char *__restrict __fmt, - _G_va_list __arg)) - __attribute__ ((__format__ (__printf__, 2, 0))); -extern int dprintf __P ((int __fd, __const char *__restrict __fmt, ...)) - __attribute__ ((__format__ (__printf__, 2, 3))); +extern int vdprintf (int __fd, __const char *__restrict __fmt, + _G_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __THROW __attribute__ ((__format__ (__printf__, 2, 3))); #endif /* Read formatted input from STREAM. */ -extern int fscanf __P ((FILE *__restrict __stream, - __const char *__restrict __format, ...)); +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __THROW; /* Read formatted input from stdin. */ -extern int scanf __P ((__const char *__restrict __format, ...)); +extern int scanf (__const char *__restrict __format, ...) __THROW; /* Read formatted input from S. */ -extern int sscanf __P ((__const char *__restrict __s, - __const char *__restrict __format, ...)); +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __THROW; #ifdef __USE_ISOC9X /* Read formatted input from S into argument list ARG. */ -extern int vfscanf __P ((FILE *__restrict __s, - __const char *__restrict __format, - _G_va_list __arg)) - __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + _G_va_list __arg) + __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); /* Read formatted input from stdin into argument list ARG. */ -extern int vscanf __P ((__const char *__restrict __format, _G_va_list __arg)) - __attribute__ ((__format__ (__scanf__, 1, 0))); +extern int vscanf (__const char *__restrict __format, _G_va_list __arg) + __THROW __attribute__ ((__format__ (__scanf__, 1, 0))); /* Read formatted input from S into argument list ARG. */ -extern int vsscanf __P ((__const char *__restrict __s, - __const char *__restrict __format, - _G_va_list __arg)) - __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, _G_va_list __arg) + __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); #endif /* Use ISO C9x. */ /* Read a character from STREAM. */ -extern int fgetc __P ((FILE *__stream)); -extern int getc __P ((FILE *__stream)); +extern int fgetc (FILE *__stream) __THROW; +extern int getc (FILE *__stream) __THROW; /* Read a character from stdin. */ -extern int getchar __P ((void)); +extern int getchar (void) __THROW; /* The C standard explicitly says this is a macro, so we always do the optimization for it. */ @@ -346,22 +340,22 @@ extern int getchar __P ((void)); #if defined __USE_POSIX || defined __USE_MISC /* These are defined in POSIX.1:1996. */ -extern int getc_unlocked __P ((FILE *__stream)); -extern int getchar_unlocked __P ((void)); +extern int getc_unlocked (FILE *__stream) __THROW; +extern int getchar_unlocked (void) __THROW; #endif /* Use POSIX or MISC. */ #ifdef __USE_MISC /* Faster version when locking is not necessary. */ -extern int fgetc_unlocked __P ((FILE *__stream)); +extern int fgetc_unlocked (FILE *__stream) __THROW; #endif /* Use MISC. */ /* Write a character to STREAM. */ -extern int fputc __P ((int __c, FILE *__stream)); -extern int putc __P ((int __c, FILE *__stream)); +extern int fputc (int __c, FILE *__stream) __THROW; +extern int putc (int __c, FILE *__stream) __THROW; /* Write a character to stdout. */ -extern int putchar __P ((int __c)); +extern int putchar (int __c) __THROW; /* The C standard explicitly says this can be a macro, so we always do the optimization for it. */ @@ -369,38 +363,38 @@ extern int putchar __P ((int __c)); #ifdef __USE_MISC /* Faster version when locking is not necessary. */ -extern int fputc_unlocked __P ((int __c, FILE *__stream)); +extern int fputc_unlocked (int __c, FILE *__stream) __THROW; #endif /* Use MISC. */ #if defined __USE_POSIX || defined __USE_MISC /* These are defined in POSIX.1:1996. */ -extern int putc_unlocked __P ((int __c, FILE *__stream)); -extern int putchar_unlocked __P ((int __c)); +extern int putc_unlocked (int __c, FILE *__stream) __THROW; +extern int putchar_unlocked (int __c) __THROW; #endif /* Use POSIX or MISC. */ #if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN /* Get a word (int) from STREAM. */ -extern int getw __P ((FILE *__stream)); +extern int getw (FILE *__stream) __THROW; /* Write a word (int) to STREAM. */ -extern int putw __P ((int __w, FILE *__stream)); +extern int putw (int __w, FILE *__stream) __THROW; #endif /* Get a newline-terminated string of finite length from STREAM. */ -extern char *fgets __P ((char *__restrict __s, int __n, - FILE *__restrict __stream)); +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __THROW; #ifdef __USE_GNU /* This function does the same as `fgets' but does not lock the stream. */ -extern char *fgets_unlocked __P ((char *__restrict __s, int __n, - FILE *__restrict __stream)); +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __THROW; #endif /* Get a newline-terminated string from stdin, removing the newline. DO NOT USE THIS FUNCTION!! There is no limit on how much it will read. */ -extern char *gets __P ((char *__s)); +extern char *gets (char *__s) __THROW; #ifdef __USE_GNU @@ -409,61 +403,60 @@ extern char *gets __P ((char *__s)); NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. */ -extern _IO_ssize_t __getdelim __P ((char **__restrict __lineptr, - size_t *__restrict __n, int __delimiter, - FILE *__restrict __stream)); -extern _IO_ssize_t getdelim __P ((char **__restrict __lineptr, - size_t *__restrict __n, int __delimiter, - FILE *__restrict __stream)); +extern _IO_ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __THROW; +extern _IO_ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __THROW; /* Like `getdelim', but reads up to a newline. */ -extern _IO_ssize_t getline __P ((char **__restrict __lineptr, - size_t *__restrict __n, - FILE *__restrict __stream)); +extern _IO_ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __THROW; #endif /* Write a string to STREAM. */ -extern int fputs __P ((__const char *__restrict __s, - FILE *__restrict __stream)); +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream) + __THROW; #ifdef __USE_GNU /* This function does the same as `fputs' but does not lock the stream. */ -extern int fputs_unlocked __P ((__const char *__restrict __s, - FILE *__restrict __stream)); +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream) __THROW; #endif /* Write a string, followed by a newline, to stdout. */ -extern int puts __P ((__const char *__s)); +extern int puts (__const char *__s) __THROW; /* Push a character back onto the input buffer of STREAM. */ -extern int ungetc __P ((int __c, FILE *__stream)); +extern int ungetc (int __c, FILE *__stream) __THROW; /* Read chunks of generic data from STREAM. */ -extern size_t fread __P ((void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream)); +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __THROW; /* Write chunks of generic data to STREAM. */ -extern size_t fwrite __P ((__const void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __s)); +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __THROW; #ifdef __USE_MISC /* Faster versions when locking is not necessary. */ -extern size_t fread_unlocked __P ((void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream)); -extern size_t fwrite_unlocked __P ((__const void *__restrict __ptr, - size_t __size, size_t __n, - FILE *__restrict __stream)); +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __THROW; +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __THROW; #endif /* Seek to a certain position on STREAM. */ -extern int fseek __P ((FILE *__stream, long int __off, int __whence)); +extern int fseek (FILE *__stream, long int __off, int __whence) __THROW; /* Return the current position of STREAM. */ -extern long int ftell __P ((FILE *__stream)); +extern long int ftell (FILE *__stream) __THROW; /* Rewind to the beginning of STREAM. */ -extern void rewind __P ((FILE *__stream)); +extern void rewind (FILE *__stream) __THROW; /* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with @@ -489,27 +482,28 @@ typedef __off64_t off64_t; #ifndef __USE_FILE_OFFSET64 # ifdef __USE_UNIX98 /* Seek to a certain position on STREAM. */ -extern int fseeko __P ((FILE *__stream, __off_t __off, int __whence)); +extern int fseeko (FILE *__stream, __off_t __off, int __whence) __THROW; /* Return the current position of STREAM. */ -extern __off_t ftello __P ((FILE *__stream)); +extern __off_t ftello (FILE *__stream) __THROW; # endif /* Get STREAM's position. */ -extern int fgetpos __P ((FILE *__restrict __stream, - fpos_t *__restrict __pos)); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) + __THROW; /* Set STREAM's position. */ -extern int fsetpos __P ((FILE *__stream, __const fpos_t *__pos)); +extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __THROW; #else # ifdef __REDIRECT # ifdef __USE_UNIX98 extern int __REDIRECT (fseeko, - __P ((FILE *__stream, __off64_t __off, int __whence)), + (FILE *__stream, __off64_t __off, int __whence) __THROW, fseeko64); -extern __off64_t __REDIRECT (ftello, __P ((FILE *__stream)), ftello64); +extern __off64_t __REDIRECT (ftello, (FILE *__stream) __THROW, ftello64); # endif -extern int __REDIRECT (fgetpos, __P ((FILE *__restrict __stream, - fpos_t *__restrict __pos)), fgetpos64); -extern int __REDIRECT (fsetpos, __P ((FILE *__stream, __const fpos_t *__pos)), +extern int __REDIRECT (fgetpos, (FILE *__restrict __stream, + fpos_t *__restrict __pos) __THROW, fgetpos64); +extern int __REDIRECT (fsetpos, + (FILE *__stream, __const fpos_t *__pos) __THROW, fsetpos64); # else # ifdef __USE_UNIX98 @@ -523,31 +517,31 @@ extern int __REDIRECT (fsetpos, __P ((FILE *__stream, __const fpos_t *__pos)), #ifdef __USE_LARGEFILE64 # ifdef __USE_UNIX98 -extern int fseeko64 __P ((FILE *__stream, __off64_t __off, int __whence)); -extern __off64_t ftello64 __P ((FILE *__stream)); +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) __THROW; +extern __off64_t ftello64 (FILE *__stream) __THROW; # endif -extern int fgetpos64 __P ((FILE *__restrict __stream, - fpos64_t *__restrict __pos)); -extern int fsetpos64 __P ((FILE *__stream, __const fpos64_t *__pos)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos) + __THROW; +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos) __THROW; #endif /* Clear the error and EOF indicators for STREAM. */ -extern void clearerr __P ((FILE *__stream)); +extern void clearerr (FILE *__stream) __THROW; /* Return the EOF indicator for STREAM. */ -extern int feof __P ((FILE *__stream)); +extern int feof (FILE *__stream) __THROW; /* Return the error indicator for STREAM. */ -extern int ferror __P ((FILE *__stream)); +extern int ferror (FILE *__stream) __THROW; #ifdef __USE_MISC /* Faster versions when locking is not required. */ -extern void clearerr_unlocked __P ((FILE *__stream)); -extern int feof_unlocked __P ((FILE *__stream)); -extern int ferror_unlocked __P ((FILE *__stream)); +extern void clearerr_unlocked (FILE *__stream) __THROW; +extern int feof_unlocked (FILE *__stream) __THROW; +extern int ferror_unlocked (FILE *__stream) __THROW; #endif /* Print a message describing the meaning of the value of errno. */ -extern void perror __P ((__const char *__s)); +extern void perror (__const char *__s) __THROW; /* These variables normally should not be used directly. The `strerror' function provides all the needed functionality. */ @@ -563,34 +557,34 @@ extern __const char *__const _sys_errlist[]; #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ -extern int fileno __P ((FILE *__stream)); +extern int fileno (FILE *__stream) __THROW; #endif /* Use POSIX. */ #ifdef __USE_MISC /* Faster version when locking is not required. */ -extern int fileno_unlocked __P ((FILE *__stream)); +extern int fileno_unlocked (FILE *__stream) __THROW; #endif #if (defined __USE_POSIX2 || defined __USE_SVID || defined __USE_BSD || \ defined __USE_MISC) /* Create a new stream connected to a pipe running the given command. */ -extern FILE *popen __P ((__const char *__command, __const char *__modes)); +extern FILE *popen (__const char *__command, __const char *__modes) __THROW; /* Close a stream opened by popen and return the status of its child. */ -extern int pclose __P ((FILE *__stream)); +extern int pclose (FILE *__stream) __THROW; #endif #ifdef __USE_POSIX /* Return the name of the controlling terminal. */ -extern char *ctermid __P ((char *__s)); +extern char *ctermid (char *__s) __THROW; #endif /* Use POSIX. */ #if defined __USE_XOPEN && !defined __USE_XOPEN2K /* Return the name of the current user. */ -extern char *cuserid __P ((char *__s)); +extern char *cuserid (char *__s) __THROW; #endif /* Use X/Open, but not issue 6. */ @@ -598,11 +592,11 @@ extern char *cuserid __P ((char *__s)); struct obstack; /* See <obstack.h>. */ /* Write formatted output to an obstack. */ -extern int obstack_printf __P ((struct obstack *__restrict __obstack, - __const char *__restrict __format, ...)); -extern int obstack_vprintf __P ((struct obstack *__restrict __obstack, - __const char *__restrict __format, - _G_va_list __args)); +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) __THROW; +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + _G_va_list __args) __THROW; #endif /* Use GNU. */ @@ -610,14 +604,14 @@ extern int obstack_vprintf __P ((struct obstack *__restrict __obstack, /* These are defined in POSIX.1:1996. */ /* Acquire ownership of STREAM. */ -extern void flockfile __P ((FILE *__stream)); +extern void flockfile (FILE *__stream) __THROW; /* Try to acquire ownership of STREAM but do not block if it is not possible. */ -extern int ftrylockfile __P ((FILE *__stream)); +extern int ftrylockfile (FILE *__stream) __THROW; /* Relinquish the ownership granted for STREAM. */ -extern void funlockfile __P ((FILE *__stream)); +extern void funlockfile (FILE *__stream) __THROW; #endif /* POSIX || misc */ #if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 9928d82..4b52758 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -3,6 +3,7 @@ * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post directly instead of calling sem_post which should not be necessary but is faster and might help in some case to work around problems. + Patch by khendricks@ivey.uwo.ca [libc/1382]. 1999-10-08 Andreas Schwab <schwab@suse.de> diff --git a/linuxthreads/sysdeps/pthread/pthread.h b/linuxthreads/sysdeps/pthread/pthread.h index 4861951..21093f9 100644 --- a/linuxthreads/sysdeps/pthread/pthread.h +++ b/linuxthreads/sysdeps/pthread/pthread.h @@ -107,7 +107,7 @@ enum struct _pthread_cleanup_buffer { - void (*__routine) __PMT ((void *)); /* Function to call. */ + void (*__routine) (void *); /* Function to call. */ void *__arg; /* Its argument. */ int __canceltype; /* Saved cancellation type. */ struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ @@ -137,30 +137,31 @@ enum /* Create a thread with given attributes ATTR (or default attributes if ATTR is NULL), and call function START_ROUTINE with given arguments ARG. */ -extern int pthread_create __P ((pthread_t *__thread, - __const pthread_attr_t *__attr, - void *(*__start_routine) (void *), - void *__arg)); +extern int pthread_create (pthread_t *__thread, + __const pthread_attr_t *__attr, + void *(*__start_routine) (void *), + void *__arg) __THROW; /* Obtain the identifier of the current thread. */ -extern pthread_t pthread_self __P ((void)); +extern pthread_t pthread_self (void) __THROW; /* Compare two thread identifiers. */ -extern int pthread_equal __P ((pthread_t __thread1, pthread_t __thread2)); +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW; /* Terminate calling thread. */ -extern void pthread_exit __P ((void *__retval)) __attribute__ ((__noreturn__)); +extern void pthread_exit (void *__retval) + __THROW __attribute__ ((__noreturn__)); /* Make calling thread wait for termination of the thread TH. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ -extern int pthread_join __P ((pthread_t __th, void **__thread_return)); +extern int pthread_join (pthread_t __th, void **__thread_return) __THROW; /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. The resources of TH will therefore be freed immediately when it terminates, instead of waiting for another thread to perform PTHREAD_JOIN on it. */ -extern int pthread_detach __P ((pthread_t __th)); +extern int pthread_detach (pthread_t __th) __THROW; /* Functions for handling attributes. */ @@ -168,150 +169,154 @@ extern int pthread_detach __P ((pthread_t __th)); /* Initialize thread attribute *ATTR with default attributes (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, no user-provided stack). */ -extern int pthread_attr_init __P ((pthread_attr_t *__attr)); +extern int pthread_attr_init (pthread_attr_t *__attr) __THROW; /* Destroy thread attribute *ATTR. */ -extern int pthread_attr_destroy __P ((pthread_attr_t *__attr)); +extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW; /* Set the `detachstate' attribute in *ATTR according to DETACHSTATE. */ -extern int pthread_attr_setdetachstate __P ((pthread_attr_t *__attr, - int __detachstate)); +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) __THROW; /* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */ -extern int pthread_attr_getdetachstate __P ((__const pthread_attr_t *__attr, - int *__detachstate)); +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) __THROW; /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ -extern int pthread_attr_setschedparam __P ((pthread_attr_t *__attr, - __const struct sched_param *__param)); +extern int pthread_attr_setschedparam (pthread_attr_t *__attr, + __const struct sched_param *__param) + __THROW; /* Return in *PARAM the scheduling parameters of *ATTR. */ -extern int pthread_attr_getschedparam __P ((__const pthread_attr_t *__attr, - struct sched_param *__param)); +extern int pthread_attr_getschedparam (__const pthread_attr_t *__attr, + struct sched_param *__param) __THROW; /* Set scheduling policy in *ATTR according to POLICY. */ -extern int pthread_attr_setschedpolicy __P ((pthread_attr_t *__attr, - int __policy)); +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + __THROW; /* Return in *POLICY the scheduling policy of *ATTR. */ -extern int pthread_attr_getschedpolicy __P ((__const pthread_attr_t *__attr, - int *__policy)); +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__attr, + int *__policy) __THROW; /* Set scheduling inheritance mode in *ATTR according to INHERIT. */ -extern int pthread_attr_setinheritsched __P ((pthread_attr_t *__attr, - int __inherit)); +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) __THROW; /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ -extern int pthread_attr_getinheritsched __P ((__const pthread_attr_t *__attr, - int *__inherit)); +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__attr, + int *__inherit) __THROW; /* Set scheduling contention scope in *ATTR according to SCOPE. */ -extern int pthread_attr_setscope __P ((pthread_attr_t *__attr, int __scope)); +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + __THROW; /* Return in *SCOPE the scheduling contention scope of *ATTR. */ -extern int pthread_attr_getscope __P ((__const pthread_attr_t *__attr, - int *__scope)); +extern int pthread_attr_getscope (__const pthread_attr_t *__attr, + int *__scope) __THROW; #ifdef __USE_UNIX98 /* Set the size of the guard area at the bottom of the thread. */ -extern int pthread_attr_setguardsize __P ((pthread_attr_t *__attr, - size_t __guardsize)); +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) __THROW; /* Get the size of the guard area at the bottom of the thread. */ -extern int pthread_attr_getguardsize __P ((__const pthread_attr_t *__attr, - size_t *__guardsize)); +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) __THROW; #endif /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or doen the value must either be higher or lower than all the address in the memory block. The minimal size of the block must be PTHREAD_STACK_SIZE. */ -extern int pthread_attr_setstackaddr __P ((pthread_attr_t *__attr, - void *__stackaddr)); +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) __THROW; /* Return the previously set address for the stack. */ -extern int pthread_attr_getstackaddr __P ((__const pthread_attr_t *__attr, - void **__stackaddr)); +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__attr, + void **__stackaddr) __THROW; /* Add information about the minimum stack size needed for the thread to be started. This size must never be less than PTHREAD_STACK_SIZE and must also not exceed the system limits. */ -extern int pthread_attr_setstacksize __P ((pthread_attr_t *__attr, - size_t __stacksize)); +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) __THROW; /* Return the currently used minimal stack size. */ -extern int pthread_attr_getstacksize __P ((__const pthread_attr_t *__attr, - size_t *__stacksize)); +extern int pthread_attr_getstacksize (__const pthread_attr_t *__attr, + size_t *__stacksize) __THROW; /* Functions for scheduling control. */ /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ -extern int pthread_setschedparam __P ((pthread_t __target_thread, int __policy, - __const struct sched_param *__param)); +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + __THROW; /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ -extern int pthread_getschedparam __P ((pthread_t __target_thread, - int *__policy, - struct sched_param *__param)); +extern int pthread_getschedparam (pthread_t __target_thread, int *__policy, + struct sched_param *__param) __THROW; #ifdef __USE_UNIX98 /* Determine level of concurrency. */ -extern int pthread_getconcurrency __P ((void)); +extern int pthread_getconcurrency (void) __THROW; /* Set new concurrency level to LEVEL. */ -extern int pthread_setconcurrency __P ((int __level)); +extern int pthread_setconcurrency (int __level) __THROW; #endif /* Functions for mutex handling. */ /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the default values if later is NULL. */ -extern int __pthread_mutex_init __P ((pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr)); -extern int pthread_mutex_init __P ((pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr)); +extern int __pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutex_attr) + __THROW; +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutex_attr) + __THROW; /* Destroy MUTEX. */ -extern int __pthread_mutex_destroy __P ((pthread_mutex_t *__mutex)); -extern int pthread_mutex_destroy __P ((pthread_mutex_t *__mutex)); +extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW; /* Try to lock MUTEX. */ -extern int __pthread_mutex_trylock __P ((pthread_mutex_t *__mutex)); -extern int pthread_mutex_trylock __P ((pthread_mutex_t *__mutex)); +extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROW; /* Wait until lock for MUTEX becomes available and lock it. */ -extern int __pthread_mutex_lock __P ((pthread_mutex_t *__mutex)); -extern int pthread_mutex_lock __P ((pthread_mutex_t *__mutex)); +extern int __pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW; /* Unlock MUTEX. */ -extern int __pthread_mutex_unlock __P ((pthread_mutex_t *__mutex)); -extern int pthread_mutex_unlock __P ((pthread_mutex_t *__mutex)); +extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW; +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW; /* Functions for handling mutex attributes. */ /* Initialize mutex attribute object ATTR with default attributes (kind is PTHREAD_MUTEX_FAST_NP). */ -extern int __pthread_mutexattr_init __P ((pthread_mutexattr_t *__attr)); -extern int pthread_mutexattr_init __P ((pthread_mutexattr_t *__attr)); +extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW; +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW; /* Destroy mutex attribute object ATTR. */ -extern int __pthread_mutexattr_destroy __P ((pthread_mutexattr_t *__attr)); -extern int pthread_mutexattr_destroy __P ((pthread_mutexattr_t *__attr)); +extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW; +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW; #ifdef __USE_UNIX98 /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or PTHREAD_MUTEX_DEFAULT). */ -extern int __pthread_mutexattr_settype __P ((pthread_mutexattr_t *__attr, - int __kind)); -extern int pthread_mutexattr_settype __P ((pthread_mutexattr_t *__attr, - int __kind)); +extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, + int __kind) __THROW; +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + __THROW; /* Return in *KIND the mutex kind attribute in *ATTR. */ -extern int pthread_mutexattr_gettype __P ((__const pthread_mutexattr_t *__attr, - int *__kind)); +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__attr, + int *__kind) __THROW; #endif @@ -319,38 +324,38 @@ extern int pthread_mutexattr_gettype __P ((__const pthread_mutexattr_t *__attr, /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ -extern int pthread_cond_init __P ((pthread_cond_t *__cond, - __const pthread_condattr_t *__cond_attr)); +extern int pthread_cond_init (pthread_cond_t *__cond, + __const pthread_condattr_t *__cond_attr) __THROW; /* Destroy condition variable COND. */ -extern int pthread_cond_destroy __P ((pthread_cond_t *__cond)); +extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW; /* Wake up one thread waiting for condition variable COND. */ -extern int pthread_cond_signal __P ((pthread_cond_t *__cond)); +extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW; /* Wake up all threads waiting for condition variables COND. */ -extern int pthread_cond_broadcast __P ((pthread_cond_t *__cond)); +extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW; /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. */ -extern int pthread_cond_wait __P ((pthread_cond_t *__cond, - pthread_mutex_t *__mutex)); +extern int pthread_cond_wait (pthread_cond_t *__cond, + pthread_mutex_t *__mutex) __THROW; /* Wait for condition variable COND to be signaled or broadcast until ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an absolute time specification; zero is the beginning of the epoch (00:00:00 GMT, January 1, 1970). */ -extern int pthread_cond_timedwait __P ((pthread_cond_t *__cond, - pthread_mutex_t *__mutex, - __const struct timespec *__abstime)); +extern int pthread_cond_timedwait (pthread_cond_t *__cond, + pthread_mutex_t *__mutex, + __const struct timespec *__abstime) __THROW; /* Functions for handling condition variable attributes. */ /* Initialize condition variable attribute ATTR. */ -extern int pthread_condattr_init __P ((pthread_condattr_t *__attr)); +extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW; /* Destroy condition variable attribute ATTR. */ -extern int pthread_condattr_destroy __P ((pthread_condattr_t *__attr)); +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW; #ifdef __USE_UNIX98 @@ -358,53 +363,51 @@ extern int pthread_condattr_destroy __P ((pthread_condattr_t *__attr)); /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ -extern int pthread_rwlock_init __P ((pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr)); +extern int pthread_rwlock_init (pthread_rwlock_t *__rwlock, + __const pthread_rwlockattr_t *__attr) __THROW; /* Destroy read-write lock RWLOCK. */ -extern int pthread_rwlock_destroy __P ((pthread_rwlock_t *__rwlock)); +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW; /* Acquire read lock for RWLOCK. */ -extern int pthread_rwlock_rdlock __P ((pthread_rwlock_t *__rwlock)); +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROW; /* Try to acquire read lock for RWLOCK. */ -extern int pthread_rwlock_tryrdlock __P ((pthread_rwlock_t *__rwlock)); +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW; /* Acquire write lock for RWLOCK. */ -extern int pthread_rwlock_wrlock __P ((pthread_rwlock_t *__rwlock)); +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW; /* Try to acquire writelock for RWLOCK. */ -extern int pthread_rwlock_trywrlock __P ((pthread_rwlock_t *__rwlock)); +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW; /* Unlock RWLOCK. */ -extern int pthread_rwlock_unlock __P ((pthread_rwlock_t *__rwlock)); +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW; /* Functions for handling read-write lock attributes. */ /* Initialize attribute object ATTR with default values. */ -extern int pthread_rwlockattr_init __P ((pthread_rwlockattr_t *__attr)); +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW; /* Destroy attribute object ATTR. */ -extern int pthread_rwlockattr_destroy __P ((pthread_rwlockattr_t *__attr)); +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW; /* Return current setting of process-shared attribute of ATTR in PSHARED. */ -extern int pthread_rwlockattr_getpshared __P ((__const - pthread_rwlockattr_t *__attr, - int *__pshared)); +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *__attr, + int *__pshared) __THROW; /* Set process-shared attribute of ATTR to PSHARED. */ -extern int pthread_rwlockattr_setpshared __P ((pthread_rwlockattr_t *__attr, - int __pshared)); +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) __THROW; /* Return current setting of reader/writer preference. */ -extern int pthread_rwlockattr_getkind_np __P ((__const - pthread_rwlockattr_t *__attr, - int *__pref)); +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr, + int *__pref) __THROW; /* Set reader/write preference. */ -extern int pthread_rwlockattr_setkind_np __P ((pthread_rwlockattr_t *__attr, - int __pref)); +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) __THROW; #endif @@ -416,23 +419,23 @@ extern int pthread_rwlockattr_setkind_np __P ((pthread_rwlockattr_t *__attr, the value associated to that key when the key is destroyed. DESTR_FUNCTION is not called if the value associated is NULL when the key is destroyed. */ -extern int __pthread_key_create __P ((pthread_key_t *__key, - void (*__destr_function) (void *))); -extern int pthread_key_create __P ((pthread_key_t *__key, - void (*__destr_function) (void *))); +extern int __pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) __THROW; +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) __THROW; /* Destroy KEY. */ -extern int pthread_key_delete __P ((pthread_key_t __key)); +extern int pthread_key_delete (pthread_key_t __key) __THROW; /* Store POINTER in the thread-specific data slot identified by KEY. */ -extern int __pthread_setspecific __P ((pthread_key_t __key, - __const void *__pointer)); -extern int pthread_setspecific __P ((pthread_key_t __key, - __const void *__pointer)); +extern int __pthread_setspecific (pthread_key_t __key, + __const void *__pointer) __THROW; +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) __THROW; /* Return current value of the thread-specific data slot identified by KEY. */ -extern void *__pthread_getspecific __P ((pthread_key_t __key)); -extern void *pthread_getspecific __P ((pthread_key_t __key)); +extern void *__pthread_getspecific (pthread_key_t __key) __THROW; +extern void *pthread_getspecific (pthread_key_t __key) __THROW; /* Functions for handling initialization */ @@ -441,29 +444,29 @@ extern void *pthread_getspecific __P ((pthread_key_t __key)); only once, even if pthread_once is executed several times with the same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or extern variable initialized to PTHREAD_ONCE_INIT. */ -extern int __pthread_once __P ((pthread_once_t *__once_control, - void (*__init_routine) (void))); -extern int pthread_once __P ((pthread_once_t *__once_control, - void (*__init_routine) (void))); +extern int __pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __THROW; +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __THROW; /* Functions for handling cancellation. */ /* Set cancelability state of current thread to STATE, returning old state in *OLDSTATE if OLDSTATE is not NULL. */ -extern int pthread_setcancelstate __P ((int __state, int *__oldstate)); +extern int pthread_setcancelstate (int __state, int *__oldstate) __THROW; /* Set cancellation state of current thread to TYPE, returning the old type in *OLDTYPE if OLDTYPE is not NULL. */ -extern int pthread_setcanceltype __P ((int __type, int *__oldtype)); +extern int pthread_setcanceltype (int __type, int *__oldtype) __THROW; /* Cancel THREAD immediately or at the next possibility. */ -extern int pthread_cancel __P ((pthread_t __thread)); +extern int pthread_cancel (pthread_t __thread) __THROW; /* Test for pending cancellation for the current thread and terminate the thread as per pthread_exit(PTHREAD_CANCELED) if it has been cancelled. */ -extern void pthread_testcancel __P ((void)); +extern void pthread_testcancel (void) __THROW; /* Install a cleanup handler: ROUTINE will be called with arguments ARG @@ -473,44 +476,44 @@ extern void pthread_testcancel __P ((void)); pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ -#define pthread_cleanup_push(routine,arg) \ +#define pthread_cleanup_push(routine,arg) \ { struct _pthread_cleanup_buffer _buffer; \ _pthread_cleanup_push (&_buffer, (routine), (arg)); -extern void _pthread_cleanup_push __P ((struct _pthread_cleanup_buffer *__buffer, - void (*__routine) (void *), - void *__arg)); +extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer, + void (*__routine) (void *), + void *__arg) __THROW; /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ -#define pthread_cleanup_pop(execute) \ +#define pthread_cleanup_pop(execute) \ _pthread_cleanup_pop (&_buffer, (execute)); } -extern void _pthread_cleanup_pop __P ((struct _pthread_cleanup_buffer *__buffer, - int __execute)); +extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, + int __execute) __THROW; /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and set it to deferred cancellation. */ #ifdef __USE_GNU -# define pthread_cleanup_push_defer_np(routine,arg) \ +# define pthread_cleanup_push_defer_np(routine,arg) \ { struct _pthread_cleanup_buffer _buffer; \ _pthread_cleanup_push_defer (&_buffer, (routine), (arg)); -extern void _pthread_cleanup_push_defer __P ((struct _pthread_cleanup_buffer *__buffer, - void (*__routine) (void *), - void *__arg)); +extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, + void (*__routine) (void *), + void *__arg) __THROW; /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ -# define pthread_cleanup_pop_restore_np(execute) \ +# define pthread_cleanup_pop_restore_np(execute) \ _pthread_cleanup_pop_restore (&_buffer, (execute)); } -extern void _pthread_cleanup_pop_restore __P ((struct _pthread_cleanup_buffer *__buffer, - int __execute)); +extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, + int __execute) __THROW; #endif /* Functions for handling signals. */ @@ -530,21 +533,21 @@ extern void _pthread_cleanup_pop_restore __P ((struct _pthread_cleanup_buffer *_ first called before FORK), and the PARENT and CHILD handlers are called in FIFO (first added, first called). */ -extern int __pthread_atfork __P ((void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void))); -extern int pthread_atfork __P ((void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void))); +extern int __pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __THROW; +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __THROW; /* Terminate all threads in the program except the calling process. Should be called just before invoking one of the exec*() functions. */ -extern void pthread_kill_other_threads_np __P ((void)); +extern void pthread_kill_other_threads_np (void) __THROW; /* This function is called to initialize the pthread library. */ -extern void __pthread_initialize __P ((void)); +extern void __pthread_initialize (void) __THROW; __END_DECLS diff --git a/locale/locale.h b/locale/locale.h index 1429328..628a9c6 100644 --- a/locale/locale.h +++ b/locale/locale.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 95, 96, 97, 98, 99 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 @@ -94,10 +94,10 @@ struct lconv /* Set and/or return the current locale. */ -extern char *setlocale __P ((int __category, __const char *__locale)); +extern char *setlocale (int __category, __const char *__locale) __THROW; /* Return the numeric/monetary information for the current locale. */ -extern struct lconv *localeconv __P ((void)); +extern struct lconv *localeconv (void) __THROW; #ifdef __USE_GNU /* The concept of one static locale per category is not very well @@ -120,17 +120,16 @@ extern struct lconv *localeconv __P ((void)); I.e., 1 << LC_CTYPE means to load data for this category. If BASE is non-null the appropriate category information in the BASE record is replaced. */ -extern __locale_t __newlocale __P ((int __category_mask, - __const char *__locale, - __locale_t __base)); +extern __locale_t __newlocale (int __category_mask, __const char *__locale, + __locale_t __base) __THROW; /* Return a duplicate of the set of locale in DATASET. All usage counters are increased if necessary. */ -extern __locale_t __duplocale __P ((__locale_t __dataset)); +extern __locale_t __duplocale (__locale_t __dataset) __THROW; /* Free the data associated with a locale dataset previously returned by a call to `setlocale_r'. */ -extern void __freelocale __P ((__locale_t __dataset)); +extern void __freelocale (__locale_t __dataset) __THROW; #endif __END_DECLS diff --git a/login/pty.h b/login/pty.h index bfd4530..86d927b 100644 --- a/login/pty.h +++ b/login/pty.h @@ -1,5 +1,5 @@ /* Functions for pseudo TTY handling. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 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 @@ -31,13 +31,13 @@ __BEGIN_DECLS /* Create pseudo tty master slave pair with NAME and set terminal attributes according to TERMP and WINP and return handles for both ends in AMASTER and ASLAVE. */ -extern int openpty __P ((int *__amaster, int *__aslave, char *__name, - struct termios *__termp, struct winsize *__winp)); +extern int openpty (int *__amaster, int *__aslave, char *__name, + struct termios *__termp, struct winsize *__winp) __THROW; /* Create child process and establish the slave pseudo terminal as the child's controlling terminal. */ -extern int forkpty __P ((int *__amaster, char *__name, - struct termios *__termp, struct winsize *__winp)); +extern int forkpty (int *__amaster, char *__name, + struct termios *__termp, struct winsize *__winp) __THROW; __END_DECLS diff --git a/login/utmp.h b/login/utmp.h index 21436a3..7ae4158 100644 --- a/login/utmp.h +++ b/login/utmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1993, 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 @@ -39,56 +39,56 @@ __BEGIN_DECLS /* Make FD be the controlling terminal, stdin, stdout, and stderr; then close FD. Returns 0 on success, nonzero on error. */ -extern int login_tty __P ((int __fd)); +extern int login_tty (int __fd) __THROW; /* Write the given entry into utmp and wtmp. */ -extern void login __P ((__const struct utmp *__entry)); +extern void login (__const struct utmp *__entry) __THROW; /* Write the utmp entry to say the user on UT_LINE has logged out. */ -extern int logout __P ((__const char *__ut_line)); +extern int logout (__const char *__ut_line) __THROW; /* Append to wtmp an entry for the current time and the given info. */ -extern void logwtmp __P ((__const char *__ut_line, __const char *__ut_name, - __const char *__ut_host)); +extern void logwtmp (__const char *__ut_line, __const char *__ut_name, + __const char *__ut_host) __THROW; /* Append entry UTMP to the wtmp-like file WTMP_FILE. */ -extern void updwtmp __P ((__const char *__wtmp_file, - __const struct utmp *__utmp)); +extern void updwtmp (__const char *__wtmp_file, __const struct utmp *__utmp) + __THROW; /* Change name of the utmp file to be examined. */ -extern int utmpname __P ((__const char *__file)); +extern int utmpname (__const char *__file) __THROW; /* Read next entry from a utmp-like file. */ -extern struct utmp *getutent __P ((void)); +extern struct utmp *getutent (void) __THROW; /* Reset the input stream to the beginning of the file. */ -extern void setutent __P ((void)); +extern void setutent (void) __THROW; /* Close the current open file. */ -extern void endutent __P ((void)); +extern void endutent (void) __THROW; /* Search forward from the current point in the utmp file until the next entry with a ut_type matching ID->ut_type. */ -extern struct utmp *getutid __P ((__const struct utmp *__id)); +extern struct utmp *getutid (__const struct utmp *__id) __THROW; /* Search forward from the current point in the utmp file until the next entry with a ut_line matching LINE->ut_line. */ -extern struct utmp *getutline __P ((__const struct utmp *__line)); +extern struct utmp *getutline (__const struct utmp *__line) __THROW; /* Write out entry pointed to by UTMP_PTR into the utmp file. */ -extern struct utmp *pututline __P ((__const struct utmp *__utmp_ptr)); +extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW; #ifdef __USE_MISC /* Reentrant versions of the file for handling utmp files. */ -extern int getutent_r __P ((struct utmp *__buffer, struct utmp **__result)); +extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW; -extern int getutid_r __P ((__const struct utmp *__id, struct utmp *__buffer, - struct utmp **__result)); +extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer, + struct utmp **__result) __THROW; -extern int getutline_r __P ((__const struct utmp *__line, - struct utmp *__buffer, struct utmp **__result)); +extern int getutline_r (__const struct utmp *__line, + struct utmp *__buffer, struct utmp **__result) __THROW; #endif /* Use misc. */ diff --git a/malloc/mcheck.h b/malloc/mcheck.h index 3d55bd3..5cf2bcd 100644 --- a/malloc/mcheck.h +++ b/malloc/mcheck.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -39,16 +39,16 @@ enum mcheck_status before `malloc' is ever called. ABORTFUNC is called with an error code (see enum above) when an inconsistency is detected. If ABORTFUNC is null, the standard function prints on stderr and then calls `abort'. */ -extern int mcheck __P ((void (*__abortfunc) (enum mcheck_status))); +extern int mcheck (void (*__abortfunc) (enum mcheck_status)) __THROW; /* Check for aberrations in a particular malloc'd block. You must have called `mcheck' already. These are the same checks that `mcheck' does when you free or reallocate a block. */ -extern enum mcheck_status mprobe __P ((__ptr_t __ptr)); +extern enum mcheck_status mprobe (void *__ptr) __THROW; /* Activate a standard collection of tracing hooks. */ -extern void mtrace __P ((void)); -extern void muntrace __P ((void)); +extern void mtrace (void) __THROW; +extern void muntrace (void) __THROW; __END_DECLS diff --git a/math/complex.h b/math/complex.h index 3bb5d1b..26cc5e2 100644 --- a/math/complex.h +++ b/math/complex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -59,7 +59,7 @@ __BEGIN_DECLS __MATHDECL_1(type, function, args); \ __MATHDECL_1(type, __CONCAT(__,function), args) #define __MATHDECL_1(type, function, args) \ - extern type __MATH_PRECNAME(function) args + extern type __MATH_PRECNAME(function) args __THROW #define _Mdouble_ double #define __MATH_PRECNAME(name) name diff --git a/math/math.h b/math/math.h index 0e2b4e7..f43def0 100644 --- a/math/math.h +++ b/math/math.h @@ -56,7 +56,7 @@ __BEGIN_DECLS __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \ __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) #define __MATHDECL_1(type, function,suffix, args) \ - extern type __MATH_PRECNAME(function,suffix) args + extern type __MATH_PRECNAME(function,suffix) args __THROW #define _Mdouble_ double #define __MATH_PRECNAME(name,r) __CONCAT(name,r) @@ -269,9 +269,9 @@ struct exception }; # ifdef __cplusplus -extern int matherr __P ((struct __exception *__exc)); +extern int matherr (struct __exception *__exc) throw (); # else -extern int matherr __P ((struct exception *__exc)); +extern int matherr (struct exception *__exc); # endif # define X_TLOSS 1.41484755040568800000e+16 diff --git a/math/math_private.h b/math/math_private.h index 29dbb46..99be167 100644 --- a/math/math_private.h +++ b/math/math_private.h @@ -151,122 +151,120 @@ do { \ #include <math_ldbl.h> /* ieee style elementary functions */ -extern double __ieee754_sqrt __P((double)); -extern double __ieee754_acos __P((double)); -extern double __ieee754_acosh __P((double)); -extern double __ieee754_log __P((double)); -extern double __ieee754_atanh __P((double)); -extern double __ieee754_asin __P((double)); -extern double __ieee754_atan2 __P((double,double)); -extern double __ieee754_exp __P((double)); -extern double __ieee754_exp2 __P((double)); -extern double __ieee754_exp10 __P((double)); -extern double __ieee754_cosh __P((double)); -extern double __ieee754_fmod __P((double,double)); -extern double __ieee754_pow __P((double,double)); -extern double __ieee754_lgamma_r __P((double,int *)); -extern double __ieee754_gamma_r __P((double,int *)); -extern double __ieee754_lgamma __P((double)); -extern double __ieee754_gamma __P((double)); -extern double __ieee754_log10 __P((double)); -extern double __ieee754_sinh __P((double)); -extern double __ieee754_hypot __P((double,double)); -extern double __ieee754_j0 __P((double)); -extern double __ieee754_j1 __P((double)); -extern double __ieee754_y0 __P((double)); -extern double __ieee754_y1 __P((double)); -extern double __ieee754_jn __P((int,double)); -extern double __ieee754_yn __P((int,double)); -extern double __ieee754_remainder __P((double,double)); -extern int32_t __ieee754_rem_pio2 __P((double,double*)); -extern double __ieee754_scalb __P((double,double)); +extern double __ieee754_sqrt (double); +extern double __ieee754_acos (double); +extern double __ieee754_acosh (double); +extern double __ieee754_log (double); +extern double __ieee754_atanh (double); +extern double __ieee754_asin (double); +extern double __ieee754_atan2 (double,double); +extern double __ieee754_exp (double); +extern double __ieee754_exp2 (double); +extern double __ieee754_exp10 (double); +extern double __ieee754_cosh (double); +extern double __ieee754_fmod (double,double); +extern double __ieee754_pow (double,double); +extern double __ieee754_lgamma_r (double,int *); +extern double __ieee754_gamma_r (double,int *); +extern double __ieee754_lgamma (double); +extern double __ieee754_gamma (double); +extern double __ieee754_log10 (double); +extern double __ieee754_sinh (double); +extern double __ieee754_hypot (double,double); +extern double __ieee754_j0 (double); +extern double __ieee754_j1 (double); +extern double __ieee754_y0 (double); +extern double __ieee754_y1 (double); +extern double __ieee754_jn (int,double); +extern double __ieee754_yn (int,double); +extern double __ieee754_remainder (double,double); +extern int32_t __ieee754_rem_pio2 (double,double*); +extern double __ieee754_scalb (double,double); /* fdlibm kernel function */ -extern double __kernel_standard __P((double,double,int)); -extern double __kernel_sin __P((double,double,int)); -extern double __kernel_cos __P((double,double)); -extern double __kernel_tan __P((double,double,int)); -extern int __kernel_rem_pio2 __P((double*,double*,int,int,int, - const int32_t*)); +extern double __kernel_standard (double,double,int); +extern double __kernel_sin (double,double,int); +extern double __kernel_cos (double,double); +extern double __kernel_tan (double,double,int); +extern int __kernel_rem_pio2 (double*,double*,int,int,int, const int32_t*); /* ieee style elementary float functions */ -extern float __ieee754_sqrtf __P((float)); -extern float __ieee754_acosf __P((float)); -extern float __ieee754_acoshf __P((float)); -extern float __ieee754_logf __P((float)); -extern float __ieee754_atanhf __P((float)); -extern float __ieee754_asinf __P((float)); -extern float __ieee754_atan2f __P((float,float)); -extern float __ieee754_expf __P((float)); -extern float __ieee754_exp2f __P((float)); -extern float __ieee754_exp10f __P((float)); -extern float __ieee754_coshf __P((float)); -extern float __ieee754_fmodf __P((float,float)); -extern float __ieee754_powf __P((float,float)); -extern float __ieee754_lgammaf_r __P((float,int *)); -extern float __ieee754_gammaf_r __P((float,int *)); -extern float __ieee754_lgammaf __P((float)); -extern float __ieee754_gammaf __P((float)); -extern float __ieee754_log10f __P((float)); -extern float __ieee754_sinhf __P((float)); -extern float __ieee754_hypotf __P((float,float)); -extern float __ieee754_j0f __P((float)); -extern float __ieee754_j1f __P((float)); -extern float __ieee754_y0f __P((float)); -extern float __ieee754_y1f __P((float)); -extern float __ieee754_jnf __P((int,float)); -extern float __ieee754_ynf __P((int,float)); -extern float __ieee754_remainderf __P((float,float)); -extern int32_t __ieee754_rem_pio2f __P((float,float*)); -extern float __ieee754_scalbf __P((float,float)); +extern float __ieee754_sqrtf (float); +extern float __ieee754_acosf (float); +extern float __ieee754_acoshf (float); +extern float __ieee754_logf (float); +extern float __ieee754_atanhf (float); +extern float __ieee754_asinf (float); +extern float __ieee754_atan2f (float,float); +extern float __ieee754_expf (float); +extern float __ieee754_exp2f (float); +extern float __ieee754_exp10f (float); +extern float __ieee754_coshf (float); +extern float __ieee754_fmodf (float,float); +extern float __ieee754_powf (float,float); +extern float __ieee754_lgammaf_r (float,int *); +extern float __ieee754_gammaf_r (float,int *); +extern float __ieee754_lgammaf (float); +extern float __ieee754_gammaf (float); +extern float __ieee754_log10f (float); +extern float __ieee754_sinhf (float); +extern float __ieee754_hypotf (float,float); +extern float __ieee754_j0f (float); +extern float __ieee754_j1f (float); +extern float __ieee754_y0f (float); +extern float __ieee754_y1f (float); +extern float __ieee754_jnf (int,float); +extern float __ieee754_ynf (int,float); +extern float __ieee754_remainderf (float,float); +extern int32_t __ieee754_rem_pio2f (float,float*); +extern float __ieee754_scalbf (float,float); /* float versions of fdlibm kernel functions */ -extern float __kernel_sinf __P((float,float,int)); -extern float __kernel_cosf __P((float,float)); -extern float __kernel_tanf __P((float,float,int)); -extern int __kernel_rem_pio2f __P((float*,float*,int,int,int, - const int32_t*)); +extern float __kernel_sinf (float,float,int); +extern float __kernel_cosf (float,float); +extern float __kernel_tanf (float,float,int); +extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*); /* ieee style elementary long double functions */ -extern long double __ieee754_sqrtl __P((long double)); -extern long double __ieee754_acosl __P((long double)); -extern long double __ieee754_acoshl __P((long double)); -extern long double __ieee754_logl __P((long double)); -extern long double __ieee754_atanhl __P((long double)); -extern long double __ieee754_asinl __P((long double)); -extern long double __ieee754_atan2l __P((long double,long double)); -extern long double __ieee754_expl __P((long double)); -extern long double __ieee754_exp2l __P((long double)); -extern long double __ieee754_exp10l __P((long double)); -extern long double __ieee754_coshl __P((long double)); -extern long double __ieee754_fmodl __P((long double,long double)); -extern long double __ieee754_powl __P((long double,long double)); -extern long double __ieee754_lgammal_r __P((long double,int *)); -extern long double __ieee754_gammal_r __P((long double,int *)); -extern long double __ieee754_lgammal __P((long double)); -extern long double __ieee754_gammal __P((long double)); -extern long double __ieee754_log10l __P((long double)); -extern long double __ieee754_sinhl __P((long double)); -extern long double __ieee754_hypotl __P((long double,long double)); -extern long double __ieee754_j0l __P((long double)); -extern long double __ieee754_j1l __P((long double)); -extern long double __ieee754_y0l __P((long double)); -extern long double __ieee754_y1l __P((long double)); -extern long double __ieee754_jnl __P((int,long double)); -extern long double __ieee754_ynl __P((int,long double)); -extern long double __ieee754_remainderl __P((long double,long double)); -extern int __ieee754_rem_pio2l __P((long double,long double*)); -extern long double __ieee754_scalbl __P((long double,long double)); +extern long double __ieee754_sqrtl (long double); +extern long double __ieee754_acosl (long double); +extern long double __ieee754_acoshl (long double); +extern long double __ieee754_logl (long double); +extern long double __ieee754_atanhl (long double); +extern long double __ieee754_asinl (long double); +extern long double __ieee754_atan2l (long double,long double); +extern long double __ieee754_expl (long double); +extern long double __ieee754_exp2l (long double); +extern long double __ieee754_exp10l (long double); +extern long double __ieee754_coshl (long double); +extern long double __ieee754_fmodl (long double,long double); +extern long double __ieee754_powl (long double,long double); +extern long double __ieee754_lgammal_r (long double,int *); +extern long double __ieee754_gammal_r (long double,int *); +extern long double __ieee754_lgammal (long double); +extern long double __ieee754_gammal (long double); +extern long double __ieee754_log10l (long double); +extern long double __ieee754_sinhl (long double); +extern long double __ieee754_hypotl (long double,long double); +extern long double __ieee754_j0l (long double); +extern long double __ieee754_j1l (long double); +extern long double __ieee754_y0l (long double); +extern long double __ieee754_y1l (long double); +extern long double __ieee754_jnl (int,long double); +extern long double __ieee754_ynl (int,long double); +extern long double __ieee754_remainderl (long double,long double); +extern int __ieee754_rem_pio2l (long double,long double*); +extern long double __ieee754_scalbl (long double,long double); /* long double versions of fdlibm kernel functions */ -extern long double __kernel_sinl __P((long double,long double,int)); -extern long double __kernel_cosl __P((long double,long double)); -extern long double __kernel_tanl __P((long double,long double,int)); -extern void __kernel_sincosl __P((long double,long double, - long double *,long double *, int)); -extern int __kernel_rem_pio2l __P((long double*,long double*,int,int, - int,const int*)); +extern long double __kernel_sinl (long double,long double,int); +extern long double __kernel_cosl (long double,long double); +extern long double __kernel_tanl (long double,long double,int); +extern void __kernel_sincosl (long double,long double, + long double *,long double *, int); +extern int __kernel_rem_pio2l (long double*,long double*,int,int, + int,const int*); #endif /* _MATH_PRIVATE_H_ */ @@ -1,5 +1,5 @@ /* 4.4BSD utility functions for error messages. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 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 @@ -32,26 +32,26 @@ __BEGIN_DECLS /* Print "program: ", FORMAT, ": ", the standard error string for errno, and a newline, on stderr. */ -extern void warn __P ((__const char *__format, ...)) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern void vwarn __P ((__const char *__format, __gnuc_va_list)) - __attribute__ ((__format__ (__printf__, 1, 0))); +extern void warn (__const char *__format, ...) + __THROW __attribute__ ((__format__ (__printf__, 1, 2))); +extern void vwarn (__const char *__format, __gnuc_va_list) + __THROW __attribute__ ((__format__ (__printf__, 1, 0))); /* Likewise, but without ": " and the standard error string. */ -extern void warnx __P ((__const char *__format, ...)) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern void vwarnx __P ((__const char *__format, __gnuc_va_list)) - __attribute__ ((__format__ (__printf__, 1, 0))); +extern void warnx (__const char *__format, ...) + __THROW __attribute__ ((__format__ (__printf__, 1, 2))); +extern void vwarnx (__const char *__format, __gnuc_va_list) + __THROW __attribute__ ((__format__ (__printf__, 1, 0))); /* Likewise, and then exit with STATUS. */ -extern void err __P ((int __status, __const char *__format, ...)) - __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); -extern void verr __P ((int __status, __const char *__format, __gnuc_va_list)) - __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); -extern void errx __P ((int __status, __const char *__format, ...)) - __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); -extern void verrx __P ((int __status, __const char *, __gnuc_va_list)) - __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); +extern void err (int __status, __const char *__format, ...) + __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); +extern void verr (int __status, __const char *__format, __gnuc_va_list) + __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); +extern void errx (int __status, __const char *__format, ...) + __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); +extern void verrx (int __status, __const char *, __gnuc_va_list) + __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); __END_DECLS diff --git a/misc/fstab.h b/misc/fstab.h index 316a4f8..24ecad7 100644 --- a/misc/fstab.h +++ b/misc/fstab.h @@ -68,11 +68,11 @@ struct fstab __BEGIN_DECLS -extern struct fstab *getfsent __P ((void)); -extern struct fstab *getfsspec __P ((__const char *__name)); -extern struct fstab *getfsfile __P ((__const char *__name)); -extern int setfsent __P ((void)); -extern void endfsent __P ((void)); +extern struct fstab *getfsent (void) __THROW; +extern struct fstab *getfsspec (__const char *__name) __THROW; +extern struct fstab *getfsfile (__const char *__name) __THROW; +extern int setfsent (void) __THROW; +extern void endfsent (void) __THROW; __END_DECLS diff --git a/misc/libgen.h b/misc/libgen.h index b4ef9e5..948a9c3 100644 --- a/misc/libgen.h +++ b/misc/libgen.h @@ -24,7 +24,7 @@ __BEGIN_DECLS /* Return directory part of PATH or "." if none is available. */ -extern char *dirname __P ((char *__path)); +extern char *dirname (char *__path) __THROW; /* Return final component of PATH. @@ -32,7 +32,7 @@ extern char *dirname __P ((char *__path)); modify its argument. Therefore we normally use the GNU version (in <string.h>) and only if this header is included make the XPG version available under the real name. */ -extern char *__xpg_basename __P ((char *__path)); +extern char *__xpg_basename (char *__path) __THROW; #define basename __xpg_basename __END_DECLS diff --git a/misc/mntent.h b/misc/mntent.h index 6acd532..decda94 100644 --- a/misc/mntent.h +++ b/misc/mntent.h @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 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 @@ -64,33 +64,33 @@ struct mntent /* Prepare to begin reading and/or writing mount table entries from the beginning of FILE. MODE is as for `fopen'. */ -extern FILE *setmntent __P ((__const char *__file, __const char *__mode)); +extern FILE *setmntent (__const char *__file, __const char *__mode) __THROW; /* Read one mount table entry from STREAM. Returns a pointer to storage reused on the next call, or null for EOF or error (use feof/ferror to check). */ -extern struct mntent *getmntent __P ((FILE *__stream)); +extern struct mntent *getmntent (FILE *__stream) __THROW; #ifdef __USE_MISC /* Reentrant version of the above function. */ -extern struct mntent *getmntent_r __P ((FILE *__restrict __stream, - struct mntent *__restrict __result, - char *__restrict __buffer, - int __bufsize)); +extern struct mntent *getmntent_r (FILE *__restrict __stream, + struct mntent *__restrict __result, + char *__restrict __buffer, + int __bufsize) __THROW; #endif /* Write the mount table entry described by MNT to STREAM. Return zero on success, nonzero on failure. */ -extern int addmntent __P ((FILE *__restrict __stream, - __const struct mntent *__restrict __mnt)); +extern int addmntent (FILE *__restrict __stream, + __const struct mntent *__restrict __mnt) __THROW; /* Close a stream opened with `setmntent'. */ -extern int endmntent __P ((FILE *__stream)); +extern int endmntent (FILE *__stream) __THROW; /* Search MNT->mnt_opts for an option matching OPT. Returns the address of the substring, or null if none found. */ -extern char *hasmntopt __P ((__const struct mntent *__mnt, - __const char *__opt)); +extern char *hasmntopt (__const struct mntent *__mnt, + __const char *__opt) __THROW; __END_DECLS diff --git a/misc/regexp.h b/misc/regexp.h index fc60d3c..a8659ae 100644 --- a/misc/regexp.h +++ b/misc/regexp.h @@ -206,14 +206,14 @@ compile (char *__restrict instring, char *__restrict expbuf, found in the buffer starting at EXPBUF. `loc1' will return the first character matched and `loc2' points to the next unmatched character. */ -extern int step __P ((__const char *__restrict __string, - __const char *__restrict __expbuf)); +extern int step (__const char *__restrict __string, + __const char *__restrict __expbuf) __THROW; /* Match the beginning of STRING with the compiled regular expression in EXPBUF. If the match is successful `loc2' will contain the position of the first unmatched character. */ -extern int advance __P ((__const char *__restrict __string, - __const char *__restrict __expbuf)); +extern int advance (__const char *__restrict __string, + __const char *__restrict __expbuf) __THROW; __END_DECLS diff --git a/misc/search.h b/misc/search.h index 8fb2539..ebc525a 100644 --- a/misc/search.h +++ b/misc/search.h @@ -42,17 +42,17 @@ struct qelem /* Insert ELEM into a doubly-linked list, after PREV. */ -extern void insque __P ((void *__elem, void *__prev)); +extern void insque (void *__elem, void *__prev) __THROW; /* Unlink ELEM from the doubly-linked list that it is in. */ -extern void remque __P ((void *__elem)); +extern void remque (void *__elem) __THROW; #endif /* For use with hsearch(3). */ #ifndef __COMPAR_FN_T # define __COMPAR_FN_T -typedef int (*__compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t)); +typedef int (*__compar_fn_t) (__const void *, __const void *); # ifdef __USE_GNU typedef __compar_fn_t comparison_fn_t; @@ -85,13 +85,13 @@ struct _ENTRY; ACTION is `FIND' return found entry or signal error by returning NULL. If ACTION is `ENTER' replace existing data (if any) with ITEM.data. */ -extern ENTRY *hsearch __P ((ENTRY __item, ACTION __action)); +extern ENTRY *hsearch (ENTRY __item, ACTION __action) __THROW; /* Create a new hashing table which will at most contain NEL elements. */ -extern int hcreate __P ((size_t __nel)); +extern int hcreate (size_t __nel) __THROW; /* Destroy current internal hashing table. */ -extern void hdestroy __P ((void)); +extern void hdestroy (void) __THROW; #ifdef __USE_GNU /* Data type for reentrant functions. */ @@ -104,10 +104,10 @@ struct hsearch_data /* Reentrant versions which can handle multiple hashing tables at the same time. */ -extern int hsearch_r __P ((ENTRY __item, ACTION __action, ENTRY **__retval, - struct hsearch_data *__htab)); -extern int hcreate_r __P ((size_t __nel, struct hsearch_data *__htab)); -extern void hdestroy_r __P ((struct hsearch_data *__htab)); +extern int hsearch_r (ENTRY __item, ACTION __action, ENTRY **__retval, + struct hsearch_data *__htab) __THROW; +extern int hcreate_r (size_t __nel, struct hsearch_data *__htab) __THROW; +extern void hdestroy_r (struct hsearch_data *__htab) __THROW; #endif @@ -127,50 +127,47 @@ VISIT; /* Search for an entry matching the given KEY in the tree pointed to by *ROOTP and insert a new element if not found. */ -extern void *tsearch __PMT ((__const void *__key, void **__rootp, - __compar_fn_t __compar)); +extern void *tsearch (__const void *__key, void **__rootp, + __compar_fn_t __compar); /* Search for an entry matching the given KEY in the tree pointed to by *ROOTP. If no matching entry is available return NULL. */ -extern void *tfind __PMT ((__const void *__key, void *__const *__rootp, - __compar_fn_t __compar)); +extern void *tfind (__const void *__key, void *__const *__rootp, + __compar_fn_t __compar); /* Remove the element matching KEY from the tree pointed to by *ROOTP. */ -extern void *tdelete __PMT ((__const void *__key, void **__rootp, - __compar_fn_t __compar)); +extern void *tdelete (__const void *__key, void **__rootp, + __compar_fn_t __compar); #ifndef __ACTION_FN_T # define __ACTION_FN_T -typedef void (*__action_fn_t) __PMT ((__const void *__nodep, - VISIT __value, - int __level)); +typedef void (*__action_fn_t) (__const void *__nodep, VISIT __value, + int __level); #endif /* Walk through the whole tree and call the ACTION callback for every node or leaf. */ -extern void twalk __PMT ((__const void *__root, __action_fn_t __action)); +extern void twalk (__const void *__root, __action_fn_t __action); #ifdef __USE_GNU /* Callback type for function to free a tree node. If the keys are atomic data this function should do nothing. */ -typedef void (*__free_fn_t) __PMT ((void *__nodep)); +typedef void (*__free_fn_t) (void *__nodep); /* Destroy the whole tree, call FREEFCT for each node or leaf. */ -extern void tdestroy __PMT ((void *__root, __free_fn_t __freefct)); +extern void tdestroy (void *__root, __free_fn_t __freefct); #endif /* Perform linear search for KEY by comparing by COMPAR in an array [BASE,BASE+NMEMB*SIZE). */ -extern void *lfind __PMT ((__const void *__key, __const void *__base, - size_t *__nmemb, size_t __size, - __compar_fn_t __compar)); +extern void *lfind (__const void *__key, __const void *__base, + size_t *__nmemb, size_t __size, __compar_fn_t __compar); /* Perform linear search for KEY by comparing by COMPAR function in array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */ -extern void *lsearch __PMT ((__const void *__key, void *__base, - size_t *__nmemb, size_t __size, - __compar_fn_t __compar)); +extern void *lsearch (__const void *__key, void *__base, + size_t *__nmemb, size_t __size, __compar_fn_t __compar); __END_DECLS diff --git a/misc/sgtty.h b/misc/sgtty.h index 02bbb18..6d1c5a8 100644 --- a/misc/sgtty.h +++ b/misc/sgtty.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 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,10 +30,10 @@ struct sgttyb; __BEGIN_DECLS /* Fill in *PARAMS with terminal parameters associated with FD. */ -extern int gtty __P ((int __fd, struct sgttyb *__params)); +extern int gtty patch(int __fd, struct sgttyb *__params) __THROW; /* Set the terminal parameters associated with FD to *PARAMS. */ -extern int stty __P ((int __fd, __const struct sgttyb *__params)); +extern int stty (int __fd, __const struct sgttyb *__params) __THROW; __END_DECLS diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 6a8b870..84e24b0 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -43,8 +43,6 @@ functions. */ # define __PMT(args) args -# define __DOTS , ... - #else /* Not GCC. */ # define __inline /* No inline functions. */ @@ -53,22 +51,18 @@ # define __P(args) args # define __PMT(args) args -# define __const const -# define __signed signed -# define __volatile volatile -# define __DOTS , ... # else /* Not ANSI C or C++. */ # define __P(args) () /* No prototypes. */ # define __PMT(args) () -# define __const /* No ANSI C keywords. */ -# define __signed -# define __volatile -# define __DOTS # endif /* ANSI C or C++. */ +# define __const const +# define __signed signed +# define __volatile volatile + #endif /* GCC. */ /* For these things, GCC behaves the ANSI way normally, @@ -95,11 +89,11 @@ old programs may lose if they use the new keywords as identifiers), but those names are not available under -traditional. We define them to their __ versions, which are taken care of above. */ -#ifdef __USE_BSD -# define const __const -# define signed __signed -# define volatile __volatile -#endif +# ifdef __USE_BSD +# define const __const +# define signed __signed +# define volatile __volatile +# endif #endif /* __STDC__ */ diff --git a/misc/sys/file.h b/misc/sys/file.h index a2e7bf0..faff35d 100644 --- a/misc/sys/file.h +++ b/misc/sys/file.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 96, 97, 98, 99 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 @@ -48,7 +48,7 @@ __BEGIN_DECLS /* Apply or remove an advisory lock, according to OPERATION, on the file FD refers to. */ -extern int flock __P ((int __fd, int __operation)); +extern int flock (int __fd, int __operation) __THROW; __END_DECLS diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h index acb42f2..30a9155 100644 --- a/misc/sys/ioctl.h +++ b/misc/sys/ioctl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 96, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 94, 96, 98, 99 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 @@ -39,7 +39,7 @@ __BEGIN_DECLS /* Perform the I/O control operation specified by REQUEST on FD. One argument may follow; its presence and type depend on REQUEST. Return value depends on REQUEST. Usually -1 indicates error. */ -extern int ioctl __P ((int __fd, unsigned long int __request, ...)); +extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; __END_DECLS diff --git a/misc/sys/mman.h b/misc/sys/mman.h index 92b4bf8..cddb451 100644 --- a/misc/sys/mman.h +++ b/misc/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. - Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 99 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 @@ -28,7 +28,7 @@ #include <bits/mman.h> /* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__ptr_t) -1) +#define MAP_FAILED ((void *) -1) __BEGIN_DECLS /* Map addresses starting near ADDR and extending for LEN bytes. from @@ -41,60 +41,60 @@ __BEGIN_DECLS deallocates any previous mapping for the affected region. */ #ifndef __USE_FILE_OFFSET64 -extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); +extern void *mmap (void *__addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset) __THROW; #else -extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)) +extern void *mmap (void *__addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset) __THROW __asm__ ("mmap64"); #endif #ifdef __USE_LARGEFILE64 -extern __ptr_t mmap64 __P ((__ptr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off64_t __offset)); +extern void *mmap64 (void *__addr, size_t __len, int __prot, + int __flags, int __fd, __off64_t __offset) __THROW; #endif /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int munmap __P ((__ptr_t __addr, size_t __len)); +extern int munmap (void *__addr, size_t __len) __THROW; /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); +extern int mprotect (void *__addr, size_t __len, int __prot) __THROW; /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. Flags are from the MS_* set. */ -extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); +extern int msync (void *__addr, size_t __len, int __flags) __THROW; #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); +extern int madvise (void *__addr, size_t __len, int __advice) __THROW; #endif /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to be memory resident. */ -extern int mlock __P ((__const __ptr_t __addr, size_t __len)); +extern int mlock (__const void *__addr, size_t __len) __THROW; /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */ -extern int munlock __P ((__const __ptr_t __addr, size_t __len)); +extern int munlock (__const void *__addr, size_t __len) __THROW; /* Cause all currently mapped pages of the process to be memory resident until unlocked by a call to the `munlockall', until the process exits, or until the process calls `execve'. */ -extern int mlockall __P ((int __flags)); +extern int mlockall (int __flags) __THROW; /* All currently mapped pages of the process' address space become unlocked. */ -extern int munlockall __P ((void)); +extern int munlockall (void) __THROW; #ifdef __USE_MISC /* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length NEW_LEN. If MAY_MOVE is MREMAP_MAYMOVE the returned address may differ from ADDR. */ -extern __ptr_t mremap __P ((__ptr_t __addr, size_t __old_len, - size_t __new_len, int __may_move)); +extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, + int __may_move) __THROW; #endif __END_DECLS diff --git a/misc/sys/select.h b/misc/sys/select.h index 0972560..15130cb 100644 --- a/misc/sys/select.h +++ b/misc/sys/select.h @@ -1,5 +1,5 @@ /* `fd_set' type and related macros, and `select'/`pselect' declarations. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 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 @@ -71,12 +71,12 @@ typedef __fd_set fd_set; (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out after waiting the interval specified therein. Returns the number of ready descriptors, or -1 for errors. */ -extern int __select __P ((int __nfds, __fd_set *__readfds, - __fd_set *__writefds, __fd_set *__exceptfds, - struct timeval *__timeout)); -extern int select __P ((int __nfds, __fd_set *__readfds, - __fd_set *__writefds, __fd_set *__exceptfds, - struct timeval *__timeout)); +extern int __select (int __nfds, __fd_set *__readfds, + __fd_set *__writefds, __fd_set *__exceptfds, + struct timeval *__timeout) __THROW; +extern int select (int __nfds, __fd_set *__readfds, + __fd_set *__writefds, __fd_set *__exceptfds, + struct timeval *__timeout) __THROW; #ifdef __USE_GNU /* XXX Once/if POSIX.1g gets official this prototype will be available @@ -84,10 +84,9 @@ extern int select __P ((int __nfds, __fd_set *__readfds, /* Same as above only that the TIMEOUT value is given with higher resolution and a sigmask which is been set temporarily. This version should be used. */ -extern int pselect __P ((int __nfds, __fd_set *__readfds, - __fd_set *__writefds, __fd_set *__exceptfds, - const struct timespec *__timeout, - const __sigset_t *__sigmask)); +extern int pselect (int __nfds, __fd_set *__readfds, __fd_set *__writefds, + __fd_set *__exceptfds, const struct timespec *__timeout, + const __sigset_t *__sigmask) __THROW; #endif __END_DECLS diff --git a/misc/sys/syslog.h b/misc/sys/syslog.h index 143f946..a2b7209 100644 --- a/misc/sys/syslog.h +++ b/misc/sys/syslog.h @@ -169,22 +169,22 @@ CODE facilitynames[] = __BEGIN_DECLS /* Close desriptor used to write to system logger. */ -extern void closelog __P ((void)); +extern void closelog (void) __THROW; /* Open connection to system logger. */ -extern void openlog __P ((__const char *__ident, int __option, - int __facility)); +extern void openlog (__const char *__ident, int __option, int __facility) + __THROW; /* Set the log mask level. */ -extern int setlogmask __P ((int __mask)); +extern int setlogmask (int __mask) __THROW; /* Generate a log message using FMT string and option arguments. */ -extern void syslog __P ((int __pri, __const char *__fmt, ...)); +extern void syslog (int __pri, __const char *__fmt, ...) __THROW; #ifdef __USE_BSD /* Generate a log message using FMT and using arguments pointed to by AP. */ -extern void vsyslog __P ((int __pri, __const char *__fmt, - __gnuc_va_list __ap)); +extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap) + __THROW; #endif __END_DECLS diff --git a/misc/sys/uio.h b/misc/sys/uio.h index 0be33e9..f833a52 100644 --- a/misc/sys/uio.h +++ b/misc/sys/uio.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 96, 97, 98, 99 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 @@ -34,16 +34,16 @@ __BEGIN_DECLS The buffers are filled in the order specified. Operates just like `read' (see <unistd.h>) except that data are put in VECTOR instead of a contiguous buffer. */ -extern ssize_t readv __P ((int __fd, __const struct iovec *__vector, - int __count)); +extern ssize_t readv (int __fd, __const struct iovec *__vector, int __count) + __THROW; /* Write data pointed by the buffers described by VECTOR, which is a vector of COUNT `struct iovec's, to file descriptor FD. The data is written in the order specified. Operates just like `write' (see <unistd.h>) except that the data are taken from VECTOR instead of a contiguous buffer. */ -extern ssize_t writev __P ((int __fd, __const struct iovec *__vector, - int __count)); +extern ssize_t writev (int __fd, __const struct iovec *__vector, int __count) + __THROW; __END_DECLS diff --git a/misc/sys/ustat.h b/misc/sys/ustat.h index 355f28d..58862ff 100644 --- a/misc/sys/ustat.h +++ b/misc/sys/ustat.h @@ -1,5 +1,5 @@ /* Header describing obsolete `ustat' interface. - Copyright (C) 1996, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 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 @@ -31,7 +31,7 @@ __BEGIN_DECLS -extern int ustat __P ((__dev_t __dev, struct ustat *__ubuf)); +extern int ustat (__dev_t __dev, struct ustat *__ubuf) __THROW; __END_DECLS diff --git a/misc/ttyent.h b/misc/ttyent.h index 9958d88..0b221bc 100644 --- a/misc/ttyent.h +++ b/misc/ttyent.h @@ -55,10 +55,10 @@ struct ttyent { __BEGIN_DECLS -extern struct ttyent *getttyent __P ((void)); -extern struct ttyent *getttynam __P ((__const char *__tty)); -extern int setttyent __P ((void)); -extern int endttyent __P ((void)); +extern struct ttyent *getttyent (void) __THROW; +extern struct ttyent *getttynam (__const char *__tty) __THROW; +extern int setttyent (void) __THROW; +extern int endttyent (void) __THROW; __END_DECLS @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 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 @@ -44,8 +44,8 @@ enum nss_status work around non-existing services (e.e., while booting). Attention: Using this function repeatedly will slowly eat up the whole memory since previous selection data cannot be freed. */ -extern int __nss_configure_lookup __P ((__const char *__dbname, - __const char *__string)); +extern int __nss_configure_lookup (__const char *__dbname, + __const char *__string) __THROW; __END_DECLS diff --git a/posix/sched.h b/posix/sched.h index e9c99c2..01db91c 100644 --- a/posix/sched.h +++ b/posix/sched.h @@ -34,30 +34,30 @@ __BEGIN_DECLS /* Set scheduling parameters for a process. */ -extern int sched_setparam __P ((__pid_t __pid, - __const struct sched_param *__param)); +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + __THROW; /* Retrieve scheduling parameters for a particular process. */ -extern int sched_getparam __P ((__pid_t __pid, struct sched_param *__param)); +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW; /* Set scheduling algorithm and/or parameters for a process. */ -extern int sched_setscheduler __P ((__pid_t __pid, int __policy, - __const struct sched_param *__param)); +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) __THROW; /* Retrieve scheduling algorithm for a particular purpose. */ -extern int sched_getscheduler __P ((__pid_t __pid)); +extern int sched_getscheduler (__pid_t __pid) __THROW; /* Yield the processor. */ -extern int sched_yield __P ((void)); +extern int sched_yield (void) __THROW; /* Get maximum priority value for a scheduler. */ -extern int sched_get_priority_max __P ((int __algorithm)); +extern int sched_get_priority_max (int __algorithm) __THROW; /* Get minimum priority value for a scheduler. */ -extern int sched_get_priority_min __P ((int __algorithm)); +extern int sched_get_priority_min (int __algorithm) __THROW; /* Get the SCHED_RR interval for the named process. */ -extern int sched_rr_get_interval __P ((__pid_t __pid, struct timespec *__t)); +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW; __END_DECLS diff --git a/posix/sys/times.h b/posix/sys/times.h index f524438..d483cbe 100644 --- a/posix/sys/times.h +++ b/posix/sys/times.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 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 @@ -46,7 +46,7 @@ struct tms dead children (and their dead children) in BUFFER. Return the elapsed real time, or (clock_t) -1 for errors. All times are in CLK_TCKths of a second. */ -extern clock_t times __P ((struct tms *__buffer)); +extern clock_t times (struct tms *__buffer) __THROW; __END_DECLS diff --git a/posix/sys/utsname.h b/posix/sys/utsname.h index 629dd59..59940b8 100644 --- a/posix/sys/utsname.h +++ b/posix/sys/utsname.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 96, 97, 99 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 @@ -66,7 +66,7 @@ struct utsname /* Put information about the system in NAME. */ -extern int uname __P ((struct utsname *__name)); +extern int uname (struct utsname *__name) __THROW; __END_DECLS diff --git a/posix/sys/wait.h b/posix/sys/wait.h index aba0493..5a3404d 100644 --- a/posix/sys/wait.h +++ b/posix/sys/wait.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,96,97,98,99 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 @@ -57,8 +57,8 @@ typedef __pid_t pid_t; the actual function definitions. */ # if !defined __GNUC__ || __GNUC__ < 2 || defined __cplusplus -# define __WAIT_STATUS __ptr_t -# define __WAIT_STATUS_DEFN __ptr_t +# define __WAIT_STATUS void * +# define __WAIT_STATUS_DEFN void * # else /* This works in GCC 2.6.1 and later. */ typedef union @@ -107,8 +107,8 @@ typedef enum /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ -extern __pid_t __wait __P ((__WAIT_STATUS __stat_loc)); -extern __pid_t wait __P ((__WAIT_STATUS __stat_loc)); +extern __pid_t __wait (__WAIT_STATUS __stat_loc) __THROW; +extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW; #ifdef __USE_BSD /* Special values for the PID argument to `waitpid' and `wait4'. */ @@ -128,8 +128,7 @@ extern __pid_t wait __P ((__WAIT_STATUS __stat_loc)); return PID and store the dead child's status in STAT_LOC. Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. */ -extern __pid_t waitpid __P ((__pid_t __pid, int *__stat_loc, - int __options)); +extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options) __THROW; #if defined __USE_SVID || defined __USE_XOPEN # define __need_siginfo_t @@ -142,8 +141,8 @@ extern __pid_t waitpid __P ((__pid_t __pid, int *__stat_loc, If the WNOHANG bit is set in OPTIONS, and that child is not already dead, clear *INFOP and return 0. If successful, store exit code and status in *INFOP. */ -extern int waitid __P ((idtype_t __idtype, __id_t __id, siginfo_t *__infop, - int __options)); +extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, + int __options) __THROW; #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED @@ -156,8 +155,8 @@ struct rusage; nil, store information about the child's resource usage there. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. */ -extern __pid_t wait3 __P ((__WAIT_STATUS __stat_loc, - int __options, struct rusage * __usage)); +extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options, + struct rusage * __usage) __THROW; #endif #ifdef __USE_BSD @@ -166,8 +165,8 @@ extern __pid_t wait3 __P ((__WAIT_STATUS __stat_loc, struct rusage; /* PID is like waitpid. Other args are like wait3. */ -extern __pid_t wait4 __P ((__pid_t __pid, __WAIT_STATUS __stat_loc, - int __options, struct rusage *__usage)); +extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, + struct rusage *__usage) __THROW; #endif /* Use BSD. */ diff --git a/posix/unistd.h b/posix/unistd.h index 3437030..d563ef9 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -250,12 +250,12 @@ typedef __intptr_t intptr_t; #define F_OK 0 /* Test for existence. */ /* Test for access to NAME using the real UID and real GID. */ -extern int access __P ((__const char *__name, int __type)); +extern int access (__const char *__name, int __type) __THROW; #ifdef __USE_GNU /* Test for access to NAME using the effective UID and GID (as normal file operations use). */ -extern int euidaccess __P ((__const char *__name, int __type)); +extern int euidaccess (__const char *__name, int __type) __THROW; #endif @@ -279,59 +279,60 @@ extern int euidaccess __P ((__const char *__name, int __type)); the current position (if WHENCE is SEEK_CUR), or the end of the file (if WHENCE is SEEK_END). Return the new file position. */ -extern __off_t __lseek __P ((int __fd, __off_t __offset, int __whence)); +extern __off_t __lseek (int __fd, __off_t __offset, int __whence) __THROW; #ifndef __USE_FILE_OFFSET64 -extern __off_t lseek __P ((int __fd, __off_t __offset, int __whence)); +extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW; #else # ifdef __REDIRECT extern __off64_t __REDIRECT (lseek, - __P ((int __fd, __off64_t __offset, - int __whence)), + (int __fd, __off64_t __offset, int __whence) + __THROW, lseek64); # else # define lseek lseek64 # endif #endif #ifdef __USE_LARGEFILE64 -extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW; #endif /* Close the file descriptor FD. */ -extern int __close __P ((int __fd)); -extern int close __P ((int __fd)); +extern int __close (int __fd) __THROW; +extern int close (int __fd) __THROW; /* Read NBYTES into BUF from FD. Return the number read, -1 for errors or 0 for EOF. */ -extern ssize_t __read __P ((int __fd, __ptr_t __buf, size_t __nbytes)); -extern ssize_t read __P ((int __fd, __ptr_t __buf, size_t __nbytes)); +extern ssize_t __read (int __fd, void *__buf, size_t __nbytes) __THROW; +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __THROW; /* Write N bytes of BUF to FD. Return the number written, or -1. */ -extern ssize_t __write __P ((int __fd, __const __ptr_t __buf, size_t __n)); -extern ssize_t write __P ((int __fd, __const __ptr_t __buf, size_t __n)); +extern ssize_t __write (int __fd, __const void *__buf, size_t __n) __THROW; +extern ssize_t write (int __fd, __const void *__buf, size_t __n) __THROW; #ifdef __USE_UNIX98 /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors or 0 for EOF. */ -extern ssize_t __pread64 __P ((int __fd, __ptr_t __buf, size_t __nbytes, - __off64_t __offset)); +extern ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __THROW; /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ -extern ssize_t __pwrite64 __P ((int __fd, __const __ptr_t __buf, size_t __n, - __off64_t __offset)); +extern ssize_t __pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __THROW; # ifndef __USE_FILE_OFFSET64 -extern ssize_t pread __P ((int __fd, __ptr_t __buf, size_t __nbytes, - __off_t __offset)); -extern ssize_t pwrite __P ((int __fd, __const __ptr_t __buf, size_t __n, - __off_t __offset)); +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) + __THROW; +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, + __off_t __offset) __THROW; # else # ifdef __REDIRECT -extern ssize_t __REDIRECT (pread, __P ((int __fd, __ptr_t __buf, - size_t __nbytes,__off64_t __offset)), +extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __THROW, pread64); -extern ssize_t __REDIRECT (pwrite, __P ((int __fd, __const __ptr_t __buf, - size_t __nbytes, __off64_t __offset)), +extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf, + size_t __nbytes, __off64_t __offset) + __THROW, pwrite64); # else # define pread pread64 @@ -340,10 +341,10 @@ extern ssize_t __REDIRECT (pwrite, __P ((int __fd, __const __ptr_t __buf, # endif # ifdef __USE_LARGEFILE64 -extern ssize_t pread64 __P ((int __fd, __ptr_t __buf, size_t __nbytes, - __off64_t __offset)); -extern ssize_t pwrite64 __P ((int __fd, __const __ptr_t __buf, size_t __n, - __off64_t __offset)); +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __THROW; +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __THROW; # endif #endif @@ -351,7 +352,7 @@ extern ssize_t pwrite64 __P ((int __fd, __const __ptr_t __buf, size_t __n, If successful, two file descriptors are stored in PIPEDES; bytes written on PIPEDES[1] can be read from PIPEDES[0]. Returns 0 if successful, -1 if not. */ -extern int pipe __P ((int __pipedes[2])); +extern int pipe (int __pipedes[2]) __THROW; /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. If SECONDS is zero, any currently scheduled alarm will be cancelled. @@ -360,7 +361,7 @@ extern int pipe __P ((int __pipedes[2])); There is no return value to indicate an error, but you can set `errno' to 0 and check its value after calling `alarm', and this might tell you. The signal may come late due to processor scheduling. */ -extern unsigned int alarm __P ((unsigned int __seconds)); +extern unsigned int alarm (unsigned int __seconds) __THROW; /* Make the process sleep for SECONDS seconds, or until a signal arrives and is not ignored. The function returns the number of seconds less @@ -369,49 +370,49 @@ extern unsigned int alarm __P ((unsigned int __seconds)); SIGALRM signal while inside `sleep' call, the handling of the SIGALRM signal afterwards is undefined. There is no return value to indicate error, but if `sleep' returns SECONDS, it probably didn't work. */ -extern unsigned int sleep __P ((unsigned int __seconds)); +extern unsigned int sleep (unsigned int __seconds) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go off every INTERVAL microseconds thereafter. Returns the number of microseconds remaining before the alarm. */ -extern __useconds_t ualarm __P ((__useconds_t __value, - __useconds_t __interval)); +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + __THROW; /* Sleep USECONDS microseconds, or until a signal arrives that is not blocked or ignored. */ -extern void usleep __P ((__useconds_t __useconds)); +extern void usleep (__useconds_t __useconds) __THROW; #endif /* Suspend the process until a signal arrives. This always returns -1 and sets `errno' to EINTR. */ -extern int pause __P ((void)); +extern int pause (void) __THROW; /* Change the owner and group of FILE. */ -extern int chown __P ((__const char *__file, __uid_t __owner, - __gid_t __group)); +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Change the owner and group of the file that FD is open on. */ -extern int fchown __P ((int __fd, __uid_t __owner, __gid_t __group)); +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW; /* Change owner and group of FILE, if it is a symbolic link the ownership of the symbolic link is changed. */ -extern int lchown __P ((__const char *__file, __uid_t __owner, - __gid_t __group)); +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + __THROW; #endif /* Use BSD || X/Open Unix. */ /* Change the process's working directory to PATH. */ -extern int chdir __P ((__const char *__path)); +extern int chdir (__const char *__path) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Change the process's working directory to the one FD is open on. */ -extern int fchdir __P ((int __fd)); +extern int fchdir (int __fd) __THROW; #endif /* Get the pathname of the current working directory, @@ -421,28 +422,28 @@ extern int fchdir __P ((int __fd)); an array is allocated with `malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ -extern char *getcwd __P ((char *__buf, size_t __size)); +extern char *getcwd (char *__buf, size_t __size) __THROW; #ifdef __USE_GNU /* Return a malloc'd string containing the current directory name. If the environment variable `PWD' is set, and its value is correct, that value is used. */ -extern char *get_current_dir_name __P ((void)); +extern char *get_current_dir_name (void) __THROW; #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Put the absolute pathname of the current working directory in BUF. If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ -extern char *getwd __P ((char *__buf)); +extern char *getwd (char *__buf) __THROW; #endif /* Duplicate FD, returning a new file descriptor on the same file. */ -extern int dup __P ((int __fd)); +extern int dup (int __fd) __THROW; /* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ -extern int dup2 __P ((int __fd, int __fd2)); +extern int dup2 (int __fd, int __fd2) __THROW; /* NULL-terminated array of "NAME=VALUE" environment variables. */ extern char **__environ; @@ -453,47 +454,46 @@ extern char **environ; /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ -extern int execve __P ((__const char *__path, char *__const __argv[], - char *__const __envp[])); +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) __THROW; #ifdef __USE_GNU /* Execute the file FD refers to, overlaying the running program image. ARGV and ENVP are passed to the new program, as for `execve'. */ -extern int fexecve __P ((int __fd, - char *__const __argv[], char *__const __envp[])); - +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + __THROW; #endif /* Execute PATH with arguments ARGV and environment from `environ'. */ -extern int execv __P ((__const char *__path, char *__const __argv[])); +extern int execv (__const char *__path, char *__const __argv[]) __THROW; /* Execute PATH with all arguments after PATH until a NULL pointer, and the argument after that for environment. */ -extern int execle __P ((__const char *__path, __const char *__arg, ...)); +extern int execle (__const char *__path, __const char *__arg, ...) __THROW; /* Execute PATH with all arguments after PATH until a NULL pointer and environment from `environ'. */ -extern int execl __P ((__const char *__path, __const char *__arg, ...)); +extern int execl (__const char *__path, __const char *__arg, ...) __THROW; /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ -extern int execvp __P ((__const char *__file, char *__const __argv[])); +extern int execvp (__const char *__file, char *__const __argv[]) __THROW; /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with all arguments after FILE until a NULL pointer and environment from `environ'. */ -extern int execlp __P ((__const char *__file, __const char *__arg, ...)); +extern int execlp (__const char *__file, __const char *__arg, ...) __THROW; #if defined __USE_MISC || defined __USE_XOPEN /* Add INC to priority of the current process. */ -extern int nice __P ((int __inc)); +extern int nice (int __inc) __THROW; #endif /* Terminate program execution with the low-order 8 bits of STATUS. */ -extern void _exit __PMT ((int __status)) __attribute__ ((__noreturn__)); +extern void _exit (int __status) __attribute__ ((__noreturn__)); /* Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; @@ -502,51 +502,51 @@ extern void _exit __PMT ((int __status)) __attribute__ ((__noreturn__)); #include <bits/confname.h> /* Get file-specific configuration information about PATH. */ -extern long int pathconf __P ((__const char *__path, int __name)); +extern long int pathconf (__const char *__path, int __name) __THROW; /* Get file-specific configuration about descriptor FD. */ -extern long int fpathconf __P ((int __fd, int __name)); +extern long int fpathconf (int __fd, int __name) __THROW; /* Get the value of the system variable NAME. */ -extern long int sysconf __P ((int __name)); +extern long int sysconf (int __name) __THROW; #ifdef __USE_POSIX2 /* Get the value of the string-valued system variable NAME. */ -extern size_t confstr __P ((int __name, char *__buf, size_t __len)); +extern size_t confstr (int __name, char *__buf, size_t __len) __THROW; #endif /* Get the process ID of the calling process. */ -extern __pid_t __getpid __P ((void)); -extern __pid_t getpid __P ((void)); +extern __pid_t __getpid (void) __THROW; +extern __pid_t getpid (void) __THROW; /* Get the process ID of the calling process's parent. */ -extern __pid_t getppid __P ((void)); +extern __pid_t getppid (void) __THROW; /* Get the process group ID of the calling process. This function is different on old BSD. */ #ifndef __FAVOR_BSD -extern __pid_t getpgrp __P ((void)); +extern __pid_t getpgrp (void) __THROW; #else # ifdef __REDIRECT -extern __pid_t __REDIRECT (getpgrp, __P ((__pid_t __pid)), __getpgid); +extern __pid_t __REDIRECT (getpgrp, (__pid_t __pid) __THROW, __getpgid); # else # define getpgrp __getpgid # endif #endif /* Get the process group ID of process PID. */ -extern __pid_t __getpgid __P ((__pid_t __pid)); +extern __pid_t __getpgid (__pid_t __pid) __THROW; #ifdef __USE_XOPEN_EXTENDED -extern __pid_t getpgid __P ((__pid_t __pid)); +extern __pid_t getpgid (__pid_t __pid) __THROW; #endif /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ -extern int __setpgid __P ((__pid_t __pid, __pid_t __pgid)); -extern int setpgid __P ((__pid_t __pid, __pid_t __pgid)); +extern int __setpgid (__pid_t __pid, __pid_t __pgid) __THROW; +extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW; #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Both System V and BSD have `setpgrp' functions, but with different @@ -563,13 +563,13 @@ extern int setpgid __P ((__pid_t __pid, __pid_t __pgid)); /* Set the process group ID of the calling process to its own PID. This is exactly the same as `setpgid (0, 0)'. */ -extern int setpgrp __P ((void)); +extern int setpgrp (void) __THROW; # else /* Another name for `setpgid' (above). */ # ifdef __REDIRECT -extern int __REDIRECT (setpgrp, __P ((__pid_t __pid, __pid_t __pgrp)), +extern int __REDIRECT (setpgrp, (__pid_t __pid, __pid_t __pgrp) __THROW, setpgid); # else # define setpgrp setpgid @@ -581,143 +581,143 @@ extern int __REDIRECT (setpgrp, __P ((__pid_t __pid, __pid_t __pgrp)), /* Create a new session with the calling process as its leader. The process group IDs of the session and the calling process are set to the process ID of the calling process, which is returned. */ -extern __pid_t setsid __P ((void)); +extern __pid_t setsid (void) __THROW; #ifdef __USE_XOPEN_EXTENDED /* Return the session ID of the given process. */ -extern __pid_t getsid __P ((__pid_t __pid)); +extern __pid_t getsid (__pid_t __pid) __THROW; #endif /* Get the real user ID of the calling process. */ -extern __uid_t getuid __P ((void)); +extern __uid_t getuid (void) __THROW; /* Get the effective user ID of the calling process. */ -extern __uid_t geteuid __P ((void)); +extern __uid_t geteuid (void) __THROW; /* Get the real group ID of the calling process. */ -extern __gid_t getgid __P ((void)); +extern __gid_t getgid (void) __THROW; /* Get the effective group ID of the calling process. */ -extern __gid_t getegid __P ((void)); +extern __gid_t getegid (void) __THROW; /* If SIZE is zero, return the number of supplementary groups the calling process is in. Otherwise, fill in the group IDs of its supplementary groups in LIST and return the number written. */ -extern int getgroups __P ((int __size, __gid_t __list[])); +extern int getgroups (int __size, __gid_t __list[]) __THROW; #ifdef __USE_GNU /* Return nonzero iff the calling process is in group GID. */ -extern int group_member __P ((__gid_t __gid)); +extern int group_member (__gid_t __gid) __THROW; #endif /* Set the user ID of the calling process to UID. If the calling process is the super-user, set the real and effective user IDs, and the saved set-user-ID to UID; if not, the effective user ID is set to UID. */ -extern int setuid __P ((__uid_t __uid)); +extern int setuid (__uid_t __uid) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Set the real user ID of the calling process to RUID, and the effective user ID of the calling process to EUID. */ -extern int setreuid __P ((__uid_t __ruid, __uid_t __euid)); +extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW; #endif #ifdef __USE_BSD /* Set the effective user ID of the calling process to UID. */ -extern int seteuid __P ((__uid_t __uid)); +extern int seteuid (__uid_t __uid) __THROW; #endif /* Use BSD. */ /* Set the group ID of the calling process to GID. If the calling process is the super-user, set the real and effective group IDs, and the saved set-group-ID to GID; if not, the effective group ID is set to GID. */ -extern int setgid __P ((__gid_t __gid)); +extern int setgid (__gid_t __gid) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Set the real group ID of the calling process to RGID, and the effective group ID of the calling process to EGID. */ -extern int setregid __P ((__gid_t __rgid, __gid_t __egid)); +extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW; #endif #ifdef __USE_BSD /* Set the effective group ID of the calling process to GID. */ -extern int setegid __P ((__gid_t __gid)); +extern int setegid (__gid_t __gid) __THROW; #endif /* Use BSD. */ /* Clone the calling process, creating an exact copy. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ -extern __pid_t __fork __P ((void)); -extern __pid_t fork __P ((void)); +extern __pid_t __fork (void) __THROW; +extern __pid_t fork (void) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ -extern __pid_t vfork __P ((void)); +extern __pid_t vfork (void) __THROW; #endif /* Use BSD. */ /* Return the pathname of the terminal FD is open on, or NULL on errors. The returned storage is good only until the next call to this function. */ -extern char *ttyname __P ((int __fd)); +extern char *ttyname (int __fd) __THROW; /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ -extern int ttyname_r __P ((int __fd, char *__buf, size_t __buflen)); +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW; /* Return 1 if FD is a valid descriptor associated with a terminal, zero if not. */ -extern int isatty __P ((int __fd)); +extern int isatty (int __fd) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Return the index into the active-logins file (utmp) for the controlling terminal. */ -extern int ttyslot __P ((void)); +extern int ttyslot (void) __THROW; #endif /* Make a link to FROM named TO. */ -extern int link __P ((__const char *__from, __const char *__to)); +extern int link (__const char *__from, __const char *__to) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Make a symbolic link to FROM named TO. */ -extern int symlink __P ((__const char *__from, __const char *__to)); +extern int symlink (__const char *__from, __const char *__to) __THROW; /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ -extern int readlink __P ((__const char *__path, char *__buf, size_t __len)); +extern int readlink (__const char *__path, char *__buf, size_t __len) __THROW; #endif /* Use BSD. */ /* Remove the link NAME. */ -extern int unlink __P ((__const char *__name)); +extern int unlink (__const char *__name) __THROW; /* Remove the directory PATH. */ -extern int rmdir __P ((__const char *__path)); +extern int rmdir (__const char *__path) __THROW; /* Return the foreground process group ID of FD. */ -extern __pid_t tcgetpgrp __P ((int __fd)); +extern __pid_t tcgetpgrp (int __fd) __THROW; /* Set the foreground process group ID of FD set PGRP_ID. */ -extern int tcsetpgrp __P ((int __fd, __pid_t __pgrp_id)); +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW; /* Return the login name of the user. */ -extern char *getlogin __P ((void)); +extern char *getlogin (void) __THROW; #ifdef __USE_REENTRANT /* Return at most NAME_LEN characters of the login name of the user in NAME. If it cannot be determined or some other error occurred, return the error code. Otherwise return 0. */ -extern int getlogin_r __P ((char *__name, size_t __name_len)); +extern int getlogin_r (char *__name, size_t __name_len) __THROW; #endif #ifdef __USE_BSD /* Set the login name returned by `getlogin'. */ -extern int setlogin __P ((__const char *__name)); +extern int setlogin (__const char *__name) __THROW; #endif @@ -735,35 +735,35 @@ extern int setlogin __P ((__const char *__name)); /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ -extern int gethostname __P ((char *__name, size_t __len)); +extern int gethostname (char *__name, size_t __len) __THROW; /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ -extern int sethostname __P ((__const char *__name, size_t __len)); +extern int sethostname (__const char *__name, size_t __len) __THROW; /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ -extern int sethostid __P ((long int __id)); +extern int sethostid (long int __id) __THROW; /* Get and set the NIS (aka YP) domain name, if any. Called just like `gethostname' and `sethostname'. The NIS domain name is usually the empty string when not using NIS. */ -extern int getdomainname __P ((char *__name, size_t __len)); -extern int setdomainname __P ((__const char *__name, size_t __len)); +extern int getdomainname (char *__name, size_t __len) __THROW; +extern int setdomainname (__const char *__name, size_t __len) __THROW; /* Make all changes done to FD actually appear on disk. */ -extern int fsync __P ((int __fd)); +extern int fsync (int __fd) __THROW; /* Revoke access permissions to all processes currently communicating with the control terminal, and then send a SIGHUP signal to the process group of the control terminal. */ -extern int vhangup __P ((void)); +extern int vhangup (void) __THROW; /* Revoke the access of all descriptors currently open on FILE. */ -extern int revoke __P ((__const char *__file)); +extern int revoke (__const char *__file) __THROW; /* Enable statistical profiling, writing samples of the PC into at most @@ -771,34 +771,34 @@ extern int revoke __P ((__const char *__file)); is enabled, the system examines the user PC and increments SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536]. If SCALE is zero, disable profiling. Returns zero on success, -1 on error. */ -extern int profil __P ((unsigned short int *__sample_buffer, size_t __size, - size_t __offset, unsigned int __scale)); +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) __THROW; /* Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, turn accounting off. This call is restricted to the super-user. */ -extern int acct __P ((__const char *__name)); +extern int acct (__const char *__name) __THROW; /* Make PATH be the root directory (the starting point for absolute paths). This call is restricted to the super-user. */ -extern int chroot __P ((__const char *__path)); +extern int chroot (__const char *__path) __THROW; /* Successive calls return the shells listed in `/etc/shells'. */ -extern char *getusershell __P ((void)); -extern void endusershell __P ((void)); /* Discard cached info. */ -extern void setusershell __P ((void)); /* Rewind and re-read the file. */ +extern char *getusershell (void) __THROW; +extern void endusershell (void) __THROW; /* Discard cached info. */ +extern void setusershell (void) __THROW; /* Rewind and re-read the file. */ /* Prompt with PROMPT and read a string from the terminal without echoing. Uses /dev/tty if possible; otherwise stderr and stdin. */ -extern char *getpass __P ((__const char *__prompt)); +extern char *getpass (__const char *__prompt) __THROW; /* Put the program in the background, and dissociate from the controlling terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero, redirects stdin, stdout, and stderr to /dev/null. */ -extern int daemon __P ((int __nochdir, int __noclose)); +extern int daemon (int __nochdir, int __noclose) __THROW; #endif /* Use BSD || X/Open. */ @@ -806,54 +806,54 @@ extern int daemon __P ((int __nochdir, int __noclose)); #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Return the current machine's Internet number. */ -extern long int gethostid __P ((void)); +extern long int gethostid (void) __THROW; /* Make all changes done to all files actually appear on disk. */ -extern int sync __P ((void)); +extern int sync (void) __THROW; /* Return the number of bytes in a page. This is the system's page size, which is not necessarily the same as the hardware page size. */ -extern int __getpagesize __P ((void)); -extern int getpagesize __P ((void)); +extern int __getpagesize (void) __THROW; +extern int getpagesize (void) __THROW; /* Truncate FILE to LENGTH bytes. */ #ifndef __USE_FILE_OFFSET64 -extern int truncate __P ((__const char *__file, __off_t __length)); +extern int truncate (__const char *__file, __off_t __length) __THROW; #else # ifdef __REDIRECT extern int __REDIRECT (truncate, - __P ((__const char *__file, __off64_t __length)), + (__const char *__file, __off64_t __length) __THROW, truncate64); # else # define truncate truncate64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int truncate64 __P ((__const char *__file, __off64_t __length)); +extern int truncate64 (__const char *__file, __off64_t __length) __THROW; #endif /* Truncate the file FD is open on to LENGTH bytes. */ -extern int __ftruncate __P ((int __fd, __off_t __length)); +extern int __ftruncate (int __fd, __off_t __length) __THROW; #ifndef __USE_FILE_OFFSET64 -extern int ftruncate __P ((int __fd, __off_t __length)); +extern int ftruncate (int __fd, __off_t __length) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (ftruncate, __P ((int __fd, __off64_t __length)), +extern int __REDIRECT (ftruncate, (int __fd, __off64_t __length) __THROW, ftruncate64); # else # define ftruncate ftruncate64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int ftruncate64 __P ((int __fd, __off64_t __length)); +extern int ftruncate64 (int __fd, __off64_t __length) __THROW; #endif /* Return the maximum number of file descriptors the current process could possibly have. */ -extern int getdtablesize __P ((void)); +extern int getdtablesize (void) __THROW; #endif /* Use BSD || X/Open Unix. */ @@ -862,7 +862,7 @@ extern int getdtablesize __P ((void)); /* Set the end of accessible data space (aka "the break") to ADDR. Returns zero on success and -1 for errors (with errno set). */ -extern int brk __P ((__ptr_t __addr)); +extern int brk (void *__addr) __THROW; # define __need_ptrdiff_t # include <stddef.h> @@ -871,8 +871,8 @@ extern int brk __P ((__ptr_t __addr)); If successful, returns the address the previous end of data space (i.e. the beginning of the new space, if DELTA > 0); returns (void *) -1 for errors (with errno set). */ -extern __ptr_t __sbrk __P ((ptrdiff_t __delta)); -extern __ptr_t sbrk __P ((ptrdiff_t __delta)); +extern void *__sbrk (ptrdiff_t __delta) __THROW; +extern void *sbrk (ptrdiff_t __delta) __THROW; #endif @@ -887,7 +887,7 @@ extern __ptr_t sbrk __P ((ptrdiff_t __delta)); In Mach, all system calls take normal arguments and always return an error code (zero for success). */ -extern long int syscall __P ((long int __sysno, ...)); +extern long int syscall (long int __sysno, ...) __THROW; #endif /* Use misc. */ @@ -907,17 +907,17 @@ extern long int syscall __P ((long int __sysno, ...)); # define F_TEST 3 /* Test a region for other processes locks. */ # ifndef __USE_FILE_OFFSET64 -extern int lockf __P ((int __fd, int __cmd, __off_t __len)); +extern int lockf (int __fd, int __cmd, __off_t __len) __THROW; # else # ifdef __REDIRECT -extern int __REDIRECT (lockf, __P ((int __fd, int __cmd, __off64_t __len)), +extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW, lockf64); # else # define lockf lockf64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int lockf64 __P ((int __fd, int __cmd, __off64_t __len)); +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW; # endif #endif /* Use misc and F_LOCK not already defined. */ @@ -938,7 +938,7 @@ extern int lockf64 __P ((int __fd, int __cmd, __off64_t __len)); #if defined __USE_POSIX199309 || defined __USE_UNIX98 /* Synchronize at least the data part of a file with the underlying media. */ -extern int fdatasync __P ((int __fildes)); +extern int fdatasync (int __fildes) __THROW; #endif /* Use POSIX199309 */ @@ -946,21 +946,21 @@ extern int fdatasync __P ((int __fildes)); be defined here. */ #ifdef __USE_XOPEN /* Encrypt at most 8 characters from KEY using salt to perturb DES. */ -extern char *crypt __P ((__const char *__key, __const char *__salt)); +extern char *crypt (__const char *__key, __const char *__salt) __THROW; /* Setup DES tables according KEY. */ -extern void setkey __P ((__const char *__key)); +extern void setkey (__const char *__key) __THROW; /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt block in place. */ -extern void encrypt __P ((char *__block, int __edflag)); +extern void encrypt (char *__block, int __edflag) __THROW; /* Swab pairs bytes in the first N bytes of the area pointed to by FROM and copy the result to TO. The value of TO must not be in the range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ -extern void swab __P ((__const __ptr_t __from, __ptr_t __to, ssize_t __n)); +extern void swab (__const void *__from, void *__to, ssize_t __n) __THROW; #endif @@ -968,14 +968,14 @@ extern void swab __P ((__const __ptr_t __from, __ptr_t __to, ssize_t __n)); to be here. They are also found in <stdio.h>. */ #ifdef __USE_XOPEN /* Return the name of the controlling terminal. */ -extern char *ctermid __P ((char *__s)); +extern char *ctermid (char *__s) __THROW; /* Return the name of the current user. This function should not be used and might go away some time. */ -extern char *cuserid __P ((char *__s)); +extern char *cuserid (char *__s) __THROW; /* Rename file OLD to NEW. */ -extern int rename __P ((__const char *__old, __const char *__new)); +extern int rename (__const char *__old, __const char *__new) __THROW; #endif @@ -992,9 +992,9 @@ extern int rename __P ((__const char *__old, __const char *__new)); handlers are called in LIFO order (last added with PTHREAD_ATFORK, first called before FORK), and the PARENT and CHILD handlers are called in FIFO (first added, first called). */ -extern int pthread_atfork __P ((void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void))); +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __THROW; #endif __END_DECLS diff --git a/posix/wordexp.h b/posix/wordexp.h index 32c2a3f..14840f6 100644 --- a/posix/wordexp.h +++ b/posix/wordexp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 96, 97, 98, 99 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 @@ -58,11 +58,11 @@ enum }; /* Do word expansion of WORDS into PWORDEXP. */ -extern int wordexp __P ((__const char *__restrict __words, - wordexp_t *__restrict __pwordexp, int __flags)); +extern int wordexp (__const char *__restrict __words, + wordexp_t *__restrict __pwordexp, int __flags) __THROW; /* Free the storage allocated by a `wordexp' call. */ -extern void wordfree __P ((wordexp_t *__wordexp)); +extern void wordfree (wordexp_t *__wordexp) __THROW; __END_DECLS @@ -67,29 +67,29 @@ struct passwd #if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN_EXTENDED /* Rewind the password-file stream. */ -extern void setpwent __P ((void)); +extern void setpwent (void) __THROW; /* Close the password-file stream. */ -extern void endpwent __P ((void)); +extern void endpwent (void) __THROW; /* Read an entry from the password-file stream, opening it if necessary. */ -extern struct passwd *getpwent __P ((void)); +extern struct passwd *getpwent (void) __THROW; #endif #ifdef __USE_SVID /* Read an entry from STREAM. */ -extern struct passwd *fgetpwent __P ((FILE *__stream)); +extern struct passwd *fgetpwent (FILE *__stream) __THROW; /* Write the given entry onto the given stream. */ -extern int putpwent __P ((__const struct passwd *__restrict __p, - FILE *__restrict __f)); +extern int putpwent (__const struct passwd *__restrict __p, + FILE *__restrict __f) __THROW; #endif /* Search for an entry with a matching user ID. */ -extern struct passwd *getpwuid __P ((__uid_t __uid)); +extern struct passwd *getpwuid (__uid_t __uid) __THROW; /* Search for an entry with a matching username. */ -extern struct passwd *getpwnam __P ((__const char *__name)); +extern struct passwd *getpwnam (__const char *__name) __THROW; #if defined __USE_POSIX || defined __USE_MISC @@ -108,29 +108,29 @@ extern struct passwd *getpwnam __P ((__const char *__name)); POSIX people would choose. */ # if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN_EXTENDED -extern int getpwent_r __P ((struct passwd *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct passwd **__restrict __result)); +extern int getpwent_r (struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result) __THROW; # endif -extern int getpwuid_r __P ((__uid_t __uid, - struct passwd *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct passwd **__restrict __result)); +extern int getpwuid_r (__uid_t __uid, + struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result) __THROW; -extern int getpwnam_r __P ((__const char *__restrict __name, - struct passwd *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct passwd **__restrict __result)); +extern int getpwnam_r (__const char *__restrict __name, + struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result) __THROW; # ifdef __USE_SVID /* Read an entry from STREAM. This function is not standardized and probably never will. */ -extern int fgetpwent_r __P ((FILE *__restrict __stream, - struct passwd *__restrict __resultbuf, - char *__restrict __buffer, size_t __buflen, - struct passwd **__restrict __result)); +extern int fgetpwent_r (FILE *__restrict __stream, + struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result) __THROW; # endif #endif /* POSIX or reentrant */ @@ -139,7 +139,7 @@ extern int fgetpwent_r __P ((FILE *__restrict __stream, /* Re-construct the password-file line for the given uid in the given buffer. This knows the format that the caller will expect, but this need not be the format of the password file. */ -extern int getpw __P ((__uid_t __uid, char *__buffer)); +extern int getpw (__uid_t __uid, char *__buffer) __THROW; #endif __END_DECLS diff --git a/resolv/netdb.h b/resolv/netdb.h index 0dd5917..45a80dc 100644 --- a/resolv/netdb.h +++ b/resolv/netdb.h @@ -47,7 +47,7 @@ __BEGIN_DECLS extern int h_errno; /* Function to get address of global `h_errno' variable. */ -extern int *__h_errno_location __P ((void)) __attribute__ ((__const__)); +extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); #ifdef _LIBC # ifdef _LIBC_REENTRANT @@ -82,10 +82,10 @@ __set_h_errno (int __err) /* Print error indicated by `h_errno' variable on standard error. STR if non-null is printed before the error string. */ -extern void herror __P ((__const char *__str)); +extern void herror (__const char *__str) __THROW; /* Return string associated with error ERR_NUM. */ -extern __const char *hstrerror __P ((int __err_num)); +extern __const char *hstrerror (int __err_num) __THROW; @@ -102,39 +102,38 @@ struct hostent /* Open host data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. */ -extern void sethostent __P ((int __stay_open)); +extern void sethostent (int __stay_open) __THROW; /* Close host data base files and clear `stay open' flag. */ -extern void endhostent __P ((void)); +extern void endhostent (void) __THROW; /* Get next entry from host data base file. Open data base if necessary. */ -extern struct hostent *gethostent __P ((void)); +extern struct hostent *gethostent (void) __THROW; /* Return entry from host data base which address match ADDR with length LEN and type TYPE. */ -extern struct hostent *gethostbyaddr __P ((__const char *__addr, size_t __len, - int __type)); +extern struct hostent *gethostbyaddr (__const char *__addr, size_t __len, + int __type) __THROW; /* Return entry from host data base for host with NAME. */ -extern struct hostent *gethostbyname __P ((__const char *__name)); +extern struct hostent *gethostbyname (__const char *__name) __THROW; /* Return entry from host data base for host with NAME. AF must be set to the address type which is `AF_INET' for IPv4 or `AF_INET6' for IPv6. */ -extern struct hostent *gethostbyname2 __P ((__const char *__name, int __af)); +extern struct hostent *gethostbyname2 (__const char *__name, int __af) __THROW; #ifdef __USE_UNIX98 /* Return entry from host data base which address match ADDR with length LEN and type TYPE in newly allocated buffer. */ -extern struct hostent *getipnodebyaddr __P ((__const char *__addr, - size_t __len, int __type, - int *__error_num)); +extern struct hostent *getipnodebyaddr (__const char *__addr, size_t __len, + int __type, int *__error_num) __THROW; /* Return entry from host data base for host with NAME and newly allocated buffer. FLAGS is some combination of the following AI_* values. */ -extern struct hostent *getipnodebyname __P ((__const char *__name, int __type, - int __flags, int *__error_num)); +extern struct hostent *getipnodebyname (__const char *__name, int __type, + int __flags, int *__error_num) __THROW; # define AI_V4MAPPED 1 /* IPv4-mapped addresses are acceptable. */ # define AI_ALL 2 /* Return both IPv4 and IPv6 addresses. */ @@ -144,7 +143,7 @@ extern struct hostent *getipnodebyname __P ((__const char *__name, int __type, /* Free structure returned by previous `getipnodebyaddr' or `getipnodebyname' call. */ -extern void freehostent __P ((struct hostent *__ptr)); +extern void freehostent (struct hostent *__ptr) __THROW; #endif @@ -154,29 +153,29 @@ extern void freehostent __P ((struct hostent *__ptr)); argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. */ -extern int gethostent_r __P ((struct hostent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct hostent **__restrict __result, - int *__restrict __h_errnop)); - -extern int gethostbyaddr_r __P ((__const char *__restrict __addr, size_t __len, - int __type, - struct hostent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct hostent **__restrict __result, - int *__restrict __h_errnop)); - -extern int gethostbyname_r __P ((__const char *__restrict __name, - struct hostent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct hostent **__restrict __result, - int *__restrict __h_errnop)); - -extern int gethostbyname2_r __P ((__const char *__restrict __name, int __af, - struct hostent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct hostent **__restrict __result, - int *__restrict __h_errnop)); +extern int gethostent_r (struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop) __THROW; + +extern int gethostbyaddr_r (__const char *__restrict __addr, size_t __len, + int __type, + struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop) __THROW; + +extern int gethostbyname_r (__const char *__restrict __name, + struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop) __THROW; + +extern int gethostbyname2_r (__const char *__restrict __name, int __af, + struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop) __THROW; #endif /* misc */ @@ -193,22 +192,22 @@ struct netent /* Open network data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. */ -extern void setnetent __P ((int __stay_open)); +extern void setnetent (int __stay_open) __THROW; /* Close network data base files and clear `stay open' flag. */ -extern void endnetent __P ((void)); +extern void endnetent (void) __THROW; /* Get next entry from network data base file. Open data base if necessary. */ -extern struct netent *getnetent __P ((void)); +extern struct netent *getnetent (void) __THROW; /* Return entry from network data base which address match NET and type TYPE. */ -extern struct netent *getnetbyaddr __P ((unsigned long int __net, - int __type)); +extern struct netent *getnetbyaddr (unsigned long int __net, int __type) + __THROW; /* Return entry from network data base for network with NAME. */ -extern struct netent *getnetbyname __P ((__const char *__name)); +extern struct netent *getnetbyname (__const char *__name) __THROW; #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional @@ -216,22 +215,22 @@ extern struct netent *getnetbyname __P ((__const char *__name)); argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. */ -extern int getnetent_r __P ((struct netent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct netent **__restrict __result, - int *__restrict __h_errnop)); - -extern int getnetbyaddr_r __P ((unsigned long int __net, int __type, - struct netent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct netent **__restrict __result, - int *__restrict __h_errnop)); - -extern int getnetbyname_r __P ((__const char *__restrict __name, - struct netent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct netent **__restrict __result, - int *__restrict __h_errnop)); +extern int getnetent_r (struct netent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct netent **__restrict __result, + int *__restrict __h_errnop) __THROW; + +extern int getnetbyaddr_r (unsigned long int __net, int __type, + struct netent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct netent **__restrict __result, + int *__restrict __h_errnop) __THROW; + +extern int getnetbyname_r (__const char *__restrict __name, + struct netent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct netent **__restrict __result, + int *__restrict __h_errnop) __THROW; #endif /* misc */ @@ -246,42 +245,43 @@ struct servent /* Open service data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. */ -extern void setservent __P ((int __stay_open)); +extern void setservent (int __stay_open) __THROW; /* Close service data base files and clear `stay open' flag. */ -extern void endservent __P ((void)); +extern void endservent (void) __THROW; /* Get next entry from service data base file. Open data base if necessary. */ -extern struct servent *getservent __P ((void)); +extern struct servent *getservent (void) __THROW; /* Return entry from network data base for network with NAME and protocol PROTO. */ -extern struct servent *getservbyname __P ((__const char *__name, - __const char *__proto)); +extern struct servent *getservbyname (__const char *__name, + __const char *__proto) __THROW; /* Return entry from service data base which matches port PORT and protocol PROTO. */ -extern struct servent *getservbyport __P ((int __port, __const char *__proto)); +extern struct servent *getservbyport (int __port, __const char *__proto) + __THROW; #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. */ -extern int getservent_r __P ((struct servent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct servent **__restrict __result)); - -extern int getservbyname_r __P ((__const char *__restrict __name, - __const char *__restrict __proto, - struct servent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct servent **__restrict __result)); - -extern int getservbyport_r __P ((int __port, __const char *__restrict __proto, - struct servent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct servent **__restrict __result)); +extern int getservent_r (struct servent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct servent **__restrict __result) __THROW; + +extern int getservbyname_r (__const char *__restrict __name, + __const char *__restrict __proto, + struct servent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct servent **__restrict __result) __THROW; + +extern int getservbyport_r (int __port, __const char *__restrict __proto, + struct servent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct servent **__restrict __result) __THROW; #endif /* misc */ @@ -295,63 +295,63 @@ struct protoent /* Open protocol data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. */ -extern void setprotoent __P ((int __stay_open)); +extern void setprotoent (int __stay_open) __THROW; /* Close protocol data base files and clear `stay open' flag. */ -extern void endprotoent __P ((void)); +extern void endprotoent (void) __THROW; /* Get next entry from protocol data base file. Open data base if necessary. */ -extern struct protoent *getprotoent __P ((void)); +extern struct protoent *getprotoent (void) __THROW; /* Return entry from protocol data base for network with NAME. */ -extern struct protoent *getprotobyname __P ((__const char *__name)); +extern struct protoent *getprotobyname (__const char *__name) __THROW; /* Return entry from protocol data base which number is PROTO. */ -extern struct protoent *getprotobynumber __P ((int __proto)); +extern struct protoent *getprotobynumber (int __proto) __THROW; #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. */ -extern int getprotoent_r __P ((struct protoent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct protoent **__restrict __result)); +extern int getprotoent_r (struct protoent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct protoent **__restrict __result) __THROW; -extern int getprotobyname_r __P ((__const char *__restrict __name, - struct protoent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct protoent **__restrict __result)); +extern int getprotobyname_r (__const char *__restrict __name, + struct protoent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct protoent **__restrict __result) __THROW; -extern int getprotobynumber_r __P ((int __proto, - struct protoent *__restrict __result_buf, - char *__restrict __buf, size_t __buflen, - struct protoent **__restrict __result)); +extern int getprotobynumber_r (int __proto, + struct protoent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct protoent **__restrict __result) __THROW; #endif /* misc */ /* Establish network group NETGROUP for enumeration. */ -extern int setnetgrent __P ((__const char *__netgroup)); +extern int setnetgrent (__const char *__netgroup) __THROW; /* Free all space allocated by previous `setnetgrent' call. */ -extern void endnetgrent __P ((void)); +extern void endnetgrent (void) __THROW; /* Get next member of netgroup established by last `setnetgrent' call and return pointers to elements in HOSTP, USERP, and DOMAINP. */ -extern int getnetgrent __P ((char **__restrict __hostp, - char **__restrict __userp, - char **__restrict __domainp)); +extern int getnetgrent (char **__restrict __hostp, + char **__restrict __userp, + char **__restrict __domainp) __THROW; /* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). */ -extern int innetgr __P ((__const char *__netgroup, __const char *__host, - __const char *__user, __const char *domain)); +extern int innetgr (__const char *__netgroup, __const char *__host, + __const char *__user, __const char *domain) __THROW; #ifdef __USE_MISC /* Reentrant version of `getnetgrent' where result is placed in BUFFER. */ -extern int getnetgrent_r __P ((char **__restrict __hostp, - char **__restrict __userp, - char **__restrict __domainp, - char *__restrict __buffer, size_t __buflen)); +extern int getnetgrent_r (char **__restrict __hostp, + char **__restrict __userp, + char **__restrict __domainp, + char *__restrict __buffer, size_t __buflen) __THROW; #endif /* misc */ @@ -362,32 +362,33 @@ extern int getnetgrent_r __P ((char **__restrict __hostp, connection is returned. The caller must have the right to use a reserved port. When the function returns *AHOST contains the official host name. */ -extern int rcmd __P ((char **__restrict __ahost, unsigned short int __rport, - __const char *__restrict __locuser, - __const char *__restrict __remuser, - __const char *__restrict __cmd, int *__restrict __fd2p)); +extern int rcmd (char **__restrict __ahost, unsigned short int __rport, + __const char *__restrict __locuser, + __const char *__restrict __remuser, + __const char *__restrict __cmd, int *__restrict __fd2p) + __THROW; /* Call `rexecd' at port RPORT on remote machine *AHOST to execute CMD. The process runs at the remote machine using the ID of user NAME whose cleartext password is PASSWD. In *FD2P the descriptor to the socket for the connection is returned. When the function returns *AHOST contains the official host name. */ -extern int rexec __P ((char **__restrict __ahost, int __rport, - __const char *__restrict __name, - __const char *__restrict __pass, - __const char *__restrict __cmd, - int *__restrict __fd2p)); +extern int rexec (char **__restrict __ahost, int __rport, + __const char *__restrict __name, + __const char *__restrict __pass, + __const char *__restrict __cmd, int *__restrict __fd2p) + __THROW; /* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER. If SUSER is not zero the user tries to become superuser. Return 0 if it is possible. */ -extern int ruserok __P ((__const char *__rhost, int __suser, - __const char *__remuser, __const char *__locuser)); +extern int ruserok (__const char *__rhost, int __suser, + __const char *__remuser, __const char *__locuser) __THROW; /* Try to allocate reserved port, returning a descriptor for a socket opened at this port or -1 if unsuccessful. The search for an available port will start at ALPORT and continues with lower numbers. */ -extern int rresvport __P ((int *__alport)); +extern int rresvport (int *__alport) __THROW; #endif @@ -435,23 +436,22 @@ struct addrinfo /* Translate name of a service location and/or a service name to set of socket addresses. */ -extern int getaddrinfo __P ((__const char *__restrict __name, - __const char *__restrict __service, - __const struct addrinfo *__restrict __req, - struct addrinfo **__restrict __pai)); +extern int getaddrinfo (__const char *__restrict __name, + __const char *__restrict __service, + __const struct addrinfo *__restrict __req, + struct addrinfo **__restrict __pai) __THROW; /* Free `addrinfo' structure AI including associated storage. */ -extern void freeaddrinfo __P ((struct addrinfo *__ai)); +extern void freeaddrinfo (struct addrinfo *__ai) __THROW; /* Convert error return from getaddrinfo() to a string. */ -extern char *gai_strerror __P ((int __ecode)); +extern char *gai_strerror (int __ecode) __THROW; /* Translate a socket address to a location and service name. */ -extern int getnameinfo __P ((__const struct sockaddr *__restrict __sa, - socklen_t __salen, - char *__restrict __host, size_t __hostlen, - char *__restrict __serv, size_t __servlen, - int __flags)); +extern int getnameinfo (__const struct sockaddr *__restrict __sa, + socklen_t __salen, char *__restrict __host, + size_t __hostlen, char *__restrict __serv, + size_t __servlen, int __flags) __THROW; #endif /* POSIX */ diff --git a/resolv/resolv.h b/resolv/resolv.h index fe0e5b9..58742e9 100644 --- a/resolv/resolv.h +++ b/resolv/resolv.h @@ -166,19 +166,15 @@ struct __res_state { typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } res_sendhookact; -typedef res_sendhookact (*res_send_qhook)__PMT((struct sockaddr_in * const *ns, - const u_char **query, - int *querylen, - u_char *ans, - int anssiz, - int *resplen)); +typedef res_sendhookact (*res_send_qhook) (struct sockaddr_in * const *ns, + const u_char **query, int *querylen, + u_char *ans, int anssiz, + int *resplen); -typedef res_sendhookact (*res_send_rhook)__PMT((const struct sockaddr_in *ns, - const u_char *query, - int querylen, - u_char *ans, - int anssiz, - int *resplen)); +typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *ns, + const u_char *query, int querylen, + u_char *ans, int anssiz, + int *resplen); struct res_sym { int number; /* Identifying number, like T_MX */ @@ -239,56 +235,57 @@ extern const struct res_sym __p_type_syms[]; #endif __BEGIN_DECLS -int res_hnok __P((const char *)); -int res_ownok __P((const char *)); -int res_mailok __P((const char *)); -int res_dnok __P((const char *)); -int sym_ston __P((const struct res_sym *, char *, int *)); -const char * sym_ntos __P((const struct res_sym *, int, int *)); -const char * sym_ntop __P((const struct res_sym *, int, int *)); -int b64_ntop __P((u_char const *, size_t, char *, size_t)); -int b64_pton __P((char const *, u_char *, size_t)); -int loc_aton __P((const char *, u_char *)); -const char * loc_ntoa __P((const u_char *, char *)); -int dn_skipname __P((const u_char *, const u_char *)); -void fp_resstat __P((struct __res_state *, FILE *)); -void fp_query __P((const u_char *, FILE *)); -void fp_nquery __P((const u_char *, int, FILE *)); -const char * hostalias __P((const char *)); -void putlong __P((u_int32_t, u_char *)); -void putshort __P((u_int16_t, u_char *)); -const char * p_class __P((int)); -const char * p_time __P((u_int32_t)); -const char * p_type __P((int)); -void p_query __P((const u_char *)); -const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *)); -const u_char * p_cdname __P((const u_char *, const u_char *, FILE *)); -const u_char * p_fqnname __P((const u_char *cp, const u_char *msg, - int, char *, int)); -const u_char * p_fqname __P((const u_char *, const u_char *, FILE *)); -const u_char * p_rr __P((const u_char *, const u_char *, FILE *)); -const char * p_option __P((u_long option)); -char * p_secstodate __P((u_long)); -int dn_count_labels __P((char *)); -int dn_comp __P((const char *, u_char *, int, - u_char **, u_char **)); -int dn_expand __P((const u_char *, const u_char *, const u_char *, - char *, int)); -int res_init __P((void)); -u_int res_randomid __P((void)); -int res_query __P((const char *, int, int, u_char *, int)); -int res_search __P((const char *, int, int, u_char *, int)); -int res_querydomain __P((const char *, const char *, int, int, - u_char *, int)); -int res_mkquery __P((int, const char *, int, int, const u_char *, int, - const u_char *, u_char *, int)); -int res_send __P((const u_char *, int, u_char *, int)); -int res_isourserver __P((const struct sockaddr_in *)); -int res_nameinquery __P((const char *, int, int, - const u_char *, const u_char *)); -int res_queriesmatch __P((const u_char *, const u_char *, - const u_char *, const u_char *)); -void res_close __P((void)); +int res_hnok (const char *) __THROW; +int res_ownok (const char *) __THROW; +int res_mailok (const char *) __THROW; +int res_dnok (const char *) __THROW; +int sym_ston (const struct res_sym *, char *, int *) __THROW; +const char * sym_ntos (const struct res_sym *, int, int *) __THROW; +const char * sym_ntop (const struct res_sym *, int, int *) __THROW; +int b64_ntop (u_char const *, size_t, char *, size_t) __THROW; +int b64_pton (char const *, u_char *, size_t) __THROW; +int loc_aton (const char *, u_char *) __THROW; +const char * loc_ntoa (const u_char *, char *) __THROW; +int dn_skipname (const u_char *, const u_char *) __THROW; +void fp_resstat (struct __res_state *, FILE *) __THROW; +void fp_query (const u_char *, FILE *) __THROW; +void fp_nquery (const u_char *, int, FILE *) __THROW; +const char * hostalias (const char *) __THROW; +void putlong (u_int32_t, u_char *) __THROW; +void putshort (u_int16_t, u_char *) __THROW; +const char * p_class (int) __THROW; +const char * p_time (u_int32_t) __THROW; +const char * p_type (int) __THROW; +void p_query (const u_char *) __THROW; +const u_char * p_cdnname (const u_char *, const u_char *, int, FILE *) + __THROW; +const u_char * p_cdname (const u_char *, const u_char *, FILE *) __THROW; +const u_char * p_fqnname (const u_char *cp, const u_char *msg, + int, char *, int) __THROW; +const u_char * p_fqname (const u_char *, const u_char *, FILE *) __THROW; +const u_char * p_rr (const u_char *, const u_char *, FILE *) __THROW; +const char * p_option (u_long option) __THROW; +char * p_secstodate (u_long) __THROW; +int dn_count_labels (char *) __THROW; +int dn_comp (const char *, u_char *, int, + u_char **, u_char **) __THROW; +int dn_expand (const u_char *, const u_char *, const u_char *, + char *, int) __THROW; +int res_init (void) __THROW; +u_int res_randomid (void) __THROW; +int res_query (const char *, int, int, u_char *, int) __THROW; +int res_search (const char *, int, int, u_char *, int) __THROW; +int res_querydomain (const char *, const char *, int, int, + u_char *, int) __THROW; +int res_mkquery (int, const char *, int, int, const u_char *, int, + const u_char *, u_char *, int) __THROW; +int res_send (const u_char *, int, u_char *, int) __THROW; +int res_isourserver (const struct sockaddr_in *) __THROW; +int res_nameinquery (const char *, int, int, + const u_char *, const u_char *) __THROW; +int res_queriesmatch (const u_char *, const u_char *, + const u_char *, const u_char *) __THROW; +void res_close (void) __THROW; __END_DECLS #endif /* resolv.h */ diff --git a/resource/sys/resource.h b/resource/sys/resource.h index e44193b..9eca167 100644 --- a/resource/sys/resource.h +++ b/resource/sys/resource.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1994, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1992, 94, 96, 97, 98, 99 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 @@ -29,56 +29,56 @@ __BEGIN_DECLS /* Put the soft and hard limits for RESOURCE in *RLIMITS. Returns 0 if successful, -1 if not (and sets errno). */ #ifndef __USE_FILE_OFFSET64 -extern int getrlimit __P ((enum __rlimit_resource __resource, - struct rlimit *__rlimits)); +extern int getrlimit (enum __rlimit_resource __resource, + struct rlimit *__rlimits) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (getrlimit, __P ((enum __rlimit_resource __resource, - struct rlimit *__rlimits)), +extern int __REDIRECT (getrlimit, (enum __rlimit_resource __resource, + struct rlimit *__rlimits) __THROW, getrlimit64); # else # define getrlimit getrlimit64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int getrlimit64 __P ((enum __rlimit_resource __resource, - struct rlimit64 *__rlimits)); +extern int getrlimit64 (enum __rlimit_resource __resource, + struct rlimit64 *__rlimits) __THROW; #endif /* Set the soft and hard limits for RESOURCE to *RLIMITS. Only the super-user can increase hard limits. Return 0 if successful, -1 if not (and sets errno). */ #ifndef __USE_FILE_OFFSET64 -extern int setrlimit __P ((enum __rlimit_resource __resource, - __const struct rlimit *__rlimits)); +extern int setrlimit (enum __rlimit_resource __resource, + __const struct rlimit *__rlimits) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (setrlimit, __P ((enum __rlimit_resource __resource, - __const struct rlimit *__rlimits)), +extern int __REDIRECT (setrlimit, (enum __rlimit_resource __resource, + __const struct rlimit *__rlimits) __THROW, setrlimit64); # else # define setrlimit setrlimit64 # endif #endif #ifdef __USE_LARGEFILE64 -extern int setrlimit64 __P ((enum __rlimit_resource __resource, - __const struct rlimit64 *__rlimits)); +extern int setrlimit64 (enum __rlimit_resource __resource, + __const struct rlimit64 *__rlimits) __THROW; #endif /* Return resource usage information on process indicated by WHO and put it in *USAGE. Returns 0 for success, -1 for failure. */ -extern int getrusage __P ((enum __rusage_who __who, struct rusage *__usage)); +extern int getrusage (enum __rusage_who __who, struct rusage *__usage) __THROW; /* Return the highest priority of any process specified by WHICH and WHO (see above); if WHO is zero, the current process, process group, or user (as specified by WHO) is used. A lower priority number means higher priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */ -extern int getpriority __P ((enum __priority_which __which, int __who)); +extern int getpriority (enum __priority_which __which, int __who) __THROW; /* Set the priority of all processes specified by WHICH and WHO (see above) to PRIO. Returns 0 on success, -1 on errors. */ -extern int setpriority __P ((enum __priority_which __which, int __who, - int __prio)); +extern int setpriority (enum __priority_which __which, int __who, int __prio) + __THROW; __END_DECLS diff --git a/resource/sys/vlimit.h b/resource/sys/vlimit.h index d66368a..3af27b7 100644 --- a/resource/sys/vlimit.h +++ b/resource/sys/vlimit.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 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 @@ -60,7 +60,7 @@ enum __vlimit_resource /* Set the soft limit for RESOURCE to be VALUE. Returns 0 for success, -1 for failure. */ -extern int vlimit __P ((enum __vlimit_resource __resource, int __value)); +extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW; __END_DECLS diff --git a/resource/sys/vtimes.h b/resource/sys/vtimes.h index 51117d4..d8fa3b4 100644 --- a/resource/sys/vtimes.h +++ b/resource/sys/vtimes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 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 @@ -62,7 +62,7 @@ struct vtimes /* If CURRENT is not NULL, write statistics for the current process into *CURRENT. If CHILD is not NULL, write statistics for all terminated child processes into *CHILD. Returns 0 for success, -1 for failure. */ -extern int vtimes __P ((struct vtimes * __current, struct vtimes * __child)); +extern int vtimes (struct vtimes * __current, struct vtimes * __child) __THROW; __END_DECLS diff --git a/resource/ulimit.h b/resource/ulimit.h index 19bffcc..2ad9230 100644 --- a/resource/ulimit.h +++ b/resource/ulimit.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -41,7 +41,7 @@ enum __BEGIN_DECLS /* Control process limits according to CMD. */ -extern long int ulimit __P ((int __cmd, ...)); +extern long int ulimit (int __cmd, ...) __THROW; __END_DECLS @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -132,67 +132,65 @@ enum /* Allow user to specify optimization. */ #ifdef __USE_GNU -extern void aio_init __P ((__const struct aioinit *__init)); +extern void aio_init (__const struct aioinit *__init) __THROW; #endif #ifndef __USE_FILE_OFFSET64 /* Enqueue read request for given number of bytes and the given priority. */ -extern int aio_read __P ((struct aiocb *__aiocbp)); +extern int aio_read (struct aiocb *__aiocbp) __THROW; /* Enqueue write request for given number of bytes and the given priority. */ -extern int aio_write __P ((struct aiocb *__aiocbp)); +extern int aio_write (struct aiocb *__aiocbp) __THROW; /* Initiate list of I/O requests. */ -extern int lio_listio __P ((int __mode, - struct aiocb *__const __list[], - int __nent, struct sigevent *__restrict __sig)); +extern int lio_listio (int __mode, struct aiocb *__const __list[], + int __nent, struct sigevent *__restrict __sig) __THROW; /* Retrieve error status associated with AIOCBP. */ -extern int aio_error __P ((__const struct aiocb *__aiocbp)); +extern int aio_error (__const struct aiocb *__aiocbp) __THROW; /* Return status associated with AIOCBP. */ -extern __ssize_t aio_return __P ((struct aiocb *__aiocbp)); +extern __ssize_t aio_return (struct aiocb *__aiocbp) __THROW; /* Try to cancel asynchronous I/O requests outstanding against file descriptor FILDES. */ -extern int aio_cancel __P ((int __fildes, struct aiocb *__aiocbp)); +extern int aio_cancel (int __fildes, struct aiocb *__aiocbp) __THROW; /* Suspend calling thread until at least one of the asynchronous I/O operations referenced by LIST has completed. */ -extern int aio_suspend __P ((__const struct aiocb *__const __list[], - int __nent, - __const struct timespec *__restrict __timeout)); +extern int aio_suspend (__const struct aiocb *__const __list[], int __nent, + __const struct timespec *__restrict __timeout) __THROW; /* Force all operations associated with file desriptor described by `aio_fildes' member of AIOCBP. */ -extern int aio_fsync __P ((int __operation, struct aiocb *__aiocbp)); +extern int aio_fsync (int __operation, struct aiocb *__aiocbp) __THROW; #else # ifdef __REDIRECT -extern int __REDIRECT (aio_read, __P ((struct aiocb *__aiocbp)), aio_read64); -extern int __REDIRECT (aio_write, __P ((struct aiocb *__aiocbp)), aio_write64); +extern int __REDIRECT (aio_read, (struct aiocb *__aiocbp) __THROW, aio_read64); +extern int __REDIRECT (aio_write, (struct aiocb *__aiocbp) __THROW, + aio_write64); extern int __REDIRECT (lio_listio, - __P ((int __mode, - struct aiocb *__const __restrict __list[], - int __nent, struct sigevent *__restrict __sig)), + (int __mode, struct aiocb *__const __restrict __list[], + int __nent, struct sigevent *__restrict __sig) __THROW, lio_listio64); -extern int __REDIRECT (aio_error, __P ((__const struct aiocb *__aiocbp)), +extern int __REDIRECT (aio_error, (__const struct aiocb *__aiocbp) __THROW, aio_error64); -extern __ssize_t __REDIRECT (aio_return, __P ((struct aiocb *__aiocbp)), +extern __ssize_t __REDIRECT (aio_return, (struct aiocb *__aiocbp) __THROW, aio_return64); -extern int __REDIRECT (aio_cancel, __P ((int __fildes, - struct aiocb *__aiocbp)), +extern int __REDIRECT (aio_cancel, + (int __fildes, struct aiocb *__aiocbp) __THROW, aio_cancel64); extern int __REDIRECT (aio_suspend, - __P ((__const struct aiocb *__const __restrict __list[], - int __nent, - __const struct timespec *__restrict __timeout)), + (__const struct aiocb *__const __restrict __list[], + int __nent, + __const struct timespec *__restrict __timeout) __THROW, aio_suspend64); -extern int __REDIRECT (aio_fsync __P ((int __operation, - struct aiocb *__aiocbp)), +extern int __REDIRECT (aio_fsync, + (int __operation, struct aiocb *__aiocbp) __THROW, aio_fsync64); # else @@ -208,23 +206,23 @@ extern int __REDIRECT (aio_fsync __P ((int __operation, #endif #ifdef __USE_LARGEFILE64 -extern int aio_read64 __P ((struct aiocb64 *__aiocbp)); -extern int aio_write64 __P ((struct aiocb64 *__aiocbp)); +extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW; +extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW; -extern int lio_listio64 __P ((int __mode, - struct aiocb64 *__const __list[], int __nent, - struct sigevent *__restrict __sig)); +extern int lio_listio64 (int __mode, struct aiocb64 *__const __list[], + int __nent, struct sigevent *__restrict __sig) + __THROW; -extern int aio_error64 __P ((__const struct aiocb64 *__aiocbp)); -extern __ssize_t aio_return64 __P ((struct aiocb64 *__aiocbp)); +extern int aio_error64 (__const struct aiocb64 *__aiocbp) __THROW; +extern __ssize_t aio_return64 (struct aiocb64 *__aiocbp) __THROW; -extern int aio_cancel64 __P ((int __fildes, struct aiocb64 *__aiocbp)); +extern int aio_cancel64 (int __fildes, struct aiocb64 *__aiocbp) __THROW; -extern int aio_suspend64 __P ((__const struct aiocb64 *__const __list[], - int __nent, - __const struct timespec *__restrict __timeout)); +extern int aio_suspend64 (__const struct aiocb64 *__const __list[], int __nent, + __const struct timespec *__restrict __timeout) + __THROW; -extern int aio_fsync64 __P ((int __operation, struct aiocb64 *__aiocbp)); +extern int aio_fsync64 (int __operation, struct aiocb64 *__aiocbp) __THROW; #endif __END_DECLS diff --git a/setjmp/setjmp.h b/setjmp/setjmp.h index 73d06c9..0052571 100644 --- a/setjmp/setjmp.h +++ b/setjmp/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,96,97,98,99 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 @@ -45,7 +45,7 @@ typedef struct __jmp_buf_tag /* C++ doesn't like tagless structs. */ /* Store the calling environment in ENV, also saving the signal mask if SAVEMASK is nonzero. Return 0. This is the internal name for `sigsetjmp'. */ -extern int __sigsetjmp __P ((jmp_buf __env, int __savemask)); +extern int __sigsetjmp (jmp_buf __env, int __savemask) __THROW; #ifndef __FAVOR_BSD /* Set ENV to the current position and return 0, not saving the signal mask. @@ -67,14 +67,14 @@ extern int __sigsetjmp __P ((jmp_buf __env, int __savemask)); /* Jump to the environment saved in ENV, making the `setjmp' call there return VAL, or 1 if VAL is 0. */ -extern void longjmp __P ((jmp_buf __env, int __val)) - __attribute__ ((__noreturn__)); +extern void longjmp (jmp_buf __env, int __val) + __THROW __attribute__ ((__noreturn__)); #if defined __USE_BSD || defined __USE_XOPEN /* Same. Usually `_longjmp' is used with `_setjmp', which does not save the signal mask. But it is how ENV was saved that determines whether `longjmp' restores the mask; `_longjmp' is just an alias. */ -extern void _longjmp __P ((jmp_buf __env, int __val)) - __attribute__ ((__noreturn__)); +extern void _longjmp (jmp_buf __env, int __val) + __THROW __attribute__ ((__noreturn__)); #endif @@ -92,8 +92,8 @@ typedef jmp_buf sigjmp_buf; sigsetjmp call there return VAL, or 1 if VAL is 0. Restore the signal mask if that sigsetjmp call saved it. This is just an alias `longjmp'. */ -extern void siglongjmp __P ((sigjmp_buf __env, int __val)) - __attribute__ ((__noreturn__)); +extern void siglongjmp (sigjmp_buf __env, int __val) + __THROW __attribute__ ((__noreturn__)); #endif /* Use POSIX. */ __END_DECLS diff --git a/shadow/shadow.h b/shadow/shadow.h index 1ebb0ae..1f9ad1a 100644 --- a/shadow/shadow.h +++ b/shadow/shadow.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -55,50 +55,50 @@ struct spwd /* Open database for reading. */ -extern void setspent __P ((void)); +extern void setspent (void) __THROW; /* Close database. */ -extern void endspent __P ((void)); +extern void endspent (void) __THROW; /* Get next entry from database, perhaps after opening the file. */ -extern struct spwd *getspent __P ((void)); +extern struct spwd *getspent (void) __THROW; /* Get shadow entry matching NAME. */ -extern struct spwd *getspnam __P ((__const char *__name)); +extern struct spwd *getspnam (__const char *__name) __THROW; /* Read shadow entry from STRING. */ -extern struct spwd *sgetspent __P ((__const char *__string)); +extern struct spwd *sgetspent (__const char *__string) __THROW; /* Read next shadow entry from STREAM. */ -extern struct spwd *fgetspent __P ((FILE *__stream)); +extern struct spwd *fgetspent (FILE *__stream) __THROW; /* Write line containing shadow password entry to stream. */ -extern int putspent __P ((__const struct spwd *__p, FILE *__stream)); +extern int putspent (__const struct spwd *__p, FILE *__stream) __THROW; #ifdef __USE_MISC /* Reentrant versions of some of the functions above. */ -extern int getspent_r __P ((struct spwd *__result_buf, char *__buffer, - size_t __buflen, struct spwd **__result)); +extern int getspent_r (struct spwd *__result_buf, char *__buffer, + size_t __buflen, struct spwd **__result) __THROW; -extern int getspnam_r __P ((__const char *__name, struct spwd *__result_buf, - char *__buffer, size_t __buflen, - struct spwd **__result)); +extern int getspnam_r (__const char *__name, struct spwd *__result_buf, + char *__buffer, size_t __buflen, + struct spwd **__result)__THROW; -extern int sgetspent_r __P ((__const char *__string, struct spwd *__result_buf, - char *__buffer, size_t __buflen, - struct spwd **__result)); +extern int sgetspent_r (__const char *__string, struct spwd *__result_buf, + char *__buffer, size_t __buflen, + struct spwd **__result) __THROW; -extern int fgetspent_r __P ((FILE *__stream, struct spwd *__result_buf, - char *__buffer, size_t __buflen, - struct spwd **__result)); +extern int fgetspent_r (FILE *__stream, struct spwd *__result_buf, + char *__buffer, size_t __buflen, + struct spwd **__result) __THROW; #endif /* misc */ /* Protect password file against multi writers. */ -extern int lckpwdf __P ((void)); +extern int lckpwdf (void) __THROW; /* Unlock password file. */ -extern int ulckpwdf __P ((void)); +extern int ulckpwdf (void) __THROW; __END_DECLS diff --git a/signal/signal.h b/signal/signal.h index 02d7a79..12019f0 100644 --- a/signal/signal.h +++ b/signal/signal.h @@ -62,27 +62,29 @@ typedef __pid_t pid_t; /* Type of a signal handler. */ -typedef void (*__sighandler_t) __PMT ((int)); +typedef void (*__sighandler_t) (int); /* The X/Open definition of `signal' specifies the SVID semantic. Use the additional function `sysv_signal' when X/Open compatibility is requested. */ -extern __sighandler_t __sysv_signal __P ((int __sig, - __sighandler_t __handler)); +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + __THROW; #ifdef __USE_GNU -extern __sighandler_t sysv_signal __P ((int __sig, __sighandler_t __handler)); +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + __THROW; #endif /* Set the handler for the signal SIG to HANDLER, returning the old handler, or SIG_ERR on error. By default `signal' has the BSD semantic. */ #ifdef __USE_BSD -extern __sighandler_t signal __P ((int __sig, __sighandler_t __handler)); +extern __sighandler_t signal (int __sig, __sighandler_t __handler) __THROW; #else /* Make sure the used `signal' implementation is the SVID version. */ # ifdef __REDIRECT extern __sighandler_t __REDIRECT (signal, - __P ((int __sig, __sighandler_t __handler)), + (int __sig, + __sighandler_t __handler) __THROW, __sysv_signal); # else # define signal __sysv_signal @@ -92,35 +94,35 @@ extern __sighandler_t __REDIRECT (signal, #ifdef __USE_XOPEN /* The X/Open definition of `signal' conflicts with the BSD version. So they defined another function `bsd_signal'. */ -extern __sighandler_t bsd_signal __P ((int __sig, __sighandler_t __handler)); +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) __THROW; #endif /* Send signal SIG to process number PID. If PID is zero, send SIG to all processes in the current process's process group. If PID is < -1, send SIG to all processes in process group - PID. */ #ifdef __USE_POSIX -extern int kill __P ((__pid_t __pid, int __sig)); +extern int kill (__pid_t __pid, int __sig) __THROW; #endif /* Use POSIX. */ #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Send SIG to all processes in process group PGRP. If PGRP is zero, send SIG to all processes in the current process's process group. */ -extern int killpg __P ((__pid_t __pgrp, int __sig)); +extern int killpg (__pid_t __pgrp, int __sig) __THROW; #endif /* Use BSD || X/Open Unix. */ /* Raise signal SIG, i.e., send SIG to yourself. */ -extern int raise __P ((int __sig)); +extern int raise (int __sig) __THROW; #ifdef __USE_SVID /* SVID names for the same things. */ -extern __sighandler_t ssignal __P ((int __sig, __sighandler_t __handler)); -extern int gsignal __P ((int __sig)); +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __THROW; +extern int gsignal (int __sig) __THROW; #endif /* Use SVID. */ #ifdef __USE_MISC /* Print a message describing the meaning of the given signal number. */ -extern void psignal __P ((int __sig, __const char *__s)); +extern void psignal (int __sig, __const char *__s) __THROW; #endif /* Use misc. */ @@ -129,12 +131,12 @@ extern void psignal __P ((int __sig, __const char *__s)); the more modern interface in X/Open defines it as the signal number. We go with the BSD version unless the user explicitly selects the X/Open version. */ -extern int __sigpause __P ((int __sig_or_mask, int __is_sig)); +extern int __sigpause (int __sig_or_mask, int __is_sig) __THROW; #ifdef __USE_BSD /* Set the mask of blocked signals to MASK, wait for a signal to arrive, and then restore the mask. */ -extern int sigpause __P ((int __mask)); +extern int sigpause (int __mask) __THROW; # define sigpause(mask) __sigpause ((mask), 0) #else # ifdef __USE_XOPEN @@ -154,13 +156,13 @@ extern int sigpause __P ((int __mask)); # define sigmask(sig) __sigmask(sig) /* Block signals in MASK, returning the old mask. */ -extern int sigblock __P ((int __mask)); +extern int sigblock (int __mask) __THROW; /* Set the mask of blocked signals to MASK, returning the old mask. */ -extern int sigsetmask __P ((int __mask)); +extern int sigsetmask (int __mask) __THROW; /* Return currently selected signal mask. */ -extern int siggetmask __P ((void)); +extern int siggetmask (void) __THROW; #endif /* Use BSD. */ @@ -189,31 +191,31 @@ typedef __sighandler_t sig_t; # endif /* Clear all signals from SET. */ -extern int sigemptyset __P ((sigset_t *__set)); +extern int sigemptyset (sigset_t *__set) __THROW; /* Set all signals in SET. */ -extern int sigfillset __P ((sigset_t *__set)); +extern int sigfillset (sigset_t *__set) __THROW; /* Add SIGNO to SET. */ -extern int sigaddset __P ((sigset_t *__set, int __signo)); +extern int sigaddset (sigset_t *__set, int __signo) __THROW; /* Remove SIGNO from SET. */ -extern int sigdelset __P ((sigset_t *__set, int __signo)); +extern int sigdelset (sigset_t *__set, int __signo) __THROW; /* Return 1 if SIGNO is in SET, 0 if not. */ -extern int sigismember __P ((__const sigset_t *__set, int __signo)); +extern int sigismember (__const sigset_t *__set, int __signo) __THROW; # ifdef __USE_GNU /* Return non-empty value is SET is not empty. */ -extern int sigisemptyset __P ((__const sigset_t *__set)); +extern int sigisemptyset (__const sigset_t *__set) __THROW; /* Build new signal set by combining the two inputs set using logical AND. */ -extern int sigandset __P ((sigset_t *__set, __const sigset_t *__left, - __const sigset_t *__right)); +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) __THROW; /* Build new signal set by combining the two inputs set using logical OR. */ -extern int sigorset __P ((sigset_t *__set, __const sigset_t *__left, - __const sigset_t *__right)); +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) __THROW; # endif /* GNU */ /* Get the system-specific definitions of `struct sigaction' @@ -221,39 +223,39 @@ extern int sigorset __P ((sigset_t *__set, __const sigset_t *__left, # include <bits/sigaction.h> /* Get and/or change the set of blocked signals. */ -extern int sigprocmask __P ((int __how, - __const sigset_t *__set, sigset_t *__oset)); +extern int sigprocmask (int __how, __const sigset_t *__set, sigset_t *__oset) + __THROW; /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. */ -extern int sigsuspend __P ((__const sigset_t *__set)); +extern int sigsuspend (__const sigset_t *__set) __THROW; /* Get and/or set the action for signal SIG. */ -extern int __sigaction __P ((int __sig, __const struct sigaction *__act, - struct sigaction *__oact)); -extern int sigaction __P ((int __sig, __const struct sigaction *__act, - struct sigaction *__oact)); +extern int __sigaction (int __sig, __const struct sigaction *__act, + struct sigaction *__oact) __THROW; +extern int sigaction (int __sig, __const struct sigaction *__act, + struct sigaction *__oact) __THROW; /* Put in SET all signals that are blocked and waiting to be delivered. */ -extern int sigpending __P ((sigset_t *__set)); +extern int sigpending (sigset_t *__set) __THROW; /* Select any of pending signals from SET or wait for any to arrive. */ -extern int sigwait __P ((__const sigset_t *__set, int *__sig)); +extern int sigwait (__const sigset_t *__set, int *__sig) __THROW; # ifdef __USE_POSIX199309 /* Select any of pending signals from SET and place information in INFO. */ -extern int sigwaitinfo __P ((__const sigset_t *__set, siginfo_t *__info)); +extern int sigwaitinfo (__const sigset_t *__set, siginfo_t *__info) __THROW; /* Select any of pending signals from SET and place information in INFO. Wait the imte specified by TIMEOUT if no signal is pending. */ -extern int sigtimedwait __P ((__const sigset_t *__set, siginfo_t *__info, - __const struct timespec *__timeout)); +extern int sigtimedwait (__const sigset_t *__set, siginfo_t *__info, + __const struct timespec *__timeout) __THROW; /* Send signal SIG to the process PID. Associate data in VAL with the signal. */ -extern int sigqueue __P ((__pid_t __pid, int __sig, - __const union sigval __val)); +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + __THROW; # endif /* Use POSIX 199306. */ #endif /* Use POSIX. */ @@ -286,15 +288,15 @@ struct sigvec If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL, it is filled in with the old information for SIG. */ -extern int sigvec __P ((int __sig, __const struct sigvec *__vec, - struct sigvec *__ovec)); +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) __THROW; /* Get machine-dependent `struct sigcontext' and signal subcodes. */ # include <bits/sigcontext.h> /* Restore the state saved in SCP. */ -extern int sigreturn __P ((struct sigcontext *__scp)); +extern int sigreturn (struct sigcontext *__scp) __THROW; #endif /* use BSD. */ @@ -304,20 +306,20 @@ extern int sigreturn __P ((struct sigcontext *__scp)); /* If INTERRUPT is nonzero, make signal SIG interrupt system calls (causing them to fail with EINTR); if INTERRUPT is zero, make system calls be restarted after signal SIG. */ -extern int siginterrupt __P ((int __sig, int __interrupt)); +extern int siginterrupt (int __sig, int __interrupt) __THROW; # include <bits/sigstack.h> /* Run signals handlers on the stack specified by SS (if not NULL). If OSS is not NULL, it is filled in with the old signal stack status. This interface is obsolete and on many platform not implemented. */ -extern int sigstack __P ((__const struct sigstack *__ss, - struct sigstack *__oss)); +extern int sigstack (__const struct sigstack *__ss, + struct sigstack *__oss) __THROW; /* Alternate signal handler stack interface. This interface should always be preferred over `sigstack'. */ -extern int sigaltstack __P ((__const struct sigaltstack *__ss, - struct sigaltstack *__oss)); +extern int sigaltstack (__const struct sigaltstack *__ss, + struct sigaltstack *__oss) __THROW; #endif /* use BSD or X/Open Unix. */ @@ -325,16 +327,16 @@ extern int sigaltstack __P ((__const struct sigaltstack *__ss, /* Simplified interface for signal management. */ /* Add SIG to the calling process' signal mask. */ -extern int sighold __P ((int __sig)); +extern int sighold (int __sig) __THROW; /* Remove SIG from the calling process' signal mask. */ -extern int sigrelse __P ((int __sig)); +extern int sigrelse (int __sig) __THROW; /* Set the disposition of SIG to SIG_IGN. */ -extern int sigignore __P ((int __sig)); +extern int sigignore (int __sig) __THROW; /* Set the disposition of SIG. */ -extern __sighandler_t sigset __P ((int __sig, __sighandler_t __disp)); +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW; /* Some of the functions for handling signals in threaded programs must be defined here. */ @@ -345,9 +347,9 @@ extern __sighandler_t sigset __P ((int __sig, __sighandler_t __disp)); other code which need deep insights. */ /* Return number of available real-time signal with highest priority. */ -extern int __libc_current_sigrtmin __P ((void)); +extern int __libc_current_sigrtmin (void) __THROW; /* Return number of available real-time signal with lowest priority. */ -extern int __libc_current_sigrtmax __P ((void)); +extern int __libc_current_sigrtmax (void) __THROW; #endif /* signal.h */ diff --git a/stdio-common/_itoa.h b/stdio-common/_itoa.h index 9766369..f7e5e6d 100644 --- a/stdio-common/_itoa.h +++ b/stdio-common/_itoa.h @@ -1,5 +1,5 @@ /* Internal function for converting integers to ASCII. - Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 99 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 @@ -26,8 +26,8 @@ Return the address of the first (left-to-right) character in the number. Use upper case letters iff UPPER_CASE is nonzero. */ -extern char *_itoa __P ((unsigned long long int value, char *buflim, - unsigned int base, int upper_case)); +extern char *_itoa (unsigned long long int value, char *buflim, + unsigned int base, int upper_case); static inline char * __attribute__ ((unused)) _itoa_word (unsigned long value, char *buflim, diff --git a/stdio-common/_itowa.h b/stdio-common/_itowa.h index e219f29..7ce5e4d 100644 --- a/stdio-common/_itowa.h +++ b/stdio-common/_itowa.h @@ -27,8 +27,8 @@ Return the address of the first (left-to-right) character in the number. Use upper case letters iff UPPER_CASE is nonzero. */ -extern wchar_t *_itowa __P ((unsigned long long int value, wchar_t *buflim, - unsigned int base, int upper_case)); +extern wchar_t *_itowa (unsigned long long int value, wchar_t *buflim, + unsigned int base, int upper_case); static inline wchar_t * __attribute__ ((unused)) diff --git a/stdio-common/printf.h b/stdio-common/printf.h index 66ac5d0..755f652 100644 --- a/stdio-common/printf.h +++ b/stdio-common/printf.h @@ -60,25 +60,24 @@ struct printf_info The function should return the number of characters written, or -1 for errors. */ -typedef int printf_function __PMT ((FILE *__stream, - __const struct printf_info *__info, - __const void *__const *__args)); +typedef int printf_function (FILE *__stream, + __const struct printf_info *__info, + __const void *__const *__args); /* Type of a printf specifier-arginfo function. INFO gives information about the format specification. N, ARGTYPES, and return value are as for printf_parse_format. */ -typedef int printf_arginfo_function __PMT ((__const struct printf_info *__info, - size_t __n, - int *__argtypes)); +typedef int printf_arginfo_function (__const struct printf_info *__info, + size_t __n, int *__argtypes); /* Register FUNC to be called to format SPEC specifiers; ARGINFO must be specified to determine how many arguments a SPEC conversion requires and what their types are. */ -extern int register_printf_function __P ((int __spec, printf_function __func, - printf_arginfo_function __arginfo)); +extern int register_printf_function (int __spec, printf_function __func, + printf_arginfo_function __arginfo); /* Parse FMT, and fill in N elements of ARGTYPES with the @@ -92,9 +91,8 @@ extern int register_printf_function __P ((int __spec, printf_function __func, array it is passed with the types of the arguments it wants, and return the number of arguments it wants. */ -extern size_t parse_printf_format __P ((__const char *__restrict __fmt, - size_t __n, - int *__restrict __argtypes)); +extern size_t parse_printf_format (__const char *__restrict __fmt, size_t __n, + int *__restrict __argtypes) __THROW; /* Codes returned by `parse_printf_format' for basic types. @@ -131,14 +129,14 @@ enum of magnitude used for numbers ('k' for kilo, 'm' for mega etc). If the format specifier is a uppercase character powers of 1000 are used. Otherwise powers of 1024. */ -extern int printf_size __P ((FILE *__restrict __fp, - __const struct printf_info *__info, - __const void *__const *__restrict __args)); +extern int printf_size (FILE *__restrict __fp, + __const struct printf_info *__info, + __const void *__const *__restrict __args) __THROW; /* This is the appropriate argument information function for `printf_size'. */ -extern int printf_size_info __P ((__const struct printf_info *__restrict - __info, size_t __n, - int *__restrict __argtypes)); +extern int printf_size_info (__const struct printf_info *__restrict + __info, size_t __n, int *__restrict __argtypes) + __THROW; __END_DECLS diff --git a/stdio/stdio.h b/stdio/stdio.h index 9045727..465a80d 100644 --- a/stdio/stdio.h +++ b/stdio/stdio.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,96,97,98,99 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 @@ -74,8 +74,8 @@ typedef struct /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ -typedef __ssize_t __io_read_fn __PMT ((__ptr_t __cookie, char *__buf, - size_t __nbytes)); +typedef __ssize_t __io_read_fn (__ptr_t __cookie, char *__buf, + size_t __nbytes); /* Write N bytes pointed to by BUF to COOKIE. Write all N bytes unless there is an error. Return number of bytes written, or -1 if @@ -83,8 +83,8 @@ typedef __ssize_t __io_read_fn __PMT ((__ptr_t __cookie, char *__buf, opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ -typedef __ssize_t __io_write_fn __PMT ((__ptr_t __cookie, __const char *__buf, - size_t __n)); +typedef __ssize_t __io_write_fn (__ptr_t __cookie, __const char *__buf, + size_t __n); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), @@ -92,14 +92,14 @@ typedef __ssize_t __io_write_fn __PMT ((__ptr_t __cookie, __const char *__buf, or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ -typedef int __io_seek_fn __PMT ((__ptr_t __cookie, fpos_t *__pos, int __w)); +typedef int __io_seek_fn (__ptr_t __cookie, fpos_t *__pos, int __w); /* Close COOKIE. */ -typedef int __io_close_fn __PMT ((__ptr_t __cookie)); +typedef int __io_close_fn (__ptr_t __cookie); /* Return the file descriptor associated with COOKIE, or -1 on error. There need not be any associated file descriptor. */ -typedef int __io_fileno_fn __PMT ((__ptr_t __cookie)); +typedef int __io_fileno_fn (__ptr_t __cookie); #ifdef __USE_GNU /* User-visible names for the above. */ @@ -139,9 +139,9 @@ typedef struct typedef struct { /* Make room in the input buffer. */ - int (*__input) __PMT ((FILE *__stream)); + int (*__input) (FILE *__stream); /* Make room in the output buffer. */ - void (*__output) __PMT ((FILE *__stream, int __c)); + void (*__output) (FILE *__stream, int __c); } __room_functions; extern __const __io_functions __default_io_functions; @@ -151,10 +151,10 @@ extern __const __room_functions __default_room_functions; /* Default close function. */ extern __io_close_fn __stdio_close; /* Open FILE with mode M, store cookie in *COOKIEPTR. */ -extern int __stdio_open __P ((__const char *__file, __io_mode __m, - __ptr_t *__cookieptr)); +extern int __stdio_open (__const char *__file, __io_mode __m, + void **__cookieptr) __THROW; /* Put out an error message for when stdio needs to die. */ -extern void __stdio_errmsg __P ((__const char *__msg, size_t __len)); +extern void __stdio_errmsg (__const char *__msg, size_t __len) __THROW; @@ -216,12 +216,12 @@ struct __stdio_file #define __clearerr(stream) ((stream)->__error = (stream)->__eof = 0) /* Nuke STREAM, making it unusable but available for reuse. */ -extern void __invalidate __P ((FILE *__stream)); +extern void __invalidate (FILE *__stream) __THROW; /* Make sure STREAM->__offset and STREAM->__target are initialized. Returns 0 if successful, or EOF on error (but doesn't set STREAM->__error). */ -extern int __stdio_check_offset __P ((FILE *__stream)); +extern int __stdio_check_offset (FILE *__stream) __THROW; /* The possibilities for the third argument to `setvbuf'. */ @@ -279,23 +279,23 @@ extern FILE *stdin, *stdout, *stderr; /* Remove file FILENAME. */ -extern int remove __P ((__const char *__filename)); +extern int remove (__const char *__filename) __THROW; /* Rename file OLD to NEW. */ -extern int rename __P ((__const char *__old, __const char *__new)); +extern int rename (__const char *__old, __const char *__new) __THROW; /* Create a temporary file and open it read/write. */ -extern FILE *tmpfile __P ((void)); +extern FILE *tmpfile (void) __THROW; #ifdef __USE_LARGEFILE64 -extern FILE *tmpfile64 __P ((void)); +extern FILE *tmpfile64 (void) __THROW; #endif /* Generate a temporary filename. */ -extern char *tmpnam __P ((char *__s)); +extern char *tmpnam (char *__s) __THROW; #ifdef __USE_REENTRANT /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */ -extern char *tmpnam_r __P ((char *__s)); +extern char *tmpnam_r (char *__s) __THROW; #endif @@ -307,38 +307,38 @@ extern char *tmpnam_r __P ((char *__s)); If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ -extern char *tempnam __P ((__const char *__dir, __const char *__pfx)); +extern char *tempnam (__const char *__dir, __const char *__pfx) __THROW; #endif /* This performs actual output when necessary, flushing STREAM's buffer and optionally writing another character. */ -extern int __flshfp __P ((FILE *__stream, int __c)); +extern int __flshfp (FILE *__stream, int __c) __THROW; /* Close STREAM. */ -extern int fclose __P ((FILE *__stream)); +extern int fclose (FILE *__stream) __THROW; /* Flush STREAM, or all streams if STREAM is NULL. */ -extern int fflush __P ((FILE *__stream)); +extern int fflush (FILE *__stream) __THROW; #ifdef __USE_MISC /* Faster versions when locking is not required. */ -extern int fflush_unlocked __P ((FILE *__stream)); +extern int fflush_unlocked (FILE *__stream) __THROW; #endif #ifdef __USE_GNU /* Close all streams. */ -extern int __fcloseall __P ((void)); -extern int fcloseall __P ((void)); +extern int __fcloseall (void) __THROW; +extern int fcloseall (void) __THROW; #endif /* Open a file and create a new stream for it. */ -extern FILE *fopen __P ((__const char *__filename, __const char *__modes)); +extern FILE *fopen (__const char *__filename, __const char *__modes) __THROW; /* Open a file, replacing an existing stream with it. */ -extern FILE *freopen __P ((__const char *__restrict __filename, - __const char *__restrict __modes, - FILE *__restrict __stream)); +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __THROW; /* Return a new, zeroed, stream. You must set its cookie and io_mode. @@ -349,69 +349,67 @@ extern FILE *freopen __P ((__const char *__restrict __filename, The target is set to -1, meaning it will be set to the offset before the target is needed. Returns NULL if a stream can't be created. */ -extern FILE *__newstream __P ((void)); +extern FILE *__newstream (void) __THROW; #ifdef __USE_POSIX /* Create a new stream that refers to an existing system file descriptor. */ -extern FILE *__fdopen __P ((int __fd, __const char *__modes)); -extern FILE *fdopen __P ((int __fd, __const char *__modes)); +extern FILE *__fdopen (int __fd, __const char *__modes) __THROW; +extern FILE *fdopen (int __fd, __const char *__modes) __THROW; #endif #ifdef __USE_GNU /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ -extern FILE *fopencookie __P ((__ptr_t __magic_cookie, __const char *__modes, - __io_functions __io_funcs)); +extern FILE *fopencookie (void *__magic_cookie, __const char *__modes, + __io_functions __io_funcs) __THROW; /* Create a new stream that refers to a memory buffer. */ -extern FILE *fmemopen __P ((__ptr_t __s, size_t __len, __const char *__modes)); +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) __THROW; /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ -extern FILE *open_memstream __P ((char **__bufloc, size_t *__sizeloc)); +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW; #endif /* If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ. */ -extern void setbuf __P ((FILE *__restrict __stream, char *__restrict __buf)); +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ -extern int setvbuf __P ((FILE *__restrict __stream, char *__restrict __buf, - int __modes, size_t __n)); +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __THROW; #ifdef __USE_BSD /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ -extern void setbuffer __P ((FILE *__stream, char *__buf, size_t __size)); +extern void setbuffer (FILE *__stream, char *__buf, size_t __size) __THROW; /* Make STREAM line-buffered. */ -extern void setlinebuf __P ((FILE *__stream)); +extern void setlinebuf (FILE *__stream) __THROW; #endif /* Write formatted output to STREAM. */ -extern int fprintf __P ((FILE *__restrict __stream, - __const char *__restrict __format, ...)); +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __THROW; /* Write formatted output to stdout. */ -extern int printf __P ((__const char *__restrict __format, ...)); +extern int printf (__const char *__restrict __format, ...) __THROW; /* Write formatted output to S. */ -extern int sprintf __P ((char *__restrict __s, - __const char *__restrict __format, ...)); +extern int sprintf (char *__restrict __s, __const char *__restrict __format, + ...) __THROW; /* Write formatted output to S from argument list ARG. */ -extern int vfprintf __P ((FILE *__restrict __s, - __const char *__restrict __format, - __gnuc_va_list __arg)); +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __THROW; /* Write formatted output to stdout from argument list ARG. */ -extern int vprintf __P ((__const char *__restrict __format, - __gnuc_va_list __arg)); +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg) + ___THROW; /* Write formatted output to S from argument list ARG. */ -extern int vsprintf __P ((char *__restrict __s, - __const char *__restrict __format, - __gnuc_va_list __arg)); +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __THROW; #ifdef __OPTIMIZE__ extern __inline int @@ -423,68 +421,67 @@ vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) __THROW #if defined __USE_BSD || defined __USE_ISOC9X /* Maximum chars of output to write in MAXLEN. */ -extern int __snprintf __P ((char *__s, size_t __maxlen, - __const char *__format, ...)) - __attribute__ ((__format__ (__printf__, 3, 4))); -extern int snprintf __P ((char *__s, size_t __maxlen, - __const char *__format, ...)) - __attribute__ ((__format__ (__printf__, 3, 4))); - -extern int __vsnprintf __P ((char *__s, size_t __maxlen, - __const char *__format, __gnuc_va_list __arg)) - __attribute__ ((__format__ (__printf__, 3, 0))); -extern int vsnprintf __P ((char *__s, size_t __maxlen, - __const char *__format, __gnuc_va_list __arg)) - __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __snprintf (char *__s, size_t __maxlen, + __const char *__format, ...) + __THROW __attribute__ ((__format__ (__printf__, 3, 4))); +extern int snprintf (char *__s, size_t __maxlen, __const char *__format, ...) + __THROW __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int __vsnprintf (char *__s, size_t __maxlen, + __const char *__format, __gnuc_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 3, 0))); +extern int vsnprintf (char *__s, size_t __maxlen, + __const char *__format, __gnuc_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 3, 0))); #endif #ifdef __USE_GNU /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ -extern int vasprintf __P ((char **__restrict __ptr, - __const char *__restrict __f, __gnuc_va_list __arg)) - __attribute__ ((__format__ (__printf__, 2, 0))); -extern int __asprintf __P ((char **__restrict __ptr, - __const char *__restrict __fmt, ...)) - __attribute__ ((__format__ (__printf__, 2, 3))); -extern int asprintf __P ((char **__restrict __ptr, - __const char *__restrict __fmt, ...)) - __attribute__ ((__format__ (__printf__, 2, 3))); +extern int vasprintf (char **__restrict __ptr, + __const char *__restrict __f, __gnuc_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 2, 0))); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __THROW __attribute__ ((__format__ (__printf__, 2, 3))); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __THROW __attribute__ ((__format__ (__printf__, 2, 3))); /* Write formatted output to a file descriptor. */ -extern int vdprintf __P ((int __fd, __const char *__restrict __fmt, - __gnuc_va_list __arg)) - __attribute__ ((__format__ (__printf__, 2, 0))); -extern int dprintf __P ((int __fd, __const char *__restrict __fmt, ...)) - __attribute__ ((__format__ (__printf__, 2, 3))); +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __THROW __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __THROW __attribute__ ((__format__ (__printf__, 2, 3))); #endif /* Read formatted input from STREAM. */ -extern int fscanf __P ((FILE *__restrict __stream, - __const char *__restrict __format, ...)); +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __THROW; /* Read formatted input from stdin. */ -extern int scanf __P ((__const char *__restrict __format, ...)); +extern int scanf (__const char *__restrict __format, ...) __THROW; /* Read formatted input from S. */ -extern int sscanf __P ((__const char *__restrict __s, - __const char *__restrict __format, ...)); +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __THROW; #ifdef __USE_ISOC9X /* Read formatted input from S into argument list ARG. */ -extern int __vfscanf __P ((FILE *__s, __const char *__format, - __gnuc_va_list __arg)); -extern int vfscanf __P ((FILE *__s, __const char *__format, - __gnuc_va_list __arg)); +extern int __vfscanf (FILE *__s, __const char *__format, + __gnuc_va_list __arg) __THROW; +extern int vfscanf (FILE *__s, __const char *__format, + __gnuc_va_list __arg) __THROW; /* Read formatted input from stdin into argument list ARG. */ -extern int __vscanf __P ((__const char *__format, __gnuc_va_list __arg)); -extern int vscanf __P ((__const char *__format, __gnuc_va_list __arg)); +extern int __vscanf (__const char *__format, __gnuc_va_list __arg) __THROW; +extern int vscanf (__const char *__format, __gnuc_va_list __arg) __THROW; /* Read formatted input from S into argument list ARG. */ -extern int __vsscanf __P ((__const char *__s, __const char *__format, - __gnuc_va_list __arg)); -extern int vsscanf __P ((__const char *__s, __const char *__format, - __gnuc_va_list __arg)); +extern int __vsscanf (__const char *__s, __const char *__format, + __gnuc_va_list __arg) __THROW; +extern int vsscanf (__const char *__s, __const char *__format, + __gnuc_va_list __arg) __THROW; #ifdef __OPTIMIZE__ @@ -509,15 +506,15 @@ vsscanf (const char *__s, const char *__fmt, __gnuc_va_list __arg) __THROW /* This does actual reading when necessary, filling STREAM's buffer and returning the first character in it. */ -extern int __fillbf __P ((FILE *__stream)); +extern int __fillbf (FILE *__stream) __THROW; /* Read a character from STREAM. */ -extern int fgetc __P ((FILE *__stream)); -extern int getc __P ((FILE *__stream)); +extern int fgetc (FILE *__stream) __THROW; +extern int getc (FILE *__stream) __THROW; /* Read a character from stdin. */ -extern int getchar __P ((void)); +extern int getchar (void) __THROW; /* The C standard explicitly says this can re-evaluate its argument, so it does. */ @@ -539,8 +536,8 @@ getchar (void) __THROW #if defined __USE_POSIX || defined __USE_MISC /* These are defined in POSIX.1:1996. */ -extern int getc_unlocked __P ((FILE *__stream)); -extern int getchar_unlocked __P ((void)); +extern int getc_unlocked (FILE *__stream) __THROW; +extern int getchar_unlocked (void) __THROW; # ifdef __OPTIMIZE__ extern __inline int @@ -559,11 +556,11 @@ getchar_unlocked (void) __THROW /* Write a character to STREAM. */ -extern int fputc __P ((int __c, FILE *__stream)); -extern int putc __P ((int __c, FILE *__stream)); +extern int fputc (int __c, FILE *__stream) __THROW; +extern int putc (int __c, FILE *__stream) __THROW; /* Write a character to stdout. */ -extern int putchar __P ((int __c)); +extern int putchar (int __c) __THROW; /* The C standard explicitly says this can @@ -587,7 +584,7 @@ putchar (int __c) __THROW #ifdef __USE_MISC /* Faster version when locking is not necessary. */ -extern int fputc_unlocked __P ((int __c, FILE *__stream)); +extern int fputc_unlocked (int __c, FILE *__stream) __THROW; # ifdef __OPTIMIZE__ extern __inline int @@ -600,8 +597,8 @@ fputc_unlocked (int __c, FILE *__stream) __THROW #if defined __USE_POSIX || defined __USE_MISC /* These are defined in POSIX.1:1996. */ -extern int putc_unlocked __P ((int __c, FILE *__stream)); -extern int putchar_unlocked __P ((int __c)); +extern int putc_unlocked (int __c, FILE *__stream) __THROW; +extern int putchar_unlocked (int __c) __THROW; # ifdef __OPTIMIZE__ extern __inline int @@ -621,26 +618,26 @@ putchar_unlocked (int __c) __THROW #if defined __USE_SVID || defined __USE_MISC /* Get a word (int) from STREAM. */ -extern int getw __P ((FILE *__stream)); +extern int getw (FILE *__stream) __THROW; /* Write a word (int) to STREAM. */ -extern int putw __P ((int __w, FILE *__stream)); +extern int putw (int __w, FILE *__stream) __THROW; #endif /* Get a newline-terminated string of finite length from STREAM. */ -extern char *fgets __P ((char *__restrict __s, int __n, - FILE *__restrict __stream)); +extern char *fgets (char *__restrict __s, int __n, + FILE *__restrict __stream) __THROW; #ifdef __USE_GNU /* This function does the same as `fgets' but does not lock the stream. */ -extern char *fgets_unlocked __P ((char *__restrict __s, int __n, - FILE *__restrict __stream)); +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __THROW; #endif /* Get a newline-terminated string from stdin, removing the newline. DO NOT USE THIS FUNCTION!! There is no limit on how much it will read. */ -extern char *gets __P ((char *__s)); +extern char *gets (char *__s) __THROW; #ifdef __USE_GNU @@ -651,14 +648,14 @@ extern char *gets __P ((char *__s)); NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. */ -ssize_t __getdelim __P ((char **__lineptr, size_t *__n, - int __delimiter, FILE *__stream)); -ssize_t getdelim __P ((char **__lineptr, size_t *__n, - int __delimiter, FILE *__stream)); +ssize_t __getdelim (char **__lineptr, size_t *__n, + int __delimiter, FILE *__stream) __THROW; +ssize_t getdelim (char **__lineptr, size_t *__n, + int __delimiter, FILE *__stream) __THROW; /* Like `getdelim', but reads up to a newline. */ -ssize_t __getline __P ((char **__lineptr, size_t *__n, FILE *__stream)); -ssize_t getline __P ((char **__lineptr, size_t *__n, FILE *__stream)); +ssize_t __getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW; +ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW; #ifdef __OPTIMIZE__ extern __inline ssize_t @@ -671,59 +668,60 @@ getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW /* Write a string to STREAM. */ -extern int fputs __P ((__const char *__restrict __s, - FILE *__restrict __stream)); +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream) + __THROW; #ifdef __USE_GNU /* This function does the same as `fputs' but does not lock the stream. */ -extern int fputs_unlocked __P ((__const char *__restrict __s, - FILE *__restrict __stream)); +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream) __THROW; #endif /* Write a string, followed by a newline, to stdout. */ -extern int puts __P ((__const char *__s)); +extern int puts (__const char *__s) __THROW; /* Push a character back onto the input buffer of STREAM. */ -extern int ungetc __P ((int __c, FILE *__stream)); +extern int ungetc (int __c, FILE *__stream) __THROW; /* Read chunks of generic data from STREAM. */ -extern size_t fread __P ((__ptr_t __restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream)); +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __THROW; /* Write chunks of generic data to STREAM. */ -extern size_t fwrite __P ((__const __ptr_t __restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __s)); +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __THROW; #ifdef __USE_MISC /* Faster versions when locking is not necessary. */ -extern size_t fread_unlocked __P ((void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream)); -extern size_t fwrite_unlocked __P ((__const void *__restrict __ptr, - size_t __size, size_t __n, - FILE *__restrict __stream)); +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __THROW; +extern size_t fwrite_unlocked (__const void *__restrict __ptr, + size_t __size, size_t __n, + FILE *__restrict __stream) __THROW; #endif /* Seek to a certain position on STREAM. */ -extern int fseek __P ((FILE *__stream, long int __off, int __whence)); +extern int fseek (FILE *__stream, long int __off, int __whence) __THROW; /* Return the current position of STREAM. */ -extern long int ftell __P ((FILE *__stream)); +extern long int ftell (FILE *__stream) __THROW; /* Rewind to the beginning of STREAM. */ -extern void rewind __P ((FILE *__stream)); +extern void rewind (FILE *__stream) __THROW; /* Get STREAM's position. */ -extern int fgetpos __P ((FILE *__restrict __stream, fpos_t *__restrict __pos)); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) + __THROW; /* Set STREAM's position. */ -extern int fsetpos __P ((FILE *__stream, __const fpos_t *__pos)); +extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __THROW; /* Clear the error and EOF indicators for STREAM. */ -extern void clearerr __P ((FILE *__stream)); +extern void clearerr (FILE *__stream) __THROW; /* Return the EOF indicator for STREAM. */ -extern int feof __P ((FILE *__stream)); +extern int feof (FILE *__stream) __THROW; /* Return the error indicator for STREAM. */ -extern int ferror __P ((FILE *__stream)); +extern int ferror (FILE *__stream) __THROW; #ifdef __OPTIMIZE__ #define feof(stream) ((stream)->__eof != 0) @@ -732,9 +730,9 @@ extern int ferror __P ((FILE *__stream)); #ifdef __USE_MISC /* Faster versions when locking is not required. */ -extern void clearerr_unlocked __P ((FILE *__stream)); -extern int feof_unlocked __P ((FILE *__stream)); -extern int ferror_unlocked __P ((FILE *__stream)); +extern void clearerr_unlocked (FILE *__stream) __THROW; +extern int feof_unlocked (FILE *__stream) __THROW; +extern int ferror_unlocked (FILE *__stream) __THROW; # ifdef __OPTIMIZE__ # define feof_unlocked(stream) ((stream)->__eof != 0) @@ -743,39 +741,39 @@ extern int ferror_unlocked __P ((FILE *__stream)); #endif /* Print a message describing the meaning of the value of errno. */ -extern void perror __P ((__const char *__s)); +extern void perror (__const char *__s) __THROW; #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ -extern int fileno __P ((FILE *__stream)); +extern int fileno (FILE *__stream) __THROW; #endif /* Use POSIX. */ #ifdef __USE_MISC /* Faster version when locking is not required. */ -extern int fileno_unlocked __P ((FILE *__stream)); +extern int fileno_unlocked (FILE *__stream) __THROW; #endif #if (defined __USE_POSIX2 || defined __USE_SVID || defined __USE_BSD || \ defined __USE_MISC) /* Create a new stream connected to a pipe running the given command. */ -extern FILE *popen __P ((__const char *__command, __const char *__modes)); +extern FILE *popen (__const char *__command, __const char *__modes) __THROW; /* Close a stream opened by popen and return the status of its child. */ -extern int pclose __P ((FILE *__stream)); +extern int pclose (FILE *__stream) __THROW; #endif #ifdef __USE_POSIX /* Return the name of the controlling terminal. */ -extern char *ctermid __P ((char *__s)); +extern char *ctermid (char *__s) __THROW; #endif #ifdef __USE_XOPEN /* Return the name of the current user. */ -extern char *cuserid __P ((char *__s)); +extern char *cuserid (char *__s) __THROW; #endif @@ -783,14 +781,13 @@ extern char *cuserid __P ((char *__s)); struct obstack; /* See <obstack.h>. */ /* Open a stream that writes to OBSTACK. */ -extern FILE *open_obstack_stream __P ((struct obstack *__obstack)); +extern FILE *open_obstack_stream (struct obstack *__obstack) __THROW; /* Write formatted output to an obstack. */ -extern int obstack_printf __P ((struct obstack *__obstack, - __const char *__format, ...)); -extern int obstack_vprintf __P ((struct obstack *__obstack, - __const char *__format, - __gnuc_va_list __args)); +extern int obstack_printf (struct obstack *__obstack, + __const char *__format, ...) __THROW; +extern int obstack_vprintf (struct obstack *__obstack, __const char *__format, + __gnuc_va_list __args) __THROW; #endif @@ -798,14 +795,14 @@ extern int obstack_vprintf __P ((struct obstack *__obstack, /* These are defined in POSIX.1:1996. */ /* Acquire ownership of STREAM. */ -extern void flockfile __P ((FILE *__stream)); +extern void flockfile (FILE *__stream) __THROW; /* Try to acquire ownership of STREAM but do not block if it is not possible. */ -extern int ftrylockfile __P ((FILE *__stream)); +extern int ftrylockfile (FILE *__stream) __THROW; /* Relinquish the ownership granted for STREAM. */ -extern void funlockfile __P ((FILE *__stream)); +extern void funlockfile (FILE *__stream) __THROW; #endif /* POSIX || misc */ #if defined __USE_XOPEN && !defined __USE_GNU diff --git a/stdlib/alloca.h b/stdlib/alloca.h index 741eca7..374f6bb 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 56139b9..ae16684 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 de288a2..e665f07 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 70a975e..30a1083 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; /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. Returns a file descriptor open on the file for reading and writing, or -1 if it cannot create a uniquely-named file. */ -extern int mkstemp __P ((char *__template)); +extern int mkstemp (char *__template) __THROW; #endif #ifdef __USE_BSD @@ -579,19 +577,19 @@ extern int mkstemp __P ((char *__template)); they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ -extern char *mkdtemp __P ((char *__template)); +extern char *mkdtemp (char *__template) __THROW; #endif /* Execute the given line as a shell command. */ -extern int system __P ((__const char *__command)); +extern int system (__const char *__command) __THROW; #ifdef __USE_GNU /* Return a malloc'd string containing the canonical absolute name of the named file. The last file name component need not exist, and may be a symlink to a nonexistent file. */ -extern char *canonicalize_file_name __P ((__const char *__name)); +extern char *canonicalize_file_name (__const char *__name) __THROW; #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED @@ -601,15 +599,15 @@ extern char *canonicalize_file_name __P ((__const char *__name)); name is PATH_MAX chars or more, returns null with `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. */ -extern char *realpath __P ((__const char *__restrict __name, - char *__restrict __resolved)); +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __THROW; #endif /* Shorthand for type of comparison functions. */ #ifndef __COMPAR_FN_T # define __COMPAR_FN_T -typedef int (*__compar_fn_t) __PMT ((__const __ptr_t, __const __ptr_t)); +typedef int (*__compar_fn_t) (__const void *, __const void *); # ifdef __USE_GNU typedef __compar_fn_t comparison_fn_t; @@ -618,35 +616,35 @@ typedef __compar_fn_t comparison_fn_t; /* Do a binary search for KEY in BASE, which consists of NMEMB elements of SIZE bytes each, using COMPAR to perform the comparisons. */ -extern __ptr_t bsearch __PMT ((__const __ptr_t __key, __const __ptr_t __base, - size_t __nmemb, size_t __size, - __compar_fn_t __compar)); +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar); /* Sort NMEMB elements of BASE, of SIZE bytes each, using COMPAR to perform the comparisons. */ -extern void qsort __PMT ((__ptr_t __base, size_t __nmemb, size_t __size, - __compar_fn_t __compar)); +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar); /* Return the absolute value of X. */ -extern int abs __P ((int __x)) __attribute__ ((__const__)); -extern long int labs __P ((long int __x)) __attribute__ ((__const__)); +extern int abs (int __x) __THROW __attribute__ ((__const__)); +extern long int labs (long int __x) __THROW __attribute__ ((__const__)); #ifdef __USE_ISOC9X -__extension__ extern long long int llabs __P ((long long int __x)) - __attribute__ ((__const__)); +__extension__ extern long long int llabs (long long int __x) + __THROW __attribute__ ((__const__)); #endif /* Return the `div_t', `ldiv_t' or `lldiv_t' representation of the value of NUMER over DENOM. */ /* GCC may have built-ins for these someday. */ -extern div_t div __P ((int __numer, int __denom)) __attribute__ ((__const__)); -extern ldiv_t ldiv __P ((long int __numer, long int __denom)) - __attribute__ ((__const__)); +extern div_t div (int __numer, int __denom) + __THROW __attribute__ ((__const__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + __THROW __attribute__ ((__const__)); #ifdef __USE_ISOC9X -__extension__ extern lldiv_t lldiv __P ((long long int __numer, - long long int __denom)) - __attribute__ ((__const__)); +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __THROW __attribute__ ((__const__)); #endif @@ -657,66 +655,67 @@ __extension__ extern lldiv_t lldiv __P ((long long int __numer, /* Convert VALUE to a string with NDIGIT digits and return a pointer to this. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ -extern char *ecvt __P ((double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign)); +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __THROW; /* Convert VALUE to a string rounded to NDIGIT decimal digits. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ -extern char *fcvt __P ((double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign)); +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __THROW; /* If possible convert VALUE to a string with NDIGIT significant digits. Otherwise use exponential representation. The resulting string will be written to BUF. */ -extern char *gcvt __P ((double __value, int __ndigit, char *__buf)); +extern char *gcvt (double __value, int __ndigit, char *__buf) __THROW; /* Long double versions of above functions. */ -extern char *qecvt __P ((__long_double_t __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign)); -extern char *qfcvt __P ((__long_double_t __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign)); -extern char *qgcvt __P ((__long_double_t __value, int __ndigit, char *__buf)); +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) __THROW; +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) __THROW; +extern char *qgcvt (long double __value, int __ndigit, char *__buf) __THROW; # ifdef __USE_MISC /* Reentrant version of the functions above which provide their own buffers. */ -extern int ecvt_r __P ((double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign, char *__restrict __buf, - size_t __len)); -extern int fcvt_r __P ((double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign, char *__restrict __buf, - size_t __len)); - -extern int qecvt_r __P ((__long_double_t __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign, - char *__restrict __buf, size_t __len)); -extern int qfcvt_r __P ((__long_double_t __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign, - char *__restrict __buf, size_t __len)); +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __THROW; +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __THROW; + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) __THROW; +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) __THROW; # endif /* misc */ #endif /* use MISC || use X/Open Unix */ /* Return the length of the multibyte character in S, which is no longer than N. */ -extern int mblen __P ((__const char *__s, size_t __n)); +extern int mblen (__const char *__s, size_t __n) __THROW; /* Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. */ -extern int mbtowc __P ((wchar_t *__restrict __pwc, - __const char *__restrict __s, size_t __n)); +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __THROW; /* Put the multibyte character represented by WCHAR in S, returning its length. */ -extern int wctomb __P ((char *__s, wchar_t __wchar)); +extern int wctomb (char *__s, wchar_t __wchar) __THROW; /* Convert a multibyte string to a wide char string. */ -extern size_t mbstowcs __P ((wchar_t *__restrict __pwcs, - __const char *__restrict __s, size_t __n)); +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __THROW; /* Convert a wide char string to multibyte string. */ -extern size_t wcstombs __P ((char *__restrict __s, - __const wchar_t *__restrict __pwcs, size_t __n)); +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __THROW; #ifdef __USE_SVID @@ -724,7 +723,7 @@ extern size_t wcstombs __P ((char *__restrict __s, or negative response expression as specified by the LC_MESSAGES category in the program's current locale. Returns 1 if affirmative, 0 if negative, and -1 if not matching. */ -extern int rpmatch __P ((__const char *__response)); +extern int rpmatch (__const char *__response) __THROW; #endif @@ -735,16 +734,16 @@ extern int rpmatch __P ((__const char *__response)); not part of TOKENS return in *VALUEP beginning of unknown suboption. On exit *OPTIONP is set to the beginning of the next token or at the terminating NUL character. */ -extern int getsubopt __P ((char **__restrict __optionp, - char *__const *__restrict __tokens, - char **__restrict __valuep)); +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) __THROW; #endif #ifdef __USE_XOPEN /* Setup DES tables according KEY. */ -extern void setkey __P ((__const char *__key)); +extern void setkey (__const char *__key) __THROW; /* X/Open pseudo terminal handling. */ @@ -752,33 +751,33 @@ extern void setkey __P ((__const char *__key)); perform an operation on the associated slave: */ /* Chown the slave to the calling user. */ -extern int grantpt __P ((int __fd)); +extern int grantpt (int __fd) __THROW; /* Release an internal lock so the slave can be opened. Call after grantpt(). */ -extern int unlockpt __P ((int __fd)); +extern int unlockpt (int __fd) __THROW; /* Return the pathname of the pseudo terminal slave assoicated with the master FD is open on, or NULL on errors. The returned storage is good until the next call to this function. */ -extern char *ptsname __P ((int __fd)); +extern char *ptsname (int __fd) __THROW; #endif #ifdef __USE_GNU /* Store at most BUFLEN characters of the pathname of the slave pseudo terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ -extern int ptsname_r __P ((int __fd, char *__buf, size_t __buflen)); +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __THROW; /* Open a master pseudo terminal and return its file descriptor. */ -extern int getpt __P ((void)); +extern int getpt (void) __THROW; #endif #ifdef __USE_BSD /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. Return the number written (never more than three, but may be less than NELEM), or -1 if an error occurred. */ -extern int getloadavg __P ((double __loadavg[], int __nelem)); +extern int getloadavg (double __loadavg[], int __nelem) __THROW; #endif #endif /* don't just need malloc and calloc */ diff --git a/stdlib/ucontext.h b/stdlib/ucontext.h index d99e95e..9e92a61 100644 --- a/stdlib/ucontext.h +++ b/stdlib/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -29,14 +29,14 @@ __BEGIN_DECLS /* Get user context and store it in variable pointed to by UCP. */ -extern int getcontext __P ((ucontext_t *__ucp)); +extern int getcontext (ucontext_t *__ucp) __THROW; /* Set user context from information of variable pointed to by UCP. */ -extern int setcontext __P ((__const ucontext_t *__ucp)); +extern int setcontext (__const ucontext_t *__ucp) __THROW; /* Save current context in context variable pointed to by OUCP and set context from variable pointed to by UCP. */ -extern int swapcontext __P ((ucontext_t *__oucp, __const ucontext_t *__ucp)); +extern int swapcontext (ucontext_t *__oucp, __const ucontext_t *__ucp) __THROW; /* Manipulate user context UCP to continue with calling functions FUNC and the ARGC-1 parameters following ARGC when the context is used @@ -44,8 +44,8 @@ extern int swapcontext __P ((ucontext_t *__oucp, __const ucontext_t *__ucp)); We cannot say anything about the parameters FUNC takes; `void' is as good as any other choice. */ -extern void makecontext __P ((ucontext_t *__ucp, void (*__func) (void), - int __argc, ...)); +extern void makecontext (ucontext_t *__ucp, void (*__func) (void), + int __argc, ...) __THROW; __END_DECLS diff --git a/streams/stropts.h b/streams/stropts.h index 52d0a04..fa5c249 100644 --- a/streams/stropts.h +++ b/streams/stropts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -29,38 +29,38 @@ __BEGIN_DECLS /* Test whether FILDES is associated with a STREAM-based file. */ -extern int isastream __P ((int __fildes)); +extern int isastream (int __fildes) __THROW; /* Receive next message from a STREAMS file. */ -extern int getmsg __P ((int __fildes, struct strbuf *__ctlptr, - struct strbuf *__dataptr, int *__flagsp)); +extern int getmsg (int __fildes, struct strbuf *__ctlptr, + struct strbuf *__dataptr, int *__flagsp) __THROW; /* Receive next message from a STREAMS file, with *FLAGSP allowing to control which message. */ -extern int getpmsg __P ((int __fildes, struct strbuf *__ctlptr, - struct strbuf *__dataptr, int *__bandp, - int *__flagsp)); +extern int getpmsg (int __fildes, struct strbuf *__ctlptr, + struct strbuf *__dataptr, int *__bandp, int *__flagsp) + __THROW; /* Perform the I/O control operation specified by REQUEST on FD. One argument may follow; its presence and type depend on REQUEST. Return value depends on REQUEST. Usually -1 indicates error. */ -extern int ioctl __P ((int __fd, unsigned long int __request, ...)); +extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; /* Send a message on a STREAM. */ -extern int putmsg __P ((int __fildes, __const struct strbuf *__ctlptr, - __const struct strbuf *__dataptr, int __flags)); +extern int putmsg (int __fildes, __const struct strbuf *__ctlptr, + __const struct strbuf *__dataptr, int __flags) __THROW; /* Send a message on a STREAM to the BAND. */ -extern int putpmsg __P ((int __fildes, __const struct strbuf *__ctlptr, - __const struct strbuf *__dataptr, int __band, - int __flags)); +extern int putpmsg (int __fildes, __const struct strbuf *__ctlptr, + __const struct strbuf *__dataptr, int __band, int __flags) + __THROW; /* Attach a STREAMS-based file descriptor FILDES to a file PATH in the file system name space. */ -extern int fattach __P ((int __fildes, __const char *__path)); +extern int fattach (int __fildes, __const char *__path) __THROW; /* Detach a name PATH from a STREAMS-based file descriptor. */ -extern int fdetach __P ((__const char *__path)); +extern int fdetach (__const char *__path) __THROW; __END_DECLS diff --git a/string/argz.h b/string/argz.h index 4b25cc0..a90da9a 100644 --- a/string/argz.h +++ b/string/argz.h @@ -1,6 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc. - Written by Miles Bader <miles@gnu.org> + Copyright (C) 1995, 96, 97, 98, 99 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -40,76 +39,74 @@ __BEGIN_DECLS /* Make a '\0' separated arg vector from a unix argv vector, returning it in ARGZ, and the total length in LEN. If a memory allocation error occurs, ENOMEM is returned, otherwise 0. The result can be destroyed using free. */ -extern error_t __argz_create __P ((char *__const __argv[], - char **__restrict __argz, - size_t *__restrict __len)); -extern error_t argz_create __P ((char *__const __argv[], - char **__restrict __argz, - size_t *__restrict __len)); +extern error_t __argz_create (char *__const __argv[], char **__restrict __argz, + size_t *__restrict __len) __THROW; +extern error_t argz_create (char *__const __argv[], char **__restrict __argz, + size_t *__restrict __len) __THROW; /* Make a '\0' separated arg vector from a SEP separated list in STRING, returning it in ARGZ, and the total length in LEN. If a memory allocation error occurs, ENOMEM is returned, otherwise 0. The result can be destroyed using free. */ -extern error_t __argz_create_sep __P ((__const char *__restrict __string, - int __sep, char **__restrict __argz, - size_t *__restrict __len)); -extern error_t argz_create_sep __P ((__const char *__restrict __string, - int __sep, char **__restrict __argz, - size_t *__restrict __len)); +extern error_t __argz_create_sep (__const char *__restrict __string, + int __sep, char **__restrict __argz, + size_t *__restrict __len) __THROW; +extern error_t argz_create_sep (__const char *__restrict __string, + int __sep, char **__restrict __argz, + size_t *__restrict __len) __THROW; /* Returns the number of strings in ARGZ. */ -extern size_t __argz_count __P ((__const char *__argz, size_t __len)); -extern size_t argz_count __P ((__const char *__argz, size_t __len)); +extern size_t __argz_count (__const char *__argz, size_t __len) __THROW; +extern size_t argz_count (__const char *__argz, size_t __len) __THROW; /* Puts pointers to each string in ARGZ into ARGV, which must be large enough to hold them all. */ -extern void __argz_extract __P ((__const char *__restrict __argz, size_t __len, - char **__restrict __argv)); -extern void argz_extract __P ((__const char *__restrict __argz, size_t __len, - char **__restrict __argv)); +extern void __argz_extract (__const char *__restrict __argz, size_t __len, + char **__restrict __argv) __THROW; +extern void argz_extract (__const char *__restrict __argz, size_t __len, + char **__restrict __argv) __THROW; /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ -extern void __argz_stringify __P ((char *__argz, size_t __len, int __sep)); -extern void argz_stringify __P ((char *__argz, size_t __len, int __sep)); +extern void __argz_stringify (char *__argz, size_t __len, int __sep) __THROW; +extern void argz_stringify (char *__argz, size_t __len, int __sep) __THROW; /* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */ -extern error_t __argz_append __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - __const char *__restrict __buf, - size_t _buf_len)); -extern error_t argz_append __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - __const char *__restrict __buf, - size_t __buf_len)); +extern error_t __argz_append (char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __buf, size_t _buf_len) + __THROW; +extern error_t argz_append (char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __buf, size_t __buf_len) + __THROW; /* Append STR to the argz vector in ARGZ & ARGZ_LEN. */ -extern error_t __argz_add __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - __const char *__restrict __str)); -extern error_t argz_add __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - __const char *__restrict __str)); +extern error_t __argz_add (char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __str) __THROW; +extern error_t argz_add (char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __str) __THROW; /* Append SEP separated list in STRING to the argz vector in ARGZ & ARGZ_LEN. */ -extern error_t __argz_add_sep __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - __const char *__restrict __string, - int __delim)); -extern error_t argz_add_sep __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - __const char *__restrict __string, - int __delim)); +extern error_t __argz_add_sep (char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __string, int __delim) + __THROW; +extern error_t argz_add_sep (char **__restrict __argz, + size_t *__restrict __argz_len, + __const char *__restrict __string, int __delim) + __THROW; /* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */ -extern void __argz_delete __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - char *__restrict __entry)); -extern void argz_delete __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - char *__restrict __entry)); +extern void __argz_delete (char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __entry) __THROW; +extern void argz_delete (char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __entry) __THROW; /* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end. @@ -117,14 +114,14 @@ extern void argz_delete __P ((char **__restrict __argz, ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not in ARGZ, EINVAL is returned, else if memory can't be allocated for the new ARGZ, ENOMEM is returned, else 0. */ -extern error_t __argz_insert __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - char *__restrict __before, - __const char *__restrict __entry)); -extern error_t argz_insert __P ((char **__restrict __argz, - size_t *__restrict __argz_len, - char *__restrict __before, - __const char *__restrict __entry)); +extern error_t __argz_insert (char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __before, + __const char *__restrict __entry) __THROW; +extern error_t argz_insert (char **__restrict __argz, + size_t *__restrict __argz_len, + char *__restrict __before, + __const char *__restrict __entry) __THROW; /* Replace any occurances of the string STR in ARGZ with WITH, reallocating ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be @@ -154,12 +151,10 @@ extern error_t argz_replace (char **__restrict __argz, for (entry = argz; entry; entry = argz_next (argz, argz_len, entry)) ...; */ -extern char *__argz_next __P ((__const char *__restrict __argz, - size_t __argz_len, - __const char *__restrict __entry)); -extern char *argz_next __P ((__const char *__restrict __argz, - size_t __argz_len, - __const char *__restrict __entry)); +extern char *__argz_next (__const char *__restrict __argz, size_t __argz_len, + __const char *__restrict __entry) __THROW; +extern char *argz_next (__const char *__restrict __argz, size_t __argz_len, + __const char *__restrict __entry) __THROW; #ifdef __USE_EXTERN_INLINES extern inline char * diff --git a/string/bits/string2.h b/string/bits/string2.h index 902e924..e015609 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -368,7 +368,7 @@ __mempcpy_small (void *__dest, char __src1, /* Return pointer to C in S. */ #ifndef _HAVE_STRING_ARCH_strchr -extern __ptr_t __rawmemchr (const __ptr_t __s, int __c); +extern void *__rawmemchr (const void *__s, int __c); # define strchr(s, c) \ (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ ? (char *) __rawmemchr (s, c) \ diff --git a/string/envz.h b/string/envz.h index f9a8e69..1595a95 100644 --- a/string/envz.h +++ b/string/envz.h @@ -1,6 +1,5 @@ /* Routines for dealing with '\0' separated environment vectors - Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc. - Written by Miles Bader <miles@gnu.ai.mit.edu> + Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -31,14 +30,13 @@ __BEGIN_DECLS /* Returns a pointer to the entry in ENVZ for NAME, or 0 if there is none. */ -extern char *envz_entry __P ((__const char *__restrict __envz, - size_t __envz_len, - __const char *__restrict __name)); +extern char *envz_entry (__const char *__restrict __envz, size_t __envz_len, + __const char *__restrict __name) __THROW; /* Returns a pointer to the value portion of the entry in ENVZ for NAME, or 0 if there is none. */ -extern char *envz_get __P ((__const char *__restrict __envz, size_t __envz_len, - __const char *__restrict __name)); +extern char *envz_get (__const char *__restrict __envz, size_t __envz_len, + __const char *__restrict __name) __THROW; /* Adds an entry for NAME with value VALUE to ENVZ & ENVZ_LEN. If an entry with the same name already exists in ENVZ, it is removed. If VALUE is @@ -46,27 +44,27 @@ extern char *envz_get __P ((__const char *__restrict __envz, size_t __envz_len, return NULL, although envz_entry will still return an entry; this is handy because when merging with another envz, the null entry can override an entry in the other one. Null entries can be removed with envz_strip (). */ -extern error_t envz_add __P ((char **__restrict __envz, - size_t *__restrict __envz_len, - __const char *__restrict __name, - __const char *__restrict __value)); +extern error_t envz_add (char **__restrict __envz, + size_t *__restrict __envz_len, + __const char *__restrict __name, + __const char *__restrict __value) __THROW; /* Adds each entry in ENVZ2 to ENVZ & ENVZ_LEN, as if with envz_add(). If OVERRIDE is true, then values in ENVZ2 will supersede those with the same name in ENV, otherwise not. */ -extern error_t envz_merge __P ((char **__restrict __envz, - size_t *__restrict __envz_len, - __const char *__restrict __envz2, - size_t __envz2_len, int __override)); +extern error_t envz_merge (char **__restrict __envz, + size_t *__restrict __envz_len, + __const char *__restrict __envz2, + size_t __envz2_len, int __override) __THROW; /* Remove the entry for NAME from ENVZ & ENVZ_LEN, if any. */ -extern void envz_remove __P ((char **__restrict __envz, - size_t *__restrict __envz_len, - __const char *__restrict __name)); +extern void envz_remove (char **__restrict __envz, + size_t *__restrict __envz_len, + __const char *__restrict __name) __THROW; /* Remove null entries. */ -extern void envz_strip __P ((char **__restrict __envz, - size_t *__restrict __envz_len)); +extern void envz_strip (char **__restrict __envz, + size_t *__restrict __envz_len) __THROW; __END_DECLS diff --git a/string/string.h b/string/string.h index a09d42a..4a8ba40 100644 --- a/string/string.h +++ b/string/string.h @@ -34,66 +34,67 @@ __BEGIN_DECLS /* Copy N bytes of SRC to DEST. */ -extern __ptr_t memcpy __P ((__ptr_t __restrict __dest, - __const __ptr_t __restrict __src, size_t __n)); +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) __THROW; /* Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ -extern __ptr_t memmove __P ((__ptr_t __dest, __const __ptr_t __src, - size_t __n)); +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __THROW; /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN -extern __ptr_t memccpy __P ((__ptr_t __dest, __const __ptr_t __src, - int __c, size_t __n)); +extern void *memccpy (void *__dest, __const void *__src, int __c, size_t __n) + __THROW; #endif /* SVID. */ /* Set N bytes of S to C. */ -extern __ptr_t memset __P ((__ptr_t __s, int __c, size_t __n)); +extern void *memset (void *__s, int __c, size_t __n) __THROW; /* Compare N bytes of S1 and S2. */ -extern int memcmp __P ((__const __ptr_t __s1, __const __ptr_t __s2, - size_t __n)); +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __THROW; /* Search N bytes of S for C. */ -extern __ptr_t memchr __P ((__const __ptr_t __s, int __c, size_t __n)); +extern void *memchr (__const void *__s, int __c, size_t __n) __THROW; #ifdef __USE_GNU /* Search in S for C. This is similar to `memchr' but there is no length limit. */ -extern __ptr_t rawmemchr __P ((__const __ptr_t __s, int __c)); +extern void *rawmemchr (__const void *__s, int __c) __THROW; /* Search N bytes of S for the final occurrence of C. */ -extern __ptr_t memrchr __P ((__const __ptr_t __s, int __c, size_t __n)); +extern void *memrchr (__const void *__s, int __c, size_t __n) __THROW; #endif /* Copy SRC to DEST. */ -extern char *strcpy __P ((char *__restrict __dest, - __const char *__restrict __src)); +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __THROW; /* Copy no more than N characters of SRC to DEST. */ -extern char *strncpy __P ((char *__restrict __dest, - __const char *__restrict __src, size_t __n)); +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) __THROW; /* Append SRC onto DEST. */ -extern char *strcat __P ((char *__restrict __dest, - __const char *__restrict __src)); +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __THROW; /* Append no more than N characters from SRC onto DEST. */ -extern char *strncat __P ((char *__restrict __dest, - __const char *__restrict __src, size_t __n)); +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __THROW; /* Compare S1 and S2. */ -extern int strcmp __P ((__const char *__s1, __const char *__s2)); +extern int strcmp (__const char *__s1, __const char *__s2) __THROW; /* Compare N characters of S1 and S2. */ -extern int strncmp __P ((__const char *__s1, __const char *__s2, size_t __n)); +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __THROW; /* Compare the collated forms of S1 and S2. */ -extern int strcoll __P ((__const char *__s1, __const char *__s2)); +extern int strcoll (__const char *__s1, __const char *__s2) __THROW; /* Put a transformation of SRC into no more than N bytes of DEST. */ -extern size_t strxfrm __P ((char *__restrict __dest, - __const char *__restrict __src, size_t __n)); +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) __THROW; #ifdef __USE_GNU /* The following functions are equivalent to the both above but they @@ -102,24 +103,24 @@ extern size_t strxfrm __P ((char *__restrict __dest, # include <xlocale.h> /* Compare the collated forms of S1 and S2 using rules from L. */ -extern int __strcoll_l __P ((__const char *__s1, __const char *__s2, - __locale_t __l)); +extern int __strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __THROW; /* Put a transformation of SRC into no more than N bytes of DEST. */ -extern size_t __strxfrm_l __P ((char *__dest, __const char *__src, size_t __n, - __locale_t __l)); +extern size_t __strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __THROW; #endif #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Duplicate S, returning an identical malloc'd string. */ -extern char *__strdup __P ((__const char *__s)); -extern char *strdup __P ((__const char *__s)); +extern char *__strdup (__const char *__s) __THROW; +extern char *strdup (__const char *__s) __THROW; #endif /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ #if defined __USE_GNU -extern char *strndup __P ((__const char *__string, size_t __n)); +extern char *strndup (__const char *__string, size_t __n) __THROW; #endif #if defined __USE_GNU && defined __GNUC__ @@ -146,178 +147,177 @@ extern char *strndup __P ((__const char *__string, size_t __n)); #endif /* Find the first occurrence of C in S. */ -extern char *strchr __P ((__const char *__s, int __c)); +extern char *strchr (__const char *__s, int __c) __THROW; /* Find the last occurrence of C in S. */ -extern char *strrchr __P ((__const char *__s, int __c)); +extern char *strrchr (__const char *__s, int __c) __THROW; #ifdef __USE_GNU /* This funciton is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ -extern char *strchrnul __P ((__const char *__s, int __c)); +extern char *strchrnul (__const char *__s, int __c) __THROW; #endif /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ -extern size_t strcspn __P ((__const char *__s, __const char *__reject)); +extern size_t strcspn (__const char *__s, __const char *__reject) __THROW; /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ -extern size_t strspn __P ((__const char *__s, __const char *__accept)); +extern size_t strspn (__const char *__s, __const char *__accept) __THROW; /* Find the first occurrence in S of any character in ACCEPT. */ -extern char *strpbrk __P ((__const char *__s, __const char *__accept)); +extern char *strpbrk (__const char *__s, __const char *__accept) __THROW; /* Find the first occurrence of NEEDLE in HAYSTACK. */ -extern char *strstr __P ((__const char *__haystack, __const char *__needle)); +extern char *strstr (__const char *__haystack, __const char *__needle) __THROW; #ifdef __USE_GNU /* Similar to `strstr' but this function ignores the case of both strings. */ -extern char *__strcasestr __P ((__const char *__haystack, - __const char *__needle)); -extern char *strcasestr __P ((__const char *__haystack, - __const char *__needle)); +extern char *__strcasestr (__const char *__haystack, __const char *__needle) + __THROW; +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __THROW; #endif /* Divide S into tokens separated by characters in DELIM. */ -extern char *strtok __P ((char *__restrict __s, - __const char *__restrict __delim)); +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __THROW; /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ -extern char *__strtok_r __P ((char *__restrict __s, - __const char *__restrict __delim, - char **__restrict __save_ptr)); +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) __THROW; #if defined __USE_POSIX || defined __USE_MISC -extern char *strtok_r __P ((char *__restrict __s, - __const char *__restrict __delim, - char **__restrict __save_ptr)); +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) __THROW; #endif #ifdef __USE_GNU /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ -extern __ptr_t memmem __P ((__const __ptr_t __haystack, size_t __haystacklen, - __const __ptr_t __needle, size_t __needlelen)); +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) __THROW; /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ -extern __ptr_t __mempcpy __P ((__ptr_t __restrict __dest, - __const __ptr_t __restrict __src, size_t __n)); -extern __ptr_t mempcpy __P ((__ptr_t __restrict __dest, - __const __ptr_t __restrict __src, size_t __n)); +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) __THROW; +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) __THROW; #endif /* Return the length of S. */ -extern size_t strlen __P ((__const char *__s)); +extern size_t strlen (__const char *__s) __THROW; #ifdef __USE_GNU /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ -extern size_t strnlen __P ((__const char *__string, size_t __maxlen)); +extern size_t strnlen (__const char *__string, size_t __maxlen) __THROW; #endif /* Return a string describing the meaning of the `errno' code in ERRNUM. */ -extern char *strerror __P ((int __errnum)); +extern char *strerror (int __errnum) __THROW; #ifdef __USE_MISC /* Reentrant version of `strerror'. If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ -extern char *__strerror_r __P ((int __errnum, char *__buf, size_t __buflen)); -extern char *strerror_r __P ((int __errnum, char *__buf, size_t __buflen)); +extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW; +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW; #endif /* We define this function always since `bzero' is sometimes needed when the namespace rules does not allow this. */ -extern void __bzero __P ((__ptr_t __s, size_t __n)); +extern void __bzero (void *__s, size_t __n) __THROW; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ -extern void bcopy __P ((__const __ptr_t __src, __ptr_t __dest, size_t __n)); +extern void bcopy (__const void *__src, void *__dest, size_t __n) __THROW; /* Set N bytes of S to 0. */ -extern void bzero __P ((__ptr_t __s, size_t __n)); +extern void bzero (void *__s, size_t __n) __THROW; /* Compare N bytes of S1 and S2 (same as memcmp). */ -extern int bcmp __P ((__const __ptr_t __s1, __const __ptr_t __s2, size_t __n)); +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) __THROW; /* Find the first occurrence of C in S (same as strchr). */ -extern char *index __P ((__const char *__s, int __c)); +extern char *index (__const char *__s, int __c) __THROW; /* Find the last occurrence of C in S (same as strrchr). */ -extern char *rindex __P ((__const char *__s, int __c)); +extern char *rindex (__const char *__s, int __c) __THROW; /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ -extern int __ffs __P ((int __i)) __attribute__ ((const)); -extern int ffs __P ((int __i)) __attribute__ ((const)); +extern int __ffs (int __i) __THROW __attribute__ ((const)); +extern int ffs (int __i) __THROW __attribute__ ((const)); /* The following two functions are non-standard but necessary for non-32 bit platforms. */ # ifdef __USE_GNU -extern int ffsl __P ((long int __l)) __attribute__ ((const)); +extern int ffsl (long int __l) __THROW __attribute__ ((const)); # ifdef __GNUC__ -__extension__ extern int ffsll __P ((long long int __ll)) - __attribute__ ((const)); +__extension__ extern int ffsll (long long int __ll) + __THROW __attribute__ ((const)); # endif # endif /* Compare S1 and S2, ignoring case. */ -extern int __strcasecmp __P ((__const char *__s1, __const char *__s2)); -extern int strcasecmp __P ((__const char *__s1, __const char *__s2)); +extern int __strcasecmp (__const char *__s1, __const char *__s2) __THROW; +extern int strcasecmp (__const char *__s1, __const char *__s2) __THROW; /* Compare no more than N chars of S1 and S2, ignoring case. */ -extern int strncasecmp __P ((__const char *__s1, __const char *__s2, - size_t __n)); +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __THROW; #endif /* Use BSD or X/Open Unix. */ #ifdef __USE_GNU /* Again versions of a few functions which use the given locale instead of the global one. */ -extern int __strcasecmp_l __P ((__const char *__s1, __const char *__s2, - __locale_t __loc)); +extern int __strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) __THROW; -extern int __strncasecmp_l __P ((__const char *__s1, __const char *__s2, - size_t __n, __locale_t __loc)); +extern int __strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) __THROW; #endif #ifdef __USE_BSD /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ -extern char *strsep __P ((char **__restrict __stringp, - __const char *__restrict __delim)); +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) __THROW; #endif #ifdef __USE_GNU /* Compare S1 and S2 as strings holding name & indices/version numbers. */ -extern int strverscmp __P ((__const char *__s1, __const char *__s2)); +extern int strverscmp (__const char *__s1, __const char *__s2) __THROW; /* Return a string describing the meaning of the signal number in SIG. */ -extern char *strsignal __P ((int __sig)); +extern char *strsignal (int __sig) __THROW; /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ -extern char *__stpcpy __P ((char *__restrict __dest, - __const char *__restrict __src)); -extern char *stpcpy __P ((char *__restrict __dest, - __const char *__restrict __src)); +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __THROW; +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __THROW; /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ -extern char *__stpncpy __P ((char *__restrict __dest, - __const char *__restrict __src, size_t __n)); -extern char *stpncpy __P ((char *__restrict __dest, - __const char *__restrict __src, size_t __n)); +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) __THROW; +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) __THROW; /* Sautee STRING briskly. */ -extern char *strfry __P ((char *__string)); +extern char *strfry (char *__string) __THROW; /* Frobnicate N bytes of S. */ -extern __ptr_t memfrob __P ((__ptr_t __s, size_t __n)); +extern void *memfrob (void *__s, size_t __n) __THROW; # ifndef basename /* Return the file name within directory of FILENAME. We don't declare the function if the `basename' macro is available (defined in <libgen.h>) which makes the XPG version of this function available. */ -extern char *basename __P ((__const char *__filename)); +extern char *basename (__const char *__filename) __THROW; # endif #endif diff --git a/string/strings.h b/string/strings.h index 20a1af1..3fb92de 100644 --- a/string/strings.h +++ b/string/strings.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 1997, 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 @@ -19,38 +19,44 @@ #ifndef _STRINGS_H #define _STRINGS_H 1 -#include <features.h> -#define __need_size_t -#include <stddef.h> +/* We don't need and should not read this file if <string.h> was already + read. */ +#ifndef _STRING_H + +# include <features.h> +# define __need_size_t +# include <stddef.h> __BEGIN_DECLS /* Compare N bytes of S1 and S2 (same as memcmp). */ -extern int bcmp __P ((__const __ptr_t __s1, __const __ptr_t __s2, size_t __n)); +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) __THROW; /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ -extern void bcopy __P ((__const __ptr_t __src, __ptr_t __dest, size_t __n)); +extern void bcopy (__const void *__src, void *__dest, size_t __n) __THROW; /* Set N bytes of S to 0. */ -extern void bzero __P ((__ptr_t __s, size_t __n)); +extern void bzero (void *__s, size_t __n) __THROW; /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ -extern int ffs __P ((int __i)); +extern int ffs (int __i) __THROW; /* Find the first occurrence of C in S (same as strchr). */ -extern char *index __P ((__const char *__s, int __c)); +extern char *index (__const char *__s, int __c) __THROW; /* Find the last occurrence of C in S (same as strrchr). */ -extern char *rindex __P ((__const char *__s, int __c)); +extern char *rindex (__const char *__s, int __c) __THROW; /* Compare S1 and S2, ignoring case. */ -extern int strcasecmp __P ((__const char *__s1, __const char *__s2)); +extern int strcasecmp (__const char *__s1, __const char *__s2) __THROW; /* Compare no more than N chars of S1 and S2, ignoring case. */ -extern int strncasecmp __P ((__const char *__s1, __const char *__s2, - size_t __n)); +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __THROW; __END_DECLS +#endif /* string.h */ + #endif /* strings.h */ diff --git a/sunrpc/rpc/auth.h b/sunrpc/rpc/auth.h index e0e1e5f..6612957 100644 --- a/sunrpc/rpc/auth.h +++ b/sunrpc/rpc/auth.h @@ -77,7 +77,7 @@ union des_block { char c[8]; }; typedef union des_block des_block; -extern bool_t xdr_des_block __P ((XDR *__xdrs, des_block *__blkp)); +extern bool_t xdr_des_block (XDR *__xdrs, des_block *__blkp) __THROW; /* * Authentication info. Opaque to client. @@ -97,12 +97,12 @@ struct AUTH { struct opaque_auth ah_verf; union des_block ah_key; struct auth_ops { - void (*ah_nextverf) __PMT ((AUTH *)); - int (*ah_marshal) __PMT ((AUTH *, XDR *)); /* nextverf & serialize */ - int (*ah_validate) __PMT ((AUTH *, struct opaque_auth *)); + void (*ah_nextverf) (AUTH *); + int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */ + int (*ah_validate) (AUTH *, struct opaque_auth *); /* validate verifier */ - int (*ah_refresh) __PMT ((AUTH *)); /* refresh credentials */ - void (*ah_destroy) __PMT ((AUTH *)); /* destroy this structure */ + int (*ah_refresh) (AUTH *); /* refresh credentials */ + void (*ah_destroy) (AUTH *); /* destroy this structure */ } *ah_ops; caddr_t ah_private; }; @@ -158,16 +158,15 @@ extern struct opaque_auth _null_auth; * int len; * int *aup_gids; */ -extern AUTH *authunix_create __P ((char *__machname, __uid_t __uid, - __gid_t __gid, int __len, - __gid_t *__aup_gids)); -extern AUTH *authunix_create_default __P ((void)); -extern AUTH *authnone_create __P ((void)); -extern AUTH *authdes_create __P ((const char *__servername, u_int __window, - struct sockaddr *__syncaddr, - des_block *__ckey)); -extern AUTH *authdes_pk_create __P ((const char *, netobj *, u_int, - struct sockaddr *, des_block *)); +extern AUTH *authunix_create (char *__machname, __uid_t __uid, __gid_t __gid, + int __len, __gid_t *__aup_gids) __THROW; +extern AUTH *authunix_create_default (void) __THROW; +extern AUTH *authnone_create (void) __THROW; +extern AUTH *authdes_create (const char *__servername, u_int __window, + struct sockaddr *__syncaddr, des_block *__ckey) + __THROW; +extern AUTH *authdes_pk_create (const char *, netobj *, u_int, + struct sockaddr *, des_block *) __THROW; #define AUTH_NONE 0 /* no authentication */ @@ -183,31 +182,31 @@ extern AUTH *authdes_pk_create __P ((const char *, netobj *, u_int, * Netname manipulating functions * */ -extern int getnetname __P ((char *)); -extern int host2netname __P ((char *, __const char *, __const char *)); -extern int user2netname __P ((char *, __const uid_t, __const char *)); -extern int netname2user __P ((__const char *, uid_t *, gid_t *, int *, - gid_t *)); -extern int netname2host __P ((__const char *, char *, __const int)); +extern int getnetname (char *) __THROW; +extern int host2netname (char *, __const char *, __const char *) __THROW; +extern int user2netname (char *, __const uid_t, __const char *) __THROW; +extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *) + __THROW; +extern int netname2host (__const char *, char *, __const int) __THROW; /* * * These routines interface to the keyserv daemon * */ -extern int key_decryptsession __P ((char *, des_block *)); -extern int key_decryptsession_pk __P ((char *, netobj *, des_block *)); -extern int key_encryptsession __P ((char *, des_block *)); -extern int key_encryptsession_pk __P ((char *, netobj *, des_block *)); -extern int key_gendes __P ((des_block *)); -extern int key_setsecret __P ((char *)); -extern int key_secretkey_is_set __P ((void)); -extern int key_get_conv __P ((char *, des_block *)); +extern int key_decryptsession (char *, des_block *) __THROW; +extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_encryptsession (char *, des_block *) __THROW; +extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW; +extern int key_gendes (des_block *) __THROW; +extern int key_setsecret (char *) __THROW; +extern int key_secretkey_is_set (void) __THROW; +extern int key_get_conv (char *, des_block *) __THROW; /* * XDR an opaque authentication struct. */ -extern bool_t xdr_opaque_auth __P ((XDR *, struct opaque_auth *)); +extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *) __THROW; __END_DECLS diff --git a/sunrpc/rpc/auth_des.h b/sunrpc/rpc/auth_des.h index b94bafb..198b299 100644 --- a/sunrpc/rpc/auth_des.h +++ b/sunrpc/rpc/auth_des.h @@ -86,26 +86,25 @@ struct authdes_verf #define adv_nickname adv_int_u /* Map a des credential into a unix cred. */ -extern int authdes_getucred __P ((__const struct authdes_cred * __adc, - uid_t * __uid, gid_t * __gid, - short *__grouplen, gid_t * __groups)); +extern int authdes_getucred (__const struct authdes_cred * __adc, + uid_t * __uid, gid_t * __gid, + short *__grouplen, gid_t * __groups) __THROW; /* Get the public key for NAME and place it in KEY. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getpublickey __P ((__const char *__name, char *__key)); +extern int getpublickey (__const char *__name, char *__key) __THROW; /* Get the secret key for NAME and place it in KEY. PASSWD is used to decrypt the encrypted key stored in the database. NAME can only be up to MAXNETNAMELEN bytes long and the destination buffer KEY should have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */ -extern int getsecretkey __P ((__const char *__name, char *__key, - __const char *__passwd)); +extern int getsecretkey (__const char *__name, char *__key, + __const char *__passwd) __THROW; -extern int rtime __P ((struct sockaddr_in *__addrp, - struct rpc_timeval *__timep, - struct rpc_timeval *__timeout)); +extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep, + struct rpc_timeval *__timeout) __THROW; __END_DECLS diff --git a/sunrpc/rpc/auth_unix.h b/sunrpc/rpc/auth_unix.h index ed3b932..424661d 100644 --- a/sunrpc/rpc/auth_unix.h +++ b/sunrpc/rpc/auth_unix.h @@ -72,8 +72,8 @@ struct authunix_parms __gid_t *aup_gids; }; -extern bool_t xdr_authunix_parms __P ((XDR *__xdrs, - struct authunix_parms *__p)); +extern bool_t xdr_authunix_parms (XDR *__xdrs, struct authunix_parms *__p) + __THROW; /* * If a response verifier has flavor AUTH_SHORT, diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h index b385292..47bd0b5 100644 --- a/sunrpc/rpc/clnt.h +++ b/sunrpc/rpc/clnt.h @@ -133,17 +133,16 @@ typedef struct CLIENT CLIENT; struct CLIENT { AUTH *cl_auth; /* authenticator */ struct clnt_ops { - enum clnt_stat (*cl_call) __PMT ((CLIENT *, u_long, xdrproc_t, - caddr_t, xdrproc_t, - caddr_t, struct timeval)); + enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t, + caddr_t, struct timeval); /* call remote procedure */ - void (*cl_abort) __PMT ((void)); /* abort a call */ - void (*cl_geterr) __PMT ((CLIENT *, struct rpc_err *)); + void (*cl_abort) (void); /* abort a call */ + void (*cl_geterr) (CLIENT *, struct rpc_err *); /* get specific error code */ - bool_t (*cl_freeres) __PMT ((CLIENT *, xdrproc_t, caddr_t)); + bool_t (*cl_freeres) (CLIENT *, xdrproc_t, caddr_t); /* frees results */ - void (*cl_destroy) __PMT ((CLIENT *)); /* destroy this structure */ - bool_t (*cl_control) __PMT ((CLIENT *, int, char *)); + void (*cl_destroy) (CLIENT *); /* destroy this structure */ + bool_t (*cl_control) (CLIENT *, int, char *); /* the ioctl() of rpc */ } *cl_ops; caddr_t cl_private; /* private stuff */ @@ -278,8 +277,8 @@ struct CLIENT { * u_long prog; * u_long vers; */ -extern CLIENT *clntraw_create __P ((__const u_long __prog, - __const u_long __vers)); +extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers) + __THROW; /* @@ -292,8 +291,9 @@ extern CLIENT *clntraw_create __P ((__const u_long __prog, * u_ong vers; -- version number * char *prot; -- protocol */ -extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, - __const u_long __vers, __const char *__prot)); +extern CLIENT *clnt_create (__const char *__host, __const u_long __prog, + __const u_long __vers, __const char *__prot) + __THROW; /* @@ -307,10 +307,9 @@ extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr, - u_long __prog, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clnttcp_create (struct sockaddr_in *__raddr, u_long __prog, + u_long __version, int *__sockp, u_int __sendsz, + u_int __recvsz) __THROW; /* * UDP based rpc. @@ -333,15 +332,13 @@ extern CLIENT *clnttcp_create __P ((struct sockaddr_in *__raddr, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clntudp_create __P ((struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp)); -extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, - u_long __program, u_long __version, - struct timeval __wait_resend, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clntudp_create (struct sockaddr_in *__raddr, u_long __program, + u_long __version, struct timeval __wait_resend, + int *__sockp) __THROW; +extern CLIENT *clntudp_bufcreate (struct sockaddr_in *__raddr, + u_long __program, u_long __version, + struct timeval __wait_resend, int *__sockp, + u_int __sendsz, u_int __recvsz) __THROW; /* @@ -355,35 +352,34 @@ extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, * u_int sendsz; * u_int recvsz; */ -extern CLIENT *clntunix_create __P ((struct sockaddr_un *__raddr, - u_long __program, u_long __version, - int *__sockp, u_int __sendsz, - u_int __recvsz)); +extern CLIENT *clntunix_create (struct sockaddr_un *__raddr, u_long __program, + u_long __version, int *__sockp, + u_int __sendsz, u_int __recvsz) __THROW; -extern int callrpc __P ((__const char *__host, __const u_long __prognum, - __const u_long __versnum, __const u_long __procnum, - __const xdrproc_t __inproc, __const char *__in, - __const xdrproc_t __outproc, char *__out)); -extern int _rpc_dtablesize __P ((void)); +extern int callrpc (__const char *__host, __const u_long __prognum, + __const u_long __versnum, __const u_long __procnum, + __const xdrproc_t __inproc, __const char *__in, + __const xdrproc_t __outproc, char *__out) __THROW; +extern int _rpc_dtablesize (void) __THROW; /* * Print why creation failed */ -extern void clnt_pcreateerror __P ((__const char *__msg)); /* stderr */ -extern char *clnt_spcreateerror __P ((__const char *__msg)); /* string */ +extern void clnt_pcreateerror (__const char *__msg) __THROW; /* stderr */ +extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */ /* * Like clnt_perror(), but is more verbose in its output */ -extern void clnt_perrno __P ((enum clnt_stat __num)); /* stderr */ +extern void clnt_perrno (enum clnt_stat __num) __THROW; /* stderr */ /* * Print an English error message, given the client error code */ -extern void clnt_perror __P ((CLIENT *__clnt, __const char *__msg)); +extern void clnt_perror (CLIENT *__clnt, __const char *__msg) __THROW; /* stderr */ -extern char *clnt_sperror __P ((CLIENT *__clnt, __const char *__msg)); +extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW; /* string */ /* @@ -401,19 +397,19 @@ extern struct rpc_createerr rpc_createerr; /* * Copy error message to buffer. */ -extern char *clnt_sperrno __P ((enum clnt_stat __num)); /* string */ +extern char *clnt_sperrno (enum clnt_stat __num) __THROW; /* string */ /* * get the port number on the host for the rpc program,version and proto */ -extern int getrpcport __P ((__const char * __host, u_long __prognum, - u_long __versnum, u_int proto)); +extern int getrpcport (__const char * __host, u_long __prognum, + u_long __versnum, u_int proto) __THROW; /* * get the local host's IP address without consulting * name service library functions */ -extern void get_myaddress __P ((struct sockaddr_in *)); +extern void get_myaddress (struct sockaddr_in *) __THROW; #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ #define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ diff --git a/sunrpc/rpc/des_crypt.h b/sunrpc/rpc/des_crypt.h index e20cc38..6a65887 100644 --- a/sunrpc/rpc/des_crypt.h +++ b/sunrpc/rpc/des_crypt.h @@ -11,23 +11,23 @@ * may copy or modify Sun RPC without charge, but are not authorized * to license or distribute it to anyone else except as part of a product or * program developed by the user. - * + * * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * + * * Sun RPC is provided with no support and without any obligation on the * part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. - * + * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC * OR ANY PART THEREOF. - * + * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. - * + * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 @@ -47,7 +47,7 @@ __BEGIN_DECLS #define DES_DEVMASK (1 << 1) -#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ +#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ #define DES_SW (1*DES_DEVMASK) /* Use software device */ @@ -77,20 +77,20 @@ __BEGIN_DECLS /* * Cipher Block Chaining mode */ -extern int cbc_crypt __P ((char *__key, char *__buf, unsigned __len, - unsigned __mode, char *__ivec)); +extern int cbc_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode, char *__ivec) __THROW; /* * Electronic Code Book mode */ -extern int ecb_crypt __P ((char *__key, char *__buf, unsigned __len, - unsigned __mode)); +extern int ecb_crypt (char *__key, char *__buf, unsigned __len, + unsigned __mode) __THROW; -/* +/* * Set des parity for a key. * DES parity is odd and in the low bit of each byte */ -extern void des_setparity __P ((char *__key)); +extern void des_setparity (char *__key) __THROW; __END_DECLS diff --git a/sunrpc/rpc/netdb.h b/sunrpc/rpc/netdb.h index 6b820c8..539d8c3 100644 --- a/sunrpc/rpc/netdb.h +++ b/sunrpc/rpc/netdb.h @@ -50,23 +50,23 @@ struct rpcent int r_number; /* RPC program number. */ }; -extern void setrpcent __P ((int _stayopen)); -extern void endrpcent __P ((void)); -extern struct rpcent *getrpcbyname __P ((__const char *__name)); -extern struct rpcent *getrpcbynumber __P ((int __number)); -extern struct rpcent *getrpcent __P ((void)); +extern void setrpcent (int __stayopen) __THROW; +extern void endrpcent (void) __THROW; +extern struct rpcent *getrpcbyname (__const char *__name) __THROW; +extern struct rpcent *getrpcbynumber (int __number) __THROW; +extern struct rpcent *getrpcent (void) __THROW; #ifdef __USE_MISC -extern int getrpcbyname_r __P ((__const char *__name, - struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result)); +extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; -extern int getrpcbynumber_r __P ((int __number, struct rpcent *__result_buf, - char *__buffer, size_t __buflen, - struct rpcent **__result)); +extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __THROW; -extern int getrpcent_r __P ((struct rpcent *__result_buf, char *__buffer, - size_t __buflen, struct rpcent **__result)); +extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, + size_t __buflen, struct rpcent **__result) __THROW; #endif __END_DECLS diff --git a/sunrpc/rpc/pmap_clnt.h b/sunrpc/rpc/pmap_clnt.h index d9800d4..1b1c452 100644 --- a/sunrpc/rpc/pmap_clnt.h +++ b/sunrpc/rpc/pmap_clnt.h @@ -45,8 +45,7 @@ __BEGIN_DECLS -typedef bool_t (*resultproc_t) __PMT ((caddr_t resp, - struct sockaddr_in *raddr)); +typedef bool_t (*resultproc_t) (caddr_t resp, struct sockaddr_in *raddr); /* * Usage: @@ -70,30 +69,29 @@ typedef bool_t (*resultproc_t) __PMT ((caddr_t resp, * address if the responder to the broadcast. */ -extern bool_t pmap_set __P ((__const u_long __program, __const u_long __vers, - int __protocol, u_short __port)); -extern bool_t pmap_unset __P ((__const u_long __program, __const u_long __vers)); -extern struct pmaplist *pmap_getmaps __P ((struct sockaddr_in *__address)); -extern enum clnt_stat pmap_rmtcall __P ((struct sockaddr_in *__addr, - __const u_long __prog, - __const u_long __vers, - __const u_long __proc, - xdrproc_t __xdrargs, - caddr_t __argsp, xdrproc_t __xdrres, - caddr_t __resp, struct timeval __tout, - u_long *__port_ptr)); -extern enum clnt_stat clnt_broadcast __P ((__const u_long __prog, - __const u_long __vers, - __const u_long __proc, - xdrproc_t __xargs, - caddr_t __argsp, - xdrproc_t __xresults, - caddr_t __resultsp, - resultproc_t __eachresult)); -extern u_short pmap_getport __P ((struct sockaddr_in *__address, - __const u_long __program, - __const u_long __version, - u_int __protocol)); +extern bool_t pmap_set (__const u_long __program, __const u_long __vers, + int __protocol, u_short __port) __THROW; +extern bool_t pmap_unset (__const u_long __program, __const u_long __vers) + __THROW; +extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW; +extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr, + __const u_long __prog, + __const u_long __vers, + __const u_long __proc, + xdrproc_t __xdrargs, + caddr_t __argsp, xdrproc_t __xdrres, + caddr_t __resp, struct timeval __tout, + u_long *__port_ptr) __THROW; +extern enum clnt_stat clnt_broadcast (__const u_long __prog, + __const u_long __vers, + __const u_long __proc, xdrproc_t __xargs, + caddr_t __argsp, xdrproc_t __xresults, + caddr_t __resultsp, + resultproc_t __eachresult) __THROW; +extern u_short pmap_getport (struct sockaddr_in *__address, + __const u_long __program, + __const u_long __version, u_int __protocol) + __THROW; __END_DECLS diff --git a/sunrpc/rpc/pmap_prot.h b/sunrpc/rpc/pmap_prot.h index 52185d3..cd64e36 100644 --- a/sunrpc/rpc/pmap_prot.h +++ b/sunrpc/rpc/pmap_prot.h @@ -94,14 +94,14 @@ struct pmap { long unsigned pm_port; }; -extern bool_t xdr_pmap __P ((XDR *__xdrs, struct pmap *__regs)); +extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW; struct pmaplist { struct pmap pml_map; struct pmaplist *pml_next; }; -extern bool_t xdr_pmaplist __P ((XDR *__xdrs, struct pmaplist **__rp)); +extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW; __END_DECLS diff --git a/sunrpc/rpc/pmap_rmt.h b/sunrpc/rpc/pmap_rmt.h index bb35ad6..7a38b5f 100644 --- a/sunrpc/rpc/pmap_rmt.h +++ b/sunrpc/rpc/pmap_rmt.h @@ -51,7 +51,8 @@ struct rmtcallargs { xdrproc_t xdr_args; }; -extern bool_t xdr_rmtcall_args __P ((XDR *__xdrs, struct rmtcallargs *__crp)); +extern bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) + __THROW; struct rmtcallres { u_long *port_ptr; @@ -60,7 +61,7 @@ struct rmtcallres { xdrproc_t xdr_results; }; -extern bool_t xdr_rmtcallres __P ((XDR *__xdrs, struct rmtcallres *__crp)); +extern bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW; __END_DECLS diff --git a/sunrpc/rpc/rpc_msg.h b/sunrpc/rpc/rpc_msg.h index e2908ac..636d60e 100644 --- a/sunrpc/rpc/rpc_msg.h +++ b/sunrpc/rpc/rpc_msg.h @@ -170,7 +170,7 @@ struct rpc_msg { * XDR *xdrs; * struct rpc_msg *cmsg; */ -extern bool_t xdr_callmsg __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); +extern bool_t xdr_callmsg (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; /* * XDR routine to pre-serialize the static part of a rpc message. @@ -178,7 +178,7 @@ extern bool_t xdr_callmsg __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); * XDR *xdrs; * struct rpc_msg *cmsg; */ -extern bool_t xdr_callhdr __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); +extern bool_t xdr_callhdr (XDR *__xdrs, struct rpc_msg *__cmsg) __THROW; /* * XDR routine to handle a rpc reply. @@ -186,7 +186,7 @@ extern bool_t xdr_callhdr __P ((XDR *__xdrs, struct rpc_msg *__cmsg)); * XDR *xdrs; * struct rpc_msg *rmsg; */ -extern bool_t xdr_replymsg __P ((XDR *__xdrs, struct rpc_msg *__rmsg)); +extern bool_t xdr_replymsg (XDR *__xdrs, struct rpc_msg *__rmsg) __THROW; /* * Fills in the error part of a reply message. @@ -194,8 +194,8 @@ extern bool_t xdr_replymsg __P ((XDR *__xdrs, struct rpc_msg *__rmsg)); * struct rpc_msg *msg; * struct rpc_err *error; */ -extern void _seterr_reply __P ((struct rpc_msg *__msg, - struct rpc_err *__error)); +extern void _seterr_reply (struct rpc_msg *__msg, struct rpc_err *__error) + __THROW; __END_DECLS diff --git a/sunrpc/rpc/svc.h b/sunrpc/rpc/svc.h index f607d6b..d740f18 100644 --- a/sunrpc/rpc/svc.h +++ b/sunrpc/rpc/svc.h @@ -77,18 +77,18 @@ struct SVCXPRT { int xp_sock; u_short xp_port; /* associated port number */ const struct xp_ops { - bool_t (*xp_recv) __PMT ((SVCXPRT *__xprt, struct rpc_msg *__msg)); + bool_t (*xp_recv) (SVCXPRT *__xprt, struct rpc_msg *__msg); /* receive incoming requests */ - enum xprt_stat (*xp_stat) __PMT ((SVCXPRT *__xprt)); + enum xprt_stat (*xp_stat) (SVCXPRT *__xprt); /* get transport status */ - bool_t (*xp_getargs) __PMT ((SVCXPRT *__xprt, xdrproc_t __xdr_args, - caddr_t args_ptr)); /* get arguments */ - bool_t (*xp_reply) __PMT ((SVCXPRT *__xprt, struct rpc_msg *__msg)); + bool_t (*xp_getargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, + caddr_t args_ptr); /* get arguments */ + bool_t (*xp_reply) (SVCXPRT *__xprt, struct rpc_msg *__msg); /* send reply */ - bool_t (*xp_freeargs) __PMT ((SVCXPRT *__xprt, xdrproc_t __xdr_args, - caddr_t args_ptr)); + bool_t (*xp_freeargs) (SVCXPRT *__xprt, xdrproc_t __xdr_args, + caddr_t args_ptr); /* free mem allocated for args */ - void (*xp_destroy) __PMT ((SVCXPRT *__xprt)); + void (*xp_destroy) (SVCXPRT *__xprt); /* destroy this struct */ } *xp_ops; int xp_addrlen; /* length of remote address */ @@ -156,7 +156,7 @@ struct svc_req { #ifndef __DISPATCH_FN_T #define __DISPATCH_FN_T -typedef void (*__dispatch_fn_t) __PMT ((struct svc_req*, SVCXPRT*)); +typedef void (*__dispatch_fn_t) (struct svc_req*, SVCXPRT*); #endif /* @@ -169,9 +169,9 @@ typedef void (*__dispatch_fn_t) __PMT ((struct svc_req*, SVCXPRT*)); * void (*dispatch)(); * rpcprot_t protocol; like TCP or UDP, zero means do not register */ -extern bool_t svc_register __P ((SVCXPRT *__xprt, rpcprog_t __prog, - rpcvers_t __vers, __dispatch_fn_t __dispatch, - rpcprot_t __protocol)); +extern bool_t svc_register (SVCXPRT *__xprt, rpcprog_t __prog, + rpcvers_t __vers, __dispatch_fn_t __dispatch, + rpcprot_t __protocol) __THROW; /* * Service un-registration @@ -180,7 +180,7 @@ extern bool_t svc_register __P ((SVCXPRT *__xprt, rpcprog_t __prog, * rpcprog_t prog; * rpcvers_t vers; */ -extern void svc_unregister __P ((rpcprog_t __prog, rpcvers_t __vers)); +extern void svc_unregister (rpcprog_t __prog, rpcvers_t __vers) __THROW; /* * Transport registration. @@ -188,7 +188,7 @@ extern void svc_unregister __P ((rpcprog_t __prog, rpcvers_t __vers)); * xprt_register(xprt) * SVCXPRT *xprt; */ -extern void xprt_register __P ((SVCXPRT *__xprt)); +extern void xprt_register (SVCXPRT *__xprt) __THROW; /* * Transport un-register @@ -196,7 +196,7 @@ extern void xprt_register __P ((SVCXPRT *__xprt)); * xprt_unregister(xprt) * SVCXPRT *xprt; */ -extern void xprt_unregister __P ((SVCXPRT *__xprt)); +extern void xprt_unregister (SVCXPRT *__xprt) __THROW; /* @@ -225,23 +225,23 @@ extern void xprt_unregister __P ((SVCXPRT *__xprt)); * deadlock the caller and server processes! */ -extern bool_t svc_sendreply __P ((SVCXPRT *xprt, xdrproc_t __xdr_results, - caddr_t __xdr_location)); +extern bool_t svc_sendreply (SVCXPRT *xprt, xdrproc_t __xdr_results, + caddr_t __xdr_location) __THROW; -extern void svcerr_decode __P ((SVCXPRT *__xprt)); +extern void svcerr_decode (SVCXPRT *__xprt) __THROW; -extern void svcerr_weakauth __P ((SVCXPRT *__xprt)); +extern void svcerr_weakauth (SVCXPRT *__xprt) __THROW; -extern void svcerr_noproc __P ((SVCXPRT *__xprt)); +extern void svcerr_noproc (SVCXPRT *__xprt) __THROW; -extern void svcerr_progvers __P ((SVCXPRT *__xprt, rpcvers_t __low_vers, - rpcvers_t __high_vers)); +extern void svcerr_progvers (SVCXPRT *__xprt, rpcvers_t __low_vers, + rpcvers_t __high_vers) __THROW; -extern void svcerr_auth __P ((SVCXPRT *__xprt, enum auth_stat __why)); +extern void svcerr_auth (SVCXPRT *__xprt, enum auth_stat __why) __THROW; -extern void svcerr_noprog __P ((SVCXPRT *__xprt)); +extern void svcerr_noprog (SVCXPRT *__xprt) __THROW; -extern void svcerr_systemerr __P ((SVCXPRT *__xprt)); +extern void svcerr_systemerr (SVCXPRT *__xprt) __THROW; /* * Lowest level dispatching -OR- who owns this process anyway. @@ -268,12 +268,12 @@ extern fd_set svc_fdset; * a small program implemented by the svc_rpc implementation itself; * also see clnt.h for protocol numbers. */ -extern void svc_getreq __P ((int __rdfds)); -extern void svc_getreq_common __P ((const int __fd)); -extern void svc_getreqset __P ((fd_set *__readfds)); -extern void svc_getreq_poll __P ((struct pollfd *, const int)); -extern void svc_exit __P ((void)); -extern void svc_run __P ((void)); +extern void svc_getreq (int __rdfds) __THROW; +extern void svc_getreq_common (const int __fd) __THROW; +extern void svc_getreqset (fd_set *__readfds) __THROW; +extern void svc_getreq_poll (struct pollfd *, const int) __THROW; +extern void svc_exit (void) __THROW; +extern void svc_run (void) __THROW; /* * Socket to use on svcxxx_create call to get default socket @@ -287,27 +287,27 @@ extern void svc_run __P ((void)); /* * Memory based rpc for testing and timing. */ -extern SVCXPRT *svcraw_create __P ((void)); +extern SVCXPRT *svcraw_create (void) __THROW; /* * Udp based rpc. */ -extern SVCXPRT *svcudp_create __P ((int __sock)); -extern SVCXPRT *svcudp_bufcreate __P ((int __sock, u_int __sendsz, - u_int __recvsz)); +extern SVCXPRT *svcudp_create (int __sock) __THROW; +extern SVCXPRT *svcudp_bufcreate (int __sock, u_int __sendsz, u_int __recvsz) + __THROW; /* * Tcp based rpc. */ -extern SVCXPRT *svctcp_create __P ((int __sock, u_int __sendsize, - u_int __recvsize)); +extern SVCXPRT *svctcp_create (int __sock, u_int __sendsize, u_int __recvsize) + __THROW; /* * Unix based rpc. */ -extern SVCXPRT *svcunix_create __P ((int __sock, u_int __sendsize, - u_int __recvsize, char *__path)); +extern SVCXPRT *svcunix_create (int __sock, u_int __sendsize, u_int __recvsize, + char *__path) __THROW; __END_DECLS diff --git a/sunrpc/rpc/svc_auth.h b/sunrpc/rpc/svc_auth.h index ad08b71..1c1a715 100644 --- a/sunrpc/rpc/svc_auth.h +++ b/sunrpc/rpc/svc_auth.h @@ -46,8 +46,8 @@ __BEGIN_DECLS /* * Server side authenticator */ -extern enum auth_stat _authenticate __P ((struct svc_req *__rqst, - struct rpc_msg *__msg)); +extern enum auth_stat _authenticate (struct svc_req *__rqst, + struct rpc_msg *__msg) __THROW; __END_DECLS diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h index 91dbcc3..0b70344 100644 --- a/sunrpc/rpc/xdr.h +++ b/sunrpc/rpc/xdr.h @@ -114,27 +114,25 @@ struct XDR enum xdr_op x_op; /* operation; fast additional param */ struct xdr_ops { - bool_t (*x_getlong) __PMT ((XDR *__xdrs, long *__lp)); + bool_t (*x_getlong) (XDR *__xdrs, long *__lp); /* get a long from underlying stream */ - bool_t (*x_putlong) __PMT ((XDR *__xdrs, __const long *__lp)); + bool_t (*x_putlong) (XDR *__xdrs, __const long *__lp); /* put a long to " */ - bool_t (*x_getbytes) __PMT ((XDR *__xdrs, caddr_t __addr, - u_int __len)); + bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len); /* get some bytes from " */ - bool_t (*x_putbytes) __PMT ((XDR *__xdrs, __const char *__addr, - u_int __len)); + bool_t (*x_putbytes) (XDR *__xdrs, __const char *__addr, u_int __len); /* put some bytes to " */ - u_int (*x_getpostn) __PMT ((__const XDR *__xdrs)); + u_int (*x_getpostn) (__const XDR *__xdrs); /* returns bytes off from beginning */ - bool_t (*x_setpostn) __PMT ((XDR *__xdrs, u_int pos)); + bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos); /* lets you reposition the stream */ - int32_t *(*x_inline) __PMT ((XDR *__xdrs, int len)); + int32_t *(*x_inline) (XDR *__xdrs, int __len); /* buf quick ptr to buffered data */ - void (*x_destroy) __PMT ((XDR *__xdrs)); + void (*x_destroy) (XDR *__xdrs); /* free privates of this xdr_stream */ - bool_t (*x_getint32) __PMT ((XDR *__xdrs, int32_t *__ip)); + bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip); /* get a int from underlying stream */ - bool_t (*x_putint32) __PMT ((XDR *__xdrs, __const int32_t *__ip)); + bool_t (*x_putint32) (XDR *__xdrs, __const int32_t *__ip); /* put a int to " */ } *x_ops; @@ -153,7 +151,7 @@ struct XDR * allocate dynamic storage of the appropriate size and return it. * bool_t (*xdrproc_t)(XDR *, caddr_t *); */ -typedef bool_t (*xdrproc_t) __PMT ((XDR *, void *,...)); +typedef bool_t (*xdrproc_t) (XDR *, void *,...); /* @@ -288,49 +286,49 @@ struct xdr_discrim * know whether the call is a read or a write to the passed parameter * also, the XDR structure is always updated by some of these calls. */ -extern bool_t xdr_void __P ((void)); -extern bool_t xdr_short __P ((XDR *__xdrs, short *__sp)); -extern bool_t xdr_u_short __P ((XDR *__xdrs, u_short *__usp)); -extern bool_t xdr_int __P ((XDR *__xdrs, int *__ip)); -extern bool_t xdr_u_int __P ((XDR *__xdrs, u_int *__up)); -extern bool_t xdr_long __P ((XDR *__xdrs, long *__lp)); -extern bool_t xdr_u_long __P ((XDR *__xdrs, u_long *__ulp)); -extern bool_t xdr_hyper __P ((XDR *__xdrs, quad_t *__llp)); -extern bool_t xdr_u_hyper __P ((XDR *__xdrs, u_quad_t *__ullp)); -extern bool_t xdr_longlong_t __P ((XDR *__xdrs, quad_t *__llp)); -extern bool_t xdr_u_longlong_t __P ((XDR *__xdrs, u_quad_t *__ullp)); -extern bool_t xdr_int8_t __P ((XDR *__xdrs, int8_t *__ip)); -extern bool_t xdr_uint8_t __P ((XDR *__xdrs, uint8_t *__up)); -extern bool_t xdr_int16_t __P ((XDR *__xdrs, int16_t *__ip)); -extern bool_t xdr_uint16_t __P ((XDR *__xdrs, uint16_t *__up)); -extern bool_t xdr_int32_t __P ((XDR *__xdrs, int32_t *__ip)); -extern bool_t xdr_uint32_t __P ((XDR *__xdrs, uint32_t *__up)); -extern bool_t xdr_int64_t __P ((XDR *__xdrs, int64_t *__ip)); -extern bool_t xdr_uint64_t __P ((XDR *__xdrs, uint64_t *__up)); -extern bool_t xdr_bool __P ((XDR *__xdrs, bool_t *__bp)); -extern bool_t xdr_enum __P ((XDR *__xdrs, enum_t *__ep)); -extern bool_t xdr_array __P ((XDR * _xdrs, caddr_t *__addrp, u_int *__sizep, - u_int __maxsize, u_int __elsize, - xdrproc_t __elproc)); -extern bool_t xdr_bytes __P ((XDR *__xdrs, char **__cpp, u_int *__sizep, - u_int __maxsize)); -extern bool_t xdr_opaque __P ((XDR *__xdrs, caddr_t __cp, u_int __cnt)); -extern bool_t xdr_string __P ((XDR *__xdrs, char **__cpp, u_int __maxsize)); -extern bool_t xdr_union __P ((XDR *__xdrs, enum_t *__dscmp, char *__unp, - __const struct xdr_discrim *__choices, - xdrproc_t dfault)); -extern bool_t xdr_char __P ((XDR *__xdrs, char *__cp)); -extern bool_t xdr_u_char __P ((XDR *__xdrs, u_char *__cp)); -extern bool_t xdr_vector __P ((XDR *__xdrs, char *__basep, u_int __nelem, - u_int __elemsize, xdrproc_t __xdr_elem)); -extern bool_t xdr_float __P ((XDR *__xdrs, float *__fp)); -extern bool_t xdr_double __P ((XDR *__xdrs, double *__dp)); -extern bool_t xdr_reference __P ((XDR *__xdrs, caddr_t *__xpp, u_int __size, - xdrproc_t __proc)); -extern bool_t xdr_pointer __P ((XDR *__xdrs, char **__objpp, - u_int __obj_size, xdrproc_t __xdr_obj)); -extern bool_t xdr_wrapstring __P ((XDR *__xdrs, char **__cpp)); -extern u_long xdr_sizeof __P ((xdrproc_t, void *)); +extern bool_t xdr_void (void) __THROW; +extern bool_t xdr_short (XDR *__xdrs, short *__sp) __THROW; +extern bool_t xdr_u_short (XDR *__xdrs, u_short *__usp) __THROW; +extern bool_t xdr_int (XDR *__xdrs, int *__ip) __THROW; +extern bool_t xdr_u_int (XDR *__xdrs, u_int *__up) __THROW; +extern bool_t xdr_long (XDR *__xdrs, long *__lp) __THROW; +extern bool_t xdr_u_long (XDR *__xdrs, u_long *__ulp) __THROW; +extern bool_t xdr_hyper (XDR *__xdrs, quad_t *__llp) __THROW; +extern bool_t xdr_u_hyper (XDR *__xdrs, u_quad_t *__ullp) __THROW; +extern bool_t xdr_longlong_t (XDR *__xdrs, quad_t *__llp) __THROW; +extern bool_t xdr_u_longlong_t (XDR *__xdrs, u_quad_t *__ullp) __THROW; +extern bool_t xdr_int8_t (XDR *__xdrs, int8_t *__ip) __THROW; +extern bool_t xdr_uint8_t (XDR *__xdrs, uint8_t *__up) __THROW; +extern bool_t xdr_int16_t (XDR *__xdrs, int16_t *__ip) __THROW; +extern bool_t xdr_uint16_t (XDR *__xdrs, uint16_t *__up) __THROW; +extern bool_t xdr_int32_t (XDR *__xdrs, int32_t *__ip) __THROW; +extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW; +extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW; +extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW; +extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW; +extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW; +extern bool_t xdr_array (XDR * _xdrs, caddr_t *__addrp, u_int *__sizep, + u_int __maxsize, u_int __elsize, xdrproc_t __elproc) + __THROW; +extern bool_t xdr_bytes (XDR *__xdrs, char **__cpp, u_int *__sizep, + u_int __maxsize) __THROW; +extern bool_t xdr_opaque (XDR *__xdrs, caddr_t __cp, u_int __cnt) __THROW; +extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW; +extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp, + __const struct xdr_discrim *__choices, + xdrproc_t dfault) __THROW; +extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW; +extern bool_t xdr_u_char (XDR *__xdrs, u_char *__cp) __THROW; +extern bool_t xdr_vector (XDR *__xdrs, char *__basep, u_int __nelem, + u_int __elemsize, xdrproc_t __xdr_elem) __THROW; +extern bool_t xdr_float (XDR *__xdrs, float *__fp) __THROW; +extern bool_t xdr_double (XDR *__xdrs, double *__dp) __THROW; +extern bool_t xdr_reference (XDR *__xdrs, caddr_t *__xpp, u_int __size, + xdrproc_t __proc) __THROW; +extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp, + u_int __obj_size, xdrproc_t __xdr_obj) __THROW; +extern bool_t xdr_wrapstring (XDR *__xdrs, char **__cpp) __THROW; +extern u_long xdr_sizeof (xdrproc_t, void *) __THROW; /* * Common opaque bytes objects used by many rpc protocols; @@ -343,7 +341,7 @@ struct netobj char *n_bytes; }; typedef struct netobj netobj; -extern bool_t xdr_netobj __P ((XDR *__xdrs, struct netobj *__np)); +extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW; /* * These are the public routines for the various implementations of @@ -351,30 +349,30 @@ extern bool_t xdr_netobj __P ((XDR *__xdrs, struct netobj *__np)); */ /* XDR using memory buffers */ -extern void xdrmem_create __P ((XDR *__xdrs, __const caddr_t __addr, - u_int __size, enum xdr_op __xop)); +extern void xdrmem_create (XDR *__xdrs, __const caddr_t __addr, + u_int __size, enum xdr_op __xop) __THROW; /* XDR using stdio library */ -extern void xdrstdio_create __P ((XDR *__xdrs, FILE *__file, - enum xdr_op __xop)); +extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop) + __THROW; /* XDR pseudo records for tcp */ -extern void xdrrec_create __P ((XDR *__xdrs, u_int __sendsize, - u_int __recvsize, caddr_t __tcp_handle, - int (*__readit) (char *, char *, int), - int (*__writeit) (char *, char *, int))); +extern void xdrrec_create (XDR *__xdrs, u_int __sendsize, + u_int __recvsize, caddr_t __tcp_handle, + int (*__readit) (char *, char *, int), + int (*__writeit) (char *, char *, int)) __THROW; /* make end of xdr record */ -extern bool_t xdrrec_endofrecord __P ((XDR *__xdrs, bool_t __sendnow)); +extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow) __THROW; /* move to beginning of next record */ -extern bool_t xdrrec_skiprecord __P ((XDR *__xdrs)); +extern bool_t xdrrec_skiprecord (XDR *__xdrs) __THROW; /* true if no more input */ -extern bool_t xdrrec_eof __P ((XDR *__xdrs)); +extern bool_t xdrrec_eof (XDR *__xdrs) __THROW; /* free memory buffers for xdr */ -extern void xdr_free __P ((xdrproc_t __proc, char *__objp)); +extern void xdr_free (xdrproc_t __proc, char *__objp) __THROW; __END_DECLS diff --git a/sysdeps/unix/sysv/linux/bits/sigstack.h b/sysdeps/unix/sysv/linux/bits/sigstack.h index 905e87f..ceffd84 100644 --- a/sysdeps/unix/sysv/linux/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 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 @@ -25,7 +25,7 @@ /* Structure describing a signal stack (obsolete). */ struct sigstack { - __ptr_t ss_sp; /* Signal stack pointer. */ + void *ss_sp; /* Signal stack pointer. */ int ss_onstack; /* Nonzero if executing on this stack. */ }; @@ -49,7 +49,7 @@ enum /* Alternate, preferred interface. */ typedef struct sigaltstack { - __ptr_t ss_sp; + void *ss_sp; int ss_flags; size_t ss_size; } stack_t; diff --git a/sysvipc/sys/ipc.h b/sysvipc/sys/ipc.h index 0ec6ed1..16642f4 100644 --- a/sysvipc/sys/ipc.h +++ b/sysvipc/sys/ipc.h @@ -51,7 +51,7 @@ typedef __key_t key_t; __BEGIN_DECLS /* Generates key for System V style IPC. */ -extern key_t ftok __P ((__const char *__pathname, int __proj_id)); +extern key_t ftok (__const char *__pathname, int __proj_id) __THROW; __END_DECLS diff --git a/sysvipc/sys/msg.h b/sysvipc/sys/msg.h index 5f8f761..2a726dc 100644 --- a/sysvipc/sys/msg.h +++ b/sysvipc/sys/msg.h @@ -42,18 +42,18 @@ struct msgbuf __BEGIN_DECLS /* Message queue control operation. */ -extern int msgctl __P ((int __msqid, int __cmd, struct msqid_ds *__buf)); +extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW; /* Get messages queue. */ -extern int msgget __P ((key_t __key, int __msgflg)); +extern int msgget (key_t __key, int __msgflg) __THROW; /* Receive message from message queue. */ -extern int msgrcv __P ((int __msqid, void *__msgp, size_t __msgsz, - long int __msgtyp, int __msgflg)); +extern int msgrcv (int __msqid, void *__msgp, size_t __msgsz, + long int __msgtyp, int __msgflg) __THROW; /* Send message to message queue. */ -extern int msgsnd __P ((int __msqid, __const void *__msgp, size_t __msgsz, - int __msgflg)); +extern int msgsnd (int __msqid, __const void *__msgp, size_t __msgsz, + int __msgflg) __THROW; __END_DECLS diff --git a/sysvipc/sys/sem.h b/sysvipc/sys/sem.h index b441945..9657a14 100644 --- a/sysvipc/sys/sem.h +++ b/sysvipc/sys/sem.h @@ -45,14 +45,13 @@ struct sembuf __BEGIN_DECLS /* Semaphore control operation. */ -extern int semctl __P ((int __semid, int __semnum, int __cmd, ...)); +extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW; /* Get semaphore. */ -extern int semget __P ((key_t __key, int __nsems, int __semflg)); +extern int semget (key_t __key, int __nsems, int __semflg) __THROW; /* Operate on semaphore. */ -extern int semop __P ((int __semid, struct sembuf *__sops, - size_t __nsops)); +extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW; __END_DECLS diff --git a/sysvipc/sys/shm.h b/sysvipc/sys/shm.h index 6dce0a8..4f30ad8 100644 --- a/sysvipc/sys/shm.h +++ b/sysvipc/sys/shm.h @@ -33,7 +33,7 @@ /* Segment low boundary address multiple. */ #define SHMLBA (__getpagesize ()) -extern int __getpagesize __P ((void)); +extern int __getpagesize (void) __THROW; /* The following System V style IPC functions implement a shared memory @@ -42,16 +42,17 @@ extern int __getpagesize __P ((void)); __BEGIN_DECLS /* Shared memory control operation. */ -extern int shmctl __P ((int __shmid, int __cmd, struct shmid_ds *__buf)); +extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW; /* Get shared memory segment. */ -extern int shmget __P ((key_t __key, size_t __size, int __shmflg)); +extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW; /* Attach shared memory segment. */ -extern void *shmat __P ((int __shmid, __const void *__shmaddr, int __shmflg)); +extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg) + __THROW; /* Detach shared memory segment. */ -extern int shmdt __P ((__const void *__shmaddr)); +extern int shmdt (__const void *__shmaddr) __THROW; __END_DECLS diff --git a/termios/termios.h b/termios/termios.h index 809cb2c..1a5a87c 100644 --- a/termios/termios.h +++ b/termios/termios.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,96,97,98,99 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 @@ -46,55 +46,55 @@ __BEGIN_DECLS #endif /* Return the output baud rate stored in *TERMIOS_P. */ -extern speed_t cfgetospeed __P ((__const struct termios *__termios_p)); +extern speed_t cfgetospeed (__const struct termios *__termios_p) __THROW; /* Return the input baud rate stored in *TERMIOS_P. */ -extern speed_t cfgetispeed __P ((__const struct termios *__termios_p)); +extern speed_t cfgetispeed (__const struct termios *__termios_p) __THROW; /* Set the output baud rate stored in *TERMIOS_P to SPEED. */ -extern int cfsetospeed __P ((struct termios *__termios_p, speed_t __speed)); +extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __THROW; /* Set the input baud rate stored in *TERMIOS_P to SPEED. */ -extern int cfsetispeed __P ((struct termios *__termios_p, speed_t __speed)); +extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __THROW; #ifdef __USE_BSD /* Set both the input and output baud rates in *TERMIOS_OP to SPEED. */ -extern int cfsetspeed __P ((struct termios *__termios_p, speed_t __speed)); +extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __THROW; #endif /* Put the state of FD into *TERMIOS_P. */ -extern int tcgetattr __P ((int __fd, struct termios *__termios_p)); +extern int tcgetattr (int __fd, struct termios *__termios_p) __THROW; /* Set the state of FD to *TERMIOS_P. Values for OPTIONAL_ACTIONS (TCSA*) are in <bits/termios.h>. */ -extern int tcsetattr __P ((int __fd, int __optional_actions, - __const struct termios *__termios_p)); +extern int tcsetattr (int __fd, int __optional_actions, + __const struct termios *__termios_p) __THROW; #ifdef __USE_BSD /* Set *TERMIOS_P to indicate raw mode. */ -extern void cfmakeraw __P ((struct termios *__termios_p)); +extern void cfmakeraw (struct termios *__termios_p) __THROW; #endif /* Send zero bits on FD. */ -extern int tcsendbreak __P ((int __fd, int __duration)); +extern int tcsendbreak (int __fd, int __duration) __THROW; /* Wait for pending output to be written on FD. */ -extern int tcdrain __P ((int __fd)); +extern int tcdrain (int __fd) __THROW; /* Flush pending data on FD. Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <bits/termios.h>. */ -extern int tcflush __P ((int __fd, int __queue_selector)); +extern int tcflush (int __fd, int __queue_selector) __THROW; /* Suspend or restart transmission on FD. Values for ACTION (TC[IO]{OFF,ON}) are in <bits/termios.h>. */ -extern int tcflow __P ((int __fd, int __action)); +extern int tcflow (int __fd, int __action) __THROW; #ifdef __USE_UNIX98 /* Get process group ID for session leader for controlling terminal FD. */ -extern __pid_t tcgetsid __P ((int __fd)); +extern __pid_t tcgetsid (int __fd) __THROW; #endif diff --git a/time/sys/time.h b/time/sys/time.h index 83be23f..92b21cd 100644 --- a/time/sys/time.h +++ b/time/sys/time.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,96,97,98,99 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 @@ -54,20 +54,19 @@ struct timezone Returns 0 on success, -1 on errors. NOTE: This form of timezone information is obsolete. Use the functions and variables declared in <time.h> instead. */ -extern int gettimeofday __P ((struct timeval *__tv, - struct timezone *__tz)); +extern int gettimeofday (struct timeval *__tv, struct timezone *__tz) __THROW; /* Set the current time of day and timezone information. This call is restricted to the super-user. */ -extern int settimeofday __P ((__const struct timeval *__tv, - __const struct timezone *__tz)); +extern int settimeofday (__const struct timeval *__tv, + __const struct timezone *__tz) __THROW; /* Adjust the current time of day by the amount in DELTA. If OLDDELTA is not NULL, it is filled in with the amount of time adjustment remaining to be done from the last `adjtime' call. This call is restricted to the super-user. */ -extern int adjtime __P ((__const struct timeval *__delta, - struct timeval *__olddelta)); +extern int adjtime (__const struct timeval *__delta, + struct timeval *__olddelta) __THROW; /* Values for the first argument to `getitimer' and `setitimer'. */ @@ -97,19 +96,19 @@ struct itimerval /* Set *VALUE to the current setting of timer WHICH. Return 0 on success, -1 on errors. */ -extern int getitimer __P ((enum __itimer_which __which, - struct itimerval *__value)); +extern int getitimer (enum __itimer_which __which, + struct itimerval *__value) __THROW; /* Set the timer WHICH to *NEW. If OLD is not NULL, set *OLD to the old value of timer WHICH. Returns 0 on success, -1 on errors. */ -extern int setitimer __P ((enum __itimer_which __which, - __const struct itimerval *__new, - struct itimerval *__old)); +extern int setitimer (enum __itimer_which __which, + __const struct itimerval *__new, + struct itimerval *__old) __THROW; /* Change the access time of FILE to TVP[0] and the modification time of FILE to TVP[1]. */ -extern int utimes __P ((__const char *__file, struct timeval __tvp[2])); +extern int utimes (__const char *__file, struct timeval __tvp[2]) __THROW; /* Convenience macros for operations on timevals. diff --git a/time/sys/timeb.h b/time/sys/timeb.h index 9959f92..ae32afd 100644 --- a/time/sys/timeb.h +++ b/time/sys/timeb.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 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 @@ -39,7 +39,7 @@ struct timeb /* Fill in TIMEBUF with information about the current time. */ -extern int ftime __P ((struct timeb *__timebuf)); +extern int ftime (struct timeb *__timebuf); __END_DECLS diff --git a/time/time.h b/time/time.h index 9bca37a..e98d265 100644 --- a/time/time.h +++ b/time/time.h @@ -136,72 +136,72 @@ struct sigevent; /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SECOND is program time in seconds. */ -extern clock_t clock __P ((void)); +extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ -extern time_t time __P ((time_t *__timer)); +extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ -extern double difftime __P ((time_t __time1, time_t __time0)) - __attribute__ ((__const__)); +extern double difftime (time_t __time1, time_t __time0) + __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ -extern time_t mktime __P ((struct tm *__tp)); +extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ -extern size_t strftime __P ((char *__restrict __s, size_t __maxsize, - __const char *__restrict __format, - __const struct tm *__restrict __tp)); +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) __THROW; # ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ -extern char *strptime __P ((__const char *__s, __const char *__fmt, - struct tm *__tp)); +extern char *strptime (__const char *__s, __const char *__fmt, struct tm *__tp) + __THROW; # endif /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ -extern struct tm *gmtime __P ((__const time_t *__timer)); +extern struct tm *gmtime (__const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ -extern struct tm *localtime __P ((__const time_t *__timer)); +extern struct tm *localtime (__const time_t *__timer) __THROW; # if defined __USE_POSIX || defined __USE_MISC /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ -extern struct tm *gmtime_r __P ((__const time_t *__restrict __timer, - struct tm *__restrict __tp)); +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ -extern struct tm *localtime_r __P ((__const time_t *__restrict __timer, - struct tm *__restrict __tp)); +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __THROW; # endif /* POSIX or misc */ /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ -extern char *asctime __P ((__const struct tm *__tp)); +extern char *asctime (__const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ -extern char *ctime __P ((__const time_t *__timer)); +extern char *ctime (__const time_t *__timer) __THROW; # if defined __USE_POSIX || defined __USE_MISC /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ -extern char *asctime_r __P ((__const struct tm *__restrict __tp, - char *__restrict __buf)); +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ -extern char *ctime_r __P ((__const time_t *__restrict __timer, - char *__restrict __buf)); +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) __THROW; # endif /* POSIX or misc */ @@ -217,7 +217,7 @@ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ -extern void tzset __P ((void)); +extern void tzset (void) __THROW; # endif # if defined __USE_SVID || defined __USE_XOPEN @@ -228,7 +228,7 @@ extern long int timezone; # ifdef __USE_SVID /* Set the system time to *WHEN. This call is restricted to the superuser. */ -extern int stime __P ((__const time_t *__when)); +extern int stime (__const time_t *__when) __THROW; # endif @@ -243,50 +243,51 @@ extern int stime __P ((__const time_t *__when)); localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ -extern time_t timegm __P ((struct tm *__tp)); +extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ -extern time_t timelocal __P ((struct tm *__tp)); +extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ -extern int dysize __P ((int __year)); +extern int dysize (int __year) __THROW; # endif # ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. */ -extern int nanosleep __P ((__const struct timespec *__requested_time, - struct timespec *__remaining)); +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining) __THROW; /* Get resolution of clock CLOCK_ID. */ -extern int clock_getres __P ((clockid_t __clock_id, struct timespec *__res)); +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ -extern int clock_gettime __P ((clockid_t __clock_id, struct timespec *__tp)); +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ -extern int clock_settime __P ((clockid_t __clock_id, - __const struct timespec *__tp)); +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + __THROW; /* Create new per-process timer using CLOCK_ID. */ -extern int timer_create __P ((clockid_t __clock_id, struct sigevent *__evp, - timer_t *__timerid)); +extern int timer_create (clockid_t __clock_id, struct sigevent *__evp, + timer_t *__timerid) __THROW; /* Delete timer TIMERID. */ -extern int timer_delete __P ((timer_t __timerid)); +extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVLAUE. */ -extern int timer_settime __P ((timer_t __timerid, int __flags, - __const struct itimerspec *__value, - struct itimerspec *__ovalue)); +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__value, + struct itimerspec *__ovalue) __THROW; /* Get current value of timer TIMERID and store it in VLAUE. */ -extern int timer_gettime __P ((timer_t __timerid, struct itimerspec *__value)); +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __THROW; /* Get expiration overrun for timer TIMERID. */ -extern int timer_getoverrun __P ((timer_t __timerid)); +extern int timer_getoverrun (timer_t __timerid) __THROW; # endif @@ -308,7 +309,7 @@ extern int getdate_err; representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. */ -extern struct tm *getdate __P ((__const char *__string)); +extern struct tm *getdate (__const char *__string) __THROW; # endif # ifdef __USE_GNU @@ -317,8 +318,8 @@ extern struct tm *getdate __P ((__const char *__string)); variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. */ -extern int getdate_r __P ((__const char *__restrict __string, - struct tm *__restrict __resbufp)); +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp) __THROW; # endif diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 19e6d87..a12d0fd 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -99,52 +99,54 @@ struct tm; __BEGIN_DECLS /* Copy SRC to DEST. */ -extern wchar_t *wcscpy __P ((wchar_t *__restrict __dest, - __const wchar_t *__restrict __src)); +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) __THROW; /* Copy no more than N wide-characters of SRC to DEST. */ -extern wchar_t *wcsncpy __P ((wchar_t *__restrict __dest, - __const wchar_t *__restrict __src, size_t __n)); +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + __THROW; /* Append SRC onto DEST. */ -extern wchar_t *wcscat __P ((wchar_t *__restrict __dest, - __const wchar_t *__restrict __src)); +extern wchar_t *wcscat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) __THROW; /* Append no more than N wide-characters of SRC onto DEST. */ -extern wchar_t *wcsncat __P ((wchar_t *__restrict __dest, - __const wchar_t *__restrict __src, size_t __n)); +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + __THROW; /* Compare S1 and S2. */ -extern int wcscmp __P ((__const wchar_t *__s1, __const wchar_t *__s2)); +extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW; /* Compare N wide-characters of S1 and S2. */ -extern int wcsncmp __P ((__const wchar_t *__s1, __const wchar_t *__s2, - size_t __n)); +extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + __THROW; #ifdef __USE_GNU /* Compare S1 and S2, ignoring case. */ -extern int wcscasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2)); +extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW; /* Compare no more than N chars of S1 and S2, ignoring case. */ -extern int wcsncasecmp __P ((__const wchar_t *__s1, __const wchar_t *__s2, - size_t __n)); +extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n) __THROW; /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ # include <xlocale.h> -extern int __wcscasecmp_l __P ((__const wchar_t *__s1, __const wchar_t *__s2, - __locale_t __loc)); +extern int __wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) __THROW; -extern int __wcsncasecmp_l __P ((__const wchar_t *__s1, __const wchar_t *__s2, - size_t __n, __locale_t __loc)); +extern int __wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) __THROW; #endif /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ -extern int wcscoll __P ((__const wchar_t *__s1, __const wchar_t *__s2)); +extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ -extern size_t wcsxfrm __P ((wchar_t *__restrict __s1, - __const wchar_t *__restrict __s2, size_t __n)); +extern size_t wcsxfrm (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) __THROW; #ifdef __USE_GNU /* Similar to the two functions above but take the information from @@ -152,118 +154,121 @@ extern size_t wcsxfrm __P ((wchar_t *__restrict __s1, /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the given locale. */ -extern int __wcscoll_l __P ((__const wchar_t *__s1, __const wchar_t *__s2, - __locale_t __loc)); +extern int __wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ -extern size_t __wcsxfrm_l __P ((wchar_t *__s1, __const wchar_t *__s2, - size_t __n, __locale_t __loc)); +extern size_t __wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) __THROW; /* Duplicate S, returning an identical malloc'd string. */ -extern wchar_t *wcsdup __P ((__const wchar_t *__s)); +extern wchar_t *wcsdup (__const wchar_t *__s) __THROW; #endif /* Find the first occurrence of WC in WCS. */ -extern wchar_t *wcschr __P ((__const wchar_t *__wcs, wchar_t __wc)); +extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) __THROW; /* Find the last occurrence of WC in WCS. */ -extern wchar_t *wcsrchr __P ((__const wchar_t *__wcs, wchar_t __wc)); +extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) __THROW; #ifdef __USE_GNU /* This funciton is similar to `wcschr'. But it returns a pointer to the closing NUL wide character in case C is not found in S. */ -extern wchar_t *wcschrnul __P ((__const wchar_t *__s, wchar_t __wc)); +extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) __THROW; #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ -extern size_t wcscspn __P ((__const wchar_t *__wcs, - __const wchar_t *__reject)); +extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) + __THROW; /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ -extern size_t wcsspn __P ((__const wchar_t *__wcs, __const wchar_t *__accept)); +extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) + __THROW; /* Find the first occurrence in WCS of any character in ACCEPT. */ -extern wchar_t *wcspbrk __P ((__const wchar_t *__wcs, - __const wchar_t *__accept)); +extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) + __THROW; /* Find the first occurrence of NEEDLE in HAYSTACK. */ -extern wchar_t *wcsstr __P ((__const wchar_t *__haystack, - __const wchar_t *__needle)); +extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) + __THROW; #if defined __USE_XOPEN && !defined __USE_UNIX98 /* Another name for `wcsstr' from XPG4. */ -extern wchar_t *wcswcs __P ((__const wchar_t *__haystack, - __const wchar_t *__needle)); +extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) + __THROW; #endif /* Divide WCS into tokens separated by characters in DELIM. */ -extern wchar_t *wcstok __P ((wchar_t *__restrict __s, - __const wchar_t *__restrict __delim, - wchar_t **__restrict __ptr)); +extern wchar_t *wcstok (wchar_t *__restrict __s, + __const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) __THROW; /* Return the number of wide characters in S. */ -extern size_t __wcslen __P ((__const wchar_t *__s)); -extern size_t wcslen __P ((__const wchar_t *__s)); +extern size_t __wcslen (__const wchar_t *__s) __THROW; +extern size_t wcslen (__const wchar_t *__s) __THROW; #ifdef __USE_GNU /* Return the number of wide characters in S, but at most MAXLEN. */ -extern size_t wcsnlen __P ((__const wchar_t *__s, size_t __maxlen)); +extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) __THROW; #endif /* Search N wide characters of S for C. */ -extern wchar_t *wmemchr __P ((__const wchar_t *__s, wchar_t __c, size_t __n)); +extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) + __THROW; /* Compare N wide characters of S1 and S2. */ -extern int wmemcmp __P ((__const wchar_t *__restrict __s1, - __const wchar_t *__restrict __s2, size_t __n)); +extern int wmemcmp (__const wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) __THROW; /* Copy N wide characters of SRC to DEST. */ -extern wchar_t *wmemcpy __P ((wchar_t *__restrict __s1, - __const wchar_t *__restrict __s2, size_t __n)); +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) __THROW; /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ -extern wchar_t *wmemmove __P ((wchar_t *__s1, __const wchar_t *__s2, - size_t __n)); +extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) + __THROW; /* Set N wide characters of S to C. */ -extern wchar_t *wmemset __P ((wchar_t *__s, wchar_t __c, size_t __n)); +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; #ifdef __USE_GNU /* Copy N wide characters of SRC to DEST and return pointer to following wide character. */ -extern wchar_t *wmempcpy __P ((wchar_t *__restrict __s1, - __const wchar_t *__restrict __s2, size_t __n)); +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + __THROW; #endif /* Determine whether C constitutes a valid (one-byte) multibyte character. */ -extern wint_t btowc __P ((int __c)); +extern wint_t btowc (int __c) __THROW; /* Determine whether C corresponds to a member of the extended character set whose multibyte representation is a single byte. */ -extern int wctob __P ((wint_t __c)); +extern int wctob (wint_t __c) __THROW; /* Determine whether PS points to an object representing the initial state. */ -extern int mbsinit __P ((__const mbstate_t *__ps)); +extern int mbsinit (__const mbstate_t *__ps) __THROW; /* Write wide character representation of multibyte character pointed to by S to PWC. */ -extern size_t mbrtowc __P ((wchar_t *__restrict __pwc, - __const char *__restrict __s, size_t __n, - mbstate_t *__p)); +extern size_t mbrtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n, + mbstate_t *__p) __THROW; /* Write multibyte representation of wide character WC to S. */ -extern size_t wcrtomb __P ((char *__restrict __s, wchar_t __wc, - mbstate_t *__restrict __ps)); +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) __THROW; /* Return number of bytes in multibyte character pointed to by S. */ -extern size_t __mbrlen __P ((__const char *__restrict __s, size_t __n, - mbstate_t *__restrict __ps)); -extern size_t mbrlen __P ((__const char *__restrict __s, size_t __n, - mbstate_t *__restrict __ps)); +extern size_t __mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) __THROW; +extern size_t mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) __THROW; #if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \ && defined __USE_EXTERN_INLINES @@ -276,98 +281,99 @@ extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n, /* Write wide character representation of multibyte character string SRC to DST. */ -extern size_t mbsrtowcs __P ((wchar_t *__restrict __dst, - __const char **__restrict __src, - size_t __len, mbstate_t *__restrict __ps)); +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of wide character string SRC to DST. */ -extern size_t wcsrtombs __P ((char *__restrict __dst, - __const wchar_t **__restrict __src, - size_t __len, mbstate_t *__restrict __ps)); +extern size_t wcsrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) __THROW; #ifdef __USE_GNU /* Write wide character representation of at most NMC bytes of the multibyte character string SRC to DST. */ -extern size_t mbsnrtowcs __P ((wchar_t *__restrict __dst, - __const char **__restrict __src, size_t __nmc, - size_t __len, mbstate_t *__restrict __ps)); +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of at most NWC characters from the wide character string SRC to DST. */ -extern size_t wcsnrtombs __P ((char *__restrict __dst, - __const wchar_t **__restrict __src, - size_t __nwc, size_t __len, - mbstate_t *__restrict __ps)); +extern size_t wcsnrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) __THROW; #endif /* use GNU */ /* The following functions are extensions found in X/Open CAE. */ #ifdef __USE_XOPEN /* Determine number of column positions required for C. */ -extern int wcwidth __P ((wint_t __c)); +extern int wcwidth (wint_t __c) __THROW; /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ -extern int wcswidth __P ((__const wchar_t *__s, size_t __n)); +extern int wcswidth (__const wchar_t *__s, size_t __n) __THROW; #endif /* Use X/Open. */ /* Convert initial portion of the wide string NPTR to `double' representation. */ -extern double wcstod __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr)); +extern double wcstod (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; #ifdef __USE_ISOC9X /* Likewise for `float' and `long double' sizes of floating-point numbers. */ -extern float wcstof __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr)); -extern __long_double_t wcstold __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr)); +extern float wcstof (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; +extern long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; #endif /* C9x */ /* Convert initial portion of wide string NPTR to `long int' representation. */ -extern long int wcstol __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base)); +extern long int wcstol (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long int' representation. */ -extern unsigned long int wcstoul __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base)); +extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + __THROW; #if defined __GNUC__ && defined __USE_GNU /* Convert initial portion of wide string NPTR to `long int' representation. */ __extension__ -extern long long int wcstoq __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base)); +extern long long int wcstoq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ -extern unsigned long long int wcstouq __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base)); +extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) __THROW; #endif /* GCC and use GNU. */ #if defined __USE_ISOC9X || (defined __GNUC__ && defined __USE_GNU) /* Convert initial portion of wide string NPTR to `long int' representation. */ __extension__ -extern long long int wcstoll __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base)); +extern long long int wcstoll (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ -extern unsigned long long int wcstoull __P ((__const wchar_t * - __restrict __nptr, - wchar_t **__restrict __endptr, - int __base)); +extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) __THROW; #endif /* ISO C 9X or GCC and GNU. */ #ifdef __USE_GNU @@ -388,83 +394,78 @@ extern unsigned long long int wcstoull __P ((__const wchar_t * /* Special versions of the functions above which take the locale to use as an additional parameter. */ -extern long int __wcstol_l __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, int __base, - __locale_t __loc)); +extern long int __wcstol_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + __locale_t __loc) __THROW; -extern unsigned long int __wcstoul_l __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base, __locale_t __loc)); +extern unsigned long int __wcstoul_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) __THROW; __extension__ -extern long long int __wcstoll_l __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base, __locale_t __loc)); +extern long long int __wcstoll_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) __THROW; __extension__ -extern unsigned long long int __wcstoull_l __P ((__const wchar_t *__restrict - __nptr, - wchar_t **__restrict __endptr, - int __base, - __locale_t __loc)); +extern unsigned long long int __wcstoull_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) + __THROW; -extern double __wcstod_l __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - __locale_t __loc)); +extern double __wcstod_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + __THROW; -extern float __wcstof_l __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - __locale_t __loc)); +extern float __wcstof_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + __THROW; -extern __long_double_t __wcstold_l __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - __locale_t __loc)); +extern long double __wcstold_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + __locale_t __loc) __THROW; #endif /* GNU */ /* The internal entry points for `wcstoX' take an extra flag argument saying whether or not to parse locale-dependent number grouping. */ -extern double __wcstod_internal __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __group)); -extern float __wcstof_internal __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __group)); -extern __long_double_t __wcstold_internal __P ((__const wchar_t * - __restrict __nptr, - wchar_t **__restrict __endptr, - int __group)); +extern double __wcstod_internal (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __group) + __THROW; +extern float __wcstof_internal (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __group) + __THROW; +extern long double __wcstold_internal (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __group) __THROW; #ifndef __wcstol_internal_defined -extern long int __wcstol_internal __P ((__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr, - int __base, int __group)); +extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, int __group) __THROW; # define __wcstol_internal_defined 1 #endif #ifndef __wcstoul_internal_defined -extern unsigned long int __wcstoul_internal __P ((__const wchar_t * - __restrict __nptr, - wchar_t ** - __restrict __endptr, - int __base, int __group)); +extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt, + wchar_t **__restrict __endptr, + int __base, int __group) __THROW; # define __wcstoul_internal_defined 1 #endif #ifndef __wcstoll_internal_defined __extension__ -extern long long int __wcstoll_internal __P ((__const wchar_t * - __restrict __nptr, - wchar_t **__restrict __endptr, - int __base, int __group)); +extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, int __group) __THROW; # define __wcstoll_internal_defined 1 #endif #ifndef __wcstoull_internal_defined __extension__ -extern unsigned long long int __wcstoull_internal __P ((__const wchar_t * - __restrict __nptr, - wchar_t ** - __restrict __endptr, - int __base, - int __group)); +extern unsigned long long int __wcstoull_internal (__const wchar_t * + __restrict __nptr, + wchar_t ** + __restrict __endptr, + int __base, + int __group) __THROW; # define __wcstoull_internal_defined 1 #endif @@ -488,8 +489,8 @@ extern __inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr, extern __inline float wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW { return __wcstof_internal (__nptr, __endptr, 0); } -extern __inline __long_double_t wcstold (__const wchar_t *__restrict __nptr, - wchar_t **__restrict __endptr) __THROW +extern __inline long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW { return __wcstold_internal (__nptr, __endptr, 0); } @@ -511,12 +512,12 @@ extern __inline unsigned long long int wcstouq (__const wchar_t * #ifdef __USE_GNU /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ -extern wchar_t *wcpcpy __P ((wchar_t *__dest, __const wchar_t *__src)); +extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW; /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ -extern wchar_t *wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src, - size_t __n)); +extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) + __THROW; #endif /* use GNU */ @@ -524,135 +525,135 @@ extern wchar_t *wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src, #ifdef __USE_ISOC9X /* Select orientation for stream. */ -extern int fwide __P ((FILE *__fp, int __mode)); +extern int fwide (FILE *__fp, int __mode) __THROW; /* Write formatted output to STREAM. */ -extern int fwprintf __P ((FILE *__restrict __stream, - __const wchar_t *__restrict __format, ...)) - /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; +extern int fwprintf (FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + __THROW /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; /* Write formatted output to stdout. */ -extern int wprintf __P ((__const wchar_t *__restrict __format, ...)) - /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; +extern int wprintf (__const wchar_t *__restrict __format, ...) + __THROW /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; /* Write formatted output of at most N characters to S. */ -extern int swprintf __P ((wchar_t *__restrict __s, size_t __n, - __const wchar_t *__restrict __format, ...)) - /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; +extern int swprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, ...) + __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; /* Write formatted output to S from argument list ARG. */ -extern int vfwprintf __P ((FILE *__restrict __s, - __const wchar_t *__restrict __format, - __gnuc_va_list __arg)) - /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; +extern int vfwprintf (FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + __THROW /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; /* Write formatted output to stdout from argument list ARG. */ -extern int vwprintf __P ((__const wchar_t *__restrict __format, - __gnuc_va_list __arg)) - /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; +extern int vwprintf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + __THROW /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; /* Write formatted output of at most N character to S from argument list ARG. */ -extern int vswprintf __P ((wchar_t *__restrict __s, size_t __n, - __const wchar_t *__restrict __format, - __gnuc_va_list __arg)) - /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; /* Read formatted input from STREAM. */ -extern int fwscanf __P ((FILE *__restrict __stream, - __const wchar_t *__restrict __format, ...)) - /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; +extern int fwscanf (FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* Read formatted input from stdin. */ -extern int wscanf __P ((__const wchar_t *__restrict __format, ...)) - /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; +extern int wscanf (__const wchar_t *__restrict __format, ...) + __THROW /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; /* Read formatted input from S. */ -extern int swscanf __P ((__const wchar_t *__restrict __s, - __const wchar_t *__restrict __format, ...)) - /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; +extern int swscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, ...) + __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* Read formatted input from S into argument list ARG. */ -extern int vfwscanf __P ((FILE *__restrict __s, - __const wchar_t *__restrict __format, - __gnuc_va_list __arg)) - /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; +extern int vfwscanf (FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Read formatted input from stdin into argument list ARG. */ -extern int vwscanf __P ((__const wchar_t *__restrict __format, - __gnuc_va_list __arg)) - /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; +extern int vwscanf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + __THROW /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; /* Read formatted input from S into argument list ARG. */ -extern int vswscanf __P ((__const wchar_t *__restrict __s, - __const wchar_t *__restrict __format, - __gnuc_va_list __arg)) - /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; +extern int vswscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Read a character from STREAM. */ -extern wint_t fgetwc __P ((FILE *__stream)); -extern wint_t getwc __P ((FILE *__stream)); +extern wint_t fgetwc (FILE *__stream); +extern wint_t getwc (FILE *__stream); /* Read a character from stdin. */ -extern wint_t getwchar __P ((void)); +extern wint_t getwchar (void); #ifdef __USE_GNU /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. */ -extern wint_t getwc_unlocked __P ((FILE *__stream)); -extern wint_t getwchar_unlocked __P ((void)); +extern wint_t getwc_unlocked (FILE *__stream); +extern wint_t getwchar_unlocked (void); /* This is the wide character version of a GNU extension. */ -extern wint_t fgetwc_unlocked __P ((FILE *__stream)); +extern wint_t fgetwc_unlocked (FILE *__stream); #endif /* Use POSIX or MISC. */ /* Write a character to STREAM. */ -extern wint_t fputwc __P ((wchar_t __wc, FILE *__stream)); -extern wint_t putwc __P ((wchar_t __wc, FILE *__stream)); +extern wint_t fputwc (wchar_t __wc, FILE *__stream); +extern wint_t putwc (wchar_t __wc, FILE *__stream); /* Write a character to stdout. */ -extern wint_t putwchar __P ((wchar_t __wc)); +extern wint_t putwchar (wchar_t __wc); #ifdef __USE_GNU /* Faster version when locking is not necessary. */ -extern wint_t fputwc_unlocked __P ((wchar_t __wc, FILE *__stream)); +extern wint_t fputwc_unlocked (wchar_t __wc, FILE *__stream); /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. */ -extern wint_t putwc_unlocked __P ((wchar_t __wc, FILE *__stream)); -extern wint_t putwchar_unlocked __P ((wchar_t __wc)); +extern wint_t putwc_unlocked (wchar_t __wc, FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); #endif /* Get a newline-terminated wide character string of finite length from STREAM. */ -extern wchar_t *fgetws __P ((wchar_t *__restrict __ws, int __n, - FILE *__restrict __stream)); +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + FILE *__restrict __stream); #ifdef __USE_GNU /* This function does the same as `fgetws' but does not lock the stream. */ -extern wchar_t *fgetws_unlocked __P ((wchar_t *__restrict __ws, int __n, - FILE *__restrict __stream)); +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + FILE *__restrict __stream); #endif /* Write a string to STREAM. */ -extern int fputws __P ((__const wchar_t *__restrict __ws, - FILE *__restrict __stream)); +extern int fputws (__const wchar_t *__restrict __ws, + FILE *__restrict __stream); #ifdef __USE_GNU /* This function does the same as `fputws' but does not lock the stream. */ -extern int fputws_unlocked __P ((__const wchar_t *__restrict __ws, - FILE *__restrict __stream)); +extern int fputws_unlocked (__const wchar_t *__restrict __ws, + FILE *__restrict __stream); #endif /* Push a character back onto the input buffer of STREAM. */ -extern wint_t ungetwc __P ((wint_t __wc, FILE *__stream)); +extern wint_t ungetwc (wint_t __wc, FILE *__stream); /* Format TP into S according to FORMAT. Write no more than MAXSIZE wide characters and return the number of wide characters written, or 0 if it would exceed MAXSIZE. */ -extern size_t wcsftime __P ((wchar_t *__restrict __s, size_t __maxsize, - __const wchar_t *__restrict __format, - __const struct tm *__restrict __tp)); +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp); #endif /* Use ISO C9x. */ /* The X/Open standard demands that most of the functions defined in diff --git a/wctype/wctype.h b/wctype/wctype.h index 521fcca..68f3853 100644 --- a/wctype/wctype.h +++ b/wctype/wctype.h @@ -99,58 +99,58 @@ __BEGIN_DECLS /* Test for any wide character for which `iswalpha' or `iswdigit' is true. */ -extern int iswalnum __P ((wint_t __wc)); +extern int iswalnum (wint_t __wc) __THROW; /* Test for any wide character for which `iswupper' or 'iswlower' is true, or any wide character that is one of a locale-specific set of wide-characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -extern int iswalpha __P ((wint_t __wc)); +extern int iswalpha (wint_t __wc) __THROW; /* Test for any control wide character. */ -extern int iswcntrl __P ((wint_t __wc)); +extern int iswcntrl (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a decimal-digit character. */ -extern int iswdigit __P ((wint_t __wc)); +extern int iswdigit (wint_t __wc) __THROW; /* Test for any wide character for which `iswprint' is true and `iswspace' is false. */ -extern int iswgraph __P ((wint_t __wc)); +extern int iswgraph (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a lowercase letter or is one of a locale-specific set of wide characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -extern int iswlower __P ((wint_t __wc)); +extern int iswlower (wint_t __wc) __THROW; /* Test for any printing wide character. */ -extern int iswprint __P ((wint_t __wc)); +extern int iswprint (wint_t __wc) __THROW; /* Test for any printing wide character that is one of a locale-specific et of wide characters for which neither `iswspace' nor `iswalnum' is true. */ -extern int iswpunct __P ((wint_t __wc)); +extern int iswpunct (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a locale-specific set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ -extern int iswspace __P ((wint_t __wc)); +extern int iswspace (wint_t __wc) __THROW; /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -extern int iswupper __P ((wint_t __wc)); +extern int iswupper (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described in the previous subclause. */ -extern int iswxdigit __P ((wint_t __wc)); +extern int iswxdigit (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a standard blank wide character or a locale-specific set of wide characters for which `iswalnum' is false. */ # ifdef __USE_GNU -extern int iswblank __P ((wint_t __wc)); +extern int iswblank (wint_t __wc) __THROW; # endif /* @@ -159,13 +159,13 @@ extern int iswblank __P ((wint_t __wc)); /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ -extern wctype_t __wctype __P ((__const char *__property)); -extern wctype_t wctype __P ((__const char *__property)); +extern wctype_t __wctype (__const char *__property) __THROW; +extern wctype_t wctype (__const char *__property) __THROW; /* Determine whether the wide-character WC has the property described by DESC. */ -extern int __iswctype __P ((wint_t __wc, wctype_t __desc)); -extern int iswctype __P ((wint_t __wc, wctype_t __desc)); +extern int __iswctype (wint_t __wc, wctype_t __desc) __THROW; +extern int iswctype (wint_t __wc, wctype_t __desc) __THROW; #if __GNUC__ >= 2 && defined __OPTIMIZE__ /* The tables are always organized in a way which allows direct access @@ -227,13 +227,13 @@ extern unsigned int *__ctype32_b; typedef __const __int32_t *wctrans_t; /* Converts an uppercase letter to the corresponding lowercase letter. */ -extern wint_t towlower __P ((wint_t __wc)); +extern wint_t towlower (wint_t __wc) __THROW; /* Converts an lowercase letter to the corresponding uppercase letter. */ -extern wint_t towupper __P ((wint_t __wc)); +extern wint_t towupper (wint_t __wc) __THROW; /* Map the wide character WC using the mapping described by DESC. */ -extern wint_t __towctrans __P ((wint_t __wc, wctrans_t __desc)); +extern wint_t __towctrans (wint_t __wc, wctrans_t __desc) __THROW; __END_DECLS @@ -252,10 +252,10 @@ __BEGIN_DECLS /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ -extern wctrans_t wctrans __P ((__const char *__property)); +extern wctrans_t wctrans (__const char *__property) __THROW; /* Map the wide character WC using the mapping described by DESC. */ -extern wint_t towctrans __P ((wint_t __wc, wctrans_t __desc)); +extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __THROW; # ifdef __USE_GNU /* Declare the interface to extended locale model. */ @@ -263,67 +263,67 @@ extern wint_t towctrans __P ((wint_t __wc, wctrans_t __desc)); /* Test for any wide character for which `iswalpha' or `iswdigit' is true. */ -extern int __iswalnum_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswalnum_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character for which `iswupper' or 'iswlower' is true, or any wide character that is one of a locale-specific set of wide-characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -extern int __iswalpha_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswalpha_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any control wide character. */ -extern int __iswcntrl_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswcntrl_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character that corresponds to a decimal-digit character. */ -extern int __iswdigit_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswdigit_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character for which `iswprint' is true and `iswspace' is false. */ -extern int __iswgraph_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswgraph_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character that corresponds to a lowercase letter or is one of a locale-specific set of wide characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -extern int __iswlower_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswlower_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any printing wide character. */ -extern int __iswprint_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswprint_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any printing wide character that is one of a locale-specific et of wide characters for which neither `iswspace' nor `iswalnum' is true. */ -extern int __iswpunct_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswpunct_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character that corresponds to a locale-specific set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ -extern int __iswspace_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswspace_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ -extern int __iswupper_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswupper_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described in the previous subclause. */ -extern int __iswxdigit_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswxdigit_l (wint_t __wc, __locale_t __locale) __THROW; /* Test for any wide character that corresponds to a standard blank wide character or a locale-specific set of wide characters for which `iswalnum' is false. */ -extern int __iswblank_l __P ((wint_t __wc, __locale_t __locale)); +extern int __iswblank_l (wint_t __wc, __locale_t __locale) __THROW; /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ -extern wctype_t __wctype_l __P ((__const char *__property, - __locale_t __locale)); +extern wctype_t __wctype_l (__const char *__property, __locale_t __locale) + __THROW; /* Determine whether the wide-character WC has the property described by DESC. */ -extern int __iswctype_l __P ((wint_t __wc, wctype_t __desc, - __locale_t __locale)); +extern int __iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) + __THROW; /* @@ -331,14 +331,14 @@ extern int __iswctype_l __P ((wint_t __wc, wctype_t __desc, */ /* Converts an uppercase letter to the corresponding lowercase letter. */ -extern wint_t __towlower_l __P ((wint_t __wc, __locale_t __locale)); +extern wint_t __towlower_l (wint_t __wc, __locale_t __locale) __THROW; /* Converts an lowercase letter to the corresponding uppercase letter. */ -extern wint_t __towupper_l __P ((wint_t __wc, __locale_t __locale)); +extern wint_t __towupper_l (wint_t __wc, __locale_t __locale) __THROW; /* Map the wide character WC using the mapping described by DESC. */ -extern wint_t __towctrans_l __P ((wint_t __wc, wctrans_t __desc, - __locale_t __locale)); +extern wint_t __towctrans_l (wint_t __wc, wctrans_t __desc, + __locale_t __locale) __THROW; # endif /* Use GNU. */ |