summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-23 11:30:46 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-23 11:30:46 +0000
commit9ad64b0198dc6cb892243cd0891e9f2d7cd20ef8 (patch)
tree139f6032bf8661cbe50be0e498bf661949702035
parentfb561825dba39a9b257ed334663129c502224e1b (diff)
downloadppe42-gcc-9ad64b0198dc6cb892243cd0891e9f2d7cd20ef8.tar.gz
ppe42-gcc-9ad64b0198dc6cb892243cd0891e9f2d7cd20ef8.zip
* config/os/gnu-linux/bits/os_defines.h: Include <features.h>.
If not glibc 2.1 or higher, include <gnu/types.h> and define __off64_t as __loff_t and #define __THROW as empty. * libio/libio.h [__P]: Move __THROW and __PMT into their own ifndef:s. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37695 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/config/os/gnu-linux/bits/os_defines.h19
-rw-r--r--libstdc++-v3/libio/libio.h10
3 files changed, 36 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index da450846aa1..0f6c3fdb183 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2000-11-23 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/os/gnu-linux/bits/os_defines.h: Include <features.h>.
+ If not glibc 2.1 or higher, include <gnu/types.h> and define
+ __off64_t as __loff_t and #define __THROW as empty.
+
+ * libio/libio.h [__P]: Move __THROW and __PMT into their own
+ ifndef:s.
+
2000-11-23 David Edelsohn <edelsohn@gnu.org>
* porting.texi: Expand libtool information.
diff --git a/libstdc++-v3/config/os/gnu-linux/bits/os_defines.h b/libstdc++-v3/config/os/gnu-linux/bits/os_defines.h
index a98b34892e5..3289d0c5ad4 100644
--- a/libstdc++-v3/config/os/gnu-linux/bits/os_defines.h
+++ b/libstdc++-v3/config/os/gnu-linux/bits/os_defines.h
@@ -40,6 +40,25 @@
// This keeps isanum, et al from being propagated as macros.
#define __NO_CTYPE 1
+#include <features.h>
+
+#if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+0 == 0)
+
+// The types __off_t and __off64_t are not defined through <sys/types.h>
+// as _G_config assumes. For libc5 and glibc 2.0 instead use
+// <gnu/types.h> and the old name for __off64_t.
+#include <gnu/types.h>
+typedef __loff_t __off64_t;
+
+// These systems have declarations mismatching those in libio.h by
+// omitting throw qualifiers. Cleanest way out is to not provide
+// throw-qualifiers at all. Defining it as empty here will make libio.h
+// not define it.
+#undef __THROW
+#define __THROW
+
+#endif /* not glibc 2.1 or higher. */
+
# if defined __GLIBC__ && __GLIBC__ >= 2
// We must not see the optimized string functions GNU libc defines.
# define __NO_STRING_INLINES
diff --git a/libstdc++-v3/libio/libio.h b/libstdc++-v3/libio/libio.h
index 6e5a3837551..68525a7de6b 100644
--- a/libstdc++-v3/libio/libio.h
+++ b/libstdc++-v3/libio/libio.h
@@ -55,15 +55,21 @@
# endif /* __GNUC_VA_LIST */
#endif
-#ifndef __P
+#ifndef __THROW
# ifdef __cplusplus
# define __THROW throw ()
# else
# define __THROW
# endif
+#endif /* not __THROW */
+
+#ifndef __P
# define __P(p) p __THROW
+#endif /* not __P */
+
+#ifndef __PMT
# define __PMT(p) p
-#endif /*!__P*/
+#endif /* not __PMT */
/* For backward compatibility */
#ifndef _PARAMS
OpenPOWER on IntegriCloud