diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-08-05 23:36:21 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-08-05 23:36:21 +0000 |
commit | 044b16f4e9ae773187f4fee8a9a0a54f9a51f13f (patch) | |
tree | 58bc41e16535e0d0f61d51e6af15ce4128864fc9 | |
parent | c59a94711c6a9d38811b828863076f39000831b4 (diff) | |
download | glibc-044b16f4e9ae773187f4fee8a9a0a54f9a51f13f.tar.gz glibc-044b16f4e9ae773187f4fee8a9a0a54f9a51f13f.tar.xz glibc-044b16f4e9ae773187f4fee8a9a0a54f9a51f13f.zip |
update for 2.0.5pre1
146 files changed, 3109 insertions, 1183 deletions
diff --git a/BUGS b/BUGS index e2fe459e20..3d449f362d 100644 --- a/BUGS +++ b/BUGS @@ -1,20 +1,20 @@ List of known bugs (certainly very incomplete) ---------------------------------------------- -Time-stamp: <1997-05-21T20:55:45+0200 drepper> +Time-stamp: <1997-08-04T00:50:04+0200 drepper> This following list contains those bugs which I'm aware of. Please make sure that bugs you report are not listed here. If you can fix one of these bugs/limitations I'll certainly be glad to receive a patch. Another source of information about bugs is the problem data base of the -GNU project. There is an easy to use WWW interface is available at +GNU project. There is an easy to use WWW interface available at http://www-gnats.gnu.ai.mit.edu:8080/cgi-bin/wwwgnats.pl I would appreciate it very much if you could verify the problem was not -reported before by looking though the database. To make the information -in this data as useful as possible please report bugs always using the +reported before by looking through the database. To make the information +in this database as useful as possible please report bugs always using the `glibcbug' shell script which gets installed with GNU libc. @@ -23,14 +23,8 @@ in this data as useful as possible please report bugs always using the Severity: [ *] to [***] -[ **] For GNU libc on Linux, there is still no solution for the UTMP - problem. Two people are working on a possible solution. - [Among others: PR libc/39] - [ **] There are problems with signal handling when using LinuxThreads. -[ **] The `cbrtl' function for ix86 does not work in the moment. - [ *] The precision of the `sinhl' and/or `asinhl' function do not seem to be the best. @@ -50,13 +44,13 @@ Severity: [ *] to [***] symbols in <linux/limits.h> available. [PR libc/140] -[ *] The localedef program should interpret only the required categories - addressed by `copy' statements. This especially means that limited - character sets must not lead to errors if the LC_CTYPE category in - the locale addressed by `copy' is not really used. +[ *] The localedef program should not generate errors if for categories + which are not used for the output there are characters referenced + which are not defined in the charmap. + [PR libc/229] -[ *] Statically linking with libpthread leads to strange warnings - from the linker. I don't know why this happen so far. +[ *] The rcmd() functions (more concrete: the handling of .rhosts) does + not support netgroups and wildcards (+). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ulrich Drepper diff --git a/ChangeLog b/ChangeLog index f1581fc53a..d2c835cdbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,471 @@ +1997-08-04 15:29 Ulrich Drepper <drepper@cygnus.com> + + * locale/programs/localedef.c (main): Set bit in avail for those + categories which are successfully read. + * locale/programs/locfile.c (check_all_categories): Don't check + categories if they are not available. + (write_all_categories): Don't write categories if they are not + available. + + * socket/sys/socket.h (bind, getsockname, connect, sendto, recvfrom, + getsockopt, setsockopt, accept): Change size argument to type + socklen_t. + Pretty print. + * manual/socket.texi: Describe socklen_t and change prototypes of + socket functions to use socklen_t. + * sysdeps/generic/bits/socket.h: Define socklen_t. + (struct msghdr): Correct types to use socklen_t. + * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. + + * stdio-common/printf_fp.c (__printf_fp): Correct rounding of numbers + 1.0 < x < 8.0. + * stdio-common/tfformat.c: Add new tests for above bug. + + * termios/cfsetspeed.c: Rewrite loop to do what it shall do. + + * wcsmbs/Makefile (tests): Add tst-wcstof. + * wcsmbs/tst-wcstof.c: New file. + * wcsmbs/wcstof.c (FLT): Define as FLT. + +1997-08-02 01:57 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/ptrace.c: Don't set errno in error + case since the __syscall_ptrace call already did this. + Reported by Philip Gladstone <philip@talon.raptor.com>. + +1997-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * sysdeps/unix/sysv/linux/sys/fsuid.h: Change include + <gnu/types.h> to <sys/types.h>. + +1997-08-01 23:18 Ulrich Drepper <drepper@cygnus.com> + + * locale/programs/locale.c (print_escaped): New function. + (show_info): Use print_escaped if strings can control unprintable + characters. + Patch by Jochen Hein <jochen.hein@delphi.central.de>. + +1997-07-31 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * md5-crypt/Makefile (extra-objs): Add onlymd5-crypt.o for + dependencies. + +1997-07-28 23:35 Ulrich Drepper <drepper@cygnus.com> + + * nis/nss_compat/compat-grp.c (internal_setgrent): Set FD_CLOEXEC + for stream on input file. + * nis/nss_compat/compat-pwd.c (internal_setpwent): Likewise. + * nis/nss_compat/compat-spwd.c (internal_setspent): Likewise. + * nss/nss_db/db-XXX.c (internal_setent): Likewise. + * nss/nss_db/db-alias.c (internal_setent): Likewise. + * nss/nss_db/db-netgrp.c (internal_setent): Likewise. + * nss/nss_files/files-XXX.c (internal_setent): Likewise. + * nss/nss_files/files-alias.c (internal_setent): Likewise. + * nss/nss_files/files-netgrp.c (internal_setent): Likewise. + +1997-07-23 05:10 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/sys/fsuid.h: New file. + Provided by Michael Deutschmann <ldeutsch@mail.netshop.net>. + * sysdeps/unix/sysv/linux/Makefile (headers): Add sys/fsuid.h. + * sysdeps/unix/sysv/linux/Dist: Add sys/fsuid.h. + +1997-07-19 22:53 Ulrich Drepper <drepper@cygnus.com> + + * time/africa: Update from tzdata1997g. + * time/asia: Likewise. + * time/australasia: Likewise. + * time/europe: Likewise. + * time/iso3166.tab: Likewise. + * time/zone.tab: Likewise. + * time/private.h: Update from tzcode1997f. + * time/scheck.c: Likewise. + +1997-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * include/gnu-versions.h (_GNU_OBSTACK_INTERFACE_VERSION): + Synchronize with malloc/obstack.c. + +1997-07-15 Marcus G. Daniels <marcus@cathcart.sysc.pdx.edu> + + * manual/Makefile (INSTALL_INFO): Introduce variable to override + path to install-info for systems like Debian that have an + install-info with a different command line interface from the + canonical GNU texinfo version. + +1997-06-22 Paul Eggert <eggert@twinsun.com> + + * time/strftime.c (strftime): Use tm_zone if available, even if _LIBC. + + * time/tzfile.c (__tzstring): New decl. + (__tzfile_read, __tzfile_default): Set __tzname to permanent strings. + (__tzfile_default): First two args are now const char *. + + * time/tzset.c (__tzstring): New function. + (tz_rule): Name is now const char *. + (struct tzstring_head): New type. + (tzstring_list, tzstring_last_buffer_size): New static vars. + (__tzset_internal): Time zone names are now permanent, not temporary. + +1997-07-12 18:47 Ulrich Drepper <drepper@cygnus.com> + + * assert/assert.h [!NDEBUG] (assert, assert_perror): Don't use || + and && in tests to allow use in C++ code which overloads these + operators. Reported by Istvan Marko <istvan@cmdmail.amd.com>. + +1997-07-12 17:56 Ulrich Drepper <drepper@cygnus.com> + + * login/login.c (tty_name): Test return value of ttyname_r for != + 0, not < 0. + * misc/ttyslot.c (ttyslot): Test return value of ttyname_r for == + 0, not >= 0. + * sysdeps/unix/getlogin.c (getlogin): Test return value of + ttyname_r for != 0. + * sysdeps/unix/getlogin_r.c (getlogin_r): Likewise. + +1997-07-11 03:00 Ulrich Drepper <drepper@cygnus.com> + + * inet/inet_ntoa.c: Prevent looking for thread data key if we found + one. + + * signal/sigandset.c: Include stddef.h to get NULL defined. + * signal/sigisempty.c: Likewise. + * signal/sigorset.c: Likewise. + +1997-07-09 07:19 H.J. Lu <hjl@gnu.ai.mit.edu> + + * posix/execvp.c (execvp): Handle ESTALE. + +1997-07-09 08:16 H.J. Lu <hjl@gnu.ai.mit.edu> + + * libio/fileops.c (_IO_file_underflow): Adjust pointers + before calling _IO_SYSREAD (). + +1997-07-08 13:59 Ulrich Drepper <drepper@cygnus.com> + + * time/strftime.c (spaces, zeroes): Handle broken SGI compiler. + Patch by Richard Stallman <rms@gnu.ai.mit.edu>. + +1997-07-08 02:18 Ulrich Drepper <drepper@cygnus.com> + + * io/lockf.c (lockf): Clear fl before using. + Patch by sr@adb.fr. + + * libio/strops.c: Correctly handle _IO_write_end. + + * nss/nss_files/files-netgrp.c (_nss_netgroup_parseline): Don't + panic if setnetgrent wasn't called before, return error. + Patch by Thorsten Kukuk <kukuk@uni-paderborn.de>. + + * time/mktime.c: Define localtime_r function as my_mktime_localtime_r + if locally defined. + * time/strftime.c: Define localtime_r function as my_ftime_localtime_r + if locally defined. + Define tm_diff function as ftime_tm_diff if locally defined. + Reported by Richard Stallman <rms@gnu.ai.mit.edu>. + +1997-07-04 18:04 H.J. Lu <hjl@gnu.ai.mit.edu> + + * stdlib/tst-strtol.c: Don't assume cpp takes ~0UL as long + in cc1. Cpp in gcc doesn't do it. + +1997-07-05 11:56 Ulrich Drepper <drepper@cygnus.com> + + * login/login.c (tty_name): Use newly allocated buffer. + Patch by Jaakko Hyvätti <jaakko.hyvatti@iki.fi>. + + * time/asctime.c: Never translate week and month name according + to LC_TIME. Patch by Paul Eggert <eggert@twinsun.com>. + +1997-06-28 20:52 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/syscalls.list: Add getresgid and + setresgid. + +1997-06-27 02:17 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/syscalls.list: Add quotactl. + Reported by a sun. + +1997-06-26 14:28 Ulrich Drepper <drepper@cygnus.com> + + * time/strftime.c: Don't define `memcpy' macro if HAVE_MEMCPY is + defined. Reported by Akim Demaille <demaille@inf.enst.fr>. + +1997-06-23 23:39 Ulrich Drepper <drepper@cygnus.com> + + * math/math.h: Add warning about use of M_* constants. + Pretty print. + +1997-06-21 02:48 Ulrich Drepper <drepper@cygnus.com> + + * locale/programs/locale.c: Correct comment. + + * po/ko.po: Update. + +1997-06-20 02:35 a sun <asun@zoology.washington.edu> + + * sysdeps/unix/sysv/linux/netipx/ipx.h: Don't use kernel header. + +1997-06-19 19:38 Ulrich Drepper <drepper@cygnus.com> + + * inet/rcmd.c: Correct a few typos. Reported by Erik Troan. + + * manual/Makefile (distribute): Add dir. + * manual/dir: New file. + +1997-06-19 07:37 H.J. Lu <hjl@gnu.ai.mit.edu> + + * time/tzfile.c (__tzfile_read): Store getc () return in int. + +1997-06-18 Miles Bader <miles@gnu.ai.mit.edu> + + * string/Makefile (routines): Add argz-replace. + +1997-06-12 Miles Bader <miles@gnu.ai.mit.edu> + + * string/argz.h (__argz_replace, argz_replace): New declarations. + * string/argz-replace.c: New file. + +1997-06-18 00:11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * stdio-common/vfscanf.c (inchar, ungetc): Don't count EOF as + character read in/put back. + * stdio-common/tstscanf.c: Add test case for this. + +1997-06-18 12:01 Ulrich Drepper <drepper@cygnus.com> + + * manual/Makefile (install): Make sure `dir' file exists if we use + install-info. + +1997-06-17 19:32 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * manual/Makefile (info): Depend on dir-add.info. + +1997-06-17 00:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * sysdeps/stub/e_acoshl.c: Set errno to ENOSYS. + * sysdeps/stub/e_acosl.c: Likewise. + * sysdeps/stub/e_asinl.c: Likewise. + * sysdeps/stub/e_atan2l.c: Likewise. + * sysdeps/stub/e_expl.c: Likewise. + * sysdeps/stub/e_fmodl.c: Likewise. + * sysdeps/stub/e_j0l.c: Likewise. + * sysdeps/stub/e_j1l.c: Likewise. + * sysdeps/stub/e_jnl.c: Likewise. + * sysdeps/stub/e_lgammal_r.c: Likewise. + * sysdeps/stub/e_log10l.c: Likewise. + * sysdeps/stub/e_logl.c: Likewise. + * sysdeps/stub/e_powl.c: Likewise. + * sysdeps/stub/e_rem_pio2l.c: Likewise. + * sysdeps/stub/e_sqrtl.c: Likewise. + * sysdeps/stub/k_cosl.c: Likewise. + * sysdeps/stub/k_rem_pio2l.c: Likewise. + * sysdeps/stub/k_sinl.c: Likewise. + * sysdeps/stub/k_tanl.c: Likewise. + * sysdeps/stub/s_atanl.c: Likewise. + * sysdeps/stub/s_erfl.c: Likewise. + * sysdeps/stub/s_expm1l.c: Likewise. + * sysdeps/stub/s_log1pl.c: Likewise. + +1997-06-16 03:07 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/libm-ieee754/k_standard.c: Undo change of Tue Aug 6 + 01:13:56 1996. + +1997-06-15 00:43 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/libm-i387/s_asinh.S: Handle +-Inf and NaN correctly. + * sysdeps/libm-i387/s_asinhf.S: Likewise. + * sysdeps/libm-i387/s_asinhl.S: Likewise. + * sysdeps/libm-i387/s_nearbyint.S: Correctly leave function. + * sysdeps/libm-i387/s_nearbyintf.S: Likewise. + * sysdeps/libm-i387/s_nearbyintl.S: Likewise. + +1997-06-12 21:22 Ulrich Drepper <drepper@cygnus.com> + + * Makefile (manual/dir-add.info): New rule. + + * inet/arpa/tftp.h (struct tftphdr): Change type of tu_block to + `unsigned short'. + + * manual/Makefile (dir-add.texi): Also emit wrapper text for + info/install-info. + (distribute): Add dir-add.texi and dir-add.info. + (mostlyclean): Add dir-add.info. + (realclean): Add dir-add.texi. + (install): Add entries in `dir' file using install-info. + + * manual/libc.texinfo: Add @dircategory and @direntry text. + Reported by Miles Bader <miles@gnu.ai.mit.edu>. + +1997-06-12 12:45 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/i386/fpu/__math.h (__M_SQRT2): Define here since we + cannot rely on M_SQRT2 being defined. (log1p): Use __M_SQRT2 not + M_SQRT2. + * math/math.h (_Mldbl): Define even if M_* constants are not + defined. + Reported by corsepiu@faw.uni-ulm.de. + +1997-06-12 03:08 Philip Blundell <Philip.Blundell@pobox.com> + + * nss/getXXbyYY_r.c (do_weak_alias): Remove extra parentheses. + +1997-06-11 13:22 Ulrich Drepper <drepper@cygnus.com> + + * misc/regexp.h (compile): Allow use of macro INIT for variable + declaration. Add documentation for INIT. + Reported by Robert Bihlmeyer <robbe@orcus.priv.at>. + +1997-06-11 10:47 Philip Blundell <Philip.Blundell@pobox.com> + + * sysdeps/unix/sysv/linux/net/if_arp.h: Add two new hardware types. + +1997-06-05 23:10 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * sysdeps/unix/sysv/linux/Dist: Remove netatalk/atalk.h and + netinet/icmp.h, add netatalk/at.h. + * sysdeps/unix/sysv/linux/powerpc/Dist: Remove termios.h. + * sysdeps/unix/sysv/linux/sparc/Dist: Remove start.c. + +1997-06-05 13:43 Fila Kolodny <fila@filapc.ibi.com> + + * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add netipx/ipx.h. + +1997-06-05 17:08 Ulrich Drepper <drepper@cygnus.com> + + * string/argz-addsep.c: Correct weak alias. + Reported by Ben Pfaff <pfaffben@pilot.msu.edu>. + + * locale/setlocale.c (setlocale): Free variable with locale path + before returning. + (setname): Don't test for _nl_current[category] being NULL before + freeing. + Reported by Ben Pfaff <pfaffben@pilot.msu.edu>. + +1997-06-03 23:42 Ulrich Drepper <drepper@cygnus.com> + + * time/Makefile: Make tzselect depend on config.make. + +1997-06-01 12:48 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/alpha/gnu/types.h (__fd_mask): Change + type to `unsigned long int'. + Patch by Richard Henderson <richard@twiddle.rth.home>. + +1997-05-30 17:34 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * nss/nss_files/files-hosts.c: Delete inclusion of + "../resolv/mapv4v6hostent.h". + +1997-05-31 02:33 Ulrich Drepper <drepper@cygnus.com> + + * libio/libio.h: Define bits for libg++-2.8. + +1997-05-30 09:50 Richard Henderson <rth@tamu.edu> + + * manual/maint.texi: ECOFF hasn't been tested in ages and I don't + plan on doing so ever again. Don't say alpha-linuxecoff is known + to work. + + * sysdeps/alpha/Makefile: Temporarily turn on -mieee globally. This + will last until I figure out how to build a parallel libm_ieee. + + * sysdeps/alpha/fpu/fpu_control.h: Update copyright. Change default + FP mode to round to nearest, no exceptions as for Intel. + * sysdeps/unix/sysv/linux/alpha/setfpucw.c: Add copyright. + (rdfpcr): Use excb rather than trapb. Be more efficient about + getting at the fpcr. + (wrfpcr): Likewise. + (__setfpucw): Reformat. + + * sysdeps/unix/alpha/sysdep.S: Tiny cleanups. + * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/brk.S: Don't use jmp macro to make + sure the stack frame is released the very instruction before the + real jump out. + * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise. + * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. + + * sysdeps/unix/sysv/linux/alpha/gnu/types.h: Undef some bits we may + have gotten from <linux/posix_types.h>. + + * sysdeps/unix/sysv/linux/alpha/ioperm.c: Add definition for Miata. + +1997-05-29 13:59 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * Makefile (manual/dir-add.texi): Force execution. + +1997-05-29 13:55 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * stdlib/strfmon.c: Don't run past EOS after `='. + +1997-05-29 12:48 Ulrich Drepper <drepper@cygnus.com> + + Update resolver code to bind-4.9.6-T1A. + * resolv/Banner: Update. + * nss/digits_dots.c: Adapt text address matching to T1A. + * nss/nss_files/files-hosts.c: Always use inet_pton. + * resolv/base64.c (b64_pton): Follow T1A but don't use this code since + it would lead to warnings. + * resolv/gethnamaddr.c (getanswer): Test host name for maximal length + at several places. + * resolv/inet_net_pton.c (inet_net_pton_ipv4): Correct typo in comment. + * resolv/res_comp.c (dn_expand): Check for overflow. + (dn_comp): Likewise. + * resolv/res_debug.c (precsize_aton): Better implementation. + * resolv/res_init.c (res_init): Make `buf' of size MAXDNAME. + * resolv/res_send.c (res_send): Check for overflow in descriptor set. + * resolv/nss_dns/dns-host.c (getanswer_r): Test host name for maximal + length at several places. + +1997-05-28 21:56 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * sysdeps/unix/sysv/linux/net/ppp_defs.h: Include <time.h> for + time_t. + + * login/pty.h: Include <ioctl-types.h> for definition of struct + winsize. + +1997-05-28 22:51 Ulrich Drepper <drepper@cygnus.com> + + * time/strptime.c (strptime_internal, case 'Y'): Restrict year + number to four digits and to representable range for 4 byte time_t + values. + Patch by H.J. Lu <hjl@lucon.org>. + +1997-07-16 Miles Bader <miles@gnu.ai.mit.edu> + + * sysdeps/mach/hurd/mmap.c (__mmap): Check for !MAP_SHARED rather + than MAP_COPY|MAP_PRIVATE, since those values are defined wierdly. + Return EACCES rather than EGRATUITOUS if a R/W request isn't writable. + +1997-07-05 11:56 Ulrich Drepper <drepper@cygnus.com> + + * login/login.c (tty_name): Use newly allocated buffer. + Patch by Jaakko Hyvätti <jaakko.hyvatti@iki.fi>. + + * time/asctime.c: Never translate week and month name according + to LC_TIME. Patch by Paul Eggert <eggert@twinsun.com>. + +1997-07-01 16:40 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + + * hurd/hurdsig.c: Include <hurd/id.h>. + (reauth_proc): Call proc_setowner appropriately too. + +1997-05-29 14:02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * sysdeps/unix/sysv/linux/sys/ttydefaults.h (CEOL, CSTATUS): Use + correct value for _POSIX_VDISABLE. + +1997-05-06 13:25 H.J. Lu <hjl@gnu.ai.mit.edu> + + * stdio-common/bug3.c: use /tmp/bug3.test for concurrency. + + * stdio-common/bug4.c: use /tmp/bug4.test for concurrency. + 1997-05-26 23:29 Ulrich Drepper <drepper@cygnus.com> * Net release 2.0.4. diff --git a/Makefile b/Makefile index 126b0fa482..41333d2138 100644 --- a/Makefile +++ b/Makefile @@ -303,8 +303,9 @@ makeinfo --no-validate --no-warn --no-headers $< -o $@ endef INSTALL: manual/maint.texi; $(format-me) NOTES: manual/creature.texi; $(format-me) -manual/dir-add.texi: +manual/dir-add.texi manual/dir-add.info: FORCE $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F) +FORCE: rpm/%: subdir_distinfo $(MAKE) $(PARALLELMFLAGS) -C $(@D) subdirs='$(subdirs)' $(@F) diff --git a/PROJECTS b/PROJECTS index ea1c208161..d7291b8744 100644 --- a/PROJECTS +++ b/PROJECTS @@ -1,6 +1,6 @@ Open jobs for finishing GNU libc: --------------------------------- -Status: January 1997 +Status: August 1997 If you have time and talent to take over any of the jobs below please contact <bug-glibc@prep.ai.mit.edu> @@ -19,7 +19,16 @@ contact <bug-glibc@prep.ai.mit.edu> standards if they do not contradict each other. -[ 3] Write translations for the GNU libc message for the so far +[ 3] The IMHO opinion most important task is to write a more complete + test suite. We cannot get too many people working on this. It is + not difficult to write a test, find a definition of the function + which I normally can provide, if necessary, and start writing tests + to test for compliance. Beside this, take a look at the sources + and write tests which in total test as many paths of execution as + possible. + + +[ 4] Write translations for the GNU libc message for the so far unsupported languages. GNU libc is fully internationalized and users can immediately benefit from this. @@ -28,15 +37,7 @@ contact <bug-glibc@prep.ai.mit.edu> for the current status (of course better use a mirror of prep). -[ 4] Write wordexp() function; this is described in POSIX.2, the - header <wordexp.h> already exists. - - Implementation idea: use some functions from bash. - -**** Somebody is working on this. Help may or may not be appreciated. - - -[ 5] Write `long double' versions of the math functions. This should be +[ 6] Write `long double' versions of the math functions. This should be done in collaboration with the NetBSD and FreeBSD people. The libm is in fact fdlibm (not the same as in Linux libc). @@ -45,7 +46,18 @@ contact <bug-glibc@prep.ai.mit.edu> the rest. -[ 6] If you enjoy assembler programming (as I do --drepper :-) you might +[ 7] Several math functions have to be written: + + - exp2 + + each with float, double, and long double arguments. + + Beside this most of the complex math functions which are new in + ISO C 9X should be improved. Writing some of them in assembler is + useful to exploit the parallelism which often is available. + + +[ 8] If you enjoy assembler programming (as I do --drepper :-) you might be interested in writing optimized versions for some functions. Especially the string handling functions can be optimized a lot. @@ -60,42 +72,38 @@ contact <bug-glibc@prep.ai.mit.edu> work. -[ 7] Write nftw() function. Perhaps it might be good to reimplement the - ftw() function as well to share most of the code. - -**** Almost done! - - -[ 8] Write AVL-tree based tsearch() et.al. functions. Currently only - a very simple algorithm is used. - There is a public domain version but using this would cause problems - with the assignment. - - -[ 9] Extend regex and/or rx to work with wide characters and complete +[10] Extend regex and/or rx to work with wide characters and complete implementation of character class and collation class handling. It is planed to do a complete rewrite. -[10] Write access function for netmasks, bootparams, and automount +[11] Write access function for netmasks, bootparams, and automount databases for nss_files and nss_db module. The functions should be embedded in the nss scheme. This is not hard and not all services must be supported at once. -[11] Rewrite utmp/wtmp functions to use database functions. This is much - better than the normal flat file format. +[13] Several more or less small functions have to be written: -**** There are plans for a new approach to this problem. Please contact - bug-glibc@prep.ai.mit.edu before starting to work.) + + tcgetid() and waitid() from XPG4.2 + + grantpt(), ptsname(), unlockpt() from XPG4.2 + More information is available on request. -[12] Several more or less small functions have to be written: - + tcgetid() and waitid() from XPG4.2 - + grantpt(), ptsname(), unlockpt() from XPG4.2 - + getdate() from XPG4.2 - + fmtmsg() from SVID +[14] We need to write a library for on-the-fly transformation of streams + of text. In fact, this would be a recode-library (you know, GNU recode). + This is needed in several places in the GNU libc and I already have + rather concrete plans but so far no possibility to start this. + + +[15] Cleaning up the header files. Ideally, each header style should + follow the "good examples". Each variable and function should have + a short description of the function and its parameters. The prototypes + should always contain variable names which can help to identify their + meaning; better than + + int foo __P ((int, int, int, int)); - More information are available on request. + Blargh! diff --git a/assert/assert.h b/assert/assert.h index c670a66359..3f0d6a3ac1 100644 --- a/assert/assert.h +++ b/assert/assert.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 @@ -37,7 +37,7 @@ #ifdef NDEBUG -#define assert(expr) ((void) 0) +# define assert(expr) ((void) 0) /* void assert_perror (int errnum); @@ -45,14 +45,12 @@ error message with the error text for ERRNUM and abort. (This is a GNU extension.) */ -#ifdef __USE_GNU -#define assert_perror(errnum) ((void) 0) -#endif +# ifdef __USE_GNU +# define assert_perror(errnum) ((void) 0) +# endif #else /* Not NDEBUG. */ -#include <sys/cdefs.h> - __BEGIN_DECLS /* This prints an "Assertion failed" message and aborts. */ @@ -71,27 +69,27 @@ extern void __assert_perror_fail __P ((int __errnum, __END_DECLS -#define assert(expr) \ - ((void) ((expr) || \ +# define assert(expr) \ + ((void) ((expr) ? 0 : \ (__assert_fail (__STRING(expr), \ __FILE__, __LINE__, __ASSERT_FUNCTION), 0))) -#ifdef __USE_GNU -#define assert_perror(errnum) \ - ((void) ((errnum) && (__assert_perror_fail ((errnum), \ - __FILE__, __LINE__, \ - __ASSERT_FUNCTION), 0))) -#endif +# ifdef __USE_GNU +# define assert_perror(errnum) \ + ((void) ((errnum) ? 0 : (__assert_perror_fail ((errnum), \ + __FILE__, __LINE__, \ + __ASSERT_FUNCTION), 0))) +# endif /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' which contains the name of the function currently being defined. This is broken in G++ before version 2.6. */ -#if (!defined (__GNUC__) || __GNUC__ < 2 || \ - __GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4)) -#define __ASSERT_FUNCTION ((__const char *) 0) -#else -#define __ASSERT_FUNCTION __PRETTY_FUNCTION__ -#endif +# if (!defined __GNUC__ || __GNUC__ < 2 || \ + __GNUC_MINOR__ < (defined __cplusplus ? 6 : 4)) +# define __ASSERT_FUNCTION ((__const char *) 0) +# else +# define __ASSERT_FUNCTION __PRETTY_FUNCTION__ +# endif #endif /* NDEBUG. */ diff --git a/configure.in b/configure.in index f8abdce1a6..fe58c15467 100644 --- a/configure.in +++ b/configure.in @@ -604,7 +604,7 @@ EOF dnl No \ in command here because it ends up inside ''. if AC_TRY_COMMAND([${CC-cc} $CFLAGS -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c]); then + -o conftest conftest.c 1>&AC_FD_CC]); then libc_cv_ld_no_whole_archive=yes else libc_cv_ld_no_whole_archive=no @@ -621,7 +621,7 @@ EOF dnl No \ in command here because it ends up inside ''. if AC_TRY_COMMAND([${CC-cc} $CFLAGS -nostdlib -nostartfiles -fno-exceptions - -o conftest conftest.c]); then + -o conftest conftest.c 1>&AC_FD_CC]); then libc_cv_gcc_no_exceptions=yes else libc_cv_gcc_no_exceptions=no diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index f50daa2f8f..f028afc533 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -22,6 +22,7 @@ #include <hurd/signal.h> #include <cthreads.h> /* For `struct mutex'. */ #include <string.h> +#include <hurd/id.h> #include "hurdfault.h" #include "hurdmalloc.h" /* XXX */ @@ -1237,6 +1238,16 @@ reauth_proc (mach_port_t new) __mach_port_deallocate (__mach_task_self (), ignore); __mach_port_destroy (__mach_task_self (), ref); + /* Set the owner of the process here too. */ + mutex_lock (&_hurd_id.lock); + if (!_hurd_check_ids ()) + HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_setowner (port, + (_hurd_id.gen.nuids + ? _hurd_id.gen.uids[0] : 0), + !_hurd_id.gen.nuids)); + mutex_unlock (&_hurd_id.lock); + (void) &reauth_proc; /* Silence compiler warning. */ } text_set_element (_hurd_reauth_hook, reauth_proc); diff --git a/inet/arpa/tftp.h b/inet/arpa/tftp.h index 036720011f..0904407c73 100644 --- a/inet/arpa/tftp.h +++ b/inet/arpa/tftp.h @@ -33,8 +33,8 @@ * @(#)tftp.h 8.1 (Berkeley) 6/2/93 */ -#ifndef _TFTP_H_ -#define _TFTP_H_ +#ifndef _ARPA_TFTP_H +#define _ARPA_TFTP_H 1 /* * Trivial File Transfer Protocol (IEN-133) @@ -44,20 +44,20 @@ /* * Packet types. */ -#define RRQ 01 /* read request */ -#define WRQ 02 /* write request */ -#define DATA 03 /* data packet */ -#define ACK 04 /* acknowledgement */ -#define ERROR 05 /* error code */ +#define RRQ 01 /* read request */ +#define WRQ 02 /* write request */ +#define DATA 03 /* data packet */ +#define ACK 04 /* acknowledgement */ +#define ERROR 05 /* error code */ struct tftphdr { - short th_opcode; /* packet type */ + short th_opcode; /* packet type */ union { - short tu_block; /* block # */ - short tu_code; /* error code */ - char tu_stuff[1]; /* request packet stuff */ + unsigned short tu_block; /* block # */ + short tu_code; /* error code */ + char tu_stuff[1]; /* request packet stuff */ } th_u; - char th_data[1]; /* data or error string */ + char th_data[1]; /* data or error string */ }; #define th_block th_u.tu_block @@ -77,4 +77,4 @@ struct tftphdr { #define EEXISTS 6 /* file already exists */ #define ENOUSER 7 /* no such user */ -#endif /* !_TFTP_H_ */ +#endif /* arpa/tftp.h */ diff --git a/inet/inet_ntoa.c b/inet/inet_ntoa.c index a37b1dbeef..a72d7ba7e3 100644 --- a/inet/inet_ntoa.c +++ b/inet/inet_ntoa.c @@ -1,59 +1,97 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ - -/* - * Convert network-format internet address - * to base 256 d.d.d.d representation. - */ -#include <sys/types.h> -#include <netinet/in.h> -#include <arpa/inet.h> +/* Convert Inet number to ASCII representation. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #include <stdio.h> +#include <stdlib.h> +#include <arpa/inet.h> +#include <libc-lock.h> + +/* The interface of this function is completely stupid, it requires a + static buffer. We relax this a bit in that we allow at least one + buffer for each thread. */ + +/* This is the key for the thread specific memory. */ +static __libc_key_t key; + +/* If nonzero the key allocation failed and we should better use a + static buffer than fail. */ +static char local_buf[18]; +static char *static_buf; + +/* Destructor for the thread-specific data. */ +static void init (void); +static void free_key_mem (void *mem); + char * -inet_ntoa(in) - struct in_addr in; +inet_ntoa (struct in_addr in) +{ + __libc_once_define (once); + char *buffer; + unsigned char *bytes; + + /* If we have not yet initialized the buffer do it now. */ + __libc_once (once, init); + + if (static_buf != NULL) + buffer = static_buf; + else + { + /* We don't use the static buffer and so we have a key. Use it + to get the thread-specific buffer. */ + buffer = __libc_getspecific (key); + if (buffer == NULL) + { + /* No buffer allocated so far. */ + buffer = malloc (18); + if (buffer == NULL) + /* No more memory available. We use the static buffer. */ + buffer = local_buf; + else + __libc_setspecific (key, buffer); + } + } + + bytes = (unsigned char *) ∈ + snprintf (buffer, 18, "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], bytes[3]); + + return buffer; +} + + +/* Initialize buffer. */ +static void +init (void) +{ + if (__libc_key_create (&key, free_key_mem)) + /* Creating the key failed. This means something really went + wrong. In any case use a static buffer which is better than + nothing. */ + static_buf = local_buf; +} + + +/* free the thread specific data, this is done if a thread terminates. */ +static void +free_key_mem (void *mem) { - static char b[18]; - register char *p; - - p = (char *)∈ -#define UC(b) (((int)b)&0xff) - (void)snprintf(b, sizeof(b), - "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3])); - return (b); + free (mem); + __libc_setspecific (key, NULL); } diff --git a/inet/rcmd.c b/inet/rcmd.c index d390a8d809..6a680c18b7 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -105,7 +105,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) else (void)fprintf(stderr, "rcmd: socket: %m\n"); sigsetmask(oldmask); - return (-1); + return -1; } fcntl(s, F_SETOWN, pid); sin.sin_family = hp->h_addrtype; @@ -140,7 +140,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) } (void)fprintf(stderr, "%s: %m\n", hp->h_name); sigsetmask(oldmask); - return (-1); + return -1; } lport--; if (fd2p == 0) { @@ -149,7 +149,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) } else { char num[8]; int s2 = rresvport(&lport), s3; - int len = sizeof(from); + size_t len = sizeof(from); if (s2 < 0) goto bad; @@ -211,14 +211,14 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) goto bad2; } sigsetmask(oldmask); - return (s); + return s; bad2: if (lport) (void)close(*fd2p); bad: (void)close(s); sigsetmask(oldmask); - return (-1); + return -1; } int @@ -232,20 +232,20 @@ rresvport(alport) sin.sin_addr.s_addr = INADDR_ANY; s = socket(AF_INET, SOCK_STREAM, 0); if (s < 0) - return (-1); + return -1; for (;;) { sin.sin_port = htons((u_short)*alport); if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) - return (s); + return s; if (errno != EADDRINUSE) { (void)close(s); - return (-1); + return -1; } (*alport)--; if (*alport == IPPORT_RESERVED/2) { (void)close(s); __set_errno (EAGAIN); /* close */ - return (-1); + return -1; } } } @@ -282,9 +282,9 @@ ruserok(rhost, superuser, ruser, luser) for (ap = hp->h_addr_list; *ap; ++ap) { bcopy(*ap, &addr, sizeof(addr)); if (iruserok(addr, superuser, ruser, luser) == 0) - return (0); + return 0; } - return (-1); + return -1; } /* @@ -314,7 +314,7 @@ again: if (hostf) { if (__ivaliduser(hostf, raddr, luser, ruser) == 0) { (void)fclose(hostf); - return (0); + return 0; } (void)fclose(hostf); } @@ -349,7 +349,7 @@ again: } if (hostf == NULL) - return (-1); + return -1; /* * If not a regular file, or is owned by someone other than * user or root or if writeable by anyone but the owner, quit. @@ -369,11 +369,11 @@ again: if (cp) { __rcmd_errstr = cp; (void)fclose(hostf); - return (-1); + return -1; } goto again; } - return (-1); + return -1; } /* @@ -415,11 +415,11 @@ __ivaliduser(hostf, raddr, luser, ruser) if (__icheckhost(raddr, buf) && strcmp(ruser, *user ? user : luser) == 0) { free (buf); - return (0); + return 0; } } free (buf); - return (-1); + return -1; } /* @@ -430,7 +430,7 @@ __icheckhost(raddr, lhost) u_int32_t raddr; register char *lhost; { - register struct hostent hostbuf, *hp; + struct hostent hostbuf, *hp; size_t buflen; char *buffer; register u_int32_t laddr; @@ -439,7 +439,7 @@ __icheckhost(raddr, lhost) /* Try for raw ip address first. */ if (isdigit(*lhost) && (int32_t)(laddr = inet_addr(lhost)) != -1) - return (raddr == laddr); + return raddr == laddr; /* Better be a hostname. */ buflen = 1024; @@ -452,14 +452,14 @@ __icheckhost(raddr, lhost) { /* Enlarge the buffer. */ buflen *= 2; - buflen = __alloca (buflen); + buffer = __alloca (buflen); } /* Spin through ip addresses. */ for (pp = hp->h_addr_list; *pp; ++pp) if (!bcmp(&raddr, *pp, sizeof(u_int32_t))) - return (1); + return 1; /* No match. */ - return (0); + return 0; } diff --git a/io/lockf.c b/io/lockf.c index c391243e97..7bf90c9b59 100644 --- a/io/lockf.c +++ b/io/lockf.c @@ -1,25 +1,26 @@ -/* Copyright (C) 1994, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1996, 1997 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> +#include <string.h> /* lockf is a simplified interface to fcntl's locking facilities. */ @@ -28,6 +29,8 @@ lockf (int fd, int cmd, off_t len) { struct flock fl; + memset ((char *) &fl, '\0', sizeof (fl)); + switch (cmd) { case F_TEST: diff --git a/libio/fileops.c b/libio/fileops.c index 3d494e31c1..afba972693 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -291,6 +291,15 @@ DEFUN(_IO_file_underflow, (fp), _IO_switch_to_get_mode(fp); + /* This is very tricky. We have to adjust those + pointers before we call _IO_SYSREAD () since + we may longjump () out while waiting for + input. Those pointers may be screwed up. H.J. */ + fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base; + fp->_IO_read_end = fp->_IO_buf_base; + fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end + = fp->_IO_buf_base; + count = _IO_SYSREAD (fp, fp->_IO_buf_base, fp->_IO_buf_end - fp->_IO_buf_base); if (count <= 0) @@ -300,10 +309,7 @@ DEFUN(_IO_file_underflow, (fp), else fp->_flags |= _IO_ERR_SEEN, count = 0; } - fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base; - fp->_IO_read_end = fp->_IO_buf_base + count; - fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end - = fp->_IO_buf_base; + fp->_IO_read_end += count; if (count == 0) return EOF; if (fp->_offset != _IO_pos_BAD) diff --git a/libio/libio.h b/libio/libio.h index d0a76c34b2..20eb5a9e1a 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -127,6 +127,7 @@ the executable file might be covered by the GNU General Public License. */ #define _IO_CURRENTLY_PUTTING 0x800 #define _IO_IS_APPENDING 0x1000 #define _IO_IS_FILEBUF 0x2000 +#define _IO_BAD_SEEN 0x4000 /* These are "formatting flags" matching the iostream fmtflags enum values. */ #define _IO_SKIPWS 01 @@ -145,6 +146,7 @@ the executable file might be covered by the GNU General Public License. */ #define _IO_UNITBUF 020000 #define _IO_STDIO 040000 #define _IO_DONT_CLOSE 0100000 +#define _IO_BOOLALPHA 0200000 struct _IO_jump_t; struct _IO_FILE; diff --git a/libio/strops.c b/libio/strops.c index 9c2650f352..afc293bd7d 100644 --- a/libio/strops.c +++ b/libio/strops.c @@ -88,7 +88,7 @@ DEFUN(_IO_str_init_static, (fp, ptr, size, pstart), if (pstart) { fp->_IO_write_ptr = pstart; - fp->_IO_write_end = ptr+size; + fp->_IO_write_end = ptr + size; fp->_IO_read_end = pstart; } else @@ -193,7 +193,7 @@ _IO_ssize_t DEFUN(_IO_str_count, (fp), register _IO_FILE *fp) { - return (fp->_IO_write_ptr > fp->_IO_read_end ? fp->_IO_write_ptr + return (fp->_IO_write_end > fp->_IO_read_end ? fp->_IO_write_end : fp->_IO_read_end) - fp->_IO_read_base; } diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 7accb77019..d5b362c8c2 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -205,13 +205,13 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ /* `-a' requests the names of all available locales. */ if (do_all != 0) { - setlocale (LC_ALL, ""); + setlocale (LC_COLLATE, ""); write_locales (); exit (EXIT_SUCCESS); } /* `m' requests the names of all available charmaps. The names can be - used for the -f argument to localedef(3). */ + used for the -f argument to localedef(1). */ if (do_charmaps != 0) { write_charmaps (); @@ -509,6 +509,25 @@ show_locale_vars (void) } +/* Some of the "string" we print contain non-printable characters. We + encode them here. */ +static void +print_escaped (const char *string) +{ + const unsigned char *ch; + + ch = string; + while ('\0' != *ch) + { + if (isprint (*ch)) + putchar (*ch); + else + printf("<0x%02x>", *ch); + ++ch; + } +} + + /* Show the information request for NAME. */ static void show_info (const char *name) @@ -523,9 +542,11 @@ show_info (const char *name) switch (item->value_type) { case string: - printf ("%s%s%s", show_keyword_name ? "\"" : "", - nl_langinfo (item->item_id) ? : "", - show_keyword_name ? "\"" : ""); + if (show_keyword_name) + putchar ('"'); + print_escaped (nl_langinfo (item->item_id) ? : ""); + if (show_keyword_name) + putchar ('"'); break; case stringarray: { @@ -538,11 +559,14 @@ show_info (const char *name) for (cnt = 0; cnt < item->max - 1; ++cnt) { val = nl_langinfo (item->item_id + cnt); - printf ("%s;", val ? : ""); + if (val != NULL) + print_escaped (val); + putchar (';'); } val = nl_langinfo (item->item_id + cnt); - printf ("%s", val ? : ""); + if (val != NULL) + print_escaped (val); if (show_keyword_name) putchar ('"'); diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index d64af771fe..f420400c7d 100644 --- a/locale/programs/localedef.c +++ b/locale/programs/localedef.c @@ -255,8 +255,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ { avail = act_add_locdef->locale->categories[cat].generic != NULL; if (avail) - localedef->categories[cat].generic - = act_add_locdef->locale->categories[cat].generic; + { + localedef->categories[cat].generic + = act_add_locdef->locale->categories[cat].generic; + localedef->avail |= 1 << cat; + } } if (! avail) diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c index aecc8913e2..7749f6aebc 100644 --- a/locale/programs/locfile.c +++ b/locale/programs/locfile.c @@ -920,17 +920,23 @@ void check_all_categories (struct localedef_t *locale, struct charset_t *charset) { /* Call the finishing functions for all locales. */ - if ((locale->binary & (1 << LC_CTYPE)) == 0) + if ((locale->avail & (1 << LC_CTYPE)) != 0 + && (locale->binary & (1 << LC_CTYPE)) == 0) ctype_finish (locale, charset); - if ((locale->binary & (1 << LC_COLLATE)) == 0) + if ((locale->avail & (1 << LC_COLLATE)) != 0 + && (locale->binary & (1 << LC_COLLATE)) == 0) collate_finish (locale, charset); - if ((locale->binary & (1 << LC_MONETARY)) == 0) + if ((locale->avail & (1 << LC_MONETARY)) != 0 + && (locale->binary & (1 << LC_MONETARY)) == 0) monetary_finish (locale); - if ((locale->binary & (1 << LC_NUMERIC)) == 0) + if ((locale->avail & (1 << LC_NUMERIC)) != 0 + && (locale->binary & (1 << LC_NUMERIC)) == 0) numeric_finish (locale); - if ((locale->binary & (1 << LC_TIME)) == 0) + if ((locale->avail & (1 << LC_TIME)) != 0 + && (locale->binary & (1 << LC_TIME)) == 0) time_finish (locale); - if ((locale->binary & (1 << LC_MESSAGES)) == 0) + if ((locale->avail & (1 << LC_MESSAGES)) != 0 + && (locale->binary & (1 << LC_MESSAGES)) == 0) messages_finish (locale); } @@ -940,12 +946,18 @@ write_all_categories (struct localedef_t *locale, struct charset_t *charset, const char *output_path) { /* Call all functions to write locale data. */ - ctype_output (locale, charset, output_path); - collate_output (locale, charset, output_path); - monetary_output (locale, output_path); - numeric_output (locale, output_path); - time_output (locale, output_path); - messages_output (locale, output_path); + if ((locale->avail & (1 << LC_CTYPE)) != 0) + ctype_output (locale, charset, output_path); + if ((locale->avail & (1 << LC_COLLATE)) != 0) + collate_output (locale, charset, output_path); + if ((locale->avail & (1 << LC_MONETARY)) != 0) + monetary_output (locale, output_path); + if ((locale->avail & (1 << LC_NUMERIC)) != 0) + numeric_output (locale, output_path); + if ((locale->avail & (1 << LC_TIME)) != 0) + time_output (locale, output_path); + if ((locale->avail & (1 << LC_MESSAGES)) != 0) + messages_output (locale, output_path); } diff --git a/locale/setlocale.c b/locale/setlocale.c index 70a5007ee5..4fc5512ecb 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -204,8 +204,10 @@ new_composite_name (int category, char *newnames[LC_ALL]) static inline void setname (int category, const char *name) { - if (_nl_current[category] == NULL - && _nl_current_names[category] != _nl_C_name) + if (_nl_current_names[category] == name) + return; + + if (_nl_current_names[category] != _nl_C_name) free ((void *) _nl_current_names[category]); _nl_current_names[category] = name; @@ -355,6 +357,9 @@ setlocale (int category, const char *locale) /* Critical section left. */ __libc_lock_unlock (__libc_setlocale_lock); + /* Free the resources (the locale path variable. */ + free (locale_path); + return composite; } else @@ -394,6 +399,9 @@ setlocale (int category, const char *locale) /* Critical section left. */ __libc_lock_unlock (__libc_setlocale_lock); + /* Free the resources (the locale path variable. */ + free (locale_path); + return newname; } } diff --git a/login/login.c b/login/login.c index 7cbe8b603e..0df11c6895 100644 --- a/login/login.c +++ b/login/login.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -42,7 +42,7 @@ tty_name (int fd, char **tty, size_t buf_len) { rv = ttyname_r (fd, buf, buf_len); - if (rv < 0 || memchr (buf, '\0', buf_len)) + if (rv != 0 || memchr (buf, '\0', buf_len)) /* We either got an error, or we succeeded and the returned name fit in the buffer. */ break; @@ -65,6 +65,8 @@ tty_name (int fd, char **tty, size_t buf_len) __set_errno (ENOMEM); break; } + + buf = new_buf; } if (rv == 0) diff --git a/login/pty.h b/login/pty.h index 09024a787a..731ab12d82 100644 --- a/login/pty.h +++ b/login/pty.h @@ -1,5 +1,5 @@ /* pty.h - Functions for pseudo TTY handling. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 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 @@ -22,6 +22,7 @@ #define _PTY_H 1 #include <features.h> +#include <ioctl-types.h> #include <termios.h> diff --git a/manual/.cvsignore b/manual/.cvsignore index 146fd188bf..7c305176da 100644 --- a/manual/.cvsignore +++ b/manual/.cvsignore @@ -8,5 +8,5 @@ glibc-* *.toc *.aux *.log *.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs -chapters chapters-incl summary.texi stamp-* -distinfo +chapters chapters-incl1 chapters-incl2 summary.texi stamp-* +distinfo dir-add.texi diff --git a/manual/Makefile b/manual/Makefile index c99f4974a8..056ec08135 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -23,11 +23,13 @@ export subdir := $(subdir) # We need GNU awk for the xtract-typefun script. GAWK = gawk +# Allow override +INSTALL_INFO = install-info .PHONY: all dvi info all: dvi info dvi: libc.dvi -info: libc.info +info: libc.info dir-add.info # Get glibc's configuration info. ifneq (,$(wildcard ../Makeconfig)) @@ -66,8 +68,11 @@ stamp-summary: summary.awk $(chapters) $(chapters-incl) # Generate a file which can be added to the `dir' content to provide direct # access to the documentation of the function, variables, and other # definitions. -dir-add.texi: xtract-typefun.awk $(chapters) - $(GAWK) -f $^ | sort > $@.new; +dir-add.texi: xtract-typefun.awk $(chapters) $(chapters-incl) + (echo "@dircategory GNU C library functions"; \ + echo "@direntry"; \ + $(GAWK) -f $^ | sort; \ + echo "@end direntry";) > $@.new mv -f $@.new $@ # Generate Texinfo files from the C source for the example programs. @@ -75,7 +80,7 @@ dir-add.texi: xtract-typefun.awk $(chapters) sed -e 's,[{}],@&,g' \ -e 's,/\*\(@.*\)\*/,\1,g' \ -e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \ - -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/'\ + -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g'\ $< | expand > $@.new mv -f $@.new $@ @@ -89,7 +94,7 @@ distribute = $(minimal-dist) \ $(minimal-dist))) \ libc.info* libc.?? libc.??s texinfo.tex summary.texi \ stamp-summary chapters chapters-incl \ - xtract-typefun.awk + xtract-typefun.awk dir-add.texi dir-add.info dir export distribute := $(distribute) tar-it = tar chovf $@ $^ @@ -118,18 +123,23 @@ glibc-doc-$(edition).tar: $(doc-only-dist) $(distribute) .PHONY: mostlyclean distclean realclean clean mostlyclean: - -rm -f libc.dvi libc.info* + -rm -f libc.dvi libc.info* dir-add.info clean: mostlyclean distclean: clean indices = cp fn pg tp vr ky realclean: distclean -rm -f chapters chapters-incl summary.texi stamp-summary *.c.texi -rm -f $(foreach index,$(indices),libc.$(index) libc.$(index)s) - -rm -f libc.log libc.aux libc.toc + -rm -f libc.log libc.aux libc.toc dir-add.texi .PHONY: install subdir_install installdirs install-data install-data subdir_install: install -install: $(inst_infodir)/libc.info +install: $(inst_infodir)/libc.info dir-add.info + @if $(SHELL) -c '$(INSTALL_INFO) --version' >/dev/null 2>&1; then \ + test -f $(inst_infodir)/dir || cp dir $(inst_infodir);\ + $(INSTALL_INFO) --info-dir=$(inst_infodir) $(inst_infodir)/libc.info;\ + $(INSTALL_INFO) --info-dir=$(inst_infodir) dir-add.info;\ + else : ; fi # Catchall implicit rule for other installation targets from the parent. install-%: ; diff --git a/manual/dir b/manual/dir new file mode 100644 index 0000000000..f5920b12be --- /dev/null +++ b/manual/dir @@ -0,0 +1,16 @@ +$Id$ +This is the file .../info/dir, which contains the topmost node of the +Info hierarchy. The first time you invoke Info you start off +looking at that node, which is (dir)Top. + +File: dir Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs<Return>" visits the Emacs topic, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: diff --git a/manual/libc.texinfo b/manual/libc.texinfo index 50d42b53d6..02fb7487fd 100644 --- a/manual/libc.texinfo +++ b/manual/libc.texinfo @@ -3,12 +3,18 @@ @setfilename libc.info @settitle The GNU C Library @setchapternewpage odd -@comment %**end of header (This is for running Texinfo on a region.) + +@comment Tell install-info what to do. +@dircategory GNU libraries +@direntry +* Libc: (libc). C library. +@end direntry @c This tells texinfo.tex to use the real section titles in xrefs in @c place of the node name, when no section title is explicitly given. @set xref-automatic-section-title @smallbook +@comment %**end of header (This is for running Texinfo on a region.) @c sold 0.06/1.09, print run out 21may96 @set EDITION 0.07 DRAFT @@ -22,7 +28,7 @@ This file documents the GNU C library. This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU C Library Reference Manual}, for Version @value{VERSION}. -Copyright (C) 1993, '94, '95, '96 Free Software Foundation, Inc. +Copyright (C) 1993, '94, '95, '96, '97 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -68,7 +74,7 @@ Foundation. @center for version @value{VERSION} @page @vskip 0pt plus 1filll -Copyright @copyright{} 1993, '94, '95, '96 Free Software Foundation, Inc. +Copyright @copyright{} 1993, '94, '95, '96, '97 Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation @* 59 Temple Place -- Suite 330, @* @@ -508,7 +514,7 @@ Socket Addresses Internet Domain -* Internet Address Format:: How socket addresses are specified in the +* Internet Address Formats:: How socket addresses are specified in the Internet namespace. * Host Addresses:: All about host addresses of Internet hosts. * Protocols Database:: Referring to protocols by name. diff --git a/manual/maint.texi b/manual/maint.texi index 38d9786b9f..9c542a3ce3 100644 --- a/manual/maint.texi +++ b/manual/maint.texi @@ -223,7 +223,6 @@ following patterns: @smallexample alpha-@var{anything}-linux -alpha-@var{anything}-linuxecoff i@var{x}86-@var{anything}-gnu i@var{x}86-@var{anything}-linux m68k-@var{anything}-linux @@ -234,6 +233,7 @@ versions) used to run on the following configurations: @smallexample alpha-dec-osf1 +alpha-@var{anything}-linuxecoff i@var{x}86-@var{anything}-bsd4.3 i@var{x}86-@var{anything}-isc2.2 i@var{x}86-@var{anything}-isc3.@var{n} diff --git a/manual/socket.texi b/manual/socket.texi index 91084be16d..0353eb7ed3 100644 --- a/manual/socket.texi +++ b/manual/socket.texi @@ -128,6 +128,28 @@ protocol} which you can request by specifying 0 as the protocol number. And that's what you should normally do---use the default. @end itemize +Throughout the following description at various places +variables/parameters to denote sizes are required. And here the trouble +starts. In the first implementations the type of these variables was +simply @code{int}. This type was on almost all machines of this time 32 +bits wide and so a de-factor standard required 32 bit variables. This +is important since references to variables of this type are passed to +the kernel. + +But now the POSIX people came and unified the interface with their words +"all size values are of type @code{size_t}". But on 64 bit machines +@code{size_t} is 64 bits wide and so variable references are not anymore +possible. + +A solution provides the Unix98 specification which finally introduces a +type @code{socklen_t}. This type is used in all of the cases in +previously changed to use @code{size_t}. The only requirement of this +type is that it is an unsigned type of at least 32 bits. Therefore, +implementations which require references to 32 bit variables be passed +can be as happy as implementations which right from the start of 64 bit +values. + + @node Communication Styles @section Communication Styles @@ -323,7 +345,13 @@ This is a synonym for @code{AF_FILE}, for compatibility. @vindex AF_INET This designates the address format that goes with the Internet namespace. (@code{PF_INET} is the name of that namespace.) -@xref{Internet Address Format}. +@xref{Internet Address Formats}. + +@comment sys/socket.h +@comment IPv6 Basic API +@item AF_INET6 +This is similar to @code{AF_INET}, but refers to the IPv6 protocol. +(@code{PF_INET6} is the name of the corresponding namespace.) @comment sys/socket.h @comment BSD @@ -352,7 +380,7 @@ For examples of use, see @ref{File Namespace}, or see @ref{Inet Example}. @comment sys/socket.h @comment BSD -@deftypefun int bind (int @var{socket}, struct sockaddr *@var{addr}, size_t @var{length}) +@deftypefun int bind (int @var{socket}, struct sockaddr *@var{addr}, socklen_t @var{length}) The @code{bind} function assigns an address to the socket @var{socket}. The @var{addr} and @var{length} arguments specify the address; the detailed format of the address depends on the namespace. @@ -400,7 +428,7 @@ Internet socket. The prototype for this function is in the header file @comment sys/socket.h @comment BSD -@deftypefun int getsockname (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length-ptr}) +@deftypefun int getsockname (int @var{socket}, struct sockaddr *@var{addr}, socklen_t *@var{length-ptr}) The @code{getsockname} function returns information about the address of the socket @var{socket} in the locations specified by the @var{addr} and @var{length-ptr} arguments. Note that the @@ -566,7 +594,7 @@ A socket address for the Internet namespace includes the following components: @item The address of the machine you want to connect to. Internet addresses can be specified in several ways; these are discussed in @ref{Internet -Address Format}, @ref{Host Addresses}, and @ref{Host Names}. +Address Formats}, @ref{Host Addresses}, and @ref{Host Names}. @item A port number for that machine. @xref{Ports}. @@ -577,7 +605,7 @@ canonical format called @dfn{network byte order}. @xref{Byte Order}, for information about this. @menu -* Internet Address Format:: How socket addresses are specified in the +* Internet Address Formats:: How socket addresses are specified in the Internet namespace. * Host Addresses:: All about host addresses of internet host. * Protocols Database:: Referring to protocols by name. @@ -589,16 +617,17 @@ for information about this. * Inet Example:: Putting it all together. @end menu -@node Internet Address Format -@subsection Internet Socket Address Format +@node Internet Address Formats +@subsection Internet Socket Address Formats -In the Internet namespace, a socket address consists of a host address +In the Internet namespace, for both IPv4 (@code{AF_INET}) and IPv6 +(@code{AF_INET6}), a socket address consists of a host address and a port on that host. In addition, the protocol you choose serves effectively as a part of the address because local port numbers are meaningful only within a particular protocol. -The data type for representing socket addresses in the Internet namespace -is defined in the header file @file{netinet/in.h}. +The data types for representing socket addresses in the Internet namespace +are defined in the header file @file{netinet/in.h}. @pindex netinet/in.h @comment netinet/in.h @@ -627,13 +656,39 @@ When you call @code{bind} or @code{getsockname}, you should specify @code{sizeof (struct sockaddr_in)} as the @var{length} parameter if you are using an Internet namespace socket address. +@deftp {Data Type} {struct sockaddr_in6} +This is the data type used to represent socket addresses in the IPv6 +namespace. It has the following members: + +@table @code +@item short int sin6_family +This identifies the address family or format of the socket address. +You should store the value of @code{AF_INET6} in this member. +@xref{Socket Addresses}. + +@item struct in6_addr sin6_addr +This is the IPv6 address of the host machine. @xref{Host +Addresses}, and @ref{Host Names}, for how to get a value to store +here. + +@item uint32_t sin6_flowinfo +This is a currently unimplemented field. + +@item uint16_t sin6_port +This is the port number. @xref{Ports}. + +@end table +@end deftp + @node Host Addresses @subsection Host Addresses Each computer on the Internet has one or more @dfn{Internet addresses}, numbers which identify that computer among all those on the Internet. -Users typically write numeric host addresses as sequences of four -numbers, separated by periods, as in @samp{128.52.46.32}. +Users typically write IPv4 numeric host addresses as sequences of four +numbers, separated by periods, as in @samp{128.52.46.32}, and IPv6 +numeric host addresses as sequences of up to eight numbers seperated by +colons, as in @samp{5f03:1200:836f:c100::1}. Each computer also has one or more @dfn{host names}, which are strings of words separated by periods, as in @samp{churchy.gnu.ai.mit.edu}. @@ -660,6 +715,9 @@ Each computer on the Internet has one or more Internet addresses, numbers which identify that computer among all those on the Internet. @end ifinfo +@c I think this whole section could possibly be removed. It is slightly +@c misleading these days. + @cindex network number @cindex local network address number An Internet host address is a number containing four bytes of data. @@ -747,7 +805,7 @@ host address number as an @code{unsigned long int}. @comment netinet/in.h @comment BSD -@deftypevr Macro {unsigned long int} INADDR_LOOPBACK +@deftypevr Macro {unsigned int} INADDR_LOOPBACK You can use this constant to stand for ``the address of this machine,'' instead of finding its actual address. It is the Internet address @samp{127.0.0.1}, which is usually called @samp{localhost}. This @@ -759,7 +817,7 @@ talking to itself. @comment netinet/in.h @comment BSD -@deftypevr Macro {unsigned long int} INADDR_ANY +@deftypevr Macro {unsigned int} INADDR_ANY You can use this constant to stand for ``any incoming address,'' when binding to an address. @xref{Setting Address}. This is the usual address to give in the @code{sin_addr} member of @w{@code{struct @@ -768,17 +826,42 @@ sockaddr_in}} when you want to accept Internet connections. @comment netinet/in.h @comment BSD -@deftypevr Macro {unsigned long int} INADDR_BROADCAST +@deftypevr Macro {unsigned int} INADDR_BROADCAST This constant is the address you use to send a broadcast message. @c !!! broadcast needs further documented @end deftypevr @comment netinet/in.h @comment BSD -@deftypevr Macro {unsigned long int} INADDR_NONE +@deftypevr Macro {unsigned int} INADDR_NONE This constant is returned by some functions to indicate an error. @end deftypevr +@comment netinet/in.h +@comment IPv6 basic API +@deftp {Data Type} {struct in6_addr} +This data type is used to store an IPv6 address. It stores 128 bits of +data, which can be accessed (via a union) in a variety of ways. +@end deftp + +@comment netinet/in.h +@comment IPv6 basic API +@deftypevr Constant {struct in6_addr} in6addr_loopback. +This constant is the IPv6 address @samp{::1}, the loopback address. See +above for a description of what this means. The macro +@code{IN6ADDR_LOOPBACK_INIT} is provided to allow you to initialise your +own variables to this value. +@end deftypevr + +@comment netinet/in.h +@comment IPv6 basic API +@deftypevr Constant {struct in6_addr} in6addr_any +This constant is the IPv6 address @samp{::}, the unspecified address. See +above for a description of what this means. The macro +@code{IN6ADDR_ANY_INIT} is provided to allow you to initialise your +own variables to this value. +@end deftypevr + @node Host Address Functions @subsubsection Host Address Functions @@ -791,7 +874,7 @@ local-address-within-network numbers in host byte order. @comment arpa/inet.h @comment BSD -@deftypefun {int} inet_aton (const char *@var{name}, struct in_addr *@var{addr}) +@deftypefun int inet_aton (const char *@var{name}, struct in_addr *@var{addr}) This function converts the Internet host address @var{name} from the standard numbers-and-dots notation into binary data and stores it in the @code{struct in_addr} that @var{addr} points to. @@ -826,6 +909,10 @@ string in the standard numbers-and-dots notation. The return value is a pointer into a statically-allocated buffer. Subsequent calls will overwrite the same buffer, so you should copy the string if you need to save it. + +In multi-threaded programs each thread has an own statically-allocated +buffer. But still subsequent calls of @code{inet_ntoa} in the same +thread will overwrite the result of the last call. @end deftypefun @comment arpa/inet.h @@ -850,6 +937,28 @@ This function returns the network number part of the Internet host address @var{addr}. @end deftypefun +@comment arpa/inet.h +@comment IPv6 basic API +@deftypefun int inet_pton (int @var{af}, const char *@var{cp}, void *@var{buf}) +This function converts an Internet address (either IPv4 or IPv6) from +presentation (textual) to network (binary) format. @var{af} should be +either @code{AF_INET} or @code{AF_INET6}, as appropriate for the type of +address being converted. @var{cp} is a pointer to the input string, and +@var{buf} is a pointer to a buffer for the result. It is the caller's +responsibility to make sure the buffer is large enough. +@end deftypefun + +@comment arpa/inet.h +@comment IPv6 basic API +@deftypefun {char *} inet_ntop (int @var{af}, const void *@var{cp}, char *@var{buf}, size_t @var{len}) +This function converts an Internet address (either IPv4 or IPv6) from +network (binary) to presentation (textual) form. @var{af} should be +either @code{AF_INET} or @code{AF_INET6}, as appropriate. @var{cp} is a +pointer to the address to be converted. @var{buf} should be a pointer +to a buffer to hold the result, and @var{len} is the length of this +buffer. The return value from the function will be this buffer address. +@end deftypefun + @node Host Names @subsubsection Host Names @cindex hosts database @@ -887,11 +996,12 @@ These are alternative names for the host, represented as a null-terminated vector of strings. @item int h_addrtype -This is the host address type; in practice, its value is always -@code{AF_INET}. In principle other kinds of addresses could be -represented in the data base as well as Internet addresses; if this were -done, you might find a value in this field other than @code{AF_INET}. -@xref{Socket Addresses}. +This is the host address type; in practice, its value is always either +@code{AF_INET} or @code{AF_INET6}, with the latter being used for IPv6 +hosts. In principle other kinds of addresses could be represented in +the data base as well as Internet addresses; if this were done, you +might find a value in this field other than @code{AF_INET} or +@code{AF_INET6}. @xref{Socket Addresses}. @item int h_length This is the length, in bytes, of each address. @@ -913,10 +1023,12 @@ implicit assumption that you can convert this to a @code{struct in_addr} or an @code{unsigned long int}. Host addresses in a @code{struct hostent} structure are always given in network byte order; see @ref{Byte Order}. -You can use @code{gethostbyname} or @code{gethostbyaddr} to search the -hosts database for information about a particular host. The information -is returned in a statically-allocated structure; you must copy the -information if you need to save it across calls. +You can use @code{gethostbyname}, @code{gethostbyname2} or +@code{gethostbyaddr} to search the hosts database for information about +a particular host. The information is returned in a +statically-allocated structure; you must copy the information if you +need to save it across calls. You can also use @code{getaddrinfo} and +@code{getnameinfo} to obtain this information. @comment netdb.h @comment BSD @@ -926,6 +1038,14 @@ named @var{name}. If the lookup fails, it returns a null pointer. @end deftypefun @comment netdb.h +@comment IPv6 Basic API +@deftypefun {struct hostent *} gethostbyname2 (const char *@var{name}, int @var{af}) +The @code{gethostbyname2} function is like @code{gethostbyname}, but +allows the caller to specify the desired address family (e.g.@: +@code{AF_INET} or @code{AF_INET6}) for the result. +@end deftypefun + +@comment netdb.h @comment BSD @deftypefun {struct hostent *} gethostbyaddr (const char *@var{addr}, int @var{length}, int @var{format}) The @code{gethostbyaddr} function returns information about the host @@ -1590,7 +1710,7 @@ program must do, using the @code{connect} function, which is declared in @comment sys/socket.h @comment BSD -@deftypefun int connect (int @var{socket}, struct sockaddr *@var{addr}, size_t @var{length}) +@deftypefun int connect (int @var{socket}, struct sockaddr *@var{addr}, socklen_t @var{length}) The @code{connect} function initiates a connection from the socket with file descriptor @var{socket} to the socket whose address is specified by the @var{addr} and @var{length} arguments. (This socket @@ -1735,7 +1855,7 @@ queue. @comment sys/socket.h @comment BSD -@deftypefun int accept (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length-ptr}) +@deftypefun int accept (int @var{socket}, struct sockaddr *@var{addr}, socklen_t *@var{length-ptr}) This function is used to accept a connection request on the server socket @var{socket}. @@ -2229,7 +2349,7 @@ more information about the @code{connect} function. @comment sys/socket.h @comment BSD -@deftypefun int sendto (int @var{socket}, void *@var{buffer}. size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, size_t @var{length}) +@deftypefun int sendto (int @var{socket}, void *@var{buffer}. size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t @var{length}) The @code{sendto} function transmits the data in the @var{buffer} through the socket @var{socket} to the destination address specified by the @var{addr} and @var{length} arguments. The @var{size} argument @@ -2258,7 +2378,7 @@ also tells you where it was sent from. This function is declared in @comment sys/socket.h @comment BSD -@deftypefun int recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, size_t *@var{length-ptr}) +@deftypefun int recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, socklen_t *@var{length-ptr}) The @code{recvfrom} function reads one packet from the socket @var{socket} into the buffer @var{buffer}. The @var{size} argument specifies the maximum number of bytes to be read. @@ -2485,7 +2605,7 @@ They are declared in @file{sys/socket.h}. @comment sys/socket.h @comment BSD -@deftypefun int getsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, size_t *@var{optlen-ptr}) +@deftypefun int getsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, socklen_t *@var{optlen-ptr}) The @code{getsockopt} function gets information about the value of option @var{optname} at level @var{level} for socket @var{socket}. @@ -2515,7 +2635,7 @@ The @var{optname} doesn't make sense for the given @var{level}. @comment sys/socket.h @comment BSD -@deftypefun int setsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, size_t @var{optlen}) +@deftypefun int setsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, socklen_t @var{optlen}) This function is used to set the socket option @var{optname} at level @var{level} for socket @var{socket}. The value of the option is passed in the buffer @var{optval}, which has size @var{optlen}. diff --git a/manual/texinfo.tex b/manual/texinfo.tex index e1a23e5c1a..6909ef3ac6 100644 --- a/manual/texinfo.tex +++ b/manual/texinfo.tex @@ -1,5 +1,5 @@ %% TeX macros to handle Texinfo files. -%% $Id: texinfo.tex,v 2.196.2.1 1997/05/26 20:55:31 drepper Exp $ +%% $Id: texinfo.tex,v 2.196.2.2 1997/08/05 23:34:23 drepper Exp $ % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, % 94, 95, 96, 97 Free Software Foundation, Inc. @@ -36,7 +36,7 @@ % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 2.196.2.1 $ +\deftexinfoversion$Revision: 2.196.2.2 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number @@ -101,6 +101,7 @@ \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} +\hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. \newdimen \bindingoffset @@ -185,7 +186,13 @@ % \unvbox\headlinebox \pagebody{#1}% - \unvbox\footlinebox + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. + % (We lessened \vsize for it in \oddfootingxxx.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 2\baselineskip + \unvbox\footlinebox + \fi % \ifcropmarks \egroup % end of \vbox\bgroup @@ -729,10 +736,11 @@ where each line of input produces a line of output.} % \def\ignore{\doignore{ignore}} -% Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text. +% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} +\def\ifnottex{\doignore{ifnottex}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} @@ -759,6 +767,10 @@ where each line of input produces a line of output.} % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode32 = 10 % + % Ignore braces, too, so mismatched braces don't cause trouble. + \catcode`\{ = 9 + \catcode`\} = 9 + % % And now expand that command. \doignoretext } @@ -850,7 +862,7 @@ where each line of input produces a line of output.} \pretolerance = 10000 % % Do not execute instructions in @tex - \def\tex{\doignore{tex}} + \def\tex{\doignore{tex}}% } % @set VAR sets the variable VAR to an empty value. @@ -926,11 +938,16 @@ where each line of input produces a line of output.} \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} -% @iftex always succeeds; we read the text following, through @end -% iftex). But `@end iftex' should be valid only after an @iftex. +% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text +% following, through the first @end iftex (etc.). Make `@end iftex' +% (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} +\def\ifnothtml{\conditionalsucceed{ifnothtml}} +\def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \defineunmatchedend{iftex} +\defineunmatchedend{ifnothtml} +\defineunmatchedend{ifnotinfo} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no @@ -1006,6 +1023,15 @@ where each line of input produces a line of output.} \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + % Just to be on the safe side, close the input stream before the \input. + \openin 1 texinfo.cnf + \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi + \closein1 + \temp + % \comment % Ignore the actual filename. } @@ -1041,8 +1067,9 @@ where each line of input produces a line of output.} % We don't need math for this one. \def\ttsl{\tenttsl} -%% Try out Computer Modern fonts at \magstephalf -\let\mainmagstep=\magstephalf +% Use Computer Modern fonts at \magstephalf (11pt). +\newcount\mainmagstep +\mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). @@ -1114,13 +1141,26 @@ where each line of input produces a line of output.} \font\indi=cmmi9 \font\indsy=cmsy9 +% Fonts for title page: +\setfont\titlerm\rmbshape{12}{\magstep3} +\setfont\titleit\itbshape{10}{\magstep4} +\setfont\titlesl\slbshape{10}{\magstep4} +\setfont\titlett\ttbshape{12}{\magstep3} +\setfont\titlettsl\ttslshape{10}{\magstep4} +\setfont\titlesf\sfbshape{17}{\magstep1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\authorrm{\secrm} + % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} -\setfont\chapsf\sfbshape{12}{\magstep2} +\setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 @@ -1157,19 +1197,15 @@ where each line of input produces a line of output.} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} -\setfont\ssecttsl\ttslshape{10}{\magstep1} +\setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf -\font\ssecsy=cmsy10 scaled \magstep1 +\font\ssecsy=cmsy10 scaled 1315 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. -% Fonts for title page: -\setfont\titlerm\rmbshape{12}{\magstep3} -\let\authorrm = \secrm - % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we @@ -1194,6 +1230,13 @@ where each line of input produces a line of output.} \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts} +\def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \resetmathfonts \setleading{25pt}} +\def\titlefont#1{{\titlefonts #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc @@ -1330,18 +1373,56 @@ where each line of input produces a line of output.} % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. -% + +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\def\kbdinputstyle{\parsearg\kbdinputstylexxx} +\def\kbdinputstylexxx#1{% + \def\arg{#1}% + \ifx\arg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\arg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\arg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is kbdinputdistinct. (Too much of a hassle to call the macro, +% the catcodes are wrong for parsearg to work.) +\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} + \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\ttsl\look}}\fi -\else{\tclose{\ttsl\look}}\fi} +\else{\tclose{\kbdfont\look}}\fi +\else{\tclose{\kbdfont\look}}\fi} + +% @url. Quotes do not seem necessary, so use \code. +\let\url=\code + +% @uref (abbreviation for `urlref') takes an optional second argument +% specifying the text to display. First (mandatory) arg is the url. +% Perhaps eventually put in a hypertex \special here. +% +\def\uref#1{\urefxxx #1,,\finish} +\def\urefxxx#1,#2,#3\finish{% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \unhbox0\ (\code{#1})% + \else + \code{#1}% + \fi +} -% @url, @email. Quotes do not seem necessary. -\let\url=\code % perhaps include a hypertex \special eventually % rms does not like the angle brackets --karl, 17may97. +% So now @email is just like @uref. %\def\email#1{$\langle${\tt #1}$\rangle$} -\let\email=\code +\let\email=\uref % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and @@ -1378,8 +1459,6 @@ where each line of input produces a line of output.} \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. -\def\titlefont#1{{\titlerm #1}} - \newif\ifseenauthor \newif\iffinishedtitlepage @@ -1401,7 +1480,7 @@ where each line of input produces a line of output.} % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% - \def\titlezzz##1{\leftline{\titlefont{##1}} + \def\titlezzz##1{\leftline{\titlefonts\rm ##1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% @@ -1490,10 +1569,7 @@ where each line of input produces a line of output.} \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} -\gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish} -\gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{% -\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}} -\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} +\gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% @@ -1501,12 +1577,15 @@ where each line of input produces a line of output.} \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% -\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. + \global\advance\pageheight by -\baselineskip + \global\advance\vsize by -\baselineskip +} -\gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish} -\gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{% -\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}} -\global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} +\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} % }% unbind the catcode of @. @@ -1890,7 +1969,7 @@ July\or August\or September\or October\or November\or December\fi \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% -\ifhmode \errmessage{\in hmode at itemizeitem}\fi +\ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% @@ -2230,7 +2309,13 @@ width0pt\relax} \fi %\def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% -\def\copyright{\realbackslash copyright }% +\def\result{\realbackslash result}% +\def\equiv{\realbackslash equiv}% +\def\expansion{\realbackslash expansion}% +\def\print{\realbackslash print}% +\def\error{\realbackslash error}% +\def\point{\realbackslash point}% +\def\copyright{\realbackslash copyright}% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% \def\dotless##1{\realbackslash dotless {##1}}% @@ -2248,6 +2333,7 @@ width0pt\relax} \fi \def\kbd##1{\realbackslash kbd {##1}}% \def\dfn##1{\realbackslash dfn {##1}}% \def\emph##1{\realbackslash emph {##1}}% +\def\value##1{\realbackslash value {##1}}% \unsepspaces } @@ -2682,6 +2768,12 @@ width0pt\relax} \fi \def\print{\realbackslash print}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots}% + \def\result{\realbackslash result}% + \def\equiv{\realbackslash equiv}% + \def\expansion{\realbackslash expansion}% + \def\print{\realbackslash print}% + \def\error{\realbackslash error}% + \def\point{\realbackslash point}% \def\copyright{\realbackslash copyright}% \def\tt{\realbackslash tt}% \def\bf{\realbackslash bf}% @@ -3208,7 +3300,9 @@ width0pt\relax} \fi \unnumbchapmacro{#1}\def\thischapter{}% \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 - \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi + % We can't do this, because then an actual ^ in a section + % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. + %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. } @@ -3563,11 +3657,12 @@ width0pt\relax} \fi % \def\nonfillfinish{\afterenvbreak\endgroup}% -% This macro is \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt + % Make @kbd do something special, if requested. + \let\kbdfont\kbdexamplefont \rawbackslash % have \ input char produce \ char from current font \gobble } @@ -3685,16 +3780,17 @@ width0pt\relax} \fi % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. -\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested % -\global\advance\parencount by 1 } +\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested + \global\advance\parencount by 1 +} % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. -% also in that case restore the outer-level definition of (. -\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi -\global\advance \parencount by -1 } + % also in that case restore the outer-level definition of (. + \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi + \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % @@ -3702,8 +3798,11 @@ width0pt\relax} \fi } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] -\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&} -\def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} +\def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } +\def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } +\def\ampnr{\&} +\def\lbrb{{\bf\char`\[}} +\def\rbrb{{\bf\char`\]}} % First, defname, which formats the header line itself. % #1 should be the function name. @@ -3880,7 +3979,7 @@ width0pt\relax} \fi \hyphenchar\tensl=0 #1% \hyphenchar\tensl=45 -\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi% +\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% @@ -3981,6 +4080,7 @@ width0pt\relax} \fi \def\defmacx #1 {\errmessage{@defmacx in invalid context}} \def\defspecx #1 {\errmessage{@defspecx in invalid context}} \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} +\def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} % @defmethod, and so on @@ -3996,6 +4096,16 @@ width0pt\relax} \fi \defunargs {#3}\endgroup % } +% @deftypemethod foo-class return-type foo-method args +% +\def\deftypemethod{% + \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} +% +% #1 is the class name, #2 the data type, #3 the method name, #4 the args. +\def\deftypemethodheader#1#2#3#4{% + \deftypefnheaderx{Method on #1}{#2}#3 #4\relax +} + % @defmethod == @defop Method \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} @@ -4288,29 +4398,27 @@ width0pt\relax} \fi % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other - \catcode`\=\other - \catcode`\=\other + \catcode`\^^A=\other + \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other - \catcode`\=\other + \catcode`\^^K=\other \catcode`\^^L=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode`\=\other - \catcode26=\other + \catcode`\^^N=\other + \catcode`\^^P=\other + \catcode`\^^Q=\other + \catcode`\^^R=\other + \catcode`\^^S=\other + \catcode`\^^T=\other + \catcode`\^^U=\other + \catcode`\^^V=\other + \catcode`\^^W=\other + \catcode`\^^X=\other + \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other @@ -4388,7 +4496,7 @@ width0pt\relax} \fi % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } -% @footnotestyle is meaningful for info output only.. +% @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment \let\ptexfootnote=\footnote @@ -4503,9 +4611,51 @@ width0pt\relax} \fi % \def\finalout{\overfullrule=0pt} +% @image. We use the macros from epsf.tex to support this. +% If epsf.tex is not installed and @image is used, we complain. +% +% Check for and read epsf.tex up front. If we read it only at @image +% time, we might be inside a group, and then its definitions would get +% undone and the next image would fail. +\openin 1 = xepsf.tex +\ifeof 1 \else + \closein 1 + \def\epsfannounce{\toks0 = }% do not bother showing banner + \input epsf.tex +\fi +% +\newif\ifwarnednoepsf +\newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://ftp.tug.org/tex/epsf.tex.} +% +% Only complain once about lack of epsf.tex. +\def\image#1{% + \ifx\epsfbox\undefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,\finish + \fi +} +% +% Arguments to @image: +% #1 is (mandatory) image filename; we tack on .eps extension. +% #2 is (optional) width, #3 is (optional) height. +% #4 is just the usual extra ignored arg for parsing this stuff. +\def\imagexxx#1,#2,#3,#4\finish{% + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% +} % End of control word definitions. + \message{and turning on texinfo input format.} \def\openindices{% diff --git a/math/math.h b/math/math.h index a2b98f8853..b3bd23a836 100644 --- a/math/math.h +++ b/math/math.h @@ -182,17 +182,25 @@ extern int matherr __P ((struct exception *)); #define M_SQRT2 _Mldbl(1.41421356237309504880) /* sqrt(2) */ #define M_SQRT1_2 _Mldbl(0.70710678118654752440) /* 1/sqrt(2) */ +#endif + /* Our constants might specify more precision than `double' can represent. Use `long double' constants in standard and GNU C, where they are - supported and the cast to `double'. */ + supported and the cast to `double'. + + If the constants are use in code which does not use prototypes, one + might get problems if a function takes a `double' argument and any + of the constants are provided as the argument. In this case, cast + the argument to `double'. + + Please note we define the macro even if the constants are not defined. + This helps us to use the macros in other places. */ #if __STDC__ - 0 || __GNUC__ - 0 #define _Mldbl(x) x##L #else /* Traditional C. */ #define _Mldbl(x) x #endif /* Standard or GNU C. */ -#endif - /* Get machine-dependent inline versions (if there are any). */ #if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \ diff --git a/md5-crypt/Makefile b/md5-crypt/Makefile index 6216ddb437..b52e1ef012 100644 --- a/md5-crypt/Makefile +++ b/md5-crypt/Makefile @@ -32,6 +32,11 @@ extra-libs-others := $(extra-libs) md5-routines := crypt-entry md5-crypt md5 libcrypt-routines := $(md5-routines) +libcrypt-map := libcrypt.map + +onlymd5-routines := onlymd5-entry md5-crypt md5 +distribute += onlymd5-entry.c +extra-objs := onlymd5-entry.o include ../Makeconfig @@ -41,6 +46,8 @@ ifeq ($(crypt-in-libc),yes) routines += $(libcrypt-routines) endif +$(objpfx)md5test: $(objpfx)md5.o + include ../Rules ifeq ($(build-shared),yes) @@ -60,7 +67,7 @@ endif define o-iterator-doit $(objpfx)$(patsubst %,$(libtype$o),md5crypt): \ - $(md5-routines:%=$(objpfx)%$o); $$(build-extra-lib) + $(onlymd5-routines:%=$(objpfx)%$o); $$(build-extra-lib) endef object-suffixes-left = $(object-suffixes) include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes)) @@ -69,3 +76,4 @@ include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes)) # This ensures they will load libc.so for needed symbols if loaded by # a statically-linked program that hasn't already loaded it. $(objpfx)libcrypt.so: $(common-objpfx)libc.so +$(objpfx)libmd5crypt.so: $(common-objpfx)libc.so diff --git a/md5-crypt/md5-crypt.c b/md5-crypt/md5-crypt.c index 308366c4dd..6dd6740671 100644 --- a/md5-crypt/md5-crypt.c +++ b/md5-crypt/md5-crypt.c @@ -1,22 +1,22 @@ -/* md5-crypt - One way encryption based on MD5 sum. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +/* One way encryption based on MD5 sum. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <errno.h> #include <stdlib.h> @@ -37,8 +37,11 @@ static const char b64t[64] = /* Prototypes for local functions. */ -extern char *md5_crypt_r __P ((const char *key, const char *salt, char *buffer, - int buflen)); +extern char *__md5_crypt_r __P ((const char *key, const char *salt, + char *buffer, int buflen)); +extern char *md5_crypt_r __P ((const char *key, const char *salt, + char *buffer, int buflen)); +extern char *__md5_crypt __P ((const char *key, const char *salt)); extern char *md5_crypt __P ((const char *key, const char *salt)); @@ -46,7 +49,7 @@ extern char *md5_crypt __P ((const char *key, const char *salt)); /* This entry point is equivalent to the `crypt' function in Unix libcs. */ char * -md5_crypt_r (key, salt, buffer, buflen) +__md5_crypt_r (key, salt, buffer, buflen) const char *key; const char *salt; char *buffer; @@ -155,10 +158,10 @@ md5_crypt_r (key, salt, buffer, buflen) /* Now we can construct the result string. It consists of three parts. */ - cp = stpncpy (buffer, md5_salt_prefix, MAX (0, buflen)); + cp = __stpncpy (buffer, md5_salt_prefix, MAX (0, buflen)); buflen -= sizeof (md5_salt_prefix); - cp = stpncpy (cp, salt, MIN ((size_t) buflen, salt_len)); + cp = __stpncpy (cp, salt, MIN ((size_t) buflen, salt_len)); buflen -= MIN ((size_t) buflen, salt_len); if (buflen > 0) @@ -201,10 +204,11 @@ md5_crypt_r (key, salt, buffer, buflen) return buffer; } +weak_alias (__md5_crypt_r, md5_crypt_r) char * -md5_crypt (key, salt) +__md5_crypt (key, salt) const char *key; const char *salt; { @@ -222,5 +226,6 @@ md5_crypt (key, salt) return NULL; } - return md5_crypt_r (key, salt, buffer, buflen); + return __md5_crypt_r (key, salt, buffer, buflen); } +weak_alias (__md5_crypt, md5_crypt) diff --git a/md5-crypt/onlymd5-entry.c b/md5-crypt/onlymd5-entry.c new file mode 100644 index 0000000000..d03fae9bd1 --- /dev/null +++ b/md5-crypt/onlymd5-entry.c @@ -0,0 +1 @@ +#include <sysdeps/generic/crypt-entry.c> diff --git a/misc/regexp.h b/misc/regexp.h index f31b1af1d0..04da70a534 100644 --- a/misc/regexp.h +++ b/misc/regexp.h @@ -38,9 +38,12 @@ for the here included function is weird (this really is a harmless word). - The user has to provide five macros before this header file can be + The user has to provide six macros before this header file can be included: + INIT Declarations vor variables which can be used by the + other macros. + GETC() Return the value of the next character in the regular expression pattern. Successive calls should return successive characters. @@ -98,9 +101,10 @@ compile (char *__instring, char *__expbuf, __const char *__endbuf, int __eof) { char *__input_buffer = NULL; size_t __input_size = 0; - size_t __current_size; + size_t __current_size = 0; int __ch; int __error; + INIT /* Align the expression buffer according to the needs for an object of type `regex_t'. Then check for minimum size of the buffer for @@ -191,7 +195,7 @@ compile (char *__instring, char *__expbuf, __const char *__endbuf, int __eof) } /* Everything is ok. */ - RETURN ((char *) (__expr_ptr->buffer + __expr->used)); + RETURN ((char *) (__expr_ptr->buffer + __expr_ptr->used)); } #endif diff --git a/misc/ttyslot.c b/misc/ttyslot.c index 794cada0af..430f9c02d0 100644 --- a/misc/ttyslot.c +++ b/misc/ttyslot.c @@ -59,7 +59,7 @@ ttyslot() setttyent(); for (cnt = 0; cnt < 3; ++cnt) - if (__ttyname_r (cnt, name, buflen) >= 0) { + if (__ttyname_r (cnt, name, buflen) == 0) { if (p = rindex(name, '/')) ++p; else diff --git a/nis/nss_compat/compat-grp.c b/nis/nss_compat/compat-grp.c index de96dbbeb6..91d3b56bb5 100644 --- a/nis/nss_compat/compat-grp.c +++ b/nis/nss_compat/compat-grp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996. @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include <errno.h> +#include <fcntl.h> #include <nss.h> #include <grp.h> #include <ctype.h> @@ -86,6 +87,26 @@ internal_setgrent (ent_t *ent) if (ent->stream == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl (fileno (ent->stream), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl (fileno (ent->stream), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + fclose (ent->stream); + ent->stream = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } else rewind (ent->stream); diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c index 56659e9ed5..a1475c9134 100644 --- a/nis/nss_compat/compat-pwd.c +++ b/nis/nss_compat/compat-pwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996. @@ -20,6 +20,7 @@ #include <nss.h> #include <pwd.h> #include <errno.h> +#include <fcntl.h> #include <ctype.h> #include <netdb.h> #include <string.h> @@ -202,6 +203,26 @@ internal_setpwent (ent_t *ent) if (ent->stream == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl (fileno (ent->stream), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl (fileno (ent->stream), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + fclose (ent->stream); + ent->stream = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } else rewind (ent->stream); diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c index 47dd22970a..6fc71101fe 100644 --- a/nis/nss_compat/compat-spwd.c +++ b/nis/nss_compat/compat-spwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996. @@ -19,6 +19,7 @@ #include <nss.h> #include <errno.h> +#include <fcntl.h> #include <ctype.h> #include <netdb.h> #include <shadow.h> @@ -147,6 +148,26 @@ internal_setspent (ent_t *ent) if (ent->stream == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl (fileno (ent->stream), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl (fileno (ent->stream), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + fclose (ent->stream); + ent->stream = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } else rewind (ent->stream); diff --git a/nss/digits_dots.c b/nss/digits_dots.c index c953fc6ec6..e1baafa843 100644 --- a/nss/digits_dots.c +++ b/nss/digits_dots.c @@ -159,7 +159,8 @@ } } - if (isxdigit (name[0]) || name[0] == ':') + if ((isxdigit (name[0]) && strchr (name, ':') != NULL) + || name[0] == ':') { const char *cp; char *hostname; @@ -238,8 +239,6 @@ { if (*--cp == '.') break; - if (!strchr (name, ':')) - break; /* All-IPv6-legal, no dot at the end. Fake up a hostent as if we'd actually done a lookup. */ diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index 371b2e36f5..988f46c88e 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -140,5 +140,5 @@ done: return status == NSS_STATUS_SUCCESS ? 0 : -1; } -#define do_weak_alias(n1, n2) weak_alias ((n1), (n2)) +#define do_weak_alias(n1, n2) weak_alias (n1, (n2)) do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME) diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c index 1596be560a..22a24aae5b 100644 --- a/nss/nss_db/db-XXX.c +++ b/nss/nss_db/db-XXX.c @@ -1,5 +1,5 @@ /* Common code for DB-based databases in nss_db module. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 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 @@ -66,7 +66,27 @@ internal_setent (int stayopen) db = dbopen (DBFILE, O_RDONLY, 0, DB_BTREE, NULL); if (db == NULL) - status = NSS_STATUS_UNAVAIL; + status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl ((*db->fd) (db), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl ((*db->fd) (db), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + (*db->close) (db); + db = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } /* Remember STAYOPEN flag. */ diff --git a/nss/nss_db/db-alias.c b/nss/nss_db/db-alias.c index 2c44f4df79..349ce9cfb2 100644 --- a/nss/nss_db/db-alias.c +++ b/nss/nss_db/db-alias.c @@ -1,5 +1,5 @@ /* Mail alias file parser in nss_db module. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -50,7 +50,27 @@ internal_setent (int stayopen) db = dbopen (_PATH_VARDB "aliases.db", O_RDONLY, 0, DB_BTREE, NULL); if (db == NULL) - status = NSS_STATUS_UNAVAIL; + status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl ((*db->fd) (db), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl ((*db->fd) (db), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + (*db->close) (db); + db = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } /* Remember STAYOPEN flag. */ diff --git a/nss/nss_db/db-netgrp.c b/nss/nss_db/db-netgrp.c index b7c172ddb0..985b844572 100644 --- a/nss/nss_db/db-netgrp.c +++ b/nss/nss_db/db-netgrp.c @@ -53,6 +53,26 @@ _nss_db_setnetgrent (const char *group) if (db == NULL) status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl ((*db->fd) (db), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl ((*db->fd) (db), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + (*db->close) (db); + db = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } if (status == NSS_STATUS_SUCCESS) diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c index 7472496a10..ac6b5fa94a 100644 --- a/nss/nss_files/files-XXX.c +++ b/nss/nss_files/files-XXX.c @@ -19,6 +19,7 @@ #include <stdio.h> #include <ctype.h> +#include <fcntl.h> #include <assert.h> #include <errno.h> #include <libc-lock.h> @@ -71,7 +72,27 @@ internal_setent (int stayopen) stream = fopen (DATAFILE, "r"); if (stream == NULL) - status = NSS_STATUS_UNAVAIL; + status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl (fileno (stream), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl (fileno (stream), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + fclose (stream); + stream = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } else rewind (stream); diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c index 341e9d4d68..aca89ed73c 100644 --- a/nss/nss_files/files-alias.c +++ b/nss/nss_files/files-alias.c @@ -1,5 +1,5 @@ /* Mail alias file parser in nss_files module. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -21,6 +21,7 @@ #include <aliases.h> #include <ctype.h> #include <errno.h> +#include <fcntl.h> #include <libc-lock.h> #include <stdlib.h> #include <stdio.h> @@ -48,7 +49,27 @@ internal_setent (void) stream = fopen ("/etc/aliases", "r"); if (stream == NULL) - status = NSS_STATUS_UNAVAIL; + status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL; + else + { + /* We have to make sure the file is `closed on exec'. */ + int result, flags; + + result = flags = fcntl (fileno (stream), F_GETFD, 0); + if (result >= 0) + { + flags |= FD_CLOEXEC; + result = fcntl (fileno (stream), F_SETFD, flags); + } + if (result < 0) + { + /* Something went wrong. Close the stream and return a + failure. */ + fclose (stream); + stream = NULL; + status = NSS_STATUS_UNAVAIL; + } + } } else rewind (stream); diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c index d6dd6daea7..d6c4152507 100644 --- a/nss/nss_files/files-hosts.c +++ b/nss/nss_files/files-hosts.c @@ -26,7 +26,6 @@ /* Get implementation for some internal functions. */ #include "../resolv/mapv4v6addr.h" -#include "../resolv/mapv4v6hostent.h" #define ENTNAME hostent @@ -51,13 +50,7 @@ LINE_PARSER STRING_FIELD (addr, isspace, 1); /* Parse address. */ - if ((_res.options & RES_USE_INET6) - && inet_pton (AF_INET6, addr, entdata->host_addr) > 0) - { - result->h_addrtype = AF_INET6; - result->h_length = IN6ADDRSZ; - } - else if (inet_pton (AF_INET, addr, entdata->host_addr) > 0) + if (inet_pton (AF_INET, addr, entdata->host_addr) > 0) { if (_res.options & RES_USE_INET6) { @@ -72,6 +65,11 @@ LINE_PARSER result->h_length = INADDRSZ; } } + else if (inet_pton (AF_INET6, addr, entdata->host_addr) > 0) + { + result->h_addrtype = AF_INET6; + result->h_length = IN6ADDRSZ; + } else /* Illegal address: ignore line. */ return 0; @@ -81,22 +79,18 @@ LINE_PARSER entdata->h_addr_ptrs[1] = NULL; result->h_addr_list = entdata->h_addr_ptrs; - /* If we need the host entry in IPv6 form change it now. */ - if (_res.options & RES_USE_INET6) - { - char *bufptr = data->linebuffer; - int buflen = (char *) data + datalen - bufptr; - map_v4v6_hostent (result, &bufptr, &buflen); - } - STRING_FIELD (result->h_name, isspace, 1); }) #include "files-XXX.c" DB_LOOKUP (hostbyname, ,, - LOOKUP_NAME (h_name, h_aliases), - const char *name) + { + if (result->h_addrtype != ((_res.options & RES_USE_INET6) + ? AF_INET6 : AF_INET)) + continue; + LOOKUP_NAME (h_name, h_aliases) + }, const char *name) DB_LOOKUP (hostbyname2, ,, { diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c index d9dbf94a19..7552d4c3b1 100644 --- a/nss/nss_files/files-netgrp.c +++ b/nss/nss_files/files-netgrp.c @@ -1,5 +1,5 @@ /* Netgroup file parser in nss_files modules. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -170,8 +170,7 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result, /* Some sanity checks. */ if (cp == NULL) - /* User bug. setnetgrent() wasn't called before. */ - abort (); + return NSS_STATUS_NOTFOUND; /* First skip leading spaces. */ while (isspace (*cp)) diff --git a/po/ko.po b/po/ko.po index 6ff671cbb0..5e17d9ffd3 100644 --- a/po/ko.po +++ b/po/ko.po @@ -1,13 +1,13 @@ # GNU libcÀÇ Çѱ¹¾î ¸Þ½ÃÁö -# Copyright (C) 1996 Free Software Foundation, Inc. -# Bang Jun-Young <bangjy@nownuri.nowcom.co.kr>, 1996. +# Copyright (C) 1996, 97 Free Software Foundation, Inc. +# Bang Jun-Young <bangjy@nownuri.net>, 1996-97. # msgid "" msgstr "" -"Project-Id-Version: GNU libc 1.98\n" -"POT-Creation-Date: 1996-12-03 13:50+0100\n" -"PO-Revision-Date: 1996-12-15 14:17+0900\n" -"Last-Translator: Bang Jun-Young <bangjy@nownuri.nowcom.co.kr>\n" +"Project-Id-Version: GNU libc 2.0.3\n" +"POT-Creation-Date: 1997-03-30 19:08+0200\n" +"PO-Revision-Date: 1997-06-05 18:33+0900\n" +"Last-Translator: Bang Jun-Young <bangjy@nownuri.net>\n" "Language-Team: Korean <ko@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=EUC-KR\n" @@ -33,31 +33,31 @@ msgstr " rpcinfo [ -n Æ÷Æ®¹øÈ£ ] -t È£½ºÆ® ÇÁ·Î±×·¥¹øÈ£ [ ¹öÀü¹øÈ£ ]\n" msgid " program vers proto port\n" msgstr " ÇÁ·Î±×·¥ ¹öÀü ¿øÇü Æ÷Æ®\n" -#: time/zic.c:424 +#: time/zic.c:419 #, c-format msgid " (rule from \"%s\", line %d)" -msgstr " (\"%s\"¿¡ ÀÖ´Â ±ÔÄ¢, %d Çà)" +msgstr " (\"%s\"¿¡ ÀÖ´Â ±ÔÄ¢, Çà %d)" -#: locale/programs/ld-collate.c:360 locale/programs/ld-ctype.c:1234 +#: locale/programs/ld-collate.c:363 locale/programs/ld-ctype.c:1242 msgid " done\n" msgstr " ¿Ï·á\n" -#: time/zic.c:421 +#: time/zic.c:416 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", Çà %d: %s" -#: time/zic.c:945 +#: time/zic.c:943 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" -msgstr "\"Áö¿ª %s\" Çà°ú -l ¿É¼ÇÀº ¼·Î ¹èŸÀûÀÔ´Ï´Ù" +msgstr "\"Áö¿ª %s\" Çà°ú -l ¿É¼ÇÀº »óÈ£ ¹èŸÀûÀÔ´Ï´Ù" -#: time/zic.c:953 +#: time/zic.c:951 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" -msgstr "\"Áö¿ª %s\" Çà°ú -p ¿É¼ÇÀº ¼·Î ¹èŸÀûÀÔ´Ï´Ù" +msgstr "\"Áö¿ª %s\" Çà°ú -p ¿É¼ÇÀº »óÈ£ ¹èŸÀûÀÔ´Ï´Ù" -#: time/zic.c:758 +#: time/zic.c:754 #, c-format msgid "%s in ruleless zone" msgstr "±ÔÄ¢¾ø´Â Áö¿ª¿¡ %s°¡ ÀÖÀ½" @@ -77,7 +77,7 @@ msgstr "%s%s%s:%u: %s%s¿¹±âÄ¡ ¸øÇÑ ¿À·ù: %s.\n" msgid "%s%sUnknown signal %d\n" msgstr "%s%s¾Ë ¼ö ¾ø´Â ½ÅÈ£ %d\n" -#: time/zic.c:2139 +#: time/zic.c:2172 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d´Â ºÎÈ£ È®ÀåÀÌ Á¦´ë·Î µÇÁö ¾Ê¾Ò½À´Ï´Ù\n" @@ -87,137 +87,142 @@ msgstr "%s: %d´Â ºÎÈ£ È®ÀåÀÌ Á¦´ë·Î µÇÁö ¾Ê¾Ò½À´Ï´Ù\n" msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n" msgstr "%s: <mb_cur_max>´Â <mb_cur_min>º¸´Ù Ä¿¾ß ÇÕ´Ï´Ù\n" -#: time/zic.c:1430 +#: time/zic.c:1443 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: %s¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù: %s\n" -#: time/zic.c:2118 +#: time/zic.c:2150 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: %s µð·ºÅ丮¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù: %s\n" -#: time/zic.c:612 +#: time/zic.c:608 #, c-format msgid "%s: Can't link from %s to %s: %s\n" -msgstr "%s: %s¸¦ %s·Î ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù: %s\n" +msgstr "%s: %s¸¦ %s·Î ¸µÅ©ÇÒ ¼ö ¾ø½À´Ï´Ù: %s\n" -#: time/zic.c:783 +#: time/zic.c:780 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: %s¸¦ ¿ ¼ö ¾ø½À´Ï´Ù: %s\n" -#: time/zic.c:851 +#: time/zic.c:1433 +#, c-format +msgid "%s: Can't remove %s: %s\n" +msgstr "%s: %s¸¦ Áö¿ï ¼ö ¾ø½À´Ï´Ù: %s\n" + +#: time/zic.c:849 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: %s¸¦ ´Ý´Â µµÁß ¿À·ù ¹ß»ý: %s\n" -#: time/zic.c:845 +#: time/zic.c:842 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: %s¸¦ Àд µµÁß ¿À·ù ¹ß»ý\n" -#: time/zic.c:1494 +#: time/zic.c:1507 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: %s¸¦ ¾²´Â µµÁß ¿À·ù ¹ß»ý\n" -#: time/zdump.c:258 +#: time/zdump.c:266 #, c-format msgid "%s: Error writing standard output " msgstr "%s: Ç¥ÁØ Ãâ·Â¿¡ ¾²´Â µµÁß ¿À·ù ¹ß»ý " -#: time/zic.c:830 +#: time/zic.c:827 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "" -#: time/zic.c:362 +#: time/zic.c:357 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: ¸Þ¸ð¸®°¡ ¹Ù´Ú³²: %s\n" -#: time/zic.c:527 +#: time/zic.c:522 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -L ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: time/zic.c:487 +#: time/zic.c:482 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -d ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: time/zic.c:497 +#: time/zic.c:492 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -l ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: time/zic.c:507 +#: time/zic.c:502 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -p ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: time/zic.c:517 +#: time/zic.c:512 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -y ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: time/zic.c:1845 +#: time/zic.c:1872 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: ¸í·ÉÀº '%s'¿´°í, °á°ú´Â %d¿´½À´Ï´Ù\n" -#: locale/programs/charmap.c:593 locale/programs/locfile.c:878 +#: locale/programs/charmap.c:593 locale/programs/locfile.c:900 #, c-format msgid "%s: error in state machine" -msgstr "%s: ½ºÅ×ÀÌÆ® ±â°è¿¡ ¿À·ù ¹ß»ý" +msgstr "%s: »óÅ ±â°è¿¡ ¿À·ù ¹ß»ý" -#: posix/getopt.c:687 +#: posix/getopt.c:783 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: À߸øµÈ ¿É¼Ç -- %c\n" -#: posix/getopt.c:690 +#: posix/getopt.c:786 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ºÎÀûÀýÇÑ ¿É¼Ç -- %c\n" -#: posix/getopt.c:611 +#: posix/getopt.c:707 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: `%c%s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n" -#: posix/getopt.c:582 +#: posix/getopt.c:678 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: `%s'´Â ¸ðÈ£ÇÑ ¿É¼ÇÀÔ´Ï´Ù\n" -#: posix/getopt.c:628 posix/getopt.c:801 +#: posix/getopt.c:724 posix/getopt.c:897 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: `%s' ¿É¼ÇÀº Àμö°¡ ÇÊ¿äÇÕ´Ï´Ù\n" -#: posix/getopt.c:606 +#: posix/getopt.c:702 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: `--%s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n" -#: posix/getopt.c:786 +#: posix/getopt.c:881 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: `-W %s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n" -#: posix/getopt.c:767 +#: posix/getopt.c:863 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: `-W %s'´Â ¸ðÈ£ÇÑ ¿É¼ÇÀÔ´Ï´Ù\n" -#: posix/getopt.c:721 posix/getopt.c:850 +#: posix/getopt.c:816 posix/getopt.c:946 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: ÀÌ ¿É¼ÇÀº Àμö°¡ ÇÊ¿äÇÕ´Ï´Ù -- %c\n" -#: time/zic.c:837 time/zic.c:1248 time/zic.c:1268 +#: time/zic.c:834 time/zic.c:1246 time/zic.c:1266 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: panic: ºÎÀûÀýÇÑ ÁÂÇ×°ª %d\n" @@ -227,17 +232,17 @@ msgstr "%s: panic: ºÎÀûÀýÇÑ ÁÂÇ×°ª %d\n" msgid "%s: premature end of file" msgstr "%s: ÆÄÀÏÀÌ ¿Ï°áµÇÁö ¾ÊÀº ä ³¡³²" -#: posix/getopt.c:661 +#: posix/getopt.c:757 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ÀνÄÇÒ ¼ö ¾ø´Â ¿É¼Ç `%c%s'\n" -#: posix/getopt.c:657 +#: posix/getopt.c:753 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ÀνÄÇÒ ¼ö ¾ø´Â ¿É¼Ç `--%s'\n" -#: time/zic.c:446 +#: time/zic.c:441 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d " @@ -246,12 +251,12 @@ msgid "" msgstr "" "%s: »ç¿ë¹ýÀº %s [ -s ] [ -v ] [ -l Áö¿ª½Ã°¢ ] [ -p Æ÷½Ä½º±ÔÄ¢ ] [ -d " "µð·ºÅ丮 ]\n" -"\t[ -L À±ÃÊ ] [ -y yearistype ] [ ÆÄÀÏÀ̸§ ... ]\n" +"\t[ -L À±ÃÊ ] [ -y ¿¬µµÀÇÇüÅ ] [ ÆÄÀÏÀ̸§ ... ] ÀÔ´Ï´Ù\n" -#: time/zdump.c:165 +#: time/zdump.c:174 #, c-format msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" -msgstr "%s: »ç¿ë¹ýÀº %s [ -v ] [ -c cutoff ] Áö¿ª¸í ... ÀÔ´Ï´Ù\n" +msgstr "%s: »ç¿ë¹ýÀº %s [ -v ] [ -c Àý´Ü ] Áö¿ª¸í ... ÀÔ´Ï´Ù\n" #: sunrpc/clnt_perr.c:125 #, c-format @@ -262,7 +267,7 @@ msgstr "(¾Ë ¼ö ¾ø´Â ÀÎÁõ ¿À·ù - %d)" msgid "(unknown)" msgstr "(¾Ë ¼ö ¾øÀ½)" -#: catgets/gencat.c:253 +#: catgets/gencat.c:254 msgid "*standard input*" msgstr "*Ç¥ÁØ ÀÔ·Â*" @@ -270,19 +275,19 @@ msgstr "*Ç¥ÁØ ÀÔ·Â*" msgid ".lib section in a.out corrupted" msgstr "a.outÀÇ .lib ÀýÀÌ ¼Õ»óµÇ¾úÀ½" -#: inet/rcmd.c:358 +#: inet/rcmd.c:363 msgid ".rhosts fstat failed" msgstr ".rhosts fstat ½ÇÆÐ" -#: inet/rcmd.c:354 +#: inet/rcmd.c:359 msgid ".rhosts lstat failed" msgstr ".rhosts lstat ½ÇÆÐ" -#: inet/rcmd.c:356 +#: inet/rcmd.c:361 msgid ".rhosts not regular file" msgstr ".rhosts´Â ÀÏ¹Ý ÆÄÀÏÀÌ ¾Æ´Ô" -#: inet/rcmd.c:362 +#: inet/rcmd.c:367 msgid ".rhosts writeable by other than owner" msgstr ".rhosts´Â ¼ÒÀ¯ÀÚ°¡ ¾Æ´Ñ »ç¶÷ÀÌ º¯°æÇÒ ¼ö ÀÖÀ½" @@ -295,12 +300,12 @@ msgstr "; ³·Àº ¹öÀü = %lu, ³ôÀº ¹öÀü = %lu" msgid "; why = " msgstr "; ÀÌÀ¯ = " -#: locale/programs/ld-ctype.c:326 +#: locale/programs/ld-ctype.c:331 #, c-format msgid "<SP> character must not be in class `%s'" msgstr "<SP> ¹®ÀÚ´Â `%s' Ŭ·¡½º¿¡ ÀÖÀ¸¸é ¾ÈµË´Ï´Ù" -#: locale/programs/ld-ctype.c:317 +#: locale/programs/ld-ctype.c:321 #, c-format msgid "<SP> character not in class `%s'" msgstr "<SP> ¹®ÀÚ´Â `%s' Ŭ·¡½º¿¡ ¾øÀ½" @@ -312,6 +317,10 @@ msgstr "<SP> ¹®ÀÚ´Â `%s' Ŭ·¡½º¿¡ ¾øÀ½" msgid "?" msgstr "?" +#: sysdeps/unix/sysv/linux/siglist.h:27 +msgid "Aborted" +msgstr "ÁßÁöµÊ" + #: stdio-common/../sysdeps/gnu/errlist.c:762 msgid "Accessing a corrupted shared library" msgstr "¼Õ»óµÈ °øÀ¯ ¶óÀ̺귯¸®¿¡ Á¢±ÙÇÔ" @@ -331,6 +340,8 @@ msgstr "ÁÖ¼Ò±ºÀÌ ±Ô¾à¿¡¼ Áö¿øµÇÁö ¾ÊÀ½" msgid "Advertise error" msgstr "" +#: stdio-common/../sysdeps/unix/siglist.c:43 +#: sysdeps/unix/sysv/linux/siglist.h:33 msgid "Alarm clock" msgstr "ÀÚ¸íÁ¾ ½Ã°è" @@ -348,7 +359,7 @@ msgstr "" #: sunrpc/clnt_perr.c:276 msgid "Authentication OK" -msgstr "ÀÎÁõ ½ÂÀεÊ" +msgstr "ÀÎÁõ ¼º°ø" #. TRANS ??? #: stdio-common/../sysdeps/gnu/errlist.c:549 @@ -376,14 +387,19 @@ msgstr "À߸øµÈ ÆùÆ® ÆÄÀÏ Çü½Ä" msgid "Bad message" msgstr "À߸øµÈ ¸Þ½ÃÁö" +#: stdio-common/../sysdeps/unix/siglist.c:41 +#: sysdeps/unix/sysv/linux/siglist.h:56 +msgid "Bad system call" +msgstr "À߸øµÈ ½Ã½ºÅÛ È£Ãâ" + #. TRANS A file that isn't a block special file was given in a situation that #. TRANS requires one. For example, trying to mount an ordinary file as a file #. TRANS system in Unix gives this error. #: stdio-common/../sysdeps/gnu/errlist.c:109 msgid "Block device required" -msgstr "ºí·Ï ÀåÄ¡°¡ ÇÊ¿äÇÔ" +msgstr "ºí·° ÀåÄ¡°¡ ÇÊ¿äÇÔ" -#: sunrpc/pmap_rmt.c:337 +#: sunrpc/pmap_rmt.c:338 msgid "Broadcast select problem" msgstr "ºê·Îµåij½ºÆ® ¼±Åà ¹®Á¦" @@ -393,12 +409,17 @@ msgstr "ºê·Îµåij½ºÆ® ¼±Åà ¹®Á¦" #. TRANS or blocked. Thus, your program will never actually see @code{EPIPE} #. TRANS unless it has handled or blocked @code{SIGPIPE}. #: stdio-common/../sysdeps/gnu/errlist.c:222 +#: stdio-common/../sysdeps/unix/siglist.c:42 +#: sysdeps/unix/sysv/linux/siglist.h:32 msgid "Broken pipe" -msgstr "±ú¾îÁø ÆÄÀÌÇÁ" +msgstr "ÆÄÀÌÇÁ°¡ ±ú¾îÁü" +#: stdio-common/../sysdeps/unix/siglist.c:39 +#: sysdeps/unix/sysv/linux/siglist.h:30 msgid "Bus error" msgstr "¹ö½º ¿À·ù" +#: sysdeps/unix/sysv/linux/siglist.h:43 msgid "CPU time limit exceeded" msgstr "CPU ½Ã°£ Á¦ÇÑ ÃÊ°úÇÔ" @@ -406,19 +427,19 @@ msgstr "CPU ½Ã°£ Á¦ÇÑ ÃÊ°úÇÔ" msgid "Can not access a needed shared library" msgstr "ÇÊ¿äÇÑ °øÀ¯ ¶óÀ̺귯¸®¿¡ Á¢±ÙÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:637 +#: nis/ypclnt.c:695 msgid "Can't bind to server which serves this domain" msgstr "ÀÌ µµ¸ÞÀÎÀ» Á¦°øÇÏ´Â ¼¹ö¿¡ ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:649 +#: nis/ypclnt.c:707 msgid "Can't communicate with portmapper" msgstr "rpcinfo: Æ÷Æ®¸ÅÆÛ¿Í Åë½ÅÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:651 +#: nis/ypclnt.c:709 msgid "Can't communicate with ypbind" msgstr "ypbind¿Í Åë½ÅÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:653 +#: nis/ypclnt.c:711 msgid "Can't communicate with ypserv" msgstr "ypserv¿Í Åë½ÅÇÒ ¼ö ¾ø½À´Ï´Ù" @@ -443,7 +464,7 @@ msgstr "ºê·Îµåij½ºÆ® rpc¸¦ À§ÇÑ ¼ÒÄÏÀ» ¸¸µé ¼ö ¾ø½À´Ï´Ù" msgid "Cannot exec a shared library directly" msgstr "°øÀ¯ ¶óÀ̺귯¸®¸¦ Á÷Á¢ ½ÇÇàÇÒ ¼ö ¾ø½À´Ï´Ù" -#: sunrpc/pmap_rmt.c:349 +#: sunrpc/pmap_rmt.c:350 msgid "Cannot receive reply to broadcast" msgstr "ºê·Îµåij½ºÆ®¿¡ ´ëÇÑ ÀÀ´äÀ» ¹ÞÀ» ¼ö ¾ø½À´Ï´Ù" @@ -468,6 +489,8 @@ msgstr "¼ÒÄÏ ¿É¼Ç SO_BROADCAST¸¦ ¼³Á¤ÇÒ ¼ö ¾ø½À´Ï´Ù" msgid "Channel number out of range" msgstr "¹üÀ§¸¦ ¹þ¾î³ ä³Î ¹øÈ£" +#: stdio-common/../sysdeps/unix/siglist.c:49 +#: sysdeps/unix/sysv/linux/siglist.h:39 msgid "Child exited" msgstr "ÀÚ½ÄÀÌ Á¾·áµÊ" @@ -484,11 +507,11 @@ msgstr "Àü¼Û Áß Åë½Å ¿À·ù" msgid "Computer bought the farm" msgstr "ÄÄÇ»ÅÍ°¡ ³óÀåÀ» »ò½À´Ï´Ù" -#: locale/programs/ld-ctype.c:1197 +#: locale/programs/ld-ctype.c:1204 msgid "Computing table size for character classes might take a while..." msgstr "¹®ÀÚ Å¬·¡½ºÀÇ Ç¥ Å©±â °è»êÀº ½Ã°£ÀÌ ¾à°£ °É¸± ¼ö ÀÖ½À´Ï´Ù..." -#: locale/programs/ld-collate.c:327 +#: locale/programs/ld-collate.c:329 msgid "Computing table size for collation information might take a while..." msgstr "Á¶»ç Á¤º¸ÀÇ Ç¥ Å©±â °è»êÀº ½Ã°£ÀÌ ¾à°£ °É¸± ¼ö ÀÖ½À´Ï´Ù... " @@ -511,11 +534,13 @@ msgstr "" msgid "Connection timed out" msgstr "¿¬°á ½Ã°£ ÃÊ°ú" +#: stdio-common/../sysdeps/unix/siglist.c:48 +#: sysdeps/unix/sysv/linux/siglist.h:38 msgid "Continued" msgstr "°è¼ÓµÊ" #: catgets/gencat.c:169 db/makedb.c:120 locale/programs/locale.c:187 -#: locale/programs/localedef.c:177 +#: locale/programs/localedef.c:180 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -523,7 +548,12 @@ msgid "" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" msgstr "" -#: nis/ypclnt.c:663 +#: stdio-common/../sysdeps/unix/siglist.c:53 +#, fuzzy +msgid "Cputime limit exceeded" +msgstr "CPU ½Ã°£ Á¦ÇÑ ÃÊ°úÇÔ" + +#: nis/ypclnt.c:721 msgid "Database is busy" msgstr "µ¥ÀÌÅͺ£À̽º°¡ ÀÛ¾÷ ÁßÀÔ´Ï´Ù" @@ -565,10 +595,15 @@ msgstr "µð·ºÅ丮°¡ ºñ¾îÀÖÁö ¾ÊÀ½" msgid "Disc quota exceeded" msgstr "µð½ºÅ© ÇÒ´ç·®ÀÌ ÃÊ°úµÊ" -#: nis/ypclnt.c:709 +#: nis/ypclnt.c:767 msgid "Domain not bound" msgstr "µµ¸ÞÀÎÀÌ ¹Ù¿îµåµÇÁö ¾ÊÀ½" +#: stdio-common/../sysdeps/unix/siglist.c:36 +#: sysdeps/unix/sysv/linux/siglist.h:53 +msgid "EMT trap" +msgstr "EMT Æ®·¦" + #: sunrpc/clnt_perr.c:254 #, c-format msgid "Error %d" @@ -592,7 +627,7 @@ msgstr "±³È¯ÀÌ °¡µæÂü" msgid "Exec format error" msgstr "Exec Çü½Ä ¿À·ù" -#: locale/programs/localedef.c:213 +#: locale/programs/localedef.c:216 msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'" msgstr "Áß¿ä: ½Ã½ºÅÛ¿¡ `_POSIX2_LOCALEDEF'°¡ Á¤ÀǵǾî ÀÖÁö ¾Ê½À´Ï´Ù" @@ -612,7 +647,7 @@ msgstr "ÆÄÀÏÀÌ Á¸ÀçÇÕ´Ï´Ù" #: stdio-common/../sysdeps/gnu/errlist.c:714 msgid "File locking deadlock error" -msgstr "" +msgstr "ÆÄÀÏ Àá±Ý ±³Âø»óÅ ¿À·ù" #. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for #. TRANS Files}) or host name too long (in @code{gethostname} or @@ -621,6 +656,7 @@ msgstr "" msgid "File name too long" msgstr "ÆÄÀÏ À̸§ÀÌ ³Ê¹« ±é´Ï´Ù" +#: sysdeps/unix/sysv/linux/siglist.h:44 msgid "File size limit exceeded" msgstr "ÆÄÀÏ Å©±â Á¦ÇÑÀ» ÃÊ°úÇÔ" @@ -629,6 +665,12 @@ msgstr "ÆÄÀÏ Å©±â Á¦ÇÑÀ» ÃÊ°úÇÔ" msgid "File too large" msgstr "ÆÄÀÏÀÌ ³Ê¹« Å®´Ï´Ù" +#: stdio-common/../sysdeps/unix/siglist.c:54 +msgid "Filesize limit exceeded" +msgstr "ÆÄÀÏÅ©±â Á¦ÇÑÀ» ÃÊ°úÇÔ" + +#: stdio-common/../sysdeps/unix/siglist.c:37 +#: sysdeps/unix/sysv/linux/siglist.h:28 msgid "Floating point exception" msgstr "ºÎµ¿ ¼Ò¼öÁ¡ ¿¹¿Ü" @@ -644,6 +686,8 @@ msgstr "ÇÔ¼ö°¡ ±¸ÇöµÇÁö ¾Ê¾ÒÀ½" msgid "Gratuitous error" msgstr "ÀÌÀ¯¾ø´Â ¿À·ù" +#: stdio-common/../sysdeps/unix/siglist.c:30 +#: sysdeps/unix/sysv/linux/siglist.h:22 msgid "Hangup" msgstr "²÷¾îÁü" @@ -656,9 +700,12 @@ msgstr "È£½ºÆ®°¡ Á×¾ú½À´Ï´Ù" msgid "Host name lookup failure" msgstr "È£½ºÆ® À̸§ Ž»ö ½ÇÆÐ" +#: stdio-common/../sysdeps/unix/siglist.c:52 +#: sysdeps/unix/sysv/linux/siglist.h:42 msgid "I/O possible" msgstr "ÀÔÃâ·Â °¡´É" +#: stdio-common/../sysdeps/unix/siglist.c:35 msgid "IOT trap" msgstr "IOT Æ®·¦" @@ -666,9 +713,15 @@ msgstr "IOT Æ®·¦" msgid "Identifier removed" msgstr "½Äº°ÀÚ Á¦°ÅµÊ" +#: sysdeps/unix/sysv/linux/siglist.h:25 msgid "Illegal Instruction" msgstr "À߸øµÈ ¸í·É¾î" +#: stdio-common/../sysdeps/unix/siglist.c:33 +#, fuzzy +msgid "Illegal instruction" +msgstr "À߸øµÈ ¸í·É¾î" + #. TRANS Invalid seek operation (such as on a pipe). #: stdio-common/../sysdeps/gnu/errlist.c:201 msgid "Illegal seek" @@ -699,23 +752,29 @@ msgstr "ÀåÄ¡¿¡ ´ëÇØ ºÎÀûÀýÇÑ ioctl" msgid "Inappropriate operation for background process" msgstr "¹è°æ ÇÁ·Î¼¼½º·Î ºÎÀûÇÕÇÑ µ¿ÀÛ" +#: sysdeps/unix/sysv/linux/siglist.h:62 +msgid "Information request" +msgstr "Á¤º¸ ¿äû" + #. TRANS Input/output error; usually used for physical read or write errors. #: stdio-common/../sysdeps/gnu/errlist.c:40 msgid "Input/output error" msgstr "ÀÔ·Â/Ãâ·Â ¿À·ù" -#: nis/ypclnt.c:643 +#: nis/ypclnt.c:701 msgid "Internal NIS error" msgstr "³»ºÎ NIS ¿À·ù" -#: nis/ypclnt.c:707 +#: nis/ypclnt.c:765 msgid "Internal ypbind error" msgstr "³»ºÎ ypbind ¿À·ù" +#: stdio-common/../sysdeps/unix/siglist.c:31 +#: sysdeps/unix/sysv/linux/siglist.h:23 msgid "Interrupt" msgstr "ÀÎÅÍ·´Æ®" -#. TRANS Interrupted function call; an asynchronous signal occured and prevented +#. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. #. TRANS @@ -736,11 +795,11 @@ msgstr "Áß´ÜµÈ ½Ã½ºÅÛ È£ÃâÀº Àç½ÃÀ۵Ǿî¾ß ÇÕ´Ï´Ù" msgid "Invalid argument" msgstr "ºÎÀûÀýÇÑ Àμö" -#: posix/regex.c:946 +#: posix/regex.c:960 msgid "Invalid back reference" msgstr "ºÎÀûÀýÇÑ ÈĹæ ÂüÁ¶" -#: posix/regex.c:944 +#: posix/regex.c:958 msgid "Invalid character class name" msgstr "ºÎÀûÀýÇÑ ¹®ÀÚ Å¬·¡½º À̸§" @@ -752,11 +811,11 @@ msgstr "ºÎÀûÀýÇÑ Å¬¶óÀ̾ðÆ® ÀÚ°Ý ºÎ¿©" msgid "Invalid client verifier" msgstr "ºÎÀûÀýÇÑ Å¬¶óÀ̾ðÆ® °ËÁõ±â" -#: posix/regex.c:943 +#: posix/regex.c:957 msgid "Invalid collation character" msgstr "ºÎÀûÀýÇÑ ´ëÁ¶ ¹®ÀÚ" -#: posix/regex.c:950 +#: posix/regex.c:964 msgid "Invalid content of \\{\\}" msgstr "\\{\\}¿¡ ºÎÀûÀýÇÑ ³»¿ë¹°ÀÌ ÀÖÀ½" @@ -765,7 +824,7 @@ msgstr "\\{\\}¿¡ ºÎÀûÀýÇÑ ³»¿ë¹°ÀÌ ÀÖÀ½" #. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}). #: stdio-common/../sysdeps/gnu/errlist.c:129 msgid "Invalid cross-device link" -msgstr "ÀåÄ¡°£ ¿¬°áÀÌ ºÎÀûÀýÇÔ" +msgstr "ºÎÀûÀýÇÑ ÀåÄ¡°£ ¿¬°á" #: stdio-common/../sysdeps/gnu/errlist.c:690 msgid "Invalid exchange" @@ -777,15 +836,15 @@ msgstr "ºÎÀûÀýÇÑ ±³È¯" msgid "Invalid or incomplete multibyte or wide character" msgstr "ºÎÀûÀýÇϰųª ºÒ¿ÏÀüÇÑ ´ÙÁß¹ÙÀÌÆ® ¶Ç´Â ±¤¿ª ¹®ÀÚ" -#: posix/regex.c:953 +#: posix/regex.c:967 msgid "Invalid preceding regular expression" msgstr "¾Õ¼± Á¤±Ô½ÄÀÌ ºÎÀûÀýÇÔ" -#: posix/regex.c:951 +#: posix/regex.c:965 msgid "Invalid range end" msgstr "ºÎÀûÀýÇÑ ¹üÀ§ ³¡" -#: posix/regex.c:942 +#: posix/regex.c:956 msgid "Invalid regular expression" msgstr "ºÎÀûÀýÇÑ Á¤±Ô½Ä" @@ -815,6 +874,8 @@ msgstr "µð·ºÅ丮ÀÔ´Ï´Ù" msgid "Is a named type file" msgstr "" +#: stdio-common/../sysdeps/unix/siglist.c:38 +#: sysdeps/unix/sysv/linux/siglist.h:29 msgid "Killed" msgstr "Á×¾úÀ½" @@ -836,25 +897,25 @@ msgstr "µî±Þ 3 ¸®¼Â" #: stdio-common/../sysdeps/gnu/errlist.c:626 msgid "Link has been severed" -msgstr "" +msgstr "¸µÅ©°¡ ¼Õ»óµÇ¾ú½À´Ï´Ù" #: stdio-common/../sysdeps/gnu/errlist.c:674 msgid "Link number out of range" msgstr "¹üÀ§¸¦ ¹þ¾î³ ¸µÅ© ¹øÈ£" -#: nis/ypclnt.c:655 +#: nis/ypclnt.c:713 msgid "Local domain name not set" msgstr "Áö¿ª µµ¸ÞÀθíÀÌ ¼³Á¤µÇÁö ¾Ê¾ÒÀ½" -#: nis/ypclnt.c:645 +#: nis/ypclnt.c:703 msgid "Local resource allocation failure" msgstr "Áö¿ª ÀÚ¿ø ÇÒ´ç ½ÇÆÐ" #: stdio-common/../sysdeps/gnu/errlist.c:722 msgid "Machine is not on the network" -msgstr "±â±â°¡ ³×Æ®¿öÅ© »ó¿¡ ÀÖÁö ¾Ê½À´Ï´Ù" +msgstr "±â°è°¡ ³×Æ®¿öÅ© »ó¿¡ ÀÖÁö ¾Ê½À´Ï´Ù" -#: posix/regex.c:952 +#: posix/regex.c:966 msgid "Memory exhausted" msgstr "¸Þ¸ð¸®°¡ ¹Ù´Ú³²" @@ -868,11 +929,11 @@ msgstr "¸Þ½ÃÁö°¡ ³Ê¹« ±é´Ï´Ù" msgid "Multihop attempted" msgstr "" -#: nis/ypclnt.c:659 +#: nis/ypclnt.c:717 msgid "NIS client/server version mismatch - can't supply service" msgstr "NIS Ŭ¶óÀ̾ðÆ®/¼¹ö ¹öÀü ºÒÀÏÄ¡ - ¼ºñ½º¸¦ Á¦°øÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:657 +#: nis/ypclnt.c:715 msgid "NIS map data base is bad" msgstr "NIS Áöµµ µ¥ÀÌÅͺ£À̽º°¡ À߸øµÇ¾ú½À´Ï´Ù" @@ -943,7 +1004,7 @@ msgstr "»ç¿ë °¡´ÉÇÑ ÀÚ·á°¡ ¾øÀ½" msgid "No locks available" msgstr "»ç¿ë°¡´ÉÇÑ Àá±ÝÀåÄ¡°¡ ¾øÀ½" -#: posix/regex.c:941 +#: posix/regex.c:955 msgid "No match" msgstr "¸Â´Â ¦ ¾øÀ½" @@ -951,13 +1012,13 @@ msgstr "¸Â´Â ¦ ¾øÀ½" msgid "No message of desired type" msgstr "Àû´çÇÑ ÇüÀ» °¡Áø ¸Þ½ÃÁö°¡ ¾øÀ½" -#: nis/ypclnt.c:647 +#: nis/ypclnt.c:705 msgid "No more records in map database" msgstr "Áöµµ µ¥ÀÌÅͺ£À̽º¿¡ ´õ ÀÌ»óÀÇ ±â·ÏÀÌ ¾øÀ½" -#: posix/regex.c:5204 +#: posix/regex.c:5324 msgid "No previous regular expression" -msgstr "ÀüÀÇ Á¤±Ô½ÄÀÌ ¾øÀ½" +msgstr "ÀÌÀüÀÇ Á¤±Ô½ÄÀÌ ¾øÀ½" #: sunrpc/rpcinfo.c:515 msgid "No remote programs registered.\n" @@ -981,11 +1042,11 @@ msgstr "ÀåÄ¡¿¡ ³²Àº °ø°£ÀÌ ¾øÀ½" msgid "No such file or directory" msgstr "±×·± ÆÄÀÏÀ̳ª µð·ºÅ丮°¡ ¾øÀ½" -#: nis/ypclnt.c:641 +#: nis/ypclnt.c:699 msgid "No such key in map" msgstr "Áöµµ¿¡ ±×·± Å°°¡ ¾øÀ½" -#: nis/ypclnt.c:639 +#: nis/ypclnt.c:697 msgid "No such map in server's domain" msgstr "¼¹öÀÇ µµ¸ÞÀο¡ ±×·± Áöµµ°¡ ¾øÀ½" @@ -1023,7 +1084,7 @@ msgstr "¹üÀ§¸¦ ¹þ¾î³ ¼öÄ¡ °á°ú" msgid "Object is remote" msgstr "¿ø°Ý °³Ã¼ÀÔ´Ï´Ù" -#: time/zic.c:1939 +#: time/zic.c:1966 msgid "Odd number of quotation marks" msgstr "µû¿ÈÇ¥°¡ Ȧ¼ö °³ÀÔ´Ï´Ù" @@ -1085,17 +1146,20 @@ msgid "Package not installed" msgstr "ÆÐÅ°Áö°¡ ¼³Ä¡µÇÁö ¾ÊÀ½" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/ypclnt.c:661 stdio-common/../sysdeps/gnu/errlist.c:96 +#: nis/ypclnt.c:719 stdio-common/../sysdeps/gnu/errlist.c:96 msgid "Permission denied" msgstr "Çã°¡ °ÅºÎµÊ" +#: sysdeps/unix/sysv/linux/siglist.h:64 msgid "Power failure" msgstr "Àü·ÂÀÌ ²÷¾îÁü" -#: posix/regex.c:954 +#: posix/regex.c:968 msgid "Premature end of regular expression" msgstr "Á¤±Ô½ÄÀÌ ¿Ï°áµÇÁö ¾ÊÀº ä ³¡³²" +#: stdio-common/../sysdeps/unix/siglist.c:56 +#: sysdeps/unix/sysv/linux/siglist.h:46 msgid "Profiling timer expired" msgstr "ÇÁ·ÎÆÄÀϸµ ŸÀ̸ÓÀÇ ½Ã°£ÀÌ ÃÊ°úµÊ" @@ -1130,6 +1194,8 @@ msgstr "±Ô¾àÀÌ Áö¿øµÇÁö ¾ÊÀ½" msgid "Protocol wrong type for socket" msgstr "¼ÒÄÏ¿¡ ´ëÇÑ ±Ô¾àÀÌ À߸øµÊ" +#: stdio-common/../sysdeps/unix/siglist.c:32 +#: sysdeps/unix/sysv/linux/siglist.h:24 msgid "Quit" msgstr "Á¾·á" @@ -1142,9 +1208,9 @@ msgstr "RFS¿¡ ±¹ÇÑµÈ ¿À·ù" msgid "RPC bad procedure for program" msgstr "RPC ÇÁ·Î±×·¥ÀÇ ÇÁ·Î½ÃÁ®°¡ À߸øµÊ" -#: nis/ypclnt.c:635 +#: nis/ypclnt.c:693 msgid "RPC failure on NIS operation" -msgstr "" +msgstr "NIS ¿¬»ê Áß RPC ½ÇÆÐÇÔ" #. TRANS ??? #: stdio-common/../sysdeps/gnu/errlist.c:517 @@ -1176,7 +1242,7 @@ msgstr "RPC: ÀÎÁõ ¿À·ù" #: sunrpc/clnt_perr.c:169 msgid "RPC: Can't decode result" -msgstr "RPC: °á°ú¸¦ º¹È£ÈÇÒ ¼ö ¾ø½À´Ï´Ù" +msgstr "RPC: °á°ú¸¦ Çص¶ÇÒ ¼ö ¾ø½À´Ï´Ù" #: sunrpc/clnt_perr.c:167 msgid "RPC: Can't encode arguments" @@ -1216,7 +1282,7 @@ msgstr "RPC: ¿ø°Ý ½Ã½ºÅÛ ¿À·ù" #: sunrpc/clnt_perr.c:187 msgid "RPC: Server can't decode arguments" -msgstr "RPC: ¼¹ö°¡ Àμö¸¦ º¹È£ÈÇÒ ¼ö ¾ø½À´Ï´Ù" +msgstr "RPC: ¼¹ö°¡ Àμö¸¦ Çص¶ÇÒ ¼ö ¾ø½À´Ï´Ù" #: sunrpc/clnt_perr.c:165 msgid "RPC: Success" @@ -1251,7 +1317,7 @@ msgstr "µ¿ÀûÀ¸·Î ÀûÀçµÇÁö ¾ÊÀº Äڵ忡 RTLD_NEXT°¡ »ç¿ëµÊ" msgid "Read-only file system" msgstr "ÀбâÀü¿ë ÆÄÀÏ ½Ã½ºÅÛ" -#: posix/regex.c:955 +#: posix/regex.c:969 msgid "Regular expression too big" msgstr "Á¤±Ô½ÄÀÌ ³Ê¹« Å®´Ï´Ù" @@ -1268,13 +1334,14 @@ msgid "Remove password or make file unreadable by others." msgstr "¾ÏÈ£¸¦ Áö¿ì°Å³ª ´Ù¸¥ »ç¶÷ÀÌ ÀÐÀ» ¼ö ¾ø´Â ÆÄÀÏÀ» ¸¸µì´Ï´Ù." #: catgets/gencat.c:224 db/makedb.c:227 locale/programs/locale.c:257 -#: locale/programs/localedef.c:408 -msgid "Report bugs to <bug-glibc@prep.ai.mit.edu>.\n" +#: locale/programs/localedef.c:412 +#, fuzzy +msgid "Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n" msgstr "¹ö±×´Â <bug-glibc@prep.ai.mit.edu>¿¡ º¸°íÇϽʽÿÀ.\n" -#: nis/ypclnt.c:633 +#: nis/ypclnt.c:691 msgid "Request arguments bad" -msgstr "" +msgstr "¿äûµÈ Àμö°¡ À߸øµÊ" #: resolv/herror.c:73 msgid "Resolver Error 0 (no error)" @@ -1290,7 +1357,11 @@ msgstr "ÇØ°á±â ³»ºÎ ¿À·ù" #. TRANS noticed; it might just hang. @xref{File Locks}, for an example. #: stdio-common/../sysdeps/gnu/errlist.c:85 msgid "Resource deadlock avoided" -msgstr "" +msgstr "ÀÚ¿ø ±³Âø»óŸ¦ ÇÇÇß½À´Ï´Ù" + +#: stdio-common/../sysdeps/unix/siglist.c:58 +msgid "Resource lost" +msgstr "ÀÚ¿øÀ» ¼Õ½ÇÇßÀ½" #. TRANS Resource temporarily unavailable; the call might work if you try again #. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN}; @@ -1325,6 +1396,8 @@ msgstr "" msgid "Resource temporarily unavailable" msgstr "ÀÚ¿øÀÌ ÀϽÃÀûÀ¸·Î »ç¿ë ºÒ°¡´ÉÇÔ" +#: stdio-common/../sysdeps/unix/siglist.c:40 +#: sysdeps/unix/sysv/linux/siglist.h:31 msgid "Segmentation fault" msgstr "" @@ -1336,6 +1409,10 @@ msgstr "¼¹ö°¡ ÀÚ°Ý ºÎ¿©¸¦ °ÅºÎÇß½À´Ï´Ù" msgid "Server rejected verifier" msgstr "¼¹ö°¡ °ËÁõ±â¸¦ °ÅºÎÇß½À´Ï´Ù" +#: stdio-common/../sysdeps/unix/siglist.c:29 +msgid "Signal 0" +msgstr "½ÅÈ£ 0" + #. TRANS A file that isn't a socket was specified when a socket is required. #: stdio-common/../sysdeps/gnu/errlist.c:299 msgid "Socket operation on non-socket" @@ -1355,6 +1432,10 @@ msgstr "¼ÒÇÁÆ®¿þ¾î°¡ ¿¬°á Áß´ÜÀ» ÃÊ·¡Çß½À´Ï´Ù" msgid "Srmount error" msgstr "" +#: sysdeps/unix/sysv/linux/siglist.h:59 +msgid "Stack fault" +msgstr "½ºÅà ¿À·ù" + #. TRANS Stale NFS file handle. This indicates an internal confusion in the NFS #. TRANS system which is due to file system rearrangements on the server host. #. TRANS Repairing this condition usually requires unmounting and remounting @@ -1363,15 +1444,23 @@ msgstr "" msgid "Stale NFS file handle" msgstr "²÷¾îÁø NFS ÆÄÀÏ ÇÚµé" +#: stdio-common/../sysdeps/unix/siglist.c:47 +#: sysdeps/unix/sysv/linux/siglist.h:37 msgid "Stopped" msgstr "Á¤ÁöµÊ" +#: stdio-common/../sysdeps/unix/siglist.c:46 +#: sysdeps/unix/sysv/linux/siglist.h:36 msgid "Stopped (signal)" msgstr "Á¤ÁöµÊ (½ÅÈ£)" +#: stdio-common/../sysdeps/unix/siglist.c:50 +#: sysdeps/unix/sysv/linux/siglist.h:40 msgid "Stopped (tty input)" msgstr "Á¤ÁöµÊ (tty ÀÔ·Â)" +#: stdio-common/../sysdeps/unix/siglist.c:51 +#: sysdeps/unix/sysv/linux/siglist.h:41 msgid "Stopped (tty output)" msgstr "Á¤ÁöµÊ (tty Ãâ·Â)" @@ -1383,15 +1472,17 @@ msgstr "½ºÆ®¸² ÆÄÀÌÇÁ ¿À·ù" msgid "Structure needs cleaning" msgstr "±¸Á¶¿¡ û¼Ò°¡ ÇÊ¿äÇÕ´Ï´Ù" -#: nis/ypclnt.c:631 nis/ypclnt.c:705 posix/regex.c:940 +#: nis/ypclnt.c:689 nis/ypclnt.c:763 posix/regex.c:954 #: stdio-common/../sysdeps/gnu/errlist.c:7 msgid "Success" msgstr "¼º°ø" -#: nis/ypclnt.c:711 +#: nis/ypclnt.c:769 msgid "System resource allocation failure" msgstr "½Ã½ºÅÛ ÀÚ¿ø ÇÒ´ç ½ÇÆÐ" +#: stdio-common/../sysdeps/unix/siglist.c:44 +#: sysdeps/unix/sysv/linux/siglist.h:34 msgid "Terminated" msgstr "Á¾·áµÊ" @@ -1457,10 +1548,15 @@ msgstr "ÂüÁ¶°¡ ³Ê¹« ¸¹À½: ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù" msgid "Too many users" msgstr "»ç¿ëÀÚ°¡ ³Ê¹« ¸¹À½" +#: stdio-common/../sysdeps/unix/siglist.c:34 +msgid "Trace/BPT trap" +msgstr "" + +#: sysdeps/unix/sysv/linux/siglist.h:26 msgid "Trace/breakpoint trap" msgstr "ÃßÀû/Áß´ÜÁ¡ ÇÔÁ¤" -#: posix/regex.c:945 +#: posix/regex.c:959 msgid "Trailing backslash" msgstr "µû¶óºÙ´Â ¿ª½½·¡½¬" @@ -1469,7 +1565,7 @@ msgstr "µû¶óºÙ´Â ¿ª½½·¡½¬" #. TRANS up, before it has connected to the file. #: stdio-common/../sysdeps/gnu/errlist.c:584 msgid "Translator died" -msgstr "¹ø¿ª±â°¡ Á×¾úÀ½" +msgstr "º¯È¯±â°¡ Á×¾úÀ½" #. TRANS You tried to connect a socket that is already connected. #. TRANS @xref{Connecting}. @@ -1486,12 +1582,12 @@ msgid "Transport endpoint is not connected" msgstr "Àü¼Û Á¾·áÁöÁ¡ÀÌ ¿¬°áµÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù" #: catgets/gencat.c:208 db/makedb.c:209 locale/programs/locale.c:241 -#: locale/programs/localedef.c:389 +#: locale/programs/localedef.c:393 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "´õ ¸¹Àº Á¤º¸¸¦ º¸·Á¸é `%s --help' ÇϽʽÿÀ.\n" -#: inet/rcmd.c:136 +#: inet/rcmd.c:137 #, c-format msgid "Trying %s...\n" msgstr "%s ½ÃµµÁß...\n" @@ -1501,7 +1597,7 @@ msgstr "%s ½ÃµµÁß...\n" msgid "Unknown .netrc keyword %s" msgstr "¾Ë ¼ö ¾ø´Â .netrc Å°¿öµå %s" -#: nis/ypclnt.c:665 +#: nis/ypclnt.c:723 msgid "Unknown NIS error code" msgstr "¾Ë ¼ö ¾ø´Â NIS ¿À·ù ÄÚµå" @@ -1516,7 +1612,7 @@ msgstr "¾Ë ¼ö ¾ø´Â È£½ºÆ®" #: resolv/herror.c:120 msgid "Unknown resolver error" -msgstr "¾Ë ¼ö ¾ø´Â ¸®¼Ö¹ö ¿À·ù" +msgstr "¾Ë ¼ö ¾ø´Â ÇØ°á±â ¿À·ù" #: resolv/herror.c:76 msgid "Unknown server error" @@ -1527,27 +1623,27 @@ msgstr "¾Ë ¼ö ¾ø´Â ¼¹ö ¿À·ù" msgid "Unknown signal %d" msgstr "¾Ë ¼ö ¾ø´Â ½ÅÈ£ %d" -#: misc/error.c:95 +#: misc/error.c:100 msgid "Unknown system error" msgstr "¾Ë ¼ö ¾ø´Â ½Ã½ºÅÛ ¿À·ù" -#: nis/ypclnt.c:713 +#: nis/ypclnt.c:771 msgid "Unknown ypbind error" msgstr "¾Ë ¼ö ¾ø´Â ypbind ¿À·ù" -#: posix/regex.c:948 +#: posix/regex.c:962 msgid "Unmatched ( or \\(" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â ( ¶Ç´Â \\(" -#: posix/regex.c:956 +#: posix/regex.c:970 msgid "Unmatched ) or \\)" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â ) ¶Ç´Â \\)" -#: posix/regex.c:947 +#: posix/regex.c:961 msgid "Unmatched [ or [^" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â [ ¶Ç´Â [^" -#: posix/regex.c:949 +#: posix/regex.c:963 msgid "Unmatched \\{" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â \\{" @@ -1556,6 +1652,8 @@ msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â \\{" msgid "Unrecognized variable `%s'" msgstr "ÀνÄÇÒ ¼ö ¾ø´Â º¯¼ö `%s'" +#: stdio-common/../sysdeps/unix/siglist.c:45 +#: sysdeps/unix/sysv/linux/siglist.h:35 msgid "Urgent I/O condition" msgstr "½Ã±ÞÇÑ ÀÔÃâ·Â »óȲ" @@ -1612,7 +1710,7 @@ msgstr "" " -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í ¸¶Ä¨´Ï´Ù\n" "ÀÔ·Â-ÆÄÀÏÀÌ - À̸é Ç¥ÁØ ÀÔ·ÂÀ¸·ÎºÎÅÍ ÀÔ·ÂÀ» ÀÐ°Ô µË´Ï´Ù.\n" -#: locale/programs/localedef.c:393 +#: locale/programs/localedef.c:397 #, c-format msgid "" "Usage: %s [OPTION]... name\n" @@ -1636,12 +1734,13 @@ msgstr "" " -h, --help ÀÌ µµ¿ò¸»À» Ç¥½ÃÇÏ°í ¸¶Ä¨´Ï´Ù\n" " -f, --charmaps=FILE FILE¿¡ Á¤ÀÇµÈ ±âÈ£ ¹®ÀÚ À̸§\n" " -i, --inputfile=FILE ¼Ò½º Á¤ÀÇ°¡ FILE ¾È¿¡ ÀÖÀ½À» ³ªÅ¸³À´Ï´Ù\n" -" -u, --code-set-name=NAME ISO 10646 ¿ø¼Ò¿¡ ´ëÀÀÇÏ´Â ÄÚµå ÁýÇÕÀ» ÁöÁ¤ÇÕ´Ï´Ù\n" +" -u, --code-set-name=NAME ISO 10646 ¿ø¼Ò¿¡ ´ëÀÀÇÏ´Â ÄÚµå ÁýÇÕÀ» " +"ÁöÁ¤ÇÕ´Ï´Ù\n" " -v, --verbose ´õ ¸¹Àº ¸Þ½ÃÁö¸¦ Ãâ·ÂÇÕ´Ï´Ù\n" " -V, --version ¹öÀü Á¤º¸¸¦ Ãâ·ÂÇÏ°í ¸¶Ä¨´Ï´Ù\n" " --posix POSIX ¾ÈÀ» ¾ö°ÝÈ÷ ÁؼöÇÕ´Ï´Ù\n" "\n" -"¹®ÀÚ ÁöµµÀÇ ½Ã½ºÅÛ µð·ºÅ丮: %s\n" +" ¹®ÀÚ ÁöµµÀÇ ½Ã½ºÅÛ µð·ºÅ丮: %s\n" "·ÎÄÉÀÏ ÆÄÀÏÀÇ ½Ã½ºÅÛ µð·ºÅ丮: %s\n" #: locale/programs/locale.c:245 @@ -1678,9 +1777,13 @@ msgstr "»ç¿ë¹ý: %s º¯¼ö¸í [°æ·Î¸í]\n" msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "»ç¿ë¹ý: rpcinfo [ -n Æ÷Æ®¹øÈ£ ] -u È£½ºÆ® ÇÁ·Î±×·¥¹øÈ£ [ ¹öÀü¹øÈ£ ]\n" +#: stdio-common/../sysdeps/unix/siglist.c:59 +#: sysdeps/unix/sysv/linux/siglist.h:48 msgid "User defined signal 1" msgstr "»ç¿ëÀÚ Á¤ÀÇ ½ÅÈ£ 1" +#: stdio-common/../sysdeps/unix/siglist.c:60 +#: sysdeps/unix/sysv/linux/siglist.h:49 msgid "User defined signal 2" msgstr "»ç¿ëÀÚ ½ÅÈ£ ½ÅÈ£ 2" @@ -1688,36 +1791,40 @@ msgstr "»ç¿ëÀÚ ½ÅÈ£ ½ÅÈ£ 2" msgid "Value too large for defined data type" msgstr "Á¤ÀÇµÈ ÀÚ·áÇüÀ¸·Î ¾²±â¿£ ³Ê¹« Å« °ª" +#: stdio-common/../sysdeps/unix/siglist.c:55 +#: sysdeps/unix/sysv/linux/siglist.h:45 msgid "Virtual timer expired" msgstr "°¡»ó ŸÀÌ¸Ó ½Ã°£ ÃÊ°ú" -#: time/zic.c:1844 +#: time/zic.c:1871 msgid "Wild result from command execution" msgstr "" +#: stdio-common/../sysdeps/unix/siglist.c:57 +#: sysdeps/unix/sysv/linux/siglist.h:47 msgid "Window changed" msgstr "À©µµ¿ì º¯°æµÊ" #: catgets/gencat.c:174 db/makedb.c:125 locale/programs/locale.c:192 -#: locale/programs/localedef.c:182 +#: locale/programs/localedef.c:185 #, c-format msgid "Written by %s.\n" -msgstr "ÀúÀÚ: %s.\n" +msgstr "%sÀÌ ¸¸µé¾ú½À´Ï´Ù.\n" -#: nis/ypclnt.c:146 +#: nis/ypclnt.c:142 msgid "YPBINDPROC_DOMAIN: Internal error\n" msgstr "YPBINDPROC_DOMAIN: ³»ºÎ ¿À·ù\n" -#: nis/ypclnt.c:150 +#: nis/ypclnt.c:146 #, c-format msgid "YPBINDPROC_DOMAIN: No server for domain %s\n" msgstr "YPBINDPROC_DOMAIN: µµ¸ÞÀÎ %s¿¡ ´ëÇÑ ¼¹ö°¡ ¾øÀ½\n" -#: nis/ypclnt.c:154 +#: nis/ypclnt.c:150 msgid "YPBINDPROC_DOMAIN: Resource allocation failure\n" msgstr "YPBINDPROC_DOMAIN: ÀÚ¿ø ÇÒ´ç ½ÇÆÐ\n" -#: nis/ypclnt.c:158 +#: nis/ypclnt.c:154 msgid "YPBINDPROC_DOMAIN: Unknown error\n" msgstr "YPBINDPROC_DOMAIN: ¾Ë ¼ö ¾ø´Â ¿À·ù\n" @@ -1726,29 +1833,29 @@ msgstr "YPBINDPROC_DOMAIN: ¾Ë ¼ö ¾ø´Â ¿À·ù\n" msgid "You really blew it this time" msgstr "À̹ø¿£ Á¤¸»·Î ³¯·Á¹ö·È½À´Ï´Ù" -#: time/zic.c:1050 +#: time/zic.c:1048 msgid "Zone continuation line end time is not after end time of previous line" msgstr "" -#: locale/programs/charmap.c:397 locale/programs/locfile.c:341 +#: locale/programs/charmap.c:397 locale/programs/locfile.c:363 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "`%1%s' Á¤ÀÇ°¡ `END %1$s'·Î ³¡³ªÁö ¾Ê½À´Ï´Ù" -#: locale/programs/ld-monetary.c:358 locale/programs/ld-numeric.c:190 +#: locale/programs/ld-monetary.c:359 locale/programs/ld-numeric.c:190 #, c-format msgid "`-1' must be last entry in `%s' field in `%s' category" msgstr "" -#: locale/programs/ld-collate.c:1652 +#: locale/programs/ld-collate.c:1655 msgid "`...' must only be used in `...' and `UNDEFINED' entries" msgstr "`...'´Â `...'¿Í `UNDEFINED' Ç׸ñ¿¡¸¸ ¾²¿©¾ß ÇÕ´Ï´Ù" -#: locale/programs/locfile.c:538 +#: locale/programs/locfile.c:560 msgid "`from' expected after first argument to `collating-element'" -msgstr "" +msgstr "`collating-element'¿¡ ´ëÇÑ Ã¹¹ø° Àμö µÚ¿¡ `from'ÀÌ ¿Í¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-collate.c:1109 +#: locale/programs/ld-collate.c:1112 msgid "" "`from' string in collation element declaration contains unknown character" msgstr "" @@ -1758,36 +1865,36 @@ msgstr "" msgid "argument to <%s> must be a single character" msgstr "<%s>¿¡ ´ëÇÑ Àμö´Â ´ÜÀÏ ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù" -#: locale/programs/locfile.c:215 +#: locale/programs/locfile.c:237 #, c-format msgid "argument to `%s' must be a single character" msgstr "`%s'¿¡ ´ëÇÑ Àμö´Â ´ÜÀÏ ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù" -#: sunrpc/auth_unix.c:322 +#: sunrpc/auth_unix.c:323 msgid "auth_none.c - Fatal marshalling problem" msgstr "" -#: inet/rcmd.c:360 +#: inet/rcmd.c:365 msgid "bad .rhosts owner" msgstr "À߸øµÈ .rhosts ¼ÒÀ¯ÀÚ" -#: locale/programs/charmap.c:212 locale/programs/locfile.c:209 +#: locale/programs/charmap.c:212 locale/programs/locfile.c:231 msgid "bad argument" msgstr "À߸øµÈ Àμö" -#: time/zic.c:1172 +#: time/zic.c:1170 msgid "blank FROM field on Link line" msgstr "" -#: time/zic.c:1176 +#: time/zic.c:1174 msgid "blank TO field on Link line" msgstr "" -#: malloc/mcheck.c:189 +#: malloc/mcheck.c:191 msgid "block freed twice" msgstr "ºí·°ÀÌ µÎ¹ø ºñ¿öÁ³À½" -#: malloc/mcheck.c:192 +#: malloc/mcheck.c:194 msgid "bogus mcheck_status, library is buggy" msgstr "¾ûÅ͸® mcheck_status, ¶óÀ̺귯¸®´Â ¹ö±×°¡ ¹ö±Û¹ö±ÛÇÕ´Ï´Ù" @@ -1803,8 +1910,8 @@ msgstr "" msgid "cache_set: victim not found" msgstr "cache_set: ¹ö¸±°ÍÀ» ãÁö ¸øÇßÀ½" -#: time/zic.c:1685 -msgid "can't determine time zone abbrevation to use just after until time" +#: time/zic.c:1698 +msgid "can't determine time zone abbreviation to use just after until time" msgstr "" #: sunrpc/svc_simple.c:64 @@ -1812,21 +1919,21 @@ msgstr "" msgid "can't reassign procedure number %d\n" msgstr "ÇÁ·Î½ÃÁ® ¹øÈ£ %d¸¦ ÀçÁöÁ¤ÇÒ ¼ö ¾ø½À´Ï´Ù\n" -#: locale/programs/localedef.c:287 +#: locale/programs/localedef.c:291 #, c-format msgid "cannot `stat' locale file `%s'" msgstr "·ÎÄÉÀÏ ÆÄÀÏ `%s'¸¦ `stat'ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-collate.c:1314 +#: locale/programs/ld-collate.c:1317 #, c-format msgid "cannot insert collation element `%.*s'" msgstr "" -#: locale/programs/ld-collate.c:1493 locale/programs/ld-collate.c:1498 +#: locale/programs/ld-collate.c:1496 locale/programs/ld-collate.c:1501 msgid "cannot insert into result table" msgstr "°á°úÇ¥¿¡ »ðÀÔÇÒ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-collate.c:1166 locale/programs/ld-collate.c:1208 +#: locale/programs/ld-collate.c:1169 locale/programs/ld-collate.c:1211 #, c-format msgid "cannot insert new collating symbol definition: %s" msgstr "" @@ -1836,84 +1943,84 @@ msgstr "" msgid "cannot open database file `%s': %s" msgstr "µ¥ÀÌÅͺ£À̽º ÆÄÀÏ `%s'¸¦ ¿ ¼ö ¾ø½À´Ï´Ù: %s" -#: catgets/gencat.c:259 db/makedb.c:180 +#: catgets/gencat.c:260 db/makedb.c:180 #, c-format msgid "cannot open input file `%s'" msgstr "ÀÔ·Â ÆÄÀÏ `%s'¸¦ ¿ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/localedef.c:221 +#: locale/programs/localedef.c:224 #, c-format msgid "cannot open locale definition file `%s'" msgstr "·ÎÄÉÀÏ Á¤ÀÇ ÆÄÀÏ `%s'¸¦ ¿ ¼ö ¾ø½À´Ï´Ù" -#: catgets/gencat.c:764 catgets/gencat.c:805 db/makedb.c:189 +#: catgets/gencat.c:765 catgets/gencat.c:806 db/makedb.c:189 #, c-format msgid "cannot open output file `%s'" msgstr "Ãâ·Â ÆÄÀÏ `%s'¸¦ ¿ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/locfile.c:986 +#: locale/programs/locfile.c:1008 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "Ãâ·Â ÆÄÀÏ `%s'¸¦ ¹üÁÖ `%s'¿¡ ´ëÇØ ¿ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-collate.c:1360 +#: locale/programs/ld-collate.c:1363 msgid "cannot process order specification" msgstr "" -#: locale/programs/locale.c:303 +#: locale/programs/locale.c:304 #, c-format msgid "cannot read character map directory `%s'" msgstr "¹®ÀÚ Áöµµ µð·ºÅ丮 `%s'¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/locale.c:278 +#: locale/programs/locale.c:279 #, c-format msgid "cannot read locale directory `%s'" msgstr "·ÎÄÉÀÏ µð·ºÅ丮 `%s'¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/localedef.c:309 +#: locale/programs/localedef.c:313 #, c-format msgid "cannot read locale file `%s'" msgstr "·ÎÄÉÀÏ ÆÄÀÏ `%s'¸¦ ¿ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/localedef.c:334 +#: locale/programs/localedef.c:338 #, c-format msgid "cannot write output files to `%s'" msgstr "Ãâ·Â ÆÄÀÏÀ» `%s'¿¡ ±â·ÏÇÒ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/localedef.c:377 +#: locale/programs/localedef.c:381 msgid "category data requested more than once: should not happen" msgstr "" -#: locale/programs/ld-ctype.c:265 +#: locale/programs/ld-ctype.c:266 #, c-format msgid "character %s'%s' in class `%s' must be in class `%s'" msgstr "" -#: locale/programs/ld-ctype.c:289 +#: locale/programs/ld-ctype.c:291 #, c-format msgid "character %s'%s' in class `%s' must not be in class `%s'" msgstr "" -#: locale/programs/ld-ctype.c:310 +#: locale/programs/ld-ctype.c:313 msgid "character <SP> not defined in character map" -msgstr "¹®ÀÚ <SP>°¡ ¹®ÀÚ Áöµµ¿¡¼ Á¤ÀǵÇÁö ¾ÊÀ½" +msgstr "¹®ÀÚ <SP>°¡ ¹®ÀÚ Áöµµ¿¡¼ Á¤ÀǵÇÁö ¾Ê¾ÒÀ½" -#: locale/programs/ld-ctype.c:939 locale/programs/ld-ctype.c:1002 -#: locale/programs/ld-ctype.c:1010 locale/programs/ld-ctype.c:1018 -#: locale/programs/ld-ctype.c:1026 locale/programs/ld-ctype.c:1034 -#: locale/programs/ld-ctype.c:1042 locale/programs/ld-ctype.c:1068 -#: locale/programs/ld-ctype.c:1076 locale/programs/ld-ctype.c:1114 -#: locale/programs/ld-ctype.c:1141 locale/programs/ld-ctype.c:1152 +#: locale/programs/ld-ctype.c:944 locale/programs/ld-ctype.c:1007 +#: locale/programs/ld-ctype.c:1015 locale/programs/ld-ctype.c:1023 +#: locale/programs/ld-ctype.c:1031 locale/programs/ld-ctype.c:1039 +#: locale/programs/ld-ctype.c:1047 locale/programs/ld-ctype.c:1073 +#: locale/programs/ld-ctype.c:1081 locale/programs/ld-ctype.c:1119 +#: locale/programs/ld-ctype.c:1146 locale/programs/ld-ctype.c:1157 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "¹®ÀÚ `%s'´Â ³»Á¤Ä¡·Î ÇÊ¿äÇÏÁö¸¸ Á¤ÀǵÇÁö ¾Ê¾ÒÀ½" -#: locale/programs/ld-ctype.c:801 +#: locale/programs/ld-ctype.c:806 #, c-format msgid "character class `%s' already defined" msgstr "¹®ÀÚ Å¬·¡½º `%s'´Â ÀÌ¹Ì Á¤ÀǵǾúÀ½" -#: locale/programs/ld-ctype.c:833 +#: locale/programs/ld-ctype.c:838 #, c-format msgid "character map `%s' already defined" msgstr "¹®ÀÚ Áöµµ `%s'´Â ÀÌ¹Ì Á¤ÀǵǾúÀ½" @@ -1927,22 +2034,22 @@ msgstr "¹®ÀÚ Áöµµ ÆÄÀÏ `%s'¸¦ ãÁö ¸øÇßÀ½" msgid "clnt_raw.c - Fatal header serialization error." msgstr "" -#: locale/programs/ld-collate.c:1329 +#: locale/programs/ld-collate.c:1332 #, c-format msgid "collation element `%.*s' appears more than once: ignore line" msgstr "" -#: locale/programs/ld-collate.c:1347 +#: locale/programs/ld-collate.c:1350 #, c-format msgid "collation symbol `%.*s' appears more than once: ignore line" msgstr "" -#: locale/programs/locfile.c:522 +#: locale/programs/locfile.c:544 #, c-format msgid "collation symbol expected after `%s'" msgstr "" -#: inet/rcmd.c:129 +#: inet/rcmd.c:130 #, c-format msgid "connect to address %s: " msgstr "ÁÖ¼Ò %s¿¡ ¿¬°á: " @@ -1980,37 +2087,37 @@ msgstr "" msgid "duplicate character name `%s'" msgstr "¹®ÀÚ À̸§ `%s'ÀÌ Áߺ¹µÊ" -#: locale/programs/ld-collate.c:1141 +#: locale/programs/ld-collate.c:1144 msgid "duplicate collating element definition" msgstr "" -#: locale/programs/ld-collate.c:1287 +#: locale/programs/ld-collate.c:1290 #, c-format msgid "duplicate definition for character `%.*s'" msgstr "¹®ÀÚ `%.*s'¸¦ Áߺ¹ Á¤ÀÇÇÔ" -#: db/makedb.c:310 +#: db/makedb.c:311 msgid "duplicate key" msgstr "Áߺ¹µÈ Å°" -#: catgets/gencat.c:378 +#: catgets/gencat.c:379 msgid "duplicate set definition" msgstr "Áߺ¹µÈ ÁýÇÕ Á¤ÀÇ" -#: time/zic.c:965 +#: time/zic.c:963 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "Áߺ¹µÈ Áö¿ª¸í %s (ÆÄÀÏ \"%s\", Çà %d)" -#: catgets/gencat.c:541 +#: catgets/gencat.c:542 msgid "duplicated message identifier" msgstr "Áߺ¹µÈ ¸Þ½ÃÁö ½Äº°ÀÚ" -#: catgets/gencat.c:514 +#: catgets/gencat.c:515 msgid "duplicated message number" msgstr "Áߺ¹µÈ ¸Þ½ÃÁö ¹øÈ£" -#: locale/programs/ld-collate.c:1696 +#: locale/programs/ld-collate.c:1699 msgid "empty weight name: line ignored" msgstr "" @@ -2030,32 +2137,36 @@ msgstr "enablecache: ij½¬ ÀڷḦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: ij½¬ fifo¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-collate.c:1419 +#: locale/programs/ld-collate.c:1422 msgid "end point of ellipsis range is bigger then start" msgstr "" -#: locale/programs/ld-collate.c:1149 +#: locale/programs/ld-collate.c:1152 msgid "error while inserting collation element into hash table" msgstr "" -#: locale/programs/ld-collate.c:1161 +#: locale/programs/ld-collate.c:1164 msgid "error while inserting to hash table" msgstr "Çؽ¬ Å×ÀÌºí¿¡ »ðÀÔÇÏ´Â µµÁß ¿À·ù ¹ß»ý" -#: locale/programs/locfile.c:465 +#: locale/programs/locfile.c:487 msgid "expect string argument for `copy'" -msgstr "" +msgstr "`copy'¿¡ ´ëÇÑ ¹®ÀÚ¿ Àμö°¡ ÇÊ¿äÇÔ" -#: time/zic.c:856 +#: time/zic.c:854 msgid "expected continuation line not found" msgstr "¿¹»óÇß´ø ¿¬¼Ó ÇàÀ» ãÁö ¸øÇßÀ½" -#: locale/programs/locfile.c:1010 +#: locale/programs/locfile.c:1032 #, c-format msgid "failure while writing data for category `%s'" msgstr "¹üÁÖ `%s'ÀÇ ÀڷḦ ¾²´Â µ¥ ½ÇÆÐÇß½À´Ï´Ù" -#: locale/programs/ld-monetary.c:154 locale/programs/ld-numeric.c:95 +#: nis/ypclnt.c:187 +msgid "fcntl: F_SETFD" +msgstr "" + +#: locale/programs/ld-monetary.c:155 locale/programs/ld-numeric.c:95 #, c-format msgid "field `%s' in category `%s' not defined" msgstr "" @@ -2065,7 +2176,7 @@ msgstr "" msgid "field `%s' in category `%s' undefined" msgstr "" -#: locale/programs/locfile.c:547 +#: locale/programs/locfile.c:569 msgid "from-value of `collating-element' must be a string" msgstr "" @@ -2074,7 +2185,8 @@ msgid "garbage at end of character code specification" msgstr "¹®ÀÚ ÄÚµå ¸í¼¼ÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ÀÖÀ½" #: locale/programs/linereader.c:214 -msgid "garbage at end of digit" +#, fuzzy +msgid "garbage at end of number" msgstr "¼ýÀÚÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ÀÖÀ½" #: locale/programs/ld-time.c:183 @@ -2089,7 +2201,7 @@ msgid "" "garbage at end of starting date in string %d in `era' field in category `%s'" msgstr "" -#: locale/programs/ld-time.c:310 +#: locale/programs/ld-time.c:311 #, c-format msgid "" "garbage at end of stopping date in string %d in `era' field in category `%s'" @@ -2099,19 +2211,19 @@ msgstr "" msgid "get_myaddress: ioctl (get interface configuration)" msgstr "" -#: time/zic.c:1149 +#: time/zic.c:1147 msgid "illegal CORRECTION field on Leap line" msgstr "" -#: time/zic.c:1153 +#: time/zic.c:1151 msgid "illegal Rolling/Stationary field on Leap line" msgstr "" -#: locale/programs/ld-collate.c:1767 +#: locale/programs/ld-collate.c:1770 msgid "illegal character constant in string" msgstr "¹®ÀÚ¿¿¡ À߸øµÈ ¹®ÀÚ »ó¼ö°¡ ÀÖÀ½" -#: locale/programs/ld-collate.c:1116 +#: locale/programs/ld-collate.c:1119 msgid "illegal collation element" msgstr "" @@ -2125,7 +2237,7 @@ msgstr "À߸øµÈ ºÎȣȰ¡ ÁÖ¾îÁü" #: locale/programs/linereader.c:546 msgid "illegal escape sequence at end of string" -msgstr "¹®ÀÚ¿ ³¡¿¡ À߸øµÈ À̽ºÄÉÀÌÇÁ ¿ÀÌ ÀÖÀ½" +msgstr "¹®ÀÚ¿ ³¡¿¡ À߸øµÈ À̽ºÄÉÀÌÇÁ ¼ø¼¿ÀÌ ÀÖÀ½" #: locale/programs/charset.c:101 msgid "illegal names for character range" @@ -2136,7 +2248,7 @@ msgstr "¹®ÀÚÀÇ ¹üÀ§·Î À߸øµÈ À̸§" msgid "illegal number for offset in string %d in `era' field in category `%s'" msgstr "" -#: catgets/gencat.c:351 catgets/gencat.c:428 +#: catgets/gencat.c:352 catgets/gencat.c:429 msgid "illegal set number" msgstr "ÁýÇÕ ¹øÈ£°¡ À߸øµÇ¾úÀ½" @@ -2145,79 +2257,79 @@ msgstr "ÁýÇÕ ¹øÈ£°¡ À߸øµÇ¾úÀ½" msgid "illegal starting date in string %d in `era' field in category `%s'" msgstr "" -#: locale/programs/ld-time.c:302 +#: locale/programs/ld-time.c:303 #, c-format msgid "illegal stopping date in string %d in `era' field in category `%s'" msgstr "" -#: locale/programs/ld-ctype.c:807 +#: locale/programs/ld-ctype.c:812 #, c-format msgid "implementation limit: no more than %d character classes allowed" msgstr "" -#: locale/programs/ld-ctype.c:839 +#: locale/programs/ld-ctype.c:844 #, c-format msgid "implementation limit: no more than %d character maps allowed" -msgstr "" +msgstr "±¸Çö»óÀÇ Á¦ÇÑ: %d °³ ÀÌ»óÀÇ ¹®ÀÚ Áöµµ´Â Çã¿ëµÇÁö ¾Ê½À´Ï´Ù" #: db/makedb.c:163 msgid "incorrectly formatted file" msgstr "À߸øµÈ Çü½ÄÀ» °®Ãá ÆÄÀÏ" -#: time/zic.c:814 +#: time/zic.c:811 msgid "input line of unknown type" msgstr "¾Ë ¼ö ¾ø´Â ÇüÅÂÀÇ ÀÔ·ÂÇà" -#: time/zic.c:1733 +#: time/zic.c:1760 msgid "internal error - addtype called with bad isdst" msgstr "" -#: time/zic.c:1741 +#: time/zic.c:1768 msgid "internal error - addtype called with bad ttisgmt" msgstr "" -#: time/zic.c:1737 +#: time/zic.c:1764 msgid "internal error - addtype called with bad ttisstd" msgstr "" -#: locale/programs/ld-ctype.c:301 +#: locale/programs/ld-ctype.c:304 #, c-format msgid "internal error in %s, line %u" msgstr "%s, Çà %u¿¡ ³»ºÎ ¿À·ù ¹ß»ý" -#: time/zic.c:1021 +#: time/zic.c:1019 msgid "invalid GMT offset" msgstr "GMT ¿É¼ÂÀÌ ºÎÀûÀýÇÔ" -#: time/zic.c:1024 +#: time/zic.c:1022 msgid "invalid abbreviation format" msgstr "¾à¾î Çü½ÄÀÌ ºÎÀûÀýÇÔ" -#: time/zic.c:1114 time/zic.c:1313 time/zic.c:1327 +#: time/zic.c:1112 time/zic.c:1313 time/zic.c:1327 msgid "invalid day of month" msgstr "´ÞÀÇ ³¯Â¥ ¼ö°¡ ºÎÀûÀýÇÔ" -#: time/zic.c:1272 +#: time/zic.c:1270 msgid "invalid ending year" msgstr "³¡³ª´Â ÇØ°¡ ºÎÀûÀýÇÔ" -#: time/zic.c:1086 +#: time/zic.c:1084 msgid "invalid leaping year" msgstr "ºÎÀûÀýÇÑ À±³â" -#: time/zic.c:1101 time/zic.c:1204 +#: time/zic.c:1099 time/zic.c:1202 msgid "invalid month name" msgstr "´Þ À̸§ÀÌ ºÎÀûÀýÇÔ" -#: time/zic.c:920 +#: time/zic.c:918 msgid "invalid saved time" msgstr "Àý¾à ½Ã°£ÀÌ ºÎÀûÀýÇÔ" -#: time/zic.c:1252 +#: time/zic.c:1250 msgid "invalid starting year" msgstr "½ÃÀÛÇÏ´Â ÇØ°¡ ºÎÀûÀýÇÔ" -#: time/zic.c:1130 time/zic.c:1232 +#: time/zic.c:1128 time/zic.c:1230 msgid "invalid time of day" msgstr "" @@ -2225,61 +2337,61 @@ msgstr "" msgid "invalid weekday name" msgstr "ºÎÀûÀýÇÑ ¿äÀÏ À̸§" -#: locale/programs/ld-collate.c:1412 +#: locale/programs/ld-collate.c:1415 msgid "line after ellipsis must contain character definition" msgstr "" -#: locale/programs/ld-collate.c:1391 +#: locale/programs/ld-collate.c:1394 msgid "line before ellipsis does not contain definition for character constant" msgstr "" -#: time/zic.c:794 +#: time/zic.c:791 msgid "line too long" msgstr "ÇàÀÌ ³Ê¹« ±é´Ï´Ù" -#: locale/programs/localedef.c:281 +#: locale/programs/localedef.c:285 #, c-format msgid "locale file `%s', used in `copy' statement, not found" msgstr "`copy' ¹®Àå¿¡¼ ¾²ÀÌ´Â ·ÎÄÉÀÏ ÆÄÀÏ `%s'À» ãÁö ¸øÇß½À´Ï´Ù" -#: catgets/gencat.c:609 +#: catgets/gencat.c:610 msgid "malformed line ignored" msgstr "À߸øµÈ ÇüŸ¦ °¡Áø ÇàÀº ¹«½ÃµÊ" -#: malloc/mcheck.c:183 +#: malloc/mcheck.c:185 msgid "memory clobbered before allocated block" msgstr "" -#: malloc/mcheck.c:186 +#: malloc/mcheck.c:188 msgid "memory clobbered past end of allocated block" msgstr "" #: locale/programs/ld-collate.c:167 locale/programs/ld-collate.c:173 -#: locale/programs/ld-collate.c:177 locale/programs/ld-collate.c:1439 -#: locale/programs/ld-collate.c:1468 locale/programs/locfile.c:940 +#: locale/programs/ld-collate.c:177 locale/programs/ld-collate.c:1442 +#: locale/programs/ld-collate.c:1471 locale/programs/locfile.c:962 #: locale/programs/xmalloc.c:68 posix/getconf.c:250 msgid "memory exhausted" msgstr "¸Þ¸ð¸®°¡ ¹Ù´Ú³²" -#: malloc/obstack.c:425 +#: malloc/obstack.c:462 msgid "memory exhausted\n" msgstr "¸Þ¸ð¸®°¡ ¹Ù´Ú³²\n" -#: malloc/mcheck.c:180 +#: malloc/mcheck.c:182 msgid "memory is consistent, library is buggy" msgstr "¸Þ¸ð¸®´Â °ß°íÇÏÁö¸¸, ¶óÀ̺귯¸®´Â ¹ö±×°¡ ¸¹½À´Ï´Ù" -#: locale/programs/ld-time.c:348 +#: locale/programs/ld-time.c:350 #, c-format msgid "missing era format in string %d in `era' field in category `%s'" msgstr "" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:339 #, c-format -msgid "missing era name in string %d in `era' fieldin category `%s'" +msgid "missing era name in string %d in `era' field in category `%s'" msgstr "" -#: time/zic.c:915 +#: time/zic.c:913 msgid "nameless rule" msgstr "À̸§¾ø´Â ±ÔÄ¢" @@ -2293,26 +2405,26 @@ msgstr "°áÄÚ µî·ÏµÇÁö ¾ÊÀº ÇÁ·Î±×·¥ %d\n" msgid "no correct regular expression for field `%s' in category `%s': %s" msgstr "" -#: time/zic.c:2059 +#: time/zic.c:2086 msgid "no day in month matches rule" msgstr "±ÔÄ¢¿¡ ºÎÇյǴ ³¯ÀÌ ´Þ ¾È¿¡ ¾øÀ½" -#: locale/programs/ld-collate.c:259 +#: locale/programs/ld-collate.c:260 msgid "no definition of `UNDEFINED'" -msgstr "" +msgstr "`UNDEFINED'ÀÇ Á¤ÀÇ°¡ ¾øÀ½" -#: locale/programs/locfile.c:479 +#: locale/programs/locfile.c:501 msgid "no other keyword shall be specified when `copy' is used" -msgstr "" +msgstr "`copy'°¡ »ç¿ëµÉ ¶© ´Ù¸¥ Å°¿öµå¸¦ ÁöÁ¤ÇÏ¸é ¾È µË´Ï´Ù" -#: locale/programs/localedef.c:340 +#: locale/programs/localedef.c:344 msgid "no output file produced because warning were issued" -msgstr "" +msgstr "°æ°í°¡ Á¦±âµÇ¾ú±â ¶§¹®¿¡ Ãâ·Â ÆÄÀÏÀÌ ¸¸µé¾îÁöÁö ¾Ê¾Ò½À´Ï´Ù" #: locale/programs/charmap.c:315 locale/programs/charmap.c:466 #: locale/programs/charmap.c:545 msgid "no symbolic name given" -msgstr "" +msgstr "±âÈ£¸íÀÌ ÁÖ¾îÁöÁö ¾ÊÀ½" #: locale/programs/charmap.c:380 locale/programs/charmap.c:512 #: locale/programs/charmap.c:578 @@ -2328,7 +2440,7 @@ msgstr "" msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "" -#: db/makedb.c:326 +#: db/makedb.c:327 #, c-format msgid "problems while reading `%s'" msgstr "`%s'¸¦ Àд µ¿¾È ¹®Á¦°¡ ¹ß»ýÇßÀ½" @@ -2349,16 +2461,16 @@ msgstr "ÇÁ·Î±×·¥ %lu ¹öÀü %lu´Â »ç¿ë ºÒ°¡´ÉÇÕ´Ï´Ù\n" msgid "program %lu version %lu ready and waiting\n" msgstr "ÇÁ·Î±×·¥ %lu ¹öÀü %lu´Â ÁغñµÇ¾î ±â´Ù¸®°í ÀÖ½À´Ï´Ù\n" -#: inet/rcmd.c:171 +#: inet/rcmd.c:172 #, c-format msgid "rcmd: select (setting up stderr): %m\n" msgstr "rcmd: ¼±Åà (Ç¥ÁØ¿À·ù ¼³Á¤): %m\n" -#: inet/rcmd.c:103 +#: inet/rcmd.c:104 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: socket: ¸ðµç Æ÷Æ®°¡ »ç¿ëÁß\n" -#: inet/rcmd.c:159 +#: inet/rcmd.c:160 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: ¾²±â (Ç¥ÁØ¿À·ù ¼³Á¤): %m\n" @@ -2367,7 +2479,7 @@ msgstr "rcmd: ¾²±â (Ç¥ÁØ¿À·ù ¼³Á¤): %m\n" msgid "registerrpc: out of memory\n" msgstr "registerrpc: ¸Þ¸ð¸® ºÎÁ·\n" -#: time/zic.c:1794 +#: time/zic.c:1821 msgid "repeated leap second moment" msgstr "" @@ -2399,45 +2511,45 @@ msgstr "rpcinfo: Æ÷Æ®¸ÅÆÛ¿¡ ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù" msgid "rpcinfo: can't contact portmapper: " msgstr "rpcinfo: Æ÷Æ®¸ÅÆÛ¿¡ ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù: " -#: time/zic.c:708 time/zic.c:710 +#: time/zic.c:704 time/zic.c:706 msgid "same rule name in multiple files" -msgstr "" +msgstr "¿©·¯ ÆÄÀÏ¿¡ °°Àº À̸§ÀÇ ±ÔÄ¢ÀÌ ÀÖÀ½" -#: inet/rcmd.c:174 +#: inet/rcmd.c:175 msgid "select: protocol failure in circuit setup\n" msgstr "select: ȸ·Î ¼³Á¤Áß ±Ô¾àÀÌ ºÒÀÌÇàµÊ\n" -#: inet/rcmd.c:192 +#: inet/rcmd.c:193 msgid "socket: protocol failure in circuit setup\n" msgstr "socket: ȸ·Î ¼³Á¤Áß ±Ô¾àÀÌ ºÒÀÌÇàµÊ\n" -#: locale/programs/locfile.c:600 +#: locale/programs/locfile.c:622 msgid "sorting order `forward' and `backward' are mutually exclusive" msgstr "Á¤·Ä ¼ø¼ `forward'¿Í `backward'´Â ¼·Î ¹èŸÀûÀÔ´Ï´Ù" -#: locale/programs/ld-collate.c:1568 locale/programs/ld-collate.c:1614 +#: locale/programs/ld-collate.c:1571 locale/programs/ld-collate.c:1617 msgid "" "specification of sorting weight for collation symbol does not make sense" msgstr "" -#: time/zic.c:779 +#: time/zic.c:775 msgid "standard input" msgstr "Ç¥ÁØ ÀÔ·Â" -#: time/zdump.c:260 +#: time/zdump.c:268 msgid "standard output" msgstr "Ç¥ÁØ Ãâ·Â" -#: locale/programs/ld-time.c:256 +#: locale/programs/ld-time.c:257 #, c-format msgid "starting date is illegal in string %d in `era' field in category `%s'" msgstr "" -#: time/zic.c:1276 +#: time/zic.c:1274 msgid "starting year greater than ending year" msgstr "½ÃÀÛÇÏ´Â ÇØ°¡ ³¡³ª´Â Çغ¸´Ù Å®´Ï´Ù" -#: locale/programs/ld-time.c:328 +#: locale/programs/ld-time.c:330 #, c-format msgid "stopping date is illegal in string %d in `era' field in category `%s'" msgstr "" @@ -2466,35 +2578,35 @@ msgstr "svcudp_create - getsockname ºÒ°¡´É" msgid "svcudp_create: socket creation problem" msgstr "svcudp_create: ¼ÒÄÏ »ý¼º ¹®Á¦" -#: locale/programs/ld-collate.c:1191 +#: locale/programs/ld-collate.c:1194 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates element " "definition" msgstr "" -#: locale/programs/ld-collate.c:1064 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates other element " "definition" msgstr "" -#: locale/programs/ld-collate.c:1200 +#: locale/programs/ld-collate.c:1203 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates other symbol " "definition" msgstr "" -#: locale/programs/ld-collate.c:1073 +#: locale/programs/ld-collate.c:1076 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates symbol " "definition" msgstr "" -#: locale/programs/ld-collate.c:1055 locale/programs/ld-collate.c:1182 +#: locale/programs/ld-collate.c:1058 locale/programs/ld-collate.c:1185 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates symbolic name " @@ -2509,51 +2621,51 @@ msgstr "" msgid "syntax error in %s definition: %s" msgstr "%s Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½: %s" -#: locale/programs/locfile.c:620 +#: locale/programs/locfile.c:642 msgid "syntax error in `order_start' directive" msgstr "`order_start' Áö½ÃÀÚ¿¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:362 +#: locale/programs/locfile.c:384 msgid "syntax error in character class definition" msgstr "¹®ÀÚ Å¬·¡½º Á¤ÀÇ¿¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:420 +#: locale/programs/locfile.c:442 msgid "syntax error in character conversion definition" msgstr "¹®ÀÚ º¯È¯ Á¤ÀÇ¿¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:662 +#: locale/programs/locfile.c:684 msgid "syntax error in collating order definition" msgstr "" -#: locale/programs/locfile.c:512 +#: locale/programs/locfile.c:534 msgid "syntax error in collation definition" msgstr "" -#: locale/programs/locfile.c:335 +#: locale/programs/locfile.c:357 msgid "syntax error in definition of LC_CTYPE category" msgstr "LC_CTYPE ¹üÁÖÀÇ Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:278 +#: locale/programs/locfile.c:300 msgid "syntax error in definition of new character class" msgstr "" -#: locale/programs/locfile.c:288 +#: locale/programs/locfile.c:310 msgid "syntax error in definition of new character map" msgstr "»õ·Î¿î ¹®ÀÚ Áöµµ Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:873 +#: locale/programs/locfile.c:895 msgid "syntax error in message locale definition" msgstr "¸Þ½ÃÁö ·ÎÄÉÀÏ Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:784 +#: locale/programs/locfile.c:806 msgid "syntax error in monetary locale definition" msgstr "ÈÆó ·ÎÄÉÀÏ Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:811 +#: locale/programs/locfile.c:833 msgid "syntax error in numeric locale definition" msgstr "¼ýÀÚ ·ÎÄÉÀÏ Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:722 +#: locale/programs/locfile.c:744 msgid "syntax error in order specification" msgstr "" @@ -2562,57 +2674,57 @@ msgstr "" msgid "syntax error in prolog: %s" msgstr "" -#: locale/programs/locfile.c:849 +#: locale/programs/locfile.c:871 msgid "syntax error in time locale definition" msgstr "½Ã°£ ·ÎÄÉÀÏ Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½" -#: locale/programs/locfile.c:255 +#: locale/programs/locfile.c:277 msgid "syntax error: not inside a locale definition section" msgstr "" -#: catgets/gencat.c:380 catgets/gencat.c:516 catgets/gencat.c:543 +#: catgets/gencat.c:381 catgets/gencat.c:517 catgets/gencat.c:544 msgid "this is the first definition" msgstr "ÀÌ°ÍÀº ù¹ø° Á¤ÀÇÀÔ´Ï´Ù" -#: time/zic.c:1119 +#: time/zic.c:1117 msgid "time before zero" -msgstr "" +msgstr "0 ÀÌÀüÀÇ ½Ã°£" -#: time/zic.c:1127 time/zic.c:1959 time/zic.c:1978 +#: time/zic.c:1125 time/zic.c:1986 time/zic.c:2005 msgid "time overflow" msgstr "½Ã°£ Èê·¯³Ñħ" #: locale/programs/charset.c:44 msgid "too few bytes in character encoding" -msgstr "" +msgstr "¹®ÀÚ ºÎȣȿ¡ ÇÊ¿äÇÑ ¹ÙÀÌÆ®°¡ ³Ê¹« ÀûÀ½" #: locale/programs/charset.c:46 msgid "too many bytes in character encoding" -msgstr "" +msgstr "¹®ÀÚ ºÎȣȿ¡ ÇÊ¿äÇÑ ¹ÙÀÌÆ®°¡ ³Ê¹« ¸¹À½" #: locale/programs/locales.h:72 msgid "too many character classes defined" msgstr "¹®ÀÚ Å¬·¡½º°¡ ³Ê¹« ¸¹ÀÌ Á¤ÀǵǾúÀ½" -#: time/zic.c:1788 +#: time/zic.c:1815 msgid "too many leap seconds" msgstr "À±ÃÊ°¡ ³Ê¹« ¸¹À½" -#: time/zic.c:1760 +#: time/zic.c:1787 msgid "too many local time types" msgstr "Áö¿ª½ÃÀÇ Á¾·ù°¡ ³Ê¹« ¸¹À½" -#: time/zic.c:1714 +#: time/zic.c:1741 msgid "too many transitions?!" -msgstr "" +msgstr "³Ê¹« ¸¹Àº ÀüÀÌ?!" -#: locale/programs/ld-collate.c:1623 +#: locale/programs/ld-collate.c:1626 msgid "too many weights" msgstr "" -#: time/zic.c:2082 +#: time/zic.c:2109 msgid "too many, or too long, time zone abbreviations" -msgstr "" +msgstr "³Ê¹« ¸¹°Å³ª ³Ê¹« ±ä ½Ã°£´ë ¾à¾î" #: locale/programs/linereader.h:146 msgid "trailing garbage at end of line" @@ -2623,11 +2735,11 @@ msgstr "" msgid "trouble replying to prog %d\n" msgstr "ÇÁ·Î±×·¥ %d¿¡ ÀÀ´äÇÏ´Â µ¥ ¹®Á¦°¡ ÀÖÀ½\n" -#: locale/programs/ld-collate.c:1383 +#: locale/programs/ld-collate.c:1386 msgid "two lines in a row containing `...' are not allowed" msgstr "" -#: time/zic.c:1283 +#: time/zic.c:1281 msgid "typed single year" msgstr "" @@ -2642,39 +2754,36 @@ msgstr "¾Ë ¼ö ¾ø´Â ¹®ÀÚ `%s'" #: locale/programs/ld-messages.c:193 locale/programs/ld-messages.c:204 #: locale/programs/ld-messages.c:215 locale/programs/ld-messages.c:226 -#: locale/programs/ld-time.c:696 +#: locale/programs/ld-time.c:698 #, c-format msgid "unknown character in field `%s' of category `%s'" msgstr "" -#: locale/programs/locfile.c:585 +#: locale/programs/locfile.c:607 msgid "unknown collation directive" msgstr "" -#: catgets/gencat.c:477 +#: catgets/gencat.c:478 #, c-format msgid "unknown directive `%s': line ignored" msgstr "¾Ë ¼ö ¾ø´Â Áö½ÃÀÚ `%s': Çà ¹«½ÃµÊ" -#: catgets/gencat.c:456 +#: catgets/gencat.c:457 #, c-format msgid "unknown set `%s'" msgstr "¾Ë ¼ö ¾ø´Â ¼³Á¤ `%s'" -msgid "unknown signal" -msgstr "¾Ë ¼ö ¾ø´Â ½ÅÈ£" - -#: locale/programs/ld-collate.c:1367 locale/programs/ld-collate.c:1558 -#: locale/programs/ld-collate.c:1732 +#: locale/programs/ld-collate.c:1370 locale/programs/ld-collate.c:1561 +#: locale/programs/ld-collate.c:1735 #, c-format msgid "unknown symbol `%.*s': line ignored" msgstr "¾Ë ¼ö ¾ø´Â ±âÈ£ `%.*s': Çà ¹«½ÃµÊ" -#: time/zic.c:751 +#: time/zic.c:747 msgid "unruly zone" msgstr "" -#: catgets/gencat.c:961 +#: catgets/gencat.c:962 msgid "unterminated message" msgstr "Á¾·áµÇÁö ¾ÊÀº ¸Þ½ÃÁö" @@ -2686,7 +2795,7 @@ msgstr "Á¾·áµÇÁö ¾ÊÀº ¹®ÀÚ¿" msgid "unterminated symbolic name" msgstr "Á¾·áµÇÁö ¾ÊÀº ±âÈ£ À̸§" -#: locale/programs/ld-collate.c:1685 +#: locale/programs/ld-collate.c:1688 msgid "unterminated weight name" msgstr "" @@ -2694,7 +2803,7 @@ msgstr "" msgid "upper limit in range is not smaller then lower limit" msgstr "¹üÀ§ÀÇ »óÇÑÀº ÇÏÇѺ¸´Ù ÀÛÁö ¾Ê¾Æ¾ß ÇÕ´Ï´Ù" -#: time/zic.c:2025 +#: time/zic.c:2052 msgid "use of 2/29 in non leap-year" msgstr "Æò³â¿¡ 2¿ù 29ÀÏÀ» »ç¿ëÇÔ" @@ -2708,7 +2817,7 @@ msgstr "%s¿¡ ´ëÇÑ °ªÀº Á¤¼ö¿©¾ß ÇÕ´Ï´Ù" msgid "value for <%s> must lie between 1 and 4" msgstr "<%s>¿¡ ´ëÇÑ °ªÀº 1°ú 4 »çÀÌ¿¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-monetary.c:148 locale/programs/ld-numeric.c:89 +#: locale/programs/ld-monetary.c:149 locale/programs/ld-numeric.c:89 #, c-format msgid "value for field `%s' in category `%s' must not be the empty string" msgstr "" @@ -2717,7 +2826,7 @@ msgstr "" msgid "value of <mb_cur_max> must be greater than the value of <mb_cur_min>" msgstr "<mb_cur_max>ÀÇ °ªÀº <mb_cur_min>ÀÇ °ªº¸´Ù Ä¿¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-monetary.c:138 +#: locale/programs/ld-monetary.c:139 msgid "" "value of field `int_curr_symbol' in category `LC_MONETARY' does not " "correspond to a valid name in ISO 4217" @@ -2728,12 +2837,12 @@ msgid "" "value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length" msgstr "" -#: locale/programs/ld-monetary.c:370 locale/programs/ld-numeric.c:199 +#: locale/programs/ld-monetary.c:371 locale/programs/ld-numeric.c:199 #, c-format msgid "values for field `%s' in category `%s' must be smaller than 127" msgstr "" -#: locale/programs/ld-monetary.c:366 +#: locale/programs/ld-monetary.c:367 #, c-format msgid "values for field `%s' in category `%s' must not be zero" msgstr "" @@ -2742,15 +2851,15 @@ msgstr "" msgid "while opening UTMP file" msgstr "UTMP ÆÄÀÏÀ» ¿©´Â µ¿¾È" -#: catgets/gencat.c:988 +#: catgets/gencat.c:989 msgid "while opening old catalog file" msgstr "¿À·¡µÈ ¸ñ·Ï ÆÄÀÏÀ» ¿©´Â µ¿¾È" -#: db/makedb.c:353 +#: db/makedb.c:354 msgid "while reading database" msgstr "µ¥ÀÌÅͺ£À̽º¸¦ Àд µ¿¾È" -#: db/makedb.c:315 +#: db/makedb.c:316 msgid "while writing data base file" msgstr "µ¥ÀÌÅÍ º£À̽º ÆÄÀÏÀ» ¾²´Â µ¿¾È" @@ -2758,34 +2867,30 @@ msgstr "µ¥ÀÌÅÍ º£À̽º ÆÄÀÏÀ» ¾²´Â µ¿¾È" msgid "wrong number of arguments" msgstr "ÀμöÀÇ °³¼ö°¡ À߸øµÇ¾úÀ½" -#: time/zic.c:1077 +#: time/zic.c:1075 msgid "wrong number of fields on Leap line" msgstr "" -#: time/zic.c:1168 +#: time/zic.c:1166 msgid "wrong number of fields on Link line" msgstr "" -#: time/zic.c:911 +#: time/zic.c:909 msgid "wrong number of fields on Rule line" msgstr "" -#: time/zic.c:981 +#: time/zic.c:979 msgid "wrong number of fields on Zone continuation line" msgstr "" -#: time/zic.c:939 +#: time/zic.c:937 msgid "wrong number of fields on Zone line" msgstr "" -#: nis/ypclnt.c:570 -msgid "yp_all: clnttcp_create failed" -msgstr "yp_all: clnttcp_create ½ÇÆÐ" - -#: nis/ypclnt.c:772 +#: nis/ypclnt.c:811 msgid "yp_update: cannot convert host to netname\n" msgstr "" -#: nis/ypclnt.c:784 +#: nis/ypclnt.c:823 msgid "yp_update: cannot get server address\n" msgstr "yp_update: ¼¹ö ÁÖ¼Ò¸¦ ¾òÀ» ¼ö ¾ø½À´Ï´Ù\n" diff --git a/posix/execvp.c b/posix/execvp.c index 400e082937..fc37638f06 100644 --- a/posix/execvp.c +++ b/posix/execvp.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <unistd.h> #include <stdarg.h> @@ -116,6 +116,7 @@ execvp (file, argv) that we did find one but were denied access. */ got_eacces = 1; case ENOENT: + case ESTALE: /* Those errors indicate the file is missing or not executable by us, in which case we want to just try the next path directory. */ diff --git a/resolv/Banner b/resolv/Banner index d11ab500fb..a792533a9e 100644 --- a/resolv/Banner +++ b/resolv/Banner @@ -1 +1 @@ -BIND-4.9.5-P1 +BIND-4.9.6-T1A diff --git a/resolv/base64.c b/resolv/base64.c index 5d9eb6ec3d..4e7e2a06d5 100644 --- a/resolv/base64.c +++ b/resolv/base64.c @@ -281,7 +281,12 @@ b64_pton(src, target, targsize) case 2: /* Valid, means one byte of info */ /* Skip any number of spaces. */ +#ifdef _LIBC + /* To avoid warnings. */ for ( ; ch != '\0'; ch = *src++) +#else + for (NULL; ch != '\0'; ch = *src++) +#endif if (!isspace(ch)) break; /* Make sure there is another trailing = sign. */ @@ -296,7 +301,12 @@ b64_pton(src, target, targsize) * We know this char is an =. Is there anything but * whitespace after it? */ +#ifdef _LIBC + /* To avoid warnings. */ for ( ; ch != '\0'; ch = *src++) +#else + for (NULL; ch != '\0'; ch = *src++) +#endif if (!isspace(ch)) return (-1); diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 69666d062b..49aea2a719 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -123,6 +123,12 @@ static void addrsort __P((char **, int)); #define MAXPACKET 1024 #endif +/* As per RFC 1034 and 1035 a host name cannot exceed 255 octets in length. */ +#ifdef MAXHOSTNAMELEN +# undef MAXHOSTNAMELEN +#endif +#define MAXHOSTNAMELEN 256 + typedef union { HEADER hdr; u_char buf[MAXPACKET]; @@ -212,6 +218,10 @@ getanswer(answer, anslen, qname, qtype) * (i.e., with the succeeding search-domain tacked on). */ n = strlen(bp) + 1; /* for the \0 */ + if (n >= MAXHOSTNAMELEN) { + __set_h_errno (NO_RECOVERY); + return (NULL); + } host.h_name = bp; bp += n; buflen -= n; @@ -256,11 +266,15 @@ getanswer(answer, anslen, qname, qtype) /* Store alias. */ *ap++ = bp; n = strlen(bp) + 1; /* for the \0 */ + if (n >= MAXHOSTNAMELEN) { + had_error++; + continue; + } bp += n; buflen -= n; /* Get canonical name. */ n = strlen(tbuf) + 1; /* for the \0 */ - if (n > buflen) { + if (n > buflen || n >= MAXHOSTNAMELEN) { had_error++; continue; } @@ -272,14 +286,14 @@ getanswer(answer, anslen, qname, qtype) } if (qtype == T_PTR && type == T_CNAME) { n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf); - if ((n < 0) || !res_hnok(tbuf)) { + if (n < 0 || !res_hnok(tbuf)) { had_error++; continue; } cp += n; /* Get canonical name. */ n = strlen(tbuf) + 1; /* for the \0 */ - if (n > buflen) { + if (n > buflen || n >= MAXHOSTNAMELEN) { had_error++; continue; } @@ -320,6 +334,10 @@ getanswer(answer, anslen, qname, qtype) n = -1; if (n != -1) { n = strlen(bp) + 1; /* for the \0 */ + if (n >= MAXHOSTNAMELEN) { + had_error++; + break; + } bp += n; buflen -= n; } @@ -328,6 +346,10 @@ getanswer(answer, anslen, qname, qtype) host.h_name = bp; if (_res.options & RES_USE_INET6) { n = strlen(bp) + 1; /* for the \0 */ + if (n >= MAXHOSTNAMELEN) { + had_error++; + break; + } bp += n; buflen -= n; map_v4v6_hostent(&host, &bp, &buflen); @@ -395,8 +417,8 @@ getanswer(answer, anslen, qname, qtype) # endif /*RESOLVSORT*/ if (!host.h_name) { n = strlen(qname) + 1; /* for the \0 */ - if (n > buflen) - goto try_again; + if (n > buflen || n >= MAXHOSTNAMELEN) + goto no_recovery; strcpy(bp, qname); host.h_name = bp; bp += n; @@ -407,8 +429,8 @@ getanswer(answer, anslen, qname, qtype) __set_h_errno (NETDB_SUCCESS); return (&host); } - try_again: - __set_h_errno (TRY_AGAIN); + no_recovery: + __set_h_errno (NO_RECOVERY); return (NULL); } @@ -508,13 +530,12 @@ gethostbyname2(name, af) if (!isdigit(*cp) && *cp != '.') break; } - if (isxdigit(name[0]) || name[0] == ':') + if ((isxdigit(name[0]) && strchr(name, ':') != NULL) || + name[0] == ':') for (cp = name;; ++cp) { if (!*cp) { if (*--cp == '.') break; - if (!strchr (name, ':')) - break; /* * All-IPv6-legal, no dot at the end. * Fake up a hostent as if we'd actually @@ -719,8 +740,7 @@ _gethtent() if (!(cp = strpbrk(p, " \t"))) goto again; *cp++ = '\0'; - if ((_res.options & RES_USE_INET6) && - inet_pton(AF_INET6, p, host_addr) > 0) { + if (inet_pton(AF_INET6, p, host_addr) > 0) { af = AF_INET6; len = IN6ADDRSZ; } else if (inet_pton(AF_INET, p, host_addr) > 0) { @@ -757,12 +777,6 @@ _gethtent() *cp++ = '\0'; } *q = NULL; - if (_res.options & RES_USE_INET6) { - char *bp = hostbuf; - int buflen = sizeof hostbuf; - - map_v4v6_hostent(&host, &bp, &buflen); - } __set_h_errno (NETDB_SUCCESS); return (&host); } diff --git a/resolv/inet_net_pton.c b/resolv/inet_net_pton.c index 0c2693136d..bf6fe02ed8 100644 --- a/resolv/inet_net_pton.c +++ b/resolv/inet_net_pton.c @@ -166,7 +166,7 @@ inet_net_pton_ipv4(src, dst, size) goto emsgsize; } - /* Fiery death and destruction unless we prefetched EOS. */ + /* Firey death and destruction unless we prefetched EOS. */ if (ch != '\0') goto enoent; diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c index 959aa2f21d..f7721840b7 100644 --- a/resolv/nss_dns/dns-host.c +++ b/resolv/nss_dns/dns-host.c @@ -99,6 +99,11 @@ #else # define MAXPACKET 1024 #endif +/* As per RFC 1034 and 1035 a host name cannot exceed 255 octets in length. */ +#ifdef MAXHOSTNAMELEN +# undef MAXHOSTNAMELEN +#endif +#define MAXHOSTNAMELEN 256 static const char AskedForGot[] = "\ gethostby*.getanswer: asked for \"%s\", got \"%s\""; @@ -197,8 +202,8 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af, int size, n, status; if (af == AF_INET6 && len == IN6ADDRSZ && - (bcmp (uaddr, mapped, sizeof mapped) == 0 - || bcmp (uaddr, tunnelled, sizeof tunnelled) == 0)) + (memcmp (uaddr, mapped, sizeof mapped) == 0 + || memcmp (uaddr, tunnelled, sizeof tunnelled) == 0)) { /* Unmap. */ addr += sizeof mapped; @@ -260,7 +265,7 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af, result->h_addrtype = af; result->h_length = len; - bcopy (addr, host_data->host_addr, len); + memcpy (host_data->host_addr, addr, len); host_data->h_addr_ptrs[0] = (char *) host_data->host_addr; host_data->h_addr_ptrs[1] = NULL; if (af == AF_INET && (_res.options & RES_USE_INET6)) @@ -342,6 +347,11 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, * (i.e., with the succeeding search-domain tacked on). */ n = strlen (bp) + 1; /* for the \0 */ + if (n >= MAXHOSTNAMELEN) + { + __set_h_errno (NO_RECOVERY); + return NSS_STATUS_TRYAGAIN; + } result->h_name = bp; bp += n; linebuflen -= n; @@ -396,11 +406,16 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, /* Store alias. */ *ap++ = bp; n = strlen (bp) + 1; /* For the \0. */ + if (n >= MAXHOSTNAMELEN) + { + ++had_error; + continue; + } bp += n; linebuflen -= n; /* Get canonical name. */ n = strlen (tbuf) + 1; /* For the \0. */ - if (n > buflen) + if ((size_t) n > buflen || n >= MAXHOSTNAMELEN) { ++had_error; continue; @@ -423,7 +438,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, cp += n; /* Get canonical name. */ n = strlen (tbuf) + 1; /* For the \0. */ - if (n > buflen) + if ((size_t) n > buflen || n >= MAXHOSTNAMELEN) { ++had_error; continue; @@ -469,6 +484,11 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, if (n != -1) { n = strlen (bp) + 1; /* for the \0 */ + if (n >= MAXHOSTNAMELEN) + { + ++had_error; + break; + } bp += n; linebuflen -= n; } @@ -478,6 +498,11 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, if (_res.options & RES_USE_INET6) { n = strlen (bp) + 1; /* for the \0 */ + if (n >= MAXHOSTNAMELEN) + { + ++had_error; + break; + } bp += n; linebuflen -= n; map_v4v6_hostent (result, &bp, &linebuflen); @@ -520,7 +545,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, cp += n; continue; } - bcopy (cp, *hap++ = bp, n); + memcpy (*hap++ = bp, cp, n); bp += n; cp += n; linebuflen -= n; @@ -549,8 +574,8 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, if (result->h_name == NULL) { n = strlen (qname) + 1; /* For the \0. */ - if (n > linebuflen) - goto try_again; + if (n > linebuflen || n >= MAXHOSTNAMELEN) + goto no_recovery; strcpy (bp, qname); /* Cannot overflow. */ result->h_name = bp; bp += n; @@ -562,7 +587,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, *h_errnop = NETDB_SUCCESS; return NSS_STATUS_SUCCESS; } -try_again: - *h_errnop = TRY_AGAIN; + no_recovery: + *h_errnop = NO_RECOVERY; return NSS_STATUS_TRYAGAIN; } diff --git a/resolv/res_comp.c b/resolv/res_comp.c index a9ca69e55f..ed4bcdc58f 100644 --- a/resolv/res_comp.c +++ b/resolv/res_comp.c @@ -94,7 +94,7 @@ dn_expand(msg, eomorig, comp_dn, exp_dn, length) register char *dn; register int n, c; char *eom; - int len = -1, checked = 0; + int len = -1, checked = 0, octets = 0; dn = exp_dn; cp = comp_dn; @@ -108,6 +108,9 @@ dn_expand(msg, eomorig, comp_dn, exp_dn, length) */ switch (n & INDIR_MASK) { case 0: + octets += (n + 1); + if (octets > MAXCDNAME) + return (-1); if (dn != exp_dn) { if (dn >= eom) return (-1); @@ -179,6 +182,8 @@ dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr) dn = (u_char *)exp_dn; cp = comp_dn; + if (length > MAXCDNAME) + length = MAXCDNAME; eob = cp + length; lpp = cpp = NULL; if (dnptrs != NULL) { diff --git a/resolv/res_debug.c b/resolv/res_debug.c index fa2ca80c34..3afe8c23a8 100644 --- a/resolv/res_debug.c +++ b/resolv/res_debug.c @@ -1146,40 +1146,47 @@ static u_int8_t precsize_aton(strptr) char **strptr; { - unsigned int mval = 0, cmval = 0; u_int8_t retval = 0; - register char *cp; - register int exponent; - register int mantissa; + char *cp; + int exponent = 0; + int mantissa = 0; cp = *strptr; + while (isdigit(*cp)) { + if (mantissa == 0) + mantissa = *cp - '0'; + else + exponent++; + cp++; + } - while (isdigit(*cp)) - mval = mval * 10 + (*cp++ - '0'); - - if (*cp == '.') { /* centimeters */ + if (*cp == '.') { cp++; if (isdigit(*cp)) { - cmval = (*cp++ - '0') * 10; + if (mantissa == 0) + mantissa = *cp - '0'; + else + exponent++; + cp++; + if (isdigit(*cp)) { - cmval += (*cp++ - '0'); + if (mantissa == 0) + mantissa = *cp - '0'; + else + exponent++; + cp++; } + else + exponent++; } } - cmval = (mval * 100) + cmval; - - for (exponent = 0; exponent < 9; exponent++) - if (cmval < poweroften[exponent+1]) - break; - - mantissa = cmval / poweroften[exponent]; - if (mantissa > 9) - mantissa = 9; + else + exponent += 2; + if (mantissa == 0) + exponent = 0; retval = (mantissa << 4) | exponent; - *strptr = cp; - return (retval); } diff --git a/resolv/res_init.c b/resolv/res_init.c index 91f9f40094..755b88d466 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -159,7 +159,7 @@ res_init() register FILE *fp; register char *cp, **pp; register int n; - char buf[BUFSIZ]; + char buf[MAXDNAME]; int nserv = 0; /* number of nameserver records read from file */ int haveenv = 0; int havesearch = 0; diff --git a/resolv/res_send.c b/resolv/res_send.c index 60d8ef2fb9..cde6a845d5 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -601,6 +601,11 @@ read_len: if ((long) timeout.tv_sec <= 0) timeout.tv_sec = 1; timeout.tv_usec = 0; + if (s+1 > FD_SETSIZE) { + Perror(stderr, "s+1 > FD_SETSIZE", EMFILE); + res_close(); + goto next_ns; + } wait: FD_ZERO(&dsmask); FD_SET(s, &dsmask); diff --git a/signal/sigandset.c b/signal/sigandset.c index bb3747c19d..962cf015d4 100644 --- a/signal/sigandset.c +++ b/signal/sigandset.c @@ -18,6 +18,8 @@ #include <errno.h> #include <signal.h> +#define __need_NULL +#include <stddef.h> /* Combine sets LEFT and RIGHT by logical AND and place result in DEST. */ int diff --git a/signal/sigisempty.c b/signal/sigisempty.c index 50dc343491..24e166d00e 100644 --- a/signal/sigisempty.c +++ b/signal/sigisempty.c @@ -18,6 +18,8 @@ #include <errno.h> #include <signal.h> +#define __need_NULL +#include <stddef.h> /* Test whether SET is empty. */ int diff --git a/signal/sigorset.c b/signal/sigorset.c index e8ae22fd5a..474cff3e28 100644 --- a/signal/sigorset.c +++ b/signal/sigorset.c @@ -18,6 +18,8 @@ #include <errno.h> #include <signal.h> +#define __need_NULL +#include <stddef.h> /* Combine sets LEFT and RIGHT by logical OR and place result in DEST. */ int diff --git a/socket/sys/socket.h b/socket/sys/socket.h index bb4444d192..0a1102ada9 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -1,5 +1,5 @@ /* Declarations of socket constants, types, and functions. - Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 94, 95, 96, 97 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 @@ -18,8 +18,8 @@ Boston, MA 02111-1307, USA. */ #ifndef _SYS_SOCKET_H - #define _SYS_SOCKET_H 1 + #include <features.h> __BEGIN_DECLS @@ -49,14 +49,14 @@ struct osockaddr uses with any of the listed types to be allowed without complaint. G++ 2.7 does not support transparent unions so there we want the old-style declaration, too. */ -#if (!defined (__GNUC__) || __GNUC__ < 2 || defined(__cplusplus) || \ +#if (!defined __GNUC__ || __GNUC__ < 2 || defined __cplusplus || \ (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) -#define __SOCKADDR_ARG struct sockaddr * -#define __CONST_SOCKADDR_ARG __const struct sockaddr * +# define __SOCKADDR_ARG struct sockaddr * +# define __CONST_SOCKADDR_ARG __const struct sockaddr * #else /* Add more `struct sockaddr_AF' types here as necessary. These are all the ones I found on NetBSD and Linux. */ -#define __SOCKADDR_ALLTYPES \ +# define __SOCKADDR_ALLTYPES \ __SOCKADDR_ONETYPE (sockaddr) \ __SOCKADDR_ONETYPE (sockaddr_at) \ __SOCKADDR_ONETYPE (sockaddr_ax25) \ @@ -71,14 +71,14 @@ struct osockaddr __SOCKADDR_ONETYPE (sockaddr_un) \ __SOCKADDR_ONETYPE (sockaddr_x25) -#define __SOCKADDR_ONETYPE(type) struct type *__##type##__; +# define __SOCKADDR_ONETYPE(type) struct type *__##type##__; typedef union { __SOCKADDR_ALLTYPES } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); -#undef __SOCKADDR_ONETYPE -#define __SOCKADDR_ONETYPE(type) __const struct type *__##type##__; +# undef __SOCKADDR_ONETYPE +# define __SOCKADDR_ONETYPE(type) __const struct type *__##type##__; typedef union { __SOCKADDR_ALLTYPES } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); -#undef __SOCKADDR_ONETYPE +# undef __SOCKADDR_ONETYPE #endif @@ -95,20 +95,20 @@ extern int socketpair __P ((int __domain, int __type, int __protocol, int __fds[2])); /* Give the socket FD the local address ADDR (which is LEN bytes long). */ -extern int bind __P ((int __fd, __CONST_SOCKADDR_ARG __addr, size_t __len)); +extern int bind __P ((int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)); /* Put the local address of FD into *ADDR and its length in *LEN. */ extern int getsockname __P ((int __fd, __SOCKADDR_ARG __addr, - size_t *__len)); + socklen_t *__len)); /* Open a connection on socket FD to peer at ADDR (which LEN bytes long). For connectionless socket types, just set the default address to send to and the only address from which to accept transmissions. Return 0 on success, -1 for errors. */ extern int __connect __P ((int __fd, - __CONST_SOCKADDR_ARG __addr, size_t __len)); + __CONST_SOCKADDR_ARG __addr, socklen_t __len)); extern int connect __P ((int __fd, - __CONST_SOCKADDR_ARG __addr, size_t __len)); + __CONST_SOCKADDR_ARG __addr, socklen_t __len)); /* Put the address of the peer connected to socket FD into *ADDR (which is *LEN bytes long), and its actual length into *LEN. */ @@ -130,14 +130,14 @@ extern int recv __P ((int __fd, __ptr_t __buf, size_t __n, int __flags)); ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */ extern int sendto __P ((int __fd, __const __ptr_t __buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, - size_t __addr_len)); + socklen_t __addr_len)); /* Read N bytes into BUF through socket FD. If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of the sender, and store the actual size of the address in *ADDR_LEN. Returns the number of bytes read or -1 for errors. */ extern int recvfrom __P ((int __fd, __ptr_t __buf, size_t __n, int __flags, - __SOCKADDR_ARG __addr, size_t *__addr_len)); + __SOCKADDR_ARG __addr, socklen_t *__addr_len)); /* Send a message described MESSAGE on socket FD. @@ -154,13 +154,13 @@ extern int recvmsg __P ((int __fd, struct msghdr *__message, int __flags)); into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's actual length. Returns 0 on success, -1 for errors. */ extern int getsockopt __P ((int __fd, int __level, int __optname, - __ptr_t __optval, size_t *__optlen)); + __ptr_t __optval, socklen_t *__optlen)); /* Set socket FD's option OPTNAME at protocol level LEVEL to *OPTVAL (which is OPTLEN bytes long). Returns 0 on success, -1 for errors. */ extern int setsockopt __P ((int __fd, int __level, int __optname, - __ptr_t __optval, size_t __optlen)); + __ptr_t __optval, socklen_t __optlen)); /* Prepare to accept connections on socket FD. @@ -174,7 +174,7 @@ extern int listen __P ((int __fd, unsigned int __n)); peer and *ADDR_LEN to the address's actual length, and return the new socket's descriptor, or -1 for errors. */ extern int accept __P ((int __fd, __SOCKADDR_ARG __addr, - size_t *__addr_len)); + socklen_t *__addr_len)); /* Shut down all or part of the connection open on socket FD. HOW determines what to shut down: diff --git a/stdio-common/bug3.c b/stdio-common/bug3.c index 3bb0158a21..3814d6ab75 100644 --- a/stdio-common/bug3.c +++ b/stdio-common/bug3.c @@ -7,7 +7,7 @@ DEFUN_VOID(main) { FILE *f; int i; - const char filename[] = "/tmp/bugtest"; + const char filename[] = "/tmp/bug3.test"; f = fopen(filename, "w+"); for (i=0; i<9000; i++) diff --git a/stdio-common/bug4.c b/stdio-common/bug4.c index 492a41d923..d6f92a307a 100644 --- a/stdio-common/bug4.c +++ b/stdio-common/bug4.c @@ -14,7 +14,7 @@ DEFUN(main, (argc, argv), FILE *f; int i; char buffer[31]; - const char filename[] = "/tmp/bugtest"; + const char filename[] = "/tmp/bug4.test"; while ((i = getopt (argc, argv, "rw")) != -1) switch (i) diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index dede144b8d..49292e5b7c 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -1,5 +1,5 @@ /* Floating point output for `printf'. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. @@ -812,13 +812,24 @@ __printf_fp (FILE *fp, { char *tp = cp; - if (digit == '5') + if (digit == '5' && (*(cp - 1) & 1) == 0) /* This is the critical case. */ if (fracsize == 1 && frac[0] == 0) /* Rest of the number is zero -> round to even. (IEEE 754-1985 4.1 says this is the default rounding.) */ - if ((*(cp - 1) & 1) == 0) - goto do_expo; + goto do_expo; + else if (scalesize == 0) + { + /* Here we have to see whether all limbs are zero since no + normalization happened. */ + size_t lcnt = fracsize; + while (lcnt >= 1 && frac[lcnt - 1] == 0) + --lcnt; + if (lcnt == 0) + /* Rest of the number is zero -> round to even. + (IEEE 754-1985 4.1 says this is the default rounding.) */ + goto do_expo; + } if (fracdig_no > 0) { diff --git a/stdio-common/tfformat.c b/stdio-common/tfformat.c index cc9a3843cf..f00d0de253 100644 --- a/stdio-common/tfformat.c +++ b/stdio-common/tfformat.c @@ -14,7 +14,7 @@ sprint_double_type sprint_doubles[] = { {__LINE__, 30.3, "< +30.3>", "<%+15.10g>"}, {__LINE__, 10.0, "<10.00>", "<%5.2f>"}, - + {__LINE__, 1.002121970718271e+05, "100212.19707 ", "%0-15.5f"}, {__LINE__, -1.002121970718271e+05, "-100212.19707 ", "%0-15.5f"}, {__LINE__, 1.002121970718271e+05, "000100212.19707", "%015.5f"}, @@ -25,7 +25,7 @@ sprint_double_type sprint_doubles[] = {__LINE__, -1.002121970718271e+05, "-00100212.19707", "% 015.5f"}, {__LINE__, 1.002121970718271e+05, "+100212.19707 ", "%+-15.5f"}, {__LINE__, -1.002121970718271e+05, "-100212.19707 ", "%+-15.5f"}, - + {__LINE__, -1.002121970718271e+29, "-1.0E+29", "%.1E"}, {__LINE__, -1.002126048612756e-02, "-1.002126E-02", "%+#E"}, {__LINE__, -1.002653755271637e+00, "-1.00265", "%G"}, @@ -4005,7 +4005,11 @@ sprint_double_type sprint_doubles[] = #endif {__LINE__, 9.978034352999867e+15, "9.978034e+15", "%2.6e"}, {__LINE__, 9.998315286730175e-30, "9.998315e-30", "%6e"}, - + {__LINE__, 1.25, "1.2", "%.1f"}, + {__LINE__, 11.25, "11.2", "%.1f"}, + {__LINE__, 1.75, "1.8", "%.1f"}, + {__LINE__, 11.75, "11.8", "%.1f"}, + {0 } }; diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c index d76d95b1b7..d0ff6c8b41 100644 --- a/stdio-common/tstscanf.c +++ b/stdio-common/tstscanf.c @@ -140,5 +140,39 @@ main (int argc, char **argv) if (out != stdout) pclose (out); + fputs ("Test 3:\n", out); + { + int res, val, n; + + res = sscanf ("-242", "%3o%n", &val, &n); + printf ("res = %d, val = %d, n = %d\n", res, val, n); + if (res != 1 || val != -20 || n != 3) + return 1; + } + + fputs ("Test 4:\n", out); + { + double a = 0, b = 0; + int res, n; + + res = sscanf ("1234567", "%3lg%3lg%n", &a, &b, &n); + printf ("res = %d, a = %g, b = %g, n = %d\n", res, a, b, n); + + if (res != 2 || a != 123 || b != 456 || n != 6) + return 1; + + res = sscanf ("0", "%lg", &a); + printf ("res = %d, a = %g\n", res, a); + + if (res != 1 || a != 0) + exit (EXIT_FAILURE); + + res = sscanf ("1e3", "%lg%n", &a, &n); + printf ("res = %d, a = %g, n = %d\n", res, a, n); + + if (res != 1 || a != 1000 || n != 3) + exit (EXIT_FAILURE); + } + exit(EXIT_SUCCESS); } diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index 256f3eab33..cba6847266 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -54,8 +54,10 @@ # undef va_list # define va_list _IO_va_list -# define ungetc(c, s) (--read_in, _IO_ungetc (c, s)) -# define inchar() ((c = _IO_getc_unlocked (s)), (void) ++read_in, c) +# define ungetc(c, s) ((void) ((int) c != EOF && --read_in), \ + _IO_ungetc (c, s)) +# define inchar() ((c = _IO_getc_unlocked (s)), \ + (void) (c != EOF && ++read_in), c) # define encode_error() do { \ if (errp != NULL) *errp |= 4; \ _IO_funlockfile (s); \ @@ -98,8 +100,8 @@ _IO_flockfile (S) # define UNLOCK_STREAM __libc_cleanup_region_end (1) #else -# define ungetc(c, s) (--read_in, ungetc (c, s)) -# define inchar() ((c = getc (s)), (void) ++read_in, c) +# define ungetc(c, s) ((void) (c != EOF && --read_in), ungetc (c, s)) +# define inchar() ((c = getc (s)), (void) (c != EOF && ++read_in), c) # define encode_error() do { \ funlockfile (s); \ __set_errno (EILSEQ); \ @@ -717,9 +719,6 @@ __vfscanf (FILE *s, const char *format, va_list argptr) STRING_ADD_CHAR (str, c, char); } while ((width <= 0 || --width > 0) && inchar () != EOF); - if (c == EOF) - --read_in; - if (!(flags & SUPPRESS)) { *str = '\0'; @@ -943,14 +942,16 @@ __vfscanf (FILE *s, const char *format, va_list argptr) else if ((flags & GROUP) && c == thousands && !got_dot) ADDW (c); else - break; + { + /* The last read character is not part of the number + anymore. */ + ungetc (c, s); + break; + } if (width > 0) --width; } - while (inchar () != EOF && width != 0); - - /* The last read character is not part of the number anymore. */ - ungetc (c, s); + while (width != 0 && inchar () != EOF); if (wpsize == 0) conv_error (); diff --git a/stdlib/strfmon.c b/stdlib/strfmon.c index 469908c1df..9ca4fe0361 100644 --- a/stdlib/strfmon.c +++ b/stdlib/strfmon.c @@ -1,5 +1,5 @@ /* Formatting a monetary value according to the current locale. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com> and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996. @@ -151,6 +151,13 @@ strfmon (char *s, size_t maxsize, const char *format, ...) { case '=': /* Set fill character. */ pad = *++fmt; + if (pad == '\0') + { + /* Premature EOS. */ + __set_errno (EINVAL); + va_end (ap); + return -1; + } continue; case '^': /* Don't group digits. */ group = 0; diff --git a/stdlib/tst-strtol.c b/stdlib/tst-strtol.c index 8719d4b9ed..62acafbfe3 100644 --- a/stdlib/tst-strtol.c +++ b/stdlib/tst-strtol.c @@ -6,6 +6,7 @@ #include <errno.h> #include <stdlib.h> #include <strings.h> +#include <limits.h> struct ltest { @@ -17,7 +18,7 @@ struct ltest }; static const struct ltest tests[] = { -#if ~0UL == 0xffffffff +#if LONG_MAX == 0x7fffffff /* First, signed numbers. */ { " -17", -17, 0, 0, 0 }, { " +0x123fg", 0x123f, 0, 'g', 0 }, diff --git a/string/Makefile b/string/Makefile index 97f2eedd79..2d8246e146 100644 --- a/string/Makefile +++ b/string/Makefile @@ -36,7 +36,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ swab strfry memfrob memmem \ $(addprefix argz-,append count create ctsep next \ delete extract insert stringify \ - addsep) \ + addsep replace) \ envz basename tests := tester testcopy test-ffs tst-strlen stratcliff diff --git a/string/argz-addsep.c b/string/argz-addsep.c index 7405e9ad1a..38f3138ec1 100644 --- a/string/argz-addsep.c +++ b/string/argz-addsep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996. @@ -56,4 +56,4 @@ __argz_add_sep (char **argz, size_t *argz_len, const char *string, int delim) return 0; } -weak_alias (__argz_create_sep, argz_create_sep) +weak_alias (__argz_add_sep, argz_add_sep) diff --git a/string/argz-replace.c b/string/argz-replace.c new file mode 100644 index 0000000000..4d658f4713 --- /dev/null +++ b/string/argz-replace.c @@ -0,0 +1,135 @@ +/* String replacement in an argz vector + Copyright (C) 1997 Free Software Foundation, Inc. + Written by Miles Bader <miles@gnu.ai.mit.edu> + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include <stdlib.h> +#include <argz.h> + +/* Append BUF, of length BUF_LEN to *TO, of length *TO_LEN, reallocating and + updating *TO & *TO_LEN appropriately. If an allocation error occurs, + *TO's old value is freed, and *TO is set to 0. */ +static void +str_append (char **to, size_t *to_len, const char *buf, const size_t buf_len) +{ + size_t new_len = *to_len + buf_len; + char *new_to = realloc (*to, new_len + 1); + + if (new_to) + { + memcpy (new_to + *to_len, buf, buf_len); + new_to[new_len] = '\0'; + *to = new_to; + *to_len = new_len; + } + else + { + free (*to); + *to = 0; + } +} + +/* Replace any occurances of the string STR in ARGZ with WITH, reallocating + ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be + incremented by number of replacements performed. */ +error_t +__argz_replace (char **argz, size_t *argz_len, const char *str, const char *with, + unsigned *replace_count) +{ + error_t err = 0; + + if (str && *str) + { + char *arg = 0; + char *src = *argz; + size_t src_len = *argz_len; + char *dst = 0; + size_t dst_len = 0; + int delayed_copy = 1; /* True while we've avoided copying anything. */ + size_t str_len = strlen (str), with_len = strlen (with); + + while (!err && (arg = argz_next (src, src_len, arg))) + { + char *match = strstr (arg, str); + if (match) + { + char *from = match + str_len; + size_t to_len = match - arg; + char *to = strndup (arg, to_len); + + while (to && from) + { + str_append (&to, &to_len, with, with_len); + if (to) + { + match = strstr (from, str); + if (match) + { + str_append (&to, &to_len, from, match - from); + from = match + str_len; + } + else + { + str_append (&to, &to_len, from, strlen (from)); + from = 0; + } + } + } + + if (to) + { + if (delayed_copy) + /* We avoided copying SRC to DST until we found a match; + now that we've done so, copy everything from the start + of SRC. */ + { + if (arg > src) + err = argz_append (&dst, &dst_len, src, (arg - src)); + delayed_copy = 0; + } + if (! err) + err = argz_add (&dst, &dst_len, to); + free (to); + } + else + err = ENOMEM; + + if (replace_count) + (*replace_count)++; + } + else if (! delayed_copy) + err = argz_add (&dst, &dst_len, arg); + } + + if (! err) + { + if (! delayed_copy) + /* We never found any instances of str. */ + { + if (src) + free (src); + *argz = dst; + *argz_len = dst_len; + } + } + else if (dst_len > 0) + free (dst); + } + + return err; +} +weak_alias (__argz_replace, argz_replace) diff --git a/string/argz.h b/string/argz.h index e17b742cf7..71e94c9167 100644 --- a/string/argz.h +++ b/string/argz.h @@ -17,9 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __ARGZ_H__ +#ifndef _ARGZ_H +#define _ARGZ_H 1 -#define __ARGZ_H__ 1 #include <features.h> #define __need_error_t @@ -103,6 +103,16 @@ extern error_t __argz_insert __P ((char **__argz, size_t *__argz_len, char *__before, __const char *__entry)); extern error_t argz_insert __P ((char **__argz, size_t *__argz_len, char *__before, __const char *__entry)); + +/* Replace any occurances of the string STR in ARGZ with WITH, reallocating + ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be + incremented by number of replacements performed. */ +extern error_t __argz_replace (char **__argz, size_t *__argz_len, + __const char *__str, __const char *__with, + unsigned *__replace_count); +extern error_t argz_replace (char **__argz, size_t *__argz_len, + __const char *__str, __const char *__with, + unsigned *__replace_count); /* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there are no more. If entry is NULL, then the first entry is returned. This diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile index 841dc980a8..5fe8e4ee7f 100644 --- a/sysdeps/alpha/Makefile +++ b/sysdeps/alpha/Makefile @@ -44,3 +44,7 @@ sysdep-CFLAGS += -mno-fp-regs endif divrem := divl divq reml remq + +# For now, build everything with full IEEE math support. +# TODO: build separate libm and libm-ieee. +sysdep-CFLAGS += -mieee diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h index 219ea55f24..bcf73e857e 100644 --- a/sysdeps/alpha/fpu/fpu_control.h +++ b/sysdeps/alpha/fpu/fpu_control.h @@ -1,23 +1,22 @@ -/* FPU control word bits. Alpha version. -Copyright (C) 1996 Free Software Foundation, Inc. -Contributed by Olaf Flebbe. - -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +/* FPU control word bits. Alpha-maped-to-Intel version. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Olaf Flebbe. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _ALPHA_FPU_CONTROL_H #define _ALPHA_FPU_CONTROL_H @@ -91,11 +90,12 @@ Cambridge, MA 02139, USA. */ qualifier. By setting the dynamic rounding mode to +infinity, one can use /d to get round to +infinity with no extra overhead (so long as the default isn't changed, of course...) - - exceptions on overflow, zero divide and NaN */ -#define _FPU_DEFAULT 0x1f72 + - no exceptions enabled. */ + +#define _FPU_DEFAULT 0x137f /* IEEE: same as above, but exceptions */ -#define _FPU_IEEE 0x1f7f +#define _FPU_IEEE 0x137f /* Type of the control word. */ typedef unsigned int fpu_control_t; diff --git a/sysdeps/generic/socketbits.h b/sysdeps/generic/socketbits.h index 5d85a8e079..7b951922c9 100644 --- a/sysdeps/generic/socketbits.h +++ b/sysdeps/generic/socketbits.h @@ -27,6 +27,8 @@ __BEGIN_DECLS #define __need_size_t #include <stddef.h> +/* Type for length arguments in socket calls. */ +typedef unsigned int socklen_t; /* Types of sockets. */ enum __socket_type @@ -143,13 +145,15 @@ enum struct msghdr { __ptr_t msg_name; /* Address to send to/receive from. */ - size_t msg_namelen; /* Length of address data. */ + socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ + int msg_iovlen; /* Number of elements in the vector. */ __ptr_t msg_accrights; /* Access rights information. */ - size_t msg_accrightslen; /* Length of access rights information. */ + socklen_t msg_accrightslen; /* Length of access rights information. */ + + int msg_flags; /* Flags in received message. */ }; diff --git a/sysdeps/i386/fpu/__math.h b/sysdeps/i386/fpu/__math.h index 78b2467b65..4fb0af7965 100644 --- a/sysdeps/i386/fpu/__math.h +++ b/sysdeps/i386/fpu/__math.h @@ -380,13 +380,17 @@ hypot (double __x, double __y) return sqrt (__x * __x + __y * __y); } +/* We cannot rely on M_SQRT being defined. So we do it for ourself + here. */ +# define __M_SQRT2 _Mldbl(1.41421356237309504880) /* sqrt(2) */ + __MATH_INLINE double log1p (double __x); __MATH_INLINE double log1p (double __x) { register double __value; - if (fabs (__x) >= 1.0 - 0.5 * M_SQRT2) + if (fabs (__x) >= 1.0 - 0.5 * __M_SQRT2) __value = log (1.0 + __x); else __asm __volatile__ diff --git a/sysdeps/libm-i387/s_asinh.S b/sysdeps/libm-i387/s_asinh.S index a71d0b66f4..a4c52cb67c 100644 --- a/sysdeps/libm-i387/s_asinh.S +++ b/sysdeps/libm-i387/s_asinh.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -49,6 +49,10 @@ ENTRY(__asinh) movl $0x7fffffff, %eax andl %ecx, %eax andl $0x80000000, %ecx + movl %eax, %edx + orl $0x800fffff, %edx + incl %edx + jz 7f // x in ±Inf or NaN xorl %ecx, 8(%esp) fldl 4(%esp) // |x| cmpl $0x3e300000, %eax @@ -83,6 +87,9 @@ ENTRY(__asinh) fchs 4: ret +7: fldl 4(%esp) + ret + 6: faddl MO(one) fyl2x jecxz 4f diff --git a/sysdeps/libm-i387/s_asinhf.S b/sysdeps/libm-i387/s_asinhf.S index f47bc9e0ac..6369e19ac6 100644 --- a/sysdeps/libm-i387/s_asinhf.S +++ b/sysdeps/libm-i387/s_asinhf.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -49,6 +49,10 @@ ENTRY(__asinhf) movl $0x7fffffff, %eax andl %ecx, %eax andl $0x80000000, %ecx + movl %eax, %edx + orl $0x807fffff, %edx + incl %edx + jz 7f // x in ±Inf or NaN xorl %ecx, 8(%esp) flds 4(%esp) // |x| cmpl $0x38000000, %eax @@ -83,6 +87,9 @@ ENTRY(__asinhf) fchs 4: ret +7: flds 4(%esp) + ret + 6: faddl MO(one) fyl2x jecxz 4f diff --git a/sysdeps/libm-i387/s_asinhl.S b/sysdeps/libm-i387/s_asinhl.S index e112244908..62e29bc58e 100644 --- a/sysdeps/libm-i387/s_asinhl.S +++ b/sysdeps/libm-i387/s_asinhl.S @@ -1,5 +1,5 @@ /* ix87 specific implementation of arcsinh. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -56,6 +56,10 @@ ENTRY(__asinhl) movl $0x7fff, %eax andl %ecx, %eax andl $0x8000, %ecx + movl %eax, %edx + orl $0xffff8000, %edx + incl %edx + jz 7f // x in ±Inf or NaN xorl %ecx, 12(%esp) fldt 4(%esp) // |x| cmpl $0x3fde, %eax @@ -90,6 +94,9 @@ ENTRY(__asinhl) fchs 4: ret +7: fldt 4(%esp) + ret + 6: faddl MO(one) fyl2x jecxz 4f diff --git a/sysdeps/libm-ieee754/k_standard.c b/sysdeps/libm-ieee754/k_standard.c index ada1df1a99..4dd2b11221 100644 --- a/sysdeps/libm-ieee754/k_standard.c +++ b/sysdeps/libm-ieee754/k_standard.c @@ -117,7 +117,7 @@ static double zero = 0.0; /* used as const */ exc.retval = NAN; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("acos: DOMAIN error\n", 19); } @@ -137,7 +137,7 @@ static double zero = 0.0; /* used as const */ exc.retval = NAN; if(_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("asin: DOMAIN error\n", 19); } @@ -157,7 +157,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE; if(_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("atan2: DOMAIN error\n", 20); } @@ -177,7 +177,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -194,7 +194,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -211,7 +211,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -225,7 +225,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -241,7 +241,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y0: DOMAIN error\n", 17); } @@ -260,7 +260,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y0: DOMAIN error\n", 17); } @@ -279,7 +279,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y1: DOMAIN error\n", 17); } @@ -298,7 +298,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("y1: DOMAIN error\n", 17); } @@ -317,7 +317,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("yn: DOMAIN error\n", 17); } @@ -336,7 +336,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("yn: DOMAIN error\n", 17); } @@ -356,7 +356,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -373,7 +373,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("lgamma: SING error\n", 19); } @@ -392,7 +392,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log: SING error\n", 16); } @@ -411,7 +411,7 @@ static double zero = 0.0; /* used as const */ exc.retval = NAN; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log: DOMAIN error\n", 18); } @@ -431,7 +431,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log10: SING error\n", 18); } @@ -451,7 +451,7 @@ static double zero = 0.0; /* used as const */ exc.retval = NAN; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("log10: DOMAIN error\n", 20); } @@ -467,7 +467,7 @@ static double zero = 0.0; /* used as const */ exc.name = type < 100 ? "pow" : (type < 200 ? "powf" : "powl"); exc.retval = zero; if (_LIB_VERSION != _SVID_) exc.retval = 1.0; - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { (void) WRITE2("pow(0,0): DOMAIN error\n", 23); __set_errno (EDOM); } @@ -489,7 +489,7 @@ static double zero = 0.0; /* used as const */ } if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -502,7 +502,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -518,7 +518,7 @@ static double zero = 0.0; /* used as const */ exc.retval = -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("pow(0,neg): DOMAIN error\n", 25); } @@ -537,7 +537,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("pow(0,neg): DOMAIN error\n", 25); } @@ -556,7 +556,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero/zero; /* X/Open allow NaN */ if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("neg**non-integral: DOMAIN error\n", 32); } @@ -576,7 +576,7 @@ static double zero = 0.0; /* used as const */ exc.retval = ( (x>zero) ? HUGE_VAL : -HUGE_VAL); if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -593,7 +593,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("sqrt: DOMAIN error\n", 19); } @@ -613,7 +613,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("fmod: DOMAIN error\n", 20); } @@ -631,7 +631,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("remainder: DOMAIN error\n", 24); } @@ -648,7 +648,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("acosh: DOMAIN error\n", 20); } @@ -665,7 +665,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero/zero; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("atanh: DOMAIN error\n", 20); } @@ -682,7 +682,7 @@ static double zero = 0.0; /* used as const */ exc.retval = x/zero; /* sign(x)*inf */ if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("atanh: SING error\n", 18); } @@ -699,7 +699,7 @@ static double zero = 0.0; /* used as const */ exc.retval = x > zero ? HUGE_VAL : -HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -713,7 +713,7 @@ static double zero = 0.0; /* used as const */ exc.retval = __copysign(zero,x); if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -726,7 +726,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); @@ -743,7 +743,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); @@ -760,7 +760,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); @@ -777,7 +777,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); @@ -794,7 +794,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); @@ -811,7 +811,7 @@ static double zero = 0.0; /* used as const */ exc.retval = zero; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2(exc.name, 2); (void) WRITE2(": TLOSS error\n", 14); @@ -832,7 +832,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (ERANGE); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (ERANGE); } break; @@ -849,7 +849,7 @@ static double zero = 0.0; /* used as const */ exc.retval = HUGE_VAL; if (_LIB_VERSION == _POSIX_) __set_errno (EDOM); - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { if (_LIB_VERSION == _SVID_) { (void) WRITE2("gamma: SING error\n", 18); } @@ -866,7 +866,7 @@ static double zero = 0.0; /* used as const */ exc.retval = x; if (_LIB_VERSION == _IEEE_ || _LIB_VERSION == _POSIX_) exc.retval = 1.0; - else if (!__matherr(&exc)) { + else if (!matherr(&exc)) { __set_errno (EDOM); } break; diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c index 8753fd644b..dc4b024bb8 100644 --- a/sysdeps/mach/hurd/mmap.c +++ b/sysdeps/mach/hurd/mmap.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1994, 1995, 1996, 1997 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <sys/types.h> #include <sys/mman.h> @@ -98,7 +98,7 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) __mach_port_deallocate (__mach_task_self (), memobj); } else if (wobj == MACH_PORT_NULL && /* Not writable by mapping. */ - (flags & (MAP_COPY|MAP_PRIVATE))) + !(flags & MAP_SHARED)) /* The file can only be mapped for reading. Since we are making a private mapping, we will never try to write the object anyway, so we don't care. */ @@ -106,8 +106,7 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) else { __mach_port_deallocate (__mach_task_self (), wobj); - return ((caddr_t) (long int) - __hurd_fail (EGRATUITOUS)); /* XXX */ + return (caddr_t) (long int) __hurd_fail (EACCES); } break; } @@ -154,4 +153,3 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) } weak_alias (__mmap, mmap) - diff --git a/sysdeps/stub/e_acoshl.c b/sysdeps/stub/e_acoshl.c index 6ec9a15d38..3383c14872 100644 --- a/sysdeps/stub/e_acoshl.c +++ b/sysdeps/stub/e_acoshl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_acoshl (long double x) { fputs ("__ieee754_acoshl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_acosl.c b/sysdeps/stub/e_acosl.c index 5c10b526cc..af1e6261c3 100644 --- a/sysdeps/stub/e_acosl.c +++ b/sysdeps/stub/e_acosl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_acosl (long double x) { fputs ("__ieee754_acosl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_asinl.c b/sysdeps/stub/e_asinl.c index f9260913e8..ce8c8cdaea 100644 --- a/sysdeps/stub/e_asinl.c +++ b/sysdeps/stub/e_asinl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_asinl (long double x) { fputs ("__ieee754_asinl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_atan2l.c b/sysdeps/stub/e_atan2l.c new file mode 100644 index 0000000000..6c500d4c8a --- /dev/null +++ b/sysdeps/stub/e_atan2l.c @@ -0,0 +1,13 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_atan2l (long double x, long double y) +{ + fputs ("__ieee754_atan2l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_atan2l) diff --git a/sysdeps/stub/e_expl.c b/sysdeps/stub/e_expl.c index 246b5ae83f..4ea8c79597 100644 --- a/sysdeps/stub/e_expl.c +++ b/sysdeps/stub/e_expl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_expl (long double x) { fputs ("__ieee754_expl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_fmodl.c b/sysdeps/stub/e_fmodl.c index b47912581b..25cc114808 100644 --- a/sysdeps/stub/e_fmodl.c +++ b/sysdeps/stub/e_fmodl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_fmodl (long double x, long double y) { fputs ("__ieee754_fmodl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_j0l.c b/sysdeps/stub/e_j0l.c index c16e8a8a9d..ecb8a8ed16 100644 --- a/sysdeps/stub/e_j0l.c +++ b/sysdeps/stub/e_j0l.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_j0l (long double x) { fputs ("__ieee754_j0l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } @@ -14,6 +16,7 @@ long double __ieee754_y0l (long double x) { fputs ("__ieee754_y0l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_j1l.c b/sysdeps/stub/e_j1l.c index 0a781e5cc1..24655700e3 100644 --- a/sysdeps/stub/e_j1l.c +++ b/sysdeps/stub/e_j1l.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_j1l (long double x) { fputs ("__ieee754_j1l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } @@ -14,6 +16,7 @@ long double __ieee754_y1l (long double x) { fputs ("__ieee754_y1l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_jnl.c b/sysdeps/stub/e_jnl.c index 86ff03b031..8ced34d461 100644 --- a/sysdeps/stub/e_jnl.c +++ b/sysdeps/stub/e_jnl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_jnl (int n, long double x) { fputs ("__ieee754_jnl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } @@ -14,6 +16,7 @@ long double __ieee754_ynl (int n, long double x) { fputs ("__ieee754_ynl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_lgammal_r.c b/sysdeps/stub/e_lgammal_r.c index 015511818c..d7fbbca4df 100644 --- a/sysdeps/stub/e_lgammal_r.c +++ b/sysdeps/stub/e_lgammal_r.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_lgammal_r (long double x, int *signgamp) { fputs ("__ieee754_lgammal_r not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_log10l.c b/sysdeps/stub/e_log10l.c index 0e8cdcaaa9..a414d04d74 100644 --- a/sysdeps/stub/e_log10l.c +++ b/sysdeps/stub/e_log10l.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_log10l (long double x) { fputs ("__ieee754_log10l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_logl.c b/sysdeps/stub/e_logl.c index b8357543b0..45248a375a 100644 --- a/sysdeps/stub/e_logl.c +++ b/sysdeps/stub/e_logl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_logl (long double x) { fputs ("__ieee754_logl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_powl.c b/sysdeps/stub/e_powl.c index 2fa7862ea5..611dfb583c 100644 --- a/sysdeps/stub/e_powl.c +++ b/sysdeps/stub/e_powl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_powl (long double x, long double y) { fputs ("__ieee754_powl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_rem_pio2l.c b/sysdeps/stub/e_rem_pio2l.c index 0a9ac79917..eec7d793bb 100644 --- a/sysdeps/stub/e_rem_pio2l.c +++ b/sysdeps/stub/e_rem_pio2l.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_rem_pio2l (long double x, long double *y) { fputs ("__ieee754_rem_pio2l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/e_sqrtl.c b/sysdeps/stub/e_sqrtl.c index 88a7668330..c583a27673 100644 --- a/sysdeps/stub/e_sqrtl.c +++ b/sysdeps/stub/e_sqrtl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __ieee754_sqrtl (long double x) { fputs ("__ieee754_sqrtl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/k_cosl.c b/sysdeps/stub/k_cosl.c index 3e6c9688f0..10016ab72e 100644 --- a/sysdeps/stub/k_cosl.c +++ b/sysdeps/stub/k_cosl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __kernel_cosl (long double x, long double y) { fputs ("__kernel_cosl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/k_rem_pio2l.c b/sysdeps/stub/k_rem_pio2l.c index a51c44546b..01bf158249 100644 --- a/sysdeps/stub/k_rem_pio2l.c +++ b/sysdeps/stub/k_rem_pio2l.c @@ -1,12 +1,14 @@ #include <math.h> #include <math_private.h> #include <stdio.h> +#include <errno.h> int __kernel_rem_pio2l (long double *x, long double *y, int e0, int nx, int prec, const int *ipio2) { fputs ("__kernel_rem_pio2l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/k_sinl.c b/sysdeps/stub/k_sinl.c index 2057bf8bff..40cf22a596 100644 --- a/sysdeps/stub/k_sinl.c +++ b/sysdeps/stub/k_sinl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __kernel_sinl (long double x, long double y) { fputs ("__kernel_sinl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } diff --git a/sysdeps/stub/libc-lock.h b/sysdeps/stub/libc-lock.h index 724b6e59d4..9efd799dab 100644 --- a/sysdeps/stub/libc-lock.h +++ b/sysdeps/stub/libc-lock.h @@ -17,8 +17,8 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _LIBC_LOCK_H -#define _LIBC_LOCK_H 1 +#ifndef _BITS_LIBC_LOCK_H +#define _BITS_LIBC_LOCK_H 1 /* Define a lock variable NAME with storage class CLASS. The lock must be @@ -70,6 +70,20 @@ /* Unlock the recursive named lock variable. */ #define __libc_lock_unlock_recursive(NAME) + +/* Define once control variable. */ +#define __libc_once_define(NAME) int NAME = 0 + +/* Call handler iff the first call. */ +#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ + do { \ + if ((ONCE_CONTROL) == 0) { \ + INIT_FUNCTION (); \ + (ONCE_CONTROL) = 1; \ + } \ + } while (0) + + /* Start critical region with cleanup. */ #define __libc_cleanup_region_start(FCT, ARG) @@ -80,4 +94,16 @@ /* We need portable names for some of the functions. */ #define __libc_mutex_unlock -#endif /* libc-lock.h */ +/* Type for key of thread specific data. */ +typedef int __libc_key_t; + +/* Create key for thread specific data. */ +#define __libc_key_create(KEY,DEST) -1 + +/* Set thread-specific data associated with KEY to VAL. */ +#define __libc_setspecific(KEY,VAL) -1 + +/* Get thread-specific data associated with KEY. */ +#define __libc_getspecific(KEY) 0 + +#endif /* bits/libc-lock.h */ diff --git a/sysdeps/stub/s_atanl.c b/sysdeps/stub/s_atanl.c index 38dd6f5991..2957d702d5 100644 --- a/sysdeps/stub/s_atanl.c +++ b/sysdeps/stub/s_atanl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __atanl (long double x) { fputs ("__atanl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } weak_alias (__atanl, atanl) diff --git a/sysdeps/stub/s_erfl.c b/sysdeps/stub/s_erfl.c index e01bad206d..7ae25d6252 100644 --- a/sysdeps/stub/s_erfl.c +++ b/sysdeps/stub/s_erfl.c @@ -1,12 +1,25 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __erfl (long double x) { fputs ("__erfl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } weak_alias (__erfl, erfl) stub_warning (erfl) + +long double +__erfcl (long double x) +{ + fputs ("__erfcl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__erfcl, erfcl) + +stub_warning (erfcl) diff --git a/sysdeps/stub/s_expm1l.c b/sysdeps/stub/s_expm1l.c index fb8bda5eca..38798812ff 100644 --- a/sysdeps/stub/s_expm1l.c +++ b/sysdeps/stub/s_expm1l.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __expm1l (long double x) { fputs ("__expm1l not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } weak_alias (__expm1l, expm1l) diff --git a/sysdeps/stub/s_log1pl.c b/sysdeps/stub/s_log1pl.c index 07282482f3..9e51ce2d43 100644 --- a/sysdeps/stub/s_log1pl.c +++ b/sysdeps/stub/s_log1pl.c @@ -1,10 +1,12 @@ #include <math.h> #include <stdio.h> +#include <errno.h> long double __log1pl (long double x) { fputs ("__log1pl not implemented\n", stderr); + __set_errno (ENOSYS); return 0.0; } weak_alias (__log1pl, log1pl) diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S index 9df313422c..fc5cc0436b 100644 --- a/sysdeps/unix/alpha/sysdep.S +++ b/sysdeps/unix/alpha/sysdep.S @@ -38,7 +38,7 @@ __errno = errno .globl __syscall_error .ent __syscall_error __syscall_error: - ldgp gp, 0(t12) + ldgp gp, 0(pv) lda sp, -16(sp) .frame sp, 16, ra, 0 stq ra, 0(sp) @@ -53,7 +53,7 @@ __syscall_error: jsr ra, __errno_location /* Store the error value. */ - ldl t0, 8(sp) + ldq t0, 8(sp) stl t0, 0(v0) /* And kick back a -1. */ diff --git a/sysdeps/unix/getlogin.c b/sysdeps/unix/getlogin.c index 6e8a9a2a87..84b7dd8276 100644 --- a/sysdeps/unix/getlogin.c +++ b/sysdeps/unix/getlogin.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 1997 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 @@ -46,7 +46,7 @@ getlogin (void) thing to do. Note that ttyname(open("/dev/tty")) on those systems returns /dev/tty, so that is not a possible solution for getlogin(). */ - if (__ttyname_r (0, real_tty_path, sizeof (tty_pathname)) < 0) + if (__ttyname_r (0, real_tty_path, sizeof (tty_pathname)) != 0) return NULL; real_tty_path += 5; /* Remove "/dev/". */ diff --git a/sysdeps/unix/getlogin_r.c b/sysdeps/unix/getlogin_r.c index 75f17cb86f..259879f953 100644 --- a/sysdeps/unix/getlogin_r.c +++ b/sysdeps/unix/getlogin_r.c @@ -1,5 +1,5 @@ /* Reentrant function to return the current login name. Unix version. - Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1996, 1997 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 @@ -50,7 +50,7 @@ getlogin_r (name, name_len) err = errno; (void) close (d); - if (result < 0) + if (result != 0) { __set_errno (err); return err; diff --git a/sysdeps/unix/sysv/linux/Dist b/sysdeps/unix/sysv/linux/Dist index fc403871f3..1e30ac58fd 100644 --- a/sysdeps/unix/sysv/linux/Dist +++ b/sysdeps/unix/sysv/linux/Dist @@ -26,6 +26,7 @@ netipx/ipx.h nfs/nfs.h sys/acct.h sys/debugreg.h +sys/fsuid.h sys/io.h sys/kd.h sys/kdaemon.h diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 2827113d68..339862d356 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -11,7 +11,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \ sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \ sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h \ sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h \ - sys/quota.h + sys/quota.h sys/fsuid.h # Generate the list of SYS_* macros for the system calls (__NR_* macros). $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h @@ -55,7 +55,8 @@ endif ifeq ($(subdir),inet) sysdep_headers += netinet/in_systm.h netinet/udp.h \ netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \ - netinet/ip_fw.h netinet/ip_icmp.h sys/socketvar.h + netinet/ip_fw.h netinet/ip_icmp.h netipx/ipx.h \ + sys/socketvar.h endif # Don't compile the ctype glue code, since there is no old non-GNU C library. diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 74fef64f64..be0539b475 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -73,8 +73,9 @@ $ok: stq a0, __curbrk /* What a horrible way to die. */ $err0: ldi v0, ENOMEM -$err1: addq sp, 8, sp - jmp zero, __syscall_error +$err1: lda pv, __syscall_error + addq sp, 8, sp + jmp zero, (pv), __syscall_error END(__brk) diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h index 5c1e407423..2af77f70cf 100644 --- a/sysdeps/unix/sysv/linux/alpha/gnu/types.h +++ b/sysdeps/unix/sysv/linux/alpha/gnu/types.h @@ -66,7 +66,12 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ typedef long int __clock_t; /* One element in the file descriptor mask array. */ -typedef unsigned int __fd_mask; +typedef unsigned long int __fd_mask; + +/* Due to incaution, we may have gotten these from a kernel header file. */ +#undef __FD_SETSIZE +#undef __NFDBITS +#undef __FDMASK /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index dbc25bcbf3..193baf7491 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger <davidm@azstarnet.com>, 1995. @@ -41,18 +41,20 @@ LEAF(__ieee_get_fp_control, 16) ldi a0, GSI_IEEE_FP_CONTROL ldi v0, __NR_osf_getsysinfo call_pal PAL_callsys - bne a3, error + bne a3, $error ldq v0, 0(sp) lda sp, 16(sp) ret -error: lda sp, 16(sp) +$error: lda sp, 16(sp) #ifndef PROF br gp, 1f 1: ldgp gp, 0(gp) #endif - jmp zero, __syscall_error + lda pv, __syscall_error + lda sp, 16(sp) + jmp zero, (pv), __syscall_error END(__ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index d2d2add56c..be8caf632d 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -43,15 +43,17 @@ LEAF(__ieee_set_fp_control, 16) lda sp, 16(sp) - bne a3, error + bne a3, $error ret -error: +$error: #ifndef PROF br gp, 1f 1: ldgp gp, 0(gp) #endif - jmp zero, __syscall_error + lda pv, __syscall_error + lda sp, 16(sp) + jmp zero, (pv), __syscall_error END(__ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 63bf17588a..76a744d167 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -55,14 +55,13 @@ #define JENSEN_IO_BASE (0xfffffc0300000000UL) #define JENSEN_SPARSE_MEM (0xfffffc0200000000UL) -/* - * With respect to the I/O architecture, APECS and LCA are identical, - * so the following defines apply to LCA as well. - */ +/* With respect to the I/O architecture, APECS and LCA are identical, + so the following defines apply to LCA as well. */ #define APECS_IO_BASE (0xfffffc01c0000000UL) #define APECS_SPARSE_MEM (0xfffffc0200000000UL) #define APECS_DENSE_MEM (0xfffffc0300000000UL) +/* The same holds for CIA and PYXIS. */ #define CIA_IO_BASE (0xfffffc8580000000UL) #define CIA_SPARSE_MEM (0xfffffc8000000000UL) #define CIA_DENSE_MEM (0xfffffc8600000000UL) @@ -104,6 +103,7 @@ static struct platform { {"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM}, {"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM}, + {"Miata", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM}, }; diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c index 43e8536b20..9133c81110 100644 --- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c +++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c @@ -1,65 +1,78 @@ -#include <fpu_control.h> +/* Set FP exception mask and rounding mode. + Copyright (C) 1996, 1997 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ +#include <fpu_control.h> #include <asm/fpu.h> + extern void __ieee_set_fp_control (unsigned long); extern unsigned long __ieee_get_fp_control (void); - static inline unsigned long rdfpcr (void) { - unsigned long fpcr; - - asm ("trapb; mf_fpcr $f0; trapb; stt $f0,%0" : "m="(fpcr)); - return fpcr; + unsigned long fpcr; + asm ("excb; mf_fpcr %0" : "=f"(fpcr)); + return fpcr; } static inline void wrfpcr (unsigned long fpcr) { - asm volatile ("ldt $f0,%0; trapb; mt_fpcr $f0; trapb" :: "m"(fpcr)); + asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr)); } void __setfpucw (unsigned short fpu_control) { - unsigned long fpcr = 0, fpcw = 0; + unsigned long fpcr = 0, fpcw = 0; - if (!fpu_control) - fpu_control = _FPU_DEFAULT; + if (!fpu_control) + fpu_control = _FPU_DEFAULT; - /* first, set dynamic rounding mode: */ + /* first, set dynamic rounding mode: */ - fpcr = rdfpcr(); - fpcr &= ~FPCR_DYN_MASK; - switch (fpu_control & 0xc00) { - case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; - case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; - case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; - case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; + fpcr = rdfpcr(); + fpcr &= ~FPCR_DYN_MASK; + switch (fpu_control & 0xc00) + { + case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break; + case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break; + case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break; + case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break; } - wrfpcr(fpcr); + wrfpcr(fpcr); - /* now tell kernel about traps that we like to hear about: */ + /* now tell kernel about traps that we like to hear about: */ - fpcw = __ieee_get_fp_control(); - fpcw &= ~IEEE_TRAP_ENABLE_MASK; + fpcw = __ieee_get_fp_control(); + fpcw &= ~IEEE_TRAP_ENABLE_MASK; - if (!(fpu_control & _FPU_MASK_IM)) - fpcw |= IEEE_TRAP_ENABLE_INV; - if (!(fpu_control & _FPU_MASK_DM)) - fpcw |= IEEE_TRAP_ENABLE_UNF; - if (!(fpu_control & _FPU_MASK_ZM)) - fpcw |= IEEE_TRAP_ENABLE_DZE; - if (!(fpu_control & _FPU_MASK_OM)) - fpcw |= IEEE_TRAP_ENABLE_OVF; - if (!(fpu_control & _FPU_MASK_PM)) - fpcw |= IEEE_TRAP_ENABLE_INE; + if (!(fpu_control & _FPU_MASK_IM)) fpcw |= IEEE_TRAP_ENABLE_INV; + if (!(fpu_control & _FPU_MASK_DM)) fpcw |= IEEE_TRAP_ENABLE_UNF; + if (!(fpu_control & _FPU_MASK_ZM)) fpcw |= IEEE_TRAP_ENABLE_DZE; + if (!(fpu_control & _FPU_MASK_OM)) fpcw |= IEEE_TRAP_ENABLE_OVF; + if (!(fpu_control & _FPU_MASK_PM)) fpcw |= IEEE_TRAP_ENABLE_INE; - __ieee_set_fp_control(fpcw); + __fpu_control = fpu_control; /* update global copy */ - __fpu_control = fpu_control; /* update global copy */ + __ieee_set_fp_control(fpcw); } diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index 75e1260aea..d25dd6b51f 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -62,10 +62,10 @@ LEAF(__syscall, 0) mov a5, a4 call_pal PAL_callsys /* Invoke system call */ - bne a3, error + bne a3, $error ret -error: +$error: #ifndef PROF br gp, 2f 2: ldgp gp, 0(gp) diff --git a/sysdeps/unix/sysv/linux/net/if_arp.h b/sysdeps/unix/sysv/linux/net/if_arp.h index b1cd18360e..d784f0cfc7 100644 --- a/sysdeps/unix/sysv/linux/net/if_arp.h +++ b/sysdeps/unix/sysv/linux/net/if_arp.h @@ -90,6 +90,8 @@ struct arphdr #define ARPHRD_ROSE 270 #define ARPHRD_X25 271 /* CCITT X.25. */ #define ARPHRD_PPP 512 +#define ARPHRD_HDLC 513 /* (Cisco) HDLC. */ +#define ARPHRD_LAPB 516 /* LAPB. */ #define ARPHRD_TUNNEL 768 /* IPIP tunnel. */ #define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel. */ diff --git a/sysdeps/unix/sysv/linux/net/ppp_defs.h b/sysdeps/unix/sysv/linux/net/ppp_defs.h index 5d613e0d0f..f8924c4f27 100644 --- a/sysdeps/unix/sysv/linux/net/ppp_defs.h +++ b/sysdeps/unix/sysv/linux/net/ppp_defs.h @@ -1,6 +1,9 @@ #ifndef _NET_PPP_DEFS_H #define _NET_PPP_DEFS_H 1 +#define __need_time_t +#include <time.h> + #include <asm/types.h> #include <linux/ppp_defs.h> diff --git a/sysdeps/unix/sysv/linux/netinet/ip_fw.h b/sysdeps/unix/sysv/linux/netinet/ip_fw.h index 8ba10ae196..322467b5ff 100644 --- a/sysdeps/unix/sysv/linux/netinet/ip_fw.h +++ b/sysdeps/unix/sysv/linux/netinet/ip_fw.h @@ -53,6 +53,7 @@ #include <netinet/ip.h> #include <netinet/tcp.h> #include <netinet/udp.h> +#include <net/if.h> __BEGIN_DECLS diff --git a/sysdeps/unix/sysv/linux/netipx/ipx.h b/sysdeps/unix/sysv/linux/netipx/ipx.h index 170dfdf134..ec93c8185c 100644 --- a/sysdeps/unix/sysv/linux/netipx/ipx.h +++ b/sysdeps/unix/sysv/linux/netipx/ipx.h @@ -19,10 +19,94 @@ #ifndef __NETIPX_IPX_H #define __NETIPX_IPX_H 1 -#include <asm/types.h> -#include <linux/ipx.h> +#include <features.h> + +#include <sys/types.h> +#include <sys/socket.h> + +__BEGIN_DECLS #define SOL_IPX 256 /* sockopt level */ -#define IPX_TYPE 1 + +#define IPX_TYPE 1 +#define IPX_NODE_LEN 6 +#define IPX_MTU 576 + +struct sockaddr_ipx + { + sa_family_t sipx_family; + u_int16_t sipx_port; + u_int32_t sipx_network; + unsigned char sipx_node[IPX_NODE_LEN]; + u_int8_t sipx_type; + unsigned char sipx_zero; /* 16 byte fill */ + }; + +/* + * So we can fit the extra info for SIOCSIFADDR into the address nicely + */ + +#define sipx_special sipx_port +#define sipx_action sipx_zero +#define IPX_DLTITF 0 +#define IPX_CRTITF 1 + +typedef struct ipx_route_definition + { + unsigned long ipx_network; + unsigned long ipx_router_network; + unsigned char ipx_router_node[IPX_NODE_LEN]; + } +ipx_route_definition; + +typedef struct ipx_interface_definition + { + unsigned long ipx_network; + unsigned char ipx_device[16]; + unsigned char ipx_dlink_type; +#define IPX_FRAME_NONE 0 +#define IPX_FRAME_SNAP 1 +#define IPX_FRAME_8022 2 +#define IPX_FRAME_ETHERII 3 +#define IPX_FRAME_8023 4 +#define IPX_FRAME_TR_8022 5 + unsigned char ipx_special; +#define IPX_SPECIAL_NONE 0 +#define IPX_PRIMARY 1 +#define IPX_INTERNAL 2 + unsigned char ipx_node[IPX_NODE_LEN]; + } +ipx_interface_definition; + +typedef struct ipx_config_data + { + unsigned char ipxcfg_auto_select_primary; + unsigned char ipxcfg_auto_create_interfaces; + } +ipx_config_data; + +/* + * OLD Route Definition for backward compatibility. + */ + +struct ipx_route_def + { + unsigned long ipx_network; + unsigned long ipx_router_network; +#define IPX_ROUTE_NO_ROUTER 0 + unsigned char ipx_router_node[IPX_NODE_LEN]; + unsigned char ipx_device[16]; + unsigned short ipx_flags; +#define IPX_RT_SNAP 8 +#define IPX_RT_8022 4 +#define IPX_RT_BLUEBOOK 2 +#define IPX_RT_ROUTED 1 + }; + +#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE) +#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1) +#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2) + +__END_DECLS #endif /* netipx/ipx.h */ diff --git a/sysdeps/unix/sysv/linux/ptrace.c b/sysdeps/unix/sysv/linux/ptrace.c index ede413a43c..b50234d2a1 100644 --- a/sysdeps/unix/sysv/linux/ptrace.c +++ b/sysdeps/unix/sysv/linux/ptrace.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1995, 1996, 1997 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <errno.h> #include <sys/types.h> @@ -52,6 +52,5 @@ ptrace (enum __ptrace_request request, ...) return res; } - __set_errno (-res); return -1; } diff --git a/sysdeps/unix/sysv/linux/socketbits.h b/sysdeps/unix/sysv/linux/socketbits.h index 38a8fb74d1..3630ff5aa3 100644 --- a/sysdeps/unix/sysv/linux/socketbits.h +++ b/sysdeps/unix/sysv/linux/socketbits.h @@ -29,6 +29,9 @@ __BEGIN_DECLS +/* Type for length arguments in socket calls. */ +typedef unsigned int socklen_t; + /* Types of sockets. */ enum __socket_type { @@ -116,25 +119,22 @@ enum struct msghdr { __ptr_t msg_name; /* Address to send to/receive from. */ - int msg_namelen; /* Length of address data. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ + socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ int msg_iovlen; /* Number of elements in the vector. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */ - int msg_controllen; /* Ancillary data buffer length. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ + socklen_t msg_controllen; /* Ancillary data buffer length. */ + int msg_flags; /* Flags on received message. */ }; /* Structure used for storage of ancillary data object information. */ struct cmsghdr { - int cmsg_len; /* Length of data in cmsg_data plus length + socklen_t cmsg_len; /* Length of data in cmsg_data plus length of cmsghdr structure. */ - /* XXX Should be type `size_t' according to POSIX.1g. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ #if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 diff --git a/sysdeps/unix/sysv/linux/sys/fsuid.h b/sysdeps/unix/sysv/linux/sys/fsuid.h new file mode 100644 index 0000000000..fd30542e9f --- /dev/null +++ b/sysdeps/unix/sysv/linux/sys/fsuid.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _SYS_FSUID_H +#define _SYS_FSUID_H 1 + +#include <features.h> +#include <sys/types.h> + +__BEGIN_DECLS + +/* Change uid used for file access control to UID, without affecting + other priveledges (such as who can send signals at the process). */ +extern int setfsuid __P ((__uid_t __uid)); + +/* Ditto for group id. */ +extern int setfsgid __P ((__gid_t __gid)); + +__END_DECLS + +#endif /* fsuid.h */ diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h index 59a1aa45be..08a2e3158f 100644 --- a/sysdeps/unix/sysv/linux/sys/mount.h +++ b/sysdeps/unix/sysv/linux/sys/mount.h @@ -1,5 +1,5 @@ /* Header file for mounting/unmount Linux filesystems. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 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 @@ -17,13 +17,81 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* This is taken from /usr/include/linux/fs.h. */ + #ifndef _SYS_MOUNT_H #define _SYS_MOUNT_H 1 #include <features.h> +#include <sys/ioctl.h> + __BEGIN_DECLS +#define BLOCK_SIZE 1024 +#define BLOCK_SIZE_BITS 10 + + +/* These are the fs-independent mount-flags: up to 16 flags are + supported */ +#define MS_RDONLY 1 /* Mount read-only. */ +#define MS_NOSUID 2 /* Ignore suid and sgid bits. */ +#define MS_NODEV 4 /* Disallow access to device special files. */ +#define MS_NOEXEC 8 /* Disallow program execution. */ +#define MS_SYNCHRONOUS 16 /* Writes are synced at once. */ +#define MS_REMOUNT 32 /* Alter flags of a mounted FS. */ +#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS. */ +#define S_WRITE 128 /* Write on file/directory/symlink. */ +#define S_APPEND 256 /* Append-only file. */ +#define S_IMMUTABLE 512 /* Immutable file. */ +#define MS_NOATIME 1024 /* Do not update access times. */ + + +/* Flags that can be altered by MS_REMOUNT */ +#define MS_RMT_MASK (MS_RDONLY | MS_MANDLOCK) + + +/* Magic mount flag number. Has to be or-ed to the flag values. */ + +#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */ +#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */ + + +/* Note that read-only etc flags are inode-specific: setting some + file-system flags just means all the inodes inherit those flags by + default. It might be possible to override it selectively if you + really wanted to with some ioctl() that is not currently + implemented. + + Exception: MS_RDONLY is always applied to the entire file system. */ +#define IS_RDONLY(inode) \ + (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY)) +#define DO_UPDATE_ATIME(inode) \ + (!((inode)->i_flags & MS_NOATIME) && !IS_RDONLY (inode)) +#define IS_NOSUID(inode) ((inode)->i_flags & MS_NOSUID) +#define IS_NODEV(inode) ((inode)->i_flags & MS_NODEV) +#define IS_NOEXEC(inode) ((inode)->i_flags & MS_NOEXEC) +#define IS_SYNC(inode) ((inode)->i_flags & MS_SYNCHRONOUS) +#define IS_MANDLOCK(inode) ((inode)->i_flags & MS_MANDLOCK) + +#define IS_WRITABLE(inode) ((inode)->i_flags & S_WRITE) +#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) +#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) + + +/* The read-only stuff doesn't really belong here, but any other place + is probably as bad and I don't want to create yet another include + file. */ + +#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */ +#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */ +#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */ +#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */ +#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */ +#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */ +#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */ + + /* Mount a filesystem. */ extern int mount __P ((__const char *__special_file, __const char *__dir, __const char *__fstype, unsigned long int __rwflag, diff --git a/sysdeps/unix/sysv/linux/sys/ttydefaults.h b/sysdeps/unix/sysv/linux/sys/ttydefaults.h index 28512ebebb..b21c6d5686 100644 --- a/sysdeps/unix/sysv/linux/sys/ttydefaults.h +++ b/sysdeps/unix/sysv/linux/sys/ttydefaults.h @@ -61,14 +61,14 @@ #ifdef _POSIX_VDISABLE # define CEOL _POSIX_VDISABLE #else -# define CEOL ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */ +# define CEOL '\0' /* XXX avoid _POSIX_VDISABLE */ #endif #define CERASE 0177 #define CINTR CTRL('c') #ifdef _POSIX_VDISABLE # define CSTATUS _POSIX_VDISABLE #else -# define CSTATUS ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */ +# define CSTATUS '\0' /* XXX avoid _POSIX_VDISABLE */ #endif #define CKILL CTRL('u') #define CMIN 1 diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index c7180ccb42..a3b0eef691 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -13,6 +13,7 @@ geteuid - geteuid 0 __geteuid geteuid getpgid - getpgid 1 __getpgid getpgid getpgrp - getpgrp 0 getpgrp getppid - getppid 0 __getppid getppid +getresgid EXTRA getresgid 3 getresgid getresuid EXTRA getresuid 3 getresuid getsid - getsid 1 getsid init_module EXTRA init_module 5 init_module @@ -32,6 +33,7 @@ pause - pause 0 __libc_pause pause personality init-first personality 1 __personality personality pipe - pipe 1 __pipe pipe query_module EXTRA query_module 5 query_module +quotactl EXTRA quotactl 4 quotactl s_getdents EXTRA getdents 3 __getdents s_getpriority getpriority getpriority 2 __syscall_getpriority s_poll poll poll 3 __syscall_poll @@ -53,6 +55,7 @@ select - _newselect 5 __select select setfsgid EXTRA setfsgid 1 setfsgid setfsuid EXTRA setfsuid 1 setfsuid setpgid - setpgid 2 __setpgid setpgid +setresgid EXTRA setresgid 3 setresgid setresuid EXTRA setresuid 3 setresuid sigpending - sigpending 1 sigpending sigprocmask - sigprocmask 3 __sigprocmask sigprocmask @@ -64,7 +67,8 @@ sys_readv readv readv 3 __syscall_readv sys_stat xstat stat 2 __syscall_stat sys_writev writev writev 3 __syscall_writev sysinfo EXTRA sysinfo 1 sysinfo -swapon - swapon 2 swapon +swapon - swapon 2 __swapon swapon +swapoff - swapoff 1 __swapoff swapoff umount EXTRA umount 1 __umount umount uselib EXTRA uselib 1 uselib wait4 - wait4 4 __wait4 wait4 diff --git a/termios/cfsetspeed.c b/termios/cfsetspeed.c index da31073ac2..b3c8aa3f42 100644 --- a/termios/cfsetspeed.c +++ b/termios/cfsetspeed.c @@ -107,13 +107,19 @@ cfsetspeed (struct termios *termios_p, speed_t speed) { size_t cnt; - for (cnt = 0; cnt < sizeof (speeds); ++cnt) - if (speed == speeds[cnt].value) + for (cnt = 0; cnt < sizeof (speeds) / sizeof (speeds[0]); ++cnt) + if (speed == speeds[cnt].internal) { cfsetispeed (termios_p, speed); cfsetospeed (termios_p, speed); return; } + else if (speed == speeds[cnt].value) + { + cfsetispeed (termios_p, speeds[cnt].internal); + cfsetospeed (termios_p, speeds[cnt].internal); + return; + } __set_errno (EINVAL); } diff --git a/time/Makefile b/time/Makefile index 1d8490cc8b..ec870f2700 100644 --- a/time/Makefile +++ b/time/Makefile @@ -187,7 +187,7 @@ $(objpfx)testdata/UTC: simplebackw $(objpfx)zic $(objpfx)testdata/Etc/UTC \ test-tz-ENV = TZDIR=$(objpfx)testdata -$(objpfx)tzselect: tzselect.ksh +$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make sed -e 's%@KSH@%$(KSH)%g' \ -e 's%@TZDIR@%$(zonedir)%g' < $< > $@.new chmod 555 $@.new diff --git a/time/africa b/time/africa index 1ac3835056..2ea89bd5e0 100644 --- a/time/africa +++ b/time/africa @@ -1,4 +1,4 @@ -# @(#)africa 7.17 +# @(#)africa 7.18 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -218,7 +218,14 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro 3:00 - EAT -# Congo +# Democratic Republic of Congo +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Kinshasa 1:01:12 - LMT 1897 Nov 9 + 1:00 - CAT +Zone Africa/Lubumbashi 1:49:52 - LMT 1897 Nov 9 + 2:00 - SAT + +# Republic of the Congo # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Brazzaville 1:01:08 - LMT 1912 1:00 - CAT @@ -656,13 +663,6 @@ Zone Africa/Kampala 2:09:40 - LMT 1928 Jul 2:45 - BEAT 1957 3:00 - EAT -# Zaire -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Africa/Kinshasa 1:01:12 - LMT 1897 Nov 9 - 1:00 - CAT -Zone Africa/Lubumbashi 1:49:52 - LMT 1897 Nov 9 - 2:00 - SAT - # Zambia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Lusaka 1:53:08 - LMT 1903 Mar diff --git a/time/asctime.c b/time/asctime.c index 82e9f72f3f..730c6dc12b 100644 --- a/time/asctime.c +++ b/time/asctime.c @@ -21,6 +21,10 @@ #include <stdio.h> #include <time.h> +/* This is defined in locale/C-time.c in the GNU libc. */ +extern const struct locale_data _nl_C_LC_TIME; +#define ab_day_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABDAY_1)].string) +#define ab_month_name (&_nl_C_LC_TIME.values[_NL_ITEM_INDEX (ABMON_1)].string) static const char format[] = "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n"; static char result[ 3+1+ 3+1+20+1+20+1+20+1+20+1+20+1 + 1]; @@ -45,9 +49,9 @@ __asctime_r (const struct tm *tp, char *buf) if (sprintf (buf, format, (tp->tm_wday < 0 || tp->tm_wday >= 7 ? - "???" : _NL_CURRENT (LC_TIME, ABDAY_1 + tp->tm_wday)), + "???" : ab_day_name[tp->tm_wday]), (tp->tm_mon < 0 || tp->tm_mon >= 12 ? - "???" : _NL_CURRENT (LC_TIME, ABMON_1 + tp->tm_mon)), + "???" : ab_month_name[tp->tm_mon]), tp->tm_mday, tp->tm_hour, tp->tm_min, tp->tm_sec, 1900 + tp->tm_year) < 0) return NULL; diff --git a/time/asia b/time/asia index 829d40b9a8..6734749179 100644 --- a/time/asia +++ b/time/asia @@ -1,4 +1,4 @@ -# @(#)asia 7.29 +# @(#)asia 7.30 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -214,28 +214,6 @@ Zone Asia/Kashgar 5:03:56 - LMT 1928 5:30 - KAST 1940 # Kashgar Time 5:00 - KAST 1980 May 8:00 PRC C%sT - -############################################################################### - -# Republic of China - -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Taiwan 1945 1951 - May 1 0:00 1:00 D -Rule Taiwan 1945 1951 - Oct 1 0:00 0 S -Rule Taiwan 1952 only - Mar 1 0:00 1:00 D -Rule Taiwan 1952 1954 - Nov 1 0:00 0 S -Rule Taiwan 1953 1959 - Apr 1 0:00 1:00 D -Rule Taiwan 1955 1961 - Oct 1 0:00 0 S -Rule Taiwan 1960 1961 - Jun 1 0:00 1:00 D -Rule Taiwan 1974 1975 - Apr 1 0:00 1:00 D -Rule Taiwan 1974 1975 - Oct 1 0:00 0 S -Rule Taiwan 1980 only - Jun 30 0:00 1:00 D -Rule Taiwan 1980 only - Sep 30 0:00 0 S -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Taipei 8:06:00 - LMT 1896 - 8:00 Taiwan C%sT - -############################################################################### # Hong Kong # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule HK 1946 only - Apr 20 3:30 1:00 S @@ -258,6 +236,27 @@ Zone Asia/Hong_Kong 7:36:36 - LMT 1904 Oct 30 8:00 HK HK%sT 1997 Jul 1 # return to China 8:00 PRC C%sT + +############################################################################### + +# Republic of China + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Taiwan 1945 1951 - May 1 0:00 1:00 D +Rule Taiwan 1945 1951 - Oct 1 0:00 0 S +Rule Taiwan 1952 only - Mar 1 0:00 1:00 D +Rule Taiwan 1952 1954 - Nov 1 0:00 0 S +Rule Taiwan 1953 1959 - Apr 1 0:00 1:00 D +Rule Taiwan 1955 1961 - Oct 1 0:00 0 S +Rule Taiwan 1960 1961 - Jun 1 0:00 1:00 D +Rule Taiwan 1974 1975 - Apr 1 0:00 1:00 D +Rule Taiwan 1974 1975 - Oct 1 0:00 0 S +Rule Taiwan 1980 only - Jun 30 0:00 1:00 D +Rule Taiwan 1980 only - Sep 30 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Taipei 8:06:00 - LMT 1896 + 8:00 Taiwan C%sT + # Macao # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Macao 1961 1962 - Mar Sun>=16 3:30 1:00 S diff --git a/time/australasia b/time/australasia index 11b0045a98..d981a6a916 100644 --- a/time/australasia +++ b/time/australasia @@ -1,4 +1,4 @@ -# @(#)australasia 7.33 +# @(#)australasia 7.34 # This file also includes Pacific islands. # Notes are at the end of this file @@ -768,6 +768,12 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # Prem Bob Carr announced NSW will fall into line with other E states # and SA and continue daylight savings to the last Sun in Mar. +# From Eric Ulevik <eau@ozemail.com.au> (1997-06-12): +# The NSW state government in Australia is talking about bringing the start +# of daylight savings time forward in the year 2000 to cater for the Olympics. +# This is going to take some time to be negotiated, because the plan is to do +# this in multiple states due to soccer games (which are not just in Sydney). + # Yancowinna # From John Basser (1989-01-04): diff --git a/time/europe b/time/europe index 6611520e98..c011424bdc 100644 --- a/time/europe +++ b/time/europe @@ -1,4 +1,4 @@ -# @(#)europe 7.44 +# @(#)europe 7.45 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -829,7 +829,6 @@ Rule C-Eur 1916 only - Oct 1 1:00 0 - Rule C-Eur 1917 1918 - Apr Mon>=15 2:00s 1:00 S Rule C-Eur 1917 1918 - Sep Mon>=15 2:00s 0 - Rule C-Eur 1940 only - Apr 1 2:00s 1:00 S -# Whitman says 1941 DST was only from Feb 25 to Oct 5; go with Shanks. Rule C-Eur 1942 only - Nov 2 2:00s 0 - Rule C-Eur 1943 only - Mar 29 2:00s 1:00 S Rule C-Eur 1943 only - Oct 4 2:00s 0 - @@ -938,12 +937,11 @@ Rule Albania 1982 only - Oct 3 0:00 0 - Rule Albania 1983 only - Apr 18 0:00 1:00 S Rule Albania 1983 only - Oct 1 0:00 0 - Rule Albania 1984 only - Apr 1 0:00 1:00 S -Rule Albania 1984 only - Oct 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Tirane 1:19:20 - LMT 1914 1:00 - CET 1940 Jun 16 - 1:00 Albania CE%sT 1985 Mar 31 1:00 - 1:00 W-Eur CE%sT 1991 +# The following transition is from Shanks's 4th edition (1995). + 1:00 Albania CE%sT 1984 Jul 1:00 EU CE%sT # Andorra @@ -984,50 +982,62 @@ Zone Europe/Minsk 1:50:16 - LMT 1880 2:00 Russia EE%sT # Belgium -# Whitman and Shanks disagree; go with Shanks, usually. +# +# From Paul Eggert (1997-07-02): +# Entries from 1918 through 1991 are taken from: +# Annuaire de L'Observatoire Royal de Belgique, +# Avenue Circulaire, 3, B-1180 BRUXELLES, CLVIIe annee, 1991 +# (Imprimerie HAYEZ, s.p.r.l., Rue Fin, 4, 1080 BRUXELLES, MCMXC), +# pp 8-9. +# LMT before 1892 was 0:17:30, according to the official journal of Belgium: +# Moniteur Belge, Samedi 30 Avril 1892, N.121. +# Thanks to Pascal Delmoitie <pascal@belnet.be> for these references. +# The 1918 rules are listed for completeness; they apply to unoccupied Belgium. +# Assume Brussels switched to WET in 1918 when the armistice took effect. +# # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# From Whitman: +Rule Belgium 1918 only - Mar 9 0:00s 1:00 S +Rule Belgium 1918 1919 - Oct Sat>=1 23:00s 0 - Rule Belgium 1919 only - Mar 1 23:00s 1:00 S -Rule Belgium 1919 only - Oct 4 23:00s 0 - -# Shanks gives 1920 Feb 14 23:00s; go with Whitman. -Rule Belgium 1920 1921 - Mar 14 23:00s 1:00 S +Rule Belgium 1920 only - Feb 14 23:00s 1:00 S Rule Belgium 1920 only - Oct 23 23:00s 0 - +Rule Belgium 1921 only - Mar 14 23:00s 1:00 S Rule Belgium 1921 only - Oct 25 23:00s 0 - Rule Belgium 1922 only - Mar 25 23:00s 1:00 S -# Whitman gives 1927 Oct 1 2:00s and 1928 Oct 7 2:00s; go with Shanks. -Rule Belgium 1922 1928 - Oct Sat>=1 23:00s 0 - +Rule Belgium 1922 1927 - Oct Sat>=1 23:00s 0 - Rule Belgium 1923 only - Apr 21 23:00s 1:00 S Rule Belgium 1924 only - Mar 29 23:00s 1:00 S Rule Belgium 1925 only - Apr 4 23:00s 1:00 S Rule Belgium 1926 only - Apr 17 23:00s 1:00 S Rule Belgium 1927 only - Apr 9 23:00s 1:00 S Rule Belgium 1928 only - Apr 14 23:00s 1:00 S +Rule Belgium 1928 1938 - Oct Sun>=2 2:00s 0 - Rule Belgium 1929 only - Apr 21 2:00s 1:00 S -Rule Belgium 1929 1938 - Oct Sun>=2 2:00s 0 - Rule Belgium 1930 only - Apr 13 2:00s 1:00 S Rule Belgium 1931 only - Apr 19 2:00s 1:00 S -Rule Belgium 1932 only - Apr 17 2:00s 1:00 S +Rule Belgium 1932 only - Apr 3 2:00s 1:00 S Rule Belgium 1933 only - Mar 26 2:00s 1:00 S Rule Belgium 1934 only - Apr 8 2:00s 1:00 S Rule Belgium 1935 only - Mar 31 2:00s 1:00 S Rule Belgium 1936 only - Apr 19 2:00s 1:00 S -# Whitman says 1937 Apr 18 2:00s; go with Shanks. Rule Belgium 1937 only - Apr 4 2:00s 1:00 S -# Whitman says 1938 Apr 10 2:00s; go with Shanks. Rule Belgium 1938 only - Mar 27 2:00s 1:00 S Rule Belgium 1939 only - Apr 16 2:00s 1:00 S Rule Belgium 1939 only - Nov 19 2:00s 0 - +Rule Belgium 1940 only - Feb 25 2:00s 1:00 S +Rule Belgium 1944 only - Sep 17 2:00s 0 - Rule Belgium 1945 only - Apr 2 2:00s 1:00 S Rule Belgium 1945 only - Sep 16 2:00s 0 - Rule Belgium 1946 only - May 19 2:00s 1:00 S Rule Belgium 1946 only - Oct 7 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Brussels 0:17:20 - LMT 1880 - 0:17:20 - BMT 1892 May 1 12:00 # Brussels MT - 0:00 - WET 1914 Aug 4 - 1:00 C-Eur CE%sT 1919 Mar 1 23:00 - 0:00 Belgium WE%sT 1940 Feb 24 23:00 - 1:00 C-Eur CE%sT 1945 Apr 2 2:00 +Zone Europe/Brussels 0:17:30 - LMT 1880 + 0:17:30 - BMT 1892 May 1 12:00 # Brussels MT + 0:00 - WET 1914 Nov 8 + 1:00 - CET 1916 May 1 0:00 + 1:00 C-Eur CE%sT 1918 Nov 11 11:00u + 0:00 Belgium WE%sT 1940 May 20 2:00s + 1:00 C-Eur CE%sT 1944 Sep 3 1:00 Belgium CE%sT 1977 1:00 EU CE%sT diff --git a/time/iso3166.tab b/time/iso3166.tab index 3daf4abb8d..b5237783c4 100644 --- a/time/iso3166.tab +++ b/time/iso3166.tab @@ -51,8 +51,9 @@ BY Belarus BZ Belize CA Canada CC Cocos (Keeling) Islands +CD Congo (Dem. Rep.) CF Central African Rep. -CG Congo +CG Congo (Rep.) CH Switzerland CI Cote d'Ivoire CK Cook Islands @@ -103,7 +104,6 @@ GT Guatemala GU Guam GW Guinea-Bissau GY Guyana -HK Hong Kong HM Heard Island & McDonald Islands HN Honduras HR Croatia @@ -250,5 +250,4 @@ YT Mayotte YU Yugoslavia ZA South Africa ZM Zambia -ZR Zaire ZW Zimbabwe diff --git a/time/mktime.c b/time/mktime.c index d8fdf3a6c6..5012888967 100644 --- a/time/mktime.c +++ b/time/mktime.c @@ -22,7 +22,7 @@ /* #define DEBUG 1 */ #ifdef HAVE_CONFIG_H -#include <config.h> +# include <config.h> #endif #ifdef _LIBC @@ -35,50 +35,52 @@ If the host has a `zic' command with a `-L leapsecondfilename' option, then it supports leap seconds; otherwise it probably doesn't. */ #ifndef LEAP_SECONDS_POSSIBLE -#define LEAP_SECONDS_POSSIBLE 1 +# define LEAP_SECONDS_POSSIBLE 1 #endif #include <sys/types.h> /* Some systems define `time_t' here. */ #include <time.h> #if HAVE_LIMITS_H -#include <limits.h> +# include <limits.h> #endif #if DEBUG -#include <stdio.h> -#if STDC_HEADERS -#include <stdlib.h> -#endif +# include <stdio.h> +# if STDC_HEADERS +# include <stdlib.h> +# endif /* Make it work even if the system's libc has its own mktime routine. */ -#define mktime my_mktime +# define mktime my_mktime #endif /* DEBUG */ #ifndef __P -#if defined (__GNUC__) || (defined (__STDC__) && __STDC__) -#define __P(args) args -#else -#define __P(args) () -#endif /* GCC. */ +# if defined (__GNUC__) || (defined (__STDC__) && __STDC__) +# define __P(args) args +# else +# define __P(args) () +# endif /* GCC. */ #endif /* Not __P. */ #ifndef CHAR_BIT -#define CHAR_BIT 8 +# define CHAR_BIT 8 #endif #ifndef INT_MIN -#define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1)) +# define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1)) #endif #ifndef INT_MAX -#define INT_MAX (~0 - INT_MIN) +# define INT_MAX (~0 - INT_MIN) #endif #ifndef TIME_T_MIN -#define TIME_T_MIN (0 < (time_t) -1 ? (time_t) 0 \ - : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1)) +/* The outer cast to time_t works around a bug in Cray C 5.0.3.0. */ +# define TIME_T_MIN ((time_t) \ + (0 < (time_t) -1 ? (time_t) 0 \ + : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))) #endif #ifndef TIME_T_MAX -#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) +# define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) #endif #define TM_YEAR_BASE 1900 @@ -87,7 +89,7 @@ #ifndef __isleap /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ -#define __isleap(year) \ +# define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif @@ -107,11 +109,11 @@ time_t __mktime_internal __P ((struct tm *, #ifdef _LIBC -#define localtime_r __localtime_r +# define localtime_r __localtime_r #else -#if ! HAVE_LOCALTIME_R && ! defined (localtime_r) +# if ! HAVE_LOCALTIME_R && ! defined localtime_r /* Approximate localtime_r as best we can in its absence. */ -#define localtime_r my_localtime_r +# define localtime_r my_mktime_localtime_r static struct tm *localtime_r __P ((const time_t *, struct tm *)); static struct tm * localtime_r (t, tp) @@ -124,7 +126,7 @@ localtime_r (t, tp) *tp = *l; return tp; } -#endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */ +# endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */ #endif /* ! _LIBC */ diff --git a/time/private.h b/time/private.h index e32653b76d..7f98a67391 100644 --- a/time/private.h +++ b/time/private.h @@ -21,7 +21,7 @@ #ifndef lint #ifndef NOID -static char privatehid[] = "@(#)private.h 7.45"; +static char privatehid[] = "@(#)private.h 7.46"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -182,7 +182,7 @@ char * imalloc P((int n)); void * irealloc P((void * pointer, int size)); void icfree P((char * pointer)); void ifree P((char * pointer)); -char * scheck P((const char *string, const char *format)); +char * scheck P((const char *string, const char *format)); /* diff --git a/time/scheck.c b/time/scheck.c index 52b4ff51fd..39feeba701 100644 --- a/time/scheck.c +++ b/time/scheck.c @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)scheck.c 8.14"; +static char elsieid[] = "@(#)scheck.c 8.15"; #endif /* !defined lint */ #endif /* !defined NOID */ diff --git a/time/strftime.c b/time/strftime.c index 4cb6c9e260..891d301f5c 100644 --- a/time/strftime.c +++ b/time/strftime.c @@ -31,7 +31,6 @@ # define HAVE_TZSET 1 # define MULTIBYTE_IS_FORMAT_SAFE 1 # define STDC_HEADERS 1 -# include <ansidecl.h> # include "../locale/localeinfo.h" #endif @@ -81,7 +80,9 @@ extern char *tzname[]; # include <stdlib.h> # include <string.h> #else -# define memcpy(d, s, n) bcopy ((s), (d), (n)) +# ifndef HAVE_MEMCPY +# define memcpy(d, s, n) bcopy ((s), (d), (n)) +# endif #endif #ifndef __P @@ -138,7 +139,7 @@ extern int __tz_compute __P ((time_t timer, const struct tm *tm)); # if ! HAVE_LOCALTIME_R # if ! HAVE_TM_GMTOFF /* Approximate gmtime_r as best we can in its absence. */ -# define gmtime_r my_gmtime_r +# define gmtime_r my_gmtime_r static struct tm *gmtime_r __P ((const time_t *, struct tm *)); static struct tm * gmtime_r (t, tp) @@ -154,7 +155,7 @@ gmtime_r (t, tp) # endif /* ! HAVE_TM_GMTOFF */ /* Approximate localtime_r as best we can in its absence. */ -# define localtime_r my_localtime_r +# define localtime_r my_ftime_localtime_r static struct tm *localtime_r __P ((const time_t *, struct tm *)); static struct tm * localtime_r (t, tp) @@ -171,11 +172,15 @@ localtime_r (t, tp) #endif /* ! defined (_LIBC) */ -#if !defined (memset) && !defined (HAVE_MEMSET) && !defined (_LIBC) +#if !defined memset && !defined HAVE_MEMSET && !defined _LIBC /* Some systems lack the `memset' function and we don't want to introduce additional dependencies. */ -static const char spaces[16] = " "; -static const char zeroes[16] = "0000000000000000"; +/* The SGI compiler reportedly barfs on the trailing null + if we use a string constant as the initializer. 28 June 1997, rms. */ +static const char spaces[16] = /* " " */ + { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' }; +static const char zeroes[16] = /* "0000000000000000" */ + { '0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0' }; # define memset_space(P, Len) \ do { \ @@ -209,7 +214,7 @@ static const char zeroes[16] = "0000000000000000"; # define memset_zero(P, Len) (memset ((P), '0', (Len)), (P) += (Len)) #endif -#define add(n, f) \ +#define add(n, f) \ do \ { \ int _n = (n); \ @@ -232,7 +237,7 @@ static const char zeroes[16] = "0000000000000000"; i += _incr; \ } while (0) -#define cpy(n, s) \ +#define cpy(n, s) \ add ((n), \ if (to_lowcase) \ memcpy_lowcase (p, (s), _n); \ @@ -282,9 +287,11 @@ memcpy_uppcase (dest, src, len) return dest; } + #if ! HAVE_TM_GMTOFF /* Yield the difference between *A and *B, measured in seconds, ignoring leap seconds. */ +# define tm_diff ftime_tm_diff static int tm_diff __P ((const struct tm *, const struct tm *)); static int tm_diff (a, b) @@ -417,15 +424,13 @@ strftime (s, maxsize, format, tp) const char *f; zone = NULL; -#if !defined _LIBC && HAVE_TM_ZONE - /* XXX We have some problems here. First, the string pointed to by - tm_zone is dynamically allocated while loading the zone data. But - when another zone is loaded since the information in TP were - computed this would be a stale pointer. - The second problem is the POSIX test suite which assumes setting +#if HAVE_TM_ZONE + /* The POSIX test suite assumes that setting the environment variable TZ to a new value before calling strftime() will influence the result (the %Z format) even if the information in - TP is computed with a totally different time zone. --drepper@gnu */ + TP is computed with a totally different time zone. + This is bogus: though POSIX allows bad behavior like this, + POSIX does not require it. Do the right thing instead. */ zone = (const char *) tp->tm_zone; #endif #if HAVE_TZNAME @@ -464,6 +469,7 @@ strftime (s, maxsize, format, tp) int width = -1; int to_lowcase = 0; int to_uppcase = 0; + int change_case = 0; #if DO_MULTIBYTE @@ -555,6 +561,9 @@ strftime (s, maxsize, format, tp) case '^': to_uppcase = 1; continue; + case '#': + change_case = 1; + continue; default: break; @@ -592,9 +601,11 @@ strftime (s, maxsize, format, tp) switch (*f) { #define DO_NUMBER(d, v) \ - digits = d; number_value = v; goto do_number + digits = width == -1 ? d : width; \ + number_value = v; goto do_number #define DO_NUMBER_SPACEPAD(d, v) \ - digits = d; number_value = v; goto do_number_spacepad + digits = width == -1 ? d : width; \ + number_value = v; goto do_number_spacepad case '%': if (modifier != 0) @@ -605,12 +616,22 @@ strftime (s, maxsize, format, tp) case 'a': if (modifier != 0) goto bad_format; + if (change_case) + { + to_uppcase = 1; + to_lowcase = 0; + } cpy (aw_len, a_wkday); break; case 'A': if (modifier != 0) goto bad_format; + if (change_case) + { + to_uppcase = 1; + to_lowcase = 0; + } cpy (wkday_len, f_wkday); break; @@ -624,6 +645,11 @@ strftime (s, maxsize, format, tp) case 'B': if (modifier != 0) goto bad_format; + if (change_case) + { + to_uppcase = 1; + to_lowcase = 0; + } cpy (month_len, f_month); break; @@ -824,6 +850,11 @@ strftime (s, maxsize, format, tp) /* FALLTHROUGH */ case 'p': + if (change_case) + { + to_uppcase = 0; + to_lowcase = 1; + } cpy (ap_len, ampm); break; @@ -996,6 +1027,11 @@ strftime (s, maxsize, format, tp) DO_NUMBER (2, (tp->tm_year % 100 + 100) % 100); case 'Z': + if (change_case) + { + to_uppcase = 0; + to_lowcase = 1; + } cpy (zonelen, zone); break; diff --git a/time/strptime.c b/time/strptime.c index 90b88a1ba3..8d650716fe 100644 --- a/time/strptime.c +++ b/time/strptime.c @@ -541,7 +541,10 @@ strptime_internal (buf, format, tm, decided) break; case 'Y': /* Match year including century number. */ - get_number (0, INT_MAX); + if (sizeof (time_t) > 4) + get_number (0, 9999); + else + get_number (0, 2036); tm->tm_year = val - 1900; break; case 'Z': diff --git a/time/tzfile.c b/time/tzfile.c index 44b33cb02c..88e86e33b1 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -43,6 +43,8 @@ struct leap long int change; /* Seconds of correction to apply. */ }; +extern const char * __tzstring (const char *); /* Defined in tzset.c. */ + static struct ttinfo *find_transition (time_t timer); static void compute_tzname_max (size_t); @@ -244,7 +246,7 @@ __tzfile_read (const char *file) for (i = 0; i < num_isstd; ++i) { - char c = getc (f); + int c = getc (f); if (c == EOF) goto lose; types[i].isstd = c != 0; @@ -254,7 +256,7 @@ __tzfile_read (const char *file) for (i = 0; i < num_isgmt; ++i) { - char c = getc (f); + int c = getc (f); if (c == EOF) goto lose; types[i].isgmt = c != 0; @@ -267,9 +269,9 @@ __tzfile_read (const char *file) info = find_transition (0); for (i = 0; i < num_types && i < sizeof (__tzname) / sizeof (__tzname[0]); ++i) - __tzname[types[i].isdst] = &zone_names[types[i].idx]; + __tzname[types[i].isdst] = __tzstring (&zone_names[types[i].idx]); if (info->isdst < sizeof (__tzname) / sizeof (__tzname[0])) - __tzname[info->isdst] = &zone_names[info->idx]; + __tzname[info->isdst] = __tzstring (&zone_names[info->idx]); compute_tzname_max (chars); @@ -285,7 +287,8 @@ __tzfile_read (const char *file) from the TZDEFRULES file. */ void -__tzfile_default (char *std, char *dst, long int stdoff, long int dstoff) +__tzfile_default (const char *std, const char *dst, + long int stdoff, long int dstoff) { size_t stdlen, dstlen, i; long int rule_offset, rule_stdoff, rule_dstoff; @@ -372,8 +375,8 @@ __tzfile_default (char *std, char *dst, long int stdoff, long int dstoff) types[1].isdst = 1; /* Reset the zone names to point to the user's names. */ - __tzname[0] = &zone_names[0]; - __tzname[1] = &zone_names[stdlen]; + __tzname[0] = (char *) std; + __tzname[1] = (char *) dst; compute_tzname_max (stdlen + dstlen); } @@ -455,7 +458,7 @@ __tzfile_compute (time_t timer, long int *leap_correct, int *leap_hit) void compute_tzname_max (size_t chars) { - extern size_t __tzname_cur_max; /* Defined in __tzset.c. */ + extern size_t __tzname_cur_max; /* Defined in tzset.c. */ const char *p; diff --git a/time/tzset.c b/time/tzset.c index 05760b2c62..ca05fa81c5 100644 --- a/time/tzset.c +++ b/time/tzset.c @@ -31,8 +31,9 @@ extern const unsigned short int __mon_yday[2][13]; extern int __use_tzfile; extern void __tzfile_read __P ((const char *file)); -extern void __tzfile_default __P ((char *std, char *dst, +extern void __tzfile_default __P ((const char *std, const char *dst, long int stdoff, long int dstoff)); +extern const char * __tzstring __P ((const char *string)); extern int __tz_compute __P ((time_t timer, const struct tm *tm)); char *__tzname[2] = { (char *) "GMT", (char *) "GMT" }; @@ -53,7 +54,7 @@ weak_alias (__timezone, timezone) timezone given in the POSIX standard TZ envariable. */ typedef struct { - char *name; + const char *name; /* When to change. */ enum { J0, J1, M } type; /* Interpretation of: */ @@ -74,6 +75,68 @@ static tz_rule tz_rules[2]; static int compute_change __P ((tz_rule *rule, int year)); +/* Header for a list of buffers containing time zone strings. */ +struct tzstring_head +{ + struct tzstring_head *next; + /* The buffer itself immediately follows the header. + The buffer contains zero or more (possibly overlapping) strings. + The last string is followed by 2 '\0's instead of the usual 1. */ +}; + +/* First in a list of buffers containing time zone strings. + All the buffers but the last are read-only. */ +static struct +{ + struct tzstring_head head; + char data[48]; +} tzstring_list; + +/* Size of the last buffer in the list, not counting its header. */ +static size_t tzstring_last_buffer_size = sizeof tzstring_list.data; + +/* Allocate a time zone string with given contents. + The string will never be moved or deallocated. + However, its contents may be shared with other such strings. */ +const char * +__tzstring (string) + const char *string; +{ + struct tzstring_head *h = &tzstring_list.head; + size_t needed; + char *p; + + /* Look through time zone string list for a duplicate of this one. */ + for (h = &tzstring_list.head; ; h = h->next) + { + for (p = (char *) (h + 1); p[0] | p[1]; p++) + if (strcmp (p, string) == 0) + return p; + if (! h->next) + break; + } + + /* No duplicate was found. Copy to the end of this buffer if there's room; + otherwise, append a large-enough new buffer to the list and use it. */ + p++; + needed = strlen (string) + 2; /* Need 2 trailing '\0's after last string. */ + + if ((size_t) ((char *) (h + 1) + tzstring_last_buffer_size - p) < needed) + { + size_t buffer_size = tzstring_last_buffer_size; + while ((buffer_size *= 2) < needed) + continue; + if (! (h = h->next = malloc (sizeof *h + buffer_size))) + return NULL; + h->next = NULL; + tzstring_last_buffer_size = buffer_size; + p = (char *) (h + 1); + } + + strncpy (p, string, needed); + return p; +} + static char *old_tz = NULL; /* Interpret the TZ envariable. */ @@ -85,6 +148,7 @@ __tzset_internal (always) static int is_initialized = 0; register const char *tz; register size_t l; + char *tzbuf; unsigned short int hh, mm, ss; unsigned short int whichrule; @@ -112,12 +176,6 @@ __tzset_internal (always) /* No change, simply return. */ return; - /* Free old storage. */ - if (tz_rules[0].name != NULL && *tz_rules[0].name != '\0') - free ((void *) tz_rules[0].name); - if (tz_rules[1].name != NULL && *tz_rules[1].name != '\0' && - tz_rules[1].name != tz_rules[0].name) - free ((void *) tz_rules[1].name); tz_rules[0].name = NULL; tz_rules[1].name = NULL; @@ -135,16 +193,7 @@ __tzset_internal (always) if (tz == NULL || *tz == '\0') { - static const char UTC[] = "UTC"; - size_t len = sizeof UTC; - tz_rules[0].name = (char *) malloc (len); - if (tz_rules[0].name == NULL) - return; - tz_rules[1].name = (char *) malloc (len); - if (tz_rules[1].name == NULL) - return; - memcpy ((void *) tz_rules[0].name, UTC, len); - memcpy ((void *) tz_rules[1].name, UTC, len); + tz_rules[0].name = tz_rules[1].name = "UTC"; tz_rules[0].type = tz_rules[1].type = J0; tz_rules[0].m = tz_rules[0].n = tz_rules[0].d = 0; tz_rules[1].m = tz_rules[1].n = tz_rules[1].d = 0; @@ -157,11 +206,11 @@ __tzset_internal (always) /* Clear out old state and reset to unnamed UTC. */ memset (tz_rules, 0, sizeof tz_rules); - tz_rules[0].name = tz_rules[1].name = (char *) ""; + tz_rules[0].name = tz_rules[1].name = ""; /* Get the standard timezone name. */ - tz_rules[0].name = (char *) malloc (strlen (tz) + 1); - if (tz_rules[0].name == NULL) + tzbuf = malloc (strlen (tz) + 1); + if (! tzbuf) { /* Clear the old tz name so we will try again. */ free (old_tz); @@ -169,25 +218,23 @@ __tzset_internal (always) return; } - if (sscanf (tz, "%[^0-9,+-]", tz_rules[0].name) != 1 || - (l = strlen(tz_rules[0].name)) < 3) + if (sscanf (tz, "%[^0-9,+-]", tzbuf) != 1 || + (l = strlen (tzbuf)) < 3) { - free (tz_rules[0].name); - tz_rules[0].name = (char *) ""; + free (tzbuf); return; } - { - char *n = realloc ((void *) tz_rules[0].name, l + 1); - if (n != NULL) - tz_rules[0].name = n; - } + tz_rules[0].name = __tzstring (tzbuf); tz += l; /* Figure out the standard offset from UTC. */ if (*tz == '\0' || (*tz != '+' && *tz != '-' && !isdigit (*tz))) - return; + { + free (tzbuf); + return; + } if (*tz == '-' || *tz == '+') tz_rules[0].offset = *tz++ == '-' ? 1L : -1L; @@ -196,6 +243,7 @@ __tzset_internal (always) switch (sscanf (tz, "%hu:%hu:%hu", &hh, &mm, &ss)) { default: + free (tzbuf); return; case 1: mm = 0; @@ -218,23 +266,14 @@ __tzset_internal (always) /* Get the DST timezone name (if any). */ if (*tz != '\0') { - char *n = malloc (strlen (tz) + 1); - if (n != NULL) - { - tz_rules[1].name = n; - if (sscanf (tz, "%[^0-9,+-]", tz_rules[1].name) != 1 || - (l = strlen (tz_rules[1].name)) < 3) - { - free (n); - tz_rules[1].name = (char *) ""; - goto done_names; /* Punt on name, set up the offsets. */ - } - n = realloc ((void *) tz_rules[1].name, l + 1); - if (n != NULL) - tz_rules[1].name = n; + char *n = tzbuf + strlen (tzbuf) + 1; + if (sscanf (tz, "%[^0-9,+-]", n) != 1 || + (l = strlen (n)) < 3) + goto done_names; /* Punt on name, set up the offsets. */ - tz += l; - } + tz_rules[1].name = __tzstring (n); + + tz += l; /* Figure out the DST offset from GMT. */ if (*tz == '-' || *tz == '+') @@ -271,6 +310,7 @@ __tzset_internal (always) tz_rules[1].name = tz_rules[0].name; done_names: + free (tzbuf); if (*tz == '\0' || (tz[0] == ',' && tz[1] == '\0')) { diff --git a/time/zone.tab b/time/zone.tab index 074749916a..48b32373cc 100644 --- a/time/zone.tab +++ b/time/zone.tab @@ -101,6 +101,8 @@ CA +4916-12307 America/Vancouver Pacific Time - west British Columbia CA +6043-13503 America/Whitehorse Pacific Time - south Yukon CA +6404-13925 America/Dawson Pacific Time - north Yukon CC -1210+09655 Indian/Cocos +CD -0418+01518 Africa/Kinshasa west Dem. Rep. of Congo +CD -1140+02728 Africa/Lubumbashi east Dem. Rep. of Congo CF +0422+01835 Africa/Bangui CG -0416+01517 Africa/Brazzaville CH +4723+00832 Europe/Zurich @@ -111,6 +113,7 @@ CL -2710-10927 Pacific/Easter Easter Island CM +0403+00942 Africa/Douala CN +4545+12641 Asia/Harbin north Manchuria CN +3114+12128 Asia/Shanghai China coast +CN +2217+11409 Asia/Hong_Kong Hong Kong CN +2934+10635 Asia/Chungking China mountains CN +4348+08735 Asia/Urumqi Tibet & Xinjiang CN +3929+07559 Asia/Kashgar Eastern Turkestan @@ -167,7 +170,6 @@ GT +1438-09031 America/Guatemala GU +1328+14445 Pacific/Guam GW +1151-01535 Africa/Bissau GY +0648-05810 America/Guyana -HK +2217+11409 Asia/Hong_Kong HN +1406-08713 America/Tegucigalpa HR +4548+01558 Europe/Zagreb HT +1832-07220 America/Port-au-Prince @@ -366,6 +368,4 @@ YT -1247+04514 Indian/Mayotte YU +4450+02030 Europe/Belgrade ZA -2615+02800 Africa/Johannesburg ZM -1525+02817 Africa/Lusaka -ZR -0418+01518 Africa/Kinshasa west Zaire -ZR -1140+02728 Africa/Lubumbashi east Zaire ZW -1750+03103 Africa/Harare diff --git a/version.h b/version.h index 00d7dbde21..5fdc4bd82d 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ /* This file just defines the current version number of libc. */ #define RELEASE "experimental" -#define VERSION "2.0.4" +#define VERSION "2.0.5" diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index c296944fdd..91bcf081d1 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -34,6 +34,8 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \ wcscoll wcsxfrm \ wcwidth wcswidth +tests := tst-wcstof + include ../Rules CFLAGS-wcwidth.c = -I../wctype diff --git a/wcsmbs/tst-wcstof.c b/wcsmbs/tst-wcstof.c new file mode 100644 index 0000000000..197cb5c770 --- /dev/null +++ b/wcsmbs/tst-wcstof.c @@ -0,0 +1,23 @@ +#define _GNU_SOURCE 1 +#include <wchar.h> +#include <stdio.h> +#include <string.h> +#include <wctype.h> + +int +main (void) +{ + int result = 0; + char buf[100]; + wchar_t tmp[3]; + tmp[0] = '8'; + tmp[1] = '1'; + tmp[2] = 0; + + snprintf (buf, 100, "%S = %f", tmp, wcstof (tmp, NULL)); + printf ("\"%s\" -> %s\n", buf, + strcmp (buf, "81 = 81.000000") == 0 ? "okay" : "buggy"); + result |= strcmp (buf, "81 = 81.000000") != 0; + + return result; +} diff --git a/wcsmbs/wcstof.c b/wcsmbs/wcstof.c index 01a8950ed4..1e86f556d3 100644 --- a/wcsmbs/wcstof.c +++ b/wcsmbs/wcstof.c @@ -22,7 +22,7 @@ These macros tell it to produce the `float' version, `wcstof'. */ #define FLOAT float -#define FLT LDBL +#define FLT FLT #define STRTOF wcstof #define MPN2FLOAT __mpn_construct_float #define FLOAT_HUGE_VAL HUGE_VALf |