aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-05-19 15:35:26 +0000
committerUlrich Drepper <drepper@redhat.com>1999-05-19 15:35:26 +0000
commit1c25bcacbe58057d511fb5eae19a0af5d43a2b75 (patch)
tree0c7bd762a77adcc1d12824bb211f54633e66c175
parent2acd8fcfc4b8c76f34a304087c7a539102eddb6b (diff)
downloadglibc-1c25bcacbe58057d511fb5eae19a0af5d43a2b75.zip
glibc-1c25bcacbe58057d511fb5eae19a0af5d43a2b75.tar.gz
glibc-1c25bcacbe58057d511fb5eae19a0af5d43a2b75.tar.bz2
Update.
1999-05-19 Jakub Jelinek <jj@ultra.linux.cz> * sysdeps/generic/bits/elfclass.h: Version common to wordsize-32 and wordsize-64. * sysdeps/generic/bits/environments.h: Ditto. * sysdeps/generic/stdint.h: Ditto. * sysdeps/generic/inttypes.h: Ditto. * sysdeps/generic/bits/wordsize.h: New file. * stdlib/Makefile: Add bits/wordsize.h to headers. * sysdeps/sparc/sparc64/bits/wordsize.h: New file. * sysdeps/sparc/sparc64/fpu/bits/fenv.h: Allow the same exported headers to be used for 32bit and 64bit ABI compilations. * sysdeps/sparc/sparc64/fpu/fpu_control.h: Ditto. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h: Ditto. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Ditto. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h: Ditto. * sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h: Ditto. * sysdeps/wordsize-64/bits/elfclass.h: Remove. * sysdeps/wordsize-64/bits/environments.h: Remove. * sysdeps/wordsize-64/stdint.h: Remove. * sysdeps/wordsize-64/inttypes.h: Remove. * sysdeps/wordsize-64/bits/wordsize.h: New file. * sysdeps/wordsize-32/bits/elfclass.h: Remove. * sysdeps/wordsize-32/bits/environments.h: Remove. * sysdeps/wordsize-32/stdint.h: Remove. * sysdeps/wordsize-32/inttypes.h: Remove. * sysdeps/wordsize-32/bits/wordsize.h: New file. 1999-05-19 Jakub Jelinek <jj@ultra.linux.cz> * sysdeps/sparc/sparc64/memcpy.S (__align_cpy_4, __align_cpy_8, __align_cpy_16): New functions. (__align_cpy_2, __align_cpy_1): New aliases to memcpy. * sysdeps/sparc/sparc32/Versions: New file. * sysdeps/sparc/sparc64/Versions: New file. * sysdeps/sparc/Versions: Remove. 1999-05-19 Jakub Jelinek <jj@ultra.linux.cz> * sysdeps/unix/sysv/linux/configure.in: On sparc64-*-linux*, set slibdir to /lib64 if prefix is /usr, plus set libdir to ${exec_prefix}/lib64. * sysdeps/unix/sysv/linux/configure: Regenerated. * config.make.in: Propagate libdir settings from configure to the Makefiles. * shlib-versions: sparc64-*-linux* dynamic linker is /lib64/ld-linux.so.2.
-rw-r--r--ChangeLog54
-rw-r--r--bits/elfclass.h9
-rw-r--r--bits/environments.h28
-rw-r--r--bits/wordsize.h1
-rw-r--r--config.make.in1
-rw-r--r--shlib-versions2
-rw-r--r--stdlib/Makefile2
-rw-r--r--sysdeps/generic/bits/elfclass.h9
-rw-r--r--sysdeps/generic/bits/environments.h28
-rw-r--r--sysdeps/generic/bits/wordsize.h1
-rw-r--r--sysdeps/generic/inttypes.h505
-rw-r--r--sysdeps/generic/stdint.h319
-rw-r--r--sysdeps/sparc/sparc32/Versions (renamed from sysdeps/sparc/Versions)0
-rw-r--r--sysdeps/sparc/sparc64/Versions7
-rw-r--r--sysdeps/sparc/sparc64/bits/wordsize.h (renamed from sysdeps/wordsize-64/bits/environments.h)16
-rw-r--r--sysdeps/sparc/sparc64/fpu/bits/fenv.h17
-rw-r--r--sysdeps/sparc/sparc64/fpu/fpu_control.h9
-rw-r--r--sysdeps/sparc/sparc64/memcpy.S73
-rw-r--r--sysdeps/unix/sysv/linux/configure10
-rw-r--r--sysdeps/unix/sysv/linux/configure.in10
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h23
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h67
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h50
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h179
-rw-r--r--sysdeps/wordsize-32/bits/elfclass.h9
-rw-r--r--sysdeps/wordsize-32/bits/wordsize.h (renamed from sysdeps/wordsize-32/bits/environments.h)16
-rw-r--r--sysdeps/wordsize-32/inttypes.h388
-rw-r--r--sysdeps/wordsize-32/stdint.h223
-rw-r--r--sysdeps/wordsize-64/bits/elfclass.h9
-rw-r--r--sysdeps/wordsize-64/bits/wordsize.h19
-rw-r--r--sysdeps/wordsize-64/inttypes.h379
-rw-r--r--sysdeps/wordsize-64/stdint.h217
32 files changed, 1378 insertions, 1302 deletions
diff --git a/ChangeLog b/ChangeLog
index 7134da3..fc91318 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,57 @@
+1999-05-19 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sysdeps/generic/bits/elfclass.h: Version common to
+ wordsize-32 and wordsize-64.
+ * sysdeps/generic/bits/environments.h: Ditto.
+ * sysdeps/generic/stdint.h: Ditto.
+ * sysdeps/generic/inttypes.h: Ditto.
+
+ * sysdeps/generic/bits/wordsize.h: New file.
+ * stdlib/Makefile: Add bits/wordsize.h to headers.
+
+ * sysdeps/sparc/sparc64/bits/wordsize.h: New file.
+
+ * sysdeps/sparc/sparc64/fpu/bits/fenv.h: Allow the same exported
+ headers to be used for 32bit and 64bit ABI compilations.
+ * sysdeps/sparc/sparc64/fpu/fpu_control.h: Ditto.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h: Ditto.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Ditto.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h: Ditto.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h: Ditto.
+
+ * sysdeps/wordsize-64/bits/elfclass.h: Remove.
+ * sysdeps/wordsize-64/bits/environments.h: Remove.
+ * sysdeps/wordsize-64/stdint.h: Remove.
+ * sysdeps/wordsize-64/inttypes.h: Remove.
+ * sysdeps/wordsize-64/bits/wordsize.h: New file.
+
+ * sysdeps/wordsize-32/bits/elfclass.h: Remove.
+ * sysdeps/wordsize-32/bits/environments.h: Remove.
+ * sysdeps/wordsize-32/stdint.h: Remove.
+ * sysdeps/wordsize-32/inttypes.h: Remove.
+ * sysdeps/wordsize-32/bits/wordsize.h: New file.
+
+1999-05-19 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sysdeps/sparc/sparc64/memcpy.S (__align_cpy_4, __align_cpy_8,
+ __align_cpy_16): New functions.
+ (__align_cpy_2, __align_cpy_1): New aliases to memcpy.
+
+ * sysdeps/sparc/sparc32/Versions: New file.
+ * sysdeps/sparc/sparc64/Versions: New file.
+ * sysdeps/sparc/Versions: Remove.
+
+1999-05-19 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * sysdeps/unix/sysv/linux/configure.in:
+ On sparc64-*-linux*, set slibdir to /lib64 if prefix
+ is /usr, plus set libdir to ${exec_prefix}/lib64.
+ * sysdeps/unix/sysv/linux/configure: Regenerated.
+ * config.make.in: Propagate libdir settings from configure
+ to the Makefiles.
+ * shlib-versions: sparc64-*-linux* dynamic linker is
+ /lib64/ld-linux.so.2.
+
1999-05-18 Thorsten Kukuk <kukuk@suse.de>
* nis/nis_lookup.c (nis_lookup): If we run out of memory, close
diff --git a/bits/elfclass.h b/bits/elfclass.h
index 1ad1295..bb4dd54 100644
--- a/bits/elfclass.h
+++ b/bits/elfclass.h
@@ -2,7 +2,10 @@
the ELF file class used for executables and shared objects on this
machine. */
-#define __ELF_NATIVE_CLASS ??
+#ifndef _LINK_H
+# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
+#endif
-/* This file goes in sysdeps/wordsize-?? and sysdeps/MACHINE/Implies lists
- wordsize-?? for MACHINE's wordsize. */
+#include <bits/wordsize.h>
+
+#define __ELF_NATIVE_CLASS __WORDSIZE
diff --git a/bits/environments.h b/bits/environments.h
index 8ed1990..f3af206 100644
--- a/bits/environments.h
+++ b/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,8 @@
# error "Never include this file directly. Use <unistd.h> instead"
#endif
+#include <bits/wordsize.h>
+
/* This header should define the following symbols under the described
situations. A value `1' means that the model is always supported,
`-1' means it is never supported. Undefined means it cannot be
@@ -32,4 +34,26 @@
_XBS5_LPBIG_OFFBIG 64bit long and pointers and large off_t type
*/
-#endif /* environments.h */
+#if __WORDSIZE == 64
+
+/* We can never provide environments with 32-bit wide pointers. */
+# define _XBS5_ILP32_OFF32 -1
+# define _XBS5_ILP32_OFFBIG -1
+
+/* By default we have 64-bit wide `long int', pointers and `off_t'. */
+# define _XBS5_LP64_OFF32 1
+# define _XBS5_LPBIG_OFFBIG 1
+
+#else /* __WORDSIZE == 32 */
+
+/* By default we have 32-bit wide `int', `long int', pointers and `off_t'. */
+# define _XBS5_ILP32_OFF32 1
+
+/* We optionally provide an environment with the above size but an 64-bit
+ side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */
+
+/* We can never provide environments with 64-bit wide pointers. */
+# define _XBS5_LP64_OFF64 -1
+# define _XBS5_LPBIG_OFFBIG -1
+
+#endif /* __WORDSIZE == 32 */
diff --git a/bits/wordsize.h b/bits/wordsize.h
new file mode 100644
index 0000000..9ef0e85
--- /dev/null
+++ b/bits/wordsize.h
@@ -0,0 +1 @@
+#error "This file must be written based on the data type sizes of the target"
diff --git a/config.make.in b/config.make.in
index a642233..f24ffda 100644
--- a/config.make.in
+++ b/config.make.in
@@ -9,6 +9,7 @@ release = @RELEASE@
install_root =
prefix = @prefix@
exec_prefix = @exec_prefix@
+libdir = @libdir@
slibdir = @libc_cv_slibdir@
sysconfdir = @libc_cv_sysconfdir@
libexecdir = @libexecdir@
diff --git a/shlib-versions b/shlib-versions
index ad77c4f..ea82ede 100644
--- a/shlib-versions
+++ b/shlib-versions
@@ -33,7 +33,7 @@ alpha.*-.*-linux.* libc=6.1
# The dynamic loader also requires different names.
i.86-.*-linux.* ld=ld-linux.so.2
-sparc64-.*-linux.* ld=ld-linux64.so.2
+sparc64-.*-linux.* ld=ld-linux.so.2
sparc.*-.*-linux.* ld=ld-linux.so.2
alpha.*-.*-linux.* ld=ld-linux.so.2
arm.*-.*-linux.* ld=ld-linux.so.2
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 2682766..c218c23 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@
subdir := stdlib
headers := stdlib.h alloca.h monetary.h fmtmsg.h ucontext.h sys/ucontext.h \
- inttypes.h stdint.h
+ inttypes.h stdint.h bits/wordsize.h
routines := \
atof atoi atol atoll \
diff --git a/sysdeps/generic/bits/elfclass.h b/sysdeps/generic/bits/elfclass.h
index 1ad1295..bb4dd54 100644
--- a/sysdeps/generic/bits/elfclass.h
+++ b/sysdeps/generic/bits/elfclass.h
@@ -2,7 +2,10 @@
the ELF file class used for executables and shared objects on this
machine. */
-#define __ELF_NATIVE_CLASS ??
+#ifndef _LINK_H
+# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
+#endif
-/* This file goes in sysdeps/wordsize-?? and sysdeps/MACHINE/Implies lists
- wordsize-?? for MACHINE's wordsize. */
+#include <bits/wordsize.h>
+
+#define __ELF_NATIVE_CLASS __WORDSIZE
diff --git a/sysdeps/generic/bits/environments.h b/sysdeps/generic/bits/environments.h
index 8ed1990..f3af206 100644
--- a/sysdeps/generic/bits/environments.h
+++ b/sysdeps/generic/bits/environments.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,8 @@
# error "Never include this file directly. Use <unistd.h> instead"
#endif
+#include <bits/wordsize.h>
+
/* This header should define the following symbols under the described
situations. A value `1' means that the model is always supported,
`-1' means it is never supported. Undefined means it cannot be
@@ -32,4 +34,26 @@
_XBS5_LPBIG_OFFBIG 64bit long and pointers and large off_t type
*/
-#endif /* environments.h */
+#if __WORDSIZE == 64
+
+/* We can never provide environments with 32-bit wide pointers. */
+# define _XBS5_ILP32_OFF32 -1
+# define _XBS5_ILP32_OFFBIG -1
+
+/* By default we have 64-bit wide `long int', pointers and `off_t'. */
+# define _XBS5_LP64_OFF32 1
+# define _XBS5_LPBIG_OFFBIG 1
+
+#else /* __WORDSIZE == 32 */
+
+/* By default we have 32-bit wide `int', `long int', pointers and `off_t'. */
+# define _XBS5_ILP32_OFF32 1
+
+/* We optionally provide an environment with the above size but an 64-bit
+ side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */
+
+/* We can never provide environments with 64-bit wide pointers. */
+# define _XBS5_LP64_OFF64 -1
+# define _XBS5_LPBIG_OFFBIG -1
+
+#endif /* __WORDSIZE == 32 */
diff --git a/sysdeps/generic/bits/wordsize.h b/sysdeps/generic/bits/wordsize.h
new file mode 100644
index 0000000..9ef0e85
--- /dev/null
+++ b/sysdeps/generic/bits/wordsize.h
@@ -0,0 +1 @@
+#error "This file must be written based on the data type sizes of the target"
diff --git a/sysdeps/generic/inttypes.h b/sysdeps/generic/inttypes.h
index 9ef0e85..c81a236 100644
--- a/sysdeps/generic/inttypes.h
+++ b/sysdeps/generic/inttypes.h
@@ -1 +1,504 @@
-#error "This file must be written based on the data type sizes of the target"
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * ISO C 9X: 7.5 Format conversion of integer types <inttypes.h>
+ */
+
+#ifndef _INTTYPES_H
+#define _INTTYPES_H 1
+
+#include <features.h>
+/* Get the type definitions. */
+#include <stdint.h>
+
+
+/* The ISO C 9X standard specifies that these macros must only be
+ defined if explicitly requested. */
+#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
+
+# if __WORDSIZE == 64
+# define __PRI64_PREFIX "l"
+# define __PRIPTR_PREFIX "l"
+# else
+# define __PRI64_PREFIX "ll"
+# define __PRIPTR_PREFIX
+# endif
+
+/* Macros for printing format specifiers. */
+
+/* Decimal notation. */
+# define PRId8 "d"
+# define PRId16 "d"
+# define PRId32 "d"
+# define PRId64 __PRI64_PREFIX "d"
+
+# define PRIdLEAST8 "d"
+# define PRIdLEAST16 "d"
+# define PRIdLEAST32 "d"
+# define PRIdLEAST64 __PRI64_PREFIX "d"
+
+# define PRIdFAST8 "d"
+# define PRIdFAST16 "d"
+# define PRIdFAST32 "d"
+# define PRIdFAST64 __PRI64_PREFIX "d"
+
+
+# define PRIi8 "i"
+# define PRIi16 "i"
+# define PRIi32 "i"
+# define PRIi64 __PRI64_PREFIX "i"
+
+# define PRIiLEAST8 "i"
+# define PRIiLEAST16 "i"
+# define PRIiLEAST32 "i"
+# define PRIiLEAST64 __PRI64_PREFIX "i"
+
+# define PRIiFAST8 "i"
+# define PRIiFAST16 "i"
+# define PRIiFAST32 "i"
+# define PRIiFAST64 __PRI64_PREFIX "i"
+
+/* Octal notation. */
+# define PRIo8 "o"
+# define PRIo16 "o"
+# define PRIo32 "o"
+# define PRIo64 __PRI64_PREFIX "o"
+
+# define PRIoLEAST8 "o"
+# define PRIoLEAST16 "o"
+# define PRIoLEAST32 "o"
+# define PRIoLEAST64 __PRI64_PREFIX "o"
+
+# define PRIoFAST8 "o"
+# define PRIoFAST16 "o"
+# define PRIoFAST32 "o"
+# define PRIoFAST64 __PRI64_PREFIX "o"
+
+/* Unsigned integers. */
+# define PRIu8 "u"
+# define PRIu16 "u"
+# define PRIu32 "u"
+# define PRIu64 __PRI64_PREFIX "u"
+
+# define PRIuLEAST8 "u"
+# define PRIuLEAST16 "u"
+# define PRIuLEAST32 "u"
+# define PRIuLEAST64 __PRI64_PREFIX "u"
+
+# define PRIuFAST8 "u"
+# define PRIuFAST16 "u"
+# define PRIuFAST32 "u"
+# define PRIuFAST64 __PRI64_PREFIX "u"
+
+/* lowercase hexadecimal notation. */
+# define PRIx8 "x"
+# define PRIx16 "x"
+# define PRIx32 "x"
+# define PRIx64 __PRI64_PREFIX "x"
+
+# define PRIxLEAST8 "x"
+# define PRIxLEAST16 "x"
+# define PRIxLEAST32 "x"
+# define PRIxLEAST64 __PRI64_PREFIX "x"
+
+# define PRIxFAST8 "x"
+# define PRIxFAST16 "x"
+# define PRIxFAST32 "x"
+# define PRIxFAST64 __PRI64_PREFIX "x"
+
+/* UPPERCASE hexadecimal notation. */
+# define PRIX8 "X"
+# define PRIX16 "X"
+# define PRIX32 "X"
+# define PRIX64 __PRI64_PREFIX "X"
+
+# define PRIXLEAST8 "X"
+# define PRIXLEAST16 "X"
+# define PRIXLEAST32 "X"
+# define PRIXLEAST64 __PRI64_PREFIX "X"
+
+# define PRIXFAST8 "X"
+# define PRIXFAST16 "X"
+# define PRIXFAST32 "X"
+# define PRIXFAST64 __PRI64_PREFIX "X"
+
+
+/* Macros for printing `intmax_t' and `uintmax_t'. */
+# define PRIdMAX __PRI64_PREFIX "d"
+# define PRIiMAX __PRI64_PREFIX "i"
+# define PRIoMAX __PRI64_PREFIX "o"
+# define PRIuMAX __PRI64_PREFIX "u"
+# define PRIxMAX __PRI64_PREFIX "x"
+# define PRIXMAX __PRI64_PREFIX "X"
+
+
+/* Macros for printing `intptr_t' and `uintptr_t'. */
+# define PRIdPTR __PRIPTR_PREFIX "d"
+# define PRIiPTR __PRIPTR_PREFIX "i"
+# define PRIoPTR __PRIPTR_PREFIX "o"
+# define PRIuPTR __PRIPTR_PREFIX "u"
+# define PRIxPTR __PRIPTR_PREFIX "x"
+# define PRIXPTR __PRIPTR_PREFIX "X"
+
+
+/* Macros for scanning format specifiers. */
+
+/* Signed decimal notation. */
+# define SCNd8 "hhd"
+# define SCNd16 "hd"
+# define SCNd32 "d"
+# define SCNd64 __PRI64_PREFIX "d"
+
+# define SCNdLEAST8 "hhd"
+# define SCNdLEAST16 "hd"
+# define SCNdLEAST32 "d"
+# define SCNdLEAST64 __PRI64_PREFIX "d"
+
+# define SCNdFAST8 "hhd"
+# define SCNdFAST16 __PRIPTR_PREFIX "d"
+# define SCNdFAST32 __PRIPTR_PREFIX "d"
+# define SCNdFAST64 __PRI64_PREFIX "d"
+
+/* Signed decimal notation. */
+# define SCNi8 "hhi"
+# define SCNi16 "hi"
+# define SCNi32 "i"
+# define SCNi64 __PRI64_PREFIX "i"
+
+# define SCNiLEAST8 "hhi"
+# define SCNiLEAST16 "hi"
+# define SCNiLEAST32 "i"
+# define SCNiLEAST64 __PRI64_PREFIX "i"
+
+# define SCNiFAST8 "hhi"
+# define SCNiFAST16 __PRIPTR_PREFIX "i"
+# define SCNiFAST32 __PRIPTR_PREFIX "i"
+# define SCNiFAST64 __PRI64_PREFIX "i"
+
+/* Unsigned decimal notation. */
+# define SCNu8 "hhu"
+# define SCNu16 "hu"
+# define SCNu32 "u"
+# define SCNu64 __PRI64_PREFIX "u"
+
+# define SCNuLEAST8 "hhu"
+# define SCNuLEAST16 "hu"
+# define SCNuLEAST32 "u"
+# define SCNuLEAST64 __PRI64_PREFIX "u"
+
+# define SCNuFAST8 "hhu"
+# define SCNuFAST16 __PRIPTR_PREFIX "u"
+# define SCNuFAST32 __PRIPTR_PREFIX "u"
+# define SCNuFAST64 __PRI64_PREFIX "u"
+
+/* Octal notation. */
+# define SCNo8 "hho"
+# define SCNo16 "ho"
+# define SCNo32 "o"
+# define SCNo64 __PRI64_PREFIX "o"
+
+# define SCNoLEAST8 "hho"
+# define SCNoLEAST16 "ho"
+# define SCNoLEAST32 "o"
+# define SCNoLEAST64 __PRI64_PREFIX "o"
+
+# define SCNoFAST8 "hho"
+# define SCNoFAST16 __PRIPTR_PREFIX "o"
+# define SCNoFAST32 __PRIPTR_PREFIX "o"
+# define SCNoFAST64 __PRI64_PREFIX "o"
+
+/* Hexadecimal notation. */
+# define SCNx8 "hhx"
+# define SCNx16 "hx"
+# define SCNx32 "x"
+# define SCNx64 __PRI64_PREFIX "x"
+
+# define SCNxLEAST8 "hhx"
+# define SCNxLEAST16 "hx"
+# define SCNxLEAST32 "x"
+# define SCNxLEAST64 __PRI64_PREFIX "x"
+
+# define SCNxFAST8 "hhx"
+# define SCNxFAST16 __PRIPTR_PREFIX "x"
+# define SCNxFAST32 __PRIPTR_PREFIX "x"
+# define SCNxFAST64 __PRI64_PREFIX "x"
+
+
+/* Macros for scanning `intmax_t' and `uintmax_t'. */
+# define SCNdMAX __PRI64_PREFIX "d"
+# define SCNiMAX __PRI64_PREFIX "i"
+# define SCNoMAX __PRI64_PREFIX "o"
+# define SCNuMAX __PRI64_PREFIX "u"
+# define SCNxMAX __PRI64_PREFIX "x"
+
+/* Macros for scaning `intptr_t' and `uintptr_t'. */
+# define SCNdPTR __PRIPTR_PREFIX "d"
+# define SCNiPTR __PRIPTR_PREFIX "i"
+# define SCNoPTR __PRIPTR_PREFIX "o"
+# define SCNuPTR __PRIPTR_PREFIX "u"
+# define SCNxPTR __PRIPTR_PREFIX "x"
+
+#endif /* C++ && format macros */
+
+
+__BEGIN_DECLS
+
+#if __WORDSIZE == 64
+
+/* We have to define the `uintmax_t' type using `ldiv_t'. */
+# ifndef __ldiv_t_defined
+/* Returned by `ldiv'. */
+typedef struct
+ {
+ long int quot; /* Quotient. */
+ long int rem; /* Remainder. */
+ } ldiv_t;
+# define __ldiv_t_defined 1
+# endif
+
+/* Returned by `imaxdiv'. */
+typedef ldiv_t imaxdiv_t;
+
+#else
+
+/* We have to define the `uintmax_t' type using `lldiv_t'. */
+# ifndef __lldiv_t_defined
+/* Returned by `lldiv'. */
+__extension__ typedef struct
+ {
+ long long int quot; /* Quotient. */
+ long long int rem; /* Remainder. */
+ } lldiv_t;
+# define __lldiv_t_defined 1
+# endif
+
+/* Returned by `imaxdiv'. */
+typedef lldiv_t imaxdiv_t;
+
+#endif
+
+
+/* Compute absolute value of N. */
+extern intmax_t imaxabs __P ((intmax_t __n)) __attribute__ ((__const__));
+
+/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
+extern imaxdiv_t imaxdiv __P ((intmax_t __numer, intmax_t __denom))
+ __attribute__ ((__const__));
+
+/* Like `strtol' but convert to `intmax_t'. */
+extern intmax_t strtoimax __P ((__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base));
+
+/* Like `strtoul' but convert to `uintmax_t'. */
+extern uintmax_t strtoumax __P ((__const char * __restrict __nptr,
+ char ** __restrict __endptr, int __base));
+
+/* Like `wcstol' but convert to `intmax_t'. */
+extern intmax_t wcstoimax __P ((__const wchar_t * __restrict __nptr,
+ wchar_t **__restrict __endptr, int __base));
+
+/* Like `wcstoul' but convert to `uintmax_t'. */
+extern uintmax_t wcstoumax __P ((__const wchar_t * __restrict __nptr,
+ wchar_t ** __restrict __endptr, int __base));
+
+#ifdef __USE_EXTERN_INLINES
+
+# if __WORDSIZE == 64
+
+/* We ant to use the appropriate functions from <stdlib.h> but cannot
+ assume the header is read already. */
+__extension__ extern long int labs __P ((long int __x))
+ __attribute__ ((__const__));
+__extension__ extern ldiv_t ldiv __P ((long int __numer, long int __denom))
+ __attribute__ ((__const__));
+
+
+/* Compute absolute value of N. */
+extern __inline intmax_t
+imaxabs (intmax_t __n) __THROW
+{
+ return labs (__n);
+}
+
+/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
+extern __inline imaxdiv_t
+imaxdiv (intmax_t __numer, intmax_t __denom) __THROW
+{
+ return ldiv (__numer, __denom);
+}
+
+/* Like `strtol' but convert to `intmax_t'. */
+# 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
+extern __inline intmax_t
+strtoimax (__const char *__restrict nptr, char **__restrict endptr,
+ int base) __THROW
+{
+ return __strtol_internal (nptr, endptr, base, 0);
+}
+
+/* Like `strtoul' but convert to `uintmax_t'. */
+# 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
+extern __inline uintmax_t
+strtoumax (__const char *__restrict nptr, char **__restrict endptr,
+ int base) __THROW
+{
+ return __strtoul_internal (nptr, endptr, base, 0);
+}
+
+/* Like `wcstol' but convert to `intmax_t'. */
+# ifndef __wcstol_internal_defined
+extern long int __wcstol_internal __P ((__const wchar_t * __restrict __nptr,
+ wchar_t **__restrict __endptr,
+ int __base, int __group));
+# define __wcstol_internal_defined 1
+# endif
+extern __inline intmax_t
+wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
+ int base) __THROW
+{
+ return __wcstol_internal (nptr, endptr, base, 0);
+}
+
+
+/* Like `wcstoul' but convert to `uintmax_t'. */
+# ifndef __wcstoul_internal_defined
+extern unsigned long int __wcstoul_internal __P ((__const wchar_t *
+ __restrict __nptr,
+ wchar_t **
+ __restrict __endptr,
+ int __base, int __group));
+# define __wcstoul_internal_defined 1
+# endif
+extern __inline uintmax_t
+wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
+ int base) __THROW
+{
+ return __wcstoul_internal (nptr, endptr, base, 0);
+}
+
+# else /* __WORDSIZE == 32 */
+
+/* We ant to use the appropriate functions from <stdlib.h> but cannot
+ assume the header is read already. */
+__extension__ extern long long int llabs __P ((long long int __x))
+ __attribute__ ((__const__));
+__extension__ extern lldiv_t lldiv __P ((long long int __numer,
+ long long int __denom))
+ __attribute__ ((__const__));
+
+
+/* Compute absolute value of N. */
+extern __inline intmax_t
+imaxabs (intmax_t __n) __THROW
+{
+ return llabs (__n);
+}
+
+/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
+extern __inline imaxdiv_t
+imaxdiv (intmax_t __numer, intmax_t __denom) __THROW
+{
+ return lldiv (__numer, __denom);
+}
+
+/* Like `strtol' but convert to `intmax_t'. */
+# ifndef __strtoll_internal_defined
+__extension__
+extern long long int __strtoll_internal __P ((__const char *__restrict __nptr,
+ char **__restrict __endptr,
+ int __base, int __group));
+# define __strtoll_internal_defined 1
+# endif
+extern __inline intmax_t
+strtoimax (__const char *__restrict nptr, char **__restrict endptr,
+ int base) __THROW
+{
+ return __strtoll_internal (nptr, endptr, base, 0);
+}
+
+/* Like `strtoul' but convert to `uintmax_t'. */
+# ifndef __strtoull_internal_defined
+__extension__
+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
+extern __inline uintmax_t
+strtoumax (__const char *__restrict nptr, char **__restrict endptr,
+ int base) __THROW
+{
+ return __strtoull_internal (nptr, endptr, base, 0);
+}
+
+/* Like `wcstol' but convert to `intmax_t'. */
+# ifndef __wcstoll_internal_defined
+__extension__
+extern long long int __wcstoll_internal __P ((__const wchar_t *
+ __restrict __nptr,
+ wchar_t **__restrict __endptr,
+ int __base, int __group));
+# define __wcstoll_internal_defined 1
+# endif
+extern __inline intmax_t
+wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
+ int base) __THROW
+{
+ return __wcstoll_internal (nptr, endptr, base, 0);
+}
+
+
+/* Like `wcstoul' but convert to `uintmax_t'. */
+# ifndef __wcstoull_internal_defined
+__extension__
+extern unsigned long long int __wcstoull_internal __P ((__const wchar_t *
+ __restrict __nptr,
+ wchar_t **
+ __restrict __endptr,
+ int __base,
+ int __group));
+# define __wcstoull_internal_defined 1
+# endif
+extern __inline uintmax_t
+wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
+ int base) __THROW
+{
+ return __wcstoull_internal (nptr, endptr, base, 0);
+}
+
+# endif /* __WORDSIZE == 32 */
+#endif /* Use extern inlines. */
+
+__END_DECLS
+
+#endif /* inttypes.h */
diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h
index 9ef0e85..ed34451 100644
--- a/sysdeps/generic/stdint.h
+++ b/sysdeps/generic/stdint.h
@@ -1 +1,318 @@
-#error "This file must be written based on the data type sizes of the target"
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * ISO C 9X: 7.18 Integer types <stdint.h>
+ */
+
+#ifndef _STDINT_H
+#define _STDINT_H 1
+
+#include <features.h>
+#define __need_wchar_t
+#include <stddef.h>
+#include <bits/wordsize.h>
+
+/* Exact integral types. */
+
+/* Signed. */
+
+/* There is some amount of overlap with <sys/types.h> as known by inet code */
+#ifndef __int8_t_defined
+# define __int8_t_defined
+typedef signed char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+# if __WORDSIZE == 64
+typedef long int int64_t;
+# else
+__extension__
+typedef long long int int64_t;
+# endif
+#endif
+
+/* Unsigned. */
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+#if __WORDSIZE == 64
+typedef unsigned long int uint64_t;
+#else
+__extension__
+typedef unsigned long long int uint64_t;
+#endif
+
+
+/* Small types. */
+
+/* Signed. */
+typedef signed char int_least8_t;
+typedef short int int_least16_t;
+typedef int int_least32_t;
+#if __WORDSIZE == 64
+typedef long int int_least64_t;
+#else
+__extension__
+typedef long long int int_least64_t;
+#endif
+
+/* Unsigned. */
+typedef unsigned char uint_least8_t;
+typedef unsigned short int uint_least16_t;
+typedef unsigned int uint_least32_t;
+#if __WORDSIZE == 64
+typedef unsigned long int uint_least64_t;
+#else
+__extension__
+typedef unsigned long long int uint_least64_t;
+#endif
+
+
+/* Fast types. */
+
+/* Signed. */
+typedef signed char int_fast8_t;
+#if __WORDSIZE == 64
+typedef long int int_fast16_t;
+typedef long int int_fast32_t;
+typedef long int int_fast64_t;
+#else
+typedef int int_fast16_t;
+typedef int int_fast32_t;
+__extension__
+typedef long long int int_fast64_t;
+#endif
+
+/* Unsigned. */
+typedef unsigned char uint_fast8_t;
+#if __WORDSIZE == 64
+typedef unsigned long int uint_fast16_t;
+typedef unsigned long int uint_fast32_t;
+typedef unsigned long int uint_fast64_t;
+#else
+typedef unsigned int uint_fast16_t;
+typedef unsigned int uint_fast32_t;
+__extension__
+typedef unsigned long long int uint_fast64_t;
+#endif
+
+
+/* Types for `void *' pointers. */
+#if __WORDSIZE == 64
+# ifndef intptr_t
+typedef long int intptr_t;
+# define intptr_t intptr_t
+# endif
+typedef unsigned long int uintptr_t;
+#else
+# ifndef intptr_t
+typedef int intptr_t;
+# define intptr_t intptr_t
+# endif
+typedef unsigned int uintptr_t;
+#endif
+
+
+/* Largest integral types. */
+#if __WORDSIZE == 64
+typedef long int intmax_t;
+typedef unsigned long int uintmax_t;
+#else
+__extension__
+typedef long long int intmax_t;
+__extension__
+typedef unsigned long long int uintmax_t;
+#endif
+
+
+/* The ISO C 9X standard specifies that in C++ implementations these
+ macros should only be defined if explicitly requested. */
+#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
+
+# if __WORDSIZE == 64
+# define __INT64_C(c) c ## L
+# define __UINT64_C(c) c ## UL
+# else
+# define __INT64_C(c) c ## LL
+# define __UINT64_C(c) c ## ULL
+# endif
+
+/* Limits of integral types. */
+
+/* Minimum of signed integral types. */
+# define INT8_MIN (-128)
+# define INT16_MIN (-32767-1)
+# define INT32_MIN (-2147483647-1)
+# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types. */
+# define INT8_MAX (127)
+# define INT16_MAX (32767)
+# define INT32_MAX (2147483647)
+# define INT64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types. */
+# define UINT8_MAX (255U)
+# define UINT16_MAX (65535U)
+# define UINT32_MAX (4294967295U)
+# define UINT64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Minimum of signed integral types having a minimum size. */
+# define INT_LEAST8_MIN (-128)
+# define INT_LEAST16_MIN (-32767-1)
+# define INT_LEAST32_MIN (-2147483647-1)
+# define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types having a minimum size. */
+# define INT_LEAST8_MAX (127)
+# define INT_LEAST16_MAX (32767)
+# define INT_LEAST32_MAX (2147483647)
+# define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types having a minimum size. */
+# define UINT_LEAST8_MAX (255U)
+# define UINT_LEAST16_MAX (65535U)
+# define UINT_LEAST32_MAX (4294967295U)
+# define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Minimum of fast signed integral types having a minimum size. */
+# define INT_FAST8_MIN (-128)
+# if __WORDSIZE == 64
+# define INT_FAST16_MIN (-9223372036854775807L-1)
+# define INT_FAST32_MIN (-9223372036854775807L-1)
+# else
+# define INT_FAST16_MIN (-2147483647-1)
+# define INT_FAST32_MIN (-2147483647-1)
+# endif
+# define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of fast signed integral types having a minimum size. */
+# define INT_FAST8_MAX (127)
+# if __WORDSIZE == 64
+# define INT_FAST16_MAX (9223372036854775807L)
+# define INT_FAST32_MAX (9223372036854775807L)
+# else
+# define INT_FAST16_MAX (2147483647)
+# define INT_FAST32_MAX (2147483647)
+# endif
+# define INT_FAST64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of fast unsigned integral types having a minimum size. */
+# define UINT_FAST8_MAX (255U)
+# if __WORDSIZE == 64
+# define UINT_FAST16_MAX (18446744073709551615UL)
+# define UINT_FAST32_MAX (18446744073709551615UL)
+# else
+# define UINT_FAST16_MAX (4294967295U)
+# define UINT_FAST32_MAX (4294967295U)
+# endif
+# define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Values to test for integral types holding `void *' pointer. */
+# if __WORDSIZE == 64
+# define INTPTR_MIN (-9223372036854775807L-1)
+# define INTPTR_MAX (9223372036854775807L)
+# define UINTPTR_MAX (18446744073709551615UL)
+# else
+# define INTPTR_MIN (-2147483647-1)
+# define INTPTR_MAX (2147483647)
+# define UINTPTR_MAX (4294967295U)
+# endif
+
+
+/* Minimum for largest signed integral type. */
+# define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum for largest signed integral type. */
+# define INTMAX_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum for largest unsigned integral type. */
+# define UINTMAX_MAX (__UINT64_C(18446744073709551615))
+
+
+/* Limits of other integer types. */
+
+/* Limits of `ptrdiff_t' type. */
+# if __WORDSIZE == 64
+# define PTRDIFF_MIN (-9223372036854775807L-1)
+# define PTRDIFF_MAX (9223372036854775807L)
+# else
+# define PTRDIFF_MIN (-2147483647-1)
+# define PTRDIFF_MAX (2147483647)
+# endif
+
+/* Limits of `sig_atomic_t'. */
+# define SIG_ATOMIC_MIN (-2147483647-1)
+# define SIG_ATOMIC_MAX (2147483647)
+
+/* Limit of `size_t' type. */
+# if __WORDSIZE == 64
+# define SIZE_MAX (18446744073709551615UL)
+# else
+# define SIZE_MAX (4294967295U)
+# endif
+
+/* Limits of `wchar_t'. */
+# ifndef WCHAR_MIN
+/* These constants might also be defined in <wchar.h>. */
+# define WCHAR_MIN (-2147483647-1)
+# define WCHAR_MAX (2147483647)
+# endif
+
+/* Limits of `wint_t'. */
+# define WINT_MIN (0)
+# define WINT_MAX (4294967295U)
+
+#endif /* C++ && limit macros */
+
+
+/* The ISO C 9X standard specifies that in C++ implementations these
+ should only be defined if explicitly requested. */
+#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
+/* Signed. */
+# define INT8_C(c) c
+# define INT16_C(c) c
+# define INT32_C(c) c
+# if __WORDSIZE == 64
+# define INT64_C(c) c ## L
+# else
+# define INT64_C(c) c ## LL
+# endif
+
+/* Unsigned. */
+# define UINT8_C(c) c ## U
+# define UINT16_C(c) c ## U
+# define UINT32_C(c) c ## U
+# if __WORDSIZE == 64
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
+
+/* Maximal type. */
+# if __WORDSIZE == 64
+# define INTMAX_C(c) c ## L
+# define UINTMAX_C(c) c ## UL
+# else
+# define INTMAX_C(c) c ## LL
+# define UINTMAX_C(c) c ## ULL
+# endif
+
+#endif /* C++ && constant macros */
+
+#endif /* stdint.h */
diff --git a/sysdeps/sparc/Versions b/sysdeps/sparc/sparc32/Versions
index aa36082..aa36082 100644
--- a/sysdeps/sparc/Versions
+++ b/sysdeps/sparc/sparc32/Versions
diff --git a/sysdeps/sparc/sparc64/Versions b/sysdeps/sparc/sparc64/Versions
new file mode 100644
index 0000000..99fe741
--- /dev/null
+++ b/sysdeps/sparc/sparc64/Versions
@@ -0,0 +1,7 @@
+libc {
+ GLIBC_2.1.1 {
+ # SPARC v9 SYSV ABI helper functions
+ __align_cpy_1; __align_cpy_2; __align_cpy_4;
+ __align_cpy_8; __align_cpy_16;
+ }
+}
diff --git a/sysdeps/wordsize-64/bits/environments.h b/sysdeps/sparc/sparc64/bits/wordsize.h
index f1d5bb8..f86b7f7 100644
--- a/sysdeps/wordsize-64/bits/environments.h
+++ b/sysdeps/sparc/sparc64/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,14 +16,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _UNISTD_H
-# error "Never include this file directly. Use <unistd.h> instead"
+#if defined __sparc_v9__ || defined __arch64__ || defined __sparcv9
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
#endif
-
-/* We can never provide environments with 32-bit wide pointers. */
-#define _XBS5_ILP32_OFF32 -1
-#define _XBS5_ILP32_OFFBIG -1
-
-/* By default we have 64-bit wide `long int', pointers and `off_t'. */
-#define _XBS5_LP64_OFF32 1
-#define _XBS5_LPBIG_OFFBIG 1
diff --git a/sysdeps/sparc/sparc64/fpu/bits/fenv.h b/sysdeps/sparc/sparc64/fpu/bits/fenv.h
index b864abd..af8ed65 100644
--- a/sysdeps/sparc/sparc64/fpu/bits/fenv.h
+++ b/sysdeps/sparc/sparc64/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,8 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
+#include <bits/wordsize.h>
+
/* Define bits representing the exception. We use the bit positions
of the appropriate accrued exception bits from the FSR. */
@@ -57,11 +59,19 @@ enum
#define __FE_ROUND_MASK (3U << 30)
+#if __WORDSIZE == 64
/* Type representing exception flags. */
typedef unsigned long fexcept_t;
/* Type representing floating-point environment. */
typedef unsigned long fenv_t;
+#else
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef unsigned int fenv_t;
+#endif
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((fenv_t *) -1)
@@ -72,5 +82,10 @@ typedef unsigned long fenv_t;
#endif
/* For internal use only: access the fp state register. */
+#if __WORDSIZE == 64
#define __fenv_stfsr(X) __asm__ ("stx %%fsr,%0" : "=m" (X))
#define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X))
+#else
+#define __fenv_stfsr(X) __asm__ ("st %%fsr,%0" : "=m" (X))
+#define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X))
+#endif
diff --git a/sysdeps/sparc/sparc64/fpu/fpu_control.h b/sysdeps/sparc/sparc64/fpu/fpu_control.h
index b684fa9..a89f00e 100644
--- a/sysdeps/sparc/sparc64/fpu/fpu_control.h
+++ b/sysdeps/sparc/sparc64/fpu/fpu_control.h
@@ -23,6 +23,7 @@
#include <features.h>
+#include <bits/wordsize.h>
/* masking of interrupts */
#define _FPU_MASK_IM 0x08000000
@@ -55,11 +56,19 @@
#define _FPU_DEFAULT 0x0
#define _FPU_IEEE 0x0
+#if __WORDSIZE == 64
/* Type of the control word. */
typedef unsigned long fpu_control_t;
#define _FPU_GETCW(cw) __asm__ ("stx %%fsr,%0" : "=m" (*&cw))
#define _FPU_SETCW(cw) __asm__ ("ldx %0,%%fsr" : : "m" (*&cw))
+#else
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+#define _FPU_GETCW(cw) __asm__ ("st %%fsr,%0" : "=m" (*&cw))
+#define _FPU_SETCW(cw) __asm__ ("ld %0,%%fsr" : : "m" (*&cw))
+#endif
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
diff --git a/sysdeps/sparc/sparc64/memcpy.S b/sysdeps/sparc/sparc64/memcpy.S
index fa08507..180ff23 100644
--- a/sysdeps/sparc/sparc64/memcpy.S
+++ b/sysdeps/sparc/sparc64/memcpy.S
@@ -380,6 +380,66 @@ END(bcopy)
209: retl
mov %g4, %o0
+#ifdef USE_BPR
+
+ /* void *__align_cpy_4(void *dest, void *src, size_t n)
+ * SPARC v9 SYSV ABI
+ * Like memcpy, but results are undefined if (!n || ((dest | src | n) & 3))
+ */
+
+ .align 32
+ENTRY(__align_cpy_4)
+ mov %o0, %g4 /* IEU0 Group */
+ cmp %o2, 15 /* IEU1 */
+ bleu,pn %xcc, 208b /* CTI */
+ cmp %o2, (64 * 6) /* IEU1 Group */
+ bgeu,pn %xcc, 200b /* CTI */
+ andcc %o0, 7, %g2 /* IEU1 Group */
+ ba,pt %xcc, 216f /* CTI */
+ andcc %o1, 4, %g0 /* IEU1 Group */
+END(__align_cpy_4)
+
+ /* void *__align_cpy_8(void *dest, void *src, size_t n)
+ * SPARC v9 SYSV ABI
+ * Like memcpy, but results are undefined if (!n || ((dest | src | n) & 7))
+ */
+
+ .align 32
+ENTRY(__align_cpy_8)
+ mov %o0, %g4 /* IEU0 Group */
+ cmp %o2, 15 /* IEU1 */
+ bleu,pn %xcc, 208b /* CTI */
+ cmp %o2, (64 * 6) /* IEU1 Group */
+ bgeu,pn %xcc, 201b /* CTI */
+ andcc %o0, 0x38, %g5 /* IEU1 Group */
+ andcc %o2, -128, %g7 /* IEU1 Group */
+ bne,a,pt %xcc, 82f + 4 /* CTI */
+ ldx [%o1], %g1 /* Load */
+ ba,pt %xcc, 41f /* CTI Group */
+ andcc %o2, 0x70, %g7 /* IEU1 */
+END(__align_cpy_8)
+
+ /* void *__align_cpy_16(void *dest, void *src, size_t n)
+ * SPARC v9 SYSV ABI
+ * Like memcpy, but results are undefined if (!n || ((dest | src | n) & 15))
+ */
+
+ .align 32
+ENTRY(__align_cpy_16)
+ mov %o0, %g4 /* IEU0 Group */
+ cmp %o2, (64 * 6) /* IEU1 */
+ bgeu,pn %xcc, 201b /* CTI */
+ andcc %o0, 0x38, %g5 /* IEU1 Group */
+ andcc %o2, -128, %g7 /* IEU1 Group */
+ bne,a,pt %xcc, 82f + 4 /* CTI */
+ ldx [%o1], %g1 /* Load */
+ ba,pt %xcc, 41f /* CTI Group */
+ andcc %o2, 0x70, %g7 /* IEU1 */
+END(__align_cpy_16)
+
+#endif
+
+ .align 32
ENTRY(memcpy)
210:
#ifndef USE_BPR
@@ -396,7 +456,7 @@ ENTRY(memcpy)
andcc %g5, 3, %o5 /* IEU1 Group */
bne,pn %xcc, 212f /* CTI */
andcc %o1, 3, %g0 /* IEU1 Group */
- be,a,pt %xcc, 3f /* CTI */
+ be,a,pt %xcc, 216f /* CTI */
andcc %o1, 4, %g0 /* IEU1 Group */
andcc %o1, 1, %g0 /* IEU1 Group */
be,pn %xcc, 4f /* CTI */
@@ -413,7 +473,7 @@ ENTRY(memcpy)
sub %o2, 2, %o2 /* IEU0 */
sth %g2, [%o0 - 2] /* Store Group + bubble */
5: andcc %o1, 4, %g0 /* IEU1 */
-3: be,a,pn %xcc, 2f /* CTI */
+216: be,a,pn %xcc, 2f /* CTI */
andcc %o2, -128, %g7 /* IEU1 Group */
lduw [%o1], %g5 /* Load Group */
add %o1, 4, %o1 /* IEU0 */
@@ -421,7 +481,7 @@ ENTRY(memcpy)
sub %o2, 4, %o2 /* IEU0 Group */
stw %g5, [%o0 - 4] /* Store */
andcc %o2, -128, %g7 /* IEU1 Group */
-2: be,pn %xcc, 3f /* CTI */
+2: be,pn %xcc, 215f /* CTI */
andcc %o0, 4, %g0 /* IEU1 Group */
be,pn %xcc, 82f + 4 /* CTI Group */
5: MOVE_BIGCHUNK(o1, o0, 0x00, g1, g3, g5, o5)
@@ -432,7 +492,7 @@ ENTRY(memcpy)
add %o1, 128, %o1 /* IEU0 */
bne,pt %xcc, 5b /* CTI */
add %o0, 128, %o0 /* IEU0 Group */
-3: andcc %o2, 0x70, %g7 /* IEU1 Group */
+215: andcc %o2, 0x70, %g7 /* IEU1 Group */
41: be,pn %xcc, 80f /* CTI */
andcc %o2, 8, %g0 /* IEU1 Group */
/* Clk1 8-( */
@@ -572,3 +632,8 @@ ENTRY(memcpy)
retl
mov %g4, %o0
END(memcpy)
+
+#ifdef USE_BPR
+weak_alias(memcpy, __align_cpy_1)
+weak_alias(memcpy, __align_cpy_2)
+#endif
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index ffaedc9..bf5e797 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -57,7 +57,15 @@ fi
# shared library objects and the configuration files on the root partition
# in /lib and /etc.
if test "$prefix" = "/usr"; then
- libc_cv_slibdir="/lib"
+ # 64bit libraries on sparc go to /lib64 and not /lib
+ if test "$machine" = "sparc/sparc64"; then
+ libc_cv_slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ fi
+ else
+ libc_cv_slibdir="/lib"
+ fi
libc_cv_sysconfdir="/etc"
libc_cv_rootsbindir="/sbin"
fi
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 4f116b5..2c425c5 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -42,7 +42,15 @@ fi
# shared library objects and the configuration files on the root partition
# in /lib and /etc.
if test "$prefix" = "/usr"; then
- libc_cv_slibdir="/lib"
+ # 64bit libraries on sparc go to /lib64 and not /lib
+ if test "$machine" = "sparc/sparc64"; then
+ libc_cv_slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ fi
+ else
+ libc_cv_slibdir="/lib"
+ fi
libc_cv_sysconfdir="/etc"
libc_cv_rootsbindir="/sbin"
fi
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h
index e51f81a..b15fc5e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h
@@ -21,6 +21,10 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
+
#include <sys/ucontext.h>
typedef ucontext_t __jmp_buf[1];
@@ -29,3 +33,22 @@ typedef ucontext_t __jmp_buf[1];
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
+
+#else
+
+#if defined __USE_MISC || defined _ASM
+# define JB_SP 0
+# define JB_FP 1
+# define JB_PC 2
+#endif
+
+#ifndef _ASM
+typedef int __jmp_buf[3];
+#endif
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((int) (address) < (jmpbuf)[JB_SP])
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h
index b6178f5..6f094bc 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,43 +16,66 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/statfs.h> instead.
- */
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
-#ifndef _BITS_STATFS_H
-#define _BITS_STATFS_H
-
-#include <bits/types.h> /* for __fsid_t */
+#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
struct statfs
{
+#if __WORDSIZE == 64
long int f_type;
long int f_bsize;
- long int f_blocks;
- long int f_bfree;
- long int f_bavail;
- long int f_files;
- long int f_ffree;
+#else
+ int f_type;
+ int f_bsize;
+#endif
+#ifndef __USE_FILE_OFFSET64
+ __fsblkcnt_t f_blocks;
+ __fsblkcnt_t f_bfree;
+ __fsblkcnt_t f_bavail;
+ __fsfilcnt_t f_files;
+ __fsfilcnt_t f_ffree;
+#else
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_bavail;
+ __fsfilcnt64_t f_files;
+ __fsfilcnt64_t f_ffree;
+#endif
__fsid_t f_fsid;
+#if __WORDSIZE == 64
long int f_namelen;
long int f_spare[6];
+#else
+ int f_namelen;
+ int f_spare[6];
+#endif
};
-/* We already use 64-bit types in the normal structure,
- so this is the same as the above. */
+#ifdef __USE_LARGEFILE64
struct statfs64
{
+#if __WORDSIZE == 64
long int f_type;
long int f_bsize;
- long int f_blocks;
- long int f_bfree;
- long int f_bavail;
- long int f_files;
- long int f_ffree;
+#else
+ int f_type;
+ int f_bsize;
+#endif
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_bavail;
+ __fsfilcnt64_t f_files;
+ __fsfilcnt64_t f_ffree;
__fsid_t f_fsid;
+#if __WORDSIZE == 64
long int f_namelen;
long int f_spare[6];
+#else
+ int f_namelen;
+ int f_spare[6];
+#endif
};
-
-#endif /* bits/statfs.h */
+#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
index b6d9885..9ecba2d 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,38 +27,66 @@
#define __need_size_t
#include <stddef.h>
+#include <bits/wordsize.h>
/* Convenience types. */
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
+#if __WORDSIZE == 64
typedef unsigned long int __u_quad_t;
typedef long int __quad_t;
+#else
+#ifdef __GNUC__
+__extension__ typedef unsigned long long int __u_quad_t;
+__extension__ typedef long long int __quad_t;
+#else
+typedef struct
+ {
+ long int __val[2];
+ } __quad_t;
+typedef struct
+ {
+ __u_long __val[2];
+ } __u_quad_t;
+#endif
+#endif
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
+#if __WORDSIZE == 64
typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
typedef __quad_t *__qaddr_t;
+#else
+#ifdef __GNUC__
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+#endif
+#endif
-typedef __u_long __dev_t; /* Type of device numbers. */
+typedef __u_quad_t __dev_t; /* Type of device numbers. */
typedef __u_int __uid_t; /* Type of user identifications. */
typedef __u_int __gid_t; /* Type of group identifications. */
typedef __u_long __ino_t; /* Type of file serial numbers. */
-typedef __u_long __ino64_t; /* Type of file serial numbers. */
+typedef __uint64_t __ino64_t; /* Type of file serial numbers. */
typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
typedef __u_int __nlink_t; /* Type of file link counts. */
typedef long int __off_t; /* Type of file sizes and offsets. */
typedef __int64_t __off64_t; /* "" (LFS) */
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef int __pid_t; /* Type of process identifications. */
+#if __WORDSIZE == 64
typedef long long int __ssize_t; /* Type of a byte count, or error. */
+#else
+typedef int __ssize_t; /* Type of a byte count, or error. */
+#endif
typedef long int __rlim_t; /* Type of resource counts. */
-typedef long int __rlim64_t; /* Type of resource counts (LFS). */
+typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */
typedef __u_int __id_t; /* General type for IDs. */
typedef struct
@@ -108,7 +136,11 @@ typedef struct
typedef int __key_t;
/* Used in `struct shmid_ds'. */
-typedef int __ipc_pid_t;
+#if __WORDSIZE == 64
+typedef int __ipc_pid_t;
+#else
+typedef short int __ipc_pid_t;
+#endif
/* Types from the Large File Support interface. */
@@ -118,7 +150,11 @@ typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;
/* Type to count file system blocks. */
+#if __WORDSIZE == 64
+typedef __u_long __fsblkcnt_t;
+#else
typedef unsigned int __fsblkcnt_t;
+#endif
typedef __u_quad_t __fsblkcnt64_t;
/* Type to count file system inodes. */
@@ -130,7 +166,11 @@ typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
+#if __WORDSIZE == 64
typedef long int __intptr_t;
+#else
+typedef int __intptr_t;
+#endif
/* Now add the thread types. */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h
index f62b542..03ec8ae 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h
@@ -1,7 +1,29 @@
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#ifndef _SYS_UCONTEXT_H
-#define _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+#include <features.h>
#include <signal.h>
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 64
#define MC_TSTATE 0
#define MC_PC 1
@@ -56,12 +78,161 @@ typedef struct {
mc_fpu_t mc_fpregs;
} mcontext_t;
-struct ucontext {
+typedef struct ucontext {
struct ucontext *uc_link;
unsigned long uc_flags;
unsigned long uc_sigmask;
mcontext_t uc_mcontext;
-};
-typedef struct ucontext ucontext_t;
+} ucontext_t;
+
+#else /* __WORDSIZE == 32 */
+
+/*
+ * Location of the users' stored registers relative to R0.
+ * Usage is as an index into a gregset_t array or as u.u_ar0[XX].
+ */
+#define REG_PSR (0)
+#define REG_PC (1)
+#define REG_nPC (2)
+#define REG_Y (3)
+#define REG_G1 (4)
+#define REG_G2 (5)
+#define REG_G3 (6)
+#define REG_G4 (7)
+#define REG_G5 (8)
+#define REG_G6 (9)
+#define REG_G7 (10)
+#define REG_O0 (11)
+#define REG_O1 (12)
+#define REG_O2 (13)
+#define REG_O3 (14)
+#define REG_O4 (15)
+#define REG_O5 (16)
+#define REG_O6 (17)
+#define REG_O7 (18)
+
+/*
+ * A gregset_t is defined as an array type for compatibility with the reference
+ * source. This is important due to differences in the way the C language
+ * treats arrays and structures as parameters.
+ *
+ * Note that NGREG is really (sizeof (struct regs) / sizeof (greg_t)),
+ * but that the ABI defines it absolutely to be 19.
+ */
+#define NGREG 19
+
+typedef int greg_t;
+typedef greg_t gregset_t[NGREG];
+
+/*
+ * The following structures define how a register window can appear on the
+ * stack. This structure is available (when required) through the `gwins'
+ * field of an mcontext (nested within ucontext). SPARC_MAXWINDOW is the
+ * maximum number of outstanding regiters window defined in the SPARC
+ * architecture (*not* implementation).
+ */
+#define SPARC_MAXREGWINDOW 31 /* max windows in SPARC arch. */
+struct rwindow
+ {
+ greg_t rw_local[8]; /* locals */
+ greg_t rw_in[8]; /* ins */
+ };
+
+#define rw_fp rw_in[6] /* frame pointer */
+#define rw_rtn rw_in[7] /* return address */
+
+typedef struct gwindows
+ {
+ int wbcnt;
+ int *spbuf[SPARC_MAXREGWINDOW];
+ struct rwindow wbuf[SPARC_MAXREGWINDOW];
+ } gwindows_t;
+
+/*
+ * Floating point definitions.
+ */
+
+#define MAXFPQ 16 /* max # of fpu queue entries currently supported */
+
+/*
+ * struct fq defines the minimal format of a floating point instruction queue
+ * entry. The size of entries in the floating point queue are implementation
+ * dependent. The union FQu is guarenteed to be the first field in any ABI
+ * conformant system implementation. Any additional fields provided by an
+ * implementation should not be used applications designed to be ABI conformant. */
+
+struct fpq
+ {
+ unsigned long *fpq_addr; /* address */
+ unsigned long fpq_instr; /* instruction */
+ };
+
+struct fq
+ {
+ union /* FPU inst/addr queue */
+ {
+ double whole;
+ struct fpq fpq;
+ } FQu;
+ };
+
+#define FPU_REGS_TYPE unsigned
+#define FPU_DREGS_TYPE unsigned long long
+#define V7_FPU_FSR_TYPE unsigned
+#define V9_FPU_FSR_TYPE unsigned long long
+#define V9_FPU_FPRS_TYPE unsigned
+
+typedef struct fpu
+ {
+ union { /* FPU floating point regs */
+ unsigned long long fpu_regs[32]; /* 32 singles */
+ double fpu_dregs[16]; /* 16 doubles */
+ } fpu_fr;
+ struct fq *fpu_q; /* ptr to array of FQ entries */
+ unsigned fpu_fsr; /* FPU status register */
+ unsigned char fpu_qcnt; /* # of entries in saved FQ */
+ unsigned char fpu_q_entrysize; /* # of bytes per FQ entry */
+ unsigned char fpu_en; /* flag signifying fpu in use */
+ } fpregset_t;
+
+/*
+ * The following structure is for associating extra register state with
+ * the ucontext structure and is kept within the uc_mcontext filler area.
+ *
+ * If (xrs_id == XRS_ID) then the xrs_ptr field is a valid pointer to
+ * extra register state. The exact format of the extra register state
+ * pointed to by xrs_ptr is platform-dependent.
+ *
+ * Note: a platform may or may not manage extra register state.
+ */
+typedef struct
+ {
+ unsigned int xrs_id; /* indicates xrs_ptr validity */
+ void * xrs_ptr; /* ptr to extra reg state */
+ } xrs_t;
+
+#define XRS_ID 0x78727300 /* the string "xrs" */
+
+typedef struct
+ {
+ gregset_t gregs; /* general register set */
+ gwindows_t *gwins; /* POSSIBLE pointer to register windows */
+ fpregset_t fpregs; /* floating point register set */
+ xrs_t xrs; /* POSSIBLE extra register state association */
+ long filler[19];
+ } mcontext_t;
+
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long uc_flags;
+ struct ucontext *uc_link;
+ unsigned long uc_sigmask[4]; /* a svr4 sigset_t */
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long uc_filler[23];
+ } ucontext_t;
+#endif /* __WORDSIZE == 32 */
#endif /* sys/ucontext.h */
diff --git a/sysdeps/wordsize-32/bits/elfclass.h b/sysdeps/wordsize-32/bits/elfclass.h
deleted file mode 100644
index 7d9ea28..0000000
--- a/sysdeps/wordsize-32/bits/elfclass.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This file specifies the native word size of the machine, which indicates
- the ELF file class used for executables and shared objects on this
- machine. */
-
-#ifndef _LINK_H
-# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
-#endif
-
-#define __ELF_NATIVE_CLASS 32
diff --git a/sysdeps/wordsize-32/bits/environments.h b/sysdeps/wordsize-32/bits/wordsize.h
index 8d1403f..62dad0c 100644
--- a/sysdeps/wordsize-32/bits/environments.h
+++ b/sysdeps/wordsize-32/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,16 +16,4 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _UNISTD_H
-# error "Never include this file directly. Use <unistd.h> instead"
-#endif
-
-/* By default we have 32-bit wide `int', `long int', pointers and `off_t'. */
-#define _XBS5_ILP32_OFF32 1
-
-/* We optionally provide an environment with the above size but an 64-bit
- side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */
-
-/* We can never provide environments with 64-bit wide pointers. */
-#define _XBS5_LP64_OFF64 -1
-#define _XBS5_LPBIG_OFFBIG -1
+#define __WORDSIZE 32
diff --git a/sysdeps/wordsize-32/inttypes.h b/sysdeps/wordsize-32/inttypes.h
deleted file mode 100644
index 2e34e97..0000000
--- a/sysdeps/wordsize-32/inttypes.h
+++ /dev/null
@@ -1,388 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/*
- * ISO C 9X: 7.5 Format conversion of integer types <inttypes.h>
- */
-
-#ifndef _INTTYPES_H
-#define _INTTYPES_H 1
-
-#include <features.h>
-/* Get the type definitions. */
-#include <stdint.h>
-
-
-/* The ISO C 9X standard specifies that these macros must only be
- defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
-
-/* Macros for printing format specifiers. */
-
-/* Decimal notation. */
-# define PRId8 "d"
-# define PRId16 "d"
-# define PRId32 "d"
-# define PRId64 "lld"
-
-# define PRIdLEAST8 "d"
-# define PRIdLEAST16 "d"
-# define PRIdLEAST32 "d"
-# define PRIdLEAST64 "lld"
-
-# define PRIdFAST8 "d"
-# define PRIdFAST16 "d"
-# define PRIdFAST32 "d"
-# define PRIdFAST64 "lld"
-
-
-# define PRIi8 "i"
-# define PRIi16 "i"
-# define PRIi32 "i"
-# define PRIi64 "lli"
-
-# define PRIiLEAST8 "i"
-# define PRIiLEAST16 "i"
-# define PRIiLEAST32 "i"
-# define PRIiLEAST64 "lli"
-
-# define PRIiFAST8 "i"
-# define PRIiFAST16 "i"
-# define PRIiFAST32 "i"
-# define PRIiFAST64 "lli"
-
-/* Octal notation. */
-# define PRIo8 "o"
-# define PRIo16 "o"
-# define PRIo32 "o"
-# define PRIo64 "llo"
-
-# define PRIoLEAST8 "o"
-# define PRIoLEAST16 "o"
-# define PRIoLEAST32 "o"
-# define PRIoLEAST64 "llo"
-
-# define PRIoFAST8 "o"
-# define PRIoFAST16 "o"
-# define PRIoFAST32 "o"
-# define PRIoFAST64 "llo"
-
-/* Unsigned integers. */
-# define PRIu8 "u"
-# define PRIu16 "u"
-# define PRIu32 "u"
-# define PRIu64 "llu"
-
-# define PRIuLEAST8 "u"
-# define PRIuLEAST16 "u"
-# define PRIuLEAST32 "u"
-# define PRIuLEAST64 "llu"
-
-# define PRIuFAST8 "u"
-# define PRIuFAST16 "u"
-# define PRIuFAST32 "u"
-# define PRIuFAST64 "llu"
-
-/* lowercase hexadecimal notation. */
-# define PRIx8 "x"
-# define PRIx16 "x"
-# define PRIx32 "x"
-# define PRIx64 "llx"
-
-# define PRIxLEAST8 "x"
-# define PRIxLEAST16 "x"
-# define PRIxLEAST32 "x"
-# define PRIxLEAST64 "llx"
-
-# define PRIxFAST8 "x"
-# define PRIxFAST16 "x"
-# define PRIxFAST32 "x"
-# define PRIxFAST64 "llx"
-
-/* UPPERCASE hexadecimal notation. */
-# define PRIX8 "X"
-# define PRIX16 "X"
-# define PRIX32 "X"
-# define PRIX64 "llX"
-
-# define PRIXLEAST8 "X"
-# define PRIXLEAST16 "X"
-# define PRIXLEAST32 "X"
-# define PRIXLEAST64 "llX"
-
-# define PRIXFAST8 "X"
-# define PRIXFAST16 "X"
-# define PRIXFAST32 "X"
-# define PRIXFAST64 "llX"
-
-
-/* Macros for printing `intmax_t' and `uintmax_t'. */
-# define PRIdMAX "lld"
-# define PRIiMAX "lli"
-# define PRIoMAX "llo"
-# define PRIuMAX "llu"
-# define PRIxMAX "llx"
-# define PRIXMAX "llX"
-
-
-/* Macros for printing `intptr_t' and `uintptr_t'. */
-# define PRIdPTR "d"
-# define PRIiPTR "i"
-# define PRIoPTR "o"
-# define PRIuPTR "u"
-# define PRIxPTR "x"
-# define PRIXPTR "X"
-
-
-/* Macros for scanning format specifiers. */
-
-/* Signed decimal notation. */
-# define SCNd8 "hhd"
-# define SCNd16 "hd"
-# define SCNd32 "d"
-# define SCNd64 "lld"
-
-# define SCNdLEAST8 "hhd"
-# define SCNdLEAST16 "hd"
-# define SCNdLEAST32 "d"
-# define SCNdLEAST64 "lld"
-
-# define SCNdFAST8 "hhd"
-# define SCNdFAST16 "d"
-# define SCNdFAST32 "d"
-# define SCNdFAST64 "lld"
-
-/* Signed decimal notation. */
-# define SCNi8 "hhi"
-# define SCNi16 "hi"
-# define SCNi32 "i"
-# define SCNi64 "lli"
-
-# define SCNiLEAST8 "hhi"
-# define SCNiLEAST16 "hi"
-# define SCNiLEAST32 "i"
-# define SCNiLEAST64 "lli"
-
-# define SCNiFAST8 "hhi"
-# define SCNiFAST16 "i"
-# define SCNiFAST32 "i"
-# define SCNiFAST64 "lli"
-
-/* Unsigned decimal notation. */
-# define SCNu8 "hhu"
-# define SCNu16 "hu"
-# define SCNu32 "u"
-# define SCNu64 "llu"
-
-# define SCNuLEAST8 "hhu"
-# define SCNuLEAST16 "hu"
-# define SCNuLEAST32 "u"
-# define SCNuLEAST64 "llu"
-
-# define SCNuFAST8 "hhu"
-# define SCNuFAST16 "u"
-# define SCNuFAST32 "u"
-# define SCNuFAST64 "llu"
-
-/* Octal notation. */
-# define SCNo8 "hho"
-# define SCNo16 "ho"
-# define SCNo32 "o"
-# define SCNo64 "llo"
-
-# define SCNoLEAST8 "hho"
-# define SCNoLEAST16 "ho"
-# define SCNoLEAST32 "o"
-# define SCNoLEAST64 "llo"
-
-# define SCNoFAST8 "hho"
-# define SCNoFAST16 "o"
-# define SCNoFAST32 "o"
-# define SCNoFAST64 "llo"
-
-/* Hexadecimal notation. */
-# define SCNx8 "hhx"
-# define SCNx16 "hx"
-# define SCNx32 "x"
-# define SCNx64 "llx"
-
-# define SCNxLEAST8 "hhx"
-# define SCNxLEAST16 "hx"
-# define SCNxLEAST32 "x"
-# define SCNxLEAST64 "llx"
-
-# define SCNxFAST8 "hhx"
-# define SCNxFAST16 "x"
-# define SCNxFAST32 "x"
-# define SCNxFAST64 "llx"
-
-
-/* Macros for scanning `intmax_t' and `uintmax_t'. */
-# define SCNdMAX "lld"
-# define SCNiMAX "lli"
-# define SCNoMAX "llo"
-# define SCNuMAX "llu"
-# define SCNxMAX "llx"
-
-/* Macros for scaning `intptr_t' and `uintptr_t'. */
-# define SCNdPTR "d"
-# define SCNiPTR "i"
-# define SCNoPTR "o"
-# define SCNuPTR "u"
-# define SCNxPTR "x"
-
-#endif /* C++ && format macros */
-
-
-__BEGIN_DECLS
-
-/* We have to define the `uintmax_t' type using `lldiv_t'. */
-#ifndef __lldiv_t_defined
-/* Returned by `lldiv'. */
-__extension__ typedef struct
- {
- long long int quot; /* Quotient. */
- long long int rem; /* Remainder. */
- } lldiv_t;
-# define __lldiv_t_defined 1
-#endif
-
-/* Returned by `imaxdiv'. */
-typedef lldiv_t imaxdiv_t;
-
-
-/* Compute absolute value of N. */
-extern intmax_t imaxabs __P ((intmax_t __n)) __attribute__ ((__const__));
-
-/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
-extern imaxdiv_t imaxdiv __P ((intmax_t __numer, intmax_t __denom))
- __attribute__ ((__const__));
-
-/* Like `strtol' but convert to `intmax_t'. */
-extern intmax_t strtoimax __P ((__const char *__restrict __nptr,
- char **__restrict __endptr, int __base));
-
-/* Like `strtoul' but convert to `uintmax_t'. */
-extern uintmax_t strtoumax __P ((__const char * __restrict __nptr,
- char ** __restrict __endptr, int __base));
-
-/* Like `wcstol' but convert to `intmax_t'. */
-extern intmax_t wcstoimax __P ((__const wchar_t * __restrict __nptr,
- wchar_t **__restrict __endptr, int __base));
-
-/* Like `wcstoul' but convert to `uintmax_t'. */
-extern uintmax_t wcstoumax __P ((__const wchar_t * __restrict __nptr,
- wchar_t ** __restrict __endptr, int __base));
-
-#ifdef __USE_EXTERN_INLINES
-
-/* We ant to use the appropriate functions from <stdlib.h> but cannot
- assume the header is read already. */
-__extension__ extern long long int llabs __P ((long long int __x))
- __attribute__ ((__const__));
-__extension__ extern lldiv_t lldiv __P ((long long int __numer,
- long long int __denom))
- __attribute__ ((__const__));
-
-
-/* Compute absolute value of N. */
-extern __inline intmax_t
-imaxabs (intmax_t __n) __THROW
-{
- return llabs (__n);
-}
-
-/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
-extern __inline imaxdiv_t
-imaxdiv (intmax_t __numer, intmax_t __denom) __THROW
-{
- return lldiv (__numer, __denom);
-}
-
-/* Like `strtol' but convert to `intmax_t'. */
-# ifndef __strtoll_internal_defined
-__extension__
-extern long long int __strtoll_internal __P ((__const char *__restrict __nptr,
- char **__restrict __endptr,
- int __base, int __group));
-# define __strtoll_internal_defined 1
-# endif
-extern __inline intmax_t
-strtoimax (__const char *__restrict nptr, char **__restrict endptr,
- int base) __THROW
-{
- return __strtoll_internal (nptr, endptr, base, 0);
-}
-
-/* Like `strtoul' but convert to `uintmax_t'. */
-# ifndef __strtoull_internal_defined
-__extension__
-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
-extern __inline uintmax_t
-strtoumax (__const char *__restrict nptr, char **__restrict endptr,
- int base) __THROW
-{
- return __strtoull_internal (nptr, endptr, base, 0);
-}
-
-/* Like `wcstol' but convert to `intmax_t'. */
-# ifndef __wcstoll_internal_defined
-__extension__
-extern long long int __wcstoll_internal __P ((__const wchar_t *
- __restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, int __group));
-# define __wcstoll_internal_defined 1
-# endif
-extern __inline intmax_t
-wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
- int base) __THROW
-{
- return __wcstoll_internal (nptr, endptr, base, 0);
-}
-
-
-/* Like `wcstoul' but convert to `uintmax_t'. */
-# ifndef __wcstoull_internal_defined
-__extension__
-extern unsigned long long int __wcstoull_internal __P ((__const wchar_t *
- __restrict __nptr,
- wchar_t **
- __restrict __endptr,
- int __base,
- int __group));
-# define __wcstoull_internal_defined 1
-# endif
-extern __inline uintmax_t
-wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
- int base) __THROW
-{
- return __wcstoull_internal (nptr, endptr, base, 0);
-}
-#endif /* Use extern inlines. */
-
-__END_DECLS
-
-#endif /* inttypes.h */
diff --git a/sysdeps/wordsize-32/stdint.h b/sysdeps/wordsize-32/stdint.h
deleted file mode 100644
index a96e79e..0000000
--- a/sysdeps/wordsize-32/stdint.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/*
- * ISO C 9X: 7.18 Integer types <stdint.h>
- */
-
-#ifndef _STDINT_H
-#define _STDINT_H 1
-
-#include <features.h>
-#define __need_wchar_t
-#include <stddef.h>
-
-/* Exact integral types. */
-
-/* Signed. */
-
-/* There is some amount of overlap with <sys/types.h> as known by inet code */
-#ifndef __int8_t_defined
-# define __int8_t_defined
-typedef signed char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-__extension__
-typedef long long int int64_t;
-#endif
-
-/* Unsigned. */
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-__extension__
-typedef unsigned long long int uint64_t;
-
-
-/* Small types. */
-
-/* Signed. */
-typedef signed char int_least8_t;
-typedef short int int_least16_t;
-typedef int int_least32_t;
-__extension__
-typedef long long int int_least64_t;
-
-/* Unsigned. */
-typedef unsigned char uint_least8_t;
-typedef unsigned short int uint_least16_t;
-typedef unsigned int uint_least32_t;
-__extension__
-typedef unsigned long long int uint_least64_t;
-
-
-/* Fast types. */
-
-/* Signed. */
-typedef signed char int_fast8_t;
-typedef int int_fast16_t;
-typedef int int_fast32_t;
-__extension__
-typedef long long int int_fast64_t;
-
-/* Unsigned. */
-typedef unsigned char uint_fast8_t;
-typedef unsigned int uint_fast16_t;
-typedef unsigned int uint_fast32_t;
-__extension__
-typedef unsigned long long int uint_fast64_t;
-
-
-/* Types for `void *' pointers. */
-#ifndef intptr_t
-typedef int intptr_t;
-# define intptr_t intptr_t
-#endif
-typedef unsigned int uintptr_t;
-
-
-/* Largest integral types. */
-__extension__ typedef long long int intmax_t;
-__extension__ typedef unsigned long long int uintmax_t;
-
-
-/* The ISO C 9X standard specifies that in C++ implementations these
- macros should only be defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
-
-/* Limits of integral types. */
-
-/* Minimum of signed integral types. */
-# define INT8_MIN (-128)
-# define INT16_MIN (-32767-1)
-# define INT32_MIN (-2147483647-1)
-# define INT64_MIN (-9223372036854775807LL-1)
-/* Maximum of signed integral types. */
-# define INT8_MAX (127)
-# define INT16_MAX (32767)
-# define INT32_MAX (2147483647)
-# define INT64_MAX (9223372036854775807LL)
-
-/* Maximum of unsigned integral types. */
-# define UINT8_MAX (255U)
-# define UINT16_MAX (65535U)
-# define UINT32_MAX (4294967295U)
-# define UINT64_MAX (18446744073709551615ULL)
-
-
-/* Minimum of signed integral types having a minimum size. */
-# define INT_LEAST8_MIN (-128)
-# define INT_LEAST16_MIN (-32767-1)
-# define INT_LEAST32_MIN (-2147483647-1)
-# define INT_LEAST64_MIN (-9223372036854775807LL-1)
-/* Maximum of signed integral types having a minimum size. */
-# define INT_LEAST8_MAX (127)
-# define INT_LEAST16_MAX (32767)
-# define INT_LEAST32_MAX (2147483647)
-# define INT_LEAST64_MAX (9223372036854775807LL)
-
-/* Maximum of unsigned integral types having a minimum size. */
-# define UINT_LEAST8_MAX (255U)
-# define UINT_LEAST16_MAX (65535U)
-# define UINT_LEAST32_MAX (4294967295U)
-# define UINT_LEAST64_MAX (18446744073709551615ULL)
-
-
-/* Minimum of fast signed integral types having a minimum size. */
-# define INT_FAST8_MIN (-128)
-# define INT_FAST16_MIN (-2147483647-1)
-# define INT_FAST32_MIN (-2147483647-1)
-# define INT_FAST64_MIN (-9223372036854775807LL-1)
-/* Maximum of fast signed integral types having a minimum size. */
-# define INT_FAST8_MAX (127)
-# define INT_FAST16_MAX (2147483647)
-# define INT_FAST32_MAX (2147483647)
-# define INT_FAST64_MAX (9223372036854775807LL)
-
-/* Maximum of fast unsigned integral types having a minimum size. */
-# define UINT_FAST8_MAX (255U)
-# define UINT_FAST16_MAX (4294967295U)
-# define UINT_FAST32_MAX (4294967295U)
-# define UINT_FAST64_MAX (18446744073709551615ULL)
-
-
-/* Values to test for integral types holding `void *' pointer. */
-# define INTPTR_MIN (-2147483647-1)
-# define INTPTR_MAX (2147483647)
-# define UINTPTR_MAX (4294967295U)
-
-
-/* Minimum for largest signed integral type. */
-# define INTMAX_MIN (-9223372036854775807LL-1)
-/* Maximum for largest signed integral type. */
-# define INTMAX_MAX (9223372036854775807LL)
-
-/* Maximum for largest unsigned integral type. */
-# define UINTMAX_MAX (18446744073709551615ULL)
-
-
-/* Limits of other integer types. */
-
-/* Limits of `ptrdiff_t' type. */
-# define PTRDIFF_MIN (-2147483647-1)
-# define PTRDIFF_MAX (2147483647)
-
-/* Limits of `sig_atomic_t'. */
-# define SIG_ATOMIC_MIN (-2147483647-1)
-# define SIG_ATOMIC_MAX (2147483647)
-
-/* Limit of `size_t' type. */
-# define SIZE_MAX (4294967295U)
-
-/* Limits of `wchar_t'. */
-# ifndef WCHAR_MIN
-/* These constants might also be defined in <wchar.h>. */
-# define WCHAR_MIN (-2147483647-1)
-# define WCHAR_MAX (2147483647)
-# endif
-
-/* Limits of `wint_t'. */
-# define WINT_MIN (0)
-# define WINT_MAX (4294967295U)
-
-#endif /* C++ && limit macros */
-
-
-/* The ISO C 9X standard specifies that in C++ implementations these
- should only be defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
-/* Signed. */
-# define INT8_C(c) c
-# define INT16_C(c) c
-# define INT32_C(c) c
-# define INT64_C(c) c ## LL
-
-/* Unsigned. */
-# define UINT8_C(c) c ## U
-# define UINT16_C(c) c ## U
-# define UINT32_C(c) c ## U
-# define UINT64_C(c) c ## ULL
-
-/* Maximal type. */
-# define INTMAX_C(c) c ## LL
-# define UINTMAX_C(c) c ## ULL
-
-#endif /* C++ && constant macros */
-
-#endif /* stdint.h */
diff --git a/sysdeps/wordsize-64/bits/elfclass.h b/sysdeps/wordsize-64/bits/elfclass.h
deleted file mode 100644
index bf76faf..0000000
--- a/sysdeps/wordsize-64/bits/elfclass.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This file specifies the native word size of the machine, which indicates
- the ELF file class used for executables and shared objects on this
- machine. */
-
-#ifndef _LINK_H
-# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
-#endif
-
-#define __ELF_NATIVE_CLASS 64
diff --git a/sysdeps/wordsize-64/bits/wordsize.h b/sysdeps/wordsize-64/bits/wordsize.h
new file mode 100644
index 0000000..c96c5fc
--- /dev/null
+++ b/sysdeps/wordsize-64/bits/wordsize.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __WORDSIZE 64
diff --git a/sysdeps/wordsize-64/inttypes.h b/sysdeps/wordsize-64/inttypes.h
deleted file mode 100644
index cb69e4c..0000000
--- a/sysdeps/wordsize-64/inttypes.h
+++ /dev/null
@@ -1,379 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/*
- * ISO C 9X: 7.4 Integral types <inttypes.h>
- */
-
-#ifndef _INTTYPES_H
-#define _INTTYPES_H 1
-
-#include <features.h>
-/* Get the type definitions. */
-#include <stdint.h>
-
-
-/* The ISO C 9X standard specifies that these macros must only be
- defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
-
-/* Macros for printing format specifiers. */
-
-/* Decimal notation. */
-# define PRId8 "d"
-# define PRId16 "d"
-# define PRId32 "d"
-# define PRId64 "ld"
-
-# define PRIdLEAST8 "d"
-# define PRIdLEAST16 "d"
-# define PRIdLEAST32 "d"
-# define PRIdLEAST64 "ld"
-
-# define PRIdFAST8 "d"
-# define PRIdFAST16 "d"
-# define PRIdFAST32 "d"
-# define PRIdFAST64 "ld"
-
-
-# define PRIi8 "i"
-# define PRIi16 "i"
-# define PRIi32 "i"
-# define PRIi64 "li"
-
-# define PRIiLEAST8 "i"
-# define PRIiLEAST16 "i"
-# define PRIiLEAST32 "i"
-# define PRIiLEAST64 "li"
-
-# define PRIiFAST8 "i"
-# define PRIiFAST16 "i"
-# define PRIiFAST32 "i"
-# define PRIiFAST64 "li"
-
-/* Octal notation. */
-# define PRIo8 "o"
-# define PRIo16 "o"
-# define PRIo32 "o"
-# define PRIo64 "lo"
-
-# define PRIoLEAST8 "o"
-# define PRIoLEAST16 "o"
-# define PRIoLEAST32 "o"
-# define PRIoLEAST64 "lo"
-
-# define PRIoFAST8 "o"
-# define PRIoFAST16 "o"
-# define PRIoFAST32 "o"
-# define PRIoFAST64 "lo"
-
- /* Unsigned integers. */
-# define PRIu8 "u"
-# define PRIu16 "u"
-# define PRIu32 "u"
-# define PRIu64 "lu"
-
-# define PRIuLEAST8 "u"
-# define PRIuLEAST16 "u"
-# define PRIuLEAST32 "u"
-# define PRIuLEAST64 "lu"
-
-# define PRIuFAST8 "u"
-# define PRIuFAST16 "u"
-# define PRIuFAST32 "u"
-# define PRIuFAST64 "lu"
-
-/* lowercase hexadecimal notation. */
-# define PRIx8 "x"
-# define PRIx16 "x"
-# define PRIx32 "x"
-# define PRIx64 "lx"
-
-# define PRIxLEAST8 "x"
-# define PRIxLEAST16 "x"
-# define PRIxLEAST32 "x"
-# define PRIxLEAST64 "lx"
-
-# define PRIxFAST8 "x"
-# define PRIxFAST16 "x"
-# define PRIxFAST32 "x"
-# define PRIxFAST64 "lx"
-
-/* UPPERCASE hexadecimal notation. */
-# define PRIX8 "X"
-# define PRIX16 "X"
-# define PRIX32 "X"
-# define PRIX64 "lX"
-
-# define PRIXLEAST8 "X"
-# define PRIXLEAST16 "X"
-# define PRIXLEAST32 "X"
-# define PRIXLEAST64 "lX"
-
-# define PRIXFAST8 "X"
-# define PRIXFAST16 "X"
-# define PRIXFAST32 "X"
-# define PRIXFAST64 "lX"
-
-
-/* Macros for printing `intmax_t' and `uintmax_t'. */
-# define PRIdMAX "ld"
-# define PRIiMAX "li"
-# define PRIoMAX "lo"
-# define PRIuMAX "lu"
-# define PRIxMAX "lx"
-# define PRIXMAX "lX"
-
-
-/* Macros for printing `intptr_t' and `uintptr_t'. */
-# define PRIdPTR "ld"
-# define PRIiPTR "li"
-# define PRIoPTR "lo"
-# define PRIuPTR "lu"
-# define PRIxPTR "lx"
-# define PRIXPTR "lX"
-
-
-/* Macros for printing format specifiers. */
-
-/* Signed decimal notation. */
-# define SCNd8 "hhd"
-# define SCNd16 "hd"
-# define SCNd32 "d"
-# define SCNd64 "ld"
-
-# define SCNdLEAST8 "hhd"
-# define SCNdLEAST16 "hd"
-# define SCNdLEAST32 "d"
-# define SCNdLEAST64 "ld"
-
-# define SCNdFAST8 "hhd"
-# define SCNdFAST16 "ld"
-# define SCNdFAST32 "ld"
-# define SCNdFAST64 "ld"
-
-/* Signed decimal notation. */
-# define SCNi8 "hhi"
-# define SCNi16 "hi"
-# define SCNi32 "i"
-# define SCNi64 "li"
-
-# define SCNiLEAST8 "hhi"
-# define SCNiLEAST16 "hi"
-# define SCNiLEAST32 "i"
-# define SCNiLEAST64 "li"
-
-# define SCNiFAST8 "hhi"
-# define SCNiFAST16 "li"
-# define SCNiFAST32 "li"
-# define SCNiFAST64 "li"
-
-/* Octal notation. */
-# define SCNo8 "hho"
-# define SCNo16 "ho"
-# define SCNo32 "o"
-# define SCNo64 "lo"
-
-# define SCNoLEAST8 "hho"
-# define SCNoLEAST16 "ho"
-# define SCNoLEAST32 "o"
-# define SCNoLEAST64 "lo"
-
-# define SCNoFAST8 "hho"
-# define SCNoFAST16 "lo"
-# define SCNoFAST32 "lo"
-# define SCNoFAST64 "lo"
-
-/* Unsigned decimal notation. */
-# define SCNu8 "hhu"
-# define SCNu16 "hu"
-# define SCNu32 "u"
-# define SCNu64 "lu"
-
-# define SCNuLEAST8 "hhu"
-# define SCNuLEAST16 "hu"
-# define SCNuLEAST32 "u"
-# define SCNuLEAST64 "lu"
-
-# define SCNuFAST8 "hhu"
-# define SCNuFAST16 "lu"
-# define SCNuFAST32 "lu"
-# define SCNuFAST64 "lu"
-
-/* Hexadecimal notation. */
-# define SCNx8 "hhx"
-# define SCNx16 "hx"
-# define SCNx32 "x"
-# define SCNx64 "lx"
-
-# define SCNxLEAST8 "hhx"
-# define SCNxLEAST16 "hx"
-# define SCNxLEAST32 "x"
-# define SCNxLEAST64 "lx"
-
-# define SCNxFAST8 "hhx"
-# define SCNxFAST16 "lx"
-# define SCNxFAST32 "lx"
-# define SCNxFAST64 "lx"
-
-
-/* Macros for scanning `intmax_t' and `uintmax_t'. */
-# define SCNdMAX "ld"
-# define SCNiMAX "li"
-# define SCNoMAX "lo"
-# define SCNuMAX "lu"
-# define SCNxMAX "lx"
-
-/* Macros for scanning `intptr_t' and `uintptr_t'. */
-# define SCNdPTR "ld"
-# define SCNiPTR "li"
-# define SCNoPTR "lo"
-# define SCNuPTR "lu"
-# define SCNxPTR "lx"
-
-#endif /* C++ && format macros */
-
-
-__BEGIN_DECLS
-
-/* We have to define the `uintmax_t' type using `ldiv_t'. */
-#ifndef __ldiv_t_defined
-/* Returned by `ldiv'. */
-typedef struct
- {
- long int quot; /* Quotient. */
- long int rem; /* Remainder. */
- } ldiv_t;
-# define __ldiv_t_defined 1
-#endif
-
-/* Returned by `imaxdiv'. */
-typedef ldiv_t imaxdiv_t;
-
-
-/* Compute absolute value of N. */
-extern intmax_t imaxabs __P ((intmax_t __n)) __attribute__ ((__const__));
-
-/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
-extern imaxdiv_t imaxdiv __P ((intmax_t __numer, intmax_t __denom))
- __attribute__ ((__const__));
-
-/* Like `strtol' but convert to `intmax_t'. */
-extern intmax_t strtoimax __P ((__const char *__restrict __nptr,
- char **__restrict __endptr, int __base));
-
-/* Like `strtoul' but convert to `uintmax_t'. */
-extern uintmax_t strtoumax __P ((__const char * __restrict __nptr,
- char ** __restrict __endptr, int __base));
-
-/* Like `wcstol' but convert to `intmax_t'. */
-extern intmax_t wcstoimax __P ((__const wchar_t * __restrict __nptr,
- wchar_t **__restrict __endptr, int __base));
-
-/* Like `wcstoul' but convert to `uintmax_t'. */
-extern uintmax_t wcstoumax __P ((__const wchar_t * __restrict __nptr,
- wchar_t ** __restrict __endptr, int __base));
-
-#ifdef __USE_EXTERN_INLINES
-
-/* We ant to use the appropriate functions from <stdlib.h> but cannot
- assume the header is read already. */
-__extension__ extern long int labs __P ((long int __x))
- __attribute__ ((__const__));
-__extension__ extern ldiv_t ldiv __P ((long int __numer, long int __denom))
- __attribute__ ((__const__));
-
-
-/* Compute absolute value of N. */
-extern __inline intmax_t
-imaxabs (intmax_t __n) __THROW
-{
- return labs (__n);
-}
-
-/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
-extern __inline imaxdiv_t
-imaxdiv (intmax_t __numer, intmax_t __denom) __THROW
-{
- return ldiv (__numer, __denom);
-}
-
-/* Like `strtol' but convert to `intmax_t'. */
-# 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
-extern __inline intmax_t
-strtoimax (__const char *__restrict nptr, char **__restrict endptr,
- int base) __THROW
-{
- return __strtol_internal (nptr, endptr, base, 0);
-}
-
-/* Like `strtoul' but convert to `uintmax_t'. */
-# 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
-extern __inline uintmax_t
-strtoumax (__const char *__restrict nptr, char **__restrict endptr,
- int base) __THROW
-{
- return __strtoul_internal (nptr, endptr, base, 0);
-}
-
-/* Like `wcstol' but convert to `intmax_t'. */
-# ifndef __wcstol_internal_defined
-extern long int __wcstol_internal __P ((__const wchar_t * __restrict __nptr,
- wchar_t **__restrict __endptr,
- int __base, int __group));
-# define __wcstol_internal_defined 1
-# endif
-extern __inline intmax_t
-wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
- int base) __THROW
-{
- return __wcstol_internal (nptr, endptr, base, 0);
-}
-
-
-/* Like `wcstoul' but convert to `uintmax_t'. */
-# ifndef __wcstoul_internal_defined
-extern unsigned long int __wcstoul_internal __P ((__const wchar_t *
- __restrict __nptr,
- wchar_t **
- __restrict __endptr,
- int __base, int __group));
-# define __wcstoul_internal_defined 1
-# endif
-extern __inline uintmax_t
-wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
- int base) __THROW
-{
- return __wcstoul_internal (nptr, endptr, base, 0);
-}
-#endif /* Use extern inlines. */
-
-__END_DECLS
-
-#endif /* inttypes.h */
diff --git a/sysdeps/wordsize-64/stdint.h b/sysdeps/wordsize-64/stdint.h
deleted file mode 100644
index 9719f49..0000000
--- a/sysdeps/wordsize-64/stdint.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/*
- * ISO C 9X: 7.18 Integer types <stdint.h>
- */
-
-#ifndef _STDINT_H
-#define _STDINT_H 1
-
-#include <features.h>
-#define __need_wchar_t
-#include <stddef.h>
-
-/* Exact integral types. */
-
-/* Signed. */
-
-/* There is some amount of overlap with <sys/types.h> as known by inet code */
-#ifndef __int8_t_defined
-# define __int8_t_defined
-typedef signed char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long int int64_t;
-#endif
-
-/* Unsigned. */
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long int uint64_t;
-
-
-/* Small types. */
-
-/* Signed. */
-typedef signed char int_least8_t;
-typedef short int int_least16_t;
-typedef int int_least32_t;
-typedef long int int_least64_t;
-
-/* Unsigned. */
-typedef unsigned char uint_least8_t;
-typedef unsigned short int uint_least16_t;
-typedef unsigned int uint_least32_t;
-typedef unsigned long int uint_least64_t;
-
-
-/* Fast types. */
-
-/* Signed. */
-typedef signed char int_fast8_t;
-typedef long int int_fast16_t;
-typedef long int int_fast32_t;
-typedef long int int_fast64_t;
-
-/* Unsigned. */
-typedef unsigned char uint_fast8_t;
-typedef unsigned long int uint_fast16_t;
-typedef unsigned long int uint_fast32_t;
-typedef unsigned long int uint_fast64_t;
-
-
-/* Types for `void *' pointers. */
-#ifndef intptr_t
-typedef long int intptr_t;
-# define intptr_t intptr_t
-#endif
-typedef unsigned long int uintptr_t;
-
-
-/* Largest integral types. */
-typedef long int intmax_t;
-typedef unsigned long int uintmax_t;
-
-
-/* The ISO C 9X standard specifies that in C++ implementations these
- macros should only be defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
-
-/* Limits of integral types. */
-
-/* Minimum of signed integral types. */
-# define INT8_MIN (-128)
-# define INT16_MIN (-32767-1)
-# define INT32_MIN (-2147483647-1)
-# define INT64_MIN (-9223372036854775807L-1)
-/* Maximum of signed integral types. */
-# define INT8_MAX (127)
-# define INT16_MAX (32767)
-# define INT32_MAX (2147483647)
-# define INT64_MAX (9223372036854775807L)
-
-/* Maximum of unsigned integral types. */
-# define UINT8_MAX (255U)
-# define UINT16_MAX (65535U)
-# define UINT32_MAX (4294967295U)
-# define UINT64_MAX (18446744073709551615UL)
-
-
-/* Minimum of signed integral types having a minimum size. */
-# define INT_LEAST8_MIN (-128)
-# define INT_LEAST16_MIN (-32767-1)
-# define INT_LEAST32_MIN (-2147483647-1)
-# define INT_LEAST64_MIN (-9223372036854775807L-1)
-/* Maximum of signed integral types having a minimum size. */
-# define INT_LEAST8_MAX (127)
-# define INT_LEAST16_MAX (32767)
-# define INT_LEAST32_MAX (2147483647)
-# define INT_LEAST64_MAX (9223372036854775807L)
-
-/* Maximum of unsigned integral types having a minimum size. */
-# define UINT_LEAST8_MAX (255U)
-# define UINT_LEAST16_MAX (65535U)
-# define UINT_LEAST32_MAX (4294967295U)
-# define UINT_LEAST64_MAX (18446744073709551615UL)
-
-
-/* Minimum of fast signed integral types having a minimum size. */
-# define INT_FAST8_MIN (-128)
-# define INT_FAST16_MIN (-9223372036854775807L-1)
-# define INT_FAST32_MIN (-9223372036854775807L-1)
-# define INT_FAST64_MIN (-9223372036854775807L-1)
-/* Maximum of fast signed integral types having a minimum size. */
-# define INT_FAST8_MAX (127)
-# define INT_FAST16_MAX (9223372036854775807L)
-# define INT_FAST32_MAX (9223372036854775807L)
-# define INT_FAST64_MAX (9223372036854775807L)
-
-/* Maximum of fast unsigned integral types having a minimum size. */
-# define UINT_FAST8_MAX (255U)
-# define UINT_FAST16_MAX (18446744073709551615UL)
-# define UINT_FAST32_MAX (18446744073709551615UL)
-# define UINT_FAST64_MAX (18446744073709551615UL)
-
-
-/* Values to test for integral types holding `void *' pointer. */
-# define INTPTR_MIN (-9223372036854775807L-1)
-# define INTPTR_MAX (9223372036854775807L)
-# define UINTPTR_MAX (18446744073709551615UL)
-
-
-/* Minimum for largest signed integral type. */
-# define INTMAX_MIN (-9223372036854775807L-1)
-/* Maximum for largest signed integral type. */
-# define INTMAX_MAX (9223372036854775807L)
-
-/* Maximum for largest unsigned integral type. */
-# define UINTMAX_MAX (18446744073709551615UL)
-
-
-/* Limits of other integer types. */
-
-/* Limits of `ptrdiff_t' type. */
-# define PTRDIFF_MIN (-9223372036854775807L-1)
-# define PTRDIFF_MAX (9223372036854775807L)
-
-/* Limits of `sig_atomic_t'. */
-# define SIG_ATOMIC_MIN (-2147483647-1)
-# define SIG_ATOMIC_MAX (2147483647)
-
-/* Limit of `size_t' type. */
-# define SIZE_MAX (18446744073709551615UL)
-
-/* Limits of `wchar_t'. */
-# ifndef WCHAR_MIN
-/* These constants might also be defined in <wchar.h>. */
-# define WCHAR_MIN (-2147483647-1)
-# define WCHAR_MAX (2147483647)
-# endif
-
-/* Limits of `wint_t'. */
-# define WINT_MIN (0)
-# define WINT_MAX (4294967295U)
-
-#endif /* C++ && limit macros */
-
-
-/* The ISO C 9X standard specifies that in C++ implementations these
- should only be defined if explicitly requested. */
-#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
-/* Signed. */
-# define INT8_C(c) c
-# define INT16_C(c) c
-# define INT32_C(c) c
-# define INT64_C(c) c ## L
-
-/* Unsigned. */
-# define UINT8_C(c) c ## U
-# define UINT16_C(c) c ## U
-# define UINT32_C(c) c ## U
-# define UINT64_C(c) c ## UL
-
-/* Maximal type. */
-# define INTMAX_C(c) c ## L
-# define UINTMAX_C(c) c ## UL
-
-#endif /* C++ && constant macros */
-
-#endif /* stdint.h */