1570af302Sopenharmony_ci#include <stdlib.h> 2570af302Sopenharmony_ci#define T(t) (t*)0; 3570af302Sopenharmony_ci#define F(t,n) {t *y = &x.n;} 4570af302Sopenharmony_ci#define C(n) switch(n){case n:;} 5570af302Sopenharmony_ci#define I(t,e) {t x[sizeof(t)==sizeof(e)] = {e};} 6570af302Sopenharmony_cistatic void f() 7570af302Sopenharmony_ci{ 8570af302Sopenharmony_ciC(EXIT_FAILURE) 9570af302Sopenharmony_ciC(EXIT_SUCCESS) 10570af302Sopenharmony_ciC(RAND_MAX) 11570af302Sopenharmony_ciI(size_t,MB_CUR_MAX) 12570af302Sopenharmony_ci{void *x=NULL;} 13570af302Sopenharmony_ciT(div_t) 14570af302Sopenharmony_ciT(ldiv_t) 15570af302Sopenharmony_ciT(lldiv_t) 16570af302Sopenharmony_ciT(size_t) 17570af302Sopenharmony_ciT(wchar_t) 18570af302Sopenharmony_ci#ifdef _POSIX_C_SOURCE 19570af302Sopenharmony_ciC(WEXITSTATUS(0)) 20570af302Sopenharmony_ciC(WIFEXITED(0)) 21570af302Sopenharmony_ciC(WIFSIGNALED(0)) 22570af302Sopenharmony_ciC(WIFSTOPPED(0)) 23570af302Sopenharmony_ciC(WNOHANG) 24570af302Sopenharmony_ciC(WSTOPSIG(0)) 25570af302Sopenharmony_ciC(WTERMSIG(0)) 26570af302Sopenharmony_ciC(WUNTRACED) 27570af302Sopenharmony_ci#endif 28570af302Sopenharmony_ci{void(*p)(int) = _Exit;} 29570af302Sopenharmony_ci{void(*p)(void) = abort;} 30570af302Sopenharmony_ci{int(*p)(int) = abs;} 31570af302Sopenharmony_ci{int(*p)(void(*)(void)) = atexit;} 32570af302Sopenharmony_ci{double(*p)(const char*) = atof;} 33570af302Sopenharmony_ci{int(*p)(const char*) = atoi;} 34570af302Sopenharmony_ci{long(*p)(const char*) = atol;} 35570af302Sopenharmony_ci{long long(*p)(const char*) = atoll;} 36570af302Sopenharmony_ci{void*(*p)(const void*,const void*,size_t,size_t,int(*)(const void*,const void*)) = bsearch;} 37570af302Sopenharmony_ci{void*(*p)(size_t,size_t) = calloc;} 38570af302Sopenharmony_ci{div_t(*p)(int,int) = div;} 39570af302Sopenharmony_ci{void(*p)(int) = exit;} 40570af302Sopenharmony_ci{void(*p)(void*) = free;} 41570af302Sopenharmony_ci{char*(*p)(const char*) = getenv;} 42570af302Sopenharmony_ci{int(*p)(char**,char*const*,char**) = getsubopt;} 43570af302Sopenharmony_ci{long(*p)(long) = labs;} 44570af302Sopenharmony_ci{ldiv_t(*p)(long,long) = ldiv;} 45570af302Sopenharmony_ci{long long(*p)(long long) = llabs;} 46570af302Sopenharmony_ci{lldiv_t(*p)(long long,long long) = lldiv;} 47570af302Sopenharmony_ci{void*(*p)(size_t) = malloc;} 48570af302Sopenharmony_ci{int(*p)(const char*,size_t) = mblen;} 49570af302Sopenharmony_ci{size_t(*p)(wchar_t*restrict,const char*restrict,size_t) = mbstowcs;} 50570af302Sopenharmony_ci{int(*p)(wchar_t*restrict,const char*restrict,size_t) = mbtowc;} 51570af302Sopenharmony_ci{int(*p)(void**,size_t,size_t) = posix_memalign;} 52570af302Sopenharmony_ci{void(*p)(void*,size_t,size_t,int(*)(const void*,const void*)) = qsort;} 53570af302Sopenharmony_ci{int(*p)(void) = rand;} 54570af302Sopenharmony_ci{void*(*p)(void*,size_t) = realloc;} 55570af302Sopenharmony_ci{void(*p)(unsigned) = srand;} 56570af302Sopenharmony_ci{double(*p)(const char*restrict,char**restrict) = strtod;} 57570af302Sopenharmony_ci{float(*p)(const char*restrict,char**restrict) = strtof;} 58570af302Sopenharmony_ci{long(*p)(const char*restrict,char**restrict,int) = strtol;} 59570af302Sopenharmony_ci{long double(*p)(const char*restrict,char**restrict) = strtold;} 60570af302Sopenharmony_ci{long long(*p)(const char*restrict,char**restrict,int) = strtoll;} 61570af302Sopenharmony_ci{unsigned long(*p)(const char*restrict,char**restrict,int) = strtoul;} 62570af302Sopenharmony_ci{unsigned long long(*p)(const char*restrict,char**restrict,int) = strtoull;} 63570af302Sopenharmony_ci{int(*p)(const char*) = system;} 64570af302Sopenharmony_ci{size_t(*p)(char*restrict,const wchar_t*restrict,size_t) = wcstombs;} 65570af302Sopenharmony_ci{int(*p)(char*,wchar_t) = wctomb;} 66570af302Sopenharmony_ci#ifdef _POSIX_C_SOURCE 67570af302Sopenharmony_ci{char*(*p)(char*) = mkdtemp;} 68570af302Sopenharmony_ci{int(*p)(char*) = mkstemp;} 69570af302Sopenharmony_ci{int(*p)(const char*,const char*,int) = setenv;} 70570af302Sopenharmony_ci{int(*p)(const char*) = unsetenv;} 71570af302Sopenharmony_ci#endif 72570af302Sopenharmony_ci#ifdef _XOPEN_SOURCE 73570af302Sopenharmony_ci{long(*p)(const char*) = a64l;} 74570af302Sopenharmony_ci{double(*p)(void) = drand48;} 75570af302Sopenharmony_ci{double(*p)(unsigned short[]) = erand48;} 76570af302Sopenharmony_ci{int(*p)(int) = grantpt;} 77570af302Sopenharmony_ci{char*(*p)(unsigned,char*,size_t) = initstate;} 78570af302Sopenharmony_ci{long(*p)(unsigned short[]) = jrand48;} 79570af302Sopenharmony_ci{char*(*p)(long) = l64a;} 80570af302Sopenharmony_ci{void(*p)(unsigned short[]) = lcong48;} 81570af302Sopenharmony_ci{long(*p)(void) = lrand48;} 82570af302Sopenharmony_ci{long(*p)(void) = mrand48;} 83570af302Sopenharmony_ci{long(*p)(unsigned short[]) = nrand48;} 84570af302Sopenharmony_ci{char*(*p)(int) = ptsname;} 85570af302Sopenharmony_ci{int(*p)(char*) = putenv;} 86570af302Sopenharmony_ci{long(*p)(void) = random;} 87570af302Sopenharmony_ci{char*(*p)(const char*restrict,char*restrict) = realpath;} 88570af302Sopenharmony_ci{unsigned short*(*p)(unsigned short[]) = seed48;} 89570af302Sopenharmony_ci{void(*p)(const char*) = setkey;} 90570af302Sopenharmony_ci{char*(*p)(char*) = setstate;} 91570af302Sopenharmony_ci{void(*p)(long) = srand48;} 92570af302Sopenharmony_ci{void(*p)(unsigned) = srandom;} 93570af302Sopenharmony_ci{int(*p)(int) = unlockpt;} 94570af302Sopenharmony_ci#endif 95570af302Sopenharmony_ci} 96570af302Sopenharmony_ci 97570af302Sopenharmony_ci#ifdef _XOPEN_SOURCE 98570af302Sopenharmony_ci#include <fcntl.h> 99570af302Sopenharmony_cistatic void g() 100570af302Sopenharmony_ci{ 101570af302Sopenharmony_ci{int(*p)(int) = posix_openpt;} 102570af302Sopenharmony_ci} 103570af302Sopenharmony_ci#endif 104570af302Sopenharmony_ci 105