Merge pull request #56 from tkelman/ldexp

Export ldexp aliases on Windows
This commit is contained in:
Jeff Bezanson 2014-05-11 19:07:38 -04:00
commit 1f3925b3c1
4 changed files with 22 additions and 10 deletions

View File

@ -41,10 +41,14 @@ ENTRY(scalbn)
fstpl -8(%rsp)
movsd -8(%rsp),%xmm0
ret
#ifndef _WIN64
END(scalbn)
.globl CNAME(ldexp)
#else
.globl CNAME(ldexp); .section .drectve; .ascii " -export:ldexp"
#endif
.set CNAME(ldexp),CNAME(scalbn)
/* Enable stack protection */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits

View File

@ -41,12 +41,14 @@ ENTRY(scalbnf)
fstps -8(%rsp)
movss -8(%rsp),%xmm0
ret
#ifndef _WIN64
END(scalbnf)
.globl CNAME(ldexpf)
.set CNAME(ldexpf),CNAME(scalbnf)
#else
.globl CNAME(ldexpf); .section .drectve; .ascii " -export:ldexpf"
#endif
.set CNAME(ldexpf),CNAME(scalbnf)
/* Enable stack protection */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits

View File

@ -26,12 +26,14 @@ ENTRY(scalbnl)
fstpt (%rcx)
#endif
ret
#ifndef _WIN64
END(scalbnl)
.globl CNAME(ldexpl)
#else
.globl CNAME(ldexpl); .section .drectve; .ascii " -export:ldexpl"
#endif
.set CNAME(ldexpl),CNAME(scalbnl)
.globl CNAME(ldexpl)
.set CNAME(ldexpl),CNAME(scalbnl)
/* Enable stack protection */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits

View File

@ -22,8 +22,12 @@
#ifdef __GNUC__
#ifndef __strong_reference
#define __strong_reference(sym,aliassym)
//extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
#ifdef __APPLE__
#define __strong_reference(sym,aliassym) __weak_reference(sym,aliassym)
#else
#define __strong_reference(sym,aliassym) \
DLLEXPORT extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));
#endif /* __APPLE__ */
#endif /* __strong_reference */
#ifndef __weak_reference