Skip to content

Commit 9ebc9db

Browse files
committed
Don't declare fenv.h functions when they're a macro.
libc still provides function declarations, and these declarations conflict with libc++'s llvm-svn: 353774
1 parent 8663b00 commit 9ebc9db

File tree

1 file changed

+11
-100
lines changed

1 file changed

+11
-100
lines changed

libcxx/include/fenv.h

Lines changed: 11 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -62,140 +62,51 @@ int feupdateenv(const fenv_t* envp);
6262
extern "C++" {
6363

6464
#ifdef feclearexcept
65-
_LIBCPP_INLINE_VISIBILITY
66-
inline int __libcpp_feclearexcept(int __excepts) {
67-
return feclearexcept(__excepts);
68-
}
6965
#undef feclearexcept
70-
_LIBCPP_INLINE_VISIBILITY
71-
inline int feclearexcept(int __excepts) {
72-
return ::__libcpp_feclearexcept(__excepts);
73-
}
74-
#endif // defined(feclearexcept)
66+
#endif
7567

7668
#ifdef fegetexceptflag
77-
_LIBCPP_INLINE_VISIBILITY
78-
inline int __libcpp_fegetexceptflag(fexcept_t* __out_ptr, int __excepts) {
79-
return fegetexceptflag(__out_ptr, __excepts);
80-
}
8169
#undef fegetexceptflag
82-
_LIBCPP_INLINE_VISIBILITY
83-
inline int fegetexceptflag(fexcept_t *__out_ptr, int __excepts) {
84-
return ::__libcpp_fegetexceptflag(__out_ptr, __excepts);
85-
}
86-
#endif // defined(fegetexceptflag)
70+
#endif
8771

8872

8973
#ifdef feraiseexcept
90-
_LIBCPP_INLINE_VISIBILITY
91-
inline int __libcpp_feraiseexcept(int __excepts) {
92-
return feraiseexcept(__excepts);
93-
}
9474
#undef feraiseexcept
95-
_LIBCPP_INLINE_VISIBILITY
96-
inline int feraiseexcept(int __excepts) {
97-
return ::__libcpp_feraiseexcept(__excepts);
98-
}
99-
#endif // defined(feraiseexcept)
100-
75+
#endif
10176

10277
#ifdef fesetexceptflag
103-
_LIBCPP_INLINE_VISIBILITY
104-
inline int __libcpp_fesetexceptflag(const fexcept_t* __out_ptr, int __excepts) {
105-
return fesetexceptflag(__out_ptr, __excepts);
106-
}
10778
#undef fesetexceptflag
108-
_LIBCPP_INLINE_VISIBILITY
109-
inline int fesetexceptflag(const fexcept_t *__out_ptr, int __excepts) {
110-
return ::__libcpp_fesetexceptflag(__out_ptr, __excepts);
111-
}
112-
#endif // defined(fesetexceptflag)
79+
#endif
11380

11481

11582
#ifdef fetestexcept
116-
_LIBCPP_INLINE_VISIBILITY
117-
inline int __libcpp_fetestexcept(int __excepts) {
118-
return fetestexcept(__excepts);
119-
}
12083
#undef fetestexcept
121-
_LIBCPP_INLINE_VISIBILITY
122-
inline int fetestexcept(int __excepts) {
123-
return ::__libcpp_fetestexcept(__excepts);
124-
}
125-
#endif // defined(fetestexcept)
84+
#endif
12685

12786
#ifdef fegetround
128-
_LIBCPP_INLINE_VISIBILITY
129-
inline int __libcpp_fegetround() {
130-
return fegetround();
131-
}
13287
#undef fegetround
133-
_LIBCPP_INLINE_VISIBILITY
134-
inline int fegetround() {
135-
return ::__libcpp_fegetround();
136-
}
137-
#endif // defined(fegetround)
88+
#endif
13889

13990
#ifdef fesetround
140-
_LIBCPP_INLINE_VISIBILITY
141-
inline int __libcpp_fesetround(int __round) {
142-
return fesetround(__round);
143-
}
14491
#undef fesetround
145-
_LIBCPP_INLINE_VISIBILITY
146-
inline int fesetround(int __round) {
147-
return ::__libcpp_fesetround(__round);
148-
}
149-
#endif // defined(fesetround)
92+
#endif
15093

15194
#ifdef fegetenv
152-
_LIBCPP_INLINE_VISIBILITY
153-
inline int __libcpp_fegetenv(fenv_t* __envp) {
154-
return fegetenv(__envp);
155-
}
15695
#undef fegetenv
157-
_LIBCPP_INLINE_VISIBILITY
158-
inline int fegetenv(fenv_t* __envp) {
159-
return ::__libcpp_fegetenv(__envp);
160-
}
161-
#endif // defined(fegetenv)
96+
#endif
16297

16398
#ifdef feholdexcept
164-
_LIBCPP_INLINE_VISIBILITY
165-
inline int __libcpp_feholdexcept(fenv_t* __envp) {
166-
return feholdexcept(__envp);
167-
}
16899
#undef feholdexcept
169-
_LIBCPP_INLINE_VISIBILITY
170-
inline int feholdexcept(fenv_t* __envp) {
171-
return ::__libcpp_feholdexcept(__envp);
172-
}
173-
#endif // defined(feholdexcept)
100+
#endif
174101

175102

176103
#ifdef fesetenv
177-
_LIBCPP_INLINE_VISIBILITY
178-
inline int __libcpp_fesetenv(const fenv_t* __envp) {
179-
return fesetenv(__envp);
180-
}
181104
#undef fesetenv
182-
_LIBCPP_INLINE_VISIBILITY
183-
inline int fesetenv(const fenv_t* __envp) {
184-
return ::__libcpp_fesetenv(__envp);
185-
}
186-
#endif // defined(fesetenv)
105+
#endif
187106

188107
#ifdef feupdateenv
189-
_LIBCPP_INLINE_VISIBILITY
190-
inline int __libcpp_feupdateenv(const fenv_t* __envp) {
191-
return feupdateenv(__envp);
192-
}
193108
#undef feupdateenv
194-
_LIBCPP_INLINE_VISIBILITY
195-
inline int feupdateenv(const fenv_t* __envp) {
196-
return ::__libcpp_feupdateenv(__envp);
197-
}
198-
#endif // defined(feupdateenv)
109+
#endif
199110

200111
} // extern "C++"
201112

0 commit comments

Comments
 (0)