1. 13 4月, 2012 1 次提交
    • R
      fix spurious overflows in strtoull with small bases · 54222d1e
      Rich Felker 提交于
      whenever the base was small enough that more than one digit could
      still fit after UINTMAX_MAX/36-1 was reached, only the first would be
      allowed; subsequent digits would trigger spurious overflow, making it
      impossible to read the largest values in low bases.
      54222d1e
  2. 12 4月, 2012 9 次提交
  3. 11 4月, 2012 7 次提交
  4. 10 4月, 2012 3 次提交
    • R
      new floating point parser/converter · 415c4cd7
      Rich Felker 提交于
      this version is intended to be fully conformant to the ISO C, POSIX,
      and IEEE standards for conversion of decimal/hex floating point
      strings to float, double, and long double (ld64 or ld80 only at
      present) values. in particular, all results are intended to be rounded
      correctly according to the current rounding mode. further, this
      implementation aims to set the floating point underflow, overflow, and
      inexact flags to reflect the conversion performed.
      
      a moderate amount of testing has been performed (by nsz and myself)
      prior to integration of the code in musl, but it still may have bugs.
      
      so far, only strto(d|ld|f) use the new code. scanf integration will be
      done as a separate commit, and i will add implementations of the wide
      character functions later.
      415c4cd7
    • R
      fix alloca issue in stdlib.h too · 3be616c1
      Rich Felker 提交于
      I forgot _GNU_SOURCE also has it declared here...
      3be616c1
    • R
      alloca cannot be a function. #define it to the gcc builtin if possible · d71d0805
      Rich Felker 提交于
      gcc makes this mapping by default anyway, but it will be disabled by
      -fno-builtin (and presumably by -std=c99 or similar). for the main
      program the error will be reported by the linker, and the issue can
      easily be fixed, but for dynamic-loaded so files, the error cannot be
      detected until dlopen time, at which point it has become very obscure.
      d71d0805
  5. 04 4月, 2012 3 次提交
    • N
      math: fix x86 asin accuracy · 37eaec3a
      nsz 提交于
      use (1-x)*(1+x) instead of (1-x*x) in asin.s
      the later can be inaccurate with upward rounding when x is close to 1
      37eaec3a
    • R
      work around nasty gcc bug in the i386 syscall asm · 5bd0ab8a
      Rich Felker 提交于
      when the "r" (register) constraint is used to let gcc choose a
      register, gcc will sometimes assign the same register that was used
      for one of the other fixed-register operands, if it knows the values
      are the same. one common case is multiple zero arguments to a syscall.
      this horribly breaks the intended usage, which is swapping the GOT
      pointer from ebx into the temp register and back to perform the
      syscall.
      
      presumably there is a way to fix this with advanced usage of register
      constaints on the inline asm, but having bad memories about hellish
      compatibility issues with different gcc versions, for the time being
      i'm just going to hard-code specific registers to be used. this may
      hurt the compiler's ability to optimize, but it will fix serious
      miscompilation issues.
      
      so far the only function i know what compiled incorrectly is
      getrlimit.c, and naturally the bug only applies to shared (PIC)
      builds, but it may be more extensive and may have gone undetected..
      5bd0ab8a
    • R
      450f2c4a
  6. 02 4月, 2012 1 次提交
    • R
      improve name lookup performance in corner cases · 4f346b08
      Rich Felker 提交于
      the buffer in getaddrinfo really only matters when /etc/hosts is huge,
      but in that case, the huge number of syscalls resulting from a tiny
      buffer would seriously impact the performance of every name lookup.
      
      the buffer in __dns.c has also been enlarged a bit so that typical
      resolv.conf files will fit fully in the buffer. there's no need to
      make it so large as to dominate the syscall overhead for large files,
      because resolv.conf should never be large.
      4f346b08
  7. 31 3月, 2012 2 次提交
  8. 29 3月, 2012 4 次提交
  9. 28 3月, 2012 4 次提交
  10. 26 3月, 2012 1 次提交
  11. 25 3月, 2012 4 次提交
  12. 23 3月, 2012 1 次提交