summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authortschwinge <tschwinge>2008-01-30 20:14:53 +0000
committertschwinge <tschwinge>2008-01-30 20:14:53 +0000
commit507c12974b6cf2ade7025693f48ad3635044ba6d (patch)
tree7f4a6e5c6b44c772ac2f5dd2669c3adbcb9a82f6 /platform
parent0dda756a2a62f04b4fe9bda8e3ddabcdbda59645 (diff)
2008-01-30 Thomas Schwinge <tschwinge@gnu.org>
* amd64/bits/wordsize.h: New file, from today's glibc CVS HEAD. * amd64/Makefile.am (noinst_HEADERS): Add it. * ia32/bits/wordsize.h: New file, from today's glibc CVS HEAD. * ia32/Makefile.am (noinst_HEADERS): Add it. * headers.m4: Link it. * README: Document it.
Diffstat (limited to 'platform')
-rw-r--r--platform/ChangeLog9
-rw-r--r--platform/README7
-rw-r--r--platform/amd64/Makefile.am6
-rw-r--r--platform/amd64/bits/wordsize.h8
-rw-r--r--platform/headers.m45
-rw-r--r--platform/ia32/Makefile.am6
-rw-r--r--platform/ia32/bits/wordsize.h19
7 files changed, 55 insertions, 5 deletions
diff --git a/platform/ChangeLog b/platform/ChangeLog
index 1ff49b0..926b4f5 100644
--- a/platform/ChangeLog
+++ b/platform/ChangeLog
@@ -1,3 +1,12 @@
+2008-01-30 Thomas Schwinge <tschwinge@gnu.org>
+
+ * amd64/bits/wordsize.h: New file, from today's glibc CVS HEAD.
+ * amd64/Makefile.am (noinst_HEADERS): Add it.
+ * ia32/bits/wordsize.h: New file, from today's glibc CVS HEAD.
+ * ia32/Makefile.am (noinst_HEADERS): Add it.
+ * headers.m4: Link it.
+ * README: Document it.
+
2008-01-26 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.am: Typo fixes.
diff --git a/platform/README b/platform/README
index 09fc7c0..561e9c9 100644
--- a/platform/README
+++ b/platform/README
@@ -13,3 +13,10 @@ ${glibc}/sysdeps/powerpc/powerpc64/bits/atomic.h powerpc64/bits/atomic.h
${glibc}/sysdeps/powerpc/bits/atomic.h powerpc/bits/atomic.h
powerpc64/bits/atomic.h
${glibc}/sysdeps/x86_64/bits/atomic.h amd64/bits/atomic.h
+
+CVS snapshot from 2008-01-30:
+
+${glibc}/sysdeps/wordsize-32/bits/wordsize.h ia32/bits/wordsize.h
+${glibc}/sysdeps/x86_64/bits/wordsize.h amd64/bits/wordsize.h
+
+Other architectures not supported for now.
diff --git a/platform/amd64/Makefile.am b/platform/amd64/Makefile.am
index 1dd9761..7ed7bc5 100644
--- a/platform/amd64/Makefile.am
+++ b/platform/amd64/Makefile.am
@@ -1,5 +1,5 @@
# Makefile.am - Makefile template for platform/amd64.
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008 Free Software Foundation, Inc.
# Written by Marcus Brinkmann.
#
# This file is part of the GNU Hurd.
@@ -18,4 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-noinst_HEADERS = bits/atomic.h
+noinst_HEADERS = \
+ bits/atomic.h \
+ bits/wordsize.h
diff --git a/platform/amd64/bits/wordsize.h b/platform/amd64/bits/wordsize.h
new file mode 100644
index 0000000..a40a0d8
--- /dev/null
+++ b/platform/amd64/bits/wordsize.h
@@ -0,0 +1,8 @@
+/* Determine the wordsize from the preprocessor defines. */
+
+#if defined __x86_64__
+# define __WORDSIZE 64
+# define __WORDSIZE_COMPAT32 1
+#else
+# define __WORDSIZE 32
+#endif
diff --git a/platform/headers.m4 b/platform/headers.m4
index c7aeb26..8c859e7 100644
--- a/platform/headers.m4
+++ b/platform/headers.m4
@@ -1,5 +1,5 @@
# headers.m4 - Autoconf snippets to install links for header files.
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004, 2008 Free Software Foundation, Inc.
# Written by Marcus Brinkmann <marcus@gnu.org>.
#
# This file is free software; as a special exception the author gives
@@ -10,8 +10,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# glibc allows for more complicated sysdep constructs, which are used, e.g.,
+# for the <bits/wordsize.h> case. We'll go for a simple solution for now.
AC_CONFIG_LINKS([
include/atomic.h:platform/atomic.h
include/bits/atomic.h:platform/${arch}/bits/atomic.h
+ include/bits/wordsize.h:platform/${arch}/bits/wordsize.h
include/compiler.h:platform/compiler.h
])
diff --git a/platform/ia32/Makefile.am b/platform/ia32/Makefile.am
index 8482ae1..86952be 100644
--- a/platform/ia32/Makefile.am
+++ b/platform/ia32/Makefile.am
@@ -1,5 +1,5 @@
# Makefile.am - Makefile template for platform/ia32.
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008 Free Software Foundation, Inc.
# Written by Marcus Brinkmann.
#
# This file is part of the GNU Hurd.
@@ -18,4 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-noinst_HEADERS = bits/atomic.h
+noinst_HEADERS = \
+ bits/atomic.h \
+ bits/wordsize.h
diff --git a/platform/ia32/bits/wordsize.h b/platform/ia32/bits/wordsize.h
new file mode 100644
index 0000000..ba643b6
--- /dev/null
+++ b/platform/ia32/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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __WORDSIZE 32