summaryrefslogtreecommitdiff
path: root/lib/fcntl.in.h
Commit message (Collapse)AuthorAgeFilesLines
...
* faccessat: new moduleEric Blake2009-09-031-0/+9
| | | | | | | | | | | | | | | | * modules/faccessat: New file. * lib/faccessat.m4: Likewise. * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. * modules/unistd (Makefile.am): Use it. * lib/unistd.in.h (faccessat): Declare it. (F_OK, X_OK, W_OK, R_OK): Provide definitions. * lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise. * MODULES.html.sh (File system functions): Mention it. * doc/posix-functions/faccessat.texi (faccessat): Likewise. * doc/posix-headers/fcntl.texi (fcntl.h): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* openat: declare in POSIX headersEric Blake2009-09-031-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Mention this. * modules/openat (configure.ac): Declare witnesses. (Depends-on): Add fcntl-h, sys_stat, unistd. (Include): Mention correct headers. * modules/fcntl-h (Depends-on): Add link-warning. (Files): Add openat.m4. (Makefile.am): Substitute witnesses. * modules/sys_stat (Files, Makefile.am): Likewise. * modules/unistd (Files, Makefile.am): Likewise. * m4/openat.m4 (gl_FUNC_OPENAT, gl_FUNC_FCHOWNAT): Set witnesses. (gl_OPENAT_DEFAULTS): New macro. * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Use it. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise. (SYS_STAT_H): Remove unused variable. * doc/posix-headers/fcntl.texi (fcntl.h): Update content. * lib/fcntl--.h (includes): Remove unneeded header. * lib/openat-safer.c (includes): Likewise. * lib/openat.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR) (openat, fstatat, unlinkat, mkdirat, fchmodat, fchownat): Move to appropriate headers. (__OPENAT_PREFIX): Delete. * lib/fcntl.in.h (openat): Provide declaration. (AT_FDCWD): Fix Solaris bug. (AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Provide macros. * lib/sys_stat.in.h (fstatat, mkdirat): Provide declaration. * lib/fchmodat.c (includes): Adjust to find declaration. * lib/fchownat.c (includes): Likewise. * lib/mkdirat.c (includes): Likewise. * lib/fstatat.c (includes): Likewise. Ensure original fstatat is still visible. Signed-off-by: Eric Blake <ebb9@byu.net>
* fchdir: use more consistent macro conventionEric Blake2009-09-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | * lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd. * lib/sys_stat.in.h (rpl_fstat): Declare via make-time REPLACE_FCHDIR, rather than relying on config.h macros. * lib/unistd.in.h (fchdir): Move all fchdir internal declarations inside a single make-time REPLACE_FCHDIR block, rather than using the config.h FCHDIR_REPLACEMENT. * m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already AC_SUBST'd, also AC_DEFINE it. Don't define FCHDIR_REPLACEMENT. Manage fstat replacement. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up REPLACE_FCHDIR. * modules/sys_stat (Files): Add m4/unistd_h.m4. (Makefile.am): Substitute REPLACE_FCHDIR. * lib/close.c (rpl_close): Use REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. * lib/dup-safer.c (dup_safer): Likewise. * lib/dup2.c (rpl_dup2): Likewise. * lib/dup3.c (rpl_dup3): Likewise. * lib/open.c (rpl_open): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* fchdir: simplify error handling, and support dup3Eric Blake2009-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | * modules/fchdir (Depends-on): Use strdup-posix, not strdup. Add stdbool, malloc-posix, realloc-posix. * lib/fchdir.c (struct dir_info_t): Delete saved_errno. (ensure_dirs_slot): Return false on allocation failure. (rpl_dup2): Delete. (_gl_register_dup): New function. (_gl_unregister_fd, rpl_opendir, rpl_dup): Update callers. (_gl_register_fd): Close fd on allocation failure. * lib/fcntl.in.h (_gl_register_fd): Update signature. * lib/unistd.in.h (_gl_register_dup) [FCHDIR_REPLACEMENT]: New prototype. (rpl_dup2_fchdir): Delete prototype. * lib/open.c (open): Update caller. * lib/dup2.c (dup2): Track fchdir metadata. * lib/dup3.c (dup3): Likewise. * m4/dup2.m4 (gl_REPLACE_DUP2): New macro. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Use it. Signed-off-by: Eric Blake <ebb9@byu.net>
* fcntl-h: add O_TTY_INIT supportEric Blake2009-08-221-1/+5
| | | | | | | | * lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro. * tests/test-fcntl-h.c (o): Test it. * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation. Signed-off-by: Eric Blake <ebb9@byu.net>
* Move more flags to lib/fcntl.in.h.Paolo Bonzini2009-08-211-0/+11
| | | | | | * lib/cloexec.c: Do not define FD_CLOEXEC here. * lib/popen-safer.c: Do not alias O_NOINHERIT to O_CLOEXEC here. * lib/fcntl.in.h: Do both things here.
* Treat Haiku like BeOS.Ingo Weinhold2008-11-101-2/+2
|
* Avoid gcc warnings because of #pragma GCC system_header on older gcc.Bruno Haible2008-10-181-0/+2
|
* Merge the two replacements for open() into a single one.Paolo Bonzini2008-10-091-3/+10
|
* Override open more carefully.Bruno Haible2008-09-281-2/+14
|
* Tweak patch that overrides open() and fopen().Bruno Haible2008-09-281-0/+1
|
* Avoid some "gcc -pedantic" warnings.Bruno Haible2008-08-301-1/+3
|
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|
* New module 'open'.Bruno Haible2007-10-071-2/+2
|
* Rename fcntl_.h to fcntl.in.h.Bruno Haible2007-10-021-0/+121