Skip to content

Commit 81053b7

Browse files
committed
Fix Clang warnings on Windows
- Align DLLEXPORT in definitions and declations. There is still a few cases left, where the declation in the compiler's complex.h disagrees with the implementation here. For now we can't do anything about that, but maybe should be revisited in the future. - Fix the syntax on an .ascii directive that gcc accepted mistakingly, but clang does not.
1 parent 4fcad15 commit 81053b7

11 files changed

Lines changed: 248 additions & 236 deletions

File tree

amd64/bsd_asm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
#define _START_ENTRY_WIN .code; _START_ENTRY
7777
#endif
7878
#define _ENTRY(x) _START_ENTRY_WIN; \
79-
.globl CNAME(x); .section .drectve; .ascii " -export:" #x; \
79+
.globl CNAME(x); .section .drectve; .ascii " -export:", #x; \
8080
.section .text; .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):
8181
#endif
8282

include/openlibm_fenv_amd64.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ fegetexceptflag(fexcept_t *__flagp, int __excepts)
125125
return (0);
126126
}
127127

128-
int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
129-
int feraiseexcept(int __excepts);
128+
DLLEXPORT int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
129+
DLLEXPORT int feraiseexcept(int __excepts);
130130

131131
__fenv_static __attribute__((always_inline)) inline int
132132
fetestexcept(int __excepts)
@@ -176,8 +176,8 @@ fesetround(int __round)
176176
return (0);
177177
}
178178

179-
int fegetenv(fenv_t *__envp);
180-
int feholdexcept(fenv_t *__envp);
179+
DLLEXPORT int fegetenv(fenv_t *__envp);
180+
DLLEXPORT int feholdexcept(fenv_t *__envp);
181181

182182
__fenv_static inline int
183183
fesetenv(const fenv_t *__envp)
@@ -196,12 +196,12 @@ fesetenv(const fenv_t *__envp)
196196
return (0);
197197
}
198198

199-
int feupdateenv(const fenv_t *__envp);
199+
DLLEXPORT int feupdateenv(const fenv_t *__envp);
200200

201201
#if __BSD_VISIBLE
202202

203-
int feenableexcept(int __mask);
204-
int fedisableexcept(int __mask);
203+
DLLEXPORT int feenableexcept(int __mask);
204+
DLLEXPORT int fedisableexcept(int __mask);
205205

206206
/* We currently provide no external definition of fegetexcept(). */
207207
static inline int

0 commit comments

Comments
 (0)