1. 13 9月, 2018 1 次提交
    • R
      reduce spurious inclusion of libc.h · 5ce37379
      Rich Felker 提交于
      libc.h was intended to be a header for access to global libc state and
      related interfaces, but ended up included all over the place because
      it was the way to get the weak_alias macro. most of the inclusions
      removed here are places where weak_alias was needed. a few were
      recently introduced for hidden. some go all the way back to when
      libc.h defined CANCELPT_BEGIN and _END, and all (wrongly implemented)
      cancellation points had to include it.
      
      remaining spurious users are mostly callers of the LOCK/UNLOCK macros
      and files that use the LFS64 macro to define the awful *64 aliases.
      
      in a few places, new inclusion of libc.h is added because several
      internal headers no longer implicitly include libc.h.
      
      declarations for __lockfile and __unlockfile are moved from libc.h to
      stdio_impl.h so that the latter does not need libc.h. putting them in
      libc.h made no sense at all, since the macros in stdio_impl.h are
      needed to use them correctly anyway.
      5ce37379
  2. 25 2月, 2018 1 次提交
    • R
      fix aliasing violations in fgetpos/fsetpos · 2fae10f8
      Rich Felker 提交于
      add a member of appropriate type to the fpos_t union so that accesses
      are well-defined. use long long instead of off_t since off_t is not
      always exposed in stdio.h and there's no namespace-clean alias for it.
      
      access is still performed using pointer casts rather than by naming
      the union member as a matter of style; to the extent possible, the
      naming of fields in opaque types defined in the public headers is not
      treated as an API contract with the implementation. access via the
      pointer cast is valid as long as the union has a member of matching
      type.
      2fae10f8
  3. 12 2月, 2011 1 次提交