diff options
-rw-r--r-- | src/inttypes/imaxabs.c | 3 | ||||
-rw-r--r-- | src/inttypes/imaxdiv.c | 3 | ||||
-rw-r--r-- | src/inttypes/strtoimax.c | 3 | ||||
-rw-r--r-- | src/inttypes/strtoumax.c | 4 | ||||
-rw-r--r-- | src/inttypes/wcstoimax.c | 3 | ||||
-rw-r--r-- | src/inttypes/wcstoumax.c | 3 |
6 files changed, 12 insertions, 7 deletions
diff --git a/src/inttypes/imaxabs.c b/src/inttypes/imaxabs.c index 28f82987..ca1d93c4 100644 --- a/src/inttypes/imaxabs.c +++ b/src/inttypes/imaxabs.c @@ -1,6 +1,5 @@ #include <inttypes.h> #include "_safety.h" -#undef imaxabs /** absolute value **/ @@ -16,6 +15,8 @@ intmax_t imaxabs(intmax_t j) return j < 0 ? -j : j; } +__check_1(intmax_t, 0, imaxabs, intmax_t) + /*** computes the absolute value of ARGUMENT(j). ***/ diff --git a/src/inttypes/imaxdiv.c b/src/inttypes/imaxdiv.c index 4c1c7a70..16f19c48 100644 --- a/src/inttypes/imaxdiv.c +++ b/src/inttypes/imaxdiv.c @@ -1,6 +1,5 @@ #include <inttypes.h> #include "_safety.h" -#undef imaxdiv /** calculate quotient and remainder **/ @@ -14,6 +13,8 @@ imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom) return r; } +__check_2(imaxdiv_t, {0}, imaxdiv, intmax_t, intmax_t) + /*** computes both the quotient and remainder of ARGUMENT(numer) divided by ARGUMENT(denom). diff --git a/src/inttypes/strtoimax.c b/src/inttypes/strtoimax.c index 4d66558b..2185f293 100644 --- a/src/inttypes/strtoimax.c +++ b/src/inttypes/strtoimax.c @@ -3,7 +3,6 @@ #include <errno.h> #include <inttypes.h> #include "_safety.h" -#undef strtoimax intmax_t strtoimax(const char * restrict nptr, char ** restrict endptr, int base) { @@ -18,6 +17,8 @@ intmax_t strtoimax(const char * restrict nptr, char ** restrict endptr, int base return ret; } +__check_3(intmax_t, 0, strtoimax, const char * restrict, char ** restrict, int) + /* STDC(199901) */ diff --git a/src/inttypes/strtoumax.c b/src/inttypes/strtoumax.c index 28fce88b..2889f109 100644 --- a/src/inttypes/strtoumax.c +++ b/src/inttypes/strtoumax.c @@ -4,8 +4,6 @@ #include <inttypes.h> #include "_safety.h" -#undef strtoumax - uintmax_t strtoumax(const char *restrict nptr, char ** restrict endptr, int base) { SIGNAL_SAFE(0); @@ -19,6 +17,8 @@ uintmax_t strtoumax(const char *restrict nptr, char ** restrict endptr, int base return ret; } +__check_3(uintmax_t, 0, strtoumax, const char *restrict, char ** restrict, int) + /* STDC(199901) */ diff --git a/src/inttypes/wcstoimax.c b/src/inttypes/wcstoimax.c index 98c1636e..d49bf663 100644 --- a/src/inttypes/wcstoimax.c +++ b/src/inttypes/wcstoimax.c @@ -3,7 +3,6 @@ #include <inttypes.h> #include <wctype.h> #include "_safety.h" -#undef wcstoimax #define isspace iswspace @@ -20,6 +19,8 @@ intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, in return ret; } +__check_3(intmax_t, 0, wcstoimax, const wchar_t * restrict, wchar_t **restrict, int) + /* STDC(199901) */ diff --git a/src/inttypes/wcstoumax.c b/src/inttypes/wcstoumax.c index 57140024..de1f1058 100644 --- a/src/inttypes/wcstoumax.c +++ b/src/inttypes/wcstoumax.c @@ -3,7 +3,6 @@ #include <inttypes.h> #include <wctype.h> #include "_safety.h" -#undef wcstoumax #define isspace iswspace @@ -20,6 +19,8 @@ uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, i return ret; } +__check_3(uintmax_t, 0, wcstoumax, const wchar_t * restrict, wchar_t ** restrict, int) + /* STDC(199901) */ |