1. 11 11月, 2017 6 次提交
    • R
      reformat cjk iconv tables to be diff-friendly, match tool output · d060edf6
      Rich Felker 提交于
      the new version of the code used to generate these tables forces a
      newline every 256 entries, whereas at the time these files were
      originally generated and committed, it only wrapped them at 80
      columns. the new behavior ensures that localized changes to the
      tables, if they are ever needed, will produce localized diffs. other
      tables including hkscs were already committed in the new format.
      
      binary comparison of the generated object files was performed to
      confirm that no spurious changes slipped in.
      d060edf6
    • B
      prevent fork's errno from being clobbered by atfork handlers · c21051e9
      Bobby Bingham 提交于
      If the syscall fails, errno must be set correctly for the caller.
      There's no guarantee that the handlers registered with pthread_atfork
      won't clobber errno, so we need to ensure it gets set after they are
      called.
      c21051e9
    • R
      add iso-2022-jp support (decoding only) to iconv · a39f20bf
      Rich Felker 提交于
      this implementation aims to match the baseline defined by rfc1468 (the
      original mime charset definition) plus the halfwidth katakana
      extension included in the whatwg definition of the charset. rejection
      of si/so controls and newlines in doublebyte state are not currently
      enforced. the jis x 0201 mode is currently interpreted as having the
      yen sign and overline character in place of backslash and tilde; ascii
      mode has the standard ascii characters in those slots.
      a39f20bf
    • R
      add iconv framework for decoding stateful encodings · 5b546faa
      Rich Felker 提交于
      assuming pointers obtained from malloc have some nonzero alignment,
      repurpose the low bit of iconv_t as an indicator that the descriptor
      is a stateless value representing the source and destination character
      encodings.
      5b546faa
    • R
      simplify/optimize iconv utf-8 case · 0df5b39a
      Rich Felker 提交于
      the special case where mbrtowc returns 0 but consumed 1 byte of input
      does not need to be considered, because the short-circuit for low
      bytes already covered that case.
      0df5b39a
    • R
      handle ascii range individually in each iconv case · 9eb6dd51
      Rich Felker 提交于
      short-circuiting low bytes before the switch precluded support for
      character encodings that don't coincide with ascii in this range. this
      limitation affected iso-2022 encodings, which use the esc byte to
      introduce a shift sequence, and things like ebcdic.
      9eb6dd51
  2. 10 11月, 2017 4 次提交
    • R
      move iconv_close to its own translation unit · bff59d13
      Rich Felker 提交于
      this is in preparation to support stateful conversion descriptors,
      which are necessarily allocated and thus must be freed in iconv_close.
      putting it in a separate TU will avoid pulling in free if iconv_close
      is not referenced.
      bff59d13
    • R
      refactor iconv conversion descriptor encoding/decoding · 79f49eff
      Rich Felker 提交于
      this change is made to avoid having assumptions about the encoding
      spread out across the file, and to facilitate future change to a form
      that can accommodate allocted, stateful descriptors when needed.
      
      this commit should not produce any functional changes; with the
      compiler tested the only change to code generation was minor
      reordering of local variables on stack.
      79f49eff
    • A
      fix getaddrinfo error code for non-numeric service with AI_NUMERICSERV · 30fdda6c
      A. Wilcox 提交于
      If AI_NUMERICSERV is specified and a numeric service was not provided,
      POSIX mandates getaddrinfo return EAI_NONAME. EAI_SERVICE is only for
      services that cannot be used on the specified socket type.
      30fdda6c
    • R
      fix mismatched type of __pthread_tsd_run_dtors weak definition · 67b29947
      Rich Felker 提交于
      commit a6054e3c changed this function
      not to take an argument, but the weak definition used by timer_create
      was not updated to match.
      
      reported by Pascal Cuoq.
      67b29947
  3. 06 11月, 2017 24 次提交
  4. 01 11月, 2017 1 次提交
  5. 25 10月, 2017 1 次提交
    • R
      fix build regression on ARM for ISA levels less than v5 · 1b9406b0
      Rich Felker 提交于
      commit 06fbefd1 (first included in
      release 1.1.17) introduced this regression.
      
      patch by Adrian Bunk. it fixes the regression in all cases, but
      spuriously prevents use of the clz instruction on very old compiler
      versions that don't define __ARM_ARCH. this may be fixed in a more
      general way at some point in the future. it also omits thumb1 logic
      since building as thumb1 code is currently not supported.
      1b9406b0
  6. 22 10月, 2017 1 次提交
    • R
      fix regression in glob with literal . or .. path component · ec04d122
      Rich Felker 提交于
      commit 8c4be3e2 was written to
      preclude the GLOB_PERIOD extension from matching these directory
      entries, but also precluded literal matches.
      
      adjust the check that excludes . and .. to check whether the
      GLOB_PERIOD flag is in effect, so that it cannot alter behavior in
      cases governed by the standard, and also don't exclude . or .. in any
      case where normal glob behavior (fnmatch's FNM_PERIOD flag) would have
      included one or both of them (patterns such as ".*").
      
      it's still not clear whether this is the preferred behavior for
      GLOB_PERIOD, but at least it's clear that it can no longer break
      applications which are not relying on quirks of a nonstandard feature.
      ec04d122
  7. 20 10月, 2017 2 次提交
    • W
      posix_spawn: use larger stack to cover worst-case in execvpe · 004dc954
      Will Dietz 提交于
      execvpe stack-allocates a buffer used to hold the full path
      (combination of a PATH entry and the program name)
      while searching through $PATH, so at least
      NAME_MAX+PATH_MAX is needed.
      
      The stack size can be made conditionally smaller
      (the current 1024 appears appropriate)
      should this larger size be burdensome in those situations.
      004dc954
    • R
      release 1.1.17 · 2cd663fb
      Rich Felker 提交于
      2cd663fb
  8. 19 10月, 2017 1 次提交
    • R
      in dns parsing callback, enforce MAXADDRS to preclude overflow · 45ca5d3f
      Rich Felker 提交于
      MAXADDRS was chosen not to need enforcement, but the logic used to
      compute it assumes the answers received match the RR types of the
      queries. specifically, it assumes that only one replu contains A
      record answers. if the replies to both the A and the AAAA query have
      their answer sections filled with A records, MAXADDRS can be exceeded
      and clobber the stack of the calling function.
      
      this bug was found and reported by Felix Wilhelm.
      45ca5d3f