1. 11 9月, 2019 2 次提交
    • S
      fcntl.h: add AT_RECURSIVE from linux v5.2 · 81e795e1
      Szabolcs Nagy 提交于
      apply open_tree with OPEN_TREE_CLONE call to the entire subtree, see
      
        linux commit a07b20004793d8926f78d63eb5980559f7813404
        vfs: syscall: Add open_tree(2) to reference or clone a mount
      81e795e1
    • S
      fcntl.h: add AT_STATX_ statx sync flag definitions · cc1a5351
      Szabolcs Nagy 提交于
      see
      
        linux commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
        statx: Add a system call to make enhanced file info available
      
      these are linux specific and not reserved names for fcntl.h so they
      are under _BSD_SOURCE|_GNU_SOURCE.
      cc1a5351
  2. 02 7月, 2019 1 次提交
    • S
      fcntl.h: add F_SEAL_FUTURE_WRITE from linux v5.1 · 9e8dd1c7
      Szabolcs Nagy 提交于
      needed for android so it can migrate from its ashmem to memfd.
      allows making the memfd readonly for future users while keeping
      a writable mmap of it. see
      
        linux commit ab3948f58ff841e51feb845720624665ef5b7ef3
        mm/memfd: add an F_SEAL_FUTURE_WRITE seal to memfd
      9e8dd1c7
  3. 11 4月, 2019 1 次提交
    • A
      fcntl.h: define O_TTY_INIT to 0 · 65c8be38
      A. Wilcox 提交于
      POSIX: "[If] either O_TTY_INIT is set in oflag or O_TTY_INIT has the
      value zero, open() shall set any non-standard termios structure
      terminal parameters to a state that provides conforming behavior."
      
      The Linux kernel tty drivers always perform initialisation on their
      devices to set known good termios values during the open(2) call.  This
      means that setting O_TTY_INIT to zero is conforming.
      65c8be38
  4. 13 3月, 2019 1 次提交
    • J
      fix POSIX_FADV_DONTNEED/_NOREUSE on s390x · 4b125dd4
      Jonathan Neuschäfer 提交于
      On s390x, POSIX_FADV_DONTNEED and POSIX_FADV_NOREUSE have different
      values than on all other architectures that Linux supports.
      
      Handle this difference by wrapping their definitions in
      include/fcntl.h in #ifdef, so that arch/s390x/bits/fcntl.h can
      override them.
      4b125dd4
  5. 13 9月, 2018 2 次提交
  6. 06 11月, 2017 1 次提交
    • S
      add new fcntl.h macros from linux v4.13 · 14ced228
      Szabolcs Nagy 提交于
      for getting/setting write lifetime hints fcntl commands were
      added in linux commit c75b1d9421f80f4143e389d2d50ddfc8a28c8c35
      
      added under _GNU_SOURCE || _BSD_SOURCE, since RWH_* life time
      hints are not in the POSIX reserved namespace.
      14ced228
  7. 31 8月, 2016 1 次提交
  8. 04 7月, 2016 1 次提交
    • R
      make brace placement in public header struct definitions consistent · befa5866
      Rich Felker 提交于
      placing the opening brace on the same line as the struct keyword/tag
      is the style I prefer and seems to be the prevailing practice in more
      recent additions.
      
      these changes were generated by the command:
      
      find include/ arch/*/bits -name '*.h' \
      -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} +
      
      and subsequently checked by hand to ensure that the regex did not pick
      up any false positives.
      befa5866
  9. 02 4月, 2015 1 次提交
    • R
      move O_PATH definition back to arch bits · fd427c4e
      Rich Felker 提交于
      while it's the same for all presently supported archs, it differs at
      least on sparc, and conceptually it's no less arch-specific than the
      other O_* macros. O_SEARCH and O_EXEC are still defined in terms of
      O_PATH in the main fcntl.h.
      fd427c4e
  10. 08 10月, 2014 1 次提交
    • S
      add new linux file sealing api to fcntl.h · a3763d64
      Szabolcs Nagy 提交于
      new in linux v3.17 commit 40e041a2c858b3caefc757e26cb85bfceae5062b
      sealing allows some operations to be blocked on a file which makes
      file access safer when fds are shared between processes (only
      supported for shared mem fds currently)
      
      flags:
      F_SEAL_SEAL prevents further sealing
      F_SEAL_SHRINK prevents file from shrinking
      F_SEAL_GROW prevents file from growing
      F_SEAL_WRITE prevents writes
      
      fcntl commands:
      F_GET_SEALS get the current seal flags
      F_ADD_SEALS add new seal flags
      a3763d64
  11. 08 9月, 2014 1 次提交
    • S
      add new F_OFD_* macros to fcntl.h (open file description locks) · 976bb28f
      Szabolcs Nagy 提交于
      open file description locks are inherited across fork and only auto
      dropped after the last fd of the file description is closed, they can be
      used to synchronize between threads that open separate file descriptions
      for the same file.
      
      new in linux 3.15 commit 0d3f7a2dd2f5cf9642982515e020c1aee2cf7af6
      976bb28f
  12. 19 2月, 2014 1 次提交
  13. 07 1月, 2014 1 次提交
  14. 21 10月, 2013 1 次提交
    • R
      fix multiple minor namespace issues in headers · 8f035960
      Rich Felker 提交于
      fcntl.h: AT_* is not a reserved namespace so extensions cannot be
      exposed by default.
      
      langinfo.h: YESSTR and NOSTR were removed from the standard.
      
      limits.h: NL_NMAX was removed from the standard.
      
      signal.h: the conditional for NSIG was wrongly checking _XOPEN_SOURCE
      rather than _BSD_SOURCE. this was purely a mistake; it doesn't even
      match the commit message from the commit that added it.
      8f035960
  15. 03 8月, 2013 1 次提交
  16. 02 8月, 2013 1 次提交
  17. 07 12月, 2012 3 次提交
  18. 18 11月, 2012 1 次提交
    • R
      fcntl.h: O_SEARCH was missing for powerpc · 8d2887f8
      rofl0r 提交于
      put some macros that do not differ between architectures in the
      main header and remove from bits.
      restructure mips header so it has the same structure as the others.
      8d2887f8
  19. 16 9月, 2012 1 次提交
  20. 14 9月, 2012 1 次提交
    • R
      add O_PATH/O_SEARCH support to fcntl.h · b238b37a
      Rich Felker 提交于
      I'm not 100% sure that Linux's O_PATH meets the POSIX requirements for
      O_SEARCH, but it seems very close if not perfect. and old kernels
      ignore it, so O_SEARCH will still work as desired as long as the
      caller has read permissions to the directory.
      b238b37a
  21. 08 9月, 2012 5 次提交
  22. 07 9月, 2012 1 次提交
    • R
      provide loff_t for splice syscall · c4ea0e3f
      Rich Felker 提交于
      so far, this is the only actual use of loff_t i've found. some
      software, including glib, assumes loff_t must exist if splice exists;
      this is a reasonable assumption since the official prototype for
      splice uses loff_t, as it always works with 64-bit offsets regardless
      of the selected libc off_t size. i'm using #define for now rather than
      a typedef to make it easy to define in other headers if necessary
      (like the LFS64 ugliness), but it may be necessary to add it to
      alltypes.h eventually if other functions end up needing it.
      c4ea0e3f
  23. 24 7月, 2012 1 次提交
  24. 21 6月, 2012 1 次提交
  25. 04 6月, 2012 1 次提交
    • R
      _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE · 3b94daba
      Rich Felker 提交于
      this is ugly and stupid, but now that the *64 symbol names exist, a
      lot of broken GNU software detects them in configure, then either
      breaks during build due to missing off64_t definition, or attempts to
      compile without function declarations/prototypes. "fixing" it here is
      easier than telling everyone to add yet another feature test macro to
      their builds.
      3b94daba
  26. 23 5月, 2012 2 次提交
  27. 04 5月, 2012 1 次提交
    • R
      add support for ugly *64 functions with _LARGEFILE64_SOURCE · 2dd8d5e1
      Rich Felker 提交于
      musl does not support legacy 32-bit-off_t whatsoever. off_t is always
      64 bit, and correct programs that use off_t and the standard functions
      will just work out of the box. (on glibc, they would require
      -D_FILE_OFFSET_BITS=64 to work.) however, some programs instead define
      _LARGEFILE64_SOURCE and use alternate versions of all the standard
      types and functions with "64" appended to their names.
      
      we do not want code to actually get linked against these functions
      (it's ugly and inconsistent), so macros are used instead of prototypes
      with weak aliases in the library itself. eventually the weak aliases
      may be added at the library level for the sake of using code that was
      originally built against glibc, but the macros will still be the
      desired solution in the headers.
      2dd8d5e1
  28. 16 4月, 2012 1 次提交
    • R
      move F_DUPFD_CLOEXEC out of bits · 67b25fe0
      Rich Felker 提交于
      fcntl values 1024 and up are universal, arch-independent. later I'll
      add some of the other linux-specific ones for notify, leases, pipe
      size, etc. here too.
      67b25fe0
  29. 15 4月, 2011 2 次提交
  30. 09 3月, 2011 1 次提交