aboutsummaryrefslogtreecommitdiff
path: root/fdlibm.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-08-24 16:50:43 -0700
committerElliott Hughes <enh@google.com>2010-08-24 16:50:43 -0700
commit26ea4299bba7c618fdf97624b39e33444410896d (patch)
tree607d9fc6b748cd9c5f0ff9f14c61238d3a49af06 /fdlibm.h
parentda0692bd3a2a146aa7ea5ce30002c584761d5ad0 (diff)
downloadfdlibm-26ea4299bba7c618fdf97624b39e33444410896d.tar.gz
(I'm going to send this patch upstream.) Change-Id: I1281719ea6cc199f917919d39090cdfc90a05bf5
Diffstat (limited to 'fdlibm.h')
-rw-r--r--fdlibm.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/fdlibm.h b/fdlibm.h
index f90d5c9..d58e65f 100644
--- a/fdlibm.h
+++ b/fdlibm.h
@@ -10,14 +10,19 @@
* ====================================================
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __LITTLE_ENDIAN
/* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly
but these catch some common cases. */
-
#if defined(i386) || defined(i486) || \
defined(intel) || defined(x86) || defined(i86pc) || \
defined(__alpha) || defined(__osf__)
#define __LITTLE_ENDIAN
#endif
+#endif
#ifdef __LITTLE_ENDIAN
#define __HI(x) *(1+(int*)&x)
@@ -31,11 +36,14 @@
#define __LOp(x) *(1+(int*)x)
#endif
+#ifndef __P
+#define __FDLIBM_P_DEFINED
#ifdef __STDC__
#define __P(p) p
#else
#define __P(p) ()
#endif
+#endif
/*
* ANSI/POSIX
@@ -214,3 +222,11 @@ extern double __kernel_sin __P((double,double,int));
extern double __kernel_cos __P((double,double));
extern double __kernel_tan __P((double,double,int));
extern int __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*));
+
+#ifdef __FDLIBM_P_DEFINED
+#undef __P
+#endif
+
+#ifdef __cplusplus
+}; /* extern "C" */
+#endif