diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-05-21 01:48:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-05-21 01:48:59 +0000 |
commit | 1f205a479b43e5e40672fe5b4ae8f717b28c41b1 (patch) | |
tree | 0611b2d3503d81c55b27b235119ae999f1271178 | |
parent | 43b0e40f85770cd1f362c3abbad41e09bd9f0b17 (diff) | |
download | glibc-1f205a479b43e5e40672fe5b4ae8f717b28c41b1.tar.gz glibc-1f205a479b43e5e40672fe5b4ae8f717b28c41b1.tar.xz glibc-1f205a479b43e5e40672fe5b4ae8f717b28c41b1.zip |
Update. cvs/libc-ud-970520
1997-05-21 02:49 Ulrich Drepper <drepper@cygnus.com> * gnu-versions.h (_GNU_OBSTACK_INTERFACE_VERSION): Set to 2 since interface was changed with addition of _obstack_memory_used. Suggested by Ian Taylor <ian@cygnus.com>. * malloc/obstack.c: Include <config.h>. Include <stdlib.h> only if __GNU_LIBRARY__ or HAVE_STDLIB_H is defined. Reported by Ian Taylor <ian@cygnus.com>. * dirent/Makefile (routines): Add versionsort. * dirent/dirent.h: Add prototype for versionsort. * dirent/versionsort.c: New file. * manual/filesys.texi: Add documentation for versionsort. * manual/string.texi: Add documentation for strverscmp. * string/Makefile (routines): Add strverscmp. (tests): Add tst-svc. * string/string.h: Add prototype for strverscmp. * string/strverscmp.c: New file. * string/tst-svc.c: New file. Test for strverscmp. * string/tst-svc.input: New file. Input data for tst-svc. * string/tst-svc.expect: New file. Expected out from tst-svc. * math/Makefile (calls): Add s_signbit. * po/sv.po: Update. * resolv/nss_dns/dns-host.c: Add casts to prevent warnings. * sunrpc/pmap_rmt.c: Likewise. * string/basename.c: Don't use ISO C definition style. Include <config.h> is HAVE_CONFIG_H is defined. * sunrpc/proto.h: Add `const' wherever possible. * sunrpc/rpc_cout.c: Likewise. * sunrpc/rpc_svcout.c: Likewise. * sunrpc/xdr_mem.c: Likewise. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_stdio.c: Likewise. * sunrpc/rpc_parse.c: Delete comma from end of enum definition. * sunrpc/xdr.c: Little code cleanups. * sunrpc/xdr_flaot.c: Likewise. Patches by Matthew Wilcox <matthew.wilcox@chbs.mhs.ciba.com>. * sysdeps/i386/fpu/__math.h (__finite): Fix typo. * sysdeps/unix/sysv/linux/shmdt.c: Add cast to prevent warning. * time/europe: Update from tzdata1997f. * time/zic.c: Update from tzcode1997e. 1997-05-20 19:20 Miguel de Icaza <miguel@athena.nuclecu.unam.mx> * sysdeps/sparc/setjmp.S: Flush windows. Bug found by Richard Henderson. 1997-05-19 12:54 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * misc/efgcvt_r.c (fcvt_r, ecvt_r): Rewritten as to fit the specs. 1997-05-19 18:41 Thorsten Kukuk <kukuk@uni-paderborn.de> * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent): Use atol instead of atoi. 1997-05-18 00:22 Philip Blundell <pjb27@cam.ac.uk> * inet/Makefile (routines): Add if_index. * sysdeps/unix/sysv/linux/if_index.c: New file. * sysdeps/stub/if_index.c: New file. * sysdeps/unix/sysv/linux/net/if.h: Add prototypes for routines in if_index.c (required by IPv6 basic API). * sysdeps/unix/sysv/linux/netinet/in.h: Add struct ipv6_pktinfo. 1997-05-17 23:29 Philip Blundell <pjb27@cam.ac.uk> * sysdeps/unix/sysv/linux/netinet/in.h: Update IPv6 definitions for new advanced API draft. 1997-05-13 21:33 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdio-common/printf_fp.c: Only use the field width for deciding on padding when printing special values. * stdio-common/printf_fphex.c: Likewise. 1997-05-15 13:14 Miles Bader <miles@gnu.ai.mit.edu> Changes by Thomas Bushnell <thomas@gnu.ai.mit.edu>: * hurd/hurdauth.c (_S_msg_add_auth): Implement correctly. 1997-05-12 14:50 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * hurd/hurdsig.c (_hurdsig_init): Double size of sigthread stack; msg_add_auth was overflowing it. 1997-05-12 21:20 Richard Henderson <rth@tamu.edu> * elf/dl-lookup.c (_dl_lookup_symbol_skip): Call _dl_signal_error when we can't find the symbol. 1997-05-12 16:54 Ulrich Drepper <drepper@cygnus.com> * posix/regex.c: Fix handling of 32-bit Windog environments. Patch by Arnold Robbins <arnold@skeeve.atl.ga.us>. 1997-05-10 23:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add cacheflush. 1997-05-10 11:40 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/ldd.bash.in: Remove spurious quote character from version message. 1997-05-10 08:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * locale/programs/locale.c (write_charmaps): Don't get stuck in a loop if the file ends in a long line without newline. * locale/programs/charmap.c (charmap_read): Likewise. 1997-05-12 03:47 Ulrich Drepper <drepper@cygnus.com> * sunrpc/rpc/xdr.h: Include more headers to be self-contained. * sunrpc/rpc/svc_auth.h: Likewise. * sunrpc/rpc/svc.h: Likewise. * sunrpc/rpc/rpc_msg.h: Likewise. * sunrpc/rpc/pmap_rmt.h: Likewise. * sunrpc/rpc/pmap_clnt.h: Likewise. * sunrpc/rpc/clnt.h: Likewise. * sunrpc/rpc/auth_unix.h: Likewise. * sysdeps/generic/rpc/auth.h: Likewise. Patches by Michael Deutschmann <ldeutsch@mail.netshop.net>. 1997-05-11 15:29 Philip Blundell <pjb27@cam.ac.uk> * sysdeps/stub/sigaction.c (__sigaction): Correct typo. * sysdeps/standalone/arm/errnos.h: New file. * sysdeps/stub/sys/param.h: Add dummy definition of MAXSYMLINKS. * sysdeps/unix/arm/fork.S: New file. * sysdeps/unix/sysv/linux/arm/sysdep.h: New file. * sysdeps/stub/tempname.c (__stdio_gen_tempname): Add missing `streamptr' argument. * sysdeps/stub/vdprintf.c: Remove second copy of file (!), include <stdarg.h> to get va_list defined, return 0 not NULL. * sysdeps/unix/sysv/linux/statfsbuf.h: Include <gnu/types.h>. * sysdeps/unix/sysv/linux/arm/syscall.S: New file. * sysdeps/stub/direntry.h (struct dirent): Add missing ';'. * sysdeps/stub/seekdir.c (seekdir): Likewise. * sysdeps/stub/dirfd.c (dirfd): Argument dirp is DIR*, not FILE*. * sysdeps/standalone/dirstream.h: Define struct __dirstream not DIR; <dirent.h> provides typedef. * sysdeps/unix/sysv/linux/arm/clone.S: New file. * sysdeps/unix/sysv/linux/arm/socket.S: New file. * sysdeps/stub/sysconf.c (__sysconf): Fix typos. 1997-05-01 06:35 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/powerpc/Dist: New file. * sysdeps/powerpc/Makefile: New file. * sysdeps/powerpc/fclrexcpt.c: New file. * sysdeps/powerpc/fegetenv.c: New file. * sysdeps/powerpc/fegetround.c: New file. * sysdeps/powerpc/feholdexcpt.c: New file. * sysdeps/powerpc/fenvbits.h: New file. * sysdeps/powerpc/fenv_const.c: New file. * sysdeps/powerpc/fenv_libc.h: New file. * sysdeps/powerpc/fesetenv.c: New file. * sysdeps/powerpc/fesetround.c: New file. * sysdeps/powerpc/feupdateenv.c: New file. * sysdeps/powerpc/fgetexcptflg.c: New file. * sysdeps/powerpc/fraiseexcpt.c: New file. * sysdeps/powerpc/fsetexcptflg.c: New file. * sysdeps/powerpc/ftestexcept.c: New file. * sysdeps/powerpc/mathbits.h: New file. * sysdeps/powerpc/dl-machine.h: Wrap in #ifndef dl_machine_h; define elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p, ELF_MACHINE_RELOC_NOPLT; consequent changes to elf_machine_rela. * sysdeps/powerpc/__math.h: Remove definition for hypot and __sgn. * sysdep/powerpc/fpu_control.h: Correct IEEE default mode. * sysdeps/unix/sysv/linux/powerpc/sysdep.h: Don't use .text, but instead .section ".text". 1997-04-25 05:06 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/powerpc/__longjmp.S: Use symbolic register numbering. * sysdeps/powerpc/bsd-_setjmp.S: Likewise. * sysdeps/powerpc/bsd-setjmp.S: Likewise. * sysdeps/powerpc/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/clone.S: Likewise. * sysdeps/unix/sysv/linux/socket.S: Likewise. * sysdeps/unix/sysv/linux/syscall.S: Likewise. 1997-04-20 04:37 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/powerpc/strchr.s: New file. * sysdeps/powerpc/strcmp.s: New (ugly) file. * sysdeps/powerpc/memset.s: New file. * string/tester.c: Include prototype and _GNU_SOURCE to make standalone compilation possible. Give strcmp a better test. Give memset a better test. 1997-04-05 06:34 Geoff Keating <geoffk@ozemail.com.au> * sysdeps/powerpc/strlen.s: Fixed bugs (how did it ever pass its tests before?). Changed to symbolic register numbering as an experiment. * sysdeps/powerpc/ffs.c: Don't include bstring.h, it doesn't exist. * sysdeps/rs6000/ffs.c: Likewise. 1997-05-12 02:28 Ulrich Drepper <drepper@cygnus.com> * time/sys/time.h: Make second argument of setitimer const. Patch by Michael Deutschmann <ldeutsch@mail.netshop.net>. * sysdeps/stub/setitimer.c: Likewise. * sysdeps/mach/hurd/setitimer.c: Likewise.
116 files changed, 3211 insertions, 1136 deletions
diff --git a/.cvsignore b/.cvsignore index 519db6b9c3..1378938989 100644 --- a/.cvsignore +++ b/.cvsignore @@ -21,3 +21,5 @@ crypt linuxthreads localedata secure_rpc + +aio diff --git a/BUGS b/BUGS index 174d7ccc7e..ac2066293b 100644 --- a/BUGS +++ b/BUGS @@ -1,7 +1,7 @@ List of known bugs (certainly very incomplete) ---------------------------------------------- -Time-stamp: <1997-03-22T04:31:41+0100 drepper> +Time-stamp: <1997-05-12T02:39:19+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 @@ -29,8 +29,7 @@ Severity: [ *] to [***] [ **] There are problems with signal handling when using LinuxThreads. -[ **] The `cbrtl' function is inaccurate. The algorithm used for `double' - and `float' is not usable for `long double'. +[ **] The `cbrtl' function for ix86 does not work in the moment. [ **] Not really a bug, but it could lead to such: The RPC code is ugly ugly ugly. It's more or less verbatim taken diff --git a/ChangeLog b/ChangeLog index 794d891b44..5ef2a6099d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,225 @@ +1997-05-21 02:49 Ulrich Drepper <drepper@cygnus.com> + + * gnu-versions.h (_GNU_OBSTACK_INTERFACE_VERSION): Set to 2 since + interface was changed with addition of _obstack_memory_used. + Suggested by Ian Taylor <ian@cygnus.com>. + + * malloc/obstack.c: Include <config.h>. Include <stdlib.h> only + if __GNU_LIBRARY__ or HAVE_STDLIB_H is defined. + Reported by Ian Taylor <ian@cygnus.com>. + + * dirent/Makefile (routines): Add versionsort. + * dirent/dirent.h: Add prototype for versionsort. + * dirent/versionsort.c: New file. + * manual/filesys.texi: Add documentation for versionsort. + * manual/string.texi: Add documentation for strverscmp. + * string/Makefile (routines): Add strverscmp. + (tests): Add tst-svc. + * string/string.h: Add prototype for strverscmp. + * string/strverscmp.c: New file. + * string/tst-svc.c: New file. Test for strverscmp. + * string/tst-svc.input: New file. Input data for tst-svc. + * string/tst-svc.expect: New file. Expected out from tst-svc. + + * math/Makefile (calls): Add s_signbit. + + * po/sv.po: Update. + + * resolv/nss_dns/dns-host.c: Add casts to prevent warnings. + * sunrpc/pmap_rmt.c: Likewise. + + * string/basename.c: Don't use ISO C definition style. + Include <config.h> is HAVE_CONFIG_H is defined. + + * sunrpc/proto.h: Add `const' wherever possible. + * sunrpc/rpc_cout.c: Likewise. + * sunrpc/rpc_svcout.c: Likewise. + * sunrpc/xdr_mem.c: Likewise. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_stdio.c: Likewise. + * sunrpc/rpc_parse.c: Delete comma from end of enum definition. + * sunrpc/xdr.c: Little code cleanups. + * sunrpc/xdr_flaot.c: Likewise. + Patches by Matthew Wilcox <matthew.wilcox@chbs.mhs.ciba.com>. + + * sysdeps/i386/fpu/__math.h (__finite): Fix typo. + + * sysdeps/unix/sysv/linux/shmdt.c: Add cast to prevent warning. + + * time/europe: Update from tzdata1997f. + * time/zic.c: Update from tzcode1997e. + +1997-05-20 19:20 Miguel de Icaza <miguel@athena.nuclecu.unam.mx> + + * sysdeps/sparc/setjmp.S: Flush windows. + Bug found by Richard Henderson. + +1997-05-19 12:54 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * misc/efgcvt_r.c (fcvt_r, ecvt_r): Rewritten as to fit the specs. + +1997-05-19 18:41 Thorsten Kukuk <kukuk@uni-paderborn.de> + + * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_parse_spent): Use + atol instead of atoi. + +1997-05-18 00:22 Philip Blundell <pjb27@cam.ac.uk> + + * inet/Makefile (routines): Add if_index. + * sysdeps/unix/sysv/linux/if_index.c: New file. + * sysdeps/stub/if_index.c: New file. + * sysdeps/unix/sysv/linux/net/if.h: Add prototypes for routines in + if_index.c (required by IPv6 basic API). + * sysdeps/unix/sysv/linux/netinet/in.h: Add struct ipv6_pktinfo. + +1997-05-17 23:29 Philip Blundell <pjb27@cam.ac.uk> + + * sysdeps/unix/sysv/linux/netinet/in.h: Update IPv6 definitions + for new advanced API draft. + +1997-05-13 21:33 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * stdio-common/printf_fp.c: Only use the field width for deciding + on padding when printing special values. + * stdio-common/printf_fphex.c: Likewise. + +1997-05-15 13:14 Miles Bader <miles@gnu.ai.mit.edu> + + Changes by Thomas Bushnell <thomas@gnu.ai.mit.edu>: + * hurd/hurdauth.c (_S_msg_add_auth): Implement correctly. + +1997-05-12 14:50 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + + * hurd/hurdsig.c (_hurdsig_init): Double size of sigthread stack; + msg_add_auth was overflowing it. + +1997-05-12 21:20 Richard Henderson <rth@tamu.edu> + + * elf/dl-lookup.c (_dl_lookup_symbol_skip): Call _dl_signal_error + when we can't find the symbol. + +1997-05-12 16:54 Ulrich Drepper <drepper@cygnus.com> + + * posix/regex.c: Fix handling of 32-bit Windog environments. + Patch by Arnold Robbins <arnold@skeeve.atl.ga.us>. + +1997-05-10 23:26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * sysdeps/unix/sysv/linux/m68k/syscalls.list: Add cacheflush. + +1997-05-10 11:40 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * elf/ldd.bash.in: Remove spurious quote character from version + message. + +1997-05-10 08:49 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * locale/programs/locale.c (write_charmaps): Don't get stuck in a + loop if the file ends in a long line without newline. + * locale/programs/charmap.c (charmap_read): Likewise. + +1997-05-12 03:47 Ulrich Drepper <drepper@cygnus.com> + + * sunrpc/rpc/xdr.h: Include more headers to be self-contained. + * sunrpc/rpc/svc_auth.h: Likewise. + * sunrpc/rpc/svc.h: Likewise. + * sunrpc/rpc/rpc_msg.h: Likewise. + * sunrpc/rpc/pmap_rmt.h: Likewise. + * sunrpc/rpc/pmap_clnt.h: Likewise. + * sunrpc/rpc/clnt.h: Likewise. + * sunrpc/rpc/auth_unix.h: Likewise. + * sysdeps/generic/rpc/auth.h: Likewise. + Patches by Michael Deutschmann <ldeutsch@mail.netshop.net>. + +1997-05-11 15:29 Philip Blundell <pjb27@cam.ac.uk> + + * sysdeps/stub/sigaction.c (__sigaction): Correct typo. + * sysdeps/standalone/arm/errnos.h: New file. + * sysdeps/stub/sys/param.h: Add dummy definition of MAXSYMLINKS. + * sysdeps/unix/arm/fork.S: New file. + * sysdeps/unix/sysv/linux/arm/sysdep.h: New file. + * sysdeps/stub/tempname.c (__stdio_gen_tempname): Add missing + `streamptr' argument. + * sysdeps/stub/vdprintf.c: Remove second copy of file (!), include + <stdarg.h> to get va_list defined, return 0 not NULL. + * sysdeps/unix/sysv/linux/statfsbuf.h: Include <gnu/types.h>. + * sysdeps/unix/sysv/linux/arm/syscall.S: New file. + * sysdeps/stub/direntry.h (struct dirent): Add missing ';'. + * sysdeps/stub/seekdir.c (seekdir): Likewise. + * sysdeps/stub/dirfd.c (dirfd): Argument dirp is DIR*, not FILE*. + * sysdeps/standalone/dirstream.h: Define struct __dirstream + not DIR; <dirent.h> provides typedef. + * sysdeps/unix/sysv/linux/arm/clone.S: New file. + * sysdeps/unix/sysv/linux/arm/socket.S: New file. + * sysdeps/stub/sysconf.c (__sysconf): Fix typos. + +1997-05-01 06:35 Geoff Keating <geoffk@ozemail.com.au> + + * sysdeps/powerpc/Dist: New file. + * sysdeps/powerpc/Makefile: New file. + * sysdeps/powerpc/fclrexcpt.c: New file. + * sysdeps/powerpc/fegetenv.c: New file. + * sysdeps/powerpc/fegetround.c: New file. + * sysdeps/powerpc/feholdexcpt.c: New file. + * sysdeps/powerpc/fenvbits.h: New file. + * sysdeps/powerpc/fenv_const.c: New file. + * sysdeps/powerpc/fenv_libc.h: New file. + * sysdeps/powerpc/fesetenv.c: New file. + * sysdeps/powerpc/fesetround.c: New file. + * sysdeps/powerpc/feupdateenv.c: New file. + * sysdeps/powerpc/fgetexcptflg.c: New file. + * sysdeps/powerpc/fraiseexcpt.c: New file. + * sysdeps/powerpc/fsetexcptflg.c: New file. + * sysdeps/powerpc/ftestexcept.c: New file. + * sysdeps/powerpc/mathbits.h: New file. + + * sysdeps/powerpc/dl-machine.h: Wrap in #ifndef dl_machine_h; + define elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p, + ELF_MACHINE_RELOC_NOPLT; consequent changes to elf_machine_rela. + + * sysdeps/powerpc/__math.h: Remove definition for hypot and __sgn. + + * sysdep/powerpc/fpu_control.h: Correct IEEE default mode. + + * sysdeps/unix/sysv/linux/powerpc/sysdep.h: Don't use .text, but + instead .section ".text". + +1997-04-25 05:06 Geoff Keating <geoffk@ozemail.com.au> + + * sysdeps/powerpc/__longjmp.S: Use symbolic register numbering. + * sysdeps/powerpc/bsd-_setjmp.S: Likewise. + * sysdeps/powerpc/bsd-setjmp.S: Likewise. + * sysdeps/powerpc/setjmp.S: Likewise. + + * sysdeps/unix/sysv/linux/clone.S: Likewise. + * sysdeps/unix/sysv/linux/socket.S: Likewise. + * sysdeps/unix/sysv/linux/syscall.S: Likewise. + +1997-04-20 04:37 Geoff Keating <geoffk@ozemail.com.au> + + * sysdeps/powerpc/strchr.s: New file. + * sysdeps/powerpc/strcmp.s: New (ugly) file. + * sysdeps/powerpc/memset.s: New file. + * string/tester.c: Include prototype and _GNU_SOURCE to make + standalone compilation possible. Give strcmp a better + test. Give memset a better test. + +1997-04-05 06:34 Geoff Keating <geoffk@ozemail.com.au> + + * sysdeps/powerpc/strlen.s: Fixed bugs (how did it ever pass its + tests before?). Changed to symbolic register numbering as an + experiment. + * sysdeps/powerpc/ffs.c: Don't include bstring.h, it doesn't + exist. + * sysdeps/rs6000/ffs.c: Likewise. + +1997-05-12 02:28 Ulrich Drepper <drepper@cygnus.com> + + * time/sys/time.h: Make second argument of setitimer const. + Patch by Michael Deutschmann <ldeutsch@mail.netshop.net>. + * sysdeps/stub/setitimer.c: Likewise. + * sysdeps/mach/hurd/setitimer.c: Likewise. + 1997-05-10 11:46 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/rpcsvc/nis_callback.x: New, from tirpcsrc-2.3. diff --git a/FAQ b/FAQ index 16f6157f33..77bcaa658c 100644 --- a/FAQ +++ b/FAQ @@ -183,7 +183,12 @@ Library. slow. * plenty of time (approx 1h for i?86-linux on i586@133 or 2.5h on - i486@66 or 4.5h on i486@33). For Hurd systems times are much higher. + i486@66 or 4.5h on i486@33), both for shared and static only). + For Hurd systems times are much higher. + + For Atari Falcon (Motorola 68030 @ 16 Mhz, 14 Mb memory) James Troup + <J.J.Troup@comp.brad.ac.uk> reports for a full build (shared, static, + and profiled) a compile time of 45h34m. If you have some more measurements let me know. @@ -578,6 +583,10 @@ something like this: GROUP ( libc.so.6 ld.so.1 libc.a ) +or in ix86/Linux and alpha/Linux: + +GROUP ( libc.so.6 ld-linux.so.2 libc.a ) + ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [Q18] ``The prototypes for `connect', `accept', `getsockopt', @@ -699,7 +708,7 @@ Answers were given by: {DMT} David Mosberger-Tang, <davidm@AZStarNet.com> {RM} Roland McGrath, <roland@gnu.ai.mit.edu> {HJL} H.J. Lu, <hjl@gnu.ai.mit.edu> -{AJ} Andreas Jaeger, <aj@arthur.pfalz.de> +{AJ} Andreas Jaeger, <aj@arthur.rhein-neckar.de> {EY} Eric Youngdale, <eric@andante.jic.com> Local Variables: diff --git a/dirent/Makefile b/dirent/Makefile index 8741faf769..4b64498d28 100644 --- a/dirent/Makefile +++ b/dirent/Makefile @@ -23,7 +23,7 @@ subdir := dirent headers := dirent.h direntry.h routines := opendir closedir readdir readdir_r rewinddir \ - seekdir telldir scandir alphasort \ + seekdir telldir scandir alphasort versionsort \ getdents dirfd distribute := dirstream.h diff --git a/dirent/dirent.h b/dirent/dirent.h index 3d187e1096..9caf272aa1 100644 --- a/dirent/dirent.h +++ b/dirent/dirent.h @@ -175,6 +175,10 @@ extern int scandir __P ((__const char *__dir, /* Function to compare two `struct dirent's alphabetically. */ extern int alphasort __P ((__const __ptr_t, __const __ptr_t)); +# ifdef __USE_GNU +/* Function to compare two `struct dirent's by name & version. */ +extern int versionsort __P ((__const __ptr_t, __const __ptr_t)); +#endif /* Read directory entries from FD into BUF, reading at most NBYTES. Reading starts at offset *BASEP, and *BASEP is updated with the new diff --git a/dirent/versionsort.c b/dirent/versionsort.c new file mode 100644 index 0000000000..182680bc45 --- /dev/null +++ b/dirent/versionsort.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1992, 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 <dirent.h> +#include <string.h> + +int +versionsort (const void *a, const void *b) +{ + return strverscmp ((*(const struct dirent **) a)->d_name, + (*(const struct dirent **) b)->d_name); +} diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index f85aa373c2..63a525edaa 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -332,6 +332,18 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name, reference_name, version, skip_map, 0)) break; + if (current_value.s == NULL && + (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)) + { + /* We could find no value for a strong reference. */ + static const char msg[] = "undefined symbol: "; + const size_t len = strlen (undef_name); + char buf[sizeof msg + len]; + memcpy (buf, msg, sizeof msg - 1); + memcpy (&buf[sizeof msg - 1], undef_name, len + 1); + _dl_signal_error (0, reference_name, buf); + } + *ref = current_value.s; return current_value.a; } diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in index 492d3ba452..c433a72679 100644 --- a/elf/ldd.bash.in +++ b/elf/ldd.bash.in @@ -35,7 +35,7 @@ bind_now= while test $# -gt 0; do case "$1" in --v | --ve | --ver | --vers | --versi | --versio | --version) - echo '"ldd (GNU libc) @VERSION@' + echo 'ldd (GNU libc) @VERSION@' echo $"Copyright (C) 1996, 1997 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." diff --git a/gnu-versions.h b/gnu-versions.h index f27e34fc29..7085895a0a 100644 --- a/gnu-versions.h +++ b/gnu-versions.h @@ -44,7 +44,7 @@ remember, if any of these versions change, the libc.so major version number must change too (so avoid it)! */ -#define _GNU_OBSTACK_INTERFACE_VERSION 1 /* vs malloc/obstack.c */ +#define _GNU_OBSTACK_INTERFACE_VERSION 2 /* vs malloc/obstack.c */ #define _GNU_REGEX_INTERFACE_VERSION 1 /* vs posix/regex.c */ #define _GNU_GLOB_INTERFACE_VERSION 1 /* vs posix/glob.c */ #define _GNU_GETOPT_INTERFACE_VERSION 2 /* vs posix/getopt.c and diff --git a/hurd/hurdauth.c b/hurd/hurdauth.c index c60b8d8326..64c9db4582 100644 --- a/hurd/hurdauth.c +++ b/hurd/hurdauth.c @@ -37,17 +37,124 @@ _S_msg_add_auth (mach_port_t me, { error_t err; auth_t newauth; + uid_t *genuids, *gengids, *auxuids, *auxgids; + mach_msg_type_number_t ngenuids, ngengids, nauxuids, nauxgids; + uid_t *newgenuids, *newgengids, *newauxuids, *newauxgids; + mach_msg_type_number_t nnewgenuids, nnewgengids, nnewauxuids, nnewauxgids; + + /* Create a list of ids and store it in NEWLISTP, length NEWLISTLEN. + Keep all the ids in EXIST (len NEXIST), adding in those from NEW + (len NNEW) which are not already there. */ + error_t make_list (uid_t **newlistp, mach_msg_type_number_t *newlistlen, + uid_t *exist, mach_msg_type_number_t nexist, + uid_t *new, mach_msg_type_number_t nnew) + { + error_t urp; + int i, j, k; + vm_size_t offset; + + urp = vm_allocate (mach_task_self (), (vm_address_t *) newlistp, + nexist + nnew * sizeof (uid_t), 1); + if (urp) + return urp; + + j = 0; + for (i = 0; i < nexist; i++) + (*newlistp)[j++] = exist[i]; + + for (i = 0; i < nnew; i++) + { + for (k = 0; k < nexist; k++) + if (exist[k] == new[i]) + break; + if (k < nexist) + continue; + + (*newlistp)[j++] = new[i]; + } + + offset = (round_page (nexist + nnew * sizeof (uid_t)) + - round_page (j * sizeof (uid_t))); + if (offset) + vm_deallocate (mach_task_self (), + (vm_address_t) (*newlistp + + (nexist + nnew * sizeof (uid_t))), + offset); + *newlistlen = j; + return 0; + } + + /* Find out what ids ADDAUTH refers to */ - if (err = __USEPORT (AUTH, - __auth_makeauth (port, - &addauth, MACH_MSG_TYPE_MOVE_SEND, 1, - NULL, 0, - NULL, 0, - NULL, 0, - NULL, 0, - &newauth))) + genuids = gengids = auxuids = auxgids = 0; + ngenuids = ngengids = nauxuids = nauxgids = 0; + err = __auth_getids (addauth, + &genuids, &ngenuids, + &auxuids, &nauxuids, + &gengids, &ngengids, + &auxgids, &nauxgids); + if (err) return err; + /* OR in these ids to what we already have, creating a new list. */ + + HURD_CRITICAL_BEGIN; + __mutex_lock (&_hurd_id.lock); + _hurd_check_ids (); + +#define MAKE(genaux,uidgid) \ + make_list (&new ## genaux ## uidgid ## s, \ + &nnew ## genaux ## uidgid ## s, \ + _hurd_id.genaux.uidgid ## s, \ + _hurd_id.genaux.n ## uidgid ## s, \ + genaux ## uidgid ## s, \ + n ## genaux ## uidgid ## s) + + err = MAKE (gen, uid); + if (!err) + MAKE (aux, uid); + if (!err) + MAKE (gen, gid); + if (!err) + MAKE (aux, gid); +#undef MAKE + + __mutex_unlock (&_hurd_id.lock); + HURD_CRITICAL_END; + + + /* Create the new auth port */ + + if (!err) + err = __USEPORT (AUTH, + __auth_makeauth (port, + &addauth, MACH_MSG_TYPE_MOVE_SEND, 1, + newgenuids, nnewgenuids, + newauxuids, nnewauxuids, + newgengids, nnewgengids, + newauxgids, nnewauxgids, + &newauth)); + +#define freeup(array, len) \ + if (array) \ + vm_deallocate (mach_task_self (), (vm_address_t) array, \ + len * sizeof (uid_t)); + + freeup (genuids, ngenuids); + freeup (auxuids, nauxuids); + freeup (gengids, ngengids); + freeup (auxgids, nauxgids); + freeup (newgenuids, nnewgenuids); + freeup (newauxuids, nnewauxuids); + freeup (newgengids, nnewgengids); + freeup (newauxgids, nnewauxgids); +#undef freeup + + if (err) + return err; + + /* And install it. */ + err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); if (err) diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 592dc12e66..f50daa2f8f 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -1194,7 +1194,7 @@ _hurdsig_init (void) err = __thread_create (__mach_task_self (), &_hurd_msgport_thread); assert_perror (err); - stacksize = __vm_page_size * 4; /* Small stack for signal thread. */ + stacksize = __vm_page_size * 8; /* Small stack for signal thread. */ err = __mach_setup_thread (__mach_task_self (), _hurd_msgport_thread, _hurd_msgport_receive, (vm_address_t *) &__hurd_sigthread_stack_base, diff --git a/inet/Makefile b/inet/Makefile index 02e10335f4..fbd658a7bf 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -44,7 +44,7 @@ routines := ntohl ntohs htonl htons \ rcmd rexec ruserpass \ getnetgrent_r getnetgrent \ getaliasent_r getaliasent getaliasname getaliasname_r \ - in6_addr getnameinfo + in6_addr getnameinfo if_index # No warnings about losing BSD code. CFLAGS-rcmd.c = -w diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c index 359b913c1f..416615a1b9 100644 --- a/locale/programs/charmap.c +++ b/locale/programs/charmap.c @@ -114,9 +114,9 @@ charmap_read (const char *filename) if (fscanf (fp, " <code_set_name> %as", &name) == 1) break; - do - fgets (junk, sizeof junk, fp); - while (strchr (junk, '\n') == NULL); + while (fgets (junk, sizeof junk, fp) != NULL + && strchr (junk, '\n') == NULL) + continue; } fclose (fp); diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 28ad94403f..52ae56a819 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -504,9 +504,9 @@ write_charmaps (void) if (fscanf (fp, " <code_set_name> %as", &name) == 1) break; - do - fgets (junk, sizeof junk, fp); - while (strchr (junk, '\n') == NULL); + while (fgets (junk, sizeof junk, fp) != NULL + && strchr (junk, '\n') == NULL) + continue; } fclose (fp); diff --git a/malloc/obstack.c b/malloc/obstack.c index 1e36c4a0a5..731762f5a9 100644 --- a/malloc/obstack.c +++ b/malloc/obstack.c @@ -1,5 +1,5 @@ /* obstack.c - subroutines used implicitly by object stack macros - Copyright (C) 1988,89,90,91,92,93,94,96 Free Software Foundation, Inc. + Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. This file is part of the GNU C Library. Its master source is NOT part of the C library, however. The master source lives in /gd/gnu/lib. @@ -19,6 +19,10 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "obstack.h" /* NOTE BEFORE MODIFYING THIS FILE: This version number must be @@ -85,7 +89,7 @@ void (*obstack_alloc_failed_handler) () = print_and_abort; #endif /* Exit value used when `print_and_abort' is used. */ -#if defined (__STDC__) && __STDC__ +#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H #include <stdlib.h> #endif #ifndef EXIT_FAILURE diff --git a/manual/filesys.texi b/manual/filesys.texi index afe072c594..5ddd8a20a7 100644 --- a/manual/filesys.texi +++ b/manual/filesys.texi @@ -455,8 +455,8 @@ value are selected. Finally the entries in the @var{namelist} are sorted using the user supplied function @var{cmp}. The arguments of the @var{cmp} function are of type @code{struct dirent **}. I.e., one cannot directly use the -@code{strcmp} or @code{strcoll} function; see the function -@code{alphasort} below. +@code{strcmp} or @code{strcoll} function; see the functions +@code{alphasort} and @code{versionsort} below. The return value of the function gives the number of entries placed in @var{namelist}. If it is @code{-1} an error occurred and the global @@ -465,7 +465,7 @@ variable @code{errno} contains more information on the error. As said above the fourth argument to the @code{scandir} function must be a pointer to a sorting function. For the convenience of the programmer -the GNU C library contains an implementation of a function which is very +the GNU C library contains implementations of functions which are very helpful for this purpose. @deftypefun int alphasort (const void *@var{a}, const void *@var{b}) @@ -478,6 +478,11 @@ Return value of is less than, equal to, or greater than zero depending on the order of the two entries @var{a} and @var{b}. @end deftypefun +@deftypefun int versionsort (const void *@var{a}, const void *@var{b}) +The @code{versionsort} function is like @code{alphasort}, excepted that it +uses the @code{strverscmp} function internally. +@end deftypefun + @node Simple Directory Lister Mark II @subsection Simple Program to List a Directory, Mark II diff --git a/manual/string.texi b/manual/string.texi index 8f09ac9728..e358b2015f 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -609,6 +609,56 @@ strncmp ("hello, world", "hello, stupid world!!!", 5) @end smallexample @comment string.h +@comment GNU +@deftypefun int strverscmp (const char *@var{s1}, const char *@var{s2}) +The @code{strverscmp} function compares the string @var{s1} against +@var{s2}, considering them as holding indices/version numbers. Return +value follows the same conventions as found in the @code{strverscmp} +function. In fact, if @var{s1} and @var{s2} contain no digits, +@code{strverscmp} behaves like @code{strcmp}. + +Basically, we compare strings normaly (character by character), until +we find a digit in each string - then we enter a special comparison +mode, where each sequence of digit is taken as a whole. If we reach the +end of these two parts without noticing a difference, we return to the +standard comparison mode. There are two types of numeric parts: +"integral" and "fractionnal" (these laters begins with a '0'). The types +of the numeric parts affect the way we sort them: + +@itemize @bullet +@item +integral/integral: we compare values as you would expect. + +@item +fractionnal/integral: the fractionnal part is less than the integral one. +Again, no surprise. + +@item +fractionnal/fractionnal: the things become a bit more complex. +if the common prefix contains only leading zeroes, the longest part is less +than the other one; else the comparison behaves normaly. +@end itemize + +@smallexample +strverscmp ("no digit", "no digit") + @result{} 0 /* @r{same behaviour as strverscmp.} */ +strverscmp ("item#99", "item#100") + @result{} <0 /* @r{same prefix, but 99 < 100.} */ +strverscmp ("alpha1", "alpha001") + @result{} >0 /* @r{fractionnal part inferior to integral one.} */ +strverscmp ("part1_f012", "part1_f01") + @result{} >0 /* @r{two fractionnal parts.} */ +strverscmp ("foo.009", "foo.0") + @result{} <0 /* @r{idem, but with leading zeroes only.} */ +@end smallexample + +This function is especially usefull when dealing with filename sorting, +because filenames frequently hold indices/version numbers. + +@code{strverscmp} is a GNU extension. +@end deftypefun + +@comment string.h @comment BSD @deftypefun int bcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size}) This is an obsolete alias for @code{memcmp}, derived from BSD. diff --git a/manual/texinfo.tex b/manual/texinfo.tex index 72050b8e22..6bae66900a 100644 --- a/manual/texinfo.tex +++ b/manual/texinfo.tex @@ -1,5 +1,5 @@ %% TeX macros to handle Texinfo files. -%% $Id: texinfo.tex,v 2.198 1997/05/07 15:16:03 drepper Exp $ +%% $Id: texinfo.tex,v 2.199 1997/05/20 11:11:48 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.198 $ +\deftexinfoversion$Revision: 2.199 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number @@ -1271,8 +1271,6 @@ where each line of input produces a line of output.} \def\ctrl #1{{\tt \rawbackslash \hat}#1} \let\file=\samp -\let\url=\samp % perhaps include a hypertex \special eventually -\def\email#1{$\langle${\tt #1}$\rangle$} % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. @@ -1325,7 +1323,7 @@ where each line of input produces a line of output.} \def\realdash{-} \def\codedash{-\discretionary{}{}{}} -\def\codeunder{\normalunderscore\discretionary{}{}{}} +\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary @@ -1339,6 +1337,12 @@ where each line of input produces a line of output.} \else{\tclose{\ttsl\look}}\fi \else{\tclose{\ttsl\look}}\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. +%\def\email#1{$\langle${\tt #1}$\rangle$} +\let\email=\code + % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have @@ -3417,8 +3421,8 @@ width0pt\relax} \fi \let\.=\ptexdot \let\*=\ptexstar \let\dots=\ptexdots -\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}} -\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi} +\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% +\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% \let\bullet=\ptexbullet \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext diff --git a/math/Makefile b/math/Makefile index 839e441354..87b47ab1b6 100644 --- a/math/Makefile +++ b/math/Makefile @@ -67,7 +67,8 @@ distribute += $(long-m-yes:=.c) # These functions are in libc instead of libm because __printf_fp # calls them, so any program using printf will need them linked in, # and we don't want to have to link every program with -lm. -calls = s_isinf s_isnan s_finite s_copysign s_modf s_scalbn s_frexp s_ldexp +calls = s_isinf s_isnan s_finite s_copysign s_modf s_scalbn s_frexp s_ldexp \ + s_signbit routines = $(calls) $(calls:=f) $(long-c-$(long-double-fcts)) long-c-yes = $(calls:=l) distribute += $(long-c-yes:=.c) diff --git a/math/fenv.h b/math/fenv.h index c065d662e0..e4dff29a2e 100644 --- a/math/fenv.h +++ b/math/fenv.h @@ -71,7 +71,7 @@ extern void fegetexceptflag __P ((fexcept_t *__flagp, int __excepts)); /* Raise the supported exceptions represented by EXCEPTS. */ extern void feraiseexcept __P ((int __excepts)); -/* Set complete status for exceptions inidicated by EXCEPTS according to +/* Set complete status for exceptions indicated by EXCEPTS according to the representation in the object pointed to by FLAGP. */ extern void fesetexceptflag __P ((__const fexcept_t *__flagp, int __excepts)); diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index e6030c8543..69caef01d7 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -37,6 +37,7 @@ #define FLOOR APPEND(floor, FLOAT_NAME_EXT) #define FABS APPEND(fabs, FLOAT_NAME_EXT) #define LOG10 APPEND(log10, FLOAT_NAME_EXT) +#define EXP APPEND(exp, FLOAT_NAME_EXT) int @@ -54,9 +55,12 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len) return -1; } - *sign = value < 0.0; - if (*sign) - value = - value; + if (isfinite (value)) + { + *sign = signbit (value) != 0; + if (*sign) + value = -value; + } n = snprintf (buf, len, "%.*" FLOAT_FMT_FLAG "f", ndigit, value); if (n < 0) @@ -66,16 +70,29 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len) while (i < n && isdigit (buf[i])) ++i; *decpt = i; - do - ++i; - while (! isdigit (buf[i])); - memmove (&buf[i - *decpt], buf, n - (i - *decpt)); + + if (i == 0) + { + /* Value is Inf or NaN. */ + *sign = 0; + return 0; + } + + if (i < n) + { + do + ++i; + while (i < n && !isdigit (buf[i])); + memmove (&buf[*decpt], &buf[i], n - i); + buf[n - (i - *decpt)] = 0; + } return 0; } #define weak_extern2(name) weak_extern (name) weak_extern2 (FLOOR) weak_extern2 (LOG10) weak_extern2 (FABS) +weak_extern2 (EXP) int APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len) @@ -84,24 +101,55 @@ APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len) char *buf; size_t len; { - FLOAT_TYPE (*log10_function) (FLOAT_TYPE) = &LOG10; + int exponent = 0; - if (log10_function) - { - /* Use the reasonable code if -lm is included. */ - ndigit -= (int) FLOOR (LOG10 (FABS (value))); - if (ndigit < 0) - ndigit = 0; - } - else + if (isfinite (value) && value != 0.0) { - /* Slow code that doesn't require -lm functions. */ - FLOAT_TYPE d; - for (d = value < 0.0 ? - value : value; - ndigit > 0 && d >= 10.0; - d *= 0.1) - --ndigit; + FLOAT_TYPE (*log10_function) (FLOAT_TYPE) = &LOG10; + + if (log10_function) + { + /* Use the reasonable code if -lm is included. */ + FLOAT_TYPE dexponent; + dexponent = FLOOR (LOG10 (FABS (value))); + value *= EXP (dexponent * -M_LN10); + exponent = (int) dexponent; + } + else + { + /* Slow code that doesn't require -lm functions. */ + FLOAT_TYPE d; + if (value < 0.0) + d = -value; + else + d = value; + if (d < 1.0) + { + do + { + d *= 10.0; + exponent--; + } + while (d < 1.0); + } + else if (d >= 10.0) + { + do + { + d *= 0.1; + exponent++; + } + while (d >= 10.0); + } + if (value < 0.0) + value = -d; + else + value = d; + } } - return APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len); + if (APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit - 1, decpt, sign, buf, len)) + return -1; + *decpt += exponent; + return 0; } diff --git a/nis/nss_nisplus/nisplus-spwd.c b/nis/nss_nisplus/nisplus-spwd.c index 3400e28da7..d426d28684 100644 --- a/nis/nss_nisplus/nisplus-spwd.c +++ b/nis/nss_nisplus/nisplus-spwd.c @@ -90,47 +90,47 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp, if (cp == NULL) return 0; *cp++ = '\0'; - sp->sp_lstchg = atoi (line); + sp->sp_lstchg = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) return 0; *cp++ = '\0'; - sp->sp_min = atoi(line); + sp->sp_min = atol(line); line = cp; cp = strchr (line, ':'); if (cp == NULL) return 0; *cp++ = '\0'; - sp->sp_max = atoi(line); + sp->sp_max = atol(line); line = cp; cp = strchr (line, ':'); if (cp == NULL) return 0; *cp++ = '\0'; - sp->sp_warn = atoi(line); + sp->sp_warn = atol(line); line = cp; cp = strchr (line, ':'); if (cp == NULL) return 0; *cp++ = '\0'; - sp->sp_inact = atoi(line); + sp->sp_inact = atol(line); line = cp; cp = strchr (line, ':'); if (cp == NULL) return 0; *cp++ = '\0'; - sp->sp_expire = atoi(line); + sp->sp_expire = atol(line); line = cp; if (line == NULL) return 0; - sp->sp_flag = atoi(line); + sp->sp_flag = atol(line); return 1; } diff --git a/po/sv.po b/po/sv.po index bd573d2d4a..8b296021f5 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1,12 +1,12 @@ # GNU libc message catalog for swedish -# Copyright (C) 1996 Free Software Foundation, Inc. +# Copyright � 1996 Free Software Foundation, Inc. # Jan Dj�rv <Jan.Djarv@mbox200.swipnet.se>, 1996. # $Revision$ # msgid "" msgstr "" -"Project-Id-Version: libc 1.99\n" -"POT-Creation-Date: 1996-12-03 13:50+0100\n" +"Project-Id-Version: libc 2.0.3\n" +"POT-Creation-Date: 1997-03-30 19:08+0200\n" "PO-Revision-Date: $Date$\n" "Last-Translator: Jan Dj�rv <Jan.Djarv@mbox200.swipnet.se>\n" "Language-Team: Swedish <sv@li.org>\n" @@ -34,31 +34,31 @@ msgstr " rpcinfo [ -n portnr ] -t v�rd prognr [ versnr ]\n" msgid " program vers proto port\n" msgstr " program vers proto port\n" -#: time/zic.c:424 +#: time/zic.c:419 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (regel fr�n \"%s\", rad %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 " klar\n" -#: time/zic.c:421 +#: time/zic.c:416 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", rad %d: %s" -#: time/zic.c:945 +#: time/zic.c:943 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "\"Zone %s\"-rad och flaggan -l �r �msesidigt uteslutande" -#: time/zic.c:953 +#: time/zic.c:951 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "\"Zone %s\"-rad och flaggan -p �r �msesidigt uteslutande" -#: time/zic.c:758 +#: time/zic.c:754 #, c-format msgid "%s in ruleless zone" msgstr "%s i zon utan regel" @@ -78,7 +78,7 @@ msgstr "%s%s%s:%u: %s%sOv�ntat fel: %s.\n" msgid "%s%sUnknown signal %d\n" msgstr "%s%sOk�nd signal %d\n" -#: time/zic.c:2139 +#: time/zic.c:2172 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d teckenexpanderades inte korrekt\n" @@ -88,137 +88,142 @@ msgstr "%s: %d teckenexpanderades inte korrekt\n" msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n" msgstr "%s: <mb_cur_max> m�ste vara st�rre �n <mb_cur_min>\n" -#: time/zic.c:1430 +#: time/zic.c:1443 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: Kan inte skapa %s: %s\n" -#: time/zic.c:2118 +#: time/zic.c:2150 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: Kan inte skapa katalog %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: Kan inte l�nka fr�n %s till %s: %s\n" -#: time/zic.c:783 +#: time/zic.c:780 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: Kan inte �ppna %s: %s\n" -#: time/zic.c:851 +#: time/zic.c:1433 +#, c-format +msgid "%s: Can't remove %s: %s\n" +msgstr "%s: Kan inte ta bort %s: %s\n" + +#: time/zic.c:849 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Fel vid st�ngning av %s: %s\n" -#: time/zic.c:845 +#: time/zic.c:842 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Fel vid l�sning fr�n %s\n" -#: time/zic.c:1494 +#: time/zic.c:1507 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Fel vid skrivning till %s\n" -#: time/zdump.c:258 +#: time/zdump.c:266 #, c-format msgid "%s: Error writing standard output " msgstr "%s: Fel vid skrivning till standard ut " -#: time/zic.c:830 +#: time/zic.c:827 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: \"Leap\"-rad i fil %s som inte �r skottsekundsfil\n" -#: time/zic.c:362 +#: time/zic.c:357 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Minnet slut: %s\n" -#: time/zic.c:527 +#: time/zic.c:522 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Flaggan -L given mer �n en g�ng\n" -#: time/zic.c:487 +#: time/zic.c:482 #, c-format msgid "%s: More than one -d option specified\n" -msgstr "%s: Flagga -d given mer �n en g�ng\n" +msgstr "%s: Flaggan -d given mer �n en g�ng\n" -#: time/zic.c:497 +#: time/zic.c:492 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Flaggan -l given mer �n en g�ng\n" -#: time/zic.c:507 +#: time/zic.c:502 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Flaggan -p given mer �n en g�ng\n" -#: time/zic.c:517 +#: time/zic.c:512 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Flaggan -y given mer �n en g�ng\n" -#: time/zic.c:1845 +#: time/zic.c:1872 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: kommandot var \"%s\", resultatet blev %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: fel i tillst�ndsmaskin" -#: posix/getopt.c:687 +#: posix/getopt.c:783 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: otill�ten flagga -- %c\n" -#: posix/getopt.c:690 +#: posix/getopt.c:786 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ogiltig flagga -- %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: flaggan \"%c%s\" tar inget argument\n" -#: posix/getopt.c:582 +#: posix/getopt.c:678 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: flaggan \"%s\" �r tvetydig\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: flaggan \"%s\" beh�ver ett argument\n" -#: posix/getopt.c:606 +#: posix/getopt.c:702 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: flaggan \"--%s\" tar inget argument\n" -#: posix/getopt.c:786 +#: posix/getopt.c:881 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flaggan \"-W %s\" tar inget argument\n" -#: posix/getopt.c:767 +#: posix/getopt.c:863 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: flaggan \"-W %s\" �r tvetydig\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: flaggan beh�ver ett argument -- %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: panik: ogiltigt l_value %d\n" @@ -228,17 +233,17 @@ msgstr "%s: panik: ogiltigt l_value %d\n" msgid "%s: premature end of file" msgstr "%s: f�r tidigt filslut" -#: posix/getopt.c:661 +#: posix/getopt.c:757 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ok�nd flagga \"%c%s\"\n" -#: posix/getopt.c:657 +#: posix/getopt.c:753 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ok�nd flagga \"--%s\"\n" -#: time/zic.c:446 +#: time/zic.c:441 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d " @@ -249,7 +254,7 @@ msgstr "" "katalog ]\n" "\t[ -L skottsekunder ] [ -y �rkontrollprogram ] [ filnamn ... ]\n" -#: time/zdump.c:165 +#: time/zdump.c:174 #, c-format msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: anv�ndning �r %s [ -v ] [ -c gr�ns ] zonnamn ...\n" @@ -263,7 +268,7 @@ msgstr "(ok�nt fel vid �kthetskontroll - %d)" msgid "(unknown)" msgstr "(ok�nt)" -#: catgets/gencat.c:253 +#: catgets/gencat.c:254 msgid "*standard input*" msgstr "*standard in*" @@ -271,21 +276,21 @@ msgstr "*standard in*" msgid ".lib section in a.out corrupted" msgstr ".lib-sektion i a.out korrupt" -#: inet/rcmd.c:358 +#: inet/rcmd.c:363 msgid ".rhosts fstat failed" msgstr "misslyckades ta status (fstat) p� .rhosts" -#: inet/rcmd.c:354 +#: inet/rcmd.c:359 msgid ".rhosts lstat failed" msgstr "misslyckades ta status (lstat) p� .rhosts" -#: inet/rcmd.c:356 +#: inet/rcmd.c:361 msgid ".rhosts not regular file" msgstr ".rhosts �r inte en normal fil" -#: inet/rcmd.c:362 +#: inet/rcmd.c:367 msgid ".rhosts writeable by other than owner" -msgstr ".rhosts kan skrivas av andra �n �garen" +msgstr ".rhosts �r skrivbar f�r andra �n �garen" #: sunrpc/clnt_perr.c:112 sunrpc/clnt_perr.c:133 #, c-format @@ -296,12 +301,12 @@ msgstr "; undre version = %lu, �vre version = %lu" msgid "; why = " msgstr "; varf�r = " -#: 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>-tecknet f�r inte vara i klass \"%s\"" -#: locale/programs/ld-ctype.c:317 +#: locale/programs/ld-ctype.c:321 #, c-format msgid "<SP> character not in class `%s'" msgstr "<SP>-tecknet �r inte i klass \"%s\"" @@ -313,6 +318,10 @@ msgstr "<SP>-tecknet �r inte i klass \"%s\"" msgid "?" msgstr "?" +#: sysdeps/unix/sysv/linux/siglist.h:27 +msgid "Aborted" +msgstr "Avbruten (SIGABRT)" + #: stdio-common/../sysdeps/gnu/errlist.c:762 msgid "Accessing a corrupted shared library" msgstr "�ppnar ett korrupt delat bibliotek" @@ -320,7 +329,7 @@ msgstr "�ppnar ett korrupt delat bibliotek" #. TRANS The requested socket address is already in use. @xref{Socket Addresses}. #: stdio-common/../sysdeps/gnu/errlist.c:354 msgid "Address already in use" -msgstr "Adressen anv�nds redan" +msgstr "Adressen upptagen" #. TRANS The address family specified for a socket is not supported; it is #. TRANS inconsistent with the protocol being used on the socket. @xref{Sockets}. @@ -332,6 +341,8 @@ msgstr "Adressfamiljen st�ds inte av protokollet" msgid "Advertise error" msgstr "Annonseringsfel" +#: stdio-common/../sysdeps/unix/siglist.c:43 +#: sysdeps/unix/sysv/linux/siglist.h:33 msgid "Alarm clock" msgstr "Alarmklocka" @@ -377,6 +388,11 @@ msgstr "Felaktigt format p� typsnittsfil" msgid "Bad message" msgstr "Felaktigt meddelande" +#: stdio-common/../sysdeps/unix/siglist.c:41 +#: sysdeps/unix/sysv/linux/siglist.h:56 +msgid "Bad system call" +msgstr "Felaktigt systemanrop" + #. 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. @@ -384,7 +400,7 @@ msgstr "Felaktigt meddelande" msgid "Block device required" msgstr "Blockspecialfil kr�vs" -#: sunrpc/pmap_rmt.c:337 +#: sunrpc/pmap_rmt.c:338 msgid "Broadcast select problem" msgstr "Problem med \"select\" i uts�ndning" @@ -394,32 +410,37 @@ msgstr "Problem med \"select\" i uts�ndning" #. 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 "Brutet r�r" +#: stdio-common/../sysdeps/unix/siglist.c:39 +#: sysdeps/unix/sysv/linux/siglist.h:30 msgid "Bus error" msgstr "Bussfel" +#: sysdeps/unix/sysv/linux/siglist.h:43 msgid "CPU time limit exceeded" -msgstr "begr�nsning av CPU-tid �verskriden" +msgstr "Begr�nsning av CPU-tid �verskriden" #: stdio-common/../sysdeps/gnu/errlist.c:758 msgid "Can not access a needed shared library" msgstr "Kan inte komma �t ett n�dv�ndigt delat bibliotek" -#: nis/ypclnt.c:637 +#: nis/ypclnt.c:695 msgid "Can't bind to server which serves this domain" msgstr "Kan inte ansluta till betj�nt som betj�nar denna dom�n" -#: nis/ypclnt.c:649 +#: nis/ypclnt.c:707 msgid "Can't communicate with portmapper" msgstr "Kan inte kommunicera med portmapper" -#: nis/ypclnt.c:651 +#: nis/ypclnt.c:709 msgid "Can't communicate with ypbind" msgstr "Kan inte kommunicera med ypbind" -#: nis/ypclnt.c:653 +#: nis/ypclnt.c:711 msgid "Can't communicate with ypserv" msgstr "Kan inte kommunicera med ypserv" @@ -444,7 +465,7 @@ msgstr "Kan inte skapa uttag (socket) f�r uts�ndnings-rpc" msgid "Cannot exec a shared library directly" msgstr "Kan inte k�ra ett delat bibliotek direkt" -#: sunrpc/pmap_rmt.c:349 +#: sunrpc/pmap_rmt.c:350 msgid "Cannot receive reply to broadcast" msgstr "Kan inte ta emot svar p� uts�ndning" @@ -463,14 +484,16 @@ msgstr "Kan inte skicka uts�ndningspaket" #: sunrpc/pmap_rmt.c:261 msgid "Cannot set socket option SO_BROADCAST" -msgstr "Kan inte s�tta uttagsflaggan (socket) SO_BROADCAST" +msgstr "Kan inte s�tta uttagsflaggan (socket option) SO_BROADCAST" #: stdio-common/../sysdeps/gnu/errlist.c:658 msgid "Channel number out of range" msgstr "Kanalnummer utanf�r giltigt intervall" +#: stdio-common/../sysdeps/unix/siglist.c:49 +#: sysdeps/unix/sysv/linux/siglist.h:39 msgid "Child exited" -msgstr "Barnet avslutade" +msgstr "Barnstatus �ndrad" #: sunrpc/clnt_perr.c:286 msgid "Client credential too weak" @@ -485,11 +508,11 @@ msgstr "Kommunikationsfel vid s�ndning" msgid "Computer bought the farm" msgstr "Datorn packade ihop" -#: locale/programs/ld-ctype.c:1197 +#: locale/programs/ld-ctype.c:1204 msgid "Computing table size for character classes might take a while..." msgstr "Att ber�kna tabellstorlek f�r teckenklasser kan ta ett tag..." -#: locale/programs/ld-collate.c:327 +#: locale/programs/ld-collate.c:329 msgid "Computing table size for collation information might take a while..." msgstr "" "Att ber�kna tabellstorlek f�r kollationeringsinformation kan ta ett tag..." @@ -513,23 +536,29 @@ msgstr "F�rbindelse borttagen av kommunikationspartnern" msgid "Connection timed out" msgstr "F�rbindelsens tid tog slut" +#: stdio-common/../sysdeps/unix/siglist.c:48 +#: sysdeps/unix/sysv/linux/siglist.h:38 msgid "Continued" -msgstr "Forts�tter" +msgstr "�terupptagen" #: 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" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" msgstr "" -"Copyright (C) %s Free Software Foundation, Inc.\n" +"Copyright � %s Free Software Foundation, Inc.\n" "Detta �r fri programvara; se k�llkoden f�r kopieringsvillkor. Det finns\n" "INGEN garanti; inte ens f�r S�LJBARHET eller L�MPLIGHET F�R N�GOT SPECIELLT\n" "�NDAM�L.\n" -#: nis/ypclnt.c:663 +#: stdio-common/../sysdeps/unix/siglist.c:53 +msgid "Cputime limit exceeded" +msgstr "Begr�nsning av CPU-tid �verskriden" + +#: nis/ypclnt.c:721 msgid "Database is busy" msgstr "Databasen �r upptagen" @@ -571,10 +600,15 @@ msgstr "Katalog inte tom" msgid "Disc quota exceeded" msgstr "Diskkvot �verskriden" -#: nis/ypclnt.c:709 +#: nis/ypclnt.c:767 msgid "Domain not bound" msgstr "Dom�n inte bunden" +#: stdio-common/../sysdeps/unix/siglist.c:36 +#: sysdeps/unix/sysv/linux/siglist.h:53 +msgid "EMT trap" +msgstr "Emulatorf�lla" + #: sunrpc/clnt_perr.c:254 #, c-format msgid "Error %d" @@ -598,7 +632,7 @@ msgstr "V�xeln full" msgid "Exec format error" msgstr "Formatfel p� k�rbar fil" -#: locale/programs/localedef.c:213 +#: locale/programs/localedef.c:216 msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'" msgstr "FATALT: systemet definierar inte \"_POSIX2_LOCALEDEF\"" @@ -627,6 +661,7 @@ msgstr "Fill�sning gav d�dl�ge" msgid "File name too long" msgstr "Filnamn f�r l�ngt" +#: sysdeps/unix/sysv/linux/siglist.h:44 msgid "File size limit exceeded" msgstr "Begr�nsning av filstorlek �verskriden" @@ -635,8 +670,14 @@ msgstr "Begr�nsning av filstorlek �verskriden" msgid "File too large" msgstr "Fil f�r stor" +#: stdio-common/../sysdeps/unix/siglist.c:54 +msgid "Filesize limit exceeded" +msgstr "Begr�nsning av filstorlek �verskriden" + +#: stdio-common/../sysdeps/unix/siglist.c:37 +#: sysdeps/unix/sysv/linux/siglist.h:28 msgid "Floating point exception" -msgstr "Flyttalsber�kningsfel" +msgstr "Aritmetiskt fel" #. TRANS Function not implemented. Some functions have commands or options defined #. TRANS that might not be supported in all implementations, and this is the kind @@ -650,8 +691,10 @@ msgstr "Funktion inte implementerad" msgid "Gratuitous error" msgstr "Omotiverat fel" +#: stdio-common/../sysdeps/unix/siglist.c:30 +#: sysdeps/unix/sysv/linux/siglist.h:22 msgid "Hangup" -msgstr "L�gg p�" +msgstr "Avringd" #. TRANS The remote host for a requested network connection is down. #: stdio-common/../sysdeps/gnu/errlist.c:457 @@ -662,19 +705,27 @@ msgstr "V�rddator �r nere" msgid "Host name lookup failure" msgstr "Uppslagning av v�rdnamn misslyckades" +#: stdio-common/../sysdeps/unix/siglist.c:52 +#: sysdeps/unix/sysv/linux/siglist.h:42 msgid "I/O possible" msgstr "I/O m�jligt" +#: stdio-common/../sysdeps/unix/siglist.c:35 msgid "IOT trap" -msgstr "IOT f�lla" +msgstr "IOT-f�lla" #: stdio-common/../sysdeps/gnu/errlist.c:614 msgid "Identifier removed" msgstr "Identifierare borttagen" +#: sysdeps/unix/sysv/linux/siglist.h:25 msgid "Illegal Instruction" msgstr "Otill�ten instruktion" +#: stdio-common/../sysdeps/unix/siglist.c:33 +msgid "Illegal instruction" +msgstr "Otill�ten instruktion" + #. TRANS Invalid seek operation (such as on a pipe). #: stdio-common/../sysdeps/gnu/errlist.c:201 msgid "Illegal seek" @@ -705,23 +756,29 @@ msgstr "Ol�mplig \"ioctl\" f�r enhet" msgid "Inappropriate operation for background process" msgstr "Operation f�r bakgrundsprocess ol�mplig" +#: sysdeps/unix/sysv/linux/siglist.h:62 +msgid "Information request" +msgstr "Informationsbeg�ran" + #. TRANS Input/output error; usually used for physical read or write errors. #: stdio-common/../sysdeps/gnu/errlist.c:40 msgid "Input/output error" msgstr "In/ut-fel" -#: nis/ypclnt.c:643 +#: nis/ypclnt.c:701 msgid "Internal NIS error" msgstr "Internt NIS-fel" -#: nis/ypclnt.c:707 +#: nis/ypclnt.c:765 msgid "Internal ypbind error" msgstr "Internt ypbind-fel" +#: stdio-common/../sysdeps/unix/siglist.c:31 +#: sysdeps/unix/sysv/linux/siglist.h:23 msgid "Interrupt" -msgstr "Avbrutet" +msgstr "Avbruten (SIGINT)" -#. 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 @@ -742,11 +799,11 @@ msgstr "Avbrutet systemanrop borde omstartas" msgid "Invalid argument" msgstr "Ogiltigt argument" -#: posix/regex.c:946 +#: posix/regex.c:960 msgid "Invalid back reference" msgstr "Ogiltig bak�treferens" -#: posix/regex.c:944 +#: posix/regex.c:958 msgid "Invalid character class name" msgstr "Ogiltigt teckenklassnamn" @@ -758,13 +815,13 @@ msgstr "Ogiltiga klientreferenser" msgid "Invalid client verifier" msgstr "Ogiltig klientverifierare" -#: posix/regex.c:943 +#: posix/regex.c:957 msgid "Invalid collation character" msgstr "Ogiltigt kollationeringstecken" -#: posix/regex.c:950 +#: posix/regex.c:964 msgid "Invalid content of \\{\\}" -msgstr "Ogiltig anv�ndning av \\{\\}" +msgstr "Ogiltigt inneh�ll i \\{\\}" #. TRANS An attempt to make an improper link across file systems was detected. #. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but @@ -781,17 +838,17 @@ msgstr "Ogiltig v�xel" #. TRANS or an incomplete sequence of bytes or the given wide character is invalid. #: stdio-common/../sysdeps/gnu/errlist.c:567 msgid "Invalid or incomplete multibyte or wide character" -msgstr "Ogiltig eller inte komplett flerbyte eller brett tecken" +msgstr "Ogiltig eller inte komplett flerbyte- eller brett tecken" -#: posix/regex.c:953 +#: posix/regex.c:967 msgid "Invalid preceding regular expression" msgstr "Ogiltigt f�reg�ende regulj�rt uttryck" -#: posix/regex.c:951 +#: posix/regex.c:965 msgid "Invalid range end" msgstr "Ogiltigt intervallslut" -#: posix/regex.c:942 +#: posix/regex.c:956 msgid "Invalid regular expression" msgstr "Ogiltigt regulj�rt uttryck" @@ -821,6 +878,8 @@ msgstr "�r en katalog" msgid "Is a named type file" msgstr "�r en namngiven filtyp" +#: stdio-common/../sysdeps/unix/siglist.c:38 +#: sysdeps/unix/sysv/linux/siglist.h:29 msgid "Killed" msgstr "D�dad" @@ -846,13 +905,13 @@ msgstr "L�nken har brutits" #: stdio-common/../sysdeps/gnu/errlist.c:674 msgid "Link number out of range" -msgstr "L�nktal utanf�r giltigt omr�de" +msgstr "L�nkantal utanf�r giltigt omr�de" -#: nis/ypclnt.c:655 +#: nis/ypclnt.c:713 msgid "Local domain name not set" msgstr "Lokalt dom�nnamn inte satt" -#: nis/ypclnt.c:645 +#: nis/ypclnt.c:703 msgid "Local resource allocation failure" msgstr "Allokeringsfel f�r lokal resurs" @@ -860,7 +919,7 @@ msgstr "Allokeringsfel f�r lokal resurs" msgid "Machine is not on the network" msgstr "Maskinen finns inte p� n�tverket" -#: posix/regex.c:952 +#: posix/regex.c:966 msgid "Memory exhausted" msgstr "Minnet slut" @@ -874,11 +933,11 @@ msgstr "Meddelandet f�r l�ngt" msgid "Multihop attempted" msgstr "Flerhopp f�rs�ktes" -#: nis/ypclnt.c:659 +#: nis/ypclnt.c:717 msgid "NIS client/server version mismatch - can't supply service" -msgstr "NIS klient/betj�nt versionsskillnad - kan inte betj�na" +msgstr "NIS versionsskillnad klient/betj�nt - kan inte betj�na" -#: nis/ypclnt.c:657 +#: nis/ypclnt.c:715 msgid "NIS map data base is bad" msgstr "NIS tabelldatabas �r felaktig" @@ -939,7 +998,7 @@ msgstr "Inga barnprocesser" #: stdio-common/../sysdeps/gnu/errlist.c:622 msgid "No data available" -msgstr "Data otillg�ngligt" +msgstr "Inga data tillg�ngliga" #. TRANS No locks available. This is used by the file locking facilities; see #. TRANS @ref{File Locks}. This error is never generated by the GNU system, but @@ -949,7 +1008,7 @@ msgstr "Data otillg�ngligt" msgid "No locks available" msgstr "Inga l�s tillg�ngliga" -#: posix/regex.c:941 +#: posix/regex.c:955 msgid "No match" msgstr "Ingen tr�ff" @@ -957,11 +1016,11 @@ msgstr "Ingen tr�ff" msgid "No message of desired type" msgstr "Inget meddelande av �nskad typ" -#: nis/ypclnt.c:647 +#: nis/ypclnt.c:705 msgid "No more records in map database" msgstr "Inga fler poster i tabelldatabasen" -#: posix/regex.c:5204 +#: posix/regex.c:5324 msgid "No previous regular expression" msgstr "Inget f�reg�ende regulj�rt uttryck" @@ -987,11 +1046,11 @@ msgstr "Enheten �r full" msgid "No such file or directory" msgstr "Filen eller katalogen finns inte" -#: nis/ypclnt.c:641 +#: nis/ypclnt.c:699 msgid "No such key in map" msgstr "Ingen s�dan nyckel i tabellen" -#: nis/ypclnt.c:639 +#: nis/ypclnt.c:697 msgid "No such map in server's domain" msgstr "Ingen s�dan tabell i betj�ntens dom�n" @@ -1029,7 +1088,7 @@ msgstr "Numeriskt resultat �r utanf�r giltigt omr�de" msgid "Object is remote" msgstr "�r ett fj�rrobjekt" -#: time/zic.c:1939 +#: time/zic.c:1966 msgid "Odd number of quotation marks" msgstr "Oj�mnt antal citationstecken" @@ -1091,19 +1150,22 @@ msgid "Package not installed" msgstr "Paketet �r inte installerat" #. 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 "�tkomst nekas" +#: sysdeps/unix/sysv/linux/siglist.h:64 msgid "Power failure" -msgstr "Sp�nningsfall" +msgstr "Str�mavbrott" -#: posix/regex.c:954 +#: posix/regex.c:968 msgid "Premature end of regular expression" msgstr "F�r tidigt slut p� regulj�rt uttryck" +#: stdio-common/../sysdeps/unix/siglist.c:56 +#: sysdeps/unix/sysv/linux/siglist.h:46 msgid "Profiling timer expired" -msgstr "Profileringstiden tog slut" +msgstr "Profileringsklocka" #: stdio-common/../sysdeps/gnu/errlist.c:678 msgid "Protocol driver not attached" @@ -1136,8 +1198,10 @@ msgstr "Protokollet st�ds ej" msgid "Protocol wrong type for socket" msgstr "Fel protokolltyp f�r uttag (socket)" +#: stdio-common/../sysdeps/unix/siglist.c:32 +#: sysdeps/unix/sysv/linux/siglist.h:24 msgid "Quit" -msgstr "Sluta" +msgstr "L�mnad" #: stdio-common/../sysdeps/gnu/errlist.c:742 msgid "RFS specific error" @@ -1148,7 +1212,7 @@ msgstr "RFS-specifikt fel" msgid "RPC bad procedure for program" msgstr "RPC d�lig procedur f�r program" -#: nis/ypclnt.c:635 +#: nis/ypclnt.c:693 msgid "RPC failure on NIS operation" msgstr "RPC-fel vid NIS-operation" @@ -1214,7 +1278,7 @@ msgstr "RPC: Programmet otillg�ngligt" #: sunrpc/clnt_perr.c:183 msgid "RPC: Program/version mismatch" -msgstr "RPC: Program/version-inkompabilitet" +msgstr "RPC: Program/version-inkompatibilitet" #: sunrpc/clnt_perr.c:189 msgid "RPC: Remote system error" @@ -1257,7 +1321,7 @@ msgstr "RTLD_NEXT anv�nds i kod som inte �r dynamiskt laddad" msgid "Read-only file system" msgstr "Filsystemet endast l�sbart" -#: posix/regex.c:955 +#: posix/regex.c:969 msgid "Regular expression too big" msgstr "Regulj�rt uttryck f�r stort" @@ -1274,11 +1338,13 @@ msgid "Remove password or make file unreadable by others." msgstr "Ta bort l�senord eller g�r filen ol�sbar f�r andra" #: 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" -msgstr "Rapportera fel till <bug-glibc@prep.ai.mit.edu>.\n" +#: locale/programs/localedef.c:412 +msgid "Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n" +msgstr "" +"Rapportera fel med programmet \"glibcbug\" till <bug-glibc@prep.ai.mit.edu>.\n" +"Rapportera fel p� �vers�ttningen till <sv@li.org>.\n" -#: nis/ypclnt.c:633 +#: nis/ypclnt.c:691 msgid "Request arguments bad" msgstr "Argument f�r f�rfr�gan felaktiga" @@ -1288,7 +1354,7 @@ msgstr "Resolver-fel 0 (inget fel)" #: resolv/herror.c:117 msgid "Resolver internal error" -msgstr "Internt fel i namnl�sare" +msgstr "Internt fel i namnl�sare (resolver)" #. TRANS Deadlock avoided; allocating a system resource would have resulted in a #. TRANS deadlock situation. The system does not guarantee that it will notice @@ -1298,6 +1364,10 @@ msgstr "Internt fel i namnl�sare" msgid "Resource deadlock avoided" msgstr "Resursd�dl�ge undveks" +#: stdio-common/../sysdeps/unix/siglist.c:58 +msgid "Resource lost" +msgstr "F�rlorad resurs" + #. TRANS Resource temporarily unavailable; the call might work if you try again #. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN}; #. TRANS they are always the same in the GNU C library. @@ -1331,8 +1401,10 @@ msgstr "Resursd�dl�ge undveks" msgid "Resource temporarily unavailable" msgstr "Resursen tillf�lligt otillg�nglig" +#: stdio-common/../sysdeps/unix/siglist.c:40 +#: sysdeps/unix/sysv/linux/siglist.h:31 msgid "Segmentation fault" -msgstr "Minnessegmentsfel" +msgstr "Segmenteringsfel" #: sunrpc/clnt_perr.c:280 msgid "Server rejected credential" @@ -1342,6 +1414,10 @@ msgstr "Betj�nt f�rkastade kreditiv" msgid "Server rejected verifier" msgstr "Betj�nt f�rkastade verifierare" +#: stdio-common/../sysdeps/unix/siglist.c:29 +msgid "Signal 0" +msgstr "Signal 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" @@ -1361,6 +1437,10 @@ msgstr "Mjukvara orsakade f�rbindelsebrott" msgid "Srmount error" msgstr "Srmount-fel" +#: sysdeps/unix/sysv/linux/siglist.h:59 +msgid "Stack fault" +msgstr "Stackfel" + #. 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 @@ -1369,17 +1449,25 @@ msgstr "Srmount-fel" msgid "Stale NFS file handle" msgstr "F�rlegad NFS-filhandtag" +#: stdio-common/../sysdeps/unix/siglist.c:47 +#: sysdeps/unix/sysv/linux/siglist.h:37 msgid "Stopped" msgstr "Stoppad" +#: stdio-common/../sysdeps/unix/siglist.c:46 +#: sysdeps/unix/sysv/linux/siglist.h:36 msgid "Stopped (signal)" msgstr "Stoppad (signal)" +#: stdio-common/../sysdeps/unix/siglist.c:50 +#: sysdeps/unix/sysv/linux/siglist.h:40 msgid "Stopped (tty input)" -msgstr "Stoppad (tty-l�sning)" +msgstr "Stoppad (terminall�sning)" +#: stdio-common/../sysdeps/unix/siglist.c:51 +#: sysdeps/unix/sysv/linux/siglist.h:41 msgid "Stopped (tty output)" -msgstr "Stoppad (tty-skrivning)" +msgstr "Stoppad (terminalskrivning)" #: stdio-common/../sysdeps/gnu/errlist.c:778 msgid "Streams pipe error" @@ -1389,17 +1477,19 @@ msgstr "Streams-r�rfel" msgid "Structure needs cleaning" msgstr "Strukturen beh�ver st�das" -#: 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 "Lyckat" -#: nis/ypclnt.c:711 +#: nis/ypclnt.c:769 msgid "System resource allocation failure" msgstr "Allokeringsfel f�r systemresurs" +#: stdio-common/../sysdeps/unix/siglist.c:44 +#: sysdeps/unix/sysv/linux/siglist.h:34 msgid "Terminated" -msgstr "Terminerad" +msgstr "Avslutad" #. TRANS An attempt to execute a file that is currently open for writing, or #. TRANS write to a file that is currently being executed. Often using a @@ -1412,7 +1502,7 @@ msgstr "Kodfil upptagen" #: stdio-common/../sysdeps/gnu/errlist.c:650 msgid "Timer expired" -msgstr "Tidtagning avslutad" +msgstr "Klockan ringde" #. TRANS Too many levels of symbolic links were encountered in looking up a file name. #. TRANS This often indicates a cycle of symbolic links. @@ -1463,12 +1553,17 @@ msgstr "F�r m�nga referenser: kan inte skarva" msgid "Too many users" msgstr "F�r m�nga anv�ndare" +#: stdio-common/../sysdeps/unix/siglist.c:34 +msgid "Trace/BPT trap" +msgstr "Sp�rning/BPT-f�lla" + +#: sysdeps/unix/sysv/linux/siglist.h:26 msgid "Trace/breakpoint trap" -msgstr "Sp�rning/brytpunktsf�lla" +msgstr "Sp�rningsf�lla" -#: posix/regex.c:945 +#: posix/regex.c:959 msgid "Trailing backslash" -msgstr "Felplacerat omv�nt snedstreck" +msgstr "Avslutande omv�nt snedstreck" #. TRANS In the GNU system, opening a file returns this error when the file is #. TRANS translated by a program and the translator program dies while starting @@ -1492,12 +1587,12 @@ msgid "Transport endpoint is not connected" msgstr "Transportslutpunkten �r inte f�rbunden" #: 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 "F�rs�k med \"%s --help\" f�r mer information\n" -#: inet/rcmd.c:136 +#: inet/rcmd.c:137 #, c-format msgid "Trying %s...\n" msgstr "Provar %s...\n" @@ -1507,7 +1602,7 @@ msgstr "Provar %s...\n" msgid "Unknown .netrc keyword %s" msgstr "Ok�nt .netrc-nyckelord %s" -#: nis/ypclnt.c:665 +#: nis/ypclnt.c:723 msgid "Unknown NIS error code" msgstr "Ok�nd NIS-felkod" @@ -1522,38 +1617,38 @@ msgstr "Ok�nd v�rd" #: resolv/herror.c:120 msgid "Unknown resolver error" -msgstr "Ok�nt fel hos namnl�sare" +msgstr "Ok�nt fel hos namnl�sare (resolver)" #: resolv/herror.c:76 msgid "Unknown server error" -msgstr "Ok�nt fel hos tj�nstest�lle" +msgstr "Ok�nt fel hos betj�nt" #: string/strsignal.c:41 #, c-format msgid "Unknown signal %d" msgstr "Ok�nd signal %d" -#: misc/error.c:95 +#: misc/error.c:100 msgid "Unknown system error" msgstr "Ok�nt systemfel" -#: nis/ypclnt.c:713 +#: nis/ypclnt.c:771 msgid "Unknown ypbind error" msgstr "Ok�nt ypbind-fel" -#: posix/regex.c:948 +#: posix/regex.c:962 msgid "Unmatched ( or \\(" msgstr "Obalanserade ( eller \\(" -#: posix/regex.c:956 +#: posix/regex.c:970 msgid "Unmatched ) or \\)" msgstr "Obalanserade ) eller \\)" -#: posix/regex.c:947 +#: posix/regex.c:961 msgid "Unmatched [ or [^" msgstr "Obalanserade [ eller [^" -#: posix/regex.c:949 +#: posix/regex.c:963 msgid "Unmatched \\{" msgstr "Obalanserad \\{" @@ -1562,6 +1657,8 @@ msgstr "Obalanserad \\{" msgid "Unrecognized variable `%s'" msgstr "Ok�nd variabel \"%s\"" +#: stdio-common/../sysdeps/unix/siglist.c:45 +#: sysdeps/unix/sysv/linux/siglist.h:35 msgid "Urgent I/O condition" msgstr "Viktigt I/O-tillst�nd" @@ -1619,7 +1716,7 @@ msgstr "" " -V, --version visa versionsinformation och avsluta\n" "Om INFIL �r -, l�s indata fr�n standard in\n" -#: locale/programs/localedef.c:393 +#: locale/programs/localedef.c:397 #, c-format msgid "" "Usage: %s [OPTION]... name\n" @@ -1638,8 +1735,7 @@ msgid "" " locale files : %s\n" msgstr "" "Anv�ndning: %s [FLAGGA]... namn\n" -"Obligatoriska argument till l�nga flaggor �r obligatoriska �ven f�r de " -"korta.\n" +"Obligatoriska argument till l�nga flaggor �r obligatoriska �ven f�r de korta.\n" " -c, --force skapa resultatfil �ven om varningar gavs\n" " -h, --help visa denna hj�lptext och avsluta\n" " -f, --charmap=FIL symboliska teckennamn definieras i FIL\n" @@ -1651,7 +1747,7 @@ msgstr "" " --posix f�lj POSIX strikt\n" "\n" "Systemets katalog f�r teckenupps�ttningar: %s\n" -" meddelandekataloger: %s\n" +" lokalfiler: %s\n" #: locale/programs/locale.c:245 #, c-format @@ -1688,9 +1784,13 @@ msgstr "Anv�ndning: %s variabelnamn [s�kv�g]\n" msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Anv�ndning: rpcinfo [ -n portnr ] -u v�rd prognr [ versnr ]\n" +#: stdio-common/../sysdeps/unix/siglist.c:59 +#: sysdeps/unix/sysv/linux/siglist.h:48 msgid "User defined signal 1" msgstr "Anv�ndarsignal 1" +#: stdio-common/../sysdeps/unix/siglist.c:60 +#: sysdeps/unix/sysv/linux/siglist.h:49 msgid "User defined signal 2" msgstr "Anv�ndarsignal 2" @@ -1698,36 +1798,40 @@ msgstr "Anv�ndarsignal 2" msgid "Value too large for defined data type" msgstr "V�rdet f�r stort f�r definierad datatyp" +#: stdio-common/../sysdeps/unix/siglist.c:55 +#: sysdeps/unix/sysv/linux/siglist.h:45 msgid "Virtual timer expired" -msgstr "Virtuell tidtagare l�pte ut" +msgstr "Alarmklocka - virtuell tid" -#: time/zic.c:1844 +#: time/zic.c:1871 msgid "Wild result from command execution" msgstr "Vilt resultat fr�n kommandok�rning" +#: stdio-common/../sysdeps/unix/siglist.c:57 +#: sysdeps/unix/sysv/linux/siglist.h:47 msgid "Window changed" -msgstr "F�nstret �ndrades" +msgstr "�ndrat f�nster" #: 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 "Skriven av %s.\n" -#: nis/ypclnt.c:146 +#: nis/ypclnt.c:142 msgid "YPBINDPROC_DOMAIN: Internal error\n" msgstr "YPBINDPROC_DOMAIN: Internt fel\n" -#: nis/ypclnt.c:150 +#: nis/ypclnt.c:146 #, c-format msgid "YPBINDPROC_DOMAIN: No server for domain %s\n" msgstr "YPBINDPROC_DOMAIN: Ingen betj�nt f�r dom�n %s\n" -#: nis/ypclnt.c:154 +#: nis/ypclnt.c:150 msgid "YPBINDPROC_DOMAIN: Resource allocation failure\n" -msgstr "YPBINDPROC_DOMAIN: Allokeringsfel f�r resurs\n" +msgstr "YPBINDPROC_DOMAIN: Resursallokeringsfel\n" -#: nis/ypclnt.c:158 +#: nis/ypclnt.c:154 msgid "YPBINDPROC_DOMAIN: Unknown error\n" msgstr "YPBINDPROC_DOMAIN: Ok�nt fel\n" @@ -1736,31 +1840,31 @@ msgstr "YPBINDPROC_DOMAIN: Ok�nt fel\n" msgid "You really blew it this time" msgstr "Du strulade till det den h�r g�ngen" -#: time/zic.c:1050 +#: time/zic.c:1048 msgid "Zone continuation line end time is not after end time of previous line" msgstr "" "Zon-forts�ttningsradens sluttid �r inte efter sluttiden p� f�reg�ende rad" -#: 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\" definition slutar ej med \"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 "\"-1\" m�ste vara sista post i f�lt \"%s\" i kategori \"%s\"" -#: locale/programs/ld-collate.c:1652 +#: locale/programs/ld-collate.c:1655 msgid "`...' must only be used in `...' and `UNDEFINED' entries" msgstr "\"...\" f�r endast anv�ndas f�r post \"...\" och post \"UNDEFINED\"" -#: locale/programs/locfile.c:538 +#: locale/programs/locfile.c:560 msgid "`from' expected after first argument to `collating-element'" msgstr "" "\"from\" f�rv�ntades efter f�rsta argumentet till \"collating-element\"" -#: locale/programs/ld-collate.c:1109 +#: locale/programs/ld-collate.c:1112 msgid "" "`from' string in collation element declaration contains unknown character" msgstr "" @@ -1772,36 +1876,36 @@ msgstr "" msgid "argument to <%s> must be a single character" msgstr "argumentet till <%s> m�ste vara ett enskilt tecken" -#: locale/programs/locfile.c:215 +#: locale/programs/locfile.c:237 #, c-format msgid "argument to `%s' must be a single character" msgstr "argumentet till \"%s\" m�ste vara ett enskilt tecken" -#: sunrpc/auth_unix.c:322 +#: sunrpc/auth_unix.c:323 msgid "auth_none.c - Fatal marshalling problem" msgstr "auth_none.c - Fatalt kodningsproblem" -#: inet/rcmd.c:360 +#: inet/rcmd.c:365 msgid "bad .rhosts owner" -msgstr "d�lig .rhosts-�gare" +msgstr "ol�mplig �gare av .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 "d�ligt argument" -#: time/zic.c:1172 +#: time/zic.c:1170 msgid "blank FROM field on Link line" msgstr "tomt \"FROM\"-f�lt p� \"Link\"-rad" -#: time/zic.c:1176 +#: time/zic.c:1174 msgid "blank TO field on Link line" msgstr "tomt \"TO\"-f�lt p� \"Link\"-rad" -#: malloc/mcheck.c:189 +#: malloc/mcheck.c:191 msgid "block freed twice" msgstr "block avallokerat tv� g�nger" -#: malloc/mcheck.c:192 +#: malloc/mcheck.c:194 msgid "bogus mcheck_status, library is buggy" msgstr "felaktig mcheck_status, biblioteket �r felaktigt" @@ -1817,31 +1921,31 @@ msgstr "uts�ndning: ioctl (h�mta gr�nssnittsflaggor)" msgid "cache_set: victim not found" msgstr "cache_set: offer hittades ej" -#: 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 "" "kan inte avg�ra tidszonsf�rkortning att anv�nda just efter \"until\"-tid" #: sunrpc/svc_simple.c:64 #, c-format msgid "can't reassign procedure number %d\n" -msgstr "kan inte �tertilldela procedurnummer %d\n" +msgstr "kan inte �ndra procedurnummer %d\n" -#: locale/programs/localedef.c:287 +#: locale/programs/localedef.c:291 #, c-format msgid "cannot `stat' locale file `%s'" msgstr "kan inte ta status p� lokalfil \"%s\"" -#: locale/programs/ld-collate.c:1314 +#: locale/programs/ld-collate.c:1317 #, c-format msgid "cannot insert collation element `%.*s'" msgstr "kan inte s�tta in kollationselement \"%.*s\"" -#: 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 "kan inte s�tta in i resultattabell" -#: 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 "kan inte s�tta in ny kollationssymbolsdefinition: %s" @@ -1851,84 +1955,84 @@ msgstr "kan inte s�tta in ny kollationssymbolsdefinition: %s" msgid "cannot open database file `%s': %s" msgstr "kan inte �ppna databasfil \"%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 "kan inte �ppna infil \"%s\"" -#: locale/programs/localedef.c:221 +#: locale/programs/localedef.c:224 #, c-format msgid "cannot open locale definition file `%s'" msgstr "kan inte �ppna lokaldefinitionsfil \"%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 "kan inte �ppna utfil \"%s\"" -#: locale/programs/locfile.c:986 +#: locale/programs/locfile.c:1008 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "kan inte �ppna utfil \"%s\" f�r kategori \"%s\"" -#: locale/programs/ld-collate.c:1360 +#: locale/programs/ld-collate.c:1363 msgid "cannot process order specification" msgstr "kan inte bearbeta sorteringsspecifikation" -#: locale/programs/locale.c:303 +#: locale/programs/locale.c:304 #, c-format msgid "cannot read character map directory `%s'" msgstr "kan inte l�sa teckenupps�ttningskatalog \"%s\"" -#: locale/programs/locale.c:278 +#: locale/programs/locale.c:279 #, c-format msgid "cannot read locale directory `%s'" msgstr "kan inte l�sa lokalkatalog \"%s\"" -#: locale/programs/localedef.c:309 +#: locale/programs/localedef.c:313 #, c-format msgid "cannot read locale file `%s'" msgstr "kan inte l�sa lokalfil \"%s\"" -#: locale/programs/localedef.c:334 +#: locale/programs/localedef.c:338 #, c-format msgid "cannot write output files to `%s'" msgstr "kan inte skriva utfiler till \"%s\"" -#: locale/programs/localedef.c:377 +#: locale/programs/localedef.c:381 msgid "category data requested more than once: should not happen" msgstr "kategoridata beg�rd mer �n en g�ng: borde inte intr�ffa" -#: 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 "tecknet %s\"%s\" i klass \"%s\" m�ste vara i klass \"%s\"" -#: 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 "tecknet %s\"%s\" i klass \"%s\" kan inte vara i klass \"%s\"" -#: locale/programs/ld-ctype.c:310 +#: locale/programs/ld-ctype.c:313 msgid "character <SP> not defined in character map" msgstr "tecknet <SP> inte definierat i teckenupps�ttning" -#: 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 "tecknet \"%s\" inte definierat men beh�vs som standardv�rde" -#: locale/programs/ld-ctype.c:801 +#: locale/programs/ld-ctype.c:806 #, c-format msgid "character class `%s' already defined" msgstr "teckenklass \"%s\" redan definierad" -#: locale/programs/ld-ctype.c:833 +#: locale/programs/ld-ctype.c:838 #, c-format msgid "character map `%s' already defined" msgstr "teckenupps�ttning \"%s\" redan definierad" @@ -1936,28 +2040,28 @@ msgstr "teckenupps�ttning \"%s\" redan definierad" #: locale/programs/charmap.c:76 #, c-format msgid "character map file `%s' not found" -msgstr "teckenupps�ttningsfil \"%s\" inte funnen" +msgstr "teckenupps�ttningsfil \"%s\" finns inte" #: sunrpc/clnt_raw.c:106 msgid "clnt_raw.c - Fatal header serialization error." -msgstr "clnt_raw.c - Fatalt fel vid serialisation." +msgstr "clnt_raw.c - Fatalt fel vid serialisering" -#: 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 "kollationselement \"%.*s\" finns mer �n en g�ng: rad ignorerad" -#: 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 "kollationssymbol \"%.*s\" finns mer �n en g�ng: rad ignorerad" -#: locale/programs/locfile.c:522 +#: locale/programs/locfile.c:544 #, c-format msgid "collation symbol expected after `%s'" msgstr "kollationssymbol f�rv�ntades efter \"%s\"" -#: inet/rcmd.c:129 +#: inet/rcmd.c:130 #, c-format msgid "connect to address %s: " msgstr "koppla till adress %s: " @@ -1981,9 +2085,7 @@ msgstr "standardteckenupps�ttningsfil \"%s\" inte hittad" msgid "" "direction flag in string %d in `era' field in category `%s' is not '+' nor " "'-'" -msgstr "" -"riktningsflagga i str�ng %d i \"era\"-f�lt i kategori \"%s\" �r inte \"+\" " -"eller \"-\"" +msgstr "riktningsflagga i str�ng %d i \"era\"-f�lt i kategori \"%s\" �r varken \"+\" eller \"-\"" #: locale/programs/ld-time.c:164 #, c-format @@ -1999,37 +2101,37 @@ msgstr "" msgid "duplicate character name `%s'" msgstr "duplicerat teckennamn \"%s\"" -#: locale/programs/ld-collate.c:1141 +#: locale/programs/ld-collate.c:1144 msgid "duplicate collating element definition" msgstr "dubbla definitioner av kollationselement" -#: locale/programs/ld-collate.c:1287 +#: locale/programs/ld-collate.c:1290 #, c-format msgid "duplicate definition for character `%.*s'" msgstr "dubbla definitioner f�r tecken \"%.*s\"" -#: db/makedb.c:310 +#: db/makedb.c:311 msgid "duplicate key" msgstr "duplicerad nyckel" -#: catgets/gencat.c:378 +#: catgets/gencat.c:379 msgid "duplicate set definition" -msgstr "duplicerad definition av upps�ttning" +msgstr "duplicerad definition av m�ngd" -#: time/zic.c:965 +#: time/zic.c:963 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "duplicerat zonnamn %s (fil \"%s\", rad %d)" -#: catgets/gencat.c:541 +#: catgets/gencat.c:542 msgid "duplicated message identifier" msgstr "duplicerad meddelandeidentifierare" -#: catgets/gencat.c:514 +#: catgets/gencat.c:515 msgid "duplicated message number" msgstr "duplicerat meddelandenummer" -#: locale/programs/ld-collate.c:1696 +#: locale/programs/ld-collate.c:1699 msgid "empty weight name: line ignored" msgstr "tomt viktnamn: rad ignorerad" @@ -2049,42 +2151,46 @@ msgstr "enablecache: kunde inte allokera cache-data" msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: kunde inte allokera cache-fifo" -#: locale/programs/ld-collate.c:1419 +#: locale/programs/ld-collate.c:1422 msgid "end point of ellipsis range is bigger then start" msgstr "slutpunkt f�r ... �r st�rre �n startv�rdet" -#: locale/programs/ld-collate.c:1149 +#: locale/programs/ld-collate.c:1152 msgid "error while inserting collation element into hash table" msgstr "fel vid ins�ttning av kollationselement i hashtabellen" -#: locale/programs/ld-collate.c:1161 +#: locale/programs/ld-collate.c:1164 msgid "error while inserting to hash table" -msgstr "fel vis ins�ttning till hashtabellen" +msgstr "fel vid ins�ttning i hashtabellen" -#: locale/programs/locfile.c:465 +#: locale/programs/locfile.c:487 msgid "expect string argument for `copy'" msgstr "f�rv�ntar str�ngargument f�r \"copy\"" -#: time/zic.c:856 +#: time/zic.c:854 msgid "expected continuation line not found" msgstr "f�rv�ntad forts�ttningsrad ej funnen" -#: locale/programs/locfile.c:1010 +#: locale/programs/locfile.c:1032 #, c-format msgid "failure while writing data for category `%s'" msgstr "misslyckades skriva data f�r kategori \"%s\"" -#: locale/programs/ld-monetary.c:154 locale/programs/ld-numeric.c:95 +#: nis/ypclnt.c:187 +msgid "fcntl: F_SETFD" +msgstr "fcntl_ F_SETFD" + +#: locale/programs/ld-monetary.c:155 locale/programs/ld-numeric.c:95 #, c-format msgid "field `%s' in category `%s' not defined" -msgstr "f�lt \"%s\" i kategori \"%s\" inte definierad" +msgstr "f�lt \"%s\" i kategori \"%s\" inte definierat" #: locale/programs/ld-messages.c:81 locale/programs/ld-messages.c:102 #, c-format msgid "field `%s' in category `%s' undefined" -msgstr "f�lt \"%s\" i kategori \"%s\" odefinierad" +msgstr "f�lt \"%s\" i kategori \"%s\" odefinierat" -#: locale/programs/locfile.c:547 +#: locale/programs/locfile.c:569 msgid "from-value of `collating-element' must be a string" msgstr "fr�nv�rde f�r \"collating-element\" m�ste vara en str�ng" @@ -2093,7 +2199,7 @@ msgid "garbage at end of character code specification" msgstr "skr�p i slutet av teckenkodsspecifikation" #: locale/programs/linereader.c:214 -msgid "garbage at end of digit" +msgid "garbage at end of number" msgstr "skr�p i slutet av nummer" #: locale/programs/ld-time.c:183 @@ -2110,7 +2216,7 @@ msgid "" msgstr "" "skr�p i slutet av startdatum i str�ng %d i \"era\"-f�lt i kategori \"%s\"" -#: 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'" @@ -2121,19 +2227,19 @@ msgstr "" msgid "get_myaddress: ioctl (get interface configuration)" msgstr "get_myaddress: ioctl (h�mta gr�nssnittskonfiguration)" -#: time/zic.c:1149 +#: time/zic.c:1147 msgid "illegal CORRECTION field on Leap line" msgstr "otill�tet \"CORRECTION\"-f�lt p� \"Leap\"-rad" -#: time/zic.c:1153 +#: time/zic.c:1151 msgid "illegal Rolling/Stationary field on Leap line" msgstr "otill�tet \"Rolling/Stationary\"-f�lt p� \"Leap\"-rad" -#: locale/programs/ld-collate.c:1767 +#: locale/programs/ld-collate.c:1770 msgid "illegal character constant in string" msgstr "otill�ten teckenkonstant i str�ng" -#: locale/programs/ld-collate.c:1116 +#: locale/programs/ld-collate.c:1119 msgid "illegal collation element" msgstr "otill�tet kollationselement" @@ -2151,7 +2257,7 @@ msgstr "otill�ten teckensekvens vid str�ngslut" #: locale/programs/charset.c:101 msgid "illegal names for character range" -msgstr "otill�tna namn f�r teckenomf�ng" +msgstr "otill�tna namn f�r teckenintervall" #: locale/programs/ld-time.c:176 #, c-format @@ -2159,26 +2265,26 @@ msgid "illegal number for offset in string %d in `era' field in category `%s'" msgstr "" "otill�tet tal f�r till�ggsv�rde i str�ng %d i \"era\"-f�lt i kategori \"%s\"" -#: catgets/gencat.c:351 catgets/gencat.c:428 +#: catgets/gencat.c:352 catgets/gencat.c:429 msgid "illegal set number" -msgstr "otill�tet tal f�r upps�ttning" +msgstr "otill�tet tal f�r m�ngd" #: locale/programs/ld-time.c:230 #, c-format msgid "illegal starting date in string %d in `era' field in category `%s'" msgstr "otill�tet startdatum i str�ng %d i \"era\"-f�lt i kategori \"%s\"" -#: 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 "otill�tet slutdatum i str�ng %d i \"era\"-f�lt i kategori \"%s\"" -#: 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 "implementationsbegr�nsning: inte fler �n %d teckenklasser till�tet" +msgstr "implementationsbegr�nsning: inte fler �n %d teckenklasser till�tna" -#: 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 "" @@ -2188,60 +2294,60 @@ msgstr "" msgid "incorrectly formatted file" msgstr "felaktigt formaterad rad" -#: time/zic.c:814 +#: time/zic.c:811 msgid "input line of unknown type" msgstr "inrad av ok�nd typ" -#: time/zic.c:1733 +#: time/zic.c:1760 msgid "internal error - addtype called with bad isdst" msgstr "internt fel - addtype anropad med felaktig isdst" -#: time/zic.c:1741 +#: time/zic.c:1768 msgid "internal error - addtype called with bad ttisgmt" msgstr "internt fel - addtype anropad med felaktig ttisgmt" -#: time/zic.c:1737 +#: time/zic.c:1764 msgid "internal error - addtype called with bad ttisstd" msgstr "internt fel - addtype anropad med felaktig ttisstd" -#: locale/programs/ld-ctype.c:301 +#: locale/programs/ld-ctype.c:304 #, c-format msgid "internal error in %s, line %u" msgstr "internt fel i %s, rad %u" -#: time/zic.c:1021 +#: time/zic.c:1019 msgid "invalid GMT offset" -msgstr "ogiltigt till�ggsv�rde till GMT" +msgstr "ogiltigt GMT-till�gg" -#: time/zic.c:1024 +#: time/zic.c:1022 msgid "invalid abbreviation format" msgstr "ogiltigt f�rkortningsformat" -#: 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 "ogiltig dag i m�naden" -#: time/zic.c:1272 +#: time/zic.c:1270 msgid "invalid ending year" msgstr "ogiltigt slut�r" -#: time/zic.c:1086 +#: time/zic.c:1084 msgid "invalid leaping year" msgstr "ogiltigt skott�r" -#: time/zic.c:1101 time/zic.c:1204 +#: time/zic.c:1099 time/zic.c:1202 msgid "invalid month name" msgstr "ogiltigt m�nadsnamn" -#: time/zic.c:920 +#: time/zic.c:918 msgid "invalid saved time" msgstr "ogiltigt sparad tid" -#: time/zic.c:1252 +#: time/zic.c:1250 msgid "invalid starting year" msgstr "ogiltigt start�r" -#: time/zic.c:1130 time/zic.c:1232 +#: time/zic.c:1128 time/zic.c:1230 msgid "invalid time of day" msgstr "ogiltig tid p� dagen" @@ -2249,61 +2355,61 @@ msgstr "ogiltig tid p� dagen" msgid "invalid weekday name" msgstr "ogiltigt veckodagsnamn" -#: locale/programs/ld-collate.c:1412 +#: locale/programs/ld-collate.c:1415 msgid "line after ellipsis must contain character definition" msgstr "rad efter ... m�ste inneh�lla teckendefinition" -#: locale/programs/ld-collate.c:1391 +#: locale/programs/ld-collate.c:1394 msgid "line before ellipsis does not contain definition for character constant" msgstr "rad f�re ... inneh�ller inte definition f�r teckenkonstant" -#: time/zic.c:794 +#: time/zic.c:791 msgid "line too long" -msgstr "rad f�r l�ng" +msgstr "f�r l�ng rad" -#: locale/programs/localedef.c:281 +#: locale/programs/localedef.c:285 #, c-format msgid "locale file `%s', used in `copy' statement, not found" msgstr "lokalfil \"%s\", anv�nd i \"copy\", inte funnen" -#: catgets/gencat.c:609 +#: catgets/gencat.c:610 msgid "malformed line ignored" msgstr "felaktig rad ignorerad" -#: malloc/mcheck.c:183 +#: malloc/mcheck.c:185 msgid "memory clobbered before allocated block" msgstr "minnet f�rst�rt f�re allokerat block" -#: malloc/mcheck.c:186 +#: malloc/mcheck.c:188 msgid "memory clobbered past end of allocated block" msgstr "minnet f�rst�rt efter slutet p� allokerat block" #: 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 "minne slut" -#: malloc/obstack.c:425 +#: malloc/obstack.c:462 msgid "memory exhausted\n" msgstr "minnet slut\n" -#: malloc/mcheck.c:180 +#: malloc/mcheck.c:182 msgid "memory is consistent, library is buggy" msgstr "minnet �r konsistent, biblioteket �r felaktigt" -#: 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 "eraformat i str�ng %d i \"era\"-f�lt i kategori \"%s\" saknas" -#: 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 "eranamn i str�ng %d i \"era\"-f�lt i kategori \"%s\" saknas" -#: time/zic.c:915 +#: time/zic.c:913 msgid "nameless rule" msgstr "namnl�s regel" @@ -2317,19 +2423,19 @@ msgstr "aldrig registrerat prog %d\n" msgid "no correct regular expression for field `%s' in category `%s': %s" msgstr "felaktigt regulj�rt uttryck f�r f�lt \"%s\" i kategori \"%s\": %s" -#: time/zic.c:2059 +#: time/zic.c:2086 msgid "no day in month matches rule" msgstr "ingen dag i m�naden matchar regeln" -#: locale/programs/ld-collate.c:259 +#: locale/programs/ld-collate.c:260 msgid "no definition of `UNDEFINED'" msgstr "ingen definition av \"UNDEFINED\"" -#: locale/programs/locfile.c:479 +#: locale/programs/locfile.c:501 msgid "no other keyword shall be specified when `copy' is used" msgstr "inget annat nyckelord ska anges n�r \"copy\" anv�nds" -#: locale/programs/localedef.c:340 +#: locale/programs/localedef.c:344 msgid "no output file produced because warning were issued" msgstr "ingen utfil skapad p� grund av varningar" @@ -2352,7 +2458,7 @@ msgstr "ingen vikt definierad f�r symbol \"%s\"" msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "endast definition av \"WIDTH\" f�r f�lja definitionen av \"CHARMAP\"" -#: db/makedb.c:326 +#: db/makedb.c:327 #, c-format msgid "problems while reading `%s'" msgstr "problem l�sa \"%s\"" @@ -2371,27 +2477,27 @@ msgstr "program %lu version %lu �r inte tillg�ngligt\n" #: sunrpc/rpcinfo.c:466 #, c-format msgid "program %lu version %lu ready and waiting\n" -msgstr "program %lu version %lu klar och v�ntar\n" +msgstr "program %lu version %lu berett och v�ntar\n" -#: inet/rcmd.c:171 +#: inet/rcmd.c:172 #, c-format msgid "rcmd: select (setting up stderr): %m\n" -msgstr "rcmd: select (s�tter upp standard error): %m\n" +msgstr "rcmd: select (s�tter upp standard fel): %m\n" -#: inet/rcmd.c:103 +#: inet/rcmd.c:104 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: uttag (socket): Alla portar anv�nds\n" -#: inet/rcmd.c:159 +#: inet/rcmd.c:160 #, c-format msgid "rcmd: write (setting up stderr): %m\n" -msgstr "rcmd: write: (s�tter upp standard error): %m\n" +msgstr "rcmd: write: (s�tter upp standard fel): %m\n" #: sunrpc/svc_simple.c:83 msgid "registerrpc: out of memory\n" msgstr "registerrpc: minnet slut\n" -#: time/zic.c:1794 +#: time/zic.c:1821 msgid "repeated leap second moment" msgstr "upprepat skottsekundstillf�lle" @@ -2423,47 +2529,47 @@ msgstr "rpcinfo: kan inte kontakta portmapper" msgid "rpcinfo: can't contact portmapper: " msgstr "rpcinfo: kan inte kontakta portmapper: " -#: time/zic.c:708 time/zic.c:710 +#: time/zic.c:704 time/zic.c:706 msgid "same rule name in multiple files" msgstr "samma regel i flera filer" -#: inet/rcmd.c:174 +#: inet/rcmd.c:175 msgid "select: protocol failure in circuit setup\n" msgstr "select: protokollfel i f�rbindelseupps�ttning\n" -#: inet/rcmd.c:192 +#: inet/rcmd.c:193 msgid "socket: protocol failure in circuit setup\n" msgstr "uttag (socket): protokollfel i f�rbindelseupps�ttning\n" -#: locale/programs/locfile.c:600 +#: locale/programs/locfile.c:622 msgid "sorting order `forward' and `backward' are mutually exclusive" msgstr "" "sorteringsordning \"forward\" och \"backward\" �r �msesidigt uteslutande" -#: 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 "" "specifikation av sorteringsvikter f�r kollationssymbol verkar inte vettig" -#: time/zic.c:779 +#: time/zic.c:775 msgid "standard input" msgstr "standard in" -#: time/zdump.c:260 +#: time/zdump.c:268 msgid "standard output" msgstr "standard ut" -#: 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 "startdatum �r otill�tet i str�ng %d i \"era\"-f�lt i kategori \"%s\"" -#: time/zic.c:1276 +#: time/zic.c:1274 msgid "starting year greater than ending year" msgstr "start�r �r st�rre �n slut�r" -#: 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 "slutdatum �r otill�tet i str�ng %d i \"era\"-f�lt i kategori \"%s\"" @@ -2492,7 +2598,7 @@ msgstr "svcudp_create - kan inte anropa getsockname" msgid "svcudp_create: socket creation problem" msgstr "svcudp_create: problem att skapa uttag (socket)" -#: locale/programs/ld-collate.c:1191 +#: locale/programs/ld-collate.c:1194 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates element " @@ -2500,7 +2606,7 @@ msgid "" msgstr "" "symbol f�r flerteckenskollationselement \"%.*s\" duplicerar elementdefinition" -#: locale/programs/ld-collate.c:1064 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates other element " @@ -2509,7 +2615,7 @@ msgstr "" "symbol f�r flerteckenskollationselement \"%.*s\" duplicerar annan\n" "elementdefinition" -#: locale/programs/ld-collate.c:1200 +#: locale/programs/ld-collate.c:1203 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates other symbol " @@ -2518,7 +2624,7 @@ msgstr "" "symbol f�r flerteckenskollationselement \"%.*s\" duplicerar annan\n" "symboldefinition" -#: locale/programs/ld-collate.c:1073 +#: locale/programs/ld-collate.c:1076 #, c-format msgid "" "symbol for multicharacter collating element `%.*s' duplicates symbol " @@ -2526,7 +2632,7 @@ msgid "" msgstr "" "symbol f�r flerteckenskollationselement \"%.*s\" duplicerar symboldefinition" -#: 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 " @@ -2543,51 +2649,51 @@ msgstr "" msgid "syntax error in %s definition: %s" msgstr "syntaxfel i definition av %s: %s" -#: locale/programs/locfile.c:620 +#: locale/programs/locfile.c:642 msgid "syntax error in `order_start' directive" msgstr "syntaxfel i direktivet \"order_start\"" -#: locale/programs/locfile.c:362 +#: locale/programs/locfile.c:384 msgid "syntax error in character class definition" msgstr "syntaxfel i teckenklassdefinition" -#: locale/programs/locfile.c:420 +#: locale/programs/locfile.c:442 msgid "syntax error in character conversion definition" msgstr "syntaxfel i teckenkonverteringsdefinition" -#: locale/programs/locfile.c:662 +#: locale/programs/locfile.c:684 msgid "syntax error in collating order definition" msgstr "syntaxfel i kollationssorteringsdefinition" -#: locale/programs/locfile.c:512 +#: locale/programs/locfile.c:534 msgid "syntax error in collation definition" msgstr "syntaxfel i kollationsdefinition" -#: locale/programs/locfile.c:335 +#: locale/programs/locfile.c:357 msgid "syntax error in definition of LC_CTYPE category" msgstr "syntaxfel i definition av kategorin LC_CTYPE" -#: locale/programs/locfile.c:278 +#: locale/programs/locfile.c:300 msgid "syntax error in definition of new character class" msgstr "syntaxfel i definition av ny teckenklass" -#: locale/programs/locfile.c:288 +#: locale/programs/locfile.c:310 msgid "syntax error in definition of new character map" msgstr "syntaxfel i definition av ny teckenupps�ttning" -#: locale/programs/locfile.c:873 +#: locale/programs/locfile.c:895 msgid "syntax error in message locale definition" msgstr "syntaxfel i definition av meddelandelokal" -#: locale/programs/locfile.c:784 +#: locale/programs/locfile.c:806 msgid "syntax error in monetary locale definition" msgstr "syntaxfel i definition av monet�rlokal" -#: locale/programs/locfile.c:811 +#: locale/programs/locfile.c:833 msgid "syntax error in numeric locale definition" msgstr "syntaxfel i definition av numerisk lokal" -#: locale/programs/locfile.c:722 +#: locale/programs/locfile.c:744 msgid "syntax error in order specification" msgstr "syntaxfel i sorteringsspecifikation" @@ -2596,23 +2702,23 @@ msgstr "syntaxfel i sorteringsspecifikation" msgid "syntax error in prolog: %s" msgstr "syntaxfel i prolog: %s" -#: locale/programs/locfile.c:849 +#: locale/programs/locfile.c:871 msgid "syntax error in time locale definition" msgstr "syntaxfel i definition av tidslokal" -#: locale/programs/locfile.c:255 +#: locale/programs/locfile.c:277 msgid "syntax error: not inside a locale definition section" msgstr "syntaxfel: inte inne i en lokaldefinition" -#: 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 "detta �r den f�rsta definitionen" -#: time/zic.c:1119 +#: time/zic.c:1117 msgid "time before zero" msgstr "tid f�re noll" -#: 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 "f�r stort tidsv�rde" @@ -2628,23 +2734,23 @@ msgstr "f�r m�nga tecken i teckenkodning" msgid "too many character classes defined" msgstr "f�r m�nga teckenklasser definierade" -#: time/zic.c:1788 +#: time/zic.c:1815 msgid "too many leap seconds" msgstr "f�r m�nga skottsekunder" -#: time/zic.c:1760 +#: time/zic.c:1787 msgid "too many local time types" msgstr "f�r m�nga lokala tidstyper" -#: time/zic.c:1714 +#: time/zic.c:1741 msgid "too many transitions?!" msgstr "f�r m�nga �verg�ngar?!" -#: locale/programs/ld-collate.c:1623 +#: locale/programs/ld-collate.c:1626 msgid "too many weights" msgstr "f�r m�nga vikter" -#: time/zic.c:2082 +#: time/zic.c:2109 msgid "too many, or too long, time zone abbreviations" msgstr "f�r m�nga eller f�r l�nga tidszonf�rkortningar" @@ -2657,11 +2763,11 @@ msgstr "avslutande skr�p vid radslutet" msgid "trouble replying to prog %d\n" msgstr "problem att svara till prog %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 "tv� rader efter varann som har \"...\" �r inte till�tet" -#: time/zic.c:1283 +#: time/zic.c:1281 msgid "typed single year" msgstr "satte typ p� endast ett �r" @@ -2676,39 +2782,36 @@ msgstr "ok�nt tecken \"%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 "ok�nt tecken i f�lt \"%s\" i kategori \"%s\"" -#: locale/programs/locfile.c:585 +#: locale/programs/locfile.c:607 msgid "unknown collation directive" msgstr "ok�nt kollationsdirektiv" -#: catgets/gencat.c:477 +#: catgets/gencat.c:478 #, c-format msgid "unknown directive `%s': line ignored" msgstr "ok�nt direktiv \"%s\": rad ignorerad" -#: catgets/gencat.c:456 +#: catgets/gencat.c:457 #, c-format msgid "unknown set `%s'" -msgstr "ok�nd upps�ttning \"%s\"" - -msgid "unknown signal" -msgstr "ok�nd signal" +msgstr "ok�nd m�ngd \"%s\"" -#: 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 "ok�nd symbol \"%.*s\": rad ignorerad" -#: time/zic.c:751 +#: time/zic.c:747 msgid "unruly zone" msgstr "besv�rlig zon" -#: catgets/gencat.c:961 +#: catgets/gencat.c:962 msgid "unterminated message" msgstr "oavslutat meddelande" @@ -2720,15 +2823,15 @@ msgstr "oavslutad str�ng" msgid "unterminated symbolic name" msgstr "oavslutat symboliskt namn" -#: locale/programs/ld-collate.c:1685 +#: locale/programs/ld-collate.c:1688 msgid "unterminated weight name" msgstr "oavslutat viktnamn" #: locale/programs/charset.c:119 msgid "upper limit in range is not smaller then lower limit" -msgstr "�vre gr�ns i omr�de �r inte mindre �n undre gr�ns" +msgstr "�vre gr�ns i intervall �r inte mindre �n undre gr�ns" -#: time/zic.c:2025 +#: time/zic.c:2052 msgid "use of 2/29 in non leap-year" msgstr "anv�nder 29/2 i icke-skott�r" @@ -2742,7 +2845,7 @@ msgstr "v�rdet p� %s m�ste vara heltal" msgid "value for <%s> must lie between 1 and 4" msgstr "v�rde p� <%s> m�ste vara mellan 1 och 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 "v�rde p� f�lt \"%s\" i kategori \"%s\" f�r inte vara tom str�ng" @@ -2751,7 +2854,7 @@ msgstr "v�rde p� f�lt \"%s\" i kategori \"%s\" f�r inte vara tom str�ng" msgid "value of <mb_cur_max> must be greater than the value of <mb_cur_min>" msgstr "v�rdet p� <mb_cur_max> m�ste vara st�rre �n v�rdet p� <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" @@ -2765,12 +2868,12 @@ msgid "" msgstr "" "v�rdet p� f�ltet \"int_curr_symbol\" i kategorin LC_MONETARY har fel l�ngd" -#: 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 "v�rden p� f�lt \"%s\" i kategorin \"%s\" m�ste vara mindre �n 127" -#: 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 "v�rden p� f�lt \"%s\" i kategorin \"%s\" f�r inte vara noll" @@ -2779,15 +2882,15 @@ msgstr "v�rden p� f�lt \"%s\" i kategorin \"%s\" f�r inte vara noll" msgid "while opening UTMP file" msgstr "n�r UTMP-filen �ppnades" -#: catgets/gencat.c:988 +#: catgets/gencat.c:989 msgid "while opening old catalog file" msgstr "n�r gammal katalogfil �ppnades" -#: db/makedb.c:353 +#: db/makedb.c:354 msgid "while reading database" msgstr "n�r databasen l�stes" -#: db/makedb.c:315 +#: db/makedb.c:316 msgid "while writing data base file" msgstr "n�r databasen skrevs" @@ -2795,34 +2898,30 @@ msgstr "n�r databasen skrevs" msgid "wrong number of arguments" msgstr "fel antal argument" -#: time/zic.c:1077 +#: time/zic.c:1075 msgid "wrong number of fields on Leap line" msgstr "fel antal f�lt p� \"Leap\"-rad" -#: time/zic.c:1168 +#: time/zic.c:1166 msgid "wrong number of fields on Link line" msgstr "fel antal f�lt p� \"Link\"-rad" -#: time/zic.c:911 +#: time/zic.c:909 msgid "wrong number of fields on Rule line" msgstr "fel antal f�lt p� \"Rule\"-rad" -#: time/zic.c:981 +#: time/zic.c:979 msgid "wrong number of fields on Zone continuation line" msgstr "fel antal f�lt p� \"Zone\"-forts�ttningsrad" -#: time/zic.c:939 +#: time/zic.c:937 msgid "wrong number of fields on Zone line" msgstr "fel antal f�lt p� \"Zone\"-rad" -#: nis/ypclnt.c:570 -msgid "yp_all: clnttcp_create failed" -msgstr "yp_all: clnttcp_create misslyckades" - -#: nis/ypclnt.c:772 +#: nis/ypclnt.c:811 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: kan inte omvandla v�rd till n�tnamn\n" -#: nis/ypclnt.c:784 +#: nis/ypclnt.c:823 msgid "yp_update: cannot get server address\n" msgstr "yp_update: kan inte h�mta betj�ntadress\n" diff --git a/posix/regex.c b/posix/regex.c index fc4db38a55..a8655cdd70 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -1568,7 +1568,7 @@ static reg_errcode_t compile_range _RE_ARGS ((const char **p_ptr, MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up reallocating to 0 bytes. Such thing is not going to work too well. You have been warned!! */ -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(WIN32) /* Microsoft C 16-bit versions limit malloc to approx 65512 bytes. The REALLOC define eliminates a flurry of conversion warnings, but is not required. */ diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c index 754f99548f..65a668e664 100644 --- a/resolv/nss_dns/dns-host.c +++ b/resolv/nss_dns/dns-host.c @@ -400,7 +400,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, linebuflen -= n; /* Get canonical name. */ n = strlen (tbuf) + 1; /* For the \0. */ - if (n > buflen) + if ((size_t) n > buflen) { ++had_error; continue; @@ -423,7 +423,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) { ++had_error; continue; diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index 8cff7a4d66..34fe918237 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -336,7 +336,7 @@ __printf_fp (FILE *fp, if (special) { - int width = info->prec > info->width ? info->prec : info->width; + int width = info->width; if (is_neg || info->showsign || info->space) --width; diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c index e2e64695d5..6cdda9e1d4 100644 --- a/stdio-common/printf_fphex.c +++ b/stdio-common/printf_fphex.c @@ -189,7 +189,7 @@ __printf_fphex (FILE *fp, if (special) { - int width = info->prec > info->width ? info->prec : info->width; + int width = info->width; if (negative || info->showsign || info->space) --width; diff --git a/string/Makefile b/string/Makefile index 8f35f207f6..6704dbf4e0 100644 --- a/string/Makefile +++ b/string/Makefile @@ -24,7 +24,7 @@ subdir := string headers := string.h strings.h memory.h endian.h bytesex.h \ argz.h envz.h -routines := strcat strchr strcmp strcoll strcpy strcspn \ +routines := strcat strchr strcmp strcoll strcpy strcspn strverscmp \ strdup strndup \ strerror _strerror strerror_r strlen strnlen \ strncat strncmp strncpy \ @@ -40,7 +40,8 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ envz basename \ strcoll_l strxfrm_l -tests := tester testcopy test-ffs tst-strlen stratcliff +tests := tester testcopy test-ffs tst-strlen stratcliff \ + tst-svc distribute := memcopy.h pagecopy.h @@ -50,3 +51,6 @@ tester-ENV = LANGUAGE=C CFLAGS-tester.c = -fno-builtin CFLAGS-tst-strlen.c = -fno-builtin CFLAGS-stratcliff.c = -fno-builtin + +tests: $(objpfx)tst-svc.out + cmp tst-svc.expect $(objpfx)tst-svc.out diff --git a/string/basename.c b/string/basename.c index 4f06843aeb..f24e0ac1b4 100644 --- a/string/basename.c +++ b/string/basename.c @@ -17,10 +17,15 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + #include <string.h> char * -basename (const char *filename) +basename (filename) + const char *filename; { char *p = strrchr (filename, '/'); return p ? p + 1 : (char *) filename; diff --git a/string/string.h b/string/string.h index 7a6ad1235f..4a79dcecc2 100644 --- a/string/string.h +++ b/string/string.h @@ -241,6 +241,9 @@ extern char *strsep __P ((char **__stringp, __const char *__delim)); #endif #ifdef __USE_GNU +/* Compare S1 and S2 as strings holding name & indices/version numbers. */ +extern int strverscmp __P ((__const char *__s1, __const char *__s2)); + /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal __P ((int __sig)); diff --git a/string/strverscmp.c b/string/strverscmp.c new file mode 100644 index 0000000000..388df75dfd --- /dev/null +++ b/string/strverscmp.c @@ -0,0 +1,111 @@ +/* Compare strings while treating digits characters numerically. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jean-Fran�ois Bignolles <bignolle@ecoledoc.ibp.fr>, 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 <string.h> +#include <ctype.h> + +/* states: S_N: normal, S_I: comparing integral part, S_F: comparing + Fractionnal parts, S_Z: idem but with leading Zeroes only */ +#define S_N 0x0 +#define S_I 0x4 +#define S_F 0x8 +#define S_Z 0xC + +/* result_type: CMP: return diff; LEN: compare using len_diff/diff */ +#define CMP 2 +#define LEN 3 + + +/* Compare S1 and S2 as strings holding indices/version numbers, + returning less than, equal to or greater than zero if S1 is less than, + equal to or greater than S2 (for more info, see the texinfo doc). +*/ + +int +strverscmp (s1, s2) + const char *s1; + const char *s2; +{ + const unsigned char *p1 = (const unsigned char *) s1; + const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + int state; + int diff; + + /* Symbol(s) 0 [1-9] others (padding) + Transition (10) 0 (01) d (00) x (11) - */ + static const unsigned int next_state[] = + { + /* state x d 0 - */ + /* S_N */ S_N, S_I, S_Z, S_N, + /* S_I */ S_N, S_I, S_I, S_I, + /* S_F */ S_N, S_F, S_F, S_F, + /* S_Z */ S_N, S_F, S_Z, S_Z + }; + + static const int result_type[] = + { + /* state x/x x/d x/0 x/- d/x d/d d/0 d/- + 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */ + + /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, + CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, + /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP, + +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP, + /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP, + CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP, + /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP, + -1, CMP, CMP, CMP + }; + + if (p1 == p2) + return 0; + + c1 = *p1++; + c2 = *p2++; + /* Hint: '0' is a digit too. */ + state = S_N | (c1 == '0') + (isdigit (c1) != 0); + + while ((diff = c1 - c2) == 0 && c1 != '\0') + { + state = next_state[state]; + c1 = *p1++; + c2 = *p2++; + state |= (c1 == '0') + (isdigit (c1) != 0); + } + + state = result_type[state << 2 | ((c2 == '0') + (isdigit (c2) != 0))]; + + switch (state) + { + case CMP: + return diff; + + case LEN: + while (isdigit (*p1++)) + if (!isdigit (*p2++)) + return 1; + + return isdigit (*p2) ? -1 : diff; + + default: + return state; + } +} diff --git a/string/tester.c b/string/tester.c index b815539737..dcd7342ba3 100644 --- a/string/tester.c +++ b/string/tester.c @@ -1,3 +1,6 @@ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include <ansidecl.h> #include <errno.h> #include <stdio.h> @@ -28,6 +31,7 @@ DEFUN(check, (thing, number), int thing AND int number) } /* Complain if first two args don't strcmp as equal. */ +void equal(CONST char *a, CONST char *b, int number); void DEFUN(equal, (a, b, number), CONST char *a AND CONST char *b AND int number) { @@ -54,6 +58,41 @@ DEFUN(main, (argc, argv), int argc AND char **argv) check(strcmp("a\203", "a") > 0, 8); /* Tricky if char signed. */ check(strcmp("a\203", "a\003") > 0, 9); + { + char buf1[0x40], buf2[0x40]; + int i, j; + for (i=0; i < 0x10; i++) + for (j = 0; j < 0x10; j++) + { + int k; + for (k = 0; k < 0x3f; k++) + { + buf1[j] = '0' ^ (k & 4); + buf2[j] = '4' ^ (k & 4); + } + buf1[i] = buf1[0x3f] = 0; + buf2[j] = buf2[0x3f] = 0; + for (k = 0; k < 0xf; k++) + { + int cnum = 0x10+0x10*k+0x100*j+0x1000*i; + check(strcmp(buf1+i,buf2+j) == 0, cnum); + buf1[i+k] = 'A' + i + k; + buf1[i+k+1] = 0; + check(strcmp(buf1+i,buf2+j) > 0, cnum+1); + check(strcmp(buf2+j,buf1+i) < 0, cnum+2); + buf2[j+k] = 'B' + i + k; + buf2[j+k+1] = 0; + check(strcmp(buf1+i,buf2+j) < 0, cnum+3); + check(strcmp(buf2+j,buf1+i) > 0, cnum+4); + buf2[j+k] = 'A' + i + k; + buf1[i] = 'A' + i + 0x80; + check(strcmp(buf1+i,buf2+j) > 0, cnum+5); + check(strcmp(buf2+j,buf1+i) < 0, cnum+6); + buf1[i] = 'A' + i; + } + } + } + /* Test strcpy next because we need it to set up other tests. */ it = "strcpy"; check(strcpy(one, "abcd") == one, 1); /* Returned value. */ @@ -672,6 +711,43 @@ DEFUN(main, (argc, argv), int argc AND char **argv) (void) memset(one+2, 010045, 1); equal(one, "ax\045xe", 6); /* Unsigned char convert. */ + /* Test for more complex versions of memset, for all alignments and + lengths up to 256. This test takes a little while, perhaps it should + be made weaker? */ + { + char data[512]; + int i; + int j; + int k; + int c; + + for (i = 0; i < 512; i++) + data[i] = 'x'; + for (c = 0; c <= 'y'; c += 'y') /* check for memset(,0,) and + memset(,'y',) */ + for (j = 0; j < 256; j++) + for (i = 0; i < 256; i++) + { + memset(data+i,c,j); + for (k = 0; k < i; k++) + if (data[k] != 'x') + goto fail; + for (k = i; k < i+j; k++) + { + if (data[k] != c) + goto fail; + data[k] = 'x'; + } + for (k = i+j; k < 512; k++) + if (data[k] != 'x') + goto fail; + continue; + + fail: + check(0,7+i+j*256+(c != 0)*256*256); + } + } + /* bcopy - much like memcpy. Berklix manual is silent about overlap, so don't test it. */ it = "bcopy"; diff --git a/string/tst-strlen.c b/string/tst-strlen.c index b9efe1da29..4acd4045f5 100644 --- a/string/tst-strlen.c +++ b/string/tst-strlen.c @@ -34,7 +34,7 @@ main(int argc, char *argv[]) return 1; } } - } + } } return 0; } diff --git a/string/tst-svc.c b/string/tst-svc.c new file mode 100644 index 0000000000..c6add5b4b1 --- /dev/null +++ b/string/tst-svc.c @@ -0,0 +1,45 @@ +/* Test for strverscmp() */ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#define MAX_STRINGS 256 +#define MAX_LINE_SIZE 32 + +int +compare (const void *p1, const void *p2) +{ + return strverscmp (*((char **) p1), *((char **) p2)); +} + +int +main (int argc, char *argv[]) +{ + char line[MAX_LINE_SIZE + 1]; + char *str[MAX_STRINGS]; + int count = 0; + int i, n; + + while (count < MAX_STRINGS && fgets (line, MAX_LINE_SIZE, stdin) != NULL) + { + n = strlen (line) - 1; + + if (line[n] == '\n') + line[n] = '\0'; + + str[count] = strdup (line); + + if (str[count] == NULL) + exit (EXIT_FAILURE); + + ++count; + } + + qsort (str, count, sizeof (char *), compare); + + for (i = 0; i < count; ++i) + puts (str[i]); + + exit (EXIT_SUCCESS); +} diff --git a/string/tst-svc.expect b/string/tst-svc.expect new file mode 100644 index 0000000000..f906c4fc0b --- /dev/null +++ b/string/tst-svc.expect @@ -0,0 +1,26 @@ +000 +001 +00 +00a +01 +01a +0 +0a +20 +21 +22 +212 +foo +foo-0.4 +foo-0.4a +foo-0.4b +foo-0.5 +foo-0.10.5 +foo-3.01 +foo-3.0 +foo-3.0.0 +foo-3.0.1 +foo-3.2 +foo-3.10 +foo00 +foo0 diff --git a/string/tst-svc.input b/string/tst-svc.input new file mode 100644 index 0000000000..b80ee82b07 --- /dev/null +++ b/string/tst-svc.input @@ -0,0 +1,26 @@ +0a +00 +0 +01 +001 +01a +00a +000 +20 +212 +21 +22 +foo0 +foo00 +foo-0.4 +foo-3.0 +foo +foo-3.0.0 +foo-3.0.1 +foo-0.5 +foo-0.4b +foo-3.10 +foo-3.2 +foo-3.01 +foo-0.4a +foo-0.10.5 diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c index d172ebc655..9f0242fcb0 100644 --- a/sunrpc/authuxprot.c +++ b/sunrpc/authuxprot.c @@ -46,6 +46,7 @@ static char sccsid[] = "@(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro"; /* * XDR for unix authentication parameters. + * Unfortunately, none of these can be declared const. */ bool_t xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p) diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c index c3667d4738..8ae93b8f6d 100644 --- a/sunrpc/pmap_rmt.c +++ b/sunrpc/pmap_rmt.c @@ -370,7 +370,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) stat = RPC_CANTRECV; goto done_broad; } - if (inlen < sizeof (u_long)) + if ((size_t) inlen < sizeof (u_long)) goto recv_again; /* * see if reply transaction id matches sent id. diff --git a/sunrpc/proto.h b/sunrpc/proto.h index ed010f8fab..6d2747f728 100644 --- a/sunrpc/proto.h +++ b/sunrpc/proto.h @@ -1,7 +1,7 @@ /****** rpc_clntout.c ******/ void write_stubs(void); -void printarglist(proc_list *proc, +void printarglist(proc_list *proc, const char *addargname, const char *addargtype); /****** rpc_cout.c ******/ @@ -15,9 +15,9 @@ void emit_single_in_line(declaration *decl, int flag, relation rel); void print_datadef(definition *def); void print_funcdef(definition *def); void pxdrfuncdecl(const char *name, int pointerp); -void pprocdef(proc_list *proc, version_list *vp, +void pprocdef(proc_list *proc, version_list *vp, const char *addargtype, int server_p, int mode); -void pdeclaration(const char *name, declaration *dec, int tab, +void pdeclaration(const char *name, declaration *dec, int tab, const char *separator); /****** rpc_main.c ******/ @@ -36,7 +36,7 @@ void write_sample_clnt_main(void); /* see rpc_scan.h */ /****** rpc_svcout.c ******/ -int nullproc(proc_list *proc); +int nullproc(const proc_list *proc); void write_svc_aux(int nomain); void write_msg_out(void); diff --git a/sunrpc/rpc/auth_unix.h b/sunrpc/rpc/auth_unix.h index 32d8d0aa35..d006f51f72 100644 --- a/sunrpc/rpc/auth_unix.h +++ b/sunrpc/rpc/auth_unix.h @@ -46,6 +46,10 @@ #define _RPC_AUTH_UNIX_H 1 #include <features.h> +#include <sys/types.h> +#include <rpc/types.h> +#include <rpc/auth.h> +#include <rpc/xdr.h> __BEGIN_DECLS diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h index 2cabc00d64..43a599ad25 100644 --- a/sunrpc/rpc/clnt.h +++ b/sunrpc/rpc/clnt.h @@ -38,6 +38,9 @@ #define _RPC_CLNT_H 1 #include <features.h> +#include <sys/types.h> +#include <rpc/types.h> +#include <rpc/auth.h> __BEGIN_DECLS @@ -130,13 +133,13 @@ struct CLIENT { AUTH *cl_auth; /* authenticator */ struct clnt_ops { enum clnt_stat (*cl_call) __P ((CLIENT *, u_long, xdrproc_t, - caddr_t, xdrproc_t, - caddr_t, struct timeval)); + caddr_t, xdrproc_t, + caddr_t, struct timeval)); /* call remote procedure */ void (*cl_abort) __P ((void)); /* abort a call */ - void (*cl_geterr) __P ((CLIENT *, struct rpc_err *)); + void (*cl_geterr) __P ((CLIENT *, struct rpc_err *)); /* get specific error code */ - bool_t (*cl_freeres) __P ((CLIENT *, xdrproc_t, caddr_t)); + bool_t (*cl_freeres) __P ((CLIENT *, xdrproc_t, caddr_t)); /* frees results */ void (*cl_destroy) __P ((CLIENT *)); /* destroy this structure */ bool_t (*cl_control) __P ((CLIENT *, int, char *)); @@ -270,7 +273,7 @@ struct CLIENT { * u_long prog; * u_long vers; */ -extern CLIENT *clntraw_create __P ((__const u_long __prog, +extern CLIENT *clntraw_create __P ((__const u_long __prog, __const u_long __vers)); @@ -283,7 +286,7 @@ extern CLIENT *clntraw_create __P ((__const u_long __prog, * u_ong vers; -- version number * char *prot; -- protocol */ -extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, +extern CLIENT *clnt_create __P ((__const char *__host, __const u_long __prog, __const u_long __vers, __const char *__prot)); @@ -334,7 +337,7 @@ extern CLIENT *clntudp_bufcreate __P ((struct sockaddr_in *__raddr, int *__sockp, u_int __sendsz, u_int __recvsz)); -extern int callrpc __P ((__const char *__host, __const u_long __prognum, +extern int callrpc __P ((__const char *__host, __const u_long __prognum, __const u_long __versnum, __const u_long __procnum, __const xdrproc_t __inproc, __const char *__in, __const xdrproc_t __outproc, char *__out)); @@ -354,9 +357,9 @@ extern void clnt_perrno __P ((enum clnt_stat __num)); /* stderr */ /* * Print an English error message, given the client error code */ -extern void clnt_perror __P ((CLIENT *__clnt, __const char *__msg)); +extern void clnt_perror __P ((CLIENT *__clnt, __const char *__msg)); /* stderr */ -extern char *clnt_sperror __P ((CLIENT *__clnt, __const char *__msg)); +extern char *clnt_sperror __P ((CLIENT *__clnt, __const char *__msg)); /* string */ /* diff --git a/sunrpc/rpc/pmap_clnt.h b/sunrpc/rpc/pmap_clnt.h index 0b8d50f10f..45639e7dc4 100644 --- a/sunrpc/rpc/pmap_clnt.h +++ b/sunrpc/rpc/pmap_clnt.h @@ -38,6 +38,8 @@ #ifndef _RPC_PMAP_CLNT_H #define _RPC_PMAP_CLNT_H 1 #include <features.h> +#include <rpc/types.h> +#include <rpc/xdr.h> __BEGIN_DECLS @@ -70,23 +72,23 @@ extern bool_t pmap_set __P ((__const u_long __program, __const u_long __vers, extern bool_t pmap_unset __P ((__const u_long __program, __const u_long __vers)); extern struct pmaplist *pmap_getmaps __P ((struct sockaddr_in *__address)); extern enum clnt_stat pmap_rmtcall __P ((struct sockaddr_in *__addr, - __const u_long __prog, + __const u_long __prog, __const u_long __vers, - __const u_long __proc, + __const u_long __proc, xdrproc_t __xdrargs, caddr_t __argsp, xdrproc_t __xdrres, caddr_t __resp, struct timeval __tout, u_long *__port_ptr)); -extern enum clnt_stat clnt_broadcast __P ((__const u_long __prog, +extern enum clnt_stat clnt_broadcast __P ((__const u_long __prog, __const u_long __vers, - __const u_long __proc, + __const u_long __proc, xdrproc_t __xargs, caddr_t __argsp, xdrproc_t __xresults, caddr_t __resultsp, resultproc_t __eachresult)); extern u_short pmap_getport __P ((struct sockaddr_in *__address, - __const u_long __program, + __const u_long __program, __const u_long __version, u_int __protocol)); diff --git a/sunrpc/rpc/pmap_rmt.h b/sunrpc/rpc/pmap_rmt.h index 2e1af7e3d0..6d32045c8e 100644 --- a/sunrpc/rpc/pmap_rmt.h +++ b/sunrpc/rpc/pmap_rmt.h @@ -39,7 +39,9 @@ #define _RPC_PMAP_RMT_H 1 #include <features.h> - +#include <sys/types.h> +#include <rpc/types.h> +#include <rpc/xdr.h> __BEGIN_DECLS diff --git a/sunrpc/rpc/rpc_msg.h b/sunrpc/rpc/rpc_msg.h index 8f6b6a9da4..73996169d6 100644 --- a/sunrpc/rpc/rpc_msg.h +++ b/sunrpc/rpc/rpc_msg.h @@ -33,6 +33,7 @@ #define _RPC_MSG_H 1 #include <sys/cdefs.h> +#include <rpc/xdr.h> #include <rpc/clnt.h> /* diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h index eecb1e14be..aa1c702757 100644 --- a/sunrpc/rpc/xdr.h +++ b/sunrpc/rpc/xdr.h @@ -39,6 +39,8 @@ #define __XDR_HEADER__ #include <features.h> +#include <sys/types.h> +#include <rpc/types.h> /* We need FILE. */ #include <stdio.h> @@ -91,8 +93,17 @@ enum xdr_op * This is the number of bytes per unit of external data. */ #define BYTES_PER_XDR_UNIT (4) +/* + * This only works if the above is a power of 2. But it's defined to be + * 4 by the appropriate RFCs. So it will work. And it's normally quicker + * than the old routine. + */ +#if 1 +#define RNDUP(x) (((x) + BYTES_PER_XDR_UNIT - 1) & ~(BYTES_PER_XDR_UNIT - 1)) +#else /* this is the old routine */ #define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ * BYTES_PER_XDR_UNIT) +#endif /* * The XDR handle. @@ -108,7 +119,7 @@ struct XDR { bool_t (*x_getlong) __P ((XDR * __xdrs, long *__lp)); /* get a long from underlying stream */ - bool_t (*x_putlong) __P ((XDR * __xdrs, long *__lp)); + bool_t (*x_putlong) __P ((XDR * __xdrs, __const long *__lp)); /* put a long to " */ bool_t (*x_getbytes) __P ((XDR * __xdrs, caddr_t __addr, u_int __len)); /* get some bytes from " */ @@ -243,6 +254,9 @@ struct xdr_discrim /* * These are the "generic" xdr routines. + * None of these can have const applied because it's not possible to + * know whether the call is a read or a write to the passed parameter + * also, the XDR structure is always updated by some of these calls. */ extern bool_t xdr_void __P ((void)); extern bool_t xdr_int __P ((XDR * __xdrs, int *__ip)); @@ -294,8 +308,8 @@ extern bool_t xdr_netobj __P ((XDR * __xdrs, struct netobj * __np)); */ /* XDR using memory buffers */ -extern void xdrmem_create __P ((XDR * __xdrs, caddr_t __addr, u_int __size, - enum xdr_op __op)); +extern void xdrmem_create __P ((XDR * __xdrs, __const caddr_t __addr, + u_int __size, enum xdr_op __op)); /* XDR using stdio library */ extern void xdrstdio_create __P ((XDR * __xdrs, FILE * __file, diff --git a/sunrpc/rpc_cout.c b/sunrpc/rpc_cout.c index 77319d9b15..ab3b24da74 100644 --- a/sunrpc/rpc_cout.c +++ b/sunrpc/rpc_cout.c @@ -45,10 +45,10 @@ char cout_rcsid[] = #include "proto.h" static void emit_enum(definition *def); -static void emit_program(definition *def); -static void emit_union(definition *def); +static void emit_program(const definition *def); +static void emit_union(const definition *def); static void emit_struct(definition *def); -static void emit_typedef(definition *def); +static void emit_typedef(const definition *def); static int findtype(const definition *def, const char *type); static int undefined(const char *type); static void print_generic_header(const char *procname, int pointerp); @@ -59,8 +59,8 @@ static void print_ifclose(int indent); static void print_ifstat(int indent, const char *prefix, const char *type, relation rel, const char *amax, const char *objname, const char *name); -static void print_stat(int indent, declaration *dec); -static void print_header(definition *def); +static void print_stat(int indent, const declaration *dec); +static void print_header(const definition *def); static void print_trailer(void); static char *upcase(const char *str); @@ -77,15 +77,16 @@ emit(definition *def) emit_program(def); return; } - if(def->def_kind == DEF_TYPEDEF) + if (def->def_kind == DEF_TYPEDEF) { /* now we need to handle declarations like - struct typedef foo foo; - since we don't want this to be expanded into 2 calls to xdr_foo */ + struct typedef foo foo; + since we don't want this to be expanded + into 2 calls to xdr_foo */ - if(strcmp(def->def.ty.old_type,def->def_name)==0) - return; - }; + if (strcmp(def->def.ty.old_type,def->def_name)==0) + return; + }; print_header(def); switch (def->def_kind) { @@ -102,7 +103,8 @@ emit(definition *def) emit_typedef(def); break; default: - /* can't happen */ + /* can't happen */ + break; } print_trailer(); } @@ -110,7 +112,6 @@ emit(definition *def) static int findtype(const definition *def, const char *type) { - if (def->def_kind == DEF_PROGRAM || def->def_kind == DEF_CONST) { return (0); } else { @@ -122,10 +123,7 @@ static int undefined(const char *type) { definition *def; - def = (definition *) FINDVAL(defined, type, findtype); - - return (def == NULL); } @@ -153,33 +151,25 @@ print_generic_header(const char *procname, int pointerp) } static void -print_header(definition *def) +print_header(const definition *def) { + print_generic_header(def->def_name, + def->def_kind != DEF_TYPEDEF || + !isvectordef(def->def.ty.old_type, + def->def.ty.rel)); -/* - decl_list *dl; - bas_type *ptr; - int i; - */ - - print_generic_header( def->def_name, - def->def_kind != DEF_TYPEDEF || - !isvectordef(def->def.ty.old_type, def->def.ty.rel)); - - /* Now add Inline support */ - - - if(inlineflag == 0 ) - return; - /*May cause lint to complain. but ... */ -f_print(fout, "\t register long *buf;\n\n"); + /* Now add Inline support */ + if(inlineflag == 0 ) + return; + /*May cause lint to complain. but ... */ + f_print(fout, "\t register long *buf;\n\n"); } static void -print_prog_header(proc_list *plist) +print_prog_header(const proc_list *plist) { - print_generic_header( plist->args.argname, 1 ); + print_generic_header(plist->args.argname, 1 ); } static void @@ -308,7 +298,7 @@ emit_enum(definition *def) } static void -emit_program(definition *def) +emit_program(const definition *def) { decl_list *dl; version_list *vlist; @@ -327,7 +317,7 @@ emit_program(definition *def) } static void -emit_union(definition *def) +emit_union(const definition *def) { declaration *dflt; case_list *cl; @@ -393,6 +383,8 @@ emit_union(definition *def) f_print(fout, "\t}\n"); } +/* this may be const. i haven't traced this one through yet. */ + static void emit_struct(definition *def) { @@ -446,9 +438,6 @@ emit_struct(definition *def) return; }; - - - flag=PUT; for(j=0; j<2; j++){ @@ -605,7 +594,7 @@ emit_struct(definition *def) static void -emit_typedef(definition *def) +emit_typedef(const definition *def) { const char *prefix = def->def.ty.old_prefix; const char *type = def->def.ty.old_type; @@ -617,7 +606,7 @@ emit_typedef(definition *def) } static void -print_stat(int indent, declaration *dec) +print_stat(int indent, const declaration *dec) { const char *prefix = dec->prefix; const char *type = dec->type; diff --git a/sunrpc/rpc_parse.h b/sunrpc/rpc_parse.h index 07c1f67833..8d48c85a07 100644 --- a/sunrpc/rpc_parse.h +++ b/sunrpc/rpc_parse.h @@ -31,7 +31,7 @@ /* @(#)rpc_parse.h 1.3 90/08/29 (C) 1987 SMI */ /* - * rpc_parse.h, Definitions for the RPCL parser + * rpc_parse.h, Definitions for the RPCL parser */ enum defkind { @@ -50,7 +50,7 @@ enum relation { REL_VECTOR, /* fixed length array */ REL_ARRAY, /* variable length array */ REL_POINTER, /* pointer */ - REL_ALIAS, /* simple */ + REL_ALIAS /* simple */ }; typedef enum relation relation; @@ -113,7 +113,7 @@ struct arg_list { const char *argname; /* name of struct for arg*/ decl_list *decls; }; - + typedef struct arg_list arg_list; struct proc_list { diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c index d19b9b45eb..75eb695e87 100644 --- a/sunrpc/rpc_svcout.c +++ b/sunrpc/rpc_svcout.c @@ -51,10 +51,10 @@ static const char ROUTINE[] = "local"; char _errbuf[256]; /* For all messages */ -static void internal_proctype (proc_list * plist); +static void internal_proctype (const proc_list * plist); static void p_xdrfunc (const char *rname, const char *typename); -static void write_real_program (definition * def); -static void write_program (definition * def, const char *storage); +static void write_real_program (const definition * def); +static void write_program (const definition * def, const char *storage); static void printerr (const char *err, const char *transp); static void printif (const char *proc, const char *transp, const char *prefix, const char *arg); @@ -78,7 +78,7 @@ p_xdrfunc (const char *rname, const char *typename) } void -internal_proctype (proc_list * plist) +internal_proctype (const proc_list * plist) { f_print (fout, "static "); ptype (plist->res_prefix, plist->res_type, 1); @@ -321,7 +321,7 @@ write_programs (const char *storage) Unpacks single user argument of printmsg_1 to call-by-value format expected by printmsg_1. */ static void -write_real_program (definition * def) +write_real_program (const definition * def) { version_list *vp; proc_list *proc; @@ -388,7 +388,7 @@ write_real_program (definition * def) } static void -write_program (definition * def, const char *storage) +write_program (const definition * def, const char *storage) { version_list *vp; proc_list *proc; @@ -566,7 +566,7 @@ printif (const char *proc, const char *transp, const char *prefix, } int -nullproc (proc_list * proc) +nullproc (const proc_list * proc) { for (; proc != NULL; proc = proc->next) { diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index d666119376..becc59bed3 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -93,10 +93,6 @@ xdr_int (xdrs, ip) int *ip; { -#ifdef lint - (void) (xdr_short (xdrs, (short *) ip)); - return (xdr_long (xdrs, (long *) ip)); -#else #if INT_MAX < LONG_MAX long l; @@ -123,7 +119,6 @@ xdr_int (xdrs, ip) #else #error unexpected integer sizes in_xdr_int() #endif -#endif } /* @@ -134,10 +129,6 @@ xdr_u_int (xdrs, up) XDR *xdrs; u_int *up; { -#ifdef lint - (void) (xdr_short (xdrs, (short *) up)); - return (xdr_u_long (xdrs, (u_long *) up)); -#else #if UINT_MAX < ULONG_MAX u_long l; @@ -164,7 +155,6 @@ xdr_u_int (xdrs, up) #else #error unexpected integer sizes in_xdr_u_int() #endif -#endif } /* @@ -349,7 +339,6 @@ xdr_enum (xdrs, ep) XDR *xdrs; enum_t *ep; { -#ifndef lint enum sizecheck { SIZEVAL @@ -392,10 +381,6 @@ xdr_enum (xdrs, ep) { return FALSE; } -#else /* lint */ - (void) (xdr_short (xdrs, (short *) ep)); - return xdr_long (xdrs, (long *) ep); -#endif /* lint */ } /* diff --git a/sunrpc/xdr_float.c b/sunrpc/xdr_float.c index be5a07d028..2e1e37f0a2 100644 --- a/sunrpc/xdr_float.c +++ b/sunrpc/xdr_float.c @@ -87,8 +87,8 @@ static struct sgl_limits { bool_t xdr_float(xdrs, fp) - register XDR *xdrs; - register float *fp; + XDR *xdrs; + float *fp; { #ifdef vax struct ieee_single is; @@ -207,8 +207,8 @@ static struct dbl_limits { bool_t xdr_double(xdrs, dp) - register XDR *xdrs; - double *dp; + XDR *xdrs; + double *dp; { #ifdef vax struct ieee_double id; diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c index 481a8664b5..8e88e41ea2 100644 --- a/sunrpc/xdr_mem.c +++ b/sunrpc/xdr_mem.c @@ -47,13 +47,13 @@ static char sccsid[] = "@(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro"; #include <rpc/rpc.h> static bool_t xdrmem_getlong (XDR *, long *); -static bool_t xdrmem_putlong (XDR *, long *); +static bool_t xdrmem_putlong (XDR *, const long *); static bool_t xdrmem_getbytes (XDR *, caddr_t, u_int); -static bool_t xdrmem_putbytes (XDR *, caddr_t, u_int); -static u_int xdrmem_getpos (XDR *); +static bool_t xdrmem_putbytes (XDR *, const caddr_t, u_int); +static u_int xdrmem_getpos (const XDR *); static bool_t xdrmem_setpos (XDR *, u_int); static long *xdrmem_inline (XDR *, int); -static void xdrmem_destroy (XDR *); +static void xdrmem_destroy (const XDR *); static const struct xdr_ops xdrmem_ops = { @@ -74,7 +74,7 @@ static const struct xdr_ops xdrmem_ops = void xdrmem_create (xdrs, addr, size, op) XDR *xdrs; - caddr_t addr; + const caddr_t addr; u_int size; enum xdr_op op; { @@ -85,11 +85,21 @@ xdrmem_create (xdrs, addr, size, op) xdrs->x_handy = size; } +/* + * Nothing needs to be done for the memory case. The argument is clearly + * const. + */ + static void -xdrmem_destroy (XDR *xdrs) +xdrmem_destroy (const XDR *xdrs) { } +/* + * Gets the next word from the memory referenced by xdrs and places it + * in the long pointed to by lp. It then increments the private word to + * point at the next element. Neither object pointed to is const + */ static bool_t xdrmem_getlong (xdrs, lp) XDR *xdrs; @@ -103,10 +113,15 @@ xdrmem_getlong (xdrs, lp) return TRUE; } +/* + * Puts the long pointed to by lp in the memory referenced by xdrs. It + * then increments the private word to point at the next element. The + * long pointed at is const + */ static bool_t xdrmem_putlong (xdrs, lp) XDR *xdrs; - long *lp; + const long *lp; { if ((xdrs->x_handy -= 4) < 0) @@ -116,6 +131,12 @@ xdrmem_putlong (xdrs, lp) return TRUE; } +/* + * Gets an unaligned number of bytes from the xdrs structure and writes them + * to the address passed in addr. Be very careful when calling this routine + * as it could leave the xdrs pointing to an unaligned structure which is not + * a good idea. None of the things pointed to are const. + */ static bool_t xdrmem_getbytes (xdrs, addr, len) XDR *xdrs; @@ -130,10 +151,14 @@ xdrmem_getbytes (xdrs, addr, len) return TRUE; } +/* + * The complementary function to the above. The same warnings apply about + * unaligned data. The source address is const. + */ static bool_t xdrmem_putbytes (xdrs, addr, len) XDR *xdrs; - caddr_t addr; + const caddr_t addr; u_int len; { @@ -144,14 +169,21 @@ xdrmem_putbytes (xdrs, addr, len) return TRUE; } +/* + * Not sure what this one does. But it clearly doesn't modify the contents + * of xdrs. **FIXME** does this not assume u_int == u_long? + */ static u_int xdrmem_getpos (xdrs) - XDR *xdrs; + const XDR *xdrs; { return (u_long) xdrs->x_private - (u_long) xdrs->x_base; } +/* + * xdrs modified + */ static bool_t xdrmem_setpos (xdrs, pos) XDR *xdrs; @@ -167,6 +199,9 @@ xdrmem_setpos (xdrs, pos) return TRUE; } +/* + * xdrs modified + */ static long * xdrmem_inline (xdrs, len) XDR *xdrs; diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index af2f9f5ed7..66b33f8456 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -54,9 +54,9 @@ static char sccsid[] = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #include <rpc/rpc.h> static bool_t xdrrec_getlong (XDR *, long *); -static bool_t xdrrec_putlong (XDR *, long *); +static bool_t xdrrec_putlong (XDR *, const long *); static bool_t xdrrec_getbytes (XDR *, caddr_t, u_int); -static bool_t xdrrec_putbytes (XDR *, caddr_t, u_int); +static bool_t xdrrec_putbytes (XDR *, const caddr_t, u_int); static u_int xdrrec_getpos (XDR *); static bool_t xdrrec_setpos (XDR *, u_int); static long *xdrrec_inline (XDR *, int); @@ -221,7 +221,7 @@ xdrrec_getlong (xdrs, lp) static bool_t xdrrec_putlong (xdrs, lp) XDR *xdrs; - long *lp; + const long *lp; { RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private; int32_t *dest_lp = (int32_t *) rstrm->out_finger; @@ -276,7 +276,7 @@ xdrrec_getbytes (xdrs, addr, len) static bool_t xdrrec_putbytes (xdrs, addr, len) XDR *xdrs; - caddr_t addr; + const caddr_t addr; u_int len; { RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private; diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c index f95bc70be1..ddd726d8cb 100644 --- a/sunrpc/xdr_stdio.c +++ b/sunrpc/xdr_stdio.c @@ -46,9 +46,9 @@ static char sccsid[] = "@(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro"; #include <rpc/xdr.h> static bool_t xdrstdio_getlong (XDR *, long *); -static bool_t xdrstdio_putlong (XDR *, long *); +static bool_t xdrstdio_putlong (XDR *, const long *); static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int); -static bool_t xdrstdio_putbytes (XDR *, caddr_t, u_int); +static bool_t xdrstdio_putbytes (XDR *, const caddr_t, u_int); static u_int xdrstdio_getpos (XDR *); static bool_t xdrstdio_setpos (XDR *, u_int); static long *xdrstdio_inline (XDR *, int); @@ -114,7 +114,7 @@ xdrstdio_getlong (xdrs, lp) } static bool_t -xdrstdio_putlong (XDR *xdrs, long *lp) +xdrstdio_putlong (XDR *xdrs, const long *lp) { long mycopy = htonl (*lp); @@ -127,7 +127,7 @@ xdrstdio_putlong (XDR *xdrs, long *lp) static bool_t xdrstdio_getbytes (xdrs, addr, len) XDR *xdrs; - caddr_t addr; + const caddr_t addr; u_int len; { @@ -137,7 +137,7 @@ xdrstdio_getbytes (xdrs, addr, len) } static bool_t -xdrstdio_putbytes (XDR *xdrs, caddr_t addr, u_int len) +xdrstdio_putbytes (XDR *xdrs, const caddr_t addr, u_int len) { if ((len != 0) && (fwrite (addr, (int) len, 1, (FILE *) xdrs->x_private) != 1)) return FALSE; diff --git a/sysdeps/generic/rpc/auth.h b/sysdeps/generic/rpc/auth.h index 61cd351485..532c4d295f 100644 --- a/sysdeps/generic/rpc/auth.h +++ b/sysdeps/generic/rpc/auth.h @@ -42,6 +42,8 @@ #define _RPC_AUTH_H 1 #include <features.h> +#include <sys/types.h> +#include <rpc/types.h> #include <rpc/xdr.h> __BEGIN_DECLS @@ -99,7 +101,7 @@ struct AUTH { struct auth_ops { void (*ah_nextverf) __P ((AUTH *)); int (*ah_marshal) __P ((AUTH *, XDR *)); /* nextverf & serialize */ - int (*ah_validate) __P ((AUTH *, struct opaque_auth *)); + int (*ah_validate) __P ((AUTH *, struct opaque_auth *)); /* validate verifier */ int (*ah_refresh) __P ((AUTH *)); /* refresh credentials */ void (*ah_destroy) __P ((AUTH *)); /* destroy this structure */ @@ -163,7 +165,7 @@ extern AUTH *authunix_create __P ((char *__machname, __uid_t __uid, __gid_t *__aup_gids)); extern AUTH *authunix_create_default __P ((void)); extern AUTH *authnone_create __P ((void)); -extern AUTH *authdes_create __P ((char *__servername, u_int __window, +extern AUTH *authdes_create __P ((char *__servername, u_int __window, struct sockaddr *__syncaddr, des_block *__ckey)); diff --git a/sysdeps/i386/fpu/__math.h b/sysdeps/i386/fpu/__math.h index d79fe7dd5c..7758fe8598 100644 --- a/sysdeps/i386/fpu/__math.h +++ b/sysdeps/i386/fpu/__math.h @@ -460,7 +460,7 @@ __finite (double __x) { register int __result; __asm__ __volatile__ - ("orl $x0x800fffff, %0\n\t" + ("orl $0x800fffff, %0\n\t" "incl %0\n\t" "shrl $31, %0" : "=q" (__result) : "0" (((int *) &__x)[1])); diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c index 6cad6eab2e..b0e70e89f9 100644 --- a/sysdeps/mach/hurd/setitimer.c +++ b/sysdeps/mach/hurd/setitimer.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +/* 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 @@ -16,7 +16,6 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ansidecl.h> #include <stddef.h> #include <errno.h> #include <sys/time.h> @@ -310,9 +309,8 @@ setitimer_locked (const struct itimerval *new, struct itimerval *old, set *OLD to the old value of timer WHICH. Returns 0 on success, -1 on errors. */ int -DEFUN(__setitimer, (which, new, old), - enum __itimer_which which AND - struct itimerval *new AND struct itimerval *old) +__setitimer (enum __itimer_which which, const struct itimerval *new, + struct itimerval *old) { void *crit; diff --git a/sysdeps/powerpc/Dist b/sysdeps/powerpc/Dist new file mode 100644 index 0000000000..ba908dc0cb --- /dev/null +++ b/sysdeps/powerpc/Dist @@ -0,0 +1 @@ +fenv_libc.h diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile new file mode 100644 index 0000000000..4100901d62 --- /dev/null +++ b/sysdeps/powerpc/Makefile @@ -0,0 +1,3 @@ +ifeq ($(subdir),math) +libm-support += fenv_const +endif diff --git a/sysdeps/powerpc/__longjmp.S b/sysdeps/powerpc/__longjmp.S index da621e22c0..02292a0eb2 100644 --- a/sysdeps/powerpc/__longjmp.S +++ b/sysdeps/powerpc/__longjmp.S @@ -22,46 +22,46 @@ #include <jmp_buf.h> ENTRY (__longjmp) - lwz 1,(JB_GPR1*4)(3) - lwz 2,(JB_GPR2*4)(3) - lwz 0,(JB_LR*4)(3) - lwz 14,((JB_GPRS+0)*4)(3) - lfd 14,((JB_FPRS+0*2)*4)(3) - lwz 15,((JB_GPRS+1)*4)(3) - lfd 15,((JB_FPRS+1*2)*4)(3) - lwz 16,((JB_GPRS+2)*4)(3) - lfd 16,((JB_FPRS+2*2)*4)(3) - lwz 17,((JB_GPRS+3)*4)(3) - lfd 17,((JB_FPRS+3*2)*4)(3) - lwz 18,((JB_GPRS+4)*4)(3) - lfd 18,((JB_FPRS+4*2)*4)(3) - lwz 19,((JB_GPRS+5)*4)(3) - lfd 19,((JB_FPRS+5*2)*4)(3) - lwz 20,((JB_GPRS+6)*4)(3) - lfd 20,((JB_FPRS+6*2)*4)(3) - mtlr 0 - lwz 21,((JB_GPRS+7)*4)(3) - lfd 21,((JB_FPRS+7*2)*4)(3) - lwz 22,((JB_GPRS+8)*4)(3) - lfd 22,((JB_FPRS+8*2)*4)(3) - lwz 23,((JB_GPRS+9)*4)(3) - lfd 23,((JB_FPRS+9*2)*4)(3) - lwz 24,((JB_GPRS+10)*4)(3) - lfd 24,((JB_FPRS+10*2)*4)(3) - lwz 25,((JB_GPRS+11)*4)(3) - lfd 25,((JB_FPRS+11*2)*4)(3) - lwz 26,((JB_GPRS+12)*4)(3) - lfd 26,((JB_FPRS+12*2)*4)(3) - lwz 27,((JB_GPRS+13)*4)(3) - lfd 27,((JB_FPRS+13*2)*4)(3) - lwz 28,((JB_GPRS+14)*4)(3) - lfd 28,((JB_FPRS+14*2)*4)(3) - lwz 29,((JB_GPRS+15)*4)(3) - lfd 29,((JB_FPRS+15*2)*4)(3) - lwz 30,((JB_GPRS+16)*4)(3) - lfd 30,((JB_FPRS+16*2)*4)(3) - lwz 31,((JB_GPRS+17)*4)(3) - lfd 31,((JB_FPRS+17*2)*4)(3) - mr 3,4 + lwz %r1,(JB_GPR1*4)(%r3) + lwz %r2,(JB_GPR2*4)(%r3) + lwz %r0,(JB_LR*4)(%r3) + lwz %r14,((JB_GPRS+0)*4)(%r3) + lfd %f14,((JB_FPRS+0*2)*4)(%r3) + lwz %r15,((JB_GPRS+1)*4)(%r3) + lfd %f15,((JB_FPRS+1*2)*4)(%r3) + lwz %r16,((JB_GPRS+2)*4)(%r3) + lfd %f16,((JB_FPRS+2*2)*4)(%r3) + lwz %r17,((JB_GPRS+3)*4)(%r3) + lfd %f17,((JB_FPRS+3*2)*4)(%r3) + lwz %r18,((JB_GPRS+4)*4)(%r3) + lfd %f18,((JB_FPRS+4*2)*4)(%r3) + lwz %r19,((JB_GPRS+5)*4)(%r3) + lfd %f19,((JB_FPRS+5*2)*4)(%r3) + lwz %r20,((JB_GPRS+6)*4)(%r3) + lfd %f20,((JB_FPRS+6*2)*4)(%r3) + mtlr %r0 + lwz %r21,((JB_GPRS+7)*4)(%r3) + lfd %f21,((JB_FPRS+7*2)*4)(%r3) + lwz %r22,((JB_GPRS+8)*4)(%r3) + lfd %f22,((JB_FPRS+8*2)*4)(%r3) + lwz %r23,((JB_GPRS+9)*4)(%r3) + lfd %f23,((JB_FPRS+9*2)*4)(%r3) + lwz %r24,((JB_GPRS+10)*4)(%r3) + lfd %f24,((JB_FPRS+10*2)*4)(%r3) + lwz %r25,((JB_GPRS+11)*4)(%r3) + lfd %f25,((JB_FPRS+11*2)*4)(%r3) + lwz %r26,((JB_GPRS+12)*4)(%r3) + lfd %f26,((JB_FPRS+12*2)*4)(%r3) + lwz %r27,((JB_GPRS+13)*4)(%r3) + lfd %f27,((JB_FPRS+13*2)*4)(%r3) + lwz %r28,((JB_GPRS+14)*4)(%r3) + lfd %f28,((JB_FPRS+14*2)*4)(%r3) + lwz %r29,((JB_GPRS+15)*4)(%r3) + lfd %f29,((JB_FPRS+15*2)*4)(%r3) + lwz %r30,((JB_GPRS+16)*4)(%r3) + lfd %f30,((JB_FPRS+16*2)*4)(%r3) + lwz %r31,((JB_GPRS+17)*4)(%r3) + lfd %f31,((JB_FPRS+17*2)*4)(%r3) + mr %r3,%r4 blr END (__longjmp) diff --git a/sysdeps/powerpc/__math.h b/sysdeps/powerpc/__math.h index 9dc19a91a5..db9688cfc5 100644 --- a/sysdeps/powerpc/__math.h +++ b/sysdeps/powerpc/__math.h @@ -64,25 +64,6 @@ fabs (double __x) return __value; } -/* Optimized versions for some non-standardized functions. */ -#ifdef __USE_MISC - -__MATH_INLINE double hypot (double __x, double __y); -__MATH_INLINE double -hypot (double __x, double __y) -{ - return sqrt (__x * __x + __y * __y); -} - -__MATH_INLINE double __sgn (double __x); -__MATH_INLINE double -sgn (double __x) -{ - return (__x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0)); -} - -#endif /* __USE_MISC */ - #endif /* __NO_MATH_INLINES */ #endif /* __GNUC__ */ diff --git a/sysdeps/powerpc/bsd-_setjmp.S b/sysdeps/powerpc/bsd-_setjmp.S index a9aefcc977..ffd90d5bd2 100644 --- a/sysdeps/powerpc/bsd-_setjmp.S +++ b/sysdeps/powerpc/bsd-_setjmp.S @@ -24,7 +24,7 @@ #include <sysdep.h> ENTRY (_setjmp) - li 4,0 /* Set second argument to 0. */ + li %r4,0 /* Set second argument to 0. */ #ifdef PIC b __sigsetjmp@plt #else diff --git a/sysdeps/powerpc/bsd-setjmp.S b/sysdeps/powerpc/bsd-setjmp.S index 1a6300660e..f02d7815ed 100644 --- a/sysdeps/powerpc/bsd-setjmp.S +++ b/sysdeps/powerpc/bsd-setjmp.S @@ -24,7 +24,7 @@ #include <sysdep.h> ENTRY (__setjmp) - li 4,1 /* Set second argument to 1. */ + li %r4,1 /* Set second argument to 1. */ #ifdef PIC b __sigsetjmp@plt #else diff --git a/sysdeps/powerpc/dl-machine.h b/sysdeps/powerpc/dl-machine.h index 3ad5ca89c9..cfada93cd4 100644 --- a/sysdeps/powerpc/dl-machine.h +++ b/sysdeps/powerpc/dl-machine.h @@ -17,6 +17,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef dl_machine_h +#define dl_machine_h + #define ELF_MACHINE_NAME "powerpc" #include <assert.h> @@ -134,318 +137,13 @@ elf_machine_load_address (void) /* So now work out the difference between where the branch actually points, and the offset of that location in memory from the start of the file. */ - return (Elf32_Addr)branchaddr - *got + - (*branchaddr & 0x3fffffc | - (int)(*branchaddr << 6 & 0x80000000) >> 6); + return ((Elf32_Addr)branchaddr - *got + + (*branchaddr & 0x3fffffc + | (int)(*branchaddr << 6 & 0x80000000) >> 6)); } #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) /* nothing */ -/* Perform the relocation specified by RELOC and SYM (which is fully resolved). - LOADADDR is the load address of the object; INFO is an array indexed - by DT_* of the .dynamic section info. */ - -#ifdef RESOLVE - -static inline void -elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, - const Elf32_Sym *sym, const struct r_found_version *version) -{ - const Elf32_Sym *const refsym = sym; - Elf32_Addr *const reloc_addr = (Elf32_Addr *)(map->l_addr + reloc->r_offset); - Elf32_Word loadbase, finaladdr; - const int rinfo = ELF32_R_TYPE (reloc->r_info); - - if (rinfo == R_PPC_NONE) - return; - - assert (sym != NULL); - if (ELF32_ST_TYPE (sym->st_info) == STT_SECTION || - rinfo == R_PPC_RELATIVE) - { - /* Has already been relocated. */ - loadbase = map->l_addr; - finaladdr = loadbase + reloc->r_addend; - } - else - { - int flags; - - /* We never want to use a PLT entry as the destination of a - reloc, when what is being relocated is a branch. This is - partly for efficiency, but mostly so we avoid loops. */ - if (rinfo == R_PPC_REL24 || - rinfo == R_PPC_ADDR24 || - rinfo == R_PPC_JMP_SLOT) - flags = DL_LOOKUP_NOPLT; - else if (rinfo == R_PPC_COPY) - flags = DL_LOOKUP_NOEXEC; - else - flags = 0; - - loadbase = (Elf32_Word) (char *) (RESOLVE (&sym, version, flags)); - if (sym == NULL) - { - /* Weak symbol that wasn't actually defined anywhere. */ - assert(loadbase == 0); - finaladdr = reloc->r_addend; - } - else - finaladdr = (loadbase + (Elf32_Word) (char *) sym->st_value - + reloc->r_addend); - } - - /* This is an if/else if chain because GCC 2.7.2.[012] turns case - statements into non-PIC table lookups. When a later version - comes out that fixes this, this should be changed. */ - if (rinfo == R_PPC_UADDR32 || - rinfo == R_PPC_GLOB_DAT || - rinfo == R_PPC_ADDR32 || - rinfo == R_PPC_RELATIVE) - { - *reloc_addr = finaladdr; - } - else if (rinfo == R_PPC_ADDR16_LO) - { - *(Elf32_Half*) reloc_addr = finaladdr; - } - else if (rinfo == R_PPC_ADDR16_HI) - { - *(Elf32_Half*) reloc_addr = finaladdr >> 16; - } - else if (rinfo == R_PPC_ADDR16_HA) - { - *(Elf32_Half*) reloc_addr = (finaladdr + 0x8000) >> 16; - } -#ifndef RTLD_BOOTSTRAP - else if (rinfo == R_PPC_REL24) - { - Elf32_Sword delta = finaladdr - (Elf32_Word) (char *) reloc_addr; - if (delta << 6 >> 6 != delta) - _dl_signal_error (0, map->l_name, - "R_PPC_REL24 relocation out of range"); - *reloc_addr = *reloc_addr & 0xfc000003 | delta & 0x3fffffc; - } - else if (rinfo == R_PPC_ADDR24) - { - if (finaladdr << 6 >> 6 != finaladdr) - _dl_signal_error (0, map->l_name, - "R_PPC_ADDR24 relocation out of range"); - *reloc_addr = *reloc_addr & 0xfc000003 | finaladdr & 0x3fffffc; - } - else if (rinfo == R_PPC_COPY) - { - if (sym->st_size != refsym->st_size) - { - const char *strtab; - - strtab = ((void *) map->l_addr - + map->l_info[DT_STRTAB]->d_un.d_ptr); - _dl_sysdep_error ("Symbol `", strtab + refsym->st_name, - "' has different size in shared object, " - "consider re-linking\n", NULL); - } - memcpy (reloc_addr, (char *) finaladdr, MIN (sym->st_size, - refsym->st_size)); - } -#endif - else if (rinfo == R_PPC_REL32) - { - *reloc_addr = finaladdr - (Elf32_Word) (char *) reloc_addr; - } - else if (rinfo == R_PPC_JMP_SLOT) - { - Elf32_Sword delta = finaladdr - (Elf32_Word) (char *) reloc_addr; - if (delta << 6 >> 6 == delta) - *reloc_addr = OPCODE_B (delta); - else if (finaladdr <= 0x01fffffc || finaladdr >= 0xfe000000) - *reloc_addr = OPCODE_BA (finaladdr); - else - { - Elf32_Word *plt; - Elf32_Word index; - - plt = (Elf32_Word *)((char *)map->l_addr - + map->l_info[DT_PLTGOT]->d_un.d_val); - index = (reloc_addr - plt - PLT_INITIAL_ENTRY_WORDS)/2; - - if (index >= PLT_DOUBLE_SIZE) - { - /* Slots greater than or equal to 2^13 have 4 words available - instead of two. */ - reloc_addr[0] = OPCODE_LI (11, finaladdr); - reloc_addr[1] = OPCODE_ADDIS (11, 11, finaladdr + 0x8000 >> 16); - reloc_addr[2] = OPCODE_MTCTR (11); - reloc_addr[3] = OPCODE_BCTR (); - } - else - { - Elf32_Word num_plt_entries; - - num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val - / sizeof(Elf32_Rela)); - - reloc_addr[0] = OPCODE_LI (11, index*4); - reloc_addr[1] = - OPCODE_B (-(4*(index*2 - + 1 - - PLT_LONGBRANCH_ENTRY_WORDS - + PLT_INITIAL_ENTRY_WORDS))); - plt[index+PLT_DATA_START_WORDS (num_plt_entries)] = finaladdr; - } - } - MODIFIED_CODE (reloc_addr); - } - else - assert (! "unexpected dynamic reloc type"); - - if (rinfo == R_PPC_ADDR16_LO || - rinfo == R_PPC_ADDR16_HI || - rinfo == R_PPC_ADDR16_HA || - rinfo == R_PPC_REL24 || - rinfo == R_PPC_ADDR24) - MODIFIED_CODE_NOQUEUE (reloc_addr); -} - -#define ELF_MACHINE_NO_REL 1 - -#endif - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_pltrel_p(type) ((type) == R_PPC_JMP_SLOT) - -/* Set up the loaded object described by L so its unrelocated PLT - entries will jump to the on-demand fixup code in dl-runtime.c. - Also install a small trampoline to be used by entries that have - been relocated to an address too far away for a single branch. */ - -/* A PLT entry does one of three things: - (i) Jumps to the actual routine. Such entries are set up above, in - elf_machine_rela. - - (ii) Jumps to the actual routine via glue at the start of the PLT. - We do this by putting the address of the routine in space - allocated at the end of the PLT, and when the PLT entry is - called we load the offset of that word (from the start of the - space) into r11, then call the glue, which loads the word and - branches to that address. These entries are set up in - elf_machine_rela, but the glue is set up here. - - (iii) Loads the index of this PLT entry (we count the double-size - entries as one entry for this purpose) into r11, then - branches to code at the start of the PLT. This code then - calls `fixup', in dl-runtime.c, via the glue in the macro - ELF_MACHINE_RUNTIME_TRAMPOLINE, which resets the PLT entry to - be one of the above two types. These entries are set up here. */ -static inline void -elf_machine_runtime_setup (struct link_map *map, int lazy) -{ - if (map->l_info[DT_JMPREL]) - { - int i; - /* Fill in the PLT. Its initial contents are directed to a - function earlier in the PLT which arranges for the dynamic - linker to be called back. */ - Elf32_Word *plt = (Elf32_Word *) ((char *) map->l_addr - + map->l_info[DT_PLTGOT]->d_un.d_val); - Elf32_Word num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val - / sizeof (Elf32_Rela)); - Elf32_Word rel_offset_words = PLT_DATA_START_WORDS (num_plt_entries); - extern void _dl_runtime_resolve (void); - Elf32_Word size_modified; - - if (lazy) - for (i = 0; i < num_plt_entries; i++) - { - Elf32_Word offset = PLT_ENTRY_START_WORDS (i); - - if (i >= PLT_DOUBLE_SIZE) - { - plt[offset ] = OPCODE_LI (11, i * 4); - plt[offset+1] = OPCODE_ADDIS (11, 11, (i * 4 + 0x8000) >> 16); - plt[offset+2] = OPCODE_B (-(4 * (offset + 2))); - } - else - { - plt[offset ] = OPCODE_LI (11, i * 4); - plt[offset+1] = OPCODE_B (-(4 * (offset + 1))); - } - } - - /* Multiply index of entry by 3 (in r11). */ - plt[0] = OPCODE_SLWI (12, 11, 1); - plt[1] = OPCODE_ADD (11, 12, 11); - if ((Elf32_Word) (char *) _dl_runtime_resolve <= 0x01fffffc || - (Elf32_Word) (char *) _dl_runtime_resolve >= 0xfe000000) - { - /* Load address of link map in r12. */ - plt[2] = OPCODE_LI (12, (Elf32_Word) (char *) map); - plt[3] = OPCODE_ADDIS (12, 12, (((Elf32_Word) (char *) map - + 0x8000) >> 16)); - - /* Call _dl_runtime_resolve. */ - plt[4] = OPCODE_BA ((Elf32_Word) (char *) _dl_runtime_resolve); - } - else - { - /* Get address of _dl_runtime_resolve in CTR. */ - plt[2] = OPCODE_LI (12, (Elf32_Word) (char *) _dl_runtime_resolve); - plt[3] = OPCODE_ADDIS (12, 12, ((((Elf32_Word) (char *) - _dl_runtime_resolve) - + 0x8000) >> 16)); - plt[4] = OPCODE_MTCTR (12); - - /* Load address of link map in r12. */ - plt[5] = OPCODE_LI (12, (Elf32_Word) (char *) map); - plt[6] = OPCODE_ADDIS (12, 12, (((Elf32_Word) (char *) map - + 0x8000) >> 16)); - - /* Call _dl_runtime_resolve. */ - plt[7] = OPCODE_BCTR (); - } - - - /* Convert the index in r11 into an actual address, and get the - word at that address. */ - plt[PLT_LONGBRANCH_ENTRY_WORDS] = - OPCODE_ADDIS (11, 11, (((Elf32_Word) (char*) (plt + rel_offset_words) - + 0x8000) >> 16)); - plt[PLT_LONGBRANCH_ENTRY_WORDS+1] = - OPCODE_LWZ (11, (Elf32_Word) (char*) (plt+rel_offset_words), 11); - - /* Call the procedure at that address. */ - plt[PLT_LONGBRANCH_ENTRY_WORDS+2] = OPCODE_MTCTR (11); - plt[PLT_LONGBRANCH_ENTRY_WORDS+3] = OPCODE_BCTR (); - - - /* Now, we've modified code (quite a lot of code, possibly). We - need to write the changes from the data cache to a - second-level unified cache, then make sure that stale data in - the instruction cache is removed. (In a multiprocessor - system, the effect is more complex.) - - Assumes the cache line size is at least 32 bytes, or at least - that dcbst and icbi apply to 32-byte lines. At present, all - PowerPC processors have line sizes of exactly 32 bytes. */ - - size_modified = lazy ? rel_offset_words : PLT_INITIAL_ENTRY_WORDS; - for (i = 0; i < size_modified; i+=8) - PPC_DCBST (plt + i); - PPC_SYNC; - for (i = 0; i < size_modified; i+=8) - PPC_ICBI (plt + i); - PPC_ISYNC; - } -} - -static inline void -elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc) -{ - assert (ELF32_R_TYPE (reloc->r_info) == R_PPC_JMP_SLOT); - /* elf_machine_runtime_setup handles this. */ -} - /* The PLT uses Elf32_Rela relocs. */ #define elf_machine_relplt elf_machine_rela @@ -617,7 +315,7 @@ _start: information here about the way memory is mapped. */ #define ELF_PREFERRED_ADDRESS_DATA \ -static ElfW(Addr) _dl_preferred_address = 1; +static ElfW(Addr) _dl_preferred_address = 1 #define ELF_PREFERRED_ADDRESS(loader, maplength, mapstartpref) \ ( { \ @@ -645,4 +343,326 @@ static ElfW(Addr) _dl_preferred_address = 1; _dl_preferred_address = mapstart; \ } ) +/* We require the address of the PLT entry returned from fixup, not + the first word of the PLT entry. */ #define ELF_FIXUP_RETURNS_ADDRESS 1 + +/* Nonzero iff TYPE should not be allowed to resolve to one of + the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_lookup_noexec_p(type) ((type) == R_PPC_COPY) + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +/* We never want to use a PLT entry as the destination of a + reloc, when what is being relocated is a branch. This is + partly for efficiency, but mostly so we avoid loops. */ +#define elf_machine_lookup_noplt_p(type) ((type) == R_PPC_REL24 || \ + (type) == R_PPC_ADDR24 || \ + (type) == R_PPC_JMP_SLOT) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_RELOC_NOPLT R_PPC_JMP_SLOT + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_pltrel_p(type) ((type) == R_PPC_JMP_SLOT) + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. + Also install a small trampoline to be used by entries that have + been relocated to an address too far away for a single branch. */ + +/* A PLT entry does one of three things: + (i) Jumps to the actual routine. Such entries are set up above, in + elf_machine_rela. + + (ii) Jumps to the actual routine via glue at the start of the PLT. + We do this by putting the address of the routine in space + allocated at the end of the PLT, and when the PLT entry is + called we load the offset of that word (from the start of the + space) into r11, then call the glue, which loads the word and + branches to that address. These entries are set up in + elf_machine_rela, but the glue is set up here. + + (iii) Loads the index of this PLT entry (we count the double-size + entries as one entry for this purpose) into r11, then + branches to code at the start of the PLT. This code then + calls `fixup', in dl-runtime.c, via the glue in the macro + ELF_MACHINE_RUNTIME_TRAMPOLINE, which resets the PLT entry to + be one of the above two types. These entries are set up here. */ +static inline void +elf_machine_runtime_setup (struct link_map *map, int lazy) +{ + if (map->l_info[DT_JMPREL]) + { + int i; + /* Fill in the PLT. Its initial contents are directed to a + function earlier in the PLT which arranges for the dynamic + linker to be called back. */ + Elf32_Word *plt = (Elf32_Word *) ((char *) map->l_addr + + map->l_info[DT_PLTGOT]->d_un.d_val); + Elf32_Word num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val + / sizeof (Elf32_Rela)); + Elf32_Word rel_offset_words = PLT_DATA_START_WORDS (num_plt_entries); + extern void _dl_runtime_resolve (void); + Elf32_Word size_modified; + + if (lazy) + for (i = 0; i < num_plt_entries; i++) + { + Elf32_Word offset = PLT_ENTRY_START_WORDS (i); + + if (i >= PLT_DOUBLE_SIZE) + { + plt[offset ] = OPCODE_LI (11, i * 4); + plt[offset+1] = OPCODE_ADDIS (11, 11, (i * 4 + 0x8000) >> 16); + plt[offset+2] = OPCODE_B (-(4 * (offset + 2))); + } + else + { + plt[offset ] = OPCODE_LI (11, i * 4); + plt[offset+1] = OPCODE_B (-(4 * (offset + 1))); + } + } + + /* Multiply index of entry by 3 (in r11). */ + plt[0] = OPCODE_SLWI (12, 11, 1); + plt[1] = OPCODE_ADD (11, 12, 11); + if ((Elf32_Word) (char *) _dl_runtime_resolve <= 0x01fffffc || + (Elf32_Word) (char *) _dl_runtime_resolve >= 0xfe000000) + { + /* Load address of link map in r12. */ + plt[2] = OPCODE_LI (12, (Elf32_Word) (char *) map); + plt[3] = OPCODE_ADDIS (12, 12, (((Elf32_Word) (char *) map + + 0x8000) >> 16)); + + /* Call _dl_runtime_resolve. */ + plt[4] = OPCODE_BA ((Elf32_Word) (char *) _dl_runtime_resolve); + } + else + { + /* Get address of _dl_runtime_resolve in CTR. */ + plt[2] = OPCODE_LI (12, (Elf32_Word) (char *) _dl_runtime_resolve); + plt[3] = OPCODE_ADDIS (12, 12, ((((Elf32_Word) (char *) + _dl_runtime_resolve) + + 0x8000) >> 16)); + plt[4] = OPCODE_MTCTR (12); + + /* Load address of link map in r12. */ + plt[5] = OPCODE_LI (12, (Elf32_Word) (char *) map); + plt[6] = OPCODE_ADDIS (12, 12, (((Elf32_Word) (char *) map + + 0x8000) >> 16)); + + /* Call _dl_runtime_resolve. */ + plt[7] = OPCODE_BCTR (); + } + + + /* Convert the index in r11 into an actual address, and get the + word at that address. */ + plt[PLT_LONGBRANCH_ENTRY_WORDS] = + OPCODE_ADDIS (11, 11, (((Elf32_Word) (char*) (plt + rel_offset_words) + + 0x8000) >> 16)); + plt[PLT_LONGBRANCH_ENTRY_WORDS+1] = + OPCODE_LWZ (11, (Elf32_Word) (char*) (plt+rel_offset_words), 11); + + /* Call the procedure at that address. */ + plt[PLT_LONGBRANCH_ENTRY_WORDS+2] = OPCODE_MTCTR (11); + plt[PLT_LONGBRANCH_ENTRY_WORDS+3] = OPCODE_BCTR (); + + + /* Now, we've modified code (quite a lot of code, possibly). We + need to write the changes from the data cache to a + second-level unified cache, then make sure that stale data in + the instruction cache is removed. (In a multiprocessor + system, the effect is more complex.) + + Assumes the cache line size is at least 32 bytes, or at least + that dcbst and icbi apply to 32-byte lines. At present, all + PowerPC processors have line sizes of exactly 32 bytes. */ + + size_modified = lazy ? rel_offset_words : PLT_INITIAL_ENTRY_WORDS; + for (i = 0; i < size_modified; i+=8) + PPC_DCBST (plt + i); + PPC_SYNC; + for (i = 0; i < size_modified; i+=8) + PPC_ICBI (plt + i); + PPC_ISYNC; + } +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc) +{ + assert (ELF32_R_TYPE (reloc->r_info) == R_PPC_JMP_SLOT); + /* elf_machine_runtime_setup handles this. */ +} + +#endif /* dl_machine_h */ + +#ifdef RESOLVE + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + LOADADDR is the load address of the object; INFO is an array indexed + by DT_* of the .dynamic section info. */ + +static inline void +elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, + const Elf32_Sym *sym, const struct r_found_version *version) +{ + const Elf32_Sym *const refsym = sym; + Elf32_Addr *const reloc_addr = (Elf32_Addr *)(map->l_addr + reloc->r_offset); + Elf32_Word loadbase, finaladdr; + const int rinfo = ELF32_R_TYPE (reloc->r_info); + + if (rinfo == R_PPC_NONE) + return; + + assert (sym != NULL); + /* The condition on the next two lines is a hack around a bug in Solaris + tools on Sparc. It's not clear whether it should really be here at all, + but if not the binutils need to be changed. */ + if ((sym->st_shndx != SHN_UNDEF + && ELF32_ST_BIND (sym->st_info) == STB_LOCAL) + || rinfo == R_PPC_RELATIVE) + { + /* Has already been relocated. */ + loadbase = map->l_addr; + finaladdr = loadbase + reloc->r_addend; + } + else + { + loadbase = (Elf32_Word) (char *) (RESOLVE (&sym, version, + ELF32_R_TYPE(reloc->r_info))); + if (sym == NULL) + { + /* Weak symbol that wasn't actually defined anywhere. */ + assert(loadbase == 0); + finaladdr = reloc->r_addend; + } + else + finaladdr = (loadbase + (Elf32_Word) (char *) sym->st_value + + reloc->r_addend); + } + + /* This is an if/else if chain because GCC 2.7.2.[012] turns case + statements into non-PIC table lookups. When a later version + comes out that fixes this, this should be changed. */ + if (rinfo == R_PPC_UADDR32 || + rinfo == R_PPC_GLOB_DAT || + rinfo == R_PPC_ADDR32 || + rinfo == R_PPC_RELATIVE) + { + *reloc_addr = finaladdr; + } + else if (rinfo == R_PPC_ADDR16_LO) + { + *(Elf32_Half*) reloc_addr = finaladdr; + } + else if (rinfo == R_PPC_ADDR16_HI) + { + *(Elf32_Half*) reloc_addr = finaladdr >> 16; + } + else if (rinfo == R_PPC_ADDR16_HA) + { + *(Elf32_Half*) reloc_addr = (finaladdr + 0x8000) >> 16; + } +#ifndef RTLD_BOOTSTRAP + else if (rinfo == R_PPC_REL24) + { + Elf32_Sword delta = finaladdr - (Elf32_Word) (char *) reloc_addr; + if (delta << 6 >> 6 != delta) + { + _dl_signal_error(0, map->l_name, + "R_PPC_REL24 relocation out of range"); + } + *reloc_addr = *reloc_addr & 0xfc000003 | delta & 0x3fffffc; + } + else if (rinfo == R_PPC_ADDR24) + { + if (finaladdr << 6 >> 6 != finaladdr) + { + _dl_signal_error(0, map->l_name, + "R_PPC_ADDR24 relocation out of range"); + } + *reloc_addr = *reloc_addr & 0xfc000003 | finaladdr & 0x3fffffc; + } + else if (rinfo == R_PPC_COPY) + { + if (sym->st_size != refsym->st_size) + { + const char *strtab; + + strtab = ((void *) map->l_addr + + map->l_info[DT_STRTAB]->d_un.d_ptr); + _dl_sysdep_error ("Symbol `", strtab + refsym->st_name, + "' has different size in shared object, " + "consider re-linking\n", NULL); + } + memcpy (reloc_addr, (char *) finaladdr, MIN (sym->st_size, + refsym->st_size)); + } +#endif + else if (rinfo == R_PPC_REL32) + { + *reloc_addr = finaladdr - (Elf32_Word) (char *) reloc_addr; + } + else if (rinfo == R_PPC_JMP_SLOT) + { + Elf32_Sword delta = finaladdr - (Elf32_Word) (char *) reloc_addr; + if (delta << 6 >> 6 == delta) + *reloc_addr = OPCODE_B (delta); + else if (finaladdr <= 0x01fffffc || finaladdr >= 0xfe000000) + *reloc_addr = OPCODE_BA (finaladdr); + else + { + Elf32_Word *plt; + Elf32_Word index; + + plt = (Elf32_Word *)((char *)map->l_addr + + map->l_info[DT_PLTGOT]->d_un.d_val); + index = (reloc_addr - plt - PLT_INITIAL_ENTRY_WORDS)/2; + + if (index >= PLT_DOUBLE_SIZE) + { + /* Slots greater than or equal to 2^13 have 4 words available + instead of two. */ + reloc_addr[0] = OPCODE_LI (11, finaladdr); + reloc_addr[1] = OPCODE_ADDIS (11, 11, finaladdr + 0x8000 >> 16); + reloc_addr[2] = OPCODE_MTCTR (11); + reloc_addr[3] = OPCODE_BCTR (); + } + else + { + Elf32_Word num_plt_entries; + + num_plt_entries = (map->l_info[DT_PLTRELSZ]->d_un.d_val + / sizeof(Elf32_Rela)); + + reloc_addr[0] = OPCODE_LI (11, index*4); + reloc_addr[1] = + OPCODE_B (-(4*(index*2 + + 1 + - PLT_LONGBRANCH_ENTRY_WORDS + + PLT_INITIAL_ENTRY_WORDS))); + plt[index+PLT_DATA_START_WORDS (num_plt_entries)] = finaladdr; + } + } + MODIFIED_CODE (reloc_addr); + } + else + assert (! "unexpected dynamic reloc type"); + + if (rinfo == R_PPC_ADDR16_LO || + rinfo == R_PPC_ADDR16_HI || + rinfo == R_PPC_ADDR16_HA || + rinfo == R_PPC_REL24 || + rinfo == R_PPC_ADDR24) + MODIFIED_CODE_NOQUEUE (reloc_addr); +} + +#define ELF_MACHINE_NO_REL 1 + +#endif + + diff --git a/sysdeps/powerpc/fclrexcpt.c b/sysdeps/powerpc/fclrexcpt.c new file mode 100644 index 0000000000..1e66140c2e --- /dev/null +++ b/sysdeps/powerpc/fclrexcpt.c @@ -0,0 +1,35 @@ +/* Clear given exceptions in current floating-point environment. + 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. */ + +#include <fenv_libc.h> + +void +feclearexcept (int excepts) +{ + fenv_union_t u; + + /* Get the current state. */ + u.fenv = fegetenv_register (); + + /* Clear the relevant bits. */ + u.l[1] = u.l[1] & ~FE_to_sticky (excepts); + + /* Put the new state in effect. */ + fesetenv_register (u.fenv); +} diff --git a/sysdeps/powerpc/fegetenv.c b/sysdeps/powerpc/fegetenv.c new file mode 100644 index 0000000000..de778fa5a9 --- /dev/null +++ b/sysdeps/powerpc/fegetenv.c @@ -0,0 +1,26 @@ +/* Store current floating-point environment. + 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. */ + +#include <fenv_libc.h> + +void +fegetenv (fenv_t *envp) +{ + *envp = fegetenv_register (); +} diff --git a/sysdeps/powerpc/fegetround.c b/sysdeps/powerpc/fegetround.c new file mode 100644 index 0000000000..05395f0797 --- /dev/null +++ b/sysdeps/powerpc/fegetround.c @@ -0,0 +1,31 @@ +/* Return current rounding direction. + 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. */ + +#include <fenv_libc.h> + +int +fegetround (void) +{ + fenv_union_t u; + + u.fenv = fegetenv_register (); + + /* The rounding mode is bits 30 and 31 of the FPSCR. */ + return u.l[1] & 3; +} diff --git a/sysdeps/powerpc/feholdexcpt.c b/sysdeps/powerpc/feholdexcpt.c new file mode 100644 index 0000000000..a75adbf49e --- /dev/null +++ b/sysdeps/powerpc/feholdexcpt.c @@ -0,0 +1,38 @@ +/* Store current floating-point environment and clear exceptions. + 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. */ + +#include <fenv_libc.h> + +int +feholdexcept (fenv_t *envp) +{ + fenv_union_t u; + + /* Get the current state. */ + u.fenv = *envp = fegetenv_register (); + + /* Clear everything except for the rounding mode and non-IEEE arithmetic + flag. */ + u.l[1] = u.l[1] & 7; + + /* Put the new state in effect. */ + fesetenv_register (u.fenv); + + return 1; +} diff --git a/sysdeps/powerpc/fenv_const.c b/sysdeps/powerpc/fenv_const.c new file mode 100644 index 0000000000..fa35fbc0cf --- /dev/null +++ b/sysdeps/powerpc/fenv_const.c @@ -0,0 +1,29 @@ +/* Constants for fenv_bits.h. + 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. */ + +/* We want to specify the bit pattern of the __fe_*_env constants, so + pretend they're really `long long' instead of `double'. */ + +/* If the default argument is used we use this value. */ +const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) = +0xfff8000000000000ULL; + +/* Floating-point environment where none of the exceptions are masked. */ +const unsigned long long __fe_nomask_env __attribute__ ((aligned (8))) = +0xfff80000000000f8ULL; diff --git a/sysdeps/powerpc/fenv_libc.h b/sysdeps/powerpc/fenv_libc.h new file mode 100644 index 0000000000..45d61e1565 --- /dev/null +++ b/sysdeps/powerpc/fenv_libc.h @@ -0,0 +1,57 @@ +/* Internal libc stuff for floating point environment routines. + 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 _FENV_LIBC_H +#define _FENV_LIBC_H 1 + +#include <fenv.h> + +/* Transform a logical or of the FE_* bits to a bit pattern for the + appropriate sticky bits in the FPSCR. */ +#define FE_to_sticky(excepts) \ + (-(excepts & FE_INVALID) & FE_ALL_INVALID \ + | (excepts) & (FE_ALL_EXCEPT & ~FE_INVALID | FE_ALL_INVALID)) + +/* The sticky bits in the FPSCR indicating exceptions have occurred. */ +#define FPSCR_STICKY_BITS ((FE_ALL_EXCEPT | FE_ALL_INVALID) & ~FE_INVALID) + +/* Equivalent to fegetenv, but returns a fenv_t instead of taking a + pointer. */ +#define fegetenv_register() \ + ({ fenv_t env; asm ("mffs %0" : "=f" (env)); env; }) + +/* Equivalent to fesetenv, but takes a fenv_t instead of a pointer. */ +#define fesetenv_register(env) \ + ({ double d = (env); asm ("mtfsf 0xff,%0" : : "f" (d)); }) + +/* This very handy macro: + - Sets the rounding mode to 'round to nearest'; + - Sets the processor into IEEE mode; and + - Prevents exceptions from being raised for inexact results. + These things happen to be exactly what you need for typical elementary + functions. */ +#define relax_fenv_state() asm ("mtfsfi 7,0") + +typedef union +{ + fenv_t fenv; + unsigned int l[2]; +} fenv_union_t; + +#endif /* fenv_libc.h */ diff --git a/sysdeps/powerpc/fenvbits.h b/sysdeps/powerpc/fenvbits.h new file mode 100644 index 0000000000..867ea5f5b4 --- /dev/null +++ b/sysdeps/powerpc/fenvbits.h @@ -0,0 +1,130 @@ +/* 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. */ + +/* This file should never be included directly. */ + +#ifndef _FENVBITS_H +#define _FENVBITS_H 1 + +/* Define bits representing the exception. We use the bit positions of + the appropriate bits in the FPSCR... */ +enum + { + FE_INEXACT = 1 << 31-6, +#define FE_INEXACT FE_INEXACT + FE_DIVBYZERO = 1 << 31-5, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_UNDERFLOW = 1 << 31-4, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_OVERFLOW = 1 << 31-3, +#define FE_OVERFLOW FE_OVERFLOW + + /* ... except for FE_INVALID, for which we use bit 31. FE_INVALID + actually corresponds to bits 7 through 12 and 21 through 23 + in the FPSCR, but we can't use that because the current draft + says that it must be a power of 2. Instead we use bit 24 which + is the enable bit for all the FE_INVALID exceptions. */ + FE_INVALID = 1 << 31-24, +#define FE_INVALID FE_INVALID + +#ifdef __USE_GNU + /* Breakdown of the FE_INVALID bits. Setting FE_INVALID on an + input to a routine is equivalent to setting all of these bits; + FE_INVALID will be set on output from a routine iff one of + these bits is set. Note, though, that you can't disable or + enable these exceptions individually. */ + + /* Operation with SNaN. */ + FE_INVALID_SNAN = 1 << 31-7, +#define FE_INVALID_SNAN FE_INVALID_SNAN + + /* Inf - Inf */ + FE_INVALID_ISI = 1 << 31-8, +#define FE_INVALID_ISI FE_INVALID_ISI + + /* Inf / Inf */ + FE_INVALID_IDI = 1 << 31-9, +#define FE_INVALID_IDI FE_INVALID_IDI + + /* 0 / 0 */ + FE_INVALID_ZDZ = 1 << 31-10, +#define FE_INVALID_ZDZ FE_INVALID_ZDZ + + /* Inf * 0 */ + FE_INVALID_IMZ = 1 << 31-11, +#define FE_INVALID_IMZ FE_INVALID_IMZ + + /* Comparison with NaN or SNaN. */ + FE_INVALID_COMPARE = 1 << 31-12, +#define FE_INVALID_COMPARE FE_INVALID_COMPARE + + /* Invalid operation flag for software (not set by hardware). */ + FE_INVALID_SOFTWARE = 1 << 31-21, +#define FE_INVALID_SOFTWARE FE_INVALID_SOFTWARE + + /* Square root of negative number (including -Inf). */ + FE_INVALID_SQRT = 1 << 31-22, +#define FE_INVALID_SQRT FE_INVALID_SQRT + + /* Conversion-to-integer of a NaN or a number too large or too small. */ + FE_INVALID_INTEGER_CONVERSION = 1 << 31-23, +#define FE_INVALID_INTEGER_CONVERSION FE_INVALID_INTEGER_CONVERSION + +#define __FE_ALL_INVALID \ + (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \ + | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \ + | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION) +#endif + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* PowerPC chips support all of the four defined rounding modes. We + use the bit pattern in the FPSCR as the values for the + appropriate macros. */ +enum + { + FE_TONEAREST = 0, +#define FE_TONEAREST FE_TONEAREST + FE_TOWARDSZERO = 1, +#define FE_TOWARDSZERO FE_TOWARDSZERO + FE_UPWARD = 2, +#define FE_UPWARD FE_UPWARD + FE_DOWNWARD = 3, +#define FE_DOWNWARD FE_DOWNWARD + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. We leave it as 'double' + for efficiency reasons (rather than writing it to a 32-bit integer). */ +typedef double fenv_t; + +/* If the default argument is used we use this value. */ +extern const fenv_t __fe_dfl_env; +#define FE_DFL_ENV (&__fe_dfl_env); + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +extern const fenv_t __fe_nomask_env; +# define FE_NOMASK_ENV (&__fe_nomask_env); +#endif + +#endif /* fenvbits.h */ diff --git a/sysdeps/powerpc/fesetenv.c b/sysdeps/powerpc/fesetenv.c new file mode 100644 index 0000000000..136a835d21 --- /dev/null +++ b/sysdeps/powerpc/fesetenv.c @@ -0,0 +1,26 @@ +/* Install given floating-point environment. + 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. */ + +#include <fenv_libc.h> + +void +fesetenv (const fenv_t *envp) +{ + fesetenv_register (*envp); +} diff --git a/sysdeps/powerpc/fesetround.c b/sysdeps/powerpc/fesetround.c new file mode 100644 index 0000000000..0afd6ceaa5 --- /dev/null +++ b/sysdeps/powerpc/fesetround.c @@ -0,0 +1,41 @@ +/* Set current rounding direction. + 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 <fenv_libc.h> + +int +fesetround (int round) +{ + fenv_union_t u; + + if ((unsigned int) round > 3) + return 0; + + /* Get the current state. */ + u.fenv = fegetenv_register (); + + /* Set the relevant bits. */ + u.l[1] = u.l[1] & ~3 | round & 3; + + /* Put the new state in effect. */ + fesetenv_register (u.fenv); + + return 1; +} diff --git a/sysdeps/powerpc/feupdateenv.c b/sysdeps/powerpc/feupdateenv.c new file mode 100644 index 0000000000..b3a3f95ac3 --- /dev/null +++ b/sysdeps/powerpc/feupdateenv.c @@ -0,0 +1,37 @@ +/* Install given floating-point environment and raise exceptions. + 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 <fenv_libc.h> + +void +feupdateenv (const fenv_t *envp) +{ + fenv_union_t old, new; + + /* Save the currently set exceptions. */ + new.fenv = *envp; + old.fenv = fegetenv_register (); + + /* Copy the set exceptions from `old' to `new'. */ + new.l[1] = new.l[1] & 0xE00000FF | old.l[1] & 0x1FFFFF00; + + /* Atomically enable and raise (if appropriate) exceptions set in `new'. */ + fesetenv_register (new.fenv); +} diff --git a/sysdeps/powerpc/ffs.c b/sysdeps/powerpc/ffs.c index d9d7f267af..1e65bea459 100644 --- a/sysdeps/powerpc/ffs.c +++ b/sysdeps/powerpc/ffs.c @@ -18,11 +18,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <bstring.h> - -#undef ffs - -#ifdef __GNUC__ +#include <string.h> int ffs (int x) @@ -32,7 +28,3 @@ ffs (int x) asm ("cntlzw %0,%1" : "=r" (cnt) : "r" (x & -x)); return 32 - cnt; } - -#else -#include <sysdeps/generic/ffs.c> -#endif diff --git a/sysdeps/powerpc/fgetexcptflg.c b/sysdeps/powerpc/fgetexcptflg.c new file mode 100644 index 0000000000..d6bd58dc69 --- /dev/null +++ b/sysdeps/powerpc/fgetexcptflg.c @@ -0,0 +1,33 @@ +/* Store current representation for exceptions. + 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. */ + +#include <fenv_libc.h> + +void +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + fenv_union_t u; + unsigned int flag; + + /* Get the current state. */ + u.fenv = fegetenv_register (); + + /* Return that portion that corresponds to the requested exceptions. */ + *flagp = flag = u.l[1] & FPSCR_STICKY_BITS & FE_to_sticky (excepts); +} diff --git a/sysdeps/powerpc/fpu_control.h b/sysdeps/powerpc/fpu_control.h index b31e0eeefd..d21987ffd8 100644 --- a/sysdeps/powerpc/fpu_control.h +++ b/sysdeps/powerpc/fpu_control.h @@ -34,20 +34,16 @@ #define _FPU_MASK_UM 0x20 /* underflow */ #define _FPU_MASK_XM 0x08 /* inexact */ #define _FPU_MASK_IM 0x80 /* invalid operation */ -#define _FPU_MASK_VXCVI 0x100 /* invalid operation for integer convert */ -#define _FPU_MASK_VXSQRT 0x200 /* invalid operation for square root */ -#define _FPU_MASK_VXSOFT 0x400 /* invalid operation raised by software */ -#define _FPU_RESERVED 0xfffff800 /* These bits are reserved are not changed. */ +#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */ -/* The fdlibm code requires no interrupts for exceptions. Don't - change the rounding mode, it would break long double I/O! */ +/* The fdlibm code requires no interrupts for exceptions. */ #define _FPU_DEFAULT 0x00000000 /* Default value. */ /* IEEE: same as above, but (some) exceptions; we leave the 'inexact' exception off. */ -#define _FPU_IEEE 0x000003f0 +#define _FPU_IEEE 0x000000f0 /* Type of the control word. */ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); @@ -59,7 +55,7 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); tmp[1]; } ) #define _FPU_SETCW(cw) { \ fpu_control_t tmp[2] __attribute__ ((__aligned__(8))); \ - tmp[0] = 0xFFF80000; /* arbitrary, more-or-less */ \ + tmp[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \ tmp[1] = cw; \ __asm__ ("lfd 0,%0; mtfsf 255,0" : : "m" (*tmp) : "fr0"); \ } diff --git a/sysdeps/powerpc/fraiseexcpt.c b/sysdeps/powerpc/fraiseexcpt.c new file mode 100644 index 0000000000..aa8f1fcdc6 --- /dev/null +++ b/sysdeps/powerpc/fraiseexcpt.c @@ -0,0 +1,44 @@ +/* Raise given exceptions. + 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. */ + +#include <fenv_libc.h> + +void +feraiseexcept (int excepts) +{ + fenv_union_t u; + + /* Raise exceptions represented by EXCEPTS. It is the responsibility of + the OS to ensure that if multiple exceptions occur they are fed back + to this process in the proper way; this can happen in hardware, + anyway (in particular, inexact with overflow or underflow). */ + + /* Get the current state. */ + u.fenv = fegetenv_register (); + + /* Add the exceptions */ + u.l[1] = (u.l[1] + | excepts & __FPSCR_STICKY_BITS + /* Turn FE_INVALID into FE_INVALID_SOFTWARE. */ + | excepts << (31 - 21) - (31 - 24) & __FE_INVALID_SOFTWARE); + + /* Store the new status word (along with the rest of the environment), + triggering any appropriate exceptions. */ + fesetenv_register (u.fenv); +} diff --git a/sysdeps/powerpc/fsetexcptflg.c b/sysdeps/powerpc/fsetexcptflg.c new file mode 100644 index 0000000000..4279b74849 --- /dev/null +++ b/sysdeps/powerpc/fsetexcptflg.c @@ -0,0 +1,37 @@ +/* Set floating-point environment exception handling. + 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. */ + +#include <fenv_libc.h> + +void +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fenv_union_t u; + + /* Get the current state. */ + u.fenv = fegetenv_register (); + + /* Replace the exception status */ + u.l[1] = u.l[1] & FPSCR_STICKY_BITS | *flagp & FE_to_sticky (excepts); + + /* Store the new status word (along with the rest of the environment). + This may cause floating-point exceptions if the restored state + requests it. */ + fesetenv_register (u.fenv); +} diff --git a/sysdeps/powerpc/ftestexcept.c b/sysdeps/powerpc/ftestexcept.c new file mode 100644 index 0000000000..52733f7ae7 --- /dev/null +++ b/sysdeps/powerpc/ftestexcept.c @@ -0,0 +1,38 @@ +/* Test exception in current environment. + 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. */ + +#include <fenv_libc.h> + +int +fetestexcept (int excepts) +{ + fenv_union_t u; + int flags; + + /* Get the current state. */ + u.fenv = fegetenv_register (); + + /* Find the bits that indicate exceptions have occurred. */ + flags = u.l[1] & FPSCR_STICKY_BITS; + + /* Set the FE_INVALID bit if any of the FE_INVALID_* bits are set. */ + flags |= ((u.l[1] & FE_ALL_INVALID) != 0) << 31-24; + + return flags & excepts; +} diff --git a/sysdeps/powerpc/mathbits.h b/sysdeps/powerpc/mathbits.h new file mode 100644 index 0000000000..2cecb6fa88 --- /dev/null +++ b/sysdeps/powerpc/mathbits.h @@ -0,0 +1,72 @@ +/* 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 _MATHBITS_H +#define _MATHBITS_H 1 + +/* FIXME! This file describes properties of the compiler, not the machine; + it should not be part of libc! + + FIXME! This file does not deal with the -fshort-double option of + gcc! */ + +#ifdef __GNUC__ +#if __STDC__ == 1 + +/* In GNU or ANSI mode, gcc leaves `float' expressions as-is, I think. */ +typedef float float_t; /* `float' expressions are evaluated as + `float'. */ +typedef double double_t; /* `double' expressions are evaluated as + `double'. */ + +/* Signal that types stay as they were declared. */ +#define FLT_EVAL_METHOD 0 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VALF + +#else + +/* For `gcc -traditional', `float' expressions are evaluated as `double'. */ +typedef double float_t; /* `float' expressions are evaluated as + `double'. */ +typedef double double_t; /* `double' expressions are evaluated as + `double'. */ + +/* Signal that both types are `double'. */ +#define FLT_EVAL_METHOD 1 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VAL + +#endif +#else + +/* Wild guess at types for float_t and double_t. */ +typedef double float_t; +typedef double double_t; + +/* Strange compiler, we don't know how it works. */ +#define FLT_EVAL_METHOD -1 + +/* Define `INFINITY' as value of type `float_t'. */ +#define INFINITY HUGE_VAL + +#endif + +#endif /* mathbits.h */ diff --git a/sysdeps/powerpc/setjmp.S b/sysdeps/powerpc/setjmp.S index 755ef6504c..af10581af0 100644 --- a/sysdeps/powerpc/setjmp.S +++ b/sysdeps/powerpc/setjmp.S @@ -22,46 +22,46 @@ #include <jmp_buf.h> ENTRY (__sigsetjmp) - stw 1,(JB_GPR1*4)(3) - mflr 0 - stw 2,(JB_GPR2*4)(3) - stw 14,((JB_GPRS+0)*4)(3) - stfd 14,((JB_FPRS+0*2)*4)(3) - stw 0,(JB_LR*4)(3) - stw 15,((JB_GPRS+1)*4)(3) - stfd 15,((JB_FPRS+1*2)*4)(3) - stw 16,((JB_GPRS+2)*4)(3) - stfd 16,((JB_FPRS+2*2)*4)(3) - stw 17,((JB_GPRS+3)*4)(3) - stfd 17,((JB_FPRS+3*2)*4)(3) - stw 18,((JB_GPRS+4)*4)(3) - stfd 18,((JB_FPRS+4*2)*4)(3) - stw 19,((JB_GPRS+5)*4)(3) - stfd 19,((JB_FPRS+5*2)*4)(3) - stw 20,((JB_GPRS+6)*4)(3) - stfd 20,((JB_FPRS+6*2)*4)(3) - stw 21,((JB_GPRS+7)*4)(3) - stfd 21,((JB_FPRS+7*2)*4)(3) - stw 22,((JB_GPRS+8)*4)(3) - stfd 22,((JB_FPRS+8*2)*4)(3) - stw 23,((JB_GPRS+9)*4)(3) - stfd 23,((JB_FPRS+9*2)*4)(3) - stw 24,((JB_GPRS+10)*4)(3) - stfd 24,((JB_FPRS+10*2)*4)(3) - stw 25,((JB_GPRS+11)*4)(3) - stfd 25,((JB_FPRS+11*2)*4)(3) - stw 26,((JB_GPRS+12)*4)(3) - stfd 26,((JB_FPRS+12*2)*4)(3) - stw 27,((JB_GPRS+13)*4)(3) - stfd 27,((JB_FPRS+13*2)*4)(3) - stw 28,((JB_GPRS+14)*4)(3) - stfd 28,((JB_FPRS+14*2)*4)(3) - stw 29,((JB_GPRS+15)*4)(3) - stfd 29,((JB_FPRS+15*2)*4)(3) - stw 30,((JB_GPRS+16)*4)(3) - stfd 30,((JB_FPRS+16*2)*4)(3) - stw 31,((JB_GPRS+17)*4)(3) - stfd 31,((JB_FPRS+17*2)*4)(3) + stw %r1,(JB_GPR1*4)(3) + mflr %r0 + stw %r2,(JB_GPR2*4)(3) + stw %r14,((JB_GPRS+0)*4)(3) + stfd %f14,((JB_FPRS+0*2)*4)(3) + stw %r0,(JB_LR*4)(3) + stw %r15,((JB_GPRS+1)*4)(3) + stfd %f15,((JB_FPRS+1*2)*4)(3) + stw %r16,((JB_GPRS+2)*4)(3) + stfd %f16,((JB_FPRS+2*2)*4)(3) + stw %r17,((JB_GPRS+3)*4)(3) + stfd %f17,((JB_FPRS+3*2)*4)(3) + stw %r18,((JB_GPRS+4)*4)(3) + stfd %f18,((JB_FPRS+4*2)*4)(3) + stw %r19,((JB_GPRS+5)*4)(3) + stfd %f19,((JB_FPRS+5*2)*4)(3) + stw %r20,((JB_GPRS+6)*4)(3) + stfd %f20,((JB_FPRS+6*2)*4)(3) + stw %r21,((JB_GPRS+7)*4)(3) + stfd %f21,((JB_FPRS+7*2)*4)(3) + stw %r22,((JB_GPRS+8)*4)(3) + stfd %f22,((JB_FPRS+8*2)*4)(3) + stw %r23,((JB_GPRS+9)*4)(3) + stfd %f23,((JB_FPRS+9*2)*4)(3) + stw %r24,((JB_GPRS+10)*4)(3) + stfd %f24,((JB_FPRS+10*2)*4)(3) + stw %r25,((JB_GPRS+11)*4)(3) + stfd %f25,((JB_FPRS+11*2)*4)(3) + stw %r26,((JB_GPRS+12)*4)(3) + stfd %f26,((JB_FPRS+12*2)*4)(3) + stw %r27,((JB_GPRS+13)*4)(3) + stfd %f27,((JB_FPRS+13*2)*4)(3) + stw %r28,((JB_GPRS+14)*4)(3) + stfd %f28,((JB_FPRS+14*2)*4)(3) + stw %r29,((JB_GPRS+15)*4)(3) + stfd %f29,((JB_FPRS+15*2)*4)(3) + stw %r30,((JB_GPRS+16)*4)(3) + stfd %f30,((JB_FPRS+16*2)*4)(3) + stw %r31,((JB_GPRS+17)*4)(3) + stfd %f31,((JB_FPRS+17*2)*4)(3) #ifdef PIC b __sigjmp_save@plt #else diff --git a/sysdeps/powerpc/strlen.s b/sysdeps/powerpc/strlen.s index eb6a88e2b8..fa1c670912 100644 --- a/sysdeps/powerpc/strlen.s +++ b/sysdeps/powerpc/strlen.s @@ -68,78 +68,78 @@ # them, the others we must save. .section ".text" - .align 3 + .align 2 .globl strlen .type strlen,@function strlen: # On entry, r3 points to the string, and it's left that way. - # We use r6 to store 0x01010101, and r7 to store 0x7f7f7f7f. + # We use r6 to store 0xfefefeff, and r7 to store 0x7f7f7f7f. # r4 is used to keep the current index into the string; r5 holds # the number of padding bits we prepend to the string to make it # start at a word boundary. r8 holds the 'current' word. # r9-12 are temporaries. r0 is used as a temporary and for discarded # results. - clrrwi 4,3,2 - lis 6,0xfeff - lis 7,0x7f7f - rlwinm 10,3,0,29,29 - lwz 8,0(4) - addi 7,7,0x7f7f - rlwinm 5,3,3,27,28 - cmpwi 1,10,0 - li 9,-1 + clrrwi %r4,%r3,2 + lis %r6,0xfeff + lis %r7,0x7f7f + rlwinm %r10,%r3,0,29,29 + lwz %r8,0(%r4) + addi %r7,%r7,0x7f7f + rlwinm %r5,%r3,3,27,28 + cmpwi %cr1,%r10,0 + li %r9,-1 # That's the setup done, now do the first pair of words. # We make an exception and use method (2) on the first two words, to reduce # overhead. - srw 9,9,5 - and 0,7,8 - or 10,7,8 - add 0,0,7 - nor 0,10,0 - and. 8,0,9 - bne done0 + srw %r9,%r9,%r5 + and %r0,%r7,%r8 + or %r10,%r7,%r8 + add %r0,%r0,%r7 + nor %r0,%r10,%r0 + and. %r8,%r0,%r9 + bne done0 # Handle second word of pair. Put addi between branches to avoid hurting # branch prediction. - addi 6,6,0xfffffeff - - bne 1,loop - lwzu 8,4(4) - and 0,7,8 - or 10,7,8 - add 0,0,7 - nor. 0,10,0 - bne done0 + addi %r6,%r6,0xfffffeff + + bne %cr1,loop + lwzu %r8,4(%r4) + and %r0,%r7,%r8 + or %r10,%r7,%r8 + add %r0,%r0,%r7 + nor. %r8,%r10,%r0 + bne done0 # The loop. + +loop: lwz %r8,4(%r4) + lwzu %r9,8(%r4) + add %r0,%r6,%r8 + nor %r10,%r7,%r8 + and. %r0,%r0,%r10 + add %r11,%r6,%r9 + nor %r12,%r7,%r9 + bne done1 + and. %r0,%r11,%r12 + beq loop -loop: lwz 8,4(4) - lwzu 9,8(4) - add 0,6,8 - nor 10,7,8 - and. 0,0,10 - add 11,6,9 - nor 12,7,9 - bne done1 - and. 0,11,12 - beq loop - - and 0,7,9 - or 10,7,9 - b done2 - -done1: addi 4,4,-4 - and 0,7,9 - or 10,7,9 -done2: add 0,0,7 - nor 0,10,0 - + and %r0,%r7,%r9 + add %r0,%r0,%r7 + andc %r8,%r12,%r0 + b done0 + +done1: and %r0,%r7,%r8 + subi %r4,%r4,4 + add %r0,%r0,%r7 + andc %r8,%r10,%r0 + # When we get to here, r4 points to the first word in the string that # contains a zero byte, and the most significant set bit in r8 is in that # byte. -done0: cntlzw 11,8 - subf 0,3,4 - srwi 11,11,3 - add 3,0,11 +done0: cntlzw %r11,%r8 + subf %r0,%r3,%r4 + srwi %r11,%r11,3 + add %r3,%r0,%r11 blr 0: .size strlen,0b-strlen diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c index 44e7a434d2..598c15c01a 100644 --- a/sysdeps/rs6000/ffs.c +++ b/sysdeps/rs6000/ffs.c @@ -19,7 +19,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <ansidecl.h> -#include <bstring.h> +#include <string.h> #undef ffs diff --git a/sysdeps/sparc/setjmp.S b/sysdeps/sparc/setjmp.S index 9e93668d96..84c63542cc 100644 --- a/sysdeps/sparc/setjmp.S +++ b/sysdeps/sparc/setjmp.S @@ -25,6 +25,7 @@ ENTRY (__sigsetjmp) /* Save our SP and FP; in the delay slot of the jump, save our return PC. Save the signal mask if requested with a tail-call for simplicity; it always returns zero. */ + ta ST_FLUSH_WINDOWS #ifdef PIC mov %o7,%g1 2: diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h new file mode 100644 index 0000000000..0b635e649d --- /dev/null +++ b/sysdeps/standalone/arm/errnos.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1991, 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 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. */ + +/* This file defines the `errno' constants for standalone ARM machines. + These constants are essentially arbitrary. */ + +#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath)) +#undef __need_Emath +#define __Emath_defined 1 + +#define EDOM 1 +#define ERANGE 2 +#endif + +#ifdef _ERRNO_H +#define ENOSYS 3 +#define EINVAL 4 +#define ESPIPE 5 +#define EBADF 6 +#define ENOMEM 7 +#define EACCES 8 +#define ENFILE 9 +#define EMFILE 10 +#define ENAMETOOLONG 11 /* File name too long */ +#define ELOOP 12 /* Too many symbolic links encountered */ +#define ENOMSG 13 /* No message of desired type */ +#define E2BIG 14 /* Arg list too long */ +#define EINTR 15 +#define EILSEQ 16 +#define ENOEXEC 17 +#define ENOENT 18 +#endif + +#define __set_errno(val) errno = (val) diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h index 20c4922fb9..064513222e 100644 --- a/sysdeps/standalone/dirstream.h +++ b/sysdeps/standalone/dirstream.h @@ -28,7 +28,7 @@ Cambridge, MA 02139, USA. */ The miscellaneous Unix `readdir' implementations read directory data into a buffer and fill in a `struct dirent' copy in the `DIR' object. */ -typedef struct +struct __dirstream { int __fd; /* File descriptor. */ @@ -38,6 +38,6 @@ typedef struct size_t __size; /* Total valid data in the block. */ struct dirent __entry; /* Returned by `readdir'. */ - } DIR; + }; #endif /* dirstream.h */ diff --git a/sysdeps/stub/direntry.h b/sysdeps/stub/direntry.h index f84425b5a4..4b22f31bd6 100644 --- a/sysdeps/stub/direntry.h +++ b/sysdeps/stub/direntry.h @@ -20,4 +20,4 @@ struct dirent { char d_name[1]; /* Variable length. */ - } + }; diff --git a/sysdeps/stub/dirfd.c b/sysdeps/stub/dirfd.c index ce40a28013..767bc215f8 100644 --- a/sysdeps/stub/dirfd.c +++ b/sysdeps/stub/dirfd.c @@ -23,7 +23,7 @@ int dirfd (dirp) - FILE *dirp; + DIR *dirp; { __set_errno (ENOSYS); return -1; diff --git a/sysdeps/stub/if_index.c b/sysdeps/stub/if_index.c new file mode 100644 index 0000000000..f1cb0c5b0e --- /dev/null +++ b/sysdeps/stub/if_index.c @@ -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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +unsigned int if_nametoindex(const char *ifname) +{ + return 0; +} + +char *if_indextoname(unsigned int ifindex, char *ifname) +{ + return NULL; +} + +void if_freenameindex(struct if_nameindex *ifn) +{ +} + +struct if_nameindex *if_nameindex(void) +{ + return NULL; +} diff --git a/sysdeps/stub/seekdir.c b/sysdeps/stub/seekdir.c index fe40c8b51d..514b59d2b8 100644 --- a/sysdeps/stub/seekdir.c +++ b/sysdeps/stub/seekdir.c @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ /* Seek to position POS in DIRP. */ void seekdir (dirp, pos) - DIR *dirp + DIR *dirp; off_t pos; { if (dirp == NULL) diff --git a/sysdeps/stub/setitimer.c b/sysdeps/stub/setitimer.c index 737257fa7f..21af5173c9 100644 --- a/sysdeps/stub/setitimer.c +++ b/sysdeps/stub/setitimer.c @@ -1,20 +1,20 @@ -/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 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 <stddef.h> #include <errno.h> @@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */ int __setitimer (which, new, old) enum __itimer_which which; - struct itimerval *new; + const struct itimerval *new; struct itimerval *old; { if (new == NULL) diff --git a/sysdeps/stub/sigaction.c b/sysdeps/stub/sigaction.c index 1344d45044..523daec8ad 100644 --- a/sysdeps/stub/sigaction.c +++ b/sysdeps/stub/sigaction.c @@ -26,7 +26,7 @@ int __sigaction (sig, act, oact) int sig; const struct sigaction *act; - struct sigaction *OACT; + struct sigaction *oact; { if (sig <= 0 || sig >= NSIG) { diff --git a/sysdeps/stub/sys/param.h b/sysdeps/stub/sys/param.h index 8a3e73b406..b1ea52add9 100644 --- a/sysdeps/stub/sys/param.h +++ b/sysdeps/stub/sys/param.h @@ -6,3 +6,5 @@ the installed headers on the system. */ #include <limits.h> + +#define MAXSYMLINKS 1 diff --git a/sysdeps/stub/sysconf.c b/sysdeps/stub/sysconf.c index 00480fb2e9..3d3c0e9759 100644 --- a/sysdeps/stub/sysconf.c +++ b/sysdeps/stub/sysconf.c @@ -164,10 +164,10 @@ __sysconf (name) case _SC_SEMAPHORES: case _SC_SHARED_MEMORY_OBJECTS: - case _SC_AIO_LIST_MAX: + case _SC_AIO_LISTIO_MAX: case _SC_AIO_MAX: case _SC_AIO_PRIO_DELTA_MAX: - case _SC_DELAYTIME_MAX: + case _SC_DELAYTIMER_MAX: case _SC_MQ_OPEN_MAX: case _SC_MQ_PRIO_MAX: case _SC_VERSION: diff --git a/sysdeps/stub/tempname.c b/sysdeps/stub/tempname.c index 984d4becd3..b93b948ca6 100644 --- a/sysdeps/stub/tempname.c +++ b/sysdeps/stub/tempname.c @@ -26,7 +26,7 @@ Return the generated filename or NULL if one could not be generated, putting the length of the string in *LENPTR. */ char * -__stdio_gen_tempname (buf, bufsize, dir, pfx, dir_search, lenptr) +__stdio_gen_tempname (buf, bufsize, dir, pfx, dir_search, lenptr, streamptr) char *buf; size_t bufsize; const char *dir; diff --git a/sysdeps/stub/vdprintf.c b/sysdeps/stub/vdprintf.c index f7ae121097..88c855eb11 100644 --- a/sysdeps/stub/vdprintf.c +++ b/sysdeps/stub/vdprintf.c @@ -18,6 +18,7 @@ Cambridge, MA 02139, USA. */ #include <errno.h> #include <stdio.h> +#include <stdarg.h> /* Write formatted output to file descriptor D according to the format string FORMAT, using the argument list in ARG. */ @@ -25,38 +26,7 @@ int vdprintf (int d, const char *format, va_list arg) { __set_errno (ENOSYS); - return NULL; -} - -stub_warning (vdprintf) -/* 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., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include <errno.h> -#include <stdio.h> - -/* Write formatted output to file descriptor D according to the format string - FORMAT, using the argument list in ARG. */ -int -vdprintf (int d, const char *format, va_list arg) -{ - __set_errno (ENOSYS); - return NULL; + return 0; } stub_warning (vdprintf) diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S new file mode 100644 index 0000000000..baa33e31b7 --- /dev/null +++ b/sysdeps/unix/arm/fork.S @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1992, 1994, 1995, 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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +/* ARM version. */ + +SYSCALL__ (fork, 0) + /* R1 is now 0 for the parent and 1 for the child. Decrement it to + make it -1 (all bits set) for the parent, and 0 (no bits set) + for the child. Then AND it with R0, so the parent gets + R0&-1==R0, and the child gets R0&0==0. */ + sub r1, r1, $1 + and r0, r0, r1 + RETINSTR(mov, pc, r14) +PSEUDO_END(fork) + +weak_alias (__fork, fork) diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h index 18e812b9f1..1c580731ba 100644 --- a/sysdeps/unix/arm/sysdep.h +++ b/sysdeps/unix/arm/sysdep.h @@ -19,3 +19,8 @@ Cambridge, MA 02139, USA. */ #include <sysdeps/unix/sysdep.h> #include <sysdeps/arm/sysdep.h> +/* Some definitions to allow the assembler in sysdeps/unix/*.S to build + without needing ARM-specific versions of all the files. */ + +#define ret RETINSTR(mov, pc, r14) +#define MOVE(a,b) mov b,a diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S new file mode 100644 index 0000000000..c7e7aed9c8 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -0,0 +1,33 @@ +/* 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. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include <sysdep.h> +#define _ERRNO_H 1 +#include <errnos.h> + +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ + + .text +ENTRY(__clone) + /* Somebody needs to write this. */ +PSEUDO_END (__clone) + +weak_alias (__clone, clone) diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S new file mode 100644 index 0000000000..e8db072971 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/socket.S @@ -0,0 +1,49 @@ +/* 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 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 <sysdep.h> +#include <sys/socketcall.h> + +#define P(a, b) P2(a, b) +#define P2(a, b) a##b + + .text +/* The socket-oriented system calls are handled unusally in Linux. + They are all gated through the single `socketcall' system call number. + `socketcall' takes two arguments: the first is the subcode, specifying + which socket function is being called; and the second is a pointer to + the arguments to the specific function. + + The .S files for the other calls just #define socket and #include this. */ + +.globl P(__,socket) +ENTRY (P(__,socket)) + + /* Do the system call trap. */ + swi SYS_ify(socketcall) + + /* %eax is < 0 if there was an error. */ + cmn r0, $124 + bge syscall_error + + /* Successful; return the syscall's value. */ + RETINSTR(mov,pc,r14) + +PSEUDO_END (P(__,socket)) + +weak_alias (P(__,socket), socket) diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S new file mode 100644 index 0000000000..7a87278303 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/syscall.S @@ -0,0 +1,47 @@ +/* Copyright (C) 1995, 1996 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 <sysdep.h> + +/* Please consult the file sysdeps/unix/sysv/linux/arm/sysdep.h for + more information about the value -4095 used below.*/ + + .text +ENTRY (syscall) + + /* Normally encoding the system call number in the instruction is + good. But we pay the price here. */ + + sub sp, sp, $0xc @ get 3 words on the stack + orr r0, r0, $0xef000000 @ make up a SWI instruction + orr r0, r0, $SWI_BASE + str r0, [sp] + ldr r0, _reti + str r0, [sp, $4] + adr r0, _ret + str r0, [sp, $8] + mov r0, r1 + mov r1, r2 + mov r2, r3 + mov pc, sp +_ret: add sp, sp, $0xc + RETINSTR(mov, pc, r14) + +_reti: .word 0xe51ff004 @ ldr pc, [pc, $4] + +PSEUDO_END (syscall) diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h new file mode 100644 index 0000000000..6478a5d182 --- /dev/null +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995. +ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _LINUX_ARM_SYSDEP_H +#define _LINUX_ARM_SYSDEP_H 1 + +/* There is some commonality. */ +#include <sysdeps/unix/arm/sysdep.h> + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#define SWI_BASE (9 << 20) +#define SYS_ify(syscall_name) (SWI_BASE + __NR_##syscall_name) + + +#ifdef ASSEMBLER + +/* Linux uses a negative return value to indicate syscall errors, + unlike most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be + negative even if the call succeeded. E.g., the `lseek' system call + might return a large offset. Therefore we must not anymore test + for < 0, but test for a real error by making sure the value in %eax + is a real error number. Linus said he will make sure the no syscall + returns a value in -1 .. -4095 as a valid result so we can savely + test with -4095. */ +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (args, syscall_name); \ + cmn r0, $4096; \ + bge syscall_error; + +#undef PSEUDO_END +#define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER \ + END (name) + +#ifndef PIC +#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +#else +#error Aiee +#endif /* PIC */ + +#undef DO_CALL +#define DO_CALL(args, syscall_name) \ + swi SYS_ify (syscall_name); + +#endif /* ASSEMBLER */ + +#endif /* linux/arm/sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c new file mode 100644 index 0000000000..3f5a890a9c --- /dev/null +++ b/sysdeps/unix/sysv/linux/if_index.c @@ -0,0 +1,140 @@ +/* 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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <net/if.h> + +#define IF_INET6_FILENAME "/proc/net/if_inet6" + +/* /proc/net/if_inet6 contains lines that look like this: + * + * fe8000000000000000000000836fc168 0b 00 20 80 sit7 + * + * | | | | | | + * address --' | | | | | + * index --------' | | | | + * prefix length ---' | | | + * scope --------------' | | + * flags -----------------' | + * name -------------------------' + * + */ + +static int get_one_interface(FILE *fd, char *interface, int iflen, unsigned int *index) +{ + char buffer[80]; + static char seps[] = " \012"; + char *c = buffer; + char *sp; + if (!fgets(buffer, 80, fd)) + return 1; + if (strtok_r(buffer, seps, &sp) == NULL) return 1; + if (c = strtok_r(NULL, seps, &sp), c == NULL) return 1; + *index = strtoul(c, NULL, 16); + if (strtok_r(NULL, seps, &sp) == NULL) return 1; + if (strtok_r(NULL, seps, &sp) == NULL) return 1; + if (strtok_r(NULL, seps, &sp) == NULL) return 1; + if (c = strtok_r(NULL, seps, &sp), c == NULL) return 1; + strncpy(interface, c, iflen); + return 0; +} + +unsigned int if_nametoindex(const char *ifname) +{ + FILE *fd = fopen(IF_INET6_FILENAME, "r"); + char this_ifname[IFNAMSIZ]; + unsigned int this_index; + if (!fd) return 0; + while (get_one_interface(fd, this_ifname, IFNAMSIZ, &this_index) == 0) { + if (!strcmp(this_ifname, ifname)) { + fclose(fd); + return this_index; + } + } + fclose(fd); + return 0; +} + +char *if_indextoname(unsigned int ifindex, char *ifname) +{ + FILE *fd = fopen(IF_INET6_FILENAME, "r"); + unsigned int this_index; + if (!fd) return NULL; + while (get_one_interface(fd, ifname, IFNAMSIZ, &this_index) == 0) { + if (this_index == ifindex) { + fclose(fd); + return ifname; + } + } + fclose(fd); + return NULL; +} + +void if_freenameindex(struct if_nameindex *ifn) +{ + struct if_nameindex *ptr = ifn; + while (ptr->if_name || ptr->if_index) + { + if (ptr->if_name) + free(ptr->if_name); + ptr++; + } + free(ifn); +} + +struct if_nameindex *if_nameindex(void) +{ + FILE *fd = fopen(IF_INET6_FILENAME, "r"); + struct if_nameindex *ifn = NULL; + int nifs = 0; + if (!fd) return NULL; + do + { + struct if_nameindex *newifn; + nifs++; + newifn = realloc(ifn, nifs*sizeof(struct if_nameindex)); + if (!newifn) + { + /* We ran out of memory. */ + if (--nifs) + { + free(ifn[nifs-1].if_name); + ifn[nifs-1].if_name = 0; + ifn[nifs-1].if_index = 0; + if_freenameindex(ifn); + } + return NULL; + } + ifn = newifn; + ifn[nifs-1].if_index = 0; + ifn[nifs-1].if_name = malloc(IFNAMSIZ); + if (ifn[nifs-1].if_name == NULL) + { + if_freenameindex(ifn); + return NULL; + } + } + while (get_one_interface(fd, ifn[nifs-1].if_name, IFNAMSIZ, + &ifn[nifs-1].if_index) == 0); + free(ifn[nifs-1].if_name); + ifn[nifs-1].if_name = NULL; + fclose(fd); + return ifn; +} diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list index 9a3e4d0e58..473c2ec5b2 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscalls.list +++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list @@ -1,5 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names +cacheflush EXTRA cacheflush 4 __cacheflush cacheflush + s_getgroups getgroups getgroups 2 __syscall_getgroups s_llseek llseek _llseek 5 __sys_llseek s_setgroups setgroups setgroups 2 __syscall_setgroups diff --git a/sysdeps/unix/sysv/linux/net/if.h b/sysdeps/unix/sysv/linux/net/if.h index db86d20f23..01e9f00943 100644 --- a/sysdeps/unix/sysv/linux/net/if.h +++ b/sysdeps/unix/sysv/linux/net/if.h @@ -144,4 +144,23 @@ struct ifconf #define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address. */ #define ifc_req ifc_ifcu.ifcu_req /* Array of structures. */ + +/* Convert an interface name to an index, and vice versa. */ + +unsigned int if_nametoindex(const char *ifname); +char *if_indextoname(unsigned int ifindex, char *ifname); + +/* Return a list of all interfaces and their indices. */ + +struct if_nameindex { + unsigned int if_index; /* 1, 2, ... */ + char *if_name; /* null terminated name: "eth0", ... */ +}; + +struct if_nameindex *if_nameindex(void); + +/* Free the data returned from if_nameindex. */ + +void if_freenameindex(struct if_nameindex *ptr); + #endif /* net/if.h */ diff --git a/sysdeps/unix/sysv/linux/netinet/in.h b/sysdeps/unix/sysv/linux/netinet/in.h index bbc625435c..451f8f5a20 100644 --- a/sysdeps/unix/sysv/linux/netinet/in.h +++ b/sysdeps/unix/sysv/linux/netinet/in.h @@ -259,7 +259,7 @@ extern u_int16_t htons __P ((u_int16_t __hostshort)); /* IPV6 socket options. */ #define IPV6_ADDRFORM 1 -#define IPV6_RXINFO 2 +#define IPV6_PKTINFO 2 #define IPV6_RXHOPOPTS 3 #define IPV6_RXDSTOPTS 4 #define IPV6_RXSRCRT 5 @@ -267,8 +267,6 @@ extern u_int16_t htons __P ((u_int16_t __hostshort)); #define IPV6_CHECKSUM 7 #define IPV6_HOPLIMIT 8 -#define IPV6_TXINFO IPV6_RXINFO -#define SCM_SRCINFO IPV6_TXINFO #define SCM_SRCRT IPV6_RXSRCRT #define IPV6_UNICAST_HOPS 16 @@ -306,6 +304,14 @@ extern u_int16_t htons __P ((u_int16_t __hostshort)); /* Bind socket to a priviledged IP port. */ extern int bindresvport __P ((int __sockfd, struct sockaddr_in *__sin)); + +/* IPv6 packet information. */ +struct in6_pktinfo + { + struct in6_addr ipi6_addr; /* src/dst IPv6 address */ + int ipi6_ifindex; /* send/recv interface index */ + }; + __END_DECLS #endif /* netinet/in.h */ diff --git a/sysdeps/unix/sysv/linux/powerpc/clone.S b/sysdeps/unix/sysv/linux/powerpc/clone.S index d255abfe0f..068b14c538 100644 --- a/sysdeps/unix/sysv/linux/powerpc/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/clone.S @@ -29,45 +29,45 @@ ENTRY(__clone) /* Set up stack frame, save registers. */ - stwu 1,-32(1) - stw 31,16(1) - stw 30,20(1) + stwu %r1,-32(%r1) + stw %r31,16(%r1) + stw %r30,20(%r1) /* Check for child_stack == NULL || fn == NULL. */ - cmpwi 0,4,0 - cmpwi 1,3,0 - cror 2+0*4,2+0*4,2+1*4 - beq- 0,badargs + cmpwi %cr0,%r4,0 + beq- %cr0,badargs + cmpwi %cr1,%r3,0 + beq- %cr1,badargs /* Set up stack frame for child. */ - addi 4,4,-16 - clrrwi 4,4,4 - li 0,0 - stw 0,0(4) + addi %r4,%r4,-16 + clrrwi %r4,%r4,4 + li %r0,0 + stw %r0,0(%r4) /* Save new stack, fn, args across syscall. */ - mr 30,3 /* Function in r30. */ - mr 31,6 /* Arguments in r31. */ + mr %r30,%r3 /* Function in r30. */ + mr %r31,%r6 /* Arguments in r31. */ /* 'flags' argument is first parameter to clone syscall. (The other argument is the stack pointer, already in r4.) */ - mr 3,5 + mr %r3,%r5 /* Do the call. */ DO_CALL(SYS_ify(clone)) - bso- error - beq child + bso- error + beq child /* Parent. Restore registers & return. */ - lwz 31,16(1) - lwz 30,20(1) - addi 1,1,32 + lwz %r31,16(%r1) + lwz %r30,20(%r1) + addi %r1,%r1,32 blr child: /* Call procedure. */ - mtlr 30 - mr 3,31 + mtlr %r30 + mr %r3,%r31 blrl /* Call _exit with result from procedure. */ #ifdef PIC diff --git a/sysdeps/unix/sysv/linux/powerpc/socket.S b/sysdeps/unix/sysv/linux/powerpc/socket.S index 12417faac6..305aba9281 100644 --- a/sysdeps/unix/sysv/linux/powerpc/socket.S +++ b/sysdeps/unix/sysv/linux/powerpc/socket.S @@ -43,38 +43,38 @@ .text ENTRY(P(__,socket)) - stwu 1,-48(1) + stwu %r1,-48(%r1) #if NARGS >= 1 - stw 3,stackblock(1) + stw %r3,stackblock(%r1) #endif #if NARGS >= 2 - stw 4,4+stackblock(1) + stw %r4,4+stackblock(%r1) #endif #if NARGS >= 3 - stw 5,8+stackblock(1) + stw %r5,8+stackblock(%r1) #endif #if NARGS >= 4 - stw 6,12+stackblock(1) + stw %r6,12+stackblock(%r1) #endif #if NARGS >= 5 - stw 7,16+stackblock(1) + stw %r7,16+stackblock(%r1) #endif #if NARGS >= 6 - stw 8,20+stackblock(1) + stw %r8,20+stackblock(%r1) #endif #if NARGS >= 7 - stw 9,24+stackblock(1) + stw %r9,24+stackblock(%r1) #endif #if NARGS >= 8 - stw 10,28+stackblock(1) + stw %r10,28+stackblock(%r1) #endif #if NARGS >= 9 #error too many arguments! #endif - li 3,P(SOCKOP_,socket) - addi 4,1,stackblock + li %r3,P(SOCKOP_,socket) + addi %r4,%r1,stackblock DO_CALL(SYS_ify(socketcall)) - addi 1,1,48 + addi %r1,%r1,48 bnslr #ifdef PIC b __syscall_error@plt diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S index 441dd5d433..2cb548245b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S @@ -20,12 +20,12 @@ .text ENTRY (syscall) - mr 0,3 - mr 3,4 - mr 4,5 - mr 5,6 - mr 6,7 - mr 7,8 + mr %r0,%r3 + mr %r3,%r4 + mr %r4,%r5 + mr %r5,%r6 + mr %r6,%r7 + mr %r7,%r8 sc bnslr #ifdef PIC diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/sysdep.h index 6cad9ae087..577809acb8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.h @@ -50,7 +50,7 @@ b __syscall_error@plt #else #define PSEUDO(name, syscall_name, args) \ - .text; \ + .section ".text"; \ ENTRY (name) \ DO_CALL (SYS_ify (syscall_name)); \ bnslr; \ diff --git a/sysdeps/unix/sysv/linux/shmdt.c b/sysdeps/unix/sysv/linux/shmdt.c index dcda701e45..70526e6ae0 100644 --- a/sysdeps/unix/sysv/linux/shmdt.c +++ b/sysdeps/unix/sysv/linux/shmdt.c @@ -26,5 +26,5 @@ int shmdt (shmaddr) const void *shmaddr; { - return __ipc (IPCOP_shmdt, 0, 0, 0, shmaddr); + return __ipc (IPCOP_shmdt, 0, 0, 0, (void *) shmaddr); } diff --git a/sysdeps/unix/sysv/linux/statfsbuf.h b/sysdeps/unix/sysv/linux/statfsbuf.h index 1d1bbdae0d..7e1aa55334 100644 --- a/sysdeps/unix/sysv/linux/statfsbuf.h +++ b/sysdeps/unix/sysv/linux/statfsbuf.h @@ -19,6 +19,8 @@ #ifndef _STATFSBUF_H #define _STATFSBUF_H +#include <gnu/types.h> /* for __fsid_t */ + struct statfs { int f_type; diff --git a/time/europe b/time/europe index 23f45ada8d..6611520e98 100644 --- a/time/europe +++ b/time/europe @@ -1,4 +1,4 @@ -# @(#)europe 7.43 +# @(#)europe 7.44 # 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 @@ -1037,7 +1037,7 @@ Zone Europe/Sarajevo 1:13:40 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s 1:00 1:00 CEST 1945 Sep 16 2:00s - 1:00 - CET 1983 + 1:00 - CET 1982 Oct 11 1:00 EU CE%sT # Bulgaria @@ -1063,7 +1063,7 @@ Zone Europe/Zagreb 1:03:52 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s 1:00 1:00 CEST 1945 Sep 16 2:00s - 1:00 - CET 1983 + 1:00 - CET 1982 Oct 11 1:00 EU CE%sT # Czech Republic @@ -1562,7 +1562,7 @@ Zone Europe/Skopje 1:25:44 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s 1:00 1:00 CEST 1945 Sep 16 2:00s - 1:00 - CET 1983 + 1:00 - CET 1982 Oct 11 1:00 EU CE%sT # Malta @@ -1958,7 +1958,7 @@ Zone Europe/Ljubljana 0:58:04 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s 1:00 1:00 CEST 1945 Sep 16 2:00s - 1:00 - CET 1983 + 1:00 - CET 1982 Oct 11 1:00 EU CE%sT # Spain @@ -2198,7 +2198,10 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884 1:00 - CET 1941 Apr 18 23:00 1:00 C-Eur CE%sT 1945 May 8 2:00s 1:00 1:00 CEST 1945 Sep 16 2:00s - 1:00 - CET 1983 +# Metod Kozelj <metod.kozelj@rzs-hm.si> reports that the legal date of +# transition to EU rules was 1982-10-11, for all of Yugoslavia at the time. +# Shanks doesn't give as much detail, so go with Kozelj. + 1:00 - CET 1982 Oct 11 1:00 EU CE%sT ############################################################################### diff --git a/time/sys/time.h b/time/sys/time.h index c4745f1546..0204050d22 100644 --- a/time/sys/time.h +++ b/time/sys/time.h @@ -112,10 +112,10 @@ extern int getitimer __P ((enum __itimer_which __which, set *OLD to the old value of timer WHICH. Returns 0 on success, -1 on errors. */ extern int __setitimer __P ((enum __itimer_which __which, - struct itimerval *__new, + __const struct itimerval *__new, struct itimerval *__old)); extern int setitimer __P ((enum __itimer_which __which, - struct itimerval *__new, + __const struct itimerval *__new, struct itimerval *__old)); /* Change the access time of FILE to TVP[0] and diff --git a/time/zic.c b/time/zic.c index b9518c4649..c95887c9b4 100644 --- a/time/zic.c +++ b/time/zic.c @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)zic.c 7.83"; +static char elsieid[] = "@(#)zic.c 7.87"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -141,8 +141,10 @@ static int leapcnt; static int linenum; static time_t max_time; static int max_year; +static int max_year_representable; static time_t min_time; static int min_year; +static int min_year_representable; static int noise; static const char * rfilename; static int rlinenum; @@ -430,7 +432,7 @@ const char * const string; cp = ecpyalloc("warning: "); cp = ecatalloc(cp, string); - error(string); + error(cp); ifree(cp); --errors; } @@ -649,6 +651,8 @@ setboundaries P((void)) } min_year = TM_YEAR_BASE + gmtime(&min_time)->tm_year; max_year = TM_YEAR_BASE + gmtime(&max_time)->tm_year; + min_year_representable = min_year; + max_year_representable = max_year; } static int @@ -1218,6 +1222,7 @@ const char * const timep; rp->r_todisstd = FALSE; rp->r_todisgmt = FALSE; *ep = '\0'; + break; case 'g': /* Greenwich */ case 'u': /* Universal */ case 'z': /* Zulu */ @@ -1249,7 +1254,11 @@ const char * const timep; } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) { error(_("invalid starting year")); return; - } + } else if (noise) + if (rp->r_loyear < min_year_representable) + warning(_("starting year too low to be represented")); + else if (rp->r_loyear > max_year_representable) + warning(_("starting year too high to be represented")); cp = hiyearp; if ((lp = byword(cp, end_years)) != NULL) switch ((int) lp->l_value) { case YR_MINIMUM: @@ -1269,7 +1278,11 @@ const char * const timep; } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) { error(_("invalid ending year")); return; - } + } else if (noise) + if (rp->r_loyear < min_year_representable) + warning(_("starting year too low to be represented")); + else if (rp->r_loyear > max_year_representable) + warning(_("starting year too high to be represented")); if (rp->r_loyear > rp->r_hiyear) { error(_("starting year greater than ending year")); return; |