This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, hjl/x32/master, updated. glibc-2.15-559-g5724aa9


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/x32/master has been updated
       via  5724aa9cfd1efc2c8dc459b7aeeb22d2540eaf42 (commit)
       via  655f43c5658fc17ec824bc71392ddeab91876ffb (commit)
       via  eb96ffb07d0b1b23ecfaf9520d6757c7dbea0bd1 (commit)
       via  fba2541ee0e2dd86500a9c0ceef905bbe23a512f (commit)
       via  1567f04cfb337ed5f4fbf27562b4ea95e31fdbb2 (commit)
       via  8f47c7e777ea359c2bbf06e9562014c6a6d3b209 (commit)
       via  d1af992d0d8184db0a4d264c00a2720722e1a280 (commit)
       via  114883e00a8aebc3ce48831aa60bef8f963c7e95 (commit)
       via  c135cc1b5f24fab392af069daa637b51621c67ff (commit)
      from  7953534570e86b073fe060f181022025033b714c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5724aa9cfd1efc2c8dc459b7aeeb22d2540eaf42

commit 5724aa9cfd1efc2c8dc459b7aeeb22d2540eaf42
Merge: 655f43c eb96ffb
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 20 18:18:33 2012 -0700

    Merge remote-tracking branch 'origin/master' into hjl/x32/master


http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=655f43c5658fc17ec824bc71392ddeab91876ffb

commit 655f43c5658fc17ec824bc71392ddeab91876ffb
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 20 18:16:23 2012 -0700

    Add some comments to _itowa.h/_itoa.h

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index db5216d..5312715 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,10 @@
 2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* stdio-common/_itowa.h: Update comments.
+	* sysdeps/generic/_itoa.h: Likewise.
+
+2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* debug/backtracesymsfd.c: Include <_itoa.h> instead of
 	<stdio-common/_itoa.h>.
 	* debug/segfault.c: Likewise.
diff --git a/stdio-common/_itowa.h b/stdio-common/_itowa.h
index 9d94ef1..611c4ae 100644
--- a/stdio-common/_itowa.h
+++ b/stdio-common/_itowa.h
@@ -22,10 +22,12 @@
 #include <wchar.h>
 #include <limits.h>
 
-/* Convert VALUE into ASCII in base BASE (2..36).
-   Write backwards starting the character just before BUFLIM.
-   Return the address of the first (left-to-right) character in the number.
-   Use upper case letters iff UPPER_CASE is nonzero.  */
+/* When long long is different from long, by default, _itowa_word is
+   provided to convert long to ASCII and _itowa is provided to convert
+   long long.  A target can define _ITOWA_NEEDED to 0 and define
+   _ITOWA_WORD_TYPE to unsigned long long int to override it so that
+   _itowa_word is changed to convert long long to ASCII and _itowa is
+   mapped to _itowa_word.  */
 
 #ifndef _ITOWA_NEEDED
 # define _ITOWA_NEEDED		(LONG_MAX != LLONG_MAX)
@@ -34,6 +36,12 @@
 # define _ITOWA_WORD_TYPE	unsigned long int
 #endif
 
+
+/* Convert VALUE into ASCII in base BASE (2..36).
+   Write backwards starting the character just before BUFLIM.
+   Return the address of the first (left-to-right) character in the number.
+   Use upper case letters iff UPPER_CASE is nonzero.  */
+
 extern wchar_t *_itowa (unsigned long long int value, wchar_t *buflim,
 			unsigned int base, int upper_case);
 
diff --git a/sysdeps/generic/_itoa.h b/sysdeps/generic/_itoa.h
index 31f2a86..b341577 100644
--- a/sysdeps/generic/_itoa.h
+++ b/sysdeps/generic/_itoa.h
@@ -21,10 +21,12 @@
 
 #include <limits.h>
 
-/* Convert VALUE into ASCII in base BASE (2..36).
-   Write backwards starting the character just before BUFLIM.
-   Return the address of the first (left-to-right) character in the number.
-   Use upper case letters iff UPPER_CASE is nonzero.  */
+/* When long long is different from long, by default, _itoa_word is
+   provided to convert long to ASCII and _itoa is provided to convert
+   long long.  A target can define _ITOA_NEEDED to 0 and define
+   _ITOA_WORD_TYPE to unsigned long long int to override it so that
+   _itoa_word is changed to convert long long to ASCII and _itoa is
+   mapped to _itoa_word.  */
 
 #ifndef _ITOA_NEEDED
 # define _ITOA_NEEDED		(LONG_MAX != LLONG_MAX)
@@ -33,6 +35,12 @@
 # define _ITOA_WORD_TYPE	unsigned long int
 #endif
 
+
+/* Convert VALUE into ASCII in base BASE (2..36).
+   Write backwards starting the character just before BUFLIM.
+   Return the address of the first (left-to-right) character in the number.
+   Use upper case letters iff UPPER_CASE is nonzero.  */
+
 extern char *_itoa (unsigned long long int value, char *buflim,
 		    unsigned int base, int upper_case);
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fba2541ee0e2dd86500a9c0ceef905bbe23a512f

commit fba2541ee0e2dd86500a9c0ceef905bbe23a512f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 20 14:21:43 2012 -0700

    Use _ITO{W}A_NEEDED and _ITO{W}A_WORD_TYPE
    
    2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
    
    	* debug/backtracesymsfd.c: Include <_itoa.h> instead of
    	<stdio-common/_itoa.h>.
    	* debug/segfault.c: Likewise.
    	* elf/dl-cache.c: Likewise.
    	* elf/dl-minimal.c: Likewise.
    	* elf/dl-misc.c: Likewise.
    	* elf/dl-sysdep.c: Likewise.
    	* elf/dl-version.c: Likewise.
    	* elf/rtld.c: Likewise.
    	* hurd/hurdsock.c: Likewise.
    	* hurd/lookup-retry.c: Likewise.
    	* malloc/malloc.c: Likewise.
    	* malloc/mtrace.c: Likewise.
    	* nscd/nscd_getgr_r.c: Likewise.
    	* nscd/nscd_getpw_r.c: Likewise.
    	* nscd/nscd_getserv_r.c: Likewise.
    	* posix/getopt_init.c: Likewise.
    	* posix/wordexp.c: Likewise.
    	* stdio-common/_itoa.c: Likewise.
    	* stdio-common/printf_fphex.c: Likewise.
    	* stdio-common/vfprintf.c: Likewise.
    	* string/_strerror.c: Likewise.
    	* sysdeps/generic/elf/backtracesymsfd.c: Likewise.
    	* sysdeps/i386/i686/hp-timing.h: Likewise.
    	* sysdeps/mach/_strerror.c: Likewise.
    	* sysdeps/mach/hurd/powerpc/register-dump.h: Likewise.
    	* sysdeps/mach/hurd/sethostid.c: Likewise.
    	* sysdeps/mach/hurd/xmknodat.c: Likewise.
    	* sysdeps/mach/xpg-strerror.c: Likewise.
    	* sysdeps/powerpc/powerpc32/dl-machine.c: Likewise.
    	* sysdeps/powerpc/powerpc32/power4/hp-timing.h: Likewise.
    	* sysdeps/powerpc/powerpc32/register-dump.h: Likewise.
    	* sysdeps/powerpc/powerpc64/dl-machine.c: Likewise.
    	* sysdeps/powerpc/powerpc64/hp-timing.h: Likewise.
    	* sysdeps/powerpc/powerpc64/register-dump.h: Likewise.
    	* sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Likewise.
    	* sysdeps/sparc/sparc64/hp-timing.h: Likewise.
    	* sysdeps/unix/sysv/linux/fd_to_filename.h: Likewise.
    	* sysdeps/unix/sysv/linux/futimes.c: Likewise.
    	* sysdeps/unix/sysv/linux/i386/register-dump.h: Likewise.
    	* sysdeps/unix/sysv/linux/ptsname.c: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h: Likewise.
    	* sysdeps/unix/sysv/linux/sh/sh3/register-dump.h: Likewise.
    	* sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise.
    	* sysdeps/unix/sysv/linux/ttyname.c: Likewise.
    	* sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/register-dump.h: Likewise.
    
    	* stdio-common/_itoa.c: Include <_itoa.h> instead of "_itoa.h".
    	Check _ITOA_NEEDED instead of LLONG_MAX != LONG_MAX.
    	(_itoa_word): Use _ITOA_WORD_TYPE on value.
    	(_fitoa_word): Likewise.
    
    	* stdio-common/_itoa.h: Moved to ...
    	* sysdeps/generic/_itoa.h: Here.
    	(_ITOA_NEEDED): New macro. Defined only if not defined.
    	(_ITOA_WORD_TYPE): Likewise.
    	(_itoa_word): Use _ITOA_WORD_TYPE on value.
    	Check !_ITOA_NEEDED instead of LONG_MAX == LLONG_MAX.
    
    	* stdio-common/_itowa.c: Include <_itowa.h> instead of "_itowa.h".
    	Check _ITOWA_NEEDED instead of LLONG_MAX != LONG_MAX.
    
    	* stdio-common/_itowa.h: Include <limits.h>.
    	(_ITOWA_NEEDED): New macro. Defined only if not defined.
    	(_ITOWA_WORD_TYPE): Likewise.
    	(_itowa_word): Use _ITOA_WORD_TYPE on value.
    	(_itowa): New macro.  Defined only if _ITOWA_NEEDED is false.
    
    	* stdio-common/printf_fphex.c: Include <_itoa.h> and <_itowa.h>
    	instead of "_itoa.h" and "_itowa.h".
    	* stdio-common/vfprintf.: Likewise.
    
    	* sysdeps/x86_64/x32/gmp-mparam.h (PREFER_LONG_LONG): Removed.
    
    	* sysdeps/x86_64/x32/_itoa.h: New file.
    	* sysdeps/x86_64/x32/_itowa.h: Likewise.

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 2191d87..db5216d 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,88 @@
 2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* debug/backtracesymsfd.c: Include <_itoa.h> instead of
+	<stdio-common/_itoa.h>.
+	* debug/segfault.c: Likewise.
+	* elf/dl-cache.c: Likewise.
+	* elf/dl-minimal.c: Likewise.
+	* elf/dl-misc.c: Likewise.
+	* elf/dl-sysdep.c: Likewise.
+	* elf/dl-version.c: Likewise.
+	* elf/rtld.c: Likewise.
+	* hurd/hurdsock.c: Likewise.
+	* hurd/lookup-retry.c: Likewise.
+	* malloc/malloc.c: Likewise.
+	* malloc/mtrace.c: Likewise.
+	* nscd/nscd_getgr_r.c: Likewise.
+	* nscd/nscd_getpw_r.c: Likewise.
+	* nscd/nscd_getserv_r.c: Likewise.
+	* posix/getopt_init.c: Likewise.
+	* posix/wordexp.c: Likewise.
+	* stdio-common/_itoa.c: Likewise.
+	* stdio-common/printf_fphex.c: Likewise.
+	* stdio-common/vfprintf.c: Likewise.
+	* string/_strerror.c: Likewise.
+	* sysdeps/generic/elf/backtracesymsfd.c: Likewise.
+	* sysdeps/i386/i686/hp-timing.h: Likewise.
+	* sysdeps/mach/_strerror.c: Likewise.
+	* sysdeps/mach/hurd/powerpc/register-dump.h: Likewise.
+	* sysdeps/mach/hurd/sethostid.c: Likewise.
+	* sysdeps/mach/hurd/xmknodat.c: Likewise.
+	* sysdeps/mach/xpg-strerror.c: Likewise.
+	* sysdeps/powerpc/powerpc32/dl-machine.c: Likewise.
+	* sysdeps/powerpc/powerpc32/power4/hp-timing.h: Likewise.
+	* sysdeps/powerpc/powerpc32/register-dump.h: Likewise.
+	* sysdeps/powerpc/powerpc64/dl-machine.c: Likewise.
+	* sysdeps/powerpc/powerpc64/hp-timing.h: Likewise.
+	* sysdeps/powerpc/powerpc64/register-dump.h: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Likewise.
+	* sysdeps/sparc/sparc64/hp-timing.h: Likewise.
+	* sysdeps/unix/sysv/linux/fd_to_filename.h: Likewise.
+	* sysdeps/unix/sysv/linux/futimes.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/ptsname.c: Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/sh/sh3/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise.
+	* sysdeps/unix/sysv/linux/ttyname.c: Likewise.
+	* sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/register-dump.h: Likewise.
+
+	* stdio-common/_itoa.c: Include <_itoa.h> instead of "_itoa.h".
+	Check _ITOA_NEEDED instead of LLONG_MAX != LONG_MAX.
+	(_itoa_word): Use _ITOA_WORD_TYPE on value.
+	(_fitoa_word): Likewise.
+
+	* stdio-common/_itoa.h: Moved to ...
+	* sysdeps/generic/_itoa.h: Here.
+	(_ITOA_NEEDED): New macro. Defined only if not defined.
+	(_ITOA_WORD_TYPE): Likewise.
+	(_itoa_word): Use _ITOA_WORD_TYPE on value.
+	Check !_ITOA_NEEDED instead of LONG_MAX == LLONG_MAX.
+
+	* stdio-common/_itowa.c: Include <_itowa.h> instead of "_itowa.h".
+	Check _ITOWA_NEEDED instead of LLONG_MAX != LONG_MAX.
+
+	* stdio-common/_itowa.h: Include <limits.h>.
+	(_ITOWA_NEEDED): New macro. Defined only if not defined.
+	(_ITOWA_WORD_TYPE): Likewise.
+	(_itowa_word): Use _ITOA_WORD_TYPE on value.
+	(_itowa): New macro.  Defined only if _ITOWA_NEEDED is false.
+
+	* stdio-common/printf_fphex.c: Include <_itoa.h> and <_itowa.h>
+	instead of "_itoa.h" and "_itowa.h".
+	* stdio-common/vfprintf.: Likewise.
+
+	* sysdeps/x86_64/x32/gmp-mparam.h (PREFER_LONG_LONG): Removed.
+
+	* sysdeps/x86_64/x32/_itoa.h: New file.
+	* sysdeps/x86_64/x32/_itowa.h: Likewise.
+
+2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/x86_64/bits/setjmp.h: Include <bits/wordsize.h>.
 	(__jmp_buf): Use long long int for x32.
 
diff --git a/debug/backtracesymsfd.c b/debug/backtracesymsfd.c
index fe247d8..2345853 100644
--- a/debug/backtracesymsfd.c
+++ b/debug/backtracesymsfd.c
@@ -21,7 +21,7 @@
 #include <string.h>
 #include <sys/uio.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <not-cancel.h>
 
 #if __ELF_NATIVE_CLASS == 32
diff --git a/debug/segfault.c b/debug/segfault.c
index 18f8115..98886db 100644
--- a/debug/segfault.c
+++ b/debug/segfault.c
@@ -29,7 +29,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <ldsodefs.h>
 
 #include <bp-checks.h>
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 2e6f88b..0357dff 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -24,7 +24,7 @@
 #include <dl-cache.h>
 #include <dl-procinfo.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #ifndef _DL_PLATFORMS_COUNT
 # define _DL_PLATFORMS_COUNT 0
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c
index 3a984af..316de99 100644
--- a/elf/dl-minimal.c
+++ b/elf/dl-minimal.c
@@ -26,7 +26,7 @@
 #include <sys/param.h>
 #include <sys/types.h>
 #include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #include <assert.h>
 
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index 9bf642d..22fbba3 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -30,7 +30,7 @@
 #include <sys/stat.h>
 #include <sys/uio.h>
 #include <sysdep.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <bits/libc-lock.h>
 
 /* Read the whole contents of FILE into new mmap'd space with given
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index 0920cc1..1cb4460 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -29,7 +29,7 @@
 #include <sys/stat.h>
 #include <sys/mman.h>
 #include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <fpu_control.h>
 
 #include <entry.h>
diff --git a/elf/dl-version.c b/elf/dl-version.c
index e314e02..af7f899 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #include <assert.h>
 
diff --git a/elf/rtld.c b/elf/rtld.c
index 3e15447..1cc9cf3 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -27,7 +27,7 @@
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <entry.h>
 #include <fpu_control.h>
 #include <hp-timing.h>
diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c
index 170a3f6..f3611ec 100644
--- a/hurd/hurdsock.c
+++ b/hurd/hurdsock.c
@@ -22,7 +22,7 @@
 #include <string.h>
 #include <hurd/paths.h>
 #include <stdio.h>
-#include "stdio-common/_itoa.h"
+#include <_itoa.h>
 #include <cthreads.h>		/* For `struct mutex'.  */
 #include "hurdmalloc.h"		/* XXX */
 
diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
index c65eb5a..3c506a0 100644
--- a/hurd/lookup-retry.c
+++ b/hurd/lookup-retry.c
@@ -24,7 +24,7 @@
 #include <limits.h>
 #include <fcntl.h>
 #include <string.h>
-#include "stdio-common/_itoa.h"
+#include <_itoa.h>
 
 /* Translate the error from dir_lookup into the error the user sees.  */
 static inline error_t
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 46826ab..0aa2660 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -218,7 +218,7 @@
 #include <malloc-machine.h>
 
 #include <atomic.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <bits/wordsize.h>
 #include <sys/sysinfo.h>
 
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 67e3e44..e299a16 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -31,7 +31,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #include <libc-internal.h>
 
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index ac3d85f..54372e4 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -31,7 +31,7 @@
 #include <sys/uio.h>
 #include <sys/un.h>
 #include <not-cancel.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #include "nscd-client.h"
 #include "nscd_proto.h"
diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c
index 409b672..e405057 100644
--- a/nscd/nscd_getpw_r.c
+++ b/nscd/nscd_getpw_r.c
@@ -30,7 +30,7 @@
 #include <sys/uio.h>
 #include <sys/un.h>
 #include <not-cancel.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #include "nscd-client.h"
 #include "nscd_proto.h"
diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c
index ff85d82..acf7e22 100644
--- a/nscd/nscd_getserv_r.c
+++ b/nscd/nscd_getserv_r.c
@@ -20,7 +20,7 @@
 #include <errno.h>
 #include <string.h>
 #include <not-cancel.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #include "nscd-client.h"
 #include "nscd_proto.h"
diff --git a/posix/getopt_init.c b/posix/getopt_init.c
index 9bcbd9c..55003d4 100644
--- a/posix/getopt_init.c
+++ b/posix/getopt_init.c
@@ -27,7 +27,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* Variable to synchronize work.  */
 char *__getopt_nonoption_flags;
diff --git a/posix/wordexp.c b/posix/wordexp.c
index ece5109..5ace137 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -42,7 +42,7 @@
 #include <kernel-features.h>
 
 #include <bits/libc-lock.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* Undefine the following line for the production version.  */
 /* #define NDEBUG 1 */
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index ba98edb..12d6954 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -25,7 +25,7 @@
 #include <stdlib/gmp-impl.h>
 #include <stdlib/longlong.h>
 
-#include "_itoa.h"
+#include <_itoa.h>
 
 
 /* Canonize environment.  For some architectures not all values might
@@ -79,7 +79,7 @@ struct base_table_t
 
 
 /* We do not compile _itoa if we always can use _itoa_word.  */
-#if LLONG_MAX != LONG_MAX && !defined PREFER_LONG_LONG
+#if _ITOA_NEEDED
 /* Local variables.  */
 const struct base_table_t _itoa_base_table[] attribute_hidden =
 {
@@ -169,7 +169,7 @@ extern const char _itoa_upper_digits_internal[] attribute_hidden;
 
 
 char *
-_itoa_word (unsigned long value, char *buflim,
+_itoa_word (_ITOA_WORD_TYPE value, char *buflim,
 	    unsigned int base, int upper_case)
 {
   const char *digits = (upper_case
@@ -201,9 +201,10 @@ _itoa_word (unsigned long value, char *buflim,
     }
   return buflim;
 }
+#undef SPECIAL
 
 
-#if LLONG_MAX != LONG_MAX
+#if _ITOA_NEEDED
 char *
 _itoa (value, buflim, base, upper_case)
      unsigned long long int value;
@@ -214,31 +215,11 @@ _itoa (value, buflim, base, upper_case)
   const char *digits = (upper_case
 			? INTUSE(_itoa_upper_digits)
 			: INTUSE(_itoa_lower_digits));
-
-# ifdef PREFER_LONG_LONG
-  switch (base)
-    {
-#define SPECIAL(Base)							      \
-    case Base:								      \
-      do								      \
-	*--buflim = digits[value % Base];				      \
-      while ((value /= Base) != 0);					      \
-      break
-
-      SPECIAL (10);
-      SPECIAL (16);
-      SPECIAL (8);
-    default:
-      do
-	*--buflim = digits[value % base];
-      while ((value /= base) != 0);
-    }
-# else
   const struct base_table_t *brec = &_itoa_base_table[base - 2];
 
   switch (base)
     {
-#  define RUN_2N(BITS) \
+# define RUN_2N(BITS) \
       do								      \
         {								      \
 	  /* `unsigned long long int' always has 64 bits.  */		      \
@@ -293,7 +274,7 @@ _itoa (value, buflim, base, upper_case)
     default:
       {
 	char *bufend = buflim;
-#  if BITS_PER_MP_LIMB == 64
+# if BITS_PER_MP_LIMB == 64
 	mp_limb_t base_multiplier = brec->base_multiplier;
 	if (brec->flag)
 	  while (value != 0)
@@ -317,8 +298,8 @@ _itoa (value, buflim, base, upper_case)
 	      *--buflim = digits[rem];
 	      value = quo;
 	    }
-#  endif
-#  if BITS_PER_MP_LIMB == 32
+# endif
+# if BITS_PER_MP_LIMB == 32
 	mp_limb_t t[3];
 	int n;
 
@@ -326,11 +307,11 @@ _itoa (value, buflim, base, upper_case)
 	   Optimize for frequent cases of 32 bit numbers.  */
 	if ((mp_limb_t) (value >> 32) >= 1)
 	  {
-#   if UDIV_TIME > 2 * UMUL_TIME || UDIV_NEEDS_NORMALIZATION
+#  if UDIV_TIME > 2 * UMUL_TIME || UDIV_NEEDS_NORMALIZATION
 	    int big_normalization_steps = brec->big.normalization_steps;
 	    mp_limb_t big_base_norm
 	      = brec->big.base << big_normalization_steps;
-#   endif
+#  endif
 	    if ((mp_limb_t) (value >> 32) >= brec->big.base)
 	      {
 		mp_limb_t x1hi, x1lo, r;
@@ -339,7 +320,7 @@ _itoa (value, buflim, base, upper_case)
 		   always be very small.  It might be faster just to
 		   subtract in a tight loop.  */
 
-#   if UDIV_TIME > 2 * UMUL_TIME
+#  if UDIV_TIME > 2 * UMUL_TIME
 		mp_limb_t x, xh, xl;
 
 		if (big_normalization_steps == 0)
@@ -364,7 +345,7 @@ _itoa (value, buflim, base, upper_case)
 		udiv_qrnnd_preinv (t[0], x, xh, xl, big_base_norm,
 				   brec->big.base_ninv);
 		t[1] = x >> big_normalization_steps;
-#   elif UDIV_NEEDS_NORMALIZATION
+#  elif UDIV_NEEDS_NORMALIZATION
 		mp_limb_t x, xh, xl;
 
 		if (big_normalization_steps == 0)
@@ -386,17 +367,17 @@ _itoa (value, buflim, base, upper_case)
 		xl = x1lo << big_normalization_steps;
 		udiv_qrnnd (t[0], x, xh, xl, big_base_norm);
 		t[1] = x >> big_normalization_steps;
-#   else
+#  else
 		udiv_qrnnd (x1hi, r, 0, (mp_limb_t) (value >> 32),
 			    brec->big.base);
 		udiv_qrnnd (x1lo, t[2], r, (mp_limb_t) value, brec->big.base);
 		udiv_qrnnd (t[0], t[1], x1hi, x1lo, brec->big.base);
-#   endif
+#  endif
 		n = 3;
 	      }
 	    else
 	      {
-#   if UDIV_TIME > 2 * UMUL_TIME
+#  if UDIV_TIME > 2 * UMUL_TIME
 		mp_limb_t x;
 
 		value <<= brec->big.normalization_steps;
@@ -404,17 +385,17 @@ _itoa (value, buflim, base, upper_case)
 				   (mp_limb_t) value, big_base_norm,
 				   brec->big.base_ninv);
 		t[1] = x >> brec->big.normalization_steps;
-#   elif UDIV_NEEDS_NORMALIZATION
+#  elif UDIV_NEEDS_NORMALIZATION
 		mp_limb_t x;
 
 		value <<= big_normalization_steps;
 		udiv_qrnnd (t[0], x, (mp_limb_t) (value >> 32),
 			    (mp_limb_t) value, big_base_norm);
 		t[1] = x >> big_normalization_steps;
-#   else
+#  else
 		udiv_qrnnd (t[0], t[1], (mp_limb_t) (value >> 32),
 			    (mp_limb_t) value, brec->big.base);
-#   endif
+#  endif
 		n = 2;
 	      }
 	  }
@@ -430,7 +411,7 @@ _itoa (value, buflim, base, upper_case)
 	    mp_limb_t ti = t[--n];
 	    int ndig_for_this_limb = 0;
 
-#   if UDIV_TIME > 2 * UMUL_TIME
+#  if UDIV_TIME > 2 * UMUL_TIME
 	    mp_limb_t base_multiplier = brec->base_multiplier;
 	    if (brec->flag)
 	      while (ti != 0)
@@ -456,7 +437,7 @@ _itoa (value, buflim, base, upper_case)
 		  ti = quo;
 		  ++ndig_for_this_limb;
 		}
-#   else
+#  else
 	    while (ti != 0)
 	      {
 		mp_limb_t quo, rem;
@@ -467,7 +448,7 @@ _itoa (value, buflim, base, upper_case)
 		ti = quo;
 		++ndig_for_this_limb;
 	      }
-#   endif
+#  endif
 	    /* If this wasn't the most significant word, pad with zeros.  */
 	    if (n != 0)
 	      while (ndig_for_this_limb < brec->big.ndigits)
@@ -477,22 +458,20 @@ _itoa (value, buflim, base, upper_case)
 		}
 	  }
 	while (n != 0);
-#  endif
+# endif
 	if (buflim == bufend)
 	  *--buflim = '0';
       }
       break;
     }
-# endif /* PREFER_LONG_LONG */
 
   return buflim;
 }
 #endif
 
-#undef SPECIAL
-
 char *
-_fitoa_word (unsigned long value, char *buf, unsigned int base, int upper_case)
+_fitoa_word (_ITOA_WORD_TYPE value, char *buf, unsigned int base,
+	     int upper_case)
 {
   char tmpbuf[sizeof (value) * 4];	      /* Worst case length: base 2.  */
   char *cp = _itoa_word (value, tmpbuf + sizeof (value) * 4, base, upper_case);
@@ -501,7 +480,7 @@ _fitoa_word (unsigned long value, char *buf, unsigned int base, int upper_case)
   return buf;
 }
 
-#if LLONG_MAX != LONG_MAX
+#if _ITOA_NEEDED
 char *
 _fitoa (unsigned long long value, char *buf, unsigned int base, int upper_case)
 {
diff --git a/stdio-common/_itowa.c b/stdio-common/_itowa.c
index b0a28ac..99ac3a3 100644
--- a/stdio-common/_itowa.c
+++ b/stdio-common/_itowa.c
@@ -24,7 +24,7 @@
 #include <stdlib/gmp-impl.h>
 #include <stdlib/longlong.h>
 
-#include "_itowa.h"
+#include <_itowa.h>
 
 
 /* Canonize environment.  For some architectures not all values might
@@ -85,7 +85,7 @@ extern const wchar_t _itowa_lower_digits[] attribute_hidden;
 extern const wchar_t _itowa_upper_digits[] attribute_hidden;
 
 
-#if LLONG_MAX != LONG_MAX
+#if _ITOWA_NEEDED
 wchar_t *
 _itowa (value, buflim, base, upper_case)
      unsigned long long int value;
@@ -96,32 +96,11 @@ _itowa (value, buflim, base, upper_case)
   const wchar_t *digits = (upper_case
 			   ? _itowa_upper_digits : _itowa_lower_digits);
   wchar_t *bp = buflim;
-
-# ifdef PREFER_LONG_LONG
-  switch (base)
-    {
-#  define SPECIAL(Base)							      \
-    case Base:								      \
-      do								      \
-	*--bp = digits[value % Base];					      \
-      while ((value /= Base) != 0);					      \
-      break
-
-      SPECIAL (10);
-      SPECIAL (16);
-      SPECIAL (8);
-    default:
-      do
-	*--bp = digits[value % base];
-      while ((value /= base) != 0);
-    }
-#  undef SPECIAL
-# else
   const struct base_table_t *brec = &_itoa_base_table[base - 2];
 
   switch (base)
     {
-#  define RUN_2N(BITS) \
+# define RUN_2N(BITS) \
       do								      \
         {								      \
 	  /* `unsigned long long int' always has 64 bits.  */		      \
@@ -175,7 +154,7 @@ _itowa (value, buflim, base, upper_case)
 
     default:
       {
-#  if BITS_PER_MP_LIMB == 64
+# if BITS_PER_MP_LIMB == 64
 	mp_limb_t base_multiplier = brec->base_multiplier;
 	if (brec->flag)
 	  while (value != 0)
@@ -199,8 +178,8 @@ _itowa (value, buflim, base, upper_case)
 	      *--bp = digits[rem];
 	      value = quo;
 	    }
-#  endif
-#  if BITS_PER_MP_LIMB == 32
+# endif
+# if BITS_PER_MP_LIMB == 32
 	mp_limb_t t[3];
 	int n;
 
@@ -208,11 +187,11 @@ _itowa (value, buflim, base, upper_case)
 	   Optimize for frequent cases of 32 bit numbers.  */
 	if ((mp_limb_t) (value >> 32) >= 1)
 	  {
-#  if UDIV_TIME > 2 * UMUL_TIME || UDIV_NEEDS_NORMALIZATION
+# if UDIV_TIME > 2 * UMUL_TIME || UDIV_NEEDS_NORMALIZATION
 	    int big_normalization_steps = brec->big.normalization_steps;
 	    mp_limb_t big_base_norm
 	      = brec->big.base << big_normalization_steps;
-#  endif
+# endif
 	    if ((mp_limb_t) (value >> 32) >= brec->big.base)
 	      {
 		mp_limb_t x1hi, x1lo, r;
@@ -221,7 +200,7 @@ _itowa (value, buflim, base, upper_case)
 		   always be very small.  It might be faster just to
 		   subtract in a tight loop.  */
 
-#  if UDIV_TIME > 2 * UMUL_TIME
+# if UDIV_TIME > 2 * UMUL_TIME
 		mp_limb_t x, xh, xl;
 
 		if (big_normalization_steps == 0)
@@ -246,7 +225,7 @@ _itowa (value, buflim, base, upper_case)
 		udiv_qrnnd_preinv (t[0], x, xh, xl, big_base_norm,
 				   brec->big.base_ninv);
 		t[1] = x >> big_normalization_steps;
-#  elif UDIV_NEEDS_NORMALIZATION
+# elif UDIV_NEEDS_NORMALIZATION
 		mp_limb_t x, xh, xl;
 
 		if (big_normalization_steps == 0)
@@ -268,17 +247,17 @@ _itowa (value, buflim, base, upper_case)
 		xl = x1lo << big_normalization_steps;
 		udiv_qrnnd (t[0], x, xh, xl, big_base_norm);
 		t[1] = x >> big_normalization_steps;
-#  else
+# else
 		udiv_qrnnd (x1hi, r, 0, (mp_limb_t) (value >> 32),
 			    brec->big.base);
 		udiv_qrnnd (x1lo, t[2], r, (mp_limb_t) value, brec->big.base);
 		udiv_qrnnd (t[0], t[1], x1hi, x1lo, brec->big.base);
-#  endif
+# endif
 		n = 3;
 	      }
 	    else
 	      {
-#  if UDIV_TIME > 2 * UMUL_TIME
+# if UDIV_TIME > 2 * UMUL_TIME
 		mp_limb_t x;
 
 		value <<= brec->big.normalization_steps;
@@ -286,17 +265,17 @@ _itowa (value, buflim, base, upper_case)
 				   (mp_limb_t) value, big_base_norm,
 				   brec->big.base_ninv);
 		t[1] = x >> brec->big.normalization_steps;
-#  elif UDIV_NEEDS_NORMALIZATION
+# elif UDIV_NEEDS_NORMALIZATION
 		mp_limb_t x;
 
 		value <<= big_normalization_steps;
 		udiv_qrnnd (t[0], x, (mp_limb_t) (value >> 32),
 			    (mp_limb_t) value, big_base_norm);
 		t[1] = x >> big_normalization_steps;
-#  else
+# else
 		udiv_qrnnd (t[0], t[1], (mp_limb_t) (value >> 32),
 			    (mp_limb_t) value, brec->big.base);
-#  endif
+# endif
 		n = 2;
 	      }
 	  }
@@ -312,7 +291,7 @@ _itowa (value, buflim, base, upper_case)
 	    mp_limb_t ti = t[--n];
 	    int ndig_for_this_limb = 0;
 
-#  if UDIV_TIME > 2 * UMUL_TIME
+# if UDIV_TIME > 2 * UMUL_TIME
 	    mp_limb_t base_multiplier = brec->base_multiplier;
 	    if (brec->flag)
 	      while (ti != 0)
@@ -338,7 +317,7 @@ _itowa (value, buflim, base, upper_case)
 		  ti = quo;
 		  ++ndig_for_this_limb;
 		}
-#  else
+# else
 	    while (ti != 0)
 	      {
 		mp_limb_t quo, rem;
@@ -349,7 +328,7 @@ _itowa (value, buflim, base, upper_case)
 		ti = quo;
 		++ndig_for_this_limb;
 	      }
-#  endif
+# endif
 	    /* If this wasn't the most significant word, pad with zeros.  */
 	    if (n != 0)
 	      while (ndig_for_this_limb < brec->big.ndigits)
@@ -359,11 +338,10 @@ _itowa (value, buflim, base, upper_case)
 		}
 	  }
 	while (n != 0);
-#  endif
+# endif
       }
       break;
     }
-# endif /* PREFER_LONG_LONG */
 
   return bp;
 }
diff --git a/stdio-common/_itowa.h b/stdio-common/_itowa.h
index 0f33311..9d94ef1 100644
--- a/stdio-common/_itowa.h
+++ b/stdio-common/_itowa.h
@@ -20,18 +20,26 @@
 #define _ITOWA_H	1
 #include <features.h>
 #include <wchar.h>
+#include <limits.h>
 
 /* Convert VALUE into ASCII in base BASE (2..36).
    Write backwards starting the character just before BUFLIM.
    Return the address of the first (left-to-right) character in the number.
    Use upper case letters iff UPPER_CASE is nonzero.  */
 
+#ifndef _ITOWA_NEEDED
+# define _ITOWA_NEEDED		(LONG_MAX != LLONG_MAX)
+#endif
+#ifndef _ITOWA_WORD_TYPE
+# define _ITOWA_WORD_TYPE	unsigned long int
+#endif
+
 extern wchar_t *_itowa (unsigned long long int value, wchar_t *buflim,
 			unsigned int base, int upper_case);
 
 static inline wchar_t *
 __attribute__ ((unused, always_inline))
-_itowa_word (unsigned long value, wchar_t *buflim,
+_itowa_word (_ITOWA_WORD_TYPE value, wchar_t *buflim,
 	     unsigned int base, int upper_case)
 {
   extern const wchar_t _itowa_upper_digits[] attribute_hidden;
@@ -61,4 +69,10 @@ _itowa_word (unsigned long value, wchar_t *buflim,
 }
 #undef SPECIAL
 
+#if !_ITOWA_NEEDED
+/* No need for special long long versions.  */
+# define _itowa(value, buf, base, upper_case) \
+  _itowa_word (value, buf, base, upper_case)
+#endif
+
 #endif	/* itowa.h */
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index 01142f9..97ed83b 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -25,8 +25,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <wchar.h>
-#include "_itoa.h"
-#include "_itowa.h"
+#include <_itoa.h>
+#include <_itowa.h>
 #include <locale/localeinfo.h>
 
 /* #define NDEBUG 1*/		/* Undefine this for debugging assertions.  */
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index e454927..1e90483 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -26,7 +26,7 @@
 #include <wchar.h>
 #include <bits/libc-lock.h>
 #include <sys/param.h>
-#include "_itoa.h"
+#include <_itoa.h>
 #include <locale/localeinfo.h>
 #include <stdio.h>
 
@@ -102,7 +102,7 @@
 # define ISDIGIT(Ch)	((unsigned int) ((Ch) - L'0') < 10)
 # define STR_LEN(Str)	__wcslen (Str)
 
-# include "_itowa.h"
+# include <_itowa.h>
 
 # define PUT(F, S, N)	_IO_sputn ((F), (S), (N))
 # define PAD(Padchar) \
diff --git a/string/_strerror.c b/string/_strerror.c
index 8754079..6af6226 100644
--- a/string/_strerror.c
+++ b/string/_strerror.c
@@ -22,7 +22,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* It is critical here that we always use the `dcgettext' function for
    the message translation.  Since <libintl.h> only defines the macro
diff --git a/stdio-common/_itoa.h b/sysdeps/generic/_itoa.h
similarity index 88%
rename from stdio-common/_itoa.h
rename to sysdeps/generic/_itoa.h
index 8870ee0..31f2a86 100644
--- a/stdio-common/_itoa.h
+++ b/sysdeps/generic/_itoa.h
@@ -26,6 +26,13 @@
    Return the address of the first (left-to-right) character in the number.
    Use upper case letters iff UPPER_CASE is nonzero.  */
 
+#ifndef _ITOA_NEEDED
+# define _ITOA_NEEDED		(LONG_MAX != LLONG_MAX)
+#endif
+#ifndef _ITOA_WORD_TYPE
+# define _ITOA_WORD_TYPE	unsigned long int
+#endif
+
 extern char *_itoa (unsigned long long int value, char *buflim,
 		    unsigned int base, int upper_case);
 
@@ -35,11 +42,11 @@ extern const char _itoa_lower_digits[];
 extern const char _itoa_lower_digits_internal[] attribute_hidden;
 
 #ifndef NOT_IN_libc
-extern char *_itoa_word (unsigned long value, char *buflim,
+extern char *_itoa_word (_ITOA_WORD_TYPE value, char *buflim,
 			 unsigned int base, int upper_case);
 #else
 static inline char * __attribute__ ((unused, always_inline))
-_itoa_word (unsigned long value, char *buflim,
+_itoa_word (_ITOA_WORD_TYPE value, char *buflim,
 	    unsigned int base, int upper_case)
 {
   const char *digits = (upper_case
@@ -76,12 +83,13 @@ _itoa_word (unsigned long value, char *buflim,
 
 /* Similar to the _itoa functions, but output starts at buf and pointer
    after the last written character is returned.  */
-extern char *_fitoa_word (unsigned long value, char *buf, unsigned int base,
+extern char *_fitoa_word (_ITOA_WORD_TYPE value, char *buf,
+			  unsigned int base,
 			  int upper_case) attribute_hidden;
 extern char *_fitoa (unsigned long long value, char *buf, unsigned int base,
 		     int upper_case) attribute_hidden;
 
-#if LONG_MAX == LLONG_MAX
+#if !_ITOA_NEEDED
 /* No need for special long long versions.  */
 # define _itoa(value, buf, base, upper_case) \
   _itoa_word (value, buf, base, upper_case)
diff --git a/sysdeps/generic/elf/backtracesymsfd.c b/sysdeps/generic/elf/backtracesymsfd.c
index 8b4a836..3562c50 100644
--- a/sysdeps/generic/elf/backtracesymsfd.c
+++ b/sysdeps/generic/elf/backtracesymsfd.c
@@ -21,7 +21,7 @@
 #include <string.h>
 #include <sys/uio.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <ldsodefs.h>
 
 #if __ELF_NATIVE_CLASS == 32
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h
index 852f778..1d8684c 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/i386/i686/hp-timing.h
@@ -22,7 +22,7 @@
 
 #include <string.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* The macros defined here use the timestamp counter in i586 and up versions
    of the x86 processors.  They provide a very accurate way to measure the
diff --git a/sysdeps/mach/_strerror.c b/sysdeps/mach/_strerror.c
index 3c09288..e3a5c8e 100644
--- a/sysdeps/mach/_strerror.c
+++ b/sysdeps/mach/_strerror.c
@@ -21,7 +21,7 @@
 #include <mach/error.h>
 #include <errorlib.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* It is critical here that we always use the `dcgettext' function for
    the message translation.  Since <libintl.h> only defines the macro
diff --git a/sysdeps/mach/hurd/powerpc/register-dump.h b/sysdeps/mach/hurd/powerpc/register-dump.h
index 2585797..80d545e 100644
--- a/sysdeps/mach/hurd/powerpc/register-dump.h
+++ b/sysdeps/mach/hurd/powerpc/register-dump.h
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* This prints out the information in the following form: */
 static const char dumpform[] = "\
diff --git a/sysdeps/mach/hurd/sethostid.c b/sysdeps/mach/hurd/sethostid.c
index d1ff1b0..7fadf6a 100644
--- a/sysdeps/mach/hurd/sethostid.c
+++ b/sysdeps/mach/hurd/sethostid.c
@@ -18,7 +18,7 @@
 #include <unistd.h>
 #include <hurd.h>
 #include "hurdhost.h"
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* Set the current machine's Internet number to ID.
    This call is restricted to the super-user.  */
diff --git a/sysdeps/mach/hurd/xmknodat.c b/sysdeps/mach/hurd/xmknodat.c
index a37b918..acd1a8c 100644
--- a/sysdeps/mach/hurd/xmknodat.c
+++ b/sysdeps/mach/hurd/xmknodat.c
@@ -23,7 +23,7 @@
 #include <hurd/fd.h>
 #include <hurd/paths.h>
 #include <fcntl.h>
-#include "stdio-common/_itoa.h"
+#include <_itoa.h>
 #include <string.h>
 #include <sys/types.h>
 
diff --git a/sysdeps/mach/xpg-strerror.c b/sysdeps/mach/xpg-strerror.c
index 997c5b6..421d758 100644
--- a/sysdeps/mach/xpg-strerror.c
+++ b/sysdeps/mach/xpg-strerror.c
@@ -23,7 +23,7 @@
 #include <mach/error.h>
 #include <errorlib.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* It is critical here that we always use the `dcgettext' function for
    the message translation.  Since <libintl.h> only defines the macro
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c
index 9ad6bbb..e535480 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -23,7 +23,7 @@
 #include <ldsodefs.h>
 #include <elf/dynamic-link.h>
 #include <dl-machine.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* The value __cache_line_size is defined in dl-sysdep.c and is initialised
    by _dl_sysdep_start via DL_PLATFORM_INIT.  */
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
index 8370f72..a80168a 100644
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h
+++ b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
@@ -22,7 +22,7 @@
 
 #include <string.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <atomic.h>
 
 /* The macros defined here use the powerpc 64-bit time base register.
diff --git a/sysdeps/powerpc/powerpc32/register-dump.h b/sysdeps/powerpc/powerpc32/register-dump.h
index d9b520e..2936de2 100644
--- a/sysdeps/powerpc/powerpc32/register-dump.h
+++ b/sysdeps/powerpc/powerpc32/register-dump.h
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* This prints out the information in the following form: */
 static const char dumpform[] = "\
diff --git a/sysdeps/powerpc/powerpc64/dl-machine.c b/sysdeps/powerpc/powerpc64/dl-machine.c
index 6a8e68f..8e216ed 100644
--- a/sysdeps/powerpc/powerpc64/dl-machine.c
+++ b/sysdeps/powerpc/powerpc64/dl-machine.c
@@ -19,7 +19,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <ldsodefs.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <dl-machine.h>
 
 void
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h
index b4cf2a4..dc10bc4 100644
--- a/sysdeps/powerpc/powerpc64/hp-timing.h
+++ b/sysdeps/powerpc/powerpc64/hp-timing.h
@@ -22,7 +22,7 @@
 
 #include <string.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <atomic.h>
 
 /* The macros defined here use the powerpc 64-bit time base register.
diff --git a/sysdeps/powerpc/powerpc64/register-dump.h b/sysdeps/powerpc/powerpc64/register-dump.h
index e301b0f..917886d 100644
--- a/sysdeps/powerpc/powerpc64/register-dump.h
+++ b/sysdeps/powerpc/powerpc64/register-dump.h
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* This prints out the information in the following form: */
 static const char dumpform[] = "\
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index b90bb84..d0f896d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -22,7 +22,7 @@
 
 #include <string.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #define HP_TIMING_AVAIL		(1)
 #define HP_TIMING_INLINE	(1)
diff --git a/sysdeps/sparc/sparc64/hp-timing.h b/sysdeps/sparc/sparc64/hp-timing.h
index b68f653..684b846 100644
--- a/sysdeps/sparc/sparc64/hp-timing.h
+++ b/sysdeps/sparc/sparc64/hp-timing.h
@@ -22,7 +22,7 @@
 
 #include <string.h>
 #include <sys/param.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 #define HP_TIMING_AVAIL		(1)
 #define HP_TIMING_INLINE	(1)
diff --git a/sysdeps/unix/sysv/linux/fd_to_filename.h b/sysdeps/unix/sysv/linux/fd_to_filename.h
index feefc2b..ee939af 100644
--- a/sysdeps/unix/sysv/linux/fd_to_filename.h
+++ b/sysdeps/unix/sysv/linux/fd_to_filename.h
@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 static inline const char *
 fd_to_filename (int fd)
diff --git a/sysdeps/unix/sysv/linux/futimes.c b/sysdeps/unix/sysv/linux/futimes.c
index cd76f6f..913bd10 100644
--- a/sysdeps/unix/sysv/linux/futimes.c
+++ b/sysdeps/unix/sysv/linux/futimes.c
@@ -22,7 +22,7 @@
 #include <time.h>
 #include <utime.h>
 #include <sys/time.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <fcntl.h>
 
 #include <kernel-features.h>
diff --git a/sysdeps/unix/sysv/linux/i386/register-dump.h b/sysdeps/unix/sysv/linux/i386/register-dump.h
index d2c5c3f..7f54f67 100644
--- a/sysdeps/unix/sysv/linux/i386/register-dump.h
+++ b/sysdeps/unix/sysv/linux/i386/register-dump.h
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c
index 41edd8f..fb09769 100644
--- a/sysdeps/unix/sysv/linux/ptsname.c
+++ b/sysdeps/unix/sysv/linux/ptsname.c
@@ -26,7 +26,7 @@
 #include <termios.h>
 #include <unistd.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* Check if DEV corresponds to a master pseudo terminal device.  */
 #define MASTER_P(Dev)                                                         \
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h b/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h
index 0c3b83c..1f1a859 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h b/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
index 0cf89f1..671481d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h b/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h
index 9562882..510863e 100644
--- a/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sh/sh3/register-dump.h
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h b/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
index d31ca1f..f05447c 100644
--- a/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h b/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h
index 0d0cdd6..be6ad74 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h b/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h
index 8ef6fde..d8e7626 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c
index 70b2d51..0cfb474 100644
--- a/sysdeps/unix/sysv/linux/ttyname.c
+++ b/sysdeps/unix/sysv/linux/ttyname.c
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <kernel-features.h>
 
 #if 0
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c
index a12849a..f097311 100644
--- a/sysdeps/unix/sysv/linux/ttyname_r.c
+++ b/sysdeps/unix/sysv/linux/ttyname_r.c
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 #include <kernel-features.h>
 
 static int getttyname_r (char *buf, size_t buflen,
diff --git a/sysdeps/unix/sysv/linux/x86_64/register-dump.h b/sysdeps/unix/sysv/linux/x86_64/register-dump.h
index 8315791..3ef8e09 100644
--- a/sysdeps/unix/sysv/linux/x86_64/register-dump.h
+++ b/sysdeps/unix/sysv/linux/x86_64/register-dump.h
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sys/uio.h>
-#include <stdio-common/_itoa.h>
+#include <_itoa.h>
 
 /* We will print the register dump in this format:
 
diff --git a/sysdeps/x86_64/x32/_itoa.h b/sysdeps/x86_64/x32/_itoa.h
new file mode 100644
index 0000000..f9ec802
--- /dev/null
+++ b/sysdeps/x86_64/x32/_itoa.h
@@ -0,0 +1,3 @@
+#define _ITOA_NEEDED		0
+#define _ITOA_WORD_TYPE		unsigned long long int
+#include_next <_itoa.h>
diff --git a/sysdeps/x86_64/x32/_itowa.h b/sysdeps/x86_64/x32/_itowa.h
new file mode 100644
index 0000000..b28fdcb
--- /dev/null
+++ b/sysdeps/x86_64/x32/_itowa.h
@@ -0,0 +1,3 @@
+#define _ITOWA_NEEDED		0
+#define _ITOWA_WORD_TYPE	unsigned long long int
+#include_next <_itowa.h>
diff --git a/sysdeps/x86_64/x32/gmp-mparam.h b/sysdeps/x86_64/x32/gmp-mparam.h
index 33cb36e..1428f7b 100644
--- a/sysdeps/x86_64/x32/gmp-mparam.h
+++ b/sysdeps/x86_64/x32/gmp-mparam.h
@@ -29,5 +29,3 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 #define BITS_PER_INT 32
 #define BITS_PER_SHORTINT 16
 #define BITS_PER_CHAR 8
-/* Prefer long long.  */
-#define PREFER_LONG_LONG

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1567f04cfb337ed5f4fbf27562b4ea95e31fdbb2

commit 1567f04cfb337ed5f4fbf27562b4ea95e31fdbb2
Merge: 8f47c7e d1af992
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 20 11:42:15 2012 -0700

    Merge remote-tracking branch 'origin/master' into hjl/x32/master


http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8f47c7e777ea359c2bbf06e9562014c6a6d3b209

commit 8f47c7e777ea359c2bbf06e9562014c6a6d3b209
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 20 08:57:27 2012 -0700

    Use long long int on __jmp_buf only for x32
    
    2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
    
    	* sysdeps/x86_64/bits/setjmp.h: Include <bits/wordsize.h>.
    	(__jmp_buf): Use long long int for x32.

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 89d01ca..2191d87 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,3 +1,8 @@
+2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/x86_64/bits/setjmp.h: Include <bits/wordsize.h>.
+	(__jmp_buf): Use long long int for x32.
+
 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/i386/bits/byteswap.h: Include <features.h>.
diff --git a/sysdeps/x86_64/bits/setjmp.h b/sysdeps/x86_64/bits/setjmp.h
index fe900f5..bb6920d 100644
--- a/sysdeps/x86_64/bits/setjmp.h
+++ b/sysdeps/x86_64/bits/setjmp.h
@@ -23,9 +23,13 @@
 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
 #endif
 
+#include <bits/wordsize.h>
+
 #ifndef _ASM
 
-# if __x86_64__
+# if __WORDSIZE == 64
+typedef long int __jmp_buf[8];
+# elif defined  __x86_64__
 typedef long long int __jmp_buf[8];
 # else
 typedef int __jmp_buf[6];

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   98 ++++++++++++++++++++
 ChangeLog.x32                                      |   93 +++++++++++++++++++
 debug/backtracesymsfd.c                            |    2 +-
 debug/segfault.c                                   |    2 +-
 elf/dl-cache.c                                     |    2 +-
 elf/dl-minimal.c                                   |    2 +-
 elf/dl-misc.c                                      |    2 +-
 elf/dl-sysdep.c                                    |    2 +-
 elf/dl-version.c                                   |    2 +-
 elf/rtld.c                                         |    2 +-
 hurd/hurdsock.c                                    |    2 +-
 hurd/lookup-retry.c                                |    2 +-
 malloc/malloc.c                                    |    2 +-
 malloc/mtrace.c                                    |    2 +-
 math/gen-libm-test.pl                              |    4 +-
 math/libm-test.inc                                 |   69 ++++++++------
 nscd/nscd_getgr_r.c                                |    2 +-
 nscd/nscd_getpw_r.c                                |    2 +-
 nscd/nscd_getserv_r.c                              |    2 +-
 posix/getopt_init.c                                |    2 +-
 posix/wordexp.c                                    |    2 +-
 stdio-common/_itoa.c                               |   73 +++++----------
 stdio-common/_itowa.c                              |   62 ++++---------
 stdio-common/_itowa.h                              |   24 +++++-
 stdio-common/printf_fphex.c                        |    4 +-
 stdio-common/vfprintf.c                            |    4 +-
 string/_strerror.c                                 |    2 +-
 {stdio-common => sysdeps/generic}/_itoa.h          |   24 ++++-
 sysdeps/generic/elf/backtracesymsfd.c              |    2 +-
 sysdeps/i386/i686/hp-timing.h                      |    2 +-
 sysdeps/mach/_strerror.c                           |    2 +-
 sysdeps/mach/hurd/powerpc/register-dump.h          |    2 +-
 sysdeps/mach/hurd/sethostid.c                      |    2 +-
 sysdeps/mach/hurd/xmknodat.c                       |    2 +-
 sysdeps/mach/xpg-strerror.c                        |    2 +-
 sysdeps/powerpc/powerpc32/dl-machine.c             |    2 +-
 sysdeps/powerpc/powerpc32/power4/hp-timing.h       |    2 +-
 sysdeps/powerpc/powerpc32/register-dump.h          |    2 +-
 sysdeps/powerpc/powerpc64/dl-machine.c             |    2 +-
 sysdeps/powerpc/powerpc64/hp-timing.h              |    2 +-
 sysdeps/powerpc/powerpc64/register-dump.h          |    2 +-
 sysdeps/sparc/sparc32/sparcv9/hp-timing.h          |    2 +-
 sysdeps/sparc/sparc64/hp-timing.h                  |    2 +-
 sysdeps/unix/sysv/linux/fd_to_filename.h           |    2 +-
 sysdeps/unix/sysv/linux/futimes.c                  |    2 +-
 sysdeps/unix/sysv/linux/i386/register-dump.h       |    2 +-
 sysdeps/unix/sysv/linux/ptsname.c                  |    2 +-
 .../unix/sysv/linux/s390/s390-32/register-dump.h   |    2 +-
 .../unix/sysv/linux/s390/s390-64/register-dump.h   |    2 +-
 sysdeps/unix/sysv/linux/sh/sh3/register-dump.h     |    2 +-
 sysdeps/unix/sysv/linux/sh/sh4/register-dump.h     |    2 +-
 .../unix/sysv/linux/sparc/sparc32/register-dump.h  |    2 +-
 .../unix/sysv/linux/sparc/sparc64/register-dump.h  |    2 +-
 sysdeps/unix/sysv/linux/ttyname.c                  |    2 +-
 sysdeps/unix/sysv/linux/ttyname_r.c                |    2 +-
 sysdeps/unix/sysv/linux/x86_64/register-dump.h     |    2 +-
 sysdeps/x86_64/bits/setjmp.h                       |    6 +-
 sysdeps/x86_64/x32/_itoa.h                         |    3 +
 sysdeps/x86_64/x32/_itowa.h                        |    3 +
 sysdeps/x86_64/x32/gmp-mparam.h                    |    2 -
 60 files changed, 384 insertions(+), 177 deletions(-)
 rename {stdio-common => sysdeps/generic}/_itoa.h (79%)
 create mode 100644 sysdeps/x86_64/x32/_itoa.h
 create mode 100644 sysdeps/x86_64/x32/_itowa.h


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]