diff options
47 files changed, 173 insertions, 67 deletions
diff --git a/ChangeLog.1043890b10996ec4b14cd01040b82610760d5d4a b/ChangeLog.1043890b10996ec4b14cd01040b82610760d5d4a new file mode 100644 index 0000000000..7062cd852c --- /dev/null +++ b/ChangeLog.1043890b10996ec4b14cd01040b82610760d5d4a @@ -0,0 +1,6 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * sysdeps/mach/hurd/brk.c (_hurd_set_brk): When more space needs to be + allocated, call __vm_protect to finish enabling the existing space, and + pass a copy of _hurd_data_end instead of PAGEBRK to __vm_allocate to + allocate the remainder. diff --git a/ChangeLog.10589b4adb212dfde20670aacfb76aa842f42b92 b/ChangeLog.10589b4adb212dfde20670aacfb76aa842f42b92 new file mode 100644 index 0000000000..569ebc8125 --- /dev/null +++ b/ChangeLog.10589b4adb212dfde20670aacfb76aa842f42b92 @@ -0,0 +1,4 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Use + __strtoul_internal rather than strtoul. diff --git a/ChangeLog.1792c087e53274678b4c638a54ca6b85182e51ca b/ChangeLog.1792c087e53274678b4c638a54ca6b85182e51ca new file mode 100644 index 0000000000..c0fa1aef5b --- /dev/null +++ b/ChangeLog.1792c087e53274678b4c638a54ca6b85182e51ca @@ -0,0 +1,3 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * include/libc-symbols.h [NO_HIDDEN] (hidden_nolink): New macro. diff --git a/ChangeLog.2c040eff839ff8c2b1b1c3ab0f6cbb30976ce87a b/ChangeLog.2c040eff839ff8c2b1b1c3ab0f6cbb30976ce87a new file mode 100644 index 0000000000..d44e57cb6d --- /dev/null +++ b/ChangeLog.2c040eff839ff8c2b1b1c3ab0f6cbb30976ce87a @@ -0,0 +1,4 @@ +2012-04-06 Andreas Jaeger <aj@suse.de> + + * nss/nss_db/db-initgroups.c: Include <string.h> for strlen and + strncmp declarations. diff --git a/ChangeLog.37ed8b9bdc820a23d5884132d0278d9e42942fd3 b/ChangeLog.37ed8b9bdc820a23d5884132d0278d9e42942fd3 new file mode 100644 index 0000000000..e2f4c96234 --- /dev/null +++ b/ChangeLog.37ed8b9bdc820a23d5884132d0278d9e42942fd3 @@ -0,0 +1,4 @@ +2012-05-10 Pino Toscano <toscano.pino@tiscali.it> + + * sysdeps/mach/hurd/recvfrom.c (__recvfrom): Check also for a null + address port. Set ADDR_LEN to 0 when not filling ADDRARG. diff --git a/ChangeLog.3faebe6abc04ea8d632bee4537948ca85479c09a b/ChangeLog.3faebe6abc04ea8d632bee4537948ca85479c09a new file mode 100644 index 0000000000..bf4d0b9c92 --- /dev/null +++ b/ChangeLog.3faebe6abc04ea8d632bee4537948ca85479c09a @@ -0,0 +1,5 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * sysdeps/mach/hurd/setresgid.c (__setresgid): Handle the -1 case, + which preserves existing values. + * sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise. diff --git a/ChangeLog.510bbf14b4f25fec8ee3a2d24de3f24bdbf84333 b/ChangeLog.510bbf14b4f25fec8ee3a2d24de3f24bdbf84333 new file mode 100644 index 0000000000..b581234940 --- /dev/null +++ b/ChangeLog.510bbf14b4f25fec8ee3a2d24de3f24bdbf84333 @@ -0,0 +1,4 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * sysdeps/mach/hurd/Makefile ($(common-objpfx)linkobj/libc.so): + Depend on against $(link-rpcuserlibs). diff --git a/ChangeLog.5d5722e8ac22253bdc819da2d676d9900da0c533 b/ChangeLog.5d5722e8ac22253bdc819da2d676d9900da0c533 new file mode 100644 index 0000000000..5296783c24 --- /dev/null +++ b/ChangeLog.5d5722e8ac22253bdc819da2d676d9900da0c533 @@ -0,0 +1,9 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * sysdeps/generic/ldsodefs.h [LIBC_STACK_END_NOT_RELRO] + (__libc_stack_end): Do not use attribute_relro. + * sysdeps/mach/hurd/dl-sysdep.h (LIBC_STACK_END_NOT_RELRO): Define. + * sysdeps/mach/hurd/i386/init-first.c (init): Update __libc_stack_end + to libthread-provided value. + * sysdeps/mach/hurd/dl-sysdep.c (__libc_stack_end): Do not use + attribute_relro. diff --git a/ChangeLog.6103ae3b0eb1569cfdceb0e7c9625643b63dfd2a b/ChangeLog.6103ae3b0eb1569cfdceb0e7c9625643b63dfd2a new file mode 100644 index 0000000000..37120788b7 --- /dev/null +++ b/ChangeLog.6103ae3b0eb1569cfdceb0e7c9625643b63dfd2a @@ -0,0 +1,3 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * elf/Makefile (pldd-modules): Define unconditionally. diff --git a/ChangeLog.63643c85d4c47512decc16f35124160629c39a86 b/ChangeLog.63643c85d4c47512decc16f35124160629c39a86 new file mode 100644 index 0000000000..3bf85e1db0 --- /dev/null +++ b/ChangeLog.63643c85d4c47512decc16f35124160629c39a86 @@ -0,0 +1,4 @@ +2012-05-10 Pino Toscano <toscano.pino@tiscali.it> + + * hurd/hurdsock.c (_hurd_socket_server): Check for negative domains, + and reject them. diff --git a/ChangeLog.66cbbebcc616db8e221e81f7ecbb2c77701d031b b/ChangeLog.66cbbebcc616db8e221e81f7ecbb2c77701d031b new file mode 100644 index 0000000000..17be706eeb --- /dev/null +++ b/ChangeLog.66cbbebcc616db8e221e81f7ecbb2c77701d031b @@ -0,0 +1,5 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + Fix mlock in all cases except non-readable pages. + * sysdeps/mach/hurd/mlock.c (mlock): Give VM_PROT_READ + instead of VM_PROT_ALL as parameter to __vm_wire function. diff --git a/ChangeLog.6b645f0d702e9285f3d7fe5684258e77051cfa8e b/ChangeLog.6b645f0d702e9285f3d7fe5684258e77051cfa8e new file mode 100644 index 0000000000..3c0dd03e48 --- /dev/null +++ b/ChangeLog.6b645f0d702e9285f3d7fe5684258e77051cfa8e @@ -0,0 +1,5 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * sysdeps/mach/hurd/mkdir.c: Include <string.h>. + (__mkdir): When path is `/', just fail with EEXIST. + * sysdeps/mach/hurd/mkdirat.c: Likewise. diff --git a/ChangeLog.8069478040336a7de3461be275432493cc7e4c91 b/ChangeLog.8069478040336a7de3461be275432493cc7e4c91 new file mode 100644 index 0000000000..2b2eb6cf11 --- /dev/null +++ b/ChangeLog.8069478040336a7de3461be275432493cc7e4c91 @@ -0,0 +1,3 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * nss/makedb.c (MAP_POPULATE): If not defined, define to zero. diff --git a/ChangeLog.80b4e5f3ef231702b24d44c33e8dceb70abb3a06 b/ChangeLog.80b4e5f3ef231702b24d44c33e8dceb70abb3a06 new file mode 100644 index 0000000000..fd0075d6bc --- /dev/null +++ b/ChangeLog.80b4e5f3ef231702b24d44c33e8dceb70abb3a06 @@ -0,0 +1,3 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * sysdeps/mach/hurd/opendir.c (__opendirat): New function. diff --git a/ChangeLog.8e41b99fe1ae60276f8db4211d47ed2b1bacebf2 b/ChangeLog.8e41b99fe1ae60276f8db4211d47ed2b1bacebf2 new file mode 100644 index 0000000000..118d57ac97 --- /dev/null +++ b/ChangeLog.8e41b99fe1ae60276f8db4211d47ed2b1bacebf2 @@ -0,0 +1,11 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * sysdeps/mach/hurd/bits/stat.h (struct stat): Align to what is done + for Linux: use nsec instead of usec, as well as: + [__USE_MISC || __USE_XOPEN2K8] (st_atim, st_mtim, st_ctim): New + members of type struct timespec. + [__USE_MISC || __USE_XOPEN2K8] (st_atime, st_mtime, st_ctime): + New macros. + (struct stat64): Likewise. + (_STATBUF_ST_NSEC): New macro. + * sysdeps/mach/hurd/xstatconv.c (xstat64_conv): Adapt to that. diff --git a/ChangeLog.a4186cffbfdb464ff1b7344fd7561d6014ef721e b/ChangeLog.a4186cffbfdb464ff1b7344fd7561d6014ef721e new file mode 100644 index 0000000000..caa8ddad24 --- /dev/null +++ b/ChangeLog.a4186cffbfdb464ff1b7344fd7561d6014ef721e @@ -0,0 +1,5 @@ +2012-05-10 Pino Toscano <toscano.pino@tiscali.it> + + * sysdeps/mach/nanosleep.c: Return EINVAL for invalid values of + REQUESTED_TIME. Properly set the remaining time and return EINTR + if interrupted. diff --git a/ChangeLog.b29d4053f0bda40f052cf69019e4198a21c67efb b/ChangeLog.b29d4053f0bda40f052cf69019e4198a21c67efb new file mode 100644 index 0000000000..5505860e90 --- /dev/null +++ b/ChangeLog.b29d4053f0bda40f052cf69019e4198a21c67efb @@ -0,0 +1,4 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * sysdeps/mach/hurd/readlinkat.c: New file, heavily derived from + sysdeps/mach/hurd/readlink.c. diff --git a/ChangeLog.c6474b07e7b5f0cdc9089c1c4fcfc4fcaa2bcd92 b/ChangeLog.c6474b07e7b5f0cdc9089c1c4fcfc4fcaa2bcd92 new file mode 100644 index 0000000000..39313442ad --- /dev/null +++ b/ChangeLog.c6474b07e7b5f0cdc9089c1c4fcfc4fcaa2bcd92 @@ -0,0 +1,5 @@ +2012-05-10 Pino Toscano <toscano.pino@tiscali.it> + + * hurd/hurdselect.c (_hurd_select): Return EINVAL for negative + TIMEOUT values. Return EINVAL for NFDS values either negative or + greater than FD_SETSIZE. diff --git a/ChangeLog.db65366043bd85adbf7b0a73f406f5dadbf5ceb3 b/ChangeLog.db65366043bd85adbf7b0a73f406f5dadbf5ceb3 new file mode 100644 index 0000000000..d6fd7f866f --- /dev/null +++ b/ChangeLog.db65366043bd85adbf7b0a73f406f5dadbf5ceb3 @@ -0,0 +1,17 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * posix/tst-sysconf.c (posix_options): Only use + _POSIX_PRIORITIZED_IO, _POSIX_PRIORITY_SCHEDULING, and + _POSIX_SYNCHRONIZED_IO when they are defined + * sysdeps/mach/hurd/bits/posix_opt.h: + (_POSIX_PRIORITY_SCHEDULING): Undefine macro. + (_XOPEN_REALTIME): Undefine macro. + (_XOPEN_REALTIME_THREADS): Undefine macro. + (_XOPEN_SHM): Undefine macro. + [__USE_XOPEN2K8] (_POSIX_THREAD_ROBUST_PRIO_INHERIT): Define + macro to -1. + [__USE_XOPEN2K8] (_POSIX_THREAD_ROBUST_PRIO_PROTECT): Define + macro to -1. + (_POSIX_ASYNC_IO): Undefine macro. + (_POSIX_PRIORITIZED_IO): Undefine macro. + (_POSIX_SPIN_LOCKS): Define macro to -1. diff --git a/ChangeLog.e468f8a3a7b10b9cecfc92a0c3090f25b42a56a6 b/ChangeLog.e468f8a3a7b10b9cecfc92a0c3090f25b42a56a6 new file mode 100644 index 0000000000..958f1dd52f --- /dev/null +++ b/ChangeLog.e468f8a3a7b10b9cecfc92a0c3090f25b42a56a6 @@ -0,0 +1,6 @@ +2012-05-10 Thomas Schwinge <thomas@schwinge.name> + + * nss/makedb.c: Include <sys/param.h> (for MAX and roundup), and + <sys/uio.h> (for writev). + * nss/nss_db/db-initgroups.c: Include <limits.h> (for ULONG_MAX), + and <sys/param.h> (for MIN). diff --git a/ChangeLog.edadcbd6247ca741756e234b6aa5f3db895bdd3d b/ChangeLog.edadcbd6247ca741756e234b6aa5f3db895bdd3d new file mode 100644 index 0000000000..0559cc85d3 --- /dev/null +++ b/ChangeLog.edadcbd6247ca741756e234b6aa5f3db895bdd3d @@ -0,0 +1,5 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * hurd/hurdchdir.c (_hurd_change_directory_port_from_name): + Return ENOENT when name is empty. + * sysdeps/mach/hurd/chroot.c (chroot): Likewise. diff --git a/ChangeLog.ee16e894aaf51674058224fe0ece852bd0b3632d b/ChangeLog.ee16e894aaf51674058224fe0ece852bd0b3632d new file mode 100644 index 0000000000..9c5c0c84e6 --- /dev/null +++ b/ChangeLog.ee16e894aaf51674058224fe0ece852bd0b3632d @@ -0,0 +1,7 @@ +2012-05-10 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * bits/sigaction.h [__USE_XOPEN2K8]: Define SA_RESTART, + SA_NODEFER, SA_RESETHAND. + * sysdeps/mach/hurd/bits/fcntl.h [__USE_XOPEN2K8]: Define + O_NOFOLLOW, O_DIRECTORY, O_CLOEXEC, F_GETOWN, F_SETOWN, + F_DUPFD_CLOEXEC. diff --git a/bits/sigaction.h b/bits/sigaction.h index 13a0b5cec2..a737660ce4 100644 --- a/bits/sigaction.h +++ b/bits/sigaction.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,96,97,98,2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/hurd/hurdchdir.c b/hurd/hurdchdir.c index 03e1e8da9b..1669358a57 100644 --- a/hurd/hurdchdir.c +++ b/hurd/hurdchdir.c @@ -1,5 +1,5 @@ /* Change a port cell to a directory by looking up a name. - Copyright (C) 1999,2001,02 Free Software Foundation, Inc. + Copyright (C) 1999-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,11 +38,8 @@ _hurd_change_directory_port_from_name (struct hurd_port *portcell, if (len >= 2 && name[len - 2] == '/' && name[len - 1] == '.') lookup = name; else if (len == 0) - { - /* Special-case null pathname according to POSIX */ - errno = ENOENT; - return -1; - } + /* Special-case empty file name according to POSIX. */ + return __hurd_fail (ENOENT); else { char *n = alloca (len + 3); diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c index 4b3fb4ccb5..21ba5f42a4 100644 --- a/hurd/hurdselect.c +++ b/hurd/hurdselect.c @@ -1,6 +1,5 @@ /* Guts of both `select' and `poll' for Hurd. - Copyright (C) 1991,92,93,94,95,96,97,98,99,2001 - Free Software Foundation, Inc. + Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -82,8 +81,8 @@ _hurd_select (int nfds, return -1; } - to = timeout->tv_sec * 1000 + - (timeout->tv_nsec + 999999) / 1000000; + to = (timeout->tv_sec * 1000 + + (timeout->tv_nsec + 999999) / 1000000); } if (sigmask && __sigprocmask (SIG_SETMASK, sigmask, &oset)) @@ -379,7 +378,7 @@ _hurd_select (int nfds, } /* Look up the respondent's reply port and record its - readiness. */ + readiness. */ { int had = got; if (firstfd != -1) diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c index 59202e8a49..2eda3653bb 100644 --- a/hurd/hurdsock.c +++ b/hurd/hurdsock.c @@ -1,5 +1,5 @@ /* _hurd_socket_server - Find the server for a socket domain. - Copyright (C) 1991,92,93,94,95,97,99 Free Software Foundation, Inc. + Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c index 8e16067613..94c39ef656 100644 --- a/hurd/lookup-retry.c +++ b/hurd/lookup-retry.c @@ -1,6 +1,5 @@ /* hairy bits of Hurd file name lookup - Copyright (C) 1992,1993,1994,1995,1996,1997,1999,2001,2002,2003,2005 - Free Software Foundation, Inc. + Copyright (C) 1992-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -44,10 +43,10 @@ lookup_error (error_t error) error_t __hurd_file_name_lookup_retry (error_t (*use_init_port) - (int which, error_t (*operate) (file_t)), + (int which, error_t (*operate) (file_t)), file_t (*get_dtable_port) (int fd), error_t (*lookup) - (file_t dir, char *name, + (file_t dir, char *name, int flags, mode_t mode, retry_type *do_retry, string_t retry_name, mach_port_t *result), diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 3bbdd460d0..44b4d80a55 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -1,7 +1,6 @@ /* Support macros for making weak and strong aliases for symbols, and for using symbol sets and linker warnings with GNU ld. - Copyright (C) 1995-1998,2000-2006,2008,2009,2011,2012 - Free Software Foundation, Inc. + Copyright (C) 1995-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/nss/makedb.c b/nss/makedb.c index 5d3cabb994..5890c054f0 100644 --- a/nss/makedb.c +++ b/nss/makedb.c @@ -1,5 +1,5 @@ /* Create simple DB database from textual input. - Copyright (C) 1996-2000, 2011, 2012 Free Software Foundation, Inc. + Copyright (C) 1996-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/nss/nss_db/db-initgroups.c b/nss/nss_db/db-initgroups.c index 4cbba28355..16eb8e2d82 100644 --- a/nss/nss_db/db-initgroups.c +++ b/nss/nss_db/db-initgroups.c @@ -1,5 +1,5 @@ /* Initgroups handling in nss_db module. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gmail.com>. diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile index 9ad475d935..107eaafb05 100644 --- a/sysdeps/mach/hurd/Makefile +++ b/sysdeps/mach/hurd/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993-2004,2009,2011,2012 Free Software Foundation, Inc. +# Copyright (C) 1993-2012 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h index 482e849235..1d24c7399d 100644 --- a/sysdeps/mach/hurd/bits/fcntl.h +++ b/sysdeps/mach/hurd/bits/fcntl.h @@ -1,6 +1,5 @@ /* O_*, F_*, FD_* bit values for GNU. - Copyright (C) 1993,1994,1996,1997,1998,1999,2000,2001,2004,2007 - Free Software Foundation, Inc. + Copyright (C) 1993-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h index cdcaa521ba..768c955cb1 100644 --- a/sysdeps/mach/hurd/bits/posix_opt.h +++ b/sysdeps/mach/hurd/bits/posix_opt.h @@ -1,5 +1,5 @@ /* Define POSIX options for GNU/Hurd. - Copyright (C) 1998,2000,2001,2002,2006,2009 Free Software Foundation, Inc. + Copyright (C) 1998-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -82,8 +82,8 @@ #define _POSIX_THREAD_PRIORITY_SCHEDULING -1 #define _POSIX_THREAD_ATTR_STACKSIZE -1 #define _POSIX_THREAD_ATTR_STACKADDR -1 -#define _POSIX_THREAD_PRIO_INHERIT -1 -#define _POSIX_THREAD_PRIO_PROTECT -1 +#define _POSIX_THREAD_PRIO_INHERIT -1 +#define _POSIX_THREAD_PRIO_PROTECT -1 #ifdef __USE_XOPEN2K8 # define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1 # define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 diff --git a/sysdeps/mach/hurd/bits/stat.h b/sysdeps/mach/hurd/bits/stat.h index eaaeababb5..e6ffda8921 100644 --- a/sysdeps/mach/hurd/bits/stat.h +++ b/sysdeps/mach/hurd/bits/stat.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1992-1994,1996,1997,1999,2000,2005,2010 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/mach/hurd/brk.c b/sysdeps/mach/hurd/brk.c index 3d4d8c093d..1900277d1b 100644 --- a/sysdeps/mach/hurd/brk.c +++ b/sysdeps/mach/hurd/brk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -105,7 +105,7 @@ _hurd_set_brk (vm_address_t addr) /* We didn't allocate enough space! Hopefully we can get some more! */ if (_hurd_data_end > pagebrk) - /* First finish allocation */ + /* First finish allocation. */ err = __vm_protect (__mach_task_self (), pagebrk, alloc_start - pagebrk, 0, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); diff --git a/sysdeps/mach/hurd/chroot.c b/sysdeps/mach/hurd/chroot.c index 5ceb2191b7..95bee33176 100644 --- a/sysdeps/mach/hurd/chroot.c +++ b/sysdeps/mach/hurd/chroot.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,97,99,2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,11 +38,8 @@ chroot (const char *path) if (len >= 2 && path[len - 2] == '/' && path[len - 1] == '.') lookup = path; else if (len == 0) - { - /* Special-case null pathname according to POSIX */ - errno = ENOENT; - return -1; - } + /* Special-case empty file name according to POSIX. */ + return __hurd_fail (ENOENT); else { char *n = alloca (len + 3); diff --git a/sysdeps/mach/hurd/dl-sysdep.h b/sysdeps/mach/hurd/dl-sysdep.h index 05d8e67ee2..c64a39d924 100644 --- a/sysdeps/mach/hurd/dl-sysdep.h +++ b/sysdeps/mach/hurd/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Hurd version. - Copyright (C) 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/mach/hurd/mkdir.c b/sysdeps/mach/hurd/mkdir.c index da68d825e5..8ad648e0a3 100644 --- a/sysdeps/mach/hurd/mkdir.c +++ b/sysdeps/mach/hurd/mkdir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,93,94,95,96,97,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,8 +30,8 @@ __mkdir (file_name, mode) error_t err; const char *name; file_t parent; - if (!strcmp(file_name, "/")) - return EEXIST; + if (!strcmp (file_name, "/")) + return __hurd_fail (EEXIST); parent = __directory_name_split (file_name, (char **) &name); if (parent == MACH_PORT_NULL) return -1; diff --git a/sysdeps/mach/hurd/mkdirat.c b/sysdeps/mach/hurd/mkdirat.c index 57f32b1132..d6d672ead9 100644 --- a/sysdeps/mach/hurd/mkdirat.c +++ b/sysdeps/mach/hurd/mkdirat.c @@ -1,6 +1,5 @@ /* Create a directory named relative to another open directory. Hurd version. - Copyright (C) 1991,1993,1994,1995,1996,1997,2002,2006 - Free Software Foundation, Inc. + Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,8 +32,8 @@ mkdirat (fd, path, mode) error_t err; const char *name; file_t parent; - if (!strcmp(path, "/")) - return EEXIST; + if (!strcmp (path, "/")) + return __hurd_fail (EEXIST); parent = __directory_name_split_at (fd, path, (char **) &name); if (parent == MACH_PORT_NULL) return -1; diff --git a/sysdeps/mach/hurd/mlock.c b/sysdeps/mach/hurd/mlock.c index 0135d64947..47bafaae19 100644 --- a/sysdeps/mach/hurd/mlock.c +++ b/sysdeps/mach/hurd/mlock.c @@ -1,5 +1,5 @@ /* mlock -- guarantee pages are resident in memory. Mach/Hurd version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/mach/hurd/opendir.c b/sysdeps/mach/hurd/opendir.c index f97cde0254..175944418c 100644 --- a/sysdeps/mach/hurd/opendir.c +++ b/sysdeps/mach/hurd/opendir.c @@ -80,12 +80,7 @@ __opendirat (int dfd, const char *name) return NULL; } - int flags = O_RDONLY | O_NONBLOCK | O_DIRECTORY; -#if 0 -#ifdef O_CLOEXEC - flags |= O_CLOEXEC; -#endif -#endif + int flags = O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC; int fd; #ifdef IS_IN_rtld assert (dfd == AT_FDCWD); diff --git a/sysdeps/mach/hurd/readlinkat.c b/sysdeps/mach/hurd/readlinkat.c index 59aeede0c1..b70f9c8dea 100644 --- a/sysdeps/mach/hurd/readlinkat.c +++ b/sysdeps/mach/hurd/readlinkat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,97,2002,2009 Free Software Foundation, Inc. +/* Copyright (C) 1991-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -59,9 +59,6 @@ readlinkat (fd, file_name, buf, len) __mach_port_deallocate (__mach_task_self (), file); - if (err) - return __hurd_fail (err); - else - return len; + return err ? __hurd_fail (err) : len; } -libc_hidden_def (readlinkat); +libc_hidden_def (readlinkat) diff --git a/sysdeps/mach/hurd/recvfrom.c b/sysdeps/mach/hurd/recvfrom.c index 41c915435c..3a094aa0d2 100644 --- a/sysdeps/mach/hurd/recvfrom.c +++ b/sysdeps/mach/hurd/recvfrom.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997, 1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1994-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/mach/hurd/setresgid.c b/sysdeps/mach/hurd/setresgid.c index a44e17a16b..eebd364fc6 100644 --- a/sysdeps/mach/hurd/setresgid.c +++ b/sysdeps/mach/hurd/setresgid.c @@ -1,5 +1,5 @@ /* setresgid -- set real group ID, effective group ID, and saved-set group ID - Copyright (C) 2002, 2005, 2006, 2011 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ __setresgid (gid_t rgid, gid_t egid, gid_t sgid) if (!err) { /* Make a new auth handle which has EGID as the first element in the - list of effective gids. */ + list of effective gids. */ uid_t *newgen, *newaux; uid_t auxs[2] = { rgid, sgid }; @@ -84,7 +84,8 @@ __setresgid (gid_t rgid, gid_t egid, gid_t sgid) else if (_hurd_id.gen.ngids >= 1) auxs[0] = _hurd_id.gen.gids[0]; else - /* Not even an effective gid, fallback to the only UID we have. */ + /* Not even an effective GID. + Fall back to the only GID we have. */ auxs[0] = sgid; } if (_hurd_id.aux.ngids <= 1) diff --git a/sysdeps/mach/hurd/setresuid.c b/sysdeps/mach/hurd/setresuid.c index 169c57fcad..751763f5a9 100644 --- a/sysdeps/mach/hurd/setresuid.c +++ b/sysdeps/mach/hurd/setresuid.c @@ -1,5 +1,5 @@ /* setresuid -- set real user ID, effective user ID, and saved-set user ID - Copyright (C) 2002, 2005, 2006, 2011 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ __setresuid (uid_t ruid, uid_t euid, uid_t suid) if (!err) { /* Make a new auth handle which has EUID as the first element in the - list of effective uids. */ + list of effective uids. */ uid_t *newgen, *newaux; uid_t auxs[2] = { ruid, suid }; @@ -84,7 +84,8 @@ __setresuid (uid_t ruid, uid_t euid, uid_t suid) else if (_hurd_id.gen.nuids >= 1) auxs[0] = _hurd_id.gen.uids[0]; else - /* Not even an effective uid, fallback to the only UID we have. */ + /* Not even an effective UID. + Fall back to the only UID we have. */ auxs[0] = suid; } if (_hurd_id.aux.nuids <= 1) @@ -107,6 +108,7 @@ __setresuid (uid_t ruid, uid_t euid, uid_t suid) _hurd_id.aux.gids, _hurd_id.aux.ngids, &newauth)); } + __mutex_unlock (&_hurd_id.lock); HURD_CRITICAL_END; diff --git a/sysdeps/mach/hurd/xstatconv.c b/sysdeps/mach/hurd/xstatconv.c index ab82f26a35..ebe6471ac5 100644 --- a/sysdeps/mach/hurd/xstatconv.c +++ b/sysdeps/mach/hurd/xstatconv.c @@ -1,5 +1,5 @@ /* Convert between `struct stat' format, and `struct stat64' format. - Copyright (C) 2000,01,02 Free Software Foundation, Inc. + Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/mach/nanosleep.c b/sysdeps/mach/nanosleep.c index d35c4a2d63..a1ba19c17f 100644 --- a/sysdeps/mach/nanosleep.c +++ b/sysdeps/mach/nanosleep.c @@ -1,5 +1,5 @@ /* nanosleep -- sleep for a period specified with a struct timespec - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -39,6 +39,7 @@ __nanosleep (const struct timespec *requested_time, const mach_msg_timeout_t ms = requested_time->tv_sec * 1000 + (requested_time->tv_nsec + 999999) / 1000000; + recv = __mach_reply_port (); if (remaining && __gettimeofday (&before, NULL) < 0) |