Commit Graph

253 Commits

Author SHA1 Message Date
Ulrich Drepper 400cc70af5 * io/ftw.c (open_dir_stream): Return right away if REALLOC fails.
[Coverity CID 229, 230]

	* argp/argp-help.c (hol_entry_help): Handle STATE==NULL in ARG and
	DGETTEXT calls.
	(hol_help): Likewise.  [Coverity CID 226, 227]

	* string/argz-replace.c (__argz_replace): Unconditionally call
	free on SRC.  [Coverity CID 225]

	* nis/nis_creategroup.c (nis_creategroup): No need to duplicate
	the return value of __nis_default_owner and __nis_default_group,
	it has been especially allocated.  [Coverity CID 224]
2006-05-10 06:39:15 +00:00
Ulrich Drepper e7c8359e43 * posix/wordexp.c (w_addword): Free word if realloc fails and it
was allocated here.  [Coverity CID 219]

	* posix/getconf.c (print_all): Free confstr data after printing.
	[Coverity CID 218]

	* sysdeps/posix/getaddrinfo.c (gaih_inet): Free canon string if
	list allocation fails.  [Coverity CID 215]

	* nss/nsswitch.c (__nss_configure_lookup): Fix loop end condition.
	[Coverity CID 213]

	* argp/argp-help.c (hol_entry_cmp): Don't call canon_doc_option if
	string is NULL.  [Coverity CID 212]
	* argp/Makefile: Add rules to build and run bug-argp1.
	* argp/bug-argp1.c: New file.

	* io/ftw.c (ftw_dir): Use __rawmemchr instead of strchr to find
	end of string.
	* stdlib/canonicalize.c (__realpath): Likewise.

	* locale/programs/ld-time.c (time_finish): Don't dereference NULL
	pointer.  [Coverity CID 206]

	* elf/dl-dst.h (DL_DST_REQUIRED): Be prepared for missing link map
	in statically linked code.
	* elf/dl-load.c (_dl_dst_substitute): When replacing ORIGIN in
	statically built code, be prepared to have no link map.
	[Coverity CID 205]

	* argp/argp-help.c (fill_in_uparams): Handle STATE==NULL in
	dgettext calls. [Coverity CID 204]

	* argp/argp-help.c (struct uparams): Remove valid member.  Change
	the one user.
	(uparam_names): Reduce size.  Avoid relative relocations.
	Moved to read-only segment.
	(fill_in_uparams): Update for new layout.

	* sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Parameter can be
	assumed to always be != NULL. [Coverity CID 202]

	* argp/argp-help.c (hol_entry_help): Remove some dead code
	[Coverity CID 200].

	* nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Optimize
	away a few more unconditional yperr2nss calls.
	(_nss_nis_getservbyname_r): Likewise.
2006-05-10 00:03:41 +00:00
Ulrich Drepper a346370d58 * posix/bits/unistd.h (__readlinkat_chk): New prototype.
(__readlinkat_alias): New alias.
	(readlinkat): New inline function.
	* include/unistd.h (readlinkat): Add libc_hidden_proto.
	* sysdeps/unix/sysv/linux/readlinkat.c (readlinkat): Add
	libc_hidden_def.
	* io/readlinkat.c (readlinkat): Likewise.
	* debug/readlinkat_chk.c: New file.
	* debug/Makefile (routines): Add readlinkat_chk.
	* debug/Versions (libc): Export __readlinkat_chk@@GLIBC_2.5.
	* debug/tst-chk1.c (do_test): Add readlinkat tests.

	* nis/nss_nisplus/nisplus-netgrp.c: Cleanups.
	code is possible.  Move compatibility code in .text.compat section.
	over gaih array.  There is only one function to call in the moment.
2006-04-24 17:01:40 +00:00
Ulrich Drepper db67c2c98b * io/fts.c (fts_build): Call fts_lfree in the two error cases
after the loop [Coverity CID 187].

	* nis/nis_getservlist.c (nis_getservlist): Also free lookup result
	in error case [Coverity CID 189].

	* nis/nis_getservlist.c (nis_getservlist): One more free call
	needed [Coverity CID 190].
2006-04-08 19:35:24 +00:00
Ulrich Drepper cec4091671 * sysdeps/posix/tempname.c (__gen_tempname): Change attempts_min
into a macro.  Use preprocessor to decide how to initialize
	attempts [Coverity CID 67].

	* io/fts.c (fts_build): Comment out dead code [Coverity CID 68].

	* sunrpc/rpc_parse.c (def_union): Comment out dead code
	[Coverity CID 70].

	* locale/programs/linereader.c (lr_token): Remove duplicate
	handling of EOF [Coverity CID 71].

	* locale/programs/ld-numeric.c (numeric_read) [case tok_grouping]:
	We bail out early if ignore_content is set, so there is no need to
	check it later again [Coverity CID 72].

	* inet/inet6_option.c (inet6_option_find): Check *tptrp for NULL,
	not tptrp [Coverity CID 73].

	* inet/inet6_option.c (inet6_option_next): Check *tptrp for NULL,
	not tptrp [Coverity CID 74].

	* misc/tsearch.c (__tsearch): Don't rotate tree if memory
	allocation failed [Coverity CID 78].
2006-04-07 20:25:36 +00:00
Ulrich Drepper 0292b0dd6c * libio/fmemopen.c (fmemopen): Free stream memory in case of
invalid length [Coverity CID 106].

	* nss/nss_files/files-key.c (search): Close stream before
	successful return [Coverity CID 107].

	* io/fts.c (fts_open): Don't allocate parent if *argv==NULL
	[Coverity CID 108].

	* sunrpc/rpc_cout.c (inline_struct): Free sizestr after use
	[Coverity CID 110, 109].

	* sunrpc/rpc_scan.c (docppline): Free file string if it is not
	going to be used [Coverity CID 111].

	* sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free
	memory if socket level value cannot be retrieved [Coverity CID 112].

	* nis/nis_clone_dir.c (nis_clone_directory): Free all memory in
	error case [Coverity CID 114].

	* nis/nis_clone_res.c (nis_clone_result): Free all memory in the
	error cases [Coverity CID 115].

	* sunrpc/rpc_parse.c (get_definition): Free defp if tok ==
	TOK_EOF [Coverity CID 116].

	* sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free
	memory if socket level value cannot be retrieved [Coverity CID 117].

	* elf/cache.c (save_cache): Initialize pad to avoid writing
	uninitialized data to disk.

	* elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118].

	* intl/finddomain.c (_nl_find_domain): Avoid strdup of expand
	locale name, use strdupa.  Remove free call [Coverity CID 119].

	* sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and
	the resulting leak [Coverity CID 121].

	* sunrpc/rpc_main.c (mkfile_output): Free all allocated memory
	[Coverity CID 122].

	* sunrpc/rpc_main.c (h_output): Free guard after we are done
	[Coverity CID 123].

	* sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation
	fails [Coverity CID 126].

	* sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error
	cases [Coverity CID 127].

	* nis/nis_table.c (__create_ib_request): Free ibreq in case strdup
	fails [Coverity CID 128].

	* nis/nis_getservlist.c (nis_getservlist): Free all memory in case
	of an error [Coverity CID 130, 129].

	* nis/nis_print_group_entry.c (nis_print_group_entry): If
	nis_lookup call failed, return.  Free lookup result in error
	cases [Coverity CID 131].

	* nis/nis_removemember.c (nis_removemember): Free all memory in
	error cases [Coverity CID 132].

	* nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r):
	Always free lookup result [Coverity CID 134].

	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r):
	Always free lookup result [Coverity CID 135].

	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r):
	Always free lookup result [Coverity CID 136].

	* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r):
	Before retrying, free old result [Coverity CID 137].

	* nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user):
	Free res in case UID is zero [Coverity CID 138].

	* nis/ypclnt.c (yp_update): Always free master string
	[Coverity CID 140].

	* nis/nis_creategroup.c (nis_creategroup): Free all memory in
	error cases [Coverity CID 143, 142, 141].

	* nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result
	if yp_match call succeeded [Coverity CID 155].

	* nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string
	allocated in yp_match at all times [Coverity CID 157, 156].

	* nscd/nscd.c (write_pid): Close stream also if writing failed
	[Coverity CID 165].

	* nis/nis_table.c (nis_add_entry): Move test for NULL parameter
	ahead of first use [Coverity CID 167].

	* nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test
	for NULL parameter ahead of first use [Coverity CID 168].

	* intl/finddomain.c (_nl_find_domain): We never return NULL if we
	found the locale [Coverity CID 169].

	* inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set
	herrno [Coverity CID 178].

	* nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned
	freed object [Coverity CID 182].
2006-04-07 04:29:25 +00:00
Ulrich Drepper 6d893bd991 [BZ #2450]
* posix/unistd.h: Match return value of readlink to what POSIX
	says these days.
	* io/readlink.c: Likewise.
	* io/readlinkat.c: Likewise.
	* sysdeps/unix/sysv/linux/readlinkat.c: Likewise.
2006-04-01 19:12:44 +00:00
Ulrich Drepper bb54908866 * io/ftw.c (process_entry): If dir->streamfd != -1,
use FXSTATAT rather than LXSTAT to find if unstatable
	file is a dead symlink.
2006-03-02 16:33:18 +00:00
Roland McGrath e2c7e1de2b * include/fcntl.h: Declare __openat, __open64. Use libc_hidden_proto.
* io/openat.c (__openat): Define instead of openat.
	Use libc_hidden_def.  Define openat with weak_alias.
	* io/openat64.c (__openat64): Define instead of openat64.
	Use libc_hidden_def.  Define openat64 with weak_alias.
	* sysdeps/unix/sysv/linux/openat.c: Likewise.

	* libio/genops.c: Include <sched.h> for __sched_yield decl.
2006-03-01 05:32:59 +00:00
Ulrich Drepper c804fb5f4e (AT_SYMLINK_FOLLOW): Define. 2006-02-27 21:38:55 +00:00
Ulrich Drepper b95e415363 (do_test): Pass new parameter to linkat. 2006-02-27 00:59:21 +00:00
Ulrich Drepper 4baf9081f8 Add fifth parameter to linkat. 2006-02-27 00:52:57 +00:00
Ulrich Drepper d369ad760d [BZ #2226]
2006-02-12  Ulrich Drepper  <drepper@redhat.com>
	* io/ftw.c: Start using *at functions.
	* io/ftw64.c: Likewise.

	* sysdeps/generic/not-cancel.h: Define openat_not_cancel,
	openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
	* sysdeps/unix/sysv/linux/not-cancel.h: Likewise.

	* sysdeps/unix/sysv/linux/openat.c: Create separate _nocancel
	functions.

	* io/fxstatat.c: Add __fxstatat alias.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c: Likewise.  Add support for
	newfstatat syscall.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c: Add __fxstatat alias.
	Add support for fstatat64 syscall.
	* include/sys/stat.h: Declare __fxstatat.
	* io/fxstatat64.c: Add __fxstatat64 alias.
	* sysdeps/unix/sysv/linux/fxstatat64.c: Add support for fstatat64
	syscall.

	* dirent/fdopendir.c: Add __fdopendir alias.
	* sysdeps/unix/fdopendir.c: Likewise.
	* sysdeps/mach/hurd/fdopendir.c: Likewise.
	* include/dirent.h: Add __fdopendir declaration.

	[BZ #2226]
	* libio/wgenops.c (_IO_wsetb): Use correct size of wide char
	buffer in FREE_BUF call.
2006-02-12 21:41:44 +00:00
Ulrich Drepper b576fca12a * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2006-02-08 15:33:47 +00:00
Ulrich Drepper becac6c5b1 * io/ftw.c (ftw_startup): Use fchdir to return to original
directory for FTW_CHDIR.
2006-02-05 21:19:53 +00:00
Ulrich Drepper bdc7e223aa * sysdeps/unix/sysv/linux/renameat.c (__atfct_seterrno_2): Correcty
return EBADF for non-existing file descriptors.
	* sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): Likewise.
	* io/tst-openat.c (do_test): Add some more tests.
	* io/tst-faccessat.c (do_test): Likewise.
	* io/tst-renameat.c (do_test): Likewise.
	* io/tst-fstatat.c (do_test): Likewise.
	* io/tst-fchmodat.c (do_test): Likewise.
	* io/tst-fchownat.c (do_test): Likewise.
2006-01-22 00:57:24 +00:00
Ulrich Drepper 046f451676 * io/Makefile (tests): Add tst-symlinkat, tst-linkat, tst-readlinkat,
tst-mkdirat, tst-mknodat, and tst-mkfifoat.
	* io/tst-mkdirat.c: New file.
	* io/tst-mknodat.c: New file.
	* io/tst-mkfifoat.c: New file.
2006-01-20 23:24:42 +00:00
Ulrich Drepper 48a1d526d0 * io/Makefile (tests): Add tst-symlinkat, tst-linkat, and
tst-readlinkat.
	* io/tst-symlinkat.c: New file.
	* io/tst-linkat.c: New file.
	* io/tst-readlinkat.c: New file.
2006-01-20 21:55:16 +00:00
Ulrich Drepper 7c65e9001b * include/fcntl.h: Declare __have_atfcts.
* sysdeps/unix/sysv/linux/faccessat.c: Use syscall if available.
	* sysdeps/unix/sysv/linux/fchmodat.c: Likewise.
	* sysdeps/unix/sysv/linux/fchownat.c: Likewise.
	* sysdeps/unix/sysv/linux/futimesat.c: Likewise.
	* sysdeps/unix/sysv/linux/linkat.c: Likewise.
	* sysdeps/unix/sysv/linux/mkdirat.c: Likewise.
	* sysdeps/unix/sysv/linux/openat.c: Likewise.
	* sysdeps/unix/sysv/linux/readlinkat.c: Likewise.
	* sysdeps/unix/sysv/linux/renameat.c: Likewise.
	* sysdeps/unix/sysv/linux/symlinkat.c: Likewise.
	* sysdeps/unix/sysv/linux/unlinkat.c: Likewise.
	* sysdeps/unix/sysv/linux/xmknodat.c: Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise.
	* sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_PSELECT,
	__ASSUME_PPOLL, and __ASSUME_ATFCTS if possible.

	* io/ppoll.c: New file.
	* io/Makefile (routines): Add ppoll.
	(CFLAGS-ppoll.c): Define.
	* io/Versions: Export ppoll for GLIBC_2.4.
	* io/sys/poll.h: Declare ppoll.
	* sysdeps/unix/sysv/linux/ppoll.c: New file.

	* misc/pselect.c: Make it possible to include this file to define
	the generic code as a static function.
	* sysdeps/unix/sysv/linux/pselect.c: New file.
2006-01-20 07:08:05 +00:00
Roland McGrath edbaf668f6 2006-01-15 Jakub Jelinek <jakub@redhat.com>
* io/tst-faccessat.c (do_test): Don't fail if geteuid () == 0.
2006-01-17 03:27:51 +00:00
Roland McGrath d15b99ac5a * io/fcntl.h [__USE_ATFILE] (AT_EACCESS): New macro.
* posix/unistd.h [__USE_ATFILE]: Declare faccessat.
	* io/faccessat.c: New file.
	* sysdeps/unix/sysv/linux/faccessat.c: New file.
	* io/Makefile (routines): Add faccessat.
	* io/Versions (libc: GLIBC_2.4): Likewise.
	* io/tst-faccessat.c: New file.
	* io/Makefile (tests): Add it.

	* io/sys/stat.h: Likewise.
2006-01-06 12:14:26 +00:00
Roland McGrath cb483e04aa * io/euidaccess.c: Add eaccess as an alias.
* sysdeps/mach/hurd/euidaccess.c: Likewise.
	* sysdeps/posix/euidaccess.c: Likewise.
	* posix/unistd.h [__USE_GNU]: Declare eaccess.
	* io/Versions (libc: GLIBC_2.4): Add eaccess.
2006-01-06 11:22:10 +00:00
Roland McGrath 0b8f25bbca * include/features.h: Grok _ATFILE_SOURCE and define __USE_ATFILE when
it or _GNU_SOURCE is defined.
	* io/fcntl.h: Protect *at and AT_* with [__USE_ATFILE] instead of
	[__USE_GNU].
	* libio/stdio.h: Likewise.
	* posix/unistd.h: Likewise.
	* time/sys/time.h: Likewise.
2006-01-05 12:25:42 +00:00
Roland McGrath c90c5d4106 * io/sys/stat.h [__USE_GNU]: Declare fchmodat.
* io/fchmodat.c: New file.
	* io/Makefile (routines): Add fchmodat.
	* io/Versions (libc: GLIBC_2.4): Likewise.
	* sysdeps/unix/sysv/linux/fchmodat.c: New file.
	* io/tst-fchmodat.c: New file.
	* io/Makefile (tests): Add it.
2006-01-05 10:32:47 +00:00
Ulrich Drepper f9b2d293f0 [BZ #1962]
* io/fts.c (fts_open): Change type of len to size_t.
	(fts_build): Remove cast in call to fts_alloc.
	(fts_alloc): Change third parameter's type to size_t.
2005-12-21 08:34:35 +00:00
Ulrich Drepper 87629a1c50 [BZ #1960]
2005-12-21  Ulrich Drepper  <drepper@redhat.com>
	[BZ #1960]
	* io/fts.c (fts_open): Avoid function call in MAX macro use.
2005-12-21 08:24:13 +00:00
Roland McGrath 322a48c5bf 2005-12-15 Thomas Schwinge <tschwinge@gnu.org>
* io/xmknodat.c: Include <stddef.h>.
	* misc/futimesat.c: Remove weak_alias and correct stub_warning.
	* stdio-common/renameat.c (renameat): Fix typo.
2005-12-20 07:31:14 +00:00
Ulrich Drepper 5c46041a9c * sysdeps/unix/sysv/linux/renameat.c: Move errno setting code in
separate function __atfct_seterrno_2.
	* include/fcntl.h: Declare __atfct_seterrno_2.
	* posix/unistd.h: Declare linkat, symlinkat, readlinkat.
	* io/Makefile (routines): Add linkat, symlinkat, readlinkat.
	* io/Versions [GLIBC_2.4]: Export linkat, symlinkat, readlinkat.
	* io/linkat.c: New file.
	* io/readlinkat.c: New file.
	* io/symlinkat.c: New file.
	* sysdeps/unix/sysv/linux/linkat.c: New file.
	* sysdeps/unix/sysv/linux/readlinkat.c: New file.
	* sysdeps/unix/sysv/linux/symlinkat.c: New file.
2005-12-16 00:24:16 +00:00
Ulrich Drepper 9d13fb2413 Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
Ulrich Drepper b6ab06cef4 2005-12-13 Ulrich Drepper <drepper@redhat.com> 2005-12-14 08:43:25 +00:00
Ulrich Drepper 1b64c27a9e * io/sys/stat.h: Add restrict to fstatat declarations. 2005-12-12 21:45:40 +00:00
Ulrich Drepper e186c703dc * io/Makefile (routines): Add mknodat, xmknodat, mkdirat, mkfifoat.
(static-only-routines): Add mknodat.
	* io/Versions [GLIBC_2.4]: Add mkdirat, mkfifoat, __xmknodat.
	* io/sys/stat.h: Declare mkditat, mknodat, mkfifoat, __xmknodat.
	Define mknodat inline function.
	* include/sys/stat.h: Add hidden proto for __xmknodat.
	* sysdeps/generic/mkdirat.c: New file.
	* sysdeps/generic/mkfifoat.c: New file.
	* sysdeps/generic/mknodat.c: New file.
	* sysdeps/generic/xmknodat.c: New file.
	* sysdeps/unix/mkfifoat.c: New file.
	* sysdeps/unix/sysv/linux/mkdirat.c: New file.
	* sysdeps/unix/sysv/linux/xmknodat.c: New file.

	* sysdeps/generic/xmknod.c: Add one more parameter check.
2005-12-02 21:55:54 +00:00
Ulrich Drepper 8b7bdd8b88 . 2005-11-18 00:31:58 +00:00
Ulrich Drepper 776356486d . 2005-11-18 00:17:40 +00:00
Ulrich Drepper c6f688a090 * io/sys/stat.h (fstatat): If __REDIRECT_NTH isn't defined,
define fstatat to fstatat64.
	(fstatat64): Only provide prototype if __USE_LARGEFILE64,
	similarly with the inline.
	* io/fcntl.h (openat64): Only provide prototype if __USE_LARGEFILE64.
2005-11-17 21:32:27 +00:00
Ulrich Drepper be71aa3c55 * io/sys/stat.h: Use __const not const in fstatat prototypes. 2005-11-17 15:29:42 +00:00
Ulrich Drepper 7761a3ac53 * io/sys/poll.h: Add comment explaining poll is a cancellation
point.

	* sysdeps/unix/sysv/linux/sys/epoll.h: Add comment explaining
	epoll_wait is a cancellation point.
2005-11-15 21:58:44 +00:00
Ulrich Drepper 933c64a356 * sysdeps/unix/sysv/linux/syscalls.list (epoll_create, epoll_ctl,
epoll_wait): Align with poll, make cancelable.

2005-11-15  Jakub Jelinek  <jakub@redhat.com>

	* io/sys/stat.h (fstatat): Don't use __THROW together with
	__REDIRECT_NTH.
2005-11-15 19:59:57 +00:00
Ulrich Drepper 26cec518ac * io/Makefile (routines): Add fstatat, fstatat64, fxstatat, fxstatat64,
fchownat, and unlinkat.
	(static-only-routines): Add fstatat and fstatat64.
	(tests): Add tst-unlinkat, tst-fstatat, tst-futimesat, tst-renameat,
	and tst-fchownat.
	* io/Versions [GLIBC_2.4]: Add fchownat, __fxstatat, __fxstatat64,
	and unlinkat.
	* io/fcntl.h: Define AT_FDCWD, AT_SYMLINK_NOFOLLOW, and AT_REMOVEDIR.
	* io/fstatat.c: New file.
	* io/fstatat64.c: New file.
	* io/sys/stat.h: Declare fstatat, fstatat64, __fxstatat, __fxstatat64
	and define fstatat and fstatat64 inline functions.
	* libio/stdio.h: Declare renameat.
	* misc/Makefile (routines): Add futimesat.
	* misc/Versions [GLIBC_2.4]: Add futimesat.
	* posix/unistd.h: Declare fchownat and unlinkat.
	* stdio-common/Makefile (routines): Add renameat.
	* stdio-common/Versions [GLIBC_2.4]: Add renameat.
	* sysdeps/generic/fchownat.c: New file.
	* sysdeps/generic/futimesat.c: New file.
	* sysdeps/generic/fxstatat.c: New file.
	* sysdeps/generic/fxstatat64.c: New file.
	* sysdeps/generic/renameat.c: New file.
	* sysdeps/generic/unlinkat.c: New file.
	* sysdeps/unix/sysv/linux/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/futimesat.c: New file.
	* sysdeps/unix/sysv/linux/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/fxstatat64.c: New file.
	* sysdeps/unix/sysv/linux/renameat.c: New file.
	* sysdeps/unix/sysv/linux/unlinkat.c: New file.
	* sysdeps/unix/sysv/linux/alpha/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/i386/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/m68k/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/m68k/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/s390/s390-32/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/sh/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/sh/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat64.c: New file.
	* time/sys/time.h: Declare futimesat.
	* include/fcntl.h: Declare __atfct_seterrno.
	* sysdeps/unix/sysv/linux/openat.c (__atfct_seterrno): New function.
	Split out from openat code and called.
	(do_test): Allow openat to fail with ENOSYS.  Handle AT_FDCWD.
	* sysdeps/generic/openat.c: Handle AT_FDCWD.
	* sysdeps/generic/openat64.c: Likewise.
	* io/tst-unlinkat.c: New file.
	* io/tst-fstatat.c: New file.
	* io/tst-futimesat.c: New file.
	* io/tst-renameat.c: New file.
	* io/tst-fchownat.c: New file.
	* io/tst-openat.c: Don't fail if openat is not implemented.

	* sysdeps/unix/sysv/linux/powerpc/chown.c: Don't provide backward
	compatibility code if new kernel is guaranteed.

	* time/sys/time.h: Add a few nonnull attributes.
2005-11-11 20:02:07 +00:00
Ulrich Drepper 4973cbe599 * io/fcntl.h: Declare openat and openat64.
* io/Makefile (routines): Add openat and openat64.
	(tests): Add tst-openat.
	* io/Versions: Add openat and openat64 for GLIBC_2.4.
	* sysdeps/generic/openat.c: New file.
	* sysdeps/generic/openat64.c: New file.
	* sysdeps/unix/sysv/linux/openat.c: New file.
	* sysdeps/unix/sysv/linux/openat64.c: New file.
	* io/tst-openat.c: New file.

	* sysdeps/unix/sysv/linux/device-nrs.h: Add info for /dev/full.
2005-11-10 00:12:21 +00:00
Ulrich Drepper c179df4e93 [BZ #961]
2005-05-22  Dmitry V. Levin  <ldv@altlinux.org>
	[BZ #961]
	* io/sys/sendfile.h: Remove __nonnull from sendfile and sendfile64
	declarations.
2005-05-23 17:37:21 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper 067fff20b7 Update.
2004-09-28  Jakub Jelinek  <jakub@redhat.com>

	* io/utime.h (utime): Allow second argument to be NULL.
2004-09-28 07:46:43 +00:00
Ulrich Drepper 8a1f658bd7 Update.
2004-09-17  Ulrich Drepper  <drepper@redhat.com>

	* misc/sys/cdefs.h: Define __nonnull using nonnull function attribute
	for gcc 3.3 and higher.
	* io/fcntl.h: Add __nonnull where appropriate.
	* io/ftw.h: Likewise.
	* io/utime.h: Likewise.
	* io/sys/poll.h: Likewise.
	* io/sys/sendfile.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statfs.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* posix/unistd.h: Likewise.
2004-09-17 08:44:34 +00:00
Ulrich Drepper 79937577d1 Update.
2004-09-13  Ulrich Drepper  <drepper@redhat.com>

	* misc/sys/cdefs.h: Restore old definition of __P.
	* csu/munch.awk: Remove uses of __P and __PMT.
	* gmon/gmon.c: Likewise.
	* hesiod/hesiod.h: Likewise.
	* include/stdio.h: Likewise.
	* io/fts.c: Likewise.
	* libio/genops.c: Likewise.
	* libio/libioP.h: Likewise.
	* libio/fileops.c: Likewise.
	* libio/iolibio.h: Likewise.
	* libio/libio.h: Likewise.
	* libio/memstream.c: Likewise.
	* libio/oldfileops.c: Likewise.
	* libio/oldstdfiles.c: Likewise.
	* libio/iopopen.c: Likewise.
	* libio/vsnprintf.c: Likewise.
	* libio/vswprintf.c: Likewise.
	* libio/wgenops.c: Likewise.
	* libio/oldiopopen.c: Likewise.
	* locale/programs/xmalloc.c: Likewise.
	* locale/programs/xstrdup.c: Likewise.
	* malloc/mtrace.c: Likewise.
	* misc/getttyent.c: Likewise.
	* misc/getusershell.c: Likewise.
	* nis/rpcsvc/ypupd.h: Likewise.
	* posix/fnmatch.h: Likewise.
	* posix/glob.h: Likewise.
	* resolv/arpa/nameser.h: Likewise.
	* resolv/gethnamaddr.c: Likewise.
	* resolv/resolv.h: Likewise.
	* resolv/inet_net_ntop.c: Likewise.
	* resolv/inet_net_pton.c: Likewise.
	* resolv/res_init.c: Likewise.
	* resolv/nss_dns/dns-network.c: Likewise.
	* stdio-common/vfprintf.c: Likewise.
	* stdio-common/reg-printf.c: Likewise.
	* sysdeps/generic/chflags.c: Likewise.
	* sysdeps/generic/fchflags.c: Likewise.
	* sysdeps/generic/glob.c: Likewise.
	* sysdeps/generic/printf_fphex.c: Likewise.
	* sysdeps/generic/memcmp.c: Likewise.
	* sysdeps/generic/memcopy.h: Likewise.
	* sysdeps/generic/morecore.c: Likewise.
	* sysdeps/generic/sstk.c: Likewise.
	* sysdeps/posix/sigvec.c: Likewise.
	* sysdeps/posix/ttyname_r.c: Likewise.
	* sysdeps/standalone/arm/bits/errno.h: Likewise.
	* sysdeps/standalone/standalone.h: Likewise.
	* sysdeps/standalone/i386/force_cpu386/brdinit.c: Likewise.
	* sysdeps/standalone/i386/force_cpu386/_exit.c: Likewise.
	* sysdeps/unix/arm/start.c: Likewise.
	* sysdeps/unix/bsd/sigaction.c: Likewise.
	* sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise.
	* sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise.
	* sysdeps/unix/bsd/sun/sunos4/wait4.c: Likewise.
	* sysdeps/unix/bsd/ultrix4/mips/sigvec.c: Likewise.
	* sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise.
	* sysdeps/unix/sparc/start.c: Likewise.
	* sysdeps/unix/sysv/getdents.c: Likewise.
	* sysdeps/unix/sysv/irix4/fpathconf.c: Likewise.
	* sysdeps/unix/sysv/irix4/getgroups.c: Likewise.
	* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
	* sysdeps/unix/sysv/irix4/getrusage.c: Likewise.
	* sysdeps/unix/sysv/irix4/pathconf.c: Likewise.
	* sysdeps/unix/sysv/irix4/setgroups.c: Likewise.
	* sysdeps/unix/sysv/irix4/sigtramp.c: Likewise.
	* sysdeps/unix/sysv/irix4/start.c: Likewise.
	* sysdeps/unix/sysv/irix4/sysconf.c: Likewise.
	* sysdeps/unix/sysv/sco3.2.4/__setpgid.c: Likewise.
	* sysdeps/unix/sysv/sco3.2.4/getgroups.c: Likewise.
	* sysdeps/unix/sysv/sysv4/__getpgid.c: Likewise.
	* sysdeps/unix/sysv/sysv4/__setpgid.c: Likewise.
	* sysdeps/unix/sysv/sysv4/getpgid.c: Likewise.
	* sysdeps/unix/sysv/sysv4/setpgid.c: Likewise.
	* sysdeps/unix/sysv/sysv4/sethostname.c: Likewise.
	* sysdeps/unix/sysv/sysv4/setsid.c: Likewise.
	* sysdeps/unix/sysv/sysv4/sysconf.c: Likewise.
	* sysdeps/unix/sysv/sysv4/waitpid.c: Likewise.
	* sysdeps/unix/sysv/sysv4/solaris2/getdents.c: Likewise.
	* time/tzset.c: Likewise.
	* time/strftime_l.c: Likewise.
	* time/strptime_l.c: Likewise.
	* crypt/md5.h: Likewise.
2004-09-14 04:41:35 +00:00
Ulrich Drepper f377d02227 Update.
* include/atomic.h: Define atomic_increment_val, atomic_decrement_val,
	and atomic_dealy is not already defined.
	* sysdeps/i386/i486/bits/atomic.h: Define atomic_delay.
	* sysdeps/x86_64/bits/atomic.h: Likewise.

	* miscd/sys/cdefs.h (__NTH): New macro.
	(__THROW): Define using nothrow attribute for C code and gcc >= 3.2.
	(__REDIRECT_NTH): New macro.
	* argp/argp.h: Use __NTH and __REDIRECT_NTH where necessary.
	* ctype/ctype.h: Likewise.
	* dirent/dirent.h: Likewise.
	* io/fcntl.h: Likewise.
	* io/sys/sendfile.h: Likewise.
	* io/sys/stat.h: Likewise.
	* io/sys/statfs.h: Likewise.
	* io/sys/statvfs.h: Likewise.
	* libio/bits/stdio.h: Likewise.
	* misc/sys/mman.h: Likewise.
	* posix/unistd.h: Likewise.
	* resource/sys/resource.h: Likewise.
	* rt/aio.h: Likewise.
	* signal/signal.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/argz.h: Likewise.
	* string/string.h: Likewise.
	* sysdeps/generic/inttypes.h: Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h: Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/sys/sysmacros.h: Likewise.
	* wcsmbs/wchar.h: Likewise.

	* sysdeps/generic/glob.c: Use __PMT isntead of __P where appropriate.

	* resolv/gethnamaddr.c (getanswer): Remove __P use in variable
	definition.

	* io/sys/poll.h: Remove __THROW from poll prototype, it's a
	cancellation point.
2004-09-07 22:33:37 +00:00
Ulrich Drepper e0329987e3 Update.
2004-09-07  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
	the initialization function might throw.
2004-09-07 20:52:41 +00:00
Ulrich Drepper f863a5a5af Update.
* io/fts.c (fts_open): Remove uses of __P.
2004-09-07 17:28:11 +00:00
Roland McGrath 92c6ccd1b2 * csu/elf-init.c: Update copyright terms including special exception
for these trivial files, which are statically linked into executables
	that use dynamic linking for the significant library code.
	* io/fstat.c: Likewise.
	* io/fstat64.c: Likewise.
	* io/lstat.c: Likewise.
	* io/lstat64.c: Likewise.
	* io/stat.c: Likewise.
	* io/stat64.c: Likewise.
	* stdlib/atexit.c: Likewise.
	* sysdeps/alpha/elf/initfini.c: Likewise.
	* sysdeps/alpha/elf/start.S: Likewise.
	* sysdeps/arm/elf/start.S: Likewise.
	* sysdeps/cris/elf/start.S: Likewise.
	* sysdeps/generic/initfini.c: Likewise.
	* sysdeps/generic/mknod.c: Likewise.
	* sysdeps/hppa/elf/initfini.c: Likewise.
	* sysdeps/hppa/elf/start.S: Likewise.
	* sysdeps/i386/elf/start.S: Likewise.
	* sysdeps/i386/i686/hp-timing.c: Likewise.
	* sysdeps/ia64/elf/initfini.c: Likewise.
	* sysdeps/ia64/elf/start.S: Likewise.
	* sysdeps/ia64/hp-timing.c: Likewise.
	* sysdeps/m68k/elf/start.S: Likewise.
	* sysdeps/mach/start.c: Likewise.
	* sysdeps/mips/elf/start.S: Likewise.
	* sysdeps/powerpc/powerpc32/elf/start.S: Likewise.
	* sysdeps/powerpc/powerpc64/elf/start.S: Likewise.
	* sysdeps/s390/s390-32/elf/start.S: Likewise.
	* sysdeps/s390/s390-32/initfini.c: Likewise.
	* sysdeps/s390/s390-64/elf/start.S: Likewise.
	* sysdeps/s390/s390-64/initfini.c: Likewise.
	* sysdeps/sh/elf/initfini.c: Likewise.
	* sysdeps/sh/elf/start.S: Likewise.
	* sysdeps/sparc/sparc32/elf/start.S: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise.
	* sysdeps/sparc/sparc64/elf/start.S: Likewise.
	* sysdeps/sparc/sparc64/hp-timing.c: Likewise.
	* sysdeps/standalone/i386/start.S: Likewise.
	* sysdeps/standalone/i960/start.S: Likewise.
	* sysdeps/standalone/m68k/m68020/start.S: Likewise.
	* sysdeps/unix/arm/start.c: Likewise.
	* sysdeps/unix/bsd/osf/alpha/start.S: Likewise.
	* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
	* sysdeps/unix/sparc/start.c: Likewise.
	* sysdeps/unix/start.c: Likewise.
	* sysdeps/unix/sysv/aix/start.s: Likewise.
	* sysdeps/unix/sysv/irix4/start.c: Likewise.
	* sysdeps/x86_64/elf/initfini.c: Likewise.
	* sysdeps/x86_64/elf/start.S: Likewise.
2004-08-16 04:51:23 +00:00