about summary refs log tree commit diff
path: root/hurd/hurdselect.c
Commit message (Collapse)AuthorAgeFilesLines
* Break some lines before not after operators.Joseph Myers2019-02-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GNU Coding Standards specify that line breaks in expressions should go before an operator, not after one. This patch fixes various code to do this. It only changes code that appears to be mostly following GNU style anyway, not files and directories with substantially different formatting. It is not exhaustive even for files using GNU style (for example, changes to sysdeps files are deferred for subsequent cleanups). Some files changed are shared with gnulib, but most are specific to glibc. Changes were made manually, with places to change found by grep (so some cases, e.g. where the operator was followed by a comment at end of line, are particularly liable to have been missed by grep, but I did include cases where the operator was followed by backslash-newline). This patch generally does not attempt to address other coding style issues in the expressions changed (for example, missing spaces before '(', or lack of parentheses to ensure indentation of continuation lines properly reflects operator precedence). Tested for x86_64, and with build-many-glibcs.py. * benchtests/bench-memmem.c (simple_memmem): Break lines before rather than after operators. * benchtests/bench-skeleton.c (TIMESPEC_AFTER): Likewise. * crypt/md5.c (md5_finish_ctx): Likewise. * crypt/sha256.c (__sha256_finish_ctx): Likewise. * crypt/sha512.c (__sha512_finish_ctx): Likewise. * elf/cache.c (load_aux_cache): Likewise. * elf/dl-load.c (open_verify): Likewise. * elf/get-dynamic-info.h (elf_get_dynamic_info): Likewise. * elf/readelflib.c (process_elf_file): Likewise. * elf/rtld.c (dl_main): Likewise. * elf/sprof.c (generate_call_graph): Likewise. * hurd/ctty-input.c (_hurd_ctty_input): Likewise. * hurd/ctty-output.c (_hurd_ctty_output): Likewise. * hurd/dtable.c (reauth_dtable): Likewise. * hurd/getdport.c (__getdport): Likewise. * hurd/hurd/signal.h (_hurd_interrupted_rpc_timeout): Likewise. * hurd/hurd/sigpreempt.h (HURD_PREEMPT_SIGNAL_P): Likewise. * hurd/hurdfault.c (_hurdsig_fault_catch_exception_raise): Likewise. * hurd/hurdioctl.c (fioctl): Likewise. * hurd/hurdselect.c (_hurd_select): Likewise. * hurd/hurdsig.c (_hurdsig_abort_rpcs): Likewise. (STOPSIGS): Likewise. * hurd/hurdstartup.c (_hurd_startup): Likewise. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): Likewise. * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise. * hurd/msgportdemux.c (msgport_server): Likewise. * hurd/setauth.c (_hurd_setauth): Likewise. * include/features.h (__GLIBC_USE_DEPRECATED_SCANF): Likewise. * libio/libioP.h [IO_DEBUG] (CHECK_FILE): Likewise. * locale/programs/ld-ctype.c (set_class_defaults): Likewise. * localedata/tests-mbwc/tst_swscanf.c (tst_swscanf): Likewise. * login/tst-utmp.c (do_check): Likewise. (simulate_login): Likewise. * mach/lowlevellock.h (lll_lock): Likewise. (lll_trylock): Likewise. * math/test-fenv.c (ALL_EXC): Likewise. * math/test-fenvinline.c (ALL_EXC): Likewise. * misc/sys/cdefs.h (__attribute_deprecated_msg__): Likewise. * nis/nis_call.c (__do_niscall3): Likewise. * nis/nis_callback.c (cb_prog_1): Likewise. * nis/nis_defaults.c (searchaccess): Likewise. * nis/nis_findserv.c (__nis_findfastest_with_timeout): Likewise. * nis/nis_ismember.c (internal_ismember): Likewise. * nis/nis_local_names.c (nis_local_principal): Likewise. * nis/nss_nis/nis-rpc.c (_nss_nis_getrpcbyname_r): Likewise. * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_getnetgrent_r): Likewise. * nis/ypclnt.c (yp_match): Likewise. (yp_first): Likewise. (yp_next): Likewise. (yp_master): Likewise. (yp_order): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nss/nss_compat/compat-pwd.c (copy_pwd_changes): Likewise. (internal_getpwuid_r): Likewise. * nss/nss_compat/compat-spwd.c (copy_spwd_changes): Likewise. * posix/glob.h (__GLOB_FLAGS): Likewise. * posix/regcomp.c (peek_token): Likewise. (peek_token_bracket): Likewise. (parse_expression): Likewise. * posix/regexec.c (sift_states_iter_mb): Likewise. (check_node_accept_bytes): Likewise. * posix/tst-spawn3.c (do_test): Likewise. * posix/wordexp-test.c (testit): Likewise. * posix/wordexp.c (parse_tilde): Likewise. (exec_comm): Likewise. * posix/wordexp.h (__WRDE_FLAGS): Likewise. * resource/vtimes.c (TIMEVAL_TO_VTIMES): Likewise. * setjmp/sigjmp.c (__sigjmp_save): Likewise. * stdio-common/printf_fp.c (__printf_fp_l): Likewise. * stdio-common/tst-fileno.c (do_test): Likewise. * stdio-common/vfprintf-internal.c (vfprintf): Likewise. * stdlib/strfmon_l.c (__vstrfmon_l_internal): Likewise. * stdlib/strtod_l.c (round_and_return): Likewise. (____STRTOF_INTERNAL): Likewise. * stdlib/tst-strfrom.h (TEST_STRFROM): Likewise. * string/strcspn.c (STRCSPN): Likewise. * string/test-memmem.c (simple_memmem): Likewise. * termios/tcsetattr.c (tcsetattr): Likewise. * time/alt_digit.c (_nl_parse_alt_digit): Likewise. * time/asctime.c (asctime_internal): Likewise. * time/strptime_l.c (__strptime_internal): Likewise. * time/sys/time.h (timercmp): Likewise. * time/tzfile.c (__tzfile_compute): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* hurdselect: remove dead code.Samuel Thibault2015-02-071-7/+0
| | | | | | | | | | | | | | | | | | 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.
* hurdselect: Let select get interrupted by signalsSamuel Thibault2015-02-071-1/+4
| | | | | We need to set MACH_RCV_INTERRUPT to avoid __mach_msg just looping on signals, and then we can handle the interruption.
* hurd: allow poll() array bigger than FD_SETSIZESamuel Thibault2015-02-071-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Hurd: _hurd_select: check for invalid parameter valuesPino Toscano2012-05-101-7/+21
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Hurd: fix timeout rounding in selectSamuel Thibault2010-08-021-1/+1
|
* * hurd/hurdselect.c (_hurd_select): FixRoland McGrath2002-04-021-11/+20
| | | | | | | | | | | | | | | | | | | | | | | MACH_MSG_TYPE_INTEGER_T -> integer_t in sizeof. Use a union rather than casts to compare mach_msg_type_t as int. 2002-03-25 Roland McGrath <roland@frob.com> * hurd/hurdchdir.c (_hurd_change_directory_port_from_name): Don't check off the end of NAME when it's shorter than 2 chars. Reported by Ognyan Kulev <ogi@fmi.uni-sofia.bg>. 2002-03-17 Roland McGrath <roland@frob.com> * sysdeps/mach/hurd/i386/sys/io.h: New file. * sysdeps/mach/hurd/i386/ioperm.c: New file. * sysdeps/mach/hurd/i386/Dist: Add them. * sysdeps/mach/hurd/i386/Versions (libc: GLIBC_2.2.6): New set, add ioperm. * sysdeps/mach/configure.in: New check to set HAVE_I386_IO_PERM_MODIFY. (mach_interface_list): Check for mach_i386.defs. * config.h.in (HAVE_I386_IO_PERM_MODIFY): #undef it. * sysdeps/mach/configure: Regenerated.
* * hurd/hurdselect.c (_hurd_select) [MACH_MSG_TRAILER_MINIMUM_SIZE]:Roland McGrath2002-02-171-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | Use untyped Mach IPC message format. * sysdeps/mach/hurd/ioctl.c (__ioctl) [! MACH_MSG_TYPE_BIT]: Handle Handle untyped Mach IPC message formats. * hurd/catch-exc.c (_S_catch_exception_raise) [EXC_MASK_ALL]: Expect different argument conventions when this is defined. [EXC_MASK_ALL] (_S_catch_exception_raise_state): New stub function. [EXC_MASK_ALL] (_S_catch_exception_raise_state_identity): Likewise. * hurd/hurdfault.c: Likewise for _hurdsig_fault_catch_exception_*. [NDR_CHAR_ASCII] (mig_reply_header_t): #define as mig_reply_error_t for OSF Mach variant. (faulted): Use mig_reply_error_t for REPLY. (_hurdsig_fault_init) [EXC_MASK_ALL]: Use EXCEPTION_STATE_IDENTITY in __thread_set_exception_ports call. (_hurdsig_fault_init) [MACH_PORT_RECEIVE_STATUS]: Use __mach_port_set_attributes in place of __mach_port_set_qlimit. * sysdeps/mach/powerpc/sysdep.h (_MACH_MACHINE_ASM_H): Define this before include <sysdeps/mach/sysdep.h>, to inhibit <mach/machine/asm.h> on Darwin, which includes bogons.
* 2001-10-28 Roland McGrath <roland@frob.com>Roland McGrath2001-10-281-8/+12
| | | | | * hurd/hurdselect.c (_hurd_select): Check SELECT_RETURNED bit when packing results for a `poll' call.
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-8/+8
| | | | | | | | | | | | | | 2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
* 1999-02-27 Roland McGrath <roland@baalperazim.frob.com> Roland McGrath1999-02-271-3/+4
| | | | | | * hurd/hurdselect.c (_hurd_select): When bailing for bogus fd, don't try to _hurd_port_free a lower-numbered descriptor that was not in any fd_set.
* 1998-12-05 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-12-061-0/+444
* sysdeps/mach/hurd/pselect.c: New file. * sysdeps/mach/hurd/poll.c: New file. * hurd/Makefile (routines): Add hurdselect. * hurd/hurdselect.c: New file. (_hurd_select): New function, guts taken from ... * sysdeps/mach/hurd/select.c (__select): ... here. Now work by just calling _hurd_select. * hurd/hurd/fd.h: Declare _hurd_select. 1998-12-05 Roland McGrath <roland@baalperazim.frob.com> * time/strptime.c: Fix unterminated comment in last change. * argp/argp.h: Add __restrict.