1. 01 Feb, 2015 3 commits
  2. 12 Jan, 2015 3 commits
  3. 11 Jan, 2015 7 commits
  4. 10 Jan, 2015 8 commits
    • Viral B. Shah's avatar
      Merge pull request #78 from NuxiNL/cleanups · f418d266
      Viral B. Shah authored
      Cleanups
      f418d266
    • Ed Schouten's avatar
      Revert "Don't use __weak_reference() when a __strong_reference() is needed." · 23b8f663
      Ed Schouten authored
      Unlike the __weak_reference() macro, __strong_reference() does type
      checking. It can only create the reference if the type of the source and
      the destination function match exactly.
      
      Even if double == long double in practice, they remain unequal at the
      language level.
      23b8f663
    • Ed Schouten's avatar
      Rename the fenv headers. · d0782035
      Ed Schouten authored
      I guess the idea would be to eventually also install all of the
      openlibm*.h headers, instead of just openlibm.h. Make openlibm_fenv.h
      suitable for this purpose by moving all of the $ARCH/fenv.h headers next
      to it.
      
      We actually need this change to make OPENLIBM_USE_HOST_FENV_H work.
      Right now it's still broken, because the "#include <fenv.h>" performed
      by openlibm_fenv.h still pulls in $ARCH/fenv.h as $ARCH/ is added to the
      compiler include path.
      d0782035
    • Ed Schouten's avatar
      Don't use __weak_reference() when a __strong_reference() is needed. · 9ab9db38
      Ed Schouten authored
      OpenLibm uses the __weak_reference() macro for platforms where double
      and long double use the same layout. That way functions only need to be
      provided by the library once. The point is, in this specific case we
      want to use strong references; not weak references.
      
      Strong references can be used to give a symbol a second name. If you
      look at the resulting object file, you will have two symbols with the
      same offset and size. Weak references are different, in the sense that
      they are marked in such a way that they act as fallbacks. They are only
      used if an explicitly matching symbol is missing.
      9ab9db38
    • Ed Schouten's avatar
      Add a new compilation flag: OPENLIBM_ONLY_THREAD_SAFE. · c253db68
      Ed Schouten authored
      The global signgam variable is only part of the X/Open System
      Interfaces. It is not part of the POSIX base definitions nor the C
      standard.
      
      I'd rather have it disabled for my specific use-case, so introduce a new
      compilation flag that we can use to disable it.
      c253db68
    • Ed Schouten's avatar
      Fix a small number of -Wmissing-prototypes compiler warnings in sincos(). · 9fdc4f9d
      Ed Schouten authored
      - Add missing prototypes to openlibm.h for sincos() and sincosf().
      - Mark the internal kernel functions static.
      9fdc4f9d
    • Ed Schouten's avatar
      Remove weak reference construct from fenv code. · 42177873
      Ed Schouten authored
      I grepped through the FreeBSD source tree and for me, it seems to be
      totally unclear why these two specific functions are weak references.
      Such a construct is commonly used by FreeBSD's threading library
      (libthr) to override certain functions, but I can't find any traces of
      that.
      
      Just use the function name directly. This fixes a compiler warning as
      well (-Wmissing-prototypes).
      42177873
    • Viral B. Shah's avatar
      Merge pull request #77 from NuxiNL/system-fenv · 89ac4d4c
      Viral B. Shah authored
      Make openlibm less dependent on the host, but still add knobs to build against it
      89ac4d4c
  5. 09 Jan, 2015 9 commits
  6. 08 Jan, 2015 7 commits
    • Viral B. Shah's avatar
      Merge pull request #75 from NuxiNL/signgam · f5377fda
      Viral B. Shah authored
      Clean up handling of signgam
      f5377fda
    • Keno Fischer's avatar
      Merge pull request #76 from NuxiNL/cmplx · 8b38bd1b
      Keno Fischer authored
      Change existing code to use CMPLX*() instead of cpack*() where possible.
      8b38bd1b
    • Ed Schouten's avatar
      Change existing code to use CMPLX*() instead of cpack*() where possible. · 5d6cb09b
      Ed Schouten authored
      I am currently working on building openlibm against stock copies of
      <math.h>, instead of the openlibm.h header. It seems that a C compliant
      <math.h> header can be used as a drop-in replacement for openlibm.h,
      with the exception that it lacks cpack*().
      
      In FreeBSD SVN r275819 I patched up the math library by replacing
      cpack*() by CMPLX*(). That way many functions become less tied to the
      intrinsics of the math library. Make the same change to openlibm.
      5d6cb09b
    • Ed Schouten's avatar
      Add lgammal_r(). · 55ac4628
      Ed Schouten authored
      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.
      55ac4628
    • Ed Schouten's avatar
      Remove references to _DECLARE_C99_LDBL_MATH. · 24cec16f
      Ed Schouten authored
      When building openlibm with Clang, I seem to get a lot of warnings in
      ld80/ related to some prototypes for long double functions that are
      missing. This seems to be because we don't define _DECLARE_C99_LDBL_MATH
      anywhere.
      
      It seems that this definition only existed on FreeBSD, as certain C99
      math functions were not present yet. The prototypes were simply there as
      placeholders. This flag has been removed upstream (FreeBSD SVN r236148).
      24cec16f
    • Ed Schouten's avatar
      Don't let tgammal() modify signgam. Only lgamma*() should modify it. · b6cd8984
      Ed Schouten authored
      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.
      b6cd8984
    • Viral B. Shah's avatar
      Merge pull request #74 from NuxiNL/master · 0b2a6477
      Viral B. Shah authored
      Portability fixes
      0b2a6477
  7. 07 Jan, 2015 3 commits