{str,wcs}to[u]{q,ll}{,_l} completely messed up 64 bit architectures
Andreas Schwab
schwab@suse.de
Wed Jan 3 06:21:00 GMT 2001
On 64 bit architectures the functions strtoq and strtouq are missing, and
the strto[u]ll aliases are wrong. On the other hand, __strtoq_internal
and __strtouq_internal are not used anywhere.
Furthermore, when starting from sysdeps/wordsize-64/strtoul.c we include
sysdeps/wordsize-64/strtol.c indirectly via sysdeps/generic/strtoul.c, but
that gives us strto{ll,q} aliases in strtoul. The same happens for the
*_l functions.
The wcsto* functions have all the same bugs.
Andreas.
2001-01-03 Andreas Schwab <schwab@suse.de>
* sysdeps/generic/strtoll.c: Remove unused __strtoq_internal
alias.
* sysdeps/generic/strtoull.c: Remove unused __strtouq_internal
alias.
* sysdeps/wordsize-64/strtol.c: Add strtoq alias and fix strtoll
alias.
* sysdeps/wordsize-64/strtoul.c: Add strtouq alias and fix
strtoull alias.
* sysdeps/wordsize-64/wcstol.c: Add wcstoq alias and fix wcstoll
alias.
* sysdeps/wordsize-64/wcstoul.c: Add wcstouq alias and fix
wcstoull alias.
* sysdeps/generic/strtoul.c: Make sure we find strtol.c in this
directory.
* sysdeps/generic/strtol_l.c: Likewiese.
* sysdeps/generic/strtoul_l.c: Likewiese.
* sysdeps/generic/wcstoul.c: Likewise, for wcstol.c.
* sysdeps/wordsize-64/strtol_l.c: Fix alias.
* sysdeps/wordsize-64/strtoul_l.c: Likewise.
* sysdeps/wordsize-64/wcstol_l.c: Fix alias.
* sysdeps/wordsize-64/wcstoul_l.c: Likewise.
Index: sysdeps/generic/strtol_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/strtol_l.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/generic/strtol_l.c
--- sysdeps/generic/strtol_l.c 1999/05/25 13:12:12 1.1
+++ sysdeps/generic/strtol_l.c 2001/01/03 11:55:33
@@ -25,4 +25,4 @@
extern long int ____strtol_l_internal (const char *, char **, int, int,
__locale_t);
-#include <strtol.c>
+#include "strtol.c"
Index: sysdeps/generic/strtoll.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/strtoll.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/generic/strtoll.c
--- sysdeps/generic/strtoll.c 1999/05/25 13:11:42 1.1
+++ sysdeps/generic/strtoll.c 2001/01/03 11:55:33
@@ -21,5 +21,4 @@
#include <strtol.c>
-strong_alias (__strtoll_internal, __strtoq_internal)
weak_alias (strtoll, strtoq)
Index: sysdeps/generic/strtoul.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/strtoul.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/generic/strtoul.c
--- sysdeps/generic/strtoul.c 1999/05/25 13:11:30 1.1
+++ sysdeps/generic/strtoul.c 2001/01/03 11:55:33
@@ -18,4 +18,4 @@
#define UNSIGNED 1
-#include <strtol.c>
+#include "strtol.c"
Index: sysdeps/generic/strtoul_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/strtoul_l.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/generic/strtoul_l.c
--- sysdeps/generic/strtoul_l.c 1999/05/25 13:12:08 1.1
+++ sysdeps/generic/strtoul_l.c 2001/01/03 11:55:33
@@ -25,4 +25,4 @@
extern unsigned long int ____strtoul_l_internal (const char *, char **, int,
int, __locale_t);
-#include <strtoul.c>
+#include "strtoul.c"
Index: sysdeps/generic/strtoull.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/strtoull.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/generic/strtoull.c
--- sysdeps/generic/strtoull.c 1999/05/25 13:11:35 1.1
+++ sysdeps/generic/strtoull.c 2001/01/03 11:55:33
@@ -22,6 +22,5 @@
#include <strtoul.c>
#ifdef _LIBC
-strong_alias (__strtoull_internal, __strtouq_internal)
weak_alias (strtoull, strtouq)
#endif
Index: sysdeps/generic/wcstol_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/wcstol_l.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/generic/wcstol_l.c
--- sysdeps/generic/wcstol_l.c 1999/05/25 14:43:19 1.1
+++ sysdeps/generic/wcstol_l.c 2001/01/03 11:55:33
@@ -27,4 +27,4 @@
extern long int ____wcstol_l_internal (const wchar_t *, wchar_t **, int, int,
__locale_t);
-#include <wcstol.c>
+#include "wcstol.c"
Index: sysdeps/wordsize-64/strtol.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/strtol.c
--- sysdeps/wordsize-64/strtol.c 1999/05/25 13:20:31 1.1
+++ sysdeps/wordsize-64/strtol.c 2001/01/03 11:55:44
@@ -1,10 +1,13 @@
/* We have to irritate the compiler a bit. */
#define __strtoll_internal __strtoll_internal_XXX
#define strtoll strtoll_XXX
+#define strtoq strtoq_XXX
#include <sysdeps/generic/strtol.c>
#undef __strtoll_internal
#undef strtoll
+#undef strtoq
strong_alias (__strtol_internal, __strtoll_internal)
-weak_alias (__strtoll_internal, strtoll)
+weak_alias (strtol, strtoll)
+weak_alias (strtol, strtoq)
Index: sysdeps/wordsize-64/strtol_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/strtol_l.c
--- sysdeps/wordsize-64/strtol_l.c 1999/05/25 13:20:51 1.1
+++ sysdeps/wordsize-64/strtol_l.c 2001/01/03 11:55:44
@@ -7,4 +7,4 @@
#undef ____strtoll_l_internal
#undef __strtoll_l
strong_alias (____strtol_l_internal, ____strtoll_l_internal)
-weak_alias (____strtoll_l_internal, __strtoll_l)
+weak_alias (__strtol_l, __strtoll_l)
Index: sysdeps/wordsize-64/strtoul.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtoul.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/strtoul.c
--- sysdeps/wordsize-64/strtoul.c 1999/05/25 13:20:36 1.1
+++ sysdeps/wordsize-64/strtoul.c 2001/01/03 11:55:44
@@ -1,10 +1,13 @@
/* We have to irritate the compiler a bit. */
#define __strtoull_internal __strtoull_internal_XXX
#define strtoull strtoull_XXX
+#define strtouq strtouq_XXX
#include <sysdeps/generic/strtoul.c>
#undef __strtoull_internal
#undef strtoull
+#undef strtouq
strong_alias (__strtoul_internal, __strtoull_internal)
-weak_alias (__strtoull_internal, strtoull)
+weak_alias (strtoul, strtoull)
+weak_alias (strtoul, strtouq)
Index: sysdeps/wordsize-64/strtoul_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtoul_l.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/strtoul_l.c
--- sysdeps/wordsize-64/strtoul_l.c 1999/05/25 13:20:45 1.1
+++ sysdeps/wordsize-64/strtoul_l.c 2001/01/03 11:55:44
@@ -7,4 +7,4 @@
#undef ____strtoull_l_internal
#undef __strtoull_l
strong_alias (____strtoul_l_internal, ____strtoull_l_internal)
-weak_alias (____strtoull_l_internal, __strtoull_l)
+weak_alias (__strtoul_l, __strtoull_l)
Index: sysdeps/wordsize-64/wcstol.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/wcstol.c
--- sysdeps/wordsize-64/wcstol.c 1999/05/25 14:52:52 1.1
+++ sysdeps/wordsize-64/wcstol.c 2001/01/03 11:55:44
@@ -1,10 +1,13 @@
/* We have to irritate the compiler a bit. */
#define __wcstoll_internal __wcstoll_internal_XXX
#define wcstoll wcstoll_XXX
+#define wcstoq wcstoq_XXX
#include <sysdeps/generic/wcstol.c>
#undef __wcstoll_internal
#undef wcstoll
+#undef wcstoq
strong_alias (__wcstol_internal, __wcstoll_internal)
-weak_alias (__wcstoll_internal, wcstoll)
+weak_alias (wcstol, wcstoll)
+weak_alias (wcstol, wcstoq)
Index: sysdeps/wordsize-64/wcstol_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/wcstol_l.c
--- sysdeps/wordsize-64/wcstol_l.c 1999/05/25 14:51:42 1.1
+++ sysdeps/wordsize-64/wcstol_l.c 2001/01/03 11:55:44
@@ -7,4 +7,4 @@
#undef ____wcstoll_l_internal
#undef __wcstoll_l
strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
-weak_alias (____wcstoll_l_internal, __wcstoll_l)
+weak_alias (__wcstol_l, __wcstoll_l)
Index: sysdeps/wordsize-64/wcstoul.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstoul.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/wcstoul.c
--- sysdeps/wordsize-64/wcstoul.c 1999/05/25 14:52:57 1.1
+++ sysdeps/wordsize-64/wcstoul.c 2001/01/03 11:55:44
@@ -1,10 +1,13 @@
/* We have to irritate the compiler a bit. */
#define __wcstoull_internal __wcstoull_internal_XXX
#define wcstoull wcstoull_XXX
+#define wcstouq wcstouq_XXX
#include <sysdeps/generic/wcstoul.c>
#undef __wcstoull_internal
#undef wcstoull
+#undef wcstouq
strong_alias (__wcstoul_internal, __wcstoull_internal)
-weak_alias (__wcstoull_internal, wcstoull)
+weak_alias (wcstoul, wcstoull)
+weak_alias (wcstoul, wcstouq)
Index: sysdeps/wordsize-64/wcstoul_l.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstoul_l.c,v
retrieving revision 1.1
diff -u -a -r1.1 sysdeps/wordsize-64/wcstoul_l.c
--- sysdeps/wordsize-64/wcstoul_l.c 1999/05/25 14:51:36 1.1
+++ sysdeps/wordsize-64/wcstoul_l.c 2001/01/03 11:55:44
@@ -7,4 +7,4 @@
#undef ____wcstoull_l_internal
#undef __wcstoull_l
strong_alias (____wcstoul_l_internal, ____wcstoull_l_internal)
-weak_alias (____wcstoull_l_internal, __wcstoull_l)
+weak_alias (__wcstoul_l, __wcstoull_l)
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
More information about the Libc-hacker
mailing list