1. 31 8月, 2020 1 次提交
  2. 13 9月, 2018 2 次提交
    • R
      overhaul internally-public declarations using wrapper headers · 13d1afa4
      Rich Felker 提交于
      commits leading up to this one have moved the vast majority of
      libc-internal interface declarations to appropriate internal headers,
      allowing them to be type-checked and setting the stage to limit their
      visibility. the ones that have not yet been moved are mostly
      namespace-protected aliases for standard/public interfaces, which
      exist to facilitate implementing plain C functions in terms of POSIX
      functionality, or C or POSIX functionality in terms of extensions that
      are not standardized. some don't quite fit this description, but are
      "internally public" interfacs between subsystems of libc.
      
      rather than create a number of newly-named headers to declare these
      functions, and having to add explicit include directives for them to
      every source file where they're needed, I have introduced a method of
      wrapping the corresponding public headers.
      
      parallel to the public headers in $(srcdir)/include, we now have
      wrappers in $(srcdir)/src/include that come earlier in the include
      path order. they include the public header they're wrapping, then add
      declarations for namespace-protected versions of the same interfaces
      and any "internally public" interfaces for the subsystem they
      correspond to.
      
      along these lines, the wrapper for features.h is now responsible for
      the definition of the hidden, weak, and weak_alias macros. this means
      source files will no longer need to include any special headers to
      access these features.
      
      over time, it is my expectation that the scope of what is "internally
      public" will expand, reducing the number of source files which need to
      include *_impl.h and related headers down to those which are actually
      implementing the corresponding subsystems, not just using them.
      13d1afa4
    • R
      rework mechanism for posix_spawnp calling posix_spawn · fe61a7aa
      Rich Felker 提交于
      previously, a common __posix_spawnx backend was used that accepted an
      additional argument for the execve variant to call in the child. this
      moderately bloated up the posix_spawn function, shuffling arguments
      between stack and/or registers to call a 7-argument function from a
      6-argument one.
      
      instead, tuck the exec function pointer in an unused part of the
      (large) pthread_spawnattr_t structure, and have posix_spawnp duplicate
      the attributes and fill in a pointer to __execvpe. the net code size
      change is minimal, but the weight is shifted to the "heavier" function
      which already pulls in more dependencies.
      
      as a bonus, we get rid of an external symbol (__posix_spawnx) that had
      no really good place for a declaration because it shouldn't have
      existed to begin with.
      fe61a7aa
  3. 19 10月, 2012 1 次提交
  4. 07 9月, 2012 1 次提交
    • R
      use restrict everywhere it's required by c99 and/or posix 2008 · 400c5e5c
      Rich Felker 提交于
      to deal with the fact that the public headers may be used with pre-c99
      compilers, __restrict is used in place of restrict, and defined
      appropriately for any supported compiler. we also avoid the form
      [restrict] since older versions of gcc rejected it due to a bug in the
      original c99 standard, and instead use the form *restrict.
      400c5e5c
  5. 14 9月, 2011 1 次提交
  6. 29 5月, 2011 1 次提交