Subject: port-i386/1142: Decl in i386/include/float.h not within __BEGIN_DECLS
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: None <Mark_Weaver@brown.edu>
List: netbsd-bugs
Date: 06/20/1995 05:05:14
>Number: 1142
>Category: port-i386
>Synopsis: Decl in i386/include/float.h not within __BEGIN_DECLS
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: mhw
>Arrival-Date: Tue Jun 20 05:05:12 1995
>Originator: Mark Weaver
>Organization:
Brown University Department of Computer Science
>Release: NetBSD-current 6/7/95
>Environment:
System: NetBSD cis-ts3-slip4.cis.brown.edu 1.0A NetBSD 1.0A (WEAVER) #3: Wed Jun 7 16:51:13 EDT 1995 root@:/usr/src/sys/arch/i386/compile/WEAVER i386
>Description:
The declaration of __flt_rounds() in i386/include/float.h is
not within __BEGIN_DECLS and __END_DECLS. This breaks C++
programs which try to call __flt_rounds, since they look for
__flt_rounds__Fv instead.
>How-To-Repeat:
Include float.h from a C++ program and try to call
__flt_rounds().
>Fix:
*** src/sys/arch/i386/include/float.h.mhw1 Sat Apr 8 06:00:05 1995
--- src/sys/arch/i386/include/float.h Mon Jun 12 17:19:48 1995
***************
*** 35,41 ****
--- 35,46 ----
* @(#)float.h 7.1 (Berkeley) 5/8/90
*/
+ #include <sys/cdefs.h>
+
+ __BEGIN_DECLS
extern int __flt_rounds();
+ __END_DECLS
+
#define FLT_RADIX 2 /* b */
#define FLT_ROUNDS __flt_rounds()
>Audit-Trail:
>Unformatted: