Skip to content

Commit 7065fdf

Browse files
committed
Remove {cdefs,types}-compat.h from openlibm.h
1 parent eb2f4d4 commit 7065fdf

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/openlibm.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
#ifndef _MATH_H_
1818
#define _MATH_H_
1919

20-
#include "cdefs-compat.h"
21-
#include "types-compat.h"
20+
#if (defined(_WIN32) || defined (_MSC_VER)) && !defined(__WIN32__)
21+
#define __WIN32__
22+
#endif
23+
24+
#define __pure2
2225

2326
/*
2427
* ANSI/POSIX
@@ -172,7 +175,10 @@ extern int signgam;
172175
* effect of raising floating-point exceptions, so they are not declared
173176
* as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
174177
*/
175-
__BEGIN_DECLS
178+
179+
#if defined(__cplusplus)
180+
extern "C" {
181+
#endif
176182
/*
177183
* ANSI/POSIX
178184
*/
@@ -490,5 +496,7 @@ long double tgammal(long double);
490496
long double truncl(long double);
491497

492498
#endif /* __ISO_C_VISIBLE >= 1999 */
493-
__END_DECLS
499+
#if defined(__cplusplus)
500+
}
501+
#endif
494502
#endif /* !_MATH_H_ */

0 commit comments

Comments
 (0)