summaryrefslogtreecommitdiff
path: root/gmp-h.in
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-09-11 01:25:34 +0200
committerKevin Ryde <user42@zip.com.au>2001-09-11 01:25:34 +0200
commit14a99fcf6bcf57135704fd76e58f8e3c967cd41f (patch)
treefdcc229954de219a9322a080c817e8cdc421d2d9 /gmp-h.in
parent0c0b0fb389a516886868c8efebf91904b3322564 (diff)
downloadgmp-14a99fcf6bcf57135704fd76e58f8e3c967cd41f.tar.gz
* gmp-h.in (__GMP_EXTERN_INLINE): Add a definition for SCO 8 cc.
Diffstat (limited to 'gmp-h.in')
-rw-r--r--gmp-h.in27
1 files changed, 19 insertions, 8 deletions
diff --git a/gmp-h.in b/gmp-h.in
index 30c55a8b7..937411f8e 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -263,14 +263,14 @@ typedef __mpq_struct *mpq_ptr;
#endif
#endif
-#if defined (FILE) \
- || defined (H_STDIO) \
- || defined (_H_STDIO) /* AIX */ \
- || defined (_STDIO_H) /* glibc, Sun */ \
- || defined (_STDIO_H_) /* BSD, OSF */ \
- || defined (__STDIO_H__) /* IRIX */ \
- || defined (_STDIO_INCLUDED) /* HPUX */ \
- || defined (__dj_include_stdio_h_) /* DJGPP */ \
+#if defined (FILE) \
+ || defined (H_STDIO) \
+ || defined (_H_STDIO) /* AIX */ \
+ || defined (_STDIO_H) /* glibc, Sun, SCO */ \
+ || defined (_STDIO_H_) /* BSD, OSF */ \
+ || defined (__STDIO_H__) /* IRIX */ \
+ || defined (_STDIO_INCLUDED) /* HPUX */ \
+ || defined (__dj_include_stdio_h_) /* DJGPP */ \
|| defined (_FILE_DEFINED) /* Microsoft */
#define _GMP_H_HAVE_FILE 1
#endif
@@ -320,10 +320,21 @@ typedef __mpq_struct *mpq_ptr;
inline" would be an acceptable substitute if the compiler (or linker)
discards unused statics. */
+/* gcc has __inline__ in all modes, including strict ansi */
#ifdef __GNUC__
#define __GMP_EXTERN_INLINE extern __inline__
#endif
+/* SCO OpenUNIX 8 cc supports extern inline, except in -Xc strict ANSI mode
+ (__STDC__ is 1 in that mode). */
+#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \
+ && ! defined (__GMP_EXTERN_INLINE)
+#define __GMP_EXTERN_INLINE extern inline
+#endif
+
+/* C++ always has "inline" and since it's a normal feature the linker should
+ discard duplicate non-inlined copies, or if it doesn't then that's a
+ problem for everyone, not just GMP */
#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE)
#define __GMP_EXTERN_INLINE inline
#endif