Commit graph

23 commits

Author SHA1 Message Date
Yichao Yu
238a90959f Fix compilation on AArch64
The 128bit double directory is missing and was never used....
2017-10-21 09:58:16 -04:00
Keno Fischer
28fb939b0d Blanket rename DLLEXPORT->OLM_DLLEXPORT 2016-03-13 21:07:55 -04:00
Keno Fischer
81053b7fcb 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.
2016-03-13 06:21:15 +00:00
Ed Schouten
78c0afb2a7 Rename _scan_nan() to __scan_nan().
The current tradition of openlibm is to hide all of its internal symbols
into the reserved system namespace. CloudABI has a check in place to
ensure that its C library (which contains openlibm) to not place any
unwanted symbols into the public namespace. openlibm seems to leak
_scan_nan() in there, so we'd better add an additional underscore.
2016-02-27 17:26:15 +01:00
Ed Schouten
845b329cb9 Remove __always_inline, just like we do for ld80.
__always_inline is a (Free)BSD specific definition from cdefs.h.
Compilers like Clang don't care about these keywords anyway, as they
simply do whatever they like.

It looks like we already removed this keyword from ld80/e_rem_pio2l.h as
well. Apply exactly the same change to the ld128 version as well.
2015-10-26 10:28:11 +01:00
Ed Schouten
bc8dd927a3 Use isfinite() instead of non-standard finite() function.
The finite() function got standardized under the name isfinite(). Its
use is therefore discouraged.
2015-10-26 10:23:11 +01:00
Ed Schouten
7e5585aaca Rename openlibm.h to openlibm_math.h.
This is a bit more consistent with the naming of the other header files
(openlibm_complex.h and openlibm_fenv.h). Re-add an openlibm.h header
that includes all of the public headers as a shorthand.

Fix up all of the source files to include <openlibm_math.h> instead of
<openlibm.h>. While there, fix ordering of the includes.
2015-01-11 23:37:01 +01:00
Ed Schouten
06dbb6e72b Use more uniform style of including headers.
Put external headers before internal ones. While there, replace a lot of
occurences of "openlibm.h" with <openlibm.h>. It should be thought of as
an external header, as it is installed along with the library.
2015-01-09 14:24:24 +01:00
Ed Schouten
beb387c4b2 Use <openlibm.h> consistently. 2015-01-09 13:15:01 +01:00
Ed Schouten
55ac462808 Add lgammal_r().
We already provide lgammaf_r() and lgamma_r(). It's not hard to also add
lgammal_r(), for consistency.

I am currently working on porting openlibm to an environment where
global state, and thus signgam, is not available. By adding lgammal_r(),
I can trivially disable support for signgam by just patching up
src/e_lgamma{f,,l}.c. That way there is no need to patch up the actual
algorithms.
2015-01-08 11:23:28 +01:00
Ed Schouten
b6cd89849e Don't let tgammal() modify signgam. Only lgamma*() should modify it.
Letting tgammal() modify signgam has two disadvantages:

- It breaks valid code that assumes that the value of signgam is not
  clobbered by calls to tgammal().
- It makes this function depend on the presence of signgam. signgam is
  an X/Open System Interface. It is not part of the C standard.
2015-01-08 09:49:31 +01:00
Viral B. Shah
52c901a68c Import long double versions from OpenBSD. 2014-12-04 23:11:16 +05:30
Jameson Nash
18f475de56 add DLLEXPORT to i387 and amd64 assembly (win32 target) and ld80/ld128 files 2013-08-03 05:52:19 -04:00
Keno Fischer
fed038b32f Remove Leftover Makefiles from old build system 2012-05-26 17:06:20 -04:00
Keno Fischer
307d7361c5 automatic arch selection in Makefile 2012-05-25 16:24:37 -04:00
Keno Fischer
f0862df1db Allow compilation of assembly files on OSX 2012-05-24 23:14:58 -04:00
Jameson Nash
0df00dd0f7 initial attempt getting everything to build on windows 2012-04-08 20:03:36 -04:00
Viral B. Shah
cd520e4350 Get everything except a couple of files in ld128 to build with gcc.
A couple of small issues still remain with linking:

    LINK all
/usr/bin/ranlib: file: libopenlibm.a(e_rem_pio2.o) has no symbols
/usr/bin/ranlib: file: libopenlibm.a(e_rem_pio2f.o) has no symbols
/usr/bin/ranlib: file: libopenlibm.a(k_cosf.o) has no symbols
/usr/bin/ranlib: file: libopenlibm.a(k_sinf.o) has no symbols
/usr/bin/ranlib: file: libopenlibm.a(k_tanf.o) has no symbols
    LINK all
ld: duplicate symbol ___ieee754_rem_pio2 in src/s_sin.o and src/s_cos.o for architecture x86_64
collect2: ld returned 1 exit status
2011-12-31 19:43:04 +05:30
Viral B. Shah
ccd319c03c Almost building the full thing. 2011-12-31 12:48:43 +05:30
Viral B. Shah
b0b27a0ff4 Replace math.h with openlibm.h
Remove man
2011-12-15 11:54:24 +05:30
Viral B. Shah
51a63c3270 Comment out __FBSDID 2011-12-15 11:46:26 +05:30
Viral B. Shah
16b9264f9d Import entire msun from FreeBSD. 2011-12-15 11:29:35 +05:30
Viral B. Shah
aba7ae910f Initialize repo. FreeBSD 8.2 msun code + some tweaks 2011-08-13 00:31:25 +05:30