Commit Graph

349 Commits

Author SHA1 Message Date
Samuel Thibault
335190fb39 add hurd/hurdsocket.h file missing from a5eb23d 2015-02-08 17:49:16 +01:00
Samuel Thibault
f96ec27aa9 hurd: fix compilation of signal.h in C++ 2015-02-07 22:41:23 +01:00
Samuel Thibault
22395607bc hurd: fix compilation of signal.h in C++ 2015-02-07 22:35:35 +01:00
Samuel Thibault
c187253fc2 hurdselect: remove dead code.
This removes code which actually never happens, and is already taken
care of in the function.

This is in the second part of select, when the __mach_msg() function
over the portset has returned something else than MACH_MSG_SUCCESS. I
guess in the past the value returned by __mach_msg() was stored in err,
so this code was necessary to set back err to 0, but now it is stored in
msgerr, so err is already still 0 by default. It can thus never contain
MACH_RCV_TIMED_OUT, i.e. the code is dead. The first case mentioned in
the comment is already handled: on time out with no message, err is
already still the default 0. On time out due to poll, err would still be
0, unless some of the io_select RPCs has returned EINTR, in which case
it contains EINTR. If any other io_select RPCs had returned a proper
answer, got!=0, and thus err is set to 0 just below. The code is thus
indeed not useful any more.
2015-02-07 22:18:03 +01:00
Samuel Thibault
e9a5bc1c18 hurd: fix sigstate locking
It looks like _hurd_thread_sigstate used to return with the sigstate
lock held long ago, but since that's no longer the case, don't unlock
something that isn't locked.

Note that it's unlikely this change fixes anything in practice since
its current implementation (on i386) makes this call a nop.
2015-02-07 22:16:19 +01:00
Samuel Thibault
a9a002fb6c hurdselect: Let select get interrupted by signals
We need to set MACH_RCV_INTERRUPT to avoid __mach_msg just looping on signals,
and then we can handle the interruption.
2015-02-07 22:13:46 +01:00
Samuel Thibault
bd959902bc hurd: map nice levels 1-to-1 with Mach prio levels 2015-02-07 22:09:09 +01:00
Samuel Thibault
d5131d3c1e hurd: allow poll() array bigger than FD_SETSIZE 2015-02-07 22:07:38 +01:00
Joseph Myers
b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Joseph Myers
a5f891ac8d Consistently include Makeconfig after defining subdir.
In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I
noted it was necessary to add includes of Makeconfig early in various
subdirectory makefiles for the tests-special variable settings added
by that patch to be conditional on configuration information.  No-one
commented on the general question there of whether Makeconfig should
always be included immediately after the definition of subdir.

This patch implements that early inclusion of Makeconfig in each
directory (which is a lot easier than consistent placement of includes
of Rules).  Includes are added if needed, or moved up if already
present.  Subdirectory "all:" targets are removed, since Makeconfig
provides one.

There is potential for further cleanups I haven't done.  Rules and
Makerules have code such as

ifneq   "$(findstring env,$(origin headers))" ""
headers :=
endif

to override to empty any value of various variables that came from the
environment.  I think there is a case for Makeconfig setting all the
subdirectory variables (other than subdir) to empty to ensure no
outside value is going to take effect if a subdirectory fails to
define a variable.  (A list of such variables, possibly out of date
and incomplete, is in manual/maint.texi.)  Rules and Makerules would
give errors if Makeconfig hadn't already been included, instead of
including it themselves.  The special code to override values coming
from the environment would then be obsolete and could be removed.

Tested x86_64, including that installed binaries are identical before
and after the patch.

	* argp/Makefile: Include Makeconfig immediately after defining
	subdir.
	* assert/Makefile: Likewise.
	* benchtests/Makefile: Likewise.
	* catgets/Makefile: Likewise.
	* conform/Makefile: Likewise.
	* crypt/Makefile: Likewise.
	* csu/Makefile: Likewise.
	(all): Remove target.
	* ctype/Makefile: Include Makeconfig immediately after defining
	subdir.
	* debug/Makefile: Likewise.
	* dirent/Makefile: Likewise.
	* dlfcn/Makefile: Likewise.
	* gmon/Makefile: Likewise.
	* gnulib/Makefile: Likewise.
	* grp/Makefile: Likewise.
	* gshadow/Makefile: Likewise.
	* hesiod/Makefile: Likewise.
	* hurd/Makefile: Likewise.
	(all): Remove target.
	* iconvdata/Makefile: Include Makeconfig immediately after
	defining subdir.
	* inet/Makefile: Likewise.
	* intl/Makefile: Likewise.
	* io/Makefile: Likewise.
	* libio/Makefile: Likewise.
	(all): Remove target.
	* locale/Makefile: Include Makeconfig immediately after defining
	subdir.
	* login/Makefile: Likewise.
	* mach/Makefile: Likewise.
	(all): Remove target.
	* malloc/Makefile: Include Makeconfig immediately after defining
	subdir.
	(all): Remove target.
	* manual/Makefile: Include Makeconfig immediately after defining
	subdir.
	* math/Makefile: Likewise.
	* misc/Makefile: Likewise.
	* nis/Makefile: Likewise.
	* nss/Makefile: Likewise.
	* po/Makefile: Likewise.
	(all): Remove target.
	* posix/Makefile: Include Makeconfig immediately after defining
	subdir.
	* pwd/Makefile: Likewise.
	* resolv/Makefile: Likewise.
	* resource/Makefile: Likewise.
	* rt/Makefile: Likewise.
	* setjmp/Makefile: Likewise.
	* shadow/Makefile: Likewise.
	* signal/Makefile: Likewise.
	* socket/Makefile: Likewise.
	* soft-fp/Makefile: Likewise.
	* stdio-common/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* streams/Makefile: Likewise.
	* string/Makefile: Likewise.
	* sunrpc/Makefile: Likewise.
	(all): Remove target.
	* sysvipc/Makefile: Include Makeconfig immediately after defining
	subdir.
	* termios/Makefile: Likewise.
	* time/Makefile: Likewise.
	* timezone/Makefile: Likewise.
	(all): Remove target.
	* wcsmbs/Makefile: Include Makeconfig immediately after defining
	subdir.
	* wctype/Makefile: Likewise.

libidn/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.

localedata/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.
	(all): Remove target.

nptl/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.

nptl_db/ChangeLog:
	* Makefile: Include Makeconfig immediately after defining subdir.
2014-02-26 23:12:03 +00:00
Roland McGrath
d4ec6ae19e Remove obsolete SHLIB_COMPAT conditionalization in Versions files. 2014-02-22 01:19:45 -08:00
Ondřej Bílka
a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Allan McRae
d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers
3f2e46a494 Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
Joseph Myers
60d2f8f3c7 Use (void) in no-arguments function definitions. 2013-06-08 00:22:23 +00:00
Joseph Myers
2e09a79ada Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
Ondrej Bilka
350635a59a Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
Joseph Myers
9c84384cc1 Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
Joseph Myers
0e2f956295 Fix copyright notice corruption from update-copyright bug. 2013-01-02 19:28:45 +00:00
Joseph Myers
568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers
f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
Roland McGrath
4f75b7a09a Distinguish ELOOP diagnosis threshold from SYMLOOP_MAX. 2012-08-03 11:39:30 -07:00
Thomas Schwinge
10589b4adb Hurd: avoid PLT call to strtoul 2012-05-10 15:57:28 -07:00
Pino Toscano
63643c85d4 Hurd: hurdsock: reject negative domains 2012-05-10 15:57:28 -07:00
Pino Toscano
c6474b07e7 Hurd: _hurd_select: check for invalid parameter values 2012-05-10 15:57:27 -07:00
Samuel Thibault
edadcbd624 Hurd: empty file names fail with ENOENT 2012-05-10 15:57:26 -07:00
Samuel Thibault
802ca5a5ef Hurd: Missing critical region locks. 2012-05-10 15:57:23 -07:00
Samuel Thibault
ecd0de9a95 Hurd: Fix signal-catching functions. 2012-05-10 15:57:23 -07:00
Thomas Schwinge
6f080c2fcf Hurd: O_CLOEXEC in rtld 2012-05-10 15:57:22 -07:00
H.J. Lu
eb96ffb07d Move stdio-common/_itoa.h to sysdeps/generic 2012-03-20 16:00:23 -07:00
Ulrich Drepper
a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Paul Eggert
59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper
3ce1f29594 Cleanup of configuration options
Make several tool features mandatory and simplify the code.
2011-09-10 14:34:15 -04:00
Samuel Thibault
5a42321d43 Hurd: fix timeout rounding in select 2010-08-02 16:46:12 -07:00
Emilio Pozuelo Monfort
2a50c07836 Hurd: Fix linkat symlink handling. 2010-06-02 10:25:56 -07:00
Emilio Pozuelo Monfort
67481400c5 Hurd: Fix file_name_lookup_at error case return value. 2010-04-26 09:59:30 -07:00
Carl Fredrik Hammar
199428c197 Fix Hurd tiocsctty change. 2010-02-19 11:08:00 -08:00
Carl Fredrik Hammar
951ca0c5ff Clean up Hurd TIOCSCTTY. 2010-02-17 12:41:11 -08:00
Carl Fredrik Hammar
0ea5278d33 Use ioctl_handler_t typedef in Hurd ioctl macros. 2010-02-17 11:04:30 -08:00
Samuel Thibault
e87e2f48ef Hurd: Fix possibly uninitialized variable in _hurd_locked_install_cttyid. 2009-12-22 11:51:44 -08:00
Andreas Schwab
ff6ff38db2 Remove redundant .gitignore files. 2009-05-16 10:18:34 +02:00
Jim Meyering
2e180a2622 rename each .cvsignore file to .gitignore 2009-05-15 18:13:37 +02:00
Roland McGrath
c90c1e1c99 * sysdeps/mach/hurd/Makefile (sysdep_headers) [subdir=socket]:
Add net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h
	net/route.h.

	* hurd/report-wait.c (describe_number): Use __stpcpy to prepend
	flavor to description only when flavor is not NULL.

	* hurd/hurdsig.c (signal_allowed): Unlock _hurd_dtable_lock
	mutex after SIGIO/SIGURG lookup loop.
2009-01-07 01:59:43 +00:00
Roland McGrath
0db58a77b4 2009-01-07 Samuel Thibault <samuel.thibault@ens-lyon.org>
* hurd/report-wait.c (describe_number): Use __stpcpy to prepend
	flavor to description only when flavor is not NULL.
2009-01-07 01:59:26 +00:00
Roland McGrath
0cb269d71c 2008-08-26 Aurelien Jarno <aurelien@aurel32.net>
* hurd/hurd/signal.h (HURD_MSGPORT_RPC): Fix a typo.
2008-08-26 19:10:41 +00:00
Roland McGrath
1c6e82eca7 2008-08-12 Roland McGrath <roland@frob.com>
* hurd/hurd/signal.h (HURD_MSGPORT_RPC): Avoid -Wparenthesis triggers,
	in case used outside of libc.
	Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-08-13 02:39:55 +00:00
Roland McGrath
7385c04c8c * hurd/fd-read.c (_hurd_fd_read): Fix last change. 2008-07-22 20:21:19 +00:00
Roland McGrath
2e806440f9 2008-07-21 Roland McGrath <roland@frob.com>
* hurd/fd-read.c (_hurd_fd_read): Return EGRATUITOUS if the server
	returned too much data out of line.
2008-07-21 19:50:36 +00:00
Roland McGrath
d5a0160b58 * sysdeps/mach/hurd/recv.c (__recv): Initialize NPORTS.
* sysdeps/mach/hurd/recvfrom.c (__recvfrom): Likewise.
	* sysdeps/mach/hurd/recvmsg.c (__recvmsg): Likewise.
	* hurd/fd-read.c (_hurd_fd_read): Initialize NREAD.
	* hurd/get-host.c (_hurd_get_host_config): Likewise.
	* sysdeps/mach/hurd/dl-sysdep.c (__libc_read): Likewise.
2008-07-02 19:35:02 +00:00
Roland McGrath
e66ecb226e 2008-07-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Define MSG_NOSIGNAL.
	* hurd/hurd/fd.h (__hurd_sockfail): Add extern inline function.
	* sysdeps/mach/hurd/recv.c (__recv): Use __hurd_sockfail instead of
	__hurd_dfail.
	* sysdeps/mach/hurd/recvfrom.c (__recvfrom): Likewise
	* sysdeps/mach/hurd/recvmsg.c (__recvmsg): Likewise
	* sysdeps/mach/hurd/send.c (__send): Likewise
	* sysdeps/mach/hurd/sendfrom.c (__sendfrom): Likewise
	* sysdeps/mach/hurd/sendmsg.c (__sendmsg): Likewise
2008-07-02 09:53:29 +00:00