summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-03-02 23:34:47 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-03-02 23:34:47 +0000
commiteb95da3f0759d8012e073a050248e06a2dcd0c26 (patch)
treefe07f963a1bb670096ef3d7ec21a74386a47dca4
parent360114fbda0a6abca495c3572c425937553146c4 (diff)
protect internal "struct excpption" from conflicting one in gcc.
-rw-r--r--lib/libm/Makefile4
-rw-r--r--lib/libm/src/math.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile
index db35e854131..86438cbcf9b 100644
--- a/lib/libm/Makefile
+++ b/lib/libm/Makefile
@@ -1,5 +1,5 @@
# $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $
-# $OpenBSD: Makefile,v 1.11 1997/09/01 02:13:12 mickey Exp $
+# $OpenBSD: Makefile,v 1.12 1998/03/02 23:34:43 millert Exp $
#
# @(#)Makefile 5.1beta 93/09/24
#
@@ -43,6 +43,8 @@
# default standard
#
+CFLAGS+= -D__LIBM_PRIVATE
+
.if (${MACHINE_ARCH} == "i386")
.PATH: ${.CURDIR}/arch/i387
ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \
diff --git a/lib/libm/src/math.h b/lib/libm/src/math.h
index 0c9a51bc941..8ef728f1400 100644
--- a/lib/libm/src/math.h
+++ b/lib/libm/src/math.h
@@ -11,7 +11,7 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
- * $Id: math.h,v 1.3 1998/03/02 00:53:19 millert Exp $
+ * $Id: math.h,v 1.4 1998/03/02 23:34:46 millert Exp $
*/
#ifndef _MATH_H_
@@ -64,7 +64,7 @@ extern _LIB_VERSION_TYPE _LIB_VERSION;
#define _XOPEN_ fdlibm_xopen
#define _POSIX_ fdlibm_posix
-#ifndef __cplusplus
+#ifdef __LIBM_PRIVATE
struct exception {
int type;
char *name;
@@ -152,7 +152,9 @@ extern double nextafter __P((double, double));
extern double remainder __P((double, double));
extern double scalb __P((double, double));
+#ifdef __LIBM_PRIVATE
extern int matherr __P((struct exception *));
+#endif
/*
* IEEE Test Vector