Add definition of strtoimax and strtoumax plus needed declarations.
authordrepper <drepper>
Sun, 12 Oct 1997 04:04:48 +0000 (04:04 +0000)
committerdrepper <drepper>
Sun, 12 Oct 1997 04:04:48 +0000 (04:04 +0000)
sysdeps/wordsize-32/inttypes.h
sysdeps/wordsize-64/inttypes.h

index a5ff12e..c0582c1 100644 (file)
@@ -341,4 +341,33 @@ typedef unsigned long long int uint_fast64_t;
 #define SCNoPTR                "o"
 #define SCNxPTR                "x"
 
+
+/* Macros for string conversion.  */
+
+/* Like `strtol' but convert to `intmax_t'.  */
+#define strtoimax(nptr, endptr, base) \
+    __strtoll_internal (nptr, endptr, base, 0)
+
+#ifndef __strtoll_internal_defined
+extern long long int __strtoll_internal __P ((__const char *__restrict __nptr,
+                                             char **__restrict __endptr,
+                                             int __base, int __group));
+# define __strtoll_internal_defined    1
+#endif
+
+
+/* Like `strtoul' but convert to `uintmax_t'.  */
+#define strtoumax(nptr, endptr, base) \
+    __strtoull_internal (nptr, endptr, base, 0)
+
+#ifndef __strtoull_internal_defined
+extern unsigned long long int __strtoull_internal __P ((__const char *
+                                                       __restrict __nptr,
+                                                       char **
+                                                       __restrict __endptr,
+                                                       int __base,
+                                                       int __group));
+# define __strtoull_internal_defined   1
+#endif
+
 #endif /* inttypes.h */
index f1dd2ff..2a26284 100644 (file)
@@ -341,4 +341,31 @@ typedef unsigned long int uint_fast64_t;
 #define SCNoPTR                "lo"
 #define SCNxPTR                "lx"
 
+
+/* Macros for string conversion.  */
+
+/* Like `strtol' but convert to `intmax_t'.  */
+#define strtoimax(nptr, endptr, base) \
+    __strtol_internal (nptr, endptr, base, 0)
+
+#ifndef __strtol_internal_defined
+extern long int __strtol_internal __P ((__const char *__restrict __nptr,
+                                       char **__restrict __endptr,
+                                       int __base, int __group));
+# define __strtol_internal_defined     1
+#endif
+
+
+/* Like `strtoul' but convert to `uintmax_t'.  */
+#define strtoumax(nptr, endptr, base) \
+    __strtoul_internal (nptr, endptr, base, 0)
+
+#ifndef __strtoul_internal_defined
+extern unsigned long int __strtoul_internal __P ((__const char *
+                                                 __restrict __nptr,
+                                                 char **__restrict __endptr,
+                                                 int __base, int __group));
+# define __strtoul_internal_defined    1
+#endif
+
 #endif /* inttypes.h */