diff --git a/src/api/aio.c b/src/api/aio.c index 95a65a7..9e5566f 100644 --- a/src/api/aio.c +++ b/src/api/aio.c @@ -30,12 +30,12 @@ C(LIO_READ) C(LIO_WAIT) C(LIO_WRITE) -int(*p_aio_cancel)(int,struct aiocb*) = aio_cancel; -int(*p_aio_error)(const struct aiocb*) = aio_error; -int(*p_aio_fsync)(int,struct aiocb*) = aio_fsync; -int(*p_aio_read)(struct aiocb*) = aio_read; -ssize_t(*p_aio_return)(struct aiocb*) = aio_return; -int(*p_aio_suspend)(const struct aiocb*const[],int,const struct timespec*) = aio_suspend; -int(*p_aio_write)(struct aiocb*) = aio_write; -int(*p_lio_listio)(int,struct aiocb*restrict const[restrict],int,struct sigevent*restrict) = lio_listio; +{int(*p)(int,struct aiocb*) = aio_cancel;} +{int(*p)(const struct aiocb*) = aio_error;} +{int(*p)(int,struct aiocb*) = aio_fsync;} +{int(*p)(struct aiocb*) = aio_read;} +{ssize_t(*p)(struct aiocb*) = aio_return;} +{int(*p)(const struct aiocb*const[],int,const struct timespec*) = aio_suspend;} +{int(*p)(struct aiocb*) = aio_write;} +{int(*p)(int,struct aiocb*restrict const[restrict],int,struct sigevent*restrict) = lio_listio;} } diff --git a/src/api/arpa_inet.c b/src/api/arpa_inet.c index 52b013a..afbfca1 100644 --- a/src/api/arpa_inet.c +++ b/src/api/arpa_inet.c @@ -15,26 +15,26 @@ C(INET6_ADDRSTRLEN) #ifdef htonl C(htonl(0)) #else -uint32_t(*p_htonl)(uint32_t) = htonl; +{uint32_t(*p)(uint32_t) = htonl;} #endif #ifdef htons C(htons(0)) #else -uint16_t(*p_htons)(uint16_t) = htons; +{uint16_t(*p)(uint16_t) = htons;} #endif #ifdef ntohl C(ntohl(0)) #else -uint32_t(*p_ntohl)(uint32_t) = ntohl; +{uint32_t(*p)(uint32_t) = ntohl;} #endif #ifdef ntohs C(ntohs(0)) #else -uint16_t(*p_ntohs)(uint16_t) = ntohs; +{uint16_t(*p)(uint16_t) = ntohs;} #endif -in_addr_t(*p_inet_addr)(const char*) = inet_addr; -char*(*p_inet_ntoa)(struct in_addr) = inet_ntoa; -const char*(*p_inet_ntop)(int,const void*restrict,char*restrict,socklen_t) = inet_ntop; -int(*p_inet_pton)(int,const char*restrict,void*restrict) = inet_pton; +{in_addr_t(*p)(const char*) = inet_addr;} +{char*(*p)(struct in_addr) = inet_ntoa;} +{const char*(*p)(int,const void*restrict,char*restrict,socklen_t) = inet_ntop;} +{int(*p)(int,const char*restrict,void*restrict) = inet_pton;} } diff --git a/src/api/complex.c b/src/api/complex.c index 36351fc..5522233 100644 --- a/src/api/complex.c +++ b/src/api/complex.c @@ -7,70 +7,70 @@ T(float complex) {const float complex c = _Complex_I;} {const float complex c = I;} -double(*p_cabs)(double complex) = cabs; -float(*p_cabsf)(float complex) = cabsf; -long double(*p_cabsl)(long double complex) = cabsl; -double complex(*p_cacos)(double complex) = cacos; -float complex(*p_cacosf)(float complex) = cacosf; -double complex(*p_cacosh)(double complex) = cacosh; -float complex(*p_cacoshf)(float complex) = cacoshf; -long double complex(*p_cacoshl)(long double complex) = cacoshl; -long double complex(*p_cacosl)(long double complex) = cacosl; -double(*p_carg)(double complex) = carg; -float(*p_cargf)(float complex) = cargf; -long double(*p_cargl)(long double complex) = cargl; -double complex(*p_casin)(double complex) = casin; -float complex(*p_casinf)(float complex) = casinf; -double complex(*p_casinh)(double complex) = casinh; -float complex(*p_casinhf)(float complex) = casinhf; -long double complex(*p_casinhl)(long double complex) = casinhl; -long double complex(*p_casinl)(long double complex) = casinl; -double complex(*p_catan)(double complex) = catan; -float complex(*p_catanf)(float complex) = catanf; -double complex(*p_catanh)(double complex) = catanh; -float complex(*p_catanhf)(float complex) = catanhf; -long double complex(*p_catanhl)(long double complex) = catanhl; -long double complex(*p_catanl)(long double complex) = catanl; -double complex(*p_ccos)(double complex) = ccos; -float complex(*p_ccosf)(float complex) = ccosf; -double complex(*p_ccosh)(double complex) = ccosh; -float complex(*p_ccoshf)(float complex) = ccoshf; -long double complex(*p_ccoshl)(long double complex) = ccoshl; -long double complex(*p_ccosl)(long double complex) = ccosl; -double complex(*p_cexp)(double complex) = cexp; -float complex(*p_cexpf)(float complex) = cexpf; -long double complex(*p_cexpl)(long double complex) = cexpl; -double(*p_cimag)(double complex) = cimag; -float(*p_cimagf)(float complex) = cimagf; -long double(*p_cimagl)(long double complex) = cimagl; -double complex(*p_clog)(double complex) = clog; -float complex(*p_clogf)(float complex) = clogf; -long double complex(*p_clogl)(long double complex) = clogl; -double complex(*p_conj)(double complex) = conj; -float complex(*p_conjf)(float complex) = conjf; -long double complex(*p_conjl)(long double complex) = conjl; -double complex(*p_cpow)(double complex,double complex) = cpow; -float complex(*p_cpowf)(float complex,float complex) = cpowf; -long double complex(*p_cpowl)(long double complex,long double complex) = cpowl; -double complex(*p_cproj)(double complex) = cproj; -float complex(*p_cprojf)(float complex) = cprojf; -long double complex(*p_cprojl)(long double complex) = cprojl; -double(*p_creal)(double complex) = creal; -float(*p_crealf)(float complex) = crealf; -long double(*p_creall)(long double complex) = creall; -double complex(*p_csin)(double complex) = csin; -float complex(*p_csinf)(float complex) = csinf; -double complex(*p_csinh)(double complex) = csinh; -float complex(*p_csinhf)(float complex) = csinhf; -long double complex(*p_csinhl)(long double complex) = csinhl; -long double complex(*p_csinl)(long double complex) = csinl; -double complex(*p_csqrt)(double complex) = csqrt; -float complex(*p_csqrtf)(float complex) = csqrtf; -long double complex(*p_csqrtl)(long double complex) = csqrtl; -double complex(*p_ctan)(double complex) = ctan; -float complex(*p_ctanf)(float complex) = ctanf; -double complex(*p_ctanh)(double complex) = ctanh; -float complex(*p_ctanhf)(float complex) = ctanhf; -long double complex(*p_ctanhl)(long double complex) = ctanhl; -long double complex(*p_ctanl)(long double complex) = ctanl; +{double(*p)(double complex) = cabs;} +{float(*p)(float complex) = cabsf;} +{long double(*p)(long double complex) = cabsl;} +{double complex(*p)(double complex) = cacos;} +{float complex(*p)(float complex) = cacosf;} +{double complex(*p)(double complex) = cacosh;} +{float complex(*p)(float complex) = cacoshf;} +{long double complex(*p)(long double complex) = cacoshl;} +{long double complex(*p)(long double complex) = cacosl;} +{double(*p)(double complex) = carg;} +{float(*p)(float complex) = cargf;} +{long double(*p)(long double complex) = cargl;} +{double complex(*p)(double complex) = casin;} +{float complex(*p)(float complex) = casinf;} +{double complex(*p)(double complex) = casinh;} +{float complex(*p)(float complex) = casinhf;} +{long double complex(*p)(long double complex) = casinhl;} +{long double complex(*p)(long double complex) = casinl;} +{double complex(*p)(double complex) = catan;} +{float complex(*p)(float complex) = catanf;} +{double complex(*p)(double complex) = catanh;} +{float complex(*p)(float complex) = catanhf;} +{long double complex(*p)(long double complex) = catanhl;} +{long double complex(*p)(long double complex) = catanl;} +{double complex(*p)(double complex) = ccos;} +{float complex(*p)(float complex) = ccosf;} +{double complex(*p)(double complex) = ccosh;} +{float complex(*p)(float complex) = ccoshf;} +{long double complex(*p)(long double complex) = ccoshl;} +{long double complex(*p)(long double complex) = ccosl;} +{double complex(*p)(double complex) = cexp;} +{float complex(*p)(float complex) = cexpf;} +{long double complex(*p)(long double complex) = cexpl;} +{double(*p)(double complex) = cimag;} +{float(*p)(float complex) = cimagf;} +{long double(*p)(long double complex) = cimagl;} +{double complex(*p)(double complex) = clog;} +{float complex(*p)(float complex) = clogf;} +{long double complex(*p)(long double complex) = clogl;} +{double complex(*p)(double complex) = conj;} +{float complex(*p)(float complex) = conjf;} +{long double complex(*p)(long double complex) = conjl;} +{double complex(*p)(double complex,double complex) = cpow;} +{float complex(*p)(float complex,float complex) = cpowf;} +{long double complex(*p)(long double complex,long double complex) = cpowl;} +{double complex(*p)(double complex) = cproj;} +{float complex(*p)(float complex) = cprojf;} +{long double complex(*p)(long double complex) = cprojl;} +{double(*p)(double complex) = creal;} +{float(*p)(float complex) = crealf;} +{long double(*p)(long double complex) = creall;} +{double complex(*p)(double complex) = csin;} +{float complex(*p)(float complex) = csinf;} +{double complex(*p)(double complex) = csinh;} +{float complex(*p)(float complex) = csinhf;} +{long double complex(*p)(long double complex) = csinhl;} +{long double complex(*p)(long double complex) = csinl;} +{double complex(*p)(double complex) = csqrt;} +{float complex(*p)(float complex) = csqrtf;} +{long double complex(*p)(long double complex) = csqrtl;} +{double complex(*p)(double complex) = ctan;} +{float complex(*p)(float complex) = ctanf;} +{double complex(*p)(double complex) = ctanh;} +{float complex(*p)(float complex) = ctanhf;} +{long double complex(*p)(long double complex) = ctanhl;} +{long double complex(*p)(long double complex) = ctanl;} } diff --git a/src/api/cpio.c b/src/api/cpio.c index da2b24e..7f0a8f9 100644 --- a/src/api/cpio.c +++ b/src/api/cpio.c @@ -21,6 +21,6 @@ C(C_ISCHR) C(C_ISCTG) C(C_ISLNK) C(C_ISSOCK) -char *s = MAGIC; +{char *s = "" MAGIC;} } diff --git a/src/api/ctype.c b/src/api/ctype.c index 27b305e..8e55fa8 100644 --- a/src/api/ctype.c +++ b/src/api/ctype.c @@ -2,38 +2,38 @@ #define T(t) (t*)0; static void f() { -int(*p_isalnum)(int) = isalnum; -int(*p_isalpha)(int) = isalpha; -int(*p_isascii)(int) = isascii; -int(*p_isblank)(int) = isblank; -int(*p_iscntrl)(int) = iscntrl; -int(*p_isdigit)(int) = isdigit; -int(*p_isgraph)(int) = isgraph; -int(*p_islower)(int) = islower; -int(*p_isprint)(int) = isprint; -int(*p_ispunct)(int) = ispunct; -int(*p_isspace)(int) = isspace; -int(*p_isupper)(int) = isupper; -int(*p_isxdigit)(int) = isxdigit; -int(*p_toascii)(int) = toascii; -int(*p_tolower)(int) = tolower; -int(*p_toupper)(int) = toupper; +{int(*p)(int) = isalnum;} +{int(*p)(int) = isalpha;} +{int(*p)(int) = isascii;} +{int(*p)(int) = isblank;} +{int(*p)(int) = iscntrl;} +{int(*p)(int) = isdigit;} +{int(*p)(int) = isgraph;} +{int(*p)(int) = islower;} +{int(*p)(int) = isprint;} +{int(*p)(int) = ispunct;} +{int(*p)(int) = isspace;} +{int(*p)(int) = isupper;} +{int(*p)(int) = isxdigit;} +{int(*p)(int) = toascii;} +{int(*p)(int) = tolower;} +{int(*p)(int) = toupper;} #ifdef _POSIX_C_SOURCE T(locale_t) -int(*p_isalnum_l)(int,locale_t) = isalnum_l; -int(*p_isalpha_l)(int,locale_t) = isalpha_l; -int(*p_isblank_l)(int,locale_t) = isblank_l; -int(*p_iscntrl_l)(int,locale_t) = iscntrl_l; -int(*p_isdigit_l)(int,locale_t) = isdigit_l; -int(*p_isgraph_l)(int,locale_t) = isgraph_l; -int(*p_islower_l)(int,locale_t) = islower_l; -int(*p_isprint_l)(int,locale_t) = isprint_l; -int(*p_ispunct_l)(int,locale_t) = ispunct_l; -int(*p_isspace_l)(int,locale_t) = isspace_l; -int(*p_isupper_l)(int,locale_t) = isupper_l; -int(*p_isxdigit_l)(int,locale_t) = isxdigit_l; -int(*p_tolower_l)(int,locale_t) = tolower_l; -int(*p_toupper_l)(int,locale_t) = toupper_l; +{int(*p)(int,locale_t) = isalnum_l;} +{int(*p)(int,locale_t) = isalpha_l;} +{int(*p)(int,locale_t) = isblank_l;} +{int(*p)(int,locale_t) = iscntrl_l;} +{int(*p)(int,locale_t) = isdigit_l;} +{int(*p)(int,locale_t) = isgraph_l;} +{int(*p)(int,locale_t) = islower_l;} +{int(*p)(int,locale_t) = isprint_l;} +{int(*p)(int,locale_t) = ispunct_l;} +{int(*p)(int,locale_t) = isspace_l;} +{int(*p)(int,locale_t) = isupper_l;} +{int(*p)(int,locale_t) = isxdigit_l;} +{int(*p)(int,locale_t) = tolower_l;} +{int(*p)(int,locale_t) = toupper_l;} #endif } diff --git a/src/api/dirent.c b/src/api/dirent.c index 501c97c..9a2f40e 100644 --- a/src/api/dirent.c +++ b/src/api/dirent.c @@ -16,17 +16,17 @@ F(ino_t, d_ino) #endif F(char, d_name[0]) } -int(*p_alphasort)(const struct dirent**,const struct dirent**) = alphasort; -int(*p_closedir)(DIR*) = closedir; -int(*p_dirfd)(DIR*) = dirfd; -DIR*(*p_fdopendir)(int) = fdopendir; -DIR*(*p_opendir)(const char*) = opendir; -struct dirent*(*p_readdir)(DIR*) = readdir; -int(*p_readdir_r)(DIR*restrict,struct dirent*restrict,struct dirent**restrict) = readdir_r; -void(*p_rewinddir)(DIR*) = rewinddir; -int(*p_scandir)(const char*,struct dirent***,int(*)(const struct dirent*),int(*)(const struct dirent**,const struct dirent**)) = scandir; +{int(*p)(const struct dirent**,const struct dirent**) = alphasort;} +{int(*p)(DIR*) = closedir;} +{int(*p)(DIR*) = dirfd;} +DIR*(*p)(int) = fdopendir; +DIR*(*p)(const char*) = opendir; +{struct dirent*(*p)(DIR*) = readdir;} +{int(*p)(DIR*restrict,struct dirent*restrict,struct dirent**restrict) = readdir_r;} +{void(*p)(DIR*) = rewinddir;} +{int(*p)(const char*,struct dirent***,int(*)(const struct dirent*),int(*)(const struct dirent**,const struct dirent**)) = scandir;} #ifdef _XOPEN_SOURCE -void(*p_seekdir)(DIR*,long) = seekdir; -long(*p_telldir)(DIR*) = telldir; +{void(*p)(DIR*,long) = seekdir;} +{long(*p)(DIR*) = telldir;} #endif } diff --git a/src/api/dlfcn.c b/src/api/dlfcn.c index a861507..afa41e4 100644 --- a/src/api/dlfcn.c +++ b/src/api/dlfcn.c @@ -7,8 +7,8 @@ C(RTLD_NOW) C(RTLD_GLOBAL) C(RTLD_LOCAL) -int(*p_dlclose)(void*) = dlclose; -char*(*p_dlerror)(void) = dlerror; -void*(*p_dlopen)(const char*,int) = dlopen; -void*(*p_dlsym)(void*restrict,const char*restrict) = dlsym; +{int(*p)(void*) = dlclose;} +{char*(*p)(void) = dlerror;} +{void*(*p)(const char*,int) = dlopen;} +{void*(*p)(void*restrict,const char*restrict) = dlsym;} } diff --git a/src/api/fcntl.c b/src/api/fcntl.c index 46b7084..4c25cdc 100644 --- a/src/api/fcntl.c +++ b/src/api/fcntl.c @@ -83,16 +83,16 @@ T(mode_t) T(off_t) T(pid_t) -int(*p_fcntl)(int,int,...) = fcntl; -int(*p_posix_fadvise)(int,off_t,off_t,int) = posix_fadvise; -int(*p_posix_fallocate)(int,off_t,off_t) = posix_fallocate; +{int(*p)(int,int,...) = fcntl;} +{int(*p)(int,off_t,off_t,int) = posix_fadvise;} +{int(*p)(int,off_t,off_t) = posix_fallocate;} } #ifndef _XOPEN_SOURCE #include #endif static void g() { -int(*p_creat)(const char*,mode_t) = creat; -int(*p_open)(const char*,int,...) = open; -int(*p_openat)(int,const char*,int,...) = openat; +{int(*p)(const char*,mode_t) = creat;} +{int(*p)(const char*,int,...) = open;} +{int(*p)(int,const char*,int,...) = openat;} } diff --git a/src/api/fenv.c b/src/api/fenv.c index d489386..5790737 100644 --- a/src/api/fenv.c +++ b/src/api/fenv.c @@ -17,15 +17,15 @@ C(FE_ALL_EXCEPT) //FE_TOWARDZERO //FE_UPWARD {const fenv_t *c = FE_DFL_ENV;} -int(*p_feclearexcept)(int) = feclearexcept; -int(*p_fegetenv)(fenv_t*) = fegetenv; -int(*p_fegetexceptflag)(fexcept_t*,int) = fegetexceptflag; -int(*p_fegetround)(void) = fegetround; -int(*p_feholdexcept)(fenv_t*) = feholdexcept; -int(*p_feraiseexcept)(int) = feraiseexcept; -int(*p_fesetenv)(const fenv_t*) = fesetenv; -int(*p_fesetexceptflag)(const fexcept_t*,int) = fesetexceptflag; -int(*p_fesetround)(int) = fesetround; -int(*p_fetestexcept)(int) = fetestexcept; -int(*p_feupdateenv)(const fenv_t*) = feupdateenv; +{int(*p)(int) = feclearexcept;} +{int(*p)(fenv_t*) = fegetenv;} +{int(*p)(fexcept_t*,int) = fegetexceptflag;} +{int(*p)(void) = fegetround;} +{int(*p)(fenv_t*) = feholdexcept;} +{int(*p)(int) = feraiseexcept;} +{int(*p)(const fenv_t*) = fesetenv;} +{int(*p)(const fexcept_t*,int) = fesetexceptflag;} +{int(*p)(int) = fesetround;} +{int(*p)(int) = fetestexcept;} +{int(*p)(const fenv_t*) = feupdateenv;} } diff --git a/src/api/fmtmsg.c b/src/api/fmtmsg.c index 1c79c84..b9ee758 100644 --- a/src/api/fmtmsg.c +++ b/src/api/fmtmsg.c @@ -22,6 +22,6 @@ C(MM_OK) C(MM_NOTOK) C(MM_NOMSG) C(MM_NOCON) -int(*p_fmtmsg)(long,const char*,int,const char*,const char*,const char*) = fmtmsg; +{int(*p)(long,const char*,int,const char*,const char*,const char*) = fmtmsg;} } #endif diff --git a/src/api/fnmatch.c b/src/api/fnmatch.c index e740d79..d336765 100644 --- a/src/api/fnmatch.c +++ b/src/api/fnmatch.c @@ -6,5 +6,5 @@ C(FNM_NOMATCH) C(FNM_PATHNAME) C(FNM_PERIOD) C(FNM_NOESCAPE) -int(*p_fnmatch)(const char*,const char*,int) = fnmatch; +{int(*p)(const char*,const char*,int) = fnmatch;} } diff --git a/src/api/ftw.c b/src/api/ftw.c index 1c63627..9efe2a3 100644 --- a/src/api/ftw.c +++ b/src/api/ftw.c @@ -69,8 +69,8 @@ F(struct timespec, st_ctim) F(blksize_t, st_blksize) F(blkcnt_t, st_blocks) } -int(*p_ftw)(const char*,int(*)(const char*,const struct stat*,int),int) = ftw; -int(*p_nftw)(const char*,int(*)(const char*,const struct stat*,int,struct FTW*),int,int) = nftw; +{int(*p)(const char*,int(*)(const char*,const struct stat*,int),int) = ftw;} +{int(*p)(const char*,int(*)(const char*,const struct stat*,int,struct FTW*),int,int) = nftw;} } #endif diff --git a/src/api/glob.c b/src/api/glob.c index 2e724e4..4f146d9 100644 --- a/src/api/glob.c +++ b/src/api/glob.c @@ -22,6 +22,6 @@ C(GLOB_NOSORT) C(GLOB_ABORTED) C(GLOB_NOMATCH) C(GLOB_NOSPACE) -int(*p_glob)(const char*restrict,int,int(*)(const char*,int),glob_t*restrict) = glob; -void(*p_globfree)(glob_t*) = globfree; +{int(*p)(const char*restrict,int,int(*)(const char*,int),glob_t*restrict) = glob;} +{void(*p)(glob_t*) = globfree;} } diff --git a/src/api/grp.c b/src/api/grp.c index 2149c9e..d8a5e8c 100644 --- a/src/api/grp.c +++ b/src/api/grp.c @@ -11,13 +11,13 @@ F(char*, gr_name) F(gid_t, gr_gid) F(char**, gr_mem) } -void(*p_endgrent)(void) = endgrent; -struct group*(*p_getgrent)(void) = getgrent; -struct group*(*p_getgrgid)(gid_t) = getgrgid; -int(*p_getgrgid_r)(gid_t,struct group*,char*,size_t,struct group**) = getgrgid_r; -struct group*(*p_getgrnam)(const char*) = getgrnam; -int(*p_getgrnam_r)(const char*,struct group*,char*,size_t,struct group**) = getgrnam_r; +{void(*p)(void) = endgrent;} +{struct group*(*p)(void) = getgrent;} +{struct group*(*p)(gid_t) = getgrgid;} +{int(*p)(gid_t,struct group*,char*,size_t,struct group**) = getgrgid_r;} +{struct group*(*p)(const char*) = getgrnam;} +{int(*p)(const char*,struct group*,char*,size_t,struct group**) = getgrnam_r;} #ifdef _XOPEN_SOURCE -void(*p_setgrent)(void) = setgrent; +{void(*p)(void) = setgrent;} #endif } diff --git a/src/api/iconv.c b/src/api/iconv.c index 966db10..93f32d5 100644 --- a/src/api/iconv.c +++ b/src/api/iconv.c @@ -4,7 +4,7 @@ static void f() { T(iconv_t) T(size_t) -size_t(*p_iconv)(iconv_t,char**restrict,size_t*restrict,char**restrict,size_t*restrict) = iconv; -int(*p_iconv_close)(iconv_t) = iconv_close; -iconv_t(*p_iconv_open)(const char*,const char*) = iconv_open; +{size_t(*p)(iconv_t,char**restrict,size_t*restrict,char**restrict,size_t*restrict) = iconv;} +{int(*p)(iconv_t) = iconv_close;} +{iconv_t(*p)(const char*,const char*) = iconv_open;} } diff --git a/src/api/inttypes.c b/src/api/inttypes.c index b61ffaf..b87aab8 100644 --- a/src/api/inttypes.c +++ b/src/api/inttypes.c @@ -250,14 +250,14 @@ S(SCNxFAST32) S(SCNxFAST64) S(SCNxMAX) S(SCNxPTR) -intmax_t(*p_imaxabs)(intmax_t) = imaxabs; -imaxdiv_t(*p_imaxdiv)(intmax_t,intmax_t) = imaxdiv; -intmax_t(*p_strtoimax)(const char*restrict,char**restrict,int) = strtoimax; -uintmax_t(*p_strtoumax)(const char*restrict,char**restrict,int) = strtoumax; +{intmax_t(*p)(intmax_t) = imaxabs;} +{imaxdiv_t(*p)(intmax_t,intmax_t) = imaxdiv;} +{intmax_t(*p)(const char*restrict,char**restrict,int) = strtoimax;} +{uintmax_t(*p)(const char*restrict,char**restrict,int) = strtoumax;} } #include static void g() { -intmax_t(*p_wcstoimax)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoimax; -uintmax_t(*p_wcstoumax)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoumax; +{intmax_t(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoimax;} +{uintmax_t(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoumax;} } diff --git a/src/api/langinfo.c b/src/api/langinfo.c index a9ff98e..83b721f 100644 --- a/src/api/langinfo.c +++ b/src/api/langinfo.c @@ -60,6 +60,6 @@ C(THOUSEP) C(YESEXPR) C(NOEXPR) C(CRNCYSTR) -char*(*p_nl_langinfo)(nl_item) = nl_langinfo; -char*(*p_nl_langinfo_l)(nl_item,locale_t) = nl_langinfo_l; +{char*(*p)(nl_item) = nl_langinfo;} +{char*(*p)(nl_item,locale_t) = nl_langinfo_l;} } diff --git a/src/api/libgen.c b/src/api/libgen.c index 7fe189f..188ac8b 100644 --- a/src/api/libgen.c +++ b/src/api/libgen.c @@ -2,8 +2,8 @@ #include static void f() { -char*(*p_basename)(char*) = basename; -char*(*p_dirname)(char*) = dirname; +{char*(*p)(char*) = basename;} +{char*(*p)(char*) = dirname;} } #endif diff --git a/src/api/locale.c b/src/api/locale.c index 4143a97..e7ef233 100644 --- a/src/api/locale.c +++ b/src/api/locale.c @@ -53,11 +53,11 @@ C(LC_MONETARY_MASK) C(LC_NUMERIC_MASK) C(LC_TIME_MASK) {locale_t x = LC_GLOBAL_LOCALE;} -locale_t(*p_duplocale)(locale_t) = duplocale; -void(*p_freelocale)(locale_t) = freelocale; -locale_t(*p_newlocale)(int,const char*,locale_t) = newlocale; -locale_t(*p_uselocale)(locale_t) = uselocale; +{locale_t(*p)(locale_t) = duplocale;} +{void(*p)(locale_t) = freelocale;} +{locale_t(*p)(int,const char*,locale_t) = newlocale;} +{locale_t(*p)(locale_t) = uselocale;} #endif -struct lconv*(*p_localeconv)(void) = localeconv; -char*(*p_setlocale)(int,const char*) = setlocale; +{struct lconv*(*p)(void) = localeconv;} +{char*(*p)(int,const char*) = setlocale;} } diff --git a/src/api/math.c b/src/api/math.c index 20819d9..2949140 100644 --- a/src/api/math.c +++ b/src/api/math.c @@ -51,185 +51,185 @@ C(FP_ILOGBNAN) C(MATH_ERRNO) C(MATH_ERREXCEPT) C(math_errhandling) -double(*p_acos)(double) = acos; -float(*p_acosf)(float) = acosf; -double(*p_acosh)(double) = acosh; -float(*p_acoshf)(float) = acoshf; -long double(*p_acoshl)(long double) = acoshl; -long double(*p_acosl)(long double) = acosl; -double(*p_asin)(double) = asin; -float(*p_asinf)(float) = asinf; -double(*p_asinh)(double) = asinh; -float(*p_asinhf)(float) = asinhf; -long double(*p_asinhl)(long double) = asinhl; -long double(*p_asinl)(long double) = asinl; -double(*p_atan)(double) = atan; -double(*p_atan2)(double,double) = atan2; -float(*p_atan2f)(float,float) = atan2f; -long double(*p_atan2l)(long double,long double) = atan2l; -float(*p_atanf)(float) = atanf; -double(*p_atanh)(double) = atanh; -float(*p_atanhf)(float) = atanhf; -long double(*p_atanhl)(long double) = atanhl; -long double(*p_atanl)(long double) = atanl; -double(*p_cbrt)(double) = cbrt; -float(*p_cbrtf)(float) = cbrtf; -long double(*p_cbrtl)(long double) = cbrtl; -double(*p_ceil)(double) = ceil; -float(*p_ceilf)(float) = ceilf; -long double(*p_ceill)(long double) = ceill; -double(*p_copysign)(double,double) = copysign; -float(*p_copysignf)(float,float) = copysignf; -long double(*p_copysignl)(long double,long double) = copysignl; -double(*p_cos)(double) = cos; -float(*p_cosf)(float) = cosf; -double(*p_cosh)(double) = cosh; -float(*p_coshf)(float) = coshf; -long double(*p_coshl)(long double) = coshl; -long double(*p_cosl)(long double) = cosl; -double(*p_erf)(double) = erf; -double(*p_erfc)(double) = erfc; -float(*p_erfcf)(float) = erfcf; -long double(*p_erfcl)(long double) = erfcl; -float(*p_erff)(float) = erff; -long double(*p_erfl)(long double) = erfl; -double(*p_exp)(double) = exp; -double(*p_exp2)(double) = exp2; -float(*p_exp2f)(float) = exp2f; -long double(*p_exp2l)(long double) = exp2l; -float(*p_expf)(float) = expf; -long double(*p_expl)(long double) = expl; -double(*p_expm1)(double) = expm1; -float(*p_expm1f)(float) = expm1f; -long double(*p_expm1l)(long double) = expm1l; -double(*p_fabs)(double) = fabs; -float(*p_fabsf)(float) = fabsf; -long double(*p_fabsl)(long double) = fabsl; -double(*p_fdim)(double,double) = fdim; -float(*p_fdimf)(float,float) = fdimf; -long double(*p_fdiml)(long double,long double) = fdiml; -double(*p_floor)(double) = floor; -float(*p_floorf)(float) = floorf; -long double(*p_floorl)(long double) = floorl; -double(*p_fma)(double,double,double) = fma; -float(*p_fmaf)(float,float,float) = fmaf; -long double(*p_fmal)(long double,long double,long double) = fmal; -double(*p_fmax)(double,double) = fmax; -float(*p_fmaxf)(float,float) = fmaxf; -long double(*p_fmaxl)(long double,long double) = fmaxl; -double(*p_fmin)(double,double) = fmin; -float(*p_fminf)(float,float) = fminf; -long double(*p_fminl)(long double,long double) = fminl; -double(*p_fmod)(double,double) = fmod; -float(*p_fmodf)(float,float) = fmodf; -long double(*p_fmodl)(long double,long double) = fmodl; -double(*p_frexp)(double,int*) = frexp; -float(*p_frexpf)(float,int*) = frexpf; -long double(*p_frexpl)(long double,int*) = frexpl; -double(*p_hypot)(double,double) = hypot; -float(*p_hypotf)(float,float) = hypotf; -long double(*p_hypotl)(long double,long double) = hypotl; -int(*p_ilogb)(double) = ilogb; -int(*p_ilogbf)(float) = ilogbf; -int(*p_ilogbl)(long double) = ilogbl; +{double(*p)(double) = acos;} +{float(*p)(float) = acosf;} +{double(*p)(double) = acosh;} +{float(*p)(float) = acoshf;} +{long double(*p)(long double) = acoshl;} +{long double(*p)(long double) = acosl;} +{double(*p)(double) = asin;} +{float(*p)(float) = asinf;} +{double(*p)(double) = asinh;} +{float(*p)(float) = asinhf;} +{long double(*p)(long double) = asinhl;} +{long double(*p)(long double) = asinl;} +{double(*p)(double) = atan;} +{double(*p)(double,double) = atan2;} +{float(*p)(float,float) = atan2f;} +{long double(*p)(long double,long double) = atan2l;} +{float(*p)(float) = atanf;} +{double(*p)(double) = atanh;} +{float(*p)(float) = atanhf;} +{long double(*p)(long double) = atanhl;} +{long double(*p)(long double) = atanl;} +{double(*p)(double) = cbrt;} +{float(*p)(float) = cbrtf;} +{long double(*p)(long double) = cbrtl;} +{double(*p)(double) = ceil;} +{float(*p)(float) = ceilf;} +{long double(*p)(long double) = ceill;} +{double(*p)(double,double) = copysign;} +{float(*p)(float,float) = copysignf;} +{long double(*p)(long double,long double) = copysignl;} +{double(*p)(double) = cos;} +{float(*p)(float) = cosf;} +{double(*p)(double) = cosh;} +{float(*p)(float) = coshf;} +{long double(*p)(long double) = coshl;} +{long double(*p)(long double) = cosl;} +{double(*p)(double) = erf;} +{double(*p)(double) = erfc;} +{float(*p)(float) = erfcf;} +{long double(*p)(long double) = erfcl;} +{float(*p)(float) = erff;} +{long double(*p)(long double) = erfl;} +{double(*p)(double) = exp;} +{double(*p)(double) = exp2;} +{float(*p)(float) = exp2f;} +{long double(*p)(long double) = exp2l;} +{float(*p)(float) = expf;} +{long double(*p)(long double) = expl;} +{double(*p)(double) = expm1;} +{float(*p)(float) = expm1f;} +{long double(*p)(long double) = expm1l;} +{double(*p)(double) = fabs;} +{float(*p)(float) = fabsf;} +{long double(*p)(long double) = fabsl;} +{double(*p)(double,double) = fdim;} +{float(*p)(float,float) = fdimf;} +{long double(*p)(long double,long double) = fdiml;} +{double(*p)(double) = floor;} +{float(*p)(float) = floorf;} +{long double(*p)(long double) = floorl;} +{double(*p)(double,double,double) = fma;} +{float(*p)(float,float,float) = fmaf;} +{long double(*p)(long double,long double,long double) = fmal;} +{double(*p)(double,double) = fmax;} +{float(*p)(float,float) = fmaxf;} +{long double(*p)(long double,long double) = fmaxl;} +{double(*p)(double,double) = fmin;} +{float(*p)(float,float) = fminf;} +{long double(*p)(long double,long double) = fminl;} +{double(*p)(double,double) = fmod;} +{float(*p)(float,float) = fmodf;} +{long double(*p)(long double,long double) = fmodl;} +{double(*p)(double,int*) = frexp;} +{float(*p)(float,int*) = frexpf;} +{long double(*p)(long double,int*) = frexpl;} +{double(*p)(double,double) = hypot;} +{float(*p)(float,float) = hypotf;} +{long double(*p)(long double,long double) = hypotl;} +{int(*p)(double) = ilogb;} +{int(*p)(float) = ilogbf;} +{int(*p)(long double) = ilogbl;} #ifdef _XOPEN_SOURCE -double(*p_j0)(double) = j0; -double(*p_j1)(double) = j1; -double(*p_jn)(int,double) = jn; +{double(*p)(double) = j0;} +{double(*p)(double) = j1;} +{double(*p)(int,double) = jn;} #endif -double(*p_ldexp)(double,int) = ldexp; -float(*p_ldexpf)(float,int) = ldexpf; -long double(*p_ldexpl)(long double,int) = ldexpl; -double(*p_lgamma)(double) = lgamma; -float(*p_lgammaf)(float) = lgammaf; -long double(*p_lgammal)(long double) = lgammal; -long long(*p_llrint)(double) = llrint; -long long(*p_llrintf)(float) = llrintf; -long long(*p_llrintl)(long double) = llrintl; -long long(*p_llround)(double) = llround; -long long(*p_llroundf)(float) = llroundf; -long long(*p_llroundl)(long double) = llroundl; -double(*p_log)(double) = log; -double(*p_log10)(double) = log10; -float(*p_log10f)(float) = log10f; -long double(*p_log10l)(long double) = log10l; -double(*p_log1p)(double) = log1p; -float(*p_log1pf)(float) = log1pf; -long double(*p_log1pl)(long double) = log1pl; -double(*p_log2)(double) = log2; -float(*p_log2f)(float) = log2f; -long double(*p_log2l)(long double) = log2l; -double(*p_logb)(double) = logb; -float(*p_logbf)(float) = logbf; -long double(*p_logbl)(long double) = logbl; -float(*p_logf)(float) = logf; -long double(*p_logl)(long double) = logl; -long(*p_lrint)(double) = lrint; -long(*p_lrintf)(float) = lrintf; -long(*p_lrintl)(long double) = lrintl; -long(*p_lround)(double) = lround; -long(*p_lroundf)(float) = lroundf; -long(*p_lroundl)(long double) = lroundl; -double(*p_modf)(double,double*) = modf; -float(*p_modff)(float,float*) = modff; -long double(*p_modfl)(long double,long double*) = modfl; -double(*p_nan)(const char*) = nan; -float(*p_nanf)(const char*) = nanf; -long double(*p_nanl)(const char*) = nanl; -double(*p_nearbyint)(double) = nearbyint; -float(*p_nearbyintf)(float) = nearbyintf; -long double(*p_nearbyintl)(long double) = nearbyintl; -double(*p_nextafter)(double,double) = nextafter; -float(*p_nextafterf)(float,float) = nextafterf; -long double(*p_nextafterl)(long double,long double) = nextafterl; -double(*p_nexttoward)(double,long double) = nexttoward; -float(*p_nexttowardf)(float,long double) = nexttowardf; -long double(*p_nexttowardl)(long double,long double) = nexttowardl; -double(*p_pow)(double,double) = pow; -float(*p_powf)(float,float) = powf; -long double(*p_powl)(long double,long double) = powl; -double(*p_remainder)(double,double) = remainder; -float(*p_remainderf)(float,float) = remainderf; -long double(*p_remainderl)(long double,long double) = remainderl; -double(*p_remquo)(double,double,int*) = remquo; -float(*p_remquof)(float,float,int*) = remquof; -long double(*p_remquol)(long double,long double,int*) = remquol; -double(*p_rint)(double) = rint; -float(*p_rintf)(float) = rintf; -long double(*p_rintl)(long double) = rintl; -double(*p_round)(double) = round; -float(*p_roundf)(float) = roundf; -long double(*p_roundl)(long double) = roundl; -double(*p_scalbln)(double,long) = scalbln; -float(*p_scalblnf)(float,long) = scalblnf; -long double(*p_scalblnl)(long double,long) = scalblnl; -double(*p_scalbn)(double,int) = scalbn; -float(*p_scalbnf)(float,int) = scalbnf; -long double(*p_scalbnl)(long double,int) = scalbnl; -double(*p_sin)(double) = sin; -float(*p_sinf)(float) = sinf; -double(*p_sinh)(double) = sinh; -float(*p_sinhf)(float) = sinhf; -long double(*p_sinhl)(long double) = sinhl; -long double(*p_sinl)(long double) = sinl; -double(*p_sqrt)(double) = sqrt; -float(*p_sqrtf)(float) = sqrtf; -long double(*p_sqrtl)(long double) = sqrtl; -double(*p_tan)(double) = tan; -float(*p_tanf)(float) = tanf; -double(*p_tanh)(double) = tanh; -float(*p_tanhf)(float) = tanhf; -long double(*p_tanhl)(long double) = tanhl; -long double(*p_tanl)(long double) = tanl; -double(*p_tgamma)(double) = tgamma; -float(*p_tgammaf)(float) = tgammaf; -long double(*p_tgammal)(long double) = tgammal; -double(*p_trunc)(double) = trunc; -float(*p_truncf)(float) = truncf; -long double(*p_truncl)(long double) = truncl; +{double(*p)(double,int) = ldexp;} +{float(*p)(float,int) = ldexpf;} +{long double(*p)(long double,int) = ldexpl;} +{double(*p)(double) = lgamma;} +{float(*p)(float) = lgammaf;} +{long double(*p)(long double) = lgammal;} +{long long(*p)(double) = llrint;} +{long long(*p)(float) = llrintf;} +{long long(*p)(long double) = llrintl;} +{long long(*p)(double) = llround;} +{long long(*p)(float) = llroundf;} +{long long(*p)(long double) = llroundl;} +{double(*p)(double) = log;} +{double(*p)(double) = log10;} +{float(*p)(float) = log10f;} +{long double(*p)(long double) = log10l;} +{double(*p)(double) = log1p;} +{float(*p)(float) = log1pf;} +{long double(*p)(long double) = log1pl;} +{double(*p)(double) = log2;} +{float(*p)(float) = log2f;} +{long double(*p)(long double) = log2l;} +{double(*p)(double) = logb;} +{float(*p)(float) = logbf;} +{long double(*p)(long double) = logbl;} +{float(*p)(float) = logf;} +{long double(*p)(long double) = logl;} +{long(*p)(double) = lrint;} +{long(*p)(float) = lrintf;} +{long(*p)(long double) = lrintl;} +{long(*p)(double) = lround;} +{long(*p)(float) = lroundf;} +{long(*p)(long double) = lroundl;} +{double(*p)(double,double*) = modf;} +{float(*p)(float,float*) = modff;} +{long double(*p)(long double,long double*) = modfl;} +{double(*p)(const char*) = nan;} +{float(*p)(const char*) = nanf;} +{long double(*p)(const char*) = nanl;} +{double(*p)(double) = nearbyint;} +{float(*p)(float) = nearbyintf;} +{long double(*p)(long double) = nearbyintl;} +{double(*p)(double,double) = nextafter;} +{float(*p)(float,float) = nextafterf;} +{long double(*p)(long double,long double) = nextafterl;} +{double(*p)(double,long double) = nexttoward;} +{float(*p)(float,long double) = nexttowardf;} +{long double(*p)(long double,long double) = nexttowardl;} +{double(*p)(double,double) = pow;} +{float(*p)(float,float) = powf;} +{long double(*p)(long double,long double) = powl;} +{double(*p)(double,double) = remainder;} +{float(*p)(float,float) = remainderf;} +{long double(*p)(long double,long double) = remainderl;} +{double(*p)(double,double,int*) = remquo;} +{float(*p)(float,float,int*) = remquof;} +{long double(*p)(long double,long double,int*) = remquol;} +{double(*p)(double) = rint;} +{float(*p)(float) = rintf;} +{long double(*p)(long double) = rintl;} +{double(*p)(double) = round;} +{float(*p)(float) = roundf;} +{long double(*p)(long double) = roundl;} +{double(*p)(double,long) = scalbln;} +{float(*p)(float,long) = scalblnf;} +{long double(*p)(long double,long) = scalblnl;} +{double(*p)(double,int) = scalbn;} +{float(*p)(float,int) = scalbnf;} +{long double(*p)(long double,int) = scalbnl;} +{double(*p)(double) = sin;} +{float(*p)(float) = sinf;} +{double(*p)(double) = sinh;} +{float(*p)(float) = sinhf;} +{long double(*p)(long double) = sinhl;} +{long double(*p)(long double) = sinl;} +{double(*p)(double) = sqrt;} +{float(*p)(float) = sqrtf;} +{long double(*p)(long double) = sqrtl;} +{double(*p)(double) = tan;} +{float(*p)(float) = tanf;} +{double(*p)(double) = tanh;} +{float(*p)(float) = tanhf;} +{long double(*p)(long double) = tanhl;} +{long double(*p)(long double) = tanl;} +{double(*p)(double) = tgamma;} +{float(*p)(float) = tgammaf;} +{long double(*p)(long double) = tgammal;} +{double(*p)(double) = trunc;} +{float(*p)(float) = truncf;} +{long double(*p)(long double) = truncl;} #ifdef _XOPEN_SOURCE -double(*p_y0)(double) = y0; -double(*p_y1)(double) = y1; -double(*p_yn)(int,double) = yn; +{double(*p)(double) = y0;} +{double(*p)(double) = y1;} +{double(*p)(int,double) = yn;} #endif } diff --git a/src/api/monetary.c b/src/api/monetary.c index b39667e..1626aae 100644 --- a/src/api/monetary.c +++ b/src/api/monetary.c @@ -5,6 +5,6 @@ static void f() T(locale_t) T(size_t) T(ssize_t) -ssize_t(*p_strfmon)(char*restrict,size_t,const char*restrict,...) = strfmon; -ssize_t(*p_strfmon_l)(char*restrict,size_t,locale_t,const char*restrict,...) = strfmon_l; +{ssize_t(*p)(char*restrict,size_t,const char*restrict,...) = strfmon;} +{ssize_t(*p)(char*restrict,size_t,locale_t,const char*restrict,...) = strfmon_l;} } diff --git a/src/api/mqueue.c b/src/api/mqueue.c index 4648974..d9f754c 100644 --- a/src/api/mqueue.c +++ b/src/api/mqueue.c @@ -16,18 +16,18 @@ F(long, mq_maxmsg) F(long, mq_msgsize) F(long, mq_curmsgs) } -int(*p_mq_close)(mqd_t) = mq_close; -int(*p_mq_getattr)(mqd_t,struct mq_attr*) = mq_getattr; -int(*p_mq_notify)(mqd_t,const struct sigevent*) = mq_notify; -mqd_t(*p_mq_open)(const char*,int,...) = mq_open; -ssize_t(*p_mq_receive)(mqd_t,char*,size_t,unsigned*) = mq_receive; -int(*p_mq_send)(mqd_t,const char*,size_t,unsigned) = mq_send; -int(*p_mq_setattr)(mqd_t,const struct mq_attr*restrict,struct mq_attr*restrict) = mq_setattr; -int(*p_mq_unlink)(const char*) = mq_unlink; +{int(*p)(mqd_t) = mq_close;} +{int(*p)(mqd_t,struct mq_attr*) = mq_getattr;} +{int(*p)(mqd_t,const struct sigevent*) = mq_notify;} +{mqd_t(*p)(const char*,int,...) = mq_open;} +{ssize_t(*p)(mqd_t,char*,size_t,unsigned*) = mq_receive;} +{int(*p)(mqd_t,const char*,size_t,unsigned) = mq_send;} +{int(*p)(mqd_t,const struct mq_attr*restrict,struct mq_attr*restrict) = mq_setattr;} +{int(*p)(const char*) = mq_unlink;} } #include static void g() { -ssize_t(*p_mq_timedreceive)(mqd_t,char*restrict,size_t,unsigned*restrict,const struct timespec*restrict) = mq_timedreceive; -int(*p_mq_timedsend)(mqd_t,const char*,size_t,unsigned,const struct timespec*) = mq_timedsend; +{ssize_t(*p)(mqd_t,char*restrict,size_t,unsigned*restrict,const struct timespec*restrict) = mq_timedreceive;} +{int(*p)(mqd_t,const char*,size_t,unsigned,const struct timespec*) = mq_timedsend;} } diff --git a/src/api/ndbm.c b/src/api/ndbm.c index 8df2187..0193840 100644 --- a/src/api/ndbm.c +++ b/src/api/ndbm.c @@ -13,13 +13,13 @@ F(size_t, dsize) } C(DBM_INSERT) C(DBM_REPLACE) -int(*p_dbm_clearerr)(DBM*) = dbm_clearerr; -void(*p_dbm_close)(DBM*) = dbm_close; -int(*p_dbm_delete)(DBM*,datum) = dbm_delete; -int(*p_dbm_error)(DBM*) = dbm_error; -datum(*p_dbm_fetch)(DBM*,datum) = dbm_fetch; -datum(*p_dbm_firstkey)(DBM*) = dbm_firstkey; -datum(*p_dbm_nextkey)(DBM*) = dbm_nextkey; -DBM*(*p_dbm_open)(const char*,int,mode_t) = dbm_open; -int(*p_dbm_store)(DBM*,datum,datum,int) = dbm_store; +{int(*p)(DBM*) = dbm_clearerr;} +{void(*p)(DBM*) = dbm_close;} +{int(*p)(DBM*,datum) = dbm_delete;} +{int(*p)(DBM*) = dbm_error;} +{datum(*p)(DBM*,datum) = dbm_fetch;} +{datum(*p)(DBM*) = dbm_firstkey;} +{datum(*p)(DBM*) = dbm_nextkey;} +DBM*(*p)(const char*,int,mode_t) = dbm_open; +{int(*p)(DBM*,datum,datum,int) = dbm_store;} } diff --git a/src/api/net_if.c b/src/api/net_if.c index 6886caa..9ce11e8 100644 --- a/src/api/net_if.c +++ b/src/api/net_if.c @@ -9,8 +9,8 @@ F(unsigned, if_index) F(char*, if_name) } C(IF_NAMESIZE) -void(*p_if_freenameindex)(struct if_nameindex*) = if_freenameindex; -char*(*p_if_indextoname)(unsigned,char*) = if_indextoname; -struct if_nameindex*(*p_if_nameindex)(void) = if_nameindex; -unsigned(*p_if_nametoindex)(const char*) = if_nametoindex; +{void(*p)(struct if_nameindex*) = if_freenameindex;} +{char*(*p)(unsigned,char*) = if_indextoname;} +{struct if_nameindex*(*p)(void) = if_nameindex;} +{unsigned(*p)(const char*) = if_nametoindex;} } diff --git a/src/api/netdb.c b/src/api/netdb.c index 40675af..6476a8d 100644 --- a/src/api/netdb.c +++ b/src/api/netdb.c @@ -69,30 +69,30 @@ C(EAI_SERVICE) C(EAI_SOCKTYPE) C(EAI_SYSTEM) C(EAI_OVERFLOW) -void(*p_endhostent)(void) = endhostent; -void(*p_endnetent)(void) = endnetent; -void(*p_endprotoent)(void) = endprotoent; -void(*p_endservent)(void) = endservent; -const char*(*p_gai_strerror)(int) = gai_strerror; -struct hostent*(*p_gethostent)(void) = gethostent; -struct netent*(*p_getnetbyaddr)(uint32_t,int) = getnetbyaddr; -struct netent*(*p_getnetbyname)(const char*) = getnetbyname; -struct netent*(*p_getnetent)(void) = getnetent; -struct protoent*(*p_getprotobyname)(const char*) = getprotobyname; -struct protoent*(*p_getprotobynumber)(int) = getprotobynumber; -struct protoent*(*p_getprotoent)(void) = getprotoent; -struct servent*(*p_getservbyname)(const char*,const char*) = getservbyname; -struct servent*(*p_getservbyport)(int,const char*) = getservbyport; -struct servent*(*p_getservent)(void) = getservent; -void(*p_sethostent)(int) = sethostent; -void(*p_setnetent)(int) = setnetent; -void(*p_setprotoent)(int) = setprotoent; -void(*p_setservent)(int) = setservent; +{void(*p)(void) = endhostent;} +{void(*p)(void) = endnetent;} +{void(*p)(void) = endprotoent;} +{void(*p)(void) = endservent;} +{const char*(*p)(int) = gai_strerror;} +{struct hostent*(*p)(void) = gethostent;} +{struct netent*(*p)(uint32_t,int) = getnetbyaddr;} +{struct netent*(*p)(const char*) = getnetbyname;} +{struct netent*(*p)(void) = getnetent;} +{struct protoent*(*p)(const char*) = getprotobyname;} +{struct protoent*(*p)(int) = getprotobynumber;} +{struct protoent*(*p)(void) = getprotoent;} +{struct servent*(*p)(const char*,const char*) = getservbyname;} +{struct servent*(*p)(int,const char*) = getservbyport;} +{struct servent*(*p)(void) = getservent;} +{void(*p)(int) = sethostent;} +{void(*p)(int) = setnetent;} +{void(*p)(int) = setprotoent;} +{void(*p)(int) = setservent;} } #include static void g() { -void(*p_freeaddrinfo)(struct addrinfo*) = freeaddrinfo; -int(*p_getaddrinfo)(const char*restrict,const char*restrict,const struct addrinfo*restrict,struct addrinfo**restrict) = getaddrinfo; -int(*p_getnameinfo)(const struct sockaddr*restrict,socklen_t,char*restrict,socklen_t,char*restrict,socklen_t,int) = getnameinfo; +{void(*p)(struct addrinfo*) = freeaddrinfo;} +{int(*p)(const char*restrict,const char*restrict,const struct addrinfo*restrict,struct addrinfo**restrict) = getaddrinfo;} +{int(*p)(const struct sockaddr*restrict,socklen_t,char*restrict,socklen_t,char*restrict,socklen_t,int) = getnameinfo;} } diff --git a/src/api/nl_types.c b/src/api/nl_types.c index 922cb2b..079ee50 100644 --- a/src/api/nl_types.c +++ b/src/api/nl_types.c @@ -7,7 +7,7 @@ T(nl_catd) T(nl_item) C(NL_SETD) C(NL_CAT_LOCALE) -int(*p_catclose)(nl_catd) = catclose; -char*(*p_catgets)(nl_catd,int,int,const char*) = catgets; -nl_catd(*p_catopen)(const char*,int) = catopen; +{int(*p)(nl_catd) = catclose;} +{char*(*p)(nl_catd,int,int,const char*) = catgets;} +{nl_catd(*p)(const char*,int) = catopen;} } diff --git a/src/api/poll.c b/src/api/poll.c index 4ed145f..64cec4e 100644 --- a/src/api/poll.c +++ b/src/api/poll.c @@ -21,5 +21,5 @@ C(POLLWRBAND) C(POLLERR) C(POLLHUP) C(POLLNVAL) -int(*p_poll)(struct pollfd[],nfds_t,int) = poll; +{int(*p)(struct pollfd[],nfds_t,int) = poll;} } diff --git a/src/api/pthread.c b/src/api/pthread.c index f28d19c..45210d4 100644 --- a/src/api/pthread.c +++ b/src/api/pthread.c @@ -43,106 +43,106 @@ C(PTHREAD_SCOPE_SYSTEM) {pthread_cond_t x = PTHREAD_COND_INITIALIZER;} {pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER;} {pthread_rwlock_t x = PTHREAD_RWLOCK_INITIALIZER;} -int(*p_pthread_atfork)(void(*)(void),void(*)(void),void(*)(void)) = pthread_atfork; -int(*p_pthread_attr_destroy)(pthread_attr_t*) = pthread_attr_destroy; -int(*p_pthread_attr_getdetachstate)(const pthread_attr_t*,int*) = pthread_attr_getdetachstate; -int(*p_pthread_attr_getguardsize)(const pthread_attr_t*restrict,size_t*restrict) = pthread_attr_getguardsize; -int(*p_pthread_attr_getinheritsched)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getinheritsched; -int(*p_pthread_attr_getschedparam)(const pthread_attr_t*restrict,struct sched_param*restrict) = pthread_attr_getschedparam; -int(*p_pthread_attr_getschedpolicy)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getschedpolicy; -int(*p_pthread_attr_getscope)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getscope; -int(*p_pthread_attr_getstack)(const pthread_attr_t*restrict,void**restrict,size_t*restrict) = pthread_attr_getstack; -int(*p_pthread_attr_getstacksize)(const pthread_attr_t*restrict,size_t*restrict) = pthread_attr_getstacksize; -int(*p_pthread_attr_init)(pthread_attr_t*) = pthread_attr_init; -int(*p_pthread_attr_setdetachstate)(pthread_attr_t*,int) = pthread_attr_setdetachstate; -int(*p_pthread_attr_setguardsize)(pthread_attr_t*,size_t) = pthread_attr_setguardsize; -int(*p_pthread_attr_setinheritsched)(pthread_attr_t*,int) = pthread_attr_setinheritsched; -int(*p_pthread_attr_setschedparam)(pthread_attr_t*restrict,const struct sched_param*restrict) = pthread_attr_setschedparam; -int(*p_pthread_attr_setschedpolicy)(pthread_attr_t*,int) = pthread_attr_setschedpolicy; -int(*p_pthread_attr_setscope)(pthread_attr_t*,int) = pthread_attr_setscope; -int(*p_pthread_attr_setstack)(pthread_attr_t*,void*,size_t) = pthread_attr_setstack; -int(*p_pthread_attr_setstacksize)(pthread_attr_t*,size_t) = pthread_attr_setstacksize; -int(*p_pthread_barrier_destroy)(pthread_barrier_t*) = pthread_barrier_destroy; -int(*p_pthread_barrier_init)(pthread_barrier_t*restrict,const pthread_barrierattr_t*restrict,unsigned) = pthread_barrier_init; -int(*p_pthread_barrier_wait)(pthread_barrier_t*) = pthread_barrier_wait; -int(*p_pthread_barrierattr_destroy)(pthread_barrierattr_t*) = pthread_barrierattr_destroy; -int(*p_pthread_barrierattr_getpshared)(const pthread_barrierattr_t*restrict,int*restrict) = pthread_barrierattr_getpshared; -int(*p_pthread_barrierattr_init)(pthread_barrierattr_t*) = pthread_barrierattr_init; -int(*p_pthread_barrierattr_setpshared)(pthread_barrierattr_t*,int) = pthread_barrierattr_setpshared; -int(*p_pthread_cancel)(pthread_t) = pthread_cancel; -void(*p_pthread_cleanup_pop)(int) = pthread_cleanup_pop; -void(*p_pthread_cleanup_push)(void(*)(void*),void*) = pthread_cleanup_push; -int(*p_pthread_cond_broadcast)(pthread_cond_t*) = pthread_cond_broadcast; -int(*p_pthread_cond_destroy)(pthread_cond_t*) = pthread_cond_destroy; -int(*p_pthread_cond_init)(pthread_cond_t*restrict,const pthread_condattr_t*restrict) = pthread_cond_init; -int(*p_pthread_cond_signal)(pthread_cond_t*) = pthread_cond_signal; -int(*p_pthread_cond_timedwait)(pthread_cond_t*restrict,pthread_mutex_t*restrict,const struct timespec*restrict) = pthread_cond_timedwait; -int(*p_pthread_cond_wait)(pthread_cond_t*restrict,pthread_mutex_t*restrict) = pthread_cond_wait; -int(*p_pthread_condattr_destroy)(pthread_condattr_t*) = pthread_condattr_destroy; -int(*p_pthread_condattr_getclock)(const pthread_condattr_t*restrict,clockid_t*restrict) = pthread_condattr_getclock; -int(*p_pthread_condattr_getpshared)(const pthread_condattr_t*restrict,int*restrict) = pthread_condattr_getpshared; -int(*p_pthread_condattr_init)(pthread_condattr_t*) = pthread_condattr_init; -int(*p_pthread_condattr_setclock)(pthread_condattr_t*,clockid_t) = pthread_condattr_setclock; -int(*p_pthread_condattr_setpshared)(pthread_condattr_t*,int) = pthread_condattr_setpshared; -int(*p_pthread_create)(pthread_t*restrict,const pthread_attr_t*restrict,void*(*)(void*),void*restrict) = pthread_create; -int(*p_pthread_detach)(pthread_t) = pthread_detach; -int(*p_pthread_equal)(pthread_t,pthread_t) = pthread_equal; -void(*p_pthread_exit)(void*) = pthread_exit; -int(*p_pthread_getschedparam)(pthread_t,int*restrict,struct sched_param*restrict) = pthread_getschedparam; -void*(*p_pthread_getspecific)(pthread_key_t) = pthread_getspecific; -int(*p_pthread_join)(pthread_t,void**) = pthread_join; -int(*p_pthread_key_create)(pthread_key_t*,void(*)(void*)) = pthread_key_create; -int(*p_pthread_key_delete)(pthread_key_t) = pthread_key_delete; -int(*p_pthread_mutex_consistent)(pthread_mutex_t*) = pthread_mutex_consistent; -int(*p_pthread_mutex_destroy)(pthread_mutex_t*) = pthread_mutex_destroy; -int(*p_pthread_mutex_getprioceiling)(const pthread_mutex_t*restrict,int*restrict) = pthread_mutex_getprioceiling; -int(*p_pthread_mutex_init)(pthread_mutex_t*restrict,const pthread_mutexattr_t*restrict) = pthread_mutex_init; -int(*p_pthread_mutex_lock)(pthread_mutex_t*) = pthread_mutex_lock; -int(*p_pthread_mutex_setprioceiling)(pthread_mutex_t*restrict,int,int*restrict) = pthread_mutex_setprioceiling; -int(*p_pthread_mutex_trylock)(pthread_mutex_t*) = pthread_mutex_trylock; -int(*p_pthread_mutex_unlock)(pthread_mutex_t*) = pthread_mutex_unlock; -int(*p_pthread_mutexattr_destroy)(pthread_mutexattr_t*) = pthread_mutexattr_destroy; -int(*p_pthread_mutexattr_getprioceiling)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getprioceiling; -int(*p_pthread_mutexattr_getprotocol)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getprotocol; -int(*p_pthread_mutexattr_getpshared)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getpshared; -int(*p_pthread_mutexattr_getrobust)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getrobust; -int(*p_pthread_mutexattr_gettype)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_gettype; -int(*p_pthread_mutexattr_init)(pthread_mutexattr_t*) = pthread_mutexattr_init; -int(*p_pthread_mutexattr_setprioceiling)(pthread_mutexattr_t*,int) = pthread_mutexattr_setprioceiling; -int(*p_pthread_mutexattr_setprotocol)(pthread_mutexattr_t*,int) = pthread_mutexattr_setprotocol; -int(*p_pthread_mutexattr_setpshared)(pthread_mutexattr_t*,int) = pthread_mutexattr_setpshared; -int(*p_pthread_mutexattr_setrobust)(pthread_mutexattr_t*,int) = pthread_mutexattr_setrobust; -int(*p_pthread_mutexattr_settype)(pthread_mutexattr_t*,int) = pthread_mutexattr_settype; -int(*p_pthread_once)(pthread_once_t*,void(*)(void)) = pthread_once; -int(*p_pthread_rwlock_destroy)(pthread_rwlock_t*) = pthread_rwlock_destroy; -int(*p_pthread_rwlock_init)(pthread_rwlock_t*restrict,const pthread_rwlockattr_t*restrict) = pthread_rwlock_init; -int(*p_pthread_rwlock_rdlock)(pthread_rwlock_t*) = pthread_rwlock_rdlock; -int(*p_pthread_rwlock_tryrdlock)(pthread_rwlock_t*) = pthread_rwlock_tryrdlock; -int(*p_pthread_rwlock_trywrlock)(pthread_rwlock_t*) = pthread_rwlock_trywrlock; -int(*p_pthread_rwlock_unlock)(pthread_rwlock_t*) = pthread_rwlock_unlock; -int(*p_pthread_rwlock_wrlock)(pthread_rwlock_t*) = pthread_rwlock_wrlock; -int(*p_pthread_rwlockattr_destroy)(pthread_rwlockattr_t*) = pthread_rwlockattr_destroy; -int(*p_pthread_rwlockattr_getpshared)(const pthread_rwlockattr_t*restrict,int*restrict) = pthread_rwlockattr_getpshared; -int(*p_pthread_rwlockattr_init)(pthread_rwlockattr_t*) = pthread_rwlockattr_init; -int(*p_pthread_rwlockattr_setpshared)(pthread_rwlockattr_t*,int) = pthread_rwlockattr_setpshared; -pthread_t(*p_pthread_self)(void) = pthread_self; -int(*p_pthread_setcancelstate)(int,int*) = pthread_setcancelstate; -int(*p_pthread_setcanceltype)(int,int*) = pthread_setcanceltype; -int(*p_pthread_setschedparam)(pthread_t,int,const struct sched_param*) = pthread_setschedparam; -int(*p_pthread_setschedprio)(pthread_t,int) = pthread_setschedprio; -int(*p_pthread_setspecific)(pthread_key_t,const void*) = pthread_setspecific; -int(*p_pthread_spin_destroy)(pthread_spinlock_t*) = pthread_spin_destroy; -int(*p_pthread_spin_init)(pthread_spinlock_t*,int) = pthread_spin_init; -int(*p_pthread_spin_lock)(pthread_spinlock_t*) = pthread_spin_lock; -int(*p_pthread_spin_trylock)(pthread_spinlock_t*) = pthread_spin_trylock; -int(*p_pthread_spin_unlock)(pthread_spinlock_t*) = pthread_spin_unlock; -void(*p_pthread_testcancel)(void) = pthread_testcancel; +{int(*p)(void(*)(void),void(*)(void),void(*)(void)) = pthread_atfork;} +{int(*p)(pthread_attr_t*) = pthread_attr_destroy;} +{int(*p)(const pthread_attr_t*,int*) = pthread_attr_getdetachstate;} +{int(*p)(const pthread_attr_t*restrict,size_t*restrict) = pthread_attr_getguardsize;} +{int(*p)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getinheritsched;} +{int(*p)(const pthread_attr_t*restrict,struct sched_param*restrict) = pthread_attr_getschedparam;} +{int(*p)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getschedpolicy;} +{int(*p)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getscope;} +{int(*p)(const pthread_attr_t*restrict,void**restrict,size_t*restrict) = pthread_attr_getstack;} +{int(*p)(const pthread_attr_t*restrict,size_t*restrict) = pthread_attr_getstacksize;} +{int(*p)(pthread_attr_t*) = pthread_attr_init;} +{int(*p)(pthread_attr_t*,int) = pthread_attr_setdetachstate;} +{int(*p)(pthread_attr_t*,size_t) = pthread_attr_setguardsize;} +{int(*p)(pthread_attr_t*,int) = pthread_attr_setinheritsched;} +{int(*p)(pthread_attr_t*restrict,const struct sched_param*restrict) = pthread_attr_setschedparam;} +{int(*p)(pthread_attr_t*,int) = pthread_attr_setschedpolicy;} +{int(*p)(pthread_attr_t*,int) = pthread_attr_setscope;} +{int(*p)(pthread_attr_t*,void*,size_t) = pthread_attr_setstack;} +{int(*p)(pthread_attr_t*,size_t) = pthread_attr_setstacksize;} +{int(*p)(pthread_barrier_t*) = pthread_barrier_destroy;} +{int(*p)(pthread_barrier_t*restrict,const pthread_barrierattr_t*restrict,unsigned) = pthread_barrier_init;} +{int(*p)(pthread_barrier_t*) = pthread_barrier_wait;} +{int(*p)(pthread_barrierattr_t*) = pthread_barrierattr_destroy;} +{int(*p)(const pthread_barrierattr_t*restrict,int*restrict) = pthread_barrierattr_getpshared;} +{int(*p)(pthread_barrierattr_t*) = pthread_barrierattr_init;} +{int(*p)(pthread_barrierattr_t*,int) = pthread_barrierattr_setpshared;} +{int(*p)(pthread_t) = pthread_cancel;} +{void(*p)(int) = pthread_cleanup_pop;} +{void(*p)(void(*)(void*),void*) = pthread_cleanup_push;} +{int(*p)(pthread_cond_t*) = pthread_cond_broadcast;} +{int(*p)(pthread_cond_t*) = pthread_cond_destroy;} +{int(*p)(pthread_cond_t*restrict,const pthread_condattr_t*restrict) = pthread_cond_init;} +{int(*p)(pthread_cond_t*) = pthread_cond_signal;} +{int(*p)(pthread_cond_t*restrict,pthread_mutex_t*restrict,const struct timespec*restrict) = pthread_cond_timedwait;} +{int(*p)(pthread_cond_t*restrict,pthread_mutex_t*restrict) = pthread_cond_wait;} +{int(*p)(pthread_condattr_t*) = pthread_condattr_destroy;} +{int(*p)(const pthread_condattr_t*restrict,clockid_t*restrict) = pthread_condattr_getclock;} +{int(*p)(const pthread_condattr_t*restrict,int*restrict) = pthread_condattr_getpshared;} +{int(*p)(pthread_condattr_t*) = pthread_condattr_init;} +{int(*p)(pthread_condattr_t*,clockid_t) = pthread_condattr_setclock;} +{int(*p)(pthread_condattr_t*,int) = pthread_condattr_setpshared;} +{int(*p)(pthread_t*restrict,const pthread_attr_t*restrict,void*(*)(void*),void*restrict) = pthread_create;} +{int(*p)(pthread_t) = pthread_detach;} +{int(*p)(pthread_t,pthread_t) = pthread_equal;} +{void(*p)(void*) = pthread_exit;} +{int(*p)(pthread_t,int*restrict,struct sched_param*restrict) = pthread_getschedparam;} +{void*(*p)(pthread_key_t) = pthread_getspecific;} +{int(*p)(pthread_t,void**) = pthread_join;} +{int(*p)(pthread_key_t*,void(*)(void*)) = pthread_key_create;} +{int(*p)(pthread_key_t) = pthread_key_delete;} +{int(*p)(pthread_mutex_t*) = pthread_mutex_consistent;} +{int(*p)(pthread_mutex_t*) = pthread_mutex_destroy;} +{int(*p)(const pthread_mutex_t*restrict,int*restrict) = pthread_mutex_getprioceiling;} +{int(*p)(pthread_mutex_t*restrict,const pthread_mutexattr_t*restrict) = pthread_mutex_init;} +{int(*p)(pthread_mutex_t*) = pthread_mutex_lock;} +{int(*p)(pthread_mutex_t*restrict,int,int*restrict) = pthread_mutex_setprioceiling;} +{int(*p)(pthread_mutex_t*) = pthread_mutex_trylock;} +{int(*p)(pthread_mutex_t*) = pthread_mutex_unlock;} +{int(*p)(pthread_mutexattr_t*) = pthread_mutexattr_destroy;} +{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getprioceiling;} +{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getprotocol;} +{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getpshared;} +{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getrobust;} +{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_gettype;} +{int(*p)(pthread_mutexattr_t*) = pthread_mutexattr_init;} +{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setprioceiling;} +{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setprotocol;} +{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setpshared;} +{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setrobust;} +{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_settype;} +{int(*p)(pthread_once_t*,void(*)(void)) = pthread_once;} +{int(*p)(pthread_rwlock_t*) = pthread_rwlock_destroy;} +{int(*p)(pthread_rwlock_t*restrict,const pthread_rwlockattr_t*restrict) = pthread_rwlock_init;} +{int(*p)(pthread_rwlock_t*) = pthread_rwlock_rdlock;} +{int(*p)(pthread_rwlock_t*) = pthread_rwlock_tryrdlock;} +{int(*p)(pthread_rwlock_t*) = pthread_rwlock_trywrlock;} +{int(*p)(pthread_rwlock_t*) = pthread_rwlock_unlock;} +{int(*p)(pthread_rwlock_t*) = pthread_rwlock_wrlock;} +{int(*p)(pthread_rwlockattr_t*) = pthread_rwlockattr_destroy;} +{int(*p)(const pthread_rwlockattr_t*restrict,int*restrict) = pthread_rwlockattr_getpshared;} +{int(*p)(pthread_rwlockattr_t*) = pthread_rwlockattr_init;} +{int(*p)(pthread_rwlockattr_t*,int) = pthread_rwlockattr_setpshared;} +{pthread_t(*p)(void) = pthread_self;} +{int(*p)(int,int*) = pthread_setcancelstate;} +{int(*p)(int,int*) = pthread_setcanceltype;} +{int(*p)(pthread_t,int,const struct sched_param*) = pthread_setschedparam;} +{int(*p)(pthread_t,int) = pthread_setschedprio;} +{int(*p)(pthread_key_t,const void*) = pthread_setspecific;} +{int(*p)(pthread_spinlock_t*) = pthread_spin_destroy;} +{int(*p)(pthread_spinlock_t*,int) = pthread_spin_init;} +{int(*p)(pthread_spinlock_t*) = pthread_spin_lock;} +{int(*p)(pthread_spinlock_t*) = pthread_spin_trylock;} +{int(*p)(pthread_spinlock_t*) = pthread_spin_unlock;} +{void(*p)(void) = pthread_testcancel;} } #include static void g() { -int(*p_pthread_getcpuclockid)(pthread_t,clockid_t*) = pthread_getcpuclockid; -int(*p_pthread_mutex_timedlock)(pthread_mutex_t*restrict,const struct timespec*restrict) = pthread_mutex_timedlock; -int(*p_pthread_rwlock_timedrdlock)(pthread_rwlock_t*restrict,const struct timespec*restrict) = pthread_rwlock_timedrdlock; -int(*p_pthread_rwlock_timedwrlock)(pthread_rwlock_t*restrict,const struct timespec*restrict) = pthread_rwlock_timedwrlock; +{int(*p)(pthread_t,clockid_t*) = pthread_getcpuclockid;} +{int(*p)(pthread_mutex_t*restrict,const struct timespec*restrict) = pthread_mutex_timedlock;} +{int(*p)(pthread_rwlock_t*restrict,const struct timespec*restrict) = pthread_rwlock_timedrdlock;} +{int(*p)(pthread_rwlock_t*restrict,const struct timespec*restrict) = pthread_rwlock_timedwrlock;} } diff --git a/src/api/pwd.c b/src/api/pwd.c index f6b6dc9..071623a 100644 --- a/src/api/pwd.c +++ b/src/api/pwd.c @@ -14,13 +14,13 @@ F(gid_t,pw_gid) F(char*,pw_dir) F(char*,pw_shell) } -struct passwd*(*p_getpwnam)(const char*) = getpwnam; -int(*p_getpwnam_r)(const char*,struct passwd*,char*,size_t,struct passwd**) = getpwnam_r; -struct passwd*(*p_getpwuid)(uid_t) = getpwuid; -int(*p_getpwuid_r)(uid_t,struct passwd*,char*,size_t,struct passwd**) = getpwuid_r; +{struct passwd*(*p)(const char*) = getpwnam;} +{int(*p)(const char*,struct passwd*,char*,size_t,struct passwd**) = getpwnam_r;} +{struct passwd*(*p)(uid_t) = getpwuid;} +{int(*p)(uid_t,struct passwd*,char*,size_t,struct passwd**) = getpwuid_r;} #ifdef _XOPEN_SOURCE -void(*p_endpwent)(void) = endpwent; -struct passwd*(*p_getpwent)(void) = getpwent; -void(*p_setpwent)(void) = setpwent; +{void(*p)(void) = endpwent;} +{struct passwd*(*p)(void) = getpwent;} +{void(*p)(void) = setpwent;} #endif } diff --git a/src/api/regex.c b/src/api/regex.c index ae54928..8d867ce 100644 --- a/src/api/regex.c +++ b/src/api/regex.c @@ -34,8 +34,8 @@ C(REG_BADBR) C(REG_ERANGE) C(REG_ESPACE) C(REG_BADRPT) -int(*p_regcomp)(regex_t*restrict,const char*restrict,int) = regcomp; -size_t(*p_regerror)(int,const regex_t*restrict,char*restrict,size_t) = regerror; -int(*p_regexec)(const regex_t*restrict,const char*restrict,size_t,regmatch_t[restrict],int) = regexec; -void(*p_regfree)(regex_t*) = regfree; +{int(*p)(regex_t*restrict,const char*restrict,int) = regcomp;} +{size_t(*p)(int,const regex_t*restrict,char*restrict,size_t) = regerror;} +{int(*p)(const regex_t*restrict,const char*restrict,size_t,regmatch_t[restrict],int) = regexec;} +{void(*p)(regex_t*) = regfree;} } diff --git a/src/api/sched.c b/src/api/sched.c index 0a130ae..ef5fb14 100644 --- a/src/api/sched.c +++ b/src/api/sched.c @@ -19,12 +19,12 @@ C(SCHED_FIFO) C(SCHED_RR) C(SCHED_SPORADIC) C(SCHED_OTHER) -int(*p_sched_get_priority_max)(int) = sched_get_priority_max; -int(*p_sched_get_priority_min)(int) = sched_get_priority_min; -int(*p_sched_getparam)(pid_t,struct sched_param*) = sched_getparam; -int(*p_sched_getscheduler)(pid_t) = sched_getscheduler; -int(*p_sched_rr_get_interval)(pid_t,struct timespec*) = sched_rr_get_interval; -int(*p_sched_setparam)(pid_t,const struct sched_param*) = sched_setparam; -int(*p_sched_setscheduler)(pid_t,int,const struct sched_param*) = sched_setscheduler; -int(*p_sched_yield)(void) = sched_yield; +{int(*p)(int) = sched_get_priority_max;} +{int(*p)(int) = sched_get_priority_min;} +{int(*p)(pid_t,struct sched_param*) = sched_getparam;} +{int(*p)(pid_t) = sched_getscheduler;} +{int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;} +{int(*p)(pid_t,const struct sched_param*) = sched_setparam;} +{int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;} +{int(*p)(void) = sched_yield;} } diff --git a/src/api/search.c b/src/api/search.c index a92a259..014b96f 100644 --- a/src/api/search.c +++ b/src/api/search.c @@ -22,15 +22,15 @@ case postorder: case endorder: case leaf:; } -int(*p_hcreate)(size_t) = hcreate; -void(*p_hdestroy)(void) = hdestroy; -ENTRY*(*p_hsearch)(ENTRY,ACTION) = hsearch; -void(*p_insque)(void*,void*) = insque; -void*(*p_lfind)(const void*,const void*,size_t*,size_t,int(*)(const void*,const void*)) = lfind; -void*(*p_lsearch)(const void*,void*,size_t*,size_t,int(*)(const void*,const void*)) = lsearch; -void(*p_remque)(void*) = remque; -void*(*p_tdelete)(const void*restrict,void**restrict,int(*)(const void*,const void*)) = tdelete; -void*(*p_tfind)(const void*,void*const*,int(*)(const void*,const void*)) = tfind; -void*(*p_tsearch)(const void*,void**,int(*)(const void*,const void*)) = tsearch; -void(*p_twalk)(const void*,void(*)(const void*,VISIT,int)) = twalk; +{int(*p)(size_t) = hcreate;} +{void(*p)(void) = hdestroy;} +ENTRY*(*p)(ENTRY,ACTION) = hsearch; +{void(*p)(void*,void*) = insque;} +{void*(*p)(const void*,const void*,size_t*,size_t,int(*)(const void*,const void*)) = lfind;} +{void*(*p)(const void*,void*,size_t*,size_t,int(*)(const void*,const void*)) = lsearch;} +{void(*p)(void*) = remque;} +{void*(*p)(const void*restrict,void**restrict,int(*)(const void*,const void*)) = tdelete;} +{void*(*p)(const void*,void*const*,int(*)(const void*,const void*)) = tfind;} +{void*(*p)(const void*,void**,int(*)(const void*,const void*)) = tsearch;} +{void(*p)(const void*,void(*)(const void*,VISIT,int)) = twalk;} } diff --git a/src/api/semaphore.c b/src/api/semaphore.c index e37235d..292465a 100644 --- a/src/api/semaphore.c +++ b/src/api/semaphore.c @@ -2,18 +2,18 @@ static void f() { {sem_t *x = SEM_FAILED;} -int(*p_sem_close)(sem_t*) = sem_close; -int(*p_sem_destroy)(sem_t*) = sem_destroy; -int(*p_sem_getvalue)(sem_t*restrict,int*restrict) = sem_getvalue; -int(*p_sem_init)(sem_t*,int,unsigned) = sem_init; -sem_t*(*p_sem_open)(const char*,int,...) = sem_open; -int(*p_sem_post)(sem_t*) = sem_post; -int(*p_sem_trywait)(sem_t*) = sem_trywait; -int(*p_sem_unlink)(const char*) = sem_unlink; -int(*p_sem_wait)(sem_t*) = sem_wait; +{int(*p)(sem_t*) = sem_close;} +{int(*p)(sem_t*) = sem_destroy;} +{int(*p)(sem_t*restrict,int*restrict) = sem_getvalue;} +{int(*p)(sem_t*,int,unsigned) = sem_init;} +{sem_t*(*p)(const char*,int,...) = sem_open;} +{int(*p)(sem_t*) = sem_post;} +{int(*p)(sem_t*) = sem_trywait;} +{int(*p)(const char*) = sem_unlink;} +{int(*p)(sem_t*) = sem_wait;} } #include static void g() { -int(*p_sem_timedwait)(sem_t*restrict,const struct timespec*restrict) = sem_timedwait; +{int(*p)(sem_t*restrict,const struct timespec*restrict) = sem_timedwait;} } diff --git a/src/api/setjmp.c b/src/api/setjmp.c index c4178c3..84fde10 100644 --- a/src/api/setjmp.c +++ b/src/api/setjmp.c @@ -3,11 +3,11 @@ static void f() { T(jmp_buf) -void(*p_longjmp)(jmp_buf,int) = longjmp; -int(*p_setjmp)(jmp_buf) = setjmp; +{void(*p)(jmp_buf,int) = longjmp;} +{int(*p)(jmp_buf) = setjmp;} #ifdef _POSIX_C_SOURCE T(sigjmp_buf) -void(*p_siglongjmp)(sigjmp_buf,int) = siglongjmp; -int(*p_sigsetjmp)(sigjmp_buf,int) = sigsetjmp; +{void(*p)(sigjmp_buf,int) = siglongjmp;} +{int(*p)(sigjmp_buf,int) = sigsetjmp;} #endif } diff --git a/src/api/signal.c b/src/api/signal.c index 264edf4..56f9153 100644 --- a/src/api/signal.c +++ b/src/api/signal.c @@ -151,33 +151,33 @@ C(SI_QUEUE) C(SI_TIMER) C(SI_ASYNCIO) C(SI_MESGQ) -int(*p_kill)(pid_t,int) = kill; -int(*p_killpg)(pid_t,int) = killpg; -void(*p_psiginfo)(const siginfo_t*,const char*) = psiginfo; -void(*p_psignal)(int,const char*) = psignal; -int(*p_pthread_kill)(pthread_t,int) = pthread_kill; -int(*p_pthread_sigmask)(int,const sigset_t*restrict,sigset_t*restrict) = pthread_sigmask; -int(*p_sigaction)(int,const struct sigaction*restrict,struct sigaction*restrict) = sigaction; -int(*p_sigaddset)(sigset_t*,int) = sigaddset; -int(*p_sigaltstack)(const stack_t*restrict,stack_t*restrict) = sigaltstack; -int(*p_sigdelset)(sigset_t*,int) = sigdelset; -int(*p_sigemptyset)(sigset_t*) = sigemptyset; -int(*p_sigfillset)(sigset_t*) = sigfillset; -int(*p_sighold)(int) = sighold; -int(*p_sigignore)(int) = sigignore; -int(*p_siginterrupt)(int,int) = siginterrupt; -int(*p_sigismember)(const sigset_t*,int) = sigismember; -int(*p_sigpause)(int) = sigpause; -int(*p_sigpending)(sigset_t*) = sigpending; -int(*p_sigprocmask)(int,const sigset_t*restrict,sigset_t*restrict) = sigprocmask; -int(*p_sigqueue)(pid_t,int,const union sigval) = sigqueue; -int(*p_sigrelse)(int) = sigrelse; -void(*(*p_sigset)(int,void(*)(int)))(int) = sigset; -int(*p_sigsuspend)(const sigset_t*) = sigsuspend; -int(*p_sigtimedwait)(const sigset_t*restrict,siginfo_t*restrict,const struct timespec*restrict) = sigtimedwait; -int(*p_sigwait)(const sigset_t*restrict,int*restrict) = sigwait; -int(*p_sigwaitinfo)(const sigset_t*restrict,siginfo_t*restrict) = sigwaitinfo; +{int(*p)(pid_t,int) = kill;} +{int(*p)(pid_t,int) = killpg;} +{void(*p)(const siginfo_t*,const char*) = psiginfo;} +{void(*p)(int,const char*) = psignal;} +{int(*p)(pthread_t,int) = pthread_kill;} +{int(*p)(int,const sigset_t*restrict,sigset_t*restrict) = pthread_sigmask;} +{int(*p)(int,const struct sigaction*restrict,struct sigaction*restrict) = sigaction;} +{int(*p)(sigset_t*,int) = sigaddset;} +{int(*p)(const stack_t*restrict,stack_t*restrict) = sigaltstack;} +{int(*p)(sigset_t*,int) = sigdelset;} +{int(*p)(sigset_t*) = sigemptyset;} +{int(*p)(sigset_t*) = sigfillset;} +{int(*p)(int) = sighold;} +{int(*p)(int) = sigignore;} +{int(*p)(int,int) = siginterrupt;} +{int(*p)(const sigset_t*,int) = sigismember;} +{int(*p)(int) = sigpause;} +{int(*p)(sigset_t*) = sigpending;} +{int(*p)(int,const sigset_t*restrict,sigset_t*restrict) = sigprocmask;} +{int(*p)(pid_t,int,const union sigval) = sigqueue;} +{int(*p)(int) = sigrelse;} +{void(*(*p)(int,void(*)(int)))(int) = sigset;} +{int(*p)(const sigset_t*) = sigsuspend;} +{int(*p)(const sigset_t*restrict,siginfo_t*restrict,const struct timespec*restrict) = sigtimedwait;} +{int(*p)(const sigset_t*restrict,int*restrict) = sigwait;} +{int(*p)(const sigset_t*restrict,siginfo_t*restrict) = sigwaitinfo;} #endif -int(*p_raise)(int) = raise; -void(*(*p_signal)(int,void(*)(int)))(int) = signal; +{int(*p)(int) = raise;} +{void(*(*p)(int,void(*)(int)))(int) = signal;} } diff --git a/src/api/spawn.c b/src/api/spawn.c index 1f90e74..3fa21a6 100644 --- a/src/api/spawn.c +++ b/src/api/spawn.c @@ -15,33 +15,33 @@ C(POSIX_SPAWN_SETSCHEDPARAM) C(POSIX_SPAWN_SETSCHEDULER) C(POSIX_SPAWN_SETSIGDEF) C(POSIX_SPAWN_SETSIGMASK) -int(*p_posix_spawn)(pid_t*restrict,const char*restrict,const posix_spawn_file_actions_t*,const posix_spawnattr_t*restrict,char*const[restrict],char*const[restrict]) = posix_spawn; -int(*p_posix_spawn_file_actions_addclose)(posix_spawn_file_actions_t*,int) = posix_spawn_file_actions_addclose; -int(*p_posix_spawn_file_actions_adddup2)(posix_spawn_file_actions_t*,int,int) = posix_spawn_file_actions_adddup2; -int(*p_posix_spawn_file_actions_addopen)(posix_spawn_file_actions_t*restrict,int,const char*restrict,int,mode_t) = posix_spawn_file_actions_addopen; -int(*p_posix_spawn_file_actions_destroy)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_destroy; -int(*p_posix_spawn_file_actions_init)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_init; -int(*p_posix_spawnattr_destroy)(posix_spawnattr_t*) = posix_spawnattr_destroy; -int(*p_posix_spawnattr_getflags)(const posix_spawnattr_t*restrict,short*restrict) = posix_spawnattr_getflags; -int(*p_posix_spawnattr_getpgroup)(const posix_spawnattr_t*restrict,pid_t*restrict) = posix_spawnattr_getpgroup; -int(*p_posix_spawnattr_init)(posix_spawnattr_t*) = posix_spawnattr_init; -int(*p_posix_spawnattr_setflags)(posix_spawnattr_t*,short) = posix_spawnattr_setflags; -int(*p_posix_spawnattr_setpgroup)(posix_spawnattr_t*,pid_t) = posix_spawnattr_setpgroup; -int(*p_posix_spawnp)(pid_t*restrict,const char*restrict,const posix_spawn_file_actions_t*,const posix_spawnattr_t*restrict,char*const[restrict],char*const[restrict]) = posix_spawnp; +{int(*p)(pid_t*restrict,const char*restrict,const posix_spawn_file_actions_t*,const posix_spawnattr_t*restrict,char*const[restrict],char*const[restrict]) = posix_spawn;} +{int(*p)(posix_spawn_file_actions_t*,int) = posix_spawn_file_actions_addclose;} +{int(*p)(posix_spawn_file_actions_t*,int,int) = posix_spawn_file_actions_adddup2;} +{int(*p)(posix_spawn_file_actions_t*restrict,int,const char*restrict,int,mode_t) = posix_spawn_file_actions_addopen;} +{int(*p)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_destroy;} +{int(*p)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_init;} +{int(*p)(posix_spawnattr_t*) = posix_spawnattr_destroy;} +{int(*p)(const posix_spawnattr_t*restrict,short*restrict) = posix_spawnattr_getflags;} +{int(*p)(const posix_spawnattr_t*restrict,pid_t*restrict) = posix_spawnattr_getpgroup;} +{int(*p)(posix_spawnattr_t*) = posix_spawnattr_init;} +{int(*p)(posix_spawnattr_t*,short) = posix_spawnattr_setflags;} +{int(*p)(posix_spawnattr_t*,pid_t) = posix_spawnattr_setpgroup;} +{int(*p)(pid_t*restrict,const char*restrict,const posix_spawn_file_actions_t*,const posix_spawnattr_t*restrict,char*const[restrict],char*const[restrict]) = posix_spawnp;} } #include static void g() { -int(*p_posix_spawnattr_getsigdefault)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigdefault; -int(*p_posix_spawnattr_getsigmask)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigmask; -int(*p_posix_spawnattr_setsigdefault)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigdefault; -int(*p_posix_spawnattr_setsigmask)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigmask; +{int(*p)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigdefault;} +{int(*p)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigmask;} +{int(*p)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigdefault;} +{int(*p)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigmask;} } #include static void h() { -int(*p_posix_spawnattr_getschedparam)(const posix_spawnattr_t*restrict,struct sched_param*restrict) = posix_spawnattr_getschedparam; -int(*p_posix_spawnattr_getschedpolicy)(const posix_spawnattr_t*restrict,int*restrict) = posix_spawnattr_getschedpolicy; -int(*p_posix_spawnattr_setschedparam)(posix_spawnattr_t*restrict,const struct sched_param*restrict) = posix_spawnattr_setschedparam; -int(*p_posix_spawnattr_setschedpolicy)(posix_spawnattr_t*,int) = posix_spawnattr_setschedpolicy; +{int(*p)(const posix_spawnattr_t*restrict,struct sched_param*restrict) = posix_spawnattr_getschedparam;} +{int(*p)(const posix_spawnattr_t*restrict,int*restrict) = posix_spawnattr_getschedpolicy;} +{int(*p)(posix_spawnattr_t*restrict,const struct sched_param*restrict) = posix_spawnattr_setschedparam;} +{int(*p)(posix_spawnattr_t*,int) = posix_spawnattr_setschedpolicy;} } diff --git a/src/api/stdio.c b/src/api/stdio.c index b854540..7c2a7e1 100644 --- a/src/api/stdio.c +++ b/src/api/stdio.c @@ -27,103 +27,103 @@ C(EOF) {FILE *x=stderr;} {FILE *x=stdin;} {FILE *x=stdout;} -void(*p_clearerr)(FILE*) = clearerr; -char*(*p_ctermid)(char*) = ctermid; -int(*p_dprintf)(int,const char*restrict,...) = dprintf; -int(*p_fclose)(FILE*) = fclose; -FILE*(*p_fdopen)(int,const char*) = fdopen; -int(*p_feof)(FILE*) = feof; -int(*p_ferror)(FILE*) = ferror; -int(*p_fflush)(FILE*) = fflush; -int(*p_fgetc)(FILE*) = fgetc; -int(*p_fgetpos)(FILE*restrict,fpos_t*restrict) = fgetpos; -char*(*p_fgets)(char*restrict,int,FILE*restrict) = fgets; -int(*p_fileno)(FILE*) = fileno; -void(*p_flockfile)(FILE*) = flockfile; -FILE*(*p_fmemopen)(void*restrict,size_t,const char*restrict) = fmemopen; -FILE*(*p_fopen)(const char*restrict,const char*restrict) = fopen; -int(*p_fprintf)(FILE*restrict,const char*restrict,...) = fprintf; -int(*p_fputc)(int,FILE*) = fputc; -int(*p_fputs)(const char*restrict,FILE*restrict) = fputs; -size_t(*p_fread)(void*restrict,size_t,size_t,FILE*restrict) = fread; -FILE*(*p_freopen)(const char*restrict,const char*restrict,FILE*restrict) = freopen; -int(*p_fscanf)(FILE*restrict,const char*restrict,...) = fscanf; -int(*p_fseek)(FILE*,long,int) = fseek; -int(*p_fseeko)(FILE*,off_t,int) = fseeko; -int(*p_fsetpos)(FILE*,const fpos_t*) = fsetpos; -long(*p_ftell)(FILE*) = ftell; -off_t(*p_ftello)(FILE*) = ftello; -int(*p_ftrylockfile)(FILE*) = ftrylockfile; -void(*p_funlockfile)(FILE*) = funlockfile; -size_t(*p_fwrite)(const void*restrict,size_t,size_t,FILE*restrict) = fwrite; -int(*p_getc)(FILE*) = getc; -int(*p_getc_unlocked)(FILE*) = getc_unlocked; -int(*p_getchar)(void) = getchar; -int(*p_getchar_unlocked)(void) = getchar_unlocked; -ssize_t(*p_getdelim)(char**restrict,size_t*restrict,int,FILE*restrict) = getdelim; -ssize_t(*p_getline)(char**restrict,size_t*restrict,FILE*restrict) = getline; -char*(*p_gets)(char*) = gets; -FILE*(*p_open_memstream)(char**,size_t*) = open_memstream; -int(*p_pclose)(FILE*) = pclose; -void(*p_perror)(const char*) = perror; -FILE*(*p_popen)(const char*,const char*) = popen; -int(*p_printf)(const char*restrict,...) = printf; -int(*p_putc)(int,FILE*) = putc; -int(*p_putc_unlocked)(int,FILE*) = putc_unlocked; -int(*p_putchar)(int) = putchar; -int(*p_putchar_unlocked)(int) = putchar_unlocked; -int(*p_puts)(const char*) = puts; -int(*p_remove)(const char*) = remove; -int(*p_rename)(const char*,const char*) = rename; -int(*p_renameat)(int,const char*,int,const char*) = renameat; -void(*p_rewind)(FILE*) = rewind; -int(*p_scanf)(const char*restrict,...) = scanf; -void(*p_setbuf)(FILE*restrict,char*restrict) = setbuf; -int(*p_setvbuf)(FILE*restrict,char*restrict,int,size_t) = setvbuf; -int(*p_snprintf)(char*restrict,size_t,const char*restrict,...) = snprintf; -int(*p_sprintf)(char*restrict,const char*restrict,...) = sprintf; -int(*p_sscanf)(const char*restrict,const char*restrict,...) = sscanf; -char*(*p_tempnam)(const char*,const char*) = tempnam; -FILE*(*p_tmpfile)(void) = tmpfile; -char*(*p_tmpnam)(char*) = tmpnam; -int(*p_ungetc)(int,FILE*) = ungetc; +{void(*p)(FILE*) = clearerr;} +{char*(*p)(char*) = ctermid;} +{int(*p)(int,const char*restrict,...) = dprintf;} +{int(*p)(FILE*) = fclose;} +FILE*(*p)(int,const char*) = fdopen; +{int(*p)(FILE*) = feof;} +{int(*p)(FILE*) = ferror;} +{int(*p)(FILE*) = fflush;} +{int(*p)(FILE*) = fgetc;} +{int(*p)(FILE*restrict,fpos_t*restrict) = fgetpos;} +{char*(*p)(char*restrict,int,FILE*restrict) = fgets;} +{int(*p)(FILE*) = fileno;} +{void(*p)(FILE*) = flockfile;} +FILE*(*p)(void*restrict,size_t,const char*restrict) = fmemopen; +FILE*(*p)(const char*restrict,const char*restrict) = fopen; +{int(*p)(FILE*restrict,const char*restrict,...) = fprintf;} +{int(*p)(int,FILE*) = fputc;} +{int(*p)(const char*restrict,FILE*restrict) = fputs;} +{size_t(*p)(void*restrict,size_t,size_t,FILE*restrict) = fread;} +FILE*(*p)(const char*restrict,const char*restrict,FILE*restrict) = freopen; +{int(*p)(FILE*restrict,const char*restrict,...) = fscanf;} +{int(*p)(FILE*,long,int) = fseek;} +{int(*p)(FILE*,off_t,int) = fseeko;} +{int(*p)(FILE*,const fpos_t*) = fsetpos;} +{long(*p)(FILE*) = ftell;} +{off_t(*p)(FILE*) = ftello;} +{int(*p)(FILE*) = ftrylockfile;} +{void(*p)(FILE*) = funlockfile;} +{size_t(*p)(const void*restrict,size_t,size_t,FILE*restrict) = fwrite;} +{int(*p)(FILE*) = getc;} +{int(*p)(FILE*) = getc_unlocked;} +{int(*p)(void) = getchar;} +{int(*p)(void) = getchar_unlocked;} +{ssize_t(*p)(char**restrict,size_t*restrict,int,FILE*restrict) = getdelim;} +{ssize_t(*p)(char**restrict,size_t*restrict,FILE*restrict) = getline;} +{char*(*p)(char*) = gets;} +FILE*(*p)(char**,size_t*) = open_memstream; +{int(*p)(FILE*) = pclose;} +{void(*p)(const char*) = perror;} +FILE*(*p)(const char*,const char*) = popen; +{int(*p)(const char*restrict,...) = printf;} +{int(*p)(int,FILE*) = putc;} +{int(*p)(int,FILE*) = putc_unlocked;} +{int(*p)(int) = putchar;} +{int(*p)(int) = putchar_unlocked;} +{int(*p)(const char*) = puts;} +{int(*p)(const char*) = remove;} +{int(*p)(const char*,const char*) = rename;} +{int(*p)(int,const char*,int,const char*) = renameat;} +{void(*p)(FILE*) = rewind;} +{int(*p)(const char*restrict,...) = scanf;} +{void(*p)(FILE*restrict,char*restrict) = setbuf;} +{int(*p)(FILE*restrict,char*restrict,int,size_t) = setvbuf;} +{int(*p)(char*restrict,size_t,const char*restrict,...) = snprintf;} +{int(*p)(char*restrict,const char*restrict,...) = sprintf;} +{int(*p)(const char*restrict,const char*restrict,...) = sscanf;} +{char*(*p)(const char*,const char*) = tempnam;} +FILE*(*p)(void) = tmpfile; +{char*(*p)(char*) = tmpnam;} +{int(*p)(int,FILE*) = ungetc;} } #include static void g() { -wint_t(*p_btowc)(int) = btowc; -wint_t(*p_fgetwc)(FILE*) = fgetwc; -wchar_t*(*p_fgetws)(wchar_t*restrict,int,FILE*restrict) = fgetws; -wint_t(*p_fputwc)(wchar_t,FILE*) = fputwc; -int(*p_fputws)(const wchar_t*restrict,FILE*restrict) = fputws; -int(*p_fwide)(FILE*,int) = fwide; -int(*p_fwprintf)(FILE*restrict,const wchar_t*restrict,...) = fwprintf; -int(*p_fwscanf)(FILE*restrict,const wchar_t*restrict,...) = fwscanf; -wint_t(*p_getwc)(FILE*) = getwc; -wint_t(*p_putwc)(wchar_t,FILE*) = putwc; -int(*p_swprintf)(wchar_t*restrict,size_t,const wchar_t*restrict,...) = swprintf; -int(*p_swscanf)(const wchar_t*restrict,const wchar_t*restrict,...) = swscanf; -wint_t(*p_ungetwc)(wint_t,FILE*) = ungetwc; -int(*p_wctob)(wint_t) = wctob; -int(*p_wprintf)(const wchar_t*restrict,...) = wprintf; -int(*p_wscanf)(const wchar_t*restrict,...) = wscanf; +{wint_t(*p)(int) = btowc;} +{wint_t(*p)(FILE*) = fgetwc;} +{wchar_t*(*p)(wchar_t*restrict,int,FILE*restrict) = fgetws;} +{wint_t(*p)(wchar_t,FILE*) = fputwc;} +{int(*p)(const wchar_t*restrict,FILE*restrict) = fputws;} +{int(*p)(FILE*,int) = fwide;} +{int(*p)(FILE*restrict,const wchar_t*restrict,...) = fwprintf;} +{int(*p)(FILE*restrict,const wchar_t*restrict,...) = fwscanf;} +{wint_t(*p)(FILE*) = getwc;} +{wint_t(*p)(wchar_t,FILE*) = putwc;} +{int(*p)(wchar_t*restrict,size_t,const wchar_t*restrict,...) = swprintf;} +{int(*p)(const wchar_t*restrict,const wchar_t*restrict,...) = swscanf;} +{wint_t(*p)(wint_t,FILE*) = ungetwc;} +{int(*p)(wint_t) = wctob;} +{int(*p)(const wchar_t*restrict,...) = wprintf;} +{int(*p)(const wchar_t*restrict,...) = wscanf;} } #include static void h() { -int(*p_vdprintf)(int,const char*restrict,va_list) = vdprintf; -int(*p_vfprintf)(FILE*restrict,const char*restrict,va_list) = vfprintf; -int(*p_vfscanf)(FILE*restrict,const char*restrict,va_list) = vfscanf; -int(*p_vprintf)(const char*restrict,va_list) = vprintf; -int(*p_vscanf)(const char*restrict,va_list) = vscanf; -int(*p_vsnprintf)(char*restrict,size_t,const char*restrict,va_list) = vsnprintf; -int(*p_vsprintf)(char*restrict,const char*restrict,va_list) = vsprintf; -int(*p_vsscanf)(const char*restrict,const char*restrict,va_list) = vsscanf; +{int(*p)(int,const char*restrict,va_list) = vdprintf;} +{int(*p)(FILE*restrict,const char*restrict,va_list) = vfprintf;} +{int(*p)(FILE*restrict,const char*restrict,va_list) = vfscanf;} +{int(*p)(const char*restrict,va_list) = vprintf;} +{int(*p)(const char*restrict,va_list) = vscanf;} +{int(*p)(char*restrict,size_t,const char*restrict,va_list) = vsnprintf;} +{int(*p)(char*restrict,const char*restrict,va_list) = vsprintf;} +{int(*p)(const char*restrict,const char*restrict,va_list) = vsscanf;} -int(*p_vfwprintf)(FILE*restrict,const wchar_t*restrict,va_list) = vfwprintf; -int(*p_vfwscanf)(FILE*restrict,const wchar_t*restrict,va_list) = vfwscanf; -int(*p_vswprintf)(wchar_t*restrict,size_t,const wchar_t*restrict,va_list) = vswprintf; -int(*p_vswscanf)(const wchar_t*restrict,const wchar_t*restrict,va_list) = vswscanf; -int(*p_vwprintf)(const wchar_t*restrict,va_list) = vwprintf; -int(*p_vwscanf)(const wchar_t*restrict,va_list) = vwscanf; +{int(*p)(FILE*restrict,const wchar_t*restrict,va_list) = vfwprintf;} +{int(*p)(FILE*restrict,const wchar_t*restrict,va_list) = vfwscanf;} +{int(*p)(wchar_t*restrict,size_t,const wchar_t*restrict,va_list) = vswprintf;} +{int(*p)(const wchar_t*restrict,const wchar_t*restrict,va_list) = vswscanf;} +{int(*p)(const wchar_t*restrict,va_list) = vwprintf;} +{int(*p)(const wchar_t*restrict,va_list) = vwscanf;} } diff --git a/src/api/stdlib.c b/src/api/stdlib.c index ca5337c..7a641d1 100644 --- a/src/api/stdlib.c +++ b/src/api/stdlib.c @@ -24,72 +24,72 @@ C(WSTOPSIG(0)) C(WTERMSIG(0)) C(WUNTRACED) #endif -void(*p__Exit)(int) = _Exit; -void(*p_abort)(void) = abort; -int(*p_abs)(int) = abs; -int(*p_atexit)(void(*)(void)) = atexit; -double(*p_atof)(const char*) = atof; -int(*p_atoi)(const char*) = atoi; -long(*p_atol)(const char*) = atol; -long long(*p_atoll)(const char*) = atoll; -void*(*p_bsearch)(const void*,const void*,size_t,size_t,int(*)(const void*,const void*)) = bsearch; -void*(*p_calloc)(size_t,size_t) = calloc; -div_t(*p_div)(int,int) = div; -void(*p_exit)(int) = exit; -void(*p_free)(void*) = free; -char*(*p_getenv)(const char*) = getenv; -int(*p_getsubopt)(char**,char*const*,char**) = getsubopt; -long(*p_labs)(long) = labs; -ldiv_t(*p_ldiv)(long,long) = ldiv; -long long(*p_llabs)(long long) = llabs; -lldiv_t(*p_lldiv)(long long,long long) = lldiv; -void*(*p_malloc)(size_t) = malloc; -int(*p_mblen)(const char*,size_t) = mblen; -size_t(*p_mbstowcs)(wchar_t*restrict,const char*restrict,size_t) = mbstowcs; -int(*p_mbtowc)(wchar_t*restrict,const char*restrict,size_t) = mbtowc; -int(*p_posix_memalign)(void**,size_t,size_t) = posix_memalign; -void(*p_qsort)(void*,size_t,size_t,int(*)(const void*,const void*)) = qsort; -int(*p_rand)(void) = rand; -void*(*p_realloc)(void*,size_t) = realloc; -void(*p_srand)(unsigned) = srand; -double(*p_strtod)(const char*restrict,char**restrict) = strtod; -float(*p_strtof)(const char*restrict,char**restrict) = strtof; -long(*p_strtol)(const char*restrict,char**restrict,int) = strtol; -long double(*p_strtold)(const char*restrict,char**restrict) = strtold; -long long(*p_strtoll)(const char*restrict,char**restrict,int) = strtoll; -unsigned long(*p_strtoul)(const char*restrict,char**restrict,int) = strtoul; -unsigned long long(*p_strtoull)(const char*restrict,char**restrict,int) = strtoull; -int(*p_system)(const char*) = system; -size_t(*p_wcstombs)(char*restrict,const wchar_t*restrict,size_t) = wcstombs; -int(*p_wctomb)(char*,wchar_t) = wctomb; +{void(*p)(int) = _Exit;} +{void(*p)(void) = abort;} +{int(*p)(int) = abs;} +{int(*p)(void(*)(void)) = atexit;} +{double(*p)(const char*) = atof;} +{int(*p)(const char*) = atoi;} +{long(*p)(const char*) = atol;} +{long long(*p)(const char*) = atoll;} +{void*(*p)(const void*,const void*,size_t,size_t,int(*)(const void*,const void*)) = bsearch;} +{void*(*p)(size_t,size_t) = calloc;} +{div_t(*p)(int,int) = div;} +{void(*p)(int) = exit;} +{void(*p)(void*) = free;} +{char*(*p)(const char*) = getenv;} +{int(*p)(char**,char*const*,char**) = getsubopt;} +{long(*p)(long) = labs;} +{ldiv_t(*p)(long,long) = ldiv;} +{long long(*p)(long long) = llabs;} +{lldiv_t(*p)(long long,long long) = lldiv;} +{void*(*p)(size_t) = malloc;} +{int(*p)(const char*,size_t) = mblen;} +{size_t(*p)(wchar_t*restrict,const char*restrict,size_t) = mbstowcs;} +{int(*p)(wchar_t*restrict,const char*restrict,size_t) = mbtowc;} +{int(*p)(void**,size_t,size_t) = posix_memalign;} +{void(*p)(void*,size_t,size_t,int(*)(const void*,const void*)) = qsort;} +{int(*p)(void) = rand;} +{void*(*p)(void*,size_t) = realloc;} +{void(*p)(unsigned) = srand;} +{double(*p)(const char*restrict,char**restrict) = strtod;} +{float(*p)(const char*restrict,char**restrict) = strtof;} +{long(*p)(const char*restrict,char**restrict,int) = strtol;} +{long double(*p)(const char*restrict,char**restrict) = strtold;} +{long long(*p)(const char*restrict,char**restrict,int) = strtoll;} +{unsigned long(*p)(const char*restrict,char**restrict,int) = strtoul;} +{unsigned long long(*p)(const char*restrict,char**restrict,int) = strtoull;} +{int(*p)(const char*) = system;} +{size_t(*p)(char*restrict,const wchar_t*restrict,size_t) = wcstombs;} +{int(*p)(char*,wchar_t) = wctomb;} #ifdef _POSIX_C_SOURCE -char*(*p_mkdtemp)(char*) = mkdtemp; -int(*p_mkstemp)(char*) = mkstemp; -int(*p_setenv)(const char*,const char*,int) = setenv; -int(*p_unsetenv)(const char*) = unsetenv; +{char*(*p)(char*) = mkdtemp;} +{int(*p)(char*) = mkstemp;} +{int(*p)(const char*,const char*,int) = setenv;} +{int(*p)(const char*) = unsetenv;} #endif #ifdef _XOPEN_SOURCE -long(*p_a64l)(const char*) = a64l; -double(*p_drand48)(void) = drand48; -double(*p_erand48)(unsigned short[]) = erand48; -int(*p_grantpt)(int) = grantpt; -char*(*p_initstate)(unsigned,char*,size_t) = initstate; -long(*p_jrand48)(unsigned short[]) = jrand48; -char*(*p_l64a)(long) = l64a; -void(*p_lcong48)(unsigned short[]) = lcong48; -long(*p_lrand48)(void) = lrand48; -long(*p_mrand48)(void) = mrand48; -long(*p_nrand48)(unsigned short[]) = nrand48; -char*(*p_ptsname)(int) = ptsname; -int(*p_putenv)(char*) = putenv; -long(*p_random)(void) = random; -char*(*p_realpath)(const char*restrict,char*restrict) = realpath; -unsigned short*(*p_seed48)(unsigned short[]) = seed48; -void(*p_setkey)(const char*) = setkey; -char*(*p_setstate)(char*) = setstate; -void(*p_srand48)(long) = srand48; -void(*p_srandom)(unsigned) = srandom; -int(*p_unlockpt)(int) = unlockpt; +{long(*p)(const char*) = a64l;} +{double(*p)(void) = drand48;} +{double(*p)(unsigned short[]) = erand48;} +{int(*p)(int) = grantpt;} +{char*(*p)(unsigned,char*,size_t) = initstate;} +{long(*p)(unsigned short[]) = jrand48;} +{char*(*p)(long) = l64a;} +{void(*p)(unsigned short[]) = lcong48;} +{long(*p)(void) = lrand48;} +{long(*p)(void) = mrand48;} +{long(*p)(unsigned short[]) = nrand48;} +{char*(*p)(int) = ptsname;} +{int(*p)(char*) = putenv;} +{long(*p)(void) = random;} +{char*(*p)(const char*restrict,char*restrict) = realpath;} +{unsigned short*(*p)(unsigned short[]) = seed48;} +{void(*p)(const char*) = setkey;} +{char*(*p)(char*) = setstate;} +{void(*p)(long) = srand48;} +{void(*p)(unsigned) = srandom;} +{int(*p)(int) = unlockpt;} #endif } @@ -97,7 +97,7 @@ int(*p_unlockpt)(int) = unlockpt; #include static void g() { -int(*p_posix_openpt)(int) = posix_openpt; +{int(*p)(int) = posix_openpt;} } #endif diff --git a/src/api/string.c b/src/api/string.c index 60aa768..dba2c24 100644 --- a/src/api/string.c +++ b/src/api/string.c @@ -3,43 +3,43 @@ static void f() { T(size_t) -void*(*p_memchr)(const void*,int,size_t) = memchr; -int(*p_memcmp)(const void*,const void*,size_t) = memcmp; -void*(*p_memcpy)(void*restrict,const void*restrict,size_t) = memcpy; -void*(*p_memmove)(void*,const void*,size_t) = memmove; -void*(*p_memset)(void*,int,size_t) = memset; -char*(*p_strcat)(char*restrict,const char*restrict) = strcat; -char*(*p_strchr)(const char*,int) = strchr; -int(*p_strcmp)(const char*,const char*) = strcmp; -int(*p_strcoll)(const char*,const char*) = strcoll; -char*(*p_strcpy)(char*restrict,const char*restrict) = strcpy; -size_t(*p_strcspn)(const char*,const char*) = strcspn; -char*(*p_strerror)(int) = strerror; -size_t(*p_strlen)(const char*) = strlen; -char*(*p_strncat)(char*restrict,const char*restrict,size_t) = strncat; -int(*p_strncmp)(const char*,const char*,size_t) = strncmp; -char*(*p_strncpy)(char*restrict,const char*restrict,size_t) = strncpy; -char*(*p_strpbrk)(const char*,const char*) = strpbrk; -char*(*p_strrchr)(const char*,int) = strrchr; -char*(*p_strsignal)(int) = strsignal; -size_t(*p_strspn)(const char*,const char*) = strspn; -char*(*p_strstr)(const char*,const char*) = strstr; -char*(*p_strtok)(char*restrict,const char*restrict) = strtok; -size_t(*p_strxfrm)(char*restrict,const char*restrict,size_t) = strxfrm; +{void*(*p)(const void*,int,size_t) = memchr;} +{int(*p)(const void*,const void*,size_t) = memcmp;} +{void*(*p)(void*restrict,const void*restrict,size_t) = memcpy;} +{void*(*p)(void*,const void*,size_t) = memmove;} +{void*(*p)(void*,int,size_t) = memset;} +{char*(*p)(char*restrict,const char*restrict) = strcat;} +{char*(*p)(const char*,int) = strchr;} +{int(*p)(const char*,const char*) = strcmp;} +{int(*p)(const char*,const char*) = strcoll;} +{char*(*p)(char*restrict,const char*restrict) = strcpy;} +{size_t(*p)(const char*,const char*) = strcspn;} +{char*(*p)(int) = strerror;} +{size_t(*p)(const char*) = strlen;} +{char*(*p)(char*restrict,const char*restrict,size_t) = strncat;} +{int(*p)(const char*,const char*,size_t) = strncmp;} +{char*(*p)(char*restrict,const char*restrict,size_t) = strncpy;} +{char*(*p)(const char*,const char*) = strpbrk;} +{char*(*p)(const char*,int) = strrchr;} +{char*(*p)(int) = strsignal;} +{size_t(*p)(const char*,const char*) = strspn;} +{char*(*p)(const char*,const char*) = strstr;} +{char*(*p)(char*restrict,const char*restrict) = strtok;} +{size_t(*p)(char*restrict,const char*restrict,size_t) = strxfrm;} #ifdef _POSIX_C_SOURCE T(locale_t) -char*(*p_stpcpy)(char*restrict,const char*restrict) = stpcpy; -char*(*p_stpncpy)(char*restrict,const char*restrict,size_t) = stpncpy; -int(*p_strcoll_l)(const char*,const char*,locale_t) = strcoll_l; -char*(*p_strdup)(const char*) = strdup; -char*(*p_strerror_l)(int,locale_t) = strerror_l; -int(*p_strerror_r)(int,char*,size_t) = strerror_r; -char*(*p_strndup)(const char*,size_t) = strndup; -size_t(*p_strnlen)(const char*,size_t) = strnlen; -char*(*p_strtok_r)(char*restrict,const char*restrict,char**restrict) = strtok_r; -size_t(*p_strxfrm_l)(char*restrict,const char*restrict,size_t,locale_t) = strxfrm_l; +{char*(*p)(char*restrict,const char*restrict) = stpcpy;} +{char*(*p)(char*restrict,const char*restrict,size_t) = stpncpy;} +{int(*p)(const char*,const char*,locale_t) = strcoll_l;} +{char*(*p)(const char*) = strdup;} +{char*(*p)(int,locale_t) = strerror_l;} +{int(*p)(int,char*,size_t) = strerror_r;} +{char*(*p)(const char*,size_t) = strndup;} +{size_t(*p)(const char*,size_t) = strnlen;} +{char*(*p)(char*restrict,const char*restrict,char**restrict) = strtok_r;} +{size_t(*p)(char*restrict,const char*restrict,size_t,locale_t) = strxfrm_l;} #endif #ifdef _XOPEN_SOURCE -void*(*p_memccpy)(void*restrict,const void*restrict,int,size_t) = memccpy; +{void*(*p)(void*restrict,const void*restrict,int,size_t) = memccpy;} #endif } diff --git a/src/api/strings.c b/src/api/strings.c index 30177cd..f51c7d6 100644 --- a/src/api/strings.c +++ b/src/api/strings.c @@ -5,10 +5,10 @@ static void f() T(size_t) T(locale_t) #ifdef _XOPEN_SOURCE -int(*p_ffs)(int) = ffs; +{int(*p)(int) = ffs;} #endif -int(*p_strcasecmp)(const char*,const char*) = strcasecmp; -int(*p_strcasecmp_l)(const char*,const char*,locale_t) = strcasecmp_l; -int(*p_strncasecmp)(const char*,const char*,size_t) = strncasecmp; -int(*p_strncasecmp_l)(const char*,const char*,size_t,locale_t) = strncasecmp_l; +{int(*p)(const char*,const char*) = strcasecmp;} +{int(*p)(const char*,const char*,locale_t) = strcasecmp_l;} +{int(*p)(const char*,const char*,size_t) = strncasecmp;} +{int(*p)(const char*,const char*,size_t,locale_t) = strncasecmp_l;} } diff --git a/src/api/sys_ipc.c b/src/api/sys_ipc.c index 8995206..5a7701c 100644 --- a/src/api/sys_ipc.c +++ b/src/api/sys_ipc.c @@ -23,5 +23,5 @@ C(IPC_PRIVATE) C(IPC_RMID) C(IPC_SET) C(IPC_STAT) -key_t(*p_ftok)(const char*,int) = ftok; +{key_t(*p)(const char*,int) = ftok;} } diff --git a/src/api/sys_mman.c b/src/api/sys_mman.c index 4217223..bba0087 100644 --- a/src/api/sys_mman.c +++ b/src/api/sys_mman.c @@ -34,20 +34,20 @@ C(POSIX_MADV_WILLNEED) //struct posix_typed_mem_info x; //F(size_t,posix_tmi_length) //} -int(*p_mlock)(const void*,size_t) = mlock; -int(*p_mlockall)(int) = mlockall; -void*(*p_mmap)(void*,size_t,int,int,int,off_t) = mmap; -int(*p_mprotect)(void*,size_t,int) = mprotect; +{int(*p)(const void*,size_t) = mlock;} +{int(*p)(int) = mlockall;} +{void*(*p)(void*,size_t,int,int,int,off_t) = mmap;} +{int(*p)(void*,size_t,int) = mprotect;} #ifdef _XOPEN_SOURCE -int(*p_msync)(void*,size_t,int) = msync; +{int(*p)(void*,size_t,int) = msync;} #endif -int(*p_munlock)(const void*,size_t) = munlock; -int(*p_munlockall)(void) = munlockall; -int(*p_munmap)(void*,size_t) = munmap; -int(*p_posix_madvise)(void*,size_t,int) = posix_madvise; -//int(*p_posix_mem_offset)(const void*restrict,size_t,off_t*restrict,size_t*restrict,int*restrict) = posix_mem_offset; -//int(*p_posix_typed_mem_get_info)(int,struct posix_typed_mem_info*) = posix_typed_mem_get_info; -//int(*p_posix_typed_mem_open)(const char*,int,int) = posix_typed_mem_open; -int(*p_shm_open)(const char*,int,mode_t) = shm_open; -int(*p_shm_unlink)(const char*) = shm_unlink; +{int(*p)(const void*,size_t) = munlock;} +{int(*p)(void) = munlockall;} +{int(*p)(void*,size_t) = munmap;} +{int(*p)(void*,size_t,int) = posix_madvise;} +//int(*p)(const void*restrict,size_t,off_t*restrict,size_t*restrict,int*restrict) = posix_mem_offset; +//int(*p)(int,struct posix_typed_mem_info*) = posix_typed_mem_get_info; +//int(*p)(const char*,int,int) = posix_typed_mem_open; +{int(*p)(const char*,int,mode_t) = shm_open;} +{int(*p)(const char*) = shm_unlink;} } diff --git a/src/api/sys_msg.c b/src/api/sys_msg.c index 41c76ec..d9a8631 100644 --- a/src/api/sys_msg.c +++ b/src/api/sys_msg.c @@ -22,8 +22,8 @@ F(time_t, msg_stime) F(time_t, msg_rtime) F(time_t,msg_ctime) } -int(*p_msgctl)(int,int,struct msqid_ds*) = msgctl; -int(*p_msgget)(key_t,int) = msgget; -ssize_t(*p_msgrcv)(int,void*,size_t,long,int) = msgrcv; -int(*p_msgsnd)(int,const void*,size_t,int) = msgsnd; +{int(*p)(int,int,struct msqid_ds*) = msgctl;} +{int(*p)(key_t,int) = msgget;} +{ssize_t(*p)(int,void*,size_t,long,int) = msgrcv;} +{int(*p)(int,const void*,size_t,int) = msgsnd;} } diff --git a/src/api/sys_resource.c b/src/api/sys_resource.c index 0622a50..27d4ff3 100644 --- a/src/api/sys_resource.c +++ b/src/api/sys_resource.c @@ -31,9 +31,9 @@ C(RLIMIT_FSIZE) C(RLIMIT_NOFILE) C(RLIMIT_STACK) C(RLIMIT_AS) -int(*p_getpriority)(int,id_t) = getpriority; -int(*p_getrlimit)(int,struct rlimit*) = getrlimit; -int(*p_getrusage)(int,struct rusage*) = getrusage; -int(*p_setpriority)(int,id_t,int) = setpriority; -int(*p_setrlimit)(int,const struct rlimit*) = setrlimit; +{int(*p)(int,id_t) = getpriority;} +{int(*p)(int,struct rlimit*) = getrlimit;} +{int(*p)(int,struct rusage*) = getrusage;} +{int(*p)(int,id_t,int) = setpriority;} +{int(*p)(int,const struct rlimit*) = setrlimit;} } diff --git a/src/api/sys_select.c b/src/api/sys_select.c index d013d96..077930c 100644 --- a/src/api/sys_select.c +++ b/src/api/sys_select.c @@ -16,17 +16,17 @@ F(suseconds_t, tv_usec) } C(FD_SETSIZE) #ifndef FD_CLR -void(*p_FD_CLR)(int,fd_set*) = FD_CLR; +{void(*p)(int,fd_set*) = FD_CLR;} #endif #ifndef FD_ISSET -int(*p_FD_ISSET)(int,fd_set*) = FD_ISSET; +{int(*p)(int,fd_set*) = FD_ISSET;} #endif #ifndef FD_SET -void(*p_FD_SET)(int,fd_set*) = FD_SET; +{void(*p)(int,fd_set*) = FD_SET;} #endif #ifndef FD_ZERO -void(*p_FD_ZERO)(fd_set*) = FD_ZERO; +{void(*p)(fd_set*) = FD_ZERO;} #endif -int(*p_pselect)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,const struct timespec*restrict,const sigset_t*restrict) = pselect; -int(*p_select)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select; +{int(*p)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,const struct timespec*restrict,const sigset_t*restrict) = pselect;} +{int(*p)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select;} } diff --git a/src/api/sys_sem.c b/src/api/sys_sem.c index 94dc8e1..a473cad 100644 --- a/src/api/sys_sem.c +++ b/src/api/sys_sem.c @@ -28,9 +28,9 @@ F(unsigned short,sem_num) F(short, sem_op) F(short, sem_flg) } -int(*p_semctl)(int,int,int,...) = semctl; -int(*p_semget)(key_t,int,int) = semget; -int(*p_semop)(int,struct sembuf*,size_t) = semop; +{int(*p)(int,int,int,...) = semctl;} +{int(*p)(key_t,int,int) = semget;} +{int(*p)(int,struct sembuf*,size_t) = semop;} T(uid_t) T(gid_t) @@ -51,5 +51,5 @@ C(IPC_PRIVATE) C(IPC_RMID) C(IPC_SET) C(IPC_STAT) -key_t(*p_ftok)(const char*,int) = ftok; +{key_t(*p)(const char*,int) = ftok;} } diff --git a/src/api/sys_shm.c b/src/api/sys_shm.c index 128e806..6c5b94a 100644 --- a/src/api/sys_shm.c +++ b/src/api/sys_shm.c @@ -22,10 +22,10 @@ F(time_t,shm_atime) F(time_t,shm_dtime) F(time_t,shm_ctime) } -void*(*p_shmat)(int,const void*,int) = shmat; -int(*p_shmctl)(int,int,struct shmid_ds*) = shmctl; -int(*p_shmdt)(const void*) = shmdt; -int(*p_shmget)(key_t,size_t,int) = shmget; +{void*(*p)(int,const void*,int) = shmat;} +{int(*p)(int,int,struct shmid_ds*) = shmctl;} +{int(*p)(const void*) = shmdt;} +{int(*p)(key_t,size_t,int) = shmget;} T(uid_t) T(gid_t) @@ -46,5 +46,5 @@ C(IPC_PRIVATE) C(IPC_RMID) C(IPC_SET) C(IPC_STAT) -key_t(*p_ftok)(const char*,int) = ftok; +{key_t(*p)(const char*,int) = ftok;} } diff --git a/src/api/sys_socket.c b/src/api/sys_socket.c index d22fe08..ac10cbf 100644 --- a/src/api/sys_socket.c +++ b/src/api/sys_socket.c @@ -85,22 +85,22 @@ C(AF_UNSPEC) C(SHUT_RD) C(SHUT_RDWR) C(SHUT_WR) -int(*p_accept)(int,struct sockaddr*restrict,socklen_t*restrict) = accept; -int(*p_bind)(int,const struct sockaddr*,socklen_t) = bind; -int(*p_connect)(int,const struct sockaddr*,socklen_t) = connect; -int(*p_getpeername)(int,struct sockaddr*restrict,socklen_t*restrict) = getpeername; -int(*p_getsockname)(int,struct sockaddr*restrict,socklen_t*restrict) = getsockname; -int(*p_getsockopt)(int,int,int,void*restrict,socklen_t*restrict) = getsockopt; -int(*p_listen)(int,int) = listen; -ssize_t(*p_recv)(int,void*,size_t,int) = recv; -ssize_t(*p_recvfrom)(int,void*restrict,size_t,int,struct sockaddr*restrict,socklen_t*restrict) = recvfrom; -ssize_t(*p_recvmsg)(int,struct msghdr*,int) = recvmsg; -ssize_t(*p_send)(int,const void*,size_t,int) = send; -ssize_t(*p_sendmsg)(int,const struct msghdr*,int) = sendmsg; -ssize_t(*p_sendto)(int,const void*,size_t,int,const struct sockaddr*,socklen_t) = sendto; -int(*p_setsockopt)(int,int,int,const void*,socklen_t) = setsockopt; -int(*p_shutdown)(int,int) = shutdown; -int(*p_sockatmark)(int) = sockatmark; -int(*p_socket)(int,int,int) = socket; -int(*p_socketpair)(int,int,int,int[]) = socketpair; +{int(*p)(int,struct sockaddr*restrict,socklen_t*restrict) = accept;} +{int(*p)(int,const struct sockaddr*,socklen_t) = bind;} +{int(*p)(int,const struct sockaddr*,socklen_t) = connect;} +{int(*p)(int,struct sockaddr*restrict,socklen_t*restrict) = getpeername;} +{int(*p)(int,struct sockaddr*restrict,socklen_t*restrict) = getsockname;} +{int(*p)(int,int,int,void*restrict,socklen_t*restrict) = getsockopt;} +{int(*p)(int,int) = listen;} +{ssize_t(*p)(int,void*,size_t,int) = recv;} +{ssize_t(*p)(int,void*restrict,size_t,int,struct sockaddr*restrict,socklen_t*restrict) = recvfrom;} +{ssize_t(*p)(int,struct msghdr*,int) = recvmsg;} +{ssize_t(*p)(int,const void*,size_t,int) = send;} +{ssize_t(*p)(int,const struct msghdr*,int) = sendmsg;} +{ssize_t(*p)(int,const void*,size_t,int,const struct sockaddr*,socklen_t) = sendto;} +{int(*p)(int,int,int,const void*,socklen_t) = setsockopt;} +{int(*p)(int,int) = shutdown;} +{int(*p)(int) = sockatmark;} +{int(*p)(int,int,int) = socket;} +{int(*p)(int,int,int,int[]) = socketpair;} } diff --git a/src/api/sys_stat.c b/src/api/sys_stat.c index 2e6b6fa..b51b1e1 100644 --- a/src/api/sys_stat.c +++ b/src/api/sys_stat.c @@ -77,22 +77,22 @@ struct stat x = {0}; } C(UTIME_NOW) C(UTIME_OMIT) -int(*p_chmod)(const char*,mode_t) = chmod; -int(*p_fchmod)(int,mode_t) = fchmod; -int(*p_fchmodat)(int,const char*,mode_t,int) = fchmodat; -int(*p_fstat)(int,struct stat*) = fstat; -int(*p_fstatat)(int,const char*restrict,struct stat*restrict,int) = fstatat; -int(*p_futimens)(int,const struct timespec[]) = futimens; -int(*p_lstat)(const char*restrict,struct stat*restrict) = lstat; -int(*p_mkdir)(const char*,mode_t) = mkdir; -int(*p_mkdirat)(int,const char*,mode_t) = mkdirat; -int(*p_mkfifo)(const char*,mode_t) = mkfifo; -int(*p_mkfifoat)(int,const char*,mode_t) = mkfifoat; +{int(*p)(const char*,mode_t) = chmod;} +{int(*p)(int,mode_t) = fchmod;} +{int(*p)(int,const char*,mode_t,int) = fchmodat;} +{int(*p)(int,struct stat*) = fstat;} +{int(*p)(int,const char*restrict,struct stat*restrict,int) = fstatat;} +{int(*p)(int,const struct timespec[]) = futimens;} +{int(*p)(const char*restrict,struct stat*restrict) = lstat;} +{int(*p)(const char*,mode_t) = mkdir;} +{int(*p)(int,const char*,mode_t) = mkdirat;} +{int(*p)(const char*,mode_t) = mkfifo;} +{int(*p)(int,const char*,mode_t) = mkfifoat;} #ifdef _XOPEN_SOURCE -int(*p_mknod)(const char*,mode_t,dev_t) = mknod; -int(*p_mknodat)(int,const char*,mode_t,dev_t) = mknodat; +{int(*p)(const char*,mode_t,dev_t) = mknod;} +{int(*p)(int,const char*,mode_t,dev_t) = mknodat;} #endif -int(*p_stat)(const char*restrict,struct stat*restrict) = stat; -mode_t(*p_umask)(mode_t) = umask; -int(*p_utimensat)(int,const char*,const struct timespec[],int) = utimensat; +{int(*p)(const char*restrict,struct stat*restrict) = stat;} +{mode_t(*p)(mode_t) = umask;} +{int(*p)(int,const char*,const struct timespec[],int) = utimensat;} } diff --git a/src/api/sys_statvfs.c b/src/api/sys_statvfs.c index d43e503..a7818a4 100644 --- a/src/api/sys_statvfs.c +++ b/src/api/sys_statvfs.c @@ -22,6 +22,6 @@ F(unsigned long, f_namemax) } C(ST_RDONLY) C(ST_NOSUID) -int(*p_fstatvfs)(int,struct statvfs*) = fstatvfs; -int(*p_statvfs)(const char*restrict,struct statvfs*restrict) = statvfs; +{int(*p)(int,struct statvfs*) = fstatvfs;} +{int(*p)(const char*restrict,struct statvfs*restrict) = statvfs;} } diff --git a/src/api/sys_time.c b/src/api/sys_time.c index 7aa0893..54fc0e7 100644 --- a/src/api/sys_time.c +++ b/src/api/sys_time.c @@ -13,17 +13,17 @@ F(suseconds_t,tv_usec) } C(FD_SETSIZE) #ifndef FD_CLR -void(*p_FD_CLR)(int,fd_set*) = FD_CLR; +{void(*p)(int,fd_set*) = FD_CLR;} #endif #ifndef FD_ISSET -int(*p_FD_ISSET)(int,fd_set*) = FD_ISSET; +{int(*p)(int,fd_set*) = FD_ISSET;} #endif #ifndef FD_SET -void(*p_FD_SET)(int,fd_set*) = FD_SET; +{void(*p)(int,fd_set*) = FD_SET;} #endif #ifndef FD_ZERO -void(*p_FD_ZERO)(fd_set*) = FD_ZERO; +{void(*p)(fd_set*) = FD_ZERO;} #endif -int(*p_select)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select; -int(*p_utimes)(const char*,const struct timeval[]) = utimes; +{int(*p)(int,fd_set*restrict,fd_set*restrict,fd_set*restrict,struct timeval*restrict) = select;} +{int(*p)(const char*,const struct timeval[]) = utimes;} } diff --git a/src/api/sys_times.c b/src/api/sys_times.c index 323631b..7a75d03 100644 --- a/src/api/sys_times.c +++ b/src/api/sys_times.c @@ -12,5 +12,5 @@ F(clock_t,tms_stime) F(clock_t,tms_cutime) F(clock_t,tms_cstime) } -clock_t(*p_times)(struct tms*) = times; +{clock_t(*p)(struct tms*) = times;} } diff --git a/src/api/sys_uio.c b/src/api/sys_uio.c index 5417a72..4e67531 100644 --- a/src/api/sys_uio.c +++ b/src/api/sys_uio.c @@ -10,6 +10,6 @@ struct iovec x; F(void *,iov_base) F(size_t,iov_len) } -ssize_t(*p_readv)(int,const struct iovec*,int) = readv; -ssize_t(*p_writev)(int,const struct iovec*,int) = writev; +{ssize_t(*p)(int,const struct iovec*,int) = readv;} +{ssize_t(*p)(int,const struct iovec*,int) = writev;} } diff --git a/src/api/sys_utsname.c b/src/api/sys_utsname.c index a3fdce7..6e1aee9 100644 --- a/src/api/sys_utsname.c +++ b/src/api/sys_utsname.c @@ -10,5 +10,5 @@ F(char,release[1]) F(char,version[1]) F(char,machine[1]) } -int(*p_uname)(struct utsname*) = uname; +{int(*p)(struct utsname*) = uname;} } diff --git a/src/api/sys_wait.c b/src/api/sys_wait.c index 0211393..2dfaeb3 100644 --- a/src/api/sys_wait.c +++ b/src/api/sys_wait.c @@ -25,7 +25,7 @@ C(WSTOPPED) {idtype_t x = P_ALL;} {idtype_t x = P_PGID;} {idtype_t x = P_PID;} -pid_t(*p_wait)(int*) = wait; -int(*p_waitid)(idtype_t,id_t,siginfo_t*,int) = waitid; -pid_t(*p_waitpid)(pid_t,int*,int) = waitpid; +{pid_t(*p)(int*) = wait;} +{int(*p)(idtype_t,id_t,siginfo_t*,int) = waitid;} +{pid_t(*p)(pid_t,int*,int) = waitpid;} } diff --git a/src/api/syslog.c b/src/api/syslog.c index c659ec1..4f3898b 100644 --- a/src/api/syslog.c +++ b/src/api/syslog.c @@ -35,8 +35,8 @@ C(LOG_WARNING) C(LOG_NOTICE) C(LOG_INFO) C(LOG_DEBUG) -void(*p_closelog)(void) = closelog; -void(*p_openlog)(const char*,int,int) = openlog; -int(*p_setlogmask)(int) = setlogmask; -void(*p_syslog)(int,const char*,...) = syslog; +{void(*p)(void) = closelog;} +{void(*p)(const char*,int,int) = openlog;} +{int(*p)(int) = setlogmask;} +{void(*p)(int,const char*,...) = syslog;} } diff --git a/src/api/termios.c b/src/api/termios.c index a138767..eaac31b 100644 --- a/src/api/termios.c +++ b/src/api/termios.c @@ -117,15 +117,15 @@ C(TCIOFF) C(TCION) C(TCOOFF) C(TCOON) -speed_t(*p_cfgetispeed)(const struct termios*) = cfgetispeed; -speed_t(*p_cfgetospeed)(const struct termios*) = cfgetospeed; -int(*p_cfsetispeed)(struct termios*,speed_t) = cfsetispeed; -int(*p_cfsetospeed)(struct termios*,speed_t) = cfsetospeed; -int(*p_tcdrain)(int) = tcdrain; -int(*p_tcflow)(int,int) = tcflow; -int(*p_tcflush)(int,int) = tcflush; -int(*p_tcgetattr)(int,struct termios*) = tcgetattr; -pid_t(*p_tcgetsid)(int) = tcgetsid; -int(*p_tcsendbreak)(int,int) = tcsendbreak; -int(*p_tcsetattr)(int,int,const struct termios*) = tcsetattr; +{speed_t(*p)(const struct termios*) = cfgetispeed;} +{speed_t(*p)(const struct termios*) = cfgetospeed;} +{int(*p)(struct termios*,speed_t) = cfsetispeed;} +{int(*p)(struct termios*,speed_t) = cfsetospeed;} +{int(*p)(int) = tcdrain;} +{int(*p)(int,int) = tcflow;} +{int(*p)(int,int) = tcflush;} +{int(*p)(int,struct termios*) = tcgetattr;} +{pid_t(*p)(int) = tcgetsid;} +{int(*p)(int,int) = tcsendbreak;} +{int(*p)(int,int,const struct termios*) = tcsetattr;} } diff --git a/src/api/time.c b/src/api/time.c index d5d3d6e..257d9d3 100644 --- a/src/api/time.c +++ b/src/api/time.c @@ -43,39 +43,39 @@ F(int,tm_isdst) {void *x = NULL;} {int x = CLOCKS_PER_SEC;} C(TIMER_ABSTIME) -char*(*p_asctime)(const struct tm*) = asctime; -clock_t(*p_clock)(void) = clock; -char*(*p_ctime)(const time_t*) = ctime; +{char*(*p)(const struct tm*) = asctime;} +{clock_t(*p)(void) = clock;} +{char*(*p)(const time_t*) = ctime;} {int i = daylight;} -double(*p_difftime)(time_t,time_t) = difftime; -struct tm*(*p_gmtime)(const time_t*) = gmtime; -struct tm*(*p_localtime)(const time_t*) = localtime; -time_t(*p_mktime)(struct tm*) = mktime; -size_t(*p_strftime)(char*restrict,size_t,const char*restrict,const struct tm*restrict) = strftime; -time_t(*p_time)(time_t*) = time; +{double(*p)(time_t,time_t) = difftime;} +{struct tm*(*p)(const time_t*) = gmtime;} +{struct tm*(*p)(const time_t*) = localtime;} +{time_t(*p)(struct tm*) = mktime;} +{size_t(*p)(char*restrict,size_t,const char*restrict,const struct tm*restrict) = strftime;} +{time_t(*p)(time_t*) = time;} #ifdef _POSIX_C_SOURCE -char*(*p_asctime_r)(const struct tm*restrict,char*restrict) = asctime_r; -int(*p_clock_getcpuclockid)(pid_t,clockid_t*) = clock_getcpuclockid; -int(*p_clock_getres)(clockid_t,struct timespec*) = clock_getres; -int(*p_clock_gettime)(clockid_t,struct timespec*) = clock_gettime; -int(*p_clock_nanosleep)(clockid_t,int,const struct timespec*,struct timespec*) = clock_nanosleep; -int(*p_clock_settime)(clockid_t,const struct timespec*) = clock_settime; -char*(*p_ctime_r)(const time_t*,char*) = ctime_r; -struct tm*(*p_gmtime_r)(const time_t*restrict,struct tm*restrict) = gmtime_r; -struct tm*(*p_localtime_r)(const time_t*restrict,struct tm*restrict) = localtime_r; -int(*p_nanosleep)(const struct timespec*,struct timespec*) = nanosleep; -size_t(*p_strftime_l)(char*restrict,size_t,const char*restrict,const struct tm*restrict,locale_t) = strftime_l; -int(*p_timer_delete)(timer_t) = timer_delete; -int(*p_timer_getoverrun)(timer_t) = timer_getoverrun; -int(*p_timer_gettime)(timer_t,struct itimerspec*) = timer_gettime; -int(*p_timer_settime)(timer_t,int,const struct itimerspec*restrict,struct itimerspec*restrict) = timer_settime; +{char*(*p)(const struct tm*restrict,char*restrict) = asctime_r;} +{int(*p)(pid_t,clockid_t*) = clock_getcpuclockid;} +{int(*p)(clockid_t,struct timespec*) = clock_getres;} +{int(*p)(clockid_t,struct timespec*) = clock_gettime;} +{int(*p)(clockid_t,int,const struct timespec*,struct timespec*) = clock_nanosleep;} +{int(*p)(clockid_t,const struct timespec*) = clock_settime;} +{char*(*p)(const time_t*,char*) = ctime_r;} +{struct tm*(*p)(const time_t*restrict,struct tm*restrict) = gmtime_r;} +{struct tm*(*p)(const time_t*restrict,struct tm*restrict) = localtime_r;} +{int(*p)(const struct timespec*,struct timespec*) = nanosleep;} +{size_t(*p)(char*restrict,size_t,const char*restrict,const struct tm*restrict,locale_t) = strftime_l;} +{int(*p)(timer_t) = timer_delete;} +{int(*p)(timer_t) = timer_getoverrun;} +{int(*p)(timer_t,struct itimerspec*) = timer_gettime;} +{int(*p)(timer_t,int,const struct itimerspec*restrict,struct itimerspec*restrict) = timer_settime;} {char **x = tzname;} -void(*p_tzset)(void) = tzset; +{void(*p)(void) = tzset;} #endif #ifdef _XOPEN_SOURCE -struct tm*(*p_getdate)(const char*) = getdate; +{struct tm*(*p)(const char*) = getdate;} {int i = getdate_err;} -char*(*p_strptime)(const char*restrict,const char*restrict,struct tm*restrict) = strptime; +{char*(*p)(const char*restrict,const char*restrict,struct tm*restrict) = strptime;} {long i = timezone;} #endif } @@ -83,6 +83,6 @@ char*(*p_strptime)(const char*restrict,const char*restrict,struct tm*restrict) = #include static void g() { -int(*p_timer_create)(clockid_t,struct sigevent*restrict,timer_t*restrict) = timer_create; +{int(*p)(clockid_t,struct sigevent*restrict,timer_t*restrict) = timer_create;} } #endif diff --git a/src/api/unistd.c b/src/api/unistd.c index 10a94cd..cdc6564 100644 --- a/src/api/unistd.c +++ b/src/api/unistd.c @@ -190,93 +190,93 @@ T(gid_t) T(off_t) T(pid_t) T(intptr_t) -void(*p__exit)(int) = _exit; -int(*p_access)(const char*,int) = access; -unsigned(*p_alarm)(unsigned) = alarm; -int(*p_chdir)(const char*) = chdir; -int(*p_chown)(const char*,uid_t,gid_t) = chown; -int(*p_close)(int) = close; -size_t(*p_confstr)(int,char*,size_t) = confstr; -char*(*p_ctermid)(char*) = ctermid; -int(*p_dup)(int) = dup; -int(*p_dup2)(int,int) = dup2; +{void(*p)(int) = _exit;} +{int(*p)(const char*,int) = access;} +{unsigned(*p)(unsigned) = alarm;} +{int(*p)(const char*) = chdir;} +{int(*p)(const char*,uid_t,gid_t) = chown;} +{int(*p)(int) = close;} +{size_t(*p)(int,char*,size_t) = confstr;} +{char*(*p)(char*) = ctermid;} +{int(*p)(int) = dup;} +{int(*p)(int,int) = dup2;} {char **x = environ}; -int(*p_execl)(const char*,const char*,...) = execl; -int(*p_execle)(const char*,const char*,...) = execle; -int(*p_execlp)(const char*,const char*,...) = execlp; -int(*p_execv)(const char*,char*const[]) = execv; -int(*p_execve)(const char*,char*const[],char*const[]) = execve; -int(*p_execvp)(const char*,char*const[]) = execvp; -int(*p_faccessat)(int,const char*,int,int) = faccessat; -int(*p_fchdir)(int) = fchdir; -int(*p_fchown)(int,uid_t,gid_t) = fchown; -int(*p_fchownat)(int,const char*,uid_t,gid_t,int) = fchownat; -int(*p_fdatasync)(int) = fdatasync; -int(*p_fexecve)(int,char*const[],char*const[]) = fexecve; -pid_t(*p_fork)(void) = fork; -long(*p_fpathconf)(int,int) = fpathconf; -int(*p_fsync)(int) = fsync; -int(*p_ftruncate)(int,off_t) = ftruncate; -char*(*p_getcwd)(char*,size_t) = getcwd; -gid_t(*p_getegid)(void) = getegid; -uid_t(*p_geteuid)(void) = geteuid; -gid_t(*p_getgid)(void) = getgid; -int(*p_getgroups)(int,gid_t[]) = getgroups; -int(*p_gethostname)(char*,size_t) = gethostname; -char*(*p_getlogin)(void) = getlogin; -int(*p_getlogin_r)(char*,size_t) = getlogin_r; -int(*p_getopt)(int,char*const[],const char*) = getopt; -pid_t(*p_getpgid)(pid_t) = getpgid; -pid_t(*p_getpgrp)(void) = getpgrp; -pid_t(*p_getpid)(void) = getpid; -pid_t(*p_getppid)(void) = getppid; -pid_t(*p_getsid)(pid_t) = getsid; -uid_t(*p_getuid)(void) = getuid; -int(*p_isatty)(int) = isatty; -int(*p_lchown)(const char*,uid_t,gid_t) = lchown; -int(*p_link)(const char*,const char*) = link; -int(*p_linkat)(int,const char*,int,const char*,int) = linkat; -off_t(*p_lseek)(int,off_t,int) = lseek; +{int(*p)(const char*,const char*,...) = execl;} +{int(*p)(const char*,const char*,...) = execle;} +{int(*p)(const char*,const char*,...) = execlp;} +{int(*p)(const char*,char*const[]) = execv;} +{int(*p)(const char*,char*const[],char*const[]) = execve;} +{int(*p)(const char*,char*const[]) = execvp;} +{int(*p)(int,const char*,int,int) = faccessat;} +{int(*p)(int) = fchdir;} +{int(*p)(int,uid_t,gid_t) = fchown;} +{int(*p)(int,const char*,uid_t,gid_t,int) = fchownat;} +{int(*p)(int) = fdatasync;} +{int(*p)(int,char*const[],char*const[]) = fexecve;} +{pid_t(*p)(void) = fork;} +{long(*p)(int,int) = fpathconf;} +{int(*p)(int) = fsync;} +{int(*p)(int,off_t) = ftruncate;} +{char*(*p)(char*,size_t) = getcwd;} +{gid_t(*p)(void) = getegid;} +{uid_t(*p)(void) = geteuid;} +{gid_t(*p)(void) = getgid;} +{int(*p)(int,gid_t[]) = getgroups;} +{int(*p)(char*,size_t) = gethostname;} +{char*(*p)(void) = getlogin;} +{int(*p)(char*,size_t) = getlogin_r;} +{int(*p)(int,char*const[],const char*) = getopt;} +{pid_t(*p)(pid_t) = getpgid;} +{pid_t(*p)(void) = getpgrp;} +{pid_t(*p)(void) = getpid;} +{pid_t(*p)(void) = getppid;} +{pid_t(*p)(pid_t) = getsid;} +{uid_t(*p)(void) = getuid;} +{int(*p)(int) = isatty;} +{int(*p)(const char*,uid_t,gid_t) = lchown;} +{int(*p)(const char*,const char*) = link;} +{int(*p)(int,const char*,int,const char*,int) = linkat;} +{off_t(*p)(int,off_t,int) = lseek;} {char *x = optarg;} {int i = opterr;} {int i = optind;} {int i = optopt;} -long(*p_pathconf)(const char*,int) = pathconf; -int(*p_pause)(void) = pause; -int(*p_pipe)(int[]) = pipe; -ssize_t(*p_pread)(int,void*,size_t,off_t) = pread; -ssize_t(*p_pwrite)(int,const void*,size_t,off_t) = pwrite; -ssize_t(*p_read)(int,void*,size_t) = read; -ssize_t(*p_readlink)(const char*restrict,char*restrict,size_t) = readlink; -ssize_t(*p_readlinkat)(int,const char*restrict,char*restrict,size_t) = readlinkat; -int(*p_rmdir)(const char*) = rmdir; -int(*p_setegid)(gid_t) = setegid; -int(*p_seteuid)(uid_t) = seteuid; -int(*p_setgid)(gid_t) = setgid; -int(*p_setpgid)(pid_t,pid_t) = setpgid; -pid_t(*p_setsid)(void) = setsid; -int(*p_setuid)(uid_t) = setuid; -unsigned(*p_sleep)(unsigned) = sleep; -int(*p_symlink)(const char*,const char*) = symlink; -int(*p_symlinkat)(const char*,int,const char*) = symlinkat; -long(*p_sysconf)(int) = sysconf; -pid_t(*p_tcgetpgrp)(int) = tcgetpgrp; -int(*p_tcsetpgrp)(int,pid_t) = tcsetpgrp; -int(*p_truncate)(const char*,off_t) = truncate; -char*(*p_ttyname)(int) = ttyname; -int(*p_ttyname_r)(int,char*,size_t) = ttyname_r; -int(*p_unlink)(const char*) = unlink; -int(*p_unlinkat)(int,const char*,int) = unlinkat; -ssize_t(*p_write)(int,const void*,size_t) = write; +{long(*p)(const char*,int) = pathconf;} +{int(*p)(void) = pause;} +{int(*p)(int[]) = pipe;} +{ssize_t(*p)(int,void*,size_t,off_t) = pread;} +{ssize_t(*p)(int,const void*,size_t,off_t) = pwrite;} +{ssize_t(*p)(int,void*,size_t) = read;} +{ssize_t(*p)(const char*restrict,char*restrict,size_t) = readlink;} +{ssize_t(*p)(int,const char*restrict,char*restrict,size_t) = readlinkat;} +{int(*p)(const char*) = rmdir;} +{int(*p)(gid_t) = setegid;} +{int(*p)(uid_t) = seteuid;} +{int(*p)(gid_t) = setgid;} +{int(*p)(pid_t,pid_t) = setpgid;} +{pid_t(*p)(void) = setsid;} +{int(*p)(uid_t) = setuid;} +{unsigned(*p)(unsigned) = sleep;} +{int(*p)(const char*,const char*) = symlink;} +{int(*p)(const char*,int,const char*) = symlinkat;} +{long(*p)(int) = sysconf;} +{pid_t(*p)(int) = tcgetpgrp;} +{int(*p)(int,pid_t) = tcsetpgrp;} +{int(*p)(const char*,off_t) = truncate;} +{char*(*p)(int) = ttyname;} +{int(*p)(int,char*,size_t) = ttyname_r;} +{int(*p)(const char*) = unlink;} +{int(*p)(int,const char*,int) = unlinkat;} +{ssize_t(*p)(int,const void*,size_t) = write;} #ifdef _XOPEN_SOURCE -char*(*p_crypt)(const char*,const char*) = crypt; -void(*p_encrypt)(char[],int) = encrypt; -long(*p_gethostid)(void) = gethostid; -int(*p_lockf)(int,int,off_t) = lockf; -int(*p_nice)(int) = nice; -int(*p_setregid)(gid_t,gid_t) = setregid; -int(*p_setreuid)(uid_t,uid_t) = setreuid; -void(*p_swab)(const void*restrict,void*restrict,ssize_t) = swab; -void(*p_sync)(void) = sync; +{char*(*p)(const char*,const char*) = crypt;} +{void(*p)(char[],int) = encrypt;} +{long(*p)(void) = gethostid;} +{int(*p)(int,int,off_t) = lockf;} +{int(*p)(int) = nice;} +{int(*p)(gid_t,gid_t) = setregid;} +{int(*p)(uid_t,uid_t) = setreuid;} +{void(*p)(const void*restrict,void*restrict,ssize_t) = swab;} +{void(*p)(void) = sync;} #endif } diff --git a/src/api/utmpx.c b/src/api/utmpx.c index a1bffdb..1e55778 100644 --- a/src/api/utmpx.c +++ b/src/api/utmpx.c @@ -23,10 +23,10 @@ C(USER_PROCESS) C(INIT_PROCESS) C(LOGIN_PROCESS) C(DEAD_PROCESS) -void(*p_endutxent)(void) = endutxent; -struct utmpx*(*p_getutxent)(void) = getutxent; -struct utmpx*(*p_getutxid)(const struct utmpx*) = getutxid; -struct utmpx*(*p_getutxline)(const struct utmpx*) = getutxline; -struct utmpx*(*p_pututxline)(const struct utmpx*) = pututxline; -void(*p_setutxent)(void) = setutxent; +{void(*p)(void) = endutxent;} +{struct utmpx*(*p)(void) = getutxent;} +{struct utmpx*(*p)(const struct utmpx*) = getutxid;} +{struct utmpx*(*p)(const struct utmpx*) = getutxline;} +{struct utmpx*(*p)(const struct utmpx*) = pututxline;} +{void(*p)(void) = setutxent;} } diff --git a/src/api/wchar.c b/src/api/wchar.c index 5aeab9d..cff6765 100644 --- a/src/api/wchar.c +++ b/src/api/wchar.c @@ -17,60 +17,60 @@ C(WCHAR_MAX) C(WCHAR_MIN) C(WEOF) {void *x=NULL;} -wint_t(*p_getwchar)(void) = getwchar; -size_t(*p_mbrlen)(const char*restrict,size_t,mbstate_t*restrict) = mbrlen; -size_t(*p_mbrtowc)(wchar_t*restrict,const char*restrict,size_t,mbstate_t*restrict) = mbrtowc; -int(*p_mbsinit)(const mbstate_t*) = mbsinit; -size_t(*p_mbsrtowcs)(wchar_t*restrict,const char**restrict,size_t,mbstate_t*restrict) = mbsrtowcs; -wint_t(*p_putwchar)(wchar_t) = putwchar; -size_t(*p_wcrtomb)(char*restrict,wchar_t,mbstate_t*restrict) = wcrtomb; -wchar_t*(*p_wcscat)(wchar_t*restrict,const wchar_t*restrict) = wcscat; -wchar_t*(*p_wcschr)(const wchar_t*,wchar_t) = wcschr; -int(*p_wcscmp)(const wchar_t*,const wchar_t*) = wcscmp; -int(*p_wcscoll)(const wchar_t*,const wchar_t*) = wcscoll; -wchar_t*(*p_wcscpy)(wchar_t*restrict,const wchar_t*restrict) = wcscpy; -size_t(*p_wcscspn)(const wchar_t*,const wchar_t*) = wcscspn; -size_t(*p_wcsftime)(wchar_t*restrict,size_t,const wchar_t*restrict,const struct tm*restrict) = wcsftime; -size_t(*p_wcslen)(const wchar_t*) = wcslen; -wchar_t*(*p_wcsncat)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcsncat; -int(*p_wcsncmp)(const wchar_t*,const wchar_t*,size_t) = wcsncmp; -wchar_t*(*p_wcsncpy)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcsncpy; -wchar_t*(*p_wcspbrk)(const wchar_t*,const wchar_t*) = wcspbrk; -wchar_t*(*p_wcsrchr)(const wchar_t*,wchar_t) = wcsrchr; -size_t(*p_wcsrtombs)(char*restrict,const wchar_t**restrict,size_t,mbstate_t*restrict) = wcsrtombs; -size_t(*p_wcsspn)(const wchar_t*,const wchar_t*) = wcsspn; -wchar_t*(*p_wcsstr)(const wchar_t*restrict,const wchar_t*restrict) = wcsstr; -double(*p_wcstod)(const wchar_t*restrict,wchar_t**restrict) = wcstod; -float(*p_wcstof)(const wchar_t*restrict,wchar_t**restrict) = wcstof; -wchar_t*(*p_wcstok)(wchar_t*restrict,const wchar_t*restrict,wchar_t**restrict) = wcstok; -long(*p_wcstol)(const wchar_t*restrict,wchar_t**restrict,int) = wcstol; -long double(*p_wcstold)(const wchar_t*restrict,wchar_t**restrict) = wcstold; -long long(*p_wcstoll)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoll; -unsigned long(*p_wcstoul)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoul; -unsigned long long(*p_wcstoull)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoull; -size_t(*p_wcsxfrm)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcsxfrm; -wchar_t*(*p_wmemchr)(const wchar_t*,wchar_t,size_t) = wmemchr; -int(*p_wmemcmp)(const wchar_t*,const wchar_t*,size_t) = wmemcmp; -wchar_t*(*p_wmemcpy)(wchar_t*restrict,const wchar_t*restrict,size_t) = wmemcpy; -wchar_t*(*p_wmemmove)(wchar_t*,const wchar_t*,size_t) = wmemmove; -wchar_t*(*p_wmemset)(wchar_t*,wchar_t,size_t) = wmemset; +{wint_t(*p)(void) = getwchar;} +{size_t(*p)(const char*restrict,size_t,mbstate_t*restrict) = mbrlen;} +{size_t(*p)(wchar_t*restrict,const char*restrict,size_t,mbstate_t*restrict) = mbrtowc;} +{int(*p)(const mbstate_t*) = mbsinit;} +{size_t(*p)(wchar_t*restrict,const char**restrict,size_t,mbstate_t*restrict) = mbsrtowcs;} +{wint_t(*p)(wchar_t) = putwchar;} +{size_t(*p)(char*restrict,wchar_t,mbstate_t*restrict) = wcrtomb;} +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict) = wcscat;} +{wchar_t*(*p)(const wchar_t*,wchar_t) = wcschr;} +{int(*p)(const wchar_t*,const wchar_t*) = wcscmp;} +{int(*p)(const wchar_t*,const wchar_t*) = wcscoll;} +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict) = wcscpy;} +{size_t(*p)(const wchar_t*,const wchar_t*) = wcscspn;} +{size_t(*p)(wchar_t*restrict,size_t,const wchar_t*restrict,const struct tm*restrict) = wcsftime;} +{size_t(*p)(const wchar_t*) = wcslen;} +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcsncat;} +{int(*p)(const wchar_t*,const wchar_t*,size_t) = wcsncmp;} +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcsncpy;} +{wchar_t*(*p)(const wchar_t*,const wchar_t*) = wcspbrk;} +{wchar_t*(*p)(const wchar_t*,wchar_t) = wcsrchr;} +{size_t(*p)(char*restrict,const wchar_t**restrict,size_t,mbstate_t*restrict) = wcsrtombs;} +{size_t(*p)(const wchar_t*,const wchar_t*) = wcsspn;} +{wchar_t*(*p)(const wchar_t*restrict,const wchar_t*restrict) = wcsstr;} +{double(*p)(const wchar_t*restrict,wchar_t**restrict) = wcstod;} +{float(*p)(const wchar_t*restrict,wchar_t**restrict) = wcstof;} +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict,wchar_t**restrict) = wcstok;} +{long(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstol;} +{long double(*p)(const wchar_t*restrict,wchar_t**restrict) = wcstold;} +{long long(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoll;} +{unsigned long(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoul;} +{unsigned long long(*p)(const wchar_t*restrict,wchar_t**restrict,int) = wcstoull;} +{size_t(*p)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcsxfrm;} +{wchar_t*(*p)(const wchar_t*,wchar_t,size_t) = wmemchr;} +{int(*p)(const wchar_t*,const wchar_t*,size_t) = wmemcmp;} +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict,size_t) = wmemcpy;} +{wchar_t*(*p)(wchar_t*,const wchar_t*,size_t) = wmemmove;} +{wchar_t*(*p)(wchar_t*,wchar_t,size_t) = wmemset;} #ifdef _POSIX_C_SOURCE -size_t(*p_mbsnrtowcs)(wchar_t*restrict,const char**restrict,size_t,size_t,mbstate_t*restrict) = mbsnrtowcs; -FILE*(*p_open_wmemstream)(wchar_t**,size_t*) = open_wmemstream; -wchar_t*(*p_wcpcpy)(wchar_t*restrict,const wchar_t*restrict) = wcpcpy; -wchar_t*(*p_wcpncpy)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcpncpy; -int(*p_wcscasecmp)(const wchar_t*,const wchar_t*) = wcscasecmp; -int(*p_wcscasecmp_l)(const wchar_t*,const wchar_t*,locale_t) = wcscasecmp_l; -int(*p_wcscoll_l)(const wchar_t*,const wchar_t*,locale_t) = wcscoll_l; -wchar_t*(*p_wcsdup)(const wchar_t*) = wcsdup; -int(*p_wcsncasecmp)(const wchar_t*,const wchar_t*,size_t) = wcsncasecmp; -int(*p_wcsncasecmp_l)(const wchar_t*,const wchar_t*,size_t,locale_t) = wcsncasecmp_l; -size_t(*p_wcsnlen)(const wchar_t*,size_t) = wcsnlen; -size_t(*p_wcsnrtombs)(char*restrict,const wchar_t**restrict,size_t,size_t,mbstate_t*restrict) = wcsnrtombs; -size_t(*p_wcsxfrm_l)(wchar_t*restrict,const wchar_t*restrict,size_t,locale_t) = wcsxfrm_l; +{size_t(*p)(wchar_t*restrict,const char**restrict,size_t,size_t,mbstate_t*restrict) = mbsnrtowcs;} +FILE*(*p)(wchar_t**,size_t*) = open_wmemstream; +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict) = wcpcpy;} +{wchar_t*(*p)(wchar_t*restrict,const wchar_t*restrict,size_t) = wcpncpy;} +{int(*p)(const wchar_t*,const wchar_t*) = wcscasecmp;} +{int(*p)(const wchar_t*,const wchar_t*,locale_t) = wcscasecmp_l;} +{int(*p)(const wchar_t*,const wchar_t*,locale_t) = wcscoll_l;} +{wchar_t*(*p)(const wchar_t*) = wcsdup;} +{int(*p)(const wchar_t*,const wchar_t*,size_t) = wcsncasecmp;} +{int(*p)(const wchar_t*,const wchar_t*,size_t,locale_t) = wcsncasecmp_l;} +{size_t(*p)(const wchar_t*,size_t) = wcsnlen;} +{size_t(*p)(char*restrict,const wchar_t**restrict,size_t,size_t,mbstate_t*restrict) = wcsnrtombs;} +{size_t(*p)(wchar_t*restrict,const wchar_t*restrict,size_t,locale_t) = wcsxfrm_l;} #endif #ifdef _XOPEN_SOURCE -int(*p_wcswidth)(const wchar_t*,size_t) = wcswidth; -int(*p_wcwidth)(wchar_t) = wcwidth; +{int(*p)(const wchar_t*,size_t) = wcswidth;} +{int(*p)(wchar_t) = wcwidth;} #endif } diff --git a/src/api/wctype.c b/src/api/wctype.c index 8326598..9378acf 100644 --- a/src/api/wctype.c +++ b/src/api/wctype.c @@ -11,42 +11,42 @@ T(wctype_t) T(locale_t) #endif C(WEOF) -int(*p_iswalnum)(wint_t) = iswalnum; -int(*p_iswalpha)(wint_t) = iswalpha; -int(*p_iswblank)(wint_t) = iswblank; -int(*p_iswcntrl)(wint_t) = iswcntrl; -int(*p_iswctype)(wint_t,wctype_t) = iswctype; -int(*p_iswdigit)(wint_t) = iswdigit; -int(*p_iswgraph)(wint_t) = iswgraph; -int(*p_iswlower)(wint_t) = iswlower; -int(*p_iswprint)(wint_t) = iswprint; -int(*p_iswpunct)(wint_t) = iswpunct; -int(*p_iswspace)(wint_t) = iswspace; -int(*p_iswupper)(wint_t) = iswupper; -int(*p_iswxdigit)(wint_t) = iswxdigit; -wint_t(*p_towctrans)(wint_t,wctrans_t) = towctrans; -wint_t(*p_towlower)(wint_t) = towlower; -wint_t(*p_towupper)(wint_t) = towupper; -wctrans_t(*p_wctrans)(const char*) = wctrans; -wctype_t(*p_wctype)(const char*) = wctype; +{int(*p)(wint_t) = iswalnum;} +{int(*p)(wint_t) = iswalpha;} +{int(*p)(wint_t) = iswblank;} +{int(*p)(wint_t) = iswcntrl;} +{int(*p)(wint_t,wctype_t) = iswctype;} +{int(*p)(wint_t) = iswdigit;} +{int(*p)(wint_t) = iswgraph;} +{int(*p)(wint_t) = iswlower;} +{int(*p)(wint_t) = iswprint;} +{int(*p)(wint_t) = iswpunct;} +{int(*p)(wint_t) = iswspace;} +{int(*p)(wint_t) = iswupper;} +{int(*p)(wint_t) = iswxdigit;} +{wint_t(*p)(wint_t,wctrans_t) = towctrans;} +{wint_t(*p)(wint_t) = towlower;} +{wint_t(*p)(wint_t) = towupper;} +{wctrans_t(*p)(const char*) = wctrans;} +{wctype_t(*p)(const char*) = wctype;} #ifdef _POSIX_C_SOURCE -int(*p_iswalnum_l)(wint_t,locale_t) = iswalnum_l; -int(*p_iswalpha_l)(wint_t,locale_t) = iswalpha_l; -int(*p_iswblank_l)(wint_t,locale_t) = iswblank_l; -int(*p_iswcntrl_l)(wint_t,locale_t) = iswcntrl_l; -int(*p_iswctype_l)(wint_t,wctype_t,locale_t) = iswctype_l; -int(*p_iswdigit_l)(wint_t,locale_t) = iswdigit_l; -int(*p_iswgraph_l)(wint_t,locale_t) = iswgraph_l; -int(*p_iswlower_l)(wint_t,locale_t) = iswlower_l; -int(*p_iswprint_l)(wint_t,locale_t) = iswprint_l; -int(*p_iswpunct_l)(wint_t,locale_t) = iswpunct_l; -int(*p_iswspace_l)(wint_t,locale_t) = iswspace_l; -int(*p_iswupper_l)(wint_t,locale_t) = iswupper_l; -int(*p_iswxdigit_l)(wint_t,locale_t) = iswxdigit_l; -wint_t(*p_towctrans_l)(wint_t,wctrans_t,locale_t) = towctrans_l; -wint_t(*p_towlower_l)(wint_t,locale_t) = towlower_l; -wint_t(*p_towupper_l)(wint_t,locale_t) = towupper_l; -wctrans_t(*p_wctrans_l)(const char*,locale_t) = wctrans_l; -wctype_t(*p_wctype_l)(const char*,locale_t) = wctype_l; +{int(*p)(wint_t,locale_t) = iswalnum_l;} +{int(*p)(wint_t,locale_t) = iswalpha_l;} +{int(*p)(wint_t,locale_t) = iswblank_l;} +{int(*p)(wint_t,locale_t) = iswcntrl_l;} +{int(*p)(wint_t,wctype_t,locale_t) = iswctype_l;} +{int(*p)(wint_t,locale_t) = iswdigit_l;} +{int(*p)(wint_t,locale_t) = iswgraph_l;} +{int(*p)(wint_t,locale_t) = iswlower_l;} +{int(*p)(wint_t,locale_t) = iswprint_l;} +{int(*p)(wint_t,locale_t) = iswpunct_l;} +{int(*p)(wint_t,locale_t) = iswspace_l;} +{int(*p)(wint_t,locale_t) = iswupper_l;} +{int(*p)(wint_t,locale_t) = iswxdigit_l;} +{wint_t(*p)(wint_t,wctrans_t,locale_t) = towctrans_l;} +{wint_t(*p)(wint_t,locale_t) = towlower_l;} +{wint_t(*p)(wint_t,locale_t) = towupper_l;} +{wctrans_t(*p)(const char*,locale_t) = wctrans_l;} +{wctype_t(*p)(const char*,locale_t) = wctype_l;} #endif } diff --git a/src/api/wordexp.c b/src/api/wordexp.c index 5f89956..baf7e24 100644 --- a/src/api/wordexp.c +++ b/src/api/wordexp.c @@ -22,6 +22,6 @@ C(WRDE_BADVAL) C(WRDE_CMDSUB) C(WRDE_NOSPACE) C(WRDE_SYNTAX) -int(*p_wordexp)(const char*restrict,wordexp_t*restrict,int) = wordexp; -void(*p_wordfree)(wordexp_t*) = wordfree; +{int(*p)(const char*restrict,wordexp_t*restrict,int) = wordexp;} +{void(*p)(wordexp_t*) = wordfree;} }