Commit graph

32 commits

Author SHA1 Message Date
Viral B. Shah
c29e8b1b6e Revert "Remove [jy][01n]f(). X/Open only standardizes the double versions."
This reverts commit 8c8693cf79.
2015-11-13 09:06:24 +05:30
Ed Schouten
b6ff8bbe91 Clean up a change that I sneaked in accidentically.
I often build the code with -Wmissing-prototypes to ensure that we don't
accidentically pollute the symbol namespace. If we want to provide a
symbol such as isopenlibm(), make sure we also declare it in
<openlibm_math.h>.
2015-02-12 13:58:35 +01:00
Ed Schouten
8c8693cf79 Remove [jy][01n]f(). X/Open only standardizes the double versions. 2015-02-12 13:48:13 +01:00
Ed Schouten
ce4982acf8 Remove scalb(). The scalbn() or scalbln() function should be used. 2015-02-12 13:38:13 +01:00
Ed Schouten
c08bd962f2 Remove the non-standard finite() function. 2015-02-12 13:35:19 +01:00
Ed Schouten
ae1e0c309a Remove the non-standard drem() function. 2015-02-12 13:29:38 +01:00
Ed Schouten
eca4ac8bf1 Remove the non-standard significand() function. 2015-02-12 13:28:37 +01:00
Ed Schouten
532fe1553e Remove the non-standard gamma() function. Use lgamma() instead. 2015-02-12 13:25:30 +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
bc3f903bc2 Move public headers into include/ and private headers into src/.
While there, also modify the install target. We should make sure to
install all openlibm*.h headers. There is still some work to be done:
openlibm_fenv_*.h still depends on some additional bits. I'd propose
that we eventually create an include/openlibm_cdefs.h that contains all
of the macros we need.
2015-01-11 16:35:32 +01:00
Ed Schouten
17688c4487 Rename include/fenv.h to <openlibm_fenv.h>.
OpenLibm has an implementation of fenv.h internally. This may be
problematic in case you want it to build against the host system's
implementation, as it would require you to somehow take the fenv.h file
out of the compiler search path.

Simply use a different naming scheme, similar to openlibm.h and
openlibm_complex.h. If we want to build against the host's fenv.h, we
can simply add an '#include <fenv.h>' from within this header.
2015-01-09 13:11:12 +01:00
Ed Schouten
78f622e84a Use endianness definitions provided by GCC or Clang if available.
Instead of using all sorts of operating system specific constructs, we
can just query the compiler which byte order is being used. This has the
advantage that the code builds on new platforms without any tweaks.
2015-01-07 22:33:54 +01:00
Ed Schouten
9a48c87386 Don't attempt to pull in <sys/cdefs.h> directly.
<sys/cdefs.h> is not a standard header. Instead, we'd better pull in a
common header like <stdio.h>. It is very likely that such a header
already provides the necessary bits.
2015-01-07 22:22:52 +01:00
Thomas Leonard
4cb9231f1a Removed some uses of sys/types.h
It's useful to be able to compile openlibm in environments where this
doesn't exist (e.g. OS kernels).
2014-12-01 11:10:41 +00:00
Thomas Leonard
9f4f2c6d57 u_int8_t, etc are non-standard, so define on all platforms 2014-11-27 14:47:36 +00:00
Thomas Leonard
f22d7db106 Fixed build on ARM
Removed all long double support, since ARM doesn't have long doubles.
2014-05-26 10:55:49 +01:00
Tony Kelman
8b59bbc18b Export ldexp aliases on Windows
skip END and add .drectve export in assembly versions

uncomment __strong_reference definition from cdefs-compat.h

use weak references in place of strong references on Mac

add DLLEXPORT to all strong references

Fixes Julia issue #6777
2014-05-09 17:05:33 -07:00
Jameson Nash
2eb1876bb8 add more windows compatibility definitions 2014-03-18 21:22:51 -04:00
Jameson Nash
66e6f8ea91 normalize __WIN32__ to _WIN32, which is defined by all Windows compilers 2014-03-18 20:47:48 -04:00
Jameson Nash
e9661c36af WIN32 build fix 2012-11-09 02:25:25 -05:00
Mike Nolta
ec53659c6a fixes for freebsd9 2012-10-30 17:54:30 -04:00
Keno Fischer
87ce7cedda Fix build on amd64 linux 2012-08-19 04:15:47 -04:00
Keno Fischer
4b078ee343 Fix __weak_reference for clang [closes #9] 2012-07-03 13:50:00 +02:00
Viral B. Shah
62c895488f Workarounds in cdefs-compat for clang. 2012-07-03 16:24:32 +05:30
Keno Fischer
f21624349f Build fix for amd64 Linux 2012-05-25 20:04:41 -07:00
Keno Fischer
adb103acec Build fixes for Windows 2012-05-25 21:25:13 -04:00
Jameson Nash
a9d723a19e typo 2012-04-08 21:02:23 -04:00
Jameson Nash
8d25b39dca What is __strong_reference? cleaning up compat.h files so it builds on Mac again 2012-04-08 20:56:51 -04:00
Jameson Nash
0df00dd0f7 initial attempt getting everything to build on windows 2012-04-08 20:03:36 -04:00
Viral B. Shah
db4db9cf35 uint64_t -> u_int64_t 2011-08-13 10:43:52 +05:30
Viral B. Shah
d8bc4c085d BYTE_ORDER and ENDIAN detection 2011-08-13 10:22:37 +05:30
Viral B. Shah
aba7ae910f Initialize repo. FreeBSD 8.2 msun code + some tweaks 2011-08-13 00:31:25 +05:30