summaryrefslogtreecommitdiff
path: root/src/stdlib/strtol.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-01-30 14:57:46 -0500
committerJakob Kaivo <jkk@ung.org>2024-01-30 14:57:46 -0500
commitcc6e7378d3f5473137e0c46d39173e6f60dcefda (patch)
tree4cd2883ad16fd594b7777b6f3821d5b9177af5c4 /src/stdlib/strtol.c
parent000a7c045c98c30aac86db93f8c9c978e5ca8c59 (diff)
update standards and safety checks
Diffstat (limited to 'src/stdlib/strtol.c')
-rw-r--r--src/stdlib/strtol.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/stdlib/strtol.c b/src/stdlib/strtol.c
index 9b12b0e6..dc2b9d87 100644
--- a/src/stdlib/strtol.c
+++ b/src/stdlib/strtol.c
@@ -1,9 +1,8 @@
-#if 0
-
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
+#include "_stdlib.h"
/** convert string to long integer **/
@@ -13,6 +12,8 @@ long int strtol(const char * restrict nptr, char ** restrict endptr, int base)
long int max = LONG_MAX;
long int min = LONG_MIN;
+ SIGNAL_SAFE(0);
+
#include "_strtoi.h"
return ret;
@@ -47,6 +48,3 @@ RETURN(CONSTANT(LONG_MIN), converted value too small)
RETURN(a TYPE(long int) value, the converted value)
STDC(1)
*/
-
-
-#endif