summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-09-13 16:09:42 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-09-13 16:09:42 +0000
commit4c7710885ea0d4aaf72fb60e7933e1d3f1a2aaf5 (patch)
tree59cc5a75277c6d57b9cce74e5a28c646d1d3e818 /libc
parenta829b9380fbf4d337102c849a30c82814121550d (diff)
Fix a problem reported by Atsushi Nemoto <anemo@mba.ocn.ne.jp>
for environments where long and long long are the same size.
Diffstat (limited to 'libc')
-rw-r--r--libc/stdio/scanf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c
index 9f811968a..d472c2676 100644
--- a/libc/stdio/scanf.c
+++ b/libc/stdio/scanf.c
@@ -29,6 +29,10 @@
* Sep 5, 2003
* Bug fix: store flag wasn't respected if no positional args.
* Implement vs{n}scanf for the non-buffered stdio no-wchar case.
+ *
+ * Sep 13, 2003
+ * Bug fix: Fix a problem reported by Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+ * for environments where long and long long are the same.
*/
@@ -92,7 +96,7 @@ typedef struct {
extern void _store_inttype(void *dest, int desttype, uintmax_t val);
-#ifdef LLONG_MAX
+#if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX)
extern unsigned long long
_stdlib_strto_ll(register const char * __restrict str,
@@ -101,7 +105,7 @@ _stdlib_strto_ll(register const char * __restrict str,
#define STRTOUIM(s,e,b,sf) _stdlib_strto_ll(s,e,b,sf)
#endif
-#else /* LLONG_MAX */
+#else /* defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) */
extern unsigned long
_stdlib_strto_l(register const char * __restrict str,
@@ -111,7 +115,7 @@ _stdlib_strto_l(register const char * __restrict str,
#define STRTOUIM(s,e,b,sf) _stdlib_strto_l(s,e,b,sf)
#endif
-#endif /* LLONG_MAX */
+#endif /* defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) */
#ifndef STRTOUIM
#error STRTOUIM conversion function is undefined!