aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/abs.c8
-rw-r--r--src/stdlib/atof.c8
-rw-r--r--src/stdlib/atoi.c8
-rw-r--r--src/stdlib/atol.c8
-rw-r--r--src/stdlib/atoll.c8
-rw-r--r--src/stdlib/bsearch.c8
-rw-r--r--src/stdlib/div.c8
-rw-r--r--src/stdlib/ecvt.c8
-rw-r--r--src/stdlib/fcvt.c8
-rw-r--r--src/stdlib/gcvt.c8
-rw-r--r--src/stdlib/imaxabs.c8
-rw-r--r--src/stdlib/imaxdiv.c8
-rw-r--r--src/stdlib/labs.c8
-rw-r--r--src/stdlib/ldiv.c8
-rw-r--r--src/stdlib/llabs.c8
-rw-r--r--src/stdlib/lldiv.c8
-rw-r--r--src/stdlib/qsort.c8
-rw-r--r--src/stdlib/qsort_nr.c8
-rw-r--r--src/stdlib/strtod.c8
-rw-r--r--src/stdlib/strtol.c8
-rw-r--r--src/stdlib/wcstod.c8
-rw-r--r--src/stdlib/wcstol.c8
22 files changed, 176 insertions, 0 deletions
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