diff options
Diffstat (limited to 'src')
1310 files changed, 10480 insertions, 0 deletions
diff --git a/src/aio/aio.c b/src/aio/aio.c index d7e063bf..120243ba 100644 --- a/src/aio/aio.c +++ b/src/aio/aio.c @@ -430,3 +430,11 @@ void __aio_atfork(int who) * We are not a lock holder anyway; the thread in the parent was. */ pthread_rwlock_init(&maplock, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/aio/aio_suspend.c b/src/aio/aio_suspend.c index 1f0c9aaa..de07f39a 100644 --- a/src/aio/aio_suspend.c +++ b/src/aio/aio_suspend.c @@ -73,3 +73,11 @@ int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec } } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/aio/lio_listio.c b/src/aio/lio_listio.c index a672812f..1db191d8 100644 --- a/src/aio/lio_listio.c +++ b/src/aio/lio_listio.c @@ -139,3 +139,11 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/__cexp.c b/src/complex/__cexp.c index 003d20af..2c97581a 100644 --- a/src/complex/__cexp.c +++ b/src/complex/__cexp.c @@ -85,3 +85,11 @@ double complex __ldexp_cexp(double complex z, int expt) return CMPLX(cos(y) * exp_x * scale1 * scale2, sin(y) * exp_x * scale1 * scale2); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/__cexpf.c b/src/complex/__cexpf.c index ee5ff2bc..1b801dfe 100644 --- a/src/complex/__cexpf.c +++ b/src/complex/__cexpf.c @@ -66,3 +66,11 @@ float complex __ldexp_cexpf(float complex z, int expt) return CMPLXF(cosf(y) * exp_x * scale1 * scale2, sinf(y) * exp_x * scale1 * scale2); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cabs.c b/src/complex/cabs.c index c5ad58ab..29a8b616 100644 --- a/src/complex/cabs.c +++ b/src/complex/cabs.c @@ -4,3 +4,11 @@ double cabs(double complex z) { return hypot(creal(z), cimag(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cabsf.c b/src/complex/cabsf.c index 619f28d3..7e6a895c 100644 --- a/src/complex/cabsf.c +++ b/src/complex/cabsf.c @@ -4,3 +4,11 @@ float cabsf(float complex z) { return hypotf(crealf(z), cimagf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cabsl.c b/src/complex/cabsl.c index d37e3f2e..cc1c2ac1 100644 --- a/src/complex/cabsl.c +++ b/src/complex/cabsl.c @@ -11,3 +11,11 @@ long double cabsl(long double complex z) return hypotl(creall(z), cimagl(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cacos.c b/src/complex/cacos.c index c39d257b..3d97fb80 100644 --- a/src/complex/cacos.c +++ b/src/complex/cacos.c @@ -9,3 +9,11 @@ double complex cacos(double complex z) z = casin(z); return CMPLX(M_PI_2 - creal(z), -cimag(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cacosf.c b/src/complex/cacosf.c index ed8acf0f..401372c1 100644 --- a/src/complex/cacosf.c +++ b/src/complex/cacosf.c @@ -9,3 +9,11 @@ float complex cacosf(float complex z) z = casinf(z); return CMPLXF(float_pi_2 - crealf(z), -cimagf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cacosh.c b/src/complex/cacosh.c index 76127f75..0fd5e7f2 100644 --- a/src/complex/cacosh.c +++ b/src/complex/cacosh.c @@ -10,3 +10,11 @@ double complex cacosh(double complex z) if (zineg) return CMPLX(cimag(z), -creal(z)); else return CMPLX(-cimag(z), creal(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cacoshf.c b/src/complex/cacoshf.c index 8bd80581..8889c1bd 100644 --- a/src/complex/cacoshf.c +++ b/src/complex/cacoshf.c @@ -8,3 +8,11 @@ float complex cacoshf(float complex z) if (zineg) return CMPLXF(cimagf(z), -crealf(z)); else return CMPLXF(-cimagf(z), crealf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cacoshl.c b/src/complex/cacoshl.c index 3a284be9..1a615123 100644 --- a/src/complex/cacoshl.c +++ b/src/complex/cacoshl.c @@ -15,3 +15,11 @@ long double complex cacoshl(long double complex z) else return CMPLXL(-cimagl(z), creall(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cacosl.c b/src/complex/cacosl.c index cc20dcd7..18f136ec 100644 --- a/src/complex/cacosl.c +++ b/src/complex/cacosl.c @@ -14,3 +14,11 @@ long double complex cacosl(long double complex z) return CMPLXL(PI_2 - creall(z), -cimagl(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/carg.c b/src/complex/carg.c index dfe9b97a..c0675224 100644 --- a/src/complex/carg.c +++ b/src/complex/carg.c @@ -4,3 +4,11 @@ double carg(double complex z) { return atan2(cimag(z), creal(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cargf.c b/src/complex/cargf.c index 9a6c19b6..da4ab652 100644 --- a/src/complex/cargf.c +++ b/src/complex/cargf.c @@ -4,3 +4,11 @@ float cargf(float complex z) { return atan2f(cimagf(z), crealf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cargl.c b/src/complex/cargl.c index 88f95f96..153bdd28 100644 --- a/src/complex/cargl.c +++ b/src/complex/cargl.c @@ -11,3 +11,11 @@ long double cargl(long double complex z) return atan2l(cimagl(z), creall(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/casin.c b/src/complex/casin.c index 3244bebb..3c936eea 100644 --- a/src/complex/casin.c +++ b/src/complex/casin.c @@ -15,3 +15,11 @@ double complex casin(double complex z) double complex r = clog(CMPLX(-y, x) + csqrt(w)); return CMPLX(cimag(r), -creal(r)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/casinf.c b/src/complex/casinf.c index 2cda2f08..5c28ac2f 100644 --- a/src/complex/casinf.c +++ b/src/complex/casinf.c @@ -13,3 +13,11 @@ float complex casinf(float complex z) float complex r = clogf(CMPLXF(-y, x) + csqrtf(w)); return CMPLXF(cimagf(r), -crealf(r)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/casinh.c b/src/complex/casinh.c index 50bf27ce..48bb8e1d 100644 --- a/src/complex/casinh.c +++ b/src/complex/casinh.c @@ -7,3 +7,11 @@ double complex casinh(double complex z) z = casin(CMPLX(-cimag(z), creal(z))); return CMPLX(cimag(z), -creal(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/casinhf.c b/src/complex/casinhf.c index 93d82e5f..857b881a 100644 --- a/src/complex/casinhf.c +++ b/src/complex/casinhf.c @@ -5,3 +5,11 @@ float complex casinhf(float complex z) z = casinf(CMPLXF(-cimagf(z), crealf(z))); return CMPLXF(cimagf(z), -crealf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/casinhl.c b/src/complex/casinhl.c index 68ba3ddf..176f916d 100644 --- a/src/complex/casinhl.c +++ b/src/complex/casinhl.c @@ -12,3 +12,11 @@ long double complex casinhl(long double complex z) return CMPLXL(cimagl(z), -creall(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/casinl.c b/src/complex/casinl.c index 072adc45..1412b2ac 100644 --- a/src/complex/casinl.c +++ b/src/complex/casinl.c @@ -19,3 +19,11 @@ long double complex casinl(long double complex z) return CMPLXL(cimagl(r), -creall(r)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/catan.c b/src/complex/catan.c index ccc2fb53..d09a3bc2 100644 --- a/src/complex/catan.c +++ b/src/complex/catan.c @@ -105,3 +105,11 @@ double complex catan(double complex z) w = CMPLX(w, 0.25 * log(a)); return w; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/catanf.c b/src/complex/catanf.c index 1d569f2d..5a397153 100644 --- a/src/complex/catanf.c +++ b/src/complex/catanf.c @@ -103,3 +103,11 @@ float complex catanf(float complex z) w = CMPLXF(w, 0.25f * logf(a)); return w; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/catanh.c b/src/complex/catanh.c index c324c7f2..e790ce9e 100644 --- a/src/complex/catanh.c +++ b/src/complex/catanh.c @@ -7,3 +7,11 @@ double complex catanh(double complex z) z = catan(CMPLX(-cimag(z), creal(z))); return CMPLX(cimag(z), -creal(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/catanhf.c b/src/complex/catanhf.c index b0505f60..3a5cdc82 100644 --- a/src/complex/catanhf.c +++ b/src/complex/catanhf.c @@ -5,3 +5,11 @@ float complex catanhf(float complex z) z = catanf(CMPLXF(-cimagf(z), crealf(z))); return CMPLXF(cimagf(z), -crealf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/catanhl.c b/src/complex/catanhl.c index 6025c414..8660a606 100644 --- a/src/complex/catanhl.c +++ b/src/complex/catanhl.c @@ -12,3 +12,11 @@ long double complex catanhl(long double complex z) return CMPLXL(cimagl(z), -creall(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/catanl.c b/src/complex/catanl.c index e62526c0..95bb4bd6 100644 --- a/src/complex/catanl.c +++ b/src/complex/catanl.c @@ -112,3 +112,11 @@ long double complex catanl(long double complex z) return w; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ccos.c b/src/complex/ccos.c index f32e1fad..3a083ed1 100644 --- a/src/complex/ccos.c +++ b/src/complex/ccos.c @@ -6,3 +6,11 @@ double complex ccos(double complex z) { return ccosh(CMPLX(-cimag(z), creal(z))); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ccosf.c b/src/complex/ccosf.c index 490be9b3..70a52131 100644 --- a/src/complex/ccosf.c +++ b/src/complex/ccosf.c @@ -4,3 +4,11 @@ float complex ccosf(float complex z) { return ccoshf(CMPLXF(-cimagf(z), crealf(z))); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ccosh.c b/src/complex/ccosh.c index c995da7b..4ede6be9 100644 --- a/src/complex/ccosh.c +++ b/src/complex/ccosh.c @@ -138,3 +138,11 @@ double complex ccosh(double complex z) */ return CMPLX((x * x) * (y - y), (x + x) * (y - y)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ccoshf.c b/src/complex/ccoshf.c index 189ce946..63ec62b7 100644 --- a/src/complex/ccoshf.c +++ b/src/complex/ccoshf.c @@ -88,3 +88,11 @@ float complex ccoshf(float complex z) return CMPLXF((x * x) * (y - y), (x + x) * (y - y)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ccoshl.c b/src/complex/ccoshl.c index ffb4d8a1..c0a588a8 100644 --- a/src/complex/ccoshl.c +++ b/src/complex/ccoshl.c @@ -5,3 +5,11 @@ long double complex ccoshl(long double complex z) { return ccosh(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ccosl.c b/src/complex/ccosl.c index 2530006b..9b1376af 100644 --- a/src/complex/ccosl.c +++ b/src/complex/ccosl.c @@ -11,3 +11,11 @@ long double complex ccosl(long double complex z) return ccoshl(CMPLXL(-cimagl(z), creall(z))); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cexp.c b/src/complex/cexp.c index 7fb489bb..2f26454c 100644 --- a/src/complex/cexp.c +++ b/src/complex/cexp.c @@ -81,3 +81,11 @@ double complex cexp(double complex z) return CMPLX(exp_x * cos(y), exp_x * sin(y)); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cexpf.c b/src/complex/cexpf.c index 00d258f3..05801b46 100644 --- a/src/complex/cexpf.c +++ b/src/complex/cexpf.c @@ -81,3 +81,11 @@ float complex cexpf(float complex z) return CMPLXF(exp_x * cosf(y), exp_x * sinf(y)); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cexpl.c b/src/complex/cexpl.c index d4df950e..68c18169 100644 --- a/src/complex/cexpl.c +++ b/src/complex/cexpl.c @@ -5,3 +5,11 @@ long double complex cexpl(long double complex z) { return cexp(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cimag.c b/src/complex/cimag.c index d6b0e683..ae6b63f0 100644 --- a/src/complex/cimag.c +++ b/src/complex/cimag.c @@ -4,3 +4,11 @@ double (cimag)(double complex z) { return cimag(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cimagf.c b/src/complex/cimagf.c index b7166dcf..cf7ac566 100644 --- a/src/complex/cimagf.c +++ b/src/complex/cimagf.c @@ -4,3 +4,11 @@ float (cimagf)(float complex z) { return cimagf(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cimagl.c b/src/complex/cimagl.c index 4db77f20..12526442 100644 --- a/src/complex/cimagl.c +++ b/src/complex/cimagl.c @@ -4,3 +4,11 @@ long double (cimagl)(long double complex z) { return cimagl(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/clog.c b/src/complex/clog.c index b587c291..baa1dff1 100644 --- a/src/complex/clog.c +++ b/src/complex/clog.c @@ -12,3 +12,11 @@ double complex clog(double complex z) phi = carg(z); return CMPLX(log(r), phi); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/clogf.c b/src/complex/clogf.c index 0389d472..7f6db1c6 100644 --- a/src/complex/clogf.c +++ b/src/complex/clogf.c @@ -10,3 +10,11 @@ float complex clogf(float complex z) phi = cargf(z); return CMPLXF(logf(r), phi); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/clogl.c b/src/complex/clogl.c index 88e83e87..1258ffc5 100644 --- a/src/complex/clogl.c +++ b/src/complex/clogl.c @@ -16,3 +16,11 @@ long double complex clogl(long double complex z) return CMPLXL(logl(r), phi); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/conj.c b/src/complex/conj.c index a3b19a4a..14eda7a0 100644 --- a/src/complex/conj.c +++ b/src/complex/conj.c @@ -4,3 +4,11 @@ double complex conj(double complex z) { return CMPLX(creal(z), -cimag(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/conjf.c b/src/complex/conjf.c index b2195c84..aa8ccb1c 100644 --- a/src/complex/conjf.c +++ b/src/complex/conjf.c @@ -4,3 +4,11 @@ float complex conjf(float complex z) { return CMPLXF(crealf(z), -cimagf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/conjl.c b/src/complex/conjl.c index 87a4ebec..6433ee41 100644 --- a/src/complex/conjl.c +++ b/src/complex/conjl.c @@ -4,3 +4,11 @@ long double complex conjl(long double complex z) { return CMPLXL(creall(z), -cimagl(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cpow.c b/src/complex/cpow.c index 1137d391..ff613b82 100644 --- a/src/complex/cpow.c +++ b/src/complex/cpow.c @@ -6,3 +6,11 @@ double complex cpow(double complex z, double complex c) { return cexp(c * clog(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cpowf.c b/src/complex/cpowf.c index f3fd4b7b..9ffe222e 100644 --- a/src/complex/cpowf.c +++ b/src/complex/cpowf.c @@ -4,3 +4,11 @@ float complex cpowf(float complex z, float complex c) { return cexpf(c * clogf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cpowl.c b/src/complex/cpowl.c index be36f046..40aa34ee 100644 --- a/src/complex/cpowl.c +++ b/src/complex/cpowl.c @@ -11,3 +11,11 @@ long double complex cpowl(long double complex z, long double complex c) return cexpl(c * clogl(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cproj.c b/src/complex/cproj.c index d2b8f5a9..6710dba3 100644 --- a/src/complex/cproj.c +++ b/src/complex/cproj.c @@ -6,3 +6,11 @@ double complex cproj(double complex z) return CMPLX(INFINITY, copysign(0.0, cimag(z))); return z; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cprojf.c b/src/complex/cprojf.c index 15a874bb..9deb4e11 100644 --- a/src/complex/cprojf.c +++ b/src/complex/cprojf.c @@ -6,3 +6,11 @@ float complex cprojf(float complex z) return CMPLXF(INFINITY, copysignf(0.0, cimagf(z))); return z; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/cprojl.c b/src/complex/cprojl.c index 531ffa1c..bd170d28 100644 --- a/src/complex/cprojl.c +++ b/src/complex/cprojl.c @@ -13,3 +13,11 @@ long double complex cprojl(long double complex z) return z; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/creal.c b/src/complex/creal.c index f6703040..dc7dbe4b 100644 --- a/src/complex/creal.c +++ b/src/complex/creal.c @@ -4,3 +4,11 @@ double (creal)(double complex z) { return creal(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/crealf.c b/src/complex/crealf.c index 5dc3ff1d..51cf938e 100644 --- a/src/complex/crealf.c +++ b/src/complex/crealf.c @@ -4,3 +4,11 @@ float (crealf)(float complex z) { return crealf(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/creall.c b/src/complex/creall.c index fd9dc347..498313c7 100644 --- a/src/complex/creall.c +++ b/src/complex/creall.c @@ -4,3 +4,11 @@ long double (creall)(long double complex z) { return creall(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csin.c b/src/complex/csin.c index 535c4bf8..a3427841 100644 --- a/src/complex/csin.c +++ b/src/complex/csin.c @@ -7,3 +7,11 @@ double complex csin(double complex z) z = csinh(CMPLX(-cimag(z), creal(z))); return CMPLX(cimag(z), -creal(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csinf.c b/src/complex/csinf.c index 69f5164e..89b63b22 100644 --- a/src/complex/csinf.c +++ b/src/complex/csinf.c @@ -5,3 +5,11 @@ float complex csinf(float complex z) z = csinhf(CMPLXF(-cimagf(z), crealf(z))); return CMPLXF(cimagf(z), -crealf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csinh.c b/src/complex/csinh.c index eda0ab59..246e0245 100644 --- a/src/complex/csinh.c +++ b/src/complex/csinh.c @@ -139,3 +139,11 @@ double complex csinh(double complex z) */ return CMPLX((x * x) * (y - y), (x + x) * (y - y)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csinhf.c b/src/complex/csinhf.c index eb1d98c5..1aefb69c 100644 --- a/src/complex/csinhf.c +++ b/src/complex/csinhf.c @@ -88,3 +88,11 @@ float complex csinhf(float complex z) return CMPLXF((x * x) * (y - y), (x + x) * (y - y)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csinhl.c b/src/complex/csinhl.c index 09fd18f9..1983c3ba 100644 --- a/src/complex/csinhl.c +++ b/src/complex/csinhl.c @@ -5,3 +5,11 @@ long double complex csinhl(long double complex z) { return csinh(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csinl.c b/src/complex/csinl.c index 90a4eb37..34d729b9 100644 --- a/src/complex/csinl.c +++ b/src/complex/csinl.c @@ -12,3 +12,11 @@ long double complex csinl(long double complex z) return CMPLXL(cimagl(z), -creall(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csqrt.c b/src/complex/csqrt.c index c36de001..4aa6c533 100644 --- a/src/complex/csqrt.c +++ b/src/complex/csqrt.c @@ -98,3 +98,11 @@ double complex csqrt(double complex z) result *= 2; return result; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csqrtf.c b/src/complex/csqrtf.c index a6163974..cde2210a 100644 --- a/src/complex/csqrtf.c +++ b/src/complex/csqrtf.c @@ -80,3 +80,11 @@ float complex csqrtf(float complex z) return CMPLXF(fabsf(b) / (2.0 * t), copysignf(t, b)); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/csqrtl.c b/src/complex/csqrtl.c index 22539379..0c47d7f9 100644 --- a/src/complex/csqrtl.c +++ b/src/complex/csqrtl.c @@ -5,3 +5,11 @@ long double complex csqrtl(long double complex z) { return csqrt(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ctan.c b/src/complex/ctan.c index 918717bf..e18cb5ed 100644 --- a/src/complex/ctan.c +++ b/src/complex/ctan.c @@ -7,3 +7,11 @@ double complex ctan(double complex z) z = ctanh(CMPLX(-cimag(z), creal(z))); return CMPLX(cimag(z), -creal(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ctanf.c b/src/complex/ctanf.c index 04c3ff19..9aed39cc 100644 --- a/src/complex/ctanf.c +++ b/src/complex/ctanf.c @@ -5,3 +5,11 @@ float complex ctanf(float complex z) z = ctanhf(CMPLXF(-cimagf(z), crealf(z))); return CMPLXF(cimagf(z), -crealf(z)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ctanh.c b/src/complex/ctanh.c index 54004cd7..8b2843f0 100644 --- a/src/complex/ctanh.c +++ b/src/complex/ctanh.c @@ -127,3 +127,11 @@ double complex ctanh(double complex z) denom = 1 + beta * s * s; return CMPLX((beta * rho * s) / denom, t / denom); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ctanhf.c b/src/complex/ctanhf.c index 7f422ba7..56e33e5b 100644 --- a/src/complex/ctanhf.c +++ b/src/complex/ctanhf.c @@ -64,3 +64,11 @@ float complex ctanhf(float complex z) denom = 1 + beta * s * s; return CMPLXF((beta * rho * s) / denom, t / denom); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ctanhl.c b/src/complex/ctanhl.c index 45d5862c..c7d788f1 100644 --- a/src/complex/ctanhl.c +++ b/src/complex/ctanhl.c @@ -5,3 +5,11 @@ long double complex ctanhl(long double complex z) { return ctanh(z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/complex/ctanl.c b/src/complex/ctanl.c index 4b87420d..f6d2dac0 100644 --- a/src/complex/ctanl.c +++ b/src/complex/ctanl.c @@ -12,3 +12,11 @@ long double complex ctanl(long double complex z) return CMPLXL(cimagl(z), -creall(z)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/confstr.c b/src/conf/confstr.c index 3d417284..36f499e2 100644 --- a/src/conf/confstr.c +++ b/src/conf/confstr.c @@ -15,3 +15,11 @@ size_t confstr(int name, char *buf, size_t len) // this completely useless function and its truncation semantics return snprintf(buf, len, "%s", s) + 1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/fpathconf.c b/src/conf/fpathconf.c index e6aca5cf..fbaa32fc 100644 --- a/src/conf/fpathconf.c +++ b/src/conf/fpathconf.c @@ -33,3 +33,11 @@ long fpathconf(int fd, int name) } return values[name]; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/legacy.c b/src/conf/legacy.c index f1d9e325..5dc63561 100644 --- a/src/conf/legacy.c +++ b/src/conf/legacy.c @@ -20,3 +20,11 @@ long get_avphys_pages() { return sysconf(_SC_AVPHYS_PAGES); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/pathconf.c b/src/conf/pathconf.c index 01e19c59..267982e0 100644 --- a/src/conf/pathconf.c +++ b/src/conf/pathconf.c @@ -4,3 +4,11 @@ long pathconf(const char *path, int name) { return fpathconf(-1, name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c index 60d3e745..18815066 100644 --- a/src/conf/sysconf.c +++ b/src/conf/sysconf.c @@ -230,3 +230,11 @@ long sysconf(int name) } return values[name]; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/crypt.c b/src/crypt/crypt.c index e6237e39..fd67174e 100644 --- a/src/crypt/crypt.c +++ b/src/crypt/crypt.c @@ -12,3 +12,11 @@ char *crypt(const char *key, const char *salt) static char buf[128]; return __crypt_r(key, salt, (struct crypt_data *)buf); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/crypt_blowfish.c b/src/crypt/crypt_blowfish.c index d722607b..3d2d4fbf 100644 --- a/src/crypt/crypt_blowfish.c +++ b/src/crypt/crypt_blowfish.c @@ -804,3 +804,11 @@ char *__crypt_blowfish(const char *key, const char *setting, char *output) return "*"; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/crypt_des.c b/src/crypt/crypt_des.c index 338a8f37..0b887e8a 100644 --- a/src/crypt/crypt_des.c +++ b/src/crypt/crypt_des.c @@ -1014,3 +1014,11 @@ char *__crypt_des(const char *key, const char *setting, char *output) return (setting[0]=='*') ? "x" : "*"; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/crypt_md5.c b/src/crypt/crypt_md5.c index 6e75b36c..c040d8b8 100644 --- a/src/crypt/crypt_md5.c +++ b/src/crypt/crypt_md5.c @@ -283,3 +283,11 @@ char *__crypt_md5(const char *key, const char *setting, char *output) return "*"; return p; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/crypt_r.c b/src/crypt/crypt_r.c index db6015e2..874f72db 100644 --- a/src/crypt/crypt_r.c +++ b/src/crypt/crypt_r.c @@ -21,3 +21,11 @@ char *__crypt_r(const char *key, const char *salt, struct crypt_data *data) } weak_alias(__crypt_r, crypt_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/crypt_sha256.c b/src/crypt/crypt_sha256.c index e885dc68..2aa1e9d6 100644 --- a/src/crypt/crypt_sha256.c +++ b/src/crypt/crypt_sha256.c @@ -320,3 +320,11 @@ char *__crypt_sha256(const char *key, const char *setting, char *output) return "*"; return p; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/crypt_sha512.c b/src/crypt/crypt_sha512.c index 39970caf..e7375f22 100644 --- a/src/crypt/crypt_sha512.c +++ b/src/crypt/crypt_sha512.c @@ -369,3 +369,11 @@ char *__crypt_sha512(const char *key, const char *setting, char *output) return "*"; return p; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/crypt/encrypt.c b/src/crypt/encrypt.c index 216abc91..02600b9d 100644 --- a/src/crypt/encrypt.c +++ b/src/crypt/encrypt.c @@ -50,3 +50,11 @@ void encrypt(char *block, int edflag) for (j = 31; j >= 0; j--) *p++ = b[i]>>j & 1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/__ctype_b_loc.c b/src/ctype/__ctype_b_loc.c index f43795e9..56fe0439 100644 --- a/src/ctype/__ctype_b_loc.c +++ b/src/ctype/__ctype_b_loc.c @@ -39,3 +39,11 @@ const unsigned short **__ctype_b_loc(void) { return (void *)&ptable; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/__ctype_get_mb_cur_max.c b/src/ctype/__ctype_get_mb_cur_max.c index 8e946fc1..8f4696e1 100644 --- a/src/ctype/__ctype_get_mb_cur_max.c +++ b/src/ctype/__ctype_get_mb_cur_max.c @@ -5,3 +5,11 @@ size_t __ctype_get_mb_cur_max() { return MB_CUR_MAX; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/__ctype_tolower_loc.c b/src/ctype/__ctype_tolower_loc.c index efb99105..1b0ed280 100644 --- a/src/ctype/__ctype_tolower_loc.c +++ b/src/ctype/__ctype_tolower_loc.c @@ -28,3 +28,11 @@ const int32_t **__ctype_tolower_loc(void) { return (void *)&ptable; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/__ctype_toupper_loc.c b/src/ctype/__ctype_toupper_loc.c index ffaef0e9..89dff1fc 100644 --- a/src/ctype/__ctype_toupper_loc.c +++ b/src/ctype/__ctype_toupper_loc.c @@ -28,3 +28,11 @@ const int32_t **__ctype_toupper_loc(void) { return (void *)&ptable; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isalnum.c b/src/ctype/isalnum.c index 8018a2bc..b1fc8f8c 100644 --- a/src/ctype/isalnum.c +++ b/src/ctype/isalnum.c @@ -11,3 +11,11 @@ int __isalnum_l(int c, locale_t l) } weak_alias(__isalnum_l, isalnum_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isalpha.c b/src/ctype/isalpha.c index a87a9375..842ee20a 100644 --- a/src/ctype/isalpha.c +++ b/src/ctype/isalpha.c @@ -12,3 +12,11 @@ int __isalpha_l(int c, locale_t l) } weak_alias(__isalpha_l, isalpha_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isascii.c b/src/ctype/isascii.c index 54ad3bf0..266aa0e3 100644 --- a/src/ctype/isascii.c +++ b/src/ctype/isascii.c @@ -5,3 +5,11 @@ int isascii(int c) { return !(c&~0x7f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isblank.c b/src/ctype/isblank.c index 716da23a..560be82c 100644 --- a/src/ctype/isblank.c +++ b/src/ctype/isblank.c @@ -11,3 +11,11 @@ int __isblank_l(int c, locale_t l) } weak_alias(__isblank_l, isblank_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iscntrl.c b/src/ctype/iscntrl.c index f27837ea..1fd7dce7 100644 --- a/src/ctype/iscntrl.c +++ b/src/ctype/iscntrl.c @@ -11,3 +11,11 @@ int __iscntrl_l(int c, locale_t l) } weak_alias(__iscntrl_l, iscntrl_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isdigit.c b/src/ctype/isdigit.c index 16beddb4..2983d726 100644 --- a/src/ctype/isdigit.c +++ b/src/ctype/isdigit.c @@ -12,3 +12,11 @@ int __isdigit_l(int c, locale_t l) } weak_alias(__isdigit_l, isdigit_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isgraph.c b/src/ctype/isgraph.c index 292d1983..55fb2d1e 100644 --- a/src/ctype/isgraph.c +++ b/src/ctype/isgraph.c @@ -12,3 +12,11 @@ int __isgraph_l(int c, locale_t l) } weak_alias(__isgraph_l, isgraph_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/islower.c b/src/ctype/islower.c index c3fa74c4..14f5fac9 100644 --- a/src/ctype/islower.c +++ b/src/ctype/islower.c @@ -12,3 +12,11 @@ int __islower_l(int c, locale_t l) } weak_alias(__islower_l, islower_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isprint.c b/src/ctype/isprint.c index b950816b..eedbaea8 100644 --- a/src/ctype/isprint.c +++ b/src/ctype/isprint.c @@ -12,3 +12,11 @@ int __isprint_l(int c, locale_t l) } weak_alias(__isprint_l, isprint_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/ispunct.c b/src/ctype/ispunct.c index a491d5dc..e512657f 100644 --- a/src/ctype/ispunct.c +++ b/src/ctype/ispunct.c @@ -11,3 +11,11 @@ int __ispunct_l(int c, locale_t l) } weak_alias(__ispunct_l, ispunct_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isspace.c b/src/ctype/isspace.c index 428813e7..60ad415d 100644 --- a/src/ctype/isspace.c +++ b/src/ctype/isspace.c @@ -12,3 +12,11 @@ int __isspace_l(int c, locale_t l) } weak_alias(__isspace_l, isspace_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isupper.c b/src/ctype/isupper.c index bfd15acd..1c839c8d 100644 --- a/src/ctype/isupper.c +++ b/src/ctype/isupper.c @@ -12,3 +12,11 @@ int __isupper_l(int c, locale_t l) } weak_alias(__isupper_l, isupper_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswalnum.c b/src/ctype/iswalnum.c index 046c399c..343adc8a 100644 --- a/src/ctype/iswalnum.c +++ b/src/ctype/iswalnum.c @@ -11,3 +11,11 @@ int __iswalnum_l(wint_t c, locale_t l) } weak_alias(__iswalnum_l, iswalnum_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswalpha.c b/src/ctype/iswalpha.c index 1c5485d2..88001fc8 100644 --- a/src/ctype/iswalpha.c +++ b/src/ctype/iswalpha.c @@ -19,3 +19,11 @@ int __iswalpha_l(wint_t c, locale_t l) } weak_alias(__iswalpha_l, iswalpha_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswblank.c b/src/ctype/iswblank.c index 68c88002..49319cbd 100644 --- a/src/ctype/iswblank.c +++ b/src/ctype/iswblank.c @@ -12,3 +12,11 @@ int __iswblank_l(wint_t c, locale_t l) } weak_alias(__iswblank_l, iswblank_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswcntrl.c b/src/ctype/iswcntrl.c index feccfcd5..dccaefc1 100644 --- a/src/ctype/iswcntrl.c +++ b/src/ctype/iswcntrl.c @@ -14,3 +14,11 @@ int __iswcntrl_l(wint_t c, locale_t l) } weak_alias(__iswcntrl_l, iswcntrl_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswctype.c b/src/ctype/iswctype.c index 71b09b8d..7d80c2a4 100644 --- a/src/ctype/iswctype.c +++ b/src/ctype/iswctype.c @@ -73,3 +73,11 @@ wctype_t __wctype_l(const char *s, locale_t l) weak_alias(__iswctype_l, iswctype_l); weak_alias(__wctype_l, wctype_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswdigit.c b/src/ctype/iswdigit.c index db817edf..2e54096f 100644 --- a/src/ctype/iswdigit.c +++ b/src/ctype/iswdigit.c @@ -13,3 +13,11 @@ int __iswdigit_l(wint_t c, locale_t l) } weak_alias(__iswdigit_l, iswdigit_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswgraph.c b/src/ctype/iswgraph.c index ecdf466c..d49b3436 100644 --- a/src/ctype/iswgraph.c +++ b/src/ctype/iswgraph.c @@ -12,3 +12,11 @@ int __iswgraph_l(wint_t c, locale_t l) } weak_alias(__iswgraph_l, iswgraph_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswlower.c b/src/ctype/iswlower.c index f02a4362..dfa40b62 100644 --- a/src/ctype/iswlower.c +++ b/src/ctype/iswlower.c @@ -11,3 +11,11 @@ int __iswlower_l(wint_t c, locale_t l) } weak_alias(__iswlower_l, iswlower_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswprint.c b/src/ctype/iswprint.c index 86f9d646..58e2118d 100644 --- a/src/ctype/iswprint.c +++ b/src/ctype/iswprint.c @@ -24,3 +24,11 @@ int __iswprint_l(wint_t c, locale_t l) } weak_alias(__iswprint_l, iswprint_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswpunct.c b/src/ctype/iswpunct.c index f0b9ea0a..e99e7490 100644 --- a/src/ctype/iswpunct.c +++ b/src/ctype/iswpunct.c @@ -17,3 +17,11 @@ int __iswpunct_l(wint_t c, locale_t l) } weak_alias(__iswpunct_l, iswpunct_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswspace.c b/src/ctype/iswspace.c index 263afa15..3dc1b06c 100644 --- a/src/ctype/iswspace.c +++ b/src/ctype/iswspace.c @@ -22,3 +22,11 @@ int __iswspace_l(wint_t c, locale_t l) } weak_alias(__iswspace_l, iswspace_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswupper.c b/src/ctype/iswupper.c index 7e486665..b5773eef 100644 --- a/src/ctype/iswupper.c +++ b/src/ctype/iswupper.c @@ -11,3 +11,11 @@ int __iswupper_l(wint_t c, locale_t l) } weak_alias(__iswupper_l, iswupper_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/iswxdigit.c b/src/ctype/iswxdigit.c index 62bc9e74..088788e2 100644 --- a/src/ctype/iswxdigit.c +++ b/src/ctype/iswxdigit.c @@ -11,3 +11,11 @@ int __iswxdigit_l(wint_t c, locale_t l) } weak_alias(__iswxdigit_l, iswxdigit_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/isxdigit.c b/src/ctype/isxdigit.c index aab1a745..d0b1741b 100644 --- a/src/ctype/isxdigit.c +++ b/src/ctype/isxdigit.c @@ -11,3 +11,11 @@ int __isxdigit_l(int c, locale_t l) } weak_alias(__isxdigit_l, isxdigit_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/toascii.c b/src/ctype/toascii.c index f0e48e8e..b322a909 100644 --- a/src/ctype/toascii.c +++ b/src/ctype/toascii.c @@ -5,3 +5,11 @@ int toascii(int c) { return c & 0x7f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/tolower.c b/src/ctype/tolower.c index f10132ec..c285ebc0 100644 --- a/src/ctype/tolower.c +++ b/src/ctype/tolower.c @@ -12,3 +12,11 @@ int __tolower_l(int c, locale_t l) } weak_alias(__tolower_l, tolower_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/toupper.c b/src/ctype/toupper.c index 4e74a55c..8f84f32c 100644 --- a/src/ctype/toupper.c +++ b/src/ctype/toupper.c @@ -12,3 +12,11 @@ int __toupper_l(int c, locale_t l) } weak_alias(__toupper_l, toupper_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/towctrans.c b/src/ctype/towctrans.c index 76d13769..55ff1ca5 100644 --- a/src/ctype/towctrans.c +++ b/src/ctype/towctrans.c @@ -82,3 +82,11 @@ wint_t __towlower_l(wint_t c, locale_t l) weak_alias(__towupper_l, towupper_l); weak_alias(__towlower_l, towlower_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/wcswidth.c b/src/ctype/wcswidth.c index 5c8a5a4d..2356e33d 100644 --- a/src/ctype/wcswidth.c +++ b/src/ctype/wcswidth.c @@ -6,3 +6,11 @@ int wcswidth(const wchar_t *wcs, size_t n) for (; n-- && *wcs && (k = wcwidth(*wcs)) >= 0; l+=k, wcs++); return (k < 0) ? k : l; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/wctrans.c b/src/ctype/wctrans.c index d3eda521..3637125f 100644 --- a/src/ctype/wctrans.c +++ b/src/ctype/wctrans.c @@ -27,3 +27,11 @@ wint_t __towctrans_l(wint_t c, wctrans_t t, locale_t l) weak_alias(__wctrans_l, wctrans_l); weak_alias(__towctrans_l, towctrans_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ctype/wcwidth.c b/src/ctype/wcwidth.c index 36256a53..41cd743f 100644 --- a/src/ctype/wcwidth.c +++ b/src/ctype/wcwidth.c @@ -27,3 +27,11 @@ int wcwidth(wchar_t wc) return 0; return 1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/alphasort.c b/src/dirent/alphasort.c index ab2624e2..c3193535 100644 --- a/src/dirent/alphasort.c +++ b/src/dirent/alphasort.c @@ -5,3 +5,11 @@ int alphasort(const struct dirent **a, const struct dirent **b) { return strcoll((*a)->d_name, (*b)->d_name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/closedir.c b/src/dirent/closedir.c index e794ae9c..361e0418 100644 --- a/src/dirent/closedir.c +++ b/src/dirent/closedir.c @@ -9,3 +9,11 @@ int closedir(DIR *dir) free(dir); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/dirfd.c b/src/dirent/dirfd.c index 6c860073..7f165974 100644 --- a/src/dirent/dirfd.c +++ b/src/dirent/dirfd.c @@ -5,3 +5,11 @@ int dirfd(DIR *d) { return d->fd; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/fdopendir.c b/src/dirent/fdopendir.c index d78fb87f..e937ea21 100644 --- a/src/dirent/fdopendir.c +++ b/src/dirent/fdopendir.c @@ -29,3 +29,11 @@ DIR *fdopendir(int fd) dir->fd = fd; return dir; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/opendir.c b/src/dirent/opendir.c index 5cb84e30..3773e6b5 100644 --- a/src/dirent/opendir.c +++ b/src/dirent/opendir.c @@ -19,3 +19,11 @@ DIR *opendir(const char *name) dir->fd = fd; return dir; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/readdir.c b/src/dirent/readdir.c index 5a03b363..9601b25d 100644 --- a/src/dirent/readdir.c +++ b/src/dirent/readdir.c @@ -25,3 +25,11 @@ struct dirent *readdir(DIR *dir) dir->tell = de->d_off; return de; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/readdir_r.c b/src/dirent/readdir_r.c index 0d5de5f5..e7d114ec 100644 --- a/src/dirent/readdir_r.c +++ b/src/dirent/readdir_r.c @@ -25,3 +25,11 @@ int readdir_r(DIR *restrict dir, struct dirent *restrict buf, struct dirent **re *result = buf; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/rewinddir.c b/src/dirent/rewinddir.c index 7ddda437..8f9ffe90 100644 --- a/src/dirent/rewinddir.c +++ b/src/dirent/rewinddir.c @@ -11,3 +11,11 @@ void rewinddir(DIR *dir) dir->tell = 0; UNLOCK(dir->lock); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/scandir.c b/src/dirent/scandir.c index 7456b9b8..a1fe18ff 100644 --- a/src/dirent/scandir.c +++ b/src/dirent/scandir.c @@ -43,3 +43,11 @@ int scandir(const char *path, struct dirent ***res, *res = names; return cnt; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/seekdir.c b/src/dirent/seekdir.c index bf6cc6ec..12f19575 100644 --- a/src/dirent/seekdir.c +++ b/src/dirent/seekdir.c @@ -10,3 +10,11 @@ void seekdir(DIR *dir, long off) dir->buf_pos = dir->buf_end = 0; UNLOCK(dir->lock); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/telldir.c b/src/dirent/telldir.c index cf25acff..a8b22f03 100644 --- a/src/dirent/telldir.c +++ b/src/dirent/telldir.c @@ -5,3 +5,11 @@ long telldir(DIR *dir) { return dir->tell; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/dirent/versionsort.c b/src/dirent/versionsort.c index 97696105..146f4142 100644 --- a/src/dirent/versionsort.c +++ b/src/dirent/versionsort.c @@ -6,3 +6,11 @@ int versionsort(const struct dirent **a, const struct dirent **b) { return strverscmp((*a)->d_name, (*b)->d_name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/__environ.c b/src/env/__environ.c index fe8abcf9..0f71d82d 100644 --- a/src/env/__environ.c +++ b/src/env/__environ.c @@ -4,3 +4,11 @@ char **__environ = 0; weak_alias(__environ, ___environ); weak_alias(__environ, _environ); weak_alias(__environ, environ); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c index a93141ed..6412eee8 100644 --- a/src/env/__init_tls.c +++ b/src/env/__init_tls.c @@ -151,3 +151,11 @@ static void static_init_tls(size_t *aux) } weak_alias(static_init_tls, __init_tls); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c index c5b277bd..a58bc4bb 100644 --- a/src/env/__libc_start_main.c +++ b/src/env/__libc_start_main.c @@ -95,3 +95,11 @@ static int libc_start_main_stage2(int (*main)(int,char **,char **), int argc, ch exit(main(argc, argv, envp)); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/__reset_tls.c b/src/env/__reset_tls.c index 15685bc6..af09c9a2 100644 --- a/src/env/__reset_tls.c +++ b/src/env/__reset_tls.c @@ -13,3 +13,11 @@ void __reset_tls() memset(mem+p->len, 0, p->size - p->len); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/__stack_chk_fail.c b/src/env/__stack_chk_fail.c index e5352602..82d401d3 100644 --- a/src/env/__stack_chk_fail.c +++ b/src/env/__stack_chk_fail.c @@ -29,3 +29,11 @@ void __stack_chk_fail(void) hidden void __stack_chk_fail_local(void); weak_alias(__stack_chk_fail, __stack_chk_fail_local); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/clearenv.c b/src/env/clearenv.c index db8e8e94..cc25b5bd 100644 --- a/src/env/clearenv.c +++ b/src/env/clearenv.c @@ -12,3 +12,11 @@ int clearenv() if (e) while (*e) __env_rm_add(*e++, 0); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/getenv.c b/src/env/getenv.c index a90d39cf..076a3c3f 100644 --- a/src/env/getenv.c +++ b/src/env/getenv.c @@ -11,3 +11,11 @@ char *getenv(const char *name) return *e + l+1; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/putenv.c b/src/env/putenv.c index dce8c828..a0b1ef8d 100644 --- a/src/env/putenv.c +++ b/src/env/putenv.c @@ -44,3 +44,11 @@ int putenv(char *s) if (!l || !s[l]) return unsetenv(s); return __putenv(s, l, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/secure_getenv.c b/src/env/secure_getenv.c index 72322f81..55e0c8c0 100644 --- a/src/env/secure_getenv.c +++ b/src/env/secure_getenv.c @@ -6,3 +6,11 @@ char *secure_getenv(const char *name) { return libc.secure ? NULL : getenv(name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/setenv.c b/src/env/setenv.c index c5226b6d..c712c05b 100644 --- a/src/env/setenv.c +++ b/src/env/setenv.c @@ -40,3 +40,11 @@ int setenv(const char *var, const char *value, int overwrite) memcpy(s+l1+1, value, l2+1); return __putenv(s, l1, s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/env/unsetenv.c b/src/env/unsetenv.c index b14c4c92..11f8ff25 100644 --- a/src/env/unsetenv.c +++ b/src/env/unsetenv.c @@ -26,3 +26,11 @@ int unsetenv(const char *name) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c index 7f9d6027..db343368 100644 --- a/src/errno/__errno_location.c +++ b/src/errno/__errno_location.c @@ -7,3 +7,11 @@ int *__errno_location(void) } weak_alias(__errno_location, ___errno_location); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/errno/strerror.c b/src/errno/strerror.c index 7f926432..5d8cd916 100644 --- a/src/errno/strerror.c +++ b/src/errno/strerror.c @@ -45,3 +45,11 @@ char *strerror(int e) } weak_alias(__strerror_l, strerror_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/_Exit.c b/src/exit/_Exit.c index 7a6115c7..8d3b5b09 100644 --- a/src/exit/_Exit.c +++ b/src/exit/_Exit.c @@ -6,3 +6,11 @@ _Noreturn void _Exit(int ec) __syscall(SYS_exit_group, ec); for (;;) __syscall(SYS_exit, ec); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/abort.c b/src/exit/abort.c index f21f458e..2ba891ae 100644 --- a/src/exit/abort.c +++ b/src/exit/abort.c @@ -28,3 +28,11 @@ _Noreturn void abort(void) raise(SIGKILL); _Exit(127); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/abort_lock.c b/src/exit/abort_lock.c index 3af72c7b..a782b7f2 100644 --- a/src/exit/abort_lock.c +++ b/src/exit/abort_lock.c @@ -1,3 +1,11 @@ #include "pthread_impl.h" volatile int __abort_lock[1]; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/assert.c b/src/exit/assert.c index 94edd827..d6f2727f 100644 --- a/src/exit/assert.c +++ b/src/exit/assert.c @@ -6,3 +6,11 @@ _Noreturn void __assert_fail(const char *expr, const char *file, int line, const fprintf(stderr, "Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line); abort(); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/at_quick_exit.c b/src/exit/at_quick_exit.c index e4b5d78d..66e6704a 100644 --- a/src/exit/at_quick_exit.c +++ b/src/exit/at_quick_exit.c @@ -31,3 +31,11 @@ int at_quick_exit(void (*func)(void)) UNLOCK(lock); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/atexit.c b/src/exit/atexit.c index 854e9fdd..48861671 100644 --- a/src/exit/atexit.c +++ b/src/exit/atexit.c @@ -77,3 +77,11 @@ int atexit(void (*func)(void)) { return __cxa_atexit(call, (void *)(uintptr_t)func, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/exit.c b/src/exit/exit.c index a6869b37..b85f1bc1 100644 --- a/src/exit/exit.c +++ b/src/exit/exit.c @@ -31,3 +31,11 @@ _Noreturn void exit(int code) __stdio_exit(); _Exit(code); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/exit/quick_exit.c b/src/exit/quick_exit.c index ada91348..6eb9d736 100644 --- a/src/exit/quick_exit.c +++ b/src/exit/quick_exit.c @@ -9,3 +9,11 @@ _Noreturn void quick_exit(int code) __funcs_on_quick_exit(); _Exit(code); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fcntl/creat.c b/src/fcntl/creat.c index c9c43910..264ba761 100644 --- a/src/fcntl/creat.c +++ b/src/fcntl/creat.c @@ -4,3 +4,11 @@ int creat(const char *filename, mode_t mode) { return open(filename, O_CREAT|O_WRONLY|O_TRUNC, mode); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fcntl/fcntl.c b/src/fcntl/fcntl.c index d3bff5c4..e5d35c60 100644 --- a/src/fcntl/fcntl.c +++ b/src/fcntl/fcntl.c @@ -46,3 +46,11 @@ int fcntl(int fd, int cmd, ...) return syscall(SYS_fcntl, fd, cmd, arg); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fcntl/open.c b/src/fcntl/open.c index 4c3c8275..3eaa9014 100644 --- a/src/fcntl/open.c +++ b/src/fcntl/open.c @@ -19,3 +19,11 @@ int open(const char *filename, int flags, ...) return __syscall_ret(fd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fcntl/openat.c b/src/fcntl/openat.c index 83a9e0d0..630c9c15 100644 --- a/src/fcntl/openat.c +++ b/src/fcntl/openat.c @@ -15,3 +15,11 @@ int openat(int fd, const char *filename, int flags, ...) return syscall_cp(SYS_openat, fd, filename, flags|O_LARGEFILE, mode); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fcntl/posix_fadvise.c b/src/fcntl/posix_fadvise.c index 07346d21..fc0bb010 100644 --- a/src/fcntl/posix_fadvise.c +++ b/src/fcntl/posix_fadvise.c @@ -14,3 +14,11 @@ int posix_fadvise(int fd, off_t base, off_t len, int advice) __SYSCALL_LL_E(len), advice); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fcntl/posix_fallocate.c b/src/fcntl/posix_fallocate.c index 80a65cbf..a3a5cd96 100644 --- a/src/fcntl/posix_fallocate.c +++ b/src/fcntl/posix_fallocate.c @@ -6,3 +6,11 @@ int posix_fallocate(int fd, off_t base, off_t len) return -__syscall(SYS_fallocate, fd, 0, __SYSCALL_LL_E(base), __SYSCALL_LL_E(len)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fenv/__flt_rounds.c b/src/fenv/__flt_rounds.c index ec0b3689..e74393e9 100644 --- a/src/fenv/__flt_rounds.c +++ b/src/fenv/__flt_rounds.c @@ -17,3 +17,11 @@ int __flt_rounds() } return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fenv/fegetexceptflag.c b/src/fenv/fegetexceptflag.c index bab0b44f..2df78e7c 100644 --- a/src/fenv/fegetexceptflag.c +++ b/src/fenv/fegetexceptflag.c @@ -5,3 +5,11 @@ int fegetexceptflag(fexcept_t *fp, int mask) *fp = fetestexcept(mask); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fenv/feholdexcept.c b/src/fenv/feholdexcept.c index 73ff1fad..574830f8 100644 --- a/src/fenv/feholdexcept.c +++ b/src/fenv/feholdexcept.c @@ -6,3 +6,11 @@ int feholdexcept(fenv_t *envp) feclearexcept(FE_ALL_EXCEPT); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fenv/fesetexceptflag.c b/src/fenv/fesetexceptflag.c index af5f102d..73ad8ea0 100644 --- a/src/fenv/fesetexceptflag.c +++ b/src/fenv/fesetexceptflag.c @@ -6,3 +6,11 @@ int fesetexceptflag(const fexcept_t *fp, int mask) feraiseexcept(*fp & mask); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fenv/fesetround.c b/src/fenv/fesetround.c index 4e2f164d..3cbf4464 100644 --- a/src/fenv/fesetround.c +++ b/src/fenv/fesetround.c @@ -21,3 +21,11 @@ int fesetround(int r) return -1; return __fesetround(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/fenv/feupdateenv.c b/src/fenv/feupdateenv.c index 50cef8e5..b0573e61 100644 --- a/src/fenv/feupdateenv.c +++ b/src/fenv/feupdateenv.c @@ -7,3 +7,11 @@ int feupdateenv(const fenv_t *envp) feraiseexcept(ex); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/defsysinfo.c b/src/internal/defsysinfo.c index 6d4117db..1d9d3e0a 100644 --- a/src/internal/defsysinfo.c +++ b/src/internal/defsysinfo.c @@ -1,3 +1,11 @@ #include "libc.h" size_t __sysinfo; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c index 8c0828fc..d3186512 100644 --- a/src/internal/floatscan.c +++ b/src/internal/floatscan.c @@ -505,3 +505,11 @@ long double __floatscan(FILE *f, int prec, int pok) return decfloat(f, c, bits, emin, sign, pok); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/intscan.c b/src/internal/intscan.c index a4a5ae86..2bcbdc6e 100644 --- a/src/internal/intscan.c +++ b/src/internal/intscan.c @@ -98,3 +98,11 @@ done: } return (y^neg)-neg; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/libc.c b/src/internal/libc.c index cb051810..efc253ae 100644 --- a/src/internal/libc.c +++ b/src/internal/libc.c @@ -7,3 +7,11 @@ char *__progname=0, *__progname_full=0; weak_alias(__progname, program_invocation_short_name); weak_alias(__progname_full, program_invocation_name); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/procfdname.c b/src/internal/procfdname.c index fd7306ab..6e9ac5d2 100644 --- a/src/internal/procfdname.c +++ b/src/internal/procfdname.c @@ -13,3 +13,11 @@ void __procfdname(char *buf, unsigned fd) buf[i] = 0; for (; fd; fd/=10) buf[--i] = '0' + fd%10; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/shgetc.c b/src/internal/shgetc.c index 7455d2f0..65032d0b 100644 --- a/src/internal/shgetc.c +++ b/src/internal/shgetc.c @@ -35,3 +35,11 @@ int __shgetc(FILE *f) if (f->rpos <= f->buf) f->rpos[-1] = c; return c; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/syscall_ret.c b/src/internal/syscall_ret.c index a3f47136..8ba2aef9 100644 --- a/src/internal/syscall_ret.c +++ b/src/internal/syscall_ret.c @@ -9,3 +9,11 @@ long __syscall_ret(unsigned long r) } return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/vdso.c b/src/internal/vdso.c index d46d3228..a2992d95 100644 --- a/src/internal/vdso.c +++ b/src/internal/vdso.c @@ -91,3 +91,11 @@ void *__vdsosym(const char *vername, const char *name) } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/internal/version.c b/src/internal/version.c index 08bbf5b2..87eb7d0d 100644 --- a/src/internal/version.c +++ b/src/internal/version.c @@ -2,3 +2,11 @@ #include "libc.h" const char __libc_version[] = VERSION; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/ftok.c b/src/ipc/ftok.c index c36b4b60..e6ef40ee 100644 --- a/src/ipc/ftok.c +++ b/src/ipc/ftok.c @@ -8,3 +8,11 @@ key_t ftok(const char *path, int id) return ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16) | ((id & 0xffu) << 24)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/msgctl.c b/src/ipc/msgctl.c index 9c114406..09c2c549 100644 --- a/src/ipc/msgctl.c +++ b/src/ipc/msgctl.c @@ -49,3 +49,11 @@ int msgctl(int q, int cmd, struct msqid_ds *buf) #endif return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/msgget.c b/src/ipc/msgget.c index 30a4b42b..f1ac7d0e 100644 --- a/src/ipc/msgget.c +++ b/src/ipc/msgget.c @@ -10,3 +10,11 @@ int msgget(key_t k, int flag) return syscall(SYS_ipc, IPCOP_msgget, k, flag); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/msgrcv.c b/src/ipc/msgrcv.c index 9d1034b1..647dc02d 100644 --- a/src/ipc/msgrcv.c +++ b/src/ipc/msgrcv.c @@ -10,3 +10,11 @@ ssize_t msgrcv(int q, void *m, size_t len, long type, int flag) return syscall_cp(SYS_ipc, IPCOP_msgrcv, q, len, flag, ((long[]){ (long)m, type })); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/msgsnd.c b/src/ipc/msgsnd.c index 99bb17e9..12b59b8d 100644 --- a/src/ipc/msgsnd.c +++ b/src/ipc/msgsnd.c @@ -10,3 +10,11 @@ int msgsnd(int q, const void *m, size_t len, int flag) return syscall_cp(SYS_ipc, IPCOP_msgsnd, q, len, flag, m); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/semctl.c b/src/ipc/semctl.c index bbb97d7a..da9a3b86 100644 --- a/src/ipc/semctl.c +++ b/src/ipc/semctl.c @@ -67,3 +67,11 @@ int semctl(int id, int num, int cmd, ...) #endif return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/semget.c b/src/ipc/semget.c index 2cdf626b..2319d8fd 100644 --- a/src/ipc/semget.c +++ b/src/ipc/semget.c @@ -17,3 +17,11 @@ int semget(key_t key, int n, int fl) return syscall(SYS_ipc, IPCOP_semget, key, n, fl); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/semop.c b/src/ipc/semop.c index 5f0c7dea..473157d2 100644 --- a/src/ipc/semop.c +++ b/src/ipc/semop.c @@ -10,3 +10,11 @@ int semop(int id, struct sembuf *buf, size_t n) return syscall(SYS_ipc, IPCOP_semop, id, n, 0, buf); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/semtimedop.c b/src/ipc/semtimedop.c index a104af21..09c5c108 100644 --- a/src/ipc/semtimedop.c +++ b/src/ipc/semtimedop.c @@ -34,3 +34,11 @@ int semtimedop(int id, struct sembuf *buf, size_t n, const struct timespec *ts) return __syscall_ret(-ENOSYS); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/shmat.c b/src/ipc/shmat.c index 8c7407d1..e1570e05 100644 --- a/src/ipc/shmat.c +++ b/src/ipc/shmat.c @@ -15,3 +15,11 @@ void *shmat(int id, const void *addr, int flag) return (ret > -(unsigned long)SHMLBA) ? (void *)ret : (void *)addr; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/shmctl.c b/src/ipc/shmctl.c index 1c9f78c2..dacd57b3 100644 --- a/src/ipc/shmctl.c +++ b/src/ipc/shmctl.c @@ -49,3 +49,11 @@ int shmctl(int id, int cmd, struct shmid_ds *buf) #endif return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/shmdt.c b/src/ipc/shmdt.c index 57238137..17204131 100644 --- a/src/ipc/shmdt.c +++ b/src/ipc/shmdt.c @@ -10,3 +10,11 @@ int shmdt(const void *addr) return syscall(SYS_ipc, IPCOP_shmdt, 0, 0, 0, addr); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ipc/shmget.c b/src/ipc/shmget.c index 7521b5fa..86076caf 100644 --- a/src/ipc/shmget.c +++ b/src/ipc/shmget.c @@ -12,3 +12,11 @@ int shmget(key_t key, size_t size, int flag) return syscall(SYS_ipc, IPCOP_shmget, key, size, flag); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ldso/__dlsym.c b/src/ldso/__dlsym.c index 0384f97e..bfd23e81 100644 --- a/src/ldso/__dlsym.c +++ b/src/ldso/__dlsym.c @@ -12,3 +12,11 @@ weak_alias(stub_dlsym, __dlsym); #if _REDIR_TIME64 weak_alias(stub_dlsym, __dlsym_redir_time64); #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ldso/dl_iterate_phdr.c b/src/ldso/dl_iterate_phdr.c index 9546dd36..9b94089f 100644 --- a/src/ldso/dl_iterate_phdr.c +++ b/src/ldso/dl_iterate_phdr.c @@ -45,3 +45,11 @@ static int static_dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size } weak_alias(static_dl_iterate_phdr, dl_iterate_phdr); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ldso/dladdr.c b/src/ldso/dladdr.c index e5c80206..3b5cfb23 100644 --- a/src/ldso/dladdr.c +++ b/src/ldso/dladdr.c @@ -7,3 +7,11 @@ static int stub_dladdr(const void *addr, Dl_info *info) } weak_alias(stub_dladdr, dladdr); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ldso/dlclose.c b/src/ldso/dlclose.c index e437422a..56cafce1 100644 --- a/src/ldso/dlclose.c +++ b/src/ldso/dlclose.c @@ -5,3 +5,11 @@ int dlclose(void *p) { return __dl_invalid_handle(p); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ldso/dlerror.c b/src/ldso/dlerror.c index dae0f3a9..03152a64 100644 --- a/src/ldso/dlerror.c +++ b/src/ldso/dlerror.c @@ -87,3 +87,11 @@ static int stub_invalid_handle(void *h) } weak_alias(stub_invalid_handle, __dl_invalid_handle); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ldso/dlinfo.c b/src/ldso/dlinfo.c index b55f5fe6..d11eed2f 100644 --- a/src/ldso/dlinfo.c +++ b/src/ldso/dlinfo.c @@ -12,3 +12,11 @@ int dlinfo(void *dso, int req, void *res) *(struct link_map **)res = dso; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/ldso/dlopen.c b/src/ldso/dlopen.c index 69372a22..74e6663e 100644 --- a/src/ldso/dlopen.c +++ b/src/ldso/dlopen.c @@ -8,3 +8,11 @@ static void *stub_dlopen(const char *file, int mode) } weak_alias(stub_dlopen, dlopen); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/cuserid.c b/src/legacy/cuserid.c index dcaf73d4..61b57060 100644 --- a/src/legacy/cuserid.c +++ b/src/legacy/cuserid.c @@ -20,3 +20,11 @@ char *cuserid(char *buf) memcpy(buf, pw.pw_name, len+1); return buf; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/daemon.c b/src/legacy/daemon.c index 1568b1dc..b7c4161d 100644 --- a/src/legacy/daemon.c +++ b/src/legacy/daemon.c @@ -31,3 +31,11 @@ int daemon(int nochdir, int noclose) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/err.c b/src/legacy/err.c index 0d6ab524..f0a04fd9 100644 --- a/src/legacy/err.c +++ b/src/legacy/err.c @@ -65,3 +65,11 @@ _Noreturn void errx(int status, const char *fmt, ...) verrx(status, fmt, ap); va_end(ap); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/euidaccess.c b/src/legacy/euidaccess.c index 6e1f3985..62ef047d 100644 --- a/src/legacy/euidaccess.c +++ b/src/legacy/euidaccess.c @@ -8,3 +8,11 @@ int euidaccess(const char *filename, int amode) } weak_alias(euidaccess, eaccess); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/ftw.c b/src/legacy/ftw.c index e757fc6f..5e919236 100644 --- a/src/legacy/ftw.c +++ b/src/legacy/ftw.c @@ -7,3 +7,11 @@ int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int * actually undefined, but works on all real-world machines. */ return nftw(path, (int (*)())fn, fd_limit, FTW_PHYS); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/futimes.c b/src/legacy/futimes.c index 1c19eb1f..1d80ec0f 100644 --- a/src/legacy/futimes.c +++ b/src/legacy/futimes.c @@ -12,3 +12,11 @@ int futimes(int fd, const struct timeval tv[2]) times[1].tv_nsec = tv[1].tv_usec * 1000; return futimens(fd, times); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/getdtablesize.c b/src/legacy/getdtablesize.c index b30c1933..e942e2db 100644 --- a/src/legacy/getdtablesize.c +++ b/src/legacy/getdtablesize.c @@ -9,3 +9,11 @@ int getdtablesize(void) getrlimit(RLIMIT_NOFILE, &rl); return rl.rlim_cur < INT_MAX ? rl.rlim_cur : INT_MAX; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/getloadavg.c b/src/legacy/getloadavg.c index ff06de0f..ceb53abe 100644 --- a/src/legacy/getloadavg.c +++ b/src/legacy/getloadavg.c @@ -12,3 +12,11 @@ int getloadavg(double *a, int n) a[i] = 1.0/(1<<SI_LOAD_SHIFT) * si.loads[i]; return n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/getpagesize.c b/src/legacy/getpagesize.c index 0fc29ffc..60006ae5 100644 --- a/src/legacy/getpagesize.c +++ b/src/legacy/getpagesize.c @@ -6,3 +6,11 @@ int getpagesize(void) { return PAGE_SIZE; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/getpass.c b/src/legacy/getpass.c index d51286c0..2a8c5c46 100644 --- a/src/legacy/getpass.c +++ b/src/legacy/getpass.c @@ -38,3 +38,11 @@ char *getpass(const char *prompt) return l<0 ? 0 : password; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/getusershell.c b/src/legacy/getusershell.c index 5fecdec2..d2129d62 100644 --- a/src/legacy/getusershell.c +++ b/src/legacy/getusershell.c @@ -30,3 +30,11 @@ char *getusershell(void) if (line[l-1]=='\n') line[l-1]=0; return line; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/isastream.c b/src/legacy/isastream.c index 4dafdb08..e51eb8e3 100644 --- a/src/legacy/isastream.c +++ b/src/legacy/isastream.c @@ -5,3 +5,11 @@ int isastream(int fd) { return fcntl(fd, F_GETFD) < 0 ? -1 : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/lutimes.c b/src/legacy/lutimes.c index dd465923..ab025052 100644 --- a/src/legacy/lutimes.c +++ b/src/legacy/lutimes.c @@ -14,3 +14,11 @@ int lutimes(const char *filename, const struct timeval tv[2]) } return utimensat(AT_FDCWD, filename, tv ? times : 0, AT_SYMLINK_NOFOLLOW); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/ulimit.c b/src/legacy/ulimit.c index 1f59e8e6..87ac69c7 100644 --- a/src/legacy/ulimit.c +++ b/src/legacy/ulimit.c @@ -17,3 +17,11 @@ long ulimit(int cmd, ...) } return rl.rlim_cur / 512; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/utmpx.c b/src/legacy/utmpx.c index 7aa65da3..6cd83b04 100644 --- a/src/legacy/utmpx.c +++ b/src/legacy/utmpx.c @@ -50,3 +50,11 @@ weak_alias(pututxline, pututline); weak_alias(updwtmpx, updwtmp); weak_alias(__utmpxname, utmpname); weak_alias(__utmpxname, utmpxname); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/legacy/valloc.c b/src/legacy/valloc.c index 5af2256a..281f5eda 100644 --- a/src/legacy/valloc.c +++ b/src/legacy/valloc.c @@ -6,3 +6,11 @@ void *valloc(size_t size) { return memalign(PAGE_SIZE, size); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/adjtime.c b/src/linux/adjtime.c index 5a707f2f..5d1fe7cc 100644 --- a/src/linux/adjtime.c +++ b/src/linux/adjtime.c @@ -25,3 +25,11 @@ int adjtime(const struct timeval *in, struct timeval *out) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/adjtimex.c b/src/linux/adjtimex.c index e9d727cf..8fed39c6 100644 --- a/src/linux/adjtimex.c +++ b/src/linux/adjtimex.c @@ -5,3 +5,11 @@ int adjtimex(struct timex *tx) { return clock_adjtime(CLOCK_REALTIME, tx); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/arch_prctl.c b/src/linux/arch_prctl.c index 94603658..7e55a6f8 100644 --- a/src/linux/arch_prctl.c +++ b/src/linux/arch_prctl.c @@ -5,3 +5,11 @@ int arch_prctl(int code, unsigned long addr) return syscall(SYS_arch_prctl, code, addr); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/brk.c b/src/linux/brk.c index a6173e07..b78e8209 100644 --- a/src/linux/brk.c +++ b/src/linux/brk.c @@ -7,3 +7,11 @@ int brk(void *end) { return __syscall_ret(-ENOMEM); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/cache.c b/src/linux/cache.c index 0eb051c2..b2c0560d 100644 --- a/src/linux/cache.c +++ b/src/linux/cache.c @@ -48,3 +48,11 @@ int __riscv_flush_icache(void *start, void *end, unsigned long int flags) } weak_alias(__riscv_flush_icache, riscv_flush_icache); #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/cap.c b/src/linux/cap.c index 8d035e07..6ef73527 100644 --- a/src/linux/cap.c +++ b/src/linux/cap.c @@ -9,3 +9,11 @@ int capget(void *a, void *b) { return syscall(SYS_capget, a, b); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/chroot.c b/src/linux/chroot.c index 0e69f145..7193836c 100644 --- a/src/linux/chroot.c +++ b/src/linux/chroot.c @@ -6,3 +6,11 @@ int chroot(const char *path) { return syscall(SYS_chroot, path); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/clock_adjtime.c b/src/linux/clock_adjtime.c index d4d03d24..21ba8b5a 100644 --- a/src/linux/clock_adjtime.c +++ b/src/linux/clock_adjtime.c @@ -149,3 +149,11 @@ int clock_adjtime (clockid_t clock_id, struct timex *utx) #endif return syscall(SYS_clock_adjtime, clock_id, utx); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/clone.c b/src/linux/clone.c index 257c1cec..7d42f70a 100644 --- a/src/linux/clone.c +++ b/src/linux/clone.c @@ -63,3 +63,11 @@ int clone(int (*func)(void *), void *stack, int flags, void *arg, ...) __restore_sigs(&csa.sigmask); return __syscall_ret(ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/copy_file_range.c b/src/linux/copy_file_range.c index dd4b1333..8c1076b3 100644 --- a/src/linux/copy_file_range.c +++ b/src/linux/copy_file_range.c @@ -6,3 +6,11 @@ ssize_t copy_file_range(int fd_in, off_t *off_in, int fd_out, off_t *off_out, si { return syscall(SYS_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/epoll.c b/src/linux/epoll.c index e56e8f4c..75973847 100644 --- a/src/linux/epoll.c +++ b/src/linux/epoll.c @@ -36,3 +36,11 @@ int epoll_wait(int fd, struct epoll_event *ev, int cnt, int to) { return epoll_pwait(fd, ev, cnt, to, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/eventfd.c b/src/linux/eventfd.c index 68e489c8..8dd9adc9 100644 --- a/src/linux/eventfd.c +++ b/src/linux/eventfd.c @@ -21,3 +21,11 @@ int eventfd_write(int fd, eventfd_t value) { return (sizeof(value) == write(fd, &value, sizeof(value))) ? 0 : -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/fallocate.c b/src/linux/fallocate.c index 9146350e..b7425276 100644 --- a/src/linux/fallocate.c +++ b/src/linux/fallocate.c @@ -7,3 +7,11 @@ int fallocate(int fd, int mode, off_t base, off_t len) return syscall(SYS_fallocate, fd, mode, __SYSCALL_LL_E(base), __SYSCALL_LL_E(len)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/fanotify.c b/src/linux/fanotify.c index c6211afc..064d2c1c 100644 --- a/src/linux/fanotify.c +++ b/src/linux/fanotify.c @@ -12,3 +12,11 @@ int fanotify_mark(int fanotify_fd, unsigned flags, unsigned long long mask, return syscall(SYS_fanotify_mark, fanotify_fd, flags, __SYSCALL_LL_E(mask), dfd, pathname); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/flock.c b/src/linux/flock.c index 87aa5cfe..7bc5a403 100644 --- a/src/linux/flock.c +++ b/src/linux/flock.c @@ -5,3 +5,11 @@ int flock(int fd, int op) { return syscall(SYS_flock, fd, op); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/getdents.c b/src/linux/getdents.c index 97f76e14..ef82756d 100644 --- a/src/linux/getdents.c +++ b/src/linux/getdents.c @@ -8,3 +8,11 @@ int getdents(int fd, struct dirent *buf, size_t len) if (len>INT_MAX) len = INT_MAX; return syscall(SYS_getdents, fd, buf, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/getrandom.c b/src/linux/getrandom.c index 6cc6f6b0..d4484748 100644 --- a/src/linux/getrandom.c +++ b/src/linux/getrandom.c @@ -5,3 +5,11 @@ ssize_t getrandom(void *buf, size_t buflen, unsigned flags) { return syscall_cp(SYS_getrandom, buf, buflen, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/gettid.c b/src/linux/gettid.c index 70767137..f04eefbd 100644 --- a/src/linux/gettid.c +++ b/src/linux/gettid.c @@ -6,3 +6,11 @@ pid_t gettid(void) { return __pthread_self()->tid; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/inotify.c b/src/linux/inotify.c index df5e48b3..76e72533 100644 --- a/src/linux/inotify.c +++ b/src/linux/inotify.c @@ -24,3 +24,11 @@ int inotify_rm_watch(int fd, int wd) { return syscall(SYS_inotify_rm_watch, fd, wd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/ioperm.c b/src/linux/ioperm.c index 08c6d8b8..d8ba7845 100644 --- a/src/linux/ioperm.c +++ b/src/linux/ioperm.c @@ -8,3 +8,11 @@ int ioperm(unsigned long from, unsigned long num, int turn_on) return syscall(SYS_ioperm, from, num, turn_on); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/iopl.c b/src/linux/iopl.c index 835d3d4e..f76b5804 100644 --- a/src/linux/iopl.c +++ b/src/linux/iopl.c @@ -8,3 +8,11 @@ int iopl(int level) return syscall(SYS_iopl, level); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/klogctl.c b/src/linux/klogctl.c index 8102ee64..a24f8769 100644 --- a/src/linux/klogctl.c +++ b/src/linux/klogctl.c @@ -5,3 +5,11 @@ int klogctl (int type, char *buf, int len) { return syscall(SYS_syslog, type, buf, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/membarrier.c b/src/linux/membarrier.c index f64fe7e1..83a7cb35 100644 --- a/src/linux/membarrier.c +++ b/src/linux/membarrier.c @@ -70,3 +70,11 @@ void __membarrier_init(void) } weak_alias(__membarrier, membarrier); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/memfd_create.c b/src/linux/memfd_create.c index 1649fe55..7c639abc 100644 --- a/src/linux/memfd_create.c +++ b/src/linux/memfd_create.c @@ -6,3 +6,11 @@ int memfd_create(const char *name, unsigned flags) { return syscall(SYS_memfd_create, name, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/mlock2.c b/src/linux/mlock2.c index 10132742..f394183f 100644 --- a/src/linux/mlock2.c +++ b/src/linux/mlock2.c @@ -8,3 +8,11 @@ int mlock2(const void *addr, size_t len, unsigned flags) return mlock(addr, len); return syscall(SYS_mlock2, addr, len, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/module.c b/src/linux/module.c index 33f69a00..d4ccda83 100644 --- a/src/linux/module.c +++ b/src/linux/module.c @@ -9,3 +9,11 @@ int delete_module(const char *a, unsigned b) { return syscall(SYS_delete_module, a, b); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/mount.c b/src/linux/mount.c index 34e11af1..10cf32d0 100644 --- a/src/linux/mount.c +++ b/src/linux/mount.c @@ -15,3 +15,11 @@ int umount2(const char *special, int flags) { return syscall(SYS_umount2, special, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/name_to_handle_at.c b/src/linux/name_to_handle_at.c index cd4075bd..10fe8438 100644 --- a/src/linux/name_to_handle_at.c +++ b/src/linux/name_to_handle_at.c @@ -8,3 +8,11 @@ int name_to_handle_at(int dirfd, const char *pathname, return syscall(SYS_name_to_handle_at, dirfd, pathname, handle, mount_id, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/open_by_handle_at.c b/src/linux/open_by_handle_at.c index 1c9b6a2b..3c6d0fb2 100644 --- a/src/linux/open_by_handle_at.c +++ b/src/linux/open_by_handle_at.c @@ -6,3 +6,11 @@ int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags) { return syscall(SYS_open_by_handle_at, mount_fd, handle, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/personality.c b/src/linux/personality.c index e00cf799..d5217e83 100644 --- a/src/linux/personality.c +++ b/src/linux/personality.c @@ -6,3 +6,11 @@ int personality(unsigned long persona) return syscall(SYS_personality, persona); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/pivot_root.c b/src/linux/pivot_root.c index 17e70c91..354e3591 100644 --- a/src/linux/pivot_root.c +++ b/src/linux/pivot_root.c @@ -4,3 +4,11 @@ int pivot_root(const char *new, const char *old) { return syscall(SYS_pivot_root, new, old); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/ppoll.c b/src/linux/ppoll.c index e614600a..83c56b83 100644 --- a/src/linux/ppoll.c +++ b/src/linux/ppoll.c @@ -24,3 +24,11 @@ int ppoll(struct pollfd *fds, nfds_t n, const struct timespec *to, const sigset_ return syscall_cp(SYS_ppoll, fds, n, to ? ((long[]){s, ns}) : 0, mask, _NSIG/8); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/prctl.c b/src/linux/prctl.c index 19f4267c..d5288b66 100644 --- a/src/linux/prctl.c +++ b/src/linux/prctl.c @@ -12,3 +12,11 @@ int prctl(int op, ...) va_end(ap); return syscall(SYS_prctl, op, x[0], x[1], x[2], x[3]); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/prlimit.c b/src/linux/prlimit.c index fcf45aab..82bb26ee 100644 --- a/src/linux/prlimit.c +++ b/src/linux/prlimit.c @@ -21,3 +21,11 @@ int prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlim } return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/process_vm.c b/src/linux/process_vm.c index 7703bdf0..46cd39e7 100644 --- a/src/linux/process_vm.c +++ b/src/linux/process_vm.c @@ -11,3 +11,11 @@ ssize_t process_vm_readv(pid_t pid, const struct iovec *lvec, unsigned long liov { return syscall(SYS_process_vm_readv, pid, lvec, liovcnt, rvec, riovcnt, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/ptrace.c b/src/linux/ptrace.c index a3f393d9..ded700fd 100644 --- a/src/linux/ptrace.c +++ b/src/linux/ptrace.c @@ -27,3 +27,11 @@ long ptrace(int req, ...) if (ret < 0 || req-1U >= 3) return ret; return result; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/quotactl.c b/src/linux/quotactl.c index 344eb0d1..7725b9b6 100644 --- a/src/linux/quotactl.c +++ b/src/linux/quotactl.c @@ -5,3 +5,11 @@ int quotactl(int cmd, const char *special, int id, char *addr) { return syscall(SYS_quotactl, cmd, special, id, addr); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/readahead.c b/src/linux/readahead.c index 5c70bfd6..ca4d61a9 100644 --- a/src/linux/readahead.c +++ b/src/linux/readahead.c @@ -6,3 +6,11 @@ ssize_t readahead(int fd, off_t pos, size_t len) { return syscall(SYS_readahead, fd, __SYSCALL_LL_O(pos), len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/reboot.c b/src/linux/reboot.c index 7f12af79..37559b35 100644 --- a/src/linux/reboot.c +++ b/src/linux/reboot.c @@ -5,3 +5,11 @@ int reboot(int type) { return syscall(SYS_reboot, 0xfee1dead, 672274793, type); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/remap_file_pages.c b/src/linux/remap_file_pages.c index a9699ce2..26697f2e 100644 --- a/src/linux/remap_file_pages.c +++ b/src/linux/remap_file_pages.c @@ -6,3 +6,11 @@ int remap_file_pages(void *addr, size_t size, int prot, size_t pgoff, int flags) { return syscall(SYS_remap_file_pages, addr, size, prot, pgoff, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/sbrk.c b/src/linux/sbrk.c index bb866305..34e3ff1f 100644 --- a/src/linux/sbrk.c +++ b/src/linux/sbrk.c @@ -9,3 +9,11 @@ void *sbrk(intptr_t inc) if (inc) return (void *)__syscall_ret(-ENOMEM); return (void *)__syscall(SYS_brk, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/sendfile.c b/src/linux/sendfile.c index fc1577d3..ed9d7090 100644 --- a/src/linux/sendfile.c +++ b/src/linux/sendfile.c @@ -5,3 +5,11 @@ ssize_t sendfile(int out_fd, int in_fd, off_t *ofs, size_t count) { return syscall(SYS_sendfile, out_fd, in_fd, ofs, count); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/setfsgid.c b/src/linux/setfsgid.c index e29d9c00..1f4a8b8f 100644 --- a/src/linux/setfsgid.c +++ b/src/linux/setfsgid.c @@ -5,3 +5,11 @@ int setfsgid(gid_t gid) { return syscall(SYS_setfsgid, gid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/setfsuid.c b/src/linux/setfsuid.c index 1bae4418..e36d1fc3 100644 --- a/src/linux/setfsuid.c +++ b/src/linux/setfsuid.c @@ -5,3 +5,11 @@ int setfsuid(uid_t uid) { return syscall(SYS_setfsuid, uid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/setgroups.c b/src/linux/setgroups.c index 47142f14..a3283328 100644 --- a/src/linux/setgroups.c +++ b/src/linux/setgroups.c @@ -34,3 +34,11 @@ int setgroups(size_t count, const gid_t list[]) __synccall(do_setgroups, &c); return __syscall_ret(c.ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/sethostname.c b/src/linux/sethostname.c index 9313b324..5be1346b 100644 --- a/src/linux/sethostname.c +++ b/src/linux/sethostname.c @@ -6,3 +6,11 @@ int sethostname(const char *name, size_t len) { return syscall(SYS_sethostname, name, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/setns.c b/src/linux/setns.c index 0afec813..0a8161b3 100644 --- a/src/linux/setns.c +++ b/src/linux/setns.c @@ -6,3 +6,11 @@ int setns(int fd, int nstype) { return syscall(SYS_setns, fd, nstype); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/settimeofday.c b/src/linux/settimeofday.c index 860fb5de..237b4a52 100644 --- a/src/linux/settimeofday.c +++ b/src/linux/settimeofday.c @@ -11,3 +11,11 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz) return clock_settime(CLOCK_REALTIME, &((struct timespec){ .tv_sec = tv->tv_sec, .tv_nsec = tv->tv_usec * 1000})); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/signalfd.c b/src/linux/signalfd.c index 4bf43326..1aa1dd72 100644 --- a/src/linux/signalfd.c +++ b/src/linux/signalfd.c @@ -19,3 +19,11 @@ int signalfd(int fd, const sigset_t *sigs, int flags) #endif return __syscall_ret(ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/splice.c b/src/linux/splice.c index 78b6220d..8f45157f 100644 --- a/src/linux/splice.c +++ b/src/linux/splice.c @@ -6,3 +6,11 @@ ssize_t splice(int fd_in, off_t *off_in, int fd_out, off_t *off_out, size_t len, { return syscall(SYS_splice, fd_in, off_in, fd_out, off_out, len, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/stime.c b/src/linux/stime.c index 7d0443ba..0466ee65 100644 --- a/src/linux/stime.c +++ b/src/linux/stime.c @@ -7,3 +7,11 @@ int stime(const time_t *t) struct timeval tv = { .tv_sec = *t, .tv_usec = 0 }; return settimeofday(&tv, (void *)0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/swap.c b/src/linux/swap.c index 8137d51e..1d68a84b 100644 --- a/src/linux/swap.c +++ b/src/linux/swap.c @@ -10,3 +10,11 @@ int swapoff(const char *path) { return syscall(SYS_swapoff, path); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/sync_file_range.c b/src/linux/sync_file_range.c index 6859abc0..6d1071ee 100644 --- a/src/linux/sync_file_range.c +++ b/src/linux/sync_file_range.c @@ -15,3 +15,11 @@ int sync_file_range(int fd, off_t pos, off_t len, unsigned flags) return __syscall_ret(-ENOSYS); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/syncfs.c b/src/linux/syncfs.c index bc7d301e..a7ed9ecf 100644 --- a/src/linux/syncfs.c +++ b/src/linux/syncfs.c @@ -6,3 +6,11 @@ int syncfs(int fd) { return syscall(SYS_syncfs, fd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/sysinfo.c b/src/linux/sysinfo.c index db86476d..f6675d9f 100644 --- a/src/linux/sysinfo.c +++ b/src/linux/sysinfo.c @@ -7,3 +7,11 @@ int __lsysinfo(struct sysinfo *info) } weak_alias(__lsysinfo, sysinfo); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/tee.c b/src/linux/tee.c index a24748cf..d0e83233 100644 --- a/src/linux/tee.c +++ b/src/linux/tee.c @@ -6,3 +6,11 @@ ssize_t tee(int src, int dest, size_t len, unsigned flags) { return syscall(SYS_tee, src, dest, len, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/timerfd.c b/src/linux/timerfd.c index 5bdfaf16..b3576fdc 100644 --- a/src/linux/timerfd.c +++ b/src/linux/timerfd.c @@ -57,3 +57,11 @@ int timerfd_gettime(int fd, struct itimerspec *cur) #endif return syscall(SYS_timerfd_gettime, fd, cur); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/unshare.c b/src/linux/unshare.c index 3861db3b..496532ad 100644 --- a/src/linux/unshare.c +++ b/src/linux/unshare.c @@ -6,3 +6,11 @@ int unshare(int flags) { return syscall(SYS_unshare, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/utimes.c b/src/linux/utimes.c index 6ca025d9..241253e4 100644 --- a/src/linux/utimes.c +++ b/src/linux/utimes.c @@ -6,3 +6,11 @@ int utimes(const char *path, const struct timeval times[2]) { return __futimesat(AT_FDCWD, path, times); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/vhangup.c b/src/linux/vhangup.c index 02030715..33252312 100644 --- a/src/linux/vhangup.c +++ b/src/linux/vhangup.c @@ -6,3 +6,11 @@ int vhangup(void) { return syscall(SYS_vhangup); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/vmsplice.c b/src/linux/vmsplice.c index ebf13ee4..26f7b5ea 100644 --- a/src/linux/vmsplice.c +++ b/src/linux/vmsplice.c @@ -6,3 +6,11 @@ ssize_t vmsplice(int fd, const struct iovec *iov, size_t cnt, unsigned flags) { return syscall(SYS_vmsplice, fd, iov, cnt, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/wait3.c b/src/linux/wait3.c index 61c73594..e4946e35 100644 --- a/src/linux/wait3.c +++ b/src/linux/wait3.c @@ -7,3 +7,11 @@ pid_t wait3(int *status, int options, struct rusage *usage) { return wait4(-1, status, options, usage); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/wait4.c b/src/linux/wait4.c index ff2e3e66..ab750a82 100644 --- a/src/linux/wait4.c +++ b/src/linux/wait4.c @@ -37,3 +37,11 @@ pid_t wait4(pid_t pid, int *status, int options, struct rusage *ru) } return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/linux/xattr.c b/src/linux/xattr.c index fea0d209..a9f7beb7 100644 --- a/src/linux/xattr.c +++ b/src/linux/xattr.c @@ -60,3 +60,11 @@ int fremovexattr(int fd, const char *name) { return syscall(SYS_fremovexattr, fd, name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/__lctrans.c b/src/locale/__lctrans.c index 9fbe762a..4a25ae41 100644 --- a/src/locale/__lctrans.c +++ b/src/locale/__lctrans.c @@ -17,3 +17,11 @@ const char *__lctrans_cur(const char *msg) { return __lctrans_impl(msg, CURRENT_LOCALE->cat[LC_MESSAGES]); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/__mo_lookup.c b/src/locale/__mo_lookup.c index d18ab774..b6125b18 100644 --- a/src/locale/__mo_lookup.c +++ b/src/locale/__mo_lookup.c @@ -40,3 +40,11 @@ const char *__mo_lookup(const void *p, size_t size, const char *s) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/bind_textdomain_codeset.c b/src/locale/bind_textdomain_codeset.c index 5ebfd5e8..cf785b00 100644 --- a/src/locale/bind_textdomain_codeset.c +++ b/src/locale/bind_textdomain_codeset.c @@ -9,3 +9,11 @@ char *bind_textdomain_codeset(const char *domainname, const char *codeset) errno = EINVAL; return NULL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/c_locale.c b/src/locale/c_locale.c index 77ccf587..5a45b33a 100644 --- a/src/locale/c_locale.c +++ b/src/locale/c_locale.c @@ -13,3 +13,11 @@ const struct __locale_struct __c_locale = { 0 }; const struct __locale_struct __c_dot_utf8_locale = { .cat[LC_CTYPE] = &__c_dot_utf8 }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/catclose.c b/src/locale/catclose.c index 54e24dd2..9d6891f7 100644 --- a/src/locale/catclose.c +++ b/src/locale/catclose.c @@ -12,3 +12,11 @@ int catclose (nl_catd catd) munmap(map, V(map+8)+20); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/catgets.c b/src/locale/catgets.c index 71c31c1d..5ce79534 100644 --- a/src/locale/catgets.c +++ b/src/locale/catgets.c @@ -36,3 +36,11 @@ char *catgets (nl_catd catd, int set_id, int msg_id, const char *s) } return (char *)(strings + V(msg+8)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/catopen.c b/src/locale/catopen.c index 97f2446d..f0c8a5e6 100644 --- a/src/locale/catopen.c +++ b/src/locale/catopen.c @@ -77,3 +77,11 @@ nl_catd catopen(const char *name, int oflag) errno = ENOENT; return (nl_catd)-1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/dcngettext.c b/src/locale/dcngettext.c index 0b53286d..1ffe702f 100644 --- a/src/locale/dcngettext.c +++ b/src/locale/dcngettext.c @@ -281,3 +281,11 @@ char *dgettext(const char *domainname, const char *msgid) { return dcngettext(domainname, msgid, 0, 1, LC_MESSAGES); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/duplocale.c b/src/locale/duplocale.c index 5ce33ae6..16274cc7 100644 --- a/src/locale/duplocale.c +++ b/src/locale/duplocale.c @@ -18,3 +18,11 @@ locale_t __duplocale(locale_t old) } weak_alias(__duplocale, duplocale); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/freelocale.c b/src/locale/freelocale.c index 385d1206..70b46665 100644 --- a/src/locale/freelocale.c +++ b/src/locale/freelocale.c @@ -12,3 +12,11 @@ void freelocale(locale_t l) } weak_alias(freelocale, __freelocale); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/iconv.c b/src/locale/iconv.c index 3047c27b..d769cebd 100644 --- a/src/locale/iconv.c +++ b/src/locale/iconv.c @@ -683,3 +683,11 @@ end: *ploc = loc; return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/iconv_close.c b/src/locale/iconv_close.c index 28b29565..d967b4e5 100644 --- a/src/locale/iconv_close.c +++ b/src/locale/iconv_close.c @@ -6,3 +6,11 @@ int iconv_close(iconv_t cd) if (!((size_t)cd & 1)) free((void *)cd); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/langinfo.c b/src/locale/langinfo.c index 14773093..78105966 100644 --- a/src/locale/langinfo.c +++ b/src/locale/langinfo.c @@ -71,3 +71,11 @@ char *__nl_langinfo(nl_item item) weak_alias(__nl_langinfo, nl_langinfo); weak_alias(__nl_langinfo_l, nl_langinfo_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/locale_map.c b/src/locale/locale_map.c index da61f7fc..d9f6478a 100644 --- a/src/locale/locale_map.c +++ b/src/locale/locale_map.c @@ -111,3 +111,11 @@ const struct __locale_map *__get_locale(int cat, const char *val) return new; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/localeconv.c b/src/locale/localeconv.c index 4cbb9dc5..08194a0b 100644 --- a/src/locale/localeconv.c +++ b/src/locale/localeconv.c @@ -32,3 +32,11 @@ struct lconv *localeconv(void) { return (void *)&posix_lconv; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/newlocale.c b/src/locale/newlocale.c index 9ac3cd38..8d165bcc 100644 --- a/src/locale/newlocale.c +++ b/src/locale/newlocale.c @@ -68,3 +68,11 @@ locale_t __newlocale(int mask, const char *name, locale_t loc) } weak_alias(__newlocale, newlocale); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/pleval.c b/src/locale/pleval.c index 04da1c45..f350ff8e 100644 --- a/src/locale/pleval.c +++ b/src/locale/pleval.c @@ -156,3 +156,11 @@ unsigned long __pleval(const char *s, unsigned long n) s = evalexpr(&st, s, 100); return *s == ';' ? st.r : -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/setlocale.c b/src/locale/setlocale.c index 360c4437..fb8cde48 100644 --- a/src/locale/setlocale.c +++ b/src/locale/setlocale.c @@ -76,3 +76,11 @@ char *setlocale(int cat, const char *name) return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/strcoll.c b/src/locale/strcoll.c index dd3cbc48..7c6eb242 100644 --- a/src/locale/strcoll.c +++ b/src/locale/strcoll.c @@ -13,3 +13,11 @@ int strcoll(const char *l, const char *r) } weak_alias(__strcoll_l, strcoll_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/strfmon.c b/src/locale/strfmon.c index 7cf2136a..904acfc5 100644 --- a/src/locale/strfmon.c +++ b/src/locale/strfmon.c @@ -99,3 +99,11 @@ ssize_t strfmon(char *restrict s, size_t n, const char *restrict fmt, ...) return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/strtod_l.c b/src/locale/strtod_l.c index 574ba148..61a13435 100644 --- a/src/locale/strtod_l.c +++ b/src/locale/strtod_l.c @@ -20,3 +20,11 @@ long double strtold_l(const char *restrict s, char **restrict p, locale_t l) weak_alias(strtof_l, __strtof_l); weak_alias(strtod_l, __strtod_l); weak_alias(strtold_l, __strtold_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/strxfrm.c b/src/locale/strxfrm.c index c66c6203..e5c55e2b 100644 --- a/src/locale/strxfrm.c +++ b/src/locale/strxfrm.c @@ -16,3 +16,11 @@ size_t strxfrm(char *restrict dest, const char *restrict src, size_t n) } weak_alias(__strxfrm_l, strxfrm_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/textdomain.c b/src/locale/textdomain.c index d7275397..25241f12 100644 --- a/src/locale/textdomain.c +++ b/src/locale/textdomain.c @@ -40,3 +40,11 @@ char *ngettext(const char *msgid1, const char *msgid2, unsigned long int n) { return dngettext(0, msgid1, msgid2, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/uselocale.c b/src/locale/uselocale.c index 0fc5ecbc..27d850d6 100644 --- a/src/locale/uselocale.c +++ b/src/locale/uselocale.c @@ -14,3 +14,11 @@ locale_t __uselocale(locale_t new) } weak_alias(__uselocale, uselocale); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/wcscoll.c b/src/locale/wcscoll.c index ad2cc691..0835d4b2 100644 --- a/src/locale/wcscoll.c +++ b/src/locale/wcscoll.c @@ -14,3 +14,11 @@ int wcscoll(const wchar_t *l, const wchar_t *r) } weak_alias(__wcscoll_l, wcscoll_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/locale/wcsxfrm.c b/src/locale/wcsxfrm.c index 05e3e115..2f3d2d08 100644 --- a/src/locale/wcsxfrm.c +++ b/src/locale/wcsxfrm.c @@ -21,3 +21,11 @@ size_t wcsxfrm(wchar_t *restrict dest, const wchar_t *restrict src, size_t n) } weak_alias(__wcsxfrm_l, wcsxfrm_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/calloc.c b/src/malloc/calloc.c index bf6bddca..66a26059 100644 --- a/src/malloc/calloc.c +++ b/src/malloc/calloc.c @@ -43,3 +43,11 @@ void *calloc(size_t m, size_t n) n = mal0_clear(p, n); return memset(p, 0, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/free.c b/src/malloc/free.c index 3944f7b2..6013ea97 100644 --- a/src/malloc/free.c +++ b/src/malloc/free.c @@ -4,3 +4,11 @@ void free(void *p) { __libc_free(p); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/lite_malloc.c b/src/malloc/lite_malloc.c index 43a988fb..6ada7f54 100644 --- a/src/malloc/lite_malloc.c +++ b/src/malloc/lite_malloc.c @@ -116,3 +116,11 @@ static void *default_malloc(size_t n) } weak_alias(default_malloc, malloc); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/mallocng/aligned_alloc.c b/src/malloc/mallocng/aligned_alloc.c index e0862a83..f8dd6fc4 100644 --- a/src/malloc/mallocng/aligned_alloc.c +++ b/src/malloc/mallocng/aligned_alloc.c @@ -58,3 +58,11 @@ void *aligned_alloc(size_t align, size_t len) start[-3] = 7<<5; return p; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/mallocng/donate.c b/src/malloc/mallocng/donate.c index 41d850f3..7449dc70 100644 --- a/src/malloc/mallocng/donate.c +++ b/src/malloc/mallocng/donate.c @@ -37,3 +37,11 @@ void __malloc_donate(char *start, char *end) { donate((void *)start, end-start); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/mallocng/free.c b/src/malloc/mallocng/free.c index 43f32aad..963286b5 100644 --- a/src/malloc/mallocng/free.c +++ b/src/malloc/mallocng/free.c @@ -149,3 +149,11 @@ void free(void *p) errno = e; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/mallocng/malloc.c b/src/malloc/mallocng/malloc.c index d695ab8e..1e7f1cf8 100644 --- a/src/malloc/mallocng/malloc.c +++ b/src/malloc/mallocng/malloc.c @@ -385,3 +385,11 @@ int is_allzero(void *p) return g->sizeclass >= 48 || get_stride(g) < UNIT*size_classes[g->sizeclass]; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/mallocng/malloc_usable_size.c b/src/malloc/mallocng/malloc_usable_size.c index ce6a960c..19f4ab40 100644 --- a/src/malloc/mallocng/malloc_usable_size.c +++ b/src/malloc/mallocng/malloc_usable_size.c @@ -11,3 +11,11 @@ size_t malloc_usable_size(void *p) unsigned char *end = start + stride - IB; return get_nominal_size(p, end); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/mallocng/realloc.c b/src/malloc/mallocng/realloc.c index 18769f42..51ffb6d0 100644 --- a/src/malloc/mallocng/realloc.c +++ b/src/malloc/mallocng/realloc.c @@ -49,3 +49,11 @@ void *realloc(void *p, size_t n) free(p); return new; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/memalign.c b/src/malloc/memalign.c index 32cd87d8..81683c9d 100644 --- a/src/malloc/memalign.c +++ b/src/malloc/memalign.c @@ -5,3 +5,11 @@ void *memalign(size_t align, size_t len) { return aligned_alloc(align, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/posix_memalign.c b/src/malloc/posix_memalign.c index ad4d8f47..bf903dd7 100644 --- a/src/malloc/posix_memalign.c +++ b/src/malloc/posix_memalign.c @@ -9,3 +9,11 @@ int posix_memalign(void **res, size_t align, size_t len) *res = mem; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/realloc.c b/src/malloc/realloc.c index fb0e8b7c..4bc77a8e 100644 --- a/src/malloc/realloc.c +++ b/src/malloc/realloc.c @@ -4,3 +4,11 @@ void *realloc(void *p, size_t n) { return __libc_realloc(p, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/reallocarray.c b/src/malloc/reallocarray.c index 4a6ebe46..70af5907 100644 --- a/src/malloc/reallocarray.c +++ b/src/malloc/reallocarray.c @@ -11,3 +11,11 @@ void *reallocarray(void *ptr, size_t m, size_t n) return realloc(ptr, m * n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/malloc/replaced.c b/src/malloc/replaced.c index 07fce61e..98968616 100644 --- a/src/malloc/replaced.c +++ b/src/malloc/replaced.c @@ -2,3 +2,11 @@ int __malloc_replaced; int __aligned_alloc_replaced; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__cos.c b/src/math/__cos.c index 46cefb38..40038424 100644 --- a/src/math/__cos.c +++ b/src/math/__cos.c @@ -69,3 +69,11 @@ double __cos(double x, double y) w = 1.0-hz; return w + (((1.0-w)-hz) + (z*r-x*y)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__cosdf.c b/src/math/__cosdf.c index 2124989b..5acf4d41 100644 --- a/src/math/__cosdf.c +++ b/src/math/__cosdf.c @@ -33,3 +33,11 @@ float __cosdf(double x) r = C2+z*C3; return ((1.0+z*C0) + w*C1) + (w*z)*r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__cosl.c b/src/math/__cosl.c index fa522ddd..ba2f5435 100644 --- a/src/math/__cosl.c +++ b/src/math/__cosl.c @@ -94,3 +94,11 @@ long double __cosl(long double x, long double y) return w + (((1.0-w)-hz) + (z*r-x*y)); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__expo2.c b/src/math/__expo2.c index 248f052b..3bcf3179 100644 --- a/src/math/__expo2.c +++ b/src/math/__expo2.c @@ -15,3 +15,11 @@ double __expo2(double x, double sign) /* in directed rounding correct sign before rounding or overflow is important */ return exp(x - kln2) * (sign * scale) * scale; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__expo2f.c b/src/math/__expo2f.c index 538eb09c..937ee404 100644 --- a/src/math/__expo2f.c +++ b/src/math/__expo2f.c @@ -15,3 +15,11 @@ float __expo2f(float x, float sign) /* in directed rounding correct sign before rounding or overflow is important */ return expf(x - kln2) * (sign * scale) * scale; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__fpclassify.c b/src/math/__fpclassify.c index f7c0e2df..68564fd8 100644 --- a/src/math/__fpclassify.c +++ b/src/math/__fpclassify.c @@ -9,3 +9,11 @@ int __fpclassify(double x) if (e==0x7ff) return u.i<<12 ? FP_NAN : FP_INFINITE; return FP_NORMAL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__fpclassifyf.c b/src/math/__fpclassifyf.c index fd00eb1b..99f22662 100644 --- a/src/math/__fpclassifyf.c +++ b/src/math/__fpclassifyf.c @@ -9,3 +9,11 @@ int __fpclassifyf(float x) if (e==0xff) return u.i<<9 ? FP_NAN : FP_INFINITE; return FP_NORMAL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__fpclassifyl.c b/src/math/__fpclassifyl.c index e41781b6..ac620f8b 100644 --- a/src/math/__fpclassifyl.c +++ b/src/math/__fpclassifyl.c @@ -40,3 +40,11 @@ int __fpclassifyl(long double x) return FP_NORMAL; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_divzero.c b/src/math/__math_divzero.c index 59d21350..efc85c14 100644 --- a/src/math/__math_divzero.c +++ b/src/math/__math_divzero.c @@ -4,3 +4,11 @@ double __math_divzero(uint32_t sign) { return fp_barrier(sign ? -1.0 : 1.0) / 0.0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_divzerof.c b/src/math/__math_divzerof.c index ce046f3e..bd939b0f 100644 --- a/src/math/__math_divzerof.c +++ b/src/math/__math_divzerof.c @@ -4,3 +4,11 @@ float __math_divzerof(uint32_t sign) { return fp_barrierf(sign ? -1.0f : 1.0f) / 0.0f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_invalid.c b/src/math/__math_invalid.c index 17740490..1c46c1b9 100644 --- a/src/math/__math_invalid.c +++ b/src/math/__math_invalid.c @@ -4,3 +4,11 @@ double __math_invalid(double x) { return (x - x) / (x - x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_invalidf.c b/src/math/__math_invalidf.c index 357d4b12..77f69f66 100644 --- a/src/math/__math_invalidf.c +++ b/src/math/__math_invalidf.c @@ -4,3 +4,11 @@ float __math_invalidf(float x) { return (x - x) / (x - x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_invalidl.c b/src/math/__math_invalidl.c index 1fca99de..92cd5c2f 100644 --- a/src/math/__math_invalidl.c +++ b/src/math/__math_invalidl.c @@ -7,3 +7,11 @@ long double __math_invalidl(long double x) return (x - x) / (x - x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_oflow.c b/src/math/__math_oflow.c index c85dbf98..07117f68 100644 --- a/src/math/__math_oflow.c +++ b/src/math/__math_oflow.c @@ -4,3 +4,11 @@ double __math_oflow(uint32_t sign) { return __math_xflow(sign, 0x1p769); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_oflowf.c b/src/math/__math_oflowf.c index fa7d0620..294a4cb4 100644 --- a/src/math/__math_oflowf.c +++ b/src/math/__math_oflowf.c @@ -4,3 +4,11 @@ float __math_oflowf(uint32_t sign) { return __math_xflowf(sign, 0x1p97f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_uflow.c b/src/math/__math_uflow.c index b90594ae..1a1ed53e 100644 --- a/src/math/__math_uflow.c +++ b/src/math/__math_uflow.c @@ -4,3 +4,11 @@ double __math_uflow(uint32_t sign) { return __math_xflow(sign, 0x1p-767); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_uflowf.c b/src/math/__math_uflowf.c index 94d50f2b..3da4015d 100644 --- a/src/math/__math_uflowf.c +++ b/src/math/__math_uflowf.c @@ -4,3 +4,11 @@ float __math_uflowf(uint32_t sign) { return __math_xflowf(sign, 0x1p-95f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_xflow.c b/src/math/__math_xflow.c index 744203c4..7b79baa0 100644 --- a/src/math/__math_xflow.c +++ b/src/math/__math_xflow.c @@ -4,3 +4,11 @@ double __math_xflow(uint32_t sign, double y) { return eval_as_double(fp_barrier(sign ? -y : y) * y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__math_xflowf.c b/src/math/__math_xflowf.c index f2c84784..359b4618 100644 --- a/src/math/__math_xflowf.c +++ b/src/math/__math_xflowf.c @@ -4,3 +4,11 @@ float __math_xflowf(uint32_t sign, float y) { return eval_as_float(fp_barrierf(sign ? -y : y) * y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__polevll.c b/src/math/__polevll.c index ce1a8404..f7c7b684 100644 --- a/src/math/__polevll.c +++ b/src/math/__polevll.c @@ -91,3 +91,11 @@ long double __p1evll(long double x, const long double *P, int n) return y; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__rem_pio2.c b/src/math/__rem_pio2.c index dcf672fb..992fc1b8 100644 --- a/src/math/__rem_pio2.c +++ b/src/math/__rem_pio2.c @@ -188,3 +188,11 @@ medium: y[1] = ty[1]; return n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__rem_pio2_large.c b/src/math/__rem_pio2_large.c index 958f28c2..0fa1d611 100644 --- a/src/math/__rem_pio2_large.c +++ b/src/math/__rem_pio2_large.c @@ -440,3 +440,11 @@ recompute: } return n&7; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__rem_pio2f.c b/src/math/__rem_pio2f.c index e6765643..d89f5e62 100644 --- a/src/math/__rem_pio2f.c +++ b/src/math/__rem_pio2f.c @@ -84,3 +84,11 @@ int __rem_pio2f(float x, double *y) *y = ty[0]; return n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__rem_pio2l.c b/src/math/__rem_pio2l.c index 236b2def..2799e6cd 100644 --- a/src/math/__rem_pio2l.c +++ b/src/math/__rem_pio2l.c @@ -153,3 +153,11 @@ int __rem_pio2l(long double x, long double *y) return n; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__signbit.c b/src/math/__signbit.c index e700b6b7..edfb7d38 100644 --- a/src/math/__signbit.c +++ b/src/math/__signbit.c @@ -11,3 +11,11 @@ int __signbit(double x) } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__signbitf.c b/src/math/__signbitf.c index 40ad3cfd..3288f887 100644 --- a/src/math/__signbitf.c +++ b/src/math/__signbitf.c @@ -9,3 +9,11 @@ int __signbitf(float x) } y = { x }; return y.i>>31; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__signbitl.c b/src/math/__signbitl.c index 63b3dc5a..179fceeb 100644 --- a/src/math/__signbitl.c +++ b/src/math/__signbitl.c @@ -12,3 +12,11 @@ int __signbitl(long double x) return __signbit(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__sin.c b/src/math/__sin.c index 40309496..3cb99c25 100644 --- a/src/math/__sin.c +++ b/src/math/__sin.c @@ -62,3 +62,11 @@ double __sin(double x, double y, int iy) else return x - ((z*(0.5*y - v*r) - y) - v*S1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__sindf.c b/src/math/__sindf.c index 8fec2a3f..1691d620 100644 --- a/src/math/__sindf.c +++ b/src/math/__sindf.c @@ -34,3 +34,11 @@ float __sindf(double x) s = z*x; return (x + s*(S1 + z*S2)) + s*w*r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__sinl.c b/src/math/__sinl.c index 2525bbe8..6748969e 100644 --- a/src/math/__sinl.c +++ b/src/math/__sinl.c @@ -76,3 +76,11 @@ long double __sinl(long double x, long double y, int iy) return x-((z*(0.5*y-v*r)-y)-v*S1); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__tan.c b/src/math/__tan.c index 8019844d..2c67fd3b 100644 --- a/src/math/__tan.c +++ b/src/math/__tan.c @@ -108,3 +108,11 @@ double __tan(double x, double y, int odd) SET_LOW_WORD(a0, 0); return a0 + a*(1.0 + a0*w0 + a0*v); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__tandf.c b/src/math/__tandf.c index 25047eee..897b0825 100644 --- a/src/math/__tandf.c +++ b/src/math/__tandf.c @@ -52,3 +52,11 @@ float __tandf(double x, int odd) r = (x + s*u) + (s*w)*(t + w*r); return odd ? -1.0/r : r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/__tanl.c b/src/math/__tanl.c index 54abc3da..8f882d53 100644 --- a/src/math/__tanl.c +++ b/src/math/__tanl.c @@ -141,3 +141,11 @@ long double __tanl(long double x, long double y, int odd) { return t + a * (s + t * v); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/acos.c b/src/math/acos.c index ea9c87bf..e581e0dd 100644 --- a/src/math/acos.c +++ b/src/math/acos.c @@ -99,3 +99,11 @@ double acos(double x) w = R(z)*s+c; return 2*(df+w); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/acosf.c b/src/math/acosf.c index 8ee1a71d..c38328f2 100644 --- a/src/math/acosf.c +++ b/src/math/acosf.c @@ -69,3 +69,11 @@ float acosf(float x) w = R(z)*s+c; return 2*(df+w); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/acosh.c b/src/math/acosh.c index badbf908..ae8046bd 100644 --- a/src/math/acosh.c +++ b/src/math/acosh.c @@ -22,3 +22,11 @@ double acosh(double x) /* |x| >= 0x1p26 or nan */ return log(x) + 0.693147180559945309417232121458176568; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/acoshf.c b/src/math/acoshf.c index b773d48e..51f3ca26 100644 --- a/src/math/acoshf.c +++ b/src/math/acoshf.c @@ -24,3 +24,11 @@ float acoshf(float x) /* x >= 0x1p12 or x <= -2 or nan */ return logf(x) + 0.693147180559945309417232121458176568f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/acoshl.c b/src/math/acoshl.c index 943cec17..708fbffc 100644 --- a/src/math/acoshl.c +++ b/src/math/acoshl.c @@ -31,3 +31,11 @@ long double acoshl(long double x) return acosh(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/asin.c b/src/math/asin.c index c926b188..dbd95382 100644 --- a/src/math/asin.c +++ b/src/math/asin.c @@ -105,3 +105,11 @@ double asin(double x) return -x; return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/asinf.c b/src/math/asinf.c index bcd304a3..43ea0a4c 100644 --- a/src/math/asinf.c +++ b/src/math/asinf.c @@ -59,3 +59,11 @@ float asinf(float x) return -x; return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/asinh.c b/src/math/asinh.c index 0829f228..a60e5409 100644 --- a/src/math/asinh.c +++ b/src/math/asinh.c @@ -26,3 +26,11 @@ double asinh(double x) } return s ? -x : x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/asinhf.c b/src/math/asinhf.c index fc9f0911..e6f2396d 100644 --- a/src/math/asinhf.c +++ b/src/math/asinhf.c @@ -26,3 +26,11 @@ float asinhf(float x) } return s ? -x : x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/asinhl.c b/src/math/asinhl.c index 8635f52e..5a333321 100644 --- a/src/math/asinhl.c +++ b/src/math/asinhl.c @@ -39,3 +39,11 @@ long double asinhl(long double x) return asinh(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/atan.c b/src/math/atan.c index 63b0ab25..4ad4a83c 100644 --- a/src/math/atan.c +++ b/src/math/atan.c @@ -114,3 +114,11 @@ double atan(double x) z = atanhi[id] - (x*(s1+s2) - atanlo[id] - x); return sign ? -z : z; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/atan2.c b/src/math/atan2.c index 5a1903c6..d60a431e 100644 --- a/src/math/atan2.c +++ b/src/math/atan2.c @@ -105,3 +105,11 @@ double atan2(double y, double x) return (z-pi_lo) - pi; /* atan(-,-) */ } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/atan2f.c b/src/math/atan2f.c index c634d00f..7b9a1766 100644 --- a/src/math/atan2f.c +++ b/src/math/atan2f.c @@ -81,3 +81,11 @@ float atan2f(float y, float x) return (z-pi_lo) - pi; /* atan(-,-) */ } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/atanf.c b/src/math/atanf.c index 178341b6..93dc7468 100644 --- a/src/math/atanf.c +++ b/src/math/atanf.c @@ -92,3 +92,11 @@ float atanf(float x) z = atanhi[id] - ((x*(s1+s2) - atanlo[id]) - x); return sign ? -z : z; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/atanh.c b/src/math/atanh.c index 63a035d7..b0f489f3 100644 --- a/src/math/atanh.c +++ b/src/math/atanh.c @@ -27,3 +27,11 @@ double atanh(double x) } return s ? -y : y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/atanhf.c b/src/math/atanhf.c index 65f07c0f..01d16dde 100644 --- a/src/math/atanhf.c +++ b/src/math/atanhf.c @@ -26,3 +26,11 @@ float atanhf(float x) } return s ? -y : y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/atanhl.c b/src/math/atanhl.c index 87cd1cdb..e991ec65 100644 --- a/src/math/atanhl.c +++ b/src/math/atanhl.c @@ -33,3 +33,11 @@ long double atanhl(long double x) return s ? -x : x; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/cbrt.c b/src/math/cbrt.c index 7599d3e3..cc777359 100644 --- a/src/math/cbrt.c +++ b/src/math/cbrt.c @@ -101,3 +101,11 @@ double cbrt(double x) t = t+t*r; /* error <= 0.5 + 0.5/3 + epsilon */ return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/cbrtf.c b/src/math/cbrtf.c index 89c2c865..b0c35fff 100644 --- a/src/math/cbrtf.c +++ b/src/math/cbrtf.c @@ -64,3 +64,11 @@ float cbrtf(float x) /* rounding to 24 bits is perfect in round-to-nearest mode */ return T; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/cbrtl.c b/src/math/cbrtl.c index ceff9136..808f5b52 100644 --- a/src/math/cbrtl.c +++ b/src/math/cbrtl.c @@ -122,3 +122,11 @@ long double cbrtl(long double x) return t; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ceil.c b/src/math/ceil.c index b13e6f2d..d7b57d63 100644 --- a/src/math/ceil.c +++ b/src/math/ceil.c @@ -29,3 +29,11 @@ double ceil(double x) return x + y + 1; return x + y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ceilf.c b/src/math/ceilf.c index 869835f3..40a49e9e 100644 --- a/src/math/ceilf.c +++ b/src/math/ceilf.c @@ -25,3 +25,11 @@ float ceilf(float x) } return u.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/copysign.c b/src/math/copysign.c index b09331b6..129856f9 100644 --- a/src/math/copysign.c +++ b/src/math/copysign.c @@ -6,3 +6,11 @@ double copysign(double x, double y) { ux.i |= uy.i & 1ULL<<63; return ux.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/copysignf.c b/src/math/copysignf.c index 0af6ae9b..c4122c8e 100644 --- a/src/math/copysignf.c +++ b/src/math/copysignf.c @@ -8,3 +8,11 @@ float copysignf(float x, float y) ux.i |= uy.i & 0x80000000; return ux.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/copysignl.c b/src/math/copysignl.c index 9dd933cf..78eb9387 100644 --- a/src/math/copysignl.c +++ b/src/math/copysignl.c @@ -14,3 +14,11 @@ long double copysignl(long double x, long double y) return ux.f; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/cos.c b/src/math/cos.c index ee97f68b..b31f3fbb 100644 --- a/src/math/cos.c +++ b/src/math/cos.c @@ -75,3 +75,11 @@ double cos(double x) return __sin(y[0], y[1], 1); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/cosf.c b/src/math/cosf.c index 23f3e5bf..8c4f67e5 100644 --- a/src/math/cosf.c +++ b/src/math/cosf.c @@ -76,3 +76,11 @@ float cosf(float x) return __sindf(y); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/cosh.c b/src/math/cosh.c index 490c15fb..6e9f19f7 100644 --- a/src/math/cosh.c +++ b/src/math/cosh.c @@ -38,3 +38,11 @@ double cosh(double x) t = __expo2(x, 1.0); return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/coshf.c b/src/math/coshf.c index e739cff9..9d039f27 100644 --- a/src/math/coshf.c +++ b/src/math/coshf.c @@ -31,3 +31,11 @@ float coshf(float x) t = __expo2f(x, 1.0f); return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/coshl.c b/src/math/coshl.c index 06a56fe3..088ced58 100644 --- a/src/math/coshl.c +++ b/src/math/coshl.c @@ -45,3 +45,11 @@ long double coshl(long double x) return cosh(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/cosl.c b/src/math/cosl.c index 79c41c77..aa90bd67 100644 --- a/src/math/cosl.c +++ b/src/math/cosl.c @@ -37,3 +37,11 @@ long double cosl(long double x) } } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/erf.c b/src/math/erf.c index 2f30a298..9b54221a 100644 --- a/src/math/erf.c +++ b/src/math/erf.c @@ -271,3 +271,11 @@ double erfc(double x) } return sign ? 2 - 0x1p-1022 : 0x1p-1022*0x1p-1022; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/erff.c b/src/math/erff.c index ed5f3975..86fba5d5 100644 --- a/src/math/erff.c +++ b/src/math/erff.c @@ -181,3 +181,11 @@ float erfcf(float x) } return sign ? 2 - 0x1p-120f : 0x1p-120f*0x1p-120f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/erfl.c b/src/math/erfl.c index e267c231..03093b0c 100644 --- a/src/math/erfl.c +++ b/src/math/erfl.c @@ -351,3 +351,11 @@ long double erfcl(long double x) return erfc(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp.c b/src/math/exp.c index b764d73c..011ea65b 100644 --- a/src/math/exp.c +++ b/src/math/exp.c @@ -132,3 +132,11 @@ double exp(double x) is no spurious underflow here even without fma. */ return eval_as_double(scale + scale * tmp); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp10.c b/src/math/exp10.c index 26899eba..1ff4a713 100644 --- a/src/math/exp10.c +++ b/src/math/exp10.c @@ -22,3 +22,11 @@ double exp10(double x) } weak_alias(exp10, pow10); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp10f.c b/src/math/exp10f.c index d009f0a8..86ca9210 100644 --- a/src/math/exp10f.c +++ b/src/math/exp10f.c @@ -20,3 +20,11 @@ float exp10f(float x) } weak_alias(exp10f, pow10f); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp10l.c b/src/math/exp10l.c index f3da1a08..f408a0a3 100644 --- a/src/math/exp10l.c +++ b/src/math/exp10l.c @@ -30,3 +30,11 @@ long double exp10l(long double x) #endif weak_alias(exp10l, pow10l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp2.c b/src/math/exp2.c index e0ff54bd..053808e8 100644 --- a/src/math/exp2.c +++ b/src/math/exp2.c @@ -119,3 +119,11 @@ double exp2(double x) is no spurious underflow here even without fma. */ return eval_as_double(scale + scale * tmp); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp2f.c b/src/math/exp2f.c index 0360482c..85e99472 100644 --- a/src/math/exp2f.c +++ b/src/math/exp2f.c @@ -67,3 +67,11 @@ float exp2f(float x) y = y * s; return eval_as_float(y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp2f_data.c b/src/math/exp2f_data.c index be324727..289c497f 100644 --- a/src/math/exp2f_data.c +++ b/src/math/exp2f_data.c @@ -33,3 +33,11 @@ const struct exp2f_data __exp2f_data = { 0x1.c6af84b912394p-5/N/N/N, 0x1.ebfce50fac4f3p-3/N/N, 0x1.62e42ff0c52d6p-1/N, }, }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/exp_data.c b/src/math/exp_data.c index 21be0146..b5e45dbd 100644 --- a/src/math/exp_data.c +++ b/src/math/exp_data.c @@ -180,3 +180,11 @@ const struct exp_data __exp_data = { 0x3c5305c14160cc89, 0x3feff3c22b8f71f1, }, }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/expf.c b/src/math/expf.c index f9fbf8e7..86161268 100644 --- a/src/math/expf.c +++ b/src/math/expf.c @@ -78,3 +78,11 @@ float expf(float x) y = y * s; return eval_as_float(y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/expm1.c b/src/math/expm1.c index ac1e61e4..b005ad00 100644 --- a/src/math/expm1.c +++ b/src/math/expm1.c @@ -199,3 +199,11 @@ double expm1(double x) y = (x-(e+u.f)+1)*twopk; return y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/expm1f.c b/src/math/expm1f.c index 09a41afe..dc2c599c 100644 --- a/src/math/expm1f.c +++ b/src/math/expm1f.c @@ -108,3 +108,11 @@ float expm1f(float x) y = (x-(e+u.f)+1)*twopk; return y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fdim.c b/src/math/fdim.c index 95854606..97afec9c 100644 --- a/src/math/fdim.c +++ b/src/math/fdim.c @@ -8,3 +8,11 @@ double fdim(double x, double y) return y; return x > y ? x - y : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fdimf.c b/src/math/fdimf.c index 543c3648..73251cde 100644 --- a/src/math/fdimf.c +++ b/src/math/fdimf.c @@ -8,3 +8,11 @@ float fdimf(float x, float y) return y; return x > y ? x - y : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fdiml.c b/src/math/fdiml.c index 62e29b7d..d8a973fc 100644 --- a/src/math/fdiml.c +++ b/src/math/fdiml.c @@ -16,3 +16,11 @@ long double fdiml(long double x, long double y) return x > y ? x - y : 0; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/finite.c b/src/math/finite.c index 25a0575f..46776110 100644 --- a/src/math/finite.c +++ b/src/math/finite.c @@ -5,3 +5,11 @@ int finite(double x) { return isfinite(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/finitef.c b/src/math/finitef.c index 2c4c7714..a7b78409 100644 --- a/src/math/finitef.c +++ b/src/math/finitef.c @@ -5,3 +5,11 @@ int finitef(float x) { return isfinite(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/floor.c b/src/math/floor.c index 14a31cd8..14c1822f 100644 --- a/src/math/floor.c +++ b/src/math/floor.c @@ -29,3 +29,11 @@ double floor(double x) return x + y - 1; return x + y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/floorf.c b/src/math/floorf.c index dceec739..d91524b7 100644 --- a/src/math/floorf.c +++ b/src/math/floorf.c @@ -25,3 +25,11 @@ float floorf(float x) } return u.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fmal.c b/src/math/fmal.c index 4506aac6..375864c1 100644 --- a/src/math/fmal.c +++ b/src/math/fmal.c @@ -291,3 +291,11 @@ long double fmal(long double x, long double y, long double z) return add_and_denormalize(r.hi, adj, spread); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fmax.c b/src/math/fmax.c index 94f0caa1..ee52f3fc 100644 --- a/src/math/fmax.c +++ b/src/math/fmax.c @@ -11,3 +11,11 @@ double fmax(double x, double y) return signbit(x) ? y : x; return x < y ? y : x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fmaxf.c b/src/math/fmaxf.c index 695d8179..3466618a 100644 --- a/src/math/fmaxf.c +++ b/src/math/fmaxf.c @@ -11,3 +11,11 @@ float fmaxf(float x, float y) return signbit(x) ? y : x; return x < y ? y : x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fmaxl.c b/src/math/fmaxl.c index 4b03158e..224ece1e 100644 --- a/src/math/fmaxl.c +++ b/src/math/fmaxl.c @@ -19,3 +19,11 @@ long double fmaxl(long double x, long double y) return x < y ? y : x; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fmin.c b/src/math/fmin.c index 08a8fd17..bd9d7f77 100644 --- a/src/math/fmin.c +++ b/src/math/fmin.c @@ -11,3 +11,11 @@ double fmin(double x, double y) return signbit(x) ? x : y; return x < y ? x : y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fminf.c b/src/math/fminf.c index 3573c7de..d43d6593 100644 --- a/src/math/fminf.c +++ b/src/math/fminf.c @@ -11,3 +11,11 @@ float fminf(float x, float y) return signbit(x) ? x : y; return x < y ? x : y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fminl.c b/src/math/fminl.c index 69bc24a7..4a3ea061 100644 --- a/src/math/fminl.c +++ b/src/math/fminl.c @@ -19,3 +19,11 @@ long double fminl(long double x, long double y) return x < y ? x : y; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fmod.c b/src/math/fmod.c index 6849722b..ebd43412 100644 --- a/src/math/fmod.c +++ b/src/math/fmod.c @@ -66,3 +66,11 @@ double fmod(double x, double y) ux.i = uxi; return ux.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/fmodf.c b/src/math/fmodf.c index ff58f933..fccd9f30 100644 --- a/src/math/fmodf.c +++ b/src/math/fmodf.c @@ -63,3 +63,11 @@ float fmodf(float x, float y) ux.i = uxi; return ux.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/frexp.c b/src/math/frexp.c index 27b6266e..4ced6bd2 100644 --- a/src/math/frexp.c +++ b/src/math/frexp.c @@ -21,3 +21,11 @@ double frexp(double x, int *e) y.i |= 0x3fe0000000000000ull; return y.d; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/frexpf.c b/src/math/frexpf.c index 07870975..c78af9f2 100644 --- a/src/math/frexpf.c +++ b/src/math/frexpf.c @@ -21,3 +21,11 @@ float frexpf(float x, int *e) y.i |= 0x3f000000ul; return y.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/frexpl.c b/src/math/frexpl.c index 3c1b5537..51dd82e6 100644 --- a/src/math/frexpl.c +++ b/src/math/frexpl.c @@ -27,3 +27,11 @@ long double frexpl(long double x, int *e) return u.f; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/hypot.c b/src/math/hypot.c index 6071bf1e..413aca38 100644 --- a/src/math/hypot.c +++ b/src/math/hypot.c @@ -65,3 +65,11 @@ double hypot(double x, double y) sq(&hy, &ly, y); return z*sqrt(ly+lx+hy+hx); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/hypotf.c b/src/math/hypotf.c index 2fc214b7..603648f5 100644 --- a/src/math/hypotf.c +++ b/src/math/hypotf.c @@ -33,3 +33,11 @@ float hypotf(float x, float y) } return z*sqrtf((double)x*x + (double)y*y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/hypotl.c b/src/math/hypotl.c index 479aa92c..6ee016ec 100644 --- a/src/math/hypotl.c +++ b/src/math/hypotl.c @@ -64,3 +64,11 @@ long double hypotl(long double x, long double y) return z*sqrtl(ly+lx+hy+hx); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ilogb.c b/src/math/ilogb.c index 64d40154..a12a1b2e 100644 --- a/src/math/ilogb.c +++ b/src/math/ilogb.c @@ -24,3 +24,11 @@ int ilogb(double x) } return e - 0x3ff; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ilogbf.c b/src/math/ilogbf.c index e23ba209..a83f1b95 100644 --- a/src/math/ilogbf.c +++ b/src/math/ilogbf.c @@ -24,3 +24,11 @@ int ilogbf(float x) } return e - 0x7f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ilogbl.c b/src/math/ilogbl.c index 7b1a9cf8..a77c9816 100644 --- a/src/math/ilogbl.c +++ b/src/math/ilogbl.c @@ -53,3 +53,11 @@ int ilogbl(long double x) return e - 0x3fff; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/j0.c b/src/math/j0.c index d722d942..256bae35 100644 --- a/src/math/j0.c +++ b/src/math/j0.c @@ -373,3 +373,11 @@ static double qzero(double x) s = 1.0+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5]))))); return (-.125 + r/s)/x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/j0f.c b/src/math/j0f.c index fab554a3..5e94af0c 100644 --- a/src/math/j0f.c +++ b/src/math/j0f.c @@ -312,3 +312,11 @@ static float qzerof(float x) s = 1.0f+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5]))))); return (-.125f + r/s)/x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/j1.c b/src/math/j1.c index df724d17..efaf07d2 100644 --- a/src/math/j1.c +++ b/src/math/j1.c @@ -360,3 +360,11 @@ static double qone(double x) s = 1.0+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5]))))); return (.375 + r/s)/x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/j1f.c b/src/math/j1f.c index 3434c53d..c01b008e 100644 --- a/src/math/j1f.c +++ b/src/math/j1f.c @@ -308,3 +308,11 @@ static float qonef(float x) s = 1.0f+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5]))))); return (.375f + r/s)/x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/jn.c b/src/math/jn.c index 4878a54f..21ca5625 100644 --- a/src/math/jn.c +++ b/src/math/jn.c @@ -278,3 +278,11 @@ double yn(int n, double x) } return sign ? -b : b; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/jnf.c b/src/math/jnf.c index f63c062f..12bf66dd 100644 --- a/src/math/jnf.c +++ b/src/math/jnf.c @@ -200,3 +200,11 @@ float ynf(int n, float x) } return sign ? -b : b; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ldexp.c b/src/math/ldexp.c index f4d1cd6a..79c486b0 100644 --- a/src/math/ldexp.c +++ b/src/math/ldexp.c @@ -4,3 +4,11 @@ double ldexp(double x, int n) { return scalbn(x, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ldexpf.c b/src/math/ldexpf.c index 3bad5f39..10f5138b 100644 --- a/src/math/ldexpf.c +++ b/src/math/ldexpf.c @@ -4,3 +4,11 @@ float ldexpf(float x, int n) { return scalbnf(x, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/ldexpl.c b/src/math/ldexpl.c index fd145ccc..79187b26 100644 --- a/src/math/ldexpl.c +++ b/src/math/ldexpl.c @@ -4,3 +4,11 @@ long double ldexpl(long double x, int n) { return scalbnl(x, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lgamma.c b/src/math/lgamma.c index 2fc9b478..d0011988 100644 --- a/src/math/lgamma.c +++ b/src/math/lgamma.c @@ -5,3 +5,11 @@ double lgamma(double x) { return __lgamma_r(x, &__signgam); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lgamma_r.c b/src/math/lgamma_r.c index f9984cd0..dcf070d3 100644 --- a/src/math/lgamma_r.c +++ b/src/math/lgamma_r.c @@ -281,3 +281,11 @@ double __lgamma_r(double x, int *signgamp) } weak_alias(__lgamma_r, lgamma_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lgammaf.c b/src/math/lgammaf.c index 2ae051d0..5ef0a905 100644 --- a/src/math/lgammaf.c +++ b/src/math/lgammaf.c @@ -5,3 +5,11 @@ float lgammaf(float x) { return __lgammaf_r(x, &__signgam); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lgammaf_r.c b/src/math/lgammaf_r.c index 3f353f19..7605ad15 100644 --- a/src/math/lgammaf_r.c +++ b/src/math/lgammaf_r.c @@ -216,3 +216,11 @@ float __lgammaf_r(float x, int *signgamp) } weak_alias(__lgammaf_r, lgammaf_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lgammal.c b/src/math/lgammal.c index abbd4fc6..f64f6d84 100644 --- a/src/math/lgammal.c +++ b/src/math/lgammal.c @@ -351,3 +351,11 @@ long double lgammal(long double x) } weak_alias(__lgammal_r, lgammal_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/llround.c b/src/math/llround.c index 4d94787d..4bb2d6df 100644 --- a/src/math/llround.c +++ b/src/math/llround.c @@ -4,3 +4,11 @@ long long llround(double x) { return round(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/llroundf.c b/src/math/llroundf.c index 19eb77ee..2fbd9607 100644 --- a/src/math/llroundf.c +++ b/src/math/llroundf.c @@ -4,3 +4,11 @@ long long llroundf(float x) { return roundf(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/llroundl.c b/src/math/llroundl.c index 2c2ee5ec..ae54e1b2 100644 --- a/src/math/llroundl.c +++ b/src/math/llroundl.c @@ -4,3 +4,11 @@ long long llroundl(long double x) { return roundl(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log.c b/src/math/log.c index cc52585a..e369f2ae 100644 --- a/src/math/log.c +++ b/src/math/log.c @@ -110,3 +110,11 @@ double log(double x) r * r2 * (A[1] + r * A[2] + r2 * (A[3] + r * A[4])) + hi; return eval_as_double(y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log10.c b/src/math/log10.c index 81026876..d5e7bf71 100644 --- a/src/math/log10.c +++ b/src/math/log10.c @@ -99,3 +99,11 @@ double log10(double x) return val_lo + val_hi; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log10f.c b/src/math/log10f.c index 9ca2f017..9fdde7d1 100644 --- a/src/math/log10f.c +++ b/src/math/log10f.c @@ -75,3 +75,11 @@ float log10f(float x) dk = k; return dk*log10_2lo + (lo+hi)*ivln10lo + lo*ivln10hi + hi*ivln10hi + dk*log10_2hi; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log1p.c b/src/math/log1p.c index 00971349..67e7e403 100644 --- a/src/math/log1p.c +++ b/src/math/log1p.c @@ -120,3 +120,11 @@ double log1p(double x) dk = k; return s*(hfsq+R) + (dk*ln2_lo+c) - hfsq + f + dk*ln2_hi; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log1pf.c b/src/math/log1pf.c index 23985c35..1ba9d200 100644 --- a/src/math/log1pf.c +++ b/src/math/log1pf.c @@ -75,3 +75,11 @@ float log1pf(float x) dk = k; return s*(hfsq+R) + (dk*ln2_lo+c) - hfsq + f + dk*ln2_hi; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log2.c b/src/math/log2.c index 1276ed4e..f665362d 100644 --- a/src/math/log2.c +++ b/src/math/log2.c @@ -120,3 +120,11 @@ double log2(double x) y = lo + r2 * p + hi; return eval_as_double(y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log2_data.c b/src/math/log2_data.c index 3dd1ca51..572a4292 100644 --- a/src/math/log2_data.c +++ b/src/math/log2_data.c @@ -199,3 +199,11 @@ that logc + poly(z/c - 1) has small error, however near x == 1 when }, #endif }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log2f.c b/src/math/log2f.c index c368f88f..a536e4bc 100644 --- a/src/math/log2f.c +++ b/src/math/log2f.c @@ -70,3 +70,11 @@ float log2f(float x) y = y * r2 + p; return eval_as_float(y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log2f_data.c b/src/math/log2f_data.c index 24e450f1..3b3795fc 100644 --- a/src/math/log2f_data.c +++ b/src/math/log2f_data.c @@ -31,3 +31,11 @@ const struct log2f_data __log2f_data = { 0x1.715475f35c8b8p0, } }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/log_data.c b/src/math/log_data.c index 1a6ec712..62c37cc0 100644 --- a/src/math/log_data.c +++ b/src/math/log_data.c @@ -326,3 +326,11 @@ that logc + poly(z/c - 1) has small error, however near x == 1 when }, #endif }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/logb.c b/src/math/logb.c index 7f8bdfae..be796dbf 100644 --- a/src/math/logb.c +++ b/src/math/logb.c @@ -15,3 +15,11 @@ double logb(double x) return -1/(x*x); return ilogb(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/logbf.c b/src/math/logbf.c index a0a0b5ed..4633a503 100644 --- a/src/math/logbf.c +++ b/src/math/logbf.c @@ -8,3 +8,11 @@ float logbf(float x) return -1/(x*x); return ilogbf(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/logbl.c b/src/math/logbl.c index 962973a7..b5b7c392 100644 --- a/src/math/logbl.c +++ b/src/math/logbl.c @@ -14,3 +14,11 @@ long double logbl(long double x) return ilogbl(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/logf.c b/src/math/logf.c index e4c2237c..7e901158 100644 --- a/src/math/logf.c +++ b/src/math/logf.c @@ -69,3 +69,11 @@ float logf(float x) y = y * r2 + (y0 + r); return eval_as_float(y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/logf_data.c b/src/math/logf_data.c index 857221f7..8d0d1b45 100644 --- a/src/math/logf_data.c +++ b/src/math/logf_data.c @@ -31,3 +31,11 @@ const struct logf_data __logf_data = { -0x1.00ea348b88334p-2, 0x1.5575b0be00b6ap-2, -0x1.ffffef20a4123p-2, } }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lround.c b/src/math/lround.c index b8b79547..a8528334 100644 --- a/src/math/lround.c +++ b/src/math/lround.c @@ -4,3 +4,11 @@ long lround(double x) { return round(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lroundf.c b/src/math/lroundf.c index c4707e7d..c7d56174 100644 --- a/src/math/lroundf.c +++ b/src/math/lroundf.c @@ -4,3 +4,11 @@ long lroundf(float x) { return roundf(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/lroundl.c b/src/math/lroundl.c index 094fdf64..eab6b216 100644 --- a/src/math/lroundl.c +++ b/src/math/lroundl.c @@ -4,3 +4,11 @@ long lroundl(long double x) { return roundl(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/modf.c b/src/math/modf.c index 1c8a1db9..6cb8185a 100644 --- a/src/math/modf.c +++ b/src/math/modf.c @@ -32,3 +32,11 @@ double modf(double x, double *iptr) *iptr = u.f; return x - u.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/modff.c b/src/math/modff.c index 639514ef..322d078e 100644 --- a/src/math/modff.c +++ b/src/math/modff.c @@ -32,3 +32,11 @@ float modff(float x, float *iptr) *iptr = u.f; return x - u.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/modfl.c b/src/math/modfl.c index a47b1924..3343b798 100644 --- a/src/math/modfl.c +++ b/src/math/modfl.c @@ -51,3 +51,11 @@ long double modfl(long double x, long double *iptr) return -y; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nan.c b/src/math/nan.c index 9e0826c7..29856062 100644 --- a/src/math/nan.c +++ b/src/math/nan.c @@ -4,3 +4,11 @@ double nan(const char *s) { return NAN; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nanf.c b/src/math/nanf.c index 752ce546..36daf41d 100644 --- a/src/math/nanf.c +++ b/src/math/nanf.c @@ -4,3 +4,11 @@ float nanf(const char *s) { return NAN; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nanl.c b/src/math/nanl.c index 969af564..4f02078d 100644 --- a/src/math/nanl.c +++ b/src/math/nanl.c @@ -4,3 +4,11 @@ long double nanl(const char *s) { return NAN; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nearbyint.c b/src/math/nearbyint.c index f4e8aac4..2711c223 100644 --- a/src/math/nearbyint.c +++ b/src/math/nearbyint.c @@ -18,3 +18,11 @@ double nearbyint(double x) #endif return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nearbyintf.c b/src/math/nearbyintf.c index 092e9ffa..534a2716 100644 --- a/src/math/nearbyintf.c +++ b/src/math/nearbyintf.c @@ -16,3 +16,11 @@ float nearbyintf(float x) #endif return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nearbyintl.c b/src/math/nearbyintl.c index 82852492..ec3440b5 100644 --- a/src/math/nearbyintl.c +++ b/src/math/nearbyintl.c @@ -24,3 +24,11 @@ long double nearbyintl(long double x) return x; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nextafter.c b/src/math/nextafter.c index ab5795a4..ab5389fc 100644 --- a/src/math/nextafter.c +++ b/src/math/nextafter.c @@ -29,3 +29,11 @@ double nextafter(double x, double y) FORCE_EVAL(x*x + ux.f*ux.f); return ux.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nextafterf.c b/src/math/nextafterf.c index 75a09f7d..a5ff8a27 100644 --- a/src/math/nextafterf.c +++ b/src/math/nextafterf.c @@ -28,3 +28,11 @@ float nextafterf(float x, float y) FORCE_EVAL(x*x + ux.f*ux.f); return ux.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nextafterl.c b/src/math/nextafterl.c index 37e858fb..6879a17e 100644 --- a/src/math/nextafterl.c +++ b/src/math/nextafterl.c @@ -73,3 +73,11 @@ long double nextafterl(long double x, long double y) return ux.f; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nexttoward.c b/src/math/nexttoward.c index 827ee5c3..78763c1d 100644 --- a/src/math/nexttoward.c +++ b/src/math/nexttoward.c @@ -40,3 +40,11 @@ double nexttoward(double x, long double y) return ux.f; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nexttowardf.c b/src/math/nexttowardf.c index bbf172f9..6e968e9c 100644 --- a/src/math/nexttowardf.c +++ b/src/math/nexttowardf.c @@ -33,3 +33,11 @@ float nexttowardf(float x, long double y) FORCE_EVAL(x*x + ux.f*ux.f); return ux.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/nexttowardl.c b/src/math/nexttowardl.c index 67a63403..3ad7f8a4 100644 --- a/src/math/nexttowardl.c +++ b/src/math/nexttowardl.c @@ -4,3 +4,11 @@ long double nexttowardl(long double x, long double y) { return nextafterl(x, y); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/pow.c b/src/math/pow.c index 694c2ef6..8d888670 100644 --- a/src/math/pow.c +++ b/src/math/pow.c @@ -341,3 +341,11 @@ double pow(double x, double y) #endif return exp_inline(ehi, elo, sign_bias); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/pow_data.c b/src/math/pow_data.c index 81e760de..4e60d06f 100644 --- a/src/math/pow_data.c +++ b/src/math/pow_data.c @@ -178,3 +178,11 @@ A(0x1.6e00000000000p-1, 0x1.57bf753c8d000p-2, 0x1.fadedee5d40efp-46) A(0x1.6c00000000000p-1, 0x1.5d5bddf596000p-2, -0x1.a0b2a08a465dcp-47) }, }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/powf.c b/src/math/powf.c index de8fab54..253cac4d 100644 --- a/src/math/powf.c +++ b/src/math/powf.c @@ -183,3 +183,11 @@ float powf(float x, float y) } return exp2_inline(ylogx, sign_bias); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/powf_data.c b/src/math/powf_data.c index 13e1d9a0..66fe1a20 100644 --- a/src/math/powf_data.c +++ b/src/math/powf_data.c @@ -32,3 +32,11 @@ const struct powf_log2_data __powf_log2_data = { 0x1.71547652ab82bp0 * POWF_SCALE, } }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/powl.c b/src/math/powl.c index 6f64ea71..bffd2435 100644 --- a/src/math/powl.c +++ b/src/math/powl.c @@ -528,3 +528,11 @@ long double powl(long double x, long double y) return pow(x, y); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/remainder.c b/src/math/remainder.c index 612155fe..25334a43 100644 --- a/src/math/remainder.c +++ b/src/math/remainder.c @@ -7,3 +7,11 @@ double remainder(double x, double y) } weak_alias(remainder, drem); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/remainderf.c b/src/math/remainderf.c index bf1d7b28..43966c30 100644 --- a/src/math/remainderf.c +++ b/src/math/remainderf.c @@ -7,3 +7,11 @@ float remainderf(float x, float y) } weak_alias(remainderf, dremf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/remquo.c b/src/math/remquo.c index 59d5ad57..f5fb97fc 100644 --- a/src/math/remquo.c +++ b/src/math/remquo.c @@ -80,3 +80,11 @@ end: *quo = sx^sy ? -(int)q : (int)q; return sx ? -x : x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/remquof.c b/src/math/remquof.c index 2f41ff70..fd22a8f5 100644 --- a/src/math/remquof.c +++ b/src/math/remquof.c @@ -80,3 +80,11 @@ end: *quo = sx^sy ? -(int)q : (int)q; return sx ? -x : x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/rint.c b/src/math/rint.c index fbba390e..7758ad67 100644 --- a/src/math/rint.c +++ b/src/math/rint.c @@ -26,3 +26,11 @@ double rint(double x) return s ? -0.0 : 0; return y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/rintf.c b/src/math/rintf.c index 9047688d..9b3c1366 100644 --- a/src/math/rintf.c +++ b/src/math/rintf.c @@ -28,3 +28,11 @@ float rintf(float x) return s ? -0.0f : 0.0f; return y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/round.c b/src/math/round.c index 130d58d2..f7287ff2 100644 --- a/src/math/round.c +++ b/src/math/round.c @@ -33,3 +33,11 @@ double round(double x) y = -y; return y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/roundf.c b/src/math/roundf.c index e8210af5..bbe4566c 100644 --- a/src/math/roundf.c +++ b/src/math/roundf.c @@ -34,3 +34,11 @@ float roundf(float x) y = -y; return y; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/roundl.c b/src/math/roundl.c index f4ff6820..90e13175 100644 --- a/src/math/roundl.c +++ b/src/math/roundl.c @@ -35,3 +35,11 @@ long double roundl(long double x) return y; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalb.c b/src/math/scalb.c index efe69e60..c4ec0273 100644 --- a/src/math/scalb.c +++ b/src/math/scalb.c @@ -33,3 +33,11 @@ double scalb(double x, double fn) if (-fn > 65000.0) return scalbn(x,-65000); return scalbn(x,(int)fn); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalbf.c b/src/math/scalbf.c index f44ed5b6..519c92c8 100644 --- a/src/math/scalbf.c +++ b/src/math/scalbf.c @@ -30,3 +30,11 @@ float scalbf(float x, float fn) if (-fn > 65000.0f) return scalbnf(x,-65000); return scalbnf(x,(int)fn); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalbln.c b/src/math/scalbln.c index e6f3f195..f7b8408e 100644 --- a/src/math/scalbln.c +++ b/src/math/scalbln.c @@ -9,3 +9,11 @@ double scalbln(double x, long n) n = INT_MIN; return scalbn(x, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalblnf.c b/src/math/scalblnf.c index d8e8166b..2b68f7c4 100644 --- a/src/math/scalblnf.c +++ b/src/math/scalblnf.c @@ -9,3 +9,11 @@ float scalblnf(float x, long n) n = INT_MIN; return scalbnf(x, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalblnl.c b/src/math/scalblnl.c index 854c51c4..d95f5a75 100644 --- a/src/math/scalblnl.c +++ b/src/math/scalblnl.c @@ -17,3 +17,11 @@ long double scalblnl(long double x, long n) return scalbnl(x, n); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalbn.c b/src/math/scalbn.c index 182f5610..cedb6aff 100644 --- a/src/math/scalbn.c +++ b/src/math/scalbn.c @@ -31,3 +31,11 @@ double scalbn(double x, int n) x = y * u.f; return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalbnf.c b/src/math/scalbnf.c index a5ad208b..85ca147f 100644 --- a/src/math/scalbnf.c +++ b/src/math/scalbnf.c @@ -29,3 +29,11 @@ float scalbnf(float x, int n) x = y * u.f; return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/scalbnl.c b/src/math/scalbnl.c index db44dab0..6f3aa55b 100644 --- a/src/math/scalbnl.c +++ b/src/math/scalbnl.c @@ -34,3 +34,11 @@ long double scalbnl(long double x, int n) return x * u.f; } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/signgam.c b/src/math/signgam.c index ee331b27..c55b0a0b 100644 --- a/src/math/signgam.c +++ b/src/math/signgam.c @@ -4,3 +4,11 @@ int __signgam = 0; weak_alias(__signgam, signgam); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/significand.c b/src/math/significand.c index 40d9aa9f..5d632852 100644 --- a/src/math/significand.c +++ b/src/math/significand.c @@ -5,3 +5,11 @@ double significand(double x) { return scalbn(x, -ilogb(x)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/significandf.c b/src/math/significandf.c index 8a697e1a..623919a4 100644 --- a/src/math/significandf.c +++ b/src/math/significandf.c @@ -5,3 +5,11 @@ float significandf(float x) { return scalbnf(x, -ilogbf(x)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sin.c b/src/math/sin.c index 055e215b..e15af0bb 100644 --- a/src/math/sin.c +++ b/src/math/sin.c @@ -76,3 +76,11 @@ double sin(double x) return -__cos(y[0], y[1]); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sincos.c b/src/math/sincos.c index 35b2d923..e16c9513 100644 --- a/src/math/sincos.c +++ b/src/math/sincos.c @@ -67,3 +67,11 @@ void sincos(double x, double *sin, double *cos) break; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sincosf.c b/src/math/sincosf.c index f8ca7232..75b5e7cd 100644 --- a/src/math/sincosf.c +++ b/src/math/sincosf.c @@ -115,3 +115,11 @@ void sincosf(float x, float *sin, float *cos) break; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sincosl.c b/src/math/sincosl.c index d3ac1c4c..bd20706d 100644 --- a/src/math/sincosl.c +++ b/src/math/sincosl.c @@ -58,3 +58,11 @@ void sincosl(long double x, long double *sin, long double *cos) } } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sinf.c b/src/math/sinf.c index 64e39f50..fa24b669 100644 --- a/src/math/sinf.c +++ b/src/math/sinf.c @@ -74,3 +74,11 @@ float sinf(float x) return -__cosdf(y); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sinh.c b/src/math/sinh.c index a01951ae..30aa8f32 100644 --- a/src/math/sinh.c +++ b/src/math/sinh.c @@ -37,3 +37,11 @@ double sinh(double x) t = __expo2(absx, 2*h); return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sinhf.c b/src/math/sinhf.c index b9caa793..4f66924a 100644 --- a/src/math/sinhf.c +++ b/src/math/sinhf.c @@ -29,3 +29,11 @@ float sinhf(float x) t = __expo2f(absx, 2*h); return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sinhl.c b/src/math/sinhl.c index b305d4d2..8b607cd7 100644 --- a/src/math/sinhl.c +++ b/src/math/sinhl.c @@ -41,3 +41,11 @@ long double sinhl(long double x) return sinh(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sinl.c b/src/math/sinl.c index 9c0b16ee..d9bd1753 100644 --- a/src/math/sinl.c +++ b/src/math/sinl.c @@ -39,3 +39,11 @@ long double sinl(long double x) } } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/sqrt_data.c b/src/math/sqrt_data.c index 61bc22f4..91fba233 100644 --- a/src/math/sqrt_data.c +++ b/src/math/sqrt_data.c @@ -17,3 +17,11 @@ const uint16_t __rsqrt_tab[128] = { 0xc116,0xc03c,0xbf65,0xbe90,0xbdbe,0xbcef,0xbc23,0xbb59, 0xba91,0xb9cc,0xb90a,0xb84a,0xb78c,0xb6d0,0xb617,0xb560, }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tan.c b/src/math/tan.c index 9c724a45..dc35c001 100644 --- a/src/math/tan.c +++ b/src/math/tan.c @@ -68,3 +68,11 @@ double tan(double x) n = __rem_pio2(x, y); return __tan(y[0], y[1], n&1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tanf.c b/src/math/tanf.c index aba19777..718da313 100644 --- a/src/math/tanf.c +++ b/src/math/tanf.c @@ -62,3 +62,11 @@ float tanf(float x) n = __rem_pio2f(x, &y); return __tandf(y, n&1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tanh.c b/src/math/tanh.c index 20d6dbcf..2318ecd4 100644 --- a/src/math/tanh.c +++ b/src/math/tanh.c @@ -43,3 +43,11 @@ double tanh(double x) } return sign ? -t : t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tanhf.c b/src/math/tanhf.c index 10636fbd..9af8f11d 100644 --- a/src/math/tanhf.c +++ b/src/math/tanhf.c @@ -37,3 +37,11 @@ float tanhf(float x) } return sign ? -t : t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tanhl.c b/src/math/tanhl.c index 4e1aa9f8..b3a55e28 100644 --- a/src/math/tanhl.c +++ b/src/math/tanhl.c @@ -46,3 +46,11 @@ long double tanhl(long double x) return tanh(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tanl.c b/src/math/tanl.c index 6af06712..8ad31af3 100644 --- a/src/math/tanl.c +++ b/src/math/tanl.c @@ -27,3 +27,11 @@ long double tanl(long double x) return __tanl(y[0], y[1], n&1); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tgamma.c b/src/math/tgamma.c index 28f6e0f8..1ff72f1c 100644 --- a/src/math/tgamma.c +++ b/src/math/tgamma.c @@ -220,3 +220,11 @@ double __lgamma_r(double x, int *sign) weak_alias(__lgamma_r, lgamma_r); #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tgammaf.c b/src/math/tgammaf.c index b4ca51c9..4d201e48 100644 --- a/src/math/tgammaf.c +++ b/src/math/tgammaf.c @@ -4,3 +4,11 @@ float tgammaf(float x) { return tgamma(x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/tgammal.c b/src/math/tgammal.c index 5336c5b1..540e33e1 100644 --- a/src/math/tgammal.c +++ b/src/math/tgammal.c @@ -279,3 +279,11 @@ long double tgammal(long double x) return tgamma(x); } #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/trunc.c b/src/math/trunc.c index d13711b5..03731387 100644 --- a/src/math/trunc.c +++ b/src/math/trunc.c @@ -17,3 +17,11 @@ double trunc(double x) u.i &= ~m; return u.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/truncf.c b/src/math/truncf.c index 1a7d03c3..e0fb7b97 100644 --- a/src/math/truncf.c +++ b/src/math/truncf.c @@ -17,3 +17,11 @@ float truncf(float x) u.i &= ~m; return u.f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/fabs.c b/src/math/x86_64/fabs.c index 16562477..aca2f361 100644 --- a/src/math/x86_64/fabs.c +++ b/src/math/x86_64/fabs.c @@ -8,3 +8,11 @@ double fabs(double x) __asm__ ("andps %1, %0" : "+x"(x) : "x"(t)); // x &= t return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/fabsf.c b/src/math/x86_64/fabsf.c index 36ea7481..4b84c6e5 100644 --- a/src/math/x86_64/fabsf.c +++ b/src/math/x86_64/fabsf.c @@ -8,3 +8,11 @@ float fabsf(float x) __asm__ ("andps %1, %0" : "+x"(x) : "x"(t)); // x &= t return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/fabsl.c b/src/math/x86_64/fabsl.c index cc1c9ed9..95e58e87 100644 --- a/src/math/x86_64/fabsl.c +++ b/src/math/x86_64/fabsl.c @@ -5,3 +5,11 @@ long double fabsl(long double x) __asm__ ("fabs" : "+t"(x)); return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/fma.c b/src/math/x86_64/fma.c index 4dd53f2a..6e7fd138 100644 --- a/src/math/x86_64/fma.c +++ b/src/math/x86_64/fma.c @@ -21,3 +21,11 @@ double fma(double x, double y, double z) #include "../fma.c" #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/fmaf.c b/src/math/x86_64/fmaf.c index 30b971ff..dadc0821 100644 --- a/src/math/x86_64/fmaf.c +++ b/src/math/x86_64/fmaf.c @@ -21,3 +21,11 @@ float fmaf(float x, float y, float z) #include "../fmaf.c" #endif + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/fmodl.c b/src/math/x86_64/fmodl.c index 3daeab06..f0127707 100644 --- a/src/math/x86_64/fmodl.c +++ b/src/math/x86_64/fmodl.c @@ -7,3 +7,11 @@ long double fmodl(long double x, long double y) while (fpsr & 0x400); return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/llrint.c b/src/math/x86_64/llrint.c index dd38a722..7ec6383e 100644 --- a/src/math/x86_64/llrint.c +++ b/src/math/x86_64/llrint.c @@ -6,3 +6,11 @@ long long llrint(double x) __asm__ ("cvtsd2si %1, %0" : "=r"(r) : "x"(x)); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/llrintf.c b/src/math/x86_64/llrintf.c index fc8625e8..3883feaa 100644 --- a/src/math/x86_64/llrintf.c +++ b/src/math/x86_64/llrintf.c @@ -6,3 +6,11 @@ long long llrintf(float x) __asm__ ("cvtss2si %1, %0" : "=r"(r) : "x"(x)); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/llrintl.c b/src/math/x86_64/llrintl.c index c439ef28..d74d9e19 100644 --- a/src/math/x86_64/llrintl.c +++ b/src/math/x86_64/llrintl.c @@ -6,3 +6,11 @@ long long llrintl(long double x) __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/lrint.c b/src/math/x86_64/lrint.c index a742fec6..c51ededc 100644 --- a/src/math/x86_64/lrint.c +++ b/src/math/x86_64/lrint.c @@ -6,3 +6,11 @@ long lrint(double x) __asm__ ("cvtsd2si %1, %0" : "=r"(r) : "x"(x)); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/lrintf.c b/src/math/x86_64/lrintf.c index 2ba5639d..78f8fdf2 100644 --- a/src/math/x86_64/lrintf.c +++ b/src/math/x86_64/lrintf.c @@ -6,3 +6,11 @@ long lrintf(float x) __asm__ ("cvtss2si %1, %0" : "=r"(r) : "x"(x)); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/lrintl.c b/src/math/x86_64/lrintl.c index 068e2e4d..8a535734 100644 --- a/src/math/x86_64/lrintl.c +++ b/src/math/x86_64/lrintl.c @@ -6,3 +6,11 @@ long lrintl(long double x) __asm__ ("fistpll %0" : "=m"(r) : "t"(x) : "st"); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/remainderl.c b/src/math/x86_64/remainderl.c index 8cf75071..0747a6af 100644 --- a/src/math/x86_64/remainderl.c +++ b/src/math/x86_64/remainderl.c @@ -7,3 +7,11 @@ long double remainderl(long double x, long double y) while (fpsr & 0x400); return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/remquol.c b/src/math/x86_64/remquol.c index 60eef089..d1c69002 100644 --- a/src/math/x86_64/remquol.c +++ b/src/math/x86_64/remquol.c @@ -30,3 +30,11 @@ long double remquol(long double x, long double y, int *quo) *quo = (cx[9]^cy[9]) < 0 ? -qbits : qbits; return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/rintl.c b/src/math/x86_64/rintl.c index e1a92077..2ce23fa3 100644 --- a/src/math/x86_64/rintl.c +++ b/src/math/x86_64/rintl.c @@ -5,3 +5,11 @@ long double rintl(long double x) __asm__ ("frndint" : "+t"(x)); return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/sqrt.c b/src/math/x86_64/sqrt.c index 657e09e3..03f313d6 100644 --- a/src/math/x86_64/sqrt.c +++ b/src/math/x86_64/sqrt.c @@ -5,3 +5,11 @@ double sqrt(double x) __asm__ ("sqrtsd %1, %0" : "=x"(x) : "x"(x)); return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/sqrtf.c b/src/math/x86_64/sqrtf.c index 720baec6..65c3997b 100644 --- a/src/math/x86_64/sqrtf.c +++ b/src/math/x86_64/sqrtf.c @@ -5,3 +5,11 @@ float sqrtf(float x) __asm__ ("sqrtss %1, %0" : "=x"(x) : "x"(x)); return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/math/x86_64/sqrtl.c b/src/math/x86_64/sqrtl.c index 864cfcc4..81edf51d 100644 --- a/src/math/x86_64/sqrtl.c +++ b/src/math/x86_64/sqrtl.c @@ -5,3 +5,11 @@ long double sqrtl(long double x) __asm__ ("fsqrt" : "+t"(x)); return x; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/a64l.c b/src/misc/a64l.c index 60557710..c20a3b24 100644 --- a/src/misc/a64l.c +++ b/src/misc/a64l.c @@ -27,3 +27,11 @@ char *l64a(long x0) *p = 0; return s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/basename.c b/src/misc/basename.c index 438377b6..37037c1a 100644 --- a/src/misc/basename.c +++ b/src/misc/basename.c @@ -12,3 +12,11 @@ char *basename(char *s) } weak_alias(basename, __xpg_basename); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/dirname.c b/src/misc/dirname.c index dd570883..0edca3b0 100644 --- a/src/misc/dirname.c +++ b/src/misc/dirname.c @@ -12,3 +12,11 @@ char *dirname(char *s) s[i+1] = 0; return s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/ffs.c b/src/misc/ffs.c index 673ce5a9..cb41b66d 100644 --- a/src/misc/ffs.c +++ b/src/misc/ffs.c @@ -5,3 +5,11 @@ int ffs(int i) { return i ? a_ctz_l(i)+1 : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/ffsl.c b/src/misc/ffsl.c index 0105c66a..7818ee62 100644 --- a/src/misc/ffsl.c +++ b/src/misc/ffsl.c @@ -5,3 +5,11 @@ int ffsl(long i) { return i ? a_ctz_l(i)+1 : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/ffsll.c b/src/misc/ffsll.c index 0c5ced82..74e0cad0 100644 --- a/src/misc/ffsll.c +++ b/src/misc/ffsll.c @@ -5,3 +5,11 @@ int ffsll(long long i) { return i ? a_ctz_64(i)+1 : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/fmtmsg.c b/src/misc/fmtmsg.c index 69170b25..eadf5c1e 100644 --- a/src/misc/fmtmsg.c +++ b/src/misc/fmtmsg.c @@ -88,3 +88,11 @@ int fmtmsg(long classification, const char *label, int severity, return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/forkpty.c b/src/misc/forkpty.c index caf13adb..0d04ef6b 100644 --- a/src/misc/forkpty.c +++ b/src/misc/forkpty.c @@ -55,3 +55,11 @@ out: return pid; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/get_current_dir_name.c b/src/misc/get_current_dir_name.c index 782cddcd..52be7874 100644 --- a/src/misc/get_current_dir_name.c +++ b/src/misc/get_current_dir_name.c @@ -13,3 +13,11 @@ char *get_current_dir_name(void) { return strdup(res); return getcwd(0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getauxval.c b/src/misc/getauxval.c index 57f21eed..21a8aca7 100644 --- a/src/misc/getauxval.c +++ b/src/misc/getauxval.c @@ -13,3 +13,11 @@ unsigned long __getauxval(unsigned long item) } weak_alias(__getauxval, getauxval); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getdomainname.c b/src/misc/getdomainname.c index 59df566d..d94be6ed 100644 --- a/src/misc/getdomainname.c +++ b/src/misc/getdomainname.c @@ -15,3 +15,11 @@ int getdomainname(char *name, size_t len) strcpy(name, temp.domainname); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getentropy.c b/src/misc/getentropy.c index 651ea95f..75d53c53 100644 --- a/src/misc/getentropy.c +++ b/src/misc/getentropy.c @@ -31,3 +31,11 @@ int getentropy(void *buffer, size_t len) return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/gethostid.c b/src/misc/gethostid.c index 25bb35db..20753af1 100644 --- a/src/misc/gethostid.c +++ b/src/misc/gethostid.c @@ -4,3 +4,11 @@ long gethostid() { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getopt.c b/src/misc/getopt.c index b02b81c3..16ba35ac 100644 --- a/src/misc/getopt.c +++ b/src/misc/getopt.c @@ -104,3 +104,11 @@ int getopt(int argc, char * const argv[], const char *optstring) } weak_alias(getopt, __posix_getopt); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c index 6949ab1c..e4a07e6d 100644 --- a/src/misc/getopt_long.c +++ b/src/misc/getopt_long.c @@ -146,3 +146,11 @@ int getopt_long_only(int argc, char *const *argv, const char *optstring, const s { return __getopt_long(argc, argv, optstring, longopts, idx, 1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getpriority.c b/src/misc/getpriority.c index 5c0b1682..7c034f54 100644 --- a/src/misc/getpriority.c +++ b/src/misc/getpriority.c @@ -7,3 +7,11 @@ int getpriority(int which, id_t who) if (ret < 0) return ret; return 20-ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getresgid.c b/src/misc/getresgid.c index d00d9a99..682d78c1 100644 --- a/src/misc/getresgid.c +++ b/src/misc/getresgid.c @@ -6,3 +6,11 @@ int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid) { return syscall(SYS_getresgid, rgid, egid, sgid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getresuid.c b/src/misc/getresuid.c index d75d5d40..b511c75e 100644 --- a/src/misc/getresuid.c +++ b/src/misc/getresuid.c @@ -6,3 +6,11 @@ int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid) { return syscall(SYS_getresuid, ruid, euid, suid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getrlimit.c b/src/misc/getrlimit.c index a5558d81..fd6f7904 100644 --- a/src/misc/getrlimit.c +++ b/src/misc/getrlimit.c @@ -26,3 +26,11 @@ int getrlimit(int resource, struct rlimit *rlim) return ret; #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getrusage.c b/src/misc/getrusage.c index 8e03e2e3..f5043d66 100644 --- a/src/misc/getrusage.c +++ b/src/misc/getrusage.c @@ -33,3 +33,11 @@ int getrusage(int who, struct rusage *ru) } return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/getsubopt.c b/src/misc/getsubopt.c index 53ee9573..8c8663e9 100644 --- a/src/misc/getsubopt.c +++ b/src/misc/getsubopt.c @@ -21,3 +21,11 @@ int getsubopt(char **opt, char *const *keys, char **val) } return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/initgroups.c b/src/misc/initgroups.c index 922a9581..63412c98 100644 --- a/src/misc/initgroups.c +++ b/src/misc/initgroups.c @@ -9,3 +9,11 @@ int initgroups(const char *user, gid_t gid) if (getgrouplist(user, gid, groups, &count) < 0) return -1; return setgroups(count, groups); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/ioctl.c b/src/misc/ioctl.c index 35804f02..ce1d4f74 100644 --- a/src/misc/ioctl.c +++ b/src/misc/ioctl.c @@ -149,3 +149,11 @@ int ioctl(int fd, int req, ...) } return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/issetugid.c b/src/misc/issetugid.c index ddc2ca0e..5367f29e 100644 --- a/src/misc/issetugid.c +++ b/src/misc/issetugid.c @@ -6,3 +6,11 @@ int issetugid(void) { return libc.secure; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/lockf.c b/src/misc/lockf.c index 0162442b..5f816a46 100644 --- a/src/misc/lockf.c +++ b/src/misc/lockf.c @@ -28,3 +28,11 @@ int lockf(int fd, int op, off_t size) errno = EINVAL; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/login_tty.c b/src/misc/login_tty.c index f0be0a09..0c7cc756 100644 --- a/src/misc/login_tty.c +++ b/src/misc/login_tty.c @@ -12,3 +12,11 @@ int login_tty(int fd) if (fd>2) close(fd); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/mntent.c b/src/misc/mntent.c index 78bf0cd0..93bbda07 100644 --- a/src/misc/mntent.c +++ b/src/misc/mntent.c @@ -117,3 +117,11 @@ char *hasmntopt(const struct mntent *mnt, const char *opt) { return strstr(mnt->mnt_opts, opt); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/nftw.c b/src/misc/nftw.c index 71bc62ee..065d00a5 100644 --- a/src/misc/nftw.c +++ b/src/misc/nftw.c @@ -140,3 +140,11 @@ int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, str pthread_setcancelstate(cs, 0); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/openpty.c b/src/misc/openpty.c index c1074060..1aad7b29 100644 --- a/src/misc/openpty.c +++ b/src/misc/openpty.c @@ -38,3 +38,11 @@ fail: pthread_setcancelstate(cs, 0); return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/ptsname.c b/src/misc/ptsname.c index 58c151c9..1f35ef30 100644 --- a/src/misc/ptsname.c +++ b/src/misc/ptsname.c @@ -11,3 +11,11 @@ char *ptsname(int fd) } return buf; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/pty.c b/src/misc/pty.c index a0577147..864f174f 100644 --- a/src/misc/pty.c +++ b/src/misc/pty.c @@ -33,3 +33,11 @@ int __ptsname_r(int fd, char *buf, size_t len) } weak_alias(__ptsname_r, ptsname_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/realpath.c b/src/misc/realpath.c index db8b74dc..752fdd47 100644 --- a/src/misc/realpath.c +++ b/src/misc/realpath.c @@ -154,3 +154,11 @@ toolong: errno = ENAMETOOLONG; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/setdomainname.c b/src/misc/setdomainname.c index 22d3f746..bfa4ad45 100644 --- a/src/misc/setdomainname.c +++ b/src/misc/setdomainname.c @@ -6,3 +6,11 @@ int setdomainname(const char *name, size_t len) { return syscall(SYS_setdomainname, name, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/setpriority.c b/src/misc/setpriority.c index 3098cdf4..98e6340a 100644 --- a/src/misc/setpriority.c +++ b/src/misc/setpriority.c @@ -5,3 +5,11 @@ int setpriority(int which, id_t who, int prio) { return syscall(SYS_setpriority, which, who, prio); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/setrlimit.c b/src/misc/setrlimit.c index edb413fa..a1071cf0 100644 --- a/src/misc/setrlimit.c +++ b/src/misc/setrlimit.c @@ -49,3 +49,11 @@ int setrlimit(int resource, const struct rlimit *rlim) return __syscall_ret(ret); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/syscall.c b/src/misc/syscall.c index 6f3ef656..4efd6053 100644 --- a/src/misc/syscall.c +++ b/src/misc/syscall.c @@ -19,3 +19,11 @@ long syscall(long n, ...) va_end(ap); return __syscall_ret(__syscall(n,a,b,c,d,e,f)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/syslog.c b/src/misc/syslog.c index 7dc0c1be..908c438f 100644 --- a/src/misc/syslog.c +++ b/src/misc/syslog.c @@ -144,3 +144,11 @@ void syslog(int priority, const char *message, ...) } weak_alias(__vsyslog, vsyslog); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/uname.c b/src/misc/uname.c index 55ea3420..4af6c740 100644 --- a/src/misc/uname.c +++ b/src/misc/uname.c @@ -5,3 +5,11 @@ int uname(struct utsname *uts) { return syscall(SYS_uname, uts); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/misc/wordexp.c b/src/misc/wordexp.c index db83a69f..5e70277d 100644 --- a/src/misc/wordexp.c +++ b/src/misc/wordexp.c @@ -185,3 +185,11 @@ void wordfree(wordexp_t *we) we->we_wordv = 0; we->we_wordc = 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/madvise.c b/src/mman/madvise.c index e0c7c0ec..1a99adea 100644 --- a/src/mman/madvise.c +++ b/src/mman/madvise.c @@ -7,3 +7,11 @@ int __madvise(void *addr, size_t len, int advice) } weak_alias(__madvise, madvise); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/mincore.c b/src/mman/mincore.c index 4bb19f85..28f4979c 100644 --- a/src/mman/mincore.c +++ b/src/mman/mincore.c @@ -6,3 +6,11 @@ int mincore (void *addr, size_t len, unsigned char *vec) { return syscall(SYS_mincore, addr, len, vec); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/mlock.c b/src/mman/mlock.c index 71af582f..f69603b9 100644 --- a/src/mman/mlock.c +++ b/src/mman/mlock.c @@ -9,3 +9,11 @@ int mlock(const void *addr, size_t len) return syscall(SYS_mlock2, addr, len, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/mlockall.c b/src/mman/mlockall.c index 0ba4e662..d1ed9cb1 100644 --- a/src/mman/mlockall.c +++ b/src/mman/mlockall.c @@ -5,3 +5,11 @@ int mlockall(int flags) { return syscall(SYS_mlockall, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/mmap.c b/src/mman/mmap.c index 43e5e029..460414ae 100644 --- a/src/mman/mmap.c +++ b/src/mman/mmap.c @@ -37,3 +37,11 @@ void *__mmap(void *start, size_t len, int prot, int flags, int fd, off_t off) } weak_alias(__mmap, mmap); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/mprotect.c b/src/mman/mprotect.c index 535787b9..7a66383c 100644 --- a/src/mman/mprotect.c +++ b/src/mman/mprotect.c @@ -11,3 +11,11 @@ int __mprotect(void *addr, size_t len, int prot) } weak_alias(__mprotect, mprotect); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/mremap.c b/src/mman/mremap.c index cc6991a6..c1d7c0df 100644 --- a/src/mman/mremap.c +++ b/src/mman/mremap.c @@ -30,3 +30,11 @@ void *__mremap(void *old_addr, size_t old_len, size_t new_len, int flags, ...) } weak_alias(__mremap, mremap); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/msync.c b/src/mman/msync.c index fcd8cdf9..072053eb 100644 --- a/src/mman/msync.c +++ b/src/mman/msync.c @@ -5,3 +5,11 @@ int msync(void *start, size_t len, int flags) { return syscall_cp(SYS_msync, start, len, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/munlock.c b/src/mman/munlock.c index 2cccef0c..26d16636 100644 --- a/src/mman/munlock.c +++ b/src/mman/munlock.c @@ -5,3 +5,11 @@ int munlock(const void *addr, size_t len) { return syscall(SYS_munlock, addr, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/munlockall.c b/src/mman/munlockall.c index 6e9d39d6..81eb1a9c 100644 --- a/src/mman/munlockall.c +++ b/src/mman/munlockall.c @@ -5,3 +5,11 @@ int munlockall(void) { return syscall(SYS_munlockall); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/munmap.c b/src/mman/munmap.c index 2bf83bbe..e1f21b26 100644 --- a/src/mman/munmap.c +++ b/src/mman/munmap.c @@ -11,3 +11,11 @@ int __munmap(void *start, size_t len) } weak_alias(__munmap, munmap); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/posix_madvise.c b/src/mman/posix_madvise.c index e5e5acb8..22fbc0c4 100644 --- a/src/mman/posix_madvise.c +++ b/src/mman/posix_madvise.c @@ -7,3 +7,11 @@ int posix_madvise(void *addr, size_t len, int advice) if (advice == MADV_DONTNEED) return 0; return -__syscall(SYS_madvise, addr, len, advice); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mman/shm_open.c b/src/mman/shm_open.c index 79784bd3..f6ad96b3 100644 --- a/src/mman/shm_open.c +++ b/src/mman/shm_open.c @@ -41,3 +41,11 @@ int shm_unlink(const char *name) if (!(name = __shm_mapname(name, buf))) return -1; return unlink(name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_close.c b/src/mq/mq_close.c index a61f094d..e461c8f9 100644 --- a/src/mq/mq_close.c +++ b/src/mq/mq_close.c @@ -5,3 +5,11 @@ int mq_close(mqd_t mqd) { return syscall(SYS_close, mqd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_getattr.c b/src/mq/mq_getattr.c index dce18069..21f5f0c5 100644 --- a/src/mq/mq_getattr.c +++ b/src/mq/mq_getattr.c @@ -5,3 +5,11 @@ int mq_getattr(mqd_t mqd, struct mq_attr *attr) { return mq_setattr(mqd, 0, attr); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_notify.c b/src/mq/mq_notify.c index 0e1e6c7a..db1ca1da 100644 --- a/src/mq/mq_notify.c +++ b/src/mq/mq_notify.c @@ -90,3 +90,11 @@ int mq_notify(mqd_t mqd, const struct sigevent *sev) pthread_setcancelstate(cs, 0); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_open.c b/src/mq/mq_open.c index aa91d589..5d6809bb 100644 --- a/src/mq/mq_open.c +++ b/src/mq/mq_open.c @@ -17,3 +17,11 @@ mqd_t mq_open(const char *name, int flags, ...) } return syscall(SYS_mq_open, name, flags, mode, attr); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_receive.c b/src/mq/mq_receive.c index 0b1bb4e4..8fa2f0a2 100644 --- a/src/mq/mq_receive.c +++ b/src/mq/mq_receive.c @@ -4,3 +4,11 @@ ssize_t mq_receive(mqd_t mqd, char *msg, size_t len, unsigned *prio) { return mq_timedreceive(mqd, msg, len, prio, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_send.c b/src/mq/mq_send.c index 1acb1b78..99dd52d1 100644 --- a/src/mq/mq_send.c +++ b/src/mq/mq_send.c @@ -4,3 +4,11 @@ int mq_send(mqd_t mqd, const char *msg, size_t len, unsigned prio) { return mq_timedsend(mqd, msg, len, prio, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_setattr.c b/src/mq/mq_setattr.c index eae022e9..0ba3ddb7 100644 --- a/src/mq/mq_setattr.c +++ b/src/mq/mq_setattr.c @@ -5,3 +5,11 @@ int mq_setattr(mqd_t mqd, const struct mq_attr *restrict new, struct mq_attr *re { return syscall(SYS_mq_getsetattr, mqd, new, old); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_timedreceive.c b/src/mq/mq_timedreceive.c index f41b6642..034630d1 100644 --- a/src/mq/mq_timedreceive.c +++ b/src/mq/mq_timedreceive.c @@ -22,3 +22,11 @@ ssize_t mq_timedreceive(mqd_t mqd, char *restrict msg, size_t len, unsigned *res return syscall_cp(SYS_mq_timedreceive, mqd, msg, len, prio, at); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_timedsend.c b/src/mq/mq_timedsend.c index 56cfcbb8..a73fc87e 100644 --- a/src/mq/mq_timedsend.c +++ b/src/mq/mq_timedsend.c @@ -22,3 +22,11 @@ int mq_timedsend(mqd_t mqd, const char *msg, size_t len, unsigned prio, const st return syscall_cp(SYS_mq_timedsend, mqd, msg, len, prio, at); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/mq/mq_unlink.c b/src/mq/mq_unlink.c index 6a08a4c5..48ac46ff 100644 --- a/src/mq/mq_unlink.c +++ b/src/mq/mq_unlink.c @@ -14,3 +14,11 @@ int mq_unlink(const char *name) } return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/btowc.c b/src/multibyte/btowc.c index 8acd0a2c..a1fecf4f 100644 --- a/src/multibyte/btowc.c +++ b/src/multibyte/btowc.c @@ -8,3 +8,11 @@ wint_t btowc(int c) int b = (unsigned char)c; return b<128U ? b : (MB_CUR_MAX==1 && c!=EOF) ? CODEUNIT(c) : WEOF; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/c16rtomb.c b/src/multibyte/c16rtomb.c index 39ca3758..abda9525 100644 --- a/src/multibyte/c16rtomb.c +++ b/src/multibyte/c16rtomb.c @@ -33,3 +33,11 @@ ilseq: errno = EILSEQ; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/c32rtomb.c b/src/multibyte/c32rtomb.c index 67851328..c10531af 100644 --- a/src/multibyte/c32rtomb.c +++ b/src/multibyte/c32rtomb.c @@ -5,3 +5,11 @@ size_t c32rtomb(char *restrict s, char32_t c32, mbstate_t *restrict ps) { return wcrtomb(s, c32, ps); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/internal.c b/src/multibyte/internal.c index 2f5aaa91..133ab535 100644 --- a/src/multibyte/internal.c +++ b/src/multibyte/internal.c @@ -24,3 +24,11 @@ const uint32_t bittab[] = { E(0x8),E(0x9),E(0xa),E(0xb),E(0xc),E(0xd),E(0xe),E(0xf), F(0x0),F(0x1),F(0x2),F(0x3),F(0x4) }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mblen.c b/src/multibyte/mblen.c index a4304bf5..e06d7faf 100644 --- a/src/multibyte/mblen.c +++ b/src/multibyte/mblen.c @@ -4,3 +4,11 @@ int mblen(const char *s, size_t n) { return mbtowc(0, s, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbrlen.c b/src/multibyte/mbrlen.c index accf4b33..8d28bc3c 100644 --- a/src/multibyte/mbrlen.c +++ b/src/multibyte/mbrlen.c @@ -5,3 +5,11 @@ size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict st) static unsigned internal; return mbrtowc(0, s, n, st ? st : (mbstate_t *)&internal); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbrtoc16.c b/src/multibyte/mbrtoc16.c index 765ff903..cbdd3595 100644 --- a/src/multibyte/mbrtoc16.c +++ b/src/multibyte/mbrtoc16.c @@ -28,3 +28,11 @@ size_t mbrtoc16(char16_t *restrict pc16, const char *restrict s, size_t n, mbsta } return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbrtoc32.c b/src/multibyte/mbrtoc32.c index 9b6b2367..e2d38e91 100644 --- a/src/multibyte/mbrtoc32.c +++ b/src/multibyte/mbrtoc32.c @@ -11,3 +11,11 @@ size_t mbrtoc32(char32_t *restrict pc32, const char *restrict s, size_t n, mbsta if (ret <= 4 && pc32) *pc32 = wc; return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbrtowc.c b/src/multibyte/mbrtowc.c index 7824997e..964f6054 100644 --- a/src/multibyte/mbrtowc.c +++ b/src/multibyte/mbrtowc.c @@ -49,3 +49,11 @@ ilseq: errno = EILSEQ; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbsinit.c b/src/multibyte/mbsinit.c index c608194a..2e022b89 100644 --- a/src/multibyte/mbsinit.c +++ b/src/multibyte/mbsinit.c @@ -4,3 +4,11 @@ int mbsinit(const mbstate_t *st) { return !st || !*(unsigned *)st; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbsnrtowcs.c b/src/multibyte/mbsnrtowcs.c index 931192e2..e0b37db6 100644 --- a/src/multibyte/mbsnrtowcs.c +++ b/src/multibyte/mbsnrtowcs.c @@ -53,3 +53,11 @@ size_t mbsnrtowcs(wchar_t *restrict wcs, const char **restrict src, size_t n, si if (wcs) *src = s; return cnt; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbsrtowcs.c b/src/multibyte/mbsrtowcs.c index 9b2f2dfb..c40990b0 100644 --- a/src/multibyte/mbsrtowcs.c +++ b/src/multibyte/mbsrtowcs.c @@ -118,3 +118,11 @@ resume: if (ws) *src = (const void *)s; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbstowcs.c b/src/multibyte/mbstowcs.c index dc0d4594..25e35e38 100644 --- a/src/multibyte/mbstowcs.c +++ b/src/multibyte/mbstowcs.c @@ -5,3 +5,11 @@ size_t mbstowcs(wchar_t *restrict ws, const char *restrict s, size_t wn) { return mbsrtowcs(ws, (void*)&s, wn, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/mbtowc.c b/src/multibyte/mbtowc.c index c191bb03..a25392a3 100644 --- a/src/multibyte/mbtowc.c +++ b/src/multibyte/mbtowc.c @@ -45,3 +45,11 @@ ilseq: errno = EILSEQ; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/wcrtomb.c b/src/multibyte/wcrtomb.c index 8e34926e..3a94d475 100644 --- a/src/multibyte/wcrtomb.c +++ b/src/multibyte/wcrtomb.c @@ -35,3 +35,11 @@ size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict st) errno = EILSEQ; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/wcsnrtombs.c b/src/multibyte/wcsnrtombs.c index 95e25e70..6545668a 100644 --- a/src/multibyte/wcsnrtombs.c +++ b/src/multibyte/wcsnrtombs.c @@ -33,3 +33,11 @@ size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, s if (dst) *wcs = ws; return cnt; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/wcsrtombs.c b/src/multibyte/wcsrtombs.c index b5713aea..8179141e 100644 --- a/src/multibyte/wcsrtombs.c +++ b/src/multibyte/wcsrtombs.c @@ -53,3 +53,11 @@ size_t wcsrtombs(char *restrict s, const wchar_t **restrict ws, size_t n, mbstat } return N; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/wcstombs.c b/src/multibyte/wcstombs.c index ab152874..958c7b54 100644 --- a/src/multibyte/wcstombs.c +++ b/src/multibyte/wcstombs.c @@ -5,3 +5,11 @@ size_t wcstombs(char *restrict s, const wchar_t *restrict ws, size_t n) { return wcsrtombs(s, &(const wchar_t *){ws}, n, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/wctob.c b/src/multibyte/wctob.c index b484a3fd..6933ce1d 100644 --- a/src/multibyte/wctob.c +++ b/src/multibyte/wctob.c @@ -9,3 +9,11 @@ int wctob(wint_t c) if (MB_CUR_MAX==1 && IS_CODEUNIT(c)) return (unsigned char)c; return EOF; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/multibyte/wctomb.c b/src/multibyte/wctomb.c index bad41c5e..76eeb76d 100644 --- a/src/multibyte/wctomb.c +++ b/src/multibyte/wctomb.c @@ -6,3 +6,11 @@ int wctomb(char *s, wchar_t wc) if (!s) return 0; return wcrtomb(s, wc, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/accept.c b/src/network/accept.c index a92406fa..912e47ef 100644 --- a/src/network/accept.c +++ b/src/network/accept.c @@ -5,3 +5,11 @@ int accept(int fd, struct sockaddr *restrict addr, socklen_t *restrict len) { return socketcall_cp(accept, fd, addr, len, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/accept4.c b/src/network/accept4.c index 765a38ed..2e7d0c6b 100644 --- a/src/network/accept4.c +++ b/src/network/accept4.c @@ -21,3 +21,11 @@ int accept4(int fd, struct sockaddr *restrict addr, socklen_t *restrict len, int __syscall(SYS_fcntl, ret, F_SETFL, O_NONBLOCK); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/bind.c b/src/network/bind.c index 07bb669a..e429f2ea 100644 --- a/src/network/bind.c +++ b/src/network/bind.c @@ -5,3 +5,11 @@ int bind(int fd, const struct sockaddr *addr, socklen_t len) { return socketcall(bind, fd, addr, len, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/connect.c b/src/network/connect.c index 289127be..9b58a630 100644 --- a/src/network/connect.c +++ b/src/network/connect.c @@ -5,3 +5,11 @@ int connect(int fd, const struct sockaddr *addr, socklen_t len) { return socketcall_cp(connect, fd, addr, len, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/dn_comp.c b/src/network/dn_comp.c index f0ccd160..d31dd1e3 100644 --- a/src/network/dn_comp.c +++ b/src/network/dn_comp.c @@ -105,3 +105,11 @@ int dn_comp(const char *src, unsigned char *dst, int space, unsigned char **dnpt } return i; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/dn_expand.c b/src/network/dn_expand.c index eac343af..53b1d582 100644 --- a/src/network/dn_expand.c +++ b/src/network/dn_expand.c @@ -31,3 +31,11 @@ int __dn_expand(const unsigned char *base, const unsigned char *end, const unsig } weak_alias(__dn_expand, dn_expand); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/dn_skipname.c b/src/network/dn_skipname.c index eba65bb8..c65c5d50 100644 --- a/src/network/dn_skipname.c +++ b/src/network/dn_skipname.c @@ -13,3 +13,11 @@ int dn_skipname(const unsigned char *s, const unsigned char *end) else p += *p + 1; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/dns_parse.c b/src/network/dns_parse.c index 09813112..2d83ae42 100644 --- a/src/network/dns_parse.c +++ b/src/network/dns_parse.c @@ -30,3 +30,11 @@ int __dns_parse(const unsigned char *r, int rlen, int (*callback)(void *, int, c } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/ent.c b/src/network/ent.c index c6e01230..33c5aa6d 100644 --- a/src/network/ent.c +++ b/src/network/ent.c @@ -20,3 +20,11 @@ void endhostent(void) weak_alias(sethostent, setnetent); weak_alias(endhostent, endnetent); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/ether.c b/src/network/ether.c index 4304a972..013202d6 100644 --- a/src/network/ether.c +++ b/src/network/ether.c @@ -56,3 +56,11 @@ int ether_hostton(const char *hostname, struct ether_addr *e) { return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/freeaddrinfo.c b/src/network/freeaddrinfo.c index 62241c23..3dff999d 100644 --- a/src/network/freeaddrinfo.c +++ b/src/network/freeaddrinfo.c @@ -14,3 +14,11 @@ void freeaddrinfo(struct addrinfo *p) if (!(b->ref -= cnt)) free(b); else UNLOCK(b->lock); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/gai_strerror.c b/src/network/gai_strerror.c index 56b71503..3c43736b 100644 --- a/src/network/gai_strerror.c +++ b/src/network/gai_strerror.c @@ -23,3 +23,11 @@ const char *gai_strerror(int ecode) if (!*s) s++; return LCTRANS_CUR(s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c index 64ad259a..6f52bc91 100644 --- a/src/network/getaddrinfo.c +++ b/src/network/getaddrinfo.c @@ -138,3 +138,11 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru *res = &out->ai; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/gethostbyaddr.c b/src/network/gethostbyaddr.c index c3cacaac..98a41e86 100644 --- a/src/network/gethostbyaddr.c +++ b/src/network/gethostbyaddr.c @@ -22,3 +22,11 @@ struct hostent *gethostbyaddr(const void *a, socklen_t l, int af) } while (err == ERANGE); return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/gethostbyaddr_r.c b/src/network/gethostbyaddr_r.c index ceaf3935..d8f129d6 100644 --- a/src/network/gethostbyaddr_r.c +++ b/src/network/gethostbyaddr_r.c @@ -70,3 +70,11 @@ int gethostbyaddr_r(const void *a, socklen_t l, int af, *res = h; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/gethostbyname.c b/src/network/gethostbyname.c index bfedf52a..a3e4d8f4 100644 --- a/src/network/gethostbyname.c +++ b/src/network/gethostbyname.c @@ -9,3 +9,11 @@ struct hostent *gethostbyname(const char *name) { return gethostbyname2(name, AF_INET); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/gethostbyname2.c b/src/network/gethostbyname2.c index bd0da7f8..9215ffa5 100644 --- a/src/network/gethostbyname2.c +++ b/src/network/gethostbyname2.c @@ -23,3 +23,11 @@ struct hostent *gethostbyname2(const char *name, int af) } while (err == ERANGE); return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/gethostbyname2_r.c b/src/network/gethostbyname2_r.c index a5eb67fe..cc0d8761 100644 --- a/src/network/gethostbyname2_r.c +++ b/src/network/gethostbyname2_r.c @@ -80,3 +80,11 @@ int gethostbyname2_r(const char *name, int af, *res = h; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/gethostbyname_r.c b/src/network/gethostbyname_r.c index cd872541..efc3e660 100644 --- a/src/network/gethostbyname_r.c +++ b/src/network/gethostbyname_r.c @@ -9,3 +9,11 @@ int gethostbyname_r(const char *name, { return gethostbyname2_r(name, AF_INET, h, buf, buflen, res, err); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getifaddrs.c b/src/network/getifaddrs.c index 74df4d6c..6d953dfb 100644 --- a/src/network/getifaddrs.c +++ b/src/network/getifaddrs.c @@ -214,3 +214,11 @@ int getifaddrs(struct ifaddrs **ifap) else freeifaddrs(ctx->first); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getnameinfo.c b/src/network/getnameinfo.c index 7abe0fa9..53e0f99a 100644 --- a/src/network/getnameinfo.c +++ b/src/network/getnameinfo.c @@ -199,3 +199,11 @@ int getnameinfo(const struct sockaddr *restrict sa, socklen_t sl, return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getpeername.c b/src/network/getpeername.c index 6567b451..6e947b6d 100644 --- a/src/network/getpeername.c +++ b/src/network/getpeername.c @@ -5,3 +5,11 @@ int getpeername(int fd, struct sockaddr *restrict addr, socklen_t *restrict len) { return socketcall(getpeername, fd, addr, len, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getservbyname.c b/src/network/getservbyname.c index dd303767..be1618ee 100644 --- a/src/network/getservbyname.c +++ b/src/network/getservbyname.c @@ -10,3 +10,11 @@ struct servent *getservbyname(const char *name, const char *prots) return 0; return &se; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getservbyname_r.c b/src/network/getservbyname_r.c index cad6317a..ec8495aa 100644 --- a/src/network/getservbyname_r.c +++ b/src/network/getservbyname_r.c @@ -53,3 +53,11 @@ int getservbyname_r(const char *name, const char *prots, *res = se; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getservbyport.c b/src/network/getservbyport.c index c9ecbb11..819e2533 100644 --- a/src/network/getservbyport.c +++ b/src/network/getservbyport.c @@ -10,3 +10,11 @@ struct servent *getservbyport(int port, const char *prots) return 0; return &se; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getservbyport_r.c b/src/network/getservbyport_r.c index e4cc3079..58368fb2 100644 --- a/src/network/getservbyport_r.c +++ b/src/network/getservbyport_r.c @@ -60,3 +60,11 @@ int getservbyport_r(int port, const char *prots, *res = se; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getsockname.c b/src/network/getsockname.c index 7885fc13..b86bec57 100644 --- a/src/network/getsockname.c +++ b/src/network/getsockname.c @@ -5,3 +5,11 @@ int getsockname(int fd, struct sockaddr *restrict addr, socklen_t *restrict len) { return socketcall(getsockname, fd, addr, len, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/getsockopt.c b/src/network/getsockopt.c index d3640d9c..3d53abbd 100644 --- a/src/network/getsockopt.c +++ b/src/network/getsockopt.c @@ -39,3 +39,11 @@ int getsockopt(int fd, int level, int optname, void *restrict optval, socklen_t } return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/h_errno.c b/src/network/h_errno.c index 638f7718..7aa671ed 100644 --- a/src/network/h_errno.c +++ b/src/network/h_errno.c @@ -9,3 +9,11 @@ int *__h_errno_location(void) if (!__pthread_self()->stack) return &h_errno; return &__pthread_self()->h_errno_val; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/herror.c b/src/network/herror.c index 87f8cff4..07c33a54 100644 --- a/src/network/herror.c +++ b/src/network/herror.c @@ -6,3 +6,11 @@ void herror(const char *msg) { fprintf(stderr, "%s%s%s\n", msg?msg:"", msg?": ":"", hstrerror(h_errno)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/hstrerror.c b/src/network/hstrerror.c index a4d001c5..20ba33ec 100644 --- a/src/network/hstrerror.c +++ b/src/network/hstrerror.c @@ -16,3 +16,11 @@ const char *hstrerror(int ecode) if (!*s) s++; return LCTRANS_CUR(s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/htonl.c b/src/network/htonl.c index 6622d16c..24f2e2a5 100644 --- a/src/network/htonl.c +++ b/src/network/htonl.c @@ -6,3 +6,11 @@ uint32_t htonl(uint32_t n) union { int i; char c; } u = { 1 }; return u.c ? bswap_32(n) : n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/htons.c b/src/network/htons.c index 03a3a1d5..07759233 100644 --- a/src/network/htons.c +++ b/src/network/htons.c @@ -6,3 +6,11 @@ uint16_t htons(uint16_t n) union { int i; char c; } u = { 1 }; return u.c ? bswap_16(n) : n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/if_freenameindex.c b/src/network/if_freenameindex.c index 89bafcc0..8170cec8 100644 --- a/src/network/if_freenameindex.c +++ b/src/network/if_freenameindex.c @@ -5,3 +5,11 @@ void if_freenameindex(struct if_nameindex *idx) { free(idx); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/if_indextoname.c b/src/network/if_indextoname.c index 3b368bf0..c44d5695 100644 --- a/src/network/if_indextoname.c +++ b/src/network/if_indextoname.c @@ -21,3 +21,11 @@ char *if_indextoname(unsigned index, char *name) } return strncpy(name, ifr.ifr_name, IF_NAMESIZE); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/if_nameindex.c b/src/network/if_nameindex.c index 2deaef76..b868da85 100644 --- a/src/network/if_nameindex.c +++ b/src/network/if_nameindex.c @@ -112,3 +112,11 @@ err: errno = ENOBUFS; return ifs; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/if_nametoindex.c b/src/network/if_nametoindex.c index 331413c6..c441085c 100644 --- a/src/network/if_nametoindex.c +++ b/src/network/if_nametoindex.c @@ -16,3 +16,11 @@ unsigned if_nametoindex(const char *name) __syscall(SYS_close, fd); return r < 0 ? 0 : ifr.ifr_ifindex; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/in6addr_any.c b/src/network/in6addr_any.c index 995387fa..703a935c 100644 --- a/src/network/in6addr_any.c +++ b/src/network/in6addr_any.c @@ -1,3 +1,11 @@ #include <netinet/in.h> const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/in6addr_loopback.c b/src/network/in6addr_loopback.c index b96005b8..b1960f34 100644 --- a/src/network/in6addr_loopback.c +++ b/src/network/in6addr_loopback.c @@ -1,3 +1,11 @@ #include <netinet/in.h> const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/inet_addr.c b/src/network/inet_addr.c index 11ece3d6..59130d60 100644 --- a/src/network/inet_addr.c +++ b/src/network/inet_addr.c @@ -8,3 +8,11 @@ in_addr_t inet_addr(const char *p) if (!__inet_aton(p, &a)) return -1; return a.s_addr; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/inet_aton.c b/src/network/inet_aton.c index c65f7c2c..42b5eb46 100644 --- a/src/network/inet_aton.c +++ b/src/network/inet_aton.c @@ -39,3 +39,11 @@ int __inet_aton(const char *s0, struct in_addr *dest) } weak_alias(__inet_aton, inet_aton); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/inet_legacy.c b/src/network/inet_legacy.c index 621b47b0..f6c98c16 100644 --- a/src/network/inet_legacy.c +++ b/src/network/inet_legacy.c @@ -30,3 +30,11 @@ in_addr_t inet_netof(struct in_addr in) if (h>>24 < 192) return h >> 16; return h >> 8; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/inet_ntoa.c b/src/network/inet_ntoa.c index 71411e0b..22a35c88 100644 --- a/src/network/inet_ntoa.c +++ b/src/network/inet_ntoa.c @@ -8,3 +8,11 @@ char *inet_ntoa(struct in_addr in) snprintf(buf, sizeof buf, "%d.%d.%d.%d", a[0], a[1], a[2], a[3]); return buf; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/inet_ntop.c b/src/network/inet_ntop.c index 4bfef2c5..53c83c44 100644 --- a/src/network/inet_ntop.c +++ b/src/network/inet_ntop.c @@ -52,3 +52,11 @@ const char *inet_ntop(int af, const void *restrict a0, char *restrict s, socklen errno = ENOSPC; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c index bcbdd9ef..705ea541 100644 --- a/src/network/inet_pton.c +++ b/src/network/inet_pton.c @@ -70,3 +70,11 @@ int inet_pton(int af, const char *restrict s, void *restrict a0) if (need_v4 && inet_pton(AF_INET, (void *)s, a-4) <= 0) return 0; return 1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/listen.c b/src/network/listen.c index f84ad03b..b3818db1 100644 --- a/src/network/listen.c +++ b/src/network/listen.c @@ -5,3 +5,11 @@ int listen(int fd, int backlog) { return socketcall(listen, fd, backlog, 0, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/lookup_ipliteral.c b/src/network/lookup_ipliteral.c index 1e766206..cc4fd592 100644 --- a/src/network/lookup_ipliteral.c +++ b/src/network/lookup_ipliteral.c @@ -53,3 +53,11 @@ int __lookup_ipliteral(struct address buf[static 1], const char *name, int famil buf[0].scopeid = scopeid; return 1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c index 35218185..9356775f 100644 --- a/src/network/lookup_name.c +++ b/src/network/lookup_name.c @@ -435,3 +435,11 @@ int __lookup_name(struct address buf[static MAXADDRS], char canon[static 256], c return cnt; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/lookup_serv.c b/src/network/lookup_serv.c index ae382778..e9fda897 100644 --- a/src/network/lookup_serv.c +++ b/src/network/lookup_serv.c @@ -112,3 +112,11 @@ int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int pro __fclose_ca(f); return cnt > 0 ? cnt : EAI_SERVICE; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/netlink.c b/src/network/netlink.c index 94dba7f5..cc54d03e 100644 --- a/src/network/netlink.c +++ b/src/network/netlink.c @@ -50,3 +50,11 @@ int __rtnetlink_enumerate(int link_af, int addr_af, int (*cb)(void *ctx, struct __syscall(SYS_close,fd); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/netname.c b/src/network/netname.c index ba6e6656..2d6c6e01 100644 --- a/src/network/netname.c +++ b/src/network/netname.c @@ -10,3 +10,11 @@ struct netent *getnetbyname(const char *name) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/ns_parse.c b/src/network/ns_parse.c index d01da47a..252cec4a 100644 --- a/src/network/ns_parse.c +++ b/src/network/ns_parse.c @@ -169,3 +169,11 @@ int ns_name_uncompress(const unsigned char *msg, const unsigned char *eom, return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/ntohl.c b/src/network/ntohl.c index d6fce459..d99ebc05 100644 --- a/src/network/ntohl.c +++ b/src/network/ntohl.c @@ -6,3 +6,11 @@ uint32_t ntohl(uint32_t n) union { int i; char c; } u = { 1 }; return u.c ? bswap_32(n) : n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/ntohs.c b/src/network/ntohs.c index 745cef42..85cbf2ea 100644 --- a/src/network/ntohs.c +++ b/src/network/ntohs.c @@ -6,3 +6,11 @@ uint16_t ntohs(uint16_t n) union { int i; char c; } u = { 1 }; return u.c ? bswap_16(n) : n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/proto.c b/src/network/proto.c index c4fd34ef..1d8b9bbd 100644 --- a/src/network/proto.c +++ b/src/network/proto.c @@ -82,3 +82,11 @@ struct protoent *getprotobynumber(int num) while (p && p->p_proto != num); return p; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/recv.c b/src/network/recv.c index 59700485..447c92ef 100644 --- a/src/network/recv.c +++ b/src/network/recv.c @@ -4,3 +4,11 @@ ssize_t recv(int fd, void *buf, size_t len, int flags) { return recvfrom(fd, buf, len, flags, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/recvfrom.c b/src/network/recvfrom.c index 61911663..4c241729 100644 --- a/src/network/recvfrom.c +++ b/src/network/recvfrom.c @@ -5,3 +5,11 @@ ssize_t recvfrom(int fd, void *restrict buf, size_t len, int flags, struct socka { return socketcall_cp(recvfrom, fd, buf, len, flags, addr, alen); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/recvmmsg.c b/src/network/recvmmsg.c index 2978e2f6..b686ddac 100644 --- a/src/network/recvmmsg.c +++ b/src/network/recvmmsg.c @@ -37,3 +37,11 @@ int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int fla return syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags, timeout); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/recvmsg.c b/src/network/recvmsg.c index 03641625..76461a9a 100644 --- a/src/network/recvmsg.c +++ b/src/network/recvmsg.c @@ -66,3 +66,11 @@ ssize_t recvmsg(int fd, struct msghdr *msg, int flags) #endif return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/res_init.c b/src/network/res_init.c index 5dba9dfc..09ec3f02 100644 --- a/src/network/res_init.c +++ b/src/network/res_init.c @@ -4,3 +4,11 @@ int res_init() { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/res_mkquery.c b/src/network/res_mkquery.c index 614bf786..9db96c4e 100644 --- a/src/network/res_mkquery.c +++ b/src/network/res_mkquery.c @@ -43,3 +43,11 @@ int __res_mkquery(int op, const char *dname, int class, int type, } weak_alias(__res_mkquery, res_mkquery); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/res_msend.c b/src/network/res_msend.c index 86c2fcf4..89b88860 100644 --- a/src/network/res_msend.c +++ b/src/network/res_msend.c @@ -323,3 +323,11 @@ int __res_msend(int nqueries, const unsigned char *const *queries, if (__get_resolv_conf(&conf, 0, 0) < 0) return -1; return __res_msend_rc(nqueries, queries, qlens, answers, alens, asize, &conf); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/res_query.c b/src/network/res_query.c index 506dc231..bcc6ae7a 100644 --- a/src/network/res_query.c +++ b/src/network/res_query.c @@ -24,3 +24,11 @@ int res_query(const char *name, int class, int type, unsigned char *dest, int le } weak_alias(res_query, res_search); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/res_querydomain.c b/src/network/res_querydomain.c index 727e6f6b..322de1da 100644 --- a/src/network/res_querydomain.c +++ b/src/network/res_querydomain.c @@ -12,3 +12,11 @@ int res_querydomain(const char *name, const char *domain, int class, int type, u memcpy(tmp+nl+1, domain, dl+1); return res_query(tmp, class, type, dest, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/res_send.c b/src/network/res_send.c index 9593164d..28a17e44 100644 --- a/src/network/res_send.c +++ b/src/network/res_send.c @@ -15,3 +15,11 @@ int __res_send(const unsigned char *msg, int msglen, unsigned char *answer, int } weak_alias(__res_send, res_send); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/res_state.c b/src/network/res_state.c index 5c42cda5..e169be71 100644 --- a/src/network/res_state.c +++ b/src/network/res_state.c @@ -7,3 +7,11 @@ struct __res_state *__res_state() static struct __res_state res; return &res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/resolvconf.c b/src/network/resolvconf.c index ceabf080..0792c6ff 100644 --- a/src/network/resolvconf.c +++ b/src/network/resolvconf.c @@ -92,3 +92,11 @@ no_resolv_conf: return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/send.c b/src/network/send.c index 9f104977..e6421d8e 100644 --- a/src/network/send.c +++ b/src/network/send.c @@ -4,3 +4,11 @@ ssize_t send(int fd, const void *buf, size_t len, int flags) { return sendto(fd, buf, len, flags, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/sendmmsg.c b/src/network/sendmmsg.c index eeae1d0a..43b3d520 100644 --- a/src/network/sendmmsg.c +++ b/src/network/sendmmsg.c @@ -28,3 +28,11 @@ error: return syscall_cp(SYS_sendmmsg, fd, msgvec, vlen, flags); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/sendmsg.c b/src/network/sendmsg.c index acdfdf29..b5767558 100644 --- a/src/network/sendmsg.c +++ b/src/network/sendmsg.c @@ -30,3 +30,11 @@ ssize_t sendmsg(int fd, const struct msghdr *msg, int flags) #endif return socketcall_cp(sendmsg, fd, msg, flags, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/sendto.c b/src/network/sendto.c index c598797c..e203c0b5 100644 --- a/src/network/sendto.c +++ b/src/network/sendto.c @@ -5,3 +5,11 @@ ssize_t sendto(int fd, const void *buf, size_t len, int flags, const struct sock { return socketcall_cp(sendto, fd, buf, len, flags, addr, alen); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/serv.c b/src/network/serv.c index 41424e80..c19b2f56 100644 --- a/src/network/serv.c +++ b/src/network/serv.c @@ -12,3 +12,11 @@ struct servent *getservent(void) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/setsockopt.c b/src/network/setsockopt.c index 612a1947..d10f439c 100644 --- a/src/network/setsockopt.c +++ b/src/network/setsockopt.c @@ -44,3 +44,11 @@ int setsockopt(int fd, int level, int optname, const void *optval, socklen_t opt } return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/shutdown.c b/src/network/shutdown.c index 10ca21aa..a26c4527 100644 --- a/src/network/shutdown.c +++ b/src/network/shutdown.c @@ -5,3 +5,11 @@ int shutdown(int fd, int how) { return socketcall(shutdown, fd, how, 0, 0, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/sockatmark.c b/src/network/sockatmark.c index f474551a..68418800 100644 --- a/src/network/sockatmark.c +++ b/src/network/sockatmark.c @@ -8,3 +8,11 @@ int sockatmark(int s) return -1; return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/socket.c b/src/network/socket.c index afa1a7f3..879cef89 100644 --- a/src/network/socket.c +++ b/src/network/socket.c @@ -19,3 +19,11 @@ int socket(int domain, int type, int protocol) } return __syscall_ret(s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/network/socketpair.c b/src/network/socketpair.c index f3489621..303b71d6 100644 --- a/src/network/socketpair.c +++ b/src/network/socketpair.c @@ -23,3 +23,11 @@ int socketpair(int domain, int type, int protocol, int fd[2]) } return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/fgetgrent.c b/src/passwd/fgetgrent.c index 7d045fd2..c6f31423 100644 --- a/src/passwd/fgetgrent.c +++ b/src/passwd/fgetgrent.c @@ -10,3 +10,11 @@ struct group *fgetgrent(FILE *f) __getgrent_a(f, &gr, &line, &size, &mem, &nmem, &res); return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/fgetpwent.c b/src/passwd/fgetpwent.c index fd472a07..ecd36a50 100644 --- a/src/passwd/fgetpwent.c +++ b/src/passwd/fgetpwent.c @@ -10,3 +10,11 @@ struct passwd *fgetpwent(FILE *f) __getpwent_a(f, &pw, &line, &size, &res); return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/fgetspent.c b/src/passwd/fgetspent.c index 47473bdb..a58270d9 100644 --- a/src/passwd/fgetspent.c +++ b/src/passwd/fgetspent.c @@ -13,3 +13,11 @@ struct spwd *fgetspent(FILE *f) pthread_setcancelstate(cs, 0); return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getgr_a.c b/src/passwd/getgr_a.c index afeb1ece..db568472 100644 --- a/src/passwd/getgr_a.c +++ b/src/passwd/getgr_a.c @@ -167,3 +167,11 @@ done: if (rv) errno = rv; return rv; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getgr_r.c b/src/passwd/getgr_r.c index f3e8f603..ef70968d 100644 --- a/src/passwd/getgr_r.c +++ b/src/passwd/getgr_r.c @@ -47,3 +47,11 @@ int getgrgid_r(gid_t gid, struct group *gr, char *buf, size_t size, struct group { return getgr_r(0, gid, gr, buf, size, res); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getgrent.c b/src/passwd/getgrent.c index 835b9ab5..cf291425 100644 --- a/src/passwd/getgrent.c +++ b/src/passwd/getgrent.c @@ -37,3 +37,11 @@ struct group *getgrnam(const char *name) __getgr_a(name, 0, &gr, &line, &size, &mem, &nmem, &res); return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getgrent_a.c b/src/passwd/getgrent_a.c index 7fc389d4..7817c802 100644 --- a/src/passwd/getgrent_a.c +++ b/src/passwd/getgrent_a.c @@ -66,3 +66,11 @@ end: if(rv) errno = rv; return rv; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getgrouplist.c b/src/passwd/getgrouplist.c index 301824ce..68eb016e 100644 --- a/src/passwd/getgrouplist.c +++ b/src/passwd/getgrouplist.c @@ -79,3 +79,11 @@ cleanup: free(mem); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getpw_a.c b/src/passwd/getpw_a.c index 15a70c03..bb1513b8 100644 --- a/src/passwd/getpw_a.c +++ b/src/passwd/getpw_a.c @@ -140,3 +140,11 @@ done: if (rv) errno = rv; return rv; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getpw_r.c b/src/passwd/getpw_r.c index 0c87ab05..378f4663 100644 --- a/src/passwd/getpw_r.c +++ b/src/passwd/getpw_r.c @@ -40,3 +40,11 @@ int getpwuid_r(uid_t uid, struct passwd *pw, char *buf, size_t size, struct pass { return getpw_r(0, uid, pw, buf, size, res); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getpwent.c b/src/passwd/getpwent.c index f2bd516e..b8199e06 100644 --- a/src/passwd/getpwent.c +++ b/src/passwd/getpwent.c @@ -35,3 +35,11 @@ struct passwd *getpwnam(const char *name) __getpw_a(name, 0, &pw, &line, &size, &res); return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getpwent_a.c b/src/passwd/getpwent_a.c index d1b4b53c..c1be2d3a 100644 --- a/src/passwd/getpwent_a.c +++ b/src/passwd/getpwent_a.c @@ -52,3 +52,11 @@ int __getpwent_a(FILE *f, struct passwd *pw, char **line, size_t *size, struct p if (rv) errno = rv; return rv; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getspent.c b/src/passwd/getspent.c index 8574a480..560c22dd 100644 --- a/src/passwd/getspent.c +++ b/src/passwd/getspent.c @@ -12,3 +12,11 @@ struct spwd *getspent() { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getspnam.c b/src/passwd/getspnam.c index 709b526d..1a3d2ffe 100644 --- a/src/passwd/getspnam.c +++ b/src/passwd/getspnam.c @@ -16,3 +16,11 @@ struct spwd *getspnam(const char *name) errno = e ? e : orig_errno; return res; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/getspnam_r.c b/src/passwd/getspnam_r.c index 541e8531..e794fc19 100644 --- a/src/passwd/getspnam_r.c +++ b/src/passwd/getspnam_r.c @@ -123,3 +123,11 @@ int getspnam_r(const char *name, struct spwd *sp, char *buf, size_t size, struct errno = rv ? rv : orig_errno; return rv; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/lckpwdf.c b/src/passwd/lckpwdf.c index 2feda617..57ddd9e7 100644 --- a/src/passwd/lckpwdf.c +++ b/src/passwd/lckpwdf.c @@ -9,3 +9,11 @@ int ulckpwdf() { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/nscd_query.c b/src/passwd/nscd_query.c index dc3406b8..7e83a003 100644 --- a/src/passwd/nscd_query.c +++ b/src/passwd/nscd_query.c @@ -113,3 +113,11 @@ error: fclose(f); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/putgrent.c b/src/passwd/putgrent.c index 2a8257dc..2fa3df0a 100644 --- a/src/passwd/putgrent.c +++ b/src/passwd/putgrent.c @@ -15,3 +15,11 @@ done: funlockfile(f); return r<0 ? -1 : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/putpwent.c b/src/passwd/putpwent.c index 312b7653..d4717c99 100644 --- a/src/passwd/putpwent.c +++ b/src/passwd/putpwent.c @@ -8,3 +8,11 @@ int putpwent(const struct passwd *pw, FILE *f) pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_gecos, pw->pw_dir, pw->pw_shell)<0 ? -1 : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/passwd/putspent.c b/src/passwd/putspent.c index 55c41bbc..9a4684c5 100644 --- a/src/passwd/putspent.c +++ b/src/passwd/putspent.c @@ -11,3 +11,11 @@ int putspent(const struct spwd *sp, FILE *f) NUM(sp->sp_min), NUM(sp->sp_max), NUM(sp->sp_warn), NUM(sp->sp_inact), NUM(sp->sp_expire), NUM(sp->sp_flag)) < 0 ? -1 : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/__rand48_step.c b/src/prng/__rand48_step.c index 94703d07..a3b84c3c 100644 --- a/src/prng/__rand48_step.c +++ b/src/prng/__rand48_step.c @@ -12,3 +12,11 @@ uint64_t __rand48_step(unsigned short *xi, unsigned short *lc) xi[2] = x>>32; return x & 0xffffffffffffull; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/__seed48.c b/src/prng/__seed48.c index e436b4d3..06a2be00 100644 --- a/src/prng/__seed48.c +++ b/src/prng/__seed48.c @@ -1,3 +1,11 @@ #include "rand48.h" unsigned short __seed48[7] = { 0, 0, 0, 0xe66d, 0xdeec, 0x5, 0xb }; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/drand48.c b/src/prng/drand48.c index 08283e24..13b928da 100644 --- a/src/prng/drand48.c +++ b/src/prng/drand48.c @@ -15,3 +15,11 @@ double drand48(void) { return erand48(__seed48); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/lcong48.c b/src/prng/lcong48.c index 030e5148..f080587b 100644 --- a/src/prng/lcong48.c +++ b/src/prng/lcong48.c @@ -6,3 +6,11 @@ void lcong48(unsigned short p[7]) { memcpy(__seed48, p, sizeof __seed48); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/lrand48.c b/src/prng/lrand48.c index 07e2b784..178a86da 100644 --- a/src/prng/lrand48.c +++ b/src/prng/lrand48.c @@ -11,3 +11,11 @@ long lrand48(void) { return nrand48(__seed48); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/mrand48.c b/src/prng/mrand48.c index f4a56e61..c96fc1fa 100644 --- a/src/prng/mrand48.c +++ b/src/prng/mrand48.c @@ -11,3 +11,11 @@ long mrand48(void) { return jrand48(__seed48); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/rand.c b/src/prng/rand.c index c000cd24..0131ecd6 100644 --- a/src/prng/rand.c +++ b/src/prng/rand.c @@ -13,3 +13,11 @@ int rand(void) seed = 6364136223846793005ULL*seed + 1; return seed>>33; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/rand_r.c b/src/prng/rand_r.c index 638614c8..459e579b 100644 --- a/src/prng/rand_r.c +++ b/src/prng/rand_r.c @@ -13,3 +13,11 @@ int rand_r(unsigned *seed) { return temper(*seed = *seed * 1103515245 + 12345)/2; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/random.c b/src/prng/random.c index d3780fa7..92683672 100644 --- a/src/prng/random.c +++ b/src/prng/random.c @@ -122,3 +122,11 @@ end: UNLOCK(lock); return k; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/seed48.c b/src/prng/seed48.c index bce7b339..d091d094 100644 --- a/src/prng/seed48.c +++ b/src/prng/seed48.c @@ -9,3 +9,11 @@ unsigned short *seed48(unsigned short *s) memcpy(__seed48, s, sizeof p); return p; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/prng/srand48.c b/src/prng/srand48.c index 0a56f6a0..b954c7ed 100644 --- a/src/prng/srand48.c +++ b/src/prng/srand48.c @@ -4,3 +4,11 @@ void srand48(long seed) { seed48((unsigned short [3]){ 0x330e, seed, seed>>16 }); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/_Fork.c b/src/process/_Fork.c index 9c07792d..4ab6e15a 100644 --- a/src/process/_Fork.c +++ b/src/process/_Fork.c @@ -41,3 +41,11 @@ pid_t _Fork(void) __restore_sigs(&set); return __syscall_ret(ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/execl.c b/src/process/execl.c index 5ee5c81e..a78fdae6 100644 --- a/src/process/execl.c +++ b/src/process/execl.c @@ -20,3 +20,11 @@ int execl(const char *path, const char *argv0, ...) return execv(path, argv); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/execle.c b/src/process/execle.c index 37ca5034..50e12e39 100644 --- a/src/process/execle.c +++ b/src/process/execle.c @@ -21,3 +21,11 @@ int execle(const char *path, const char *argv0, ...) return execve(path, argv, envp); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/execlp.c b/src/process/execlp.c index 5eed886e..d1ab2951 100644 --- a/src/process/execlp.c +++ b/src/process/execlp.c @@ -20,3 +20,11 @@ int execlp(const char *file, const char *argv0, ...) return execvp(file, argv); } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/execv.c b/src/process/execv.c index 2ac0dec0..b9d8efee 100644 --- a/src/process/execv.c +++ b/src/process/execv.c @@ -6,3 +6,11 @@ int execv(const char *path, char *const argv[]) { return execve(path, argv, __environ); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/execve.c b/src/process/execve.c index 70286a17..ffe92986 100644 --- a/src/process/execve.c +++ b/src/process/execve.c @@ -6,3 +6,11 @@ int execve(const char *path, char *const argv[], char *const envp[]) /* do we need to use environ if envp is null? */ return syscall(SYS_execve, path, argv, envp); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/execvp.c b/src/process/execvp.c index ef3b9dd5..177c718c 100644 --- a/src/process/execvp.c +++ b/src/process/execvp.c @@ -58,3 +58,11 @@ int execvp(const char *file, char *const argv[]) } weak_alias(__execvpe, execvpe); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/fexecve.c b/src/process/fexecve.c index 554c1981..278696ea 100644 --- a/src/process/fexecve.c +++ b/src/process/fexecve.c @@ -14,3 +14,11 @@ int fexecve(int fd, char *const argv[], char *const envp[]) if (errno == ENOENT) errno = EBADF; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/fork.c b/src/process/fork.c index 56f19313..7ea70c0c 100644 --- a/src/process/fork.c +++ b/src/process/fork.c @@ -88,3 +88,11 @@ pid_t fork(void) if (ret<0) errno = errno_save; return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c index 728551b3..3c3c2913 100644 --- a/src/process/posix_spawn.c +++ b/src/process/posix_spawn.c @@ -212,3 +212,11 @@ fail: return ec; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn_file_actions_addchdir.c b/src/process/posix_spawn_file_actions_addchdir.c index 7f2590ae..d3379c3a 100644 --- a/src/process/posix_spawn_file_actions_addchdir.c +++ b/src/process/posix_spawn_file_actions_addchdir.c @@ -16,3 +16,11 @@ int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *restrict fa fa->__actions = op; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn_file_actions_addclose.c b/src/process/posix_spawn_file_actions_addclose.c index 0c2ef8fa..5a21964b 100644 --- a/src/process/posix_spawn_file_actions_addclose.c +++ b/src/process/posix_spawn_file_actions_addclose.c @@ -15,3 +15,11 @@ int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *fa, int fd) fa->__actions = op; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn_file_actions_adddup2.c b/src/process/posix_spawn_file_actions_adddup2.c index addca4d4..9bbd44fb 100644 --- a/src/process/posix_spawn_file_actions_adddup2.c +++ b/src/process/posix_spawn_file_actions_adddup2.c @@ -16,3 +16,11 @@ int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *fa, int srcfd, fa->__actions = op; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn_file_actions_addfchdir.c b/src/process/posix_spawn_file_actions_addfchdir.c index e89ede8c..5de68717 100644 --- a/src/process/posix_spawn_file_actions_addfchdir.c +++ b/src/process/posix_spawn_file_actions_addfchdir.c @@ -16,3 +16,11 @@ int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *fa, int fd fa->__actions = op; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn_file_actions_addopen.c b/src/process/posix_spawn_file_actions_addopen.c index 82bbcec9..569d297b 100644 --- a/src/process/posix_spawn_file_actions_addopen.c +++ b/src/process/posix_spawn_file_actions_addopen.c @@ -19,3 +19,11 @@ int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *restrict fa, in fa->__actions = op; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn_file_actions_destroy.c b/src/process/posix_spawn_file_actions_destroy.c index 3251babb..7e22ee77 100644 --- a/src/process/posix_spawn_file_actions_destroy.c +++ b/src/process/posix_spawn_file_actions_destroy.c @@ -12,3 +12,11 @@ int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawn_file_actions_init.c b/src/process/posix_spawn_file_actions_init.c index 89d5e127..f55f50e9 100644 --- a/src/process/posix_spawn_file_actions_init.c +++ b/src/process/posix_spawn_file_actions_init.c @@ -5,3 +5,11 @@ int posix_spawn_file_actions_init(posix_spawn_file_actions_t *fa) fa->__actions = 0; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_destroy.c b/src/process/posix_spawnattr_destroy.c index fc714a1b..0313d88e 100644 --- a/src/process/posix_spawnattr_destroy.c +++ b/src/process/posix_spawnattr_destroy.c @@ -4,3 +4,11 @@ int posix_spawnattr_destroy(posix_spawnattr_t *attr) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_getflags.c b/src/process/posix_spawnattr_getflags.c index aa635dda..2a5b006d 100644 --- a/src/process/posix_spawnattr_getflags.c +++ b/src/process/posix_spawnattr_getflags.c @@ -5,3 +5,11 @@ int posix_spawnattr_getflags(const posix_spawnattr_t *restrict attr, short *rest *flags = attr->__flags; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_getpgroup.c b/src/process/posix_spawnattr_getpgroup.c index 0480527d..66c50215 100644 --- a/src/process/posix_spawnattr_getpgroup.c +++ b/src/process/posix_spawnattr_getpgroup.c @@ -5,3 +5,11 @@ int posix_spawnattr_getpgroup(const posix_spawnattr_t *restrict attr, pid_t *res *pgrp = attr->__pgrp; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_getsigdefault.c b/src/process/posix_spawnattr_getsigdefault.c index a49050aa..3d282152 100644 --- a/src/process/posix_spawnattr_getsigdefault.c +++ b/src/process/posix_spawnattr_getsigdefault.c @@ -5,3 +5,11 @@ int posix_spawnattr_getsigdefault(const posix_spawnattr_t *restrict attr, sigset *def = attr->__def; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_getsigmask.c b/src/process/posix_spawnattr_getsigmask.c index f60ad7f3..14f879fa 100644 --- a/src/process/posix_spawnattr_getsigmask.c +++ b/src/process/posix_spawnattr_getsigmask.c @@ -5,3 +5,11 @@ int posix_spawnattr_getsigmask(const posix_spawnattr_t *restrict attr, sigset_t *mask = attr->__mask; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_init.c b/src/process/posix_spawnattr_init.c index 0dcd868f..cfc58882 100644 --- a/src/process/posix_spawnattr_init.c +++ b/src/process/posix_spawnattr_init.c @@ -5,3 +5,11 @@ int posix_spawnattr_init(posix_spawnattr_t *attr) *attr = (posix_spawnattr_t){ 0 }; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_sched.c b/src/process/posix_spawnattr_sched.c index 3143635b..07c658bd 100644 --- a/src/process/posix_spawnattr_sched.c +++ b/src/process/posix_spawnattr_sched.c @@ -23,3 +23,11 @@ int posix_spawnattr_setschedpolicy(posix_spawnattr_t *attr, int policy) { return ENOSYS; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_setflags.c b/src/process/posix_spawnattr_setflags.c index 68780992..d2e785c4 100644 --- a/src/process/posix_spawnattr_setflags.c +++ b/src/process/posix_spawnattr_setflags.c @@ -16,3 +16,11 @@ int posix_spawnattr_setflags(posix_spawnattr_t *attr, short flags) attr->__flags = flags; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_setpgroup.c b/src/process/posix_spawnattr_setpgroup.c index f39596a6..2f72f72a 100644 --- a/src/process/posix_spawnattr_setpgroup.c +++ b/src/process/posix_spawnattr_setpgroup.c @@ -5,3 +5,11 @@ int posix_spawnattr_setpgroup(posix_spawnattr_t *attr, pid_t pgrp) attr->__pgrp = pgrp; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_setsigdefault.c b/src/process/posix_spawnattr_setsigdefault.c index 56869726..2ad5bc59 100644 --- a/src/process/posix_spawnattr_setsigdefault.c +++ b/src/process/posix_spawnattr_setsigdefault.c @@ -5,3 +5,11 @@ int posix_spawnattr_setsigdefault(posix_spawnattr_t *restrict attr, const sigset attr->__def = *def; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnattr_setsigmask.c b/src/process/posix_spawnattr_setsigmask.c index f2532f8e..b1b4952e 100644 --- a/src/process/posix_spawnattr_setsigmask.c +++ b/src/process/posix_spawnattr_setsigmask.c @@ -5,3 +5,11 @@ int posix_spawnattr_setsigmask(posix_spawnattr_t *restrict attr, const sigset_t attr->__mask = *mask; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/posix_spawnp.c b/src/process/posix_spawnp.c index aad6133b..c4a02cce 100644 --- a/src/process/posix_spawnp.c +++ b/src/process/posix_spawnp.c @@ -11,3 +11,11 @@ int posix_spawnp(pid_t *restrict res, const char *restrict file, spawnp_attr.__fn = (void *)__execvpe; return posix_spawn(res, file, fa, &spawnp_attr, argv, envp); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/system.c b/src/process/system.c index 5af59b80..891c82ee 100644 --- a/src/process/system.c +++ b/src/process/system.c @@ -44,3 +44,11 @@ int system(const char *cmd) if (ret) errno = ret; return status; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/wait.c b/src/process/wait.c index 34da102d..fb79a11e 100644 --- a/src/process/wait.c +++ b/src/process/wait.c @@ -4,3 +4,11 @@ pid_t wait(int *status) { return waitpid((pid_t)-1, status, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/waitid.c b/src/process/waitid.c index d688650d..17207676 100644 --- a/src/process/waitid.c +++ b/src/process/waitid.c @@ -5,3 +5,11 @@ int waitid(idtype_t type, id_t id, siginfo_t *info, int options) { return syscall_cp(SYS_waitid, type, id, info, options, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/process/waitpid.c b/src/process/waitpid.c index 1b65bf05..5b702695 100644 --- a/src/process/waitpid.c +++ b/src/process/waitpid.c @@ -5,3 +5,11 @@ pid_t waitpid(pid_t pid, int *status, int options) { return syscall_cp(SYS_wait4, pid, status, options, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/regex/fnmatch.c b/src/regex/fnmatch.c index 978fff88..8110d468 100644 --- a/src/regex/fnmatch.c +++ b/src/regex/fnmatch.c @@ -319,3 +319,11 @@ int fnmatch(const char *pat, const char *str, int flags) } return fnmatch_internal(pat, -1, str, -1, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/regex/glob.c b/src/regex/glob.c index 87bae084..eb258d1c 100644 --- a/src/regex/glob.c +++ b/src/regex/glob.c @@ -306,3 +306,11 @@ void globfree(glob_t *g) g->gl_pathc = 0; g->gl_pathv = NULL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index fb24556e..f9b8ff48 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -2951,3 +2951,11 @@ regfree(regex_t *preg) xfree(tnfa->minimal_tags); xfree(tnfa); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/regex/regerror.c b/src/regex/regerror.c index 5b347cc7..3e66104e 100644 --- a/src/regex/regerror.c +++ b/src/regex/regerror.c @@ -35,3 +35,11 @@ size_t regerror(int e, const regex_t *restrict preg, char *restrict buf, size_t s = LCTRANS_CUR(s); return 1+snprintf(buf, size, "%s", s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/regex/regexec.c b/src/regex/regexec.c index 253b0e14..a9946ccc 100644 --- a/src/regex/regexec.c +++ b/src/regex/regexec.c @@ -1026,3 +1026,11 @@ regexec(const regex_t *restrict preg, const char *restrict string, xfree(tags); return status; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/regex/tre-mem.c b/src/regex/tre-mem.c index 86f809d4..9af7e1f0 100644 --- a/src/regex/tre-mem.c +++ b/src/regex/tre-mem.c @@ -156,3 +156,11 @@ tre_mem_alloc_impl(tre_mem_t mem, int provided, void *provided_block, return ptr; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/affinity.c b/src/sched/affinity.c index 948ece41..f011a6f2 100644 --- a/src/sched/affinity.c +++ b/src/sched/affinity.c @@ -31,3 +31,11 @@ int pthread_getaffinity_np(pthread_t td, size_t size, cpu_set_t *set) { return -do_getaffinity(td->tid, size, set); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_cpucount.c b/src/sched/sched_cpucount.c index 94aa259e..ae0604d7 100644 --- a/src/sched/sched_cpucount.c +++ b/src/sched/sched_cpucount.c @@ -9,3 +9,11 @@ int __sched_cpucount(size_t size, const cpu_set_t *set) if (p[i] & (1<<j)) cnt++; return cnt; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_get_priority_max.c b/src/sched/sched_get_priority_max.c index 30ae5100..cfafb80e 100644 --- a/src/sched/sched_get_priority_max.c +++ b/src/sched/sched_get_priority_max.c @@ -10,3 +10,11 @@ int sched_get_priority_min(int policy) { return syscall(SYS_sched_get_priority_min, policy); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_getcpu.c b/src/sched/sched_getcpu.c index 4ec5eaf6..0e35b177 100644 --- a/src/sched/sched_getcpu.c +++ b/src/sched/sched_getcpu.c @@ -40,3 +40,11 @@ int sched_getcpu(void) if (!r) return cpu; return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_getparam.c b/src/sched/sched_getparam.c index 76f10e49..f9f412da 100644 --- a/src/sched/sched_getparam.c +++ b/src/sched/sched_getparam.c @@ -6,3 +6,11 @@ int sched_getparam(pid_t pid, struct sched_param *param) { return __syscall_ret(-ENOSYS); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_getscheduler.c b/src/sched/sched_getscheduler.c index 394e508b..792e4be4 100644 --- a/src/sched/sched_getscheduler.c +++ b/src/sched/sched_getscheduler.c @@ -6,3 +6,11 @@ int sched_getscheduler(pid_t pid) { return __syscall_ret(-ENOSYS); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_rr_get_interval.c b/src/sched/sched_rr_get_interval.c index 33a3d1ae..e249f53d 100644 --- a/src/sched/sched_rr_get_interval.c +++ b/src/sched/sched_rr_get_interval.c @@ -19,3 +19,11 @@ int sched_rr_get_interval(pid_t pid, struct timespec *ts) * 32-bit arch and we can get result directly into timespec. */ return syscall(SYS_sched_rr_get_interval, pid, ts); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_setparam.c b/src/sched/sched_setparam.c index 18623ee4..1aad8bbb 100644 --- a/src/sched/sched_setparam.c +++ b/src/sched/sched_setparam.c @@ -6,3 +6,11 @@ int sched_setparam(pid_t pid, const struct sched_param *param) { return __syscall_ret(-ENOSYS); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_setscheduler.c b/src/sched/sched_setscheduler.c index 4435f216..a524bda8 100644 --- a/src/sched/sched_setscheduler.c +++ b/src/sched/sched_setscheduler.c @@ -6,3 +6,11 @@ int sched_setscheduler(pid_t pid, int sched, const struct sched_param *param) { return __syscall_ret(-ENOSYS); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/sched/sched_yield.c b/src/sched/sched_yield.c index ee6f0e7f..8671c64c 100644 --- a/src/sched/sched_yield.c +++ b/src/sched/sched_yield.c @@ -5,3 +5,11 @@ int sched_yield() { return syscall(SYS_sched_yield); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/hsearch.c b/src/search/hsearch.c index 2634a67f..a2ba83ce 100644 --- a/src/search/hsearch.c +++ b/src/search/hsearch.c @@ -151,3 +151,11 @@ static int __hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch return 1; } weak_alias(__hsearch_r, hsearch_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/insque.c b/src/search/insque.c index b7475d84..87505f53 100644 --- a/src/search/insque.c +++ b/src/search/insque.c @@ -30,3 +30,11 @@ void remque(void *element) if (e->prev) e->prev->next = e->next; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/lsearch.c b/src/search/lsearch.c index 5eb5cc2b..be90942b 100644 --- a/src/search/lsearch.c +++ b/src/search/lsearch.c @@ -29,3 +29,11 @@ void *lfind(const void *key, const void *base, size_t *nelp, } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/tdelete.c b/src/search/tdelete.c index b8bb924b..1ffe25d6 100644 --- a/src/search/tdelete.c +++ b/src/search/tdelete.c @@ -47,3 +47,11 @@ void *tdelete(const void *restrict key, void **restrict rootp, while (--i && __tsearch_balance(a[i])); return parent; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/tdestroy.c b/src/search/tdestroy.c index 699a901c..caa4f7a7 100644 --- a/src/search/tdestroy.c +++ b/src/search/tdestroy.c @@ -14,3 +14,11 @@ void tdestroy(void *root, void (*freekey)(void *)) if (freekey) freekey((void *)r->key); free(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/tfind.c b/src/search/tfind.c index 9e1cf98f..ac1e01e0 100644 --- a/src/search/tfind.c +++ b/src/search/tfind.c @@ -18,3 +18,11 @@ void *tfind(const void *key, void *const *rootp, } return n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/tsearch.c b/src/search/tsearch.c index 0de27d05..21b459fc 100644 --- a/src/search/tsearch.c +++ b/src/search/tsearch.c @@ -90,3 +90,11 @@ void *tsearch(const void *key, void **rootp, while (i && __tsearch_balance(a[--i])); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/search/twalk.c b/src/search/twalk.c index 53821cda..5917fd9b 100644 --- a/src/search/twalk.c +++ b/src/search/twalk.c @@ -20,3 +20,11 @@ void twalk(const void *root, void (*action)(const void *, VISIT, int)) { walk(root, action, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/select/poll.c b/src/select/poll.c index 7883dfab..497e321d 100644 --- a/src/select/poll.c +++ b/src/select/poll.c @@ -18,3 +18,11 @@ int poll(struct pollfd *fds, nfds_t n, int timeout) 0, _NSIG/8); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/select/pselect.c b/src/select/pselect.c index 54cfb291..cf7e31c3 100644 --- a/src/select/pselect.c +++ b/src/select/pselect.c @@ -24,3 +24,11 @@ int pselect(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restric return syscall_cp(SYS_pselect6, n, rfds, wfds, efds, ts ? ((long[]){s, ns}) : 0, data); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/select/select.c b/src/select/select.c index f1d72863..76e34ff2 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -43,3 +43,11 @@ int select(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict tv ? ((long[]){s, ns}) : 0, ((syscall_arg_t[]){ 0, _NSIG/8 })); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/block.c b/src/signal/block.c index cc8698f0..69ec013a 100644 --- a/src/signal/block.c +++ b/src/signal/block.c @@ -42,3 +42,11 @@ void __restore_sigs(void *set) { __syscall(SYS_rt_sigprocmask, SIG_SETMASK, set, 0, _NSIG/8); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/getitimer.c b/src/signal/getitimer.c index 36d1eb9d..aadf2ddc 100644 --- a/src/signal/getitimer.c +++ b/src/signal/getitimer.c @@ -16,3 +16,11 @@ int getitimer(int which, struct itimerval *old) } return syscall(SYS_getitimer, which, old); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/kill.c b/src/signal/kill.c index 05805733..c846a409 100644 --- a/src/signal/kill.c +++ b/src/signal/kill.c @@ -5,3 +5,11 @@ int kill(pid_t pid, int sig) { return syscall(SYS_kill, pid, sig); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/killpg.c b/src/signal/killpg.c index 315ed447..ce99230a 100644 --- a/src/signal/killpg.c +++ b/src/signal/killpg.c @@ -9,3 +9,11 @@ int killpg(pid_t pgid, int sig) } return kill(-pgid, sig); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/psiginfo.c b/src/signal/psiginfo.c index 2b15982b..defe4680 100644 --- a/src/signal/psiginfo.c +++ b/src/signal/psiginfo.c @@ -4,3 +4,11 @@ void psiginfo(const siginfo_t *si, const char *msg) { psignal(si->si_signo, msg); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/psignal.c b/src/signal/psignal.c index 138dbe00..ae223e63 100644 --- a/src/signal/psignal.c +++ b/src/signal/psignal.c @@ -25,3 +25,11 @@ void psignal(int sig, const char *msg) FUNLOCK(f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/raise.c b/src/signal/raise.c index f0512019..b65d8c22 100644 --- a/src/signal/raise.c +++ b/src/signal/raise.c @@ -11,3 +11,11 @@ int raise(int sig) __restore_sigs(&set); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/setitimer.c b/src/signal/setitimer.c index 0dfbeb4d..a38d7359 100644 --- a/src/signal/setitimer.c +++ b/src/signal/setitimer.c @@ -24,3 +24,11 @@ int setitimer(int which, const struct itimerval *restrict new, struct itimerval } return syscall(SYS_setitimer, which, new, old); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigaction.c b/src/signal/sigaction.c index e45308fa..7295f53f 100644 --- a/src/signal/sigaction.c +++ b/src/signal/sigaction.c @@ -85,3 +85,11 @@ int __sigaction(int sig, const struct sigaction *restrict sa, struct sigaction * } weak_alias(__sigaction, sigaction); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigaddset.c b/src/signal/sigaddset.c index 085d1f4a..4b82333c 100644 --- a/src/signal/sigaddset.c +++ b/src/signal/sigaddset.c @@ -11,3 +11,11 @@ int sigaddset(sigset_t *set, int sig) set->__bits[s/8/sizeof *set->__bits] |= 1UL<<(s&8*sizeof *set->__bits-1); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigaltstack.c b/src/signal/sigaltstack.c index d3a6e821..08b2c4c1 100644 --- a/src/signal/sigaltstack.c +++ b/src/signal/sigaltstack.c @@ -16,3 +16,11 @@ int sigaltstack(const stack_t *restrict ss, stack_t *restrict old) } return syscall(SYS_sigaltstack, ss, old); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigandset.c b/src/signal/sigandset.c index 974186f3..8c0cb97a 100644 --- a/src/signal/sigandset.c +++ b/src/signal/sigandset.c @@ -10,3 +10,11 @@ int sigandset(sigset_t *dest, const sigset_t *left, const sigset_t *right) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigdelset.c b/src/signal/sigdelset.c index ce69280e..7995fea8 100644 --- a/src/signal/sigdelset.c +++ b/src/signal/sigdelset.c @@ -11,3 +11,11 @@ int sigdelset(sigset_t *set, int sig) set->__bits[s/8/sizeof *set->__bits] &=~(1UL<<(s&8*sizeof *set->__bits-1)); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigemptyset.c b/src/signal/sigemptyset.c index 1d07471d..b744e400 100644 --- a/src/signal/sigemptyset.c +++ b/src/signal/sigemptyset.c @@ -11,3 +11,11 @@ int sigemptyset(sigset_t *set) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigfillset.c b/src/signal/sigfillset.c index 16e7b4f5..d1041c19 100644 --- a/src/signal/sigfillset.c +++ b/src/signal/sigfillset.c @@ -16,3 +16,11 @@ int sigfillset(sigset_t *set) #endif return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sighold.c b/src/signal/sighold.c index cfa2306c..ef76babf 100644 --- a/src/signal/sighold.c +++ b/src/signal/sighold.c @@ -8,3 +8,11 @@ int sighold(int sig) if (sigaddset(&mask, sig) < 0) return -1; return sigprocmask(SIG_BLOCK, &mask, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigignore.c b/src/signal/sigignore.c index 5ba05e12..2153ea3b 100644 --- a/src/signal/sigignore.c +++ b/src/signal/sigignore.c @@ -9,3 +9,11 @@ int sigignore(int sig) sa.sa_flags = 0; return sigaction(sig, &sa, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/siginterrupt.c b/src/signal/siginterrupt.c index 70063400..6c4ee4de 100644 --- a/src/signal/siginterrupt.c +++ b/src/signal/siginterrupt.c @@ -10,3 +10,11 @@ int siginterrupt(int sig, int flag) return sigaction(sig, &sa, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigisemptyset.c b/src/signal/sigisemptyset.c index 68b86624..cf03689c 100644 --- a/src/signal/sigisemptyset.c +++ b/src/signal/sigisemptyset.c @@ -8,3 +8,11 @@ int sigisemptyset(const sigset_t *set) if (set->__bits[i]) return 0; return 1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigismember.c b/src/signal/sigismember.c index ab87d622..7d1d7a15 100644 --- a/src/signal/sigismember.c +++ b/src/signal/sigismember.c @@ -6,3 +6,11 @@ int sigismember(const sigset_t *set, int sig) if (s >= _NSIG-1) return 0; return !!(set->__bits[s/8/sizeof *set->__bits] & 1UL<<(s&8*sizeof *set->__bits-1)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/siglongjmp.c b/src/signal/siglongjmp.c index bc317acc..60415f03 100644 --- a/src/signal/siglongjmp.c +++ b/src/signal/siglongjmp.c @@ -7,3 +7,11 @@ _Noreturn void siglongjmp(sigjmp_buf buf, int ret) { longjmp(buf, ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/signal.c b/src/signal/signal.c index 7a6dd172..412e74d6 100644 --- a/src/signal/signal.c +++ b/src/signal/signal.c @@ -11,3 +11,11 @@ void (*signal(int sig, void (*func)(int)))(int) weak_alias(signal, bsd_signal); weak_alias(signal, __sysv_signal); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigorset.c b/src/signal/sigorset.c index ed488738..08d8a5fc 100644 --- a/src/signal/sigorset.c +++ b/src/signal/sigorset.c @@ -10,3 +10,11 @@ int sigorset(sigset_t *dest, const sigset_t *left, const sigset_t *right) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigpause.c b/src/signal/sigpause.c index 363d2fec..da90be38 100644 --- a/src/signal/sigpause.c +++ b/src/signal/sigpause.c @@ -7,3 +7,11 @@ int sigpause(int sig) sigdelset(&mask, sig); return sigsuspend(&mask); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigpending.c b/src/signal/sigpending.c index 3d193df8..d5defa73 100644 --- a/src/signal/sigpending.c +++ b/src/signal/sigpending.c @@ -5,3 +5,11 @@ int sigpending(sigset_t *set) { return syscall(SYS_rt_sigpending, set, _NSIG/8); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigprocmask.c b/src/signal/sigprocmask.c index 297e20c6..d601b7c6 100644 --- a/src/signal/sigprocmask.c +++ b/src/signal/sigprocmask.c @@ -8,3 +8,11 @@ int sigprocmask(int how, const sigset_t *restrict set, sigset_t *restrict old) errno = r; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigqueue.c b/src/signal/sigqueue.c index b75f0c5c..37fe328f 100644 --- a/src/signal/sigqueue.c +++ b/src/signal/sigqueue.c @@ -20,3 +20,11 @@ int sigqueue(pid_t pid, int sig, const union sigval value) __restore_sigs(&set); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigrelse.c b/src/signal/sigrelse.c index b4c5a00f..c8e19e15 100644 --- a/src/signal/sigrelse.c +++ b/src/signal/sigrelse.c @@ -8,3 +8,11 @@ int sigrelse(int sig) if (sigaddset(&mask, sig) < 0) return -1; return sigprocmask(SIG_UNBLOCK, &mask, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigrtmax.c b/src/signal/sigrtmax.c index 44dc88ff..a479361a 100644 --- a/src/signal/sigrtmax.c +++ b/src/signal/sigrtmax.c @@ -4,3 +4,11 @@ int __libc_current_sigrtmax() { return _NSIG-1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigrtmin.c b/src/signal/sigrtmin.c index c5a1fd92..96614d15 100644 --- a/src/signal/sigrtmin.c +++ b/src/signal/sigrtmin.c @@ -4,3 +4,11 @@ int __libc_current_sigrtmin() { return 35; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigset.c b/src/signal/sigset.c index f3e8c407..fb991788 100644 --- a/src/signal/sigset.c +++ b/src/signal/sigset.c @@ -25,3 +25,11 @@ void (*sigset(int sig, void (*handler)(int)))(int) } return sigismember(&mask_old, sig) ? SIG_HOLD : sa_old.sa_handler; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigsetjmp_tail.c b/src/signal/sigsetjmp_tail.c index f2aa2887..aa7f686e 100644 --- a/src/signal/sigsetjmp_tail.c +++ b/src/signal/sigsetjmp_tail.c @@ -8,3 +8,11 @@ hidden int __sigsetjmp_tail(sigjmp_buf jb, int ret) __syscall(SYS_rt_sigprocmask, SIG_SETMASK, ret?p:0, ret?0:p, _NSIG/8); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigsuspend.c b/src/signal/sigsuspend.c index 36e0602c..279b4dbc 100644 --- a/src/signal/sigsuspend.c +++ b/src/signal/sigsuspend.c @@ -5,3 +5,11 @@ int sigsuspend(const sigset_t *mask) { return syscall_cp(SYS_rt_sigsuspend, mask, _NSIG/8); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigtimedwait.c b/src/signal/sigtimedwait.c index 1287174e..85af760e 100644 --- a/src/signal/sigtimedwait.c +++ b/src/signal/sigtimedwait.c @@ -30,3 +30,11 @@ int sigtimedwait(const sigset_t *restrict mask, siginfo_t *restrict si, const st while (ret==-EINTR); return __syscall_ret(ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigwait.c b/src/signal/sigwait.c index c8822eea..aadda5f1 100644 --- a/src/signal/sigwait.c +++ b/src/signal/sigwait.c @@ -8,3 +8,11 @@ int sigwait(const sigset_t *restrict mask, int *restrict sig) *sig = si.si_signo; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/signal/sigwaitinfo.c b/src/signal/sigwaitinfo.c index bb51f8b5..d43f39b1 100644 --- a/src/signal/sigwaitinfo.c +++ b/src/signal/sigwaitinfo.c @@ -4,3 +4,11 @@ int sigwaitinfo(const sigset_t *restrict mask, siginfo_t *restrict si) { return sigtimedwait(mask, si, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/__xstat.c b/src/stat/__xstat.c index b4560df7..d26d4a83 100644 --- a/src/stat/__xstat.c +++ b/src/stat/__xstat.c @@ -33,3 +33,11 @@ int __xmknodat(int ver, int fd, const char *path, mode_t mode, dev_t *dev) { return mknodat(fd, path, mode, *dev); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/chmod.c b/src/stat/chmod.c index d4f53c56..149c9a39 100644 --- a/src/stat/chmod.c +++ b/src/stat/chmod.c @@ -10,3 +10,11 @@ int chmod(const char *path, mode_t mode) return syscall(SYS_fchmodat, AT_FDCWD, path, mode); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/fchmod.c b/src/stat/fchmod.c index 7a503eef..468c049b 100644 --- a/src/stat/fchmod.c +++ b/src/stat/fchmod.c @@ -17,3 +17,11 @@ int fchmod(int fd, mode_t mode) return syscall(SYS_fchmodat, AT_FDCWD, buf, mode); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/fchmodat.c b/src/stat/fchmodat.c index bc581050..2f0a38ec 100644 --- a/src/stat/fchmodat.c +++ b/src/stat/fchmodat.c @@ -35,3 +35,11 @@ int fchmodat(int fd, const char *path, mode_t mode, int flag) __syscall(SYS_close, fd2); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/fstat.c b/src/stat/fstat.c index fd28b8ac..4d7d9ecc 100644 --- a/src/stat/fstat.c +++ b/src/stat/fstat.c @@ -11,3 +11,11 @@ int __fstat(int fd, struct stat *st) } weak_alias(__fstat, fstat); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/fstatat.c b/src/stat/fstatat.c index 9eed063b..4df461ff 100644 --- a/src/stat/fstatat.c +++ b/src/stat/fstatat.c @@ -152,3 +152,11 @@ int __fstatat(int fd, const char *restrict path, struct stat *restrict st, int f } weak_alias(__fstatat, fstatat); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/futimens.c b/src/stat/futimens.c index 360225b8..154989d1 100644 --- a/src/stat/futimens.c +++ b/src/stat/futimens.c @@ -4,3 +4,11 @@ int futimens(int fd, const struct timespec times[2]) { return utimensat(fd, 0, times, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/futimesat.c b/src/stat/futimesat.c index 4bdb1c29..d761c95a 100644 --- a/src/stat/futimesat.c +++ b/src/stat/futimesat.c @@ -20,3 +20,11 @@ int __futimesat(int dirfd, const char *pathname, const struct timeval times[2]) } weak_alias(__futimesat, futimesat); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/lchmod.c b/src/stat/lchmod.c index f324ba79..8870b002 100644 --- a/src/stat/lchmod.c +++ b/src/stat/lchmod.c @@ -6,3 +6,11 @@ int lchmod(const char *path, mode_t mode) { return fchmodat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/lstat.c b/src/stat/lstat.c index 6822fcae..38ef5948 100644 --- a/src/stat/lstat.c +++ b/src/stat/lstat.c @@ -5,3 +5,11 @@ int lstat(const char *restrict path, struct stat *restrict buf) { return fstatat(AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/mkdir.c b/src/stat/mkdir.c index 32625b7d..5e3de65d 100644 --- a/src/stat/mkdir.c +++ b/src/stat/mkdir.c @@ -10,3 +10,11 @@ int mkdir(const char *path, mode_t mode) return syscall(SYS_mkdirat, AT_FDCWD, path, mode); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/mkdirat.c b/src/stat/mkdirat.c index b8bc2527..7a143653 100644 --- a/src/stat/mkdirat.c +++ b/src/stat/mkdirat.c @@ -5,3 +5,11 @@ int mkdirat(int fd, const char *path, mode_t mode) { return syscall(SYS_mkdirat, fd, path, mode); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/mkfifo.c b/src/stat/mkfifo.c index 60efcf73..48d36ded 100644 --- a/src/stat/mkfifo.c +++ b/src/stat/mkfifo.c @@ -4,3 +4,11 @@ int mkfifo(const char *path, mode_t mode) { return mknod(path, mode | S_IFIFO, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/mkfifoat.c b/src/stat/mkfifoat.c index d3a1f970..dae33257 100644 --- a/src/stat/mkfifoat.c +++ b/src/stat/mkfifoat.c @@ -4,3 +4,11 @@ int mkfifoat(int fd, const char *path, mode_t mode) { return mknodat(fd, path, mode | S_IFIFO, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/mknod.c b/src/stat/mknod.c index beebd84e..2260cde1 100644 --- a/src/stat/mknod.c +++ b/src/stat/mknod.c @@ -10,3 +10,11 @@ int mknod(const char *path, mode_t mode, dev_t dev) return syscall(SYS_mknodat, AT_FDCWD, path, mode, dev); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/mknodat.c b/src/stat/mknodat.c index 7c97c91a..6265774f 100644 --- a/src/stat/mknodat.c +++ b/src/stat/mknodat.c @@ -5,3 +5,11 @@ int mknodat(int fd, const char *path, mode_t mode, dev_t dev) { return syscall(SYS_mknodat, fd, path, mode, dev); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/stat.c b/src/stat/stat.c index 23570e7a..cd9ccdfe 100644 --- a/src/stat/stat.c +++ b/src/stat/stat.c @@ -5,3 +5,11 @@ int stat(const char *restrict path, struct stat *restrict buf) { return fstatat(AT_FDCWD, path, buf, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/statvfs.c b/src/stat/statvfs.c index bc12da8b..128de927 100644 --- a/src/stat/statvfs.c +++ b/src/stat/statvfs.c @@ -57,3 +57,11 @@ int fstatvfs(int fd, struct statvfs *buf) fixup(buf, &kbuf); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/umask.c b/src/stat/umask.c index 5ee913e2..5e2412e1 100644 --- a/src/stat/umask.c +++ b/src/stat/umask.c @@ -5,3 +5,11 @@ mode_t umask(mode_t mode) { return syscall(SYS_umask, mode); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stat/utimensat.c b/src/stat/utimensat.c index 730723a9..f2916f52 100644 --- a/src/stat/utimensat.c +++ b/src/stat/utimensat.c @@ -58,3 +58,11 @@ int utimensat(int fd, const char *path, const struct timespec times[2], int flag #endif return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__fclose_ca.c b/src/stdio/__fclose_ca.c index e0b12a15..fc7ff8fc 100644 --- a/src/stdio/__fclose_ca.c +++ b/src/stdio/__fclose_ca.c @@ -4,3 +4,11 @@ int __fclose_ca(FILE *f) { return f->close(f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__fdopen.c b/src/stdio/__fdopen.c index 116e78e5..5b1cd9aa 100644 --- a/src/stdio/__fdopen.c +++ b/src/stdio/__fdopen.c @@ -59,3 +59,11 @@ FILE *__fdopen(int fd, const char *mode) } weak_alias(__fdopen, fdopen); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__fmodeflags.c b/src/stdio/__fmodeflags.c index da9f23b6..4829d551 100644 --- a/src/stdio/__fmodeflags.c +++ b/src/stdio/__fmodeflags.c @@ -14,3 +14,11 @@ int __fmodeflags(const char *mode) if (*mode == 'a') flags |= O_APPEND; return flags; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__fopen_rb_ca.c b/src/stdio/__fopen_rb_ca.c index 183a5d55..5638f1eb 100644 --- a/src/stdio/__fopen_rb_ca.c +++ b/src/stdio/__fopen_rb_ca.c @@ -20,3 +20,11 @@ FILE *__fopen_rb_ca(const char *filename, FILE *f, unsigned char *buf, size_t le return f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__lockfile.c b/src/stdio/__lockfile.c index 0f60a149..82d17e57 100644 --- a/src/stdio/__lockfile.c +++ b/src/stdio/__lockfile.c @@ -21,3 +21,11 @@ void __unlockfile(FILE *f) if (a_swap(&f->lock, 0) & MAYBE_WAITERS) __wake(&f->lock, 1, 1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__overflow.c b/src/stdio/__overflow.c index e65a594d..6618a50f 100644 --- a/src/stdio/__overflow.c +++ b/src/stdio/__overflow.c @@ -8,3 +8,11 @@ int __overflow(FILE *f, int _c) if (f->write(f, &c, 1)!=1) return EOF; return c; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__stdio_close.c b/src/stdio/__stdio_close.c index 30291328..5a6147f6 100644 --- a/src/stdio/__stdio_close.c +++ b/src/stdio/__stdio_close.c @@ -12,3 +12,11 @@ int __stdio_close(FILE *f) { return syscall(SYS_close, __aio_close(f->fd)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__stdio_exit.c b/src/stdio/__stdio_exit.c index a5e42c67..e6d24946 100644 --- a/src/stdio/__stdio_exit.c +++ b/src/stdio/__stdio_exit.c @@ -23,3 +23,11 @@ void __stdio_exit(void) } weak_alias(__stdio_exit, __stdio_exit_needed); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__stdio_read.c b/src/stdio/__stdio_read.c index ea675da3..2db85e6c 100644 --- a/src/stdio/__stdio_read.c +++ b/src/stdio/__stdio_read.c @@ -22,3 +22,11 @@ size_t __stdio_read(FILE *f, unsigned char *buf, size_t len) if (f->buf_size) buf[len-1] = *f->rpos++; return len; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__stdio_seek.c b/src/stdio/__stdio_seek.c index 326ab9bc..aa62f1dd 100644 --- a/src/stdio/__stdio_seek.c +++ b/src/stdio/__stdio_seek.c @@ -5,3 +5,11 @@ off_t __stdio_seek(FILE *f, off_t off, int whence) { return __lseek(f->fd, off, whence); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__stdio_write.c b/src/stdio/__stdio_write.c index d2d89475..8821f842 100644 --- a/src/stdio/__stdio_write.c +++ b/src/stdio/__stdio_write.c @@ -32,3 +32,11 @@ size_t __stdio_write(FILE *f, const unsigned char *buf, size_t len) iov[0].iov_len -= cnt; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__stdout_write.c b/src/stdio/__stdout_write.c index dd1ec60f..692d0519 100644 --- a/src/stdio/__stdout_write.c +++ b/src/stdio/__stdout_write.c @@ -9,3 +9,11 @@ size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len) f->lbf = -1; return __stdio_write(f, buf, len); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__toread.c b/src/stdio/__toread.c index f142ff09..fa6bee6b 100644 --- a/src/stdio/__toread.c +++ b/src/stdio/__toread.c @@ -17,3 +17,11 @@ hidden void __toread_needs_stdio_exit() { __stdio_exit_needed(); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__towrite.c b/src/stdio/__towrite.c index 4c9c66ae..09a6f5ac 100644 --- a/src/stdio/__towrite.c +++ b/src/stdio/__towrite.c @@ -21,3 +21,11 @@ hidden void __towrite_needs_stdio_exit() { __stdio_exit_needed(); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/__uflow.c b/src/stdio/__uflow.c index 2a88bca6..3cbc6b01 100644 --- a/src/stdio/__uflow.c +++ b/src/stdio/__uflow.c @@ -9,3 +9,11 @@ int __uflow(FILE *f) if (!__toread(f) && f->read(f, &c, 1)==1) return c; return EOF; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/asprintf.c b/src/stdio/asprintf.c index 4ec83534..7def0b49 100644 --- a/src/stdio/asprintf.c +++ b/src/stdio/asprintf.c @@ -11,3 +11,11 @@ int asprintf(char **s, const char *fmt, ...) va_end(ap); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/clearerr.c b/src/stdio/clearerr.c index 3bf94d30..b2a70d58 100644 --- a/src/stdio/clearerr.c +++ b/src/stdio/clearerr.c @@ -8,3 +8,11 @@ void clearerr(FILE *f) } weak_alias(clearerr, clearerr_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/dprintf.c b/src/stdio/dprintf.c index 93082ee7..351aeae9 100644 --- a/src/stdio/dprintf.c +++ b/src/stdio/dprintf.c @@ -10,3 +10,11 @@ int dprintf(int fd, const char *restrict fmt, ...) va_end(ap); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ext.c b/src/stdio/ext.c index 1fd95490..00d6859a 100644 --- a/src/stdio/ext.c +++ b/src/stdio/ext.c @@ -55,3 +55,11 @@ int __fpurge(FILE *f) } weak_alias(__fpurge, fpurge); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ext2.c b/src/stdio/ext2.c index 34162780..8d10254c 100644 --- a/src/stdio/ext2.c +++ b/src/stdio/ext2.c @@ -22,3 +22,11 @@ void __fseterr(FILE *f) { f->flags |= F_ERR; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fclose.c b/src/stdio/fclose.c index d594532b..6c5d503a 100644 --- a/src/stdio/fclose.c +++ b/src/stdio/fclose.c @@ -36,3 +36,11 @@ int fclose(FILE *f) return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/feof.c b/src/stdio/feof.c index 56da6b91..5adb3dfb 100644 --- a/src/stdio/feof.c +++ b/src/stdio/feof.c @@ -12,3 +12,11 @@ int feof(FILE *f) weak_alias(feof, feof_unlocked); weak_alias(feof, _IO_feof_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ferror.c b/src/stdio/ferror.c index d692eed9..28414ee8 100644 --- a/src/stdio/ferror.c +++ b/src/stdio/ferror.c @@ -12,3 +12,11 @@ int ferror(FILE *f) weak_alias(ferror, ferror_unlocked); weak_alias(ferror, _IO_ferror_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c index b0094376..41d55bec 100644 --- a/src/stdio/fflush.c +++ b/src/stdio/fflush.c @@ -45,3 +45,11 @@ int fflush(FILE *f) } weak_alias(fflush, fflush_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fgetc.c b/src/stdio/fgetc.c index 2578afcc..b7d02339 100644 --- a/src/stdio/fgetc.c +++ b/src/stdio/fgetc.c @@ -5,3 +5,11 @@ int fgetc(FILE *f) { return do_getc(f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fgetln.c b/src/stdio/fgetln.c index 5748435d..1af05a4e 100644 --- a/src/stdio/fgetln.c +++ b/src/stdio/fgetln.c @@ -19,3 +19,11 @@ char *fgetln(FILE *f, size_t *plen) FUNLOCK(f); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fgetpos.c b/src/stdio/fgetpos.c index 392f7323..345efb29 100644 --- a/src/stdio/fgetpos.c +++ b/src/stdio/fgetpos.c @@ -7,3 +7,11 @@ int fgetpos(FILE *restrict f, fpos_t *restrict pos) *(long long *)pos = off; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fgets.c b/src/stdio/fgets.c index 4a100b39..e7e2db13 100644 --- a/src/stdio/fgets.c +++ b/src/stdio/fgets.c @@ -47,3 +47,11 @@ char *fgets(char *restrict s, int n, FILE *restrict f) } weak_alias(fgets, fgets_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fgetwc.c b/src/stdio/fgetwc.c index aa10b818..3111da46 100644 --- a/src/stdio/fgetwc.c +++ b/src/stdio/fgetwc.c @@ -66,3 +66,11 @@ wint_t fgetwc(FILE *f) weak_alias(__fgetwc_unlocked, fgetwc_unlocked); weak_alias(__fgetwc_unlocked, getwc_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fgetws.c b/src/stdio/fgetws.c index 195cb435..3d5e012c 100644 --- a/src/stdio/fgetws.c +++ b/src/stdio/fgetws.c @@ -26,3 +26,11 @@ wchar_t *fgetws(wchar_t *restrict s, int n, FILE *restrict f) } weak_alias(fgetws, fgetws_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fileno.c b/src/stdio/fileno.c index 0bd0e988..3b8fc97f 100644 --- a/src/stdio/fileno.c +++ b/src/stdio/fileno.c @@ -14,3 +14,11 @@ int fileno(FILE *f) } weak_alias(fileno, fileno_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/flockfile.c b/src/stdio/flockfile.c index 8e220651..624503d4 100644 --- a/src/stdio/flockfile.c +++ b/src/stdio/flockfile.c @@ -7,3 +7,11 @@ void flockfile(FILE *f) __lockfile(f); __register_locked_file(f, __pthread_self()); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fmemopen.c b/src/stdio/fmemopen.c index 343e3e3f..1fe20c75 100644 --- a/src/stdio/fmemopen.c +++ b/src/stdio/fmemopen.c @@ -125,3 +125,11 @@ FILE *fmemopen(void *restrict buf, size_t size, const char *restrict mode) return __ofl_add(&f->f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fopen.c b/src/stdio/fopen.c index 80bc341e..a10c0292 100644 --- a/src/stdio/fopen.c +++ b/src/stdio/fopen.c @@ -29,3 +29,11 @@ FILE *fopen(const char *restrict filename, const char *restrict mode) __syscall(SYS_close, fd); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fopencookie.c b/src/stdio/fopencookie.c index da042fe8..40a2b71c 100644 --- a/src/stdio/fopencookie.c +++ b/src/stdio/fopencookie.c @@ -133,3 +133,11 @@ FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t iofuncs) /* Add new FILE to open file list */ return __ofl_add(&f->f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fprintf.c b/src/stdio/fprintf.c index 948743f7..9cfbdc53 100644 --- a/src/stdio/fprintf.c +++ b/src/stdio/fprintf.c @@ -10,3 +10,11 @@ int fprintf(FILE *restrict f, const char *restrict fmt, ...) va_end(ap); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fputc.c b/src/stdio/fputc.c index f364ed38..9f8aac5d 100644 --- a/src/stdio/fputc.c +++ b/src/stdio/fputc.c @@ -5,3 +5,11 @@ int fputc(int c, FILE *f) { return do_putc(c, f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fputs.c b/src/stdio/fputs.c index 1cf344f2..9632dfa5 100644 --- a/src/stdio/fputs.c +++ b/src/stdio/fputs.c @@ -8,3 +8,11 @@ int fputs(const char *restrict s, FILE *restrict f) } weak_alias(fputs, fputs_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fputwc.c b/src/stdio/fputwc.c index 789fe9c9..becd3b46 100644 --- a/src/stdio/fputwc.c +++ b/src/stdio/fputwc.c @@ -38,3 +38,11 @@ wint_t fputwc(wchar_t c, FILE *f) weak_alias(__fputwc_unlocked, fputwc_unlocked); weak_alias(__fputwc_unlocked, putwc_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fputws.c b/src/stdio/fputws.c index 0ed02f1c..d08a850e 100644 --- a/src/stdio/fputws.c +++ b/src/stdio/fputws.c @@ -27,3 +27,11 @@ int fputws(const wchar_t *restrict ws, FILE *restrict f) } weak_alias(fputws, fputws_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fread.c b/src/stdio/fread.c index a2116da6..f486aea6 100644 --- a/src/stdio/fread.c +++ b/src/stdio/fread.c @@ -36,3 +36,11 @@ size_t fread(void *restrict destv, size_t size, size_t nmemb, FILE *restrict f) } weak_alias(fread, fread_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index 1641a4c5..97b8f53f 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -51,3 +51,11 @@ fail: fclose(f); return NULL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fscanf.c b/src/stdio/fscanf.c index f639e118..6e8e97bf 100644 --- a/src/stdio/fscanf.c +++ b/src/stdio/fscanf.c @@ -12,3 +12,11 @@ int fscanf(FILE *restrict f, const char *restrict fmt, ...) } weak_alias(fscanf, __isoc99_fscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fseek.c b/src/stdio/fseek.c index c7425802..c3bfc35e 100644 --- a/src/stdio/fseek.c +++ b/src/stdio/fseek.c @@ -46,3 +46,11 @@ int fseek(FILE *f, long off, int whence) } weak_alias(__fseeko, fseeko); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fsetpos.c b/src/stdio/fsetpos.c index 779cb3cc..d6e3bf39 100644 --- a/src/stdio/fsetpos.c +++ b/src/stdio/fsetpos.c @@ -4,3 +4,11 @@ int fsetpos(FILE *f, const fpos_t *pos) { return __fseeko(f, *(const long long *)pos, SEEK_SET); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ftell.c b/src/stdio/ftell.c index 1e1a08d8..957825d6 100644 --- a/src/stdio/ftell.c +++ b/src/stdio/ftell.c @@ -37,3 +37,11 @@ long ftell(FILE *f) } weak_alias(__ftello, ftello); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ftrylockfile.c b/src/stdio/ftrylockfile.c index 50650585..0c75c15c 100644 --- a/src/stdio/ftrylockfile.c +++ b/src/stdio/ftrylockfile.c @@ -44,3 +44,11 @@ int ftrylockfile(FILE *f) __register_locked_file(f, self); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/funlockfile.c b/src/stdio/funlockfile.c index 44d8b0df..cc2b2cc7 100644 --- a/src/stdio/funlockfile.c +++ b/src/stdio/funlockfile.c @@ -11,3 +11,11 @@ void funlockfile(FILE *f) f->lockcount--; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fwide.c b/src/stdio/fwide.c index 8bab634a..4c5973c4 100644 --- a/src/stdio/fwide.c +++ b/src/stdio/fwide.c @@ -14,3 +14,11 @@ int fwide(FILE *f, int mode) FUNLOCK(f); return mode; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fwprintf.c b/src/stdio/fwprintf.c index 9ce4f010..fa1879da 100644 --- a/src/stdio/fwprintf.c +++ b/src/stdio/fwprintf.c @@ -11,3 +11,11 @@ int fwprintf(FILE *restrict f, const wchar_t *restrict fmt, ...) va_end(ap); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fwrite.c b/src/stdio/fwrite.c index 7a567b2c..9ee88ef7 100644 --- a/src/stdio/fwrite.c +++ b/src/stdio/fwrite.c @@ -36,3 +36,11 @@ size_t fwrite(const void *restrict src, size_t size, size_t nmemb, FILE *restric } weak_alias(fwrite, fwrite_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/fwscanf.c b/src/stdio/fwscanf.c index 530bb7c7..7ebb65e4 100644 --- a/src/stdio/fwscanf.c +++ b/src/stdio/fwscanf.c @@ -13,3 +13,11 @@ int fwscanf(FILE *restrict f, const wchar_t *restrict fmt, ...) } weak_alias(fwscanf,__isoc99_fwscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getc.c b/src/stdio/getc.c index 8409fc23..2bfb4255 100644 --- a/src/stdio/getc.c +++ b/src/stdio/getc.c @@ -7,3 +7,11 @@ int getc(FILE *f) } weak_alias(getc, _IO_getc); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getc_unlocked.c b/src/stdio/getc_unlocked.c index b38dad16..e3c8f4c7 100644 --- a/src/stdio/getc_unlocked.c +++ b/src/stdio/getc_unlocked.c @@ -7,3 +7,11 @@ int (getc_unlocked)(FILE *f) weak_alias (getc_unlocked, fgetc_unlocked); weak_alias (getc_unlocked, _IO_getc_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getchar.c b/src/stdio/getchar.c index df395ca9..754080fc 100644 --- a/src/stdio/getchar.c +++ b/src/stdio/getchar.c @@ -5,3 +5,11 @@ int getchar(void) { return do_getc(stdin); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getchar_unlocked.c b/src/stdio/getchar_unlocked.c index 355ac318..549c01e3 100644 --- a/src/stdio/getchar_unlocked.c +++ b/src/stdio/getchar_unlocked.c @@ -4,3 +4,11 @@ int getchar_unlocked(void) { return getc_unlocked(stdin); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getdelim.c b/src/stdio/getdelim.c index df114441..d917e39e 100644 --- a/src/stdio/getdelim.c +++ b/src/stdio/getdelim.c @@ -81,3 +81,11 @@ ssize_t getdelim(char **restrict s, size_t *restrict n, int delim, FILE *restric } weak_alias(getdelim, __getdelim); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getline.c b/src/stdio/getline.c index 476d0b09..325019d0 100644 --- a/src/stdio/getline.c +++ b/src/stdio/getline.c @@ -4,3 +4,11 @@ ssize_t getline(char **restrict s, size_t *restrict n, FILE *restrict f) { return getdelim(s, n, '\n', f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/gets.c b/src/stdio/gets.c index 17963b93..cd219198 100644 --- a/src/stdio/gets.c +++ b/src/stdio/gets.c @@ -13,3 +13,11 @@ char *gets(char *s) FUNLOCK(stdin); return s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getw.c b/src/stdio/getw.c index 73d2c0d5..55d6bb48 100644 --- a/src/stdio/getw.c +++ b/src/stdio/getw.c @@ -6,3 +6,11 @@ int getw(FILE *f) int x; return fread(&x, sizeof x, 1, f) ? x : EOF; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getwc.c b/src/stdio/getwc.c index a5008f0e..a545b262 100644 --- a/src/stdio/getwc.c +++ b/src/stdio/getwc.c @@ -5,3 +5,11 @@ wint_t getwc(FILE *f) { return fgetwc(f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/getwchar.c b/src/stdio/getwchar.c index bd89e0ec..b58af598 100644 --- a/src/stdio/getwchar.c +++ b/src/stdio/getwchar.c @@ -7,3 +7,11 @@ wint_t getwchar(void) } weak_alias(getwchar, getwchar_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ofl.c b/src/stdio/ofl.c index aad3d171..44c0d1a6 100644 --- a/src/stdio/ofl.c +++ b/src/stdio/ofl.c @@ -16,3 +16,11 @@ void __ofl_unlock() { UNLOCK(ofl_lock); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ofl_add.c b/src/stdio/ofl_add.c index d7de9f15..2a56eaa8 100644 --- a/src/stdio/ofl_add.c +++ b/src/stdio/ofl_add.c @@ -9,3 +9,11 @@ FILE *__ofl_add(FILE *f) __ofl_unlock(); return f; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/open_memstream.c b/src/stdio/open_memstream.c index 600d2770..f27306de 100644 --- a/src/stdio/open_memstream.c +++ b/src/stdio/open_memstream.c @@ -97,3 +97,11 @@ FILE *open_memstream(char **bufp, size_t *sizep) return __ofl_add(&f->f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/open_wmemstream.c b/src/stdio/open_wmemstream.c index b8ae4a79..872b96c9 100644 --- a/src/stdio/open_wmemstream.c +++ b/src/stdio/open_wmemstream.c @@ -104,3 +104,11 @@ FILE *open_wmemstream(wchar_t **bufp, size_t *sizep) return __ofl_add(&f->f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/pclose.c b/src/stdio/pclose.c index 080a4262..1cdd14db 100644 --- a/src/stdio/pclose.c +++ b/src/stdio/pclose.c @@ -11,3 +11,11 @@ int pclose(FILE *f) if (r<0) return __syscall_ret(r); return status; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/perror.c b/src/stdio/perror.c index d0943f26..5368ef54 100644 --- a/src/stdio/perror.c +++ b/src/stdio/perror.c @@ -28,3 +28,11 @@ void perror(const char *msg) FUNLOCK(f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/popen.c b/src/stdio/popen.c index 3ec83394..65816bf8 100644 --- a/src/stdio/popen.c +++ b/src/stdio/popen.c @@ -59,3 +59,11 @@ fail: errno = e; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/printf.c b/src/stdio/printf.c index cebfe404..f6ae7330 100644 --- a/src/stdio/printf.c +++ b/src/stdio/printf.c @@ -10,3 +10,11 @@ int printf(const char *restrict fmt, ...) va_end(ap); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/putc.c b/src/stdio/putc.c index 4744d978..8a6ecafc 100644 --- a/src/stdio/putc.c +++ b/src/stdio/putc.c @@ -7,3 +7,11 @@ int putc(int c, FILE *f) } weak_alias(putc, _IO_putc); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/putc_unlocked.c b/src/stdio/putc_unlocked.c index 10071312..9d2d5c0b 100644 --- a/src/stdio/putc_unlocked.c +++ b/src/stdio/putc_unlocked.c @@ -7,3 +7,11 @@ int (putc_unlocked)(int c, FILE *f) weak_alias(putc_unlocked, fputc_unlocked); weak_alias(putc_unlocked, _IO_putc_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/putchar.c b/src/stdio/putchar.c index f044f169..76c18883 100644 --- a/src/stdio/putchar.c +++ b/src/stdio/putchar.c @@ -5,3 +5,11 @@ int putchar(int c) { return do_putc(c, stdout); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/putchar_unlocked.c b/src/stdio/putchar_unlocked.c index 8b5d0603..eb4fa1b7 100644 --- a/src/stdio/putchar_unlocked.c +++ b/src/stdio/putchar_unlocked.c @@ -4,3 +4,11 @@ int putchar_unlocked(int c) { return putc_unlocked(c, stdout); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/puts.c b/src/stdio/puts.c index 5a38a49b..9f7ca211 100644 --- a/src/stdio/puts.c +++ b/src/stdio/puts.c @@ -8,3 +8,11 @@ int puts(const char *s) FUNLOCK(stdout); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/putw.c b/src/stdio/putw.c index 0ff9d7fb..a29c617a 100644 --- a/src/stdio/putw.c +++ b/src/stdio/putw.c @@ -5,3 +5,11 @@ int putw(int x, FILE *f) { return (int)fwrite(&x, sizeof x, 1, f)-1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/putwc.c b/src/stdio/putwc.c index 4bb74733..a87562b9 100644 --- a/src/stdio/putwc.c +++ b/src/stdio/putwc.c @@ -5,3 +5,11 @@ wint_t putwc(wchar_t c, FILE *f) { return fputwc(c, f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/putwchar.c b/src/stdio/putwchar.c index b249c4ac..301c062e 100644 --- a/src/stdio/putwchar.c +++ b/src/stdio/putwchar.c @@ -7,3 +7,11 @@ wint_t putwchar(wchar_t c) } weak_alias(putwchar, putwchar_unlocked); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/remove.c b/src/stdio/remove.c index 942e301a..9a3270dc 100644 --- a/src/stdio/remove.c +++ b/src/stdio/remove.c @@ -17,3 +17,11 @@ int remove(const char *path) #endif return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/rename.c b/src/stdio/rename.c index f540adb6..40ad9c49 100644 --- a/src/stdio/rename.c +++ b/src/stdio/rename.c @@ -12,3 +12,11 @@ int rename(const char *old, const char *new) return syscall(SYS_renameat2, AT_FDCWD, old, AT_FDCWD, new, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/rewind.c b/src/stdio/rewind.c index 6f4b58b5..7e25890e 100644 --- a/src/stdio/rewind.c +++ b/src/stdio/rewind.c @@ -7,3 +7,11 @@ void rewind(FILE *f) f->flags &= ~F_ERR; FUNLOCK(f); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/scanf.c b/src/stdio/scanf.c index bd77699c..52c2fe6e 100644 --- a/src/stdio/scanf.c +++ b/src/stdio/scanf.c @@ -12,3 +12,11 @@ int scanf(const char *restrict fmt, ...) } weak_alias(scanf,__isoc99_scanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/setbuf.c b/src/stdio/setbuf.c index 74ad7834..59524a3c 100644 --- a/src/stdio/setbuf.c +++ b/src/stdio/setbuf.c @@ -4,3 +4,11 @@ void setbuf(FILE *restrict f, char *restrict buf) { setvbuf(f, buf, buf ? _IOFBF : _IONBF, BUFSIZ); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/setbuffer.c b/src/stdio/setbuffer.c index 71233d2e..51bd1bb9 100644 --- a/src/stdio/setbuffer.c +++ b/src/stdio/setbuffer.c @@ -5,3 +5,11 @@ void setbuffer(FILE *f, char *buf, size_t size) { setvbuf(f, buf, buf ? _IOFBF : _IONBF, size); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/setlinebuf.c b/src/stdio/setlinebuf.c index b93c4d6a..b94920f9 100644 --- a/src/stdio/setlinebuf.c +++ b/src/stdio/setlinebuf.c @@ -5,3 +5,11 @@ void setlinebuf(FILE *f) { setvbuf(f, 0, _IOLBF, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/setvbuf.c b/src/stdio/setvbuf.c index 523dddc8..7259a9d3 100644 --- a/src/stdio/setvbuf.c +++ b/src/stdio/setvbuf.c @@ -27,3 +27,11 @@ int setvbuf(FILE *restrict f, char *restrict buf, int type, size_t size) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/snprintf.c b/src/stdio/snprintf.c index 771503b2..f9f1ca89 100644 --- a/src/stdio/snprintf.c +++ b/src/stdio/snprintf.c @@ -11,3 +11,11 @@ int snprintf(char *restrict s, size_t n, const char *restrict fmt, ...) return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/sprintf.c b/src/stdio/sprintf.c index 9dff524c..0a5bdb66 100644 --- a/src/stdio/sprintf.c +++ b/src/stdio/sprintf.c @@ -10,3 +10,11 @@ int sprintf(char *restrict s, const char *restrict fmt, ...) va_end(ap); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/sscanf.c b/src/stdio/sscanf.c index f2ac2f5d..a7bcd309 100644 --- a/src/stdio/sscanf.c +++ b/src/stdio/sscanf.c @@ -12,3 +12,11 @@ int sscanf(const char *restrict s, const char *restrict fmt, ...) } weak_alias(sscanf,__isoc99_sscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/stderr.c b/src/stdio/stderr.c index f2bc4648..019e3d40 100644 --- a/src/stdio/stderr.c +++ b/src/stdio/stderr.c @@ -16,3 +16,11 @@ hidden FILE __stderr_FILE = { }; FILE *const stderr = &__stderr_FILE; FILE *volatile __stderr_used = &__stderr_FILE; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/stdin.c b/src/stdio/stdin.c index 5aa5262c..9ac3b95d 100644 --- a/src/stdio/stdin.c +++ b/src/stdio/stdin.c @@ -15,3 +15,11 @@ hidden FILE __stdin_FILE = { }; FILE *const stdin = &__stdin_FILE; FILE *volatile __stdin_used = &__stdin_FILE; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/stdout.c b/src/stdio/stdout.c index 4985a417..83daa82b 100644 --- a/src/stdio/stdout.c +++ b/src/stdio/stdout.c @@ -16,3 +16,11 @@ hidden FILE __stdout_FILE = { }; FILE *const stdout = &__stdout_FILE; FILE *volatile __stdout_used = &__stdout_FILE; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/swprintf.c b/src/stdio/swprintf.c index f75eb112..bf50e92a 100644 --- a/src/stdio/swprintf.c +++ b/src/stdio/swprintf.c @@ -11,3 +11,11 @@ int swprintf(wchar_t *restrict s, size_t n, const wchar_t *restrict fmt, ...) return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/swscanf.c b/src/stdio/swscanf.c index 03d572da..fddac27d 100644 --- a/src/stdio/swscanf.c +++ b/src/stdio/swscanf.c @@ -12,3 +12,11 @@ int swscanf(const wchar_t *restrict s, const wchar_t *restrict fmt, ...) } weak_alias(swscanf,__isoc99_swscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/tempnam.c b/src/stdio/tempnam.c index 0c65b1f0..8bd1e60e 100644 --- a/src/stdio/tempnam.c +++ b/src/stdio/tempnam.c @@ -45,3 +45,11 @@ char *tempnam(const char *dir, const char *pfx) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/tmpfile.c b/src/stdio/tmpfile.c index 2fa8803f..c3e543cc 100644 --- a/src/stdio/tmpfile.c +++ b/src/stdio/tmpfile.c @@ -27,3 +27,11 @@ FILE *tmpfile(void) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/tmpnam.c b/src/stdio/tmpnam.c index 71dc8bb1..ed690a1f 100644 --- a/src/stdio/tmpnam.c +++ b/src/stdio/tmpnam.c @@ -25,3 +25,11 @@ char *tmpnam(char *buf) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ungetc.c b/src/stdio/ungetc.c index bc629d4c..7bf58d93 100644 --- a/src/stdio/ungetc.c +++ b/src/stdio/ungetc.c @@ -18,3 +18,11 @@ int ungetc(int c, FILE *f) FUNLOCK(f); return (unsigned char)c; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/ungetwc.c b/src/stdio/ungetwc.c index 9edf366f..08c76bf8 100644 --- a/src/stdio/ungetwc.c +++ b/src/stdio/ungetwc.c @@ -33,3 +33,11 @@ wint_t ungetwc(wint_t c, FILE *f) *ploc = loc; return c; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vasprintf.c b/src/stdio/vasprintf.c index 08251bc2..07eec655 100644 --- a/src/stdio/vasprintf.c +++ b/src/stdio/vasprintf.c @@ -13,3 +13,11 @@ int vasprintf(char **s, const char *fmt, va_list ap) if (l<0 || !(*s=malloc(l+1U))) return -1; return vsnprintf(*s, l+1U, fmt, ap); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vdprintf.c b/src/stdio/vdprintf.c index 3b9c093b..89bdc2db 100644 --- a/src/stdio/vdprintf.c +++ b/src/stdio/vdprintf.c @@ -9,3 +9,11 @@ int vdprintf(int fd, const char *restrict fmt, va_list ap) }; return vfprintf(&f, fmt, ap); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 497c5e19..1afb79ef 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -701,3 +701,11 @@ int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap) va_end(ap2); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vfscanf.c b/src/stdio/vfscanf.c index b78a374d..229a8efc 100644 --- a/src/stdio/vfscanf.c +++ b/src/stdio/vfscanf.c @@ -337,3 +337,11 @@ match_fail: } weak_alias(vfscanf,__isoc99_vfscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c index 59d5471b..cafdccc0 100644 --- a/src/stdio/vfwprintf.c +++ b/src/stdio/vfwprintf.c @@ -370,3 +370,11 @@ int vfwprintf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap) va_end(ap2); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vfwscanf.c b/src/stdio/vfwscanf.c index 82f48604..4691ab16 100644 --- a/src/stdio/vfwscanf.c +++ b/src/stdio/vfwscanf.c @@ -330,3 +330,11 @@ match_fail: } weak_alias(vfwscanf,__isoc99_vfwscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vprintf.c b/src/stdio/vprintf.c index 30d2bffa..3b9a5802 100644 --- a/src/stdio/vprintf.c +++ b/src/stdio/vprintf.c @@ -4,3 +4,11 @@ int vprintf(const char *restrict fmt, va_list ap) { return vfprintf(stdout, fmt, ap); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vscanf.c b/src/stdio/vscanf.c index 9d46ab09..54ee3d02 100644 --- a/src/stdio/vscanf.c +++ b/src/stdio/vscanf.c @@ -7,3 +7,11 @@ int vscanf(const char *restrict fmt, va_list ap) } weak_alias(vscanf,__isoc99_vscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vsnprintf.c b/src/stdio/vsnprintf.c index b3510a63..d69993a6 100644 --- a/src/stdio/vsnprintf.c +++ b/src/stdio/vsnprintf.c @@ -53,3 +53,11 @@ int vsnprintf(char *restrict s, size_t n, const char *restrict fmt, va_list ap) *c.s = 0; return vfprintf(&f, fmt, ap); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vsprintf.c b/src/stdio/vsprintf.c index c57349d4..7c692f0c 100644 --- a/src/stdio/vsprintf.c +++ b/src/stdio/vsprintf.c @@ -5,3 +5,11 @@ int vsprintf(char *restrict s, const char *restrict fmt, va_list ap) { return vsnprintf(s, INT_MAX, fmt, ap); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vsscanf.c b/src/stdio/vsscanf.c index 4d6d259b..18517652 100644 --- a/src/stdio/vsscanf.c +++ b/src/stdio/vsscanf.c @@ -25,3 +25,11 @@ int vsscanf(const char *restrict s, const char *restrict fmt, va_list ap) } weak_alias(vsscanf,__isoc99_vsscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vswprintf.c b/src/stdio/vswprintf.c index fc223cf2..c4ef6273 100644 --- a/src/stdio/vswprintf.c +++ b/src/stdio/vswprintf.c @@ -59,3 +59,11 @@ int vswprintf(wchar_t *restrict s, size_t n, const wchar_t *restrict fmt, va_lis sw_write(&f, 0, 0); return r>=n ? -1 : r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vswscanf.c b/src/stdio/vswscanf.c index 00b614bc..8bdc995d 100644 --- a/src/stdio/vswscanf.c +++ b/src/stdio/vswscanf.c @@ -36,3 +36,11 @@ int vswscanf(const wchar_t *restrict s, const wchar_t *restrict fmt, va_list ap) } weak_alias(vswscanf,__isoc99_vswscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vwprintf.c b/src/stdio/vwprintf.c index eeeecdc7..40382ee3 100644 --- a/src/stdio/vwprintf.c +++ b/src/stdio/vwprintf.c @@ -5,3 +5,11 @@ int vwprintf(const wchar_t *restrict fmt, va_list ap) { return vfwprintf(stdout, fmt, ap); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/vwscanf.c b/src/stdio/vwscanf.c index 5a3931e1..ccfc2cf5 100644 --- a/src/stdio/vwscanf.c +++ b/src/stdio/vwscanf.c @@ -8,3 +8,11 @@ int vwscanf(const wchar_t *restrict fmt, va_list ap) } weak_alias(vwscanf,__isoc99_vwscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/wprintf.c b/src/stdio/wprintf.c index 342cd979..a3065c18 100644 --- a/src/stdio/wprintf.c +++ b/src/stdio/wprintf.c @@ -11,3 +11,11 @@ int wprintf(const wchar_t *restrict fmt, ...) va_end(ap); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdio/wscanf.c b/src/stdio/wscanf.c index 4dfec25d..c4030f7a 100644 --- a/src/stdio/wscanf.c +++ b/src/stdio/wscanf.c @@ -13,3 +13,11 @@ int wscanf(const wchar_t *restrict fmt, ...) } weak_alias(wscanf,__isoc99_wscanf); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/abs.c b/src/stdlib/abs.c index e721fdc2..36fd6d05 100644 --- a/src/stdlib/abs.c +++ b/src/stdlib/abs.c @@ -4,3 +4,11 @@ int abs(int a) { return a>0 ? a : -a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/atof.c b/src/stdlib/atof.c index f7fcd826..dd33faf4 100644 --- a/src/stdlib/atof.c +++ b/src/stdlib/atof.c @@ -4,3 +4,11 @@ double atof(const char *s) { return strtod(s, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/atoi.c b/src/stdlib/atoi.c index 9baca7b8..c7362f3e 100644 --- a/src/stdlib/atoi.c +++ b/src/stdlib/atoi.c @@ -14,3 +14,11 @@ int atoi(const char *s) n = 10*n - (*s++ - '0'); return neg ? n : -n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/atol.c b/src/stdlib/atol.c index 140ea3ea..cfd723c4 100644 --- a/src/stdlib/atol.c +++ b/src/stdlib/atol.c @@ -15,3 +15,11 @@ long atol(const char *s) n = 10*n - (*s++ - '0'); return neg ? n : -n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/atoll.c b/src/stdlib/atoll.c index b6930489..d0d763c3 100644 --- a/src/stdlib/atoll.c +++ b/src/stdlib/atoll.c @@ -15,3 +15,11 @@ long long atoll(const char *s) n = 10*n - (*s++ - '0'); return neg ? n : -n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/bsearch.c b/src/stdlib/bsearch.c index fe050ea3..06445cf2 100644 --- a/src/stdlib/bsearch.c +++ b/src/stdlib/bsearch.c @@ -18,3 +18,11 @@ void *bsearch(const void *key, const void *base, size_t nel, size_t width, int ( } return NULL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/div.c b/src/stdlib/div.c index e42c1f14..503bf3d2 100644 --- a/src/stdlib/div.c +++ b/src/stdlib/div.c @@ -4,3 +4,11 @@ div_t div(int num, int den) { return (div_t){ num/den, num%den }; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/ecvt.c b/src/stdlib/ecvt.c index 797b664e..d95258da 100644 --- a/src/stdlib/ecvt.c +++ b/src/stdlib/ecvt.c @@ -18,3 +18,11 @@ char *ecvt(double x, int n, int *dp, int *sign) return buf; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/fcvt.c b/src/stdlib/fcvt.c index f90928fe..c8885fe8 100644 --- a/src/stdlib/fcvt.c +++ b/src/stdlib/fcvt.c @@ -23,3 +23,11 @@ char *fcvt(double x, int n, int *dp, int *sign) return ecvt(x, n-lz, dp, sign); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/gcvt.c b/src/stdlib/gcvt.c index f29bc304..ecea4bbc 100644 --- a/src/stdlib/gcvt.c +++ b/src/stdlib/gcvt.c @@ -7,3 +7,11 @@ char *gcvt(double x, int n, char *b) sprintf(b, "%.*g", n, x); return b; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/imaxabs.c b/src/stdlib/imaxabs.c index 81001819..dd4e01c0 100644 --- a/src/stdlib/imaxabs.c +++ b/src/stdlib/imaxabs.c @@ -4,3 +4,11 @@ intmax_t imaxabs(intmax_t a) { return a>0 ? a : -a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/imaxdiv.c b/src/stdlib/imaxdiv.c index b2ce821f..cbbfc64b 100644 --- a/src/stdlib/imaxdiv.c +++ b/src/stdlib/imaxdiv.c @@ -4,3 +4,11 @@ imaxdiv_t imaxdiv(intmax_t num, intmax_t den) { return (imaxdiv_t){ num/den, num%den }; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/labs.c b/src/stdlib/labs.c index 83ddb147..20a9fc90 100644 --- a/src/stdlib/labs.c +++ b/src/stdlib/labs.c @@ -4,3 +4,11 @@ long labs(long a) { return a>0 ? a : -a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/ldiv.c b/src/stdlib/ldiv.c index 36eb960b..c4181f84 100644 --- a/src/stdlib/ldiv.c +++ b/src/stdlib/ldiv.c @@ -4,3 +4,11 @@ ldiv_t ldiv(long num, long den) { return (ldiv_t){ num/den, num%den }; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/llabs.c b/src/stdlib/llabs.c index 9dfaf5cf..7eca2ccb 100644 --- a/src/stdlib/llabs.c +++ b/src/stdlib/llabs.c @@ -4,3 +4,11 @@ long long llabs(long long a) { return a>0 ? a : -a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/lldiv.c b/src/stdlib/lldiv.c index 7aaf7a0e..6e802c2a 100644 --- a/src/stdlib/lldiv.c +++ b/src/stdlib/lldiv.c @@ -4,3 +4,11 @@ lldiv_t lldiv(long long num, long long den) { return (lldiv_t){ num/den, num%den }; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/qsort.c b/src/stdlib/qsort.c index 314ddc29..ff3b45d7 100644 --- a/src/stdlib/qsort.c +++ b/src/stdlib/qsort.c @@ -219,3 +219,11 @@ void __qsort_r(void *base, size_t nel, size_t width, cmpfun cmp, void *arg) } weak_alias(__qsort_r, qsort_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/qsort_nr.c b/src/stdlib/qsort_nr.c index 8ffe71d0..e8197a71 100644 --- a/src/stdlib/qsort_nr.c +++ b/src/stdlib/qsort_nr.c @@ -12,3 +12,11 @@ void qsort(void *base, size_t nel, size_t width, cmpfun cmp) { __qsort_r(base, nel, width, wrapper_cmp, (void *)cmp); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/strtod.c b/src/stdlib/strtod.c index 39b9daad..689426b0 100644 --- a/src/stdlib/strtod.c +++ b/src/stdlib/strtod.c @@ -28,3 +28,11 @@ long double strtold(const char *restrict s, char **restrict p) { return strtox(s, p, 2); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/strtol.c b/src/stdlib/strtol.c index bfefea69..aa3895ec 100644 --- a/src/stdlib/strtol.c +++ b/src/stdlib/strtol.c @@ -54,3 +54,11 @@ weak_alias(strtoll, __strtoll_internal); weak_alias(strtoull, __strtoull_internal); weak_alias(strtoimax, __strtoimax_internal); weak_alias(strtoumax, __strtoumax_internal); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/wcstod.c b/src/stdlib/wcstod.c index 0deb7010..6a741f68 100644 --- a/src/stdlib/wcstod.c +++ b/src/stdlib/wcstod.c @@ -62,3 +62,11 @@ long double wcstold(const wchar_t *restrict s, wchar_t **restrict p) { return wcstox(s, p, 2); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/stdlib/wcstol.c b/src/stdlib/wcstol.c index 1eeb495f..5a089c8a 100644 --- a/src/stdlib/wcstol.c +++ b/src/stdlib/wcstol.c @@ -79,3 +79,11 @@ uintmax_t wcstoumax(const wchar_t *restrict s, wchar_t **restrict p, int base) { return wcstoull(s, p, base); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/bcmp.c b/src/string/bcmp.c index 87c6007e..013b1f41 100644 --- a/src/string/bcmp.c +++ b/src/string/bcmp.c @@ -6,3 +6,11 @@ int bcmp(const void *s1, const void *s2, size_t n) { return memcmp(s1, s2, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/bcopy.c b/src/string/bcopy.c index a07129f5..7340f66d 100644 --- a/src/string/bcopy.c +++ b/src/string/bcopy.c @@ -6,3 +6,11 @@ void bcopy(const void *s1, void *s2, size_t n) { memmove(s2, s1, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/bzero.c b/src/string/bzero.c index ba536b07..fbc0eb1b 100644 --- a/src/string/bzero.c +++ b/src/string/bzero.c @@ -6,3 +6,11 @@ void bzero(void *s, size_t n) { memset(s, 0, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/explicit_bzero.c b/src/string/explicit_bzero.c index f2e12f23..43894b2d 100644 --- a/src/string/explicit_bzero.c +++ b/src/string/explicit_bzero.c @@ -6,3 +6,11 @@ void explicit_bzero(void *d, size_t n) d = memset(d, 0, n); __asm__ __volatile__ ("" : : "r"(d) : "memory"); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/index.c b/src/string/index.c index 252948f9..2060e37b 100644 --- a/src/string/index.c +++ b/src/string/index.c @@ -6,3 +6,11 @@ char *index(const char *s, int c) { return strchr(s, c); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/memccpy.c b/src/string/memccpy.c index 3b0a3700..8e88aeb0 100644 --- a/src/string/memccpy.c +++ b/src/string/memccpy.c @@ -32,3 +32,11 @@ tail: if (n) return d+1; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/memchr.c b/src/string/memchr.c index 65f0d789..1db4be7c 100644 --- a/src/string/memchr.c +++ b/src/string/memchr.c @@ -25,3 +25,11 @@ void *memchr(const void *src, int c, size_t n) for (; n && *s != c; s++, n--); return n ? (void *)s : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/memcmp.c b/src/string/memcmp.c index bdbce9f0..3f2c9e06 100644 --- a/src/string/memcmp.c +++ b/src/string/memcmp.c @@ -6,3 +6,11 @@ int memcmp(const void *vl, const void *vr, size_t n) for (; n && *l == *r; n--, l++, r++); return n ? *l-*r : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/memmem.c b/src/string/memmem.c index 11eff86e..d1db1aaa 100644 --- a/src/string/memmem.c +++ b/src/string/memmem.c @@ -147,3 +147,11 @@ void *memmem(const void *h0, size_t k, const void *n0, size_t l) return twoway_memmem(h, h+k, n, l); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/mempcpy.c b/src/string/mempcpy.c index a297985e..10577abf 100644 --- a/src/string/mempcpy.c +++ b/src/string/mempcpy.c @@ -5,3 +5,11 @@ void *mempcpy(void *dest, const void *src, size_t n) { return (char *)memcpy(dest, src, n) + n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/memrchr.c b/src/string/memrchr.c index e51748b8..944f6ee8 100644 --- a/src/string/memrchr.c +++ b/src/string/memrchr.c @@ -9,3 +9,11 @@ void *__memrchr(const void *m, int c, size_t n) } weak_alias(__memrchr, memrchr); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/rindex.c b/src/string/rindex.c index 693c750b..8dd88590 100644 --- a/src/string/rindex.c +++ b/src/string/rindex.c @@ -6,3 +6,11 @@ char *rindex(const char *s, int c) { return strrchr(s, c); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/stpcpy.c b/src/string/stpcpy.c index 4db46a9e..013d5baa 100644 --- a/src/string/stpcpy.c +++ b/src/string/stpcpy.c @@ -27,3 +27,11 @@ char *__stpcpy(char *restrict d, const char *restrict s) } weak_alias(__stpcpy, stpcpy); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/stpncpy.c b/src/string/stpncpy.c index f57fa6b7..16717f9e 100644 --- a/src/string/stpncpy.c +++ b/src/string/stpncpy.c @@ -30,3 +30,11 @@ tail: weak_alias(__stpncpy, stpncpy); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strcasecmp.c b/src/string/strcasecmp.c index 002c6aa1..4973ebea 100644 --- a/src/string/strcasecmp.c +++ b/src/string/strcasecmp.c @@ -14,3 +14,11 @@ int __strcasecmp_l(const char *l, const char *r, locale_t loc) } weak_alias(__strcasecmp_l, strcasecmp_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strcasestr.c b/src/string/strcasestr.c index af109f36..c5eb6f08 100644 --- a/src/string/strcasestr.c +++ b/src/string/strcasestr.c @@ -7,3 +7,11 @@ char *strcasestr(const char *h, const char *n) for (; *h; h++) if (!strncasecmp(h, n, l)) return (char *)h; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strcat.c b/src/string/strcat.c index 33f749b1..79834243 100644 --- a/src/string/strcat.c +++ b/src/string/strcat.c @@ -5,3 +5,11 @@ char *strcat(char *restrict dest, const char *restrict src) strcpy(dest + strlen(dest), src); return dest; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strchr.c b/src/string/strchr.c index 3cbc828b..a8d3fad9 100644 --- a/src/string/strchr.c +++ b/src/string/strchr.c @@ -5,3 +5,11 @@ char *strchr(const char *s, int c) char *r = __strchrnul(s, c); return *(unsigned char *)r == (unsigned char)c ? r : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strchrnul.c b/src/string/strchrnul.c index 39e2635b..8cc84e63 100644 --- a/src/string/strchrnul.c +++ b/src/string/strchrnul.c @@ -26,3 +26,11 @@ char *__strchrnul(const char *s, int c) } weak_alias(__strchrnul, strchrnul); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strcmp.c b/src/string/strcmp.c index 808bd837..ae71867e 100644 --- a/src/string/strcmp.c +++ b/src/string/strcmp.c @@ -5,3 +5,11 @@ int strcmp(const char *l, const char *r) for (; *l==*r && *l; l++, r++); return *(unsigned char *)l - *(unsigned char *)r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strcpy.c b/src/string/strcpy.c index 6668a129..5f6e78a9 100644 --- a/src/string/strcpy.c +++ b/src/string/strcpy.c @@ -5,3 +5,11 @@ char *strcpy(char *restrict dest, const char *restrict src) __stpcpy(dest, src); return dest; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strcspn.c b/src/string/strcspn.c index a0c617bd..6eb4bf87 100644 --- a/src/string/strcspn.c +++ b/src/string/strcspn.c @@ -15,3 +15,11 @@ size_t strcspn(const char *s, const char *c) for (; *s && !BITOP(byteset, *(unsigned char *)s, &); s++); return s-a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strdup.c b/src/string/strdup.c index d4c27449..afc85a6f 100644 --- a/src/string/strdup.c +++ b/src/string/strdup.c @@ -8,3 +8,11 @@ char *strdup(const char *s) if (!d) return NULL; return memcpy(d, s, l+1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strerror_r.c b/src/string/strerror_r.c index 1dc88bb1..8d2e3bda 100644 --- a/src/string/strerror_r.c +++ b/src/string/strerror_r.c @@ -17,3 +17,11 @@ int strerror_r(int err, char *buf, size_t buflen) } weak_alias(strerror_r, __xpg_strerror_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strlcat.c b/src/string/strlcat.c index ef81209e..ffb2ed65 100644 --- a/src/string/strlcat.c +++ b/src/string/strlcat.c @@ -7,3 +7,11 @@ size_t strlcat(char *d, const char *s, size_t n) if (l == n) return l + strlen(s); return l + strlcpy(d+l, s, n-l); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strlcpy.c b/src/string/strlcpy.c index ffa0b0b0..177d2857 100644 --- a/src/string/strlcpy.c +++ b/src/string/strlcpy.c @@ -32,3 +32,11 @@ size_t strlcpy(char *d, const char *s, size_t n) finish: return d-d0 + strlen(s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strlen.c b/src/string/strlen.c index 309990f0..8564046c 100644 --- a/src/string/strlen.c +++ b/src/string/strlen.c @@ -20,3 +20,11 @@ size_t strlen(const char *s) for (; *s; s++); return s-a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strncasecmp.c b/src/string/strncasecmp.c index e0ef93c2..3faafdbf 100644 --- a/src/string/strncasecmp.c +++ b/src/string/strncasecmp.c @@ -15,3 +15,11 @@ int __strncasecmp_l(const char *l, const char *r, size_t n, locale_t loc) } weak_alias(__strncasecmp_l, strncasecmp_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strncat.c b/src/string/strncat.c index 01ca2a23..9f8f8ad6 100644 --- a/src/string/strncat.c +++ b/src/string/strncat.c @@ -8,3 +8,11 @@ char *strncat(char *restrict d, const char *restrict s, size_t n) *d++ = 0; return a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strncmp.c b/src/string/strncmp.c index e228843f..1a0264f5 100644 --- a/src/string/strncmp.c +++ b/src/string/strncmp.c @@ -7,3 +7,11 @@ int strncmp(const char *_l, const char *_r, size_t n) for (; *l && *r && n && *l == *r ; l++, r++, n--); return *l - *r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strncpy.c b/src/string/strncpy.c index 545892e6..5056eb83 100644 --- a/src/string/strncpy.c +++ b/src/string/strncpy.c @@ -5,3 +5,11 @@ char *strncpy(char *restrict d, const char *restrict s, size_t n) __stpncpy(d, s, n); return d; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strndup.c b/src/string/strndup.c index 617d27ba..ac9c5ea3 100644 --- a/src/string/strndup.c +++ b/src/string/strndup.c @@ -10,3 +10,11 @@ char *strndup(const char *s, size_t n) d[l] = 0; return d; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strnlen.c b/src/string/strnlen.c index 6442eb79..ecfeefa1 100644 --- a/src/string/strnlen.c +++ b/src/string/strnlen.c @@ -5,3 +5,11 @@ size_t strnlen(const char *s, size_t n) const char *p = memchr(s, 0, n); return p ? p-s : n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strpbrk.c b/src/string/strpbrk.c index 55947c64..144deb03 100644 --- a/src/string/strpbrk.c +++ b/src/string/strpbrk.c @@ -5,3 +5,11 @@ char *strpbrk(const char *s, const char *b) s += strcspn(s, b); return *s ? (char *)s : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strrchr.c b/src/string/strrchr.c index 98ad1b04..b5530515 100644 --- a/src/string/strrchr.c +++ b/src/string/strrchr.c @@ -4,3 +4,11 @@ char *strrchr(const char *s, int c) { return __memrchr(s, c, strlen(s) + 1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strsep.c b/src/string/strsep.c index cb37c32e..c5e853d9 100644 --- a/src/string/strsep.c +++ b/src/string/strsep.c @@ -11,3 +11,11 @@ char *strsep(char **str, const char *sep) *str = end; return s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strsignal.c b/src/string/strsignal.c index 5156366e..48083b36 100644 --- a/src/string/strsignal.c +++ b/src/string/strsignal.c @@ -124,3 +124,11 @@ char *strsignal(int signum) return (char *)LCTRANS_CUR(s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strspn.c b/src/string/strspn.c index 9543dad0..ca5a65a5 100644 --- a/src/string/strspn.c +++ b/src/string/strspn.c @@ -18,3 +18,11 @@ size_t strspn(const char *s, const char *c) for (; *s && BITOP(byteset, *(unsigned char *)s, &); s++); return s-a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strstr.c b/src/string/strstr.c index 96657bc2..53e6d46a 100644 --- a/src/string/strstr.c +++ b/src/string/strstr.c @@ -152,3 +152,11 @@ char *strstr(const char *h, const char *n) return twoway_strstr((void *)h, (void *)n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strtok.c b/src/string/strtok.c index 35087902..0d0f149f 100644 --- a/src/string/strtok.c +++ b/src/string/strtok.c @@ -11,3 +11,11 @@ char *strtok(char *restrict s, const char *restrict sep) else p = 0; return s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strtok_r.c b/src/string/strtok_r.c index 862d4fe4..80193135 100644 --- a/src/string/strtok_r.c +++ b/src/string/strtok_r.c @@ -10,3 +10,11 @@ char *strtok_r(char *restrict s, const char *restrict sep, char **restrict p) else *p = 0; return s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/strverscmp.c b/src/string/strverscmp.c index 16c1da22..0b214b0f 100644 --- a/src/string/strverscmp.c +++ b/src/string/strverscmp.c @@ -32,3 +32,11 @@ int strverscmp(const char *l0, const char *r0) return l[i] - r[i]; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/swab.c b/src/string/swab.c index ace0f466..d6d3ac28 100644 --- a/src/string/swab.c +++ b/src/string/swab.c @@ -11,3 +11,11 @@ void swab(const void *restrict _src, void *restrict _dest, ssize_t n) src += 2; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcpcpy.c b/src/string/wcpcpy.c index ef401343..02d21961 100644 --- a/src/string/wcpcpy.c +++ b/src/string/wcpcpy.c @@ -4,3 +4,11 @@ wchar_t *wcpcpy(wchar_t *restrict d, const wchar_t *restrict s) { return wcscpy(d, s) + wcslen(s); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcpncpy.c b/src/string/wcpncpy.c index b667f6d6..56610702 100644 --- a/src/string/wcpncpy.c +++ b/src/string/wcpncpy.c @@ -4,3 +4,11 @@ wchar_t *wcpncpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n) { return wcsncpy(d, s, n) + wcsnlen(s, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcscasecmp.c b/src/string/wcscasecmp.c index 3edeec7d..af2fa304 100644 --- a/src/string/wcscasecmp.c +++ b/src/string/wcscasecmp.c @@ -5,3 +5,11 @@ int wcscasecmp(const wchar_t *l, const wchar_t *r) { return wcsncasecmp(l, r, -1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcscasecmp_l.c b/src/string/wcscasecmp_l.c index 065dd0aa..1d2811b3 100644 --- a/src/string/wcscasecmp_l.c +++ b/src/string/wcscasecmp_l.c @@ -4,3 +4,11 @@ int wcscasecmp_l(const wchar_t *l, const wchar_t *r, locale_t locale) { return wcscasecmp(l, r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcscat.c b/src/string/wcscat.c index d4f00ebd..fc822df0 100644 --- a/src/string/wcscat.c +++ b/src/string/wcscat.c @@ -5,3 +5,11 @@ wchar_t *wcscat(wchar_t *restrict dest, const wchar_t *restrict src) wcscpy(dest + wcslen(dest), src); return dest; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcschr.c b/src/string/wcschr.c index 8dfc2f31..c860d46e 100644 --- a/src/string/wcschr.c +++ b/src/string/wcschr.c @@ -6,3 +6,11 @@ wchar_t *wcschr(const wchar_t *s, wchar_t c) for (; *s && *s != c; s++); return *s ? (wchar_t *)s : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcscmp.c b/src/string/wcscmp.c index 286ec3ea..65f51fe5 100644 --- a/src/string/wcscmp.c +++ b/src/string/wcscmp.c @@ -5,3 +5,11 @@ int wcscmp(const wchar_t *l, const wchar_t *r) for (; *l==*r && *l && *r; l++, r++); return *l < *r ? -1 : *l > *r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcscpy.c b/src/string/wcscpy.c index 625bf53d..2774fb7f 100644 --- a/src/string/wcscpy.c +++ b/src/string/wcscpy.c @@ -6,3 +6,11 @@ wchar_t *wcscpy(wchar_t *restrict d, const wchar_t *restrict s) while ((*d++ = *s++)); return a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcscspn.c b/src/string/wcscspn.c index c4e52722..5621f9f3 100644 --- a/src/string/wcscspn.c +++ b/src/string/wcscspn.c @@ -8,3 +8,11 @@ size_t wcscspn(const wchar_t *s, const wchar_t *c) for (a=s; *s && !wcschr(c, *s); s++); return s-a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsdup.c b/src/string/wcsdup.c index f398e809..e1d2b197 100644 --- a/src/string/wcsdup.c +++ b/src/string/wcsdup.c @@ -8,3 +8,11 @@ wchar_t *wcsdup(const wchar_t *s) if (!d) return NULL; return wmemcpy(d, s, l+1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcslen.c b/src/string/wcslen.c index 1b7b6655..18237223 100644 --- a/src/string/wcslen.c +++ b/src/string/wcslen.c @@ -6,3 +6,11 @@ size_t wcslen(const wchar_t *s) for (a=s; *s; s++); return s-a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsncasecmp.c b/src/string/wcsncasecmp.c index 8fefe799..c0948e86 100644 --- a/src/string/wcsncasecmp.c +++ b/src/string/wcsncasecmp.c @@ -7,3 +7,11 @@ int wcsncasecmp(const wchar_t *l, const wchar_t *r, size_t n) for (; *l && *r && n && (*l == *r || towlower(*l) == towlower(*r)); l++, r++, n--); return towlower(*l) - towlower(*r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsncasecmp_l.c b/src/string/wcsncasecmp_l.c index 63872481..6f6a30e5 100644 --- a/src/string/wcsncasecmp_l.c +++ b/src/string/wcsncasecmp_l.c @@ -4,3 +4,11 @@ int wcsncasecmp_l(const wchar_t *l, const wchar_t *r, size_t n, locale_t locale) { return wcsncasecmp(l, r, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsncat.c b/src/string/wcsncat.c index 8563f1a2..3641d51e 100644 --- a/src/string/wcsncat.c +++ b/src/string/wcsncat.c @@ -8,3 +8,11 @@ wchar_t *wcsncat(wchar_t *restrict d, const wchar_t *restrict s, size_t n) *d++ = 0; return a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsncmp.c b/src/string/wcsncmp.c index 2b3558bf..90fe1250 100644 --- a/src/string/wcsncmp.c +++ b/src/string/wcsncmp.c @@ -5,3 +5,11 @@ int wcsncmp(const wchar_t *l, const wchar_t *r, size_t n) for (; n && *l==*r && *l && *r; n--, l++, r++); return n ? (*l < *r ? -1 : *l > *r) : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsncpy.c b/src/string/wcsncpy.c index 4bede04d..35d6093a 100644 --- a/src/string/wcsncpy.c +++ b/src/string/wcsncpy.c @@ -7,3 +7,11 @@ wchar_t *wcsncpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n) wmemset(d, 0, n); return a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsnlen.c b/src/string/wcsnlen.c index a7763373..0ed2d4a2 100644 --- a/src/string/wcsnlen.c +++ b/src/string/wcsnlen.c @@ -6,3 +6,11 @@ size_t wcsnlen(const wchar_t *s, size_t n) if (z) n = z-s; return n; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcspbrk.c b/src/string/wcspbrk.c index 0c72c197..3567e052 100644 --- a/src/string/wcspbrk.c +++ b/src/string/wcspbrk.c @@ -5,3 +5,11 @@ wchar_t *wcspbrk(const wchar_t *s, const wchar_t *b) s += wcscspn(s, b); return *s ? (wchar_t *)s : NULL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsrchr.c b/src/string/wcsrchr.c index 8961b9e2..d6fe1da3 100644 --- a/src/string/wcsrchr.c +++ b/src/string/wcsrchr.c @@ -6,3 +6,11 @@ wchar_t *wcsrchr(const wchar_t *s, wchar_t c) for (p=s+wcslen(s); p>=s && *p!=c; p--); return p>=s ? (wchar_t *)p : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsspn.c b/src/string/wcsspn.c index 4320d8f6..3820734a 100644 --- a/src/string/wcsspn.c +++ b/src/string/wcsspn.c @@ -6,3 +6,11 @@ size_t wcsspn(const wchar_t *s, const wchar_t *c) for (a=s; *s && wcschr(c, *s); s++); return s-a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcsstr.c b/src/string/wcsstr.c index 4caaef3c..c372c1b4 100644 --- a/src/string/wcsstr.c +++ b/src/string/wcsstr.c @@ -103,3 +103,11 @@ wchar_t *wcsstr(const wchar_t *restrict h, const wchar_t *restrict n) return twoway_wcsstr(h, n); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcstok.c b/src/string/wcstok.c index ecc80331..cf25258a 100644 --- a/src/string/wcstok.c +++ b/src/string/wcstok.c @@ -10,3 +10,11 @@ wchar_t *wcstok(wchar_t *restrict s, const wchar_t *restrict sep, wchar_t **rest else *p = 0; return s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wcswcs.c b/src/string/wcswcs.c index 9cfe4ac4..2da34cb1 100644 --- a/src/string/wcswcs.c +++ b/src/string/wcswcs.c @@ -4,3 +4,11 @@ wchar_t *wcswcs(const wchar_t *haystack, const wchar_t *needle) { return wcsstr(haystack, needle); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wmemchr.c b/src/string/wmemchr.c index 2bc2c270..01962497 100644 --- a/src/string/wmemchr.c +++ b/src/string/wmemchr.c @@ -5,3 +5,11 @@ wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n) for (; n && *s != c; n--, s++); return n ? (wchar_t *)s : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wmemcmp.c b/src/string/wmemcmp.c index 717d77b1..ce364981 100644 --- a/src/string/wmemcmp.c +++ b/src/string/wmemcmp.c @@ -5,3 +5,11 @@ int wmemcmp(const wchar_t *l, const wchar_t *r, size_t n) for (; n && *l==*r; n--, l++, r++); return n ? (*l < *r ? -1 : *l > *r) : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wmemcpy.c b/src/string/wmemcpy.c index 52e6e6e0..80483fee 100644 --- a/src/string/wmemcpy.c +++ b/src/string/wmemcpy.c @@ -6,3 +6,11 @@ wchar_t *wmemcpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n) while (n--) *d++ = *s++; return a; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wmemmove.c b/src/string/wmemmove.c index 964c9032..be5d5639 100644 --- a/src/string/wmemmove.c +++ b/src/string/wmemmove.c @@ -11,3 +11,11 @@ wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n) while (n--) *d++ = *s++; return d0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/string/wmemset.c b/src/string/wmemset.c index 07a037a0..87374585 100644 --- a/src/string/wmemset.c +++ b/src/string/wmemset.c @@ -6,3 +6,11 @@ wchar_t *wmemset(wchar_t *d, wchar_t c, size_t n) while (n--) *d++ = c; return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/temp/__randname.c b/src/temp/__randname.c index e9b970f1..fdc6484c 100644 --- a/src/temp/__randname.c +++ b/src/temp/__randname.c @@ -17,3 +17,11 @@ char *__randname(char *template) return template; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/temp/mkdtemp.c b/src/temp/mkdtemp.c index 5708257b..0dee3cf4 100644 --- a/src/temp/mkdtemp.c +++ b/src/temp/mkdtemp.c @@ -21,3 +21,11 @@ char *mkdtemp(char *template) memcpy(template+l-6, "XXXXXX", 6); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/temp/mkostemp.c b/src/temp/mkostemp.c index e3dfdd91..93e865d6 100644 --- a/src/temp/mkostemp.c +++ b/src/temp/mkostemp.c @@ -5,3 +5,11 @@ int mkostemp(char *template, int flags) { return __mkostemps(template, 0, flags); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/temp/mkostemps.c b/src/temp/mkostemps.c index 093d2380..e22d215c 100644 --- a/src/temp/mkostemps.c +++ b/src/temp/mkostemps.c @@ -26,3 +26,11 @@ int __mkostemps(char *template, int len, int flags) } weak_alias(__mkostemps, mkostemps); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/temp/mkstemp.c b/src/temp/mkstemp.c index 76c835bb..402b6085 100644 --- a/src/temp/mkstemp.c +++ b/src/temp/mkstemp.c @@ -4,3 +4,11 @@ int mkstemp(char *template) { return __mkostemps(template, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/temp/mkstemps.c b/src/temp/mkstemps.c index f8eabfec..d42c3ecf 100644 --- a/src/temp/mkstemps.c +++ b/src/temp/mkstemps.c @@ -5,3 +5,11 @@ int mkstemps(char *template, int len) { return __mkostemps(template, len, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/temp/mktemp.c b/src/temp/mktemp.c index 7b3d2648..071366bc 100644 --- a/src/temp/mktemp.c +++ b/src/temp/mktemp.c @@ -28,3 +28,11 @@ char *mktemp(char *template) errno = EEXIST; return template; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/cfgetospeed.c b/src/termios/cfgetospeed.c index 55fa6f55..c28e6ebf 100644 --- a/src/termios/cfgetospeed.c +++ b/src/termios/cfgetospeed.c @@ -11,3 +11,11 @@ speed_t cfgetispeed(const struct termios *tio) { return cfgetospeed(tio); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/cfmakeraw.c b/src/termios/cfmakeraw.c index c9dddc12..38768b37 100644 --- a/src/termios/cfmakeraw.c +++ b/src/termios/cfmakeraw.c @@ -11,3 +11,11 @@ void cfmakeraw(struct termios *t) t->c_cc[VMIN] = 1; t->c_cc[VTIME] = 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/cfsetospeed.c b/src/termios/cfsetospeed.c index c9cbdd9d..b4a19222 100644 --- a/src/termios/cfsetospeed.c +++ b/src/termios/cfsetospeed.c @@ -20,3 +20,11 @@ int cfsetispeed(struct termios *tio, speed_t speed) } weak_alias(cfsetospeed, cfsetspeed); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcdrain.c b/src/termios/tcdrain.c index c0e542b3..fb521f23 100644 --- a/src/termios/tcdrain.c +++ b/src/termios/tcdrain.c @@ -6,3 +6,11 @@ int tcdrain(int fd) { return syscall_cp(SYS_ioctl, fd, TCSBRK, 1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcflow.c b/src/termios/tcflow.c index c7fc3fe2..d75c3570 100644 --- a/src/termios/tcflow.c +++ b/src/termios/tcflow.c @@ -5,3 +5,11 @@ int tcflow(int fd, int action) { return ioctl(fd, TCXONC, action); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcflush.c b/src/termios/tcflush.c index 50222669..8a119cb0 100644 --- a/src/termios/tcflush.c +++ b/src/termios/tcflush.c @@ -5,3 +5,11 @@ int tcflush(int fd, int queue) { return ioctl(fd, TCFLSH, queue); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcgetattr.c b/src/termios/tcgetattr.c index 545a0bf8..cb9b66a7 100644 --- a/src/termios/tcgetattr.c +++ b/src/termios/tcgetattr.c @@ -7,3 +7,11 @@ int tcgetattr(int fd, struct termios *tio) return -1; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcgetsid.c b/src/termios/tcgetsid.c index 1053fd64..3b930d1f 100644 --- a/src/termios/tcgetsid.c +++ b/src/termios/tcgetsid.c @@ -8,3 +8,11 @@ pid_t tcgetsid(int fd) return -1; return sid; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcgetwinsize.c b/src/termios/tcgetwinsize.c index 9b3a65a4..c229cc3d 100644 --- a/src/termios/tcgetwinsize.c +++ b/src/termios/tcgetwinsize.c @@ -6,3 +6,11 @@ int tcgetwinsize(int fd, struct winsize *wsz) { return syscall(SYS_ioctl, fd, TIOCGWINSZ, wsz); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcsendbreak.c b/src/termios/tcsendbreak.c index b6df0a23..2a50d005 100644 --- a/src/termios/tcsendbreak.c +++ b/src/termios/tcsendbreak.c @@ -6,3 +6,11 @@ int tcsendbreak(int fd, int dur) /* nonzero duration is implementation-defined, so ignore it */ return ioctl(fd, TCSBRK, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcsetattr.c b/src/termios/tcsetattr.c index 94df18f9..ef3cdcbb 100644 --- a/src/termios/tcsetattr.c +++ b/src/termios/tcsetattr.c @@ -10,3 +10,11 @@ int tcsetattr(int fd, int act, const struct termios *tio) } return ioctl(fd, TCSETS+act, tio); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/termios/tcsetwinsize.c b/src/termios/tcsetwinsize.c index e01d0e25..57813ef1 100644 --- a/src/termios/tcsetwinsize.c +++ b/src/termios/tcsetwinsize.c @@ -6,3 +6,11 @@ int tcsetwinsize(int fd, const struct winsize *wsz) { return syscall(SYS_ioctl, fd, TIOCSWINSZ, wsz); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/__lock.c b/src/thread/__lock.c index 60eece49..df60ebcb 100644 --- a/src/thread/__lock.c +++ b/src/thread/__lock.c @@ -60,3 +60,11 @@ void __unlock(volatile int *l) } } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/__syscall_cp.c b/src/thread/__syscall_cp.c index 42a01674..f5c8b53a 100644 --- a/src/thread/__syscall_cp.c +++ b/src/thread/__syscall_cp.c @@ -18,3 +18,11 @@ long (__syscall_cp)(syscall_arg_t nr, { return __syscall_cp_c(nr, u, v, w, x, y, z); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/__timedwait.c b/src/thread/__timedwait.c index 666093be..63f23288 100644 --- a/src/thread/__timedwait.c +++ b/src/thread/__timedwait.c @@ -69,3 +69,11 @@ int __timedwait(volatile int *addr, int val, __pthread_setcancelstate(cs, 0); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/__tls_get_addr.c b/src/thread/__tls_get_addr.c index 19524fe0..56018c4f 100644 --- a/src/thread/__tls_get_addr.c +++ b/src/thread/__tls_get_addr.c @@ -5,3 +5,11 @@ void *__tls_get_addr(tls_mod_off_t *v) pthread_t self = __pthread_self(); return (void *)(self->dtv[v[0]] + v[1]); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/__wait.c b/src/thread/__wait.c index dc33c1a3..c713e3e5 100644 --- a/src/thread/__wait.c +++ b/src/thread/__wait.c @@ -15,3 +15,11 @@ void __wait(volatile int *addr, volatile int *waiters, int val, int priv) } if (waiters) a_dec(waiters); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/call_once.c b/src/thread/call_once.c index 5ed30183..fa5428de 100644 --- a/src/thread/call_once.c +++ b/src/thread/call_once.c @@ -5,3 +5,11 @@ void call_once(once_flag *flag, void (*func)(void)) { __pthread_once(flag, func); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/cnd_broadcast.c b/src/thread/cnd_broadcast.c index e76b5a81..84fcbb08 100644 --- a/src/thread/cnd_broadcast.c +++ b/src/thread/cnd_broadcast.c @@ -7,3 +7,11 @@ int cnd_broadcast(cnd_t *c) * which matches the value thrd_success is defined with. */ return __private_cond_signal((pthread_cond_t *)c, -1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/cnd_destroy.c b/src/thread/cnd_destroy.c index 453c90be..825103a1 100644 --- a/src/thread/cnd_destroy.c +++ b/src/thread/cnd_destroy.c @@ -4,3 +4,11 @@ void cnd_destroy(cnd_t *c) { /* For private cv this is a no-op */ } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/cnd_init.c b/src/thread/cnd_init.c index 18c50855..0f625626 100644 --- a/src/thread/cnd_init.c +++ b/src/thread/cnd_init.c @@ -5,3 +5,11 @@ int cnd_init(cnd_t *c) *c = (cnd_t){ 0 }; return thrd_success; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/cnd_signal.c b/src/thread/cnd_signal.c index 02cdc6c6..7190d199 100644 --- a/src/thread/cnd_signal.c +++ b/src/thread/cnd_signal.c @@ -7,3 +7,11 @@ int cnd_signal(cnd_t *c) * which matches the value thrd_success is defined with. */ return __private_cond_signal((pthread_cond_t *)c, 1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/cnd_timedwait.c b/src/thread/cnd_timedwait.c index 2802af52..0d010107 100644 --- a/src/thread/cnd_timedwait.c +++ b/src/thread/cnd_timedwait.c @@ -12,3 +12,11 @@ int cnd_timedwait(cnd_t *restrict c, mtx_t *restrict m, const struct timespec *r case ETIMEDOUT: return thrd_timedout; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/cnd_wait.c b/src/thread/cnd_wait.c index 602796f8..7a6765d7 100644 --- a/src/thread/cnd_wait.c +++ b/src/thread/cnd_wait.c @@ -7,3 +7,11 @@ int cnd_wait(cnd_t *c, mtx_t *m) * for return values. */ return cnd_timedwait(c, m, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/default_attr.c b/src/thread/default_attr.c index dce96409..e4f052e1 100644 --- a/src/thread/default_attr.c +++ b/src/thread/default_attr.c @@ -2,3 +2,11 @@ unsigned __default_stacksize = DEFAULT_STACK_SIZE; unsigned __default_guardsize = DEFAULT_GUARD_SIZE; + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/lock_ptc.c b/src/thread/lock_ptc.c index 7adedab7..03435897 100644 --- a/src/thread/lock_ptc.c +++ b/src/thread/lock_ptc.c @@ -16,3 +16,11 @@ void __release_ptc() { pthread_rwlock_unlock(&lock); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/mtx_destroy.c b/src/thread/mtx_destroy.c index 40a08999..dca5d707 100644 --- a/src/thread/mtx_destroy.c +++ b/src/thread/mtx_destroy.c @@ -3,3 +3,11 @@ void mtx_destroy(mtx_t *mtx) { } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/mtx_init.c b/src/thread/mtx_init.c index 4826f76b..346d9dee 100644 --- a/src/thread/mtx_init.c +++ b/src/thread/mtx_init.c @@ -8,3 +8,11 @@ int mtx_init(mtx_t *m, int type) }; return thrd_success; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/mtx_lock.c b/src/thread/mtx_lock.c index 5c2415c1..e2ed1cac 100644 --- a/src/thread/mtx_lock.c +++ b/src/thread/mtx_lock.c @@ -10,3 +10,11 @@ int mtx_lock(mtx_t *m) * for return values. */ return mtx_timedlock(m, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/mtx_timedlock.c b/src/thread/mtx_timedlock.c index d22c8cf4..84fb8a7f 100644 --- a/src/thread/mtx_timedlock.c +++ b/src/thread/mtx_timedlock.c @@ -11,3 +11,11 @@ int mtx_timedlock(mtx_t *restrict m, const struct timespec *restrict ts) case ETIMEDOUT: return thrd_timedout; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/mtx_trylock.c b/src/thread/mtx_trylock.c index 40a8b8c2..384d2ce8 100644 --- a/src/thread/mtx_trylock.c +++ b/src/thread/mtx_trylock.c @@ -13,3 +13,11 @@ int mtx_trylock(mtx_t *m) case EBUSY: return thrd_busy; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/mtx_unlock.c b/src/thread/mtx_unlock.c index 2e5c8cf6..a8e99d57 100644 --- a/src/thread/mtx_unlock.c +++ b/src/thread/mtx_unlock.c @@ -8,3 +8,11 @@ int mtx_unlock(mtx_t *mtx) * assume it does not return an error and simply tail call. */ return __pthread_mutex_unlock((pthread_mutex_t *)mtx); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_atfork.c b/src/thread/pthread_atfork.c index 26d32543..4c013c6b 100644 --- a/src/thread/pthread_atfork.c +++ b/src/thread/pthread_atfork.c @@ -53,3 +53,11 @@ int pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(vo UNLOCK(lock); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_destroy.c b/src/thread/pthread_attr_destroy.c index b5845dd0..0370a4ab 100644 --- a/src/thread/pthread_attr_destroy.c +++ b/src/thread/pthread_attr_destroy.c @@ -4,3 +4,11 @@ int pthread_attr_destroy(pthread_attr_t *a) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_get.c b/src/thread/pthread_attr_get.c index f12ff442..2de77dd0 100644 --- a/src/thread/pthread_attr_get.c +++ b/src/thread/pthread_attr_get.c @@ -96,3 +96,11 @@ int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict a, int *r *pshared = a->__attr[0]; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_init.c b/src/thread/pthread_attr_init.c index 463a8d20..79082098 100644 --- a/src/thread/pthread_attr_init.c +++ b/src/thread/pthread_attr_init.c @@ -9,3 +9,11 @@ int pthread_attr_init(pthread_attr_t *a) __release_ptc(); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setdetachstate.c b/src/thread/pthread_attr_setdetachstate.c index 1b712783..30c5627d 100644 --- a/src/thread/pthread_attr_setdetachstate.c +++ b/src/thread/pthread_attr_setdetachstate.c @@ -6,3 +6,11 @@ int pthread_attr_setdetachstate(pthread_attr_t *a, int state) a->_a_detach = state; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setguardsize.c b/src/thread/pthread_attr_setguardsize.c index 1c5c60ac..579aad75 100644 --- a/src/thread/pthread_attr_setguardsize.c +++ b/src/thread/pthread_attr_setguardsize.c @@ -6,3 +6,11 @@ int pthread_attr_setguardsize(pthread_attr_t *a, size_t size) a->_a_guardsize = size; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setinheritsched.c b/src/thread/pthread_attr_setinheritsched.c index ca264be7..318ffbdc 100644 --- a/src/thread/pthread_attr_setinheritsched.c +++ b/src/thread/pthread_attr_setinheritsched.c @@ -7,3 +7,11 @@ int pthread_attr_setinheritsched(pthread_attr_t *a, int inherit) a->_a_sched = inherit; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setschedparam.c b/src/thread/pthread_attr_setschedparam.c index d4c1204f..33d2625d 100644 --- a/src/thread/pthread_attr_setschedparam.c +++ b/src/thread/pthread_attr_setschedparam.c @@ -5,3 +5,11 @@ int pthread_attr_setschedparam(pthread_attr_t *restrict a, const struct sched_pa a->_a_prio = param->sched_priority; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setschedpolicy.c b/src/thread/pthread_attr_setschedpolicy.c index bb71f393..56ed057a 100644 --- a/src/thread/pthread_attr_setschedpolicy.c +++ b/src/thread/pthread_attr_setschedpolicy.c @@ -5,3 +5,11 @@ int pthread_attr_setschedpolicy(pthread_attr_t *a, int policy) a->_a_policy = policy; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setscope.c b/src/thread/pthread_attr_setscope.c index 46b520c0..c7f57ab4 100644 --- a/src/thread/pthread_attr_setscope.c +++ b/src/thread/pthread_attr_setscope.c @@ -11,3 +11,11 @@ int pthread_attr_setscope(pthread_attr_t *a, int scope) return EINVAL; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setstack.c b/src/thread/pthread_attr_setstack.c index 1eddcbd6..1411e66e 100644 --- a/src/thread/pthread_attr_setstack.c +++ b/src/thread/pthread_attr_setstack.c @@ -7,3 +7,11 @@ int pthread_attr_setstack(pthread_attr_t *a, void *addr, size_t size) a->_a_stacksize = size; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_attr_setstacksize.c b/src/thread/pthread_attr_setstacksize.c index 9c6a8806..32386124 100644 --- a/src/thread/pthread_attr_setstacksize.c +++ b/src/thread/pthread_attr_setstacksize.c @@ -7,3 +7,11 @@ int pthread_attr_setstacksize(pthread_attr_t *a, size_t size) a->_a_stacksize = size; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_barrier_destroy.c b/src/thread/pthread_barrier_destroy.c index 4ce0b2e1..27c04464 100644 --- a/src/thread/pthread_barrier_destroy.c +++ b/src/thread/pthread_barrier_destroy.c @@ -13,3 +13,11 @@ int pthread_barrier_destroy(pthread_barrier_t *b) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_barrier_init.c b/src/thread/pthread_barrier_init.c index 4c3cb28d..49bdd70c 100644 --- a/src/thread/pthread_barrier_init.c +++ b/src/thread/pthread_barrier_init.c @@ -6,3 +6,11 @@ int pthread_barrier_init(pthread_barrier_t *restrict b, const pthread_barrieratt *b = (pthread_barrier_t){ ._b_limit = count-1 | (a?a->__attr:0) }; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_barrier_wait.c b/src/thread/pthread_barrier_wait.c index cc2a8bbf..9561bfcf 100644 --- a/src/thread/pthread_barrier_wait.c +++ b/src/thread/pthread_barrier_wait.c @@ -109,3 +109,11 @@ int pthread_barrier_wait(pthread_barrier_t *b) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_barrierattr_destroy.c b/src/thread/pthread_barrierattr_destroy.c index adec738f..13fcb7fb 100644 --- a/src/thread/pthread_barrierattr_destroy.c +++ b/src/thread/pthread_barrierattr_destroy.c @@ -4,3 +4,11 @@ int pthread_barrierattr_destroy(pthread_barrierattr_t *a) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_barrierattr_init.c b/src/thread/pthread_barrierattr_init.c index fa742bb7..4cba9502 100644 --- a/src/thread/pthread_barrierattr_init.c +++ b/src/thread/pthread_barrierattr_init.c @@ -5,3 +5,11 @@ int pthread_barrierattr_init(pthread_barrierattr_t *a) *a = (pthread_barrierattr_t){0}; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_barrierattr_setpshared.c b/src/thread/pthread_barrierattr_setpshared.c index c2d2929d..8835406d 100644 --- a/src/thread/pthread_barrierattr_setpshared.c +++ b/src/thread/pthread_barrierattr_setpshared.c @@ -6,3 +6,11 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *a, int pshared) a->__attr = pshared ? INT_MIN : 0; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cancel.c b/src/thread/pthread_cancel.c index 139a6fc8..89219e58 100644 --- a/src/thread/pthread_cancel.c +++ b/src/thread/pthread_cancel.c @@ -104,3 +104,11 @@ int pthread_cancel(pthread_t t) } return pthread_kill(t, SIGCANCEL); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cleanup_push.c b/src/thread/pthread_cleanup_push.c index 9b21764b..f0afdd04 100644 --- a/src/thread/pthread_cleanup_push.c +++ b/src/thread/pthread_cleanup_push.c @@ -18,3 +18,11 @@ void _pthread_cleanup_pop(struct __ptcb *cb, int run) __do_cleanup_pop(cb); if (run) cb->__f(cb->__x); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cond_broadcast.c b/src/thread/pthread_cond_broadcast.c index 6bfab78f..daee8c4d 100644 --- a/src/thread/pthread_cond_broadcast.c +++ b/src/thread/pthread_cond_broadcast.c @@ -8,3 +8,11 @@ int pthread_cond_broadcast(pthread_cond_t *c) __wake(&c->_c_seq, -1, 0); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cond_destroy.c b/src/thread/pthread_cond_destroy.c index 8c555160..31b2a4d3 100644 --- a/src/thread/pthread_cond_destroy.c +++ b/src/thread/pthread_cond_destroy.c @@ -12,3 +12,11 @@ int pthread_cond_destroy(pthread_cond_t *c) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cond_init.c b/src/thread/pthread_cond_init.c index 8c484ddc..eb7500ff 100644 --- a/src/thread/pthread_cond_init.c +++ b/src/thread/pthread_cond_init.c @@ -9,3 +9,11 @@ int pthread_cond_init(pthread_cond_t *restrict c, const pthread_condattr_t *rest } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cond_signal.c b/src/thread/pthread_cond_signal.c index 575ad54b..a9a93e73 100644 --- a/src/thread/pthread_cond_signal.c +++ b/src/thread/pthread_cond_signal.c @@ -8,3 +8,11 @@ int pthread_cond_signal(pthread_cond_t *c) __wake(&c->_c_seq, 1, 0); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cond_timedwait.c b/src/thread/pthread_cond_timedwait.c index 6b761455..38cf9a21 100644 --- a/src/thread/pthread_cond_timedwait.c +++ b/src/thread/pthread_cond_timedwait.c @@ -211,3 +211,11 @@ int __private_cond_signal(pthread_cond_t *c, int n) } weak_alias(__pthread_cond_timedwait, pthread_cond_timedwait); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_cond_wait.c b/src/thread/pthread_cond_wait.c index 8735bf14..4e5917f6 100644 --- a/src/thread/pthread_cond_wait.c +++ b/src/thread/pthread_cond_wait.c @@ -4,3 +4,11 @@ int pthread_cond_wait(pthread_cond_t *restrict c, pthread_mutex_t *restrict m) { return pthread_cond_timedwait(c, m, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_condattr_destroy.c b/src/thread/pthread_condattr_destroy.c index c54ec412..50e245c1 100644 --- a/src/thread/pthread_condattr_destroy.c +++ b/src/thread/pthread_condattr_destroy.c @@ -4,3 +4,11 @@ int pthread_condattr_destroy(pthread_condattr_t *a) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_condattr_init.c b/src/thread/pthread_condattr_init.c index a41741b4..ea3c2d08 100644 --- a/src/thread/pthread_condattr_init.c +++ b/src/thread/pthread_condattr_init.c @@ -5,3 +5,11 @@ int pthread_condattr_init(pthread_condattr_t *a) *a = (pthread_condattr_t){0}; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_condattr_setclock.c b/src/thread/pthread_condattr_setclock.c index 71125941..87c68f2d 100644 --- a/src/thread/pthread_condattr_setclock.c +++ b/src/thread/pthread_condattr_setclock.c @@ -7,3 +7,11 @@ int pthread_condattr_setclock(pthread_condattr_t *a, clockid_t clk) a->__attr |= clk; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_condattr_setpshared.c b/src/thread/pthread_condattr_setpshared.c index 51453e04..35fb085e 100644 --- a/src/thread/pthread_condattr_setpshared.c +++ b/src/thread/pthread_condattr_setpshared.c @@ -7,3 +7,11 @@ int pthread_condattr_setpshared(pthread_condattr_t *a, int pshared) a->__attr |= (unsigned)pshared<<31; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index 087f6206..169ef1cf 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -395,3 +395,11 @@ fail: weak_alias(__pthread_exit, pthread_exit); weak_alias(__pthread_create, pthread_create); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_detach.c b/src/thread/pthread_detach.c index d73a500e..2c2fcb47 100644 --- a/src/thread/pthread_detach.c +++ b/src/thread/pthread_detach.c @@ -16,3 +16,11 @@ static int __pthread_detach(pthread_t t) weak_alias(__pthread_detach, pthread_detach); weak_alias(__pthread_detach, thrd_detach); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_equal.c b/src/thread/pthread_equal.c index dbb73655..d1507b8a 100644 --- a/src/thread/pthread_equal.c +++ b/src/thread/pthread_equal.c @@ -8,3 +8,11 @@ static int __pthread_equal(pthread_t a, pthread_t b) weak_alias(__pthread_equal, pthread_equal); weak_alias(__pthread_equal, thrd_equal); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_getattr_np.c b/src/thread/pthread_getattr_np.c index 2881831f..93f14e6f 100644 --- a/src/thread/pthread_getattr_np.c +++ b/src/thread/pthread_getattr_np.c @@ -22,3 +22,11 @@ int pthread_getattr_np(pthread_t t, pthread_attr_t *a) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_getconcurrency.c b/src/thread/pthread_getconcurrency.c index 269429a8..ed2ddc11 100644 --- a/src/thread/pthread_getconcurrency.c +++ b/src/thread/pthread_getconcurrency.c @@ -4,3 +4,11 @@ int pthread_getconcurrency() { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_getcpuclockid.c b/src/thread/pthread_getcpuclockid.c index 9df14fb6..d404cb46 100644 --- a/src/thread/pthread_getcpuclockid.c +++ b/src/thread/pthread_getcpuclockid.c @@ -5,3 +5,11 @@ int pthread_getcpuclockid(pthread_t t, clockid_t *clockid) *clockid = (-t->tid-1)*8U + 6; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_getname_np.c b/src/thread/pthread_getname_np.c index 85504e45..d50a3c0b 100644 --- a/src/thread/pthread_getname_np.c +++ b/src/thread/pthread_getname_np.c @@ -23,3 +23,11 @@ int pthread_getname_np(pthread_t thread, char *name, size_t len) pthread_setcancelstate(cs, 0); return status; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_getschedparam.c b/src/thread/pthread_getschedparam.c index c098befb..227aece7 100644 --- a/src/thread/pthread_getschedparam.c +++ b/src/thread/pthread_getschedparam.c @@ -19,3 +19,11 @@ int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param __restore_sigs(&set); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_getspecific.c b/src/thread/pthread_getspecific.c index d9342a56..1a4e2d14 100644 --- a/src/thread/pthread_getspecific.c +++ b/src/thread/pthread_getspecific.c @@ -9,3 +9,11 @@ static void *__pthread_getspecific(pthread_key_t k) weak_alias(__pthread_getspecific, pthread_getspecific); weak_alias(__pthread_getspecific, tss_get); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_join.c b/src/thread/pthread_join.c index 17dae85d..c3535e4b 100644 --- a/src/thread/pthread_join.c +++ b/src/thread/pthread_join.c @@ -38,3 +38,11 @@ static int __pthread_tryjoin_np(pthread_t t, void **res) weak_alias(__pthread_tryjoin_np, pthread_tryjoin_np); weak_alias(__pthread_timedjoin_np, pthread_timedjoin_np); weak_alias(__pthread_join, pthread_join); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_key_create.c b/src/thread/pthread_key_create.c index 39770c7a..e44b2ed1 100644 --- a/src/thread/pthread_key_create.c +++ b/src/thread/pthread_key_create.c @@ -97,3 +97,11 @@ void __pthread_tsd_run_dtors() weak_alias(__pthread_key_create, pthread_key_create); weak_alias(__pthread_key_delete, pthread_key_delete); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_kill.c b/src/thread/pthread_kill.c index 79ddb209..ef75480e 100644 --- a/src/thread/pthread_kill.c +++ b/src/thread/pthread_kill.c @@ -16,3 +16,11 @@ int pthread_kill(pthread_t t, int sig) __restore_sigs(&set); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_consistent.c b/src/thread/pthread_mutex_consistent.c index 27c74e5b..9c7177e0 100644 --- a/src/thread/pthread_mutex_consistent.c +++ b/src/thread/pthread_mutex_consistent.c @@ -12,3 +12,11 @@ int pthread_mutex_consistent(pthread_mutex_t *m) a_and(&m->_m_lock, ~0x40000000); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_destroy.c b/src/thread/pthread_mutex_destroy.c index 8d1bf77b..57b50e46 100644 --- a/src/thread/pthread_mutex_destroy.c +++ b/src/thread/pthread_mutex_destroy.c @@ -8,3 +8,11 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex) if (mutex->_m_type > 128) __vm_wait(); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_getprioceiling.c b/src/thread/pthread_mutex_getprioceiling.c index 8c75a661..648a8d21 100644 --- a/src/thread/pthread_mutex_getprioceiling.c +++ b/src/thread/pthread_mutex_getprioceiling.c @@ -4,3 +4,11 @@ int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict m, int *restric { return EINVAL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_init.c b/src/thread/pthread_mutex_init.c index acf45a74..04278665 100644 --- a/src/thread/pthread_mutex_init.c +++ b/src/thread/pthread_mutex_init.c @@ -6,3 +6,11 @@ int pthread_mutex_init(pthread_mutex_t *restrict m, const pthread_mutexattr_t *r if (a) m->_m_type = a->__attr; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_lock.c b/src/thread/pthread_mutex_lock.c index 638d4b86..8c9ecf1c 100644 --- a/src/thread/pthread_mutex_lock.c +++ b/src/thread/pthread_mutex_lock.c @@ -10,3 +10,11 @@ int __pthread_mutex_lock(pthread_mutex_t *m) } weak_alias(__pthread_mutex_lock, pthread_mutex_lock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_setprioceiling.c b/src/thread/pthread_mutex_setprioceiling.c index 681f07c8..7ef4eaf6 100644 --- a/src/thread/pthread_mutex_setprioceiling.c +++ b/src/thread/pthread_mutex_setprioceiling.c @@ -4,3 +4,11 @@ int pthread_mutex_setprioceiling(pthread_mutex_t *restrict m, int ceiling, int * { return EINVAL; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_timedlock.c b/src/thread/pthread_mutex_timedlock.c index 9279fc54..449d9b18 100644 --- a/src/thread/pthread_mutex_timedlock.c +++ b/src/thread/pthread_mutex_timedlock.c @@ -90,3 +90,11 @@ int __pthread_mutex_timedlock(pthread_mutex_t *restrict m, const struct timespec } weak_alias(__pthread_mutex_timedlock, pthread_mutex_timedlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_trylock.c b/src/thread/pthread_mutex_trylock.c index a24e7c58..c9a2e9f6 100644 --- a/src/thread/pthread_mutex_trylock.c +++ b/src/thread/pthread_mutex_trylock.c @@ -72,3 +72,11 @@ int __pthread_mutex_trylock(pthread_mutex_t *m) } weak_alias(__pthread_mutex_trylock, pthread_mutex_trylock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutex_unlock.c b/src/thread/pthread_mutex_unlock.c index b66423e6..8d574ab4 100644 --- a/src/thread/pthread_mutex_unlock.c +++ b/src/thread/pthread_mutex_unlock.c @@ -50,3 +50,11 @@ int __pthread_mutex_unlock(pthread_mutex_t *m) } weak_alias(__pthread_mutex_unlock, pthread_mutex_unlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutexattr_destroy.c b/src/thread/pthread_mutexattr_destroy.c index 9fd69747..036ad6eb 100644 --- a/src/thread/pthread_mutexattr_destroy.c +++ b/src/thread/pthread_mutexattr_destroy.c @@ -4,3 +4,11 @@ int pthread_mutexattr_destroy(pthread_mutexattr_t *a) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutexattr_init.c b/src/thread/pthread_mutexattr_init.c index 0b72c1ba..032ca144 100644 --- a/src/thread/pthread_mutexattr_init.c +++ b/src/thread/pthread_mutexattr_init.c @@ -5,3 +5,11 @@ int pthread_mutexattr_init(pthread_mutexattr_t *a) *a = (pthread_mutexattr_t){0}; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutexattr_setprotocol.c b/src/thread/pthread_mutexattr_setprotocol.c index 8b80c1ce..ecfa4d32 100644 --- a/src/thread/pthread_mutexattr_setprotocol.c +++ b/src/thread/pthread_mutexattr_setprotocol.c @@ -26,3 +26,11 @@ int pthread_mutexattr_setprotocol(pthread_mutexattr_t *a, int protocol) return EINVAL; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutexattr_setpshared.c b/src/thread/pthread_mutexattr_setpshared.c index 100f6ff2..c2a09b48 100644 --- a/src/thread/pthread_mutexattr_setpshared.c +++ b/src/thread/pthread_mutexattr_setpshared.c @@ -7,3 +7,11 @@ int pthread_mutexattr_setpshared(pthread_mutexattr_t *a, int pshared) a->__attr |= pshared<<7; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutexattr_setrobust.c b/src/thread/pthread_mutexattr_setrobust.c index 30a9ac3b..8f835ff1 100644 --- a/src/thread/pthread_mutexattr_setrobust.c +++ b/src/thread/pthread_mutexattr_setrobust.c @@ -21,3 +21,11 @@ int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust) a->__attr &= ~4; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_mutexattr_settype.c b/src/thread/pthread_mutexattr_settype.c index cd7a80e3..91b1e22b 100644 --- a/src/thread/pthread_mutexattr_settype.c +++ b/src/thread/pthread_mutexattr_settype.c @@ -6,3 +6,11 @@ int pthread_mutexattr_settype(pthread_mutexattr_t *a, int type) a->__attr = (a->__attr & ~3) | type; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_once.c b/src/thread/pthread_once.c index 8e8d40ae..37d0f4bc 100644 --- a/src/thread/pthread_once.c +++ b/src/thread/pthread_once.c @@ -48,3 +48,11 @@ int __pthread_once(pthread_once_t *control, void (*init)(void)) } weak_alias(__pthread_once, pthread_once); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_destroy.c b/src/thread/pthread_rwlock_destroy.c index 49ecfbd0..bb1358a3 100644 --- a/src/thread/pthread_rwlock_destroy.c +++ b/src/thread/pthread_rwlock_destroy.c @@ -4,3 +4,11 @@ int pthread_rwlock_destroy(pthread_rwlock_t *rw) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_init.c b/src/thread/pthread_rwlock_init.c index a2c0b478..c5504805 100644 --- a/src/thread/pthread_rwlock_init.c +++ b/src/thread/pthread_rwlock_init.c @@ -6,3 +6,11 @@ int pthread_rwlock_init(pthread_rwlock_t *restrict rw, const pthread_rwlockattr_ if (a) rw->_rw_shared = a->__attr[0]*128; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_rdlock.c b/src/thread/pthread_rwlock_rdlock.c index 8546c07d..9ecf5995 100644 --- a/src/thread/pthread_rwlock_rdlock.c +++ b/src/thread/pthread_rwlock_rdlock.c @@ -6,3 +6,11 @@ int __pthread_rwlock_rdlock(pthread_rwlock_t *rw) } weak_alias(__pthread_rwlock_rdlock, pthread_rwlock_rdlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_timedrdlock.c b/src/thread/pthread_rwlock_timedrdlock.c index 8cdd8ecf..62548901 100644 --- a/src/thread/pthread_rwlock_timedrdlock.c +++ b/src/thread/pthread_rwlock_timedrdlock.c @@ -23,3 +23,11 @@ int __pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rw, const struct tim } weak_alias(__pthread_rwlock_timedrdlock, pthread_rwlock_timedrdlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_timedwrlock.c b/src/thread/pthread_rwlock_timedwrlock.c index d77706e6..ccae4eed 100644 --- a/src/thread/pthread_rwlock_timedwrlock.c +++ b/src/thread/pthread_rwlock_timedwrlock.c @@ -23,3 +23,11 @@ int __pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict rw, const struct tim } weak_alias(__pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_tryrdlock.c b/src/thread/pthread_rwlock_tryrdlock.c index c13bc9cc..95f52439 100644 --- a/src/thread/pthread_rwlock_tryrdlock.c +++ b/src/thread/pthread_rwlock_tryrdlock.c @@ -13,3 +13,11 @@ int __pthread_rwlock_tryrdlock(pthread_rwlock_t *rw) } weak_alias(__pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_trywrlock.c b/src/thread/pthread_rwlock_trywrlock.c index 64d9d312..773c3ddf 100644 --- a/src/thread/pthread_rwlock_trywrlock.c +++ b/src/thread/pthread_rwlock_trywrlock.c @@ -7,3 +7,11 @@ int __pthread_rwlock_trywrlock(pthread_rwlock_t *rw) } weak_alias(__pthread_rwlock_trywrlock, pthread_rwlock_trywrlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_unlock.c b/src/thread/pthread_rwlock_unlock.c index 9ae27ad2..a06323ca 100644 --- a/src/thread/pthread_rwlock_unlock.c +++ b/src/thread/pthread_rwlock_unlock.c @@ -18,3 +18,11 @@ int __pthread_rwlock_unlock(pthread_rwlock_t *rw) } weak_alias(__pthread_rwlock_unlock, pthread_rwlock_unlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlock_wrlock.c b/src/thread/pthread_rwlock_wrlock.c index 46a3b3a5..d2103d85 100644 --- a/src/thread/pthread_rwlock_wrlock.c +++ b/src/thread/pthread_rwlock_wrlock.c @@ -6,3 +6,11 @@ int __pthread_rwlock_wrlock(pthread_rwlock_t *rw) } weak_alias(__pthread_rwlock_wrlock, pthread_rwlock_wrlock); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlockattr_destroy.c b/src/thread/pthread_rwlockattr_destroy.c index fc8d611a..15ccbec0 100644 --- a/src/thread/pthread_rwlockattr_destroy.c +++ b/src/thread/pthread_rwlockattr_destroy.c @@ -4,3 +4,11 @@ int pthread_rwlockattr_destroy(pthread_rwlockattr_t *a) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlockattr_init.c b/src/thread/pthread_rwlockattr_init.c index e7420694..2ab1ac3c 100644 --- a/src/thread/pthread_rwlockattr_init.c +++ b/src/thread/pthread_rwlockattr_init.c @@ -5,3 +5,11 @@ int pthread_rwlockattr_init(pthread_rwlockattr_t *a) *a = (pthread_rwlockattr_t){0}; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_rwlockattr_setpshared.c b/src/thread/pthread_rwlockattr_setpshared.c index e7061973..3c9d11d8 100644 --- a/src/thread/pthread_rwlockattr_setpshared.c +++ b/src/thread/pthread_rwlockattr_setpshared.c @@ -6,3 +6,11 @@ int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *a, int pshared) a->__attr[0] = pshared; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_self.c b/src/thread/pthread_self.c index bd3bf95b..55b640a2 100644 --- a/src/thread/pthread_self.c +++ b/src/thread/pthread_self.c @@ -8,3 +8,11 @@ static pthread_t __pthread_self_internal() weak_alias(__pthread_self_internal, pthread_self); weak_alias(__pthread_self_internal, thrd_current); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setattr_default_np.c b/src/thread/pthread_setattr_default_np.c index 58486220..91502ce9 100644 --- a/src/thread/pthread_setattr_default_np.c +++ b/src/thread/pthread_setattr_default_np.c @@ -35,3 +35,11 @@ int pthread_getattr_default_np(pthread_attr_t *attrp) __release_ptc(); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setcancelstate.c b/src/thread/pthread_setcancelstate.c index 5ab8c338..28e96ad1 100644 --- a/src/thread/pthread_setcancelstate.c +++ b/src/thread/pthread_setcancelstate.c @@ -10,3 +10,11 @@ int __pthread_setcancelstate(int new, int *old) } weak_alias(__pthread_setcancelstate, pthread_setcancelstate); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setcanceltype.c b/src/thread/pthread_setcanceltype.c index bf0a3f38..8b665ac2 100644 --- a/src/thread/pthread_setcanceltype.c +++ b/src/thread/pthread_setcanceltype.c @@ -9,3 +9,11 @@ int pthread_setcanceltype(int new, int *old) if (new) pthread_testcancel(); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setconcurrency.c b/src/thread/pthread_setconcurrency.c index 091abf98..8b9a40e3 100644 --- a/src/thread/pthread_setconcurrency.c +++ b/src/thread/pthread_setconcurrency.c @@ -7,3 +7,11 @@ int pthread_setconcurrency(int val) if (val > 0) return EAGAIN; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setname_np.c b/src/thread/pthread_setname_np.c index fc2d2306..91697523 100644 --- a/src/thread/pthread_setname_np.c +++ b/src/thread/pthread_setname_np.c @@ -24,3 +24,11 @@ int pthread_setname_np(pthread_t thread, const char *name) pthread_setcancelstate(cs, 0); return status; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setschedparam.c b/src/thread/pthread_setschedparam.c index 76d4d45a..4a920d12 100644 --- a/src/thread/pthread_setschedparam.c +++ b/src/thread/pthread_setschedparam.c @@ -12,3 +12,11 @@ int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *par __restore_sigs(&set); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setschedprio.c b/src/thread/pthread_setschedprio.c index fc2e13dd..ca4efbbd 100644 --- a/src/thread/pthread_setschedprio.c +++ b/src/thread/pthread_setschedprio.c @@ -12,3 +12,11 @@ int pthread_setschedprio(pthread_t t, int prio) __restore_sigs(&set); return r; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_setspecific.c b/src/thread/pthread_setspecific.c index 55e46a89..828802bb 100644 --- a/src/thread/pthread_setspecific.c +++ b/src/thread/pthread_setspecific.c @@ -10,3 +10,11 @@ int pthread_setspecific(pthread_key_t k, const void *x) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_sigmask.c b/src/thread/pthread_sigmask.c index f188782a..8d5b83c5 100644 --- a/src/thread/pthread_sigmask.c +++ b/src/thread/pthread_sigmask.c @@ -17,3 +17,11 @@ int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict ol } return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_spin_destroy.c b/src/thread/pthread_spin_destroy.c index e65a820c..19a90b89 100644 --- a/src/thread/pthread_spin_destroy.c +++ b/src/thread/pthread_spin_destroy.c @@ -4,3 +4,11 @@ int pthread_spin_destroy(pthread_spinlock_t *s) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_spin_init.c b/src/thread/pthread_spin_init.c index 681881cf..ce4e4182 100644 --- a/src/thread/pthread_spin_init.c +++ b/src/thread/pthread_spin_init.c @@ -4,3 +4,11 @@ int pthread_spin_init(pthread_spinlock_t *s, int shared) { return *s = 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_spin_lock.c b/src/thread/pthread_spin_lock.c index ded2b653..c77173cb 100644 --- a/src/thread/pthread_spin_lock.c +++ b/src/thread/pthread_spin_lock.c @@ -6,3 +6,11 @@ int pthread_spin_lock(pthread_spinlock_t *s) while (*(volatile int *)s || a_cas(s, 0, EBUSY)) a_spin(); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_spin_trylock.c b/src/thread/pthread_spin_trylock.c index 5284fdac..45fc1ff5 100644 --- a/src/thread/pthread_spin_trylock.c +++ b/src/thread/pthread_spin_trylock.c @@ -5,3 +5,11 @@ int pthread_spin_trylock(pthread_spinlock_t *s) { return a_cas(s, 0, EBUSY); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_spin_unlock.c b/src/thread/pthread_spin_unlock.c index 724d9e0d..1603a977 100644 --- a/src/thread/pthread_spin_unlock.c +++ b/src/thread/pthread_spin_unlock.c @@ -5,3 +5,11 @@ int pthread_spin_unlock(pthread_spinlock_t *s) a_store(s, 0); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/pthread_testcancel.c b/src/thread/pthread_testcancel.c index d772449d..6b2e18e8 100644 --- a/src/thread/pthread_testcancel.c +++ b/src/thread/pthread_testcancel.c @@ -12,3 +12,11 @@ void __pthread_testcancel() } weak_alias(__pthread_testcancel, pthread_testcancel); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_destroy.c b/src/thread/sem_destroy.c index f4aced5d..747ce836 100644 --- a/src/thread/sem_destroy.c +++ b/src/thread/sem_destroy.c @@ -4,3 +4,11 @@ int sem_destroy(sem_t *sem) { return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_getvalue.c b/src/thread/sem_getvalue.c index c0b7762d..a05d9022 100644 --- a/src/thread/sem_getvalue.c +++ b/src/thread/sem_getvalue.c @@ -7,3 +7,11 @@ int sem_getvalue(sem_t *restrict sem, int *restrict valp) *valp = val & SEM_VALUE_MAX; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_init.c b/src/thread/sem_init.c index 55092434..7381e684 100644 --- a/src/thread/sem_init.c +++ b/src/thread/sem_init.c @@ -13,3 +13,11 @@ int sem_init(sem_t *sem, int pshared, unsigned value) sem->__val[2] = pshared ? 0 : 128; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_open.c b/src/thread/sem_open.c index 0ad29de9..ed5475f6 100644 --- a/src/thread/sem_open.c +++ b/src/thread/sem_open.c @@ -180,3 +180,11 @@ int sem_close(sem_t *sem) munmap(sem, sizeof *sem); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_post.c b/src/thread/sem_post.c index 5c2517f2..a9d8cf55 100644 --- a/src/thread/sem_post.c +++ b/src/thread/sem_post.c @@ -19,3 +19,11 @@ int sem_post(sem_t *sem) if (val<0) __wake(sem->__val, waiters>1 ? 1 : -1, priv); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_timedwait.c b/src/thread/sem_timedwait.c index aa67376c..e3bfdf09 100644 --- a/src/thread/sem_timedwait.c +++ b/src/thread/sem_timedwait.c @@ -31,3 +31,11 @@ int sem_timedwait(sem_t *restrict sem, const struct timespec *restrict at) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_trywait.c b/src/thread/sem_trywait.c index beb435da..5d46700e 100644 --- a/src/thread/sem_trywait.c +++ b/src/thread/sem_trywait.c @@ -11,3 +11,11 @@ int sem_trywait(sem_t *sem) errno = EAGAIN; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_unlink.c b/src/thread/sem_unlink.c index c06134bd..b837da9f 100644 --- a/src/thread/sem_unlink.c +++ b/src/thread/sem_unlink.c @@ -5,3 +5,11 @@ int sem_unlink(const char *name) { return shm_unlink(name); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/sem_wait.c b/src/thread/sem_wait.c index 264194f9..1bfd8847 100644 --- a/src/thread/sem_wait.c +++ b/src/thread/sem_wait.c @@ -4,3 +4,11 @@ int sem_wait(sem_t *sem) { return sem_timedwait(sem, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/synccall.c b/src/thread/synccall.c index 38597254..4019fce5 100644 --- a/src/thread/synccall.c +++ b/src/thread/synccall.c @@ -120,3 +120,11 @@ single_threaded: __tl_unlock(); __restore_sigs(&oldmask); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/thrd_create.c b/src/thread/thrd_create.c index 76a683db..31b7bfb8 100644 --- a/src/thread/thrd_create.c +++ b/src/thread/thrd_create.c @@ -10,3 +10,11 @@ int thrd_create(thrd_t *thr, thrd_start_t func, void *arg) default: return thrd_error; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/thrd_exit.c b/src/thread/thrd_exit.c index 9b291ae3..c532f1a8 100644 --- a/src/thread/thrd_exit.c +++ b/src/thread/thrd_exit.c @@ -6,3 +6,11 @@ _Noreturn void thrd_exit(int result) { __pthread_exit((void*)(intptr_t)result); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/thrd_join.c b/src/thread/thrd_join.c index 0d5fd302..9d3ac030 100644 --- a/src/thread/thrd_join.c +++ b/src/thread/thrd_join.c @@ -9,3 +9,11 @@ int thrd_join(thrd_t t, int *res) if (res) *res = (int)(intptr_t)pthread_res; return thrd_success; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/thrd_sleep.c b/src/thread/thrd_sleep.c index 97de5345..18b09a3a 100644 --- a/src/thread/thrd_sleep.c +++ b/src/thread/thrd_sleep.c @@ -12,3 +12,11 @@ int thrd_sleep(const struct timespec *req, struct timespec *rem) default: return -2; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/thrd_yield.c b/src/thread/thrd_yield.c index f7ad1321..5aadf1c5 100644 --- a/src/thread/thrd_yield.c +++ b/src/thread/thrd_yield.c @@ -5,3 +5,11 @@ void thrd_yield() { __syscall(SYS_sched_yield); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/tls.c b/src/thread/tls.c index e69de29b..980a0611 100644 --- a/src/thread/tls.c +++ b/src/thread/tls.c @@ -0,0 +1,8 @@ + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/tss_create.c b/src/thread/tss_create.c index 6d6ef96b..e8c2aa92 100644 --- a/src/thread/tss_create.c +++ b/src/thread/tss_create.c @@ -8,3 +8,11 @@ int tss_create(tss_t *tss, tss_dtor_t dtor) * unless thrd_error equals EAGAIN. */ return __pthread_key_create(tss, dtor) ? thrd_error : thrd_success; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/tss_delete.c b/src/thread/tss_delete.c index 6f51b07e..c8550b2e 100644 --- a/src/thread/tss_delete.c +++ b/src/thread/tss_delete.c @@ -5,3 +5,11 @@ void tss_delete(tss_t key) { __pthread_key_delete(key); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/tss_set.c b/src/thread/tss_set.c index 70c4fb72..ae9d44bc 100644 --- a/src/thread/tss_set.c +++ b/src/thread/tss_set.c @@ -11,3 +11,11 @@ int tss_set(tss_t k, void *x) } return thrd_success; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/thread/vmlock.c b/src/thread/vmlock.c index fa0a8e3c..b207ae90 100644 --- a/src/thread/vmlock.c +++ b/src/thread/vmlock.c @@ -21,3 +21,11 @@ void __vm_unlock() if (a_fetch_add(vmlock, -1)==1 && vmlock[1]) __wake(vmlock, -1, 1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/__map_file.c b/src/time/__map_file.c index c2b29fe8..8d1e5f29 100644 --- a/src/time/__map_file.c +++ b/src/time/__map_file.c @@ -16,3 +16,11 @@ const char unsigned *__map_file(const char *pathname, size_t *size) __syscall(SYS_close, fd); return map == MAP_FAILED ? 0 : map; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/__month_to_secs.c b/src/time/__month_to_secs.c index 43248fb3..0bab2660 100644 --- a/src/time/__month_to_secs.c +++ b/src/time/__month_to_secs.c @@ -8,3 +8,11 @@ int __month_to_secs(int month, int is_leap) if (is_leap && month >= 2) t+=86400; return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/__secs_to_tm.c b/src/time/__secs_to_tm.c index 093d9021..48ef1b91 100644 --- a/src/time/__secs_to_tm.c +++ b/src/time/__secs_to_tm.c @@ -80,3 +80,11 @@ int __secs_to_tm(long long t, struct tm *tm) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/__tm_to_secs.c b/src/time/__tm_to_secs.c index c29fa985..59705aa4 100644 --- a/src/time/__tm_to_secs.c +++ b/src/time/__tm_to_secs.c @@ -22,3 +22,11 @@ long long __tm_to_secs(const struct tm *tm) t += tm->tm_sec; return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/__tz.c b/src/time/__tz.c index c34b3eb7..51efaf17 100644 --- a/src/time/__tz.c +++ b/src/time/__tz.c @@ -437,3 +437,11 @@ const char *__tm_to_tzname(const struct tm *tm) UNLOCK(lock); return p; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/__year_to_secs.c b/src/time/__year_to_secs.c index b42f5a6d..9b2c0a1a 100644 --- a/src/time/__year_to_secs.c +++ b/src/time/__year_to_secs.c @@ -45,3 +45,11 @@ long long __year_to_secs(long long year, int *is_leap) return (year-100) * 31536000LL + leaps * 86400LL + 946684800 + 86400; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/asctime.c b/src/time/asctime.c index 1febe544..c3653023 100644 --- a/src/time/asctime.c +++ b/src/time/asctime.c @@ -5,3 +5,11 @@ char *asctime(const struct tm *tm) static char buf[26]; return __asctime_r(tm, buf); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/asctime_r.c b/src/time/asctime_r.c index 26809ca2..19d08aa2 100644 --- a/src/time/asctime_r.c +++ b/src/time/asctime_r.c @@ -26,3 +26,11 @@ char *__asctime_r(const struct tm *restrict tm, char *restrict buf) } weak_alias(__asctime_r, asctime_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/clock.c b/src/time/clock.c index 6724012b..c97daba6 100644 --- a/src/time/clock.c +++ b/src/time/clock.c @@ -14,3 +14,11 @@ clock_t clock() return ts.tv_sec*1000000 + ts.tv_nsec/1000; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/clock_getcpuclockid.c b/src/time/clock_getcpuclockid.c index bce1e8ab..0710a674 100644 --- a/src/time/clock_getcpuclockid.c +++ b/src/time/clock_getcpuclockid.c @@ -13,3 +13,11 @@ int clock_getcpuclockid(pid_t pid, clockid_t *clk) *clk = id; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/clock_getres.c b/src/time/clock_getres.c index 81c67037..7041ae02 100644 --- a/src/time/clock_getres.c +++ b/src/time/clock_getres.c @@ -19,3 +19,11 @@ int clock_getres(clockid_t clk, struct timespec *ts) * 32-bit arch and we can get result directly into timespec. */ return syscall(SYS_clock_getres, clk, ts); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/clock_gettime.c b/src/time/clock_gettime.c index 4d2ec22f..ade7ade0 100644 --- a/src/time/clock_gettime.c +++ b/src/time/clock_gettime.c @@ -112,3 +112,11 @@ int __clock_gettime(clockid_t clk, struct timespec *ts) } weak_alias(__clock_gettime, clock_gettime); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/clock_nanosleep.c b/src/time/clock_nanosleep.c index e195499c..b3e6c016 100644 --- a/src/time/clock_nanosleep.c +++ b/src/time/clock_nanosleep.c @@ -36,3 +36,11 @@ int __clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, stru } weak_alias(__clock_nanosleep, clock_nanosleep); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/clock_settime.c b/src/time/clock_settime.c index 1004ed15..73ed8b61 100644 --- a/src/time/clock_settime.c +++ b/src/time/clock_settime.c @@ -22,3 +22,11 @@ int clock_settime(clockid_t clk, const struct timespec *ts) return syscall(SYS_clock_settime, clk, ts); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/ctime.c b/src/time/ctime.c index 36029315..3f8d0bd2 100644 --- a/src/time/ctime.c +++ b/src/time/ctime.c @@ -6,3 +6,11 @@ char *ctime(const time_t *t) if (!tm) return 0; return asctime(tm); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/ctime_r.c b/src/time/ctime_r.c index 3e24aa68..b787bbc2 100644 --- a/src/time/ctime_r.c +++ b/src/time/ctime_r.c @@ -5,3 +5,11 @@ char *ctime_r(const time_t *t, char *buf) struct tm tm, *tm_p = localtime_r(t, &tm); return tm_p ? asctime_r(tm_p, buf) : 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/difftime.c b/src/time/difftime.c index 80a18cc0..a4e18342 100644 --- a/src/time/difftime.c +++ b/src/time/difftime.c @@ -4,3 +4,11 @@ double difftime(time_t t1, time_t t0) { return t1-t0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/ftime.c b/src/time/ftime.c index a1734d0f..df2410f0 100644 --- a/src/time/ftime.c +++ b/src/time/ftime.c @@ -10,3 +10,11 @@ int ftime(struct timeb *tp) tp->timezone = tp->dstflag = 0; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/getdate.c b/src/time/getdate.c index 420cd8e4..8a3495ae 100644 --- a/src/time/getdate.c +++ b/src/time/getdate.c @@ -44,3 +44,11 @@ out: pthread_setcancelstate(cs, 0); return ret; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/gettimeofday.c b/src/time/gettimeofday.c index 691f8e90..a5c77fd4 100644 --- a/src/time/gettimeofday.c +++ b/src/time/gettimeofday.c @@ -11,3 +11,11 @@ int gettimeofday(struct timeval *restrict tv, void *restrict tz) tv->tv_usec = (int)ts.tv_nsec / 1000; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/gmtime.c b/src/time/gmtime.c index 6320b637..a10c0e60 100644 --- a/src/time/gmtime.c +++ b/src/time/gmtime.c @@ -6,3 +6,11 @@ struct tm *gmtime(const time_t *t) static struct tm tm; return __gmtime_r(t, &tm); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/gmtime_r.c b/src/time/gmtime_r.c index 22aec2c2..dec31a97 100644 --- a/src/time/gmtime_r.c +++ b/src/time/gmtime_r.c @@ -14,3 +14,11 @@ struct tm *__gmtime_r(const time_t *restrict t, struct tm *restrict tm) } weak_alias(__gmtime_r, gmtime_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/localtime.c b/src/time/localtime.c index 52104232..f0db1f3c 100644 --- a/src/time/localtime.c +++ b/src/time/localtime.c @@ -5,3 +5,11 @@ struct tm *localtime(const time_t *t) static struct tm tm; return __localtime_r(t, &tm); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/localtime_r.c b/src/time/localtime_r.c index 1a15b314..7ec42afb 100644 --- a/src/time/localtime_r.c +++ b/src/time/localtime_r.c @@ -19,3 +19,11 @@ struct tm *__localtime_r(const time_t *restrict t, struct tm *restrict tm) } weak_alias(__localtime_r, localtime_r); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/mktime.c b/src/time/mktime.c index bad3f076..afff8fc7 100644 --- a/src/time/mktime.c +++ b/src/time/mktime.c @@ -26,3 +26,11 @@ error: errno = EOVERFLOW; return -1; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/nanosleep.c b/src/time/nanosleep.c index bc9f7895..ab800ae4 100644 --- a/src/time/nanosleep.c +++ b/src/time/nanosleep.c @@ -5,3 +5,11 @@ int nanosleep(const struct timespec *req, struct timespec *rem) { return __syscall_ret(-__clock_nanosleep(CLOCK_REALTIME, 0, req, rem)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/strftime.c b/src/time/strftime.c index cc53d536..b9565355 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -279,3 +279,11 @@ size_t strftime(char *restrict s, size_t n, const char *restrict f, const struct } weak_alias(__strftime_l, strftime_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/strptime.c b/src/time/strptime.c index c54a0d8c..098b7a10 100644 --- a/src/time/strptime.c +++ b/src/time/strptime.c @@ -204,3 +204,11 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri } return (char *)s; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/time.c b/src/time/time.c index ad0480f9..d957ee6d 100644 --- a/src/time/time.c +++ b/src/time/time.c @@ -8,3 +8,11 @@ time_t time(time_t *t) if (t) *t = ts.tv_sec; return ts.tv_sec; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/timegm.c b/src/time/timegm.c index 4e5907d7..ba324cb6 100644 --- a/src/time/timegm.c +++ b/src/time/timegm.c @@ -16,3 +16,11 @@ time_t timegm(struct tm *tm) tm->__tm_zone = __utc; return t; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/timer_create.c b/src/time/timer_create.c index 9216b3ab..75e5cd35 100644 --- a/src/time/timer_create.c +++ b/src/time/timer_create.c @@ -131,3 +131,11 @@ int timer_create(clockid_t clk, struct sigevent *restrict evp, timer_t *restrict return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/timer_delete.c b/src/time/timer_delete.c index b0bfac09..1d00ceb9 100644 --- a/src/time/timer_delete.c +++ b/src/time/timer_delete.c @@ -12,3 +12,11 @@ int timer_delete(timer_t t) } return __syscall(SYS_timer_delete, t); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/timer_getoverrun.c b/src/time/timer_getoverrun.c index e7f891e4..12253b18 100644 --- a/src/time/timer_getoverrun.c +++ b/src/time/timer_getoverrun.c @@ -10,3 +10,11 @@ int timer_getoverrun(timer_t t) } return syscall(SYS_timer_getoverrun, t); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/timer_gettime.c b/src/time/timer_gettime.c index 21c9d32c..e35ad83b 100644 --- a/src/time/timer_gettime.c +++ b/src/time/timer_gettime.c @@ -26,3 +26,11 @@ int timer_gettime(timer_t t, struct itimerspec *val) #endif return syscall(SYS_timer_gettime, t, val); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/timer_settime.c b/src/time/timer_settime.c index 373f00ce..6c93725f 100644 --- a/src/time/timer_settime.c +++ b/src/time/timer_settime.c @@ -35,3 +35,11 @@ int timer_settime(timer_t t, int flags, const struct itimerspec *restrict val, s #endif return syscall(SYS_timer_settime, t, flags, val, old); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/times.c b/src/time/times.c index c4a100f7..11c3cb24 100644 --- a/src/time/times.c +++ b/src/time/times.c @@ -5,3 +5,11 @@ clock_t times(struct tms *tms) { return __syscall(SYS_times, tms); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/timespec_get.c b/src/time/timespec_get.c index 40ea9c1c..4915e52c 100644 --- a/src/time/timespec_get.c +++ b/src/time/timespec_get.c @@ -8,3 +8,11 @@ int timespec_get(struct timespec * ts, int base) int ret = __clock_gettime(CLOCK_REALTIME, ts); return ret < 0 ? 0 : base; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/utime.c b/src/time/utime.c index e7592b29..c5d3ef07 100644 --- a/src/time/utime.c +++ b/src/time/utime.c @@ -9,3 +9,11 @@ int utime(const char *path, const struct utimbuf *times) { .tv_sec = times->actime }, { .tv_sec = times->modtime }}) : 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/time/wcsftime.c b/src/time/wcsftime.c index 8e1437b3..3fa97bc7 100644 --- a/src/time/wcsftime.c +++ b/src/time/wcsftime.c @@ -69,3 +69,11 @@ size_t wcsftime(wchar_t *restrict wcs, size_t n, const wchar_t *restrict f, cons } weak_alias(__wcsftime_l, wcsftime_l); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/_exit.c b/src/unistd/_exit.c index 76994823..36af5204 100644 --- a/src/unistd/_exit.c +++ b/src/unistd/_exit.c @@ -5,3 +5,11 @@ _Noreturn void _exit(int status) { _Exit(status); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/access.c b/src/unistd/access.c index d6eed683..7c8ed898 100644 --- a/src/unistd/access.c +++ b/src/unistd/access.c @@ -10,3 +10,11 @@ int access(const char *filename, int amode) return syscall(SYS_faccessat, AT_FDCWD, filename, amode, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/acct.c b/src/unistd/acct.c index 308ffc38..b9e50e32 100644 --- a/src/unistd/acct.c +++ b/src/unistd/acct.c @@ -6,3 +6,11 @@ int acct(const char *filename) { return syscall(SYS_acct, filename); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/alarm.c b/src/unistd/alarm.c index a5e0c822..64d4887d 100644 --- a/src/unistd/alarm.c +++ b/src/unistd/alarm.c @@ -8,3 +8,11 @@ unsigned alarm(unsigned seconds) setitimer(ITIMER_REAL, &it, &old); return old.it_value.tv_sec + !!old.it_value.tv_usec; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/chdir.c b/src/unistd/chdir.c index 5ba78b63..893d44e4 100644 --- a/src/unistd/chdir.c +++ b/src/unistd/chdir.c @@ -5,3 +5,11 @@ int chdir(const char *path) { return syscall(SYS_chdir, path); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/chown.c b/src/unistd/chown.c index 14b03255..00bf27d1 100644 --- a/src/unistd/chown.c +++ b/src/unistd/chown.c @@ -10,3 +10,11 @@ int chown(const char *path, uid_t uid, gid_t gid) return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/close.c b/src/unistd/close.c index a2105f50..7da59568 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -17,3 +17,11 @@ int close(int fd) if (r == -EINTR) r = 0; return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/ctermid.c b/src/unistd/ctermid.c index 1612770a..0b81f85c 100644 --- a/src/unistd/ctermid.c +++ b/src/unistd/ctermid.c @@ -5,3 +5,11 @@ char *ctermid(char *s) { return s ? strcpy(s, "/dev/tty") : "/dev/tty"; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/dup.c b/src/unistd/dup.c index 7fee0120..02b6a665 100644 --- a/src/unistd/dup.c +++ b/src/unistd/dup.c @@ -5,3 +5,11 @@ int dup(int fd) { return syscall(SYS_dup, fd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/dup2.c b/src/unistd/dup2.c index 8f43c6dd..98c2830d 100644 --- a/src/unistd/dup2.c +++ b/src/unistd/dup2.c @@ -18,3 +18,11 @@ int dup2(int old, int new) #endif return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/dup3.c b/src/unistd/dup3.c index 40798bde..47c2158b 100644 --- a/src/unistd/dup3.c +++ b/src/unistd/dup3.c @@ -24,3 +24,11 @@ int __dup3(int old, int new, int flags) } weak_alias(__dup3, dup3); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c index 557503eb..605300d0 100644 --- a/src/unistd/faccessat.c +++ b/src/unistd/faccessat.c @@ -59,3 +59,11 @@ int faccessat(int fd, const char *filename, int amode, int flag) return __syscall_ret(ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/fchdir.c b/src/unistd/fchdir.c index dee45ba6..1a9aad60 100644 --- a/src/unistd/fchdir.c +++ b/src/unistd/fchdir.c @@ -13,3 +13,11 @@ int fchdir(int fd) __procfdname(buf, fd); return syscall(SYS_chdir, buf); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/fchown.c b/src/unistd/fchown.c index 737b3672..b1a5290d 100644 --- a/src/unistd/fchown.c +++ b/src/unistd/fchown.c @@ -18,3 +18,11 @@ int fchown(int fd, uid_t uid, gid_t gid) #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/fchownat.c b/src/unistd/fchownat.c index 62457a3e..189f1adc 100644 --- a/src/unistd/fchownat.c +++ b/src/unistd/fchownat.c @@ -5,3 +5,11 @@ int fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag) { return syscall(SYS_fchownat, fd, path, uid, gid, flag); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/fdatasync.c b/src/unistd/fdatasync.c index 3895ae53..10454721 100644 --- a/src/unistd/fdatasync.c +++ b/src/unistd/fdatasync.c @@ -5,3 +5,11 @@ int fdatasync(int fd) { return syscall_cp(SYS_fdatasync, fd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/fsync.c b/src/unistd/fsync.c index 7a1c80b5..348f2144 100644 --- a/src/unistd/fsync.c +++ b/src/unistd/fsync.c @@ -5,3 +5,11 @@ int fsync(int fd) { return syscall_cp(SYS_fsync, fd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/ftruncate.c b/src/unistd/ftruncate.c index 54ff34bc..7a8fa716 100644 --- a/src/unistd/ftruncate.c +++ b/src/unistd/ftruncate.c @@ -5,3 +5,11 @@ int ftruncate(int fd, off_t length) { return syscall(SYS_ftruncate, fd, __SYSCALL_LL_O(length)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c index f407ffe0..5c29f699 100644 --- a/src/unistd/getcwd.c +++ b/src/unistd/getcwd.c @@ -23,3 +23,11 @@ char *getcwd(char *buf, size_t size) } return buf == tmp ? strdup(buf) : buf; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getegid.c b/src/unistd/getegid.c index 6287490d..01bf2aad 100644 --- a/src/unistd/getegid.c +++ b/src/unistd/getegid.c @@ -5,3 +5,11 @@ gid_t getegid(void) { return __syscall(SYS_getegid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/geteuid.c b/src/unistd/geteuid.c index 88f2cd53..8ed2c28e 100644 --- a/src/unistd/geteuid.c +++ b/src/unistd/geteuid.c @@ -5,3 +5,11 @@ uid_t geteuid(void) { return __syscall(SYS_geteuid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getgid.c b/src/unistd/getgid.c index 1c9fe715..1ffc51c9 100644 --- a/src/unistd/getgid.c +++ b/src/unistd/getgid.c @@ -5,3 +5,11 @@ gid_t getgid(void) { return __syscall(SYS_getgid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getgroups.c b/src/unistd/getgroups.c index 0e6e63af..f0260817 100644 --- a/src/unistd/getgroups.c +++ b/src/unistd/getgroups.c @@ -5,3 +5,11 @@ int getgroups(int count, gid_t list[]) { return syscall(SYS_getgroups, count, list); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/gethostname.c b/src/unistd/gethostname.c index 633ef571..8dab0811 100644 --- a/src/unistd/gethostname.c +++ b/src/unistd/gethostname.c @@ -11,3 +11,11 @@ int gethostname(char *name, size_t len) if (i && i==len) name[i-1] = 0; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getlogin.c b/src/unistd/getlogin.c index 06011913..af8372a4 100644 --- a/src/unistd/getlogin.c +++ b/src/unistd/getlogin.c @@ -5,3 +5,11 @@ char *getlogin(void) { return getenv("LOGNAME"); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getlogin_r.c b/src/unistd/getlogin_r.c index 53866c6d..168d25e5 100644 --- a/src/unistd/getlogin_r.c +++ b/src/unistd/getlogin_r.c @@ -10,3 +10,11 @@ int getlogin_r(char *name, size_t size) strcpy(name, logname); return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getpgid.c b/src/unistd/getpgid.c index d295bfd5..ed44aa96 100644 --- a/src/unistd/getpgid.c +++ b/src/unistd/getpgid.c @@ -5,3 +5,11 @@ pid_t getpgid(pid_t pid) { return syscall(SYS_getpgid, pid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getpgrp.c b/src/unistd/getpgrp.c index 90e9bb07..5a8a8964 100644 --- a/src/unistd/getpgrp.c +++ b/src/unistd/getpgrp.c @@ -5,3 +5,11 @@ pid_t getpgrp(void) { return __syscall(SYS_getpgid, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getpid.c b/src/unistd/getpid.c index a6d4e6d1..94958af9 100644 --- a/src/unistd/getpid.c +++ b/src/unistd/getpid.c @@ -5,3 +5,11 @@ pid_t getpid(void) { return __syscall(SYS_getpid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getppid.c b/src/unistd/getppid.c index 05cade53..b42a7c98 100644 --- a/src/unistd/getppid.c +++ b/src/unistd/getppid.c @@ -5,3 +5,11 @@ pid_t getppid(void) { return __syscall(SYS_getppid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getsid.c b/src/unistd/getsid.c index 93ba690e..da4479cc 100644 --- a/src/unistd/getsid.c +++ b/src/unistd/getsid.c @@ -5,3 +5,11 @@ pid_t getsid(pid_t pid) { return syscall(SYS_getsid, pid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/getuid.c b/src/unistd/getuid.c index 61309d1b..9aae884d 100644 --- a/src/unistd/getuid.c +++ b/src/unistd/getuid.c @@ -5,3 +5,11 @@ uid_t getuid(void) { return __syscall(SYS_getuid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/isatty.c b/src/unistd/isatty.c index 75a9c186..06d5565f 100644 --- a/src/unistd/isatty.c +++ b/src/unistd/isatty.c @@ -11,3 +11,11 @@ int isatty(int fd) if (errno != EBADF) errno = ENOTTY; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/lchown.c b/src/unistd/lchown.c index ccd5ee02..604d70ff 100644 --- a/src/unistd/lchown.c +++ b/src/unistd/lchown.c @@ -10,3 +10,11 @@ int lchown(const char *path, uid_t uid, gid_t gid) return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/link.c b/src/unistd/link.c index feec18e5..b4290edd 100644 --- a/src/unistd/link.c +++ b/src/unistd/link.c @@ -10,3 +10,11 @@ int link(const char *existing, const char *new) return syscall(SYS_linkat, AT_FDCWD, existing, AT_FDCWD, new, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/linkat.c b/src/unistd/linkat.c index 6a9a0b77..facc93f2 100644 --- a/src/unistd/linkat.c +++ b/src/unistd/linkat.c @@ -5,3 +5,11 @@ int linkat(int fd1, const char *existing, int fd2, const char *new, int flag) { return syscall(SYS_linkat, fd1, existing, fd2, new, flag); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/lseek.c b/src/unistd/lseek.c index f5b66682..be3e74a8 100644 --- a/src/unistd/lseek.c +++ b/src/unistd/lseek.c @@ -12,3 +12,11 @@ off_t __lseek(int fd, off_t offset, int whence) } weak_alias(__lseek, lseek); + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/nice.c b/src/unistd/nice.c index 1c2295ff..6374259a 100644 --- a/src/unistd/nice.c +++ b/src/unistd/nice.c @@ -21,3 +21,11 @@ int nice(int inc) return prio; } } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/pause.c b/src/unistd/pause.c index 90bbf4ca..7cc98a8e 100644 --- a/src/unistd/pause.c +++ b/src/unistd/pause.c @@ -9,3 +9,11 @@ int pause(void) return syscall_cp(SYS_ppoll, 0, 0, 0, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/pipe.c b/src/unistd/pipe.c index d07b8d24..b0c690ea 100644 --- a/src/unistd/pipe.c +++ b/src/unistd/pipe.c @@ -9,3 +9,11 @@ int pipe(int fd[2]) return syscall(SYS_pipe2, fd, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/pipe2.c b/src/unistd/pipe2.c index a096990b..66127d2c 100644 --- a/src/unistd/pipe2.c +++ b/src/unistd/pipe2.c @@ -21,3 +21,11 @@ int pipe2(int fd[2], int flag) } return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/posix_close.c b/src/unistd/posix_close.c index 90f51a82..8418886b 100644 --- a/src/unistd/posix_close.c +++ b/src/unistd/posix_close.c @@ -4,3 +4,11 @@ int posix_close(int fd, int flags) { return close(fd); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/pread.c b/src/unistd/pread.c index b03fb0ad..0d69e11b 100644 --- a/src/unistd/pread.c +++ b/src/unistd/pread.c @@ -5,3 +5,11 @@ ssize_t pread(int fd, void *buf, size_t size, off_t ofs) { return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_PRW(ofs)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/preadv.c b/src/unistd/preadv.c index 890ab403..3252e383 100644 --- a/src/unistd/preadv.c +++ b/src/unistd/preadv.c @@ -8,3 +8,11 @@ ssize_t preadv(int fd, const struct iovec *iov, int count, off_t ofs) return syscall_cp(SYS_preadv, fd, iov, count, (long)(ofs), (long)(ofs>>32)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/pwrite.c b/src/unistd/pwrite.c index 869b69f0..bfdf0c59 100644 --- a/src/unistd/pwrite.c +++ b/src/unistd/pwrite.c @@ -5,3 +5,11 @@ ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs) { return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_PRW(ofs)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/pwritev.c b/src/unistd/pwritev.c index becf9deb..924020ee 100644 --- a/src/unistd/pwritev.c +++ b/src/unistd/pwritev.c @@ -8,3 +8,11 @@ ssize_t pwritev(int fd, const struct iovec *iov, int count, off_t ofs) return syscall_cp(SYS_pwritev, fd, iov, count, (long)(ofs), (long)(ofs>>32)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/read.c b/src/unistd/read.c index f3589c05..e902fe41 100644 --- a/src/unistd/read.c +++ b/src/unistd/read.c @@ -5,3 +5,11 @@ ssize_t read(int fd, void *buf, size_t count) { return syscall_cp(SYS_read, fd, buf, count); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/readlink.c b/src/unistd/readlink.c index 32f4537f..9a16ce52 100644 --- a/src/unistd/readlink.c +++ b/src/unistd/readlink.c @@ -17,3 +17,11 @@ ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize) if (buf == dummy && r > 0) r = 0; return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/readlinkat.c b/src/unistd/readlinkat.c index f79d3d14..104163df 100644 --- a/src/unistd/readlinkat.c +++ b/src/unistd/readlinkat.c @@ -12,3 +12,11 @@ ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf, size_t if (buf == dummy && r > 0) r = 0; return __syscall_ret(r); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/readv.c b/src/unistd/readv.c index 91e6de81..15962dc1 100644 --- a/src/unistd/readv.c +++ b/src/unistd/readv.c @@ -5,3 +5,11 @@ ssize_t readv(int fd, const struct iovec *iov, int count) { return syscall_cp(SYS_readv, fd, iov, count); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c index c3b40a25..e0e83541 100644 --- a/src/unistd/renameat.c +++ b/src/unistd/renameat.c @@ -9,3 +9,11 @@ int renameat(int oldfd, const char *old, int newfd, const char *new) return syscall(SYS_renameat2, oldfd, old, newfd, new, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/rmdir.c b/src/unistd/rmdir.c index 6825ffc8..ea056162 100644 --- a/src/unistd/rmdir.c +++ b/src/unistd/rmdir.c @@ -10,3 +10,11 @@ int rmdir(const char *path) return syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setegid.c b/src/unistd/setegid.c index e6da2573..7a9ea395 100644 --- a/src/unistd/setegid.c +++ b/src/unistd/setegid.c @@ -6,3 +6,11 @@ int setegid(gid_t egid) { return __setxid(SYS_setresgid, -1, egid, -1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/seteuid.c b/src/unistd/seteuid.c index ef8b9df4..ebc05dd4 100644 --- a/src/unistd/seteuid.c +++ b/src/unistd/seteuid.c @@ -6,3 +6,11 @@ int seteuid(uid_t euid) { return __setxid(SYS_setresuid, -1, euid, -1); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setgid.c b/src/unistd/setgid.c index bae4616a..7a1d1255 100644 --- a/src/unistd/setgid.c +++ b/src/unistd/setgid.c @@ -6,3 +6,11 @@ int setgid(gid_t gid) { return __setxid(SYS_setgid, gid, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setpgid.c b/src/unistd/setpgid.c index 06160695..b66d171f 100644 --- a/src/unistd/setpgid.c +++ b/src/unistd/setpgid.c @@ -5,3 +5,11 @@ int setpgid(pid_t pid, pid_t pgid) { return syscall(SYS_setpgid, pid, pgid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setpgrp.c b/src/unistd/setpgrp.c index a2a37f65..3a68846e 100644 --- a/src/unistd/setpgrp.c +++ b/src/unistd/setpgrp.c @@ -4,3 +4,11 @@ pid_t setpgrp(void) { return setpgid(0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setregid.c b/src/unistd/setregid.c index f5a8972a..bac7cb8d 100644 --- a/src/unistd/setregid.c +++ b/src/unistd/setregid.c @@ -6,3 +6,11 @@ int setregid(gid_t rgid, gid_t egid) { return __setxid(SYS_setregid, rgid, egid, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setresgid.c b/src/unistd/setresgid.c index b9af540a..c79d31d2 100644 --- a/src/unistd/setresgid.c +++ b/src/unistd/setresgid.c @@ -7,3 +7,11 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid) { return __setxid(SYS_setresgid, rgid, egid, sgid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setresuid.c b/src/unistd/setresuid.c index 83692b4c..ab4a73be 100644 --- a/src/unistd/setresuid.c +++ b/src/unistd/setresuid.c @@ -7,3 +7,11 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid) { return __setxid(SYS_setresuid, ruid, euid, suid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setreuid.c b/src/unistd/setreuid.c index 3fcc59e2..8f3790f4 100644 --- a/src/unistd/setreuid.c +++ b/src/unistd/setreuid.c @@ -6,3 +6,11 @@ int setreuid(uid_t ruid, uid_t euid) { return __setxid(SYS_setreuid, ruid, euid, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setsid.c b/src/unistd/setsid.c index 609bbe4a..5fa87731 100644 --- a/src/unistd/setsid.c +++ b/src/unistd/setsid.c @@ -5,3 +5,11 @@ pid_t setsid(void) { return syscall(SYS_setsid); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setuid.c b/src/unistd/setuid.c index 602ecbbf..4511646d 100644 --- a/src/unistd/setuid.c +++ b/src/unistd/setuid.c @@ -6,3 +6,11 @@ int setuid(uid_t uid) { return __setxid(SYS_setuid, uid, 0, 0); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/setxid.c b/src/unistd/setxid.c index a629ed4b..8f478e46 100644 --- a/src/unistd/setxid.c +++ b/src/unistd/setxid.c @@ -32,3 +32,11 @@ int __setxid(int nr, int id, int eid, int sid) __synccall(do_setxid, &c); return __syscall_ret(c.ret > 0 ? -EAGAIN : c.ret); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/sleep.c b/src/unistd/sleep.c index d6450941..b4d68c63 100644 --- a/src/unistd/sleep.c +++ b/src/unistd/sleep.c @@ -8,3 +8,11 @@ unsigned sleep(unsigned seconds) return tv.tv_sec; return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/symlink.c b/src/unistd/symlink.c index 0973d78a..c8b0e1fa 100644 --- a/src/unistd/symlink.c +++ b/src/unistd/symlink.c @@ -10,3 +10,11 @@ int symlink(const char *existing, const char *new) return syscall(SYS_symlinkat, existing, AT_FDCWD, new); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/symlinkat.c b/src/unistd/symlinkat.c index d1c59b4d..9b81ad90 100644 --- a/src/unistd/symlinkat.c +++ b/src/unistd/symlinkat.c @@ -5,3 +5,11 @@ int symlinkat(const char *existing, int fd, const char *new) { return syscall(SYS_symlinkat, existing, fd, new); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/sync.c b/src/unistd/sync.c index f18765aa..70418d61 100644 --- a/src/unistd/sync.c +++ b/src/unistd/sync.c @@ -5,3 +5,11 @@ void sync(void) { __syscall(SYS_sync); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/tcgetpgrp.c b/src/unistd/tcgetpgrp.c index 50080c7e..1924a406 100644 --- a/src/unistd/tcgetpgrp.c +++ b/src/unistd/tcgetpgrp.c @@ -9,3 +9,11 @@ pid_t tcgetpgrp(int fd) return -1; return pgrp; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/tcsetpgrp.c b/src/unistd/tcsetpgrp.c index 67c38cb4..78941466 100644 --- a/src/unistd/tcsetpgrp.c +++ b/src/unistd/tcsetpgrp.c @@ -7,3 +7,11 @@ int tcsetpgrp(int fd, pid_t pgrp) int pgrp_int = pgrp; return ioctl(fd, TIOCSPGRP, &pgrp_int); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/truncate.c b/src/unistd/truncate.c index 077351e1..8b7c6ffd 100644 --- a/src/unistd/truncate.c +++ b/src/unistd/truncate.c @@ -5,3 +5,11 @@ int truncate(const char *path, off_t length) { return syscall(SYS_truncate, path, __SYSCALL_LL_O(length)); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/ttyname.c b/src/unistd/ttyname.c index 0f3e1141..c196c770 100644 --- a/src/unistd/ttyname.c +++ b/src/unistd/ttyname.c @@ -12,3 +12,11 @@ char *ttyname(int fd) } return buf; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c index 82acb75e..f49d2be9 100644 --- a/src/unistd/ttyname_r.c +++ b/src/unistd/ttyname_r.c @@ -26,3 +26,11 @@ int ttyname_r(int fd, char *name, size_t size) return 0; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/ualarm.c b/src/unistd/ualarm.c index 2985855c..7d654f66 100644 --- a/src/unistd/ualarm.c +++ b/src/unistd/ualarm.c @@ -11,3 +11,11 @@ unsigned ualarm(unsigned value, unsigned interval) setitimer(ITIMER_REAL, &it, &it_old); return it_old.it_value.tv_sec*1000000 + it_old.it_value.tv_usec; } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/unlink.c b/src/unistd/unlink.c index c40c28d5..b9f67b20 100644 --- a/src/unistd/unlink.c +++ b/src/unistd/unlink.c @@ -10,3 +10,11 @@ int unlink(const char *path) return syscall(SYS_unlinkat, AT_FDCWD, path, 0); #endif } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/unlinkat.c b/src/unistd/unlinkat.c index e0e25d22..baa9c81e 100644 --- a/src/unistd/unlinkat.c +++ b/src/unistd/unlinkat.c @@ -5,3 +5,11 @@ int unlinkat(int fd, const char *path, int flag) { return syscall(SYS_unlinkat, fd, path, flag); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/usleep.c b/src/unistd/usleep.c index 6c966526..d9d29481 100644 --- a/src/unistd/usleep.c +++ b/src/unistd/usleep.c @@ -10,3 +10,11 @@ int usleep(unsigned useconds) }; return nanosleep(&tv, &tv); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/write.c b/src/unistd/write.c index 8fd5bc5c..e651905a 100644 --- a/src/unistd/write.c +++ b/src/unistd/write.c @@ -5,3 +5,11 @@ ssize_t write(int fd, const void *buf, size_t count) { return syscall_cp(SYS_write, fd, buf, count); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif diff --git a/src/unistd/writev.c b/src/unistd/writev.c index 5a46c951..973db2ee 100644 --- a/src/unistd/writev.c +++ b/src/unistd/writev.c @@ -5,3 +5,11 @@ ssize_t writev(int fd, const struct iovec *iov, int count) { return syscall_cp(SYS_writev, fd, iov, count); } + + +#ifdef TEST +int +main(void) { + return 0; +} +#endif |