This file contains unidiffs between from version 1.06 to version of the GNU C library. You will need GNU patch to apply these diffs; you must use `patch -E' to ensure that no empty files are left behind. diff -ruN glibc-1.06/ChangeLog glibc-1.07/ChangeLog --- glibc-1.06/ChangeLog Sun May 23 00:55:50 1993 +++ glibc-1.07/ChangeLog Mon Jan 17 22:55:43 1994 @@ -1,3 +1,1490 @@ +Mon Jan 17 17:31:28 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.07 released. + + * Makerules (install-lib rules): Fix typos: missing / after $(libdir). + + * posix/Makefile (lib): Depend on $(objpfx)libposix.a + * malloc/Makefile (lib): Depend on $(objpfx)libmcheck.a. + * math/Makefile (lib): Depend on $(objpfx)libm.a. + * misc/Makefile (lib): Depend on $(objpfx)libbsd-compat.a. + + * sysdeps/unix/sysv/sco3.2.4/__setpgid.c: New file. + + * stdio/internals.c (flushbuf): Don't try aligned-block writing + calculation when FP->__buffer is nil. + +Mon Jan 17 17:27:56 1994 Jim Meyering (meyering@comco.com) + + * sysdeps/generic/memcmp.c [!_LIBC]: Include for + definition of size_t. + +Mon Jan 17 17:13:11 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/sysv/sco3.2.4/syscall.h: Add SYS_[gs]etitimer and + SYS_pgrpsys (from scottb). + + * sysdeps/unix/configure: Check for getitimer and setitimer syscalls. + + * sysdeps/unix/bsd/sequent/i386/syscall.S: New file from jason. + +Sun Jan 16 00:41:03 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * string/strerror.c (strerror): Declare BUF to be array of char. + + * Version 1.06.13. + +Sat Jan 15 17:27:26 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * stdlib/testsort.c (main): Rewrite not to read any input; instead + generate some random alphabetic strings. + + * stdlib/Makefile (testsort.input): Rules removed. + + * sysdeps/unix/sysv/i386/__sigret.S: New file. + + * stdio/Makefile (distribute): Add mpn-copy.mk. + Remove 68k rules; include mpn-copy.mk for dir names needing + translation, and rewrite no-68k rules to be generic for the rest. + (mpn-copy-sysdep): New variable. + (mpn-stuff): Include $(mpn-copy-sysdep). + (clean-mpn): Use rm -f. + + * configure.in (machine): Match m68... and m88..., not mc[68]8.... + + * stdio/printf_fp.c: For length arg to __mpn_extract_double, pass + actual number of limbs allocated for F, not LDBL_MANT_DIG. + +Fri Jan 14 19:09:29 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/i386/sysdep.S: Fixed typo: `movl', not `move'. + + * sysdeps/unix/sysv/sco3.2.4/__sysconf.S: Swap args in cmpl insn. + +Thu Jan 13 17:09:19 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.12. + + * sysdeps/mips/sqrt.c: File removed. Ian says only the r[46]00 + have `sqrt.d' and GCC open codes it anyway. Perhaps someday + Brendan will be able to explain his rationale for writing this. :( + +Tue Jan 11 18:10:17 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/sys/wait.h (__WAIT_STATUS, __WAIT_STATUS_DEFN): Use snazzy + version only for GCC >= 2.6 (was 2.4); 2.5.7 produces bad code on + sparc when the union arg type is used. + + * Makeconfig (libprefix): New variable. + * Makerules ($(libdir)/libc.a, install): Insert $(libprefix) + between `lib' and `c' in the file name. + [install-lib] (install-lib.a, install-lib-non.a): New variables + separate out $(install-lib) elts which do or don't match lib%.a. + ($(libdir)/...): Split into two rules for above two cases. Put + $(libprefix) on installed files; for lib%.a insert it before % + rather than at beginning of file name. + + * Version 1.06.11. + + * Makerules (compilation rules): Move directoryless rules (for + finding sources in .) before include sysd-rules. Omit rules to + compile from sources in $(objpfx) if not using $(objdir). + + * sysdeps/stub/errlist.c [! HAVE_GNU_LD]: #define _sys_errlist to + sys_errlist and _sys_nerr to sys_nerr. + +Mon Jan 10 15:01:32 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * time/Makefile (z.%): In generated rules, depend on yearistype. + (tzcompile): Pass -y flag with file name of yearistype. + +Sun Jan 9 17:51:43 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * misc/bsd-compat.c (longjmp): Use __NORETURN in type. + + * sysdeps/ieee754/dbl2mpn.c [N == 2]: For denormal, when + RES_PTR[1] is zero, return 1 instead of 2. + +Sun Jan 9 13:10:25 1994 Torbjorn Granlund (tege@adder.cygnus.com) + + * stdio/printf_fp.c: Solve 10+ problems. + * ieee754/dbl2mpn.c: Correctly detect denorms. Get the denom + exponent right. + +Sun Jan 9 00:40:48 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/ieee754/dbl2mpn.c: Test BITS_PER_MP_LIMB and handle + either 32 or 64; #error if not one of those. + + * sysdeps/stub/udiv_qrnnd.c: Renamed from udiv_qrnnd.S. + +Sat Jan 8 00:25:15 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.10. + + * Makerules ($(libdir)/libc.a): Depend on subdir_install. + +Thu Jan 6 02:17:07 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makerules ($(bindir)/$(install)): Use $(INSTALL_PROGRAM), not + $(INSTALL). + ($(libdir)/libc.a): Don't depend on lib-noranlib; on libobjs and + ar-it instead. Run ranlib on target after installing. + (installdirs): Target removed; deps on it removed. + (install-{bin,lib,data,headers,others,no-libc.a}): Renamed to + `install-*-nosubdir'. + (install-%): New pattern rule. + (install): Depend only on install-no-libc.a-nosubdir. + * Rules (subdir_install): Depend on lib-noranlib and stubs. + * Makefile (headers): Remove stubs.h. + (install-others): Define to include $(includedir)/stubs.h. + ($(includedir)/stubs.h): New target for $(objpfx)stubs.h rule. + Depend only on subdir_install, and install directly. + + * Makerules (sed-remove-objpfx): Require SPC before $(objpfx) to match. + + * time/zic.c (mkdirs): Duplicate passed string in allocated memory + and free it when done. + + * dirent/dirent.h [__USE_BSD || __USE_MISC]: Get size_t from stddef.h. + + * sysdeps/ieee754/dbl2mpn.c: For zero value, return 1 limb not 0. + + * Makerules (make-dummy-dep): Use filter-out to invert sense of + wildcard match, so we produce a command if $@ does *not* exist.c + + * stdio/Makefile (routines): Add dbl2mpn. + +Wed Jan 5 17:52:43 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/i386/sysdep.S (syscall_error): Reverse args in + `cmpl' insn; non-GNU assembler is feeble-minded. + +Mon Jan 3 18:53:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * configure.in (sysnames): Remove / before $mach; it is prepended + already by the loop constructing $mach from $machine. + +Tue Dec 28 07:38:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * stdio/Makefile [gmp-srcdir] (clean-mpn): New target. + + * configure.in (machine): Turn i[34]86 into i386/&, sparc* into + sparc/&, m68k into m68k/mc68020, mc680?0 into m68k/&, mips or + r2000 into mips/r3000, r[34]000 into mips/&. + (mach): New variable; processed from $machine as $base from $base_os. + Use that in place of $machine in loop finding sysdep directories. + + * stdio/Makefile (aux): Add mp_clz_tab. + (mpn-copy): Add mp_clz_tab.c. + (mpn-routines): Add udiv_qrnnd. + (mpn-sysdep): Look for .s files too. + * sysdeps/stub/udiv_qrnnd.S: New file. + +Sat Dec 25 00:20:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.9. + + * Makefile (distribute): Add install.sh. + * install.sh: New file. + + * sysdeps/i386/Makefile: New file. + (asm-CPPFLAGS): Add -DGAS_SYNTAX. + + * stdio/printf_fp.c: Major rewrite of sysdeps/generic/printf_fp.c, + working with the fractional parts as multiprecision integers + instead of doubles, using mpn functions from GNU MP. Done with + much help from tege@cygnus.com. + * sysdeps/generic/printf_fp.c, sysdeps/ieee754/printf_fp.c, + sysdeps/m68k/fpu/printf_fp.c: Files removed. + +Fri Dec 24 23:09:44 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/stub/dbl2mpn.c, sysdeps/iee754/dbl2mpn.c: New files. + * sysdeps/stub/asm.h: New file. + * sysdeps/m68k/add_n.S, sysdeps/m68k/addmul_1.S, + sysdeps/m68k/mul_1.S, sysdeps/m68k/sub_n.S, + sysdeps/m68k/submul_1.S, sysdeps/m68k/asm.h, + sysdeps/generic/add_1.c, sysdeps/generic/add_n.c, + sysdeps/generic/addmul_1.c, sysdeps/generic/cmp.c, + sysdeps/generic/divmod.c, sysdeps/generic/divmod_1.c, + sysdeps/generic/lshift.c, sysdeps/generic/rshift.c, + sysdeps/generic/mod_1.c, sysdeps/generic/mul.c, + sysdeps/generic/mul_1.c, sysdeps/generic/mul_n.c, + sysdeps/generic/sub_n.c, sysdeps/generic/submul_1.c, + sysdeps/generic/get_str.c, sysdeps/i386/addmul_1.S, + sysdeps/i386/mul_1.S, sysdeps/i386/submul_1.S, + sysdeps/alpha/gmp-mparam.h, sysdeps/generic/gmp-mparam.h, + sysdeps/i386/asm.h, stdio/longlong.h, stdio/gmp.h, + stdio/gmp-impl.h: New files, taken from GNU MP. + * stdio/Makefile (mpn-headers, mpn-routines): New variables. + (routines): Include $(mpn-routines). + (distribute): Include $(mpn-headers). + [gmp-srcdir]: Much code to copy mpn source from $(gmp-srcdir). + * configure.in: Check for a --with-gmp argument and set gmp-srcdir + in config.make to its value (error if no arg given). Move + config_vars initialization before this (right after arg parsing). + +Thu Dec 23 01:44:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/m68k/Makefile (m68k-syntax-flag): New variable. + (compile-command.S): Include $(m68k-syntax-flag) in cpp flags. + + * manual/Makefile (install-data): New target. + (install-%): New pattern rule. + + * Makerules ($(bindir)/...): Do $(make-target-directory) first. + +Thu Dec 23 01:03:19 1993 Brendan Kehoe (brendan@zen.org) + + Port to the DEC Alpha running OSF/1. (75% done) + * sysdeps/unix/bsd/osf1/alpha/start.S: New file. + * sysdeps/unix/bsd/osf1/alpha/sysdep.h: New file. + * sysdeps/unix/bsd/osf1/alpha/sysdep.S: New file. + * sysdeps/unix/bsd/osf1/alpha/__brk.S: New file (incomplete). + * sysdeps/unix/bsd/osf1/alpha/__fork.S: New file. + * sysdeps/unix/bsd/osf1/alpha/__pipe.S: New file. + * sysdeps/unix/bsd/osf1/alpha/__getdents.S: New file. + * sysdeps/unix/bsd/osf1/alpha/__waitpid.c: New file. + * sysdeps/unix/bsd/osf1/alpha/__wait4.S: New file. + * sysdeps/unix/bsd/osf1/dirstream.h: New file. + * sysdeps/unix/bsd/osf1/alpha/statbuf.h: New file. + * sysdeps/unix/bsd/osf1/direct.h: New file. + * sysdeps/unix/bsd/osf1/dirstream.h: New file. + * sysdeps/unix/bsd/osf1/Makefile: New file, defining LDFLAGS. + + * sysdeps/unix/ioctls-tmpl.c [__osf1__ && __alpha__]: Clean up the + ioctls that we get for an Alpha running OSF/1. + + * sysdeps/unix/common/glue-ctype.c: Add code for HAVE__LOCP. + (main): If new macro TABLE_NAME is defined, use that for the name + of the array we're writing out, rather than what's defined in TABLE. + * sysdeps/unix/common/configure.in (AC_HAVE_FUNCS): Add `_locp'. + + * sysdeps/unix/bsd/osf1/sigaction.h: Add SA_ONSTACK, SA_RESTART, + and SA_DISABLE. + * sysdeps/alpha/setjmp.S: Add .end directive. + + * time/sys/time.h (struct timeval): Make members TV_SEC and + TV_USEC be `int', not `long', since it won't hurt other hosts, but + kills the Alpha. + * resource/sys/resource.h (struct rusage): Make all non-timeval + members be `long', not `int'. + + * sysdeps/alpha/strlen.c (strlen): Go from 0 to 7, not 3, since + there are 8 bytes in a long on the Alpha. Check for '\0' after + checking for C in initial byte-by-byte loop. + * sysdeps/alpha/strchr.c (strchr): Likewise. Shift out to 64 when + setting CHARMASK. + * sysdeps/alpha/memchr.c (memchr): Likewise. Return NULL if we + didn't find it in N characters, or N == 0. Declare CP to be an + unsigned char*. + + * sysdeps/alpha/Makefile: Add divrem stuff. + * sysdeps/alpha/DEFS.h: New file. + * sysdeps/alpha/divrem.m4: New file. + * sysdeps/alpha/macros.m4: New file. + * sysdeps/alpha/Dist: Add .S files, divrem.m4, macros.m4, and DEFS.h. + + * sysdeps/unix/bsd/osf1/alpha/vhangup.S: New file. (Only a + temporary workaround, until we figure out how to deal with the + SYS_ult syscalls better.) + * sysdeps/unix/bsd/osf1/alpha/killpg.S: Likewise. + * sysdeps/unix/bsd/osf1/alpha/__sigvec.S: Likewise. + * sysdeps/unix/bsd/osf1/alpha/__sigpause.S: Likewise. + * sysdeps/unix/bsd/osf1/alpha/__sigstmsk.S: Likewise. + * sysdeps/unix/bsd/osf1/alpha/recv.S: Likewise. + * sysdeps/unix/bsd/osf1/alpha/send.S: Likewise. + + * sysdeps/alpha/__math.h (__copysign): Add __CONSTVALUE. + * sysdeps/alpha/__copysign.c: Define __NO_MATH_INLINES. + * sysdeps/alpha/fabs.c: Likewise. + +Wed Dec 22 17:55:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * crypt/*: New version from glad. + + * sysdeps/unix/sysv/sysv4/Dist: Add __getpgid.c and __setpgid.c. + + * dirent/Makefile (headers): Define; include dirent.h & dirstream.h. + +Tue Dec 21 14:24:38 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/sysv/sysv4/i386/statbuf.h (struct stat): Add + missing member ST_FSTYPE. Fixup types on various members to make + this properly reflect what the system has. + + * misc/ioctl.c (ioctl): Declare 2nd arg to be unsigned long int to + match the change in ioctl.h. + +Tue Dec 21 00:01:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.8. + + * dirent/dirent.h (struct dirent): Add `d_reclen'; make `d_namlen' + an `unsigned short int' instead of `size_t'. + (DIR): Move typedef to sysdep file dirstream.h. + * sysdeps/unix/dirstream.h: New file, broken out of dirent.h. + * sysdeps/stub/dirstream.h: New file. + * sysdeps/unix/bsd/dirstream.h: New file. + * sysdeps/unix/bsd/readdir.c: New file. + +Mon Dec 20 23:29:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/start.c: Include . + * sysdeps/unix/sysv/sysv4/i386/start.c: File removed. + +Sat Dec 18 01:37:25 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/sysv/sysv4/i386/start.c: New file. Same as + sysdeps/unix/i386/start.c, but defines NO_UNDERSCORES. + + * sysdeps/unix/sysv/sysv4/waitflags.h: New file, with non-standard + WEXITED and WTRAPPED macros defined. + * sysdeps/unix/sysv/sysv4/__waitpid.c: New file. + * sysdeps/unix/sysv/sysv4/siginfo.h: New file. + * sysdeps/unix/sysv/sysv4/__waitid.S: New file. + * sysdeps/unix/sysv/sysv4/Makefile (sysdep_routines): Mention __waitid. + * sysdeps/unix/sysv/sysv4/pipestream.c: New file, to avoid having + NO_WAITPID set. + * sysdeps/unix/sysv/sysv4/Dist: Added __waitid.S and siginfo.h. + + * sysdeps/unix/sysv/sysv4/__getpgid.c: New file. + * sysdeps/unix/sysv/sysv4/__setpgid.c: New file. + * sysdeps/unix/sysv/sysv4/Makefile (sysdep_routines): Add them. + + * sysdeps/unix/sysv/sysv4/__getpgrp.c (__getpgrp): It's the 0th + subcall for getpgrp, not 4th. + * sysdeps/unix/sysv/sysv4/__setpgrp.c (__setpgrp): Likewise, it's + the 1st, not the 5th. + +Fri Dec 17 15:05:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * misc/sys/ioctl.h (__ioctl, ioctl): Make second arg `unsigned + long int' instead of `int' (4.4 uses unsigned long). + + * string/string.h (strcat): Parameters names were swapped. + +Fri Dec 17 01:18:27 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * Made the Hurd error system 0x10 again; this undid many + of the changes of Nov 23. Affected all the err_ files in + mach; recreated sysdeps/hurd/err_hurd.sub; changed back + err_kern.sub to have the Unix error codes. + +Thu Dec 16 15:40:25 1993 Brendan Kehoe (brendan@zen.org) + + * stdio/temptest.c (main): Remove the files we created once we're + done. Make return type int, and exit with 0 status. + + * sysdeps/posix/tempname.c (__stdio_gen_tempname): Fix typo of + extra comma in sprintf call. + +Tue Dec 14 13:08:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/posix/tempname.c (__stdio_gen_tempname): Rewrote main + logic. Removed INFOS structure array and replaced it with + INDICES, an array of size_t. Removed INFO ptr and replaced it + with IDX, which points to either elt of INDICES. Rewrite main + loop to increment *IDX until it hits 62*62*62. Construct file + name by dividing out two powers of 62 from *IDX and using the + modulus as an index into `letters'. + + * sysdeps/unix/common/Makefile (sysdep_routines): Only add + bsd_getgrp here if the sysdep __getgrps.? chosen is unix/common's. + + * posix/fnmatch.h: #undef FNM_PATHNAME, FNM_NOESCAPE, and + FNM_PERIOD before defining them. + + * time/__tzset.c (compute_change): In M case when tallying time in + months before specified month, count to RULE->m - 1, not ...+1. + + * manual/Makefile (realclean): Remove index, aux, and toc files + created by TeX. + +Mon Dec 13 19:33:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/posix/__wait3.c: Use __WAIT_STATUS_DEFN in place of + __WAIT_STATUS in arg type. + +Wed Dec 8 15:59:45 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/memalign.c: Set L->next and _aligned_blocks only when L + is newly allocated, not when we reuse an old one. + +Tue Dec 7 16:04:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * io/fcntl.c: Replace function_alias use with: + [HAVE_GNU_LD]: Use symbol_alias. + [! HAVE_GNU_LD]: Define fcntl to use stdarg and call __fcntl. + +Mon Dec 6 17:50:05 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/i386/sysdep.S (syscall_error): Fix labels so + they'll compile. + + Make the Solaris port work dammit. + * sysdeps/unix/sysv/sysv4/solaris2/statbuf.h (struct stat): Make + ST_DEV member be unsigned long, not short. + + * sysdeps/unix/sysv/sysv4/solaris2/direct.h: New file, same as + sysv4/direct.h but uses strlen instead of the offset-based + computation of the name length, since that doesn't reliably work + for Solaris. + + * sysdeps/unix/sysv/sysv4/solaris2/sysdep.h (PSEUDO): Don't move + %g0 into %o0, since that will clobber the real return value. Take + out the retl at the end, why in the world did I put it in there? + +Mon Dec 6 17:27:26 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makefile ($(objpfx)crt1.o): Add target to $(objpfx)Mcrt1.o + rule; generalize commands. + (install-lib): Add crt1.o. + + * sysdeps/unix/Makefile ($(common-objpfx)ioctls): Use -x flag to + fgrep to match only entire lines. + +Sun Dec 5 01:53:43 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/bsd/ultrix4/mips/start.S: New file. + * sysdeps/unix/bsd/ultrix4/mips/start.c: Deleted. + +Thu Dec 2 18:29:01 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/bsd/ultrix4/mips/sysdep.S: Don't use dollar signs + with the errnos. + + * sysdeps/stub/{__wait, __wait3, __wait4}.c, + sysdeps/unix/bsd/bsd4.4/{__wait, __wait3}.c, + sysdeps/unix/bsd/sun/sunos4/__wait4.c, + sysdeps/posix/{__wait, __wait3}.c, posix/{wait, wait3, wait4}.c: Use + __WAIT_STATUS_DEFN, not __WAIT_STATUS. + + * sysdeps/posix/killpg.c (killpg): Make arg PGRP __pid_t, not pid_t. + * sysdeps/stub/killpg.c (killpg): Likewise. + + * setjmp/longjmp.c (longjmp): Only use __NORETURN if !HAVE_GNU_LD. + * setjmp/_longjmp.c (_longjmp): Likewise. + +Thu Dec 2 17:31:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/sys/wait.h (__WAIT_STATUS_DEFN): Define new macro. + + * Makerules (+install): Variable removed. + (install-bin, install-lib, install-data, install-headers, + install-others): New targets. + (install-no-libc.a): Depend on them instead of $(+install). + + * Makefile (+subdir_targets): Add + install-{no-libc.a,bin,lib,data,headers,others}. + (install-no-libc.a): Don't depend on subdir_install. + +Thu Dec 2 17:14:39 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/ieee754/__isnan.c (__isnan): Return __CONSTVALUE, to + match declaration in math/math.h. + +Thu Dec 2 15:48:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * time/africa, time/antarctica, time/asia, time/australasia, + time/emkdir.c, time/europe, time/ialloc.c, time/northamerica, + time/pacificnew, time/private.h, time/solar87, time/solar88, + time/southamerica time/systemv, time/tzfile.h, time/zdump.c, + time/zic.c: New data and code from ADO. + * time/Makefile (tzfiles): Added backward. + * time/backward: New file from ADO. + + * locale/C-ctype_ct.c: Remove _ISspace bit from BS (8). + +Wed Dec 1 00:01:30 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * mach/err_kern.sub: Frob around lack of GNU ld. + + * mach/errsystems.awk: The declaration of __mach_error_systems + should not be static, but it should be const. + + * sysdeps/mach/hurd/errlist.awk (BEGIN): Deal with the case + where you don't have GNU ld. + + * sysdeps/mach/hurd/Makefile: Define mib_hacks to make. + +Tue Nov 30 23:24:07 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * Makefile: install-no-libc.a needs to depend on subdir_install. + +Mon Nov 29 16:21:38 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * sysdeps/mach/_strerror.c: Include . + + * hurd/setuids.c: Put entire file inside #ifndef MIB_HACKS; + it uses the old auth_makeauth call. + + * hurd/__setauth.c: Put entire file inside #ifndef MIB_HACKS; + it depends on cthreads to compile, which is not yet integrated. + + * hurd/hurdpath.c (__hurd_path_lookup): cast to avoid GCC warning. + +Wed Nov 24 00:59:15 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * hurd/Makefile: Commented out hurdauth; recent changes to + auth.defs prevent it from working now. + + * mach/mach_error_string.c (do_compat): Change name to + __mach_error_map_compat; make it no longer static. + (mach_error_type, mach_error_string_int): Use + __mach_error_map_compat instead of do_compat. + * sysdeps/mach/_strerror.c: Use __mach_error_map_compat. + + * mach/devstream (output/write_some): Cast fourth argument to + device_write_inband to char * to avoid warning. + (output): Call to write_some mentioned variable `start' from + a previous version of the function; changed this to f->__buffer. + +Tue Nov 23 23:16:13 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + [ The net effect of the following change is to eliminate error + systems which are specific to single-server Mach systems, and + to put the Hurd errors where the Unix errors were. ] + * mach/{err_bootstrap.sub,err_ipc.sub,err_server.sub,err_us.sub}: + None of these are used for the Hurd; we shouldn't pretend that + they are meaningful in our environment. The files have been + renamed to equivalent names with an equal sign prepended; this + will inhibit distribution and prevent the Makefile from looking at + them. + * mach/err_kern.sub: Deleted the definitios of err_codes_unix; + get the strings from _sys_errlist. Rename `unix' to `hurd'. + Rename err_os_sub to be err_kern_sub to match what errsystems.awk + expects. + * sysdeps/mach/hurd/err_hurd.sub: Deleted this file. + * sysdeps/mach/hurd/errnos.awk: Changed definition of _HURD_ERRNO + to be correct. + + * sysdeps/mach/hurd/Makefile: use gawk, not awk. + + * mach/errsystems.awk: Generally rewrote the printf. It's now + closer to Roland's original, but without the $i mistake at all, + in any form. + +Tue Nov 23 20:21:06 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/{i386,sysv/sysv4/solaris2,sysv/i386/linux,bsd/m68k, + bsd/ultrix4/mips,bsd/vax}/sysdep.S: Define _ERRNO_H before + including ; otherwise does not define most + macros (importantly, EAGAIN!). + +Tue Nov 23 12:43:38 1993 Michael I. Bushnell (mib at ernst.gnu.ai.mit.edu) + + * mach/errsystems.awk: $i is not an index; make i a variable and + increment it properly. Don't call `err_get_system'; use the + system number as the index in the array directly. + + * mach/errorlib.h: Added `const' in all the right places. + * sysdeps/mach/hurd/err_hurd.sub: Cast _sys_errlist to + the right type. Better to declare it right in stdio/stdio.h, but + I don't dare change that file lest Roland call me a twit. + * mach/err_us.sub: Add more brackets to initializer to shut GCC up. + + * sysdeps/mach/hurd/err_hurd.sub: Delete keyword `const'; this + is taken care of by the `#define static static const' found in + errsystems.c as created by mach/errsystems.awk. + * mach/errsystems.awk: Ditto for declaration of __mach_error_systems. + + * sysdeps/mach/hurd/err_hurd.sub: Change to ; + errnos.h doesn't define most stuff unless it is included from errno.h. + + * mach/mach_error_string.c (mach_error_string_int): Delete unused + variable `err_str'. + + * mach/mach_error_string.c (do_compat): Declare to be void. + (mach_error_string,mach_error_type, mach_error_string_int): + Declare return type as const char *. + * mach/mach_error.h: Change declarations to match. + + * mach/errsystems.awk: The array that split creates is origin 1, + not origin 0; fixed loop to match. + + * sysdeps/mach/hurd/errnos.awk: Ernst's awk doesn't grok + backslash-newline inside strings. + +Sat Nov 20 19:02:25 1993 Brendan Kehoe (brendan@zen.org) + + * math/__finite.c (__finite): Return __CONSTVALUE, to match math.h. + * math/__scalb.c (__scalb): Likewise. + * math/copysign.c (copysign): Likewise. + * math/drem.c (drem): Likewise. + * math/expm1.c (expm1): Likewise. + * math/finite.c (finite): Likewise. + * math/infnan.c (infnan): Likewise. + * math/isinf.c (isinf): Likewise. + * math/isnan.c (isnan): Likewise. + * math/logb.c (logb): Likewise. + * math/rint.c (rint): Likewise. + * math/scalb.c (scalb): Likewise. + * sysdeps/generic/atan.c (atan): Likewise. + * sysdeps/ieee754/__copysign.c (__copysign): Likewise. + * sysdeps/ieee754/__drem.c (__drem): Likewise. + * sysdeps/ieee754/__isinf.c (__isinf): Likewise. + * sysdeps/ieee754/__logb.c (__logb): Likewise. + * sysdeps/ieee754/ldexp.c (ldexp): Likewise. + * sysdeps/ieee754/log10.c (log10): Likewise. + + * setjmp/_longjmp (_longjmp): Add __NORETURN. + * setjmp/longjmp (longjmp): Likewise. + +Thu Nov 18 04:16:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * string/strerror.c (strerror): Call _strerror_internal to do the + work, passing it a scratch buffer. + * stdio/perror.c: Likewise. + * string/Makefile (routines): Add _strerror. + * sysdeps/generic/_strerror.c (_strerror_internal): New file. + + * configure.in (config.status): Make it pass its args to configure. + +Thu Nov 18 03:52:32 1993 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * stdio/__vfscanf.c (__vfscanf): Put the floating point cases + (e,E,f,g,G) inside #ifndef MIB_HACKS; roland thikgs strtod crashes + the compiler. Wheee. + +Thu Nov 18 03:21:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * errno.h [__USE_GNU__]: Declare program_invocation_name and + program_invocation_short_name. + +Thu Nov 18 00:07:37 1993 Michael I. Bushnell (mib at ernst.gnu.ai.mit.edu) + + * sysdeps/mach/hurd/start.c (start1): Don't add one to + the return value of split_args; it counts them just fine by + itself. Do add one when sizing the arrays. + +Mon Nov 15 00:19:48 1993 Noel Cragg (noel@geech.gnu.ai.mit.edu) + + * time/mktime.c: add TIMES_THROUGH_SEARCH variable to make sure + that we don't get caught in an infinite loop (would be bad, + indeed, for a library routine). + +Sun Nov 14 18:48:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * misc/sys/cdefs.h (__NORETURN, __CONSTVALUE): Use + `__attribute__', not `__attributes__'. + Test __GNUC_MINOR__ < 6, not < 5. + +Wed Nov 10 05:39:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/morecore.c: Only declare sbrk #ifdef __GNU_LIBRARY__. + Cast its return value. + + * sysdeps/unix/bsd/m68k/syscall.S: Use movel in place of moveal. + + * configure.in (signed size_t check): Don't use AC_DEFINE; do it + by hand and insert -U__SIZE_TYPE__ before -D. + + * posix/unistd.h: Declare syscall. + + * sysdeps/m68k/fpu/__math.h (__isnan, __isinf): Use __CONSTVALUE + in prototypes. + + * configure.in (Makefile): Write ARCH=`pwd`, rather than + substituting in the directory name at configure time. + + * sysdeps/mach/i386/syscall.S: New file. + +Tue Nov 9 06:29:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * configure.in (os = netbsd* | 386bsd*): base_os=unix/bsd/bsd4.4. + Set --with-gnu-{ld,as} implicitly when base_os is bsd4.4. + + * Version 1.06.7. + + * misc/Makefile (routines): Add syscall. + * sysdeps/unix/syscall.S, sysdeps/stub/syscall.c, + sysdeps/unix/bsd/sun/m68k/syscall.S, sysdeps/unix/bsd/m68k/syscall.S, + sysdeps/unix/i386/syscall.S: New files. + * sysdeps/unix/bsd/hp/m68k/sysdep.h (DO_CALL): First arg + is syscall number, not name. + (PSEUDO): Pass POUND (SYS_ify (syscall_name)) to DO_CALL. + * sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h (DO_CALL, PSEUDO): + Likewise. Also, do movel into d0 before linkw, so the argument + could conceivably pop the stack. + * sysdeps/unix/bsd/hp/m68k/__brk.S: Pass complete number to DO_CALL. + + * sysdeps/unix/sysv/Dist: sys_getdents.S was renamed s_getdents.S. + +Thu Nov 4 01:23:59 1993 Michael I. Bushnell (mib at ernst.gnu.ai.mit.edu) + + * string/stpncpy: Fix typo; according to gnu-stabs.h the name + inside the DEFUN should be the *non* __ version. + * sysdeps/generic/__stpncpy.c: Missing declaration of s. + +Wed Nov 3 09:35:30 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/Makefile ($(objpfx)errlist.c): Conditionalize these + rules to be used only when errlist.c is otherwise a stub. + +Fri Oct 29 17:29:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * string/stpncpy.c: New file. + * sysdeps/generic/__stpncpy.c: New file. + * string/Makefile (routines): Add stpncpy and __stpncpy. + * string/string.h [__USE_GNU__]: Declare them. + +Thu Oct 28 17:13:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/errnos-tmpl.c (DO): If NAME is "EWOULDBLOCK", + write "#define EWOULDBLOCK EAGAIN" and change NAME to + "EWOULDBLOCK_sys". + * sysdeps/unix/{i386,sysv/sysv4/solaris2,sysv/i386/linux,bsd/m68k, + bsd/ultrix4/mips,bsd/vax}/sysdep.S [EWOULDBLOCK_sys]: Translate + EWOULDBLOCK_sys into EAGAIN. + * Makefile (distribute): Add move-if-change. + * move-if-change: New file. + +Tue Oct 26 18:19:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * misc/sys/cdefs.h: Define __NORETURN and __CONSTVALUE. + For GCC 2.5 and later, use __attributes__ (({volatile,const})). + * stdlib/stdlib.h: Don't define either here. + * math/math.h: Likewise. + * posix/unistd.h: Likewise. + * time/time.h: Likewise. + * stdio/stdio.h: Likewise. + * setjmp/setjmp.h: Likewise. + + * posix/sys/wait.h (__WAIT_STATUS): Use union hack defn for GCC + 2.4 and up (testing __GNUC__ and __GNUC_MINOR__). + + * sysdeps/unix/sysv/sco3.2.4/__sysconf.S: Don't include . + + * Makerules [inhibit-sysdep-asm] + (open-check-inhibit-asm, close-check-inhibit-asm): New variables. + ($(+sysdir_pfx)sysd-rules): Use them around .s and .S rules. + Depend on existing sysdep makefiles. + +Mon Oct 25 15:56:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/mach/hurd/killpg.c: Include for pid_t. + + * sysdeps/posix/tempname.c (__stdio_gen_tempname): Take new arg + STREAMPTR. When non-nil, use __open with O_EXCL to test for + existence, and set *STREAMPTR to new stream on returned fd. + * stdio/stdio.h: Update prototype. + * sysdeps/stub/tempname.c: Here too. + * stdio/tmpfile.c: Pass &F to __stdio_gen_tempname instead of + using fopen. + * stdio/tmpnam.c: Pass extra NULL arg. + * stdio/tempnam.c: Likewise. + + * configure.in (switches): Only put --os-{release,version} here. + (config.status): Write $configure_args in place of $config $switches. + + * signal/Makefile (routines): Renamed sigaltstack to sigaltstk. + * sysdeps/stub/sigaltstack.c: Renamed to sigaltstk.c. + * sysdeps/unix/bsd/bsd4.4/sigaltstack.S: Renamed to sigaltstk.S. + * sysdeps/unix/sysv/sys_getdents.S: Renamed to s_getdents.S. + * sysdeps/unix/sysv/Makefile (sysdep_routines): Changed reference. + +Fri Oct 22 03:47:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/realloc.c [MEMMOVE_MISSING]: Test this to use safe_bcopy. + [emacs]: Don't define safe_bcopy. + + * time/zdump.c, time/europe: New versions from ADO. + + * Rules (dont_distribute): Export this variable. + (subdir_echo-distinfo): Echo its value for +nodist+. + +Thu Oct 21 15:58:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/posix/__dup2.c: Include . + [OPEN_MAX]: Fail with EBADF if FD2>=OPEN_MAX. + + * sysdeps/unix/Makefile (sys/param.h): Conditionalize all this + code to happen only when there is no sysdep sys/param.h. + +Wed Oct 20 03:35:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makerules (make-dummy-dep): Change to `ln $(objpfx)dummy.dep $@'. + ($(objpfx)dummy.dep): Create new file containing comment. + ($(objpfx)%.dep: $(objpfx)%.s): Depend on $(objpfx)dummy.dep. + ($(+sysdir_pfx)sysd-rules): Likewise in generated rule. + +Mon Oct 18 04:22:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * signal/signal.h (killpg): Make PGRP arg pid_t. + * sysdeps/posix/killpg.c (killpg): Likewise. + * sysdeps/stub/killpg.c (killpg): Here too. + + * posix/glob/configure.in: Use AC_HAVE_HEADERS instead of + AC_MEMORY_H and AC_UNISTD_H; omit AC_USG (not needed). + + * Rules (generated): New target. + + * Makefile (subdirs): Use filters to put mach and hurd first in + the list if they are in it at all. + * Makerules (before-compile): Reorder similarly, matching any + generated mach or hurd files. + +Fri Oct 15 17:57:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/posix/mk-stdiolim.c [! OPEN_MAX]: Use _POSIX_OPEN_MAX + for FOPEN_MAX value. + [! PATH_MAX]: Use 1024 (twice _POSIX_PATH_MAX) for FILENAME_MAX value. + + * Makerules (in-Makerules): Define this variable before including + sysd-Makefile. + +Sun Oct 10 14:31:35 1993 Jim Meyering (meyering@comco.com) + + * posix/fnmatch.c [CONFIG_BROKETS]: Include only under + this condition, else "config.h". + +Tue Oct 05 16:08:39 1993 Jim Meyering (meyering@comco.com) + + * time/mktime.c [CONFIG_BROKETS]: Include only under + this condition, else "config.h". + +Thu Sep 23 15:14:08 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/sysv/sysv4/__dup2.c: New file. + +Wed Sep 22 16:58:29 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/sysv/sysv4/solaris2/statbuf.h: New file. + * sysdeps/unix/sysv/sysv4/i386: New directory. + * sysdeps/unix/sysv/sysv4/i386/statbuf.h: New file. + +Fri Sep 17 04:03:26 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makerules (+make-deps): Put output in temp file and use atomic mv. + + * Makerules ($(+sysdir_pfx)sysd-rules): New target, the rule part + of what was in sysd-Makefile. Include it. + ($(+sysdir_pfx)sysd-Makefile): Do just includes here. Move the + generated implicit rules to sysd-rules. Put the output into a + temp file and use atomic mv to final target. + (before-compile): Filter out existing files from value, after + sysd-Makefile but before sysd-rules. + +Thu Sep 9 22:28:13 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makefile (%/configure): Copy rule from Make-dist. + +Mon Sep 6 19:57:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makerules (sources, objects): Move override definitions to + before +depfiles calculation. + + * time/{asia,australasia,europe,zdump.c}: New versions from ADO (93e). + +Mon Aug 30 13:40:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * string/string.h (memmem): Reverse argument order, to be like strstr. + * sysdeps/generic/memmem.c: Here too. + + * dirent/scandir.c: For error return, save errno around closedir. + Call closedir (DP) before returning successfully. + +Thu Aug 26 19:26:06 1993 Brendan Kehoe (brendan@zen.org) + + * sysdeps/unix/sysv/sysv4/solaris2/sysdep.h: Rewritten to not use + the generic sparc sysdep.h. + (PSEUDO): Use trap 8, not 0. Also just put %g0 in %o0, without + subtracting 1. + (ENTRY): Align on 4, and add a `.type' directive. + * sysdeps/unix/sysv/sysv4/solaris2/sysdep.S: New file. + +Fri Aug 20 19:37:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/generic/abort.c: Remove unused variable ABORTING. + +Thu Aug 19 17:45:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makeconfig [!objdir] [!..] (common-objdir): Set to `.'. + +Wed Aug 18 15:10:13 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * stdio/__vfscanf.c (__vfscanf: number): Reverse sense of + NUMBER_SIGNED conditional in assignment code. + +Mon Aug 16 15:49:13 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/Makefile (syscall.h): Add sed + s/SYS_syscall_basenum/syscall_basenum/g. SYSCALL_BASENUM is a + macro both defined and used in ; we must undo our + prependation of `SYS_'. + + * Version 1.06.6. + +Fri Aug 13 16:53:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * stdio/__vfscanf.c: New local variable NUMBER_SIGNED. + (%x, %X, %o, %u): Set it to zero. + (%d, %i): Set it to one. + (number): If NUMBER_SIGNED is set, use strtol and store in ...int*. + If clear, use strtoul an store value in unsigned ...int*. + + * malloc/malloc.h: Undo last change (_AIX32). + (memory_warnings): Use const instead of __const in prototype. + +Fri Aug 13 00:22:01 1993 John Grabowski (johng@whiskey.media.mit.edu) + + * configure.in (os = osf1*): base_os=unix/bsd. + +Thu Aug 12 16:37:13 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/valloc.c [__GNU_LIBRARY__ || _LIBC]: Include + before trying to use size_t to declare __getpagesize. + Include before trying to use __P. + + * posix/{fnmatch,glob}.c, malloc/malloc.h [HAVE_CONFIG_H]: Include + instead of "config.h". This is so that a compilation + using -I. -I$srcdir will use ./config.h rather than + $srcdir/config.h (which it would do when glob.c was found in $srcdir). + + * malloc/malloc.h [_AIX32]: Use !__STDC__ defns of __P, const, __ptr_t. + +Mon Aug 9 16:56:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makerules (-e check): Don't rely on $(findstring e,$(MAKEFLAGS)) + since that also trips for --no-print-directory. + Instead actually see if -e's functionality is taking place. + + * malloc/realloc.c: Call _free_internal instead of free in most places. + + * configure.in (arg parsing): No spaces around = in eval. + + * sysdeps/i386/abort.c: New file. + * stdlib/abort.c: Moved to sysdeps/generic/abort.c. + (abort): Don't try to do stdio cleanup, since we can't guarantee + it anyway. + +Fri Aug 6 17:59:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makerules ($(+install)): Don't depend on installdirs. + (make-target-directory): New define. + (do-install): Do $(make-target-directory) beforehand. + +Tue Aug 3 02:22:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/stub/sys/reboot.h: New file. + * sysdeps/unix/bsd/sys/reboot.h: New file, snarfed from 4.4. + * misc/Makefile (headers): Add sys/reboot.h. + + * stdio/stdio.h (__io_{read,write,seek,close,fileno}): Renamed to + __io_*_fn, so as not to conflict with the Hurd mig stubs. + * internals.c: Changed uses. + + * sysdeps/unix/bsd/signum.h (SIGINFO): Define as 29. + + * Makerules (+includes): Don't set this here. + * Makeconfig (+includes): Put $(+sysdep-includes) in the value here. + + * posix/unistd.h [__USE_MISC]: Declare mktemp and mkstemp. + +Mon Aug 2 16:59:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/valloc.c: Move getpagesize goop to before malloc.h. + [_LIBC]: Test this as well as __GNU_LIBRARY__ (either one) to use + __getpagesize instead of "getpagesize.h". + +Sun Aug 1 16:55:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * configure.in (arg parsing): For `--with-foo=bar', do + "with_foo='bar'". For `--with-fnord', do "with_fnord=yes". + * sysdeps/mach/configure: New file, groks `--with-mach=DIR'. + +Fri Jul 30 00:01:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * configure.in (os = gnu*): Set $base_os, not $os, to mach/hurd. + +Thu Jul 29 17:46:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * ctype/ctype.h (__isctype): Don't test !=0, to avoid possible + extra test insn. + +Sun Jul 25 22:19:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * setjmp/setjmp.h [! __FAVOR_BSD] (_longjmp): Define as longjmp. + +Thu Jul 22 14:57:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/bsd/osf1/sigaction.h: New file. + + * sysdeps/stub/signum.h: Deansideclized. + * sysdeps/stub/pipestream.c (pclose): Test STREAM->__ispipe + instead of __ispipe (STREAM). + * sysdeps/stub/__wait3.c: Fix arg types. + * sysdeps/stub/__ioctl.c: Add missing close paren. + * sysdeps/stub/__getpgsz.c: Include for size_t. + * sysdeps/stub/__get[gu]id.c: Include ; fix return type. + * sysdeps/stub/__set[gu]id.c: Include ; fix arg type. + * sysdeps/stub/__mknod.c: Include ; fix arg types. + + * sysdeps/generic/termbits.h (INLCR, ISTRIP): Fixed typo'd values. + + * stdio/stdio.h (vprintf): Fix last arg type to __gnuc_va_list. + * stdio/vprintf.c (vprintf): Here too. + + * malloc/malloc.c (malloc) [SUNOS_LOCALTIME_BUG]: Put this crap + after hook and initialization. + + * stdio/stdio.h (__validfp): Use a little anonymous struct to find + the real stream ptr from in glue stream. It used to rely on using + `((int *) STREAM)[1]'; but that assumes no struct padding, and + there will be some when int is 32 bits and pointers are 64. + + * malloc/mtrace.c: Use %lx instead of %x for `size_t' formats. + +Wed Jul 21 18:20:41 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * malloc/malloc.c (malloc): Handle SUNOS_LOCALTIME_BUG. + +Wed Jul 21 16:42:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * time/Makefile (extra-objs): Remove gratuitous - in `z.%'. + + * Makefile [+gnu-stabs] (generated): Add $(objpfx)munch-init.c. + (distclean): Also remove sysd-Makefile and sysd-dirs in $(objpfx). + (distclean) [objdir]: Also remove $(objpfx)Makefile. + + * sysdeps/posix/Makefile (generated): Add $(common-objpfx)mk-stdiolim. + (generated, before-compile): Take defns out of ifeq ($(subdir),posix). + + * sysdeps/unix/common/Makefile (generated): Include ctype-glue.c, + not glue-ctype.c. + + * sysdeps/unix/configure (unix_generated): New variable; collect + names of created files in it. + (config_vars): Write an assignment for `unix-generated' to that list. + * sysdeps/unix/Makefile (generated): Append $(unix-generated) + (with either $(objpfx) or $(sysdep_dir)/unix/ prepended to each file). + + * Makefile (clean): Pass no_deps=t to subdir_clean make. + +Sun Jul 18 21:42:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/malloc.c (malloc): After getting more core, recompute + BLOCK before adding to _heapinfo[BLOCK].free.size. + +Fri Jul 16 16:32:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * stdlib/Makefile (generated): Prepend $(objpfx). + * sysdeps/unix/sysv/Makefile (generated): Likewise. + + * sysdeps/posix/mktemp.c: Return when stat fails with ENOENT, not + when it succeeds. + +Wed Jul 14 14:51:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * locale/localeconv.c: Fix copying notice to LGPL. + +Mon Jul 12 21:58:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/mcheck.c (reallochook): Set HDR->magic to MAGICWORD. + +Mon Jul 5 15:55:08 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * malloc/realloc.c (memmove): Swap the args when calling safe_bcopy. + +Thu Jul 1 16:26:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/malloc.c [_LIBC] (_malloc, _free, _realloc): Define these + functions to just call malloc, free, and realloc, respectively. + +Wed Jun 30 16:42:10 1993 Torbjorn Granlund (tege@gnu.ai.mit.edu) + + * sysdeps/generic/memcmp.c (memcmp_bytes): New function for + little endian machines. + (memcmp_common_alignment, memcmp_not_common_alignment): Rework + code computing return values. + +Wed Jun 30 14:42:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/Makefile (local_lim.h): Only generate local_lim.h + if the sysdep version would be stub. + + * sysdeps/unix/mk-local_lim.c: #include before all else. + + * configure.in (config_{machine,vendor,os}): Store config.sub's + output in these new variables. + (machine, vendor, os): Set these from those. + (config-name.h, config.make): Write $config_* (the original values + from config.sub). + + * sysdeps/unix/sysv/sysv4/pgrpsys.S: Add arg count (3). + +Tue Jun 29 02:47:46 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.4. + +Mon Jun 28 00:37:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * stdio/internals.c (__stdio_check_funcs): New function, broken out + of init_stream. + (init_stream): Call it. + * sysdeps/posix/pipestream.c (popen): Call __stdio_check_funcs + before frobnicating STREAM's functions. + + * sysdeps/posix/pipestream.c (pclose): Free C, our data structure, + not STREAM->__cookie after it's been restored. + + * sysdeps/generic/strchr.c: Check for '\0' as well as C, in initial + byte-by-byte loop. + + * conf/portability.h: #undef BSD. + +Sun Jun 27 23:46:05 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/bsd/m68k/__wait.S [__motorola__]: Use Motorola syntax. + * sysdeps/unix/bsd/m68k/sysdep.S: Likewise. + * sysdeps/unix/bsd/m68k/__pipe.S: Likewise. + * sysdeps/m68k/__longjmp.c (__longjmp) [__motorola__]: Use + Motorola syntax in jmp insn. + +Fri Jun 25 16:17:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/{stub,posix,unix/sysv/sysv4}/__sysconf.c (__sysconf): + For _SC_TZNAME_MAX, just return __tzname_max (). + * sysdeps/unix/sysv/sco3.2.4/__sysconf.S: Define __sysconf, not + sysconf. For _SC_TZNAME_MAX, just jump to __tzname_max. + + Undo June 21 change that made __tzname_max a variable + and expected TZNAME_MAX to sometimes be defined. + POSIX.1 does not require that it be defined; sysconf is enough. + * time/time.h (__tzname_max): Declare as a function. + * posix/posix1_lim.h: Don't include . + * sysdeps/stub/tzname_max.h: File removed. + * time/Makefile (headers): Remove tzname_max.h. + (distribute): Remove make-tzlim.c. + (extra-objs): Remove make-tzlim.o and make-tzlim. + ($(common-objpfx)tzname_max.h): Target removed. + * time/make-tzlim.c: File removed. + * time/__tzset.c (__tzname_cur_max): Define this variable instead + of __tzname_max. + (__tz_compute): Set __tzname_cur_max, not __tzname_max. + (__tzname_max): New function. + * time/tzfile.c (compute_tzname_max): Set __tzname_cur_max, not + __tzname_max. + + * malloc/malloc.h [_MALLOC_INTERNAL] [! (_LIBC || STDC_HEADERS || USG)] + (memmove): Don't define. + * malloc/realloc.c [!_LIBC && !STDC_HEADERS && !USG] (safe_bcopy): + New static function. + (memmove): Define to safe_bcopy. + +Wed Jun 23 15:10:51 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/sysv/sco3.2.4/pgrpsys.S: New file, #include sysv4 file. + * sysdeps/unix/sysv/sco3.2.4/Dist: New file, list pgrpsys.S. + +Tue Jun 22 02:44:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/sysv/sco3.2.4/Makefile (sysdep_routines): Use + pgrpsys instead of sco_pgrp. + * sysdeps/unix/sysv/sco3.2.4/{Dist,sco_pgrp.S}: Files removed. + * sysdeps/unix/sysv/sco3.2.4/__{getpgrp,setpgrp,setsid}.c: Just + include the respective unix/sysv/sysv4 files. + + * sysdeps/unix/sysv/sysv4/pgrpsys.S: New file. + * sysdeps/unix/sysv/sysv4/__getpgrp.c: New file. + * sysdeps/unix/sysv/sysv4/__setpgrp.c: New file. + * sysdeps/unix/sysv/sysv4/__setsid.c: New file. + * sysdeps/unix/sysv/sysv4/Dist: Add pgrpsys.S. + * sysdeps/unix/sysv/sysv4/Makefile (sysdep_routines): Add pgrpsys. + + * sysdeps/unix/bsd/bsd4.4/__setsid.S: Moved from unix/sysv/sysv4. + * sysdeps/unix/{bsd/sun/sunos4,bsd/ultrix4,sysv/linux}/__setsid.S: + Include bsd4.4 instead of sysv4 file. + +Mon Jun 21 19:08:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * posix/posix1_lim.h: #include . + * sysdeps/stub/tzname_max.h: New file (no-op). + * time/make-tzlim.c: New file. + * time/Makefile (headers): Add tzname_max.h. + (distribute): Add make-tzlim.c. + (extra-objs): Add make-tzlim.o and make-tzlim. + ($(common-objpfx)tzname_max.h): New target. + + * sysdeps/unix/sysv/sco3.2.4/confname.h (_SC_TZNAME_MAX): Define. + * sysdeps/unix/sysv/sco3.2.4/__sysconf.S: Detect arg being + _SC_TZNAME_MAX, and return max of TZNAME_MAX and __tzname_max. + + * sysdeps/stub/__sysconf.c: Include and . + Handle _SC_TZNAME_MAX and return max of TZNAME_MAX and __tzname_max. + * sysdeps/posix/__sysconf.c: Change _SC_TZNAME_MAX code to that. + * sysdeps/unix/sysv/sysv4/__sysconf.c: Likewise. + + * time/time.h (__tzname_max): Declare as variable, not function. + * time/__tzset.c (__tzname_max): Function removed. + (__tz_compute): Set the __tzname_max variable. + * time/tzfile.c (compute_tzname_max): New function. + (__tzfile_{read,default}): Call it. + +Sun Jun 20 18:32:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * time/zic.c, time/asia: New versions from ADO. + +Wed Jun 16 17:24:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.3. + +Fri Jun 11 15:44:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/bsd/m68k/__pipe.S: Use `movel' instead of `moveal', + which sun3 as does not appear to grok. + * sysdeps/unix/bsd/sun/m68k/__vfork.S: Likewise. + +Thu Jun 10 20:23:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/m68k/Makefile (as-pipe-ok): Define if -pipe is used in + compiler invocations, or if using GNU as. + (compile-command.S): Define using a pipe if `as-pipe-ok' is defined, + otherwise with a temporary file. + + * Makeconfig (gnu-as): Define if -DHAVE_GNU_AS appears in $(CPPFLAGS). + +Wed Jun 9 15:14:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * configure.in (os frobnication): Turn underscores as well as + lowercase Vs into dots in os name. + + * sysdeps/unix/start.c [__GNUC__] (_start): Use asm name "start" + only if [! NO_UNDERSCORES]. + +Tue Jun 8 14:51:00 1993 Brendan Kehoe (brendan@lisa.cygnus.com) + + * sysdeps/unix/bsd/ultrix4/mips/__handler.S: Don't save the stack + pointer. + +Mon Jun 7 21:01:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * time/Makefile (tzcompile): Remove -d switch, since zic-cmd has one. + + * time/{private.h,zic.c}: New versions from ADO. + + * sysdeps/unix/bsd/hp/m68k/__brk.S (error): Renamed label from `1', + (__brk): Use DO_CALL instead of movel and trap. + + * sysdeps/unix/bsd/sony/newsos4: Renamed sysdeps/unix/bsd/sony/newsos. + * sysdeps/unix/bsd/sony/m68k/{Implies,sysdep.h}: Moved there. + + * sysdeps/unix/bsd/hp/m68k/sysdep.h (DO_CALL): New macro, broken + out of PSEUDO. + (PSEUDO): Use it. + * sysdeps/unix/bsd/sony/newsos4/m68k/sysdep.h + (DO_CALL, PSEUDO): Likewise. + + * configure.in: Set --with-gnu-{ld,as} for os=bsd4.4. + +Fri Jun 4 14:11:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/i386/{strlen,memchr}.c: Use `repnz' instead of `repne'. + + * time/Makefile (zonenames): Rename zones-* to z.* so they all fit + in 14 chars. + (extra-objs): Here too. + + * sysdeps/unix/sysv/direct.h (D_RECLEN): New macro. + * sysdeps/unix/readdir.c (D_RECLEN): If not defined, define to use + `d_reclen' member. + (readdir): Use D_RECLEN (DP) in place of DP->d_reclen. + +Thu Jun 3 16:54:29 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/m68k/bytesex.h: New file. + + * sysdeps/unix/ioctls-tmpl.c [sony_news]: Define KANJI before + including . + +Wed Jun 2 17:45:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * malloc/Makefile (%.gz): Renamed target from %.z; use -v flag. + (malloc/ChangeLog): Use mv -f. + +Mon May 31 21:49:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.2 released. + + * manual/Makefile: Remove all uses of $(objpfx). Since the + generated files are distributed, they reside in the source + directory. + + * malloc/mtrace.c: #include ; malloc.h no longer does. + + * sysdeps/posix/sleep.c: Restore signal mask to OSET before + returning. Save errno on entry and restore it before returning. + + * Makeconfig (zonedir): New variable. + * time/Makefile (localtime-file, posixrules-file, install-others, + $(localtime-file), $(posixrules-file), tz-cc): Use $(zonedir) in + place of $(datadir)/zoneinfo. + (tzcompile): Omit -d switch. + (zic-cmd): Add `-d $(zonedir)'. + +Sun May 30 20:04:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/posix/stdio_init.c: (int)cookie is FD, not *(int*)cookie. + + * time/Makefile ($({localtime,posixrules}-file)): Don't pass -d + switch (no need, since directory is compiled into zic). Don't use + $(. + [_MALLOC_INTERNAL]: Move config.h, limits.h, and mem* to front of file. + (NULL): Move after stddef.h. + + * malloc/valloc.c: Don't include config.h; malloc.h already did. + + * malloc/malloc.c: Undo rms's change. + + * malloc/mcheck.c, malloc/malloc.h: Undo rms's change. + +Sat May 29 13:04:38 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * malloc/malloc.c (malloc) [emacs]: If size is 0, make it 1. + + * malloc/malloc.h (CONST): Define this always, + rather than `const' sometimes. + (memory_warnings): Use CONST, not __const, in decl. + * malloc/mcheck.c (checkhdr): Use CONST, not const. + +Fri May 28 18:29:26 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/Makefile (ioctls): Use fgrep instead of egrep to + omit unwanted symbols. Filter the list of them through sort|uniq + to remove duplicates first. + + * sysdeps/unix/Makefile (errlist.c): Use dir and notdir + functions to guarantee qualified path name for make_errlist. + +Thu May 27 17:05:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 1.06.1. + + * sysdeps/sparc/Dist: Include sdiv.S, not div.S. + + * sysdeps/unix/common/Dist: Remove make_siglist.c. + + * stdio/internals.c: Declare __stdio_fileno before reference. + + * sysdeps/generic/{memchr,strchr,strlen}.c: Abort if words are + bigger than 64 bits. + +Wed May 26 14:44:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makerules [objects] (install-others): Don't add libc.a to this. + (install): Depend on $(libdir)/libc.a. + (intall-no-libc.a): New target, depends on $(+install). + (install): Don't depend on $(+install), just on install-no-libc.a. + * Rules (subdir_install): Depend on install-no-libc.a, not install. + + * Makefile ($(libc.a)): Don't depend on subdir_lib. + (lib-noranlib): Depend on subdir_lib. + + Make `fileno' a per-FILE io operation. + * stdio/stdio.h (__io_fileno): New typedef. + (__io_functions): Add `__fileno' member. + (struct __stdio_file): Remove `__fileno' member. + [__USE_POSIX] [__OPTIMIZE__]: Remove fileno macro defn. + [__USE_POSIX] (fileno): Remove `const' from arg in prototype. + * stdio/fileno.c (fileno): Rewritten to call STREAM's __fileno fn. + * sysdeps/stub/sysd-stdio.c (__stdio_fileno): New function. + (__stdio_open): Return an int (zero for win, nonzero for lose), + and make third arg PTR * (filled in with cookie). + * stdio/stdio.h (__stdio_open): Changed prototype. + * sysdeps/posix/sysd-stdio.c (__stdio_open): Likewise. + (__stdio_{read,write,seek,close}): Use (int) COOKIE as the fd, rather + than *(int *) COOKIE. + (__stdio_fileno): New function; just returns (int) COOKIE. + * sysdeps/posix/fdopen.c: Set cookie to (PTR) FD; don't set fileno. + * stdio/vdprintf.c: Likewise. + * stdio/fmemopen.c: Set STREAM->__io_funcs.__fileno to NULL. + Set STREAM->__cookie to NULL and don't use STREAM->__fileno. + * stdio/internals.c (__default_io_functions): Add __stdio_fileno. + * sysdeps/posix/defs.c (stdstream): Initialize __cookie to (PTR) FD + Remove __fileno initializer. + Add NULL initializer for __io_funcs.__fileno. + * sysdeps/posix/pipestream.c (struct child): Remove `fd' member. + Add `cookie' and `funcs' members. + (FUNC): Macro to define child io_funcs. + (child_funcs): New variable, __io_functions struct of them. + (popen): Store STREAM's original cookie and io_funcs in CHILD, and + then set STREAM->__cookie to CHILD and stream->__io_funcs to + child_funcs. + (pclose): Restore STREAM's original cookie and io_funcs before + calling fclose. + + * configure.in (autoconf checks): Add new check for a + libc-friendly stddef.h. + + * sysdeps/unix/configure: Remove __getpgrp from list of syscalls. + + * sysdeps/generic/memchr.c: Handle 64-bit longwords. + * sysdeps/generic/strlen.c: Likewise. + * sysdeps/generic/strchr.c: Likewise. + + * sysdeps/unix/sysv/sco3.2.4/Makefile: Remove gratuitous `.c'. + + * Makerules [objects] (install-others): Add $(libdir)/libc.a to + this, instead of adding $(libc.a) to install-lib. + ($(libdir)/libc.a): New target to install from $(libc.a). + + * sysdeps/unix/sysv/sco3.2.4/__setsid.S: New file. + * sysdeps/unix/bsd/bsd4.4/__setsid.S: New file. + +Mon May 24 16:49:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * sysdeps/unix/sysv/linux/__setsid.S: Moved to unix/sysv/sysv4, + and replaced with #include of that. + * sysdeps/unix/bsd/sun/sunos4/__setsid.S: New file. + * sysdeps/unix/bsd/ultrix4/__setsid.S: New file. + + * posix/Makefile (install): Define to getconf. + + * crypt: New version from glad. + + * sysdeps/unix/sysv/sysv4/__sysconfig.S: Renamed to sysconfig.S. + * sysdeps/unix/sysv/sysv4/Makefile (sysdep_routines): Change reference. + * sysdeps/unix/sysv/sysv4/Dist: Add sysconfig.S. + + * sysdeps/generic/Makefile (siglist.c): Use dir and notdir + functions to guarantee qualified path name for make_siglist. + + * time/Makefile (tzcompile): Use $(@D) for target directory, not + reference to nonexistent 4th dep. + (localtime-file, posixrules-file): Turn these into absolute names. + (install-others): Simply refer to them. + ($(datadir)/zoneinfo/{localtime,posixrules}): Change targets of + these rules to $(localtime-file) and $(posixrules-file), respectively. + Use $(&2) # Find all the files that have a stub or generic version. try-sysdeps := $(foreach dir,$(..)sysdeps/stub $(..)sysdeps/generic,\ @@ -167,9 +167,9 @@ mv $@.new $@ .PHONY: dist -dist: $(tardir).tar.z $(tardir)-crypt.tar.z +dist: $(tardir).tar.gz $(tardir)-crypt.tar.gz -$(tardir)-crypt.tar.z: crypt/crypt.tar.z +$(tardir)-crypt.tar.gz: crypt/crypt.tar.gz ln $< $@ crypt/%: FORCE $(MAKE) -C $(@D) $(@F) @@ -187,8 +187,8 @@ %.Z: % compress -c $< > $@ -%.z: % - gzip -9 -c $< > $@ +%.gz: % + gzip -9 -v -c $< > $@ foo:=$(shell echo 'subdirs=$(subdirs)' >&2) dist-subdirs := $(addprefix dist-,$(subdirs)) # dist-manual @@ -209,3 +209,8 @@ # Get these things out of the environment because they take up lots of space. unexport distribute generated + +# Fnord. +export inhibit_mach_syscalls=t +export no_deps=t +export inhibit_interface_rules=t diff -ruN glibc-1.06/Makeconfig glibc-1.07/Makeconfig --- glibc-1.06/Makeconfig Sat May 22 17:02:12 1993 +++ glibc-1.07/Makeconfig Tue Jan 11 21:02:41 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -70,6 +70,7 @@ else # This is a kludge. make wizards might grok. common-objpfx = sysdeps/../ +common-objdir = . endif endif @@ -117,6 +118,14 @@ libdir = $(exec_prefix)/lib endif +# Prefix to put on files installed in $(libdir). For libraries `libNAME.a', +# the prefix is spliced between `lib' and the name, so the linker switch +# `-l$(libprefix)NAME' finds the library; for other files the prefix is +# just prepended to the whole file name. +ifndef libprefix +libprefix = +endif + # Where to install the header files. ifndef includedir includedir = $(exec_prefix)/include @@ -140,6 +149,11 @@ datadir = $(prefix)/lib endif +# Where to install the timezone data files (which are machine-independent). +ifndef zonedir +zonedir = $(datadir)/zoneinfo +endif + # Where to install programs. ifndef bindir bindir = $(exec_prefix)/bin @@ -159,7 +173,7 @@ # Where to install the "localtime" timezone file; this is the file whose # contents $(localtime) specifies. If this is a relative pathname, it is -# relative to $(datadir)/zoneinfo. It is a good idea to put this somewhere +# relative to $(zonedir). It is a good idea to put this somewhere # other than there, so the zoneinfo directory contains only universal data, # localizing the configuration data elsewhere. ifndef localtime-file @@ -177,7 +191,7 @@ # Where to install the "posixrules" timezone file; this is file # whose contents $(posixrules) specifies. If this is a relative -# pathname, it is relative to $(datadir)/zoneinfo. +# pathname, it is relative to $(zonedir). ifndef posixrules-file posixrules-file = posixrules endif @@ -249,7 +263,7 @@ +cc_version = $(filter gcc,$(notdir $(firstword $(CC)))) # if using gcc # Extra flags to pass to GCC. -+gccwarn := -Wall -Wwrite-strings ++gccwarn := -Wall -Wwrite-strings -Wno-parentheses +gccopt := -fstrength-reduce # This is the program that generates makefile @@ -318,14 +332,14 @@ endif # +cc_version endif # -v -# These are flags given to the C compiler to -# tell it to look for include files (including ones -# given in angle brackets) in the current directory +# These are flags given to the C compiler to tell it to look for include +# files (including ones given in angle brackets) in the current directory # and in the parent library source directory. +# `+sysdep-includes' will be defined by Makerules. ifneq "$(..)" "" -+includes = -I. -I$(patsubst %/,%,$(..)) $(includes) ++includes = -I. -I$(patsubst %/,%,$(..)) $(includes) $(+sysdep-includes) else -+includes = -I. $(includes) ++includes = -I. $(includes) $(+sysdep-includes) endif @@ -342,6 +356,10 @@ ifneq "$(filter -DHAVE_GNU_LD,$(CPPFLAGS))" "" +gnu-stabs := yes +endif + +ifneq "$(filter -DHAVE_GNU_AS,$(CPPFLAGS))" "" +gnu-as := yes endif diff -ruN glibc-1.06/Makefile glibc-1.07/Makefile --- glibc-1.06/Makefile Sat May 22 22:30:09 1993 +++ glibc-1.07/Makefile Thu Jan 6 20:55:16 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -31,6 +31,10 @@ configure: configure.in autoconf $(ACFLAGS) +%/configure: %/configure.in + autoconf $(ACFLAGS) $< > $@.new + mv $@.new $@ + include Makeconfig include $(objpfx)sysd-dirs @@ -49,6 +53,14 @@ $(sysdep-subdirs)) export subdirs := $(subdirs) # Benign, useless in GNU make before 3.63. +# The mach and hurd subdirectories have many generated header files which +# the much of rest of the library depends on, so it is best to build them +# first (and mach before hurd, at that). The before-compile additions in +# sysdeps/{mach,hurd}/Makefile should make it reliably work for these files +# not to exist when making in other directories, but it will be slower that +# way with more somewhat expensive `make' invocations. +subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \ + $(filter-out mach hurd,$(subdirs)) # All initialization source files. +subdir_inits := $(wildcard $(foreach dir,$(subdirs),$(dir)/init-$(dir).c)) @@ -57,11 +69,14 @@ # These are the targets that are made by making them in each subdirectory. -+subdir_targets := subdir_lib objects objs others mostlyclean subdir_clean\ - tests subdir_lint.out \ - subdir_echo-headers subdir_echo-distinfo subdir_install ++subdir_targets := subdir_lib objects objs others mostlyclean \ + subdir_clean tests subdir_lint.out \ + subdir_echo-headers subdir_echo-distinfo \ + subdir_install $(addprefix install-, \ + no-libc.a bin lib \ + data headers others) -headers := features.h stubs.h errno.h sys/errno.h errnos.h limits.h \ +headers := features.h errno.h sys/errno.h errnos.h limits.h \ $(stddef.h) $(stdarg.h) echo-headers: subdir_echo-headers @@ -76,6 +91,7 @@ $(objpfx)munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits) awk -f $< subdirs='$(+init_subdirs)' $(word 2,$^) > $@-t mv $@-t $@ +generated := $(generated) $(objpfx)munch-init.c endif aux := sysdep $(+init) version start @@ -82,7 +98,10 @@ # What to install. -install-lib = crt0.o Mcrt1.o # libc.a is done by Makerules. +# SCO 3.2v4 uses crt1.o. Some other system uses Mcrt1.o. +# They are created below (containing no data or code). +install-lib = crt0.o crt1.o Mcrt1.o # libc.a is done by Makerules. +install-others = $(includedir)/stubs.h include Makerules @@ -96,12 +115,12 @@ -rm -f $@ ln $< $@ -$(objpfx)Mcrt1.o: - cp /dev/null $(objpfx)Mcrt1.c - $(COMPILE.c) $(objpfx)Mcrt1.c $(OUTPUT_OPTION) - rm -f $(objpfx)Mcrt1.c +$(objpfx)Mcrt1.o $(objpfx)crt1.o: + cp /dev/null $(@:.o=.c) + $(COMPILE.c) $(@:.o=.c) $(OUTPUT_OPTION) + rm -f $(@:.o=.c) -$(libc.a): subdir_lib +lib-noranlib: subdir_lib $(objpfx)sysd-dirs: $(+sysdir_pfx)config.make @@ -121,18 +140,21 @@ subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)stub-$(dir)) -# Call the subdirs to make their stub-SUBDIR files. -$(subdir-stubs): $(common-objpfx)stub-%: FORCE - $(MAKE) -C $* stubs -FORCE: - -$(objpfx)stubs.h: $(common-objpfx)stub- $(subdir-stubs) +# Since stubs.h is never needed when building the library, we simplify the +# hairy installation process by producing it in place only as the last part +# of the top-level `make install'. It depends on subdir_install, which +# iterates over all the subdirs; subdir_install in each subdir depends on +# the subdir's stubs file. Having more direct dependencies would result in +# extra iterations over the list for subdirs and many recursive makes. +$(includedir)/stubs.h: subdir_install + @rm -f $(objpfx)stubs.h (echo '/* This file is automatically generated.';\ echo ' It defines a symbol `__stub_FUNCTION'\'' for each function';\ echo ' in the C library which is a stub, meaning it will fail';\ echo ' every time called, usually setting errno to ENOSYS. */';\ - sort $^) > $@.new - mv $@.new $@ + sort $(subdir-stubs)) > $(objpfx)stubs.h + $(INSTALL_DATA) $(objpfx)stubs.h $@ + rm -f $(objpfx)stubs.h # This makes the Info or DVI file of the documentation from the Texinfo source. .PHONY: info dvi @@ -166,10 +188,14 @@ # dependency of this target so that libc.a will be removed before the # subdirectories are dealt with and so they won't try to remove object # files from it when it's going to be removed anyway. - @$(MAKE) subdir_clean + @$(MAKE) subdir_clean no_deps=t distclean: clean - -rm -f $(addprefix $(objpfx),config.status config.make) + -rm -f $(addprefix $(objpfx),config.status config.make \ + sysd-Makefile sysd-dirs) +ifdef objdir + -rm -f $(objpfx)Makefile +endif .PHONY: echo_subdirs echo_subdirs:;@echo '$(subdirs)' @@ -184,9 +210,9 @@ distribute := README INSTALL NOTES COPYING.LIB COPYING ChangeLog NEWS \ Makefile Makeconfig Makerules Rules Make-dist MakeTAGS \ - ansidecl.h mkinstalldirs \ + ansidecl.h mkinstalldirs move-if-change \ configure configure.in aclocal.m4 config.sub config.guess\ - munch-tmpl.c munch.awk gnu-stabs.h sysdep.h + munch-tmpl.c munch.awk gnu-stabs.h sysdep.h install.sh export distribute := $(strip $(distribute)) export generated := $(generated) $(objpfx)stubs.h diff -ruN glibc-1.06/Makerules glibc-1.07/Makerules --- glibc-1.06/Makerules Sat May 22 23:02:01 1993 +++ glibc-1.07/Makerules Mon Jan 17 19:17:25 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -17,7 +17,9 @@ # Cambridge, MA 02139, USA. # -# Propagated rules for making the GNU C library. +# Common rules for making the GNU C library. This file is included +# by the top-level Makefile and by all subdirectory makefiles +# (through Rules). # ifneq (,) This makefile requires GNU Make. @@ -40,8 +42,12 @@ export sources := $(sources) export headers := $(headers) -ifneq ($(findstring e,$(MAKEFLAGS)),) +oPATH := $(PATH) +PATH := this definition should take precedence over $(oPATH) +ifeq ($(PATH),$(oPATH)) You must not use the -e flag when building the GNU C library. +else +PATH := $(oPATH) endif ifndef +included-Makeconfig @@ -63,15 +69,10 @@ endif # Add -I switches to get the right sysdep directories. +# `+includes' in Makeconfig references $(+sysdep-includes). +sysdep-includes := $(addprefix -I,$(+sysdep_dirs)) -+includes := $(+includes) $(+sysdep-includes) # Include any system-specific makefiles. -# Also generate an ordered list of implicit rules which find the source -# files in each sysdep directory. The old method was to use vpath to -# search all the sysdep directories. However, that had the problem that a -# .S file in a later directory would be chosen over a .c file in an earlier -# directory, which does not preserve the desired sysdeps ordering behavior. # This is here so things in sysdep Makefiles can easily depend on foo.h as # appropriate and not worry about where foo.h comes from, which may be @@ -85,30 +86,99 @@ no_deps=t endif +# Some sysdep makefiles use this to distinguish being included here from +# being included individually by a subdir makefile (hurd/Makefile needs this). +in-Makerules := yes + +include $(+sysdir_pfx)sysd-Makefile +$(+sysdir_pfx)sysd-Makefile: $(+sysdir_pfx)config.make $(..)Makerules + -@rm -f $@T + (for dir in $(sysdirs); do \ + file=sysdeps/$$dir/Makefile; \ + if [ -f $(..)$$file ]; then \ + echo include "\$$(..)$$file"; \ + else true; fi; \ + done) > $@T + mv $@T $@ + + +# Reorder before-compile so that mach things come first, and hurd things +# second, before all else. The mach and hurd subdirectories have many +# generated header files which the much of rest of the library depends on, +# so it is best to build them first (and mach before hurd, at that). +before-compile := $(filter $(common-objpfx)mach% $(common-objpfx)hurd%,\ + $(before-compile)) \ + $(filter-out $(common-objpfx)mach% $(common-objpfx)hurd%,\ + $(before-compile)) + +# Remove existing files from `before-compile'. Things are added there when +# they must exist for dependency generation to work right, but once they +# exist there is no further need for every single file to depend on them, +# and those gratuitous dependencies result in many gratuitous +# recompilations. +before-compile := $(filter-out $(wildcard $(before-compile)),$(before-compile)) + +# Don't let any before-compile file be an intermediate and get removed. +$(before-compile): + +# Generate an ordered list of implicit rules which find the source files in +# each sysdep directory. The old method was to use vpath to search all the +# sysdep directories. However, that had the problem that a .S file in a +# later directory would be chosen over a .c file in an earlier directory, +# which does not preserve the desired sysdeps ordering behavior. + # When making the list of .dep files to include, we can't know which ones # have source in .s files, and thus do not in fact need a .dep file. # So we must define rules to make .dep files for .s files. -make-dummy-dep = \ - echo '\# $< cannot contain includes, so it needs no deps.' > $@ +define make-dummy-dep +$(addprefix ln $(objpfx)dummy.dep ,$(filter-out $(wildcard $@),$@)) +endef +$(objpfx)dummy.dep: + echo '# .s files cannot contain includes, so they need no deps.' > $@ + +# It matters that this set of rules, for compiling from sources in +# the current directory (the $srcdir/$subdir) come before the +# generated sysdep rules in included from sysd-rules below. When +# compiling in the source tree, generated sources go into the current +# directory, and those should be chosen before any sources in sysdeps. +$(objpfx)%.o: %.S $(before-compile); $(compile-command.S) +$(objpfx)%.dep: %.S $(before-compile); $(+make-deps) +$(objpfx)%.o: %.s $(before-compile); $(compile-command.s) +$(objpfx)%.dep: %.s; $(make-dummy-dep) +$(objpfx)%.o: %.c $(before-compile); $(compile-command.c) +$(objpfx)%.dep: %.c $(before-compile); $(+make-deps) +# Omit the objpfx rules when building in the source tree, because +# objpfx is empty and so these rules just override the ones above. +ifdef objpfx # Define first rules to find the source files in $(objpfx). # Generated source files will end up there. $(objpfx)%.o: $(objpfx)%.S $(before-compile); $(compile-command.S) $(objpfx)%.dep: $(objpfx)%.S $(before-compile); $(+make-deps) $(objpfx)%.o: $(objpfx)%.s $(before-compile); $(compile-command.s) -$(objpfx)%.dep: $(objpfx)%.s; $(make-dummy-dep) +$(objpfx)%.dep: $(objpfx)%.s $(objpfx)dummy.dep; $(make-dummy-dep) $(objpfx)%.o: $(objpfx)%.c $(before-compile); $(compile-command.c) $(objpfx)%.dep: $(objpfx)%.c $(before-compile); $(+make-deps) +endif -include $(+sysdir_pfx)sysd-Makefile -$(+sysdir_pfx)sysd-Makefile: $(+sysdir_pfx)config.make $(..)Makerules - (for dir in $(sysdirs); do \ - file=sysdeps/$$dir/Makefile; \ - if [ -f $(..)$$file ]; then \ - echo include "\$$(..)$$file"; \ - else true; \ - fi; \ - dir="\$$(sysdep_dir)/$$dir"; \ +# System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard +# patterns matching sysdep directories whose assembly source files should +# be suppressed. +ifdef inhibit-sysdep-asm +define open-check-inhibit-asm +case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) ;; *) +endef +close-check-inhibit-asm = ;; esac +endif + +include $(+sysdir_pfx)sysd-rules +$(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \ + $(wildcard $(foreach dir,$(sysdirs),\ + $(sysdep_dir)/$(dir)/Makefile)) + -@rm -f $@T + (for sysdir in $(sysdirs); do \ + dir="\$$(sysdep_dir)/$$sysdir"; \ + $(open-check-inhibit-asm) \ echo "\$$(objpfx)%.o: $$dir/%.S \$$(before-compile); \ \$$(compile-command.S)"; \ echo "\$$(objpfx)%.dep: $$dir/%.S \$$(before-compile); \ @@ -115,55 +185,14 @@ \$$(+make-deps)"; \ echo "\$$(objpfx)%.o: $$dir/%.s \$$(before-compile); \ \$$(compile-command.s)"; \ - echo "\$$(objpfx)%.dep: $$dir/%.s; \$$(make-dummy-dep)"; \ + echo "\$$(objpfx)%.dep: $$dir/%.s \$$(objpfx)dummy.dep; \ + \$$(make-dummy-dep)" $(close-check-inhibit-asm); \ echo "\$$(objpfx)%.o: $$dir/%.c \$$(before-compile); \ \$$(compile-command.c)"; \ echo "\$$(objpfx)%.dep: $$dir/%.c \$$(before-compile); \ \$$(+make-deps)"; \ - done) > $@ - -# Maximize efficiency by minimizing the number of rules. -.SUFFIXES: # Clear the suffix list. -# Add the suffixes we use. -.SUFFIXES: .a .o .S .s .c .h .dep - -# Generic rule for making directories. -%/: -# mkdir isn't smart enough to strip a trailing /. - mkdir $(@:%/=%) - -# Make sure that object files are not removed -# when they are intermediates between sources and library members. -# This can go away with make v4. -.PRECIOUS: %.o - -# Make sure that the parent library archive is never removed. -.PRECIOUS: $(libc.a) - -# Use the verbose option of ar and tar when not running silently. -ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s -verbose := v -else # -s -verbose := -endif # not -s - -ARFLAGS := r$(verbose) - -# Figure out the source filenames in this directory. - -override sources := $(addsuffix .c,$(routines) $(aux) \ - $(sysdep_routines)) -export sysdep_routines := $(sysdep_routines) - -# This is the list of all object files, gotten by -# replacing every ".c" in `sources' with a ".o". -override objects := $(addprefix $(objpfx),$(sources:.c=.o)) - -# The order of these rules is important. - -$(objpfx)%.o: %.S $(before-compile); $(compile-command.S) -$(objpfx)%.o: %.s $(before-compile); $(compile-command.s) -$(objpfx)%.o: %.c $(before-compile); $(compile-command.c) + done) > $@T + mv $@T $@ ifndef compile-command.S compile-command.S = $(compile.S) $(OUTPUT_OPTION) @@ -176,7 +205,7 @@ endif ifeq ($(notdir $(firstword $(CC))),gcc) -# GCC can grok options after the file name. +# GCC can grok options after the file name, and it looks nicer that way. compile.S = $(CC) $< -c $(CPPFLAGS) $(asm-CPPFLAGS) compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) else @@ -192,6 +221,75 @@ OUTPUT_OPTION = -o $@ endif endif + +S-CPPFLAGS = $(asm-CPPFLAGS) +define +make-deps +-@rm -f $@ +$(+mkdep) $< $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \ +sed $(sed-remove-objpfx) -e 's,$*\.o,$(@:.dep=.o) $@,' > $(@:.dep=.dtm) +mv $(@:.dep=.dtm) $@ +endef +ifneq (,$(objpfx)) +sed-remove-objpfx = -e 's@ $(subst @,\@,$(objpfx))@ $$(objpfx)@g' +endif + +# Figure out the source filenames in this directory. + +override sources := $(addsuffix .c,$(routines) $(aux) \ + $(sysdep_routines)) +export sysdep_routines := $(sysdep_routines) + +# This is the list of all object files, gotten by +# replacing every ".c" in `sources' with a ".o". +override objects := $(addprefix $(objpfx),$(sources:.c=.o)) + ++depfiles := $(strip $(sources:.c=.dep) $(addsuffix .dep,$(others) $(tests))) ++depfiles := $(addprefix $(objpfx),$(+depfiles)) + +$(objpfx)depend-$(subdir): Makefile +ifdef +depfiles +# This used to simply use $(+depfiles) on the command line, but that tended +# to overflow the arg limit on USG systems. Since `sources' is in the +# environment anyway, we do some shell processing on it instead. + for file in $(patsubst %,%.dep,$(others) $(tests)) \ + `echo $${sources} | sed 's/\.c/.dep/g'`; do \ + echo "include \$$(objpfx)$$file"; \ + done > $@ +else + cp /dev/null $@ +endif + +ifneq ($(no_deps),t) +# Include the generated dependencies of the sources in this directory. +include $(objpfx)depend-$(subdir) +endif + +# Maximize efficiency by minimizing the number of rules. +.SUFFIXES: # Clear the suffix list. +# Add the suffixes we use. +.SUFFIXES: .a .o .S .s .c .h .dep + +# Generic rule for making directories. +%/: +# mkdir isn't smart enough to strip a trailing /. + mkdir $(@:%/=%) + +# Make sure that object files are not removed +# when they are intermediates between sources and library members. +# This can go away with make v4. +.PRECIOUS: %.o + +# Make sure that the parent library archive is never removed. +.PRECIOUS: $(libc.a) + +# Use the verbose option of ar and tar when not running silently. +ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s +verbose := v +else # -s +verbose := +endif # not -s + +ARFLAGS := r$(verbose) # This makes all the object files in the parent library archive. @@ -220,8 +318,8 @@ # Temporary until I get a better solution. .PHONY: ar-it ar-it: $(objects) -# $(+libc_lock_open) ifdef objects +# $(+libc_lock_open) ifdef objdir cd $(objdir); $(AR) cru$(verbose) libc.a $(patsubst $(objpfx)%,%,$^) else @@ -243,82 +341,94 @@ # installed as they are in $(includedir). install-others are absolute path # names of files to install; rules to install them are defined elsewhere. -do-install = $(INSTALL_DATA) $< $@ +define do-install +$(make-target-directory) +$(INSTALL_DATA) $< $@ +endef + +# Make the target directory if it doesn't exist. Because of make's +# directory cache, this will produce the `mkdir' command when the directory +# already exists, if it didn't exist at the start of the `make' run. The +# `-' prefix ignores errors from mkdir, so there will just be some +# gratuitous but harmless `File exists' messages. +define make-target-directory +$(addprefix -mkdir ,$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%))) +endef + +# Don't attempt binaries for the Hurd version (yet). +ifdef mib_hacks +install := +ifeq ($(subdir),time) +install-others := +endif +endif + + # Any directory (parent or subdir) that has any object files to build # should install libc.a; this way "make install" in a subdir is guaranteed # to install everything it changes. ifdef objects -install-lib := $(install-lib) libc.a +install: $(libdir)/lib$(libprefix)c.a +# We avoid depending on lib-noranlib because that makes the parent make +# subdir_lib in all the subdirs, when the make install run they do will +# update the library anyway. Running ranlib after installing makes the +# __.SYMDEF time stamp up to date, which avoids messages from some linkers. +# Depending on subdir_install gets all the subdirs to update the library, +# and is optimal for `make install' at top level. +$(libdir)/lib$(libprefix)c.a: libobjs ar-it subdir_install + $(make-target-directory) + $(INSTALL_DATA) $(libc.a) $@ + $(RANLIB) $@ endif ifdef install $(addprefix $(bindir)/,$(install)): $(bindir)/%: $(objpfx)% - $(INSTALL) $< $@ + $(make-target-directory) + $(INSTALL_PROGRAM) $< $@ endif ifdef install-lib -$(addprefix $(libdir)/,$(install-lib)): $(libdir)/%: $(objpfx)%;$(do-install) +install-lib.a := $(filter lib%.a,$(install-lib)) +install-lib-non.a := $(filter-out lib%.a,$(install-lib)) +ifdef install-lib-non.a +$(addprefix $(libdir)/$(libprefix),$(install-lib-non.a)): \ + $(libdir)/$(libprefix)%: $(objpfx)% + $(do-install) +endif +ifdef install-lib.a +$(install-lib.a:lib%.a=$(libdir)/lib$(libprefix)%.a): \ + $(libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a + $(do-install) +endif endif ifdef install-data $(addprefix $(datadir)/,$(install-data)): $(datadir)/%: %;$(do-install) endif -+install := $(addprefix $(libdir)/,$(install-lib)) \ - $(addprefix $(datadir)/,$(install-data)) \ - $(addprefix $(bindir)/,$(install)) \ - $(install-others) headers := $(strip $(headers)) ifdef headers $(addprefix $(includedir)/,$(headers)): \ $(includedir)/%: %;$(do-install) -+install := $(+install) $(addprefix $(includedir)/,$(headers)) endif # headers -+install := $(filter-out $(addprefix %/,$(no-install)),$(+install)) - -.PHONY: install installdirs -install: $(+install) -$(+install): installdirs -installdirs: $(..)mkinstalldirs - $(dir $<)$(notdir $<) $(dir $(+install)) - -S-CPPFLAGS = $(asm-CPPFLAGS) -+make-deps = $(+mkdep) $< $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \ - sed $(sed-remove-objpfx) -e 's,$*\.o,$(@:.dep=.o) $@,' > $@ -ifneq (,$(objpfx)) -sed-remove-objpfx = -e 's,$(objpfx),$$(objpfx),g' -endif - -# N.B.: The order of these two rules is important. -$(objpfx)%.dep: %.S $(before-compile) - $(+make-deps) -$(objpfx)%.dep: %.c $(before-compile) - $(+make-deps) -$(objpfx)%.dep: %.s - $(make-dummy-dep) - -+depfiles := $(strip $(sources:.c=.dep) $(addsuffix .dep,$(others) $(tests))) -+depfiles := $(addprefix $(objpfx),$(+depfiles)) - -$(objpfx)depend-$(subdir): Makefile -ifdef +depfiles - (for file in $(patsubst $(objpfx)%,%,$(+depfiles)); do \ - echo "include \$$(objpfx)$$file"; \ - done) > $@ -else - cp /dev/null $@ -endif -ifneq ($(no_deps),t) -# Include the generated dependencies of the sources in this directory. -ifdef have.make.that.groks.multiple.includes -# Avoid the extra file and waiting for it, since we can. -+depfiles := $(strip $(+depfiles)) -ifdef +depfiles -include $(+depfiles) -endif -else -include $(objpfx)depend-$(subdir) -endif -endif +.PHONY: install-bin-nosubdir install-lib-nosubdir \ + install-data-nosubdir install-headers-nosubdir +install-bin-nosubdir: $(addprefix $(bindir)/,$(install)) +install-lib-nosubdir: $(addprefix $(libdir)/,$(install-lib)) +install-data-nosubdir: $(addprefix $(datadir)/,$(install-data)) +install-headers-nosubdir: $(addprefix $(includedir)/,$(headers)) +install-others-nosubdir: $(install-others) + +# We need all the `-nosubdir' targets so that `install' in the parent +# doesn't depend on several things which each iterate over the subdirs. +# This rule makes `install-FOO' always use `install-FOO-nosubdir' as a +# subroutine. Then in the parent `install-FOO' also causes subdir makes. +install-%:: install-%-nosubdir ; + +.PHONY: install install-no-libc.a-nosubdir +install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\ + install-bin-nosubdir install-lib-nosubdir \ + install-others-nosubdir +install: install-no-libc.a-nosubdir # Command to compile $< in $(objdir) using the native libraries. native-compile = cwd=`pwd`; cd $(@D); $(CC) $(native-CFLAGS) \ @@ -360,7 +470,7 @@ /dev/null > $@T mv $@T $@ -ifdef gpl2lgpl +ifneq (,$(strip $(gpl2lgpl))) ifneq (,$(wildcard $(..)gpl2lgpl.sed)) # Snarf from the master source and frob the copying notice. $(gpl2lgpl): %: $(..)gpl2lgpl.sed /home/gd/gnu/lib/% diff -ruN glibc-1.06/NEWS glibc-1.07/NEWS --- glibc-1.06/NEWS Sat May 22 22:49:59 1993 +++ glibc-1.07/NEWS Sat Dec 25 02:41:44 1993 @@ -1,9 +1,42 @@ -GNU C Library NEWS -- history of user-visible changes. 8 April 1993 +GNU C Library NEWS -- history of user-visible changes. 23 December 1993 Copyright (C) 1992, 1993 Free Software Foundation, Inc. See the end for copying conditions. Please send GNU C library bug reports to bug-glibc@prep.ai.mit.edu. + +Version 1.07 + +* Brendan Kehoe has contributed most of a port to the DEC Alpha + running OSF/1 (alpha-dec-osf1). He says it is 75% complete. + +* The new `stpncpy' is a cross between `stpcpy' and `strncpy': It + copies a limited number of characters from a string, and returns the + address of the last character written. + +* You no longer need to check for whether the installed `stddef.h' is + compatible with the GNU C library. configure now checks for you. + +* You can now define a per-stream `fileno' function to convert the + stream's cookie into an integral file descriptor. + +* ``malloc (0)'' no longer returns a null pointer. Instead, it + allocates zero bytes of storage, and returns a unique pointer which + you can pass to `realloc' or `free'. The behavior is undefined if + you dereference this pointer. + +* The C library now runs on Sony NEWS m68k machines running either + NewsOS 3 or NewsOS 4. + +* The new `syscall' function is a system-dependent primitive function + for invoking system calls. It has the canonical behavior on Unix + systems, including unreliable return values for some calls (such as + `pipe', `fork' and `getppid'). + +* The error code `EWOULDBLOCK' is now obsolete; it is always defined + to `EAGAIN', which is the preferred name. On systems whose kernels + use two distinct codes, the C library now translates EWOULDBLOCK to + EAGAIN in every system call function. Version 1.06 diff -ruN glibc-1.06/README glibc-1.07/README --- glibc-1.06/README Sun May 23 00:21:38 1993 +++ glibc-1.07/README Mon Jan 17 22:58:34 1994 @@ -1,4 +1,4 @@ -This directory contains the version 1.06 test release of the GNU C Library. +This directory contains the version 1.07 test release of the GNU C Library. Many bugs have been fixed since the last release. Some bugs surely remain. @@ -5,18 +5,20 @@ As of this release, the GNU C library has been ported to the following configurations: - sparc-sun-sunos4 - sparc-sun-solaris2 - m68k-hp-bsd4.3 - m68k-sun-sunos4 - m68k-sony-bsd4.3 - mips-dec-ultrix4 + alpha-dec-osf1 (mostly finished) i386-bsd4.3 - i386-sysv - i386-sysv4 + i386-gnu (for Hurd development only) i386-sco3.2 i386-sco3.2v4 i386-sequent-dynix + i386-sysv + i386-sysv4 + m68k-hp-bsd4.3 + m68k-sony-newsos + m68k-sun-sunos4 + mips-dec-ultrix4 + sparc-sun-solaris2 + sparc-sun-sunos4 Porting the library is not hard. If you are interested in doing a port, please get on the mailing list by sending electronic mail to @@ -23,30 +25,33 @@ bug-glibc-request@prep.ai.mit.edu. The GNU C library now includes Michael Glad's Ultra Fast Crypt, which -provides the Unix `crypt' function, plus some other entry points. Because -of the United States export restriction on DES implementations, we are -distributing this code separately from the rest of the C library. There is -an extra distribution tar file just for crypt; it is called -`glibc-1.06-crypt.tar.z'. You can just unpack the crypt distribution -along with the rest of the C library and build; you can also build the -library without getting crypt. Users outside the USA can get the crypt -distribution via anonymous FTP from ftp.uni-c.dk [129.142.6.74], or another -archive site outside the USA. Archive maintainers are encouraged to copy -this distribution to their archives outside the USA. Please get it from -ftp.uni-c.dk; transferring this distribution from prep.ai.mit.edu (or any -other site in the USA) to a site outside the USA is in violation of US -export laws. +provides the Unix `crypt' function, plus some other entry points. +Because of the United States export restriction on DES implementations, +we are distributing this code separately from the rest of the C +library. There is an extra distribution tar file just for crypt; it is +called `glibc-1.07-crypt.tar.gz'. You can just unpack the crypt +distribution along with the rest of the C library and build; you can +also build the library without getting crypt. Users outside the USA +can get the crypt distribution via anonymous FTP from ftp.uni-c.dk +[129.142.6.74], or another archive site outside the USA. Archive +maintainers are encouraged to copy this distribution to their archives +outside the USA. Please get it from ftp.uni-c.dk; transferring this +distribution from prep.ai.mit.edu (or any other site in the USA) to a +site outside the USA is in violation of US export laws. See the file INSTALL to find out how to configure, build, install, and port the GNU C library. -The GNU C Library is completely documented by the Texinfo manual found in -the `manual/' subdirectory. Please send comments on the manual to -bug-glibc-manual@prep.ai.mit.edu, and not to the library bug-reporting address. - -The file NOTES contains a description of the feature-test macros used in -the GNU C library, explaining how you can tell the library what facilities -you want it to make available. +The GNU C Library is completely documented by the Texinfo manual found +in the `manual/' subdirectory. The manual is still being updated and +contains some known errors and omissions; we regret that we do not have +the resources to work on the manual as much as we would like. Please +send comments on the manual to bug-glibc-manual@prep.ai.mit.edu, and +not to the library bug-reporting address. + +The file NOTES contains a description of the feature-test macros used +in the GNU C library, explaining how you can tell the library what +facilities you want it to make available. Send bug reports to bug-glibc@prep.ai.mit.edu. diff -ruN glibc-1.06/Rules glibc-1.07/Rules --- glibc-1.06/Rules Sat May 22 22:30:12 1993 +++ glibc-1.07/Rules Thu Jan 6 20:41:20 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -17,7 +17,8 @@ # Cambridge, MA 02139, USA. # -# Propagated rules for making the GNU C library +# Rules for making a subdirectory in the GNU C library. +# Each subdirectory Makefile defines some variables and includes this. # ifneq (,) This makefile requires GNU Make. @@ -41,6 +42,10 @@ headers := endif +ifneq "$(findstring env,$(origin generated))" "" +generated := +endif + ifeq "$(strip $(headers))" "" ifneq "$(wildcard $(subdir).h)" "" override headers := $(subdir).h @@ -76,6 +81,12 @@ $(dir $<)$(notdir $<) > $@ endif # tests +# Because the link above depends on libc.a, which I don't want built +# automatically, this is necessary. -mib +ifdef mib_hacks +others := +endif + export others := $(others) export tests := $(tests) @@ -100,10 +111,13 @@ .PHONY: subdir_echo-distinfo subdir_echo-distinfo: @echo $(addprefix +header+,$(headers)) \ - $(addprefix +nodist+,$(generated)) - + $(addprefix +nodist+,$(generated) $(dont_distribute)) + +# We want to install everything except the library itself, but update all +# our portions of the library because the parent make will install it later +# (likewise the stubs file). .PHONY: subdir_install -subdir_install: install +subdir_install: install-no-libc.a lib-noranlib stubs .PHONY: subdir_TAGS subdir_TAGS: TAGS @@ -110,8 +124,13 @@ # Make the distribution tarfile for the parent makefile. export distribute := $(distribute) +export dont_distribute := $(dont_distribute) export generated := $(generated) .PHONY: subdir_dist dist subdir_dist: dist dist: ../Make-dist $(MAKE) -f $< $(Make-dist-args) + +# Convenient target to update all the generated source files. +.PHONY: generated +generated: $(generated) diff -ruN glibc-1.06/TAGS glibc-1.07/TAGS --- glibc-1.06/TAGS Sun May 23 00:22:08 1993 +++ glibc-1.07/TAGS Mon Jan 17 22:59:06 1994 @@ -1,24 +1,36 @@ -sysdeps/unix/bsd/m68k/sysdep.S,0 +sysdeps/unix/bsd/m68k/sysdep.S,24 +#define _ERRNO_H19,837 sysdeps/stub/sysdep.c,0 -sysdeps/unix/bsd/vax/sysdep.S,0 +sysdeps/unix/bsd/vax/sysdep.S,24 +#define _ERRNO_H19,837 -sysdeps/unix/bsd/ultrix4/mips/sysdep.S,28 -ENTRY(syscall_error)23,884 +sysdeps/unix/bsd/ultrix4/mips/sysdep.S,52 +#define _ERRNO_H20,862 +ENTRY(syscall_error)25,920 + +sysdeps/unix/bsd/osf1/alpha/sysdep.S,52 +#define _ERRNO_H20,856 +ENTRY(syscall_error)23,894 + +sysdeps/unix/sysv/i386/linux/sysdep.S,24 +#define _ERRNO_H20,851 + +sysdeps/unix/sysv/sysv4/solaris2/sysdep.S,52 +#define _ERRNO_H20,856 +ENTRY(syscall_error)23,894 + +sysdeps/unix/i386/sysdep.S,53 +#define _ERRNO_H20,863 +.globl C_SYMBOL_NAME(23,901 -sysdeps/unix/sysv/i386/linux/sysdep.S,0 - -sysdeps/unix/i386/sysdep.S,63 -.globl C_SYMBOL_NAME(21,858 - movl %eax, C_SYMBOL_NAME(30,996 - set-init.c,26 DEFUN(__libc_init,29,989 version.c,40 -DEFUN_VOID(__libc_print_version)26,961 +DEFUN_VOID(__libc_print_version)26,967 sysdeps/unix/bsd/hp/m68k/start.c,45 #define _start 6,141 @@ -27,21 +39,26 @@ sysdeps/unix/bsd/m68k/start.c,21 #define DUMMIES 1,0 -sysdeps/unix/start.c,205 -#define ARG_DUMMIES 27,946 -#define DECL_DUMMIES 28,975 -#define ARG_DUMMIES30,1015 -#define DECL_DUMMIES31,1035 -#define __environ 38,1120 -void _start 56,1617 -DEFUN_VOID(_start)62,1779 -start1(78,2119 +sysdeps/unix/start.c,207 +#define ARG_DUMMIES 28,1011 +#define DECL_DUMMIES 29,1040 +#define ARG_DUMMIES31,1080 +#define DECL_DUMMIES32,1100 +#define __environ 39,1185 +void _start 57,1718 +DEFUN_VOID(_start)63,1880 +start1(79,2220 sysdeps/stub/start.c,0 -sysdeps/unix/bsd/ultrix4/mips/start.c,55 -#define __environ 35,1134 -DEFUN_VOID(__start)48,1489 +sysdeps/unix/bsd/ultrix4/mips/start.S,48 +#define __environ 22,877 +ENTRY(__start)28,947 + +sysdeps/unix/bsd/osf1/alpha/start.S,115 +#define __environ 22,877 +ENTRY(__start)33,993 + ! We set the GP register by using the address of the ldgp40,1118 sysdeps/unix/sysv/sysv4/solaris2/start.c,52 #define NO_SHLIB1,0 @@ -57,16 +74,15 @@ int syscall 102,2799 DEFUN_VOID(init_shlib)114,3063 -sysdeps/mach/i386/start.c,43 -#define __environ 35,1135 -_start 50,1666 - -sysdeps/mach/hurd/start.c,93 -#define LOSE 56,1715 -_start 67,2131 -count 160,4587 -makevec 182,4907 -_hurd_init 211,5413 +sysdeps/mach/start.c,59 +#define __environ 35,1133 +start1 57,1853 +_start 70,2085 + +sysdeps/mach/hurd/start.c,54 +start1 64,1958 +split_args 138,3879 +_start 182,5254 features.h,479 #define _FEATURES_H 21,858 @@ -87,11 +103,11 @@ #define __extension__136,4229 errno.h,25 -#define _ERRNO_H 25,904 +#define _ERRNO_H 25,910 sys/errno.h,0 -hp300/errnos.h,1960 +hp300/errnos.h,1993 #define EPERM 2,16 #define ENOENT 3,32 #define ESRCH 4,49 @@ -127,49 +143,50 @@ #define EDOM 36,686 #define ERANGE 41,901 #define EWOULDBLOCK 44,1005 -#define EINPROGRESS 45,1028 -#define EALREADY 46,1051 -#define ENOTSOCK 47,1071 -#define EDESTADDRREQ 48,1091 -#define EMSGSIZE 49,1115 -#define EPROTOTYPE 50,1135 -#define ENOPROTOOPT 51,1157 -#define EPROTONOSUPPORT 52,1180 -#define ESOCKTNOSUPPORT 53,1207 -#define EOPNOTSUPP 54,1234 -#define EPFNOSUPPORT 55,1256 -#define EAFNOSUPPORT 56,1280 -#define EADDRINUSE 57,1304 -#define EADDRNOTAVAIL 58,1326 -#define ENETDOWN 59,1351 -#define ENETUNREACH 60,1371 -#define ENETRESET 61,1394 -#define ECONNABORTED 62,1415 -#define ECONNRESET 63,1439 -#define ENOBUFS 64,1461 -#define EISCONN 65,1480 -#define ENOTCONN 66,1499 -#define ESHUTDOWN 67,1519 -#define ETOOMANYREFS 68,1540 -#define ETIMEDOUT 69,1564 -#define ECONNREFUSED 70,1585 -#define ELOOP 71,1609 -#define ENAMETOOLONG 72,1626 -#define EHOSTDOWN 73,1650 -#define EHOSTUNREACH 74,1671 -#define ENOTEMPTY 75,1695 -#define EPROCLIM 76,1716 -#define EUSERS 77,1736 -#define EDQUOT 78,1754 -#define ESTALE 79,1772 -#define EREMOTE 80,1790 -#define ENOMSG 81,1809 -#define EBADMSG 82,1827 -#define EIDRM 83,1846 -#define EDEADLK 84,1863 -#define ENOLCK 85,1882 -#define ENOSYS 86,1900 -#define __Emath_defined 90,1996 +#define EWOULDBLOCK_sys 45,1059 +#define EINPROGRESS 46,1127 +#define EALREADY 47,1150 +#define ENOTSOCK 48,1170 +#define EDESTADDRREQ 49,1190 +#define EMSGSIZE 50,1214 +#define EPROTOTYPE 51,1234 +#define ENOPROTOOPT 52,1256 +#define EPROTONOSUPPORT 53,1279 +#define ESOCKTNOSUPPORT 54,1306 +#define EOPNOTSUPP 55,1333 +#define EPFNOSUPPORT 56,1355 +#define EAFNOSUPPORT 57,1379 +#define EADDRINUSE 58,1403 +#define EADDRNOTAVAIL 59,1425 +#define ENETDOWN 60,1450 +#define ENETUNREACH 61,1470 +#define ENETRESET 62,1493 +#define ECONNABORTED 63,1514 +#define ECONNRESET 64,1538 +#define ENOBUFS 65,1560 +#define EISCONN 66,1579 +#define ENOTCONN 67,1598 +#define ESHUTDOWN 68,1618 +#define ETOOMANYREFS 69,1639 +#define ETIMEDOUT 70,1663 +#define ECONNREFUSED 71,1684 +#define ELOOP 72,1708 +#define ENAMETOOLONG 73,1725 +#define EHOSTDOWN 74,1749 +#define EHOSTUNREACH 75,1770 +#define ENOTEMPTY 76,1794 +#define EPROCLIM 77,1815 +#define EUSERS 78,1835 +#define EDQUOT 79,1853 +#define ESTALE 80,1871 +#define EREMOTE 81,1889 +#define ENOMSG 82,1908 +#define EBADMSG 83,1926 +#define EIDRM 84,1945 +#define EDEADLK 85,1962 +#define ENOLCK 86,1981 +#define ENOSYS 87,1999 +#define __Emath_defined 91,2095 sysdeps/stub/errnos.h,172 #define __Emath_defined 23,972 @@ -262,6 +279,87 @@ #define ENOSYS 152,6606 #define EFTYPE 154,6658 +sysdeps/mach/hurd/errnos.h,2017 +#define _HURD_ERRNO(6,153 +#define EPERM 7,208 +#define ENOENT 8,278 +#define ESRCH 9,350 +#define EINTR 10,412 +#define EIO 11,482 +#define ENXIO 12,547 +#define E2BIG 13,615 +#define ENOEXEC 14,684 +#define EBADF 15,748 +#define ECHILD 16,814 +#define EDEADLK 17,880 +#define ENOMEM 18,953 +#define EACCES 19,1023 +#define EFAULT 20,1088 +#define ENOTBLK 21,1147 +#define EBUSY 22,1216 +#define EEXIST 23,1275 +#define EXDEV 24,1334 +#define ENODEV 25,1407 +#define ENOTDIR 26,1488 +#define EISDIR 27,1551 +#define EINVAL 28,1613 +#define EMFILE 29,1677 +#define ENFILE 30,1744 +#define ENOTTY 31,1821 +#define ETXTBSY 32,1899 +#define EFBIG 33,1961 +#define ENOSPC 34,2023 +#define ESPIPE 35,2094 +#define EROFS 36,2154 +#define EMLINK 37,2223 +#define EPIPE 38,2285 +#define EDOM 41,2461 +#define ERANGE 46,2744 +#define EAGAIN 49,2907 +#define EWOULDBLOCK 50,2987 +#define EINPROGRESS 51,3056 +#define EALREADY 52,3129 +#define ENOTSOCK 53,3206 +#define EDESTADDRREQ 54,3284 +#define EMSGSIZE 55,3360 +#define EPROTOTYPE 56,3424 +#define ENOPROTOOPT 57,3502 +#define EPROTONOSUPPORT 58,3572 +#define ESOCKTNOSUPPORT 59,3642 +#define EOPNOTSUPP 60,3715 +#define EPFNOSUPPORT 61,3786 +#define EAFNOSUPPORT 62,3863 +#define EADDRINUSE 63,3958 +#define EADDRNOTAVAIL 64,4028 +#define ENETDOWN 65,4106 +#define ENETUNREACH 66,4169 +#define ENETRESET 67,4239 +#define ECONNABORTED 68,4322 +#define ECONNRESET 69,4402 +#define ENOBUFS 70,4474 +#define EISCONN 71,4547 +#define ENOTCONN 72,4622 +#define ESHUTDOWN 73,4693 +#define ETIMEDOUT 74,4773 +#define ECONNREFUSED 75,4841 +#define ELOOP 76,4907 +#define ENAMETOOLONG 77,4988 +#define EHOSTDOWN 78,5054 +#define EHOSTUNREACH 79,5114 +#define ENOTEMPTY 80,5178 +#define EUSERS 81,5245 +#define EDQUOT 82,5307 +#define ESTALE 83,5374 +#define EREMOTE 84,5443 +#define ENOLCK 85,5524 +#define ENOSYS 86,5590 +#define EBACKGROUND 87,5662 +#define ED 88,5756 +#define EGREGIOUS 89,5805 +#define EIEIO 90,5881 +#define EGRATUITOUS 91,5953 +#define _HURD_ERRNOS 92,6017 + limits.h,555 #define _LIMITS_H 25,925 #define CHAR_BIT 55,1621 @@ -285,64 +383,68 @@ #define LONG_MAX 101,2793 #define ULONG_MAX 104,2890 -stddef.h,1113 -#define _STDDEF_H10,368 -#define _STDDEF_H_11,386 -#define _ANSI_STDDEF_H13,455 -#define _SIZE_T30,1006 -#define _PTRDIFF_T33,1049 -#define _WCHAR_T36,1093 -#define _PTRDIFF_T74,2304 -#define _T_PTRDIFF_75,2323 -#define _T_PTRDIFF76,2343 -#define __PTRDIFF_T77,2362 -#define _PTRDIFF_T_78,2382 -#define ___int_ptrdiff_t_h79,2402 -#define _GCC_PTRDIFF_T80,2429 -#define __PTRDIFF_TYPE__ 82,2477 -typedef __PTRDIFF_TYPE__ ptrdiff_t;84,2518 -#define _SIZE_T112,3266 -#define _SYS_SIZE_T_H113,3282 -#define _T_SIZE_114,3304 -#define _T_SIZE115,3321 -#define __SIZE_T116,3337 -#define _SIZE_T_117,3354 -#define ___int_size_t_h118,3371 -#define _GCC_SIZE_T119,3395 -#define _SIZET_120,3415 -#define __SIZE_TYPE__ 122,3453 -typedef __SIZE_TYPE__ size_t;124,3500 -#define _WCHAR_T153,4295 -#define _T_WCHAR_154,4312 -#define _T_WCHAR155,4330 -#define __WCHAR_T156,4347 -#define _WCHAR_T_157,4365 -#define ___int_wchar_t_h158,4383 -#define _GCC_WCHAR_T159,4408 -#define __WCHAR_TYPE__ 161,4452 -typedef __wchar_t wchar_t;166,4608 -typedef __WCHAR_TYPE__ wchar_t;169,4700 -#define NULL 201,5297 -#define offsetof(209,5478 +stddef.h,1228 +#define _STDDEF_H11,389 +#define _STDDEF_H_12,407 +#define _ANSI_STDDEF_H14,476 +#define __STDDEF_H__16,527 +#define _SIZE_T33,1076 +#define _PTRDIFF_T36,1119 +#define _WCHAR_T39,1163 +#define _PTRDIFF_T77,2374 +#define _T_PTRDIFF_78,2393 +#define _T_PTRDIFF79,2413 +#define __PTRDIFF_T80,2432 +#define _PTRDIFF_T_81,2452 +#define ___int_ptrdiff_t_h82,2472 +#define _GCC_PTRDIFF_T83,2499 +#define __PTRDIFF_TYPE__ 85,2547 +typedef __PTRDIFF_TYPE__ ptrdiff_t;87,2588 +#define _SIZE_T116,3353 +#define _SYS_SIZE_T_H117,3369 +#define _T_SIZE_118,3391 +#define _T_SIZE119,3408 +#define __SIZE_T120,3424 +#define _SIZE_T_121,3441 +#define ___int_size_t_h122,3458 +#define _GCC_SIZE_T123,3482 +#define _SIZET_124,3502 +#define __size_t125,3518 +#define __SIZE_TYPE__ 127,3557 +typedef __SIZE_TYPE__ size_t;130,3650 +#define _WCHAR_T163,4565 +#define _T_WCHAR_164,4582 +#define _T_WCHAR165,4600 +#define __WCHAR_T166,4617 +#define _WCHAR_T_167,4635 +#define _WCHAR_T_H168,4653 +#define ___int_wchar_t_h169,4672 +#define __INT_WCHAR_T_H170,4697 +#define _GCC_WCHAR_T171,4721 +#define __WCHAR_TYPE__ 173,4765 +typedef __wchar_t wchar_t;178,4921 +typedef __WCHAR_TYPE__ wchar_t;181,5013 +#define NULL 215,5624 +#define offsetof(223,5805 stdarg.h,513 #define _STDARG_H9,243 #define _ANSI_STDARG_H_10,261 -#define __GNUC_VA_LIST47,922 -typedef char *__gnuc_va_list;49,1004 -typedef void *__gnuc_va_list;51,1040 -#define __va_rounded_size(62,1341 -#define va_start(65,1448 -#define va_end(70,1607 -#define va_arg(77,1912 -#define va_arg(82,2176 -#define _VA_LIST_121,3426 -#define _VA_LIST 124,3477 -typedef __gnuc_va_list va_list;127,3531 -#define _VA_LIST_T_H140,4059 -#define _VA_LIST_142,4138 -#define _VA_LIST144,4163 -typedef __gnuc_va_list va_list;145,4180 +#define __GNUC_VA_LIST50,998 +typedef char *__gnuc_va_list;52,1080 +typedef void *__gnuc_va_list;54,1116 +#define __va_rounded_size(65,1417 +#define va_start(68,1524 +#define va_end(73,1683 +#define va_arg(80,2010 +#define va_arg(85,2274 +#define _VA_LIST_125,3547 +#define _VA_LIST 128,3598 +typedef __gnuc_va_list va_list;131,3652 +#define _VA_LIST_T_H144,4202 +#define _VA_LIST_146,4303 +#define _VA_LIST148,4328 +typedef __gnuc_va_list va_list;149,4345 va-alpha.h,331 #define __GNUC_VA_LIST11,365 @@ -359,25 +461,26 @@ #define __va_tsize(85,2008 #define va_arg(88,2115 -va-i860.h,494 +va-i860.h,519 #define __GNUC_VA_LIST10,305 } __f_regs;15,385 -} __va_saved_regs;23,597 -} __gnuc_va_list;37,1253 -#define va_alist 47,1486 -#define va_dcl48,1522 -#define va_start(49,1537 -#define va_start(56,1783 -#define va_end(92,2653 -#define __NUM_PARM_FREGS 94,2675 -#define __NUM_PARM_IREGS 95,2702 -#define __savereg(97,2731 -#define __ireg_used 108,3140 -#define __freg_used 109,3170 -#define __mem_ptr 110,3200 -#define __reg_base 111,3226 -#define __extension__117,3348 -#define va_arg(120,3378 +} __va_saved_regs;23,622 +} __gnuc_va_list;37,1303 +#define va_alist 47,1536 +#define va_dcl 49,1598 +#define va_dcl51,1651 +#define va_start(53,1691 +#define va_start(60,1937 +#define va_end(96,2807 +#define __NUM_PARM_FREGS 98,2829 +#define __NUM_PARM_IREGS 99,2856 +#define __savereg(101,2885 +#define __ireg_used 112,3294 +#define __freg_used 113,3324 +#define __mem_ptr 114,3354 +#define __reg_base 115,3380 +#define __extension__121,3502 +#define va_arg(124,3532 va-i960.h,376 #define __GNUC_VA_LIST6,105 @@ -395,7 +498,7 @@ #define va_arg(52,1610 #define va_end(66,1996 -va-m88k.h,396 +va-m88k.h,422 #define __GNUC_VA_LIST6,107 } __gnuc_va_list;13,295 #define va_start(23,564 @@ -406,25 +509,30 @@ #define va_dcl 42,1224 #define __gnuc_va_list 53,1598 #define _VA_LIST54,1629 -#define __INT_VARARGS_H57,1729 -#define __va_reg_p(60,1761 -#define __va_size(64,1905 -#define va_arg(68,2077 -#define va_end(77,2466 +#define _VA_LIST_55,1646 +#define __INT_VARARGS_H58,1747 +#define __va_reg_p(61,1779 +#define __va_size(65,1923 +#define va_arg(69,2095 +#define va_end(78,2484 -va-mips.h,335 +va-mips.h,443 #define __GNUC_VA_LIST15,463 typedef char * __gnuc_va_list;16,486 #define __va_ellipsis 27,834 #define __va_ellipsis29,866 -#define __va_rounded_size(32,896 -#define va_start(36,1024 -#define va_alist 40,1139 -#define va_dcl 41,1176 -#define va_start(42,1232 -#define va_end(48,1379 -#define va_arg(54,1572 -#define va_arg(62,1879 +#define __va_rounded_size(33,910 +#define __va_rounded_size(36,993 +#define va_start(42,1142 +#define va_start(44,1213 +#define va_alist 49,1335 +#define va_dcl 52,1452 +#define va_dcl 54,1524 +#define va_start(56,1587 +#define va_end(62,1734 +#define va_arg(67,1891 +#define va_arg(73,2144 +#define va_arg(81,2451 va-pa.h,334 #define __GNUC_VA_LIST5,54 diff -ruN glibc-1.06/conf/portability.h glibc-1.07/conf/portability.h --- glibc-1.06/conf/portability.h Wed May 19 16:01:06 1993 +++ glibc-1.07/conf/portability.h Mon Jun 28 00:37:09 1993 @@ -4,3 +4,10 @@ files from future BIND distributions without change. */ #include + +/* Some BIND code decides it can omit the definitions of some functions + if BSD is defined to some value. That might make sense when the BIND + code is augmenting or replacing an existing system library, but we can + never omit a function here, since we are defining the system library. */ + +#undef BSD diff -ruN glibc-1.06/config.guess glibc-1.07/config.guess --- glibc-1.06/config.guess Wed May 19 16:24:48 1993 +++ glibc-1.07/config.guess Thu Jan 6 17:02:08 1994 @@ -17,10 +17,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ # -# This script attempts to guess a cononical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it prints an error message on stderr, and -# exits with 1. +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). @@ -38,10 +37,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:1.*:*) + # 1.2 uses "1.2" for uname -r. echo alpha-dec-osf${UNAME_RELEASE} exit 0 ;; - sun4*:SunOS:[5-9].*:*) - echo sparc-sun-solaris2 + alpha:OSF1:V1.*:*) + # 1.3 uses "V1.3" for uname -r. + echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + sun4*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) echo sparc-sun-sunos${UNAME_RELEASE} @@ -55,6 +68,9 @@ VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; + mips:*:5*:RISCos) + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; @@ -61,6 +77,19 @@ m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; + AViiON:dgux:*:*) + echo m88k-dg-dgux${UNAME_RELEASE} + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; *:IRIX:*:*) echo mips-sgi-irix${UNAME_RELEASE} exit 0 ;; @@ -76,12 +105,21 @@ *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; 9000/31?:HP-UX:*:*) echo m68000-hp-hpux exit 0 ;; - 9000/3??:HP-UX:*:*) + 9000/[34]??:HP-UX:*:*) echo m68k-hp-hpux exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; 9000/7??:HP-UX:*:* | 9000/8?7:HP-UX:*:* ) echo hppa1.1-hp-hpux exit 0 ;; @@ -88,6 +126,39 @@ 9000/8??:HP-UX:*:*) echo hppa1.0-hp-hpux exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; C1*:ConvexOS:*:*) echo c1-convex-bsd exit 0 ;; @@ -103,11 +174,21 @@ CRAY-2:UNICOS:*:*) echo cray2-cray-unicos exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + i[34]86:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd${UNAME_RELEASE} + exit 0 ;; i[34]86:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; i[34]86:UNIX_SV:4.*:*) - echo i486-unknown-sysv4 + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + fi exit 0 ;; i[34]86:*:3.2:*) if /bin/uname -X 2>/dev/null >/dev/null ; then @@ -115,7 +196,7 @@ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL else - echo ${UNAME_MACHINE}-unknown-sysv3.2 + echo ${UNAME_MACHINE}-unknown-sysv32 fi exit 0 ;; mini*:CTIX:SYS*5:*) @@ -122,9 +203,23 @@ # "miniframe" echo m68010-convergent-sysv exit 0 ;; + M680[234]0:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:*) + uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m680[234]0:LynxOS:2.2*:*) + echo m68k-lynx-lynxos${UNAME_RELEASE} + exit 0 ;; + i[34]86:LynxOS:2.2*:*) + echo i386-lynx-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.2*:*) + echo sparc-lynx-lynxos${UNAME_RELEASE} + exit 0 ;; esac -echo '(No uname command or uname output not recognized.)' 1>&2 +#echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >dummy.c <&2 +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +#echo '(Unable to guess system type)' 1>&2 exit 1 diff -ruN glibc-1.06/config.sub glibc-1.07/config.sub --- glibc-1.06/config.sub Thu May 6 14:05:27 1993 +++ glibc-1.07/config.sub Sun Jan 16 14:30:35 1994 @@ -1,6 +1,6 @@ #!/bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -65,12 +65,23 @@ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) os= basic_machine=$1 ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` @@ -89,15 +100,19 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; + -lynx) + os=-lynxos + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in - # Recognize the basic CPU types with without company name. + # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | sparclite | i370 | sh) + | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ + | powerpc) basic_machine=$basic_machine-unknown ;; # Object if more than one company name word. @@ -105,7 +120,7 @@ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; - # Recognize the basic CPU types with with company name. + # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ @@ -112,45 +127,47 @@ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | sh-*) + | sh-* | powerpc-*) ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - vaxv) - basic_machine=vax-dec - os=-sysv + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att ;; - vms) - basic_machine=vax-dec - os=-vms + 3b*) + basic_machine=we32k-att ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs + alliant | fx80) + basic_machine=fx80-alliant ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` - os=-sysv32 + altos | altos3068) + basic_machine=m68k-altos ;; - i[34]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` - os=-sysv4 + am29k) + basic_machine=a29k-none + os=-bsd ;; - i[34]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + amdahl) + basic_machine=580-amdahl os=-sysv ;; - i[34]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` - os=-solaris2 + amiga) + basic_machine=m68k-cbm ;; - spur) - basic_machine=spur-unknown + amigados) + basic_machine=m68k-cbm + os=-amigados ;; - alliant | fx80) - basic_machine=fx80-alliant + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -171,16 +188,36 @@ basic_machine=c38-convex os=-bsd ;; - m88k-omron*) - basic_machine=m88k-omron + cray | ymp) + basic_machine=ymp-cray + os=-unicos ;; - merlin) - basic_machine=ns32k-utek - os=-sysv + cray2) + basic_machine=cray2-cray + os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; elxsi) basic_machine=elxsi-elxsi os=-bsd @@ -188,9 +225,71 @@ encore | umax | mmax) basic_machine=ns32k-encore ;; + fx2800) + basic_machine=i860-alliant + ;; genix) basic_machine=ns32k-ns ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + os=-hpux + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv32 + ;; + i[34]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv4 + ;; + i[34]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-sysv + ;; + i[34]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + os=-solaris2 + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -201,30 +300,95 @@ ;; esac ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + news1000) + basic_machine=m68030-sony + os=-newsos ;; - 3b*) - basic_machine=we32k-att + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola + next) + basic_machine=m68k-next + os=-bsd ;; - balance) - basic_machine=ns32k-sequent - os=-dynix + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; pc532) basic_machine=ns32k-pc532 ;; - symmetry) - basic_machine=i386-sequent - os=-dynix + pn) + basic_machine=pn-gould + ;; + ps2) + basic_machine=i386-ibm + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown ;; sun2) basic_machine=m68000-sun @@ -259,165 +423,30 @@ sun4) basic_machine=sparc-sun ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; - ps2) - basic_machine=i386-ibm - ;; - fx2800) - basic_machine=i860-alliant - ;; - next) - basic_machine=m68k-next - os=-bsd - ;; - amiga) - basic_machine=m68k-cbm - ;; - amigados) - basic_machine=m68k-cbm - os=-amigados - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k31[0-9] | hp9k2[0-9][0-9]) - basic_machine=m68000-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - miniframe) - basic_machine=m68000-convergent + symmetry) + basic_machine=i386-sequent + os=-dynix ;; tower | tower-32) basic_machine=m68k-ncr ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx2) - basic_machine=m68k-bull - os=-sysv - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - os=-hpux - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - os=-hpux - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - pn) - basic_machine=pn-gould - ;; - np1) - basic_machine=np1-gould - ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -426,6 +455,10 @@ basic_machine=m68k-wrs os=-vxworks ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -483,7 +516,7 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ "$os" ] +if [ x"$os" != x"" ] then case $os in # -solaris* is a basic system type, with this one exception. @@ -490,15 +523,20 @@ -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; + -solaris) + os=-solaris2 + ;; # First accept the basic system types. # The portable systems comes first. # Each alternative must end in a *, to match a version number. - -bsd* | -sysv* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \ | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* ) + | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -riscix* | -lynxos*) ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` @@ -536,6 +574,12 @@ -svr3) os=-sysv3 ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; -xenix) os=-xenix ;; @@ -561,6 +605,9 @@ # system, and we'll never get to this point. case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; *-dec | vax-*) os=-ultrix4.2 ;; @@ -585,6 +632,9 @@ *-hp) os=-hpux ;; + *-hitachi) + os=-hiux + ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; @@ -645,14 +695,23 @@ case $basic_machine in *-unknown) case $os in + -riscix*) + vendor=acorn + ;; -sunos*) vendor=sun ;; + -lynxos*) + vendor=lynx + ;; -aix*) vendor=ibm ;; -hpux*) vendor=hp + ;; + -hiux*) + vendor=hitachi ;; -unos*) vendor=crds diff -ruN glibc-1.06/configure glibc-1.07/configure --- glibc-1.06/configure Sun May 23 00:18:22 1993 +++ glibc-1.07/configure Sun Jan 16 00:42:20 1994 @@ -3,7 +3,7 @@ # Configuration script for the GNU C Library. # DO NOT EDIT! This script is generated from configure.in; edit that instead. -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -38,98 +38,104 @@ exec_prefix= verbose= +next= lose= for arg in $*; do if [ x$next != x ]; then - eval "$next = \$arg" + eval "$next=\$arg" next= else case $arg in - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) - srcdir=`echo $arg | sed 's/-*s[a-z]*=//'` - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) - next=srcdir - ;; - -target | --target | --targe | --targ | --tar | --ta | --t) - next=target - ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target=`echo $arg | sed 's/-*t[a-z]*=//'` - ;; - - -with-gnu-ld | --with-gnu-ld | --with-gnu-l) - gnu_ld=--with-gnu-ld - ;; - - -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a) - gnu_as=--with-gnu-as - ;; - - -nfp | --nfp | --nf | --n) - nfp=--nfp - ;; - - -with-* | --with-*) - ;; # ignored - - -x | --x) - ;; # ignored - - -os-release=* | -os-releas=* | -os-relea=* | -os-rele=* | -os-rel=* \ - | -os-re=* | -os-r=* | --os-release=* | --os-releas=* | --os-relea=* \ - | --os-rele=* | --os-rel=* | --os-re=* | --os-r=*) - release=`echo $arg | sed 's/-*os-r[a-z]*=//'` - ;; - -os-release | -os-releas | -os-relea | -os-rele | -os-rel \ - | -os-re | -os-r | --os-release | --os-releas | --os-relea \ - | --os-rele | --os-rel | --os-re | --os-r) - next=release - ;; - - -os-version=* | -os-versio=* | -os-versi=* | -os-vers=* | -os-ver=* \ - | -os-ver=* | -os-ve=* | -os-v=* | --os-version=* | --os-versio=* \ - | --os-versi=* | --os-vers=* | --os-ver=* | --os-ver=* | --os-ve=* \ - | --os-v=*) - version=`echo $arg | sed 's/-*os-v[a-z]*=//'` - ;; - -os-version | -os-versio | -os-versi | -os-vers | -os-ver \ - | -os-ver | -os-ve | -os-v |--os-version | --os-versio \ - | --os-versi | --os-vers | --os-ver | --os-ver | --os-ve | --os-v) - next=version - ;; - - # For backward compatibility, also recognize exact --exec_prefix. - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) - exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` - ;; - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) - next=exec_prefix - ;; - - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=`echo $arg | sed 's/[-a-z_]*=//'` - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - next=prefix - ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v) - # Autoconf-generated code below will test this. - verbose=yes - ;; - - -*) - echo "Invalid option \`$arg'" 1>&2 - lose=yes - ;; - *) - if [ ! "$target" ]; then - target=$arg - else - lose=yes - fi - ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) + srcdir=`echo $arg | sed 's/-*s[a-z]*=//'` + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) + next=srcdir + ;; + -target | --target | --targe | --targ | --tar | --ta | --t) + next=target + ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target=`echo $arg | sed 's/-*t[a-z]*=//'` + ;; + + -with-gnu-ld | --with-gnu-ld | --with-gnu-l) + gnu_ld=--with-gnu-ld + ;; + + -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a) + gnu_as=--with-gnu-as + ;; + + -nfp | --nfp | --nf | --n) + nfp=--nfp + ;; + + -with-* | --with-*) + # For `--with-foo=bar', do "with_foo='bar'". + # For `--with-fnord', do "with_fnord=yes". + # These variables may be examined by sysdep configure fragments. + eval `echo "$arg" | sed '{s/^-*//;s/-/_/g +s/^\([^=]*\)=\(.*\)$/\1='\''\2'\''/;s/^\([^=]*\)$/\1=yes/;}'` + ;; + + -x | --x) + ;; # ignored + + -os-release=* | -os-releas=* | -os-relea=* | -os-rele=* | -os-rel=* \ + | -os-re=* | -os-r=* | --os-release=* | --os-releas=* | --os-relea=* \ + | --os-rele=* | --os-rel=* | --os-re=* | --os-r=*) + release=`echo $arg | sed 's/-*os-r[a-z]*=//'` + ;; + -os-release | -os-releas | -os-relea | -os-rele | -os-rel \ + | -os-re | -os-r | --os-release | --os-releas | --os-relea \ + | --os-rele | --os-rel | --os-re | --os-r) + next=release + ;; + + -os-version=* | -os-versio=* | -os-versi=* | -os-vers=* | -os-ver=* \ + | -os-ver=* | -os-ve=* | -os-v=* | --os-version=* | --os-versio=* \ + | --os-versi=* | --os-vers=* | --os-ver=* | --os-ver=* | --os-ve=* \ + | --os-v=*) + version=`echo $arg | sed 's/-*os-v[a-z]*=//'` + ;; + -os-version | -os-versio | -os-versi | -os-vers | -os-ver \ + | -os-ver | -os-ve | -os-v |--os-version | --os-versio \ + | --os-versi | --os-vers | --os-ver | --os-ver | --os-ve | --os-v) + next=version + ;; + + # For backward compatibility, also recognize exact --exec_prefix. + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) + exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` + ;; + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) + next=exec_prefix + ;; + + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=`echo $arg | sed 's/[-a-z_]*=//'` + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + next=prefix + ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v) + # Autoconf-generated code below will test this. + verbose=yes + ;; + + -*) + echo "Invalid option \`$arg'" 1>&2 + lose=yes + ;; + *) + if [ ! "$target" ]; then + target=$arg + else + lose=yes + fi + ;; esac fi done @@ -141,15 +147,19 @@ fi -trap 'rm -f conftest* core; exit 1' 1 3 15 - -# Needed for some versions of `tr' so that character classes in `[]' work. -if test "${LANG+set}" = "set" ; then - LANG=C -fi +trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 3 15 +trap 'rm -f confdefs* $ac_clean_files' 0 -rm -f conftest* -compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1' +# NLS nuisances. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi + +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h +compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1' # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. @@ -183,10 +193,19 @@ esac +# Save the original args to write them into config.status later. +configure_args="$*" + + +# Decanonicalize srcdir so we can tell when we are configuring in srcdir. +if [ "`(cd ${srcdir}; pwd)`" = "`pwd`" ]; then + srcdir=. +fi + if [ ! "$target" ]; then - echo 'No target given. Trying to guess target...' target=`$srcdir/config.guess` + test -n "$target" && echo "No target given; guessing target is ${target}." fi if [ "$lose" = yes -o ! "$target" ]; then @@ -199,6 +218,20 @@ exit 1 fi +# Done parsing the arguments. + +# This will get text that should go into config.make. +config_vars= + +# Check for a --with-gmp argument and set gmp-srcdir in config.make. +case "$with_gmp" in +yes) echo "$prog: --with-gmp requires an argument; use --with-gmp=DIRECTORY" + exit 1 ;; +'') ;; +*) config_vars="$config_vars +gmp-srcdir = $with_gmp" ;; +esac + # Canonicalize the configuration name. config=`$srcdir/config.sub $target` if [ ! "$config" ]; then @@ -210,15 +243,44 @@ # machine-vendor-os eval "`echo $config | \ - sed 's/^\(.*\)-\(.*\)-\(.*\)$/machine=\1 vendor=\2 os=\3/'`" + sed 's/^\(.*\)-\(.*\)-\(.*\)$/\ +config_machine=\1 config_vendor=\2 config_os=\3/'`" -# Make sco3.2v4 become sco3.2.4. -os="`echo $os | sed 's/\([0-9]\)v\([0-9]\)/\1.\2/g'`" +# We keep the original values in `$config_*' and never modify them, so we +# can write them unchanged into config.make. Everything else uses +# $machine, $vendor, and $os, and changes them whenever convenient. +machine=$config_machine +vendor=$config_vendor +os=$config_os + +# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1. +os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`" + +case "$machine" in +i[34]86) + machine=i386/$machine ;; +sparc[6789]) + machine=sparc/$machine ;; +m68k) + machine=m68k/m68020 ;; +m680?0) + machine=m68k/$machine ;; +m88k) + machine=m88k/m88100 ;; +m88???) + machine=m88k/$machine ;; +mips|r2000) + machine=mips/r3000 ;; +r[34]000) + machine=mips/$machine ;; +esac case "$os" in gnu*) - os=mach/hurd ;; -sunos* | ultrix* | newsos* | dynix* | bsd*) + base_os=mach/hurd ;; +netbsd* | 386bsd*) + base_os=unix/bsd/bsd4.4 ;; +osf1* | sunos* | ultrix* | newsos* | dynix* | *bsd*) base_os=unix/bsd ;; linux* | sysv* | isc* | esix* | sco* | minix*) base_os=unix/sysv ;; @@ -226,8 +288,8 @@ base_os=unix/sysv/sysv4 ;; esac -case "$os" in -gnu* | linux*) +case "$os:$base_os" in +gnu* | linux* | bsd4.4* | *:bsd4.4) gnu_ld=--with-gnu-ld gnu_as=--with-gnu-as esac @@ -253,12 +315,21 @@ tail="$2" done +# For sparc/sparc9, try sparc/sparc9 and then sparc. +mach= +tail=$machine +while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; [ "$m" ]; do + set $m + mach="$mach /$1" + tail="$2" +done + # Find what sysdep directories exist. sysnames= for b in $base ''; do for v in /$vendor ''; do for o in /$ostry ''; do - for m in /$machine ''; do + for m in $mach ''; do if [ -d $sysdep_dir$b$v$o$m ]; then sysnames="$sysnames $b$v$o$m" [ "$o" -o "$b" ] && os_used=t @@ -345,9 +416,6 @@ echo Using system-dependent files from directories: for dir in $sysnames; do echo " $dir"; done -# This will get text that should go into config.make. -config_vars= - # Make sure to not get the incompatible SysV /etc/install and # /usr/sbin/install, which might be in PATH before a BSD-like install, # or the SunOS /usr/etc/install directory, or the AIX /bin/install, @@ -359,9 +427,9 @@ echo checking for install IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" for dir in $PATH; do - test -z "$dir" && dir=. - case $dir in - /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;; + #test -z "$dir" && dir=. + case "$dir" in + ''|.|/etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;; *) if test -f $dir/installbsd; then INSTALL="$dir/installbsd -c" # OSF1 @@ -384,9 +452,22 @@ done IFS="$saveifs" fi -INSTALL=${INSTALL-cp} +if test -z "$INSTALL"; then + if test -f ${srcdir}/install.sh; then + # As a last resort, use the slow shell script. + # We want the top-level source directory, not the subdir's srcdir, + # so expand srcdir now rather than in the Makefile. + INSTALL="${srcdir}/install.sh -c" + else + echo "warning: ${srcdir}/install.sh not found; using cp" + INSTALL=cp + fi +fi +test -n "$verbose" && echo " setting INSTALL to $INSTALL" INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'} +test -n "$verbose" && echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM" INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'} +test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA" if test -z "$RANLIB"; then # Extract the first word of `ranlib', so it can be a program name with args. @@ -403,7 +484,7 @@ IFS="$saveifs" fi test -z "$RANLIB" && RANLIB=":" -test -n "$RANLIB" -a -n "$verbose" && echo " setting RANLIB to $RANLIB" +test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB" if test -z "$CC"; then @@ -421,7 +502,7 @@ IFS="$saveifs" fi test -z "$CC" && CC="cc" -test -n "$CC" -a -n "$verbose" && echo " setting CC to $CC" +test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC" # Find out if we are using GNU C, under whatever name. cat > conftest.c < conftest.c < +Syntax Error +EOF +err=`eval "($CPP conftest.c >/dev/null) 2>&1"` +if test -z "$err"; then + : +else + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" cat > conftest.c < +Syntax Error EOF -err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"` +err=`eval "($CPP conftest.c >/dev/null) 2>&1"` if test -z "$err"; then : else + rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi +rm -f conftest* +fi +test ".${verbose}" != "." && echo " setting CPP to $CPP" echo checking for signed size_t type @@ -457,18 +558,45 @@ eval "$CPP conftest.c 2>/dev/null" \ | grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null \ || { -test -n "$verbose" && \ -echo ' defining' __SIZE_TYPE__ to be 'unsigned' -DEFS="$DEFS -D__SIZE_TYPE__=unsigned" + DEFS="$DEFS -U__SIZE_TYPE__ -D__SIZE_TYPE__=unsigned" + (echo '#undef __SIZE_TYPE__'; + echo '#define __SIZE_TYPE__ unsigned') >> confdefs.h + test -n "$verbose" && echo ' using unsigned int for size_t' } - rm -f conftest* -echo '#include ' > conftest.c -eval "$CPP \$DEFS conftest.c > conftest.out 2>&1" +echo '#include "confdefs.h" +#include ' > conftest.c +eval "$CPP conftest.c > conftest.out 2>&1" if egrep "__gnuc_va_list" conftest.out >/dev/null 2>&1; then + rm -rf conftest* config_vars="$config_vars stdarg.h = # The installed defines __gnuc_va_list." + +fi +rm -f conftest* + + +echo checking for libc-friendly stddef.h +cat > conftest.c < +#define __need_NULL +#include +int main() { exit(0); } +int t() { size_t size; wchar_t wchar; +#ifdef offsetof +#error stddef.h ignored __need_* +#endif +if (&size == NULL || &wchar == NULL) abort (); } +EOF +if eval $compile; then + rm -rf conftest* + config_vars="$config_vars +stddef.h = # The installed seems to be libc-friendly." + fi rm -f conftest* @@ -560,7 +688,7 @@ #define UNAME_SYSNAME "${sysname}" #define UNAME_RELEASE "${release}" #define UNAME_VERSION "${version}" -#define UNAME_MACHINE "${machine}-${vendor}" +#define UNAME_MACHINE "${config_machine}-${config_vendor}" END system_name="$sysname $release version $version on $vendor $machine" @@ -579,9 +707,9 @@ ( echo '# This file was generated automatically by configure. Do not edit.' echo '# Put configuration parameters in configparms instead.' - echo "config-machine = ${machine}" - echo "config-vendor = ${vendor}" - echo "config-os = ${os}" + echo "config-machine = ${config_machine}" + echo "config-vendor = ${config_vendor}" + echo "config-os = ${config_os}" echo "config-sysdirs = ${sysnames}" if [ "$prefix" ]; then echo "prefix = ${prefix}" @@ -598,18 +726,6 @@ echo "Wrote config.make in $PWD." switches= -if [ "$gnu_as" ]; then - switches="$switches --with-gnu-as" -fi -if [ "$gnu_ld" ]; then - switches="$switches --with-gnu-ld" -fi -if [ "$exec_prefix" ]; then - switches="$switches --exec_prefix=$exec_prefix" -fi -if [ "$prefix" ]; then - switches="$switches --prefix=$prefix" -fi if [ "$release" ]; then switches="$switches --os-release='$release'" fi @@ -629,7 +745,7 @@ srcdir = $srcdir all .DEFAULT: - \$(MAKE) -C \$(srcdir) ARCH=$objdir \$@ + \$(MAKE) -C \$(srcdir) ARCH=\`pwd\` \$@ END echo "Wrote Makefile in $PWD." @@ -640,9 +756,21 @@ # This file was generated automatically by configure. Do not edit. # The GNU C library was configured in $PWD for # $system_name as follows: -$0 $config --srcdir=$srcdir $switches +$0 $configure_args $switches \$* END chmod a+x config.status echo "Wrote config.status in $PWD." exit 0 +s%@INSTALL@%$INSTALL%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@RANLIB@%$RANLIB%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +INSTALL='$INSTALL' +INSTALL_PROGRAM='$INSTALL_PROGRAM' +INSTALL_DATA='$INSTALL_DATA' +RANLIB='$RANLIB' +CC='$CC' +CPP='$CPP' diff -ruN glibc-1.06/configure.in glibc-1.07/configure.in --- glibc-1.06/configure.in Fri May 21 14:33:35 1993 +++ glibc-1.07/configure.in Sat Jan 15 20:27:04 1994 @@ -7,7 +7,7 @@ dnl You can ignore the following line if you are reading this sentence. # DO NOT EDIT! This script is generated from configure.in; edit that instead. -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -42,98 +42,104 @@ exec_prefix= verbose= +next= lose= for arg in $*; do if [ x$next != x ]; then - eval "$next = \$arg" + eval "$next=\$arg" next= else case $arg in - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) - srcdir=`echo $arg | sed 's/-*s[a-z]*=//'` - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) - next=srcdir - ;; - -target | --target | --targe | --targ | --tar | --ta | --t) - next=target - ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target=`echo $arg | sed 's/-*t[a-z]*=//'` - ;; - - -with-gnu-ld | --with-gnu-ld | --with-gnu-l) - gnu_ld=--with-gnu-ld - ;; - - -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a) - gnu_as=--with-gnu-as - ;; - - -nfp | --nfp | --nf | --n) - nfp=--nfp - ;; - - -with-* | --with-*) - ;; # ignored - - -x | --x) - ;; # ignored - - -os-release=* | -os-releas=* | -os-relea=* | -os-rele=* | -os-rel=* \ - | -os-re=* | -os-r=* | --os-release=* | --os-releas=* | --os-relea=* \ - | --os-rele=* | --os-rel=* | --os-re=* | --os-r=*) - release=`echo $arg | sed 's/-*os-r[a-z]*=//'` - ;; - -os-release | -os-releas | -os-relea | -os-rele | -os-rel \ - | -os-re | -os-r | --os-release | --os-releas | --os-relea \ - | --os-rele | --os-rel | --os-re | --os-r) - next=release - ;; - - -os-version=* | -os-versio=* | -os-versi=* | -os-vers=* | -os-ver=* \ - | -os-ver=* | -os-ve=* | -os-v=* | --os-version=* | --os-versio=* \ - | --os-versi=* | --os-vers=* | --os-ver=* | --os-ver=* | --os-ve=* \ - | --os-v=*) - version=`echo $arg | sed 's/-*os-v[a-z]*=//'` - ;; - -os-version | -os-versio | -os-versi | -os-vers | -os-ver \ - | -os-ver | -os-ve | -os-v |--os-version | --os-versio \ - | --os-versi | --os-vers | --os-ver | --os-ver | --os-ve | --os-v) - next=version - ;; - - # For backward compatibility, also recognize exact --exec_prefix. - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) - exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` - ;; - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) - next=exec_prefix - ;; - - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=`echo $arg | sed 's/[-a-z_]*=//'` - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - next=prefix - ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v) - # Autoconf-generated code below will test this. - verbose=yes - ;; - - -*) - echo "Invalid option \`$arg'" 1>&2 - lose=yes - ;; - *) - if [ ! "$target" ]; then - target=$arg - else - lose=yes - fi - ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) + srcdir=`echo $arg | sed 's/-*s[a-z]*=//'` + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) + next=srcdir + ;; + -target | --target | --targe | --targ | --tar | --ta | --t) + next=target + ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target=`echo $arg | sed 's/-*t[a-z]*=//'` + ;; + + -with-gnu-ld | --with-gnu-ld | --with-gnu-l) + gnu_ld=--with-gnu-ld + ;; + + -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a) + gnu_as=--with-gnu-as + ;; + + -nfp | --nfp | --nf | --n) + nfp=--nfp + ;; + + -with-* | --with-*) + # For `--with-foo=bar', do "with_foo='bar'". + # For `--with-fnord', do "with_fnord=yes". + # These variables may be examined by sysdep configure fragments. + eval `echo "$arg" | sed '{s/^-*//;s/-/_/g +s/^\([^=]*\)=\(.*\)$/\1='\''\2'\''/;s/^\([^=]*\)$/\1=yes/;}'` + ;; + + -x | --x) + ;; # ignored + + -os-release=* | -os-releas=* | -os-relea=* | -os-rele=* | -os-rel=* \ + | -os-re=* | -os-r=* | --os-release=* | --os-releas=* | --os-relea=* \ + | --os-rele=* | --os-rel=* | --os-re=* | --os-r=*) + release=`echo $arg | sed 's/-*os-r[a-z]*=//'` + ;; + -os-release | -os-releas | -os-relea | -os-rele | -os-rel \ + | -os-re | -os-r | --os-release | --os-releas | --os-relea \ + | --os-rele | --os-rel | --os-re | --os-r) + next=release + ;; + + -os-version=* | -os-versio=* | -os-versi=* | -os-vers=* | -os-ver=* \ + | -os-ver=* | -os-ve=* | -os-v=* | --os-version=* | --os-versio=* \ + | --os-versi=* | --os-vers=* | --os-ver=* | --os-ver=* | --os-ve=* \ + | --os-v=*) + version=`echo $arg | sed 's/-*os-v[a-z]*=//'` + ;; + -os-version | -os-versio | -os-versi | -os-vers | -os-ver \ + | -os-ver | -os-ve | -os-v |--os-version | --os-versio \ + | --os-versi | --os-vers | --os-ver | --os-ver | --os-ve | --os-v) + next=version + ;; + + # For backward compatibility, also recognize exact --exec_prefix. + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) + exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` + ;; + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) + next=exec_prefix + ;; + + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=`echo $arg | sed 's/[-a-z_]*=//'` + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + next=prefix + ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v) + # Autoconf-generated code below will test this. + verbose=yes + ;; + + -*) + echo "Invalid option \`$arg'" 1>&2 + lose=yes + ;; + *) + if [ ! "$target" ]; then + target=$arg + else + lose=yes + fi + ;; esac fi done @@ -149,9 +155,14 @@ AC_PREPARE(features.h) changequote(,) +# Decanonicalize srcdir so we can tell when we are configuring in srcdir. +if [ "`(cd ${srcdir}; pwd)`" = "`pwd`" ]; then + srcdir=. +fi + if [ ! "$target" ]; then - echo 'No target given. Trying to guess target...' target=`$srcdir/config.guess` + test -n "$target" && echo "No target given; guessing target is ${target}." fi if [ "$lose" = yes -o ! "$target" ]; then @@ -164,6 +175,20 @@ exit 1 fi +# Done parsing the arguments. + +# This will get text that should go into config.make. +config_vars= + +# Check for a --with-gmp argument and set gmp-srcdir in config.make. +case "$with_gmp" in +yes) echo "$prog: --with-gmp requires an argument; use --with-gmp=DIRECTORY" + exit 1 ;; +'') ;; +*) config_vars="$config_vars +gmp-srcdir = $with_gmp" ;; +esac + # Canonicalize the configuration name. config=`$srcdir/config.sub $target` if [ ! "$config" ]; then @@ -175,15 +200,44 @@ # machine-vendor-os eval "`echo $config | \ - sed 's/^\(.*\)-\(.*\)-\(.*\)$/machine=\1 vendor=\2 os=\3/'`" + sed 's/^\(.*\)-\(.*\)-\(.*\)$/\ +config_machine=\1 config_vendor=\2 config_os=\3/'`" -# Make sco3.2v4 become sco3.2.4. -os="`echo $os | sed 's/\([0-9]\)v\([0-9]\)/\1.\2/g'`" +# We keep the original values in `$config_*' and never modify them, so we +# can write them unchanged into config.make. Everything else uses +# $machine, $vendor, and $os, and changes them whenever convenient. +machine=$config_machine +vendor=$config_vendor +os=$config_os + +# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1. +os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`" + +case "$machine" in +i[34]86) + machine=i386/$machine ;; +sparc[6789]) + machine=sparc/$machine ;; +m68k) + machine=m68k/m68020 ;; +m680?0) + machine=m68k/$machine ;; +m88k) + machine=m88k/m88100 ;; +m88???) + machine=m88k/$machine ;; +mips|r2000) + machine=mips/r3000 ;; +r[34]000) + machine=mips/$machine ;; +esac case "$os" in gnu*) - os=mach/hurd ;; -sunos* | ultrix* | newsos* | dynix* | bsd*) + base_os=mach/hurd ;; +netbsd* | 386bsd*) + base_os=unix/bsd/bsd4.4 ;; +osf1* | sunos* | ultrix* | newsos* | dynix* | *bsd*) base_os=unix/bsd ;; linux* | sysv* | isc* | esix* | sco* | minix*) base_os=unix/sysv ;; @@ -191,8 +245,8 @@ base_os=unix/sysv/sysv4 ;; esac -case "$os" in -gnu* | linux*) +case "$os:$base_os" in +gnu* | linux* | bsd4.4* | *:bsd4.4) gnu_ld=--with-gnu-ld gnu_as=--with-gnu-as esac @@ -218,12 +272,21 @@ tail="$2" done +# For sparc/sparc9, try sparc/sparc9 and then sparc. +mach= +tail=$machine +while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; [ "$m" ]; do + set $m + mach="$mach /$1" + tail="$2" +done + # Find what sysdep directories exist. sysnames= for b in $base ''; do for v in /$vendor ''; do for o in /$ostry ''; do - for m in /$machine ''; do + for m in $mach ''; do if [ -d $sysdep_dir$b$v$o$m ]; then sysnames="$sysnames $b$v$o$m" [ "$o" -o "$b" ] && os_used=t @@ -310,9 +373,6 @@ echo Using system-dependent files from directories: for dir in $sysnames; do echo " $dir"; done -# This will get text that should go into config.make. -config_vars= - changequote([,])dnl The world is now safe for m4, and unsafe for shell. dnl Be sure to add each macro used here to aclocal.m4 (which see). AC_PROG_INSTALL @@ -326,12 +386,31 @@ FOOBAR __SIZE_TYPE__ FOOBAR' > conftest.c eval "$CPP conftest.c 2>/dev/null" \ | grep '^FOOBAR.*unsigned.*FOOBAR$' >/dev/null \ -|| AC_DEFINE(__SIZE_TYPE__, unsigned) +|| { + dnl Do this by hand instead of AC_DEFINE so we can use -U to avoid warnings. + DEFS="$DEFS -U__SIZE_TYPE__ -D__SIZE_TYPE__=unsigned" + (echo '#undef __SIZE_TYPE__'; + echo '#define __SIZE_TYPE__ unsigned') >> confdefs.h + test -n "$verbose" && echo ' using unsigned int for size_t' +} rm -f conftest* AC_HEADER_EGREP(__gnuc_va_list, stdarg.h, [config_vars="$config_vars stdarg.h = # The installed defines __gnuc_va_list."]) +AC_COMPILE_CHECK([libc-friendly stddef.h], +[#define __need_size_t +#define __need_wchar_t +#include +#define __need_NULL +#include ], [size_t size; wchar_t wchar; +#ifdef offsetof +#error stddef.h ignored __need_* +#endif +if (&size == NULL || &wchar == NULL) abort ();], +[config_vars="$config_vars +stddef.h = # The installed seems to be libc-friendly."]) + changequote(,)dnl The world is again safe for shell scripts. # Iterate over all the sysdep directories we will use, running their @@ -420,7 +499,7 @@ #define UNAME_SYSNAME "${sysname}" #define UNAME_RELEASE "${release}" #define UNAME_VERSION "${version}" -#define UNAME_MACHINE "${machine}-${vendor}" +#define UNAME_MACHINE "${config_machine}-${config_vendor}" END system_name="$sysname $release version $version on $vendor $machine" @@ -439,9 +518,9 @@ ( echo '# This file was generated automatically by configure. Do not edit.' echo '# Put configuration parameters in configparms instead.' - echo "config-machine = ${machine}" - echo "config-vendor = ${vendor}" - echo "config-os = ${os}" + echo "config-machine = ${config_machine}" + echo "config-vendor = ${config_vendor}" + echo "config-os = ${config_os}" echo "config-sysdirs = ${sysnames}" if [ "$prefix" ]; then echo "prefix = ${prefix}" @@ -458,18 +537,6 @@ echo "Wrote config.make in $PWD." switches= -if [ "$gnu_as" ]; then - switches="$switches --with-gnu-as" -fi -if [ "$gnu_ld" ]; then - switches="$switches --with-gnu-ld" -fi -if [ "$exec_prefix" ]; then - switches="$switches --exec_prefix=$exec_prefix" -fi -if [ "$prefix" ]; then - switches="$switches --prefix=$prefix" -fi if [ "$release" ]; then switches="$switches --os-release='$release'" fi @@ -489,7 +556,7 @@ srcdir = $srcdir all .DEFAULT: - \$(MAKE) -C \$(srcdir) ARCH=$objdir \$@ + \$(MAKE) -C \$(srcdir) ARCH=\`pwd\` \$@ END echo "Wrote Makefile in $PWD." @@ -500,7 +567,7 @@ # This file was generated automatically by configure. Do not edit. # The GNU C library was configured in $PWD for # $system_name as follows: -$0 $config --srcdir=$srcdir $switches +$0 $configure_args $switches \$* END chmod a+x config.status echo "Wrote config.status in $PWD." @@ -509,5 +576,5 @@ dnl This gets rid of the random stuff autoconf has stuffed in weird places. divert(-1)dnl AC_This is here so I can search for `AC_' to find the frobs. dnl Local Variables: -dnl compile-command: "m4 /gd/gnu/autoconf/acgeneral.m4 /gd/gnu/autoconf/acspecific.m4 configure.in > configure && chmod a+x configure" +dnl compile-command: "autoconf" dnl End: diff -ruN glibc-1.06/ctype/TAGS glibc-1.07/ctype/TAGS --- glibc-1.06/ctype/TAGS Wed May 19 19:50:03 1993 +++ glibc-1.07/ctype/TAGS Mon Aug 16 15:58:58 1993 @@ -1,28 +1,28 @@ ctype.h,604 -#define _CTYPE_H 25,914 -#define __isctype(66,2694 -#define __isascii(69,2784 -#define __toascii(70,2856 -#define __tolower(72,2917 -#define __toupper(73,2973 -#define __exctype(75,3030 -#define isalnum(124,4207 -#define isalpha(125,4251 -#define iscntrl(126,4295 -#define isdigit(127,4339 -#define islower(128,4383 -#define isgraph(129,4427 -#define isprint(130,4471 -#define ispunct(131,4515 -#define isspace(132,4559 -#define isupper(133,4603 -#define isxdigit(134,4647 -#define isblank(137,4711 -#define tolower(140,4763 -#define toupper(141,4795 -#define isascii(144,4875 -#define toascii(145,4907 +#define _CTYPE_H 25,920 +#define __isctype(66,2700 +#define __isascii(69,2783 +#define __toascii(70,2855 +#define __tolower(72,2916 +#define __toupper(73,2972 +#define __exctype(75,3029 +#define isalnum(124,4206 +#define isalpha(125,4250 +#define iscntrl(126,4294 +#define isdigit(127,4338 +#define islower(128,4382 +#define isgraph(129,4426 +#define isprint(130,4470 +#define ispunct(131,4514 +#define isspace(132,4558 +#define isupper(133,4602 +#define isxdigit(134,4646 +#define isblank(137,4710 +#define tolower(140,4762 +#define toupper(141,4794 +#define isascii(144,4874 +#define toascii(145,4906 ctype.c,247 #define __NO_CTYPE21,854 diff -ruN glibc-1.06/ctype/ctype.h glibc-1.07/ctype/ctype.h --- glibc-1.06/ctype/ctype.h Wed Oct 7 18:31:04 1992 +++ glibc-1.07/ctype/ctype.h Thu Jul 29 17:46:01 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -64,7 +64,7 @@ extern __const short int *__ctype_toupper; /* Case conversions. */ #define __isctype(c, type) \ - ((__ctype_b[(int) (c)] & (unsigned short int) type) != 0) + (__ctype_b[(int) (c)] & (unsigned short int) type) #define __isascii(c) (((c) & (1 << 7)) == 0) /* If high bit is set. */ #define __toascii(c) ((c) & 0x7f) /* Mask off high bit. */ diff -ruN glibc-1.06/dirent/Makefile glibc-1.07/dirent/Makefile --- glibc-1.06/dirent/Makefile Mon May 3 19:34:03 1993 +++ glibc-1.07/dirent/Makefile Wed Dec 22 17:55:46 1993 @@ -19,11 +19,12 @@ # # Sub-makefile for dirent portion of the library. # -subdir := dirent +subdir := dirent -routines := opendir closedir readdir rewinddir \ - seekdir telldir scandir alphasort \ - getdents __getdents +headers := dirent.h dirstream.h +routines := opendir closedir readdir rewinddir \ + seekdir telldir scandir alphasort \ + getdents __getdents distribute := direct.h tests := list diff -ruN glibc-1.06/dirent/TAGS glibc-1.07/dirent/TAGS --- glibc-1.06/dirent/TAGS Sun May 23 00:25:07 1993 +++ glibc-1.07/dirent/TAGS Sat Jan 8 02:39:36 1994 @@ -5,6 +5,9 @@ ../sysdeps/stub/opendir.c,22 DEFUN(opendir,27,954 +../sysdeps/mach/hurd/opendir.c,23 +DEFUN(opendir,35,1115 + ../sysdeps/unix/closedir.c,24 DEFUN(closedir,29,1035 @@ -11,13 +14,23 @@ ../sysdeps/stub/closedir.c,23 DEFUN(closedir,28,990 -../sysdeps/unix/readdir.c,65 -DEFUN(readdir,33,1124 -DEFUN(readdir, (dirp), DIR *dirp)33,1124 +../sysdeps/mach/hurd/closedir.c,24 +DEFUN(closedir,30,1047 + +../sysdeps/unix/bsd/readdir.c,23 +DEFUN(readdir,31,1060 + +../sysdeps/unix/readdir.c,91 +#define D_RECLEN(32,1142 +DEFUN(readdir,38,1246 +DEFUN(readdir, (dirp), DIR *dirp)38,1246 ../sysdeps/stub/readdir.c,22 DEFUN(readdir,26,964 +../sysdeps/mach/hurd/readdir.c,23 +DEFUN(readdir,32,1066 + ../sysdeps/unix/rewinddir.c,24 DEFUN(rewinddir,28,991 @@ -24,6 +37,9 @@ ../sysdeps/stub/rewinddir.c,24 DEFUN(rewinddir,27,967 +../sysdeps/mach/hurd/rewinddir.c,24 +DEFUN(rewinddir,28,991 + ../sysdeps/unix/seekdir.c,22 DEFUN(seekdir,27,969 @@ -31,6 +47,10 @@ DEFUN(seekdir,27,972 DEFUN(seekdir, (dirp, pos), DIR *dirp AND off_t pos)27,972 +../sysdeps/mach/hurd/seekdir.c,84 +DEFUN(seekdir,27,975 +DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos)27,975 + ../sysdeps/unix/telldir.c,23 DEFUN(telldir,28,1000 @@ -38,8 +58,12 @@ DEFUN(telldir,27,980 DEFUN(telldir, (dirp), DIR *dirp)27,980 +../sysdeps/mach/hurd/telldir.c,65 +DEFUN(telldir,28,1000 +DEFUN(telldir, (dirp), DIR *dirp)28,1000 + scandir.c,22 -DEFUN(scandir,24,892 +DEFUN(scandir,24,898 alphasort.c,24 DEFUN(alphasort,24,892 @@ -63,18 +87,42 @@ ../sysdeps/unix/bsd/bsd4.4/__getdents.S,0 +../sysdeps/unix/bsd/osf1/alpha/__getdents.S,33 +SYSCALL__ (getdirentries,21,857 + ../sysdeps/unix/sysv/__getdents.c,101 DEFUN(__getdirentries,28,999 int fd AND char *buf AND size_t nbytes AND off_t *basep)29,1048 ../sysdeps/mach/hurd/__getdents.c,30 -DEFUN(__getdirentries,26,936 +DEFUN(__getdirentries,26,942 -dirent.h,172 -#define _DIRENT_H 25,921 -#define __need_size_t32,1003 -struct dirent37,1081 -#define d_ino 47,1367 - } DIR;61,1802 -#define MAXNAMLEN 89,2702 -#define MAXNAMLEN 91,2735 +dirent.h,155 +#define _DIRENT_H 25,933 +struct dirent41,1366 +#define d_ino 52,1740 +#define MAXNAMLEN 84,2815 +#define MAXNAMLEN 86,2848 +#define __need_size_t91,2908 + +../sysdeps/unix/bsd/dirstream.h,75 +#define _DIRSTREAM_H 21,847 +#define __need_size_t23,871 + } DIR;39,1369 + +../sysdeps/unix/dirstream.h,75 +#define _DIRSTREAM_H 21,847 +#define __need_size_t23,871 + } DIR;41,1432 + +../sysdeps/stub/dirstream.h,29 +#define _DIRSTREAM_H 21,847 + +../sysdeps/unix/bsd/osf1/dirstream.h,75 +#define _DIRSTREAM_H 21,858 +#define __need_size_t23,882 + } DIR;42,1426 + +../sysdeps/mach/hurd/dirstream.h,46 +#define _DIRSTREAM_H 21,853 + } DIR;40,1569 diff -ruN glibc-1.06/dirent/dirent.h glibc-1.07/dirent/dirent.h --- glibc-1.06/dirent/dirent.h Thu Aug 20 14:30:32 1992 +++ glibc-1.07/dirent/dirent.h Thu Jan 6 10:32:10 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -29,15 +29,20 @@ #include -#define __need_size_t -#include + +/* Directory entry structure. + This structure is laid out identically to the `struct direct' that + represents directory entries in the GNU Hurd and in BSD Unix (and + incidentally, on disk in the Berkeley fast file system). The `readdir' + implementations for GNU and BSD know this; you must change them if you + change this structure. */ -/* Directory entry structure. */ struct dirent { __ino_t d_fileno; /* File serial number. */ - size_t d_namlen; /* Length of the file name. */ + unsigned short int d_reclen; /* Length of the whole `struct dirent'. */ + unsigned short int d_namlen; /* Length of the file name. */ /* Only this member is in the POSIX standard. */ char d_name[1]; /* File name (actually longer). */ @@ -47,20 +52,10 @@ #define d_ino d_fileno /* Backward compatibility. */ #endif -/* Directory stream type. */ -typedef struct - { - int __fd; /* File descriptor. */ - - char *__data; /* Directory block. */ - size_t __allocation; /* Space allocated for the block. */ - size_t __offset; /* Current offset into the block. */ - size_t __size; /* Total valid data in the block. */ +/* Get the system-dependent definition of `DIR', + the data type of directory stream objects. */ +#include - struct dirent __entry; /* Returned by `readdir'. */ - } DIR; - - /* Open a directory stream on NAME. Return a DIR stream on the directory, or NULL if it could not be opened. */ extern DIR *opendir __P ((__const char *__name)); @@ -93,6 +88,8 @@ #endif #include +#define __need_size_t +#include /* Seek to position POS on DIRP. */ extern void seekdir __P ((DIR * __dirp, __off_t __pos)); diff -ruN glibc-1.06/dirent/scandir.c glibc-1.07/dirent/scandir.c --- glibc-1.06/dirent/scandir.c Fri Nov 20 18:20:47 1992 +++ glibc-1.07/dirent/scandir.c Mon Aug 30 13:44:09 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -73,10 +73,13 @@ if (errno != 0) { + save = errno; (void) closedir (dp); + errno = save; return -1; } + (void) closedir (dp); errno = save; /* Sort the list if we have a comparison function to sort with. */ diff -ruN glibc-1.06/errno.h glibc-1.07/errno.h --- glibc-1.06/errno.h Fri May 22 03:52:13 1992 +++ glibc-1.07/errno.h Thu Nov 18 03:25:24 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -32,6 +32,13 @@ /* Declare the `errno' variable. */ extern __volatile int errno; + +#ifdef __USE_GNU +/* The full and simple forms of the name with which the program was + invoked. These variables are set up automatically at startup based on + the value of ARGV[0] (this works only if you use GNU ld). */ +extern char *program_invocation_name, *program_invocation_short_name; +#endif __END_DECLS diff -ruN glibc-1.06/grp/TAGS glibc-1.07/grp/TAGS --- glibc-1.06/grp/TAGS Wed May 12 23:52:20 1993 +++ glibc-1.07/grp/TAGS Tue Dec 21 03:58:36 1993 @@ -30,8 +30,8 @@ ../sysdeps/stub/setgroups.c,24 DEFUN(setgroups,26,980 -../sysdeps/mach/hurd/setgroups.c,25 -DEFUN(setgroups,27,1004 +../sysdeps/mach/hurd/setgroups.c,24 +DEFUN(setgroups,27,998 grp.h,102 #define _GRP_H 25,916 diff -ruN glibc-1.06/hurd/Makefile glibc-1.07/hurd/Makefile --- glibc-1.06/hurd/Makefile Wed Mar 17 19:33:18 1993 +++ glibc-1.07/hurd/Makefile Thu Dec 30 23:11:46 1993 @@ -18,32 +18,59 @@ subdir := hurd -interface-header-prefix = hurd/ -headers = hurd.h # $(interface-headers) +all: -ifneq (,) -user-interfaces := auth process \ - exec core interrupt \ - fs io socket term -server-interfaces := misc -endif +# Some things below (but before including Rules) use configuration variables. +include ../Makeconfig + + +headers = hurd.h $(interface-headers) +distribute := intr_rpc.awk hurdintr.awk -routines = __pid2task __task2pid pid2task task2pid \ - __setauth setauth hurdports \ - fchroot \ - hurdauth hurdid hurdpath hurdpid hurdsig hurdsock hurdfrob \ +user-interfaces := $(addprefix hurd/,\ + auth process startup msg \ + exec core interrupt \ + fs fsys io term socket ) +server-interfaces := hurd/msg + +routines = $(interface-routines) \ + hurdid hurdpath hurdpid hurdports \ + hurdexec fexecve \ + __setauth setauth \ + __pid2task __task2pid pid2task task2pid \ + getuids setuids getumask fchroot \ dtable __getdport getdport openport setdtsz \ +# hurdsig hurdmsg hurdsock hurdauth \ + privports \ msgportdemux startsig \ - getuids getumask \ - dead_recv \ fopenport __fopenport \ - vpprintf \ - $(interface-routines) -aux := hurdinit hurdsyms - -all: + vpprintf +aux := hurdsyms hurdinit + +# Get the proper definition of `hurd-srcdir'. +include ../sysdeps/mach/hurd/Makefile + +# Use and install the Hurd header files directly out of the Hurd source. + +# Find the MiG defs files in the Hurd source. +vpath %.defs $(hurd-srcdir) + +# Install all .h and .defs files we find in the Hurd's hurd/ directory. +hurd-headers := $(patsubst $(hurd-srcdir)/%,%,\ + $(wildcard $(addprefix $(hurd-srcdir)/hurd/,\ + *.defs *.h))) + +# Don't distribute the Hurd headers; they are in the Hurd distribution. +dont_distribute = $(hurd-headers) + +# DO NOT try to remake these in any way!!! +$(addprefix $(hurd-srcdir)/,$(hurd-headers)) : ; +install-others += $(addprefix $(includedir)/,$(hurd-headers)) +$(includedir)/hurd/%: $(hurd-srcdir)/hurd/%; $(do-install) + +# Insert comment here. - +ifdef intrhack # XXX # This rule needs to come before the implicit rules in Machrules. __%.c: intr_rpc.awk %_rpc.c gawk -v call=__$* -v rpc=__$*_rpc -f $^ > $@-new @@ -51,9 +78,11 @@ # __%_rpc.c is made with mig by Machrules. %_rpc.c: __%_rpc.c sed s/MACH_MSG_OPTION_NONE/MACH_SEND_INTERRUPT/ $< > $@ +endif include ../mach/Machrules +ifdef intrhack # XXX ifdef user-interfaces include hurdintr endif @@ -66,8 +95,6 @@ interface-routines := $(filter-out %_rpc,$(interface-routines)) \ $(intr-calls:%=__% %) -generated = $(interface-routines:%=%.c) $(interface-headers) - -distribute := intr_rpc.awk hurdintr.awk - +endif + include ../Rules diff -ruN glibc-1.06/hurd/TAGS glibc-1.07/hurd/TAGS --- glibc-1.06/hurd/TAGS Thu May 13 01:47:17 1993 +++ glibc-1.07/hurd/TAGS Mon Jan 17 23:04:47 1994 @@ -1,77 +1,71 @@ +hurdid.c,41 +init_id 25,911 +_hurd_check_ids 39,1195 + +hurdpath.c,102 +__hurd_path_lookup 25,917 +__hurd_path_split 113,2698 +__path_lookup 162,3783 +__path_split 186,4402 + +hurdpid.c,42 +init_pids 29,995 +_S_proc_newids 47,1318 + +hurdports.c,107 +get 22,882 +#define GET(38,1206 +set 42,1314 +#define SET(54,1571 +#define GETSET(57,1669 +GETSET 60,1750 + +hurdexec.c,20 +_hurd_exec 30,1132 + +fexecve.c,16 +fexecve 25,945 + +__setauth.c,41 +__setauth 38,1195 +init_reauth 108,3256 + +setauth.c,0 + __pid2task.c,19 -__pid2task 22,857 +__pid2task 22,863 __task2pid.c,19 -__task2pid 22,856 +__task2pid 22,862 pid2task.c,0 task2pid.c,0 -__setauth.c,41 -__setauth 36,1170 -init_reauth 101,2987 +getuids.c,18 +__getuids 23,849 -setauth.c,0 +setuids.c,16 +setuids 24,931 -hurdports.c,139 -get 22,882 -#define GET(38,1200 -set 42,1293 -#define SET(54,1544 -#define GETSET(57,1627 -GETSET 60,1693 -GETSET 61,1718 -GETSET 62,1741 +getumask.c,17 +getumask 22,851 fchroot.c,22 -DEFUN(fchroot,27,983 +DEFUN(fchroot,27,989 -hurdauth.c,39 -__add_auth 24,889 -__del_auth 45,1341 - -hurdid.c,16 -init_id 27,952 - -hurdpath.c,101 -__hurd_path_lookup 24,892 -__hurd_path_split 96,2223 -__path_lookup 145,3281 -__path_split 169,3804 - -hurdpid.c,41 -init_pids 25,924 -__proc_newids 39,1230 - -hurdsig.c,298 -_hurd_thread_sigstate 38,1275 -write_corefile 68,2049 -abort_rpcs 150,4070 -abort_all_rpcs 209,6027 -_hurd_internal_post_signal 232,6578 -__sig_post 383,10286 -_hurd_exc_post_signal 428,11281 -_hurd_raise_signal 440,11642 -_hurdsig_init 479,12653 -_hurd_proc_init 538,14662 -reauth_proc 562,15429 - -hurdsock.c,47 -init_sock 27,995 -_hurd_socket_server 48,1676 - -hurdfrob.c,73 -__get_init_port 23,876 -__set_init_port 56,1647 -__get_init_int 89,2440 - -dtable.c,93 -init_dtable 37,1187 -get_dtable_port 108,3305 -fork_dtable 131,3758 -reauth_dtable 166,4708 +dtable.c,233 +init_dtable 42,1276 +_hurd_intern_fd 97,3002 +_hurd_alloc_fd 117,3448 +_hurd_port2fd 146,3944 +get_dtable_port 199,5527 +fork_dtable 222,5980 +reauth_dtable 257,6988 +rectty_dtable 302,8165 +tiocsctty 354,9364 +tiocnoctty 384,10147 __getdport.c,19 __getdport 28,945 @@ -79,76 +73,51 @@ getdport.c,0 openport.c,17 -openport 24,896 +openport 26,993 setdtsz.c,23 -setdtablesize 28,1067 - -msgportdemux.c,75 -struct demux23,891 -msgport_server 36,1170 -_hurd_msgport_receive 50,1469 - -../sysdeps/stub/startsig.c,57 -#define STACK_SIZE 21,844 -_hurd_start_sigthread 25,979 - -../sysdeps/mach/hurd/i386/startsig.c,94 -#define STACK_SIZE 21,850 -_hurd_start_sigthread (thread_t sigthread, void (*function)24,911 - -getuids.c,16 -getuids 23,891 - -getumask.c,17 -getumask 22,851 +setdtablesize 29,1093 -dead_recv.c,24 -_hurd_dead_recv 23,928 - -fopenport.c,0 - -__fopenport.c,20 -__fopenport 27,947 - -vpprintf.c,45 -DEFUN(pwrite,26,940 -DEFUN(vpprintf,39,1302 +hurdsyms.c,0 hurdinit.c,45 -_hurd_init 28,1005 -_hurd_proc_init 94,2895 - -hurdsyms.c,0 +_hurd_init 38,1209 +_hurd_proc_init 99,2935 -hurd.h,849 -#define _HURD_H 21,842 -#define _GNU_SOURCE23,861 -#define __hurd_fail(33,1039 -struct _hurd_port44,1620 -#define _HURD_PORT_USE(52,1874 -_hurd_port_init 62,2265 -_hurd_port_locked_get 72,2552 -_hurd_port_get 87,2870 -_hurd_port_free 96,3107 -_hurd_port_locked_set 109,3468 -_hurd_port_set 127,3888 -struct _hurd_fd155,4815 -struct _hurd_dtable165,5088 -_hurd_dtable_use 185,5805 -struct _hurd_dtable_resizes195,6029 -_hurd_dtable_done 204,6212 -_hurd_dalloc 223,6906 -_hurd_dtable_fd 253,7713 -struct _hurd_fd_user270,8048 -_hurd_fd 278,8221 -_hurd_fd_done 289,8456 -#define _HURD_DPORT_USE(297,8669 -_hurd_dfail 318,9522 -struct _hurd_sigstate369,11002 -#define HURD_EINTR_RPC(430,13091 -#define setauth 478,15041 -#define hurd_path_split 484,15194 -#define hurd_path_lookup 489,15377 -#define path_split 493,15561 -#define path_lookup 497,15741 +hurd.h,1071 +#define _HURD_H 21,848 +#define _GNU_SOURCE26,1016 +#define __hurd_fail(47,1511 +#define __spin_lock(49,1557 +#define __spin_unlock(50,1603 +#define __mutex_lock(52,1652 +#define __mutex_unlock(53,1699 +struct _hurd_port64,2206 +struct _hurd_port_userlink75,2531 +#define _HURD_PORT_USE(81,2692 +_hurd_port_init 91,3100 +_hurd_port_locked_get 103,3400 +_hurd_port_get 122,3842 +_hurd_port_free 131,4077 +_hurd_port_locked_set 154,4888 +_hurd_port_set 175,5473 +#define __USEPORT(187,5833 +struct _hurd_fd209,6578 +struct _hurd_dtable237,7672 +_hurd_dtable_use 260,8460 +struct _hurd_dtable_resizes270,8684 +_hurd_dtable_done 279,8867 +_hurd_dtable_fd 296,9502 +struct _hurd_fd_user313,9837 +_hurd_fd 323,10158 +_hurd_fd_done 334,10395 +#define _HURD_DPORT_USE(342,10607 +__hurd_dfail 363,11462 +struct _hurd_id_data399,12185 +struct _hurd_sigstate440,13265 +#define HURD_EINTR_RPC(507,15460 +#define _SIG_CANT_MASK 549,17119 +#define _HURD_MSGPORT_RPC(572,18426 +struct ioctl_handler668,22216 +#define _HURD_HANDLE_IOCTLS(680,22530 +#define _HURD_HANDLE_IOCTL(686,22853 diff -ruN glibc-1.06/hurd/__fopenport.c glibc-1.07/hurd/__fopenport.c --- glibc-1.06/hurd/__fopenport.c Sat Mar 21 17:36:13 1992 +++ glibc-1.07/hurd/__fopenport.c @@ -1,31 +0,0 @@ -/* Copyright (C) 1992 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 -#include -#include - - -/* Open a stream on PORT. MODE is as for fopen. */ - -FILE * -__fopenport (mach_port_t port, const char *mode) -{ - /* The default io functions in sysd-stdio.c use Hurd io ports as cookies. */ - return __fopencookie ((void *) port, mode, __default_io_functions); -} diff -ruN glibc-1.06/hurd/__pid2task.c glibc-1.07/hurd/__pid2task.c --- glibc-1.06/hurd/__pid2task.c Fri Mar 20 23:13:15 1992 +++ glibc-1.07/hurd/__pid2task.c Wed Jun 23 17:50:25 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -24,13 +24,8 @@ error_t err; task_t task; - err = _HURD_PORT_USE (&_hurd_proc, + err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], __proc_pid2task (port, pid, &task)); - if (err) - { - errno = err; - return MACH_PORT_NULL; - } - else - return task; + + return err ? (__hurd_fail (err), MACH_PORT_NULL) : task; } diff -ruN glibc-1.06/hurd/__setauth.c glibc-1.07/hurd/__setauth.c --- glibc-1.06/hurd/__setauth.c Mon May 4 18:28:33 1992 +++ glibc-1.07/hurd/__setauth.c Mon Nov 29 16:23:41 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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,6 +16,8 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef MIB_HACKS + #include #include @@ -35,8 +37,6 @@ int __setauth (auth_t new) { - error_t err; - auth_t old; int d; mach_port_t newport; void (**fn) (auth_t); @@ -50,15 +50,20 @@ return -1; } - /* We lock against another thread doing setauth. - Anyone who sets _hurd_auth some other way is asking to lose. */ + /* We lock against another thread doing setauth. Anyone who sets + _hurd_ports[INIT_PORT_AUTH] some other way is asking to lose. */ __mutex_lock (&reauth_lock); - /* Install the new port in the _hurd_auth cell. */ - __mutex_lock (&_hurd_idlock); - _hurd_port_set (&_hurd_auth, new); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); + /* Install the new port in the cell. */ + __mutex_lock (&_hurd_id.lock); + _hurd_port_set (&_hurd_ports[INIT_PORT_AUTH], new); + _hurd_id.valid = 0; + if (_hurd_id.rid_auth) + { + __mach_port_deallocate (__mach_task_self (), _hurd_id.rid_auth); + _hurd_id.rid_auth = MACH_PORT_NULL; + } + __mutex_unlock (&_hurd_id.lock); if (_hurd_init_dtable != NULL) /* We just have the simple table we got at startup. @@ -67,9 +72,11 @@ if (_hurd_init_dtable[d] != MACH_PORT_NULL) { mach_port_t new; - if (! __io_reauthenticate (_hurd_init_dtable[d]) && - ! _HURD_PORT_USE (&_hurd_auth, - __auth_user_authenticate (_hurd_init_dtable[d], + if (! __io_reauthenticate (_hurd_init_dtable[d], _hurd_pid) && + ! _HURD_PORT_USE (&_hurd_ports[INIT_PORT_AUTH], + __auth_user_authenticate (port, + _hurd_init_dtable[d], + _hurd_pid, &new))) { __mach_port_deallocate (__mach_task_self (), @@ -78,15 +85,15 @@ } } - if (_HURD_PORT_USE (&_hurd_crdir, - ! __io_reauthenticate (port) && - ! __auth_user_authenticate (new, port, &newport))) - _hurd_port_set (&_hurd_crdir, newport); - - if (_HURD_PORT_USE (&_hurd_cwdir, - ! __io_reauthenticate (port) && - ! __auth_user_authenticate (new, port, &newport))) - _hurd_port_set (&_hurd_cwdir, newport); + if (__USEPORT (CRDIR, + ! __io_reauthenticate (port, _hurd_pid) && + ! __auth_user_authenticate (new, port, _hurd_pid, &newport))) + _hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], newport); + + if (__USEPORT (CWDIR, + ! __io_reauthenticate (port, _hurd_pid) && + ! __auth_user_authenticate (new, port, _hurd_pid, &newport))) + _hurd_port_set (&_hurd_ports[INIT_PORT_CWDIR], newport); /* Run things which want to do reauthorization stuff. */ for (fn = _hurd_reauth_hook.fn; *fn != NULL; ++fn) @@ -104,3 +111,5 @@ } text_set_element (__libc_subinit, init_reauth); + +#endif diff -ruN glibc-1.06/hurd/__task2pid.c glibc-1.07/hurd/__task2pid.c --- glibc-1.06/hurd/__task2pid.c Fri Mar 20 23:11:40 1992 +++ glibc-1.07/hurd/__task2pid.c Tue Dec 21 03:13:28 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -23,9 +23,6 @@ { error_t err; pid_t pid; - err = _HURD_PORT_USE (&_hurd_proc, - __proc_task2pid (proc, task, &pid)); - if (err) - return __hurd_fail (err); - return pid; + err = __USEPORT (PROC, __proc_task2pid (port, task, &pid)); + return err ? (pid_t) __hurd_fail (err) : pid; } diff -ruN glibc-1.06/hurd/dead_recv.c glibc-1.07/hurd/dead_recv.c --- glibc-1.06/hurd/dead_recv.c Sat Feb 8 03:42:24 1992 +++ glibc-1.07/hurd/dead_recv.c @@ -1,30 +0,0 @@ -/* Copyright (C) 1992 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 - -/* Return a receive right to which there are no send rights in use. */ -mach_port_t -_hurd_dead_recv (void) -{ - static mach_port_t port = MACH_PORT_NULL; - if (port == MACH_PORT_NULL) - __mach_port_allocate (__mach_task_self (), - MACH_PORT_RIGHT_RECEIVE, &port); - return port; -} diff -ruN glibc-1.06/hurd/dtable.c glibc-1.07/hurd/dtable.c --- glibc-1.06/hurd/dtable.c Tue Jun 16 23:29:36 1992 +++ glibc-1.07/hurd/dtable.c Thu Dec 2 17:17:47 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,13 +18,18 @@ #include #include +#include #include #include +#include +#include #include -struct _hurd_dtable _hurd_dtable; +#ifdef noteven struct mutex _hurd_dtable_lock; +#endif +struct _hurd_dtable _hurd_dtable; int _hurd_dtable_rlimit; int *_hurd_dtable_user_dealloc; @@ -38,14 +43,16 @@ { register size_t i; +#ifdef noteven __mutex_init (&_hurd_dtable_lock); +#endif _hurd_dtable_user_dealloc = NULL; /* The initial size of the descriptor table is that of the passed-in - table, rounded up to a multiple of OPEN_MAX descriptors. */ + table, rounded up to a multiple of FOPEN_MAX descriptors. */ _hurd_dtable.size - = (_hurd_init_dtablesize + OPEN_MAX - 1) / OPEN_MAX * OPEN_MAX; + = (_hurd_init_dtablesize + FOPEN_MAX - 1) / FOPEN_MAX * FOPEN_MAX; _hurd_dtable_rlimit = _hurd_dtable.size; _hurd_dtable.d = malloc (_hurd_dtable.size * sizeof (*_hurd_dtable.d)); @@ -55,34 +62,21 @@ for (i = 0; i < _hurd_init_dtablesize; ++i) { struct _hurd_fd *const d = &_hurd_dtable.d[i]; - io_statbuf_t stb; - io_t ctty; - - _hurd_port_init (&d->port, _hurd_init_dtable[i]); - d->flags = 0; - if (_hurd_ctty_fstype != 0 && - /* We have a controlling tty. Is this it? */ - ! __io_stat (d->port.port, &stb) && - stb.stb_fstype == _hurd_ctty_fstype && - stb.stb_fsid == _hurd_ctty_fsid && - stb.stb_fileid == _hurd_ctty_fileid && - /* This is a descriptor to our controlling tty. */ - ! __term_become_ctty (d->port.port, _hurd_pid, _hurd_pgrp, - _hurd_sigport, &ctty)) - { - /* Operations on CTTY return EBACKGROUND when we are not a - foreground user of the tty. */ - d->port.port = ctty; - ctty = _hurd_init_dtable[i]; - } - else - /* No ctty magic happening here. */ - ctty = MACH_PORT_NULL; + _hurd_port_init (&d->port, MACH_PORT_NULL); + _hurd_port_init (&d->ctty, MACH_PORT_NULL); - _hurd_port_init (&d->ctty, ctty); + _hurd_port2fd (d, _hurd_init_dtable[i], 0); } + /* Clear out the initial descriptor table. + Everything must use _hurd_dtable now. */ + __vm_deallocate (__mach_task_self (), + (vm_address_t) _hurd_init_dtable, + _hurd_init_dtablesize * sizeof (_hurd_init_dtable[0])); + _hurd_init_dtable = NULL; + _hurd_init_dtablesize = 0; + /* Initialize the remaining empty slots in the table. */ for (; i < _hurd_dtable.size; ++i) { @@ -90,18 +84,115 @@ _hurd_port_init (&_hurd_dtable.d[i].ctty, MACH_PORT_NULL); _hurd_dtable.d[i].flags = 0; } - - /* Clear out the initial descriptor table. - Everything must use _hurd_dtable now. */ - __vm_deallocate (__mach_task_self (), - _hurd_init_dtable, - _hurd_init_dtablesize * sizeof (_hurd_init_dtable[0])); - _hurd_init_dtable = NULL; - _hurd_init_dtablesize = 0; } text_set_element (__libc_subinit, init_dtable); +/* Allocate a new file descriptor and install PORT in it. FLAGS are as for + `open'; only O_IGNORE_CTTY is meaningful, but all are saved. + + If the descriptor table is full, set errno, and return -1. + If DEALLOC is nonzero, deallocate PORT first. */ +int +_hurd_intern_fd (io_t port, int flags, int dealloc) +{ + int fd; + struct _hurd_fd *d = _hurd_alloc_fd (&fd, 0); + + if (d == NULL) + { + if (dealloc) + __mach_port_deallocate (__mach_task_self (), port); + return -1; + } + + _hurd_port2fd (d, port, flags); + __spin_unlock (&d->port.lock); + return fd; +} + +/* Allocate a new file descriptor and return it, locked. + If the table is full, set errno and return NULL. */ +struct _hurd_fd * +_hurd_alloc_fd (int *fd, const int first_fd) +{ + int i; + + __mutex_lock (&hurd_dtable_lock); + + for (i = first_fd; i < _hurd_dtable.size; ++i) + { + struct _hurd_fd *d = &_hurd_dtable.d[i]; + __spin_lock (&d->port.lock); + if (d->port.port == MACH_PORT_NULL) + { + __mutex_unlock (&hurd_dtable_lock); + if (fd != NULL) + *fd = i; + return d; + } + else + __spin_unlock (&d->port.lock); + } + + __mutex_unlock (&hurd_dtable_lock); + + errno = EMFILE; + return NULL; +} + + +void +_hurd_port2fd (struct _hurd_fd *d, io_t port, int flags) +{ + io_t ctty; + mach_port_t cttyid; + int is_ctty = !(flags & O_IGNORE_CTTY) && ! __term_getctty (port, &cttyid); + + if (is_ctty) + { + /* This port is capable of being a controlling tty. + Is it ours? */ + is_ctty &= __USEPORT (CTTYID, port == cttyid); + __mach_port_deallocate (__mach_task_self (), cttyid); +#if 0 + struct _hurd_port *const id = &_hurd_ports[INIT_PORT_CTTYID]; + __spin_lock (&id->lock); + if (id->port == MACH_PORT_NULL) + /* We have no controlling tty, so make this one it. */ + _hurd_port_locked_set (id, cttyid); + else + { + if (cttyid != id->port) + /* We have a controlling tty and this is not it. */ + is_ctty = 0; + /* Either we don't want CTTYID, or ID->port already is it. + So we don't need to change ID->port, and we + can release the reference to CTTYID. */ + __spin_unlock (&id->lock); + __mach_port_deallocate (__mach_task_self (), cttyid); + } +#endif + } + + if (is_ctty && ! __term_become_ctty (port, _hurd_pid, _hurd_pgrp, + _hurd_msgport, &ctty)) + { + /* Operations on CTTY return EBACKGROUND when we are not a + foreground user of the tty. */ + d->port.port = ctty; + ctty = port; + } + else + /* XXX if IS_CTTY, then this port is our ctty, but we are + not doing ctty style i/o because term_become_ctty barfed. + What to do? */ + /* No ctty magic happening here. */ + ctty = MACH_PORT_NULL; + + _hurd_port_set (&d->ctty, ctty); +} + /* Called by `getdport' to do its work. */ static file_t @@ -138,18 +229,18 @@ for (i = 0; !err && i < _hurd_dtable.size; ++i) { int dealloc, dealloc_ctty; - io_t port = _HURD_PORT_USE (&_hurd_dtable.d[i].port, &dealloc); - io_t ctty = _HURD_PORT_USE (&_hurd_dtable.d[i].ctty, &dealloc_ctty); + io_t port = _hurd_port_get (&_hurd_dtable.d[i].port, &dealloc); + io_t ctty = _hurd_port_get (&_hurd_dtable.d[i].ctty, &dealloc_ctty); if (port != MACH_PORT_NULL) err = __mach_port_insert_right (newtask, port, port, - MACH_PORT_COPY_SEND); + MACH_MSG_TYPE_COPY_SEND); if (!err && ctty != MACH_PORT_NULL) err = __mach_port_insert_right (newtask, ctty, ctty, - MACH_PORT_COPY_SEND); + MACH_MSG_TYPE_COPY_SEND); - _hurd_port_free (port, &dealloc); - _hurd_port_free (ctty, &dealloc_ctty); + _hurd_port_free (&_hurd_dtable.d[i].port, &dealloc, port); + _hurd_port_free (&_hurd_dtable.d[i].ctty, &dealloc_ctty, ctty); /* XXX for each fd with a cntlmap, reauth and re-map_cntl. */ } @@ -165,41 +256,41 @@ static void reauth_dtable (void) { - int d; + int i; __mutex_lock (&_hurd_dtable_lock); - for (d = 0; d < _hurd_dtable.size; ++d) + for (i = 0; i < _hurd_dtable.size; ++i) { - struct _hurd_fd *const d = &hurd_dtable.d[d]; + struct _hurd_fd *const d = &_hurd_dtable.d[i]; mach_port_t new, newctty; /* Take the descriptor cell's lock. */ - __spin_lock (&cell->port.lock); + __spin_lock (&d->port.lock); /* Reauthenticate the descriptor's port. */ - if (cell->port.port != MACH_PORT_NULL && - ! __io_reauthenticate (cell->port.port) && - ! _HURD_PORT_USE (&_hurd_auth, - __auth_user_authenticate (port, - cell->port.port, &new))) + if (d->port.port != MACH_PORT_NULL && + ! __io_reauthenticate (d->port.port, _hurd_pid) && + ! __USEPORT (AUTH, __auth_user_authenticate (port, + d->port.port, _hurd_pid, + &new))) { /* Replace the port in the descriptor cell with the newly reauthenticated port. */ - if (cell->ctty.port != MACH_PORT_NULL && - ! __io_reauthenticate (cell->ctty.port) && - ! _HURD_PORT_USE (&_hurd_auth, - __auth_user_authenticate (port, - cell->ctty.port, - &newctty))) - _hurd_port_set (&cell->ctty, newctty); + if (d->ctty.port != MACH_PORT_NULL && + ! __io_reauthenticate (d->ctty.port, _hurd_pid) && + ! __USEPORT (AUTH, __auth_user_authenticate (port, + d->ctty.port, + _hurd_pid, + &newctty))) + _hurd_port_set (&d->ctty, newctty); - _hurd_port_locked_set (&cell->port, new); + _hurd_port_locked_set (&d->port, new); } else /* Lost. Leave this descriptor cell alone. */ - __spin_unlock (&cell->port.lock); + __spin_unlock (&d->port.lock); } __mutex_unlock (&_hurd_dtable_lock); @@ -206,3 +297,106 @@ } text_set_element (_hurd_reauth_hook, reauth_dtable); + +static void +rectty_dtable (mach_port_t cttyid) +{ + int i; + + __mutex_lock (&_hurd_dtable_lock); + + for (i = 0; i < _hurd_dtable.size; ++i) + { + struct _hurd_fd *const d = &_hurd_dtable.d[i]; + mach_port_t newctty; + + if (cttyid == MACH_PORT_NULL) + /* We now have no controlling tty at all. */ + newctty = MACH_PORT_NULL; + else + _HURD_PORT_USE (&d->port, + ({ mach_port_t id; + /* Get the io object's cttyid port. */ + if (! __term_getctty (port, &id)) + { + if (id == cttyid && /* Is it ours? */ + /* Get the ctty io port. */ + __term_become_ctty (port, _hurd_pid, + _hurd_pgrp, + _hurd_msgport, + &newctty)) + /* XXX it is our ctty but the call failed? */ + newctty = MACH_PORT_NULL; + __mach_port_deallocate + (__mach_task_self (), (mach_port_t) id); + } + else + newctty = MACH_PORT_NULL; + 0; + })); + + /* Install the new ctty port. */ + _hurd_port_set (&d->ctty, newctty); + } + + __mutex_unlock (&_hurd_dtable_lock); +} + +#if 0 + +#include + + +/* Make FD be the controlling terminal. + This function is called for `ioctl (fd, TCIOSCTTY)'. */ + +static int +tiocsctty (int fd, + int request, /* Always TCIOSCTTY. */ + void *arg) /* Not used. */ +{ + mach_port_t cttyid; + error_t err; + + /* Get FD's cttyid port, unless it is already ours. */ + err = _HURD_DPORT_USE (fd, + ctty ? EADDRINUSE : __term_getctty (port, &cttyid)); + if (err == EADDRINUSE) + /* FD is already the ctty. Nothing to do. */ + return 0; + else if (err) + return err; + + /* Make it our own. */ + _hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], cttyid); /* Consumes ref. */ + + /* Reset all the ctty ports in all the descriptors. */ + _HURD_PORT_USE (&_hurd_ports[INIT_PORT_CTTYID], (rectty_dtable (port), 0)); + + return 0; +} +_HURD_HANDLE_IOCTL (tiocsctty, TIOCSCTTY); + +#ifdef TIOCNOCTTY +/* Dissociate from the controlling terminal. */ + +static int +tiocnoctty (int fd, + int request, /* Always TIOCNOCTTY. */ + void *arg) /* Not used. */ +{ + /* XXX should verify that FD is ctty and return EINVAL? */ + + /* Clear our cttyid port cell. */ + _hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], MACH_PORT_NULL); + + /* Reset all the ctty ports in all the descriptors. */ + _HURD_PORT_USE (&_hurd_ports[INIT_PORT_CTTYID], + (rectty_dtable (MACH_PORT_NULL), 0)); + + return 0; +} +_HURD_HANDLE_IOCTL (tiocnotty, TIOCNOTTY); +#endif + +#endif diff -ruN glibc-1.06/hurd/fchroot.c glibc-1.07/hurd/fchroot.c --- glibc-1.06/hurd/fchroot.c Fri Mar 20 23:57:32 1992 +++ glibc-1.07/hurd/fchroot.c Tue Dec 14 16:08:10 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -29,6 +29,8 @@ error_t err; file_t crdir; + /* XXX check that's it's a directory */ + if (err = _HURD_DPORT_USE (fd, __mach_port_mod_refs (__mach_task_self (), (crdir = port), @@ -35,7 +37,7 @@ MACH_PORT_RIGHT_SEND, 1))) return err; - _hurd_port_set (&_hurd_crdir, crdir); + _hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], crdir); return 0; } diff -ruN glibc-1.06/hurd/fexecve.c glibc-1.07/hurd/fexecve.c --- glibc-1.06/hurd/fexecve.c +++ glibc-1.07/hurd/fexecve.c Thu Dec 30 23:10:15 1993 @@ -0,0 +1,29 @@ +/* Copyright (C) 1993 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 +#include + +/* Execute the file FD refers to, overlaying the running program image. */ + +int +fexecve (int fd, char *const argv[], char *const envp[]) +{ + error_t err = _HURD_DPORT_USE (fd, _hurd_exec (port, argv, envp)); + return __hurd_fail (err); +} diff -ruN glibc-1.06/hurd/fopenport.c glibc-1.07/hurd/fopenport.c --- glibc-1.06/hurd/fopenport.c Sun Mar 22 00:40:43 1992 +++ glibc-1.07/hurd/fopenport.c @@ -1,21 +0,0 @@ -/* Copyright (C) 1992 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 - -symbol_alias (__fopenport, fopenport); diff -ruN glibc-1.06/hurd/getuids.c glibc-1.07/hurd/getuids.c --- glibc-1.06/hurd/getuids.c Fri Mar 20 23:58:57 1992 +++ glibc-1.07/hurd/getuids.c Thu Oct 28 23:08:31 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,33 +18,35 @@ #include -/* Return the effective uid set. */ + int -getuids (int n, uid_t *uidset) +__getuids (int n, uid_t *uidset) { + error_t err; int nuids; - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + __mutex_lock (&_hurd_id.lock); + + if (err = _hurd_check_ids ()) { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; + __mutex_unlock (&_hurd_id.lock); + return __hurd_fail (err); } - nuids = _hurd_id.nuids; - if (uidset != NULL) + + nuids = _hurd_id.gen.nuids; + + if (n != 0) { - /* Copy into a temporary array before releasing the lock. */ + /* Copy the uids onto stack storage and then release the idlock. */ uid_t uids[nuids]; - memcpy (uids, _hurd_id.uids, sizeof (uids)); - __mutex_unlock (&_hurd_idlock); - /* Lock is released; now copy into user array, which might fault. */ - memcpy (uidset, uids, sizeof (uids)); + memcpy (uids, _hurd_id.gen.uids, sizeof (uids)); + __mutex_unlock (&_hurd_id.lock); + + /* Now that the lock is released, we can safely copy the + uid set into the user's array, which might fault. */ + if (nuids > n) + nuids = n; + memcpy (uidset, uids, nuids * sizeof (uid_t)); } else __mutex_unlock (&_hurd_idlock); diff -ruN glibc-1.06/hurd/hurd.h glibc-1.07/hurd/hurd.h --- glibc-1.06/hurd/hurd.h Mon Feb 22 16:57:03 1993 +++ glibc-1.07/hurd/hurd.h Sun Jan 16 05:38:44 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 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 @@ -20,41 +20,70 @@ #define _HURD_H 1 +/* This is here because this file includes some other headers + and expects some non-ANSI, non-POSIX symbols to be defined. */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include + +/* Get types, macros, constants and function declarations + for all Mach microkernel interaction. */ #include +#include + +/* Get types and constants necessary for Hurd interfaces. */ #include + +/* Get MiG stub declarations for commonly used Hurd interfaces. */ +#include #include #include #include -#include +#include +#include #define __hurd_fail(err) (errno = (err), -1) + +#define __spin_lock(lockaddr) /* no-op XXX */ +#define __spin_unlock(lockaddr) /* no-op XXX */ + +#define __mutex_lock(lockaddr) /* no-op XXX */ +#define __mutex_unlock(lockaddr) /* no-op XXX */ + /* Lightweight user references for ports. */ -/* Structure describing a cell containing a port. - With the lock held, a user extracts PORT, and sets USER_DEALLOC to point - to a word in his local storage. PORT can then safely be used. When - PORT is no longer needed, with the lock held, the user examines - USER_DEALLOC. If it is the same address that user stored there, he - extracts *USER_DEALLOC, clears USER_DEALLOC to NULL, and releases the - lock. If *USER_DEALLOC is set, the user deallocates the port he used. */ +/* Structure describing a cell containing a port. With the lock held, a + user extracts PORT, and attaches his own link (in local storage) to the + USERS chain. PORT can then safely be used. When PORT is no longer + needed, with the lock held, the user removes his link from the chain. + If his link is the last, and PORT has changed since he fetched it, the + user deallocates the port he used. */ struct _hurd_port { +#ifdef noteven spin_lock_t lock; /* Locks rest. */ +#endif + struct _hurd_port_userlink *users; /* Chain of users; see below. */ mach_port_t port; /* Port. */ - int *user_dealloc; /* If not NULL, points to user's flag word. */ + }; + +/* This structure is simply a doubly-linked list. + Users of a port cell are recorded by their presence in the list. */ +struct _hurd_port_userlink + { + struct _hurd_port_userlink *next, **prevp; }; /* Evaluate EXPR with the variable `port' bound to the port in PORTCELL. */ #define _HURD_PORT_USE(portcell, expr) \ - ({ struct _hurd_port *const __p = &(portcell); \ - int __dealloc; \ - const mach_port_t port = _hurd_port_get (__p, &__dealloc); \ + ({ struct _hurd_port *const __p = (portcell); \ + struct _hurd_port_userlink __link; \ + const mach_port_t port = _hurd_port_get (__p, &__link); \ __typeof(expr) __result = (expr); \ - _hurd_port_free (__p, &__dealloc); \ + _hurd_port_free (__p, &__link, port); \ __result; }) /* Initialize *PORT to INIT. */ @@ -61,22 +90,28 @@ static inline void _hurd_port_init (struct _hurd_port *port, mach_port_t init) { +#ifdef noteven __spin_lock_init (&port->lock); +#endif + port->users = NULL; port->port = init; - port->user_dealloc = NULL; } /* Get a reference to *PORT, which is locked. - Pass return value and MYFLAG to _hurd_port_free when done. */ + Pass return value and LINK to _hurd_port_free when done. */ static inline mach_port_t -_hurd_port_locked_get (struct _hurd_port *port, int *myflag) +_hurd_port_locked_get (struct _hurd_port *port, + struct _hurd_port_userlink *link) { mach_port_t result; result = port->port; if (result != MACH_PORT_NULL) { - port->user_dealloc = myflag; - *myflag = 0; + link->next = port->users; + if (link->next) + link->next->prevp = &link->next; + link->prevp = &port->users; + port->users = link; } __spin_unlock (&port->lock); return result; @@ -91,30 +126,43 @@ } /* Free a reference gotten with - `USED_PORT = _hurd_port_get (PORT, MYFLAG);' */ + `USED_PORT = _hurd_port_get (PORT, LINK);' */ static inline void _hurd_port_free (struct _hurd_port *port, - int *myflag, mach_port_t used_port) + struct _hurd_port_userlink *link, + mach_port_t used_port) { + int dealloc; __spin_lock (&port->lock); - if (port->user_dealloc == myflag) - port->user_dealloc = NULL; + /* We should deallocate USED_PORT if our chain has been detached from the + cell (and thus has a nil `prevp'), and there is no next link + representing another user reference to the same port we fetched. */ + dealloc = ! link->next && ! link->prevp; + /* Remove our link from the chain of current users. */ + if (link->prevp) + *link->prevp = link->next; + if (link->next) + link->next->prevp = link->prevp; __spin_unlock (&port->lock); - if (*myflag) + if (dealloc) __mach_port_deallocate (__mach_task_self (), used_port); } -/* Set *PORT's port to NEWPORT. PORT is locked. */ +/* Set *PORT's port to NEWPORT. NEWPORT's reference is consumed by PORT->port. + PORT->lock is locked. */ static inline void _hurd_port_locked_set (struct _hurd_port *port, mach_port_t newport) { mach_port_t old; - if (port->user_dealloc == NULL) + if (port->users == NULL) old = port->port; else { old = MACH_PORT_NULL; - *port->user_dealloc = 1; + /* Detach the chain of current users from the cell. The last user to + remove his link from that chain will deallocate the old port. */ + port->users->prevp = NULL; + port->users = NULL; } port->port = newport; __spin_unlock (&port->lock); @@ -131,37 +179,61 @@ } /* Basic ports and info, initialized by startup. */ -extern struct _hurd_port _hurd_proc, _hurd_auth; -extern struct _hurd_port _hurd_ccdir, _hurd_cwdir, _hurd_crdir; +extern struct _hurd_port *_hurd_ports; +extern unsigned int _hurd_nports; extern volatile mode_t _hurd_umask; -extern struct mutex _hurd_ctty_lock; -extern int _hurd_ctty_fstype; -extern fsid_t _hurd_ctty_fsid; -extern ino_t _hurd_ctty_fileid; - -extern vm_address_t _hurd_stack_low, _hurd_stack_high; /* Not locked. */ +/* Shorthand macro for referencing _hurd_ports. */ +#define __USEPORT(which, expr) \ + _HURD_PORT_USE (&_hurd_ports[INIT_PORT_##which], (expr)) + +/* Base address and size of the initial stack set up by the exec server. + If using cthreads, this stack is deallocated in startup. + Not locked. */ +extern vm_address_t _hurd_stack_base; +extern vm_size_t _hurd_stack_size; extern thread_t _hurd_msgport_thread; extern mach_port_t _hurd_msgport; /* Locked by _hurd_siglock. */ -/* Not locked. If we are using a real dtable, - these are turned into that and then cleared at startup. - If not, these are never changed after startup. */ +/* Not locked. If we are using a real dtable, these are turned into that + and then cleared at startup. If not, these are never changed after + startup. */ extern mach_port_t *_hurd_init_dtable; -extern size_t _hurd_init_dtablesize; +extern mach_msg_type_number_t _hurd_init_dtablesize; /* File descriptor table. */ + + +/* File descriptor structure. */ struct _hurd_fd { - struct _hurd_port port; + struct _hurd_port port; /* io server port. */ int flags; /* fcntl flags; locked by port.lock. */ - /* Normal port to the ctty. Also locked by port.lock. - (The ctty.lock is only ever used when the port.lock is held.) */ + /* Normal port to the ctty. When `port' is our ctty, this is a port to + the same io object but which never returns EBACKGROUND; when not, + this is nil. */ struct _hurd_port ctty; }; +/* Set up *FD to have PORT its server port, doing appropriate ctty magic. + Does no locking or unlocking. */ +extern void _hurd_port2fd (struct _hurd_fd *fd, io_t port, int flags); + +/* Allocate a new file descriptor and install PORT in it (doing any + appropriate ctty magic); consumes a user reference on PORT. FLAGS are + as for `open'; only O_NOCTTY is meaningful, but all are saved. + + If the descriptor table is full, set errno, and return -1. + If DEALLOC is nonzero, deallocate PORT first. */ +extern int _hurd_intern_fd (io_t port, int flags, int dealloc); + +/* Allocate a new file descriptor and return it, locked. + The new descriptor will not be less than FIRST_FD. */ +extern struct _hurd_fd *_hurd_alloc_fd (int *fd_ptr, int first_fd); + + struct _hurd_dtable { int size; /* Number of elts in `d' array. */ @@ -171,9 +243,12 @@ struct _hurd_fd *d; }; + +#ifdef noteven extern struct mutex _hurd_dtable_lock; /* Locks next two. */ +#endif extern struct _hurd_dtable _hurd_dtable; -extern int _hurd_dtable_rlimit; +extern int _hurd_dtable_rlimit; /* RLIM_OFILES: number of file descriptors. */ /* If not NULL, pointed-to word is set when _hurd_dtable.d changes. User who set `user_dealloc' should free the _hurd_dtable.d value @@ -209,46 +284,14 @@ __mutex_unlock (&_hurd_dtable_lock); if (*dealloc) /* _hurd_dtable_resizes is a symbol set. - setdtablesize.c gives it one element: free. - If setdtablesize is not linked in, *DEALLOC + setrlimit.c gives it one element: free. + If setrlimit is not linked in, *DEALLOC will never get set, so we will never get here. This hair avoids linking in free if we don't need it. */ - (*_hurd_dtable_resizes.free) (dtable); -} - - -/* Allocate a new file descriptor and set it to PORT. - If the table is full, deallocate PORT, set errno, and return -1. */ -static inline int -_hurd_dalloc (io_t port, io_t ctty, int flags) -{ - int i; - __mutex_lock (&hurd_dtable_lock); - for (i = 0; i < _hurd_dtable.size; ++i) - { - struct _hurd_fd *d = &_hurd_dtable.d[i]; - __spin_lock (&d->port.lock); - if (d->port.port == MACH_PORT_NULL) - { - d->port.port = port; - d->port.user_dealloc = NULL; - d->ctty.port = ctty; - d->ctty.user_dealloc = NULL; - d->flags = flags; - __spin_unlock (&d->port.lock); - __mutex_unlock (&hurd_dtable_lock); - return i; - } - __spin_unlock (&d->port.lock); - } - __mutex_unlock (&hurd_dtable_lock); - __mach_port_deallocate (__mach_task_self (), port); - __mach_port_deallocate (__mach_task_self (), ctty); - errno = EMFILE; - return -1; + (*_hurd_dtable_resizes.free) (dtable.d); } -/* Returns the descriptor cell for FD in DTABLE, locked. */ +/* Return the descriptor cell for FD in DTABLE, locked. */ static inline struct _hurd_fd * _hurd_dtable_fd (int fd, struct _hurd_dtable dtable) { @@ -273,13 +316,15 @@ struct _hurd_fd *d; }; -/* Returns the descriptor cell for FD, locked. */ +/* Returns the descriptor cell for FD, locked. The passed DEALLOC word and + returned structure hold onto the descriptor table to it doesn't move + while you might be using a pointer into it. */ static inline struct _hurd_fd_user _hurd_fd (int fd, int *dealloc) { struct _hurd_fd_user d; d.dtable = _hurd_dtable_use (dealloc); - d.d = _hurd_dtable_fd (fd, dtable); + d.d = _hurd_dtable_fd (fd, d.dtable); if (d.d == NULL) _hurd_dtable_done (d.dtable, dealloc); return d; @@ -288,7 +333,7 @@ static inline void _hurd_fd_done (struct _hurd_fd_user d, int *dealloc) { - _hurd_dtable_done (d->dtable, dealloc); + _hurd_dtable_done (d.dtable, dealloc); } /* Evaluate EXPR with the variable `port' bound to the port to FD, @@ -296,57 +341,81 @@ #define _HURD_DPORT_USE(fd, expr) \ ({ int __dealloc_dt; \ + error_t __result; \ struct _hurd_fd_user __d = _hurd_fd (fd, &__dealloc_dt); \ - if (__d.cell == NULL) \ - EBADF; \ + if (__d.d == NULL) \ + __result = EBADF; \ else \ { \ - int __dealloc = 0, __dealloc_ctty = 0; \ + int __dealloc, __dealloc_ctty; \ io_t port = _hurd_port_locked_get (&__d.d->port, &__dealloc); \ io_t ctty = _hurd_port_locked_get (&__d.d->ctty, &__dealloc_ctty); \ - __typeof (expr) __result; \ __result = (expr); \ - _hurd_port_free (&__d.d->port, port, &__dealloc); \ + _hurd_port_free (&__d.d->port, &__dealloc, port); \ if (ctty != MACH_PORT_NULL) \ - _hurd_port_free (&__d.d->ctty, ctty, &__dealloc_ctty); \ + _hurd_port_free (&__d.d->ctty, &__dealloc_ctty, ctty); \ _hurd_fd_done (__d, &__dealloc_dt); \ - __result; \ } \ + __result; \ }) \ static inline int -_hurd_dfail (int fd, error_t err) +__hurd_dfail (int fd, error_t err) { - int signo; switch (err) { case MACH_SEND_INVALID_DEST: /* The server has disappeared! */ +#ifdef notyet _hurd_raise_signal (NULL, SIGLOST, fd); +#else + abort (); +#endif break; case EPIPE: +#ifdef notyet _hurd_raise_signal (NULL, SIGPIPE, fd); +#else + abort (); +#endif break; + default: + return __hurd_fail (err); } - return __hurd_fail (err); } /* Return the socket server for sockaddr domain DOMAIN. */ extern socket_t _hurd_socket_server (int domain); -/* Return a receive right which will not be sent to. */ -extern mach_port_t _hurd_dead_recv (void); - /* Current process IDs. */ extern pid_t _hurd_pid, _hurd_ppid, _hurd_pgrp; extern int _hurd_orphaned; +#ifdef noteven +extern struct mutex _hurd_pid_lock; /* Locks above. */ +#endif /* User and group IDs. */ -extern mutex_t _hurd_idlock; -extern int _hurd_id_valid; /* Nonzero if _hurd_id is valid. */ -extern idblock_t _hurd_id; -extern auth_t _hurd_rid_auth; /* Cache used by access. */ +struct _hurd_id_data + { +#ifdef noteven + mutex_t lock; +#endif + + int valid; /* If following data are up to date. */ + + struct + { + uid_t *uids; + gid_t *gids; + unsigned int nuids, ngids; + } gen, aux; + + auth_t rid_auth; /* Cache used by access. */ + }; +extern struct _hurd_id_data _hurd_id; +/* Update _hurd_id (caller should be holding the lock). */ +extern error_t _hurd_check_ids (void); /* Unix `data break', for brk and sbrk. @@ -353,7 +422,9 @@ If brk and sbrk are not used, this info will not be initialized or used. */ extern vm_address_t _hurd_brk; /* Data break. */ extern vm_address_t _hurd_data_end; /* End of allocated space. */ +#ifdef noteven extern struct mutex _hurd_brk_lock; /* Locks brk and data_end. */ +#endif extern int _hurd_set_data_limit (const struct rlimit *); /* Set the data break; the brk lock must @@ -368,10 +439,13 @@ /* Per-thread signal state. */ struct _hurd_sigstate { + /* XXX should be in cthread variable (?) */ thread_t thread; struct _hurd_sigstate *next; /* Linked-list of thread sigstates. */ +#ifdef noteven struct mutex lock; /* Locks the rest of this structure. */ +#endif sigset_t blocked; sigset_t pending; struct sigaction actions[NSIG]; @@ -379,7 +453,9 @@ int sigcodes[NSIG]; /* Codes for pending signals. */ int suspended; /* If nonzero, sig_post signals `arrived'. */ +#ifdef noteven struct condition arrived; +#endif #if 0 int vforked; /* Nonzero if this thread is a vfork child. */ @@ -423,6 +499,7 @@ extern void _hurd_msgport_receive (void); +#ifdef notyet /* Perform interruptible RPC CALL on PORT. The args in CALL should be constant or local variable refs. They may be evaluated many times, and must not change. @@ -465,6 +542,57 @@ __ss->intr_port = MACH_PORT_NULL; __err; }) + +#endif /* notyet */ + +/* Mask of signals that cannot be caught, blocked, or ignored. */ +#define _SIG_CANT_MASK (__sigmask (SIGSTOP) | __sigmask (SIGKILL)) + +/* Do an RPC to a process's message port. + + Each argument is an expression which returns an error code; each + expression may be evaluated several times. FETCH_MSGPORT_EXPR should + fetch the appropriate message port and store it in the local variable + `msgport'. FETCH_REFPORT_EXPR should fetch the appropriate message port + and store it in the local variable `refport' (if no reference port is + needed in the call, then FETCH_REFPORT_EXPR should be simply + KERN_SUCCESS or 0). Both of these are assumed to create user + references, which this macro deallocates. RPC_EXPR should perform the + desired RPC operation using `msgport' and `refport'. + + The reason for the complexity is that a process's message port and + reference port may change between fetching those ports and completing an + RPC using them (usually they change only when a process execs). The RPC + will fail with MACH_SEND_INVALID_DEST if the msgport dies before we can + send the RPC request; or with MIG_SERVER_DIED if the msgport was + destroyed after we sent the RPC request but before it was serviced. In + either of these cases, we retry the entire operation, discarding the old + message and reference ports and fetch them anew. */ + +#define _HURD_MSGPORT_RPC(fetch_msgport_expr, fetch_refport_expr, rpc_expr) \ +({ \ + error_t __err; \ + mach_port_t msgport, refport = MACH_PORT_NULL; \ + do \ + { \ + /* Get the message port. */ \ + if (__err = (fetch_msgport_expr)) \ + break; \ + /* Get the reference port. */ \ + if (__err = (fetch_refport_expr)) \ + { \ + /* Couldn't get it; deallocate MSGPORT and fail. */ \ + mach_port_deallocate (__mach_task_self (), msgport); \ + break; \ + } \ + __err = (rpc_expr); \ + mach_port_deallocate (__mach_task_self (), msgport); \ + if (refport != MACH_PORT_NULL) \ + mach_port_deallocate (__mach_task_self (), refport); \ + } while (__err != MACH_SEND_INVALID_DEST && \ + __err != MIG_SERVER_DIED); \ + __err; \ +}) /* Calls to get and set basic ports. */ extern process_t getproc (void); @@ -471,37 +599,92 @@ extern file_t getccdir (void), getcwdir (void), getcrdir (void); extern auth_t getauth (void); extern int setproc (process_t); -extern int setccdir (file_t), setcwdir (file_t), setcrdir (file_t); +extern int setcwdir (file_t), setcrdir (file_t); /* Does reauth with the proc server and fd io servers. */ extern int __setauth (auth_t), setauth (auth_t); -#define setauth __setauth extern error_t __hurd_path_split (file_t crdir, file_t cwdir, const char *file, - file_t *dir, const char **name); -#define hurd_path_split __hurd_path_split + file_t *dir, char **name); +extern error_t hurd_path_split (file_t crdir, file_t cwdir, + const char *file, + file_t *dir, char **name); extern error_t __hurd_path_lookup (file_t crdir, file_t cwdir, const char *file, int flags, mode_t mode, - file_t *file); -#define hurd_path_lookup __hurd_path_lookup + file_t *port); +extern error_t hurd_path_lookup (file_t crdir, file_t cwdir, + const char *filename, + int flags, mode_t mode, + file_t *port); /* Returns a port to the directory, and sets *NAME to the file name. */ -extern file_t __path_split (const char *file, const char **name); -#define path_split __path_split +extern file_t __path_split (const char *file, char **name); +extern file_t path_split (const char *file, char **name); /* Looks up FILE with the given FLAGS and MODE (as for dir_pathtrans). */ extern file_t __path_lookup (const char *file, int flags, mode_t mode); -#define path_lookup __path_lookup +extern file_t path_lookup (const char *file, int flags, mode_t mode); /* Open a file descriptor on a port. */ -extern int openport (io_t port); +extern int openport (io_t port, int flags); +/* Execute a file, replacing the current program image. */ +extern error_t _hurd_exec (file_t file, + char *const argv[], + char *const envp[]); + /* Inform the proc server we have exitted with STATUS, and kill the task thoroughly. This function never returns, no matter what. */ extern volatile void _hurd_exit (int status); + +/* Initialize the library data structures from the + ints and ports passed to us by the exec server. + Then vm_deallocate PORTARRAY and INTARRAY. */ +extern void _hurd_init (int flags, char **argv, + mach_port_t *portarray, size_t portarraysize, + int *intarray, size_t intarraysize); + +/* Do startup handshaking with the proc server. */ +extern void _hurd_proc_init (char **argv); + +/* Fetch the host privileged port and device master port from the proc + server. They are fetched only once and then cached in the variables + below. A special program that gets them from somewhere other than the + proc server (such as a bootstrap filesystem) can set these variables at + startup to install the ports. */ +extern kern_return_t get_privileged_ports (host_priv_t *host_priv_ptr, + device_t *device_master_ptr); +extern mach_port_t _hurd_host_priv, _hurd_device_master; + +/* Convert between PIDs and task ports. */ +extern pid_t __task2pid (task_t), task2pid (task_t); +extern task_t __pid2task (pid_t), pid2task (pid_t); + +/* User-registered handlers for specific `ioctl' requests. */ + +struct ioctl_handler + { + int first_request, last_request; /* Range of handled request values. */ + + int (*handler) (int fd, int request, void *arg); + + struct ioctl_handler *next; /* Next handler. */ + }; + +/* Define a library-internal handler for ioctl commands + between FIRST and LAST inclusive. */ + +#define _HURD_HANDLE_IOCTLS(handler, first, last) \ + static const struct ioctl_handler handler##_ioctl_handler = \ + { first, last, handler, NULL }; \ + text_set_element (_hurd_ioctl_handler_lists, ##handler##_ioctl_handler) + +/* Define a library-internal handler for a single ioctl command. */ +#define _HURD_HANDLE_IOCTL(handler, ioctl) \ + _HURD_HANDLE_IOCTLS (handler, (ioctl), (ioctl)) #endif /* hurd.h */ diff -ruN glibc-1.06/hurd/hurdauth.c glibc-1.07/hurd/hurdauth.c --- glibc-1.06/hurd/hurdauth.c Wed Mar 25 19:16:25 1992 +++ glibc-1.07/hurd/hurdauth.c @@ -1,100 +0,0 @@ -/* Copyright (C) 1991, 1992 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 - -struct _hurd_port _hurd_auth; - -error_t -__add_auth (sigthread_t me, - auth_t addauth) -{ - error_t err; - auth_t newauth; - - if (err = _HURD_PORT_USE (&_hurd_auth, - __auth_combine (port, addauth, &newauth))) - return err; - - /* XXX clobbers errno. Need per-thread errno. */ - err = __setauth (newauth); - __mach_port_deallocate (__mach_task_self (), newauth); - if (err) - return errno; - - __mach_port_deallocate (__mach_task_self (), addauth); - return POSIX_SUCCESS; -} - -error_t -__del_auth (sigthread_t me, task_t task, - uid_t *uids, size_t nuids, - gid_t *gids, size_t ngids) -{ - error_t err; - auth_t newauth; - size_t i, j; - - if (task != __mach_task_self ()) - return EPERM; - - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) - { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return err; - } - _hurd_id_valid = 1; - } - - while (nuids-- > 0) - { - const uid_t uid = *uids++; - for (i = 0; i < _hurd_id.nuids; ++i) - if (_hurd_id.uidset[i] == uid) - /* Move the last uid into this slot, and decrease the - number of uids so the last slot is no longer used. */ - _hurd_id.uidset[i] = _hurd_id.uidset[--_hurd_id.nuids]; - } - while (ngids-- > 0) - { - const gid_t gid = *gids++; - for (i = 0; i < _hurd_id.ngroups; ++i) - if (_hurd_id.gidset[i] == gid) - /* Move the last gid into this slot, and decrease the - number of gids so the last slot is no longer used. */ - _hurd_id.gidset[i] = _hurd_id.gidset[--_hurd_id.ngroups]; - } - - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = !err; - __mutex_unlock (&_hurd_idlock); - - if (err) - return err; - err = __setauth (newauth); /* XXX clobbers errno */ - __mach_port_deallocate (__mach_task_self (), newauth); - if (err) - return errno; - return POSIX_SUCCESS; -} diff -ruN glibc-1.06/hurd/hurdexec.c glibc-1.07/hurd/hurdexec.c --- glibc-1.06/hurd/hurdexec.c +++ glibc-1.07/hurd/hurdexec.c Thu Jan 6 01:41:07 1994 @@ -0,0 +1,188 @@ +/* Copyright (C) 1991, 1992, 1993, 1994 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 +#include +#include +#include +#include +#include +#include + +/* Replace the current process, executing FILE with arguments ARGV and + environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ +error_t +_hurd_exec (file_t file, char *const argv[], char *const envp[]) +{ + error_t err; + char *args, *env, *ap; + size_t argslen, envlen; + int ints[INIT_INT_MAX]; + mach_port_t ports[_hurd_nports]; + int dealloc_ports[_hurd_nports]; + file_t *dtable; + int dtablesize; + struct _hurd_port **dtable_cells; + int *dealloc_dtable, *dealloc_cells; + int i; + char *const *p; + struct _hurd_sigstate *ss; + + /* Pack the arguments into an array with nulls separating the elements. */ + argslen = 0; + p = argv; + while (*p != NULL) + argslen += strlen (*p++) + 1; + args = __alloca (argslen); + ap = args; + for (p = argv; *p != NULL; ++p) + ap = __memccpy (ap, *p, '\0', ULONG_MAX); + + /* Pack the environment into an array with nulls separating elements. */ + envlen = 0; + p = envp; + while (*p != NULL) + envlen += strlen (*p++) + 1; + env = __alloca (envlen); + ap = env; + for (p = envp; *p != NULL; ++p) + ap = __memccpy (ap, *p, '\0', ULONG_MAX); + + /* Load up the ports to give to the new program. */ + for (i = 0; i < _hurd_nports; ++i) + ports[i] = _hurd_port_get (&_hurd_ports[i], &dealloc_ports[i]); + + /* Load up the ints to give the new program. */ + for (i = 0; i < INIT_INT_MAX; ++i) + switch (i) + { + case INIT_UMASK: + ints[i] = _hurd_umask; + break; + + case INIT_SIGMASK: + case INIT_SIGIGN: + case INIT_SIGPENDING: + /* We will set these all below. */ + break; + + default: + ints[i] = 0; + } + + ss = _hurd_thread_sigstate (__mach_thread_self ()); + ints[INIT_SIGMASK] = ss->blocked; + ints[INIT_SIGPENDING] = ss->pending; + ints[INIT_SIGIGN] = 0; + for (i = 1; i < NSIG; ++i) + if (ss->actions[i].sa_handler == SIG_IGN) + ints[INIT_SIGIGN] |= __sigmask (i); + + /* We hold the sigstate lock until the exec has failed so that no signal + can arrive between when we pack the blocked and ignored signals, and + when the exec actually happens. A signal handler could change what + signals are blocked and ignored. Either the change will be reflected + in the exec, or the signal will never be delivered. */ + + /* Pack up the descriptor table to give the new program. */ + __mutex_lock (&_hurd_dtable_lock); + if (_hurd_dtable.d != NULL) + { + dtablesize = _hurd_dtable.size; + dtable = __alloca (dtablesize * sizeof (dtable[0])); + dealloc_dtable = __alloca (dtablesize * sizeof (dealloc_dtable[0])); + dtable_cells = __alloca (dtablesize * sizeof (dealloc_cells[0])); + for (i = 0; i < dtablesize; ++i) + { + struct _hurd_fd *const d = &_hurd_dtable.d[i]; + __spin_lock (&d->port.lock); + if (d->flags & FD_CLOEXEC) + { + dtable[i] = MACH_PORT_NULL; + __spin_unlock (&d->port.lock); + } + else + { + /* If this is a descriptor to our controlling tty, + we want to give the normal port, not the foreground port. */ + dtable[i] = _hurd_port_get (&d->ctty, &dealloc_dtable[i]); + if (dtable[i] == MACH_PORT_NULL) + { + dtable[i] = _hurd_port_locked_get (&d->port, + &dealloc_dtable[i]); + dtable_cells[i] = &d->port; + } + else + { + __spin_unlock (&d->port.lock); + dtable_cells[i] = &d->ctty; + } + } + } + } + else + { + dtable = _hurd_init_dtable; + dtablesize = _hurd_init_dtablesize; + dealloc_dtable = NULL; + dealloc_cells = NULL; + } + + /* The information is all set up now. Try to exec the file. */ + + { + mach_port_t please_dealloc[_hurd_nports + dtablesize]; + mach_port_t *p = please_dealloc; + + /* Request the exec server to deallocate some ports from us if the exec + succeeds. The init ports and descriptor ports will arrive in the + new program's exec_startup message. If we failed to deallocate + them, the new program would have duplicate user references for them. + But we cannot deallocate them ourselves, because we must still have + them after a failed exec call. */ + + for (i = 0; i < _hurd_nports; ++i) + *p++ = ports[i]; + for (i = 0; i < dtablesize; ++i) + *p++ = dtable[i]; + + err = __file_exec (file, __mach_task_self (), + 0, + args, argslen, env, envlen, + dtable, dtablesize, MACH_MSG_TYPE_COPY_SEND, + ports, _hurd_nports, MACH_MSG_TYPE_COPY_SEND, + ints, INIT_INT_MAX, + please_dealloc, p - please_dealloc, + NULL, 0); + } + + /* Safe to let signals happen now. */ + __mutex_unlock (&ss->lock); + + /* Release references to the standard ports. */ + for (i = 0; i < _hurd_nports; ++i) + _hurd_port_free (&_hurd_ports[i], &dealloc_ports[i], ports[i]); + + if (dealloc_dtable != NULL) + /* Release references to the file descriptor ports. */ + for (i = 0; i < dtablesize; ++i) + if (dtable[i] != MACH_PORT_NULL) + _hurd_port_free (dtable_cells[i], &dealloc_dtable[i], dtable[i]); + + return err; +} diff -ruN glibc-1.06/hurd/hurdfrob.c glibc-1.07/hurd/hurdfrob.c --- glibc-1.06/hurd/hurdfrob.c Wed Jul 1 00:52:43 1992 +++ glibc-1.07/hurd/hurdfrob.c @@ -1,125 +0,0 @@ -/* Copyright (C) 1992 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 -#include "msg_server.h" - -error_t -__get_init_port (mach_port_t msgport, mach_port_t auth, - int which, mach_port_t *port) -{ - if (task != mach_task_self () && - _HURD_PORT_USE (&_hurd_auth, auth != port)) - return EPERM; - - switch (which) - { - case INIT_PORT_CWDIR: - *port = get (&_hurd_cwdir); - return 0; - case INIT_PORT_CRDIR: - *port = get (&_hurd_crdir); - return 0; - case INIT_PORT_PROC: - *port = get (&_hurd_proc); - return 0; - case INIT_PORT_AUTH: - *port = get (&_hurd_auth); - return 0; - case INIT_PORT_LOGINCOLL: - return EOPNOTSUPP; /* XXX */ - case INIT_PORT_BOOTSTRAP: - return __task_get_special_port (__mach_task_self (), - TASK_BOOTSTRAP_PORT, - port); - default: - return EINVAL; - } -} - -error_t -__set_init_port (mach_port_t msgport, task_t task, - int which, mach_port_t port) -{ - if (task != mach_task_self () && - _HURD_PORT_USE (&_hurd_auth, auth != port)) - return EPERM; - - switch (which) - { - case INIT_PORT_CWDIR: - set (&_hurd_cwdir); - return 0; - case INIT_PORT_CRDIR: - set (&_hurd_crdir); - return 0; - case INIT_PORT_PROC: - set (&_hurd_proc); /* XXX do more? */ - return 0; - case INIT_PORT_AUTH: - __setauth (&_hurd_auth); - return errno; /* XXX can't clobber errno */ - case INIT_PORT_LOGINCOLL: - return EOPNOTSUPP; /* XXX */ - case INIT_PORT_BOOTSTRAP: - return __task_set_special_port (__mach_task_self (), - TASK_BOOTSTRAP_PORT, - port); - default: - return EINVAL; - } -} - -error_t -__get_init_int (mach_port_t msgport, mach_port_t auth, - int which, int *value) -{ - if (task != mach_task_self () && - _HURD_PORT_USE (&_hurd_auth, auth != port)) - return EPERM; - - switch (which) - { - case INIT_UMASK: - *value = _hurd_umask; - return 0; - case INIT_SIGMASK: - { - struct _hurd_sigstate *ss = _hurd_thread_sigstate (_hurd_sigthread); - *value = ss->blocked; - __mutex_unlock (&ss->lock); - return 0; - } - case INIT_SIGMASK: - { - struct _hurd_sigstate *ss = _hurd_thread_sigstate (_hurd_sigthread); - sigset_t ign; - int sig; - __sigemptyset (&ign); - for (sig = 1; sig < NSIG; ++sig) - if (ss->actions[sig].sa_handler == SIG_IGN) - __sigaddset (sig, &ign); - __mutex_unlock (&ss->lock); - *value = ign - return 0; - } - /* XXX ctty crap */ - default: - return EINVAL; - } -} diff -ruN glibc-1.06/hurd/hurdid.c glibc-1.07/hurd/hurdid.c --- glibc-1.06/hurd/hurdid.c Mon Nov 11 22:34:56 1991 +++ glibc-1.07/hurd/hurdid.c Thu Oct 28 23:08:03 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -19,15 +19,64 @@ #include #include -struct mutex _hurd_idlock; -int _hurd_id_valid; -struct idblock _hurd_id; +struct _hurd_id_data _hurd_id; static void init_id (void) { - __mutex_init (&_hurd_idlock); - _hurd_id_valid = 0; +#ifdef noteven + __mutex_init (&_hurd_id.lock); +#endif + _hurd_id.valid = 0; } text_set_element (__libc_subinit, init_id); + +/* Check that _hurd_id.{gen,aux} are valid and update them if not. + Expects _hurd_id.lock to be held and does not release it. */ + +error_t +_hurd_check_ids (void) +{ + if (! _hurd_id.valid) + { + error_t err; + inline void dealloc (__typeof (_hurd_id.gen) *p) + { + if (p->uids) + { + __vm_deallocate (__mach_task_self (), + (vm_address_t) p->uids, + p->nuids * sizeof (uid_t)); + p->uids = NULL; + } + if (p->gids) + { + __vm_deallocate (__mach_task_self (), + (vm_address_t) p->gids, + p->ngids * sizeof (gid_t)); + p->gids = NULL; + } + } + + dealloc (&_hurd_id.gen); + dealloc (&_hurd_id.aux); + if (_hurd_id.rid_auth) + { + __mach_port_deallocate (__mach_task_self (), _hurd_id.rid_auth); + _hurd_id.rid_auth = MACH_PORT_NULL; + } + + if (err = __USEPORT (AUTH, __auth_getids + (port, + &_hurd_id.gen.uids, &_hurd_id.gen.nuids, + &_hurd_id.aux.uids, &_hurd_id.aux.nuids, + &_hurd_id.gen.gids, &_hurd_id.gen.ngids, + &_hurd_id.aux.gids, &_hurd_id.aux.ngids))) + return err; + + _hurd_id.valid = 1; + } + + return 0; +} diff -ruN glibc-1.06/hurd/hurdinit.c glibc-1.07/hurd/hurdinit.c --- glibc-1.06/hurd/hurdinit.c Tue Jul 14 23:26:27 1992 +++ glibc-1.07/hurd/hurdinit.c Sun Nov 7 08:31:07 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,8 +17,18 @@ Cambridge, MA 02139, USA. */ #include +#include +#include +#include +#include +struct _hurd_port *_hurd_ports; +unsigned int _hurd_nports; +mode_t _hurd_umask; + +void _hurd_proc_init (char **argv); + /* Initialize the library data structures from the ints and ports passed to us by the exec server. @@ -25,91 +35,102 @@ PORTARRAY and INTARRAY are vm_deallocate'd. */ void -_hurd_init (char **argv, +_hurd_init (int flags, char **argv, mach_port_t *portarray, size_t portarraysize, int *intarray, size_t intarraysize) { int i; + _hurd_ports = malloc (portarraysize * sizeof (*_hurd_ports)); + if (_hurd_ports == NULL) + __libc_fatal ("Can't allocate _hurd_ports\n"); + _hurd_nports = portarraysize; + /* See what ports we were passed. */ for (i = 0; i < portarraysize; ++i) - switch (i) - { -#define initport(upper, lower) \ - case INIT_PORT_##upper: \ - _hurd_port_init (&_hurd_##lower, portarray[i]); \ - break - - /* Install the standard ports in their cells. */ - initport (CCDIR, ccdir); - initport (CWDIR, cwdir); - initport (CRDIR, crdir); - initport (AUTH, auth); - - case INIT_PORT_PROC: - /* Install the proc port and tell the proc server we exist. */ - _hurd_proc_init (portarray[i], argv); - break; - - case INIT_PORT_BOOTSTRAP: - /* When the user asks for the bootstrap port, - he will get the one the exec server passed us. */ - __task_set_special_port (__mach_task_self (), - TASK_BOOTSTRAP_PORT, portarray[i]); - /* FALLTHROUGH */ - - default: - /* Wonder what that could be. */ - __mach_port_deallocate (__mach_task_self (), portarray[i]); - break; - } + { + _hurd_port_init (&_hurd_ports[i], portarray[i]); + + switch (i) + { + case INIT_PORT_PROC: + /* Tell the proc server we exist, if it does. */ + if (portarray[i] != MACH_PORT_NULL) + _hurd_proc_init (argv); + break; + + case INIT_PORT_BOOTSTRAP: + /* When the user asks for the bootstrap port, + he will get the one the exec server passed us. */ + __task_set_special_port (__mach_task_self (), + TASK_BOOTSTRAP_PORT, portarray[i]); + break; + } + } if (intarraysize > INIT_UMASK) _hurd_umask = intarray[INIT_UMASK] & 0777; else - _hurd_umask = 0022; /* XXX */ - if (intarraysize > INIT_CTTY_FILEID) /* Knows that these are sequential. */ - { - _hurd_ctty_fstype = intarray[INIT_CTTY_FSTYPE]; - _hurd_ctty_fsid.val[0] = intarray[INIT_CTTY_FSID1]; - _hurd_ctty_fsid.val[1] = intarray[INIT_CTTY_FSID2]; - _hurd_ctty_fileid = intarray[INIT_CTTY_FILEID]; - } - + _hurd_umask = CMASK; /* All done with init ints and ports. */ - __vm_deallocate (__mach_task_self (), intarray, nints * sizeof (int)); __vm_deallocate (__mach_task_self (), - portarray, nports * sizeof (mach_port_t)); + (vm_address_t) intarray, + intarraysize * sizeof (int)); + __vm_deallocate (__mach_task_self (), + (vm_address_t) portarray, + portarraysize * sizeof (mach_port_t)); + + if (flags & EXEC_SECURE) + /* XXX if secure exec, elide environment variables + which the library uses and could be security holes. + CORESERVER, COREFILE + */ ; } -/* The user can do "int _hide_arguments = 1;" to make sure the - arguments are never visible with `ps'. */ -int _hide_arguments; +/* The user can do "int _hide_arguments = 1;" to make + sure the arguments are never visible with `ps'. */ +int _hide_arguments, _hide_environment; -/* Make PROCSERVER be our proc server port. - Tell the proc server that we exist. */ +/* Do startup handshaking with the proc server just installed in _hurd_ports. + Call _hurdsig_init to set up signal processing. */ void -_hurd_proc_init (process_t procserver, char **argv) +_hurd_proc_init (char **argv) { - mach_port_t oldsig, oldtask; - - _hurd_port_init (&_hurd_proc, procserver); - - /* Tell the proc server where our args and environment are. */ - __proc_setprocargs (procserver, _hide_arguments ? 0 : argv, __environ); + mach_port_t oldmsg; + int dealloc; + process_t procserver; +#ifdef notyet /* Initialize the signal code; Mach exceptions will become signals. - This sets _hurd_msgport; it must be run before _hurd_proc_init. */ + This function will be a no-op on calls after the first. + On the first call, it sets up the message port and the signal thread. */ _hurdsig_init (); +#endif - /* Give the proc server our task and signal ports. */ - __proc_setports (procserver, - _hurd_msgport, __mach_task_self (), - &oldsig, &oldtask); - if (oldsig != MACH_PORT_NULL) - __mach_port_deallocate (__mach_task_self (), oldsig); - if (oldtask != MACH_PORT_NULL) - __mach_port_deallocate (__mach_task_self (), oldtask); + /* The signal thread is now prepared to receive messages. + It is safe to give the port to the proc server. */ + + procserver = _hurd_port_get (&_hurd_ports[INIT_PORT_PROC], &dealloc); + +#ifdef notyet + /* Give the proc server our message port. */ + __proc_setmsgport (procserver, _hurd_msgport, &oldmsg); + if (oldmsg != MACH_PORT_NULL) + /* Deallocate the old msg port we replaced. */ + __mach_port_deallocate (__mach_task_self (), oldmsg); +#endif + + /* Tell the proc server where our args and environment are. */ + __proc_setprocargs (procserver, + _hide_arguments ? 0 : (vm_address_t) argv, + _hide_environment ? 0 : (vm_address_t) __environ); + + _hurd_port_free (&_hurd_ports[INIT_PORT_PROC], &dealloc, procserver); + +#ifdef notyet + /* Initialize proc server-assisted fault recovery for the signal thread. */ + _hurdsig_fault_init (); +#endif } diff -ruN glibc-1.06/hurd/hurdpath.c glibc-1.07/hurd/hurdpath.c --- glibc-1.06/hurd/hurdpath.c Thu Jun 4 20:40:01 1992 +++ glibc-1.07/hurd/hurdpath.c Mon Dec 13 19:23:02 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include error_t __hurd_path_lookup (file_t crdir, file_t cwdir, @@ -26,10 +27,10 @@ file_t *result) { error_t err; - file_t startdir, result; + file_t startdir; enum retry_type doretry; - char retryname[PATH_MAX]; + char retryname[1024]; /* XXX string_t LOSES! */ file_t newpt; int dealloc_dir; int nloops; @@ -48,8 +49,8 @@ for (;;) { - err = __dir_pathtrans (startdir, path, flags, mode, - &doretry, retryname, &result); + err = __dir_pathtrans (startdir, (char *) path, flags, mode, + &doretry, retryname, result); if (dealloc_dir) __mach_port_deallocate (__mach_task_self (), startdir); @@ -59,19 +60,32 @@ switch (doretry) { case FS_RETRY_NONE: - return POSIX_SUCCESS; + /* We got a successful translation. Now apply any + open-time action flags we were passed. */ + if (flags & O_EXLOCK) + ; /* XXX */ + if (!err && (flags & O_SHLOCK)) + ; /* XXX */ + if (!err && (flags & O_TRUNC)) + err = __file_truncate (*result, 0); + + if (err) + __mach_port_deallocate (__mach_task_self (), *result); + return err; case FS_RETRY_REAUTH: - __io_reauthenticate (*result); - _HURD_PORT_USE (&_hurd_auth, - __auth_user_authenticate (port, result, &newpt)); + __io_reauthenticate (*result, _hurd_pid); + __USEPORT (AUTH, __auth_user_authenticate (port, *result, _hurd_pid, + &newpt)); __mach_port_deallocate (__mach_task_self (), *result); *result = newpt; /* Fall through. */ case FS_RETRY_NORMAL: - if (nloops++ >= MAXSYMLINKS) +#ifdef SYMLINK_MAX + if (nloops++ >= SYMLINK_MAX) return ELOOP; +#endif if (retryname[0] == '/') { @@ -88,6 +102,9 @@ dealloc_dir = 1; path = retryname; } + break; + + /* case FS_RETRY_MAGICAL: XXX */ } } } @@ -114,7 +131,7 @@ if (lastslash == path) { /* "/foobar" => crdir + "foobar". */ - *name = path + 1; + *name = (char *) path + 1; __mach_port_mod_refs (__mach_task_self (), MACH_PORT_RIGHT_SEND, crdir, +1); *dir = crdir; @@ -125,8 +142,8 @@ /* "/dir1/dir2/.../file". */ char dirname[lastslash - path + 1]; memcpy (dirname, path, lastslash - path); - dirname[lastslath - path] = '\0'; - *name = lastslash + 1; + dirname[lastslash - path] = '\0'; + *name = (char *) lastslash + 1; return __hurd_path_lookup (crdir, cwdir, dirname, 0, 0, dir); } } @@ -133,7 +150,7 @@ else { /* "foobar" => cwdir + "foobar". */ - *name = path; + *name = (char *) path; __mach_port_mod_refs (__mach_task_self (), MACH_PORT_RIGHT_SEND, cwdir, 1); *dir = cwdir; @@ -148,13 +165,13 @@ file_t result, crdir, cwdir; int dealloc_crdir, dealloc_cwdir; - crdir = _hurd_port_get (&_hurd_crdir, &dealloc_crdir); - cwdir = _hurd_port_get (&_hurd_cwdir, &dealloc_cwdir); + crdir = _hurd_port_get (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir); + cwdir = _hurd_port_get (&_hurd_ports[INIT_PORT_CWDIR], &dealloc_cwdir); err = __hurd_path_lookup (crdir, cwdir, path, flags, mode, &result); - _hurd_port_free (crdir, &dealloc_crdir); - _hurd_port_free (cwdir, &dealloc_cwdir); + _hurd_port_free (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir, crdir); + _hurd_port_free (&_hurd_ports[INIT_PORT_CWDIR], &dealloc_cwdir, cwdir); if (err) { @@ -172,13 +189,13 @@ file_t dir, crdir, cwdir; int dealloc_crdir, dealloc_cwdir; - crdir = _hurd_port_get (&_hurd_crdir, &dealloc_crdir); - cwdir = _hurd_port_get (&_hurd_cwdir, &dealloc_cwdir); + crdir = _hurd_port_get (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir); + cwdir = _hurd_port_get (&_hurd_ports[INIT_PORT_CWDIR], &dealloc_cwdir); err = __hurd_path_split (crdir, cwdir, path, &dir, name); - _hurd_port_free (crdir, &dealloc_crdir); - _hurd_port_free (cwdir, &dealloc_cwdir); + _hurd_port_free (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir, crdir); + _hurd_port_free (&_hurd_ports[INIT_PORT_CWDIR], &dealloc_cwdir, cwdir); if (err) { diff -ruN glibc-1.06/hurd/hurdpid.c glibc-1.07/hurd/hurdpid.c --- glibc-1.06/hurd/hurdpid.c Wed Mar 25 19:17:47 1992 +++ glibc-1.07/hurd/hurdpid.c Wed Nov 3 11:13:45 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,7 +17,11 @@ Cambridge, MA 02139, USA. */ #include +#include +#if 0 +struct mutex _hurd_pid_lock; +#endif pid_t _hurd_pid, _hurd_ppid, _hurd_pgrp; int _hurd_orphaned; @@ -24,23 +28,36 @@ static void init_pids (void) { - int dealloc; - process_t proc = _hurd_port_get (&_hurd_proc, &dealloc); - - __proc_getpids (proc, &_hurd_pid, &_hurd_ppid, &_hurd_orphaned); - __proc_getpgrp (proc, _hurd_pid, &_hurd_pgrp); - - _hurd_port_free (proc, &dealloc); +#if 0 + __mutex_init (&_hurd_pid_lock); +#endif + + __USEPORT (PROC, + ({ + __proc_getpids (port, &_hurd_pid, &_hurd_ppid, &_hurd_orphaned); + __proc_getpgrp (port, _hurd_pid, &_hurd_pgrp); + })); } text_set_element (__libc_subinit, init_pids); +#include "hurd/msg_server.h" + error_t -__proc_newids (sigthread_t me, - pid_t ppid, pid_t pgrp, int orphaned) +_S_proc_newids (mach_port_t me, + task_t task, + pid_t ppid, pid_t pgrp, int orphaned) { + if (task != __mach_task_self ()) + return EPERM; + + __mach_port_deallocate (__mach_task_self (), task); + + __mutex_lock (&_hurd_pid_lock); _hurd_ppid = ppid; _hurd_pgrp = pgrp; _hurd_orphaned = orphaned; - return POSIX_SUCCESS; + __mutex_unlock (&_hurd_pid_lock); + + return 0; } diff -ruN glibc-1.06/hurd/hurdports.c glibc-1.07/hurd/hurdports.c --- glibc-1.06/hurd/hurdports.c Thu Apr 29 16:59:33 1993 +++ glibc-1.07/hurd/hurdports.c Wed Jun 23 16:22:04 1993 @@ -19,10 +19,10 @@ #include static inline mach_port_t -get (struct _hurd_port *cell) +get (const size_t idx) { mach_port_t result; - error_t err = _HURD_PORT_USE (cell, + error_t err = _HURD_PORT_USE (&_hurd_ports[idx], __mach_port_mod_refs (__mach_task_self (), (result = port), MACH_PORT_RIGHT_SEND, @@ -35,11 +35,11 @@ else return result; } -#define GET(type, what) \ - type get##what (void) { return get (&what); } +#define GET(type, what, idx) \ + type get##what (void) { return get (INIT_PORT_##idx); } static inline int -set (struct _hurd_port *cell, mach_port_t new) +set (const size_t idx, mach_port_t new) { error_t err; if (err = __mach_port_mod_refs (__mach_task_self (), new, @@ -48,18 +48,18 @@ errno = EINVAL; return -1; } - _hurd_port_set (cell, new); + _hurd_port_set (&_hurd_ports[idx], new); return 0; } -#define SET(type, what) \ - int set##what (type new) { return set (&what, new); } +#define SET(type, what, idx) \ + int set##what (type new) { return set (INIT_PORT_##idx, new); } -#define GETSET(type, what) \ - GET (type, what) SET (type, what) +#define GETSET(type, what, idx) \ + GET (type, what, idx) SET (type, what, idx) -GETSET (process_t, proc) -GETSET (file_t, cwdir) -GETSET (file_t, crdir) +GETSET (process_t, proc, PROC) +GETSET (file_t, cwdir, CWDIR) +GETSET (file_t, crdir, CRDIR) /* setauth is nontrivial; see __setauth.c. */ -GET (auth_t, auth) +GET (auth_t, auth, AUTH) diff -ruN glibc-1.06/hurd/hurdsig.c glibc-1.07/hurd/hurdsig.c --- glibc-1.06/hurd/hurdsig.c Mon Apr 26 17:34:31 1993 +++ glibc-1.07/hurd/hurdsig.c @@ -1,570 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993 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 -#include - -struct mutex _hurd_siglock; -int _hurd_stopped; - -/* Port that receives signals and other miscellaneous messages. */ -mach_port_t _hurd_msgport; - -/* Thread listening on it. */ -thread_t _hurd_msgport_thread; - -/* Thread which receives task-global signals. */ -thread_t _hurd_sigthread; - -/* Linked-list of per-thread signal state. */ -struct _hurd_sigstate *_hurd_sigstates; - -struct _hurd_sigstate * -_hurd_thread_sigstate (thread_t thread) -{ - struct _hurd_sigstate *ss; - __mutex_lock (&_hurd_siglock); - for (ss = _hurd_sigstates; ss != NULL; ss = ss->next) - if (ss->thread == thread) - break; - if (ss == NULL) - { - ss = calloc (1, sizeof (*ss)); /* Zero-initialized. */ - if (ss == NULL) - __libc_fatal ("hurd: Can't allocate thread sigstate\n"); - ss->thread = thread; - __mutex_init (&ss->lock); - ss->next = _hurd_sigstates; - _hurd_sigstates = ss; - } - __mutex_lock (&ss->lock); - __mutex_unlock (&_hurd_siglock); - return ss; -} - -#include - -/* Limit on size of core files. */ -int _hurd_core_limit; - -/* Call the core server to mummify us before we die. - Returns nonzero if a core file was written. */ -static int -write_corefile (int signo, int sigcode) -{ - error_t err; - mach_port_t coreserver; - file_t file; - char *name; - char *target; - - if (_hurd_core_limit == 0) - /* User doesn't want a core. */ - return 0; - - coreserver = MACH_PORT_NULL; - if (!setjmp (_hurd_sigthread_fault_env)) - { - name = getenv ("CORESERVER"); - if (name != NULL) - coreserver = __path_lookup (name, 0, 0); - } - - if (coreserver == MACH_PORT_NULL) - coreserver = __path_lookup (_SERVERS_CORE, 0, 0); - if (coreserver == MACH_PORT_NULL) - return 0; - - file = MACH_PORT_NULL; - if (!setjmp (_hurd_sigthread_fault_env)) - { - name = getenv ("COREFILE"); - if (name != NULL) - file = __path_lookup (name, FS_LOOKUP_WRITE|FS_LOOKUP_CREATE, - 0666 & ~_hurd_umask); - } - if (name == NULL || file == MACH_PORT_NULL) - { - name = "core"; - file = __path_lookup (name, FS_LOOKUP_WRITE|FS_LOOKUP_CREATE, - 0666 & ~_hurd_umask); - } - - if (file == MACH_PORT_NULL) - return 0; - - if (setjmp (_hurd_sigthread_fault_env)) - /* We bombed in getenv. */ - target = NULL; - else - { - target = getenv ("GNUTARGET"); - /* Fault now if TARGET is a bogus string. */ - (void) strlen (target) - } - - err = __core_dump_task (coreserver, - __mach_task_self (), - file, - signo, sigcode, - target); - __mach_port_deallocate (__mach_task_self (), coreserver); - if (!err && _hurd_core_limit != RLIM_INFINITY) - { - io_statbuf_t stb; - err = __io_stat (file, &stb); - if (!err && stb.stb_size > _hurd_core_limit) - err = EFBIG; - } - __mach_port_deallocate (__mach_task_self (), file); - if (err) - (void) remove (name); - return !err; -} - - -extern const size_t _hurd_thread_state_count; - -/* How long to give servers to respond to - interrupt_operation before giving up on them. */ -mach_msg_timeout_t _hurd_interrupt_timeout = 1000; /* One second. */ - -/* SS->thread is suspended. Fills STATE in with its registers. - SS->lock is held and kept. */ -static inline void -abort_rpcs (struct _hurd_sigstate *ss, int signo, void *state) -{ - if (ss->intr_port != MACH_PORT_NULL) - { - /* Abort whatever the thread is doing. - If it is in the mach_msg syscall doing the send, - the syscall will return MACH_SEND_INTERRUPTED. */ - __thread_abort (ss->thread); - _hurd_thread_state (ss->thread, state); - - if (_hurd_thread_msging_p (state)) - { - /* The thread was waiting for the RPC to return. - Abort the operation. The RPC will return EINTR. */ - - struct - { - mach_msg_header_t header; - mach_msg_type_t type; - kern_return_t retcode; - } msg; - kern_return_t err; - - msg.header.msgh_request_port = ss->intr_port; - msg.header.msgh_reply_port = __mach_reply_port (); - msg.header.msgh_seqno = 0; - msg.header.msgh_id = 33000; /* interrupt_operation XXX */ - err = __mach_msg (&msg.header, - MACH_SEND_MSG|MACH_RCV_MSG|MACH_RCV_TIMEOUT, - sizeof (msg.header), sizeof (msg), - msg.header.msgh_reply_port, - _hurd_interrupt_timeout, - MACH_PORT_NULL); - if (err != MACH_MSG_SUCCESS) - /* The interrupt didn't work. - Destroy the receive right the thread is blocked on. */ - __mach_port_destroy (__mach_task_self (), - /* XXX */ - _hurd_thread_reply_port (ss->thread)); - else - /* In case the server returned something screwy. */ - __mach_msg_destroy (&msg.header); - - /* Tell the thread whether it should restart the - operation or return EINTR when it wakes up. */ - ss->intr_restart = ss->actions[signo].sa_flags & SA_RESTART; - } - - /* If the thread is anywhere before the system call trap, - it will start the operation after the signal is handled. - - If the thread is after the system call trap, but before it has - cleared SS->intr_port, the operation is already finished. */ - } -} - -/* Abort the RPCs being run by all threads but this one; - all other threads should be suspended. */ -static inline void -abort_all_rpcs (int signo, void *state) -{ - thread_t me = __mach_thread_self (); - thread_t *threads; - size_t nthreads, i; - - __task_threads (__mach_task_self (), &threads, &nthreads); - for (i = 0; i < nthreads; ++i) - { - if (threads[i] != me) - { - struct _hurd_sigstate *ss = _hurd_thread_sigstate (*nthreads); - abort_rpcs (ss, signo, state); - __mutex_unlock (&ss->lock); - } - __mach_port_deallocate (__mach_task_self (), threads[i]); - } -} - - -/* Deliver a signal. - SS->lock is held on entry and released before return. */ -void -_hurd_internal_post_signal (struct _hurd_sigstate *ss, - int signo, - int sigcode, - sigset_t *restore_blocked) -{ - char thread_state[_hurd_thread_state_count]; - enum { stop, ignore, core, term } act; - - if (ss->actions[signo].sa_handler == SIG_DFL) - switch (signo) - { - case 0: - /* A sig_post msg with SIGNO==0 is sent to - tell us to check for pending signals. */ - act = ignore; - break; - - case SIGTTIN: - case SIGTTOU: - case SIGSTOP: - case SIGTSTP: - ss->pending &= ~sigmask (SIGCONT); - act = stop; - break; - - case SIGCONT: - ss->pending &= ~(sigmask (SIGSTOP) | sigmask (SIGTSTP) | - sigmask (SIGTTIN) | sigmask (SIGTTOU)); - /* Fall through. */ - case SIGIO: - case SIGURG: - case SIGCHLD: - case SIGWINCH: - act = ignore; - break; - - case SIGQUIT: - case SIGILL: - case SIGTRAP: - case SIGIOT: - case SIGEMT: - case SIGFPE: - case SIGBUS: - case SIGSEGV: - case SIGSYS: - act = core; - break; - - default: - act = term; - break; - } - else if (ss->actions[signo].sa_handler == SIG_IGN) - act = ignore; - else - act = handle; - if (_hurd_orphaned && - (signo == SIGTTIN || signo == SIGTTOU || signo == SIGTSTP) && - act == stop) - { - sigcode = signo; - signo = SIGKILL; - act = term; - } - - /* Handle receipt of a blocked signal. */ - if ((__sigismember (signo, &ss->blocked) && act != ignore) || - (signo != SIGKILL && _hurd_stopped)) - { - __sigaddmember (signo, &ss->pending); - /* Save the code to be given to the handler when SIGNO is unblocked. */ - ss->sigcodes[signo] = sigcode; - act = ignore; - } - - if (restore_blocked != NULL) - ss->blocked = *restore_blocked; - - switch (act) - { - case stop: - _HURD_PORT_USE - (&_hurd_proc, - ({ - /* Hold the siglock while stopping other threads to be - sure it is not held by another thread afterwards. */ - __mutex_unlock (&ss->lock); - __mutex_lock (&_hurd_siglock); - __proc_dostop (port, __mach_thread_self ()); - __mutex_unlock (&_hurd_siglock); - abort_all_rpcs (signo, thread_state); - __proc_markstop (port, signo); - })); - _hurd_stopped = 1; - - __mutex_lock (&ss->lock); - if (ss->suspended) - /* There is a sigsuspend waiting. Tell it to wake up. */ - __condition_signal (&ss->arrived); - else - __mutex_unlock (&ss->lock); - - return; - - case ignore: - break; - - case core: - case term: - _HURD_PORT_USE - (&_hurd_proc, - ({ - __proc_dostop (port, __mach_thread_self ()); - abort_all_rpcs (signo, thread_state); - __proc_exit (port, - (W_EXITCODE (0, signo) | - (act == core && write_corefile (signo, sigcode) ? - WCOREDUMP : 0))) - })); - - case handle: - __thread_suspend (ss->thread); - abort_rpcs (ss, signo, thread_state); - { - const sigset_t blocked = ss->blocked; - ss->blocked |= __sigmask (signo) | ss->actions[signo].sa_mask; - _hurd_run_sighandler (ss, signo, sigcode, blocked, thread_state); - } - __thread_resume (ss->thread); - } - - /* We get here only if we are handling or ignoring the signal; - otherwise we are stopped or dead by now. We still hold SS->lock. - Check for pending signals, and loop to post them. */ - for (signo = 1; signo < NSIG; ++signo) - if (__sigismember (signo, &ss->pending)) - { - __sigdelmember (signo, &ss->pending); - _hurd_internal_post_signal (ss, signo, ss->sigcodes[signo], NULL); - return; - } - - if (ss->suspended) - /* There is a sigsuspend waiting. Tell it to wake up. */ - __condition_signal (&ss->arrived); - else - __mutex_unlock (&ss->lock); -} - -/* Sent when someone wants us to get a signal. */ -error_t -__sig_post (sigthread_t me, - mig_reply_port_t reply, - int signo, - mach_port_t refport) -{ - struct _hurd_sigstate *ss; - - if (signo < 0 || signo >= NSIG) - return EINVAL; - - if (refport == __mach_task_self ()) - /* Can send any signal. */ - goto win; - else if (refport == _hurd_cttyport) - switch (signo) - { - case SIGINT: - case SIGQUIT: - case SIGTSTP: - case SIGHUP: - goto win; - } - else - { - static mach_port_t sessport = MACH_PORT_NULL; - if (sessport == MACH_PORT_NULL) - _HURD_PORT_USE (&_hurd_proc, - __proc_getsidport (port, &sessport)); - if (sessport != MACH_PORT_NULL && refport == sessport && - signo == SIGCONT) - goto win; - } - - /* XXX async io? */ - return EPERM; - - win: - ss = _hurd_thread_sigstate (_hurd_sigthread); - __sig_post_reply (reply, 0); - _hurd_internal_post_signal (ss, signo, 0, NULL); - return MIG_NO_REPLY; /* Already replied. */ -} - -/* Called by the exception handler to take a signal. */ -void -_hurd_exc_post_signal (thread_t thread, int signo, int sigcode) -{ - _hurd_internal_post_signal (_hurd_thread_sigstate (thread), - signo, sigcode, NULL); -} - -#include - -/* Handle signal SIGNO in the calling thread. - If SS is not NULL it is the sigstate for the calling thread; - SS->lock is held on entry and released before return. */ -void -_hurd_raise_signal (struct _hurd_sigstate *ss, int signo, int sigcode) -{ - jmp_buf env; - struct sigcontext sc; - - if (ss == NULL) - ss = _hurd_thread_sigstate (__mach_thread_self ()); - - if (! setjmp (env)) - { - register volatile void (*handler) (int signo, int sigcode, - struct sigcontext *scp); - - handler = (__typeof (handler)) ss->actions[signo].sa_handler; - - /* Set up SC to make setjmp return 1. */ - _hurd_jmp_buf_sigcontext (env, &sc, 1); - - sc.sc_mask = ss->blocked; /* Restored by sigreturn. */ - sc.sc_onstack = ((ss->actions[signo].sa_flags & SA_ONSTACK) && - !(ss->sigaltstack.ss_flags & SA_DISABLE)); - if (sc.sc_onstack) - { - /* Switch to the signal stack. */ - ss->sigaltstack.ss_flags |= SA_ONSTACK; - SET_SP (ss->sigaltstack.ss_sp); - } - - __mutex_unlock (&ss->lock); - - /* Call the handler. */ - (*handler) (signo, sigcode, &sc); - - __sigreturn (&sc); /* Does not return. */ - LOSE; /* Firewall. */ - } -} - -void -_hurdsig_init (void) -{ - thread_t sigthread; - - __mutex_init (&_hurd_siglock); - - if (_hurd_msgport == MACH_PORT_NULL) - if (err = __mach_port_allocate (__mach_task_self (), - MACH_PORT_RIGHT_RECEIVE, - &_hurd_msgport)) - __libc_fatal ("hurd: Can't create signal port receive right\n"); - - if (err = __thread_create (__mach_task_self (), &sigthread)) - __libc_fatal ("hurd: Can't create signal thread\n"); - if (err = _hurd_start_sigthread (sigthread, _hurd_msgport_receive)) - __libc_fatal ("hurd: Can't start signal thread\n"); - _hurd_msgport_thread = sigthread; - - /* Make a send right to the signal port. */ - if (err = __mach_port_insert_right (__mach_task_self (), - _hurd_msgport, - MACH_PORT_RIGHT_MAKE_SEND)) - __libc_fatal ("hurd: Can't create send right to signal port\n"); - - /* Receive exceptions on the signal port. */ - __task_set_special_port (__mach_task_self (), - TASK_EXCEPTION, - _hurd_msgport); - - { - /* Send exceptions for the signal thread to the proc server. - It will forward the message on to our message port, - and then restore the thread's state to code which - does `longjmp (_hurd_sigthread_fault_env, 1)'. */ - - mach_port_t sigexc; - int state[_hurd_thread_state_count]; - if (err = __mach_port_allocate (__mach_task_self (), - MACH_PORT_RIGHT_RECEIVE, &sigexc)) - __libc_fatal ("hurd: Can't create receive right for sigthread exc\n"); - _hurd_initialize_fault_recovery_state (state); - __thread_set_special_port (sigthread, THREAD_EXCEPTION, sigexc); - if (err = HURD_PORT_USE - (&_hurd_proc, - __proc_handle_exceptions (port, - sigexc, - _hurd_msgport, MACH_PORT_RIGHT_COPY_SEND, - _hurd_thread_state_flavor, - state, _hurd_thread_state_count))) - __libc_fatal ("hurd: proc won't handle sigthread exceptions\n"); - } -} - /* XXXX */ -struct _hurd_port _hurd_proc; - -/* Make PROCSERVER be our proc server port. - Tell the proc server that we exist. */ - -void -_hurd_proc_init (process_t procserver, char **argv) -{ - mach_port_t oldsig, oldtask; - - _hurd_port_init (&_hurd_proc, procserver); - - /* Tell the proc server where our args and environment are. */ - __proc_setprocargs (procserver, argv, __environ); - - /* Initialize the signal code; Mach exceptions will become signals. - This sets _hurd_msgport; it must be run before _hurd_proc_init. */ - _hurdsig_init (); - - /* Give the proc server our task and signal ports. */ - __proc_setports (procserver, - _hurd_msgportG, __mach_task_self (), - &oldsig, &oldtask); - if (oldsig != MACH_PORT_NULL) - __mach_port_deallocate (__mach_task_self (), oldsig); - if (oldtask != MACH_PORT_NULL) - __mach_port_deallocate (__mach_task_self (), oldtask); -} - -static void -reauth_proc (mach_port_t new) -{ - /* Reauthenticate with the proc server. */ - if (! _HURD_PORT_USE (&_hurd_proc, - __proc_reauthenticate (port) || - __auth_user_authenticate (new, port, &ignore)) - && ignore != MACH_PORT_NULL) - __mach_port_deallocate (__mach_task_self (), ignore); -} diff -ruN glibc-1.06/hurd/hurdsock.c glibc-1.07/hurd/hurdsock.c --- glibc-1.06/hurd/hurdsock.c Sat Mar 21 00:21:38 1992 +++ glibc-1.07/hurd/hurdsock.c @@ -1,90 +0,0 @@ -/* _hurd_socket_server - Find the server for a socket domain. - -Copyright (C) 1991, 1992 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 -#include -#include - -static struct mutex lock; -static void -init_sock (void) -{ - __mutex_init (&lock); -} -text_set_element (__libc_subinit, init_sock); - -static file_t sockdir = MACH_PORT_NULL; -static file_t *servers; -static int max_domain; - -/* Return a port to the socket server for DOMAIN. - Socket servers translate nodes in the directory _SERVERS_SOCKET - (canonically /servers/socket). These naming point nodes are named - by the simplest decimal representation of the socket domain number, - for example "/servers/socket/3". - - Socket servers are assumed not to change very often. - The library keeps all the server socket ports it has ever looked up, - and does not look them up in /servers/socket more than once. */ - -socket_t -_hurd_socket_server (int domain) -{ - error_t err; - - __mutex_lock (&lock); - - if (sockdir == MACH_PORT_NULL) - { - sockdir = __path_lookup (_SERVERS_SOCKET, FS_LOOKUP_EXEC, 0); - if (sockdir == MACH_PORT_NULL) - { - __mutex_unlock (&lock); - return MACH_PORT_NULL; - } - } - - if (domain > max_domain) - { - file_t *new = realloc (servers, (domain + 1) * sizeof (file_t)); - if (new == NULL) - { - __mutex_unlock (&lock); - return MACH_PORT_NULL; - } - while (max_domain < domain) - new[max_domain++] = MACH_PORT_NULL; - servers = new; - } - - { - char name[100]; - sprintf (name, "%d", domain); - if (err = _HURD_PORT_USE (&_hurd_crdir, - __hurd_path_lookup (port, sockdir, - name, 0, 0, - &servers[domain]))) - errno = err; - } - - __mutex_unlock (&lock); - - return servers[domain]; -} diff -ruN glibc-1.06/hurd/msgportdemux.c glibc-1.07/hurd/msgportdemux.c --- glibc-1.06/hurd/msgportdemux.c Wed Jul 1 00:36:02 1992 +++ glibc-1.07/hurd/msgportdemux.c @@ -1,54 +0,0 @@ -/* Demux messages sent on the signal port. - -Copyright (C) 1991, 1992 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 - -struct demux - { - struct demux *next; - boolean_t (*demux) (mach_msg_header_t *inp, - mach_msg_header_t *outp); - }; - -struct demux *_hurd_msgport_demuxers = NULL; - -extern boolean_t __msg_server (mach_msg_header_t *inp, - mach_msg_header_t *outp); - -static boolean_t -msgport_server (mach_msg_header_t *inp, - mach_msg_header_t *outp) -{ - struct demux *d; - - for (d = _hurd_msgport_demuxers; d != NULL; d = d->next) - if ((*d->demux) (inp, outp)) - return 1; - - return __msg_server (inp, outp); -} - -/* This is the code that the signal thread runs. */ -void -_hurd_msgport_receive (void) -{ - while (1) - (void) __mach_msg_server (msgport_server, __vm_page_size, _hurd_msgport); -} diff -ruN glibc-1.06/hurd/openport.c glibc-1.07/hurd/openport.c --- glibc-1.06/hurd/openport.c Sat Mar 21 00:23:35 1992 +++ glibc-1.07/hurd/openport.c Thu Oct 28 22:15:37 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,27 +17,13 @@ Cambridge, MA 02139, USA. */ #include +#include -/* Open a file descriptor on a port. */ +/* User entry point for interning a port as a new FD. + Just like _hurd_intern_fd, but don't dealloc PORT on error. */ int -openport (io_t port) +openport (io_t port, int flags) { - int fd; - - /* Give the port a new user reference. - This is a good way to check that it is valid. */ - if (__mach_port_mod_refs (__mach_task_self (), port, - MACH_PORT_RIGHT_SEND, 1)) - { - errno = EINVAL; - return -1; - } - - fd = _hurd_dalloc (port, 0); - if (fd < 0) - /* The descriptor table is full. */ - __mach_port_deallocate (__mach_task_self (), port); - - return fd; + return _hurd_intern_fd (port, flags, 0); } diff -ruN glibc-1.06/hurd/setdtsz.c glibc-1.07/hurd/setdtsz.c --- glibc-1.06/hurd/setdtsz.c Thu Apr 29 17:01:12 1993 +++ glibc-1.07/hurd/setdtsz.c Thu Oct 28 22:15:36 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ Cambridge, MA 02139, USA. */ #include +#include /* XXX this should be done by setrlimit (RLIM_OFILES, size). */ diff -ruN glibc-1.06/hurd/setuids.c glibc-1.07/hurd/setuids.c --- glibc-1.06/hurd/setuids.c +++ glibc-1.07/hurd/setuids.c Mon Nov 29 16:39:20 1993 @@ -0,0 +1,58 @@ +/* Copyright (C) 1993 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. */ + +#ifndef MIB_HACKS +#include + +/* Set the uid set for the current user to UIDS (N of them). */ +int +setuids (int n, const uid_t *uids) +{ + error_t err; + auth_t newauth; + size_t i; + gid_t new[n]; + + /* Fault before taking locks. */ + for (i = 0; i < n; ++i) + new[i] = uids[i]; + + __mutex_lock (&_hurd_id.lock); + err = _hurd_check_ids (); + if (! err) + { + /* Get a new auth port using those IDs. */ + err = __USEPORT (AUTH, + __auth_makeauth (port, + new, n, + _hurd_id.aux.uids, _hurd_id.aux.nuids, + _hurd_id.gen.gids, _hurd_id.gen.ngids, + _hurd_id.aux.gids, _hurd_id.aux.ngids, + &newauth)); + } + __mutex_unlock (&_hurd_id.lock); + + if (err) + return __hurd_fail (err); + + /* Install the new auth port and reauthenticate everything. */ + err = __setauth (newauth); + __mach_port_deallocate (__mach_task_self (), newauth); + return err; +} +#endif diff -ruN glibc-1.06/hurd/vpprintf.c glibc-1.07/hurd/vpprintf.c --- glibc-1.06/hurd/vpprintf.c Mon Oct 28 23:19:15 1991 +++ glibc-1.07/hurd/vpprintf.c @@ -1,59 +0,0 @@ -/* Copyright (C) 1991 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 -#include -#include -#include -#include - -static ssize_t -DEFUN(pwrite, (cookie, buf, n), - PTR cookie AND CONST char *buf AND size_t n) -{ - error_t error = __io_write ((io_t) cookie, buf, n, &n); - if (error) - return __hurd_fail (error); - return n; -} - - -/* Write formatted output to PORT, a Mach port supporting the i/o protocol, - according to the format string FORMAT, using the argument list in ARG. */ -int -DEFUN(vpprintf, (port, format, arg), - io_t port AND CONST char *format AND va_list arg) -{ - int done; - FILE f; - - /* Create an unbuffered stream talking to PORT on the stack. */ - memset((PTR) &f, 0, sizeof(f)); - f.__magic = _IOMAGIC; - f.__mode.__write = 1; - f.__cookie = (PTR) port; - f.__room_funcs = __default_room_functions; - f.__io_funcs.__write = pwrite; - f.__seen = 1; - f.__userbuf = 1; - - /* vfprintf will use a buffer on the stack for the life of the call. */ - done = vfprintf(&f, format, arg); - - return done; -} diff -ruN glibc-1.06/install.sh glibc-1.07/install.sh --- glibc-1.06/install.sh +++ glibc-1.07/install.sh Mon Oct 26 22:42:49 1992 @@ -0,0 +1,119 @@ +#!/bin/sh + +# +# install - install a program, script, or datafile +# This comes from X11R5; it is not part of GNU. +# +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" + +instcmd="$mvprog" +chmodcmd="" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +fi + +if [ x"$dst" = x ] +then + echo "install: no destination specified" + exit 1 +fi + + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + +if [ -d $dst ] +then + dst="$dst"/`basename $src` +fi + +# Make a temp file name in the proper directory. + +dstdir=`dirname $dst` +dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + +$doit $instcmd $src $dsttmp + +# and set any options; do chmod last to preserve setuid bits + +if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi +if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi +if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi +if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi + +# Now rename the file to the real destination. + +$doit $rmcmd $dst +$doit $mvcmd $dsttmp $dst + + +exit 0 diff -ruN glibc-1.06/io/TAGS glibc-1.07/io/TAGS --- glibc-1.06/io/TAGS Wed May 12 23:56:11 1993 +++ glibc-1.07/io/TAGS Sat Jan 8 02:47:57 1994 @@ -6,7 +6,7 @@ DEFUN(__access,26,943 ../sysdeps/mach/hurd/__access.c,23 -DEFUN(__access,25,959 +DEFUN(__access,26,984 ../sysdeps/unix/__chdir.S,25 SYSCALL__ (chdir,21,852 @@ -16,7 +16,7 @@ DEFUN(__chdir, (path), CONST char *path)26,956 ../sysdeps/mach/hurd/__chdir.c,22 -DEFUN(__chdir,25,941 +DEFUN(__chdir,26,966 ../sysdeps/unix/__chmod.S,25 SYSCALL__ (chmod,21,852 @@ -46,7 +46,7 @@ DEFUN(__close, (fd), int fd)25,928 ../sysdeps/mach/hurd/__close.c,22 -DEFUN(__close,26,952 +DEFUN(__close,26,958 ../sysdeps/unix/__dup.S,23 SYSCALL__ (dup,21,852 @@ -58,20 +58,22 @@ DEFUN(__dup,26,986 ../sysdeps/mach/hurd/__dup.c,21 -DEFUN(__dup,27,1010 +DEFUN(__dup,27,1016 ../sysdeps/unix/common/__dup2.S,24 SYSCALL__ (dup2,21,852 ../sysdeps/posix/__dup2.c,22 -DEFUN(__dup2,28,1034 +DEFUN(__dup2,29,1060 ../sysdeps/stub/__dup2.c,75 DEFUN(__dup2,28,1028 DEFUN(__dup2, (fd, fd2), int fd AND int fd2)28,1028 +../sysdeps/unix/sysv/sysv4/__dup2.c,0 + ../sysdeps/mach/hurd/__dup2.c,22 -DEFUN(__dup2,29,1055 +DEFUN(__dup2,29,1061 ../sysdeps/unix/common/__fchmod.S,26 SYSCALL__ (fchmod,21,852 @@ -90,8 +92,8 @@ DEFUN(__fchown,27,1005 int fd AND uid_t owner AND gid_t group)28,1041 -../sysdeps/mach/hurd/__fchown.c,23 -DEFUN(__fchown,26,982 +../sysdeps/mach/hurd/__fchown.c,24 +DEFUN(__fchown,27,1006 ../sysdeps/unix/__fcntl.S,25 SYSCALL__ (fcntl,21,852 @@ -101,7 +103,7 @@ DEFUN(__fcntl, (fd, cmd), int fd AND int cmd DOTS)25,936 ../sysdeps/mach/hurd/__fcntl.c,22 -DEFUN(__fcntl,26,954 +DEFUN(__fcntl,28,981 ../sysdeps/unix/bsd/__flock.S,25 SYSCALL__ (flock,21,846 @@ -123,7 +125,7 @@ DEFUN(__fstat, (fd, buf), int fd AND struct stat *buf)26,973 ../sysdeps/mach/hurd/__fstat.c,22 -DEFUN(__fstat,26,973 +DEFUN(__fstat,27,997 ../sysdeps/unix/bsd/__isatty.c,23 DEFUN(__isatty,26,961 @@ -142,7 +144,7 @@ DEFUN(__link, (from, to), CONST char *from AND CONST char *to)27,950 ../sysdeps/mach/hurd/__link.c,21 -DEFUN(__link,27,973 +DEFUN(__link,27,979 ../sysdeps/unix/__lseek.S,25 SYSCALL__ (lseek,21,852 @@ -152,7 +154,7 @@ DEFUN(__lseek, (fd, offset, whence), int fd AND off_t offset AND int whence)26,967 ../sysdeps/mach/hurd/__lseek.c,22 -DEFUN(__lseek,25,950 +DEFUN(__lseek,26,974 ../sysdeps/unix/common/__lstat.S,25 SYSCALL__ (lstat,21,852 @@ -165,7 +167,7 @@ DEFUN(__lstat, (file, buf), CONST char *file AND struct stat *buf)27,1009 ../sysdeps/mach/hurd/__lstat.c,22 -DEFUN(__lstat,25,913 +DEFUN(__lstat,27,956 ../sysdeps/unix/common/__mkdir.S,25 SYSCALL__ (mkdir,21,852 @@ -177,8 +179,8 @@ ../sysdeps/unix/sysv/__mkdir.c,23 DEFUN(__mkdir,30,1058 -../sysdeps/mach/hurd/__mkdir.c,22 -DEFUN(__mkdir,27,991 +../sysdeps/mach/hurd/__mkdir.c,23 +DEFUN(__mkdir,27,1003 ../sysdeps/unix/__open.S,24 SYSCALL__ (open,21,852 @@ -187,10 +189,10 @@ DEFUN(__open,28,1038 ../sysdeps/mach/hurd/__open.c,22 -DEFUN(__open,28,1036 +DEFUN(__open,28,1042 ../sysdeps/unix/bsd/m68k/__pipe.S,24 -SYSCALL__ (pipe,21,852 +SYSCALL__ (pipe,21,858 ../sysdeps/stub/__pipe.c,22 DEFUN(__pipe,29,1127 @@ -199,7 +201,10 @@ SYSCALL__ (pipe,21,852 ../sysdeps/unix/bsd/ultrix4/mips/__pipe.S,24 -SYSCALL__ (pipe,21,864 +SYSCALL__ (pipe,21,857 + +../sysdeps/unix/bsd/osf1/alpha/__pipe.S,24 +SYSCALL__ (pipe,21,857 ../sysdeps/unix/i386/__pipe.S,24 SYSCALL__ (pipe,21,858 @@ -209,7 +214,7 @@ PSEUDO (__Spipe,23,902 ../sysdeps/mach/hurd/__pipe.c,22 -DEFUN(__pipe,30,1131 +DEFUN(__pipe,32,1186 ../sysdeps/unix/__read.S,24 SYSCALL__ (read,21,852 @@ -227,7 +232,7 @@ DEFUN(__readlink,27,1080 ../sysdeps/mach/hurd/__readlink.c,26 -DEFUN(__readlink,29,1124 +DEFUN(__readlink,31,1175 ../sysdeps/unix/common/__rmdir.S,25 SYSCALL__ (rmdir,21,852 @@ -240,7 +245,7 @@ DEFUN(__rmdir,30,1058 ../sysdeps/mach/hurd/__rmdir.c,22 -DEFUN(__rmdir,27,969 +DEFUN(__rmdir,27,981 ../sysdeps/unix/__stat.S,24 SYSCALL__ (stat,21,852 @@ -250,7 +255,7 @@ DEFUN(__stat, (file, buf), CONST char *file AND struct stat *buf)26,960 ../sysdeps/mach/hurd/__stat.c,21 -DEFUN(__stat,26,960 +DEFUN(__stat,27,984 ../sysdeps/unix/common/__symlink.S,27 SYSCALL__ (symlink,21,852 @@ -259,8 +264,8 @@ DEFUN(__symlink,27,950 DEFUN(__symlink, (from, to), CONST char *from AND CONST char *to)27,950 -../sysdeps/mach/hurd/__symlink.c,24 -DEFUN(__symlink,27,973 +../sysdeps/mach/hurd/__symlink.c,25 +DEFUN(__symlink,29,1022 ../sysdeps/unix/__umask.S,25 SYSCALL__ (umask,21,852 @@ -279,7 +284,7 @@ DEFUN(__unlink, (name), CONST char *name)27,947 ../sysdeps/mach/hurd/__unlink.c,23 -DEFUN(__unlink,28,971 +DEFUN(__unlink,28,983 ../sysdeps/unix/__write.S,25 SYSCALL__ (write,21,852 @@ -288,7 +293,7 @@ DEFUN(__write,27,1004 ../sysdeps/mach/hurd/__write.c,22 -DEFUN(__write,25,919 +DEFUN(__write,25,925 access.c,29 DEFUN(access,25,957 @@ -323,7 +328,7 @@ ../sysdeps/unix/sysv/sysv4/fchdir.S,0 ../sysdeps/mach/hurd/fchdir.c,21 -DEFUN(fchdir,27,978 +DEFUN(fchdir,27,984 fchmod.c,29 DEFUN(fchmod,27,987 @@ -331,8 +336,8 @@ fchown.c,29 DEFUN(fchown,27,993 -fcntl.c,28 - DEFUN(fcntl,27,979 +fcntl.c,21 +DEFUN(fcntl,40,1238 flock.c,28 DEFUN(flock,25,959 @@ -340,9 +345,10 @@ fstat.c,28 DEFUN(fstat,25,953 -ftw.c,44 -DEFUN (ftw_dir,34,1117 -DEFUN(ftw,149,3171 +ftw.c,70 +#define PATH_MAX 32,1075 +DEFUN (ftw_dir,39,1176 +DEFUN(ftw,154,3230 ../sysdeps/posix/getcwd.c,536 #define NULL 50,1326 @@ -370,6 +376,9 @@ ../sysdeps/stub/getcwd.c,22 DEFUN(getcwd,32,1285 +../sysdeps/mach/hurd/getcwd.c,16 +getcwd 38,1407 + getdirname.c,41 DEFUN_VOID(get_current_dir_name)30,1103 @@ -427,6 +436,9 @@ ../sysdeps/stub/ttyname.c,23 DEFUN(ttyname,30,1092 +../sysdeps/mach/hurd/ttyname.c,17 +ttyname 36,1235 + umask.c,28 DEFUN(umask,26,962 @@ -479,6 +491,24 @@ #define __S_IWRITE 67,2392 #define __S_IEXEC 68,2439 +../sysdeps/unix/bsd/osf1/alpha/statbuf.h,424 +#define _STATBUF_H20,855 +struct stat25,949 +#define __S_IFMT 54,1877 +#define __S_IFDIR 57,1961 +#define __S_IFCHR 58,2005 +#define __S_IFBLK 59,2056 +#define __S_IFREG 60,2103 +#define __S_IFIFO 61,2150 +#define __S_IFLNK 63,2190 +#define __S_IFSOCK 64,2238 +#define __S_ISUID 68,2306 +#define __S_ISGID 69,2363 +#define __S_ISVTX 70,2421 +#define __S_IREAD 71,2490 +#define __S_IWRITE 72,2535 +#define __S_IEXEC 73,2582 + ../sysdeps/unix/sysv/statbuf.h,424 #define _STATBUF_H20,844 struct stat22,864 @@ -497,23 +527,60 @@ #define __S_IWRITE 58,1941 #define __S_IEXEC 59,1988 -../sysdeps/mach/hurd/statbuf.h,425 -#define _STATBUF_H 21,845 -struct stat25,891 -#define __S_IFMT 53,2059 -#define __S_IFDIR 56,2143 -#define __S_IFCHR 57,2187 -#define __S_IFBLK 58,2238 -#define __S_IFREG 59,2285 -#define __S_IFLNK 60,2332 -#define __S_IFSOCK 61,2380 -#define __S_IFIFO 62,2422 -#define __S_ISUID 66,2487 -#define __S_ISGID 67,2544 -#define __S_ISVTX 68,2602 -#define __S_IREAD 69,2671 -#define __S_IWRITE 70,2716 -#define __S_IEXEC 71,2763 +../sysdeps/unix/sysv/sysv4/solaris2/statbuf.h,424 +#define _STATBUF_H20,855 +struct stat25,949 +#define __S_IFMT 60,2184 +#define __S_IFDIR 63,2268 +#define __S_IFCHR 64,2312 +#define __S_IFBLK 65,2363 +#define __S_IFREG 66,2410 +#define __S_IFIFO 67,2457 +#define __S_IFLNK 70,2574 +#define __S_IFSOCK 71,2622 +#define __S_ISUID 75,2690 +#define __S_ISGID 76,2747 +#define __S_ISVTX 77,2805 +#define __S_IREAD 78,2874 +#define __S_IWRITE 79,2919 +#define __S_IEXEC 80,2966 + +../sysdeps/unix/sysv/sysv4/i386/statbuf.h,424 +#define _STATBUF_H20,855 +struct stat25,949 +#define __S_IFMT 62,2189 +#define __S_IFDIR 65,2273 +#define __S_IFCHR 66,2317 +#define __S_IFBLK 67,2368 +#define __S_IFREG 68,2415 +#define __S_IFIFO 69,2462 +#define __S_IFLNK 72,2579 +#define __S_IFSOCK 73,2627 +#define __S_ISUID 77,2695 +#define __S_ISGID 78,2752 +#define __S_ISVTX 79,2810 +#define __S_IREAD 80,2879 +#define __S_IWRITE 81,2924 +#define __S_IEXEC 82,2971 + +../sysdeps/mach/hurd/statbuf.h,448 +#define _STATBUF_H 21,851 +struct stat25,897 +#define __S_IFMT 63,2129 +#define __S_IFDIR 66,2213 +#define __S_IFCHR 67,2257 +#define __S_IFBLK 68,2308 +#define __S_IFREG 69,2355 +#define __S_IFLNK 70,2402 +#define __S_IFSOCK 71,2450 +#define __S_IFIFO 72,2492 +#define __S_ISUID 76,2557 +#define __S_ISGID 77,2614 +#define __S_ISVTX 78,2672 +#define __S_IREAD 79,2741 +#define __S_IWRITE 80,2786 +#define __S_IEXEC 81,2833 +#define CMASK 86,2943 sys/stat.h,884 #define _SYS_STAT_H 25,923 @@ -852,6 +919,60 @@ #define F_RDLCK 115,4217 #define F_WRLCK 116,4253 #define F_UNLCK 117,4290 + +../sysdeps/mach/hurd/fcntlbits.h,1346 +#define _FCNTLBITS_H 22,882 +#define O_READ 32,1265 +#define O_WRITE 33,1315 +#define O_EXEC 34,1366 +#define O_RDONLY 37,1454 +#define O_WRONLY 38,1501 +#define O_RDWR 39,1549 +#define O_ACCMODE 40,1621 +#define O_CREAT 48,1870 +#define O_EXCL 49,1934 +#define O_NOLINK 51,2010 +#define O_NOTRANS 52,2078 +#define O_APPEND 62,2478 +#define O_ASYNC 63,2543 +#define O_FSYNC 64,2614 +#define O_SYNC 65,2665 +#define O_NOATIME 67,2706 +#define O_NONBLOCK 85,3496 +#define O_NDELAY 87,3585 +#define O_HURD 93,3695 +#define O_TRUNC 101,3937 +#define O_SHLOCK 103,4020 +#define O_EXLOCK 104,4083 +#define O_IGNORE_CTTY 112,4307 +#define O_NOCTTY 115,4445 +#define FREAD 120,4585 +#define FWRITE 121,4609 +#define FASYNC 124,4678 +#define FCREAT 125,4702 +#define FEXCL 126,4726 +#define FTRUNC 127,4748 +#define FNOCTTY 128,4772 +#define FFSYNC 129,4798 +#define FSYNC 130,4822 +#define FAPPEND 131,4844 +#define FNONBLOCK 132,4870 +#define FNDELAY 133,4899 +#define F_DUPFD 138,4984 +#define F_GETFD 139,5039 +#define F_SETFD 140,5092 +#define F_GETFL 141,5145 +#define F_SETFL 142,5194 +#define F_GETOWN 144,5260 +#define F_SETOWN 145,5317 +#define F_GETLK 147,5381 +#define F_SETLK 148,5432 +#define F_SETLKW 149,5498 +#define FD_CLOEXEC 152,5621 +struct flock159,5843 +#define F_RDLCK 169,6247 +#define F_WRLCK 170,6283 +#define F_UNLCK 171,6320 fcntl.h,136 #define _FCNTL_H 25,920 diff -ruN glibc-1.06/io/fcntl.c glibc-1.07/io/fcntl.c --- glibc-1.06/io/fcntl.c Mon Apr 13 20:38:41 1992 +++ glibc-1.07/io/fcntl.c Tue Dec 7 16:08:42 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 19911993 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 @@ -19,9 +19,33 @@ #include #include #include -#include #undef fcntl -function_alias(fcntl, __fcntl, int, (fd, cmd), - DEFUN(fcntl, (fd, cmd), int fd AND int cmd DOTS)) +/* fcntl takes a third argument of unknown type, so function_alias cannot + work for it (without symbol aliases). We trust that the argument passed + is always a word the same size as a pointer. */ + +#ifdef HAVE_GNU_LD + +#include + +symbol_alias(__fcntl, fcntl); + +#else /* No GNU stabs. */ + +#include + +int +DEFUN(fcntl, (fd, cmd), int fd AND int cmd DOTS) +{ + va_list args; + __ptr_t arg; + va_start (args, cmd); + arg = va_arg (args, __ptr_t); + va_end (args); + + return __fcntl (fd, cmd, arg); +} + +#endif /* GNU stabs. */ diff -ruN glibc-1.06/io/ftw.c glibc-1.07/io/ftw.c --- glibc-1.06/io/ftw.c Thu Jun 4 16:47:03 1992 +++ glibc-1.07/io/ftw.c Thu Jan 6 12:03:17 1994 @@ -28,6 +28,11 @@ #include +#ifndef PATH_MAX +#define PATH_MAX 1024 /* XXX */ +#endif + + /* Traverse one level of a directory tree. */ static int diff -ruN glibc-1.06/locale/C-ctype_ct.c glibc-1.07/locale/C-ctype_ct.c --- glibc-1.06/locale/C-ctype_ct.c Wed Oct 7 18:23:03 1992 +++ glibc-1.07/locale/C-ctype_ct.c Thu Dec 2 15:48:15 1993 @@ -14,7 +14,7 @@ _IScntrl, _IScntrl, _IScntrl, - _IScntrl|_ISspace, + _IScntrl, _IScntrl|_ISspace|_ISblank, _IScntrl|_ISspace, _IScntrl|_ISspace, diff -ruN glibc-1.06/locale/TAGS glibc-1.07/locale/TAGS --- glibc-1.06/locale/TAGS Fri May 7 18:19:46 1993 +++ glibc-1.07/locale/TAGS Tue Dec 21 04:09:46 1993 @@ -1,5 +1,27 @@ -locale.h,215 +setlocale.c,25 +DEFUN(setlocale,33,1289 + +localeconv.c,30 +DEFUN_VOID(localeconv)26,987 + +C-collate.c,0 + +C-ctype.c,0 + +C-ctype_ct.c,0 + +C-ctype_mb.c,0 + +C-monetary.c,0 + +C-numeric.c,0 + +C-response.c,0 + +C-time.c,0 + +locale.h,236 #define _LOCALE_H 25,910 #define LC_COLLATE 33,1180 #define LC_CTYPE 34,1208 @@ -8,15 +30,26 @@ #define LC_TIME 37,1291 #define LC_RESPONSE 38,1317 #define LC_ALL 39,1346 +struct lconv44,1508 -localeinfo.h,255 +localeinfo.h,546 #define _LOCALEINFO_H 23,897 #define __need_size_t25,922 #define __need_wchar_t26,944 #define WCHAR_MAX 32,1063 } mb_char;41,1281 +struct ctype_mbchar_info43,1293 +struct ctype_ctype_info49,1408 +struct ctype_info56,1593 } literal_value;75,2032 } subst;86,2224 +struct collate_info88,2234 +struct numeric_info101,2429 +struct monetary_info112,2619 +struct time_info135,3081 +struct response_info153,3638 } locale;177,4033 +typedef struct sub_locale179,4044 +} sublocale;187,4150 #define LIMAGIC 193,4355 #define CATEGORY_MAGIC(198,4651 diff -ruN glibc-1.06/locale/localeconv.c glibc-1.07/locale/localeconv.c --- glibc-1.06/locale/localeconv.c Wed Apr 15 02:10:46 1992 +++ glibc-1.07/locale/localeconv.c Wed Jul 14 14:51:54 1993 @@ -1,19 +1,20 @@ /* Copyright (C) 1991, 1992 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 General Public License as published by -the Free Software Foundation; either version 1, 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 General Public License for more details. +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 General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ #include #include diff -ruN glibc-1.06/mach/Machrules glibc-1.07/mach/Machrules --- glibc-1.06/mach/Machrules Sun May 9 23:23:29 1993 +++ glibc-1.07/mach/Machrules Thu Jan 6 03:03:36 1994 @@ -1,6 +1,6 @@ # Rules for MiG interfaces that want to go into the C library. -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -24,16 +24,24 @@ # This file sets: # interface-headers Names of generated interface header files. # interface-routines Names of generated interface routines. -# All user stubs are put in individual files, prefixed with __, and a -# symbol-alias to the un-__'d form generated; header for both is put in -# foo.h. If a server interface is listed as __foo, then its routines are -# prefixed with __; server interfaces are written to foo_server.c and -# foo_server.h (or __foo_server.c and __foo_server.h). +# All user stubs are put in individual files, prefixed with RPC_ (and the +# function names prefixed with __), and a symbol-alias to the un-__'d form +# generated; header for both is put in foo.h. Server interfaces are +# written to foo_server.c and foo_server.h; the server functions are called +# _S_rpcname. # Includers can also add to or modify `migdefines' to set MiG flags. all: +# Make sure no value comes from the environment, since we append to it. +# This is done also in ../Rules, but we append to the value before +# including Rules, which changes the origin. +ifneq "$(findstring env,$(origin generated))" "" +generated := +endif + + include ../Makeconfig ifndef MIG @@ -42,7 +50,7 @@ MIGFLAGS = -DMACH_IPC_COMPAT=0 -DSTANDALONE -DTypeCheck=0 \ $(+includes) $(migdefines) -subrprefix __ -.SUFFIXES: .defs +.SUFFIXES: .defs # Just to set specified_rule_matched. define nl # This is needed by *.ir. @@ -49,54 +57,78 @@ endef ifdef user-interfaces -interface-includes := $(foreach if,$(user-interfaces),$(if).ir) -ifndef no_deps -include $(interface-includes) +*.ir := $(addprefix $(objpfx),$(foreach if,$(user-interfaces),$(if).ir)) +ifndef inhibit_interface_rules +include $(*.ir) +endif +ifneq "$(*.ir)" "$(wildcard $(*.ir))" +# If any .ir file is missing, we will be unable to make all the deps. +no_deps=t endif -generated := $(generated) $(interface-includes) +generated += $(*.ir) endif + # %.ir defines a variable `%-calls', which lists the RPCs defined by -# %.defs, and a rule to build $(%-calls:%=__$(%-userprefix)%.c) from +# %.defs, and a rule to build $(%-calls:%=RPC_$(%-userprefix)%.c) from # %.defs, where $(%-userprefix) is the user prefix given in %.defs. We use # the kludgificacious method of defining a pattern rule to build files # matching patterns we are pretty damn sure will only match the particular -# files we have in mind. -%.ir: %.uh +# files we have in mind. To be so damn sure, we use the silly names +# RPC_*.c and the pattern R%C_*.c because using __*.c and _%*.c (or any +# other useful pattern) causes the rule for `host_info' to also match +# `xxx_host_info', and analogous lossage. +# +# Depend on %.h just so they will be built from %.uh in the +# makefile-rebuilding run which builds %.ir; otherwise, %.uh is built as an +# intermediate in order to make %.ir and then removed before re-exec, when +# %.uh is built all over again to build %.h. +$(objpfx)%.ir: $(objpfx)%.uh $(objpfx)%.h (echo 'define $*-calls' ;\ awk '/^kern_return_t/ { print $$2 }' $< ;\ echo 'endef' ;\ echo '$*-calls := $$(subst $$(nl), ,$$($*-calls))' ;\ - echo '$$($*-calls:%=_\%%.c): $*.defs' ;\ - echo ' $$(generate-user-calls)' \ + echo '$$($*-calls:%=$$(objpfx)R\%C_%.c): $$(objpfx)$*.ustamp ;';\ ) > $@-new mv $@-new $@ vpath Machrules ../mach # Find ourselves. -define generate-user-calls -$(MIG) $< $(MIGFLAGS) \ - -prefix __ -i ./__ -server /dev/null -user /dev/null -header /dev/null -endef +# Not an implicit rule so the stamps are never removed as intermediates! +$(patsubst %,$(objpfx)%.ustamp,$(user-interfaces)): $(objpfx)%.ustamp: %.defs + $(MIG) $< $(MIGFLAGS) \ + -prefix __ -i $(objpfx)tmp_ \ + -server /dev/null -user /dev/null -header /dev/null + for call in $($*-calls); do \ + ../move-if-change $(objpfx)tmp_$${call}.c $(objpfx)RPC_$${call}.c; \ + done + touch $@ -__%_server.c __%_server.h: %.defs - $(MIG) $< $(MIGFLAGS) -prefix __ \ - -user /dev/null -header /dev/null \ - -server $(@:.h=.c) -sheader $(@:.c=.h) -%_server.c %_server.h: %.defs +# Look for the server stub files where they will be written. +vpath %_server.c $(addprefix $(objpfx),$(sort $(dir $(server-interfaces)))) + +# Build the server stubs in $(objdir). +$(objpfx)%_server.c $(objpfx)%_server.h: %.defs $(MIG) $< $(MIGFLAGS) \ + -prefix _S_ \ -user /dev/null -header /dev/null \ -server $(@:.h=.c) -sheader $(@:.c=.h) # To get header files that declare both the straight and __ functions, # we generate two files and paste them together. -%.uh: %.defs - $(MIG) $< $(MIGFLAGS) \ - -header $@ -server /dev/null -user /dev/null -%.__h: %.defs - $(MIG) $< $(MIGFLAGS) -prefix __ \ - -header $@ -server /dev/null -user /dev/null +$(objpfx)%.uh: %.defs; $(mig.uh) +define mig.uh +$(make-target-directory) +$(MIG) $< $(MIGFLAGS) \ + -header $@ -server /dev/null -user /dev/null +endef +$(objpfx)%.__h: %.defs; $(mig.__h) +define mig.__h +$(make-target-directory) +$(MIG) $< $(MIGFLAGS) -prefix __ \ + -header $@ -server /dev/null -user /dev/null +endef -%.h: %.__h %.uh +$(objpfx)%.h: $(objpfx)%.__h $(objpfx)%.uh # The last line of foo.__h is "#endif _foo_user_". # The first two lines of foo.uh are "#ifndef _foo_user_"/"#define _foo_user_". (sed -e '$$d' $<; sed -e '1,2d' $(word 2,$^)) > $@-new @@ -104,23 +136,32 @@ if-calls.c := $(strip $(foreach if,$(user-interfaces),$($(if)-calls:%=%.c))) ifdef if-calls.c -$(if-calls.c): +$(addprefix $(objpfx),$(if-calls.c)): $(objpfx)%.c: # Machrules (echo '#include '; \ - echo 'symbol_alias (__$*, $*)') > $@-new + echo 'symbol_alias (__$*, $*);') > $@-new mv $@-new $@ endif -interface-routines := $(foreach if,$(user-interfaces), \ - $($(if)-calls) \ - $(addprefix __,$($(if)-calls))) \ +interface-routines := $(foreach if,$(user-interfaces), \ + $($(if)-calls) \ + $(addprefix RPC_,$($(if)-calls))) \ $(server-interfaces:%=%_server) -interface-headers := $(user-interfaces:%=%.h) $(server-interfaces:%=%_server.h) +interface-headers := $(user-interfaces:%=%.h) \ + $(server-interfaces:%=%_server.h) # Remove the generated user stub source and header files, # and don't distribute them. -mach-generated := $(interface-routines:%=%.c) \ - $(interface-headers:%=%.h %.uh %.__h) -generated := $(generated) $(mach-generated) +mach-generated = $(interface-routines:%=%.c) \ + $(foreach h,$(interface-headers:%.h=%),$h.h $h.uh $h.__h) +generated += $(addprefix $(objpfx),$(mach-generated)) # These are needed to generate the dependencies. -before-compile := $(before-compile) $(interface-headers) +before-compile += $(interface-headers:%=$(objpfx)%) + +# Don't let these be intermediate files and get removed. +$(foreach h,$(interface-headers:%.h=$(objpfx)%),$h.h $h.__h $h.uh) : +$(interface-routines:%=$(objpfx)%.c) : + +# Convenient target to generate all the headers. +.PHONY: interface-headers +interface-headers: $(interface-headers) diff -ruN glibc-1.06/mach/Makefile glibc-1.07/mach/Makefile --- glibc-1.06/mach/Makefile Wed May 19 14:33:10 1993 +++ glibc-1.07/mach/Makefile Thu Jan 6 14:08:09 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -18,36 +18,14 @@ subdir := mach -distribute = Machrules syscalls.awk shortcut.awk +all: -headers = mach_init.h mach.h mach-shortcuts.h \ - $(addprefix mach/,$(mach-headers)) \ - # $(interface-headers) -generated = mach-shortcuts.h $(interface-headers) - -ifndef no_deps # XXX -mach-headers := host_info.h kern_return.h \ - mach_param.h mach_types.h \ - memory_object.h \ - message.h mig_errors.h msg_type.h \ - policy.h port.h processor_info.h \ - std_types.h task_info.h task_special_ports.h \ - thread_info.h thread_special_ports.h \ - thread_status.h thread_switch.h time_value.h \ - vm_attributes.h vm_inherit.h vm_prot.h \ - vm_statistics.h -endif +# Some things below (but before including Rules) use configuration variables. +include ../Makeconfig -user-interfaces := $(addprefix mach/,mach_interface mach_port mach_host \ - default_pager_object \ - memory_object_user \ - memory_object_default \ - kernel_boot \ - )\ - $(addprefix device/,device device_request) -# device_reply is giving me headaches because of userprefix -server-interfaces := # mach/__exc mach/exc +headers = mach_init.h mach.h mach_error.h mach-shortcuts.h \ + $(interface-headers) mach/mach.h mach/mig_support.h mach/error.h routines = $(interface-routines) \ $(filter-out syscall_%,$(mach-syscalls)) \ $(addprefix __,$(mach-syscalls)) \ @@ -57,16 +35,72 @@ mig_support mig_syms \ msg_destroy msg_server msg_server_t \ __msg_dest __msg_server \ - devstream bootprivport # privports - + mach_error mach_error_string error_compat errsystems \ + devstream bootprivport +user-interfaces := $(addprefix mach/,mach_interface mach_port mach_host \ + memory_object_user \ + memory_object_default \ + exc \ + )\ + $(addprefix device/,device device_request) +server-interfaces := device/device_reply mach/exc mach/notify tests := hello - - -all: - - +# It is important that we do not use the wildcard function to expand +# `err_*.sub'. Leaving the wildcard allows Make-dist to find all matching +# files in all sysdep directories. +distribute := Machrules syscalls.awk shortcut.awk \ + errorlib.h err_*.sub + + +# XXX currently these files have been copied into mach/. They will +# supposedly disappear in the future. +headers += $(addprefix mach/default_pager_types.,h defs) +user-interfaces += mach/default_pager +server-interfaces += mach/default_pager_helper + +# Clear any environment value. +generated = + +# Get the proper definition of `mach-srcdir'. +include ../sysdeps/mach/Makefile + +# Use and install the Mach header files directly out of the Mach kernel source. + +# Find the MiG defs files in the kernel source. +vpath %.defs $(mach-srcdir) + +# Install all .h and .defs files we find in some of the kernel's source +# directories and their subdirectories (in MK82, max one level deep). +mach-src-headers := $(wildcard $(foreach dir,mach device mach_debug \ + $(config-machine),\ + $(addprefix $(mach-srcdir)/$(dir)/,\ + *.defs *.h \ + */*.defs */*.h))) +# Exclude mach/machine/*. A symlink will be installed for mach/machine. +# Exclude $(headers) for Mach files we have our own versions of. +mach-headers = $(filter-out mach/machine/% $(headers),\ + $(mach-src-headers:$(mach-srcdir)/%=%)) + +# Don't distribute the Mach headers; they are in the Mach distribution. +dont_distribute = $(mach-headers) + +# DO NOT try to remake these in any way!!! +$(addprefix $(mach-srcdir)/,$(mach-headers)) : ; +install-others += $(addprefix $(includedir)/,$(mach-headers)) +$(includedir)/%: $(mach-srcdir)/%; $(do-install) + +# Make symlinks for machine and mach/machine in the include directory. +install-others += $(includedir)/mach/machine $(includedir)/machine +$(includedir)/mach/machine $(includedir)/machine: $(common-objpfx)config.make + -rm -f $@ + cd $(@D); ln -s $(config-machine) $(@F) + +# Install Mach's as . +install-others += $(includedir)/mach/version.h +$(includedir)/mach/version.h: $(mach-srcdir)/sys/version.h; $(do-install) + # Define mach-syscalls and sysno-*. -ifneq ($(no_deps),t) +ifndef inhibit_mach_syscalls include $(objpfx)mach-syscalls.mk endif $(objpfx)mach-syscalls.mk: mach/syscall_sw.h syscalls.awk @@ -73,23 +107,26 @@ # Go kludges!!! sed -n -e '/Unix server implement them/,$$d' \ -e 's/^kernel_trap(\(.*\),\([-0-9]*\),[0-9]*)$$/\1 \2/p' \ - < $< | awk -f $(word 2,$^) > $@-new + < $< | awk -f $(word 2,$^) > $@-new mv $@-new $@ -generated := $(generated) $(objpfx)mach-syscalls.mk +generated += $(objpfx)mach-syscalls.mk -ifdef mach-syscalls +ifndef mach-syscalls +# We cannot make the deps properly until we know how to make the system +# call functions, and for that we must know what they all are. +no_deps=t +else $(mach-syscalls:%=$(objpfx)__%.S): $(objpfx)__%.S: $(objpfx)mach-syscalls.mk (echo '#include '; \ echo 'SYSCALL_TRAP (__$*, $(sysno-$*))') > $@-new mv $@-new $@ -$(mach-syscalls:%=$(objpfx)%.c): $(objpfx)%.c: +$(mach-syscalls:%=$(objpfx)%.c): $(objpfx)%.c: Makefile (echo '#include '; \ - echo 'symbol_alias (__$*, $*)') > $@-new + echo 'symbol_alias (__$*, $*);') > $@-new mv $@-new $@ -generated := $(generated) \ - $(mach-syscalls:%=$(objpfx)__%.S) \ - $(mach-syscalls:%=$(objpfx)%.c) -endif +generated += $(mach-syscalls:%=$(objpfx)__%.S) \ + $(mach-syscalls:%=$(objpfx)%.c) +endif # mach-syscalls mach-shortcuts := $(patsubst syscall_%,%,$(filter syscall_%,$(mach-syscalls))) @@ -103,12 +140,12 @@ endif # Make the MiG stubs for $(mach-shortcuts) be CALL_rpc. -migdefines := $(migdefines) \ - $(foreach call,$(mach-shortcuts),-D$(call)=$(call)_rpc) +migdefines += $(foreach call,$(mach-shortcuts),-D$(call)=$(call)_rpc) mach/mach_interface.uh mach/mach_port.uh: $(objpfx)mach-syscalls.mk ifdef mach-shortcuts -$(mach-shortcuts:%=__%.c): __%.c: shortcut.awk __%_rpc.c +$(mach-shortcuts:%=$(objpfx)__%.c): $(objpfx)__%.c: shortcut.awk \ + $(objpfx)RPC_%_rpc.c gawk -v call=__$* -v rpc=__$*_rpc -v syscall=__syscall_$* \ -f $^ > $@-new mv $@-new $@ @@ -116,36 +153,55 @@ # The shortcut calls have had their names changed to CALL_rpc, so # CALL_rpc.c is being generated with a symbol alias to __CALL_rpc. # We also want CALL.c with an alias to __CALL. -$(mach-shortcuts:%=%.c): +$(mach-shortcuts:%=$(objpfx)%.c): $(objpfx)%.c: # Makefile (echo '#include '; \ - echo 'symbol_alias (__$*, $*)') > $@-new + echo 'symbol_alias (__$*, $*);') > $@-new mv $@-new $@ -generated := $(generated) $(mach-shortcuts:%=%.c) +generated += $(mach-shortcuts:%=$(objpfx)%.c) +endif # mach-shortcuts # Generate mach-shortcuts.h, which will contain the prototypes for the # shortcutted kernel RPC functions. -$(objpfx)mach-shortcuts.h: mach/mach_interface.uh mach/mach_port.uh +$(objpfx)mach-shortcuts.h: $(objpfx)mach/mach_interface.h \ + $(objpfx)mach/mach_port.h # The first line gets us one paragraph per line, with @s separating real lines. # The second line selects paragraphs for the shortcutted functions. # The third line removes `_rpc' from the names and rerealifies the lines. cat $^ | tr \\012 @ | sed s/@@/@%/g | tr % \\012 \ | grep '^/\* Routine [a-z0-9_]*_rpc \*/' \ - | sed 's/_rpc//' | tr @ \\012 > $@-new + | sed 's/_rpc//g' | tr @ \\012 > $@-new mv $@-new $@ -endif # mach-shortcuts +generated += $(objpfx)mach-shortcuts.h +before-compile += $(objpfx)mach-shortcuts.h + include Machrules include ../Rules # There is already a mach.h, so mach.defs generates mach_interface.h. -mach/mach_interface.defs: mach/mach.defs +$(objpfx)mach/mach_interface.defs: $(mach-srcdir)/mach/mach.defs ln $< $@ || cp $< $@ # There is already a memory_object.h, # so memory_object.defs generates memory_object_user.h. -mach/memory_object_user.defs: mach/memory_object.defs +$(objpfx)mach/memory_object_user.defs: $(mach-srcdir)/mach/memory_object.defs ln $< $@ || cp $< $@ -generated := $(generated) mach/mach.defs mach/memory_object_user.defs + +ifdef objdir +vpath mach/mach_interface.defs $(objdir) +vpath mach/memory_object_user.defs $(objdir) +endif # Be sure not to make these with implicit rules from foo.defs. -$(filter-out $(interface-headers),$(headers)) : ; +mach.h mach/memory_object.h: ; + +ifeq (,) +# XXX we have an errsystems.c here because a gcc bug makes the generated +# version lose. +else +generated += $(objpfx)errsystems.c +$(objpfx)errsystems.c: errsystems.awk err_*.sub \ + $(wildcard $(addsuffix /err_*.sub,$(+sysdep_dirs))) + gawk -v subsys='$(filter-out $<,$^)' -f $^ > $@.n + mv $@.n $@ +endif diff -ruN glibc-1.06/mach/TAGS glibc-1.07/mach/TAGS --- glibc-1.06/mach/TAGS Wed May 19 20:06:58 1993 +++ glibc-1.07/mach/TAGS Tue Dec 21 04:13:04 1993 @@ -1,6 +1,6 @@ mach_init.c,20 -__mach_init 27,943 +__mach_init 28,982 vm_page_size.c,0 @@ -30,18 +30,33 @@ msg_server_t.c,0 __msg_dest.c,94 -__mach_msg_destroy(56,1607 -mach_msg_destroy_port(123,3381 -mach_msg_destroy_memory(141,3822 - -__msg_server.c,63 -__mach_msg_server_timeout(56,1603 -__mach_msg_server 129,3536 - -devstream.c,61 -input 29,1006 -output 68,1760 -mach_open_devstream 158,3524 +__mach_msg_destroy(61,1720 +mach_msg_destroy_port(128,3494 +mach_msg_destroy_memory(146,3935 + +__msg_server.c,28 +__mach_msg_server 176,5450 + +mach_error.c,20 +mach_error(66,2073 + +mach_error_string.c,114 +#define EXPORT_BOOLEAN40,1352 +mach_error_type(49,1540 +mach_error_string_int(67,1892 +mach_error_string(90,2450 + +error_compat.c,33 +__mach_error_map_compat(39,1295 + +errsystems.c,22 +#define static 5,126 + +devstream.c,78 +input 29,1012 +output 70,1790 +output 130,2890 +mach_open_devstream 221,4661 bootprivport.c,30 __mach_get_priv_ports 22,858 @@ -54,5 +69,58 @@ #define round_page(41,1490 #define trunc_page(46,1656 -mach.h,24 +mach.h,52 #define _MACH_H 22,881 +#define __need_FILE74,2770 + +mach_error.h,30 +#define _MACH_ERROR_ 45,1391 + +mach/mach.h,0 + +mach/mig_support.h,80 +#define _MACH_MIG_SUPPORT_H 23,929 +__mig_strncpy 53,2048 +mig_strncpy 58,2193 + +mach/error.h,772 +#define _MACH_ERROR_H_89,2773 +#define err_none 100,2938 +#define ERR_SUCCESS 101,2972 +#define ERR_ROUTINE_NIL 102,3009 +#define err_system(105,3055 +#define err_sub(106,3095 +#define err_get_system(108,3134 +#define err_get_sub(109,3181 +#define err_get_code(110,3226 +#define system_emask 112,3268 +#define sub_emask 113,3309 +#define code_emask 114,3345 +#define err_kern 118,3402 +#define err_us 119,3450 +#define err_server 120,3509 +#define err_ipc 121,3571 +#define err_mach_ipc 122,3627 +#define err_bootstrap 123,3688 +#define err_hurd 124,3751 +#define err_local 125,3815 +#define err_ipc_compat 126,3877 +#define err_max_system 128,3957 +#define unix_err(132,4037 +typedef kern_return_t mach_error_t;134,4091 +typedef mach_error_t (* mach_error_fn_t)135,4127 + +mach/default_pager_types.h,457 +#define _MACH_DEFAULT_PAGER_TYPES_H_40,1306 +typedef struct default_pager_info 47,1459 +} default_pager_info_t;51,1666 +typedef struct default_pager_object 54,1692 +} default_pager_object_t;57,1852 +typedef default_pager_object_t *default_pager_object_array_t;59,1879 +typedef struct default_pager_page 62,1943 +} default_pager_page_t;64,2044 +typedef default_pager_page_t *default_pager_page_array_t;66,2069 +typedef char default_pager_filename_t[68,2128 + +mach/default_pager_types.defs,48 +#define _MACH_DEFAULT_PAGER_TYPES_DEFS_44,1408 diff -ruN glibc-1.06/mach/__msg_dest.c glibc-1.07/mach/__msg_dest.c --- glibc-1.06/mach/__msg_dest.c Wed Oct 23 08:49:45 1991 +++ glibc-1.07/mach/__msg_dest.c Tue Aug 3 02:13:18 1993 @@ -38,9 +38,14 @@ * */ +#if 1 +#include +#else +/* This is what CMU did, but that fails to declare some used functions. */ #include #include #include +#endif static void mach_msg_destroy_port(); static void mach_msg_destroy_memory(); diff -ruN glibc-1.06/mach/__msg_server.c glibc-1.07/mach/__msg_server.c --- glibc-1.06/mach/__msg_server.c Sat Oct 24 21:47:21 1992 +++ glibc-1.07/mach/__msg_server.c Mon Dec 6 18:25:25 1993 @@ -1,3 +1,26 @@ +/* Copyright (C) 1993 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. */ + +/* Based on CMU's mach_msg_server.c revision 2.4 of 91/05/14, and thus + under the following copyright. Rewritten by Roland McGrath (FSF) + 93/12/06 to use stack space instead of malloc, and to handle + large messages with MACH_RCV_LARGE. */ + /* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University @@ -38,90 +61,114 @@ * */ -#include -#include -#include -#include -#include +#include +#include #include /* For malloc and free. */ -/* - * Routine: mach_msg_server - * Purpose: - * A simple generic server function. - */ - mach_msg_return_t -__mach_msg_server_timeout(demux, max_size, rcv_name, option, timeout) - boolean_t (*demux)(); - mach_msg_size_t max_size; - mach_port_t rcv_name; - mach_msg_option_t option; - mach_msg_timeout_t timeout; +__mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request, + mach_msg_header_t *reply), + mach_msg_size_t max_size, + mach_port_t rcv_name, + mach_msg_option_t option, + mach_msg_timeout_t timeout) { - register mig_reply_header_t *bufRequest, *bufReply, *bufTemp; - register mach_msg_return_t mr; + register mig_reply_header_t *request, *reply; + register mach_msg_return_t mr; - bufRequest = (mig_reply_header_t *) malloc(max_size); - if (bufRequest == 0) - return KERN_RESOURCE_SHORTAGE; - bufReply = (mig_reply_header_t *) malloc(max_size); - if (bufReply == 0) - return KERN_RESOURCE_SHORTAGE; - - for (;;) { - get_request: - mr = __mach_msg(&bufRequest->Head, MACH_RCV_MSG|option, - 0, max_size, rcv_name, - timeout, MACH_PORT_NULL); - while (mr == MACH_MSG_SUCCESS) { - /* we have a request message */ - - (void) (*demux)(&bufRequest->Head, &bufReply->Head); - - if (bufReply->RetCode != KERN_SUCCESS) { - if (bufReply->RetCode == MIG_NO_REPLY) - goto get_request; - - /* don't destroy the reply port right, - so we can send an error message */ - bufRequest->Head.msgh_remote_port = MACH_PORT_NULL; - __mach_msg_destroy(&bufRequest->Head); - } + if (max_size == 0) + { + option |= MACH_RCV_LARGE; + max_size = __vm_page_size; /* Generic. Good? XXX */ + } - if (bufReply->Head.msgh_remote_port == MACH_PORT_NULL) { - /* no reply port, so destroy the reply */ - if (bufReply->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) - __mach_msg_destroy(&bufReply->Head); + request = __alloca (max_size); + reply = __alloca (max_size); - goto get_request; + while (1) + { + get_request: + mr = __mach_msg (&request->Head, MACH_RCV_MSG|option, + 0, max_size, rcv_name, + timeout, MACH_PORT_NULL); + while (mr == MACH_MSG_SUCCESS) + { + /* We have a request message. + Pass it to DEMUX for processing. */ + + (void) (*demux) (&request->Head, &reply->Head); + + switch (reply->RetCode) + { + case KERN_SUCCESS: + /* Hunky dory. */ + break; + + case MIG_NO_REPLY: + /* The server function wanted no reply sent. + Loop for another request. */ + goto get_request; + + default: + /* Some error; destroy the request message to release any + port rights or VM it holds. Don't destroy the reply port + right, so we can send an error message. */ + request->Head.msgh_remote_port = MACH_PORT_NULL; + __mach_msg_destroy (&request->Head); + break; } - /* send reply and get next request */ + if (reply->Head.msgh_remote_port == MACH_PORT_NULL) + { + /* No reply port, so destroy the reply. */ + if (reply->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) + __mach_msg_destroy (&reply->Head); + goto get_request; + } - bufTemp = bufRequest; - bufRequest = bufReply; - bufReply = bufTemp; - - mr = __mach_msg(&bufRequest->Head, - MACH_SEND_MSG|MACH_RCV_MSG|option, - bufRequest->Head.msgh_size, max_size, rcv_name, - timeout, MACH_PORT_NULL); - } + /* Send the reply and the get next request. */ - /* a message error occurred */ + { + /* Swap the request and reply buffers. mach_msg will read the + reply message from the buffer we pass and write the new + request message to the same buffer. */ + void *tmp = request; + request = reply; + reply = tmp; + } + + mr = __mach_msg (&request->Head, + MACH_SEND_MSG|MACH_RCV_MSG|option, + request->Head.msgh_size, max_size, rcv_name, + timeout, MACH_PORT_NULL); + } - if (mr != MACH_SEND_INVALID_DEST) - break; + /* A message error occurred. */ - /* the reply can't be delivered, so destroy it */ - __mach_msg_destroy(&bufRequest->Head); + switch (mr) + { + case MACH_RCV_TOO_LARGE: + /* The request message is larger than MAX_SIZE, and has not + been dequued. The message header has the actual size of + the message. We recurse here in hopes that the compiler + will optimize the tail-call and allocate some more stack + space instead of way too much. */ + return __mach_msg_server_timeout (demux, request->Head.msgh_size, + rcv_name, option, timeout); + + case MACH_SEND_INVALID_DEST: + /* The reply can't be delivered, so destroy it. This error + indicates only that the requestor went away, so we + continue and get the next request. */ + __mach_msg_destroy (&request->Head); + break; + + default: + /* Some other form of lossage; return to caller. */ + return mr; + } } - - free((char *) bufRequest); - free((char *) bufReply); - return mr; } diff -ruN glibc-1.06/mach/bootprivport.c glibc-1.07/mach/bootprivport.c --- glibc-1.06/mach/bootprivport.c Thu Nov 5 19:58:00 1992 +++ glibc-1.07/mach/bootprivport.c Mon Jun 28 22:30:25 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ /* We cannot simply use a MiG-generated user stub to do this, because the return message does not contain a return code datum. */ - reply = mach_reply_port (); + reply = __mach_reply_port (); msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE); msg.hdr.msgh_size = 0; @@ -47,10 +47,10 @@ msg.hdr.msgh_local_port = reply; msg.hdr.msgh_kind = MACH_MSGH_KIND_NORMAL; msg.hdr.msgh_id = 999999; - err = mach_msg (&msg.hdr, - MACH_SEND_MSG|MACH_RCV_MSG|MACH_RCV_TIMEOUT, - sizeof (msg.hdr), sizeof (msg), reply, - 500, MACH_PORT_NULL); + err = __mach_msg (&msg.hdr, + MACH_SEND_MSG|MACH_RCV_MSG|MACH_RCV_TIMEOUT, + sizeof (msg.hdr), sizeof (msg), reply, + 500, MACH_PORT_NULL); /* XXX timeout is arbitrary */ mach_port_deallocate (mach_task_self (), bootstrap); mach_port_deallocate (mach_task_self (), reply); diff -ruN glibc-1.06/mach/devstream.c glibc-1.07/mach/devstream.c --- glibc-1.06/mach/devstream.c Fri Oct 2 21:03:17 1992 +++ glibc-1.07/mach/devstream.c Wed Nov 24 01:01:23 1993 @@ -1,7 +1,7 @@ /* stdio on a Mach device port. Translates \n to \r\n on output. -Copyright (C) 1992 Free Software Foundation, Inc. +Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,7 +30,8 @@ { kern_return_t err; char *buffer; - size_t to_read, nread; + size_t to_read; + mach_msg_type_size_t nread; char c; if (f->__buffer == NULL) @@ -64,6 +65,67 @@ return (unsigned char) *f->__bufp++; } + +static void +output (FILE *f, int c) +{ + inline void write_some (const char *p, size_t to_write) + { + kern_return_t err; + int wrote; + while (to_write > 0) + { + if (err = device_write_inband ((device_t) f->__cookie, 0, + f->__target, (char *)p, + to_write, &wrote)) + { + errno = err; + f->__error = 1; + break; + } + p += wrote; + to_write -= wrote; + f->__target += wrote; + } + } + + if (f->__buffer != NULL) + { + if (f->__put_limit == f->__buffer) + { + /* Prime the stream for writing. */ + f->__put_limit = f->__buffer + f->__bufsize; + f->__bufp = f->__buffer; + if (c != EOF) + { + *f->__bufp++ = (unsigned char) c; + c = EOF; + } + } + + + /* Write out the buffer. */ + + write_some (f->__buffer, f->__bufp - f->__buffer); + + f->__bufp = f->__buffer; + } + + if (c != EOF && !ferror (f)) + { + if (f->__linebuf && (unsigned char) c == '\n') + { + static const char nl = '\n'; + write_some (&nl, 1); + } + else + *f->__bufp++ = (unsigned char) c; + } +} + + + +#if 0 /* Translates \n to \r\n. */ static void output (FILE *f, int c) { @@ -153,9 +215,10 @@ *f->__bufp++ = (unsigned char) c; } } +#endif FILE * -mach_open_devstream (device_t dev, const char *mode) +mach_open_devstream (mach_port_t dev, const char *mode) { FILE *stream = fopencookie ((void *) dev, mode, __default_io_functions); if (stream == NULL) @@ -163,7 +226,7 @@ stream->__room_funcs.__input = input; stream->__room_funcs.__output = output; - stream->__io_funcs.__close = device_close; + stream->__io_funcs.__close = (__io_close_fn *) device_close; stream->__seen = 1; return stream; diff -ruN glibc-1.06/mach/err_bootstrap.sub glibc-1.07/mach/err_bootstrap.sub --- glibc-1.06/mach/err_bootstrap.sub +++ glibc-1.07/mach/err_bootstrap.sub Tue Oct 6 14:29:52 1992 @@ -0,0 +1,60 @@ +/* + * Mach Operating System + * Copyright (c) 1992 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: err_bootstrap.sub,v $ + * Revision 2.2 92/04/01 19:37:59 rpd + * Created. + * [92/03/09 rpd] + * + */ +/* + * File: err_bootstrap.sub + * Author: Richard Draves, Carnegie Mellon University + * Date: March 9, 1992 + * + * Error string definitions for bootstrap + */ + +static char * err_codes_bootstrap_fs[] = { + /* 0 */ "(bootstrap/fs) not a directory", + /* 1 */ "(bootstrap/fs) name not found", + /* 2 */ "(bootstrap/fs) name too long", + /* 3 */ "(bootstrap/fs) symbolic link loop", + /* 4 */ "(bootstrap/fs) bad file system", + /* 5 */ "(bootstrap/fs) offset not in file", + /* 6 */ "(bootstrap/fs) invalid parameter", +}; + +/* err_bootstrap subsystems */ +static struct error_subsystem err_bootstrap_sub[] = { + /* bootstrap/0; */ + { + "(bootstrap/fs)", + errlib_count(err_codes_bootstrap_fs), + err_codes_bootstrap_fs, + }, +}; diff -ruN glibc-1.06/mach/err_ipc.sub glibc-1.07/mach/err_ipc.sub --- glibc-1.06/mach/err_ipc.sub +++ glibc-1.07/mach/err_ipc.sub Tue Oct 6 14:29:52 1992 @@ -0,0 +1,106 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: err_ipc.sub,v $ + * Revision 2.2 92/01/16 00:08:40 rpd + * Moved from user collection to mk collection. + * + * Revision 2.2 91/03/27 16:05:16 mrt + * First checkin + * + * + */ +/* + * File: err_ipc.sub + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar, 1988 + * + * Definitions of error strings for original IPC + */ + +static char * err_codes_send[] = { + "(ipc/send) unknown error", /* -100 */ + "(ipc/send) invalid memory", /* -101 */ + "(ipc/send) invalid port", /* -102 */ + "(ipc/send) timed out", /* -103 */ + "(ipc/send) unused error", /* -104 */ + "(ipc/send) will notify", /* -105 */ + "(ipc/send) notify in progress", /* -106 */ + "(ipc/send) kernel refused message", /* -107 */ + "(ipc/send) send interrupted", /* -108 */ + "(ipc/send) send message too large", /* -109 */ + "(ipc/send) send message too small", /* -110 */ + "(ipc/send) message size changed while being copied", /* -111 */ +}; + +static char * err_codes_rcv[] = { + "(ipc/rcv) unknown error", /* -200 */ + "(ipc/rcv) invalid memory", /* -201 */ + "(ipc/rcv) invalid port", /* -202 */ + "(ipc/rcv) receive timed out", /* -203 */ + "(ipc/rcv) message too large", /* -204 */ + "(ipc/rcv) no space for message data", /* -205 */ + "(ipc/rcv) only sender remaining", /* -206 */ + "(ipc/rcv) receive interrupted", /* -207 */ + "(ipc/rcv) port receiver changed or port became enabled", /* -208 */ +}; + +static char * err_codes_mig[] = { + "(ipc/mig) type check failure in message interface", /* 0 (-300) */ + "(ipc/mig) wrong return message ID", /* 1 */ + "(ipc/mig) server detected error", /* 2 */ + "(ipc/mig) bad message ID", /* 3 */ + "(ipc/mig) server found wrong arguments", /* 4 */ + "(ipc/mig) no reply should be sent", /* 5 */ + "(ipc/mig) server raised exception", /* 6 */ + "(ipc/mig) user specified array not large enough for return info", /* 7 */ +}; + +/* err_ipc subsystems */ +static struct error_subsystem err_ipc_sub[] = { + /* ipc/0; */ + { + "(ipc/send)", + errlib_count(err_codes_send), + err_codes_send, + }, + /* ipc/1; */ + { + "(ipc/rcv)", + errlib_count(err_codes_rcv), + err_codes_rcv, + + }, + /* ipc/2 */ + { + "(ipc/mig)", + errlib_count(err_codes_mig), + err_codes_mig, + }, + +}; + diff -ruN glibc-1.06/mach/err_kern.sub glibc-1.07/mach/err_kern.sub --- glibc-1.06/mach/err_kern.sub +++ glibc-1.07/mach/err_kern.sub Fri Dec 17 01:14:52 1993 @@ -0,0 +1,185 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: err_kern.sub,v $ + * Revision 2.3 92/04/01 19:38:02 rpd + * Added err_codes_device. + * [92/03/09 rpd] + * + * Revision 2.2 92/01/16 00:08:50 rpd + * Moved from user collection to mk collection. + * + * Revision 2.3 91/08/29 15:51:22 rpd + * Updated err_codes_kern. + * [91/08/15 rpd] + * + * Revision 2.2 91/03/27 16:05:27 mrt + * First checkin + * + */ +/* + * File: err_kern.sub + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar, 1988 + * + * error codes for Mach and Unix kernels + */ + +static char * err_codes_kern[] = { + "(os/kern) successful", + "(os/kern) invalid address", + "(os/kern) protection failure", + "(os/kern) no space available", + "(os/kern) invalid argument", + "(os/kern) failure", + "(os/kern) resource shortage", + "(os/kern) not receiver", + "(os/kern) no access", + "(os/kern) memory failure", + "(os/kern) memory error", + "(os/kern) already in set", + "(os/kern) not in set", + "(os/kern) name exists", + "(os/kern) aborted", + "(os/kern) invalid name", + "(os/kern) invalid task", + "(os/kern) invalid right", + "(os/kern) invalid value", + "(os/kern) urefs overflow", + "(os/kern) invalid capability", + "(os/kern) right exists", + "(os/kern) invalid host", + "(os/kern) memory present", +}; + +static char * err_codes_device[] = { + "(os/device) hardware IO error", + "(os/device) operation would block", + "(os/device) no such device", + "(os/device) device already open", + "(os/device) device is shut down", + "(os/device) invalid operation", + "(os/device) invalid record number", + "(os/device) invalid IO size", + "(os/device) memory allocation failure", + "(os/device) read only", +}; + +static char * err_codes_unix[] = { + NO_SUCH_ERROR, + "(os/unix) no rights to object", + "(os/unix) file or directory does not exist", + "(os/unix) no such process", + "(os/unix) interrupted system call", + "(os/unix) i/o error", + "(os/unix) device does not exist", + "(os/unix) argument list is too long", + "(os/unix) invalid executable object format", + "(os/unix) bad file descriptor number", + "(os/unix) no child processes are present", + "(os/unix) no more processes are available", + "(os/unix) insufficient memory", + "(os/unix) access denied", + "(os/unix) memory access fault", + "(os/unix) block device required for operation", + "(os/unix) mount device busy", + "(os/unix) file already exists", + "(os/unix) cross device link", + "(os/unix) device does not exist", + "(os/unix) object is not a directory", + "(os/unix) object is a directory", + "(os/unix) invalid argument", + "(os/unix) internal file table overflow", + "(os/unix) maximum number of open files reached", + "(os/unix) object is not a tty-like device", + "(os/unix) executable object is in use", + "(os/unix) file is too large", + "(os/unix) no space is left on device", + "(os/unix) illegal seek attempt", + "(os/unix) read-only file system", + "(os/unix) too many links", + "(os/unix) broken pipe", + "(os/unix) argument is too large", + "(os/unix) result is out of range", + "(os/unix) operation on device would block", + "(os/unix) operation is now in progress", + "(os/unix) operation is already in progress", + "(os/unix) socket operation attempted on non-socket object", + "(os/unix) destination address is required", + "(os/unix) message is too long", + "(os/unix) protocol type is incorrect for socket", + "(os/unix) protocol type is not availaible", + "(os/unix) protocol type is not supported", + "(os/unix) socket type is not supported", + "(os/unix) operation is not supported on sockets", + "(os/unix) protocol family is not supported", + "(os/unix) address family is not supported by protocol family", + "(os/unix) address is already in use", + "(os/unix) can't assign requested address", + "(os/unix) network is down", + "(os/unix) network is unreachable", + "(os/unix) network dropped connection on reset", + "(os/unix) software aborted connection", + "(os/unix) connection reset by peer", + "(os/unix) no buffer space is available", + "(os/unix) socket is already connected", + "(os/unix) socket is not connected", + "(os/unix) can't send after socket shutdown", + "(os/unix) too many references; can't splice", + "(os/unix) connection timed out", + "(os/unix) connection was refused", + "(os/unix) too many levels of symbolic links", + "(os/unix) file name exceeds system maximum limit", + "(os/unix) host is down", + "(os/unix) there is no route to host", + "(os/unix) directory is not empty", + "(os/unix) quota on number of processes exceeded", + "(os/unix) quota on number of users exceeded", + "(os/unix) quota on available disk space exceeded", +}; + +static struct error_subsystem err_kern_sub[] = { + { + "(os/kern)", + errlib_count(err_codes_kern), + err_codes_kern, + }, + { + "(os/device)", + errlib_count(err_codes_device), + err_codes_device, + }, + { + "(os/?)", + 0, + }, + { + "(os/unix)", + errlib_count(err_codes_unix), + err_codes_unix, + }, +}; diff -ruN glibc-1.06/mach/err_mach_ipc.sub glibc-1.07/mach/err_mach_ipc.sub --- glibc-1.06/mach/err_mach_ipc.sub +++ glibc-1.07/mach/err_mach_ipc.sub Tue Oct 6 14:29:52 1992 @@ -0,0 +1,127 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: err_mach_ipc.sub,v $ + * Revision 2.3 92/04/01 19:38:05 rpd + * Added MIG_DESTROY_REQUEST. + * [92/03/09 rpd] + * + * Revision 2.2 92/01/16 00:09:05 rpd + * Moved from user collection to mk collection. + * + * Revision 2.3 91/08/29 15:51:30 rpd + * Added MIG_SERVER_DIED. + * [91/08/21 rpd] + * + * Revision 2.2 91/03/27 16:05:37 mrt + * First checkin + * + * Revision 2.2 91/03/18 17:39:03 rpd + * Created. + * [91/03/18 rpd] + * + */ +/* + * File: err_mach_ipc.sub + * Author: Richard Draves, Carnegie Mellon University + * Date: Jan, 1990 + * + * Error string definitions for the new Mach IPC + */ + +static char * err_codes_mach_send[] = { + /* 0 */ "(ipc/send) no error", + /* 1 */ "(ipc/send) send in progress", + /* 2 */ "(ipc/send) invalid data", + /* 3 */ "(ipc/send) invalid destination port", + /* 4 */ "(ipc/send) timed out", + /* 5 */ "(ipc/send) will notify", + /* 6 */ "(ipc/send) notify in progress", + /* 7 */ "(ipc/send) interrupted", + /* 8 */ "(ipc/send) msg too small", + /* 9 */ "(ipc/send) invalid reply port", + /* 10 */ "(ipc/send) invalid port right", + /* 11 */ "(ipc/send) invalid notify port", + /* 12 */ "(ipc/send) invalid memory", + /* 13 */ "(ipc/send) no msg buffer", + /* 14 */ "(ipc/send) no notify possible", + /* 15 */ "(ipc/send) invalid msg-type", + /* 16 */ "(ipc/send) invalid msg-header", +}; + +static char * err_codes_mach_rcv[] = { + /* 0 */ "(ipc/rcv) no error", + /* 1 */ "(ipc/rcv) receive in progress", + /* 2 */ "(ipc/rcv) invalid name", + /* 3 */ "(ipc/rcv) timed out", + /* 4 */ "(ipc/rcv) msg too large", + /* 5 */ "(ipc/rcv) interrupted", + /* 6 */ "(ipc/rcv) port changed", + /* 7 */ "(ipc/rcv) invalid notify port", + /* 8 */ "(ipc/rcv) invalid data", + /* 9 */ "(ipc/rcv) port died", + /* 10 */ "(ipc/rcv) port in set", + /* 11 */ "(ipc/rcv) header error", + /* 12 */ "(ipc/rcv) body error", +}; + +static char * err_codes_mach_mig[] = { + /* 0 */ "(ipc/mig) client type check failure", + /* 1 */ "(ipc/mig) wrong reply message ID", + /* 2 */ "(ipc/mig) server detected error", + /* 3 */ "(ipc/mig) bad request message ID", + /* 4 */ "(ipc/mig) server type check failure", + /* 5 */ "(ipc/mig) no reply should be sent", + /* 6 */ "(ipc/mig) server raised exception", + /* 7 */ "(ipc/mig) array not large enough", + /* 8 */ "(ipc/mig) server died", + /* 9 */ "(ipc/mig) destroy request with no reply", +}; + +/* err_mach_ipc subsystems */ +static struct error_subsystem err_mach_ipc_sub[] = { + /* ipc/0; */ + { + "(ipc/send)", + errlib_count(err_codes_mach_send), + err_codes_mach_send, + }, + /* ipc/1; */ + { + "(ipc/rcv)", + errlib_count(err_codes_mach_rcv), + err_codes_mach_rcv, + + }, + /* ipc/2 */ + { + "(ipc/mig)", + errlib_count(err_codes_mach_mig), + err_codes_mach_mig, + }, + +}; diff -ruN glibc-1.06/mach/err_server.sub glibc-1.07/mach/err_server.sub --- glibc-1.06/mach/err_server.sub +++ glibc-1.07/mach/err_server.sub Tue Oct 6 14:29:53 1992 @@ -0,0 +1,371 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: err_server.sub,v $ + * Revision 2.2 92/01/16 00:10:29 rpd + * Moved from user collection to mk collection. + * + * Revision 2.3 91/08/29 15:51:39 rpd + * Fixed err_codes_netname. + * [91/08/22 rpd] + * + * Revision 2.2 91/03/27 16:05:51 mrt + * First checkin + * + * Revision 2.3 90/10/29 17:27:20 dpj + * Merged-up to U25 + * [90/09/02 20:00:25 dpj] + * + */ +/* + * File: err_server.sub + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar, 1988 + * + * Definitions of Servers error strings + */ + +static char * err_codes_netname[] = { /* 0 */ + "(server/netname) name is not yours", + "(server/netname) name not checked in", + "(server/netname) no such host", + "(server/netname) host not found", +}; +static char * err_codes_env_mgr[] = { /* 1 */ + NO_SUCH_ERROR, + "(server/env_mgr) variable not found", + "(server/env_mgr) wrong type of variable", + "(server/env_mgr) unknown port", + "(server/env_mgr) read only environment", + "(server/env_mgr) no more connections available", + "(server/env_mgr) port table full", + "(server/env_mgr) attempting to enter a null port ", +}; +static char * err_codes_execd[] = { /* 2 */ + NO_SUCH_ERROR, + "(server/execd) could not find file to run", + "(server/execd) userid or password incorrect", + "(server/execd) fork failed", +}; +static char * err_codes_netmemory[] = { /* 3 */ + "(server/netmemory) successful", + "(server/netmemory) invalid argument", + "(server/netmemory) resource shortage", +}; +static char * err_codes_ufs[] = { /* 4 */ + NO_SUCH_ERROR, +/* XXX "(server/ufs) invalid port", */ +}; + +static char * err_codes_task_master[] = { /* 5 */ + "(server/task_master) GENERIC ERROR", + "(server/task_master) invalid tm_task port", + "(server/task_master) invalid task id", + "(server/task_master) invalid kernel port", + "(server/task_master) invalid job group", + "(server/task_master) invalid action", +}; + +static char * err_codes_ns[] = { /* 6 */ + "(server/ns) GENERIC ERROR", + "(server/ns) invalid handle", + "(server/ns) name not found", + "(server/ns) name already exists", + "(server/ns) name too long", + "(server/ns) path too long", + "(server/ns) invalid name", + "(server/ns) not a directory", + "(server/ns) is a directory", + "(server/ns) directory not empty", + "(server/ns) infinite retry loop in resolver", + "(server/ns) infinite forwarding loop in resolver", + "(server/ns) invalid prefix", + "(server/ns) prefix table overflow", + "(server/ns) bad format for directory", + "(server/ns) unknown entry type", + "(server/ns) invalid generation", + "(server/ns) entry not reserved", +}; + +static char * err_codes_io[] = { /* 7 */ + "(server/io) GENERIC ERROR", + "(server/io) invalid offset", + "(server/io) invalid size", + "(server/io) invalid mode", + "(server/io) invalid strategy", + "(server/io) operation rejected under current I/O strategy", +}; + +static char * err_codes_auth[] = { /* 8 */ + "(server/auth) GENERIC ERROR", + "(server/auth) bad private port", + "(server/auth) bad name", + "(server/auth) not primary", + "(server/auth) bad pauthsword", + "(server/auth) bad group", + "(server/auth) duplicate id", + "(server/auth) duplicate name", + "(server/auth) not secondary", +}; + +static char * err_codes_us[] = { /* 9 */ + "(server/us) GENERIC ERROR", + "(server/us) unknown error", + "(server/us) object not found", + "(server/us) object exists", + "(server/us) object busy", + "(server/us) object not started", + "(server/us) object dead", + "(server/us) invalid args", + "(server/us) invalid access", + "(server/us) invalid format", + "(server/us) invalid buffer size", + "(server/us) access denied", + "(server/us) resource exhausted", + "(server/us) quota exceeded", + "(server/us) limit exceeded", + "(server/us) not implemented", + "(server/us) not supported", + "(server/us) hardware error", + "(server/us) retry required", + "(server/us) not authenticated", + "(server/us) exclusive access", + "(server/us) timeout", + "(server/us) bad reference count", + "(server/us) internal error", +}; + +static char * err_codes_sunrpc[] = { /* 10 */ + "(server/sunrpc) GENERIC ERROR", + "(server/sunrpc) cannot encode arguments", + "(server/sunrpc) cannot decode results", + "(server/sunrpc) failure in sending call", + "(server/sunrpc) failure in receiving result", + "(server/sunrpc) call timed out", + "(server/sunrpc) rpc versions not compatible", + "(server/sunrpc) authentication error", + "(server/sunrpc) program not available", + "(server/sunrpc) program version mismatched", + "(server/sunrpc) procedure unavailable", + "(server/sunrpc) decode arguments error", + "(server/sunrpc) generic other problem", + "(server/sunrpc) unknown host name", + "(server/sunrpc) portmapper failed", + "(server/sunrpc) remote program not registered", + "(server/sunrpc) unspecified error", + "(server/sunrpc) unknown protocol", +}; + +static char * err_codes_machobj[] = { /* 11 */ + "(server/object system) GENERIC ERROR", + "(server/object system) object not found", + "(server/object system) no such operation", + "(server/object system) undefined ipc method arguments", + "(server/object system) too many arguments to method", + "(server/object system) bad ipc message format", +}; + +static char * err_codes_loader[] = { /* 12 */ + "(server/loader) GENERIC ERROR", + "(server/loader) object file not relocated", + "(server/loader) unknown file type", + "(server/loader) symbol not found", + "(server/loader) symbol multiply defined", + "(server/loader) memory region overlap", +}; + + +static char * err_codes_exception[] = { /* 13 */ + "(server/exception) GENERIC ERROR", + "(server/exception) invalid access", + "(server/exception) invalid instruction", + "(server/exception) arithmetic exception", + "(server/exception) emulation exception", + "(server/exception) software exception", + "(server/exception) breakpoint exception", +}; + +static char * err_codes_ux_signal[] = { /* 14 */ + "(server/unix-signal) GENERIC ERROR", + "(server/unix-signal) hangup", + "(server/unix-signal) interrupt", + "(server/unix-signal) quit", + "(server/unix-signal) undefined", + "(server/unix-signal) undefined", + "(server/unix-signal) undefined", + "(server/unix-signal) undefined", + "(server/unix-signal) kill", + "(server/unix-signal) undefined", + "(server/unix-signal) undefined", + "(server/unix-signal) system error", + "(server/unix-signal) pipe signal", + "(server/unix-signal) alarm", + "(server/unix-signal) terminate", + "(server/unix-signal) urgent i/o", + "(server/unix-signal) stop", + "(server/unix-signal) terminal stop", + "(server/unix-signal) continue", + "(server/unix-signal) child death", + "(server/unix-signal) tty input", + "(server/unix-signal) tty output", + "(server/unix-signal) i/o signal", + "(server/unix-signal) cpu time limit exceeded", + "(server/unix-signal) file size exceeded", + "(server/unix-signal) virtual alarm", + "(server/unix-signal) profile signal", + "(server/unix-signal) window size change", + "(server/unix-signal) user-defined signal 1", + "(server/unix-signal) user-defined signal 2", +}; + +static char * err_codes_xkernel[] = { /* 15 */ + "(server/xkernel) GENERIC ERROR", + "(server/xkernel) map full", + "(server/xkernel) inconsistent bind", + "(server/xkernel) cannot resolve", + "(server/xkernel) cannot unbind", + "(server/xkernel) invalid type", + "(server/xkernel) invalid opcode", + "(server/xkernel) buffer too small", + "(server/xkernel) invalid ev code", + "(server/xkernel) event not registered", + "(server/xkernel) invalid open", + "(server/xkernel) already open", + "(server/xkernel) bad addr", +}; + + +/* err_server subsystems */ +static struct error_subsystem err_server_sub[] = { + /* server/0; */ + { + "(server/netname)", + errlib_count(err_codes_netname), + err_codes_netname, + }, + /* server/1; */ + { + "(server/env_mgr)", + errlib_count(err_codes_env_mgr), + err_codes_env_mgr, + }, + /* server/2; */ + { + "(server/execd)", + errlib_count(err_codes_execd), + err_codes_execd, + }, + /* server/3; */ + { + "(server/netmemory)", + errlib_count(err_codes_netmemory), + err_codes_netmemory, + }, + /* server/4; */ + { + "(server/ufs)", + errlib_count(err_codes_ufs), + err_codes_ufs, + }, + /* server/5; */ + { + "(server/task_master)", + errlib_count(err_codes_task_master), + err_codes_task_master, + }, + /* server/6; */ + { + "(server/ns)", + errlib_count(err_codes_ns), + err_codes_ns, + }, + + /* server/7; i/o subsystem */ + { + "(server/io)", + errlib_count(err_codes_io), + err_codes_io, + }, + + /* server/8; authentication server */ + { + "(server/auth)", + errlib_count(err_codes_auth), + err_codes_auth, + }, + + /* server/9; generic US system */ + { + "(server/us)", + errlib_count(err_codes_us), + err_codes_us, + }, + + /* server/10; SUN RPC package */ + { + "(server/sunrpc)", + errlib_count(err_codes_sunrpc), + err_codes_sunrpc, + }, + + /* server/11; MachObject system */ + { + "(server/object system)", + errlib_count(err_codes_machobj), + err_codes_machobj, + }, + + /* server/12; loader */ + { + "(server/loader)", + errlib_count(err_codes_loader), + err_codes_loader, + }, + + /* server/13; mach exception */ + { + "(server/exception)", + errlib_count(err_codes_exception), + err_codes_exception, + }, + + /* server/14; unix signal */ + { + "(server/unix-signal)", + errlib_count(err_codes_ux_signal), + err_codes_ux_signal, + }, + + /* server/15; xkernel */ + { + "(server/xkernel)", + errlib_count(err_codes_xkernel), + err_codes_xkernel, + }, + +}; + diff -ruN glibc-1.06/mach/err_us.sub glibc-1.07/mach/err_us.sub --- glibc-1.06/mach/err_us.sub +++ glibc-1.07/mach/err_us.sub Tue Nov 23 16:14:05 1993 @@ -0,0 +1,53 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: err_us.sub,v $ + * Revision 2.2 92/01/16 00:10:45 rpd + * Moved from user collection to mk collection. + * + * Revision 2.2 91/03/27 16:06:06 mrt + * First checkin + * + */ +/* + * File: err_us.sub + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar, 1988 + * + * A place to define User errors + */ + + +/* err_us subsystems */ +static struct error_subsystem err_us_sub[] = { + {0,0,0} +}; + + + + + diff -ruN glibc-1.06/mach/error_compat.c glibc-1.07/mach/error_compat.c --- glibc-1.06/mach/error_compat.c +++ glibc-1.07/mach/error_compat.c Tue Nov 30 12:35:24 1993 @@ -0,0 +1,67 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +/* This file was broken out from: + $Log: mach_error_string.c,v $ + Revision 2.3 92/04/01 19:38:18 rpd + The static do_compat function is renamed to be globally accessible. + */ + +#include +#include +#include + + +void +__mach_error_map_compat( org_err ) + mach_error_t * org_err; +{ + mach_error_t err = *org_err; + + /* + * map old error numbers to + * to new error sys & subsystem + */ + + if ((-200 < err) && (err <= -100)) + err = -(err + 100) | IPC_SEND_MOD; + else if ((-300 < err) && (err <= -200)) + err = -(err + 200) | IPC_RCV_MOD; + else if ((-400 < err) && (err <= -300)) + err = -(err + 300) | MACH_IPC_MIG_MOD; + else if ((1000 <= err) && (err < 1100)) + err = (err - 1000) | SERV_NETNAME_MOD; + else if ((1600 <= err) && (err < 1700)) + err = (err - 1600) | SERV_ENV_MOD; + else if ((27600 <= err) && (err < 27700)) + err = (err - 27600) | SERV_EXECD_MOD; + else if ((2500 <= err) && (err < 2600)) + err = (err - 2500) | KERN_DEVICE_MOD; + else if ((5000 <= err) && (err < 5100)) + err = (err - 5000) | BOOTSTRAP_FS_MOD; + + *org_err = err; +} diff -ruN glibc-1.06/mach/errorlib.h glibc-1.07/mach/errorlib.h --- glibc-1.06/mach/errorlib.h +++ glibc-1.07/mach/errorlib.h Fri Dec 17 16:56:16 1993 @@ -0,0 +1,84 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: errorlib.h,v $ + * Revision 2.3 92/03/31 15:18:52 rpd + * Added KERN_DEVICE_MOD for device errors. + * [92/03/09 rpd] + * + * Revision 2.2 92/01/16 00:21:17 rpd + * Moved from user collection to mk collection. + * + * Revision 2.2 91/03/27 15:37:37 mrt + * First checkin + * + */ +/* + * File: errorlib.h + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar. 1988 + * + * Error bases for subsytems errors. + */ + +#include + +#define KERN_DEVICE_MOD (err_kern|err_sub(1)) + +#define BOOTSTRAP_FS_MOD (err_bootstrap|err_sub(0)) + +#define MACH_IPC_SEND_MOD (err_mach_ipc|err_sub(0)) +#define MACH_IPC_RCV_MOD (err_mach_ipc|err_sub(1)) +#define MACH_IPC_MIG_MOD (err_mach_ipc|err_sub(2)) + +#define IPC_SEND_MOD (err_ipc|err_sub(0)) +#define IPC_RCV_MOD (err_ipc|err_sub(1)) +#define IPC_MIG_MOD (err_ipc|err_sub(2)) + +#define SERV_NETNAME_MOD (err_server|err_sub(0)) +#define SERV_ENV_MOD (err_server|err_sub(1)) +#define SERV_EXECD_MOD (err_server|err_sub(2)) + + +#define NO_SUCH_ERROR "unknown error code" + +struct error_subsystem { + const char * subsys_name; + int max_code; + const char * const * codes; +}; + +struct error_system { + int max_sub; + const char * bad_sub; + const struct error_subsystem * subsystem; +}; + +#define errors __mach_error_systems +extern struct error_system errors[err_max_system+1]; + +#define errlib_count(s) (sizeof(s)/sizeof(s[0])) diff -ruN glibc-1.06/mach/errsystems.c glibc-1.07/mach/errsystems.c --- glibc-1.06/mach/errsystems.c +++ glibc-1.07/mach/errsystems.c Fri Dec 17 17:37:08 1993 @@ -0,0 +1,27 @@ +/* XXX temp kludge: this file should be generated, but a gcc bug screws it. */ + +#include +#include +#define static static const +#include "../sysdeps/mach/hurd/err_hurd.sub" +#include "err_us.sub" +#include "err_server.sub" +#include "err_mach_ipc.sub" +#include "err_kern.sub" +#include "err_ipc.sub" +#include "err_bootstrap.sub" + + +const struct error_system __mach_error_systems[err_max_system + 1] = + { + /* 0 [err_get_system (err_kern)] = */ { errlib_count (err_kern_sub),"(system kern) error with unknown subsystem", err_kern_sub }, + /* 1 [err_get_system (err_us)] = */ { errlib_count (err_us_sub),"(system us) error with unknown subsystem", err_us_sub }, + /* 2 [err_get_system (err_server)] = */ { errlib_count (err_server_sub),"(system server) error with unknown subsystem", err_server_sub }, + /* 3 [err_get_system (err_ipc)] = */ { errlib_count (err_ipc_sub),"(system ipc) error with unknown subsystem", err_ipc_sub }, + /* 4 [err_get_system (err_mach_ipc)] = */ { errlib_count (err_mach_ipc_sub),"(system mach_ipc) error with unknown subsystem", err_mach_ipc_sub }, + /* 5 [err_get_system (err_bootstrap)] = */ { errlib_count (err_bootstrap_sub),"(system bootstrap) error with unknown subsystem", err_bootstrap_sub }, + /* [6..15] */ {},{},{},{},{},{},{},{},{},{}, + /* 16==0x10 [err_get_system (err_hurd)] = */ { errlib_count (err_hurd_sub),"(system hurd) error with unknown subsystem", err_hurd_sub }, + }; + +const int __mach_error_system_count = errlib_count (__mach_error_systems); diff -ruN glibc-1.06/mach/hello.c glibc-1.07/mach/hello.c --- glibc-1.06/mach/hello.c Sun Oct 25 03:17:04 1992 +++ glibc-1.07/mach/hello.c Mon Sep 6 23:37:42 1993 @@ -1,6 +1,6 @@ /* "Hello world" program for GNU C Library on bare Mach 3.0. -Copyright (C) 1991, 1992 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1993 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 @@ -23,8 +23,6 @@ #include #include -extern FILE *mach_open_devstream (device_t dev); - int main (void) { @@ -40,7 +38,7 @@ if (err) _exit (err); - consf = mach_open_devstream (consdev); + consf = mach_open_devstream (consdev, "w"); if (consf == NULL) exit (errno); diff -ruN glibc-1.06/mach/mach/default_pager_types.defs glibc-1.07/mach/mach/default_pager_types.defs --- glibc-1.06/mach/mach/default_pager_types.defs +++ glibc-1.07/mach/mach/default_pager_types.defs Mon Oct 18 08:02:01 1993 @@ -0,0 +1,60 @@ +/* + * Mach Operating System + * Copyright (c) 1992 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: default_pager_types.defs,v $ + * Revision 2.4 93/01/14 17:09:40 danner + * 64bit cleanup. + * [92/12/10 14:39:41 af] + * + * Revision 2.3 92/02/20 13:42:45 elf + * Added filename types. + * [92/02/19 17:34:54 af] + * + * Revision 2.2 92/01/14 16:59:18 rpd + * Created. + * [92/01/13 rpd] + * + */ + +#ifndef _MACH_DEFAULT_PAGER_TYPES_DEFS_ +#define _MACH_DEFAULT_PAGER_TYPES_DEFS_ + +#include + +type default_pager_info_t = struct[3] of natural_t; + +type default_pager_object_t = struct[2] of natural_t; +type default_pager_object_array_t = array[] of default_pager_object_t; + +type default_pager_page_t = struct[1] of natural_t; +type default_pager_page_array_t = array[] of default_pager_page_t; + +type default_pager_filename_t = (MACH_MSG_TYPE_STRING_C, 8*256); + +import ; + +#endif _MACH_DEFAULT_PAGER_TYPES_DEFS_ diff -ruN glibc-1.06/mach/mach/default_pager_types.h glibc-1.07/mach/mach/default_pager_types.h --- glibc-1.06/mach/mach/default_pager_types.h +++ glibc-1.07/mach/mach/default_pager_types.h Mon Oct 18 08:02:01 1993 @@ -0,0 +1,70 @@ +/* + * Mach Operating System + * Copyright (c) 1992 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: default_pager_types.h,v $ + * Revision 2.3 92/02/20 13:42:48 elf + * Added filename types. + * [92/02/19 17:34:33 af] + * + * Revision 2.2 92/01/14 16:59:20 rpd + * Created. + * [92/01/13 rpd] + * + */ + +#ifndef _MACH_DEFAULT_PAGER_TYPES_H_ +#define _MACH_DEFAULT_PAGER_TYPES_H_ + +/* + * Remember to update the mig type definitions + * in default_pager_types.defs when adding/removing fields. + */ + +typedef struct default_pager_info { + vm_size_t dpi_total_space; /* size of backing store */ + vm_size_t dpi_free_space; /* how much of it is unused */ + vm_size_t dpi_page_size; /* the pager's vm page size */ +} default_pager_info_t; + + +typedef struct default_pager_object { + vm_offset_t dpo_object; /* object managed by the pager */ + vm_size_t dpo_size; /* backing store used for the object */ +} default_pager_object_t; + +typedef default_pager_object_t *default_pager_object_array_t; + + +typedef struct default_pager_page { + vm_offset_t dpp_offset; /* offset of the page in its object */ +} default_pager_page_t; + +typedef default_pager_page_t *default_pager_page_array_t; + +typedef char default_pager_filename_t[256]; + +#endif _MACH_DEFAULT_PAGER_TYPES_H_ diff -ruN glibc-1.06/mach/mach/error.h glibc-1.07/mach/mach/error.h --- glibc-1.06/mach/mach/error.h +++ glibc-1.07/mach/mach/error.h Fri Dec 17 16:40:28 1993 @@ -0,0 +1,137 @@ +/* err_hurd added by roland@gnu.ai.mit.edu for GNU Hurd. + * + * Mach Operating System + * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: error.h,v $ + * Revision 2.6 93/01/14 17:41:31 danner + * Standardized include symbol name. + * [92/06/10 pds] + * + * Revision 2.5 92/03/31 15:18:11 rpd + * Added err_bootstrap for bootstrap errors. + * [92/03/09 rpd] + * + * Revision 2.4 91/05/14 16:51:24 mrt + * Correcting copyright + * + * Revision 2.3 91/02/05 17:31:48 mrt + * Changed to new Mach copyright + * [91/02/01 17:16:50 mrt] + * + * Revision 2.2 90/06/02 14:57:47 rpd + * Added err_mach_ipc for new IPC. + * [90/03/26 22:28:42 rpd] + * + * Revision 2.1 89/08/03 16:02:07 rwd + * Created. + * + * Revision 2.4 89/02/25 18:13:18 gm0w + * Changes for cleanup. + * + * Revision 2.3 89/02/07 00:51:57 mwyoung + * Relocated from sys/error.h + * + * Revision 2.2 88/10/18 00:37:31 mwyoung + * Added {system,sub and code}_emask + * [88/10/17 17:06:58 mrt] + * + * Added {system,sub and code}_emask + * + * 12-May-88 Mary Thompson (mrt) at Carnegie Mellon + * Changed mach_error_t from unsigned int to kern_return_t + * which is a 32 bit integer regardless of machine type. + * insigned int was incompatible with old usages of mach_error. + * + * 10-May-88 Douglas Orr (dorr) at Carnegie-Mellon University + * Missing endif replaced + * + * 5-May-88 Mary Thompson (mrt) at Carnegie Mellon + * Changed typedef of mach_error_t from long to unsigned int + * to keep our Camelot users happy. Also moved the nonkernel + * function declarations from here to mach_error.h. + * + * 10-Feb-88 Douglas Orr (dorr) at Carnegie-Mellon University + * Created. + * + */ +/* + * File: mach/error.h + * Purpose: + * error module definitions + * + */ + +#ifndef _MACH_ERROR_H_ +#define _MACH_ERROR_H_ +#include + +/* + * error number layout as follows: + * + * hi lo + * | system(6) | subsystem(12) | code(14) | + */ + + +#define err_none (mach_error_t)0 +#define ERR_SUCCESS (mach_error_t)0 +#define ERR_ROUTINE_NIL (mach_error_fn_t)0 + + +#define err_system(x) (((x)&0x3f)<<26) +#define err_sub(x) (((x)&0xfff)<<14) + +#define err_get_system(err) (((err)>>26)&0x3f) +#define err_get_sub(err) (((err)>>14)&0xfff) +#define err_get_code(err) ((err)&0x3fff) + +#define system_emask (err_system(0x3f)) +#define sub_emask (err_sub(0xfff)) +#define code_emask (0x3fff) + + +/* major error systems */ +#define err_kern err_system(0x0) /* kernel */ +#define err_us err_system(0x1) /* user space library */ +#define err_server err_system(0x2) /* user space servers */ +#define err_ipc err_system(0x3) /* old ipc errors */ +#define err_mach_ipc err_system(0x4) /* mach-ipc errors */ +#define err_bootstrap err_system(0x5) /* bootstrap errors */ +#define err_hurd err_system(0x10) /* GNU Hurd server errors */ +#define err_local err_system(0x3e) /* user defined errors */ +#define err_ipc_compat err_system(0x3f) /* (compatibility) mach-ipc errors */ + +#define err_max_system 0x3f + + +/* unix errors get lumped into one subsystem */ +#define unix_err(errno) (err_kern|err_sub(3)|errno) + +typedef kern_return_t mach_error_t; +typedef mach_error_t (* mach_error_fn_t)(); + +#endif /* _MACH_ERROR_H_ */ diff -ruN glibc-1.06/mach/mach/mach.h glibc-1.07/mach/mach/mach.h --- glibc-1.06/mach/mach/mach.h +++ glibc-1.07/mach/mach/mach.h Mon Aug 16 17:08:50 1993 @@ -0,0 +1,3 @@ +/* Some old programs may expect to find in . */ + +#include diff -ruN glibc-1.06/mach/mach/mig_support.h glibc-1.07/mach/mach/mig_support.h --- glibc-1.06/mach/mach/mig_support.h +++ glibc-1.07/mach/mach/mig_support.h Sat Oct 30 15:12:11 1993 @@ -0,0 +1,65 @@ +/* Copyright (C) 1993 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. */ + +/* Useful declarations and support functions for MiG-generated stubs. */ + +#ifndef _MACH_MIG_SUPPORT_H + +#define _MACH_MIG_SUPPORT_H 1 + +#include +#include +#include +#include + +/* MiG initialization. */ +extern void __mig_init (void *__first); +extern void mig_init (void *__first); + +/* Shorthand functions for vm_allocate and vm_deallocate on + mach_task_self () (and with ANYWHERE=1). */ +extern void __mig_allocate (vm_address_t *__addr_p, vm_size_t __size); +extern void mig_allocate (vm_address_t *__addr_p, vm_size_t __size); +extern void __mig_deallocate (vm_address_t __addr, vm_size_t __size); +extern void mig_deallocate (vm_address_t __addr, vm_size_t __size); + +/* Reply-port management support functions. */ +extern void __mig_dealloc_reply_port (void); +extern void mig_dealloc_reply_port (void); +extern mach_port_t __mig_get_reply_port (void); +extern mach_port_t mig_get_reply_port (void); +extern void __mig_reply_setup (const mach_msg_header_t *__request, + mach_msg_header_t *__reply); +extern void mig_reply_setup (const mach_msg_header_t *__request, + mach_msg_header_t *__reply); + +/* Idiocy support function. */ +extern __inline vm_size_t +__mig_strncpy (char *__dst, const char *__src, vm_size_t __len) +{ + return __stpncpy (__dst, __src, __len) - __dst; +} +extern __inline vm_size_t +mig_strncpy (char *__dst, const char *__src, vm_size_t __len) +{ + return __mig_strncpy (__dst, __src, __len); +} + + + +#endif /* mach/mig_support.h */ diff -ruN glibc-1.06/mach/mach.h glibc-1.07/mach/mach.h --- glibc-1.06/mach/mach.h Wed Mar 17 19:19:35 1993 +++ glibc-1.07/mach/mach.h Fri Dec 3 17:32:26 1993 @@ -27,8 +27,11 @@ /* This declares the basic variables and macros everything needs. */ #include +/* This declares all the real system call functions. */ +#include + /* These are MiG-generated headers for the kernel interfaces commonly used. */ -#include +#include /* From . */ #include #include @@ -36,5 +39,43 @@ the MiG-generated header in fact declares `CALL_rpc' rather than `CALL'. This file declares the simple `CALL' functions. */ #include + + +/* Receive RPC request messages on RCV_NAME and pass them to DEMUX, which + decodes them and produces reply messages. MAX_SIZE is the maximum size + (in bytes) of the request and reply buffers. */ +extern mach_msg_return_t +__mach_msg_server (boolean_t (*__demux) (mach_msg_header_t *__request, + mach_msg_header_t *__reply), + mach_msg_size_t __max_size, + mach_port_t __rcv_name), +mach_msg_server (boolean_t (*__demux) (mach_msg_header_t *__request, + mach_msg_header_t *__reply), + mach_msg_size_t __max_size, + mach_port_t __rcv_name); + +/* Just like `mach_msg_server', but the OPTION and TIMEOUT parameters are + passed on to `mach_msg'. */ +extern mach_msg_return_t +__mach_msg_server_timeout (boolean_t (*__demux) (mach_msg_header_t *__request, + mach_msg_header_t *__reply), + mach_msg_size_t __max_size, + mach_port_t __rcv_name, + mach_msg_option_t __option, + mach_msg_timeout_t __timeout), +mach_msg_server_timeout (boolean_t (*__demux) (mach_msg_header_t *__request, + mach_msg_header_t *__reply), + mach_msg_size_t __max_size, + mach_port_t __rcv_name, + mach_msg_option_t __option, + mach_msg_timeout_t __timeout); + + +#define __need_FILE +#include + +/* Open a stream on a Mach device. */ +extern FILE *mach_open_devstream (mach_port_t device_port, const char *mode); + #endif /* mach.h */ diff -ruN glibc-1.06/mach/mach_error.c glibc-1.07/mach/mach_error.c --- glibc-1.06/mach/mach_error.c +++ glibc-1.07/mach/mach_error.c Tue Oct 6 14:29:54 1992 @@ -0,0 +1,82 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: mach_error.c,v $ + * Revision 2.4 92/02/19 15:10:52 elf + * Moved mach_error_string and mach_error_type to mach_error_string.c. + * [92/02/11 rpd] + * + * Revision 2.3 92/01/23 15:22:06 rpd + * Changed to . + * [92/01/16 rpd] + * + * Revision 2.2 92/01/16 00:08:03 rpd + * Moved from user collection to mk collection. + * + * Revision 2.3 91/08/29 15:51:50 rpd + * Changed IPC_MIG_MOD to MACH_IPC_MIG_MOD, to get the new error strings. + * [91/08/22 rpd] + * + * Revision 2.2 91/03/27 16:06:29 mrt + * Changed include of "errorlib.h" to + * Added new copyright + * [91/03/20 mrt] + * + */ +/* + * File: mach_error.c + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar 1988 + * + * interprets structured mach error codes and prints + * or returns a descriptive string. + */ + +#include +#include +#include + +extern char * mach_error_string_int(); + +void +mach_error( str, err ) + char *str; + mach_error_t err; +{ + char * err_str; + char buf[1024]; + boolean_t diag; + + err_str=mach_error_string_int(err, &diag); + + if ( diag ) { + sprintf( buf, "%s %s (%x)", mach_error_type(err), err_str, err ); + err_str = buf; + } + + fprintf(stderr, "%s %s\n", str, err_str); +} diff -ruN glibc-1.06/mach/mach_error.h glibc-1.07/mach/mach_error.h --- glibc-1.06/mach/mach_error.h +++ glibc-1.07/mach/mach_error.h Tue Nov 23 15:39:08 1993 @@ -0,0 +1,77 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: mach_error.h,v $ + * Revision 2.2 92/01/16 00:08:10 rpd + * Moved from user collection to mk collection. + * + * Revision 2.2 91/03/27 15:39:13 mrt + * First checkin + * + */ +/* + * File: mach_error.h + * Author: Douglas Orr, Carnegie Mellon University + * Date: Mar. 1988 + * + * Definitions of routines in mach_error.c + */ + +#ifndef _MACH_ERROR_ +#define _MACH_ERROR_ 1 + +#include + +const char *mach_error_string( +/* + * Returns a string appropriate to the error argument given + */ +#if c_plusplus + mach_error_t error_value +#endif c_plusplus + ); + +void mach_error( +/* + * Prints an appropriate message on the standard error stream + */ +#if c_plusplus + char *str, + mach_error_t error_value +#endif c_plusplus + ); + +const char *mach_error_type( +/* + * Returns a string with the error system, subsystem and code +*/ +#if c_plusplus + mach_error_t error_value +#endif c_plusplus + ); + +#endif _MACH_ERROR_ diff -ruN glibc-1.06/mach/mach_error_string.c glibc-1.07/mach/mach_error_string.c --- glibc-1.06/mach/mach_error_string.c +++ glibc-1.07/mach/mach_error_string.c Tue Nov 30 12:35:58 1993 @@ -0,0 +1,97 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990,1989 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: mach_error_string.c,v $ + * Revision 2.3 92/04/01 19:38:18 rpd + * Updated do_compat for kernel device errors, + * bootstrap file-system errors. + * [92/03/09 rpd] + * + * Revision 2.2 92/02/20 15:58:08 elf + * Created from mach_error.c. + * [92/02/11 rpd] + * + */ + +#define EXPORT_BOOLEAN +#include +#include +#include +#include + +extern void __mach_error_map_compat (mach_error_t *); + +const char * +mach_error_type( err ) + mach_error_t err; +{ + int sub, system; + + __mach_error_map_compat( &err ); + + sub = err_get_sub(err); + system = err_get_system(err); + + if (system > err_max_system + || sub >= errors[system].max_sub ) return( "(?/?)" ); + return( errors[system].subsystem[sub].subsys_name ); +} + +boolean_t mach_error_full_diag = FALSE; + +const char * +mach_error_string_int( err, diag ) + mach_error_t err; + boolean_t * diag; +{ + int sub, system, code; + + __mach_error_map_compat( &err ); + + sub = err_get_sub(err); + system = err_get_system(err); + code = err_get_code(err); + + *diag = TRUE; + + if (system > err_max_system) return( "(?/?) unknown error system" ); + if (sub >= errors[system].max_sub) return( errors[system].bad_sub ); + if (code >= errors[system].subsystem[sub].max_code) return ( NO_SUCH_ERROR ); + + *diag = mach_error_full_diag; + return( errors[system].subsystem[sub].codes[code] ); +} + +const char * +mach_error_string( err ) + mach_error_t err; +{ + boolean_t diag; + + return mach_error_string_int( err, &diag ); + +} diff -ruN glibc-1.06/mach/mach_init.c glibc-1.07/mach/mach_init.c --- glibc-1.06/mach/mach_init.c Thu Sep 10 19:55:32 1992 +++ glibc-1.07/mach/mach_init.c Tue Aug 3 02:08:17 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ Cambridge, MA 02139, USA. */ #include +#include extern void __mig_init (int); diff -ruN glibc-1.06/mach/shortcut.awk glibc-1.07/mach/shortcut.awk --- glibc-1.06/mach/shortcut.awk Fri Apr 3 01:39:38 1992 +++ glibc-1.07/mach/shortcut.awk Wed Jun 30 21:56:19 1993 @@ -1,9 +1,14 @@ # Icky intimate knowledge of MiG output. -BEGIN { args=""; argsnext=0; echo=1; - print "/* This file is generated by shortcut.awk. */"; +BEGIN { print "/* This file is generated by shortcut.awk. */"; + echo=1; + inproto=0; proto=""; arglist=""; } +# $1 == "LINTLIBRARY" { print "#include "; next } + +# Copy the first line of the definition, but +# replace the function name (RPC) with CALL. $NF == rpc \ { for (i = 1; i < NF; ++i) printf "%s ", $i; @@ -11,24 +16,28 @@ next; } -args == "" && $1 == "#else" { argsnext=1; print $0; next; } - -argsnext == 1 { args=$0; } - -{ argsnext=0; } +# Collect the lines of the prototype in PROTO, and extract the parameter +# names into ARGLIST. +NF == 1 && $1 == ")" { inproto=0 } +inproto { proto = proto $0; + arg = $NF; + gsub(/[^a-zA-Z0-9_,]/, "", arg); + arglist = arglist arg; + } +NF == 1 && $1 == "(" { inproto=1 } -/^{/ { echo=0; } +/^{$/ { echo=0; } echo == 1 { print $0; } -/^}/ \ +/^}$/ \ { print "{"; print " kern_return_t err;"; - print " extern kern_return_t " syscall " ();"; - print " err = " syscall args ";"; + print " extern kern_return_t " syscall " (" proto ");"; + print " err = " syscall " (" arglist ");"; print " if (err == MACH_SEND_INTERRUPTED)"; - print " err = " rpc args ";"; + print " err = " rpc " (" arglist ");"; print " return err;" print "}"; echo = 1; diff -ruN glibc-1.06/malloc/Makefile glibc-1.07/malloc/Makefile --- glibc-1.06/malloc/Makefile Fri May 14 20:30:33 1993 +++ glibc-1.07/malloc/Makefile Mon Jan 17 23:08:56 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -25,6 +25,7 @@ dist-headers := malloc.h headers := $(dist-headers) obstack.h +tests := mallocbug # Things which get pasted together into gmalloc.c. gmalloc-routines := malloc free cfree realloc calloc morecore memalign valloc @@ -53,13 +54,13 @@ gmalloc-head.c mtrace.awk %.uu: % uuencode $< < $< > $@-tmp - mv $@-tmp $@ + mv -f $@-tmp $@ %.Z: % compress -c $< > $@-tmp - mv $@-tmp $@ -%.z: % - gzip -9 -c $< > $@-tmp - mv $@-tmp $@ + mv -f $@-tmp $@ +%.gz: % + gzip -9 -v -c $< > $@-tmp + mv -f $@-tmp $@ malloc.tar: $(addprefix malloc/,$(malloc-dist)) tar cho$(verbose)f $@ $^ @@ -68,7 +69,7 @@ changelog-extract --regexp 'malloc/.*' < $< > $@.new (echo ''; echo 'Find older changes in OChangeLog.') >> $@.new chmod a-w $@.new - mv $@.new $@ + mv -f $@.new $@ malloc/Makefile: dist-Makefile Makefile sed -e 's,,$(addsuffix .c,$(gmalloc-routines)),' \ @@ -95,3 +96,5 @@ $(objpfx)libmcheck.a: $(objpfx)mcheck-init.o -rm -f $@ ln $< $@ + +lib: $(objpfx)libmcheck.a diff -ruN glibc-1.06/malloc/TAGS glibc-1.07/malloc/TAGS --- glibc-1.06/malloc/TAGS Sun May 23 00:31:26 1993 +++ glibc-1.07/malloc/TAGS Tue Dec 21 04:15:13 1993 @@ -1,12 +1,14 @@ -malloc.c,138 +malloc.c,174 #define _MALLOC_INTERNAL24,1003 __ptr_t 29,1094 -__ptr_t 32,1200 align 66,1958 initialize 91,2483 morecore 110,3027 malloc 150,4063 +_malloc 335,9777 +_free 342,9844 +_realloc 349,9901 free.c,72 #define _MALLOC_INTERNAL24,1016 @@ -18,21 +20,22 @@ DEFUN(cfree,32,1024 cfree 37,1075 -realloc.c,88 +realloc.c,116 #define _MALLOC_INTERNAL24,1035 -#define min(28,1088 -__ptr_t 31,1166 -realloc 40,1592 +safe_bcopy 38,1381 +#define memmove(91,2759 +#define min(96,2835 +__ptr_t 99,2913 calloc.c,48 #define _MALLOC_INTERNAL22,933 calloc 29,1104 -../sysdeps/unix/morecore.c,104 -#define _MALLOC_INTERNAL19,807 -#define __sbrk 24,884 -#define NULL 30,971 -__default_morecore 37,1160 +../sysdeps/unix/morecore.c,105 +#define _MALLOC_INTERNAL19,813 +#define __sbrk 24,890 +#define NULL 34,1137 +__default_morecore 41,1326 ../sysdeps/stub/morecore.c,66 #define _MALLOC_INTERNAL23,893 @@ -43,13 +46,13 @@ DEFUN(__default_morecore,32,1139 memalign.c,49 -#define _MALLOC_INTERNAL19,801 -memalign 24,862 +#define _MALLOC_INTERNAL19,807 +memalign 24,868 -valloc.c,80 -#define _MALLOC_INTERNAL23,978 -#define __getpagesize(35,1202 -valloc 41,1282 +valloc.c,81 +#define __getpagesize(28,1118 +#define _MALLOC_INTERNAL32,1190 +valloc 39,1276 mcheck.c,248 #define _MALLOC_INTERNAL24,1014 @@ -62,134 +65,138 @@ freehook 57,1865 mallochook 70,2113 reallochook 89,2523 -mcheck 112,3055 +mcheck 113,3081 mtrace.c,184 #define _MALLOC_INTERNAL25,1075 -static __ptr_t 46,1544 -static __ptr_t 47,1602 -tr_break 56,1944 -tr_freehook 62,2014 -tr_mallochook 75,2306 -tr_reallochook 95,2700 -mtrace 129,3568 +static __ptr_t 46,1497 +static __ptr_t 47,1555 +tr_break 56,1897 +tr_freehook 62,1967 +tr_mallochook 75,2259 +tr_reallochook 95,2654 +mtrace 129,3524 mstats.c,49 #define _MALLOC_INTERNAL24,1016 mstats 29,1083 -vm-limit.c,147 -typedef size_t SIZE;29,966 -typedef void *POINTER;30,987 -#define EXCEEDS_LISP_PTR(31,1010 -check_memory_limits 52,1478 -memory_warnings 121,3135 - -ralloc.c,686 -typedef void *POINTER;39,1353 -typedef char *POINTER;46,1432 -typedef unsigned long SIZE;50,1464 -typedef size_t SIZE;62,1676 -typedef void *POINTER;63,1697 -#define safe_bcopy(69,1782 -#define NIL 73,1851 -#define PAGE 108,3135 -#define ALIGNED(109,3165 -#define ROUNDUP(110,3236 -#define ROUND_TO_PAGE(111,3319 -obtain 122,3744 -get_more_space 148,4283 -relinquish 162,4565 -typedef struct bp193,5550 -} *bloc_ptr;200,5658 -#define NIL_BLOC 202,5672 -#define BLOC_PTR_SIZE 203,5704 -find_bloc 212,5950 -get_bloc 233,6346 -relocate_some_blocs 275,7232 -free_bloc 301,7795 -r_alloc_sbrk 345,8869 -r_alloc 401,10496 -r_alloc_free 426,10930 -r_re_alloc 450,11519 -r_alloc_init 485,12297 +vm-limit.c,149 +typedef size_t SIZE;30,1065 +typedef void *POINTER;31,1086 +#define EXCEEDS_LISP_PTR(32,1109 +check_memory_limits 53,1577 +memory_warnings 122,3254 + +ralloc.c,717 +typedef void *POINTER;41,1504 +typedef char *POINTER;48,1583 +typedef char *POINTER;54,1674 +typedef unsigned long SIZE;56,1698 +typedef size_t SIZE;68,1910 +typedef void *POINTER;69,1931 +#define safe_bcopy(75,2016 +#define NIL 79,2085 +#define PAGE 114,3369 +#define ALIGNED(115,3399 +#define ROUNDUP(116,3475 +#define ROUND_TO_PAGE(118,3574 +obtain 129,3999 +get_more_space 155,4538 +relinquish 169,4820 +typedef struct bp200,5805 +} *bloc_ptr;207,5913 +#define NIL_BLOC 209,5927 +#define BLOC_PTR_SIZE 210,5959 +find_bloc 219,6205 +get_bloc 240,6601 +relocate_some_blocs 282,7487 +free_bloc 308,8050 +r_alloc_sbrk 352,9124 +r_alloc 411,10938 +r_alloc_free 436,11372 +r_re_alloc 460,11961 +r_alloc_init 495,12740 obstack.c,677 -#define POINTER 38,1574 -#define POINTER 40,1603 -struct fooalign 44,1670 -#define DEFAULT_ALIGNMENT 45,1707 -union fooround 50,2015 -#define DEFAULT_ROUNDING 51,2051 -#define COPYING_UNIT 58,2356 -#define CALL_CHUNKFUN(72,2869 -#define CALL_FREEFUN(77,3012 -_obstack_begin 92,3465 -_obstack_begin_1 136,4896 -_obstack_newchunk 188,6651 -_obstack_allocated_p 249,8752 -_obstack_free 277,9611 -obstack_free 311,10602 -int (obstack_object_size)368,12321 -int (obstack_room)374,12432 -void (obstack_grow)380,12529 -void (obstack_grow0)388,12693 -void (obstack_1grow)396,12859 -void (obstack_blank)403,12994 -void (obstack_1grow_fast)410,13120 -void (obstack_blank_fast)417,13265 +#define POINTER 39,1673 +#define POINTER 41,1702 +struct fooalign 45,1769 +#define DEFAULT_ALIGNMENT 46,1806 +union fooround 51,2114 +#define DEFAULT_ROUNDING 52,2150 +#define COPYING_UNIT 59,2455 +#define CALL_CHUNKFUN(73,2968 +#define CALL_FREEFUN(78,3111 +_obstack_begin 93,3564 +_obstack_begin_1 137,4995 +_obstack_newchunk 189,6750 +_obstack_allocated_p 256,9061 +_obstack_free 284,9920 +obstack_free 318,10911 +int (obstack_object_size)375,12630 +int (obstack_room)381,12741 +void (obstack_grow)387,12838 +void (obstack_grow0)395,13002 +void (obstack_1grow)403,13168 +void (obstack_blank)410,13303 +void (obstack_1grow_fast)417,13429 +void (obstack_blank_fast)424,13574 -malloc.h,27 +malloc.h,101 #define _MALLOC_H 25,1015 - -obstack.h,1734 -#define __OBSTACKS__107,4820 -#define __PTR_TO_INT(114,5048 -#define __INT_TO_PTR(118,5119 -#define __need_ptrdiff_t131,5659 -#define PTR_INT_TYPE 142,5844 -#define PTR_INT_TYPE 144,5881 -struct _obstack_chunk 147,5915 -struct obstack 154,6143 -#define obstack_base(236,9438 -#define obstack_chunk_size(240,9527 -#define obstack_next_free(244,9641 -#define obstack_alignment_mask(248,9767 -#define obstack_init(250,9824 -#define obstack_begin(254,9956 -#define obstack_specify_allocation(258,10100 -#define obstack_specify_allocation_with_arg(262,10281 -#define obstack_1grow_fast(266,10485 -#define obstack_blank_fast(268,10552 -#define __extension__272,10672 -#define obstack_object_size(280,10904 -#define obstack_room(285,11073 -#define obstack_grow(295,11495 -#define obstack_grow0(305,11844 -#define obstack_1grow(316,12235 -#define obstack_ptr_grow(328,12673 -#define obstack_int_grow(336,12978 -#define obstack_ptr_grow_fast(344,13275 -#define obstack_int_grow_fast(345,13359 -#define obstack_blank(347,13439 -#define obstack_alloc(356,13738 -#define obstack_copy(362,13916 -#define obstack_copy0(368,14105 -#define obstack_finish(376,14394 -#define obstack_free(391,14988 -#define obstack_object_size(401,15337 -#define obstack_room(404,15419 -#define obstack_grow(407,15495 -#define obstack_grow0(414,15761 -#define obstack_1grow(422,16070 -#define obstack_ptr_grow(427,16238 -#define obstack_int_grow(432,16482 -#define obstack_ptr_grow_fast(437,16711 -#define obstack_int_grow_fast(438,16795 -#define obstack_blank(440,16875 -#define obstack_alloc(446,17088 -#define obstack_copy(449,17183 -#define obstack_copy0(452,17290 -#define obstack_finish(455,17399 -#define obstack_free(470,17968 -#define obstack_free(477,18305 +#define memset(37,1211 +#define memcpy(40,1277 +#define CHAR_BIT 47,1415 + +obstack.h,1735 +#define __OBSTACKS__108,4919 +#define __PTR_TO_INT(115,5147 +#define __INT_TO_PTR(119,5218 +#define __need_ptrdiff_t132,5758 +#define PTR_INT_TYPE 143,5943 +#define PTR_INT_TYPE 145,5980 +struct _obstack_chunk 148,6014 +struct obstack 155,6242 +#define obstack_base(237,9537 +#define obstack_chunk_size(241,9626 +#define obstack_next_free(245,9740 +#define obstack_alignment_mask(249,9866 +#define obstack_init(251,9923 +#define obstack_begin(255,10055 +#define obstack_specify_allocation(259,10199 +#define obstack_specify_allocation_with_arg(263,10380 +#define obstack_1grow_fast(267,10584 +#define obstack_blank_fast(269,10651 +#define __extension__273,10771 +#define obstack_object_size(281,11003 +#define obstack_room(286,11172 +#define obstack_grow(296,11594 +#define obstack_grow0(306,11943 +#define obstack_1grow(317,12334 +#define obstack_ptr_grow(329,12772 +#define obstack_int_grow(337,13077 +#define obstack_ptr_grow_fast(345,13374 +#define obstack_int_grow_fast(346,13458 +#define obstack_blank(348,13538 +#define obstack_alloc(357,13837 +#define obstack_copy(363,14015 +#define obstack_copy0(369,14204 +#define obstack_finish(377,14493 +#define obstack_free(392,15087 +#define obstack_object_size(402,15436 +#define obstack_room(405,15518 +#define obstack_grow(408,15594 +#define obstack_grow0(415,15860 +#define obstack_1grow(423,16169 +#define obstack_ptr_grow(428,16337 +#define obstack_int_grow(433,16581 +#define obstack_ptr_grow_fast(438,16810 +#define obstack_int_grow_fast(439,16894 +#define obstack_blank(441,16974 +#define obstack_alloc(447,17187 +#define obstack_copy(450,17282 +#define obstack_copy0(453,17389 +#define obstack_finish(456,17498 +#define obstack_free(471,18067 +#define obstack_free(478,18404 diff -ruN glibc-1.06/malloc/getpagesize.h glibc-1.07/malloc/getpagesize.h --- glibc-1.06/malloc/getpagesize.h Sun Mar 14 16:39:55 1993 +++ glibc-1.07/malloc/getpagesize.h Fri Jul 30 18:30:50 1993 @@ -1,8 +1,4 @@ -#ifdef BSD -#ifndef BSD4_1 -#define HAVE_GETPAGESIZE -#endif -#endif +/* Emulate getpagesize on systems that lack it. */ #ifndef HAVE_GETPAGESIZE @@ -29,10 +25,11 @@ #define CLSIZE 1 #endif /* no CLSIZE */ #else /* no NBPG */ +#ifdef NBPC #define getpagesize() NBPC +#endif /* NBPC */ #endif /* no NBPG */ #endif /* no EXEC_PAGESIZE */ #endif /* no _SC_PAGESIZE */ #endif /* not HAVE_GETPAGESIZE */ - diff -ruN glibc-1.06/malloc/malloc.c glibc-1.07/malloc/malloc.c --- glibc-1.06/malloc/malloc.c Fri Mar 26 14:58:38 1993 +++ glibc-1.07/malloc/malloc.c Thu Jul 22 15:04:45 1993 @@ -155,8 +155,17 @@ register size_t i; struct list *next; + /* ANSI C allows `malloc (0)' to either return NULL, or to return a + valid address you can realloc and free (though not dereference). + + It turns out that some extant code (sunrpc, at least Ultrix's version) + expects `malloc (0)' to return non-NULL and breaks otherwise. + Be compatible. */ + +#if 0 if (size == 0) return NULL; +#endif if (__malloc_hook != NULL) return (*__malloc_hook) (size); @@ -168,6 +177,11 @@ if (size < sizeof (struct list)) size = sizeof (struct list); +#ifdef SUNOS_LOCALTIME_BUG + if (size < 16) + size = 16; +#endif + /* Determine the allocation policy based on the request size. */ if (size <= BLOCKSIZE / 2) { @@ -254,7 +268,11 @@ (*__morecore) (0) == ADDRESS (block + lastblocks) && (morecore ((blocks - lastblocks) * BLOCKSIZE)) != NULL) { - _heapinfo[block].free.size = blocks; + /* Which block we are extending (the `final free + block' referred to above) might have changed, if + it got combined with a freed info table. */ + block = _heapinfo[0].free.prev; + _heapinfo[block].free.size += (blocks - lastblocks); _bytes_free += (blocks - lastblocks) * BLOCKSIZE; continue; } @@ -307,3 +325,32 @@ return result; } + +#ifndef _LIBC + +/* On some ANSI C systems, some libc functions call _malloc, _free + and _realloc. Make them use the GNU functions. */ + +__ptr_t +_malloc (size) + size_t size; +{ + return malloc (size); +} + +void +_free (ptr) + __ptr_t ptr; +{ + free (ptr); +} + +__ptr_t +_realloc (ptr, size) + __ptr_t ptr; + size_t size; +{ + return realloc (ptr, size); +} + +#endif diff -ruN glibc-1.06/malloc/malloc.h glibc-1.07/malloc/malloc.h --- glibc-1.06/malloc/malloc.h Fri Mar 26 14:58:35 1993 +++ glibc-1.07/malloc/malloc.h Fri Aug 13 16:53:29 1993 @@ -25,12 +25,31 @@ #define _MALLOC_H 1 #ifdef _MALLOC_INTERNAL -/* Harmless, gets __GNU_LIBRARY__ defined. - We must do this before #defining size_t and ptrdiff_t - because tries to typedef them on some systems. */ -#include + +#ifdef HAVE_CONFIG_H +#include +#endif + +#if defined(_LIBC) || defined(STDC_HEADERS) || defined(USG) +#include +#else +#ifndef memset +#define memset(s, zero, n) bzero ((s), (n)) +#endif +#ifndef memcpy +#define memcpy(d, s, n) bcopy ((s), (d), (n)) +#endif +#endif + +#if defined(__GNU_LIBRARY__) || defined(__STDC__) +#include +#else +#define CHAR_BIT 8 #endif +#endif /* _MALLOC_INTERNAL. */ + + #ifdef __cplusplus extern "C" { @@ -50,10 +69,6 @@ #define __ptr_t char * #endif /* C++ or ANSI C. */ -#ifndef NULL -#define NULL 0 -#endif - #ifdef __STDC__ #include #else @@ -63,6 +78,10 @@ #define ptrdiff_t int #endif +#ifndef NULL +#define NULL 0 +#endif + /* Allocate SIZE bytes of memory. */ extern __ptr_t malloc __P ((size_t __size)); @@ -83,31 +102,6 @@ #ifdef _MALLOC_INTERNAL -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#if defined(__GNU_LIBRARY__) || defined(STDC_HEADERS) || defined(USG) -#include -#else -#ifndef memset -#define memset(s, zero, n) bzero ((s), (n)) -#endif -#ifndef memcpy -#define memcpy(d, s, n) bcopy ((s), (d), (n)) -#endif -#ifndef memmove -#define memmove(d, s, n) bcopy ((s), (d), (n)) -#endif -#endif - - -#if defined(__GNU_LIBRARY__) || defined(__STDC__) -#include -#else -#define CHAR_BIT 8 -#endif - /* The allocator divides the heap into blocks of fixed size; large requests receive one or more whole blocks, and small requests receive a fragment of a block. Fragment sizes are powers of two, @@ -242,7 +236,7 @@ /* Call WARNFUN with a warning message when memory usage is high. */ extern void memory_warnings __P ((__ptr_t __start, - void (*__warnfun) __P ((__const char *)))); + void (*__warnfun) __P ((const char *)))); /* Relocating allocator. */ diff -ruN glibc-1.06/malloc/mallocbug.c glibc-1.07/malloc/mallocbug.c --- glibc-1.06/malloc/mallocbug.c +++ glibc-1.07/malloc/mallocbug.c Sun Jul 18 21:13:07 1993 @@ -0,0 +1,66 @@ +/* Reproduce a GNU malloc bug. */ +#include +extern char *malloc (); + +#define size_t unsigned int + +int +main () +{ + char *dummy0; + char *dummy1; + char *fill_info_table1; + char *over_top; + size_t over_top_size = 0x3000; + char *over_top_dup; + size_t over_top_dup_size = 0x7000; + char *x; + size_t i; + + /* Here's what memory is supposed to look like (hex): + size contents + 3000 original_info_table, later fill_info_table1 + 3fa000 dummy0 + 3fa000 dummy1 + 6000 info_table_2 + 3000 over_top + + */ + /* mem: original_info_table */ + dummy0 = malloc (0x3fa000); + /* mem: original_info_table, dummy0 */ + dummy1 = malloc (0x3fa000); + /* mem: free, dummy0, dummy1, info_table_2 */ + fill_info_table1 = malloc (0x3000); + /* mem: fill_info_table1, dummy0, dummy1, info_table_2 */ + + x = malloc (0x1000); + free (x); + /* mem: fill_info_table1, dummy0, dummy1, info_table_2, freexx */ + + /* This is what loses; info_table_2 and freexx get combined unbeknownst + to mmalloc, and mmalloc puts over_top in a section of memory which + is on the free list as part of another block (where info_table_2 had + been). */ + over_top = malloc (over_top_size); + over_top_dup = malloc (over_top_dup_size); + memset (over_top, 0, over_top_size); + memset (over_top_dup, 1, over_top_dup_size); + + for (i = 0; i < over_top_size; ++i) + if (over_top[i] != 0) + { + printf ("FAIL: malloc expands info table\n"); + return 0; + } + + for (i = 0; i < over_top_dup_size; ++i) + if (over_top_dup[i] != 1) + { + printf ("FAIL: malloc expands info table\n"); + return 0; + } + + printf ("PASS: malloc expands info table\n"); + return 0; +} diff -ruN glibc-1.06/malloc/mcheck.c glibc-1.07/malloc/mcheck.c --- glibc-1.06/malloc/mcheck.c Thu Feb 18 14:33:35 1993 +++ glibc-1.07/malloc/mcheck.c Mon Jul 12 21:59:11 1993 @@ -104,6 +104,7 @@ return NULL; hdr->size = size; + hdr->magic = MAGICWORD; ((char *) &hdr[1])[size] = MAGICBYTE; return (__ptr_t) (hdr + 1); } diff -ruN glibc-1.06/malloc/mem-limits.h glibc-1.07/malloc/mem-limits.h --- glibc-1.06/malloc/mem-limits.h Sat May 22 18:21:02 1993 +++ glibc-1.07/malloc/mem-limits.h Thu Jan 6 01:25:51 1994 @@ -2,7 +2,8 @@ Copyright (C) 1990, 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 @@ -19,9 +20,31 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifdef MSDOS +#include +#endif + +#ifdef _LIBC + +#include +#define BSD4_2 /* Tell code below to use getrlimit. */ + +#else + +#if defined (__osf__) && (defined (__mips) || defined (mips)) +#include +#include +#endif + +#ifdef __bsdi__ +#define BSD4_2 +#endif + #ifndef BSD4_2 #ifndef USG +#ifndef MSDOS #include +#endif /* not MSDOS */ #endif /* not USG */ #else /* if BSD4_2 */ #include @@ -28,6 +51,8 @@ #include #endif /* BSD4_2 */ +#endif /* _LIBC */ + #ifdef emacs /* The important properties of this type are that 1) it's a pointer, and 2) arithmetic on it should work as if the size of the object pointed @@ -97,13 +122,24 @@ } #else /* not USG */ -#ifndef BSD4_2 +#if !defined (BSD4_2) && !defined (__osf__) +#ifdef MSDOS +void +get_lim_data () +{ + _go32_dpmi_meminfo info; + + _go32_dpmi_get_free_memory_information (&info); + lim_data = info.available_memory; +} +#else /* not MSDOS */ static void get_lim_data () { lim_data = vlimit (LIM_DATA, -1); } +#endif /* not MSDOS */ #else /* BSD4_2 */ diff -ruN glibc-1.06/malloc/memalign.c glibc-1.07/malloc/memalign.c --- glibc-1.06/malloc/memalign.c Thu Jun 25 21:06:58 1992 +++ glibc-1.07/malloc/memalign.c Wed Dec 8 15:59:41 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -50,11 +50,11 @@ free (result); return NULL; } + l->next = _aligned_blocks; + _aligned_blocks = l; } l->exact = result; result = l->aligned = (char *) result + alignment - adj; - l->next = _aligned_blocks; - _aligned_blocks = l; } return result; diff -ruN glibc-1.06/malloc/mtrace.c glibc-1.07/malloc/mtrace.c --- glibc-1.06/malloc/mtrace.c Mon Feb 22 12:36:12 1993 +++ glibc-1.07/malloc/mtrace.c Thu Jul 22 15:20:23 1993 @@ -26,7 +26,7 @@ #include #endif -/* Don't #include because did it for us. */ +#include #ifndef __GNU_LIBRARY__ extern char *getenv (); @@ -82,7 +82,7 @@ __malloc_hook = tr_mallochook; /* We could be printing a NULL here; that's OK. */ - fprintf (mallstream, "+ %p %x\n", hdr, size); + fprintf (mallstream, "+ %p %lx\n", hdr, size); if (hdr == mallwatch) tr_break (); @@ -110,9 +110,9 @@ __realloc_hook = tr_reallochook; if (hdr == NULL) /* Failed realloc. */ - fprintf (mallstream, "! %p %x\n", ptr, size); + fprintf (mallstream, "! %p %lx\n", ptr, size); else - fprintf (mallstream, "< %p\n> %p %x\n", ptr, hdr, size); + fprintf (mallstream, "< %p\n> %p %lx\n", ptr, hdr, size); if (hdr == mallwatch) tr_break (); diff -ruN glibc-1.06/malloc/obstack.c glibc-1.07/malloc/obstack.c --- glibc-1.06/malloc/obstack.c Wed Apr 21 20:06:46 1993 +++ glibc-1.07/malloc/obstack.c Sat Aug 7 01:52:38 1993 @@ -1,7 +1,8 @@ /* obstack.c - subroutines used implicitly by object stack macros Copyright (C) 1988, 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 @@ -244,6 +245,12 @@ /* Return nonzero if object OBJ has been allocated from obstack H. This is here for debugging. If you use it in a program, you are probably losing. */ + +#ifdef __STDC__ +/* Suppress -Wmissing-prototypes warning. We don't want to declare this in + obstack.h because it is just for debugging. */ +int _obstack_allocated_p (struct obstack *h, POINTER obj); +#endif int _obstack_allocated_p (h, obj) diff -ruN glibc-1.06/malloc/obstack.h glibc-1.07/malloc/obstack.h --- glibc-1.06/malloc/obstack.h Tue Oct 20 18:56:02 1992 +++ glibc-1.07/malloc/obstack.h Sat Aug 7 01:52:42 1993 @@ -1,7 +1,8 @@ /* obstack.h - object stack macros Copyright (C) 1988, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 diff -ruN glibc-1.06/malloc/ralloc.c glibc-1.07/malloc/ralloc.c --- glibc-1.06/malloc/ralloc.c Sat May 22 18:20:53 1993 +++ glibc-1.07/malloc/ralloc.c Mon Nov 29 18:00:05 1993 @@ -2,7 +2,8 @@ Copyright (C) 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 @@ -21,13 +22,13 @@ /* NOTES: - Only relocate the blocs neccessary for SIZE in r_alloc_sbrk, + Only relocate the blocs necessary for SIZE in r_alloc_sbrk, rather than all of them. This means allowing for a possible hole between the first bloc and the end of malloc storage. */ #ifdef emacs -#include "config.h" +#include #include "lisp.h" /* Needed for VALBITS. */ #undef NULL @@ -35,6 +36,7 @@ /* The important properties of this type are that 1) it's a pointer, and 2) arithmetic on it should work as if the size of the object pointed to has a size of 1. */ +#if 0 /* Arithmetic on void* is a GCC extension. */ #ifdef __STDC__ typedef void *POINTER; #else @@ -46,6 +48,10 @@ typedef char *POINTER; #endif +#endif /* 0 */ + +/* Unconditionally use char * for this. */ +typedef char *POINTER; typedef unsigned long SIZE; @@ -106,8 +112,9 @@ /* Macros for rounding. Note that rounding to any value is possible by changing the definition of PAGE. */ #define PAGE (getpagesize ()) -#define ALIGNED(addr) (((unsigned int) (addr) & (page_size - 1)) == 0) -#define ROUNDUP(size) (((unsigned int) (size) + page_size - 1) & ~(page_size - 1)) +#define ALIGNED(addr) (((unsigned long int) (addr) & (page_size - 1)) == 0) +#define ROUNDUP(size) (((unsigned long int) (size) + page_size - 1) \ + & ~(page_size - 1)) #define ROUND_TO_PAGE(addr) (addr & (~(page_size - 1))) /* Functions to get and return memory from the system. */ @@ -348,7 +355,10 @@ /* This is the first address not currently available for the heap. */ POINTER top; /* Amount of empty space below that. */ - SIZE already_available; + /* It is not correct to use SIZE here, because that is usually unsigned. + ptrdiff_t would be okay, but is not always available. + `long' will work in all cases, in practice. */ + long already_available; POINTER ptr; if (! use_relocatable_buffers) @@ -479,7 +489,7 @@ from the system. */ extern POINTER (*__morecore) (); -/* Intialize various things for memory allocation. */ +/* Initialize various things for memory allocation. */ static void r_alloc_init () @@ -499,8 +509,20 @@ extra_bytes = ROUNDUP (50000); page_break_value = (POINTER) ROUNDUP (break_value); + + /* The extra call to real_morecore guarantees that the end of the + address space is a multiple of page_size, even if page_size is + not really the page size of the system running the binary in + which page_size is stored. This allows a binary to be built on a + system with one page size and run on a system with a smaller page + size. */ + (*real_morecore) (page_break_value - break_value); + /* Clear the rest of the last page; this memory is in our address space even though it is after the sbrk value. */ + /* Doubly true, with the additional call that explicitly adds the + rest of that page to the address space. */ bzero (break_value, (page_break_value - break_value)); + virtual_break_value = break_value = page_break_value; use_relocatable_buffers = 1; } diff -ruN glibc-1.06/malloc/realloc.c glibc-1.07/malloc/realloc.c --- glibc-1.06/malloc/realloc.c Fri Mar 26 14:58:26 1993 +++ glibc-1.07/malloc/realloc.c Fri Oct 22 03:58:03 1993 @@ -25,6 +25,74 @@ #include #endif +#if (defined (MEMMOVE_MISSING) || \ + !defined(_LIBC) && !defined(STDC_HEADERS) && !defined(USG)) + +/* Snarfed directly from Emacs src/dispnew.c: + XXX Should use system bcopy if it handles overlap. */ +#ifndef emacs + +/* Like bcopy except never gets confused by overlap. */ + +static void +safe_bcopy (from, to, size) + char *from, *to; + int size; +{ + if (size <= 0 || from == to) + return; + + /* If the source and destination don't overlap, then bcopy can + handle it. If they do overlap, but the destination is lower in + memory than the source, we'll assume bcopy can handle that. */ + if (to < from || from + size <= to) + bcopy (from, to, size); + + /* Otherwise, we'll copy from the end. */ + else + { + register char *endf = from + size; + register char *endt = to + size; + + /* If TO - FROM is large, then we should break the copy into + nonoverlapping chunks of TO - FROM bytes each. However, if + TO - FROM is small, then the bcopy function call overhead + makes this not worth it. The crossover point could be about + anywhere. Since I don't think the obvious copy loop is too + bad, I'm trying to err in its favor. */ + if (to - from < 64) + { + do + *--endt = *--endf; + while (endf != from); + } + else + { + for (;;) + { + endt -= (to - from); + endf -= (to - from); + + if (endt < to) + break; + + bcopy (endf, endt, to - from); + } + + /* If SIZE wasn't a multiple of TO - FROM, there will be a + little left over. The amount left over is + (endt + (to - from)) - to, which is endt - from. */ + bcopy (from, to, endt - from); + } + } +} +#endif /* Not emacs. */ + +#define memmove(to, from, size) safe_bcopy ((from), (to), (size)) + +#endif + + #define min(A, B) ((A) < (B) ? (A) : (B)) /* Debugging hook for realloc. */ @@ -69,7 +137,7 @@ if (result != NULL) { memcpy (result, ptr, size); - free (ptr); + _free_internal (ptr); return result; } } @@ -85,7 +153,7 @@ _heapinfo[block + blocks].busy.info.size = _heapinfo[block].busy.info.size - blocks; _heapinfo[block].busy.info.size = blocks; - free (ADDRESS (block + blocks)); + _free_internal (ADDRESS (block + blocks)); result = ptr; } else if (blocks == _heapinfo[block].busy.info.size) @@ -100,7 +168,7 @@ /* Prevent free from actually returning memory to the system. */ oldlimit = _heaplimit; _heaplimit = 0; - free (ptr); + _free_internal (ptr); _heaplimit = oldlimit; result = malloc (size); if (result == NULL) @@ -114,7 +182,7 @@ { __ptr_t previous = malloc ((block - _heapindex) * BLOCKSIZE); (void) malloc (blocks * BLOCKSIZE); - free (previous); + _free_internal (previous); } return NULL; } diff -ruN glibc-1.06/malloc/valloc.c glibc-1.07/malloc/valloc.c --- glibc-1.06/malloc/valloc.c Mon Feb 22 12:45:57 1993 +++ glibc-1.07/malloc/valloc.c Thu Aug 12 19:26:23 1993 @@ -19,20 +19,18 @@ The author may be reached (Email) at the address mike@ai.mit.edu, or (US mail) as Mike Haertel c/o Free Software Foundation. */ -#ifndef _MALLOC_INTERNAL -#define _MALLOC_INTERNAL -#include -#endif - -#if defined (emacs) || defined (HAVE_CONFIG_H) -#include "config.h" -#endif - -#ifdef __GNU_LIBRARY__ +#if defined (__GNU_LIBRARY__) || defined (_LIBC) +#include +#include extern size_t __getpagesize __P ((void)); #else #include "getpagesize.h" #define __getpagesize() getpagesize() +#endif + +#ifndef _MALLOC_INTERNAL +#define _MALLOC_INTERNAL +#include #endif static size_t pagesize; diff -ruN glibc-1.06/malloc/vm-limit.c glibc-1.07/malloc/vm-limit.c --- glibc-1.06/malloc/vm-limit.c Tue Oct 20 18:55:39 1992 +++ glibc-1.07/malloc/vm-limit.c Thu Oct 14 16:08:09 1993 @@ -2,7 +2,8 @@ Copyright (C) 1990, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 @@ -20,7 +21,7 @@ Cambridge, MA 02139, USA. */ #ifdef emacs -#include "config.h" +#include #include "lisp.h" #endif @@ -54,8 +55,8 @@ extern POINTER (*__morecore) (); register POINTER cp; - int five_percent; - int data_size; + unsigned long five_percent; + unsigned long data_size; if (lim_data == 0) get_lim_data (); diff -ruN glibc-1.06/manual/COPYING.LIB glibc-1.07/manual/COPYING.LIB --- glibc-1.06/manual/COPYING.LIB Mon Jun 3 16:28:41 1991 +++ glibc-1.07/manual/COPYING.LIB @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This 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. - - This 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 this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff -ruN glibc-1.06/manual/Makefile glibc-1.07/manual/Makefile --- glibc-1.06/manual/Makefile Sat May 22 18:16:57 1993 +++ glibc-1.07/manual/Makefile Thu Dec 23 01:47:19 1993 @@ -31,13 +31,13 @@ endif # Set chapters and chapters-incl. -include $(objpfx)chapters -$(objpfx)chapters: libc.texinfo +include chapters +chapters: libc.texinfo $(find-includes) chapters := $(filter-out summary.texi,$(chapters)) ifdef chapters -include $(objpfx)chapters-incl -$(objpfx)chapters-incl: $(chapters) +include chapters-incl +chapters-incl: $(chapters) $(find-includes) endif @@ -47,38 +47,32 @@ mv $@.new $@ endef -$(objpfx)libc.dvi $(objpfx)libc.info: $(chapters) summary.texi $(chapters-incl) -$(objpfx)libc.dvi: texinfo.tex +libc.dvi libc.info: $(chapters) summary.texi $(chapters-incl) +libc.dvi: texinfo.tex -$(objpfx)%.info: %.texinfo - $(MAKEINFO) $< -o $@ -$(objpfx)%.dvi: %.texinfo - $(TEXI2DVI) $< - # Generate the summary from the Texinfo source files for each chapter. -$(objpfx)summary.texi: stamp-summary ; -$(objpfx)stamp-summary: summary.awk $(chapters) +summary.texi: stamp-summary ; +stamp-summary: summary.awk $(chapters) awk -f $^ \ - | sort +1 -2 | tr '\014' '\012' > summary-tmp - ./move-if-change summary-tmp $(objpfx)summary.texi + | sort -df +1 -2 | tr '\014' '\012' > summary-tmp + ./move-if-change summary-tmp summary.texi # touch is broken on our machines. Sigh. date > $@ # Generate Texinfo files from the C source for the example programs. -$(objpfx)%.c.texi: examples/%.c +%.c.texi: examples/%.c sed -e 's,[{}],@&,g' \ -e 's,/\*\(@.*\)\*/,\1,g' \ - -e 's,/\* *\(.*\) *\*/,/* @r{\1} */,g' \ + -e 's,/\* *,/* @r{,g' -e 's, *\*/,} */,' \ -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/'\ - $< > $@.new + $< | expand > $@.new mv $@.new $@ -minimal-dist = COPYING.LIB summary.awk move-if-change \ - libc.texinfo $(chapters) \ +minimal-dist = summary.awk move-if-change libc.texinfo $(chapters) \ $(patsubst %.c.texi,examples/%.c, \ $(filter-out summary.texi,$(chapters-incl))) -doc-only-dist = Makefile mkinstalldirs +doc-only-dist = Makefile COPYING.LIB mkinstalldirs distribute = $(minimal-dist) \ $(patsubst examples/%.c,%.c.texi,$(filter examples/%.c, \ $(minimal-dist))) \ @@ -91,7 +85,8 @@ manual.tar: $(doc-only-dist) $(minimal-dist) ; $(tar-it) mandist.tar: $(doc-only-dist) $(distribute) ; $(tar-it) -edition := $(shell sed -n 's/^@set EDITION \(.*\)$$/\1/p' libc.texinfo) +edition := $(shell sed -n 's/^@set EDITION \([0-9][0-9.]*\)[^0-9.]*.*$$/\1/p' \ + libc.texinfo) glibc-doc-$(edition).tar: $(doc-only-dist) $(distribute) @rm -f glibc-doc-$(edition) @@ -113,15 +108,17 @@ subdir_clean: clean distclean clean: mostlyclean mostlyclean: - -rm -f $(addprefix $(objpfx),libc.dvi libc.info*) + -rm -f libc.dvi libc.info* realclean: clean - -rm -f $(addprefix $(objpfx),chapters chapters-incl \ - summary.texi stamp-summary \ - *.c.texi) + -rm -f chapters chapters-incl summary.texi stamp-summary *.c.texi + -rm -f libc.cp libc.cps libc.fn libc.fns libc.pg libc.pgs \ + libc.tp libc.tps libc.vr libc.vrs libc.log libc.aux libc.toc -.PHONY: install subdir_install installdirs -subdir_install: install +.PHONY: install subdir_install installdirs install-data +install-data subdir_install: install install: $(infodir)/libc.info +# Catchall implicit rule for other installation targets from the parent. +install-%: ; ifndef infodir infodir = $(prefix)/info @@ -137,11 +134,11 @@ INSTALL = install endif -$(infodir)/libc.info: $(objpfx)libc.info installdirs +$(infodir)/libc.info: libc.info installdirs for file in $<*; do \ name=`basename $$file`; \ $(INSTALL_DATA) $$file \ - `echo $@ | sed "s,$( #include #include @@ -732,7 +737,7 @@ status = -1; return status; @} -@end example +@end smallexample @comment Yes, this example has been tested. diff -ruN glibc-1.06/manual/conf.texi glibc-1.07/manual/conf.texi --- glibc-1.06/manual/conf.texi Wed May 12 14:25:55 1993 +++ glibc-1.07/manual/conf.texi Mon Jul 26 19:22:18 1993 @@ -126,8 +126,8 @@ construct @samp{\@{@var{min},@var{max}\@}} in a regular expression. The value of this macro is actually a lower bound for the maximum. That -is, you can count on being able to have that many supplementary group -IDs, but a particular machine might let you have even more. You can use +is, you can count on being able to have that many repetitions, but a +particular machine might let you have even more. You can use @code{sysconf} to see whether a particular machine will let you have more (@pxref{Sysconf}). And even the value that @code{sysconf} tells you is just a lower bound---larger values might work. @@ -438,6 +438,14 @@ @comment unistd.h @comment POSIX.2 +@item _SC_EQUIV_CLASS_MAX +Inquire about the maximum number of weights that can be assigned to an +entry of the @code{LC_COLLATE} category @samp{order} keyword in a locale +definition. The GNU C library does not presently support locale +definitions. + +@comment unistd.h +@comment POSIX.2 @item _SC_VERSION Inquire about the version number of POSIX.1 that the library and kernel support. @@ -447,6 +455,13 @@ @item _SC_2_VERSION Inquire about the version number of POSIX.2 that the system utilities support. + +@comment unistd.h +@comment GNU +@item _SC_PAGESIZE +Inquire about the virtual memory page size of the machine. +@code{getpagesize} returns the same value. +@xref{XXX getpagesize}. @end table @node Examples of Sysconf @@ -457,7 +472,7 @@ macro is not defined. For example, here is how to test whether job control is supported: -@example +@smallexample @group int have_job_control (void) @@ -474,11 +489,11 @@ #endif @} @end group -@end example +@end smallexample Here is how to get the value of a numeric limit: -@example +@smallexample int get_child_max () @{ @@ -491,7 +506,7 @@ return value; #endif @} -@end example +@end smallexample @node Minimums @section Minimum Values for General Capacity Limits @@ -824,47 +839,47 @@ @comment unistd.h @comment POSIX.1 @item _PC_LINK_MAX -Inquire about the parameter corresponding to @code{LINK_MAX}. +Inquire about the value of @code{LINK_MAX}. @comment unistd.h @comment POSIX.1 @item _PC_MAX_CANON -Inquire about the parameter corresponding to @code{MAX_CANON}. +Inquire about the value of @code{MAX_CANON}. @comment unistd.h @comment POSIX.1 @item _PC_MAX_INPUT -Inquire about the parameter corresponding to @code{MAX_INPUT}. +Inquire about the value of @code{MAX_INPUT}. @comment unistd.h @comment POSIX.1 @item _PC_NAME_MAX -Inquire about the parameter corresponding to @code{NAME_MAX}. +Inquire about the value of @code{NAME_MAX}. @comment unistd.h @comment POSIX.1 @item _PC_PATH_MAX -Inquire about the parameter corresponding to @code{PATH_MAX}. +Inquire about the value of @code{PATH_MAX}. @comment unistd.h @comment POSIX.1 @item _PC_PIPE_BUF -Inquire about the parameter corresponding to @code{PIPE_BUF}. +Inquire about the value of @code{PIPE_BUF}. @comment unistd.h @comment POSIX.1 @item _PC_CHOWN_RESTRICTED -Inquire about the parameter corresponding to @code{_POSIX_CHOWN_RESTRICTED}. +Inquire about the value of @code{_POSIX_CHOWN_RESTRICTED}. @comment unistd.h @comment POSIX.1 @item _PC_NO_TRUNC -Inquire about the parameter corresponding to @code{_POSIX_NO_TRUNC}. +Inquire about the value of @code{_POSIX_NO_TRUNC}. @comment unistd.h @comment POSIX.1 @item _PC_VDISABLE -Inquire about the parameter corresponding to @code{_POSIX_VDISABLE}. +Inquire about the value of @code{_POSIX_VDISABLE}. @end table @node Utility Limits @@ -937,6 +952,14 @@ memory, but there is no way that the library can tell you this.) @end deftypevr +@comment limits.h +@comment POSIX.2 +@deftypevr Macro int EQUIV_CLASS_MAX +The maximum number of weights that can be assigned to an entry of the +@code{LC_COLLATE} category @samp{order} keyword in a locale definition. +The GNU C library does not presently support locale definitions. +@end deftypevr + @node Utility Minimums @section Minimum Values for Utility Limits @@ -985,6 +1008,15 @@ The most restrictive limit permitted by POSIX.2 for the maximum size of a text line that the text utilities can handle. Its value is @code{2048}. + +@comment limits.h +@comment POSIX.2 +@item _POSIX2_EQUIV_CLASS_MAX +The most restrictive limit permitted by POSIX.2 for the maximum number +of weights that can be assigned to an entry of the @code{LC_COLLATE} +category @samp{order} keyword in a locale definition. Its value is +@code{2}. The GNU C library does not presently support locale +definitions. @end table @node String Parameters @@ -1036,7 +1068,7 @@ buffer accordingly, and then call @code{confstr} again to fill the buffer, like this: -@example +@smallexample @group char * get_default_path (void) @@ -1053,4 +1085,4 @@ return buffer; @} @end group -@end example +@end smallexample diff -ruN glibc-1.06/manual/ctype.texi glibc-1.07/manual/ctype.texi --- glibc-1.06/manual/ctype.texi Wed May 12 14:25:56 1993 +++ glibc-1.07/manual/ctype.texi Thu Jun 24 20:35:15 1993 @@ -34,10 +34,10 @@ nonzero integer if the character is alphabetic, and zero otherwise. You would use it like this: -@example +@smallexample if (isalpha (c)) printf ("The character `%c' is alphabetic.\n", c); -@end example +@end smallexample Each of the functions in this section tests for membership in a particular class of characters; each has a name starting with @samp{is}. diff -ruN glibc-1.06/manual/db.c.texi glibc-1.07/manual/db.c.texi --- glibc-1.06/manual/db.c.texi Tue Oct 27 19:00:09 1992 +++ glibc-1.07/manual/db.c.texi Sun Jun 20 19:56:33 1993 @@ -12,7 +12,7 @@ struct group *my_group; char **members; - /* @r{Get information about the user ID. } */ + /* @r{Get information about the user ID.} */ me = getuid (); my_passwd = getpwuid (me); if (!my_passwd) @@ -21,7 +21,7 @@ exit (EXIT_FAILURE); @} - /* @r{Print the information. } */ + /* @r{Print the information.} */ printf ("I am %s.\n", my_passwd->pw_gecos); printf ("My login name is %s.\n", my_passwd->pw_name); printf ("My uid is %d.\n", (int) (my_passwd->pw_uid)); @@ -28,17 +28,18 @@ printf ("My home directory is %s.\n", my_passwd->pw_dir); printf ("My default shell is %s.\n", my_passwd->pw_shell); - /* @r{Get information about the default group ID. } */ + /* @r{Get information about the default group ID.} */ my_group = getgrgid (my_passwd->pw_gid); if (!my_group) @{ - printf ("Couldn't find out about group %d.\n", (int) my_passwd->pw_gid); + printf ("Couldn't find out about group %d.\n", + (int) my_passwd->pw_gid); exit (EXIT_FAILURE); @} - /* @r{Print the information. } */ + /* @r{Print the information.} */ printf ("My default group is %s (%d).\n", - my_group->gr_name, (int) (my_passwd->pw_gid)); + my_group->gr_name, (int) (my_passwd->pw_gid)); printf ("The members of this group are:\n"); members = my_group->gr_mem; while (*members) diff -ruN glibc-1.06/manual/dir.c.texi glibc-1.07/manual/dir.c.texi --- glibc-1.06/manual/dir.c.texi Tue Oct 27 18:59:50 1992 +++ glibc-1.07/manual/dir.c.texi Thu Jun 10 18:00:22 1993 @@ -15,7 +15,7 @@ if (dp != NULL) @{ while (ep = readdir (dp)) - puts (ep->d_name); + puts (ep->d_name); (void) closedir (dp); @} else diff -ruN glibc-1.06/manual/errno.texi glibc-1.07/manual/errno.texi --- glibc-1.06/manual/errno.texi Wed May 19 15:00:19 1993 +++ glibc-1.07/manual/errno.texi Tue Dec 28 18:39:05 1993 @@ -59,7 +59,8 @@ Many library functions can set @code{errno} to a nonzero value as a result of calling other library functions which might fail. You should -assume that any library function might alter @code{errno}. +assume that any library function might alter @code{errno} when the +function returns an error. @strong{Portability Note:} ANSI C specifies @code{errno} as a ``modifiable lvalue'' rather than as a variable, permitting it to be @@ -151,9 +152,11 @@ @comment errno.h @comment POSIX.1: Device not configured @deftypevr Macro int ENXIO -No such device or address. Typically, this means that a file -representing a device has been installed incorrectly, and the -system can't find the right kind of device driver for it. +No such device or address. The system tried to use the device +represented by a file you specified, and it couldn't find the device. +This can mean that the device file was installed incorrectly, or that +the physical device is missing or not correctly attached to the +computer. @end deftypevr @comment errno.h @@ -191,8 +194,10 @@ @comment errno.h @comment POSIX.1: Resource deadlock avoided @deftypevr Macro int EDEADLK -Deadlock avoided; allocating a system resource would have resulted in -a deadlock situation. @xref{File Locks}, for an example. +Deadlock avoided; allocating a system resource would have resulted in a +deadlock situation. The system does not guarantee that it will notice +all such situations. This error means you got lucky and the system +noticed; it might just hang. @xref{File Locks}, for an example. @end deftypevr @comment errno.h @@ -241,6 +246,8 @@ @comment POSIX.1: Invalid cross-device link @deftypevr Macro int EXDEV An attempt to make an improper link across file systems was detected. +This happens not only when you use @code{link} (@pxref{Hard Links}) but +also when you rename a file with @code{rename} (@pxref{Renaming Files}). @end deftypevr @comment errno.h @@ -271,17 +278,6 @@ @end deftypevr @comment errno.h -@comment POSIX.1: Too many open files in system -@deftypevr Macro int ENFILE -There are too many distinct file openings in the entire system. Note -that any number of linked channels count as just one file opening; see -@ref{Linked Channels}. -@c !!! this will never happen in GNU; EMFILE or ENOMEM instead. -@c ??? I'm not sure it is a good thing to return ENOMEM -@c ??? in a case where programmers have been told to expect ENFILE--rms. -@end deftypevr - -@comment errno.h @comment POSIX.1: Too many open files @deftypevr Macro int EMFILE The current process has too many files open and can't open any more. @@ -291,6 +287,14 @@ @end deftypevr @comment errno.h +@comment POSIX.1: Too many open files in system +@deftypevr Macro int ENFILE +There are too many distinct file openings in the entire system. Note +that any number of linked channels count as just one file opening; see +@ref{Linked Channels}. This error never occurs in the GNU system. +@end deftypevr + +@comment errno.h @comment POSIX.1: Inappropriate ioctl for device @deftypevr Macro int ENOTTY Inappropriate I/O control operation, such as trying to set terminal @@ -328,7 +332,7 @@ @comment errno.h @comment POSIX.1: Read-only file system @deftypevr Macro int EROFS -An attempt was made to modify a file on a read-only file system. +An attempt was made to modify something on a read-only file system. @end deftypevr @comment errno.h @@ -335,6 +339,8 @@ @comment POSIX.1: Too many links @deftypevr Macro int EMLINK Too many links; the link count of a single file is too large. +@code{rename} can cause this error if the file being renamed already has +as many links as it can take (@pxref{Renaming Files}). @end deftypevr @comment errno.h @@ -367,6 +373,7 @@ Resource temporarily unavailable; the call might work if you try again later. Only @code{fork} returns error code @code{EAGAIN} for such a reason. +@c !!! sysv uses it somehow? Don't say "only fork" when ==EWOULDBLOCK. @end deftypevr @comment errno.h @@ -386,7 +393,13 @@ @comment BSD: Operation now in progress @deftypevr Macro int EINPROGRESS An operation that cannot complete immediately was initiated on an object -that has non-blocking mode selected. +that has non-blocking mode selected. Some functions that must always +block (such as @code{connect}; @pxref{Connecting}) never return +@code{EWOULDBLOCK}. +@c !!! EAGAIN? +Instead, they return @code{EINPROGRESS} to indicate that the operation +has begun and will take some time. Attempts to manipulate the object +before the call completes return @code{EALREADY}. @end deftypevr @comment errno.h @@ -405,7 +418,7 @@ @comment errno.h @comment BSD: Destination address required @deftypevr Macro int EDESTADDRREQ -No destination address was supplied on a socket operation. +No destination address was supplied on a socket operation that needed one. @end deftypevr @comment errno.h @@ -431,7 +444,8 @@ @comment errno.h @comment BSD: Protocol not supported @deftypevr Macro int EPROTONOSUPPORT -The socket domain does not support the requested communications protocol. +The socket domain does not support the requested communications protocol +(perhaps because the requested protocol is completely invalid.) @xref{Creating a Socket}. @end deftypevr @@ -505,7 +519,8 @@ @comment BSD: Connection reset by peer @deftypevr Macro int ECONNRESET A network connection was closed for reasons outside the control of the -local host, such as by the remote machine rebooting. +local host, such as by the remote machine rebooting or an unrecoverable +protocol violation. @end deftypevr @comment errno.h @@ -624,6 +639,7 @@ @deftypevr Macro int ENOLCK No locks available. This is used by the file locking facilities; see @ref{File Locks}. +This error never occurs in the GNU system. @end deftypevr @comment errno.h @@ -635,6 +651,17 @@ @end deftypevr @comment errno.h +@comment GNU: Inappropriate operation for background process +@deftypevr Macro int EBACKGROUND +In the GNU system, servers supporting the @code{term} protocol return +this error for certain operations when the caller is not in the +foreground process group of the terminal. Users do not usually see this +error because functions such as @code{read} and @code{write} translate +it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control}, +for information on process groups and these signals. +@end deftypevr + +@comment errno.h @comment GNU: ? @deftypevr Macro int ED The experienced user will know what is wrong. @@ -641,6 +668,18 @@ @end deftypevr @comment errno.h +@comment GNU: You really blew it this time +@deftypevr Macro int EGREGIOUS +You did @strong{what}? +@end deftypevr + +@comment errno.h +@comment GNU: Computer bought the farm +@deftypevr Macro int EIEIO +Go home and have a glass of warm, dairy-fresh milk. +@end deftypevr + +@comment errno.h @comment GNU: Gratuitous error @deftypevr Macro int EGRATUITOUS This error code has no purpose. @@ -716,7 +755,9 @@ @comment GNU @deftypevar {char *} program_invocation_name This variable's value is the name that was used to invoke the program -running in the current process. It is the same as @code{argv[0]}. +running in the current process. It is the same as @code{argv[0]}. Note +that this is not necessarily a useful file name; often it contains no +directory names. @xref{Program Arguments}. @end deftypevar @comment errno.h @@ -728,9 +769,8 @@ everything up to the last slash, if any.) @end deftypevar -Both @code{program_invocation_name} and -@code{program_invocation_short_name} are set up by the system before -@code{main} is called. +The library initialization code sets up both of these variables before +calling @code{main}. @strong{Portability Note:} These two variables are GNU extensions. If you want your program to work with non-GNU libraries, you must save the @@ -750,7 +790,7 @@ save it in a local variable instead, because those other library functions might overwrite @code{errno} in the meantime. -@example +@smallexample #include #include #include @@ -763,12 +803,14 @@ errno = 0; stream = fopen (name, "r"); - if (!stream) @{ - fprintf (stderr, "%s: Couldn't open file %s; %s\n", - program_invocation_short_name, name, strerror (errno)); - exit (EXIT_FAILURE); - @} else + if (stream == NULL) + @{ + fprintf (stderr, "%s: Couldn't open file %s; %s\n", + program_invocation_short_name, name, strerror (errno)); + exit (EXIT_FAILURE); + @} + else return stream; @} -@end example +@end smallexample diff -ruN glibc-1.06/manual/examples/db.c glibc-1.07/manual/examples/db.c --- glibc-1.06/manual/examples/db.c Mon Oct 19 21:15:42 1992 +++ glibc-1.07/manual/examples/db.c Sun Jun 20 19:32:02 1993 @@ -32,7 +32,8 @@ my_group = getgrgid (my_passwd->pw_gid); if (!my_group) { - printf ("Couldn't find out about group %d.\n", (int) my_passwd->pw_gid); + printf ("Couldn't find out about group %d.\n", + (int) my_passwd->pw_gid); exit (EXIT_FAILURE); } diff -ruN glibc-1.06/manual/examples/filecli.c glibc-1.07/manual/examples/filecli.c --- glibc-1.06/manual/examples/filecli.c +++ glibc-1.07/manual/examples/filecli.c Thu Jun 10 18:00:35 1993 @@ -0,0 +1,54 @@ +#include +#include +#include +#include +#include +#include + +#define SERVER "/tmp/serversocket" +#define CLIENT "/tmp/mysocket" +#define MAXMSG 512 +#define MESSAGE "Yow!!! Are we having fun yet?!?" + +int +main (void) +{ + extern int make_named_socket (const char *name); + int sock; + char message[MAXMSG]; + struct sockaddr_un name; + size_t size; + int nbytes; + + /* Make the socket. */ + sock = make_named_socket (CLIENT); + + /* Initialize the server socket address. */ + name.sun_family = AF_UNIX; + strcpy (name.sun_path, SERVER); + size = strlen (name.sun_path) + sizeof (name.sun_family); + + /* Send the datagram. */ + nbytes = sendto (sock, MESSAGE, strlen (MESSAGE) + 1, 0, + (struct sockaddr *) & name, size); + if (nbytes < 0) + { + perror ("sendto (client)"); + exit (EXIT_FAILURE); + } + + /* Wait for a reply. */ + nbytes = recvfrom (sock, message, MAXMSG, 0, NULL, 0); + if (nbytes < 0) + { + perror ("recfrom (client)"); + exit (EXIT_FAILURE); + } + + /* Print a diagnostic message. */ + fprintf (stderr, "Client: got message: %s\n", message); + + /* Clean up. */ + remove (CLIENT); + close (sock); +} diff -ruN glibc-1.06/manual/examples/fileclient.c glibc-1.07/manual/examples/fileclient.c --- glibc-1.06/manual/examples/fileclient.c Mon Nov 9 19:24:50 1992 +++ glibc-1.07/manual/examples/fileclient.c @@ -1,54 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#define SERVER "/tmp/serversocket" -#define CLIENT "/tmp/mysocket" -#define MAXMSG 512 -#define MESSAGE "Yow!!! Are we having fun yet?!?" - -int -main (void) -{ - extern int make_named_socket (const char *name); - int sock; - char message[MAXMSG]; - struct sockaddr_un name; - size_t size; - int nbytes; - - /* Make the socket. */ - sock = make_named_socket (CLIENT); - - /* Initialize the server socket address. */ - name.sun_family = AF_UNIX; - strcpy (name.sun_path, SERVER); - size = strlen (name.sun_path) + sizeof (name.sun_family); - - /* Send the datagram. */ - nbytes = sendto (sock, MESSAGE, strlen (MESSAGE) + 1, 0, - (struct sockaddr *) & name, size); - if (nbytes < 0) - { - perror ("sendto (client)"); - exit (EXIT_FAILURE); - } - - /* Wait for a reply. */ - nbytes = recvfrom (sock, message, MAXMSG, 0, NULL, 0); - if (nbytes < 0) - { - perror ("recfrom (client)"); - exit (EXIT_FAILURE); - } - - /* Print a diagnostic message. */ - fprintf (stderr, "Client: got message: %s\n", message); - - /* Clean up. */ - remove (CLIENT); - close (sock); -} diff -ruN glibc-1.06/manual/examples/fileserver.c glibc-1.07/manual/examples/fileserver.c --- glibc-1.06/manual/examples/fileserver.c Mon Nov 9 19:22:44 1992 +++ glibc-1.07/manual/examples/fileserver.c @@ -1,46 +0,0 @@ -#include -#include -#include -#include -#include - -#define SERVER "/tmp/serversocket" -#define MAXMSG 512 - -int -main (void) -{ - int sock; - char message[MAXMSG]; - struct sockaddr_un name; - size_t size; - int nbytes; - - /* Make the socket, then loop endlessly. */ - - sock = make_named_socket (SERVER); - while (1) - { - /* Wait for a datagram. */ - size = sizeof (name); - nbytes = recvfrom (sock, message, MAXMSG, 0, - (struct sockaddr *) & name, &size); - if (nbytes < 0) - { - perror ("recfrom (server)"); - exit (EXIT_FAILURE); - } - - /* Give a diagnostic message. */ - fprintf (stderr, "Server: got message: %s\n", message); - - /* Bounce the message back to the sender. */ - nbytes = sendto (sock, message, nbytes, 0, - (struct sockaddr *) & name, size); - if (nbytes < 0) - { - perror ("sendto (server)"); - exit (EXIT_FAILURE); - } - } -} diff -ruN glibc-1.06/manual/examples/filesrv.c glibc-1.07/manual/examples/filesrv.c --- glibc-1.06/manual/examples/filesrv.c +++ glibc-1.07/manual/examples/filesrv.c Thu Jun 10 18:00:33 1993 @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include + +#define SERVER "/tmp/serversocket" +#define MAXMSG 512 + +int +main (void) +{ + int sock; + char message[MAXMSG]; + struct sockaddr_un name; + size_t size; + int nbytes; + + /* Make the socket, then loop endlessly. */ + + sock = make_named_socket (SERVER); + while (1) + { + /* Wait for a datagram. */ + size = sizeof (name); + nbytes = recvfrom (sock, message, MAXMSG, 0, + (struct sockaddr *) & name, &size); + if (nbytes < 0) + { + perror ("recfrom (server)"); + exit (EXIT_FAILURE); + } + + /* Give a diagnostic message. */ + fprintf (stderr, "Server: got message: %s\n", message); + + /* Bounce the message back to the sender. */ + nbytes = sendto (sock, message, nbytes, 0, + (struct sockaddr *) & name, size); + if (nbytes < 0) + { + perror ("sendto (server)"); + exit (EXIT_FAILURE); + } + } +} diff -ruN glibc-1.06/manual/examples/inetcli.c glibc-1.07/manual/examples/inetcli.c --- glibc-1.06/manual/examples/inetcli.c +++ glibc-1.07/manual/examples/inetcli.c Sun Jun 20 19:39:00 1993 @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define PORT 5555 +#define MESSAGE "Yow!!! Are we having fun yet?!?" +#define SERVERHOST "churchy.gnu.ai.mit.edu" + +void +write_to_server (int filedes) +{ + int nbytes; + + nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1); + if (nbytes < 0) + { + perror ("write"); + exit (EXIT_FAILURE); + } +} + + +int +main (void) +{ + extern void init_sockaddr (struct sockaddr_in *name, + const char *hostname, + unsigned short int port); + int sock; + struct sockaddr_in servername; + + /* Create the socket. */ + sock = socket (PF_INET, SOCK_STREAM, 0); + if (sock < 0) + { + perror ("socket (client)"); + exit (EXIT_FAILURE); + } + + /* Connect to the server. */ + init_sockaddr (&servername, SERVERHOST, PORT); + if (0 > connect (sock, + (struct sockaddr *) &servername, + sizeof (servername))) + { + perror ("connect (client)"); + exit (EXIT_FAILURE); + } + + /* Send data to the server. */ + write_to_server (sock); + close (sock); + exit (EXIT_SUCCESS); +} diff -ruN glibc-1.06/manual/examples/inetclient.c glibc-1.07/manual/examples/inetclient.c --- glibc-1.06/manual/examples/inetclient.c Tue Jan 5 17:33:12 1993 +++ glibc-1.07/manual/examples/inetclient.c @@ -1,58 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#define PORT 5555 -#define MESSAGE "Yow!!! Are we having fun yet?!?" -#define SERVERHOST "churchy.gnu.ai.mit.edu" - -void -write_to_server (int filedes) -{ - int nbytes; - - nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1); - if (nbytes < 0) - { - perror ("write"); - exit (EXIT_FAILURE); - } -} - - -int -main (void) -{ - extern void init_sockaddr (struct sockaddr_in *name, - const char *hostname, unsigned short int port); - int sock; - struct sockaddr_in servername; - - /* Create the socket. */ - sock = socket (PF_INET, SOCK_STREAM, 0); - if (sock < 0) - { - perror ("socket (client)"); - exit (EXIT_FAILURE); - } - - /* Connect to the server. */ - init_sockaddr (&servername, SERVERHOST, PORT); - if (0 > connect (sock, - (struct sockaddr *) &servername, - sizeof (servername))) - { - perror ("connect (client)"); - exit (EXIT_FAILURE); - } - - /* Send data to the server. */ - write_to_server (sock); - close (sock); - exit (EXIT_SUCCESS); -} diff -ruN glibc-1.06/manual/examples/inetserver.c glibc-1.07/manual/examples/inetserver.c --- glibc-1.06/manual/examples/inetserver.c Mon Nov 9 19:15:08 1992 +++ glibc-1.07/manual/examples/inetserver.c @@ -1,100 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#define PORT 5555 -#define MAXMSG 512 - -int -read_from_client (int filedes) -{ - char buffer[MAXMSG]; - int nbytes; - - nbytes = read (filedes, buffer, MAXMSG); - if (nbytes < 0) - { - /* Read error. */ - perror ("read"); - exit (EXIT_FAILURE); - } - else if (nbytes == 0) - /* End-of-file. */ - return -1; - else - { - /* Data read. */ - fprintf (stderr, "Server: got message: `%s'\n", buffer); - return 0; - } -} - -int -main (void) -{ - extern int make_socket (unsigned short int port); - int sock; - int status; - fd_set active_fd_set, read_fd_set; - int i; - struct sockaddr_in clientname; - size_t size; - - /* Create the socket and set it up to accept connections. */ - sock = make_socket (PORT); - if (listen (sock, 1) < 0) - { - perror ("listen"); - exit (EXIT_FAILURE); - } - - /* Initialize the set of active sockets. */ - FD_ZERO (&active_fd_set); - FD_SET (sock, &active_fd_set); - - while (1) - { - /* Block until input arrives on one or more active sockets. */ - read_fd_set = active_fd_set; - if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0) - { - perror ("select"); - exit (EXIT_FAILURE); - } - - /* Service all the sockets with input pending. */ - for (i = 0; i < FD_SETSIZE; ++i) - if (FD_ISSET (i, &read_fd_set)) - { - if (i == sock) - { - /* Connection request on original socket. */ - size = sizeof (clientname); - if (accept (sock, - (struct sockaddr *) &clientname, &size) < 0) - { - perror ("accept"); - exit (EXIT_FAILURE); - } - fprintf (stderr, "Server: connect from host %s, port %hd.\n", - inet_ntoa (clientname.sin_addr), - ntohs (clientname.sin_port)); - FD_SET (status, &active_fd_set); - } - else - { - /* Data arriving on an already-connected socket. */ - if (read_from_client (i) < 0) - { - close (i); - FD_CLR (i, &active_fd_set); - } - } - } - } -} diff -ruN glibc-1.06/manual/examples/inetsrv.c glibc-1.07/manual/examples/inetsrv.c --- glibc-1.06/manual/examples/inetsrv.c +++ glibc-1.07/manual/examples/inetsrv.c Sun Jun 20 19:15:00 1993 @@ -0,0 +1,101 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define PORT 5555 +#define MAXMSG 512 + +int +read_from_client (int filedes) +{ + char buffer[MAXMSG]; + int nbytes; + + nbytes = read (filedes, buffer, MAXMSG); + if (nbytes < 0) + { + /* Read error. */ + perror ("read"); + exit (EXIT_FAILURE); + } + else if (nbytes == 0) + /* End-of-file. */ + return -1; + else + { + /* Data read. */ + fprintf (stderr, "Server: got message: `%s'\n", buffer); + return 0; + } +} + +int +main (void) +{ + extern int make_socket (unsigned short int port); + int sock; + int status; + fd_set active_fd_set, read_fd_set; + int i; + struct sockaddr_in clientname; + size_t size; + + /* Create the socket and set it up to accept connections. */ + sock = make_socket (PORT); + if (listen (sock, 1) < 0) + { + perror ("listen"); + exit (EXIT_FAILURE); + } + + /* Initialize the set of active sockets. */ + FD_ZERO (&active_fd_set); + FD_SET (sock, &active_fd_set); + + while (1) + { + /* Block until input arrives on one or more active sockets. */ + read_fd_set = active_fd_set; + if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0) + { + perror ("select"); + exit (EXIT_FAILURE); + } + + /* Service all the sockets with input pending. */ + for (i = 0; i < FD_SETSIZE; ++i) + if (FD_ISSET (i, &read_fd_set)) + { + if (i == sock) + { + /* Connection request on original socket. */ + size = sizeof (clientname); + if (accept (sock, + (struct sockaddr *) &clientname, &size) < 0) + { + perror ("accept"); + exit (EXIT_FAILURE); + } + fprintf (stderr, + "Server: connect from host %s, port %hd.\n", + inet_ntoa (clientname.sin_addr), + ntohs (clientname.sin_port)); + FD_SET (status, &active_fd_set); + } + else + { + /* Data arriving on an already-connected socket. */ + if (read_from_client (i) < 0) + { + close (i); + FD_CLR (i, &active_fd_set); + } + } + } + } +} diff -ruN glibc-1.06/manual/examples/isockad.c glibc-1.07/manual/examples/isockad.c --- glibc-1.06/manual/examples/isockad.c +++ glibc-1.07/manual/examples/isockad.c Wed Jun 16 20:21:10 1993 @@ -0,0 +1,23 @@ +#include +#include +#include +#include +#include + +void +init_sockaddr (struct sockaddr_in *name, + const char *hostname, + unsigned short int port) +{ + struct hostent *hostinfo; + + name->sin_family = AF_INET; + name->sin_port = htons (port); + hostinfo = gethostbyname (hostname); + if (hostinfo == NULL) + { + fprintf (stderr, "Unknown host %s.\n", hostname); + exit (EXIT_FAILURE); + } + name->sin_addr = *(struct in_addr *) hostinfo->h_addr; +} diff -ruN glibc-1.06/manual/examples/isockaddr.c glibc-1.07/manual/examples/isockaddr.c --- glibc-1.06/manual/examples/isockaddr.c Mon Nov 9 18:59:08 1992 +++ glibc-1.07/manual/examples/isockaddr.c @@ -1,22 +0,0 @@ -#include -#include -#include -#include -#include - -void -init_sockaddr (struct sockaddr_in *name, - const char *hostname, unsigned short int port) -{ - struct hostent *hostinfo; - - name->sin_family = AF_INET; - name->sin_port = htons (port); - hostinfo = gethostbyname (serverhost); - if (hostinfo == NULL) - { - fprintf (stderr, "Unknown host %s.\n", hostname); - exit (EXIT_FAILURE); - } - name->sin_addr = *(struct in_addr *) hostinfo->h_addr; -} diff -ruN glibc-1.06/manual/examples/makefsock.c glibc-1.07/manual/examples/makefsock.c --- glibc-1.06/manual/examples/makefsock.c Sun Dec 27 04:29:15 1992 +++ glibc-1.07/manual/examples/makefsock.c @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int -make_named_socket (const char *filename) -{ - struct sockaddr_un name; - int sock; - size_t size; - - /* Create the socket. */ - - sock = socket (PF_UNIX, SOCK_DGRAM, 0); - if (sock < 0) - { - perror ("socket"); - exit (EXIT_FAILURE); - } - - /* Bind a name to the socket. */ - - name.sun_family = AF_FILE; - strcpy (name.sun_path, filename); - - /* The size of the address is - the offset of the start of the filename, - plus its length, - plus one for the terminating null byte. */ - size = (offsetof (struct sockaddr_un, sun_path) - + strlen (name.sun_path) + 1); - - if (bind (sock, (struct sockaddr *) &name, size) < 0) - { - perror ("bind"); - exit (EXIT_FAILURE); - } - - return sock; -} diff -ruN glibc-1.06/manual/examples/makeisock.c glibc-1.07/manual/examples/makeisock.c --- glibc-1.06/manual/examples/makeisock.c Mon Nov 9 18:53:13 1992 +++ glibc-1.07/manual/examples/makeisock.c @@ -1,31 +0,0 @@ -#include -#include -#include -#include - -int -make_socket (unsigned short int port) -{ - int sock; - struct sockaddr_in name; - - /* Create the socket. */ - sock = socket (PF_INET, SOCK_STREAM, 0); - if (sock < 0) - { - perror ("socket"); - exit (EXIT_FAILURE); - } - - /* Give the socket a name. */ - name.sin_family = AF_INET; - name.sin_port = htons (port); - name.sin_addr.s_addr = htonl (INADDR_ANY); - if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0) - { - perror ("bind"); - exit (EXIT_FAILURE); - } - - return sock; -} diff -ruN glibc-1.06/manual/examples/memstream.c glibc-1.07/manual/examples/memstream.c --- glibc-1.06/manual/examples/memstream.c Mon May 18 22:10:06 1992 +++ glibc-1.07/manual/examples/memstream.c @@ -1,19 +0,0 @@ -#include - -int -main (void) -{ - char *bp; - size_t size; - FILE *stream; - - stream = open_memstream (&bp, &size); - fprintf (stream, "hello"); - fflush (stream); - printf ("buf = %s, size = %d\n", bp, size); - fprintf (stream, ", world"); - fclose (stream); - printf ("buf = %s, size = %d\n", bp, size); - - return 0; -} diff -ruN glibc-1.06/manual/examples/memstrm.c glibc-1.07/manual/examples/memstrm.c --- glibc-1.06/manual/examples/memstrm.c +++ glibc-1.07/manual/examples/memstrm.c Thu Jun 10 18:00:17 1993 @@ -0,0 +1,19 @@ +#include + +int +main (void) +{ + char *bp; + size_t size; + FILE *stream; + + stream = open_memstream (&bp, &size); + fprintf (stream, "hello"); + fflush (stream); + printf ("buf = %s, size = %d\n", bp, size); + fprintf (stream, ", world"); + fclose (stream); + printf ("buf = %s, size = %d\n", bp, size); + + return 0; +} diff -ruN glibc-1.06/manual/examples/mkfsock.c glibc-1.07/manual/examples/mkfsock.c --- glibc-1.06/manual/examples/mkfsock.c +++ glibc-1.07/manual/examples/mkfsock.c Thu Jun 10 18:00:26 1993 @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include +#include + +int +make_named_socket (const char *filename) +{ + struct sockaddr_un name; + int sock; + size_t size; + + /* Create the socket. */ + + sock = socket (PF_UNIX, SOCK_DGRAM, 0); + if (sock < 0) + { + perror ("socket"); + exit (EXIT_FAILURE); + } + + /* Bind a name to the socket. */ + + name.sun_family = AF_FILE; + strcpy (name.sun_path, filename); + + /* The size of the address is + the offset of the start of the filename, + plus its length, + plus one for the terminating null byte. */ + size = (offsetof (struct sockaddr_un, sun_path) + + strlen (name.sun_path) + 1); + + if (bind (sock, (struct sockaddr *) &name, size) < 0) + { + perror ("bind"); + exit (EXIT_FAILURE); + } + + return sock; +} diff -ruN glibc-1.06/manual/examples/mkisock.c glibc-1.07/manual/examples/mkisock.c --- glibc-1.06/manual/examples/mkisock.c +++ glibc-1.07/manual/examples/mkisock.c Thu Jun 10 18:00:27 1993 @@ -0,0 +1,31 @@ +#include +#include +#include +#include + +int +make_socket (unsigned short int port) +{ + int sock; + struct sockaddr_in name; + + /* Create the socket. */ + sock = socket (PF_INET, SOCK_STREAM, 0); + if (sock < 0) + { + perror ("socket"); + exit (EXIT_FAILURE); + } + + /* Give the socket a name. */ + name.sin_family = AF_INET; + name.sin_port = htons (port); + name.sin_addr.s_addr = htonl (INADDR_ANY); + if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0) + { + perror ("bind"); + exit (EXIT_FAILURE); + } + + return sock; +} diff -ruN glibc-1.06/manual/examples/search.c glibc-1.07/manual/examples/search.c --- glibc-1.06/manual/examples/search.c Mon Oct 19 15:27:47 1992 +++ glibc-1.07/manual/examples/search.c Mon Aug 30 17:10:55 1993 @@ -5,28 +5,29 @@ /* Define an array of critters to sort. */ struct critter -{ - char *name; - char *species; -}; - -struct critter muppets[]= -{ - {"Kermit", "frog"}, - {"Piggy", "pig"}, - {"Gonzo", "whatever"}, - {"Fozzie", "bear"}, - {"Sam", "eagle"}, - {"Robin", "frog"}, - {"Animal", "animal"}, - {"Camilla", "chicken"}, - {"Sweetums", "monster"}, - {"Dr. Strangepork", "pig"}, - {"Link Hogthrob", "pig"}, - {"Zoot", "human"}, - {"Dr. Bunsen Honeydew", "human"}, - {"Beaker", "human"}, - {"Swedish Chef", "human"}}; + { + const char *name; + const char *species; + }; + +struct critter muppets[] = + { + {"Kermit", "frog"}, + {"Piggy", "pig"}, + {"Gonzo", "whatever"}, + {"Fozzie", "bear"}, + {"Sam", "eagle"}, + {"Robin", "frog"}, + {"Animal", "animal"}, + {"Camilla", "chicken"}, + {"Sweetums", "monster"}, + {"Dr. Strangepork", "pig"}, + {"Link Hogthrob", "pig"}, + {"Zoot", "human"}, + {"Dr. Bunsen Honeydew", "human"}, + {"Beaker", "human"}, + {"Swedish Chef", "human"} + }; int count = sizeof (muppets) / sizeof (struct critter); @@ -54,7 +55,7 @@ /* Do the lookup into the sorted array. */ void -find_critter (char *name) +find_critter (const char *name) { struct critter target, *result; target.name = name; diff -ruN glibc-1.06/manual/examples/select.c glibc-1.07/manual/examples/select.c --- glibc-1.06/manual/examples/select.c Mon Oct 19 16:56:12 1992 +++ glibc-1.07/manual/examples/select.c Sun Jun 20 19:39:00 1993 @@ -18,12 +18,15 @@ timeout.tv_usec = 0; /* @code{select} returns 0 if timeout, 1 if input available, -1 if error. */ - return TEMP_FAILURE_RETRY (select (FD_SETSIZE, &set, NULL, NULL, &timeout)); + return TEMP_FAILURE_RETRY (select (FD_SETSIZE, + &set, NULL, NULL, + &timeout)); } int main (void) { - fprintf (stderr, "select returned %d.\n", input_timeout (STDIN_FILENO, 5)); + fprintf (stderr, "select returned %d.\n", + input_timeout (STDIN_FILENO, 5)); return 0; } diff -ruN glibc-1.06/manual/examples/stpcpy.c glibc-1.07/manual/examples/stpcpy.c --- glibc-1.06/manual/examples/stpcpy.c Fri Oct 16 19:27:45 1992 +++ glibc-1.07/manual/examples/stpcpy.c Mon Aug 30 16:46:14 1993 @@ -1,10 +1,13 @@ #include +#include int main (void) { + char buffer[10]; char *to = buffer; to = stpcpy (to, "foo"); to = stpcpy (to, "bar"); - printf ("%s\n", buffer); + puts (buffer); + return 0; } diff -ruN glibc-1.06/manual/examples/strftim.c glibc-1.07/manual/examples/strftim.c --- glibc-1.06/manual/examples/strftim.c +++ glibc-1.07/manual/examples/strftim.c Thu Jun 10 18:00:38 1993 @@ -0,0 +1,31 @@ +#include +#include + +#define SIZE 256 + +int +main (void) +{ + char buffer[SIZE]; + time_t curtime; + struct tm *loctime; + + /* Get the current time. */ + curtime = time (NULL); + + /* Convert it to local time representation. */ + loctime = localtime (&curtime); + + /* Print out the date and time in the standard format. */ + fputs (asctime (loctime), stdout); + +/*@group*/ + /* Print it out in a nice format. */ + strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime); + fputs (buffer, stdout); + strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime); + fputs (buffer, stdout); + + return 0; +} +/*@end group*/ diff -ruN glibc-1.06/manual/examples/strftime.c glibc-1.07/manual/examples/strftime.c --- glibc-1.06/manual/examples/strftime.c Mon Oct 19 19:24:10 1992 +++ glibc-1.07/manual/examples/strftime.c @@ -1,31 +0,0 @@ -#include -#include - -#define SIZE 256 - -int -main (void) -{ - char buffer[SIZE]; - time_t curtime; - struct tm *loctime; - - /* Get the current time. */ - curtime = time (NULL); - - /* Convert it to local time representation. */ - loctime = localtime (&curtime); - - /* Print out the date and time in the standard format. */ - fputs (asctime (loctime), stdout); - -/*@group*/ - /* Print it out in a nice format. */ - strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime); - fputs (buffer, stdout); - strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime); - fputs (buffer, stdout); - - return 0; -} -/*@end group*/ diff -ruN glibc-1.06/manual/examples/strncat.c glibc-1.07/manual/examples/strncat.c --- glibc-1.06/manual/examples/strncat.c Mon May 18 22:10:10 1992 +++ glibc-1.07/manual/examples/strncat.c Mon Aug 30 16:57:13 1993 @@ -8,7 +8,7 @@ main () { strncpy (buffer, "hello", SIZE); - printf ("%s\n", buffer); + puts (buffer); strncat (buffer, ", world", SIZE - strlen (buffer) - 1); - printf ("%s\n", buffer); + puts (buffer); } diff -ruN glibc-1.06/manual/filecli.c.texi glibc-1.07/manual/filecli.c.texi --- glibc-1.06/manual/filecli.c.texi +++ glibc-1.07/manual/filecli.c.texi Thu Jun 10 18:00:36 1993 @@ -0,0 +1,54 @@ +#include +#include +#include +#include +#include +#include + +#define SERVER "/tmp/serversocket" +#define CLIENT "/tmp/mysocket" +#define MAXMSG 512 +#define MESSAGE "Yow!!! Are we having fun yet?!?" + +int +main (void) +@{ + extern int make_named_socket (const char *name); + int sock; + char message[MAXMSG]; + struct sockaddr_un name; + size_t size; + int nbytes; + + /* @r{Make the socket.} */ + sock = make_named_socket (CLIENT); + + /* @r{Initialize the server socket address.} */ + name.sun_family = AF_UNIX; + strcpy (name.sun_path, SERVER); + size = strlen (name.sun_path) + sizeof (name.sun_family); + + /* @r{Send the datagram.} */ + nbytes = sendto (sock, MESSAGE, strlen (MESSAGE) + 1, 0, + (struct sockaddr *) & name, size); + if (nbytes < 0) + @{ + perror ("sendto (client)"); + exit (EXIT_FAILURE); + @} + + /* @r{Wait for a reply.} */ + nbytes = recvfrom (sock, message, MAXMSG, 0, NULL, 0); + if (nbytes < 0) + @{ + perror ("recfrom (client)"); + exit (EXIT_FAILURE); + @} + + /* @r{Print a diagnostic message.} */ + fprintf (stderr, "Client: got message: %s\n", message); + + /* @r{Clean up.} */ + remove (CLIENT); + close (sock); +@} diff -ruN glibc-1.06/manual/fileclient.c.texi glibc-1.07/manual/fileclient.c.texi --- glibc-1.06/manual/fileclient.c.texi Tue Jan 5 14:46:16 1993 +++ glibc-1.07/manual/fileclient.c.texi @@ -1,54 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#define SERVER "/tmp/serversocket" -#define CLIENT "/tmp/mysocket" -#define MAXMSG 512 -#define MESSAGE "Yow!!! Are we having fun yet?!?" - -int -main (void) -@{ - extern int make_named_socket (const char *name); - int sock; - char message[MAXMSG]; - struct sockaddr_un name; - size_t size; - int nbytes; - - /* @r{Make the socket. } */ - sock = make_named_socket (CLIENT); - - /* @r{Initialize the server socket address. } */ - name.sun_family = AF_UNIX; - strcpy (name.sun_path, SERVER); - size = strlen (name.sun_path) + sizeof (name.sun_family); - - /* @r{Send the datagram. } */ - nbytes = sendto (sock, MESSAGE, strlen (MESSAGE) + 1, 0, - (struct sockaddr *) & name, size); - if (nbytes < 0) - @{ - perror ("sendto (client)"); - exit (EXIT_FAILURE); - @} - - /* @r{Wait for a reply. } */ - nbytes = recvfrom (sock, message, MAXMSG, 0, NULL, 0); - if (nbytes < 0) - @{ - perror ("recfrom (client)"); - exit (EXIT_FAILURE); - @} - - /* @r{Print a diagnostic message. } */ - fprintf (stderr, "Client: got message: %s\n", message); - - /* @r{Clean up. } */ - remove (CLIENT); - close (sock); -@} diff -ruN glibc-1.06/manual/fileserver.c.texi glibc-1.07/manual/fileserver.c.texi --- glibc-1.06/manual/fileserver.c.texi Tue Jan 5 14:45:57 1993 +++ glibc-1.07/manual/fileserver.c.texi @@ -1,46 +0,0 @@ -#include -#include -#include -#include -#include - -#define SERVER "/tmp/serversocket" -#define MAXMSG 512 - -int -main (void) -@{ - int sock; - char message[MAXMSG]; - struct sockaddr_un name; - size_t size; - int nbytes; - - /* @r{Make the socket, then loop endlessly. } */ - - sock = make_named_socket (SERVER); - while (1) - @{ - /* @r{Wait for a datagram. } */ - size = sizeof (name); - nbytes = recvfrom (sock, message, MAXMSG, 0, - (struct sockaddr *) & name, &size); - if (nbytes < 0) - @{ - perror ("recfrom (server)"); - exit (EXIT_FAILURE); - @} - - /* @r{Give a diagnostic message. } */ - fprintf (stderr, "Server: got message: %s\n", message); - - /* @r{Bounce the message back to the sender. } */ - nbytes = sendto (sock, message, nbytes, 0, - (struct sockaddr *) & name, size); - if (nbytes < 0) - @{ - perror ("sendto (server)"); - exit (EXIT_FAILURE); - @} - @} -@} diff -ruN glibc-1.06/manual/filesrv.c.texi glibc-1.07/manual/filesrv.c.texi --- glibc-1.06/manual/filesrv.c.texi +++ glibc-1.07/manual/filesrv.c.texi Thu Jun 10 18:00:34 1993 @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include + +#define SERVER "/tmp/serversocket" +#define MAXMSG 512 + +int +main (void) +@{ + int sock; + char message[MAXMSG]; + struct sockaddr_un name; + size_t size; + int nbytes; + + /* @r{Make the socket, then loop endlessly.} */ + + sock = make_named_socket (SERVER); + while (1) + @{ + /* @r{Wait for a datagram.} */ + size = sizeof (name); + nbytes = recvfrom (sock, message, MAXMSG, 0, + (struct sockaddr *) & name, &size); + if (nbytes < 0) + @{ + perror ("recfrom (server)"); + exit (EXIT_FAILURE); + @} + + /* @r{Give a diagnostic message.} */ + fprintf (stderr, "Server: got message: %s\n", message); + + /* @r{Bounce the message back to the sender.} */ + nbytes = sendto (sock, message, nbytes, 0, + (struct sockaddr *) & name, size); + if (nbytes < 0) + @{ + perror ("sendto (server)"); + exit (EXIT_FAILURE); + @} + @} +@} diff -ruN glibc-1.06/manual/filesys.texi glibc-1.07/manual/filesys.texi --- glibc-1.06/manual/filesys.texi Wed May 12 14:26:00 1993 +++ glibc-1.07/manual/filesys.texi Tue Aug 3 02:58:40 1993 @@ -24,6 +24,7 @@ * Creating Directories:: A system call just for creating a directory. * File Attributes:: Attributes of individual files. * Making Special Files:: How to create special files. +* Temporary Files:: Naming and creating temporary files. @end menu @node Working Directory @@ -87,7 +88,7 @@ @w{@code{getcwd (NULL, 0)}} using only the standard behavior of @code{getcwd}: -@example +@smallexample char * gnu_getcwd () @{ @@ -104,7 +105,7 @@ buffer = (char *) xmalloc (size); @} @} -@end example +@end smallexample @noindent @xref{Malloc Examples}, for information about @code{xmalloc}, which is @@ -266,7 +267,8 @@ subsequent call. @strong{Portability Note:} On some systems, @code{readdir} may not -return entries for @file{.} and @file{..}. @xref{File Name Resolution}. +return entries for @file{.} and @file{..}, even though these are always +valid file names in any directory. @xref{File Name Resolution}. If there are no more entries in the directory or an error is detected, @code{readdir} returns a null pointer. The following @code{errno} error @@ -299,13 +301,13 @@ Here's a simple program that prints the names of the files in the current working directory: -@example +@smallexample @include dir.c.texi -@end example +@end smallexample The order in which files appear in a directory tends to be fairly random. A more useful program would sort the entries (perhaps by -alphabetizing them) before printing them; see @ref{Array Sort Function} +alphabetizing them) before printing them; see @ref{Array Sort Function}. @c ??? not documented: scandir, alphasort @@ -518,7 +520,7 @@ there was room to return the entire name. So make a bigger buffer and call @code{readlink} again. Here is an example: -@example +@smallexample char * readlink_malloc (char *filename) @{ @@ -534,7 +536,7 @@ size *= 2; @} @} -@end example +@end smallexample @c @group Invalid outside example. A value of @code{-1} is returned in case of error. In addition to the @@ -909,9 +911,9 @@ You can tell (approximately) whether a file is sparse by comparing this value with @code{st_size}, like this: -@example +@smallexample (st.st_blocks * 512 < st.st_size) -@end example +@end smallexample This test is not perfect because a file that is just slightly sparse might not be detected as sparse at all. For practical applications, @@ -1093,16 +1095,16 @@ @code{S_IFMT} to extract the file type code, and compared to the appropriate type code constant. For example, -@example +@smallexample S_ISCHR (@var{mode}) -@end example +@end smallexample @noindent is equivalent to: -@example +@smallexample ((@var{mode} & S_IFMT) == S_IFCHR) -@end example +@end smallexample @comment sys/stat.h @comment BSD @@ -1495,7 +1497,7 @@ Here is an example showing how to read the mask with @code{umask} without changing it permanently: -@example +@smallexample mode_t read_umask (void) @{ @@ -1502,7 +1504,7 @@ mask = umask (0); umask (mask); @} -@end example +@end smallexample @noindent However, it is better to use @code{getumask} if you just want to read @@ -1848,3 +1850,146 @@ @end table @end deftypefun +@node Temporary Files +@section Temporary Files + +If you need to use a temporary file in your program, you can use the +@code{tmpfile} function to open it. Or you can use the @code{tmpnam} +function make a name for a temporary file and then open it in the usual +way with @code{fopen}. + +The @code{tempnam} function is like @code{tmpnam} but lets you choose +what directory temporary files will go in, and something about what +their file names will look like. + +These facilities are declared in the header file @file{stdio.h}. +@pindex stdio.h + +@comment stdio.h +@comment ANSI +@deftypefun {FILE *} tmpfile (void) +This function creates a temporary binary file for update mode, as if by +calling @code{fopen} with mode @code{"wb+"}. The file is deleted +automatically when it is closed or when the program terminates. (On +some other ANSI C systems the file may fail to be deleted if the program +terminates abnormally). +@end deftypefun + +@comment stdio.h +@comment ANSI +@deftypefun {char *} tmpnam (char *@var{result}) +This function constructs and returns a file name that is a valid file +name and that does not name any existing file. If the @var{result} +argument is a null pointer, the return value is a pointer to an internal +static string, which might be modified by subsequent calls. Otherwise, +the @var{result} argument should be a pointer to an array of at least +@code{L_tmpnam} characters, and the result is written into that array. + +It is possible for @code{tmpnam} to fail if you call it too many times. +This is because the fixed length of a temporary file name gives room for +only a finite number of different names. If @code{tmpnam} fails, it +returns a null pointer. +@end deftypefun + +@comment stdio.h +@comment ANSI +@deftypevr Macro int L_tmpnam +The value of this macro is an integer constant expression that represents +the minimum allocation size of a string large enough to hold the +file name generated by the @code{tmpnam} function. +@end deftypevr + +@comment stdio.h +@comment ANSI +@deftypevr Macro int TMP_MAX +The macro @code{TMP_MAX} is a lower bound for how many temporary names +you can create with @code{tmpnam}. You can rely on being able to call +@code{tmpnam} at least this many times before it might fail saying you +have made too many temporary file names. + +With the GNU library, you can create a very large number of temporary +file names---if you actually create the files, you will probably run out +of disk space before you run out of names. Some other systems have a +fixed, small limit on the number of temporary files. The limit is never +less than @code{25}. +@end deftypevr + +@comment stdio.h +@comment SVID +@deftypefun {char *} tempnam (const char *@var{dir}, const char *@var{prefix}) +This function generates a unique temporary filename. If @var{prefix} is +not a null pointer, up to five characters of this string are used as +a prefix for the file name. + +The directory prefix for the temporary file name is determined by testing +each of the following, in sequence. The directory must exist and be +writable. + +@itemize @bullet +@item +The environment variable @code{TMPDIR}, if it is defined. + +@item +The @var{dir} argument, if it is not a null pointer. + +@item +The value of the @code{P_tmpdir} macro. + +@item +The directory @file{/tmp}. +@end itemize + +This function is defined for SVID compatibility. +@end deftypefun +@cindex TMPDIR environment variable + +@comment stdio.h +@comment SVID +@c !!! are we putting SVID/GNU/POSIX.1/BSD in here or not?? +@deftypevr {SVID Macro} {char *} P_tmpdir +This macro is the name of the default directory for temporary files. +@end deftypevr + +Older Unix systems did not have the functions just described. Instead +they used @code{mktemp} and @code{mkstemp}. Both of these functions +work by modifying a file name template string you pass. The last six +characters of this string must be @samp{XXXXXX}. These six @samp{X}s +are replaced with six characters which make the whole string a unique +file name. Usually the template string is something like +@samp{/tmp/@var{prefix}XXXXXX}, and each program uses a unique @var{prefix}. + +@strong{Note:} Because @code{mktemp} and @code{mkstemp} modify the +template string, you @emph{must not} pass string constants to them. +String constants are normally in read-only storage, so your program +would crash when @code{mktemp} or @code{mkstemp} tried to modify the +string. + +@comment unistd.h +@comment Unix +@deftypefun {char *} mktemp (char *@var{template}) +The @code{mktemp} function generates a unique file name by modifying +@var{template} as described above. If successful, it returns +@var{template} as modified. If @code{mktemp} cannot find a unique file +name, it makes @var{template} an empty string and returns that. If +@var{template} does not end with @samp{XXXXXX}, @code{mktemp} returns a +null pointer. +@end deftypefun + +@comment unistd.h +@comment BSD +@deftypefun int mkstemp (char *@var{template}) +The @code{mkstemp} function generates a unique file name just as +@code{mktemp} does, but it also opens the file for you with @code{open} +(@pxref{Opening and Closing Files}). If successful, it modifies +@var{template} in place and returns a file descriptor open on that file +for reading and writing. If @code{mkstemp} cannot create a +uniquely-named file, it makes @var{template} an empty string and returns +@code{-1}. If @var{template} does not end with @samp{XXXXXX}, +@code{mkstemp} returns @code{-1} and does not modify @var{template}. +@end deftypefun + +Unlike @code{mktemp}, @code{mkstemp} is actually guaranteed to create a +unique file that cannot possibly clash with any other program trying to +create a temporary file. This is because it works by calling +@code{open} with the @code{O_EXCL} flag bit, which says you want to +always create a new file, and get an error if the file already exists. diff -ruN glibc-1.06/manual/inetcli.c.texi glibc-1.07/manual/inetcli.c.texi --- glibc-1.06/manual/inetcli.c.texi +++ glibc-1.07/manual/inetcli.c.texi Sun Jun 20 19:56:31 1993 @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define PORT 5555 +#define MESSAGE "Yow!!! Are we having fun yet?!?" +#define SERVERHOST "churchy.gnu.ai.mit.edu" + +void +write_to_server (int filedes) +@{ + int nbytes; + + nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1); + if (nbytes < 0) + @{ + perror ("write"); + exit (EXIT_FAILURE); + @} +@} + + +int +main (void) +@{ + extern void init_sockaddr (struct sockaddr_in *name, + const char *hostname, + unsigned short int port); + int sock; + struct sockaddr_in servername; + + /* @r{Create the socket.} */ + sock = socket (PF_INET, SOCK_STREAM, 0); + if (sock < 0) + @{ + perror ("socket (client)"); + exit (EXIT_FAILURE); + @} + + /* @r{Connect to the server.} */ + init_sockaddr (&servername, SERVERHOST, PORT); + if (0 > connect (sock, + (struct sockaddr *) &servername, + sizeof (servername))) + @{ + perror ("connect (client)"); + exit (EXIT_FAILURE); + @} + + /* @r{Send data to the server.} */ + write_to_server (sock); + close (sock); + exit (EXIT_SUCCESS); +@} diff -ruN glibc-1.06/manual/inetclient.c.texi glibc-1.07/manual/inetclient.c.texi --- glibc-1.06/manual/inetclient.c.texi Tue Jan 5 17:39:32 1993 +++ glibc-1.07/manual/inetclient.c.texi @@ -1,58 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#define PORT 5555 -#define MESSAGE "Yow!!! Are we having fun yet?!?" -#define SERVERHOST "churchy.gnu.ai.mit.edu" - -void -write_to_server (int filedes) -@{ - int nbytes; - - nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1); - if (nbytes < 0) - @{ - perror ("write"); - exit (EXIT_FAILURE); - @} -@} - - -int -main (void) -@{ - extern void init_sockaddr (struct sockaddr_in *name, - const char *hostname, unsigned short int port); - int sock; - struct sockaddr_in servername; - - /* @r{Create the socket. } */ - sock = socket (PF_INET, SOCK_STREAM, 0); - if (sock < 0) - @{ - perror ("socket (client)"); - exit (EXIT_FAILURE); - @} - - /* @r{Connect to the server. } */ - init_sockaddr (&servername, SERVERHOST, PORT); - if (0 > connect (sock, - (struct sockaddr *) &servername, - sizeof (servername))) - @{ - perror ("connect (client)"); - exit (EXIT_FAILURE); - @} - - /* @r{Send data to the server. } */ - write_to_server (sock); - close (sock); - exit (EXIT_SUCCESS); -@} diff -ruN glibc-1.06/manual/inetserver.c.texi glibc-1.07/manual/inetserver.c.texi --- glibc-1.06/manual/inetserver.c.texi Tue Jan 5 14:45:35 1993 +++ glibc-1.07/manual/inetserver.c.texi @@ -1,100 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#define PORT 5555 -#define MAXMSG 512 - -int -read_from_client (int filedes) -@{ - char buffer[MAXMSG]; - int nbytes; - - nbytes = read (filedes, buffer, MAXMSG); - if (nbytes < 0) - @{ - /* @r{Read error. } */ - perror ("read"); - exit (EXIT_FAILURE); - @} - else if (nbytes == 0) - /* @r{End-of-file. } */ - return -1; - else - @{ - /* @r{Data read. } */ - fprintf (stderr, "Server: got message: `%s'\n", buffer); - return 0; - @} -@} - -int -main (void) -@{ - extern int make_socket (unsigned short int port); - int sock; - int status; - fd_set active_fd_set, read_fd_set; - int i; - struct sockaddr_in clientname; - size_t size; - - /* @r{Create the socket and set it up to accept connections. } */ - sock = make_socket (PORT); - if (listen (sock, 1) < 0) - @{ - perror ("listen"); - exit (EXIT_FAILURE); - @} - - /* @r{Initialize the set of active sockets. } */ - FD_ZERO (&active_fd_set); - FD_SET (sock, &active_fd_set); - - while (1) - @{ - /* @r{Block until input arrives on one or more active sockets. } */ - read_fd_set = active_fd_set; - if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0) - @{ - perror ("select"); - exit (EXIT_FAILURE); - @} - - /* @r{Service all the sockets with input pending. } */ - for (i = 0; i < FD_SETSIZE; ++i) - if (FD_ISSET (i, &read_fd_set)) - @{ - if (i == sock) - @{ - /* @r{Connection request on original socket. } */ - size = sizeof (clientname); - if (accept (sock, - (struct sockaddr *) &clientname, &size) < 0) - @{ - perror ("accept"); - exit (EXIT_FAILURE); - @} - fprintf (stderr, "Server: connect from host %s, port %hd.\n", - inet_ntoa (clientname.sin_addr), - ntohs (clientname.sin_port)); - FD_SET (status, &active_fd_set); - @} - else - @{ - /* @r{Data arriving on an already-connected socket. } */ - if (read_from_client (i) < 0) - @{ - close (i); - FD_CLR (i, &active_fd_set); - @} - @} - @} - @} -@} diff -ruN glibc-1.06/manual/inetsrv.c.texi glibc-1.07/manual/inetsrv.c.texi --- glibc-1.06/manual/inetsrv.c.texi +++ glibc-1.07/manual/inetsrv.c.texi Sun Jun 20 19:56:32 1993 @@ -0,0 +1,101 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define PORT 5555 +#define MAXMSG 512 + +int +read_from_client (int filedes) +@{ + char buffer[MAXMSG]; + int nbytes; + + nbytes = read (filedes, buffer, MAXMSG); + if (nbytes < 0) + @{ + /* @r{Read error.} */ + perror ("read"); + exit (EXIT_FAILURE); + @} + else if (nbytes == 0) + /* @r{End-of-file.} */ + return -1; + else + @{ + /* @r{Data read.} */ + fprintf (stderr, "Server: got message: `%s'\n", buffer); + return 0; + @} +@} + +int +main (void) +@{ + extern int make_socket (unsigned short int port); + int sock; + int status; + fd_set active_fd_set, read_fd_set; + int i; + struct sockaddr_in clientname; + size_t size; + + /* @r{Create the socket and set it up to accept connections.} */ + sock = make_socket (PORT); + if (listen (sock, 1) < 0) + @{ + perror ("listen"); + exit (EXIT_FAILURE); + @} + + /* @r{Initialize the set of active sockets.} */ + FD_ZERO (&active_fd_set); + FD_SET (sock, &active_fd_set); + + while (1) + @{ + /* @r{Block until input arrives on one or more active sockets.} */ + read_fd_set = active_fd_set; + if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0) + @{ + perror ("select"); + exit (EXIT_FAILURE); + @} + + /* @r{Service all the sockets with input pending.} */ + for (i = 0; i < FD_SETSIZE; ++i) + if (FD_ISSET (i, &read_fd_set)) + @{ + if (i == sock) + @{ + /* @r{Connection request on original socket.} */ + size = sizeof (clientname); + if (accept (sock, + (struct sockaddr *) &clientname, &size) < 0) + @{ + perror ("accept"); + exit (EXIT_FAILURE); + @} + fprintf (stderr, + "Server: connect from host %s, port %hd.\n", + inet_ntoa (clientname.sin_addr), + ntohs (clientname.sin_port)); + FD_SET (status, &active_fd_set); + @} + else + @{ + /* @r{Data arriving on an already-connected socket.} */ + if (read_from_client (i) < 0) + @{ + close (i); + FD_CLR (i, &active_fd_set); + @} + @} + @} + @} +@} diff -ruN glibc-1.06/manual/intro.texi glibc-1.07/manual/intro.texi --- glibc-1.06/manual/intro.texi Wed May 12 14:26:02 1993 +++ glibc-1.07/manual/intro.texi Mon Aug 30 19:40:09 1993 @@ -16,7 +16,7 @@ The purpose of this manual is to tell you how to use the facilities of the GNU library. We have mentioned which features belong to which standards to help you identify things that are potentially nonportable -to other systems. But the emphasis on this manual is not on strict +to other systems. But the emphasis in this manual is not on strict portability. @menu @@ -127,17 +127,17 @@ Interface for Computer Environments}. POSIX is derived mostly from various versions of the Unix operating system. -The library facilities specified by the POSIX standard are a superset of -those required by ANSI C; POSIX specifies additional features for ANSI C -functions, as well as specifying new additional functions. In general, -the additional requirements and functionality defined by the POSIX -standard are aimed at providing lower-level support for a particular -kind of operating system environment, rather than general programming -language support which can run in many diverse operating system -environments.@refill +The library facilities specified by the POSIX standards are a superset +of those required by ANSI C; POSIX specifies additional features for +ANSI C functions, as well as specifying new additional functions. In +general, the additional requirements and functionality defined by the +POSIX standards are aimed at providing lower-level support for a +particular kind of operating system environment, rather than general +programming language support which can run in many diverse operating +system environments.@refill The GNU C library implements all of the functions specified in -@cite{IEEE Std 1003.1-1988, the POSIX System Application Program +@cite{IEEE Std 1003.1-1990, the POSIX System Application Program Interface}, commonly referred to as POSIX.1. The primary extensions to the ANSI C facilities specified by this standard include file system interface primitives (@pxref{File System Interface}), device-specific @@ -144,10 +144,10 @@ terminal control functions (@pxref{Low-Level Terminal Interface}), and process control functions (@pxref{Child Processes}). -Some facilities from draft 11 of @cite{IEEE Std 1003.2, the POSIX Shell -and Utilities standard} (POSIX.2) are also implemented in the GNU -library. These include utilities for dealing with regular expressions -and other pattern matching facilities (@pxref{Pattern Matching}). +Some facilities from @cite{IEEE Std 1003.2-1992, the POSIX Shell and +Utilities standard} (POSIX.2) are also implemented in the GNU library. +These include utilities for dealing with regular expressions and other +pattern matching facilities (@pxref{Pattern Matching}). @comment Roland sez: @comment The GNU C library as it stands conforms to 1003.2 draft 11, which @@ -166,15 +166,17 @@ @node Berkeley Unix, SVID, POSIX, Standards and Portability @subsection Berkeley Unix @cindex BSD Unix -@cindex 4.x BSD Unix +@cindex 4.@var{n} BSD Unix @cindex Berkeley Unix @cindex SunOS @cindex Unix, Berkeley -The GNU C library defines facilities from some other versions of Unix, -specifically from the 4.2 BSD and 4.3 BSD Unix systems (also known as -@dfn{Berkeley Unix}) and from @dfn{SunOS} (a popular 4.2 BSD derivative -that includes some Unix System V functionality). +The GNU C library defines facilities from some versions of Unix which +are not formally standardized, specifically from the 4.2 BSD, 4.3 BSD, +and 4.4 BSD Unix systems (also known as @dfn{Berkeley Unix}) and from +@dfn{SunOS} (a popular 4.2 BSD derivative that includes some Unix System +V functionality). These systems support most of the ANSI and POSIX +facilities, and 4.4 BSD and newer releases of SunOS in fact support them all. The BSD facilities include symbolic links (@pxref{Symbolic Links}), the @code{select} function (@pxref{Waiting for I/O}), the BSD signal @@ -197,11 +199,9 @@ obscure and less generally useful facilities required by the SVID are not included. (In fact, Unix System V itself does not provide them all.) -@strong{Incomplete:} Are there any particular System V facilities that -ought to be mentioned specifically here? +@c !!! mention sysv ipc/shmem when it is there. - @node Using the Library, Roadmap to the Manual, Standards and Portability, Introduction @section Using the Library @@ -248,9 +248,9 @@ @samp{#include} preprocessor directive. The C language supports two forms of this directive; the first, -@example +@smallexample #include "@var{header}" -@end example +@end smallexample @noindent is typically used to include a header file @var{header} that you write @@ -258,9 +258,9 @@ interfaces between the different parts of your particular application. By contrast, -@example +@smallexample #include -@end example +@end smallexample @noindent is typically used to include a header file @file{file.h} that contains @@ -325,9 +325,9 @@ Taking the address of a library function works even if it is also defined as a macro. This is because, in this context, the name of the function isn't followed by the left parenthesis that is syntactically -necessary to recognize the a macro call. +necessary to recognize a macro call. -You might occasionally want to avoid using the a macro definition of a +You might occasionally want to avoid using the macro definition of a function---perhaps to make your program easier to debug. There are two ways you can do this: @@ -347,17 +347,17 @@ For example, suppose the header file @file{stdlib.h} declares a function named @code{abs} with -@example +@smallexample extern int abs (int); -@end example +@end smallexample @noindent and also provides a macro definition for @code{abs}. Then, in: -@example +@smallexample #include int f (int *i) @{ return (abs (++*i)); @} -@end example +@end smallexample @noindent the reference to @code{abs} might refer to either a macro or a function. @@ -364,13 +364,13 @@ On the other hand, in each of the following examples the reference is to a function and not a macro. -@example +@smallexample #include int g (int *i) @{ return ((abs)(++*i)); @} #undef abs int h (int *i) @{ return (abs (++*i)); @} -@end example +@end smallexample Since macro definitions that double for a function behave in exactly the same way as the actual function version, there is usually no @@ -386,7 +386,7 @@ The names of all library types, macros, variables and functions that come from the ANSI C standard are reserved unconditionally; your program @strong{may not} redefine these names. All other library names are -reserved if your programs explicitly includes the header file that +reserved if your program explicitly includes the header file that defines or declares them. There are several reasons for these restrictions: @@ -447,7 +447,7 @@ @item Names of all existing mathematics functions (@pxref{Mathematics}) suffixed with @samp{f} or @samp{l} are reserved for corresponding -functions that operate on @code{float} or @code{long double} arguments, +functions that operate on @code{float} and @code{long double} arguments, respectively. @item @@ -523,16 +523,19 @@ The exact set of features available when you compile a source file is controlled by which @dfn{feature test macros} you define. -If you compile your programs using @samp{gcc -ansi}, you get only -the ANSI C library features, unless you explicitly request additional +If you compile your programs using @samp{gcc -ansi}, you get only the +ANSI C library features, unless you explicitly request additional features by defining one or more of the feature macros. -@xref{Options,,, gcc.info, The GNU CC Manual}, for more information -about GCC options.@refill +@xref{Invoking GCC,, GNU CC Command Options, gcc.info, The GNU CC Manual}, +for more information about GCC options.@refill You should define these macros by using @samp{#define} preprocessor -directives at the top of your source code files. You could also use -the @samp{-D} option to GCC, but it's better if you make the source -files indicate their own meaning in a self-contained way. +directives at the top of your source code files. These directives +@emph{must} come before any @code{#include} of a system header file. It +is best to make them the very first thing in the file, preceded only by +comments. You could also use the @samp{-D} option to GCC, but it's +better if you make the source files indicate their own meaning in a +self-contained way. @comment (none) @comment POSIX.1 @@ -563,6 +566,19 @@ corresponding features specified by the POSIX.1 standard. If this macro is defined, the 4.3 BSD definitions take precedence over the POSIX definitions. + +Due to the nature of some of the conflicts between 4.3 BSD and POSIX.1, +you need to use a special @dfn{BSD compatibility library} when linking +programs compiled for BSD compatibility. This is because some functions +must be defined in two different ways, one of them in the normal C +library, and one of them in the compatibility library. If your program +defines @code{_BSD_SOURCE}, you must give the option @samp{-lbsd-compat} +to the compiler or linker when linking the program, to tell it to find +functions in this special compatibility library before looking for them in +the normal C library. +@pindex -lbsd-compat +@pindex bsd-compat +@cindex BSD compatibility library. @end defvr @comment (none) @@ -583,33 +599,36 @@ BSD definitions take precedence over the POSIX definitions, use this sequence of definitions: -@example +@smallexample #define _GNU_SOURCE #define _BSD_SOURCE #define _SVID_SOURCE -@end example +@end smallexample + +Note that if you do this, you must link your program with the BSD +compatibility library by passing the @samp{-lbsd-compat} option to the +compiler or linker. @strong{Note:} If you forget to do this, you may +get very strange errors at run time. @end defvr -We recommend you use @code{_GNU_SOURCE} in new programs. -If you don't specify the @samp{-ansi} option to GCC and don't define -any of these macros explicitly, the effect as the same as defining -@code{_GNU_SOURCE}. - -When you define a feature test macro to request a larger class of -features, it is harmless to define in addition a feature test macro for -a subset of those features. For example, if you define -@code{_POSIX_C_SOURCE}, then defining @code{_POSIX_SOURCE} as well has -no effect. Likewise, if you define @code{_GNU_SOURCE}, then defining -either @code{_POSIX_SOURCE} or @code{_POSIX_C_SOURCE} or -@code{_SVID_SOURCE} as well has no effect. - -Note, however, that the features of @code{_BSD_SOURCE} are not a subset -of any of the other feature test macros supported. This is because it -defines BSD features that take precedence over the POSIX features that -are requested by the other macros. For this reason, defining -@code{_BSD_SOURCE} in addition to the other feature test macros does -have an effect: it causes the BSD features to take priority over the -conflicting POSIX features. +We recommend you use @code{_GNU_SOURCE} in new programs. If you don't +specify the @samp{-ansi} option to GCC and don't define any of these macros +explicitly, the effect is the same as defining @code{_GNU_SOURCE}. + +When you define a feature test macro to request a larger class of features, +it is harmless to define in addition a feature test macro for a subset of +those features. For example, if you define @code{_POSIX_C_SOURCE}, then +defining @code{_POSIX_SOURCE} as well has no effect. Likewise, if you +define @code{_GNU_SOURCE}, then defining either @code{_POSIX_SOURCE} or +@code{_POSIX_C_SOURCE} or @code{_SVID_SOURCE} as well has no effect. + +Note, however, that the features of @code{_BSD_SOURCE} are not a subset of +any of the other feature test macros supported. This is because it defines +BSD features that take precedence over the POSIX features that are +requested by the other macros. For this reason, defining +@code{_BSD_SOURCE} in addition to the other feature test macros does have +an effect: it causes the BSD features to take priority over the conflicting +POSIX features. @node Roadmap to the Manual, , Using the Library, Introduction @section Roadmap to the Manual @@ -624,9 +643,12 @@ @item @ref{Language Features}, contains information about library support for -standard parts of the C language, including things like the -@code{sizeof} operator and the symbolic constant @code{NULL}, and how to -write functions accepting variable numbers of arguments. +standard parts of the C language, including things like the @code{sizeof} +operator and the symbolic constant @code{NULL}, how to write functions +accepting variable numbers of arguments, and constants describing the +ranges and other properties of the numerical types. There is also a simple +debugging mechanism which allows you to put assertions in your code, and +have diagnostic messages printed if the tests fail. @item @ref{Memory Allocation}, describes the GNU library's facilities for @@ -644,22 +666,6 @@ manipulating strings (null-terminated character arrays) and general byte arrays, including operations such as copying and comparison. -@item -@ref{Extended Characters}, contains information about manipulating -characters and strings using character sets larger than will fit in -the usual @code{char} data type. - -@item -@ref{Locales}, describes how selecting a particular country -or language affects the behavior of the library. For example, the locale -affects collation sequences for strings and how monetary values are -formatted. - -@item -@ref{Searching and Sorting}, contains information about functions -for searching and sorting arrays. You can use these functions on any -kind of array by providing an appropriate comparison function. - @item @ref{I/O Overview}, gives an overall look at the input and output facilities in the library, and contains information about basic concepts @@ -692,8 +698,7 @@ @ref{Sockets}, describes a more complicated interprocess communication mechanism that allows processes running on different machines to communicate over a network. This chapter also contains information about -Internet host addressing and how to use the system network databases, -such as @file{/etc/hosts}. +Internet host addressing and how to use the system network databases. @item @ref{Low-Level Terminal Interface}, describes how you can change the @@ -701,11 +706,6 @@ characters typed by the user, for example, read this chapter. @item -@ref{Consistency Checking}, contains information about a simple -debugging mechanism. You can put assertions in your code, and -diagnostic messages are printed if the test fails. - -@item @ref{Mathematics}, contains information about the math library functions. These include things like random-number generators and remainder functions on integers as well as the usual trigonometric and @@ -712,12 +712,38 @@ exponential functions on floating-point numbers. @item +@ref{Low-Level Arithmetic Functions}, describes functions for simple +arithmetic, analysis of floating-point values, and reading numbers from +strings. + +@item +@ref{Searching and Sorting}, contains information about functions +for searching and sorting arrays. You can use these functions on any +kind of array by providing an appropriate comparison function. + +@item +@ref{Pattern Matching}, presents functions for matching regular expressions +and shell file name patterns, and for expanding words as the shell does. + +@item @ref{Date and Time}, describes functions for measuring both calendar time and CPU time, as well as functions for setting alarms and timers. +@item +@ref{Extended Characters}, contains information about manipulating +characters and strings using character sets larger than will fit in +the usual @code{char} data type. + +@item +@ref{Locales}, describes how selecting a particular country +or language affects the behavior of the library. For example, the locale +affects collation sequences for strings and how monetary values are +formatted. + @item @ref{Non-Local Exits}, contains descriptions of the @code{setjmp} and -@code{longjmp} functions. +@code{longjmp} functions. These functions provide a facility for +@code{goto}-like jumps which can jump from one function to another. @item @ref{Signal Handling}, tells you all about signals---what they are, @@ -725,14 +751,14 @@ signal is delivered, and how to prevent signals from arriving during critical sections of your program. -@item -@ref{Child Processes}, contains information about how to start new processes -and run programs. - @item @ref{Process Startup}, tells how your programs can access their command-line arguments and environment variables. +@item +@ref{Child Processes}, contains information about how to start new processes +and run programs. + @item @ref{Job Control}, describes functions for manipulating process groups. This material is probably only of interest if you are writing a shell. @@ -747,16 +773,19 @@ under. @item -@ref{Range of Type}, contains information about -parameters that characterize the sizes of integer and floating-point -types used by the particular C implementation that your program has -been compiled with. Most of these parameters are provided for -compatibility with ANSI C. +@ref{System Configuration}, tells you how you can get information about +various operating system limits. Most of these parameters are provided for +compatibility with POSIX. -@item -@ref{System Configuration}, tells you how you can get -information about various operating system limits. Most of these -parameters are provided for compatibility with POSIX. +@item +@ref{Library Summary}, gives a summary of all the functions, variables, and +macros in the library, with complete data types and function prototypes, +and says what standard or system each is derived from. + +@item +@ref{Maintenance}, explains how to build and install the GNU C library on +your system, how to report any bugs you might find, and how to add new +functions or port the library to a new system. @end itemize If you already know the name of the facility you are interested in, you @@ -763,4 +792,6 @@ can look it up in @ref{Library Summary}. This gives you a summary of its syntax and a pointer to where you can find a more detailed description. This appendix is particularly useful if you just want to -verify the order and type of arguments to a function, for example. +verify the order and type of arguments to a function, for example. It +also tells you what standard or system each function, variable, or macro +is derived from. diff -ruN glibc-1.06/manual/io.texi glibc-1.07/manual/io.texi --- glibc-1.06/manual/io.texi Wed May 12 14:26:03 1993 +++ glibc-1.07/manual/io.texi Mon Aug 30 20:33:06 1993 @@ -29,7 +29,7 @@ communication facilities. @item -@ref{Sockets}, covering a more complicated interprocess communication +@ref{Sockets}, which covers a more complicated interprocess communication facility with support for networking. @item @@ -128,10 +128,11 @@ @node File Position, , Streams and File Descriptors, I/O Concepts @subsection File Position -One of the attributes of an open file is its @dfn{file position} -that keeps track of where in the file the next character is to be read -or written. In the GNU system, the file position is simply an integer -representing the number of bytes from the beginning of the file. +One of the attributes of an open file is its @dfn{file position} that +keeps track of where in the file the next character is to be read or +written. In the GNU system, and all POSIX.1 systems, the file position +is simply an integer representing the number of bytes from the beginning +of the file. The file position is normally set to the beginning of the file when it is opened, and each time a character is read or written, the file @@ -146,7 +147,8 @@ You can change the file position using the @code{fseek} function on a stream (@pxref{File Positioning}) or the @code{lseek} function on a file descriptor (@pxref{I/O Primitives}). If you try to change the file -position on a file that doesn't support random access, you get an error. +position on a file that doesn't support random access, you get the +@code{ESPIPE} error. @cindex random-access files Streams and descriptors that are opened for @dfn{append access} are @@ -230,7 +232,7 @@ @subsection File Name Resolution A file name consists of file name components separated by slash -(@samp{/}) characters. On the systems that that GNU library supports, +(@samp{/}) characters. On the systems that the GNU C library supports, multiple successive @samp{/} characters are equivalent to a single @samp{/} character. @@ -247,10 +249,12 @@ @cindex root directory @cindex absolute file name If a file name begins with a @samp{/}, the first component in the file -name is located in the @dfn{root directory} of the process. Such a file -name is called an @dfn{absolute file name}. -@c !!! xref here to chroot, if we ever document chroot. +name is located in the @dfn{root directory} of the process (usually all +processes on the system have the same root directory). Such a file name +is called an @dfn{absolute file name}. +@c !!! xref here to chroot, if we ever document chroot. -rm @c ??? I don't like the idea of encouraging smoking--rms. +@c !!! What the hell is that bad pun supposed to mean? I don't get it. -rm @cindex relative file name Otherwise, the first component in the file name is located in the @@ -263,7 +267,9 @@ components. The file name component @file{.} refers to the directory itself, while the file name component @file{..} refers to its @dfn{parent directory} (the directory that contains the link for the -directory in question). +directory in question). As a special case, @file{..} in the root +directory refers to the root directory itself, since it has no parent; +thus @file{/..} is the same as @file{/}. Here are some examples of file names: @@ -330,11 +336,18 @@ @item ENOENT This error is reported when a file referenced as a directory component -in the file name doesn't exist. +in the file name doesn't exist, or when a component is a symbolic link +whose target file does not exist. @xref{Symbolic Links}. @item ENOTDIR A file that is referenced as a directory component in the file name exists, but it isn't a directory. + +@item ELOOP +Too many symbolic links were resolved while trying to look up the file +name. The system has an arbitrary limit on the number of symbolic links +that may be resolved in looking up a single file name, as a primitive +way to detect loops. @xref{Symbolic Links}. @end table diff -ruN glibc-1.06/manual/isockad.c.texi glibc-1.07/manual/isockad.c.texi --- glibc-1.06/manual/isockad.c.texi +++ glibc-1.07/manual/isockad.c.texi Wed Jun 16 20:21:11 1993 @@ -0,0 +1,23 @@ +#include +#include +#include +#include +#include + +void +init_sockaddr (struct sockaddr_in *name, + const char *hostname, + unsigned short int port) +@{ + struct hostent *hostinfo; + + name->sin_family = AF_INET; + name->sin_port = htons (port); + hostinfo = gethostbyname (hostname); + if (hostinfo == NULL) + @{ + fprintf (stderr, "Unknown host %s.\n", hostname); + exit (EXIT_FAILURE); + @} + name->sin_addr = *(struct in_addr *) hostinfo->h_addr; +@} diff -ruN glibc-1.06/manual/isockaddr.c.texi glibc-1.07/manual/isockaddr.c.texi --- glibc-1.06/manual/isockaddr.c.texi Tue Jan 5 14:44:47 1993 +++ glibc-1.07/manual/isockaddr.c.texi @@ -1,22 +0,0 @@ -#include -#include -#include -#include -#include - -void -init_sockaddr (struct sockaddr_in *name, - const char *hostname, unsigned short int port) -@{ - struct hostent *hostinfo; - - name->sin_family = AF_INET; - name->sin_port = htons (port); - hostinfo = gethostbyname (serverhost); - if (hostinfo == NULL) - @{ - fprintf (stderr, "Unknown host %s.\n", hostname); - exit (EXIT_FAILURE); - @} - name->sin_addr = *(struct in_addr *) hostinfo->h_addr; -@} diff -ruN glibc-1.06/manual/job.texi glibc-1.07/manual/job.texi --- glibc-1.06/manual/job.texi Wed May 12 14:26:05 1993 +++ glibc-1.07/manual/job.texi Thu Jun 24 20:35:21 1993 @@ -269,7 +269,7 @@ holds information about a single subprocess. Here are the relevant data structure declarations: -@example +@smallexample @group /* @r{A process is a single process.} */ typedef struct process @@ -299,12 +299,12 @@ /* @r{The active jobs are linked into a list. This is its head.} */ job *first_job = NULL; @end group -@end example +@end smallexample Here are some utility functions that are used for operating on @code{job} objects. -@example +@smallexample @group /* @r{Find the active job with the indicated @var{pgid}.} */ job * @@ -346,7 +346,7 @@ return 1; @} @end group -@end example +@end smallexample @node Initializing the Shell, Launching Jobs, Data Structures, Implementing a Shell @@ -395,7 +395,7 @@ Here is the initialization code for the sample shell that shows how to do all of this. -@example +@smallexample /* @r{Keep track of attributes of the shell.} */ #include @@ -448,7 +448,7 @@ tcgetattr (shell_terminal, &shell_tmodes); @} @} -@end example +@end smallexample @node Launching Jobs, Foreground and Background, Initializing the Shell, Implementing a Shell @@ -521,7 +521,7 @@ for launching a program. The function is executed by each child process immediately after it has been forked by the shell, and never returns. -@example +@smallexample void launch_process (process *p, pid_t pgid, int infile, int outfile, int errfile, @@ -572,7 +572,7 @@ perror ("execvp"); exit (1); @} -@end example +@end smallexample If the shell is not running interactively, this function does not do anything with process groups or signals. Remember that a shell not @@ -584,7 +584,7 @@ functions to put the newly created job into the foreground or background; these are discussed in @ref{Foreground and Background}. -@example +@smallexample void launch_job (job *j, int foreground) @{ @@ -612,7 +612,8 @@ pid = fork (); if (pid == 0) /* @r{This is the child process.} */ - launch_process (p, j->pgid, infile, outfile, j->stderr, foreground); + launch_process (p, j->pgid, infile, + outfile, j->stderr, foreground); else if (pid < 0) @{ /* @r{The fork failed.} */ @@ -648,7 +649,7 @@ else put_job_in_background (j, 0); @} -@end example +@end smallexample @node Foreground and Background, Stopped and Terminated Jobs, Launching Jobs, Implementing a Shell @@ -682,7 +683,7 @@ Here is the sample shell's function for doing all of this. -@example +@smallexample @group /* @r{Put job @var{j} in the foreground. If @var{cont} is nonzero,} @r{restore the saved terminal modes and send the process group a} @@ -717,7 +718,7 @@ tcsetattr (shell_terminal, TCSADRAIN, &shell_tmodes); @} @end group -@end example +@end smallexample @cindex background job, launching If the process group is launched as a background job, the shell should @@ -727,7 +728,7 @@ In the sample shell, there is not much that needs to be done to put a job into the background. Here is the function it uses: -@example +@smallexample /* @r{Put a job in the background. If the cont argument is true, send} @r{the process group a @code{SIGCONT} signal to wake it up.} */ @@ -739,7 +740,7 @@ if (kill (-j->pgid, SIGCONT) < 0) perror ("kill (SIGCONT)"); @} -@end example +@end smallexample @node Stopped and Terminated Jobs, Continuing Stopped Jobs, Foreground and Background, Implementing a Shell @@ -776,7 +777,7 @@ Here are the parts of the sample shell program that deal with checking the status of jobs and reporting the information to the user. -@example +@smallexample @group /* @r{Store the status of the process @var{pid} that was returned by waitpid.} @r{Return 0 if all went well, nonzero otherwise.} */ @@ -911,7 +912,7 @@ @} @} @end group -@end example +@end smallexample @node Continuing Stopped Jobs, Missing Pieces, Stopped and Terminated Jobs, Implementing a Shell @subsection Continuing Stopped Jobs @@ -924,19 +925,18 @@ a job in the foreground, the shell should wait for the job to stop or complete, as if the job had just been launched in the foreground. -The sample shell program uses the same set of -functions---@w{@code{put_job_in_foreground}} and -@w{@code{put_job_in_background}}---to handle both newly created and -continued jobs. The definitions of these functions were given in -@ref{Foreground and Background}. When continuing a stopped job, a -nonzero value is passed as the @var{cont} argument to ensure that the -@code{SIGCONT} signal is sent and the terminal modes reset, as -appropriate. +The sample shell program handles both newly created and continued jobs +with the same pair of functions, @w{@code{put_job_in_foreground}} and +@w{@code{put_job_in_background}}. The definitions of these functions +were given in @ref{Foreground and Background}. When continuing a +stopped job, a nonzero value is passed as the @var{cont} argument to +ensure that the @code{SIGCONT} signal is sent and the terminal modes +reset, as appropriate. This leaves only a function for updating the shell's internal bookkeeping about the job being continued: -@example +@smallexample @group /* @r{Mark a stopped job J as being running again.} */ @@ -964,7 +964,7 @@ put_job_in_background (j, 1); @} @end group -@end example +@end smallexample @node Missing Pieces, , Continuing Stopped Jobs, Implementing a Shell @subsection The Missing Pieces @@ -1101,8 +1101,8 @@ BSD systems will not include @file{unistd.h}, which defines @code{getpgrp} specially under @code{_BSD_SOURCE}. You must link such programs with the @code{-lbsd-compat} option to get the BSD definition.@refill -@findex -lbsd-compat -@findex bsd-compat +@pindex -lbsd-compat +@pindex bsd-compat @cindex BSD compatibility library @comment unistd.h diff -ruN glibc-1.06/manual/lang.texi glibc-1.07/manual/lang.texi --- glibc-1.06/manual/lang.texi Wed May 12 14:26:07 1993 +++ glibc-1.07/manual/lang.texi Tue Jun 29 03:19:53 1993 @@ -1,5 +1,5 @@ @node Language Features, Library Summary, System Configuration, Top -@appendix C Language Facilities Implemented By the Library +@appendix C Language Facilities in the Library Some of the facilities implemented by the C library really should be thought of as parts of the C language itself. These facilities ought to @@ -56,9 +56,9 @@ program (@pxref{Aborting a Program}) after printing a message of the form: -@example +@smallexample @file{@var{file}}:@var{linenum}: Assertion `@var{expression}' failed. -@end example +@end smallexample @noindent on the standard error stream @code{stderr} (@pxref{Standard Streams}). @@ -209,13 +209,13 @@ additional arguments. The syntax of ANSI C requires at least one fixed argument before the @samp{@dots{}}. For example, -@example +@smallexample int func (const char *a, int b, @dots{}) @{ @dots{} @} -@end example +@end smallexample @noindent outlines a definition of a function @code{func} which returns an @@ -437,9 +437,9 @@ arguments facility. @comment Yes, this example has been tested. -@example +@smallexample @include add.c.texi -@end example +@end smallexample @node Old Varargs @subsubsection Old-Style Variadic Functions @@ -457,19 +457,19 @@ them. First of all, you must use old-style non-prototype syntax, like this: -@example +@smallexample tree build (va_alist) va_dcl @{ -@end example +@end smallexample Secondly, you must give @code{va_start} just one argument, like this: -@example +@smallexample va_list p; va_start (p); -@end example +@end smallexample These are the special macros used for defining old-style variadic functions: @@ -580,12 +580,12 @@ possibility of error, when a function argument or value is supposed to have type @code{size_t}, never declare its type in any other way. -@strong{Compatibility Note:} Pre-ANSI C implementations generally used -@code{unsigned int} for representing object sizes and @code{int} for -pointer subtraction results. They did not necessarily define either -@code{size_t} or @code{ptrdiff_t}. Unix systems did define -@code{size_t}, in @file{sys/types.h}, but the definition was usually a -signed type. +@strong{Compatibility Note:} Implementations of C before the advent of +ANSI C generally used @code{unsigned int} for representing object sizes +and @code{int} for pointer subtraction results. They did not +necessarily define either @code{size_t} or @code{ptrdiff_t}. Unix +systems did define @code{size_t}, in @file{sys/types.h}, but the +definition was usually a signed type. @node Data Type Measurements @section Data Type Measurements @@ -615,9 +615,9 @@ an integer type is for using an array of @code{long int} as a bit vector. You can access the bit at index @var{n} with -@example +@smallexample vector[@var{n} / LONGBITS] & (1 << (@var{n} % LONGBITS)) -@end example +@end smallexample @noindent provided you define @code{LONGBITS} as the number of bits in a @@ -638,9 +638,9 @@ You can compute the number of bits in any data type @var{type} like this: -@example +@smallexample sizeof (@var{type}) * CHAR_BIT -@end example +@end smallexample @end table @node Range of Type @@ -941,7 +941,7 @@ This value characterizes the rounding mode for floating point addition. The following values indicate standard rounding modes: -@c !!! want @group or somesuch near here +@need 750 @table @code @item -1 @@ -967,13 +967,13 @@ of @code{FLT_ROUNDS}, if the other aspects of the representation match the IEEE single-precision standard. -@example - 0 1 2 3 - 1.00000003 1.0 1.0 1.00000012 1.0 - 1.00000007 1.0 1.00000012 1.00000012 1.0 --1.00000003 -1.0 -1.0 -1.0 -1.00000012 --1.00000007 -1.0 -1.00000012 -1.0 -1.00000012 -@end example +@smallexample + 0 1 2 3 + 1.00000003 1.0 1.0 1.00000012 1.0 + 1.00000007 1.0 1.00000012 1.00000012 1.0 +-1.00000003 -1.0 -1.0 -1.0 -1.00000012 +-1.00000007 -1.0 -1.00000012 -1.0 -1.00000012 +@end smallexample @comment float.h @comment ANSI @@ -991,11 +991,11 @@ yields @code{1.0} (even though mathematically it should not) due to the limited number of mantissa digits: -@example +@smallexample float radix = FLT_RADIX; 1.0f + 1.0f / radix / radix / @dots{} / radix -@end example +@end smallexample @noindent where @code{radix} appears @code{FLT_MANT_DIG} times. @@ -1167,7 +1167,7 @@ @code{float} data type, appropriate values for the corresponding parameters are: -@example +@smallexample FLT_RADIX 2 FLT_MANT_DIG 24 FLT_DIG 6 @@ -1178,11 +1178,11 @@ FLT_MIN 1.17549435E-38F FLT_MAX 3.40282347E+38F FLT_EPSILON 1.19209290E-07F -@end example +@end smallexample Here are the values for the @code{double} data type: -@example +@smallexample DBL_MANT_DIG 53 DBL_DIG 15 DBL_MIN_EXP -1021 @@ -1192,7 +1192,7 @@ DBL_MAX 1.7976931348623157E+308 DBL_MIN 2.2250738585072014E-308 DBL_EPSILON 2.2204460492503131E-016 -@end example +@end smallexample @node Structure Measurement @subsection Structure Field Offset Measurement diff -ruN glibc-1.06/manual/lgpl.texinfo glibc-1.07/manual/lgpl.texinfo --- glibc-1.06/manual/lgpl.texinfo Fri Oct 16 18:04:34 1992 +++ glibc-1.07/manual/lgpl.texinfo Sun Jun 20 22:00:04 1993 @@ -535,12 +535,12 @@ school, if any, to sign a ``copyright disclaimer'' for the library, if necessary. Here is a sample; alter the names: -@example -Yoyodyne, Inc., hereby disclaims all copyright interest in the -library `Frob' (a library for tweaking knobs) written by James Random Hacker. +@smallexample +Yoyodyne, Inc., hereby disclaims all copyright interest in the library +`Frob' (a library for tweaking knobs) written by James Random Hacker. @var{signature of Ty Coon}, 1 April 1990 Ty Coon, President of Vice -@end example +@end smallexample That's all there is to it! diff -ruN glibc-1.06/manual/libc.cp glibc-1.07/manual/libc.cp --- glibc-1.06/manual/libc.cp Mon May 17 17:03:25 1993 +++ glibc-1.07/manual/libc.cp Wed Dec 29 18:38:49 1993 @@ -1,781 +1,782 @@ \entry {library}{1}{library} -\entry {standards}{2}{standards} +\entry {standards}{1}{standards} \entry {ANSI C}{2}{ANSI C} -\entry {POSIX}{3}{POSIX} -\entry {POSIX.1}{3}{POSIX.1} -\entry {IEEE Std 1003.1}{3}{IEEE Std 1003.1} -\entry {POSIX.2}{3}{POSIX.2} -\entry {IEEE Std 1003.2}{3}{IEEE Std 1003.2} +\entry {POSIX}{2}{POSIX} +\entry {POSIX.1}{2}{POSIX.1} +\entry {IEEE Std 1003.1}{2}{IEEE Std 1003.1} +\entry {POSIX.2}{2}{POSIX.2} +\entry {IEEE Std 1003.2}{2}{IEEE Std 1003.2} \entry {BSD Unix}{3}{BSD Unix} -\entry {4.x BSD Unix}{3}{4.x BSD Unix} +\entry {4.n BSD Unix}{3}{4.\var {n} BSD Unix} \entry {Berkeley Unix}{3}{Berkeley Unix} \entry {SunOS}{3}{SunOS} \entry {Unix, Berkeley}{3}{Unix, Berkeley} -\entry {SVID}{4}{SVID} -\entry {System V Unix}{4}{System V Unix} -\entry {Unix, System V}{4}{Unix, System V} +\entry {SVID}{3}{SVID} +\entry {System V Unix}{3}{System V Unix} +\entry {Unix, System V}{3}{Unix, System V} \entry {header files}{4}{header files} \entry {definition (compared to declaration)}{4}{definition (compared to declaration)} \entry {declaration (compared to definition)}{4}{declaration (compared to definition)} -\entry {shadowing functions with macros}{6}{shadowing functions with macros} -\entry {removing macros that shadow functions}{6}{removing macros that shadow functions} -\entry {undefining macros that shadow functions}{6}{undefining macros that shadow functions} -\entry {reserved names}{7}{reserved names} -\entry {name space}{7}{name space} -\entry {feature test macros}{9}{feature test macros} +\entry {shadowing functions with macros}{5}{shadowing functions with macros} +\entry {removing macros that shadow functions}{5}{removing macros that shadow functions} +\entry {undefining macros that shadow functions}{5}{undefining macros that shadow functions} +\entry {reserved names}{6}{reserved names} +\entry {name space}{6}{name space} +\entry {feature test macros}{8}{feature test macros} +\entry {BSD compatibility library.}{9}{BSD compatibility library.} \entry {error reporting}{13}{error reporting} \entry {reporting errors}{13}{reporting errors} \entry {error codes}{13}{error codes} \entry {status codes}{13}{status codes} -\entry {program name}{24}{program name} -\entry {name of running program}{24}{name of running program} -\entry {memory allocation}{27}{memory allocation} -\entry {storage allocation}{27}{storage allocation} -\entry {dynamic allocation}{27}{dynamic allocation} -\entry {static allocation}{27}{static allocation} -\entry {automatic allocation}{27}{automatic allocation} -\entry {unconstrained storage allocation}{28}{unconstrained storage allocation} -\entry {malloc function}{28}{\code {malloc} function} -\entry {heap, dynamic allocation from}{28}{heap, dynamic allocation from} -\entry {allocation of memory with malloc}{29}{allocation of memory with \code {malloc}} -\entry {freeing memory allocated with malloc}{30}{freeing memory allocated with \code {malloc}} -\entry {heap, freeing memory from}{30}{heap, freeing memory from} -\entry {changing the size of a block (malloc)}{31}{changing the size of a block (\code {malloc})} -\entry {efficiency and malloc}{33}{efficiency and \code {malloc}} -\entry {page boundary}{34}{page boundary} -\entry {alignment (with malloc)}{34}{alignment (with \code {malloc})} -\entry {heap consistency checking}{34}{heap consistency checking} -\entry {consistency checking, of heap}{34}{consistency checking, of heap} -\entry {allocation hooks, for malloc}{35}{allocation hooks, for \code {malloc}} -\entry {allocation statistics}{36}{allocation statistics} -\entry {obstacks}{38}{obstacks} -\entry {allocation (obstacks)}{40}{allocation (obstacks)} -\entry {freeing (obstacks)}{41}{freeing (obstacks)} -\entry {macros}{42}{macros} -\entry {growing objects (in obstacks)}{43}{growing objects (in obstacks)} -\entry {changing the size of a block (obstacks)}{43}{changing the size of a block (obstacks)} -\entry {shrinking objects}{45}{shrinking objects} -\entry {efficiency and obstacks}{45}{efficiency and obstacks} -\entry {obstack status}{47}{obstack status} -\entry {status of obstack}{47}{status of obstack} -\entry {alignment (in obstacks)}{47}{alignment (in obstacks)} -\entry {efficiency of chunks}{48}{efficiency of chunks} -\entry {chunks}{48}{chunks} -\entry {automatic freeing}{51}{automatic freeing} -\entry {alloca function}{51}{\code {alloca} function} -\entry {automatic storage with variable size}{51}{automatic storage with variable size} -\entry {longjmp}{52}{longjmp} -\entry {alloca disadvantages}{53}{\code {alloca} disadvantages} -\entry {disadvantages of alloca}{53}{disadvantages of \code {alloca}} -\entry {variable-sized arrays}{53}{variable-sized arrays} -\entry {relocating memory allocator}{54}{relocating memory allocator} -\entry {handle}{54}{handle} -\entry {memory usage warnings}{55}{memory usage warnings} -\entry {warnings of memory almost full}{55}{warnings of memory almost full} -\entry {character testing}{57}{character testing} -\entry {classification of characters}{57}{classification of characters} -\entry {predicates on characters}{57}{predicates on characters} -\entry {character predicates}{57}{character predicates} -\entry {lower-case character}{57}{lower-case character} -\entry {upper-case character}{57}{upper-case character} -\entry {alphabetic character}{58}{alphabetic character} -\entry {digit character}{58}{digit character} -\entry {decimal digit character}{58}{decimal digit character} -\entry {alphanumeric character}{58}{alphanumeric character} -\entry {hexadecimal digit character}{58}{hexadecimal digit character} -\entry {punctuation character}{58}{punctuation character} -\entry {whitespace character}{58}{whitespace character} -\entry {blank character}{58}{blank character} -\entry {graphic character}{59}{graphic character} -\entry {printing character}{59}{printing character} -\entry {control character}{59}{control character} -\entry {ASCII character}{59}{ASCII character} -\entry {character case conversion}{59}{character case conversion} -\entry {case conversion of characters}{59}{case conversion of characters} -\entry {converting case of characters}{59}{converting case of characters} -\entry {string, representation of}{61}{string, representation of} -\entry {string}{61}{string} -\entry {null character}{61}{null character} -\entry {string literal}{61}{string literal} -\entry {length of string}{62}{length of string} -\entry {allocation size of string}{62}{allocation size of string} -\entry {size of string}{62}{size of string} -\entry {string length}{62}{string length} -\entry {string allocation}{62}{string allocation} -\entry {copying strings and arrays}{63}{copying strings and arrays} -\entry {string copy functions}{63}{string copy functions} -\entry {array copy functions}{63}{array copy functions} -\entry {concatenating strings}{63}{concatenating strings} -\entry {string concatenation functions}{63}{string concatenation functions} -\entry {comparing strings and arrays}{68}{comparing strings and arrays} -\entry {string comparison functions}{68}{string comparison functions} -\entry {array comparison functions}{68}{array comparison functions} -\entry {predicates on strings}{68}{predicates on strings} -\entry {predicates on arrays}{68}{predicates on arrays} -\entry {collating strings}{70}{collating strings} -\entry {string collation functions}{70}{string collation functions} -\entry {converting string to collation order}{71}{converting string to collation order} -\entry {search functions (for strings)}{73}{search functions (for strings)} -\entry {string search functions}{73}{string search functions} -\entry {tokenizing strings}{76}{tokenizing strings} -\entry {breaking a string into tokens}{76}{breaking a string into tokens} -\entry {parsing tokens from a string}{76}{parsing tokens from a string} -\entry {extended character sets}{79}{extended character sets} -\entry {wide characters}{79}{wide characters} -\entry {multibyte characters}{80}{multibyte characters} -\entry {basic byte sequence}{80}{basic byte sequence} -\entry {code, character}{84}{code, character} -\entry {character code}{84}{character code} -\entry {extended strings, converting representations}{84}{extended strings, converting representations} -\entry {converting extended strings}{84}{converting extended strings} -\entry {multibyte character, length of}{86}{multibyte character, length of} -\entry {length of multibyte character}{86}{length of multibyte character} -\entry {extended characters, converting}{86}{extended characters, converting} -\entry {converting extended characters}{86}{converting extended characters} -\entry {internationalization}{93}{internationalization} -\entry {locales}{93}{locales} -\entry {combining locales}{94}{combining locales} -\entry {categories for locales}{94}{categories for locales} -\entry {locale categories}{94}{locale categories} -\entry {changing the locale}{95}{changing the locale} -\entry {locale, changing}{95}{locale, changing} -\entry {monetary value formatting}{98}{monetary value formatting} -\entry {numeric value formatting}{98}{numeric value formatting} -\entry {decimal-point separator}{98}{decimal-point separator} -\entry {grouping of digits}{99}{grouping of digits} -\entry {currency symbols}{99}{currency symbols} -\entry {Comparison Function}{103}{Comparison Function} -\entry {search function (for arrays)}{104}{search function (for arrays)} -\entry {binary search function (for arrays)}{104}{binary search function (for arrays)} -\entry {array search function}{104}{array search function} -\entry {sort function (for arrays)}{104}{sort function (for arrays)} -\entry {quick sort function (for arrays)}{104}{quick sort function (for arrays)} -\entry {array sort function}{104}{array sort function} -\entry {stable sorting}{104}{stable sorting} -\entry {Kermit the frog}{107}{Kermit the frog} -\entry {globbing}{110}{globbing} -\entry {word expansion}{120}{word expansion} -\entry {expansion of shell words}{120}{expansion of shell words} -\entry {tilde expansion}{121}{tilde expansion} -\entry {variable substitution}{121}{variable substitution} -\entry {substitution of variables and commands}{121}{substitution of variables and commands} -\entry {command substitution}{121}{command substitution} -\entry {arithmetic expansion}{121}{arithmetic expansion} -\entry {field splitting}{121}{field splitting} -\entry {wildcard expansion}{121}{wildcard expansion} -\entry {quote removal}{121}{quote removal} -\entry {removal of quotes}{121}{removal of quotes} -\entry {opening a file}{127}{opening a file} -\entry {file position}{129}{file position} -\entry {sequential-access files}{129}{sequential-access files} -\entry {random-access files}{129}{random-access files} -\entry {append-access files}{129}{append-access files} -\entry {file name}{130}{file name} -\entry {directory}{130}{directory} -\entry {link}{130}{link} -\entry {directory entry}{130}{directory entry} -\entry {file name component}{130}{file name component} -\entry {file name resolution}{131}{file name resolution} -\entry {root directory}{131}{root directory} -\entry {absolute file name}{131}{absolute file name} -\entry {relative file name}{131}{relative file name} -\entry {parent directory}{131}{parent directory} -\entry {file name syntax errors}{132}{file name syntax errors} -\entry {usual file name syntax errors}{132}{usual file name syntax errors} -\entry {file pointer}{135}{file pointer} -\entry {standard streams}{135}{standard streams} -\entry {streams, standard}{135}{streams, standard} -\entry {standard input stream}{136}{standard input stream} -\entry {standard output stream}{136}{standard output stream} -\entry {standard error stream}{136}{standard error stream} -\entry {opening a stream}{136}{opening a stream} -\entry {closing a stream}{138}{closing a stream} -\entry {writing to a stream, by characters}{139}{writing to a stream, by characters} -\entry {reading from a stream, by characters}{140}{reading from a stream, by characters} -\entry {peeking at input}{144}{peeking at input} -\entry {unreading characters}{144}{unreading characters} -\entry {pushing input back}{144}{pushing input back} -\entry {format string, for printf}{146}{format string, for \code {printf}} -\entry {template, for printf}{146}{template, for \code {printf}} -\entry {formatted output to a stream}{146}{formatted output to a stream} -\entry {writing to a stream, formatted}{146}{writing to a stream, formatted} -\entry {conversion specifications (printf)}{146}{conversion specifications (\code {printf})} -\entry {flag character (printf)}{148}{flag character (\code {printf})} -\entry {minimum field width (printf)}{148}{minimum field width (\code {printf})} -\entry {precision (printf)}{148}{precision (\code {printf})} -\entry {type modifier character (printf)}{148}{type modifier character (\code {printf})} -\entry {output conversions, for printf}{148}{output conversions, for \code {printf}} -\entry {parsing a template string}{160}{parsing a template string} -\entry {customizing printf}{163}{customizing \code {printf}} -\entry {defining new printf conversions}{163}{defining new \code {printf} conversions} -\entry {extending printf}{163}{extending \code {printf}} -\entry {formatted input from a stream}{169}{formatted input from a stream} -\entry {reading from a stream, formatted}{169}{reading from a stream, formatted} -\entry {format string, for scanf}{169}{format string, for \code {scanf}} -\entry {template, for scanf}{169}{template, for \code {scanf}} -\entry {conversion specifications (scanf)}{169}{conversion specifications (\code {scanf})} -\entry {matching failure, in scanf}{169}{matching failure, in \code {scanf}} -\entry {flag character (scanf)}{170}{flag character (\code {scanf})} -\entry {maximum field width (scanf)}{171}{maximum field width (\code {scanf})} -\entry {type modifier character (scanf)}{171}{type modifier character (\code {scanf})} -\entry {input conversions, for scanf}{171}{input conversions, for \code {scanf}} -\entry {binary I/O to a stream}{178}{binary I/O to a stream} -\entry {block I/O to a stream}{178}{block I/O to a stream} -\entry {reading from a stream, by blocks}{178}{reading from a stream, by blocks} -\entry {writing to a stream, by blocks}{178}{writing to a stream, by blocks} -\entry {end of file, on a stream}{179}{end of file, on a stream} -\entry {text stream}{180}{text stream} -\entry {binary stream}{180}{binary stream} -\entry {lines (in a text file)}{180}{lines (in a text file)} -\entry {file positioning on a stream}{181}{file positioning on a stream} -\entry {positioning a stream}{181}{positioning a stream} -\entry {seeking on a stream}{181}{seeking on a stream} -\entry {buffering of streams}{184}{buffering of streams} -\entry {unbuffered stream}{185}{unbuffered stream} -\entry {line buffered stream}{185}{line buffered stream} -\entry {fully buffered stream}{185}{fully buffered stream} -\entry {flushing a stream}{186}{flushing a stream} -\entry {buffering, controlling}{186}{buffering, controlling} -\entry {TMPDIR environment variable}{190}{TMPDIR environment variable} -\entry {stream, for I/O to a string}{191}{stream, for I/O to a string} -\entry {string stream}{191}{string stream} -\entry {custom streams}{194}{custom streams} -\entry {programming your own streams}{194}{programming your own streams} -\entry {cookie, for custom stream}{194}{cookie, for custom stream} -\entry {hook functions (of custom streams)}{196}{hook functions (of custom streams)} -\entry {opening a file descriptor}{199}{opening a file descriptor} -\entry {closing a file descriptor}{199}{closing a file descriptor} -\entry {append mode (file status flag)}{200}{append mode (file status flag)} -\entry {create on open (file status flag)}{200}{create on open (file status flag)} -\entry {non-blocking mode (file status flag)}{200}{non-blocking mode (file status flag)} -\entry {reading from a file descriptor}{202}{reading from a file descriptor} -\entry {end-of-file, on a file descriptor}{202}{end-of-file, on a file descriptor} -\entry {writing to a file descriptor}{203}{writing to a file descriptor} -\entry {file positioning on a file descriptor}{205}{file positioning on a file descriptor} -\entry {positioning a file descriptor}{205}{positioning a file descriptor} -\entry {seeking on a file descriptor}{205}{seeking on a file descriptor} -\entry {streams, and file descriptors}{207}{streams, and file descriptors} -\entry {converting file descriptor to stream}{207}{converting file descriptor to stream} -\entry {extracting file descriptor from stream}{207}{extracting file descriptor from stream} -\entry {standard file descriptors}{208}{standard file descriptors} -\entry {file descriptors, standard}{208}{file descriptors, standard} -\entry {standard input file descriptor}{208}{standard input file descriptor} -\entry {standard output file descriptor}{208}{standard output file descriptor} -\entry {standard error file descriptor}{208}{standard error file descriptor} -\entry {channels}{208}{channels} -\entry {streams and descriptors}{208}{streams and descriptors} -\entry {descriptors and streams}{208}{descriptors and streams} -\entry {mixing descriptors and streams}{208}{mixing descriptors and streams} -\entry {linked channels}{209}{linked channels} -\entry {cleaning up a stream}{209}{cleaning up a stream} -\entry {independent channels}{209}{independent channels} -\entry {waiting for input or output}{211}{waiting for input or output} -\entry {multiplexing input}{211}{multiplexing input} -\entry {input from multiple files}{211}{input from multiple files} -\entry {file descriptor sets, for select}{211}{file descriptor sets, for \code {select}} -\entry {control operations on files}{214}{control operations on files} -\entry {fcntl function}{214}{\code {fcntl} function} -\entry {duplicating file descriptors}{215}{duplicating file descriptors} -\entry {redirecting input and output}{215}{redirecting input and output} -\entry {file descriptor flags}{218}{file descriptor flags} -\entry {close-on-exec (file descriptor flag)}{219}{close-on-exec (file descriptor flag)} -\entry {file status flags}{219}{file status flags} -\entry {file locks}{222}{file locks} -\entry {record locking}{222}{record locking} -\entry {exclusive lock}{222}{exclusive lock} -\entry {write lock}{222}{write lock} -\entry {shared lock}{222}{shared lock} -\entry {read lock}{222}{read lock} -\entry {interrupt-driven input}{226}{interrupt-driven input} -\entry {current working directory}{229}{current working directory} -\entry {working directory}{229}{working directory} -\entry {change working directory}{229}{change working directory} -\entry {accessing directories}{231}{accessing directories} -\entry {reading from a directory}{231}{reading from a directory} -\entry {directories, accessing}{231}{directories, accessing} -\entry {directory stream}{231}{directory stream} -\entry {hard link}{235}{hard link} -\entry {link, hard}{235}{link, hard} -\entry {multiple names for one file}{235}{multiple names for one file} -\entry {file names, multiple}{235}{file names, multiple} -\entry {soft link}{236}{soft link} -\entry {link, soft}{236}{link, soft} -\entry {symbolic link}{236}{symbolic link} -\entry {link, symbolic}{236}{link, symbolic} -\entry {deleting a file}{238}{deleting a file} -\entry {removing a file}{238}{removing a file} -\entry {unlinking a file}{238}{unlinking a file} -\entry {directories, deleting}{239}{directories, deleting} -\entry {deleting a directory}{239}{deleting a directory} -\entry {renaming a file}{239}{renaming a file} -\entry {creating a directory}{241}{creating a directory} -\entry {directories, creating}{241}{directories, creating} -\entry {status of a file}{242}{status of a file} -\entry {attributes of a file}{242}{attributes of a file} -\entry {file attributes}{242}{file attributes} -\entry {inode number}{244}{inode number} -\entry {file owner}{247}{file owner} -\entry {owner of a file}{247}{owner of a file} -\entry {group owner of a file}{247}{group owner of a file} -\entry {file permission bits}{249}{file permission bits} -\entry {sticky bit}{250}{sticky bit} -\entry {permission to access a file}{251}{permission to access a file} -\entry {access permission for a file}{251}{access permission for a file} -\entry {file access permission}{251}{file access permission} -\entry {file creation mask}{251}{file creation mask} -\entry {umask}{251}{umask} -\entry {testing access permission}{253}{testing access permission} -\entry {access, testing for}{253}{access, testing for} -\entry {setuid programs and file access}{253}{setuid programs and file access} -\entry {file access time}{255}{file access time} -\entry {file modification time}{255}{file modification time} -\entry {file attribute modification time}{255}{file attribute modification time} -\entry {creating special files}{257}{creating special files} -\entry {special files}{257}{special files} -\entry {pipe}{259}{pipe} -\entry {FIFO special file}{259}{FIFO special file} -\entry {creating a pipe}{259}{creating a pipe} -\entry {opening a pipe}{259}{opening a pipe} -\entry {interprocess communication, with pipes}{259}{interprocess communication, with pipes} -\entry {creating a pipe to a subprocess}{261}{creating a pipe to a subprocess} -\entry {pipe to a subprocess}{261}{pipe to a subprocess} -\entry {filtering i/o through subprocess}{261}{filtering i/o through subprocess} -\entry {creating a FIFO special file}{263}{creating a FIFO special file} -\entry {interprocess communication, with FIFO}{263}{interprocess communication, with FIFO} -\entry {socket}{265}{socket} -\entry {interprocess communication, with sockets}{265}{interprocess communication, with sockets} -\entry {communication style (of a socket)}{265}{communication style (of a socket)} -\entry {style of communication (of a socket)}{265}{style of communication (of a socket)} -\entry {packet}{265}{packet} -\entry {byte stream}{265}{byte stream} -\entry {stream (sockets)}{265}{stream (sockets)} -\entry {loss of data on sockets}{265}{loss of data on sockets} -\entry {data loss on sockets}{265}{data loss on sockets} -\entry {namespace (of socket)}{266}{namespace (of socket)} -\entry {domain (of socket)}{266}{domain (of socket)} -\entry {socket namespace}{266}{socket namespace} -\entry {socket domain}{266}{socket domain} -\entry {network protocol}{266}{network protocol} -\entry {protocol (of socket)}{266}{protocol (of socket)} -\entry {socket protocol}{266}{socket protocol} -\entry {protocol family}{266}{protocol family} -\entry {address of socket}{267}{address of socket} -\entry {name of socket}{267}{name of socket} -\entry {binding a socket address}{267}{binding a socket address} -\entry {socket address (name) binding}{267}{socket address (name) binding} -\entry {file namespace, for sockets}{271}{file namespace, for sockets} -\entry {Internet namespace, for sockets}{274}{Internet namespace, for sockets} -\entry {host address, Internet}{276}{host address, Internet} -\entry {Internet host address}{276}{Internet host address} -\entry {network number}{276}{network number} -\entry {local network address number}{276}{local network address number} -\entry {standard dot notation, for Internet addresses}{276}{standard dot notation, for Internet addresses} -\entry {dot notation, for Internet addresses}{276}{dot notation, for Internet addresses} -\entry {hosts database}{278}{hosts database} -\entry {converting host name to address}{278}{converting host name to address} -\entry {converting host address to name}{278}{converting host address to name} -\entry {port number}{281}{port number} -\entry {services database}{282}{services database} -\entry {converting service name to port number}{282}{converting service name to port number} -\entry {converting port number to service name}{282}{converting port number to service name} -\entry {byte order conversion, for socket}{283}{byte order conversion, for socket} -\entry {converting byte order}{283}{converting byte order} -\entry {big-endian}{283}{big-endian} -\entry {little-endian}{283}{little-endian} -\entry {network byte order}{283}{network byte order} -\entry {protocols database}{284}{protocols database} -\entry {TCP (Internet protocol)}{284}{TCP (Internet protocol)} -\entry {creating a socket}{288}{creating a socket} -\entry {socket, creating}{288}{socket, creating} -\entry {opening a socket}{288}{opening a socket} -\entry {socket, closing}{289}{socket, closing} -\entry {closing a socket}{289}{closing a socket} -\entry {shutting down a socket}{289}{shutting down a socket} -\entry {socket shutdown}{289}{socket shutdown} -\entry {creating a socket pair}{290}{creating a socket pair} -\entry {socket pair}{290}{socket pair} -\entry {opening a socket pair}{290}{opening a socket pair} -\entry {connection}{291}{connection} -\entry {client}{291}{client} -\entry {server}{291}{server} -\entry {connecting a socket}{291}{connecting a socket} -\entry {socket, connecting}{291}{socket, connecting} -\entry {socket, initiating a connection}{291}{socket, initiating a connection} -\entry {socket, client actions}{291}{socket, client actions} -\entry {listening (sockets)}{292}{listening (sockets)} -\entry {sockets, server actions}{292}{sockets, server actions} -\entry {sockets, listening}{292}{sockets, listening} -\entry {sockets, accepting connections}{293}{sockets, accepting connections} -\entry {accepting connections}{293}{accepting connections} -\entry {reading from a socket}{295}{reading from a socket} -\entry {writing to a socket}{295}{writing to a socket} -\entry {out-of-band data}{301}{out-of-band data} -\entry {high-priority data}{301}{high-priority data} -\entry {urgent socket condition}{301}{urgent socket condition} -\entry {datagram socket}{305}{datagram socket} -\entry {sending a datagram}{305}{sending a datagram} -\entry {transmitting datagrams}{305}{transmitting datagrams} -\entry {datagrams, transmitting}{305}{datagrams, transmitting} -\entry {receiving datagrams}{306}{receiving datagrams} -\entry {socket options}{311}{socket options} -\entry {level, for socket options}{311}{level, for socket options} -\entry {socket option level}{311}{socket option level} -\entry {networks database}{314}{networks database} -\entry {converting network number to network name}{314}{converting network number to network name} -\entry {converting network name to network number}{314}{converting network name to network number} -\entry {terminal identification}{317}{terminal identification} -\entry {identifying terminals}{317}{identifying terminals} -\entry {terminal input queue}{318}{terminal input queue} -\entry {typeahead buffer}{318}{typeahead buffer} -\entry {terminal output queue}{318}{terminal output queue} -\entry {canonical input processing}{318}{canonical input processing} -\entry {noncanonical input processing}{319}{noncanonical input processing} -\entry {terminal mode data types}{319}{terminal mode data types} -\entry {terminal mode functions}{320}{terminal mode functions} -\entry {parity checking}{323}{parity checking} -\entry {break condition, detecting}{324}{break condition, detecting} -\entry {modem status lines}{326}{modem status lines} -\entry {carrier detect}{326}{carrier detect} -\entry {modem disconnect}{326}{modem disconnect} -\entry {echo of terminal input}{327}{echo of terminal input} -\entry {interactive signals, from terminal}{328}{interactive signals, from terminal} -\entry {line speed}{329}{line speed} -\entry {baud rate}{329}{baud rate} -\entry {terminal line speed}{329}{terminal line speed} -\entry {terminal line speed}{329}{terminal line speed} -\entry {EOF character}{332}{EOF character} -\entry {EOL character}{332}{EOL character} -\entry {ERASE character}{332}{ERASE character} -\entry {KILL character}{333}{KILL character} -\entry {EOL2 character}{333}{EOL2 character} -\entry {WERASE character}{333}{WERASE character} -\entry {REPRINT character}{334}{REPRINT character} -\entry {LNEXT character}{334}{LNEXT character} -\entry {INTR character}{334}{INTR character} -\entry {interrupt character}{334}{interrupt character} -\entry {QUIT character}{335}{QUIT character} -\entry {SUSP character}{335}{SUSP character} -\entry {suspend character}{335}{suspend character} -\entry {DSUSP character}{335}{DSUSP character} -\entry {delayed suspend character}{335}{delayed suspend character} -\entry {START character}{336}{START character} -\entry {STOP character}{336}{STOP character} -\entry {DISCARD character}{337}{DISCARD character} -\entry {STATUS character}{337}{STATUS character} -\entry {MIN termios slot}{338}{MIN termios slot} -\entry {TIME termios slot}{338}{TIME termios slot} -\entry {terminal line control functions}{339}{terminal line control functions} -\entry {break condition, generating}{339}{break condition, generating} -\entry {flushing terminal output queue}{339}{flushing terminal output queue} -\entry {terminal output queue, flushing}{339}{terminal output queue, flushing} -\entry {clearing terminal input queue}{340}{clearing terminal input queue} -\entry {terminal input queue, clearing}{340}{terminal input queue, clearing} -\entry {flow control, terminal}{340}{flow control, terminal} -\entry {terminal flow control}{340}{terminal flow control} -\entry {domain error}{345}{domain error} -\entry {range error}{345}{range error} -\entry {trigonometric functions}{346}{trigonometric functions} -\entry {pi (trigonometric constant)}{346}{pi (trigonometric constant)} -\entry {inverse trigonmetric functions}{347}{inverse trigonmetric functions} -\entry {exponentiation functions}{348}{exponentiation functions} -\entry {power functions}{348}{power functions} -\entry {logarithm functions}{348}{logarithm functions} -\entry {square root function}{349}{square root function} -\entry {cube root function}{349}{cube root function} -\entry {hyperbolic functions}{350}{hyperbolic functions} -\entry {inverse hyperbolic functions}{350}{inverse hyperbolic functions} -\entry {random numbers}{350}{random numbers} -\entry {pseudo-random numbers}{350}{pseudo-random numbers} -\entry {seed (for random numbers)}{350}{seed (for random numbers)} -\entry {NaN}{355}{NaN} -\entry {not a number}{355}{not a number} -\entry {IEEE floating point}{355}{IEEE floating point} -\entry {absolute value functions}{356}{absolute value functions} -\entry {normalization functions (floating-point)}{357}{normalization functions (floating-point)} -\entry {rounding functions}{359}{rounding functions} -\entry {remainder functions}{359}{remainder functions} -\entry {converting floats to integers}{359}{converting floats to integers} -\entry {integer division functions}{360}{integer division functions} -\entry {parsing numbers (in formatted input)}{361}{parsing numbers (in formatted input)} -\entry {converting strings to numbers}{361}{converting strings to numbers} -\entry {number syntax, parsing}{361}{number syntax, parsing} -\entry {syntax, for reading numbers}{361}{syntax, for reading numbers} -\entry {CPU time}{367}{CPU time} -\entry {processor time}{367}{processor time} -\entry {clock ticks}{367}{clock ticks} -\entry {ticks, clock}{367}{ticks, clock} -\entry {time, elapsed CPU}{367}{time, elapsed CPU} -\entry {Gregorian calendar}{370}{Gregorian calendar} -\entry {time, calendar}{370}{time, calendar} -\entry {date and time}{370}{date and time} -\entry {calendar time}{370}{calendar time} -\entry {high-resolution time}{370}{high-resolution time} -\entry {local time}{370}{local time} -\entry {broken-down time}{370}{broken-down time} -\entry {epoch}{370}{epoch} -\entry {broken-down time}{374}{broken-down time} -\entry {calendar time and broken-down time}{374}{calendar time and broken-down time} -\entry {leap second}{374}{leap second} -\entry {Daylight Saving Time}{375}{Daylight Saving Time} -\entry {summer time}{375}{summer time} -\entry {time zone}{378}{time zone} -\entry {setting an alarm}{382}{setting an alarm} -\entry {interval timer, setting}{382}{interval timer, setting} -\entry {alarms, setting}{382}{alarms, setting} -\entry {timers, setting}{382}{timers, setting} -\entry {real-time timer}{382}{real-time timer} -\entry {virtual timer}{382}{virtual timer} -\entry {profiling timer}{382}{profiling timer} -\entry {resource limits}{387}{resource limits} -\entry {limits on resource usage}{387}{limits on resource usage} -\entry {usage limits}{387}{usage limits} -\entry {process priority}{389}{process priority} -\entry {priority of a process}{389}{priority of a process} -\entry {non-local exits}{393}{non-local exits} -\entry {long jumps}{393}{long jumps} -\entry {signal}{399}{signal} -\entry {generation of signals}{400}{generation of signals} -\entry {delivery of signals}{401}{delivery of signals} -\entry {pending signals}{401}{pending signals} -\entry {blocked signals}{401}{blocked signals} -\entry {specified action (for a signal)}{401}{specified action (for a signal)} -\entry {default action (for a signal)}{401}{default action (for a signal)} -\entry {signal action}{401}{signal action} -\entry {catching signals}{401}{catching signals} -\entry {signal names}{402}{signal names} -\entry {names of signals}{402}{names of signals} -\entry {signal number}{402}{signal number} -\entry {program error signals}{402}{program error signals} -\entry {exception}{403}{exception} -\entry {floating-point exception}{403}{floating-point exception} -\entry {illegal instruction}{404}{illegal instruction} -\entry {segmentation violation}{404}{segmentation violation} -\entry {bus error}{405}{bus error} -\entry {abort signal}{405}{abort signal} -\entry {program termination signals}{405}{program termination signals} -\entry {hangup signal}{405}{hangup signal} -\entry {interrupt signal}{406}{interrupt signal} -\entry {quit signal}{406}{quit signal} -\entry {quit signal}{406}{quit signal} -\entry {termination signal}{406}{termination signal} -\entry {kill signal}{406}{kill signal} -\entry {alarm signal}{407}{alarm signal} -\entry {virtual time alarm signal}{407}{virtual time alarm signal} -\entry {profiling alarm signal}{407}{profiling alarm signal} -\entry {input available signal}{407}{input available signal} -\entry {output possible signal}{407}{output possible signal} -\entry {urgent data signal}{408}{urgent data signal} -\entry {job control signals}{408}{job control signals} -\entry {child process signal}{408}{child process signal} -\entry {continue signal}{408}{continue signal} -\entry {stop signal}{408}{stop signal} -\entry {interactive stop signal}{409}{interactive stop signal} -\entry {terminal input signal}{409}{terminal input signal} -\entry {terminal output signal}{409}{terminal output signal} -\entry {pipe signal}{410}{pipe signal} -\entry {broken pipe signal}{410}{broken pipe signal} -\entry {user signals}{410}{user signals} -\entry {signal messages}{411}{signal messages} -\entry {signal actions}{412}{signal actions} -\entry {establishing a handler}{412}{establishing a handler} -\entry {signal function}{412}{\code {signal} function} -\entry {default action for a signal}{413}{default action for a signal} -\entry {ignore action for a signal}{413}{ignore action for a signal} -\entry {sigaction function}{415}{\code {sigaction} function} -\entry {signal flags}{418}{signal flags} -\entry {flags for sigaction}{418}{flags for \code {sigaction}} -\entry {sigaction flags}{418}{\code {sigaction} flags} -\entry {initial signal actions}{419}{initial signal actions} -\entry {signal handler function}{420}{signal handler function} -\entry {non-local exit, from signal handler}{423}{non-local exit, from signal handler} -\entry {race conditions, relating to signals}{425}{race conditions, relating to signals} -\entry {handling multiple signals}{425}{handling multiple signals} -\entry {successive signals}{425}{successive signals} -\entry {merging of signals}{425}{merging of signals} -\entry {restrictions on signal handler functions}{428}{restrictions on signal handler functions} -\entry {volatile declarations}{429}{\code {volatile} declarations} -\entry {reentrant functions}{429}{reentrant functions} -\entry {sending signals}{434}{sending signals} -\entry {raising signals}{434}{raising signals} -\entry {signals, generating}{434}{signals, generating} -\entry {killing a process}{436}{killing a process} -\entry {interprocess communication, with signals}{438}{interprocess communication, with signals} -\entry {blocking signals}{440}{blocking signals} -\entry {signal set}{441}{signal set} -\entry {signal mask}{442}{signal mask} -\entry {process signal mask}{442}{process signal mask} -\entry {blocking signals, in a handler}{445}{blocking signals, in a handler} -\entry {pending signals, checking for}{446}{pending signals, checking for} -\entry {blocked signals, checking for}{446}{blocked signals, checking for} -\entry {checking for pending signals}{446}{checking for pending signals} -\entry {timing error in signal handling}{448}{timing error in signal handling} -\entry {waiting for a signal}{449}{waiting for a signal} -\entry {pause function}{449}{\code {pause} function} -\entry {signal stack}{452}{signal stack} -\entry {process}{457}{process} -\entry {program arguments}{457}{program arguments} -\entry {command line arguments}{457}{command line arguments} -\entry {main function}{457}{\code {main} function} -\entry {argc (program argument count)}{457}{argc (program argument count)} -\entry {argv (program argument vector)}{457}{argv (program argument vector)} -\entry {program argument syntax}{458}{program argument syntax} -\entry {syntax, for program arguments}{458}{syntax, for program arguments} -\entry {command argument syntax}{458}{command argument syntax} -\entry {long-named options}{458}{long-named options} -\entry {program arguments, parsing}{459}{program arguments, parsing} -\entry {command arguments, parsing}{459}{command arguments, parsing} -\entry {parsing program arguments}{459}{parsing program arguments} -\entry {environment variable}{466}{environment variable} -\entry {environment}{467}{environment} -\entry {environment access}{467}{environment access} -\entry {environment representation}{467}{environment representation} -\entry {standard environment variables}{468}{standard environment variables} -\entry {HOME environment variable}{468}{HOME environment variable} -\entry {home directory}{468}{home directory} -\entry {LOGNAME environment variable}{468}{LOGNAME environment variable} -\entry {PATH environment variable}{468}{PATH environment variable} -\entry {TERM environment variable}{469}{TERM environment variable} -\entry {TZ environment variable}{469}{TZ environment variable} -\entry {LANG environment variable}{469}{LANG environment variable} -\entry {LC{\_}COLLATE environment variable}{469}{LC{\_}COLLATE environment variable} -\entry {LC{\_}CTYPE environment variable}{469}{LC{\_}CTYPE environment variable} -\entry {LC{\_}MONETARY environment variable}{469}{LC{\_}MONETARY environment variable} -\entry {LC{\_}NUMERIC environment variable}{469}{LC{\_}NUMERIC environment variable} -\entry {LC{\_}TIME environment variable}{469}{LC{\_}TIME environment variable} -\entry {{\_}POSIX{\_}OPTION{\_}ORDER environment variable.}{469}{{\_}POSIX{\_}OPTION{\_}ORDER environment variable.} -\entry {program termination}{470}{program termination} -\entry {process termination}{470}{process termination} -\entry {exit status value}{470}{exit status value} -\entry {exit status}{470}{exit status} -\entry {aborting a program}{473}{aborting a program} -\entry {process}{475}{process} -\entry {child process}{475}{child process} -\entry {parent process}{475}{parent process} -\entry {running a command}{475}{running a command} -\entry {process ID}{476}{process ID} -\entry {process lifetime}{476}{process lifetime} -\entry {creating a process}{476}{creating a process} -\entry {forking a process}{476}{forking a process} -\entry {child process}{476}{child process} -\entry {parent process}{476}{parent process} -\entry {process image}{476}{process image} -\entry {executing a file}{479}{executing a file} -\entry {exec functions}{479}{\code {exec} functions} -\entry {process completion}{482}{process completion} -\entry {waiting for completion of child process}{482}{waiting for completion of child process} -\entry {testing exit status of child process}{482}{testing exit status of child process} -\entry {process groups}{489}{process groups} -\entry {job control}{489}{job control} -\entry {job}{489}{job} -\entry {session}{489}{session} -\entry {shell}{489}{shell} -\entry {session}{489}{session} -\entry {session leader}{489}{session leader} -\entry {controlling terminal}{490}{controlling terminal} -\entry {foreground job}{490}{foreground job} -\entry {background job}{490}{background job} -\entry {stopped job}{490}{stopped job} -\entry {job control is optional}{490}{job control is optional} -\entry {controlling process}{491}{controlling process} -\entry {controlling terminal, access to}{491}{controlling terminal, access to} -\entry {SIGTTIN, from background job}{491}{\code {SIGTTIN}, from background job} -\entry {SIGTTOU, from background job}{491}{\code {SIGTTOU}, from background job} -\entry {orphaned process group}{492}{orphaned process group} -\entry {job control, enabling}{495}{job control, enabling} -\entry {subshell}{495}{subshell} -\entry {job control, enabling}{495}{job control, enabling} -\entry {launching jobs}{497}{launching jobs} -\entry {process group leader}{497}{process group leader} -\entry {process group ID}{497}{process group ID} -\entry {race conditions, relating to job control}{497}{race conditions, relating to job control} -\entry {foreground job, launching}{501}{foreground job, launching} -\entry {background job, launching}{502}{background job, launching} -\entry {stopped jobs, detecting}{502}{stopped jobs, detecting} -\entry {terminated jobs, detecting}{502}{terminated jobs, detecting} -\entry {SIGCHLD, handling of}{503}{\code {SIGCHLD}, handling of} -\entry {stopped jobs, continuing}{507}{stopped jobs, continuing} -\entry {process group functions}{508}{process group functions} -\entry {job control functions}{508}{job control functions} -\entry {controlling terminal, determining}{509}{controlling terminal, determining} -\entry {BSD compatibility library}{510}{BSD compatibility library} -\entry {login name}{513}{login name} -\entry {user name}{513}{user name} -\entry {user ID}{513}{user ID} -\entry {group name}{513}{group name} -\entry {group ID}{513}{group ID} -\entry {persona}{513}{persona} -\entry {effective user ID}{513}{effective user ID} -\entry {effective group ID}{513}{effective group ID} -\entry {real user ID}{514}{real user ID} -\entry {real group ID}{514}{real group ID} -\entry {supplementary group IDs}{514}{supplementary group IDs} -\entry {setuid programs}{515}{\code {setuid} programs} -\entry {login name, determining}{524}{login name, determining} -\entry {user ID, determining}{524}{user ID, determining} -\entry {user database}{525}{user database} -\entry {password database}{525}{password database} -\entry {converting user ID to user name}{526}{converting user ID to user name} -\entry {converting user name to user ID}{526}{converting user name to user ID} -\entry {scanning the user list}{526}{scanning the user list} -\entry {group database}{528}{group database} -\entry {converting group name to group ID}{528}{converting group name to group ID} -\entry {converting group ID to group name}{528}{converting group ID to group name} -\entry {scanning the group list}{529}{scanning the group list} -\entry {POSIX capacity limits}{537}{POSIX capacity limits} -\entry {limits, POSIX}{537}{limits, POSIX} -\entry {capacity limits, POSIX}{537}{capacity limits, POSIX} -\entry {limits, program argument size}{537}{limits, program argument size} -\entry {limits, number of processes}{537}{limits, number of processes} -\entry {limits, number of open files}{537}{limits, number of open files} -\entry {limits, time zone name length}{538}{limits, time zone name length} -\entry {limits, number of supplementary group IDs}{538}{limits, number of supplementary group IDs} -\entry {POSIX optional features}{539}{POSIX optional features} -\entry {optional POSIX features}{539}{optional POSIX features} -\entry {limits, link count of files}{546}{limits, link count of files} -\entry {limits, terminal input queue}{546}{limits, terminal input queue} -\entry {limits, file name length}{546}{limits, file name length} -\entry {limits, pipe buffer size}{546}{limits, pipe buffer size} -\entry {consistency checking}{555}{consistency checking} -\entry {impossible events}{555}{impossible events} -\entry {assertions}{555}{assertions} -\entry {variable number of arguments}{556}{variable number of arguments} -\entry {variadic functions}{556}{variadic functions} -\entry {optional arguments}{556}{optional arguments} -\entry {function prototypes (variadic)}{558}{function prototypes (variadic)} -\entry {prototypes for variadic functions}{558}{prototypes for variadic functions} -\entry {variadic function prototypes}{558}{variadic function prototypes} -\entry {variadic function argument access}{558}{variadic function argument access} -\entry {arguments (variadic functions)}{558}{arguments (variadic functions)} -\entry {number of arguments passed}{559}{number of arguments passed} -\entry {how many arguments}{559}{how many arguments} -\entry {arguments, how many}{559}{arguments, how many} -\entry {variadic functions, calling}{560}{variadic functions, calling} -\entry {calling variadic functions}{560}{calling variadic functions} -\entry {declaring variadic functions}{560}{declaring variadic functions} -\entry {default argument promotions}{560}{default argument promotions} -\entry {argument promotion}{560}{argument promotion} -\entry {null pointer constant}{564}{null pointer constant} -\entry {integer type width}{565}{integer type width} -\entry {width of integer type}{565}{width of integer type} -\entry {type measurements, integer}{565}{type measurements, integer} -\entry {integer type range}{566}{integer type range} -\entry {range of integer type}{566}{range of integer type} -\entry {limits, integer types}{566}{limits, integer types} -\entry {floating type measurements}{568}{floating type measurements} -\entry {measurements of floating types}{568}{measurements of floating types} -\entry {type measurements, floating}{568}{type measurements, floating} -\entry {limits, floating types}{568}{limits, floating types} -\entry {sign (of floating point number)}{568}{sign (of floating point number)} -\entry {base (of floating point number)}{568}{base (of floating point number)} -\entry {radix (of floating point number)}{568}{radix (of floating point number)} -\entry {exponent (of floating point number)}{568}{exponent (of floating point number)} -\entry {bias (of floating point number exponent)}{568}{bias (of floating point number exponent)} -\entry {mantissa (of floating point number)}{569}{mantissa (of floating point number)} -\entry {significand (of floating point number)}{569}{significand (of floating point number)} -\entry {precision (of floating point number)}{569}{precision (of floating point number)} -\entry {hidden bit (of floating point number mantissa)}{569}{hidden bit (of floating point number mantissa)} -\entry {normalized floating point number}{569}{normalized floating point number} -\entry {IEEE floating point representation}{572}{IEEE floating point representation} -\entry {floating point, IEEE}{572}{floating point, IEEE} -\entry {installing the library}{631}{installing the library} -\entry {reporting bugs}{634}{reporting bugs} +\entry {program name}{23}{program name} +\entry {name of running program}{23}{name of running program} +\entry {memory allocation}{25}{memory allocation} +\entry {storage allocation}{25}{storage allocation} +\entry {dynamic allocation}{25}{dynamic allocation} +\entry {static allocation}{25}{static allocation} +\entry {automatic allocation}{25}{automatic allocation} +\entry {unconstrained storage allocation}{26}{unconstrained storage allocation} +\entry {malloc function}{26}{\code {malloc} function} +\entry {heap, dynamic allocation from}{26}{heap, dynamic allocation from} +\entry {allocation of memory with malloc}{26}{allocation of memory with \code {malloc}} +\entry {freeing memory allocated with malloc}{28}{freeing memory allocated with \code {malloc}} +\entry {heap, freeing memory from}{28}{heap, freeing memory from} +\entry {changing the size of a block (malloc)}{29}{changing the size of a block (\code {malloc})} +\entry {efficiency and malloc}{31}{efficiency and \code {malloc}} +\entry {page boundary}{31}{page boundary} +\entry {alignment (with malloc)}{31}{alignment (with \code {malloc})} +\entry {heap consistency checking}{32}{heap consistency checking} +\entry {consistency checking, of heap}{32}{consistency checking, of heap} +\entry {allocation hooks, for malloc}{32}{allocation hooks, for \code {malloc}} +\entry {allocation statistics}{33}{allocation statistics} +\entry {obstacks}{35}{obstacks} +\entry {allocation (obstacks)}{37}{allocation (obstacks)} +\entry {freeing (obstacks)}{38}{freeing (obstacks)} +\entry {macros}{38}{macros} +\entry {growing objects (in obstacks)}{39}{growing objects (in obstacks)} +\entry {changing the size of a block (obstacks)}{39}{changing the size of a block (obstacks)} +\entry {shrinking objects}{41}{shrinking objects} +\entry {efficiency and obstacks}{41}{efficiency and obstacks} +\entry {obstack status}{42}{obstack status} +\entry {status of obstack}{42}{status of obstack} +\entry {alignment (in obstacks)}{43}{alignment (in obstacks)} +\entry {efficiency of chunks}{44}{efficiency of chunks} +\entry {chunks}{44}{chunks} +\entry {automatic freeing}{46}{automatic freeing} +\entry {alloca function}{46}{\code {alloca} function} +\entry {automatic storage with variable size}{46}{automatic storage with variable size} +\entry {longjmp}{48}{longjmp} +\entry {alloca disadvantages}{48}{\code {alloca} disadvantages} +\entry {disadvantages of alloca}{48}{disadvantages of \code {alloca}} +\entry {variable-sized arrays}{49}{variable-sized arrays} +\entry {relocating memory allocator}{49}{relocating memory allocator} +\entry {handle}{49}{handle} +\entry {memory usage warnings}{50}{memory usage warnings} +\entry {warnings of memory almost full}{50}{warnings of memory almost full} +\entry {character testing}{53}{character testing} +\entry {classification of characters}{53}{classification of characters} +\entry {predicates on characters}{53}{predicates on characters} +\entry {character predicates}{53}{character predicates} +\entry {lower-case character}{53}{lower-case character} +\entry {upper-case character}{53}{upper-case character} +\entry {alphabetic character}{53}{alphabetic character} +\entry {digit character}{53}{digit character} +\entry {decimal digit character}{53}{decimal digit character} +\entry {alphanumeric character}{54}{alphanumeric character} +\entry {hexadecimal digit character}{54}{hexadecimal digit character} +\entry {punctuation character}{54}{punctuation character} +\entry {whitespace character}{54}{whitespace character} +\entry {blank character}{54}{blank character} +\entry {graphic character}{54}{graphic character} +\entry {printing character}{54}{printing character} +\entry {control character}{55}{control character} +\entry {ASCII character}{55}{ASCII character} +\entry {character case conversion}{55}{character case conversion} +\entry {case conversion of characters}{55}{case conversion of characters} +\entry {converting case of characters}{55}{converting case of characters} +\entry {string, representation of}{57}{string, representation of} +\entry {string}{57}{string} +\entry {null character}{57}{null character} +\entry {string literal}{57}{string literal} +\entry {length of string}{58}{length of string} +\entry {allocation size of string}{58}{allocation size of string} +\entry {size of string}{58}{size of string} +\entry {string length}{58}{string length} +\entry {string allocation}{58}{string allocation} +\entry {copying strings and arrays}{59}{copying strings and arrays} +\entry {string copy functions}{59}{string copy functions} +\entry {array copy functions}{59}{array copy functions} +\entry {concatenating strings}{59}{concatenating strings} +\entry {string concatenation functions}{59}{string concatenation functions} +\entry {comparing strings and arrays}{63}{comparing strings and arrays} +\entry {string comparison functions}{63}{string comparison functions} +\entry {array comparison functions}{63}{array comparison functions} +\entry {predicates on strings}{63}{predicates on strings} +\entry {predicates on arrays}{63}{predicates on arrays} +\entry {collating strings}{65}{collating strings} +\entry {string collation functions}{65}{string collation functions} +\entry {converting string to collation order}{66}{converting string to collation order} +\entry {search functions (for strings)}{68}{search functions (for strings)} +\entry {string search functions}{68}{string search functions} +\entry {tokenizing strings}{70}{tokenizing strings} +\entry {breaking a string into tokens}{70}{breaking a string into tokens} +\entry {parsing tokens from a string}{70}{parsing tokens from a string} +\entry {opening a file}{73}{opening a file} +\entry {file position}{75}{file position} +\entry {sequential-access files}{75}{sequential-access files} +\entry {random-access files}{75}{random-access files} +\entry {append-access files}{75}{append-access files} +\entry {file name}{75}{file name} +\entry {directory}{76}{directory} +\entry {link}{76}{link} +\entry {directory entry}{76}{directory entry} +\entry {file name component}{76}{file name component} +\entry {file name resolution}{76}{file name resolution} +\entry {root directory}{76}{root directory} +\entry {absolute file name}{76}{absolute file name} +\entry {relative file name}{76}{relative file name} +\entry {parent directory}{77}{parent directory} +\entry {file name syntax errors}{77}{file name syntax errors} +\entry {usual file name syntax errors}{77}{usual file name syntax errors} +\entry {file pointer}{81}{file pointer} +\entry {standard streams}{81}{standard streams} +\entry {streams, standard}{81}{streams, standard} +\entry {standard input stream}{81}{standard input stream} +\entry {standard output stream}{82}{standard output stream} +\entry {standard error stream}{82}{standard error stream} +\entry {opening a stream}{82}{opening a stream} +\entry {closing a stream}{84}{closing a stream} +\entry {writing to a stream, by characters}{85}{writing to a stream, by characters} +\entry {reading from a stream, by characters}{86}{reading from a stream, by characters} +\entry {peeking at input}{89}{peeking at input} +\entry {unreading characters}{89}{unreading characters} +\entry {pushing input back}{89}{pushing input back} +\entry {format string, for printf}{91}{format string, for \code {printf}} +\entry {template, for printf}{91}{template, for \code {printf}} +\entry {formatted output to a stream}{91}{formatted output to a stream} +\entry {writing to a stream, formatted}{91}{writing to a stream, formatted} +\entry {conversion specifications (printf)}{92}{conversion specifications (\code {printf})} +\entry {flag character (printf)}{93}{flag character (\code {printf})} +\entry {minimum field width (printf)}{93}{minimum field width (\code {printf})} +\entry {precision (printf)}{93}{precision (\code {printf})} +\entry {type modifier character (printf)}{94}{type modifier character (\code {printf})} +\entry {output conversions, for printf}{94}{output conversions, for \code {printf}} +\entry {parsing a template string}{104}{parsing a template string} +\entry {customizing printf}{107}{customizing \code {printf}} +\entry {defining new printf conversions}{107}{defining new \code {printf} conversions} +\entry {extending printf}{107}{extending \code {printf}} +\entry {formatted input from a stream}{112}{formatted input from a stream} +\entry {reading from a stream, formatted}{112}{reading from a stream, formatted} +\entry {format string, for scanf}{112}{format string, for \code {scanf}} +\entry {template, for scanf}{112}{template, for \code {scanf}} +\entry {conversion specifications (scanf)}{113}{conversion specifications (\code {scanf})} +\entry {matching failure, in scanf}{113}{matching failure, in \code {scanf}} +\entry {flag character (scanf)}{114}{flag character (\code {scanf})} +\entry {maximum field width (scanf)}{114}{maximum field width (\code {scanf})} +\entry {type modifier character (scanf)}{114}{type modifier character (\code {scanf})} +\entry {input conversions, for scanf}{114}{input conversions, for \code {scanf}} +\entry {binary I/O to a stream}{121}{binary I/O to a stream} +\entry {block I/O to a stream}{121}{block I/O to a stream} +\entry {reading from a stream, by blocks}{121}{reading from a stream, by blocks} +\entry {writing to a stream, by blocks}{121}{writing to a stream, by blocks} +\entry {end of file, on a stream}{121}{end of file, on a stream} +\entry {text stream}{122}{text stream} +\entry {binary stream}{122}{binary stream} +\entry {lines (in a text file)}{123}{lines (in a text file)} +\entry {file positioning on a stream}{123}{file positioning on a stream} +\entry {positioning a stream}{123}{positioning a stream} +\entry {seeking on a stream}{123}{seeking on a stream} +\entry {buffering of streams}{126}{buffering of streams} +\entry {unbuffered stream}{127}{unbuffered stream} +\entry {line buffered stream}{127}{line buffered stream} +\entry {fully buffered stream}{127}{fully buffered stream} +\entry {flushing a stream}{128}{flushing a stream} +\entry {buffering, controlling}{128}{buffering, controlling} +\entry {stream, for I/O to a string}{131}{stream, for I/O to a string} +\entry {string stream}{131}{string stream} +\entry {custom streams}{134}{custom streams} +\entry {programming your own streams}{134}{programming your own streams} +\entry {cookie, for custom stream}{134}{cookie, for custom stream} +\entry {hook functions (of custom streams)}{135}{hook functions (of custom streams)} +\entry {opening a file descriptor}{137}{opening a file descriptor} +\entry {closing a file descriptor}{137}{closing a file descriptor} +\entry {append mode (file status flag)}{138}{append mode (file status flag)} +\entry {create on open (file status flag)}{138}{create on open (file status flag)} +\entry {non-blocking mode (file status flag)}{138}{non-blocking mode (file status flag)} +\entry {reading from a file descriptor}{140}{reading from a file descriptor} +\entry {end-of-file, on a file descriptor}{140}{end-of-file, on a file descriptor} +\entry {writing to a file descriptor}{141}{writing to a file descriptor} +\entry {file positioning on a file descriptor}{143}{file positioning on a file descriptor} +\entry {positioning a file descriptor}{143}{positioning a file descriptor} +\entry {seeking on a file descriptor}{143}{seeking on a file descriptor} +\entry {streams, and file descriptors}{145}{streams, and file descriptors} +\entry {converting file descriptor to stream}{145}{converting file descriptor to stream} +\entry {extracting file descriptor from stream}{145}{extracting file descriptor from stream} +\entry {standard file descriptors}{146}{standard file descriptors} +\entry {file descriptors, standard}{146}{file descriptors, standard} +\entry {standard input file descriptor}{146}{standard input file descriptor} +\entry {standard output file descriptor}{146}{standard output file descriptor} +\entry {standard error file descriptor}{146}{standard error file descriptor} +\entry {channels}{146}{channels} +\entry {streams and descriptors}{146}{streams and descriptors} +\entry {descriptors and streams}{146}{descriptors and streams} +\entry {mixing descriptors and streams}{146}{mixing descriptors and streams} +\entry {linked channels}{147}{linked channels} +\entry {cleaning up a stream}{147}{cleaning up a stream} +\entry {independent channels}{147}{independent channels} +\entry {waiting for input or output}{148}{waiting for input or output} +\entry {multiplexing input}{148}{multiplexing input} +\entry {input from multiple files}{148}{input from multiple files} +\entry {file descriptor sets, for select}{149}{file descriptor sets, for \code {select}} +\entry {control operations on files}{152}{control operations on files} +\entry {fcntl function}{152}{\code {fcntl} function} +\entry {duplicating file descriptors}{153}{duplicating file descriptors} +\entry {redirecting input and output}{153}{redirecting input and output} +\entry {file descriptor flags}{155}{file descriptor flags} +\entry {close-on-exec (file descriptor flag)}{155}{close-on-exec (file descriptor flag)} +\entry {file status flags}{156}{file status flags} +\entry {file locks}{158}{file locks} +\entry {record locking}{158}{record locking} +\entry {exclusive lock}{158}{exclusive lock} +\entry {write lock}{158}{write lock} +\entry {shared lock}{158}{shared lock} +\entry {read lock}{158}{read lock} +\entry {interrupt-driven input}{162}{interrupt-driven input} +\entry {current working directory}{165}{current working directory} +\entry {working directory}{165}{working directory} +\entry {change working directory}{165}{change working directory} +\entry {accessing directories}{167}{accessing directories} +\entry {reading from a directory}{167}{reading from a directory} +\entry {directories, accessing}{167}{directories, accessing} +\entry {directory stream}{167}{directory stream} +\entry {hard link}{170}{hard link} +\entry {link, hard}{170}{link, hard} +\entry {multiple names for one file}{170}{multiple names for one file} +\entry {file names, multiple}{170}{file names, multiple} +\entry {soft link}{171}{soft link} +\entry {link, soft}{171}{link, soft} +\entry {symbolic link}{171}{symbolic link} +\entry {link, symbolic}{171}{link, symbolic} +\entry {deleting a file}{173}{deleting a file} +\entry {removing a file}{173}{removing a file} +\entry {unlinking a file}{173}{unlinking a file} +\entry {directories, deleting}{174}{directories, deleting} +\entry {deleting a directory}{174}{deleting a directory} +\entry {renaming a file}{174}{renaming a file} +\entry {creating a directory}{176}{creating a directory} +\entry {directories, creating}{176}{directories, creating} +\entry {status of a file}{177}{status of a file} +\entry {attributes of a file}{177}{attributes of a file} +\entry {file attributes}{177}{file attributes} +\entry {inode number}{179}{inode number} +\entry {file owner}{182}{file owner} +\entry {owner of a file}{182}{owner of a file} +\entry {group owner of a file}{182}{group owner of a file} +\entry {file permission bits}{184}{file permission bits} +\entry {sticky bit}{185}{sticky bit} +\entry {permission to access a file}{185}{permission to access a file} +\entry {access permission for a file}{185}{access permission for a file} +\entry {file access permission}{185}{file access permission} +\entry {file creation mask}{186}{file creation mask} +\entry {umask}{186}{umask} +\entry {testing access permission}{188}{testing access permission} +\entry {access, testing for}{188}{access, testing for} +\entry {setuid programs and file access}{188}{setuid programs and file access} +\entry {file access time}{189}{file access time} +\entry {file modification time}{189}{file modification time} +\entry {file attribute modification time}{189}{file attribute modification time} +\entry {creating special files}{191}{creating special files} +\entry {special files}{191}{special files} +\entry {TMPDIR environment variable}{193}{TMPDIR environment variable} +\entry {pipe}{195}{pipe} +\entry {FIFO special file}{195}{FIFO special file} +\entry {creating a pipe}{195}{creating a pipe} +\entry {opening a pipe}{195}{opening a pipe} +\entry {interprocess communication, with pipes}{195}{interprocess communication, with pipes} +\entry {creating a pipe to a subprocess}{197}{creating a pipe to a subprocess} +\entry {pipe to a subprocess}{197}{pipe to a subprocess} +\entry {filtering i/o through subprocess}{197}{filtering i/o through subprocess} +\entry {creating a FIFO special file}{199}{creating a FIFO special file} +\entry {interprocess communication, with FIFO}{199}{interprocess communication, with FIFO} +\entry {socket}{201}{socket} +\entry {interprocess communication, with sockets}{201}{interprocess communication, with sockets} +\entry {communication style (of a socket)}{201}{communication style (of a socket)} +\entry {style of communication (of a socket)}{201}{style of communication (of a socket)} +\entry {packet}{201}{packet} +\entry {byte stream}{201}{byte stream} +\entry {stream (sockets)}{201}{stream (sockets)} +\entry {loss of data on sockets}{201}{loss of data on sockets} +\entry {data loss on sockets}{201}{data loss on sockets} +\entry {namespace (of socket)}{201}{namespace (of socket)} +\entry {domain (of socket)}{201}{domain (of socket)} +\entry {socket namespace}{201}{socket namespace} +\entry {socket domain}{201}{socket domain} +\entry {network protocol}{202}{network protocol} +\entry {protocol (of socket)}{202}{protocol (of socket)} +\entry {socket protocol}{202}{socket protocol} +\entry {protocol family}{202}{protocol family} +\entry {address of socket}{203}{address of socket} +\entry {name of socket}{203}{name of socket} +\entry {binding a socket address}{203}{binding a socket address} +\entry {socket address (name) binding}{203}{socket address (name) binding} +\entry {file namespace, for sockets}{206}{file namespace, for sockets} +\entry {Internet namespace, for sockets}{209}{Internet namespace, for sockets} +\entry {host address, Internet}{210}{host address, Internet} +\entry {Internet host address}{210}{Internet host address} +\entry {network number}{210}{network number} +\entry {local network address number}{210}{local network address number} +\entry {standard dot notation, for Internet addresses}{211}{standard dot notation, for Internet addresses} +\entry {dot notation, for Internet addresses}{211}{dot notation, for Internet addresses} +\entry {hosts database}{213}{hosts database} +\entry {converting host name to address}{213}{converting host name to address} +\entry {converting host address to name}{213}{converting host address to name} +\entry {port number}{216}{port number} +\entry {services database}{217}{services database} +\entry {converting service name to port number}{217}{converting service name to port number} +\entry {converting port number to service name}{217}{converting port number to service name} +\entry {byte order conversion, for socket}{218}{byte order conversion, for socket} +\entry {converting byte order}{218}{converting byte order} +\entry {big-endian}{218}{big-endian} +\entry {little-endian}{218}{little-endian} +\entry {network byte order}{218}{network byte order} +\entry {protocols database}{219}{protocols database} +\entry {TCP (Internet protocol)}{219}{TCP (Internet protocol)} +\entry {creating a socket}{222}{creating a socket} +\entry {socket, creating}{222}{socket, creating} +\entry {opening a socket}{222}{opening a socket} +\entry {socket, closing}{223}{socket, closing} +\entry {closing a socket}{223}{closing a socket} +\entry {shutting down a socket}{223}{shutting down a socket} +\entry {socket shutdown}{223}{socket shutdown} +\entry {creating a socket pair}{224}{creating a socket pair} +\entry {socket pair}{224}{socket pair} +\entry {opening a socket pair}{224}{opening a socket pair} +\entry {connection}{225}{connection} +\entry {client}{225}{client} +\entry {server}{225}{server} +\entry {connecting a socket}{225}{connecting a socket} +\entry {socket, connecting}{225}{socket, connecting} +\entry {socket, initiating a connection}{225}{socket, initiating a connection} +\entry {socket, client actions}{225}{socket, client actions} +\entry {listening (sockets)}{226}{listening (sockets)} +\entry {sockets, server actions}{226}{sockets, server actions} +\entry {sockets, listening}{226}{sockets, listening} +\entry {sockets, accepting connections}{227}{sockets, accepting connections} +\entry {accepting connections}{227}{accepting connections} +\entry {reading from a socket}{229}{reading from a socket} +\entry {writing to a socket}{229}{writing to a socket} +\entry {out-of-band data}{235}{out-of-band data} +\entry {high-priority data}{235}{high-priority data} +\entry {urgent socket condition}{235}{urgent socket condition} +\entry {datagram socket}{238}{datagram socket} +\entry {sending a datagram}{239}{sending a datagram} +\entry {transmitting datagrams}{239}{transmitting datagrams} +\entry {datagrams, transmitting}{239}{datagrams, transmitting} +\entry {receiving datagrams}{239}{receiving datagrams} +\entry {socket options}{244}{socket options} +\entry {level, for socket options}{244}{level, for socket options} +\entry {socket option level}{244}{socket option level} +\entry {networks database}{247}{networks database} +\entry {converting network number to network name}{247}{converting network number to network name} +\entry {converting network name to network number}{247}{converting network name to network number} +\entry {terminal identification}{249}{terminal identification} +\entry {identifying terminals}{249}{identifying terminals} +\entry {terminal input queue}{249}{terminal input queue} +\entry {typeahead buffer}{249}{typeahead buffer} +\entry {terminal output queue}{250}{terminal output queue} +\entry {canonical input processing}{250}{canonical input processing} +\entry {noncanonical input processing}{250}{noncanonical input processing} +\entry {terminal mode data types}{251}{terminal mode data types} +\entry {terminal mode functions}{252}{terminal mode functions} +\entry {parity checking}{255}{parity checking} +\entry {break condition, detecting}{255}{break condition, detecting} +\entry {modem status lines}{257}{modem status lines} +\entry {carrier detect}{257}{carrier detect} +\entry {modem disconnect}{258}{modem disconnect} +\entry {echo of terminal input}{259}{echo of terminal input} +\entry {interactive signals, from terminal}{260}{interactive signals, from terminal} +\entry {line speed}{261}{line speed} +\entry {baud rate}{261}{baud rate} +\entry {terminal line speed}{261}{terminal line speed} +\entry {terminal line speed}{261}{terminal line speed} +\entry {EOF character}{263}{EOF character} +\entry {EOL character}{264}{EOL character} +\entry {ERASE character}{264}{ERASE character} +\entry {KILL character}{264}{KILL character} +\entry {EOL2 character}{264}{EOL2 character} +\entry {WERASE character}{265}{WERASE character} +\entry {REPRINT character}{265}{REPRINT character} +\entry {LNEXT character}{265}{LNEXT character} +\entry {INTR character}{265}{INTR character} +\entry {interrupt character}{265}{interrupt character} +\entry {QUIT character}{266}{QUIT character} +\entry {SUSP character}{266}{SUSP character} +\entry {suspend character}{266}{suspend character} +\entry {DSUSP character}{266}{DSUSP character} +\entry {delayed suspend character}{266}{delayed suspend character} +\entry {START character}{267}{START character} +\entry {STOP character}{267}{STOP character} +\entry {DISCARD character}{267}{DISCARD character} +\entry {STATUS character}{268}{STATUS character} +\entry {MIN termios slot}{268}{MIN termios slot} +\entry {TIME termios slot}{268}{TIME termios slot} +\entry {terminal line control functions}{269}{terminal line control functions} +\entry {break condition, generating}{270}{break condition, generating} +\entry {flushing terminal output queue}{270}{flushing terminal output queue} +\entry {terminal output queue, flushing}{270}{terminal output queue, flushing} +\entry {clearing terminal input queue}{270}{clearing terminal input queue} +\entry {terminal input queue, clearing}{270}{terminal input queue, clearing} +\entry {flow control, terminal}{271}{flow control, terminal} +\entry {terminal flow control}{271}{terminal flow control} +\entry {domain error}{275}{domain error} +\entry {range error}{275}{range error} +\entry {trigonometric functions}{276}{trigonometric functions} +\entry {pi (trigonometric constant)}{276}{pi (trigonometric constant)} +\entry {inverse trigonmetric functions}{277}{inverse trigonmetric functions} +\entry {exponentiation functions}{278}{exponentiation functions} +\entry {power functions}{278}{power functions} +\entry {logarithm functions}{278}{logarithm functions} +\entry {square root function}{278}{square root function} +\entry {cube root function}{278}{cube root function} +\entry {hyperbolic functions}{279}{hyperbolic functions} +\entry {inverse hyperbolic functions}{279}{inverse hyperbolic functions} +\entry {random numbers}{280}{random numbers} +\entry {pseudo-random numbers}{280}{pseudo-random numbers} +\entry {seed (for random numbers)}{280}{seed (for random numbers)} +\entry {NaN}{283}{NaN} +\entry {not a number}{283}{not a number} +\entry {IEEE floating point}{283}{IEEE floating point} +\entry {absolute value functions}{284}{absolute value functions} +\entry {normalization functions (floating-point)}{285}{normalization functions (floating-point)} +\entry {rounding functions}{286}{rounding functions} +\entry {remainder functions}{286}{remainder functions} +\entry {converting floats to integers}{286}{converting floats to integers} +\entry {integer division functions}{287}{integer division functions} +\entry {parsing numbers (in formatted input)}{288}{parsing numbers (in formatted input)} +\entry {converting strings to numbers}{288}{converting strings to numbers} +\entry {number syntax, parsing}{288}{number syntax, parsing} +\entry {syntax, for reading numbers}{288}{syntax, for reading numbers} +\entry {Comparison Function}{293}{Comparison Function} +\entry {search function (for arrays)}{293}{search function (for arrays)} +\entry {binary search function (for arrays)}{293}{binary search function (for arrays)} +\entry {array search function}{293}{array search function} +\entry {sort function (for arrays)}{294}{sort function (for arrays)} +\entry {quick sort function (for arrays)}{294}{quick sort function (for arrays)} +\entry {array sort function}{294}{array sort function} +\entry {stable sorting}{294}{stable sorting} +\entry {Kermit the frog}{296}{Kermit the frog} +\entry {globbing}{300}{globbing} +\entry {word expansion}{310}{word expansion} +\entry {expansion of shell words}{310}{expansion of shell words} +\entry {tilde expansion}{310}{tilde expansion} +\entry {variable substitution}{310}{variable substitution} +\entry {substitution of variables and commands}{310}{substitution of variables and commands} +\entry {command substitution}{310}{command substitution} +\entry {arithmetic expansion}{310}{arithmetic expansion} +\entry {field splitting}{310}{field splitting} +\entry {wildcard expansion}{310}{wildcard expansion} +\entry {quote removal}{310}{quote removal} +\entry {removal of quotes}{310}{removal of quotes} +\entry {CPU time}{315}{CPU time} +\entry {processor time}{315}{processor time} +\entry {clock ticks}{315}{clock ticks} +\entry {ticks, clock}{315}{ticks, clock} +\entry {time, elapsed CPU}{315}{time, elapsed CPU} +\entry {Gregorian calendar}{317}{Gregorian calendar} +\entry {time, calendar}{317}{time, calendar} +\entry {date and time}{317}{date and time} +\entry {calendar time}{317}{calendar time} +\entry {high-resolution time}{317}{high-resolution time} +\entry {local time}{317}{local time} +\entry {broken-down time}{317}{broken-down time} +\entry {epoch}{318}{epoch} +\entry {broken-down time}{321}{broken-down time} +\entry {calendar time and broken-down time}{321}{calendar time and broken-down time} +\entry {leap second}{321}{leap second} +\entry {Daylight Saving Time}{322}{Daylight Saving Time} +\entry {summer time}{322}{summer time} +\entry {time zone}{326}{time zone} +\entry {setting an alarm}{329}{setting an alarm} +\entry {interval timer, setting}{329}{interval timer, setting} +\entry {alarms, setting}{329}{alarms, setting} +\entry {timers, setting}{329}{timers, setting} +\entry {real-time timer}{329}{real-time timer} +\entry {virtual timer}{329}{virtual timer} +\entry {profiling timer}{329}{profiling timer} +\entry {resource limits}{334}{resource limits} +\entry {limits on resource usage}{334}{limits on resource usage} +\entry {usage limits}{334}{usage limits} +\entry {process priority}{335}{process priority} +\entry {priority of a process}{335}{priority of a process} +\entry {extended character sets}{339}{extended character sets} +\entry {wide characters}{339}{wide characters} +\entry {multibyte characters}{340}{multibyte characters} +\entry {basic byte sequence}{340}{basic byte sequence} +\entry {code, character}{343}{code, character} +\entry {character code}{343}{character code} +\entry {extended strings, converting representations}{344}{extended strings, converting representations} +\entry {converting extended strings}{344}{converting extended strings} +\entry {multibyte character, length of}{345}{multibyte character, length of} +\entry {length of multibyte character}{345}{length of multibyte character} +\entry {extended characters, converting}{346}{extended characters, converting} +\entry {converting extended characters}{346}{converting extended characters} +\entry {internationalization}{351}{internationalization} +\entry {locales}{351}{locales} +\entry {combining locales}{352}{combining locales} +\entry {categories for locales}{352}{categories for locales} +\entry {locale categories}{352}{locale categories} +\entry {changing the locale}{353}{changing the locale} +\entry {locale, changing}{353}{locale, changing} +\entry {monetary value formatting}{355}{monetary value formatting} +\entry {numeric value formatting}{355}{numeric value formatting} +\entry {decimal-point separator}{356}{decimal-point separator} +\entry {grouping of digits}{356}{grouping of digits} +\entry {currency symbols}{357}{currency symbols} +\entry {non-local exits}{361}{non-local exits} +\entry {long jumps}{361}{long jumps} +\entry {signal}{365}{signal} +\entry {generation of signals}{366}{generation of signals} +\entry {delivery of signals}{366}{delivery of signals} +\entry {pending signals}{366}{pending signals} +\entry {blocked signals}{366}{blocked signals} +\entry {specified action (for a signal)}{366}{specified action (for a signal)} +\entry {default action (for a signal)}{366}{default action (for a signal)} +\entry {signal action}{366}{signal action} +\entry {catching signals}{366}{catching signals} +\entry {signal names}{367}{signal names} +\entry {names of signals}{367}{names of signals} +\entry {signal number}{367}{signal number} +\entry {program error signals}{368}{program error signals} +\entry {exception}{369}{exception} +\entry {floating-point exception}{369}{floating-point exception} +\entry {illegal instruction}{370}{illegal instruction} +\entry {segmentation violation}{370}{segmentation violation} +\entry {bus error}{370}{bus error} +\entry {abort signal}{370}{abort signal} +\entry {program termination signals}{371}{program termination signals} +\entry {hangup signal}{371}{hangup signal} +\entry {interrupt signal}{371}{interrupt signal} +\entry {quit signal}{371}{quit signal} +\entry {quit signal}{371}{quit signal} +\entry {termination signal}{372}{termination signal} +\entry {kill signal}{372}{kill signal} +\entry {alarm signal}{372}{alarm signal} +\entry {virtual time alarm signal}{372}{virtual time alarm signal} +\entry {profiling alarm signal}{373}{profiling alarm signal} +\entry {input available signal}{373}{input available signal} +\entry {output possible signal}{373}{output possible signal} +\entry {urgent data signal}{373}{urgent data signal} +\entry {job control signals}{373}{job control signals} +\entry {child process signal}{373}{child process signal} +\entry {continue signal}{373}{continue signal} +\entry {stop signal}{374}{stop signal} +\entry {interactive stop signal}{374}{interactive stop signal} +\entry {terminal input signal}{374}{terminal input signal} +\entry {terminal output signal}{374}{terminal output signal} +\entry {pipe signal}{375}{pipe signal} +\entry {broken pipe signal}{375}{broken pipe signal} +\entry {user signals}{375}{user signals} +\entry {signal messages}{376}{signal messages} +\entry {signal actions}{377}{signal actions} +\entry {establishing a handler}{377}{establishing a handler} +\entry {signal function}{377}{\code {signal} function} +\entry {default action for a signal}{378}{default action for a signal} +\entry {ignore action for a signal}{378}{ignore action for a signal} +\entry {sigaction function}{380}{\code {sigaction} function} +\entry {signal flags}{383}{signal flags} +\entry {flags for sigaction}{383}{flags for \code {sigaction}} +\entry {sigaction flags}{383}{\code {sigaction} flags} +\entry {initial signal actions}{384}{initial signal actions} +\entry {signal handler function}{385}{signal handler function} +\entry {non-local exit, from signal handler}{387}{non-local exit, from signal handler} +\entry {race conditions, relating to signals}{388}{race conditions, relating to signals} +\entry {handling multiple signals}{389}{handling multiple signals} +\entry {successive signals}{389}{successive signals} +\entry {merging of signals}{389}{merging of signals} +\entry {restrictions on signal handler functions}{392}{restrictions on signal handler functions} +\entry {volatile declarations}{392}{\code {volatile} declarations} +\entry {reentrant functions}{392}{reentrant functions} +\entry {sending signals}{398}{sending signals} +\entry {raising signals}{398}{raising signals} +\entry {signals, generating}{398}{signals, generating} +\entry {killing a process}{399}{killing a process} +\entry {interprocess communication, with signals}{401}{interprocess communication, with signals} +\entry {blocking signals}{402}{blocking signals} +\entry {signal set}{403}{signal set} +\entry {signal mask}{405}{signal mask} +\entry {process signal mask}{405}{process signal mask} +\entry {blocking signals, in a handler}{407}{blocking signals, in a handler} +\entry {pending signals, checking for}{408}{pending signals, checking for} +\entry {blocked signals, checking for}{408}{blocked signals, checking for} +\entry {checking for pending signals}{408}{checking for pending signals} +\entry {timing error in signal handling}{410}{timing error in signal handling} +\entry {waiting for a signal}{411}{waiting for a signal} +\entry {pause function}{411}{\code {pause} function} +\entry {signal stack}{414}{signal stack} +\entry {process}{419}{process} +\entry {program arguments}{419}{program arguments} +\entry {command line arguments}{419}{command line arguments} +\entry {main function}{419}{\code {main} function} +\entry {argc (program argument count)}{419}{argc (program argument count)} +\entry {argv (program argument vector)}{419}{argv (program argument vector)} +\entry {program argument syntax}{420}{program argument syntax} +\entry {syntax, for program arguments}{420}{syntax, for program arguments} +\entry {command argument syntax}{420}{command argument syntax} +\entry {long-named options}{420}{long-named options} +\entry {program arguments, parsing}{421}{program arguments, parsing} +\entry {command arguments, parsing}{421}{command arguments, parsing} +\entry {parsing program arguments}{421}{parsing program arguments} +\entry {environment variable}{428}{environment variable} +\entry {environment}{428}{environment} +\entry {environment access}{428}{environment access} +\entry {environment representation}{428}{environment representation} +\entry {standard environment variables}{429}{standard environment variables} +\entry {HOME environment variable}{429}{HOME environment variable} +\entry {home directory}{429}{home directory} +\entry {LOGNAME environment variable}{429}{LOGNAME environment variable} +\entry {PATH environment variable}{430}{PATH environment variable} +\entry {TERM environment variable}{430}{TERM environment variable} +\entry {TZ environment variable}{430}{TZ environment variable} +\entry {LANG environment variable}{430}{LANG environment variable} +\entry {LC{\_}COLLATE environment variable}{431}{LC{\_}COLLATE environment variable} +\entry {LC{\_}CTYPE environment variable}{431}{LC{\_}CTYPE environment variable} +\entry {LC{\_}MONETARY environment variable}{431}{LC{\_}MONETARY environment variable} +\entry {LC{\_}NUMERIC environment variable}{431}{LC{\_}NUMERIC environment variable} +\entry {LC{\_}TIME environment variable}{431}{LC{\_}TIME environment variable} +\entry {{\_}POSIX{\_}OPTION{\_}ORDER environment variable.}{431}{{\_}POSIX{\_}OPTION{\_}ORDER environment variable.} +\entry {program termination}{431}{program termination} +\entry {process termination}{431}{process termination} +\entry {exit status value}{431}{exit status value} +\entry {exit status}{432}{exit status} +\entry {aborting a program}{434}{aborting a program} +\entry {process}{437}{process} +\entry {child process}{437}{child process} +\entry {parent process}{437}{parent process} +\entry {running a command}{437}{running a command} +\entry {process ID}{438}{process ID} +\entry {process lifetime}{438}{process lifetime} +\entry {creating a process}{438}{creating a process} +\entry {forking a process}{438}{forking a process} +\entry {child process}{438}{child process} +\entry {parent process}{438}{parent process} +\entry {process image}{438}{process image} +\entry {executing a file}{440}{executing a file} +\entry {exec functions}{440}{\code {exec} functions} +\entry {process completion}{443}{process completion} +\entry {waiting for completion of child process}{443}{waiting for completion of child process} +\entry {testing exit status of child process}{443}{testing exit status of child process} +\entry {process groups}{449}{process groups} +\entry {job control}{449}{job control} +\entry {job}{449}{job} +\entry {session}{449}{session} +\entry {shell}{449}{shell} +\entry {session}{449}{session} +\entry {session leader}{449}{session leader} +\entry {controlling terminal}{450}{controlling terminal} +\entry {foreground job}{450}{foreground job} +\entry {background job}{450}{background job} +\entry {stopped job}{450}{stopped job} +\entry {job control is optional}{450}{job control is optional} +\entry {controlling process}{451}{controlling process} +\entry {controlling terminal, access to}{451}{controlling terminal, access to} +\entry {SIGTTIN, from background job}{451}{\code {SIGTTIN}, from background job} +\entry {SIGTTOU, from background job}{451}{\code {SIGTTOU}, from background job} +\entry {orphaned process group}{451}{orphaned process group} +\entry {job control, enabling}{454}{job control, enabling} +\entry {subshell}{454}{subshell} +\entry {job control, enabling}{454}{job control, enabling} +\entry {launching jobs}{456}{launching jobs} +\entry {process group leader}{456}{process group leader} +\entry {process group ID}{456}{process group ID} +\entry {race conditions, relating to job control}{456}{race conditions, relating to job control} +\entry {foreground job, launching}{460}{foreground job, launching} +\entry {background job, launching}{461}{background job, launching} +\entry {stopped jobs, detecting}{461}{stopped jobs, detecting} +\entry {terminated jobs, detecting}{461}{terminated jobs, detecting} +\entry {SIGCHLD, handling of}{461}{\code {SIGCHLD}, handling of} +\entry {stopped jobs, continuing}{466}{stopped jobs, continuing} +\entry {process group functions}{467}{process group functions} +\entry {job control functions}{467}{job control functions} +\entry {controlling terminal, determining}{467}{controlling terminal, determining} +\entry {BSD compatibility library}{469}{BSD compatibility library} +\entry {login name}{473}{login name} +\entry {user name}{473}{user name} +\entry {user ID}{473}{user ID} +\entry {group name}{473}{group name} +\entry {group ID}{473}{group ID} +\entry {persona}{473}{persona} +\entry {effective user ID}{473}{effective user ID} +\entry {effective group ID}{473}{effective group ID} +\entry {real user ID}{474}{real user ID} +\entry {real group ID}{474}{real group ID} +\entry {supplementary group IDs}{474}{supplementary group IDs} +\entry {setuid programs}{475}{\code {setuid} programs} +\entry {login name, determining}{483}{login name, determining} +\entry {user ID, determining}{483}{user ID, determining} +\entry {user database}{484}{user database} +\entry {password database}{484}{password database} +\entry {converting user ID to user name}{484}{converting user ID to user name} +\entry {converting user name to user ID}{484}{converting user name to user ID} +\entry {scanning the user list}{485}{scanning the user list} +\entry {group database}{486}{group database} +\entry {converting group name to group ID}{487}{converting group name to group ID} +\entry {converting group ID to group name}{487}{converting group ID to group name} +\entry {scanning the group list}{487}{scanning the group list} +\entry {POSIX capacity limits}{495}{POSIX capacity limits} +\entry {limits, POSIX}{495}{limits, POSIX} +\entry {capacity limits, POSIX}{495}{capacity limits, POSIX} +\entry {limits, program argument size}{495}{limits, program argument size} +\entry {limits, number of processes}{495}{limits, number of processes} +\entry {limits, number of open files}{495}{limits, number of open files} +\entry {limits, time zone name length}{495}{limits, time zone name length} +\entry {limits, number of supplementary group IDs}{496}{limits, number of supplementary group IDs} +\entry {POSIX optional features}{496}{POSIX optional features} +\entry {optional POSIX features}{496}{optional POSIX features} +\entry {limits, link count of files}{503}{limits, link count of files} +\entry {limits, terminal input queue}{503}{limits, terminal input queue} +\entry {limits, file name length}{503}{limits, file name length} +\entry {limits, pipe buffer size}{504}{limits, pipe buffer size} +\entry {consistency checking}{511}{consistency checking} +\entry {impossible events}{511}{impossible events} +\entry {assertions}{511}{assertions} +\entry {variable number of arguments}{512}{variable number of arguments} +\entry {variadic functions}{512}{variadic functions} +\entry {optional arguments}{512}{optional arguments} +\entry {function prototypes (variadic)}{513}{function prototypes (variadic)} +\entry {prototypes for variadic functions}{513}{prototypes for variadic functions} +\entry {variadic function prototypes}{513}{variadic function prototypes} +\entry {variadic function argument access}{514}{variadic function argument access} +\entry {arguments (variadic functions)}{514}{arguments (variadic functions)} +\entry {number of arguments passed}{515}{number of arguments passed} +\entry {how many arguments}{515}{how many arguments} +\entry {arguments, how many}{515}{arguments, how many} +\entry {variadic functions, calling}{515}{variadic functions, calling} +\entry {calling variadic functions}{515}{calling variadic functions} +\entry {declaring variadic functions}{515}{declaring variadic functions} +\entry {default argument promotions}{516}{default argument promotions} +\entry {argument promotion}{516}{argument promotion} +\entry {null pointer constant}{519}{null pointer constant} +\entry {integer type width}{520}{integer type width} +\entry {width of integer type}{520}{width of integer type} +\entry {type measurements, integer}{520}{type measurements, integer} +\entry {integer type range}{521}{integer type range} +\entry {range of integer type}{521}{range of integer type} +\entry {limits, integer types}{521}{limits, integer types} +\entry {floating type measurements}{522}{floating type measurements} +\entry {measurements of floating types}{522}{measurements of floating types} +\entry {type measurements, floating}{522}{type measurements, floating} +\entry {limits, floating types}{522}{limits, floating types} +\entry {sign (of floating point number)}{523}{sign (of floating point number)} +\entry {base (of floating point number)}{523}{base (of floating point number)} +\entry {radix (of floating point number)}{523}{radix (of floating point number)} +\entry {exponent (of floating point number)}{523}{exponent (of floating point number)} +\entry {bias (of floating point number exponent)}{523}{bias (of floating point number exponent)} +\entry {mantissa (of floating point number)}{523}{mantissa (of floating point number)} +\entry {significand (of floating point number)}{523}{significand (of floating point number)} +\entry {precision (of floating point number)}{523}{precision (of floating point number)} +\entry {hidden bit (of floating point number mantissa)}{523}{hidden bit (of floating point number mantissa)} +\entry {normalized floating point number}{524}{normalized floating point number} +\entry {IEEE floating point representation}{527}{IEEE floating point representation} +\entry {floating point, IEEE}{527}{floating point, IEEE} +\entry {installing the library}{609}{installing the library} +\entry {reporting bugs}{612}{reporting bugs} diff -ruN glibc-1.06/manual/libc.cps glibc-1.07/manual/libc.cps --- glibc-1.06/manual/libc.cps Mon May 17 16:59:10 1993 +++ glibc-1.07/manual/libc.cps Wed Dec 29 18:34:47 1993 @@ -1,798 +1,799 @@ \initial {{\_}} -\entry {{\_}POSIX{\_}OPTION{\_}ORDER environment variable.}{469} +\entry {{\_}POSIX{\_}OPTION{\_}ORDER environment variable.}{431} \initial {4} -\entry {4.x BSD Unix}{3} +\entry {4.\var {n} BSD Unix}{3} \initial {A} -\entry {abort signal}{405} -\entry {aborting a program}{473} -\entry {absolute file name}{131} -\entry {absolute value functions}{356} -\entry {accepting connections}{293} -\entry {access permission for a file}{251} -\entry {access, testing for}{253} -\entry {accessing directories}{231} -\entry {address of socket}{267} -\entry {alarm signal}{407} -\entry {alarms, setting}{382} -\entry {alignment (in obstacks)}{47} -\entry {alignment (with \code {malloc})}{34} -\entry {\code {alloca} disadvantages}{53} -\entry {\code {alloca} function}{51} -\entry {allocation (obstacks)}{40} -\entry {allocation hooks, for \code {malloc}}{35} -\entry {allocation of memory with \code {malloc}}{29} -\entry {allocation size of string}{62} -\entry {allocation statistics}{36} -\entry {alphabetic character}{58} -\entry {alphanumeric character}{58} +\entry {abort signal}{370} +\entry {aborting a program}{434} +\entry {absolute file name}{76} +\entry {absolute value functions}{284} +\entry {accepting connections}{227} +\entry {access permission for a file}{185} +\entry {access, testing for}{188} +\entry {accessing directories}{167} +\entry {address of socket}{203} +\entry {alarm signal}{372} +\entry {alarms, setting}{329} +\entry {alignment (in obstacks)}{43} +\entry {alignment (with \code {malloc})}{31} +\entry {\code {alloca} disadvantages}{48} +\entry {\code {alloca} function}{46} +\entry {allocation (obstacks)}{37} +\entry {allocation hooks, for \code {malloc}}{32} +\entry {allocation of memory with \code {malloc}}{26} +\entry {allocation size of string}{58} +\entry {allocation statistics}{33} +\entry {alphabetic character}{53} +\entry {alphanumeric character}{54} \entry {ANSI C}{2} -\entry {append mode (file status flag)}{200} -\entry {append-access files}{129} -\entry {argc (program argument count)}{457} -\entry {argument promotion}{560} -\entry {arguments (variadic functions)}{558} -\entry {arguments, how many}{559} -\entry {argv (program argument vector)}{457} -\entry {arithmetic expansion}{121} -\entry {array comparison functions}{68} -\entry {array copy functions}{63} -\entry {array search function}{104} -\entry {array sort function}{104} -\entry {ASCII character}{59} -\entry {assertions}{555} -\entry {attributes of a file}{242} -\entry {automatic allocation}{27} -\entry {automatic freeing}{51} -\entry {automatic storage with variable size}{51} +\entry {append mode (file status flag)}{138} +\entry {append-access files}{75} +\entry {argc (program argument count)}{419} +\entry {argument promotion}{516} +\entry {arguments (variadic functions)}{514} +\entry {arguments, how many}{515} +\entry {argv (program argument vector)}{419} +\entry {arithmetic expansion}{310} +\entry {array comparison functions}{63} +\entry {array copy functions}{59} +\entry {array search function}{293} +\entry {array sort function}{294} +\entry {ASCII character}{55} +\entry {assertions}{511} +\entry {attributes of a file}{177} +\entry {automatic allocation}{25} +\entry {automatic freeing}{46} +\entry {automatic storage with variable size}{46} \initial {B} -\entry {background job}{490} -\entry {background job, launching}{502} -\entry {base (of floating point number)}{568} -\entry {basic byte sequence}{80} -\entry {baud rate}{329} +\entry {background job}{450} +\entry {background job, launching}{461} +\entry {base (of floating point number)}{523} +\entry {basic byte sequence}{340} +\entry {baud rate}{261} \entry {Berkeley Unix}{3} -\entry {bias (of floating point number exponent)}{568} -\entry {big-endian}{283} -\entry {binary I/O to a stream}{178} -\entry {binary search function (for arrays)}{104} -\entry {binary stream}{180} -\entry {binding a socket address}{267} -\entry {blank character}{58} -\entry {block I/O to a stream}{178} -\entry {blocked signals}{401} -\entry {blocked signals, checking for}{446} -\entry {blocking signals}{440} -\entry {blocking signals, in a handler}{445} -\entry {break condition, detecting}{324} -\entry {break condition, generating}{339} -\entry {breaking a string into tokens}{76} -\entry {broken pipe signal}{410} -\entry {broken-down time}{370, 374} -\entry {BSD compatibility library}{510} +\entry {bias (of floating point number exponent)}{523} +\entry {big-endian}{218} +\entry {binary I/O to a stream}{121} +\entry {binary search function (for arrays)}{293} +\entry {binary stream}{122} +\entry {binding a socket address}{203} +\entry {blank character}{54} +\entry {block I/O to a stream}{121} +\entry {blocked signals}{366} +\entry {blocked signals, checking for}{408} +\entry {blocking signals}{402} +\entry {blocking signals, in a handler}{407} +\entry {break condition, detecting}{255} +\entry {break condition, generating}{270} +\entry {breaking a string into tokens}{70} +\entry {broken pipe signal}{375} +\entry {broken-down time}{317, 321} +\entry {BSD compatibility library}{469} +\entry {BSD compatibility library.}{9} \entry {BSD Unix}{3} -\entry {buffering of streams}{185} -\entry {buffering, controlling}{187} -\entry {bus error}{405} -\entry {byte order conversion, for socket}{283} -\entry {byte stream}{265} +\entry {buffering of streams}{126} +\entry {buffering, controlling}{128} +\entry {bus error}{370} +\entry {byte order conversion, for socket}{218} +\entry {byte stream}{201} \initial {C} -\entry {calendar time}{370} -\entry {calendar time and broken-down time}{374} -\entry {calling variadic functions}{560} -\entry {canonical input processing}{318} -\entry {capacity limits, POSIX}{537} -\entry {carrier detect}{326} -\entry {case conversion of characters}{59} -\entry {catching signals}{401} -\entry {categories for locales}{94} -\entry {change working directory}{229} -\entry {changing the locale}{95} -\entry {changing the size of a block (\code {malloc})}{31} -\entry {changing the size of a block (obstacks)}{43} -\entry {channels}{209} -\entry {character case conversion}{59} -\entry {character code}{84} -\entry {character predicates}{57} -\entry {character testing}{57} -\entry {checking for pending signals}{446} -\entry {child process}{475, 476} -\entry {child process signal}{408} -\entry {chunks}{48} -\entry {classification of characters}{57} -\entry {cleaning up a stream}{209} -\entry {clearing terminal input queue}{340} -\entry {client}{291} -\entry {clock ticks}{367} -\entry {close-on-exec (file descriptor flag)}{219} -\entry {closing a file descriptor}{199} -\entry {closing a socket}{289} -\entry {closing a stream}{138} -\entry {code, character}{84} -\entry {collating strings}{70} -\entry {combining locales}{94} -\entry {command argument syntax}{458} -\entry {command arguments, parsing}{459} -\entry {command line arguments}{457} -\entry {command substitution}{121} -\entry {communication style (of a socket)}{265} -\entry {comparing strings and arrays}{68} -\entry {Comparison Function}{103} -\entry {concatenating strings}{63} -\entry {connecting a socket}{291} -\entry {connection}{291} -\entry {consistency checking}{555} -\entry {consistency checking, of heap}{34} -\entry {continue signal}{408} -\entry {control character}{59} -\entry {control operations on files}{214} -\entry {controlling process}{491} -\entry {controlling terminal}{490} -\entry {controlling terminal, access to}{491} -\entry {controlling terminal, determining}{509} -\entry {conversion specifications (\code {printf})}{146} -\entry {conversion specifications (\code {scanf})}{169} -\entry {converting byte order}{283} -\entry {converting case of characters}{59} -\entry {converting extended characters}{86} -\entry {converting extended strings}{84} -\entry {converting file descriptor to stream}{208} -\entry {converting floats to integers}{359} -\entry {converting group ID to group name}{528} -\entry {converting group name to group ID}{528} -\entry {converting host address to name}{278} -\entry {converting host name to address}{278} -\entry {converting network name to network number}{315} -\entry {converting network number to network name}{315} -\entry {converting port number to service name}{282} -\entry {converting service name to port number}{282} -\entry {converting string to collation order}{71} -\entry {converting strings to numbers}{361} -\entry {converting user ID to user name}{526} -\entry {converting user name to user ID}{526} -\entry {cookie, for custom stream}{195} -\entry {copying strings and arrays}{63} -\entry {CPU time}{367} -\entry {create on open (file status flag)}{200} -\entry {creating a directory}{241} -\entry {creating a FIFO special file}{263} -\entry {creating a pipe}{259} -\entry {creating a pipe to a subprocess}{261} -\entry {creating a process}{476} -\entry {creating a socket}{288} -\entry {creating a socket pair}{290} -\entry {creating special files}{257} -\entry {cube root function}{349} -\entry {currency symbols}{99} -\entry {current working directory}{229} -\entry {custom streams}{195} -\entry {customizing \code {printf}}{164} +\entry {calendar time}{317} +\entry {calendar time and broken-down time}{321} +\entry {calling variadic functions}{515} +\entry {canonical input processing}{250} +\entry {capacity limits, POSIX}{495} +\entry {carrier detect}{257} +\entry {case conversion of characters}{55} +\entry {catching signals}{366} +\entry {categories for locales}{352} +\entry {change working directory}{165} +\entry {changing the locale}{353} +\entry {changing the size of a block (\code {malloc})}{29} +\entry {changing the size of a block (obstacks)}{39} +\entry {channels}{146} +\entry {character case conversion}{55} +\entry {character code}{343} +\entry {character predicates}{53} +\entry {character testing}{53} +\entry {checking for pending signals}{408} +\entry {child process}{437, 438} +\entry {child process signal}{373} +\entry {chunks}{44} +\entry {classification of characters}{53} +\entry {cleaning up a stream}{147} +\entry {clearing terminal input queue}{270} +\entry {client}{225} +\entry {clock ticks}{315} +\entry {close-on-exec (file descriptor flag)}{155} +\entry {closing a file descriptor}{137} +\entry {closing a socket}{223} +\entry {closing a stream}{84} +\entry {code, character}{343} +\entry {collating strings}{65} +\entry {combining locales}{352} +\entry {command argument syntax}{420} +\entry {command arguments, parsing}{421} +\entry {command line arguments}{419} +\entry {command substitution}{310} +\entry {communication style (of a socket)}{201} +\entry {comparing strings and arrays}{63} +\entry {Comparison Function}{293} +\entry {concatenating strings}{59} +\entry {connecting a socket}{225} +\entry {connection}{225} +\entry {consistency checking}{511} +\entry {consistency checking, of heap}{32} +\entry {continue signal}{373} +\entry {control character}{55} +\entry {control operations on files}{152} +\entry {controlling process}{451} +\entry {controlling terminal}{450} +\entry {controlling terminal, access to}{451} +\entry {controlling terminal, determining}{467} +\entry {conversion specifications (\code {printf})}{92} +\entry {conversion specifications (\code {scanf})}{113} +\entry {converting byte order}{218} +\entry {converting case of characters}{55} +\entry {converting extended characters}{346} +\entry {converting extended strings}{344} +\entry {converting file descriptor to stream}{145} +\entry {converting floats to integers}{286} +\entry {converting group ID to group name}{487} +\entry {converting group name to group ID}{487} +\entry {converting host address to name}{213} +\entry {converting host name to address}{213} +\entry {converting network name to network number}{247} +\entry {converting network number to network name}{247} +\entry {converting port number to service name}{217} +\entry {converting service name to port number}{217} +\entry {converting string to collation order}{66} +\entry {converting strings to numbers}{288} +\entry {converting user ID to user name}{484} +\entry {converting user name to user ID}{484} +\entry {cookie, for custom stream}{134} +\entry {copying strings and arrays}{59} +\entry {CPU time}{315} +\entry {create on open (file status flag)}{138} +\entry {creating a directory}{176} +\entry {creating a FIFO special file}{199} +\entry {creating a pipe}{195} +\entry {creating a pipe to a subprocess}{197} +\entry {creating a process}{438} +\entry {creating a socket}{222} +\entry {creating a socket pair}{224} +\entry {creating special files}{191} +\entry {cube root function}{278} +\entry {currency symbols}{357} +\entry {current working directory}{165} +\entry {custom streams}{134} +\entry {customizing \code {printf}}{107} \initial {D} -\entry {data loss on sockets}{265} -\entry {datagram socket}{305} -\entry {datagrams, transmitting}{305} -\entry {date and time}{370} -\entry {Daylight Saving Time}{375} -\entry {decimal digit character}{58} -\entry {decimal-point separator}{98} +\entry {data loss on sockets}{201} +\entry {datagram socket}{238} +\entry {datagrams, transmitting}{239} +\entry {date and time}{317} +\entry {Daylight Saving Time}{322} +\entry {decimal digit character}{53} +\entry {decimal-point separator}{356} \entry {declaration (compared to definition)}{4} -\entry {declaring variadic functions}{560} -\entry {default action (for a signal)}{401} -\entry {default action for a signal}{413} -\entry {default argument promotions}{560} -\entry {defining new \code {printf} conversions}{164} +\entry {declaring variadic functions}{515} +\entry {default action (for a signal)}{366} +\entry {default action for a signal}{378} +\entry {default argument promotions}{516} +\entry {defining new \code {printf} conversions}{107} \entry {definition (compared to declaration)}{4} -\entry {delayed suspend character}{335} -\entry {deleting a directory}{239} -\entry {deleting a file}{238} -\entry {delivery of signals}{401} -\entry {descriptors and streams}{209} -\entry {digit character}{58} -\entry {directories, accessing}{231} -\entry {directories, creating}{241} -\entry {directories, deleting}{239} -\entry {directory}{130} -\entry {directory entry}{130} -\entry {directory stream}{231} -\entry {disadvantages of \code {alloca}}{53} -\entry {DISCARD character}{337} -\entry {domain (of socket)}{266} -\entry {domain error}{345} -\entry {dot notation, for Internet addresses}{276} -\entry {DSUSP character}{335} -\entry {duplicating file descriptors}{215} -\entry {dynamic allocation}{27} +\entry {delayed suspend character}{266} +\entry {deleting a directory}{174} +\entry {deleting a file}{173} +\entry {delivery of signals}{366} +\entry {descriptors and streams}{146} +\entry {digit character}{53} +\entry {directories, accessing}{167} +\entry {directories, creating}{176} +\entry {directories, deleting}{174} +\entry {directory}{76} +\entry {directory entry}{76} +\entry {directory stream}{167} +\entry {disadvantages of \code {alloca}}{48} +\entry {DISCARD character}{267} +\entry {domain (of socket)}{201} +\entry {domain error}{275} +\entry {dot notation, for Internet addresses}{211} +\entry {DSUSP character}{266} +\entry {duplicating file descriptors}{153} +\entry {dynamic allocation}{25} \initial {E} -\entry {echo of terminal input}{327} -\entry {effective group ID}{513} -\entry {effective user ID}{513} -\entry {efficiency and \code {malloc}}{33} -\entry {efficiency and obstacks}{45} -\entry {efficiency of chunks}{48} -\entry {end of file, on a stream}{179} -\entry {end-of-file, on a file descriptor}{202} -\entry {environment}{467} -\entry {environment access}{467} -\entry {environment representation}{467} -\entry {environment variable}{466} -\entry {EOF character}{332} -\entry {EOL character}{332} -\entry {EOL2 character}{333} -\entry {epoch}{370} -\entry {ERASE character}{332} +\entry {echo of terminal input}{259} +\entry {effective group ID}{473} +\entry {effective user ID}{473} +\entry {efficiency and \code {malloc}}{31} +\entry {efficiency and obstacks}{41} +\entry {efficiency of chunks}{44} +\entry {end of file, on a stream}{121} +\entry {end-of-file, on a file descriptor}{140} +\entry {environment}{428} +\entry {environment access}{428} +\entry {environment representation}{428} +\entry {environment variable}{428} +\entry {EOF character}{263} +\entry {EOL character}{264} +\entry {EOL2 character}{264} +\entry {epoch}{318} +\entry {ERASE character}{264} \entry {error codes}{13} \entry {error reporting}{13} -\entry {establishing a handler}{412} -\entry {exception}{403} -\entry {exclusive lock}{222} -\entry {\code {exec} functions}{479} -\entry {executing a file}{479} -\entry {exit status}{471} -\entry {exit status value}{470} -\entry {expansion of shell words}{120} -\entry {exponent (of floating point number)}{568} -\entry {exponentiation functions}{348} -\entry {extended character sets}{79} -\entry {extended characters, converting}{86} -\entry {extended strings, converting representations}{84} -\entry {extending \code {printf}}{164} -\entry {extracting file descriptor from stream}{208} +\entry {establishing a handler}{377} +\entry {exception}{369} +\entry {exclusive lock}{158} +\entry {\code {exec} functions}{440} +\entry {executing a file}{440} +\entry {exit status}{432} +\entry {exit status value}{431} +\entry {expansion of shell words}{310} +\entry {exponent (of floating point number)}{523} +\entry {exponentiation functions}{278} +\entry {extended character sets}{339} +\entry {extended characters, converting}{346} +\entry {extended strings, converting representations}{344} +\entry {extending \code {printf}}{107} +\entry {extracting file descriptor from stream}{145} \initial {F} -\entry {\code {fcntl} function}{214} -\entry {feature test macros}{9} -\entry {field splitting}{121} -\entry {FIFO special file}{259} -\entry {file access permission}{251} -\entry {file access time}{255} -\entry {file attribute modification time}{255} -\entry {file attributes}{242} -\entry {file creation mask}{251} -\entry {file descriptor flags}{218} -\entry {file descriptor sets, for \code {select}}{211} -\entry {file descriptors, standard}{208} -\entry {file locks}{222} -\entry {file modification time}{255} -\entry {file name}{130} -\entry {file name component}{130} -\entry {file name resolution}{131} -\entry {file name syntax errors}{132} -\entry {file names, multiple}{235} -\entry {file namespace, for sockets}{271} -\entry {file owner}{247} -\entry {file permission bits}{249} -\entry {file pointer}{135} -\entry {file position}{129} -\entry {file positioning on a file descriptor}{205} -\entry {file positioning on a stream}{181} -\entry {file status flags}{219} -\entry {filtering i/o through subprocess}{261} -\entry {flag character (\code {printf})}{148} -\entry {flag character (\code {scanf})}{171} -\entry {flags for \code {sigaction}}{419} -\entry {floating point, IEEE}{572} -\entry {floating type measurements}{568} -\entry {floating-point exception}{403} -\entry {flow control, terminal}{340} -\entry {flushing a stream}{186} -\entry {flushing terminal output queue}{339} -\entry {foreground job}{490} -\entry {foreground job, launching}{501} -\entry {forking a process}{476} -\entry {format string, for \code {printf}}{146} -\entry {format string, for \code {scanf}}{169} -\entry {formatted input from a stream}{169} -\entry {formatted output to a stream}{146} -\entry {freeing (obstacks)}{41} -\entry {freeing memory allocated with \code {malloc}}{30} -\entry {fully buffered stream}{185} -\entry {function prototypes (variadic)}{558} +\entry {\code {fcntl} function}{152} +\entry {feature test macros}{8} +\entry {field splitting}{310} +\entry {FIFO special file}{195} +\entry {file access permission}{185} +\entry {file access time}{189} +\entry {file attribute modification time}{189} +\entry {file attributes}{177} +\entry {file creation mask}{186} +\entry {file descriptor flags}{155} +\entry {file descriptor sets, for \code {select}}{149} +\entry {file descriptors, standard}{146} +\entry {file locks}{158} +\entry {file modification time}{189} +\entry {file name}{75} +\entry {file name component}{76} +\entry {file name resolution}{76} +\entry {file name syntax errors}{77} +\entry {file names, multiple}{170} +\entry {file namespace, for sockets}{206} +\entry {file owner}{182} +\entry {file permission bits}{184} +\entry {file pointer}{81} +\entry {file position}{75} +\entry {file positioning on a file descriptor}{143} +\entry {file positioning on a stream}{123} +\entry {file status flags}{156} +\entry {filtering i/o through subprocess}{197} +\entry {flag character (\code {printf})}{93} +\entry {flag character (\code {scanf})}{114} +\entry {flags for \code {sigaction}}{383} +\entry {floating point, IEEE}{527} +\entry {floating type measurements}{522} +\entry {floating-point exception}{369} +\entry {flow control, terminal}{271} +\entry {flushing a stream}{128} +\entry {flushing terminal output queue}{270} +\entry {foreground job}{450} +\entry {foreground job, launching}{460} +\entry {forking a process}{438} +\entry {format string, for \code {printf}}{91} +\entry {format string, for \code {scanf}}{112} +\entry {formatted input from a stream}{112} +\entry {formatted output to a stream}{91} +\entry {freeing (obstacks)}{38} +\entry {freeing memory allocated with \code {malloc}}{28} +\entry {fully buffered stream}{127} +\entry {function prototypes (variadic)}{513} \initial {G} -\entry {generation of signals}{400} -\entry {globbing}{110} -\entry {graphic character}{59} -\entry {Gregorian calendar}{370} -\entry {group database}{528} -\entry {group ID}{513} -\entry {group name}{513} -\entry {group owner of a file}{247} -\entry {grouping of digits}{99} -\entry {growing objects (in obstacks)}{43} +\entry {generation of signals}{366} +\entry {globbing}{300} +\entry {graphic character}{54} +\entry {Gregorian calendar}{317} +\entry {group database}{486} +\entry {group ID}{473} +\entry {group name}{473} +\entry {group owner of a file}{182} +\entry {grouping of digits}{356} +\entry {growing objects (in obstacks)}{39} \initial {H} -\entry {handle}{54} -\entry {handling multiple signals}{426} -\entry {hangup signal}{405} -\entry {hard link}{235} +\entry {handle}{49} +\entry {handling multiple signals}{389} +\entry {hangup signal}{371} +\entry {hard link}{170} \entry {header files}{4} -\entry {heap consistency checking}{34} -\entry {heap, dynamic allocation from}{28} -\entry {heap, freeing memory from}{30} -\entry {hexadecimal digit character}{58} -\entry {hidden bit (of floating point number mantissa)}{569} -\entry {high-priority data}{301} -\entry {high-resolution time}{370} -\entry {home directory}{468} -\entry {HOME environment variable}{468} -\entry {hook functions (of custom streams)}{196} -\entry {host address, Internet}{276} -\entry {hosts database}{278} -\entry {how many arguments}{559} -\entry {hyperbolic functions}{350} +\entry {heap consistency checking}{32} +\entry {heap, dynamic allocation from}{26} +\entry {heap, freeing memory from}{28} +\entry {hexadecimal digit character}{54} +\entry {hidden bit (of floating point number mantissa)}{523} +\entry {high-priority data}{235} +\entry {high-resolution time}{317} +\entry {home directory}{429} +\entry {HOME environment variable}{429} +\entry {hook functions (of custom streams)}{135} +\entry {host address, Internet}{210} +\entry {hosts database}{213} +\entry {how many arguments}{515} +\entry {hyperbolic functions}{279} \initial {I} -\entry {identifying terminals}{317} -\entry {IEEE floating point}{355} -\entry {IEEE floating point representation}{572} -\entry {IEEE Std 1003.1}{3} -\entry {IEEE Std 1003.2}{3} -\entry {ignore action for a signal}{413} -\entry {illegal instruction}{404} -\entry {impossible events}{555} -\entry {independent channels}{209} -\entry {initial signal actions}{420} -\entry {inode number}{244} -\entry {input available signal}{408} -\entry {input conversions, for \code {scanf}}{171} -\entry {input from multiple files}{211} -\entry {installing the library}{633} -\entry {integer division functions}{360} -\entry {integer type range}{566} -\entry {integer type width}{565} -\entry {interactive signals, from terminal}{328} -\entry {interactive stop signal}{409} -\entry {internationalization}{93} -\entry {Internet host address}{276} -\entry {Internet namespace, for sockets}{274} -\entry {interprocess communication, with FIFO}{263} -\entry {interprocess communication, with pipes}{259} -\entry {interprocess communication, with signals}{438} -\entry {interprocess communication, with sockets}{265} -\entry {interrupt character}{334} -\entry {interrupt signal}{406} -\entry {interrupt-driven input}{226} -\entry {interval timer, setting}{382} -\entry {INTR character}{334} -\entry {inverse hyperbolic functions}{350} -\entry {inverse trigonmetric functions}{347} +\entry {identifying terminals}{249} +\entry {IEEE floating point}{283} +\entry {IEEE floating point representation}{527} +\entry {IEEE Std 1003.1}{2} +\entry {IEEE Std 1003.2}{2} +\entry {ignore action for a signal}{378} +\entry {illegal instruction}{370} +\entry {impossible events}{511} +\entry {independent channels}{147} +\entry {initial signal actions}{384} +\entry {inode number}{179} +\entry {input available signal}{373} +\entry {input conversions, for \code {scanf}}{114} +\entry {input from multiple files}{148} +\entry {installing the library}{609} +\entry {integer division functions}{287} +\entry {integer type range}{521} +\entry {integer type width}{520} +\entry {interactive signals, from terminal}{260} +\entry {interactive stop signal}{374} +\entry {internationalization}{351} +\entry {Internet host address}{210} +\entry {Internet namespace, for sockets}{209} +\entry {interprocess communication, with FIFO}{199} +\entry {interprocess communication, with pipes}{195} +\entry {interprocess communication, with signals}{401} +\entry {interprocess communication, with sockets}{201} +\entry {interrupt character}{265} +\entry {interrupt signal}{371} +\entry {interrupt-driven input}{162} +\entry {interval timer, setting}{329} +\entry {INTR character}{265} +\entry {inverse hyperbolic functions}{279} +\entry {inverse trigonmetric functions}{277} \initial {J} -\entry {job}{489} -\entry {job control}{489} -\entry {job control functions}{508} -\entry {job control is optional}{490} -\entry {job control signals}{408} -\entry {job control, enabling}{495} +\entry {job}{449} +\entry {job control}{449} +\entry {job control functions}{467} +\entry {job control is optional}{450} +\entry {job control signals}{373} +\entry {job control, enabling}{454} \initial {K} -\entry {Kermit the frog}{107} -\entry {KILL character}{333} -\entry {kill signal}{407} -\entry {killing a process}{436} +\entry {Kermit the frog}{296} +\entry {KILL character}{264} +\entry {kill signal}{372} +\entry {killing a process}{399} \initial {L} -\entry {LANG environment variable}{469} -\entry {launching jobs}{497} -\entry {LC{\_}COLLATE environment variable}{469} -\entry {LC{\_}CTYPE environment variable}{469} -\entry {LC{\_}MONETARY environment variable}{469} -\entry {LC{\_}NUMERIC environment variable}{469} -\entry {LC{\_}TIME environment variable}{469} -\entry {leap second}{374} -\entry {length of multibyte character}{86} -\entry {length of string}{62} -\entry {level, for socket options}{312} +\entry {LANG environment variable}{430} +\entry {launching jobs}{456} +\entry {LC{\_}COLLATE environment variable}{431} +\entry {LC{\_}CTYPE environment variable}{431} +\entry {LC{\_}MONETARY environment variable}{431} +\entry {LC{\_}NUMERIC environment variable}{431} +\entry {LC{\_}TIME environment variable}{431} +\entry {leap second}{321} +\entry {length of multibyte character}{345} +\entry {length of string}{58} +\entry {level, for socket options}{244} \entry {library}{1} -\entry {limits on resource usage}{387} -\entry {limits, file name length}{546} -\entry {limits, floating types}{568} -\entry {limits, integer types}{566} -\entry {limits, link count of files}{546} -\entry {limits, number of open files}{537} -\entry {limits, number of processes}{537} -\entry {limits, number of supplementary group IDs}{538} -\entry {limits, pipe buffer size}{546} -\entry {limits, POSIX}{537} -\entry {limits, program argument size}{537} -\entry {limits, terminal input queue}{546} -\entry {limits, time zone name length}{538} -\entry {line buffered stream}{185} -\entry {line speed}{329} -\entry {lines (in a text file)}{181} -\entry {link}{130} -\entry {link, hard}{235} -\entry {link, soft}{236} -\entry {link, symbolic}{236} -\entry {linked channels}{209} -\entry {listening (sockets)}{292} -\entry {little-endian}{283} -\entry {LNEXT character}{334} -\entry {local network address number}{276} -\entry {local time}{370} -\entry {locale categories}{94} -\entry {locale, changing}{95} -\entry {locales}{93} -\entry {logarithm functions}{348} -\entry {login name}{513} -\entry {login name, determining}{524} -\entry {LOGNAME environment variable}{468} -\entry {long jumps}{393} -\entry {long-named options}{458} -\entry {longjmp}{52} -\entry {loss of data on sockets}{265} -\entry {lower-case character}{57} +\entry {limits on resource usage}{334} +\entry {limits, file name length}{503} +\entry {limits, floating types}{522} +\entry {limits, integer types}{521} +\entry {limits, link count of files}{503} +\entry {limits, number of open files}{495} +\entry {limits, number of processes}{495} +\entry {limits, number of supplementary group IDs}{496} +\entry {limits, pipe buffer size}{504} +\entry {limits, POSIX}{495} +\entry {limits, program argument size}{495} +\entry {limits, terminal input queue}{503} +\entry {limits, time zone name length}{495} +\entry {line buffered stream}{127} +\entry {line speed}{261} +\entry {lines (in a text file)}{123} +\entry {link}{76} +\entry {link, hard}{170} +\entry {link, soft}{171} +\entry {link, symbolic}{171} +\entry {linked channels}{147} +\entry {listening (sockets)}{226} +\entry {little-endian}{218} +\entry {LNEXT character}{265} +\entry {local network address number}{210} +\entry {local time}{317} +\entry {locale categories}{352} +\entry {locale, changing}{353} +\entry {locales}{351} +\entry {logarithm functions}{278} +\entry {login name}{473} +\entry {login name, determining}{483} +\entry {LOGNAME environment variable}{429} +\entry {long jumps}{361} +\entry {long-named options}{420} +\entry {longjmp}{48} +\entry {loss of data on sockets}{201} +\entry {lower-case character}{53} \initial {M} -\entry {macros}{42} -\entry {\code {main} function}{457} -\entry {\code {malloc} function}{28} -\entry {mantissa (of floating point number)}{569} -\entry {matching failure, in \code {scanf}}{170} -\entry {maximum field width (\code {scanf})}{171} -\entry {measurements of floating types}{568} -\entry {memory allocation}{27} -\entry {memory usage warnings}{55} -\entry {merging of signals}{426} -\entry {MIN termios slot}{338} -\entry {minimum field width (\code {printf})}{148} -\entry {mixing descriptors and streams}{209} -\entry {modem disconnect}{326} -\entry {modem status lines}{326} -\entry {monetary value formatting}{98} -\entry {multibyte character, length of}{86} -\entry {multibyte characters}{80} -\entry {multiple names for one file}{235} -\entry {multiplexing input}{211} +\entry {macros}{38} +\entry {\code {main} function}{419} +\entry {\code {malloc} function}{26} +\entry {mantissa (of floating point number)}{523} +\entry {matching failure, in \code {scanf}}{113} +\entry {maximum field width (\code {scanf})}{114} +\entry {measurements of floating types}{522} +\entry {memory allocation}{25} +\entry {memory usage warnings}{50} +\entry {merging of signals}{389} +\entry {MIN termios slot}{268} +\entry {minimum field width (\code {printf})}{93} +\entry {mixing descriptors and streams}{146} +\entry {modem disconnect}{258} +\entry {modem status lines}{257} +\entry {monetary value formatting}{355} +\entry {multibyte character, length of}{345} +\entry {multibyte characters}{340} +\entry {multiple names for one file}{170} +\entry {multiplexing input}{148} \initial {N} -\entry {name of running program}{24} -\entry {name of socket}{267} -\entry {name space}{7} -\entry {names of signals}{402} -\entry {namespace (of socket)}{266} -\entry {NaN}{355} -\entry {network byte order}{283} -\entry {network number}{276} -\entry {network protocol}{266} -\entry {networks database}{315} -\entry {non-blocking mode (file status flag)}{200} -\entry {non-local exit, from signal handler}{423} -\entry {non-local exits}{393} -\entry {noncanonical input processing}{319} -\entry {normalization functions (floating-point)}{357} -\entry {normalized floating point number}{569} -\entry {not a number}{355} -\entry {null character}{61} -\entry {null pointer constant}{564} -\entry {number of arguments passed}{559} -\entry {number syntax, parsing}{361} -\entry {numeric value formatting}{98} +\entry {name of running program}{23} +\entry {name of socket}{203} +\entry {name space}{6} +\entry {names of signals}{367} +\entry {namespace (of socket)}{201} +\entry {NaN}{283} +\entry {network byte order}{218} +\entry {network number}{210} +\entry {network protocol}{202} +\entry {networks database}{247} +\entry {non-blocking mode (file status flag)}{138} +\entry {non-local exit, from signal handler}{387} +\entry {non-local exits}{361} +\entry {noncanonical input processing}{250} +\entry {normalization functions (floating-point)}{285} +\entry {normalized floating point number}{524} +\entry {not a number}{283} +\entry {null character}{57} +\entry {null pointer constant}{519} +\entry {number of arguments passed}{515} +\entry {number syntax, parsing}{288} +\entry {numeric value formatting}{355} \initial {O} -\entry {obstack status}{47} -\entry {obstacks}{38} -\entry {opening a file}{127} -\entry {opening a file descriptor}{199} -\entry {opening a pipe}{259} -\entry {opening a socket}{288} -\entry {opening a socket pair}{290} -\entry {opening a stream}{136} -\entry {optional arguments}{556} -\entry {optional POSIX features}{539} -\entry {orphaned process group}{492} -\entry {out-of-band data}{301} -\entry {output conversions, for \code {printf}}{148} -\entry {output possible signal}{408} -\entry {owner of a file}{247} +\entry {obstack status}{42} +\entry {obstacks}{35} +\entry {opening a file}{73} +\entry {opening a file descriptor}{137} +\entry {opening a pipe}{195} +\entry {opening a socket}{222} +\entry {opening a socket pair}{224} +\entry {opening a stream}{82} +\entry {optional arguments}{512} +\entry {optional POSIX features}{496} +\entry {orphaned process group}{451} +\entry {out-of-band data}{235} +\entry {output conversions, for \code {printf}}{94} +\entry {output possible signal}{373} +\entry {owner of a file}{182} \initial {P} -\entry {packet}{265} -\entry {page boundary}{34} -\entry {parent directory}{131} -\entry {parent process}{475, 476} -\entry {parity checking}{323} -\entry {parsing a template string}{160} -\entry {parsing numbers (in formatted input)}{361} -\entry {parsing program arguments}{459} -\entry {parsing tokens from a string}{76} -\entry {password database}{525} -\entry {PATH environment variable}{468} -\entry {\code {pause} function}{449} -\entry {peeking at input}{144} -\entry {pending signals}{401} -\entry {pending signals, checking for}{446} -\entry {permission to access a file}{251} -\entry {persona}{513} -\entry {pi (trigonometric constant)}{346} -\entry {pipe}{259} -\entry {pipe signal}{410} -\entry {pipe to a subprocess}{261} -\entry {port number}{281} -\entry {positioning a file descriptor}{205} -\entry {positioning a stream}{181} -\entry {POSIX}{3} -\entry {POSIX capacity limits}{537} -\entry {POSIX optional features}{539} -\entry {POSIX.1}{3} -\entry {POSIX.2}{3} -\entry {power functions}{348} -\entry {precision (of floating point number)}{569} -\entry {precision (\code {printf})}{148} -\entry {predicates on arrays}{68} -\entry {predicates on characters}{57} -\entry {predicates on strings}{68} -\entry {printing character}{59} -\entry {priority of a process}{389} -\entry {process}{457, 475} -\entry {process completion}{482} -\entry {process group functions}{508} -\entry {process group ID}{497} -\entry {process group leader}{497} -\entry {process groups}{489} -\entry {process ID}{476} -\entry {process image}{476} -\entry {process lifetime}{476} -\entry {process priority}{389} -\entry {process signal mask}{442} -\entry {process termination}{470} -\entry {processor time}{367} -\entry {profiling alarm signal}{407} -\entry {profiling timer}{382} -\entry {program argument syntax}{458} -\entry {program arguments}{457} -\entry {program arguments, parsing}{459} -\entry {program error signals}{402} -\entry {program name}{24} -\entry {program termination}{470} -\entry {program termination signals}{405} -\entry {programming your own streams}{195} -\entry {protocol (of socket)}{266} -\entry {protocol family}{266} -\entry {protocols database}{284} -\entry {prototypes for variadic functions}{558} -\entry {pseudo-random numbers}{350} -\entry {punctuation character}{58} -\entry {pushing input back}{144} +\entry {packet}{201} +\entry {page boundary}{31} +\entry {parent directory}{77} +\entry {parent process}{437, 438} +\entry {parity checking}{255} +\entry {parsing a template string}{104} +\entry {parsing numbers (in formatted input)}{288} +\entry {parsing program arguments}{421} +\entry {parsing tokens from a string}{70} +\entry {password database}{484} +\entry {PATH environment variable}{430} +\entry {\code {pause} function}{411} +\entry {peeking at input}{89} +\entry {pending signals}{366} +\entry {pending signals, checking for}{408} +\entry {permission to access a file}{185} +\entry {persona}{473} +\entry {pi (trigonometric constant)}{276} +\entry {pipe}{195} +\entry {pipe signal}{375} +\entry {pipe to a subprocess}{197} +\entry {port number}{216} +\entry {positioning a file descriptor}{143} +\entry {positioning a stream}{123} +\entry {POSIX}{2} +\entry {POSIX capacity limits}{495} +\entry {POSIX optional features}{496} +\entry {POSIX.1}{2} +\entry {POSIX.2}{2} +\entry {power functions}{278} +\entry {precision (of floating point number)}{523} +\entry {precision (\code {printf})}{93} +\entry {predicates on arrays}{63} +\entry {predicates on characters}{53} +\entry {predicates on strings}{63} +\entry {printing character}{54} +\entry {priority of a process}{335} +\entry {process}{419, 437} +\entry {process completion}{443} +\entry {process group functions}{467} +\entry {process group ID}{456} +\entry {process group leader}{456} +\entry {process groups}{449} +\entry {process ID}{438} +\entry {process image}{438} +\entry {process lifetime}{438} +\entry {process priority}{335} +\entry {process signal mask}{405} +\entry {process termination}{431} +\entry {processor time}{315} +\entry {profiling alarm signal}{373} +\entry {profiling timer}{329} +\entry {program argument syntax}{420} +\entry {program arguments}{419} +\entry {program arguments, parsing}{421} +\entry {program error signals}{368} +\entry {program name}{23} +\entry {program termination}{431} +\entry {program termination signals}{371} +\entry {programming your own streams}{134} +\entry {protocol (of socket)}{202} +\entry {protocol family}{202} +\entry {protocols database}{219} +\entry {prototypes for variadic functions}{513} +\entry {pseudo-random numbers}{280} +\entry {punctuation character}{54} +\entry {pushing input back}{89} \initial {Q} -\entry {quick sort function (for arrays)}{104} -\entry {QUIT character}{335} -\entry {quit signal}{406} -\entry {quote removal}{121} +\entry {quick sort function (for arrays)}{294} +\entry {QUIT character}{266} +\entry {quit signal}{371} +\entry {quote removal}{310} \initial {R} -\entry {race conditions, relating to job control}{497} -\entry {race conditions, relating to signals}{425} -\entry {radix (of floating point number)}{568} -\entry {raising signals}{434} -\entry {random numbers}{350} -\entry {random-access files}{129} -\entry {range error}{345} -\entry {range of integer type}{566} -\entry {read lock}{222} -\entry {reading from a directory}{231} -\entry {reading from a file descriptor}{202} -\entry {reading from a socket}{295} -\entry {reading from a stream, by blocks}{178} -\entry {reading from a stream, by characters}{140} -\entry {reading from a stream, formatted}{169} -\entry {real group ID}{514} -\entry {real user ID}{514} -\entry {real-time timer}{382} -\entry {receiving datagrams}{306} -\entry {record locking}{222} -\entry {redirecting input and output}{215} -\entry {reentrant functions}{429} -\entry {relative file name}{131} -\entry {relocating memory allocator}{54} -\entry {remainder functions}{359} -\entry {removal of quotes}{121} -\entry {removing a file}{238} -\entry {removing macros that shadow functions}{6} -\entry {renaming a file}{239} -\entry {reporting bugs}{636} +\entry {race conditions, relating to job control}{456} +\entry {race conditions, relating to signals}{388} +\entry {radix (of floating point number)}{523} +\entry {raising signals}{398} +\entry {random numbers}{280} +\entry {random-access files}{75} +\entry {range error}{275} +\entry {range of integer type}{521} +\entry {read lock}{158} +\entry {reading from a directory}{167} +\entry {reading from a file descriptor}{140} +\entry {reading from a socket}{229} +\entry {reading from a stream, by blocks}{121} +\entry {reading from a stream, by characters}{86} +\entry {reading from a stream, formatted}{112} +\entry {real group ID}{474} +\entry {real user ID}{474} +\entry {real-time timer}{329} +\entry {receiving datagrams}{239} +\entry {record locking}{158} +\entry {redirecting input and output}{153} +\entry {reentrant functions}{392} +\entry {relative file name}{76} +\entry {relocating memory allocator}{49} +\entry {remainder functions}{286} +\entry {removal of quotes}{310} +\entry {removing a file}{173} +\entry {removing macros that shadow functions}{5} +\entry {renaming a file}{174} +\entry {reporting bugs}{612} \entry {reporting errors}{13} -\entry {REPRINT character}{334} -\entry {reserved names}{7} -\entry {resource limits}{387} -\entry {restrictions on signal handler functions}{429} -\entry {root directory}{131} -\entry {rounding functions}{359} -\entry {running a command}{475} +\entry {REPRINT character}{265} +\entry {reserved names}{6} +\entry {resource limits}{334} +\entry {restrictions on signal handler functions}{392} +\entry {root directory}{76} +\entry {rounding functions}{286} +\entry {running a command}{437} \initial {S} -\entry {scanning the group list}{529} -\entry {scanning the user list}{526} -\entry {search function (for arrays)}{104} -\entry {search functions (for strings)}{74} -\entry {seed (for random numbers)}{350} -\entry {seeking on a file descriptor}{205} -\entry {seeking on a stream}{181} -\entry {segmentation violation}{404} -\entry {sending a datagram}{305} -\entry {sending signals}{434} -\entry {sequential-access files}{129} -\entry {server}{291} -\entry {services database}{282} -\entry {session}{489} -\entry {session leader}{489} -\entry {setting an alarm}{382} -\entry {\code {setuid} programs}{515} -\entry {setuid programs and file access}{253} -\entry {shadowing functions with macros}{6} -\entry {shared lock}{222} -\entry {shell}{489} -\entry {shrinking objects}{45} -\entry {shutting down a socket}{289} -\entry {\code {sigaction} flags}{419} -\entry {\code {sigaction} function}{415} -\entry {\code {SIGCHLD}, handling of}{503} -\entry {sign (of floating point number)}{568} -\entry {signal}{399} -\entry {signal action}{401} -\entry {signal actions}{412} -\entry {signal flags}{419} -\entry {\code {signal} function}{413} -\entry {signal handler function}{421} -\entry {signal mask}{442} -\entry {signal messages}{411} -\entry {signal names}{402} -\entry {signal number}{402} -\entry {signal set}{441} -\entry {signal stack}{452} -\entry {signals, generating}{434} -\entry {significand (of floating point number)}{569} -\entry {\code {SIGTTIN}, from background job}{491} -\entry {\code {SIGTTOU}, from background job}{491} -\entry {size of string}{62} -\entry {socket}{265} -\entry {socket address (name) binding}{267} -\entry {socket domain}{266} -\entry {socket namespace}{266} -\entry {socket option level}{312} -\entry {socket options}{312} -\entry {socket pair}{290} -\entry {socket protocol}{266} -\entry {socket shutdown}{289} -\entry {socket, client actions}{291} -\entry {socket, closing}{289} -\entry {socket, connecting}{291} -\entry {socket, creating}{288} -\entry {socket, initiating a connection}{291} -\entry {sockets, accepting connections}{293} -\entry {sockets, listening}{292} -\entry {sockets, server actions}{292} -\entry {soft link}{236} -\entry {sort function (for arrays)}{104} -\entry {special files}{257} -\entry {specified action (for a signal)}{401} -\entry {square root function}{349} -\entry {stable sorting}{104} -\entry {standard dot notation, for Internet addresses}{276} -\entry {standard environment variables}{468} -\entry {standard error file descriptor}{209} -\entry {standard error stream}{136} -\entry {standard file descriptors}{208} -\entry {standard input file descriptor}{208} -\entry {standard input stream}{136} -\entry {standard output file descriptor}{208} -\entry {standard output stream}{136} -\entry {standard streams}{135} -\entry {standards}{2} -\entry {START character}{336} -\entry {static allocation}{27} -\entry {STATUS character}{337} +\entry {scanning the group list}{487} +\entry {scanning the user list}{485} +\entry {search function (for arrays)}{293} +\entry {search functions (for strings)}{68} +\entry {seed (for random numbers)}{280} +\entry {seeking on a file descriptor}{143} +\entry {seeking on a stream}{123} +\entry {segmentation violation}{370} +\entry {sending a datagram}{239} +\entry {sending signals}{398} +\entry {sequential-access files}{75} +\entry {server}{225} +\entry {services database}{217} +\entry {session}{449} +\entry {session leader}{449} +\entry {setting an alarm}{329} +\entry {\code {setuid} programs}{475} +\entry {setuid programs and file access}{188} +\entry {shadowing functions with macros}{5} +\entry {shared lock}{158} +\entry {shell}{449} +\entry {shrinking objects}{41} +\entry {shutting down a socket}{223} +\entry {\code {sigaction} flags}{383} +\entry {\code {sigaction} function}{380} +\entry {\code {SIGCHLD}, handling of}{461} +\entry {sign (of floating point number)}{523} +\entry {signal}{365} +\entry {signal action}{366} +\entry {signal actions}{377} +\entry {signal flags}{383} +\entry {\code {signal} function}{377} +\entry {signal handler function}{385} +\entry {signal mask}{405} +\entry {signal messages}{376} +\entry {signal names}{367} +\entry {signal number}{367} +\entry {signal set}{403} +\entry {signal stack}{414} +\entry {signals, generating}{398} +\entry {significand (of floating point number)}{523} +\entry {\code {SIGTTIN}, from background job}{451} +\entry {\code {SIGTTOU}, from background job}{451} +\entry {size of string}{58} +\entry {socket}{201} +\entry {socket address (name) binding}{203} +\entry {socket domain}{201} +\entry {socket namespace}{201} +\entry {socket option level}{244} +\entry {socket options}{244} +\entry {socket pair}{224} +\entry {socket protocol}{202} +\entry {socket shutdown}{223} +\entry {socket, client actions}{225} +\entry {socket, closing}{223} +\entry {socket, connecting}{225} +\entry {socket, creating}{222} +\entry {socket, initiating a connection}{225} +\entry {sockets, accepting connections}{227} +\entry {sockets, listening}{226} +\entry {sockets, server actions}{226} +\entry {soft link}{171} +\entry {sort function (for arrays)}{294} +\entry {special files}{191} +\entry {specified action (for a signal)}{366} +\entry {square root function}{278} +\entry {stable sorting}{294} +\entry {standard dot notation, for Internet addresses}{211} +\entry {standard environment variables}{429} +\entry {standard error file descriptor}{146} +\entry {standard error stream}{82} +\entry {standard file descriptors}{146} +\entry {standard input file descriptor}{146} +\entry {standard input stream}{81} +\entry {standard output file descriptor}{146} +\entry {standard output stream}{82} +\entry {standard streams}{81} +\entry {standards}{1} +\entry {START character}{267} +\entry {static allocation}{25} +\entry {STATUS character}{268} \entry {status codes}{13} -\entry {status of a file}{242} -\entry {status of obstack}{47} -\entry {sticky bit}{250} -\entry {STOP character}{336} -\entry {stop signal}{409} -\entry {stopped job}{490} -\entry {stopped jobs, continuing}{507} -\entry {stopped jobs, detecting}{503} -\entry {storage allocation}{27} -\entry {stream (sockets)}{265} -\entry {stream, for I/O to a string}{191} -\entry {streams and descriptors}{209} -\entry {streams, and file descriptors}{208} -\entry {streams, standard}{135} -\entry {string}{61} -\entry {string allocation}{62} -\entry {string collation functions}{70} -\entry {string comparison functions}{68} -\entry {string concatenation functions}{63} -\entry {string copy functions}{63} -\entry {string length}{62} -\entry {string literal}{61} -\entry {string search functions}{74} -\entry {string stream}{191} -\entry {string, representation of}{61} -\entry {style of communication (of a socket)}{265} -\entry {subshell}{495} -\entry {substitution of variables and commands}{121} -\entry {successive signals}{426} -\entry {summer time}{375} +\entry {status of a file}{177} +\entry {status of obstack}{42} +\entry {sticky bit}{185} +\entry {STOP character}{267} +\entry {stop signal}{374} +\entry {stopped job}{450} +\entry {stopped jobs, continuing}{466} +\entry {stopped jobs, detecting}{461} +\entry {storage allocation}{25} +\entry {stream (sockets)}{201} +\entry {stream, for I/O to a string}{131} +\entry {streams and descriptors}{146} +\entry {streams, and file descriptors}{145} +\entry {streams, standard}{81} +\entry {string}{57} +\entry {string allocation}{58} +\entry {string collation functions}{65} +\entry {string comparison functions}{63} +\entry {string concatenation functions}{59} +\entry {string copy functions}{59} +\entry {string length}{58} +\entry {string literal}{57} +\entry {string search functions}{68} +\entry {string stream}{131} +\entry {string, representation of}{57} +\entry {style of communication (of a socket)}{201} +\entry {subshell}{454} +\entry {substitution of variables and commands}{310} +\entry {successive signals}{389} +\entry {summer time}{322} \entry {SunOS}{3} -\entry {supplementary group IDs}{514} -\entry {SUSP character}{335} -\entry {suspend character}{335} -\entry {SVID}{4} -\entry {symbolic link}{236} -\entry {syntax, for program arguments}{458} -\entry {syntax, for reading numbers}{361} -\entry {System V Unix}{4} +\entry {supplementary group IDs}{474} +\entry {SUSP character}{266} +\entry {suspend character}{266} +\entry {SVID}{3} +\entry {symbolic link}{171} +\entry {syntax, for program arguments}{420} +\entry {syntax, for reading numbers}{288} +\entry {System V Unix}{3} \initial {T} -\entry {TCP (Internet protocol)}{284} -\entry {template, for \code {printf}}{146} -\entry {template, for \code {scanf}}{169} -\entry {TERM environment variable}{469} -\entry {terminal flow control}{340} -\entry {terminal identification}{317} -\entry {terminal input queue}{318} -\entry {terminal input queue, clearing}{340} -\entry {terminal input signal}{409} -\entry {terminal line control functions}{339} -\entry {terminal line speed}{329} -\entry {terminal mode data types}{319} -\entry {terminal mode functions}{320} -\entry {terminal output queue}{318} -\entry {terminal output queue, flushing}{339} -\entry {terminal output signal}{409} -\entry {terminated jobs, detecting}{503} -\entry {termination signal}{406} -\entry {testing access permission}{253} -\entry {testing exit status of child process}{482} -\entry {text stream}{180} -\entry {ticks, clock}{367} -\entry {tilde expansion}{121} -\entry {TIME termios slot}{338} -\entry {time zone}{378} -\entry {time, calendar}{370} -\entry {time, elapsed CPU}{367} -\entry {timers, setting}{382} -\entry {timing error in signal handling}{448} -\entry {TMPDIR environment variable}{190} -\entry {tokenizing strings}{76} -\entry {transmitting datagrams}{305} -\entry {trigonometric functions}{346} -\entry {type measurements, floating}{568} -\entry {type measurements, integer}{565} -\entry {type modifier character (\code {printf})}{148} -\entry {type modifier character (\code {scanf})}{171} -\entry {typeahead buffer}{318} -\entry {TZ environment variable}{469} +\entry {TCP (Internet protocol)}{219} +\entry {template, for \code {printf}}{91} +\entry {template, for \code {scanf}}{112} +\entry {TERM environment variable}{430} +\entry {terminal flow control}{271} +\entry {terminal identification}{249} +\entry {terminal input queue}{249} +\entry {terminal input queue, clearing}{270} +\entry {terminal input signal}{374} +\entry {terminal line control functions}{269} +\entry {terminal line speed}{261} +\entry {terminal mode data types}{251} +\entry {terminal mode functions}{252} +\entry {terminal output queue}{250} +\entry {terminal output queue, flushing}{270} +\entry {terminal output signal}{374} +\entry {terminated jobs, detecting}{461} +\entry {termination signal}{372} +\entry {testing access permission}{188} +\entry {testing exit status of child process}{443} +\entry {text stream}{122} +\entry {ticks, clock}{315} +\entry {tilde expansion}{310} +\entry {TIME termios slot}{268} +\entry {time zone}{326} +\entry {time, calendar}{317} +\entry {time, elapsed CPU}{315} +\entry {timers, setting}{329} +\entry {timing error in signal handling}{410} +\entry {TMPDIR environment variable}{193} +\entry {tokenizing strings}{70} +\entry {transmitting datagrams}{239} +\entry {trigonometric functions}{276} +\entry {type measurements, floating}{522} +\entry {type measurements, integer}{520} +\entry {type modifier character (\code {printf})}{94} +\entry {type modifier character (\code {scanf})}{114} +\entry {typeahead buffer}{249} +\entry {TZ environment variable}{430} \initial {U} -\entry {umask}{251} -\entry {unbuffered stream}{185} -\entry {unconstrained storage allocation}{28} -\entry {undefining macros that shadow functions}{6} +\entry {umask}{186} +\entry {unbuffered stream}{127} +\entry {unconstrained storage allocation}{26} +\entry {undefining macros that shadow functions}{5} \entry {Unix, Berkeley}{3} -\entry {Unix, System V}{4} -\entry {unlinking a file}{238} -\entry {unreading characters}{144} -\entry {upper-case character}{57} -\entry {urgent data signal}{408} -\entry {urgent socket condition}{302} -\entry {usage limits}{387} -\entry {user database}{525} -\entry {user ID}{513} -\entry {user ID, determining}{524} -\entry {user name}{513} -\entry {user signals}{410} -\entry {usual file name syntax errors}{132} +\entry {Unix, System V}{3} +\entry {unlinking a file}{173} +\entry {unreading characters}{89} +\entry {upper-case character}{53} +\entry {urgent data signal}{373} +\entry {urgent socket condition}{235} +\entry {usage limits}{334} +\entry {user database}{484} +\entry {user ID}{473} +\entry {user ID, determining}{483} +\entry {user name}{473} +\entry {user signals}{375} +\entry {usual file name syntax errors}{77} \initial {V} -\entry {variable number of arguments}{556} -\entry {variable substitution}{121} -\entry {variable-sized arrays}{53} -\entry {variadic function argument access}{558} -\entry {variadic function prototypes}{558} -\entry {variadic functions}{556} -\entry {variadic functions, calling}{560} -\entry {virtual time alarm signal}{407} -\entry {virtual timer}{382} -\entry {\code {volatile} declarations}{429} +\entry {variable number of arguments}{512} +\entry {variable substitution}{310} +\entry {variable-sized arrays}{49} +\entry {variadic function argument access}{514} +\entry {variadic function prototypes}{513} +\entry {variadic functions}{512} +\entry {variadic functions, calling}{515} +\entry {virtual time alarm signal}{372} +\entry {virtual timer}{329} +\entry {\code {volatile} declarations}{392} \initial {W} -\entry {waiting for a signal}{449} -\entry {waiting for completion of child process}{482} -\entry {waiting for input or output}{211} -\entry {warnings of memory almost full}{55} -\entry {WERASE character}{333} -\entry {whitespace character}{58} -\entry {wide characters}{79} -\entry {width of integer type}{565} -\entry {wildcard expansion}{121} -\entry {word expansion}{120} -\entry {working directory}{229} -\entry {write lock}{222} -\entry {writing to a file descriptor}{204} -\entry {writing to a socket}{295} -\entry {writing to a stream, by blocks}{178} -\entry {writing to a stream, by characters}{139} -\entry {writing to a stream, formatted}{146} +\entry {waiting for a signal}{411} +\entry {waiting for completion of child process}{443} +\entry {waiting for input or output}{148} +\entry {warnings of memory almost full}{50} +\entry {WERASE character}{265} +\entry {whitespace character}{54} +\entry {wide characters}{339} +\entry {width of integer type}{520} +\entry {wildcard expansion}{310} +\entry {word expansion}{310} +\entry {working directory}{165} +\entry {write lock}{158} +\entry {writing to a file descriptor}{141} +\entry {writing to a socket}{229} +\entry {writing to a stream, by blocks}{121} +\entry {writing to a stream, by characters}{85} +\entry {writing to a stream, formatted}{91} diff -ruN glibc-1.06/manual/libc.fn glibc-1.07/manual/libc.fn --- glibc-1.06/manual/libc.fn Mon May 17 17:03:25 1993 +++ glibc-1.07/manual/libc.fn Wed Dec 29 18:38:49 1993 @@ -1,475 +1,479 @@ -\entry {strerror}{23}{\code {strerror}} -\entry {perror}{23}{\code {perror}} -\entry {malloc}{29}{\code {malloc}} -\entry {free}{31}{\code {free}} -\entry {cfree}{31}{\code {cfree}} -\entry {realloc}{32}{\code {realloc}} -\entry {calloc}{33}{\code {calloc}} -\entry {memalign}{34}{\code {memalign}} -\entry {valloc}{34}{\code {valloc}} -\entry {mcheck}{34}{\code {mcheck}} -\entry {mstats}{37}{\code {mstats}} -\entry {obstack{\_}chunk{\_}alloc}{39}{\code {obstack{\_}chunk{\_}alloc}} -\entry {obstack{\_}chunk{\_}free}{39}{\code {obstack{\_}chunk{\_}free}} -\entry {obstack{\_}init}{40}{\code {obstack{\_}init}} -\entry {obstack{\_}alloc}{40}{\code {obstack{\_}alloc}} -\entry {obstack{\_}copy}{41}{\code {obstack{\_}copy}} -\entry {obstack{\_}copy0}{41}{\code {obstack{\_}copy0}} -\entry {obstack{\_}free}{42}{\code {obstack{\_}free}} -\entry {obstack{\_}blank}{44}{\code {obstack{\_}blank}} -\entry {obstack{\_}grow}{44}{\code {obstack{\_}grow}} -\entry {obstack{\_}grow0}{44}{\code {obstack{\_}grow0}} -\entry {obstack{\_}1grow}{44}{\code {obstack{\_}1grow}} -\entry {obstack{\_}finish}{44}{\code {obstack{\_}finish}} -\entry {obstack{\_}object{\_}size}{44}{\code {obstack{\_}object{\_}size}} -\entry {obstack{\_}room}{45}{\code {obstack{\_}room}} -\entry {obstack{\_}1grow{\_}fast}{46}{\code {obstack{\_}1grow{\_}fast}} -\entry {obstack{\_}blank{\_}fast}{46}{\code {obstack{\_}blank{\_}fast}} -\entry {obstack{\_}base}{47}{\code {obstack{\_}base}} -\entry {obstack{\_}next{\_}free}{47}{\code {obstack{\_}next{\_}free}} -\entry {obstack{\_}object{\_}size}{47}{\code {obstack{\_}object{\_}size}} -\entry {obstack{\_}alignment{\_}mask}{47}{\code {obstack{\_}alignment{\_}mask}} -\entry {obstack{\_}chunk{\_}size}{49}{\code {obstack{\_}chunk{\_}size}} -\entry {alloca}{51}{\code {alloca}} -\entry {r{\_}alloc}{54}{\code {r{\_}alloc}} -\entry {r{\_}alloc{\_}free}{55}{\code {r{\_}alloc{\_}free}} -\entry {r{\_}re{\_}alloc}{55}{\code {r{\_}re{\_}alloc}} -\entry {memory{\_}warnings}{55}{\code {memory{\_}warnings}} -\entry {islower}{57}{\code {islower}} -\entry {isupper}{57}{\code {isupper}} -\entry {isalpha}{58}{\code {isalpha}} -\entry {isdigit}{58}{\code {isdigit}} -\entry {isalnum}{58}{\code {isalnum}} -\entry {isxdigit}{58}{\code {isxdigit}} -\entry {ispunct}{58}{\code {ispunct}} -\entry {isspace}{58}{\code {isspace}} -\entry {isblank}{59}{\code {isblank}} -\entry {isgraph}{59}{\code {isgraph}} -\entry {isprint}{59}{\code {isprint}} -\entry {iscntrl}{59}{\code {iscntrl}} -\entry {isascii}{59}{\code {isascii}} -\entry {tolower}{60}{\code {tolower}} -\entry {toupper}{60}{\code {toupper}} -\entry {toascii}{60}{\code {toascii}} -\entry {{\_}tolower}{60}{\code {{\_}tolower}} -\entry {{\_}toupper}{60}{\code {{\_}toupper}} -\entry {strlen}{63}{\code {strlen}} -\entry {memcpy}{64}{\code {memcpy}} -\entry {memmove}{64}{\code {memmove}} -\entry {memccpy}{64}{\code {memccpy}} -\entry {memset}{65}{\code {memset}} -\entry {strcpy}{65}{\code {strcpy}} -\entry {strncpy}{65}{\code {strncpy}} -\entry {strdup}{65}{\code {strdup}} -\entry {stpcpy}{65}{\code {stpcpy}} -\entry {strcat}{66}{\code {strcat}} -\entry {strncat}{66}{\code {strncat}} -\entry {bcopy}{67}{\code {bcopy}} -\entry {bzero}{67}{\code {bzero}} -\entry {memcmp}{68}{\code {memcmp}} -\entry {strcmp}{69}{\code {strcmp}} -\entry {strcasecmp}{69}{\code {strcasecmp}} -\entry {strncasecmp}{69}{\code {strncasecmp}} -\entry {strncmp}{69}{\code {strncmp}} -\entry {bcmp}{70}{\code {bcmp}} -\entry {strcoll}{71}{\code {strcoll}} -\entry {strxfrm}{71}{\code {strxfrm}} -\entry {memchr}{74}{\code {memchr}} -\entry {strchr}{74}{\code {strchr}} -\entry {strrchr}{74}{\code {strrchr}} -\entry {strstr}{74}{\code {strstr}} -\entry {memmem}{75}{\code {memmem}} -\entry {strspn}{75}{\code {strspn}} -\entry {strcspn}{75}{\code {strcspn}} -\entry {strpbrk}{75}{\code {strpbrk}} -\entry {strtok}{76}{\code {strtok}} -\entry {mbstowcs}{84}{\code {mbstowcs}} -\entry {wcstombs}{85}{\code {wcstombs}} -\entry {mblen}{86}{\code {mblen}} -\entry {mbtowc}{86}{\code {mbtowc}} -\entry {wctomb}{87}{\code {wctomb}} -\entry {setlocale}{95}{\code {setlocale}} -\entry {localeconv}{98}{\code {localeconv}} -\entry {bsearch}{104}{\code {bsearch}} -\entry {qsort}{104}{\code {qsort}} -\entry {fnmatch}{109}{\code {fnmatch}} -\entry {glob}{111}{\code {glob}} -\entry {regcomp}{114}{\code {regcomp}} -\entry {regexec}{116}{\code {regexec}} -\entry {regfree}{119}{\code {regfree}} -\entry {regerror}{119}{\code {regerror}} -\entry {wordexp}{122}{\code {wordexp}} -\entry {wordfree}{123}{\code {wordfree}} -\entry {fopen}{136}{\code {fopen}} -\entry {freopen}{138}{\code {freopen}} -\entry {fclose}{138}{\code {fclose}} -\entry {fputc}{139}{\code {fputc}} -\entry {putc}{139}{\code {putc}} -\entry {putchar}{139}{\code {putchar}} -\entry {fputs}{140}{\code {fputs}} -\entry {puts}{140}{\code {puts}} -\entry {putw}{140}{\code {putw}} -\entry {fgetc}{140}{\code {fgetc}} -\entry {getc}{141}{\code {getc}} -\entry {getchar}{141}{\code {getchar}} -\entry {getw}{141}{\code {getw}} -\entry {getline}{142}{\code {getline}} -\entry {getdelim}{142}{\code {getdelim}} -\entry {fgets}{143}{\code {fgets}} -\entry {gets}{143}{\code {gets}} -\entry {ungetc}{145}{\code {ungetc}} -\entry {printf}{155}{\code {printf}} -\entry {fprintf}{155}{\code {fprintf}} -\entry {sprintf}{155}{\code {sprintf}} -\entry {snprintf}{156}{\code {snprintf}} -\entry {asprintf}{157}{\code {asprintf}} -\entry {obstack{\_}printf}{157}{\code {obstack{\_}printf}} -\entry {vprintf}{158}{\code {vprintf}} -\entry {vfprintf}{158}{\code {vfprintf}} -\entry {vsprintf}{158}{\code {vsprintf}} -\entry {vsnprintf}{159}{\code {vsnprintf}} -\entry {vasprintf}{159}{\code {vasprintf}} -\entry {obstack{\_}vprintf}{159}{\code {obstack{\_}vprintf}} -\entry {parse{\_}printf{\_}format}{160}{\code {parse{\_}printf{\_}format}} -\entry {register{\_}printf{\_}function}{164}{\code {register{\_}printf{\_}function}} -\entry {scanf}{177}{\code {scanf}} -\entry {fscanf}{177}{\code {fscanf}} -\entry {sscanf}{177}{\code {sscanf}} -\entry {vscanf}{177}{\code {vscanf}} -\entry {vfscanf}{177}{\code {vfscanf}} -\entry {vsscanf}{178}{\code {vsscanf}} -\entry {fread}{178}{\code {fread}} -\entry {fwrite}{179}{\code {fwrite}} -\entry {clearerr}{179}{\code {clearerr}} -\entry {feof}{179}{\code {feof}} -\entry {ferror}{179}{\code {ferror}} -\entry {ftell}{181}{\code {ftell}} -\entry {fseek}{181}{\code {fseek}} -\entry {rewind}{182}{\code {rewind}} -\entry {fgetpos}{184}{\code {fgetpos}} -\entry {fsetpos}{184}{\code {fsetpos}} -\entry {fflush}{186}{\code {fflush}} -\entry {setvbuf}{186}{\code {setvbuf}} -\entry {setbuf}{188}{\code {setbuf}} -\entry {setbuffer}{188}{\code {setbuffer}} -\entry {setlinebuf}{188}{\code {setlinebuf}} -\entry {tmpfile}{189}{\code {tmpfile}} -\entry {tmpnam}{189}{\code {tmpnam}} -\entry {tempnam}{190}{\code {tempnam}} -\entry {fmemopen}{191}{\code {fmemopen}} -\entry {open{\_}memstream}{192}{\code {open{\_}memstream}} -\entry {open{\_}obstack{\_}stream}{193}{\code {open{\_}obstack{\_}stream}} -\entry {fopencookie}{195}{\code {fopencookie}} -\entry {open}{199}{\code {open}} -\entry {creat}{201}{\code {creat}} -\entry {close}{201}{\code {close}} -\entry {read}{202}{\code {read}} -\entry {write}{204}{\code {write}} -\entry {lseek}{205}{\code {lseek}} -\entry {fdopen}{208}{\code {fdopen}} -\entry {fileno}{208}{\code {fileno}} -\entry {fclean}{210}{\code {fclean}} -\entry {FD{\_}ZERO}{212}{\code {FD{\_}ZERO}} -\entry {FD{\_}SET}{212}{\code {FD{\_}SET}} -\entry {FD{\_}CLR}{212}{\code {FD{\_}CLR}} -\entry {FD{\_}ISSET}{212}{\code {FD{\_}ISSET}} -\entry {select}{212}{\code {select}} -\entry {fcntl}{214}{\code {fcntl}} -\entry {dup}{216}{\code {dup}} -\entry {dup2}{216}{\code {dup2}} -\entry {getcwd}{229}{\code {getcwd}} -\entry {getwd}{230}{\code {getwd}} -\entry {chdir}{230}{\code {chdir}} -\entry {opendir}{232}{\code {opendir}} -\entry {readdir}{233}{\code {readdir}} -\entry {closedir}{233}{\code {closedir}} -\entry {rewinddir}{234}{\code {rewinddir}} -\entry {telldir}{234}{\code {telldir}} -\entry {seekdir}{235}{\code {seekdir}} -\entry {link}{235}{\code {link}} -\entry {symlink}{237}{\code {symlink}} -\entry {readlink}{237}{\code {readlink}} -\entry {unlink}{238}{\code {unlink}} -\entry {remove}{239}{\code {remove}} -\entry {rmdir}{239}{\code {rmdir}} -\entry {rename}{240}{\code {rename}} -\entry {mkdir}{241}{\code {mkdir}} -\entry {stat}{245}{\code {stat}} -\entry {fstat}{245}{\code {fstat}} -\entry {lstat}{245}{\code {lstat}} -\entry {S{\_}ISDIR}{246}{\code {S{\_}ISDIR}} -\entry {S{\_}ISCHR}{246}{\code {S{\_}ISCHR}} -\entry {S{\_}ISBLK}{246}{\code {S{\_}ISBLK}} -\entry {S{\_}ISREG}{246}{\code {S{\_}ISREG}} -\entry {S{\_}ISFIFO}{246}{\code {S{\_}ISFIFO}} -\entry {S{\_}ISLNK}{246}{\code {S{\_}ISLNK}} -\entry {S{\_}ISSOCK}{247}{\code {S{\_}ISSOCK}} -\entry {chown}{248}{\code {chown}} -\entry {fchown}{249}{\code {fchown}} -\entry {umask}{252}{\code {umask}} -\entry {getumask}{252}{\code {getumask}} -\entry {chmod}{252}{\code {chmod}} -\entry {fchmod}{253}{\code {fchmod}} -\entry {access}{254}{\code {access}} -\entry {utime}{256}{\code {utime}} -\entry {utimes}{257}{\code {utimes}} -\entry {mknod}{257}{\code {mknod}} -\entry {pipe}{259}{\code {pipe}} -\entry {popen}{261}{\code {popen}} -\entry {pclose}{262}{\code {pclose}} -\entry {mkfifo}{263}{\code {mkfifo}} -\entry {bind}{269}{\code {bind}} -\entry {getsockname}{270}{\code {getsockname}} -\entry {inet{\_}addr}{277}{\code {inet{\_}addr}} -\entry {inet{\_}network}{278}{\code {inet{\_}network}} -\entry {inet{\_}ntoa}{278}{\code {inet{\_}ntoa}} -\entry {inet{\_}makeaddr}{278}{\code {inet{\_}makeaddr}} -\entry {inet{\_}lnaof}{278}{\code {inet{\_}lnaof}} -\entry {inet{\_}netof}{278}{\code {inet{\_}netof}} -\entry {gethostbyname}{279}{\code {gethostbyname}} -\entry {gethostbyaddr}{279}{\code {gethostbyaddr}} -\entry {sethostent}{280}{\code {sethostent}} -\entry {gethostent}{280}{\code {gethostent}} -\entry {endhostent}{281}{\code {endhostent}} -\entry {getservbyname}{282}{\code {getservbyname}} -\entry {getservbyport}{282}{\code {getservbyport}} -\entry {setservent}{283}{\code {setservent}} -\entry {getservent}{283}{\code {getservent}} -\entry {endservent}{283}{\code {endservent}} -\entry {htons}{284}{\code {htons}} -\entry {ntohs}{284}{\code {ntohs}} -\entry {htonl}{284}{\code {htonl}} -\entry {ntohl}{284}{\code {ntohl}} -\entry {getprotobyname}{285}{\code {getprotobyname}} -\entry {getprotobynumber}{285}{\code {getprotobynumber}} -\entry {setprotoent}{285}{\code {setprotoent}} -\entry {getprotoent}{286}{\code {getprotoent}} -\entry {endprotoent}{286}{\code {endprotoent}} -\entry {socket}{288}{\code {socket}} -\entry {shutdown}{289}{\code {shutdown}} -\entry {socketpair}{290}{\code {socketpair}} -\entry {connect}{291}{\code {connect}} -\entry {listen}{293}{\code {listen}} -\entry {accept}{293}{\code {accept}} -\entry {getpeername}{294}{\code {getpeername}} -\entry {send}{295}{\code {send}} -\entry {recv}{296}{\code {recv}} -\entry {sendto}{305}{\code {sendto}} -\entry {recvfrom}{306}{\code {recvfrom}} -\entry {getsockopt}{312}{\code {getsockopt}} -\entry {setsockopt}{312}{\code {setsockopt}} -\entry {getnetbyname}{315}{\code {getnetbyname}} -\entry {getnetbyaddr}{315}{\code {getnetbyaddr}} -\entry {setnetent}{315}{\code {setnetent}} -\entry {getnetent}{315}{\code {getnetent}} -\entry {endnetent}{316}{\code {endnetent}} -\entry {isatty}{317}{\code {isatty}} -\entry {ttyname}{317}{\code {ttyname}} -\entry {tcgetattr}{320}{\code {tcgetattr}} -\entry {tcsetattr}{321}{\code {tcsetattr}} -\entry {cfgetospeed}{330}{\code {cfgetospeed}} -\entry {cfgetispeed}{330}{\code {cfgetispeed}} -\entry {cfsetospeed}{330}{\code {cfsetospeed}} -\entry {cfsetispeed}{330}{\code {cfsetispeed}} -\entry {cfsetspeed}{330}{\code {cfsetspeed}} -\entry {cfmakeraw}{331}{\code {cfmakeraw}} -\entry {tcsendbreak}{339}{\code {tcsendbreak}} -\entry {tcdrain}{339}{\code {tcdrain}} -\entry {tcflush}{340}{\code {tcflush}} -\entry {tcflow}{340}{\code {tcflow}} -\entry {sin}{346}{\code {sin}} -\entry {cos}{346}{\code {cos}} -\entry {tan}{347}{\code {tan}} -\entry {asin}{347}{\code {asin}} -\entry {acos}{347}{\code {acos}} -\entry {atan}{347}{\code {atan}} -\entry {atan2}{347}{\code {atan2}} -\entry {exp}{348}{\code {exp}} -\entry {log}{348}{\code {log}} -\entry {log10}{348}{\code {log10}} -\entry {pow}{349}{\code {pow}} -\entry {sqrt}{349}{\code {sqrt}} -\entry {cbrt}{349}{\code {cbrt}} -\entry {hypot}{349}{\code {hypot}} -\entry {expm1}{349}{\code {expm1}} -\entry {log1p}{349}{\code {log1p}} -\entry {sinh}{350}{\code {sinh}} -\entry {cosh}{350}{\code {cosh}} -\entry {tanh}{350}{\code {tanh}} -\entry {asinh}{350}{\code {asinh}} -\entry {acosh}{350}{\code {acosh}} -\entry {atanh}{350}{\code {atanh}} -\entry {rand}{351}{\code {rand}} -\entry {srand}{351}{\code {srand}} -\entry {random}{352}{\code {random}} -\entry {srandom}{352}{\code {srandom}} -\entry {initstate}{352}{\code {initstate}} -\entry {setstate}{352}{\code {setstate}} -\entry {isinf}{356}{\code {isinf}} -\entry {isnan}{356}{\code {isnan}} -\entry {finite}{356}{\code {finite}} -\entry {infnan}{356}{\code {infnan}} -\entry {abs}{356}{\code {abs}} -\entry {labs}{357}{\code {labs}} -\entry {fabs}{357}{\code {fabs}} -\entry {cabs}{357}{\code {cabs}} -\entry {frexp}{357}{\code {frexp}} -\entry {ldexp}{358}{\code {ldexp}} -\entry {scalb}{358}{\code {scalb}} -\entry {logb}{358}{\code {logb}} -\entry {copysign}{358}{\code {copysign}} -\entry {ceil}{359}{\code {ceil}} -\entry {floor}{359}{\code {floor}} -\entry {rint}{359}{\code {rint}} -\entry {modf}{359}{\code {modf}} -\entry {fmod}{359}{\code {fmod}} -\entry {drem}{360}{\code {drem}} -\entry {div}{361}{\code {div}} -\entry {ldiv}{361}{\code {ldiv}} -\entry {strtol}{362}{\code {strtol}} -\entry {strtoul}{363}{\code {strtoul}} -\entry {atol}{363}{\code {atol}} -\entry {atoi}{363}{\code {atoi}} -\entry {strtod}{364}{\code {strtod}} -\entry {atof}{365}{\code {atof}} -\entry {clock}{368}{\code {clock}} -\entry {times}{369}{\code {times}} -\entry {difftime}{371}{\code {difftime}} -\entry {time}{371}{\code {time}} -\entry {gettimeofday}{372}{\code {gettimeofday}} -\entry {settimeofday}{373}{\code {settimeofday}} -\entry {adjtime}{373}{\code {adjtime}} -\entry {localtime}{375}{\code {localtime}} -\entry {gmtime}{375}{\code {gmtime}} -\entry {mktime}{376}{\code {mktime}} -\entry {asctime}{376}{\code {asctime}} -\entry {ctime}{377}{\code {ctime}} -\entry {strftime}{377}{\code {strftime}} -\entry {tzset}{381}{\code {tzset}} -\entry {setitimer}{383}{\code {setitimer}} -\entry {getitimer}{384}{\code {getitimer}} -\entry {ITIMER{\_}REAL}{384}{\code {ITIMER{\_}REAL}} -\entry {ITIMER{\_}VIRTUAL}{384}{\code {ITIMER{\_}VIRTUAL}} -\entry {ITIMER{\_}PROF}{384}{\code {ITIMER{\_}PROF}} -\entry {alarm}{384}{\code {alarm}} -\entry {sleep}{385}{\code {sleep}} -\entry {getrusage}{386}{\code {getrusage}} -\entry {getrlimit}{388}{\code {getrlimit}} -\entry {setrlimit}{388}{\code {setrlimit}} -\entry {getpriority}{390}{\code {getpriority}} -\entry {setpriority}{390}{\code {setpriority}} -\entry {nice}{391}{\code {nice}} -\entry {setjmp}{395}{\code {setjmp}} -\entry {longjmp}{395}{\code {longjmp}} -\entry {sigsetjmp}{396}{\code {sigsetjmp}} -\entry {siglongjmp}{396}{\code {siglongjmp}} -\entry {strsignal}{411}{\code {strsignal}} -\entry {psignal}{412}{\code {psignal}} -\entry {signal}{413}{\code {signal}} -\entry {ssignal}{414}{\code {ssignal}} -\entry {sigaction}{416}{\code {sigaction}} -\entry {TEMP{\_}FAILURE{\_}RETRY}{433}{\code {TEMP{\_}FAILURE{\_}RETRY}} -\entry {raise}{434}{\code {raise}} -\entry {gsignal}{435}{\code {gsignal}} -\entry {kill}{436}{\code {kill}} -\entry {killpg}{437}{\code {killpg}} -\entry {sigemptyset}{441}{\code {sigemptyset}} -\entry {sigfillset}{441}{\code {sigfillset}} -\entry {sigaddset}{442}{\code {sigaddset}} -\entry {sigdelset}{442}{\code {sigdelset}} -\entry {sigismember}{442}{\code {sigismember}} -\entry {sigprocmask}{442}{\code {sigprocmask}} -\entry {sigpending}{446}{\code {sigpending}} -\entry {pause}{449}{\code {pause}} -\entry {sigsuspend}{451}{\code {sigsuspend}} -\entry {sigvec}{454}{\code {sigvec}} -\entry {siginterrupt}{454}{\code {siginterrupt}} -\entry {sigmask}{454}{\code {sigmask}} -\entry {sigblock}{454}{\code {sigblock}} -\entry {sigsetmask}{454}{\code {sigsetmask}} -\entry {sigpause}{454}{\code {sigpause}} -\entry {sigstack}{455}{\code {sigstack}} -\entry {getopt}{459}{\code {getopt}} -\entry {getopt{\_}long}{463}{\code {getopt{\_}long}} -\entry {getenv}{467}{\code {getenv}} -\entry {putenv}{467}{\code {putenv}} -\entry {exit}{470}{\code {exit}} -\entry {atexit}{472}{\code {atexit}} -\entry {on{\_}exit}{472}{\code {on{\_}exit}} -\entry {abort}{473}{\code {abort}} -\entry {{\_}exit}{473}{\code {{\_}exit}} -\entry {system}{475}{\code {system}} -\entry {getpid}{477}{\code {getpid}} -\entry {getppid}{477}{\code {getppid}} -\entry {fork}{477}{\code {fork}} -\entry {vfork}{478}{\code {vfork}} -\entry {execv}{479}{\code {execv}} -\entry {execl}{479}{\code {execl}} -\entry {execve}{479}{\code {execve}} -\entry {execle}{479}{\code {execle}} -\entry {execvp}{479}{\code {execvp}} -\entry {execlp}{480}{\code {execlp}} -\entry {waitpid}{482}{\code {waitpid}} -\entry {wait}{483}{\code {wait}} -\entry {WIFEXITED}{484}{\code {WIFEXITED}} -\entry {WEXITSTATUS}{484}{\code {WEXITSTATUS}} -\entry {WIFSIGNALED}{484}{\code {WIFSIGNALED}} -\entry {WTERMSIG}{485}{\code {WTERMSIG}} -\entry {WCOREDUMP}{485}{\code {WCOREDUMP}} -\entry {WIFSTOPPED}{485}{\code {WIFSTOPPED}} -\entry {WSTOPSIG}{485}{\code {WSTOPSIG}} -\entry {wait3}{486}{\code {wait3}} -\entry {wait4}{486}{\code {wait4}} -\entry {ctermid}{509}{\code {ctermid}} -\entry {setsid}{509}{\code {setsid}} -\entry {-lbsd-compat}{510}{\code {-lbsd-compat}} -\entry {bsd-compat}{510}{\code {bsd-compat}} -\entry {getpgrp}{510}{\code {getpgrp}} -\entry {getpgrp}{510}{\code {getpgrp}} -\entry {setpgid}{510}{\code {setpgid}} -\entry {setpgrp}{511}{\code {setpgrp}} -\entry {tcgetpgrp}{511}{\code {tcgetpgrp}} -\entry {tcsetpgrp}{512}{\code {tcsetpgrp}} -\entry {getuid}{516}{\code {getuid}} -\entry {getgid}{516}{\code {getgid}} -\entry {geteuid}{516}{\code {geteuid}} -\entry {getegid}{516}{\code {getegid}} -\entry {getgroups}{516}{\code {getgroups}} -\entry {setuid}{517}{\code {setuid}} -\entry {setreuid}{517}{\code {setreuid}} -\entry {setgid}{518}{\code {setgid}} -\entry {setregid}{518}{\code {setregid}} -\entry {setgroups}{519}{\code {setgroups}} -\entry {initgroups}{519}{\code {initgroups}} -\entry {getlogin}{524}{\code {getlogin}} -\entry {cuserid}{524}{\code {cuserid}} -\entry {getpwuid}{526}{\code {getpwuid}} -\entry {getpwnam}{526}{\code {getpwnam}} -\entry {fgetpwent}{527}{\code {fgetpwent}} -\entry {setpwent}{527}{\code {setpwent}} -\entry {getpwent}{527}{\code {getpwent}} -\entry {endpwent}{527}{\code {endpwent}} -\entry {putpwent}{527}{\code {putpwent}} -\entry {getgrgid}{528}{\code {getgrgid}} -\entry {getgrnam}{529}{\code {getgrnam}} -\entry {fgetgrent}{529}{\code {fgetgrent}} -\entry {setgrent}{529}{\code {setgrent}} -\entry {getgrent}{529}{\code {getgrent}} -\entry {endgrent}{530}{\code {endgrent}} -\entry {gethostname}{533}{\code {gethostname}} -\entry {sethostname}{533}{\code {sethostname}} -\entry {gethostid}{534}{\code {gethostid}} -\entry {sethostid}{534}{\code {sethostid}} -\entry {uname}{535}{\code {uname}} -\entry {sysconf}{541}{\code {sysconf}} -\entry {pathconf}{549}{\code {pathconf}} -\entry {fpathconf}{549}{\code {fpathconf}} -\entry {confstr}{552}{\code {confstr}} -\entry {assert}{555}{\code {assert}} -\entry {va{\_}start}{561}{\code {va{\_}start}} -\entry {va{\_}arg}{561}{\code {va{\_}arg}} -\entry {va{\_}end}{561}{\code {va{\_}end}} -\entry {va{\_}alist}{563}{\code {va{\_}alist}} -\entry {va{\_}dcl}{563}{\code {va{\_}dcl}} -\entry {va{\_}start}{563}{\code {va{\_}start}} -\entry {offsetof}{573}{\code {offsetof}} +\entry {strerror}{22}{\code {strerror}} +\entry {perror}{22}{\code {perror}} +\entry {malloc}{26}{\code {malloc}} +\entry {free}{28}{\code {free}} +\entry {cfree}{28}{\code {cfree}} +\entry {realloc}{29}{\code {realloc}} +\entry {calloc}{30}{\code {calloc}} +\entry {memalign}{31}{\code {memalign}} +\entry {valloc}{31}{\code {valloc}} +\entry {mcheck}{32}{\code {mcheck}} +\entry {mstats}{34}{\code {mstats}} +\entry {obstack{\_}chunk{\_}alloc}{36}{\code {obstack{\_}chunk{\_}alloc}} +\entry {obstack{\_}chunk{\_}free}{36}{\code {obstack{\_}chunk{\_}free}} +\entry {obstack{\_}init}{37}{\code {obstack{\_}init}} +\entry {obstack{\_}alloc}{37}{\code {obstack{\_}alloc}} +\entry {obstack{\_}copy}{37}{\code {obstack{\_}copy}} +\entry {obstack{\_}copy0}{38}{\code {obstack{\_}copy0}} +\entry {obstack{\_}free}{38}{\code {obstack{\_}free}} +\entry {obstack{\_}blank}{40}{\code {obstack{\_}blank}} +\entry {obstack{\_}grow}{40}{\code {obstack{\_}grow}} +\entry {obstack{\_}grow0}{40}{\code {obstack{\_}grow0}} +\entry {obstack{\_}1grow}{40}{\code {obstack{\_}1grow}} +\entry {obstack{\_}finish}{40}{\code {obstack{\_}finish}} +\entry {obstack{\_}object{\_}size}{40}{\code {obstack{\_}object{\_}size}} +\entry {obstack{\_}room}{41}{\code {obstack{\_}room}} +\entry {obstack{\_}1grow{\_}fast}{41}{\code {obstack{\_}1grow{\_}fast}} +\entry {obstack{\_}blank{\_}fast}{41}{\code {obstack{\_}blank{\_}fast}} +\entry {obstack{\_}base}{42}{\code {obstack{\_}base}} +\entry {obstack{\_}next{\_}free}{43}{\code {obstack{\_}next{\_}free}} +\entry {obstack{\_}object{\_}size}{43}{\code {obstack{\_}object{\_}size}} +\entry {obstack{\_}alignment{\_}mask}{43}{\code {obstack{\_}alignment{\_}mask}} +\entry {obstack{\_}chunk{\_}size}{44}{\code {obstack{\_}chunk{\_}size}} +\entry {alloca}{47}{\code {alloca}} +\entry {r{\_}alloc}{50}{\code {r{\_}alloc}} +\entry {r{\_}alloc{\_}free}{50}{\code {r{\_}alloc{\_}free}} +\entry {r{\_}re{\_}alloc}{50}{\code {r{\_}re{\_}alloc}} +\entry {memory{\_}warnings}{50}{\code {memory{\_}warnings}} +\entry {islower}{53}{\code {islower}} +\entry {isupper}{53}{\code {isupper}} +\entry {isalpha}{53}{\code {isalpha}} +\entry {isdigit}{54}{\code {isdigit}} +\entry {isalnum}{54}{\code {isalnum}} +\entry {isxdigit}{54}{\code {isxdigit}} +\entry {ispunct}{54}{\code {ispunct}} +\entry {isspace}{54}{\code {isspace}} +\entry {isblank}{54}{\code {isblank}} +\entry {isgraph}{54}{\code {isgraph}} +\entry {isprint}{54}{\code {isprint}} +\entry {iscntrl}{55}{\code {iscntrl}} +\entry {isascii}{55}{\code {isascii}} +\entry {tolower}{55}{\code {tolower}} +\entry {toupper}{55}{\code {toupper}} +\entry {toascii}{55}{\code {toascii}} +\entry {{\_}tolower}{55}{\code {{\_}tolower}} +\entry {{\_}toupper}{55}{\code {{\_}toupper}} +\entry {strlen}{59}{\code {strlen}} +\entry {memcpy}{60}{\code {memcpy}} +\entry {memmove}{60}{\code {memmove}} +\entry {memccpy}{60}{\code {memccpy}} +\entry {memset}{60}{\code {memset}} +\entry {strcpy}{60}{\code {strcpy}} +\entry {strncpy}{60}{\code {strncpy}} +\entry {strdup}{61}{\code {strdup}} +\entry {stpcpy}{61}{\code {stpcpy}} +\entry {strcat}{62}{\code {strcat}} +\entry {strncat}{62}{\code {strncat}} +\entry {bcopy}{63}{\code {bcopy}} +\entry {bzero}{63}{\code {bzero}} +\entry {memcmp}{63}{\code {memcmp}} +\entry {strcmp}{64}{\code {strcmp}} +\entry {strcasecmp}{64}{\code {strcasecmp}} +\entry {strncasecmp}{64}{\code {strncasecmp}} +\entry {strncmp}{65}{\code {strncmp}} +\entry {bcmp}{65}{\code {bcmp}} +\entry {strcoll}{66}{\code {strcoll}} +\entry {strxfrm}{66}{\code {strxfrm}} +\entry {memchr}{68}{\code {memchr}} +\entry {strchr}{68}{\code {strchr}} +\entry {index}{69}{\code {index}} +\entry {strrchr}{69}{\code {strrchr}} +\entry {rindex}{69}{\code {rindex}} +\entry {strstr}{69}{\code {strstr}} +\entry {memmem}{69}{\code {memmem}} +\entry {strspn}{70}{\code {strspn}} +\entry {strcspn}{70}{\code {strcspn}} +\entry {strpbrk}{70}{\code {strpbrk}} +\entry {strtok}{71}{\code {strtok}} +\entry {fopen}{82}{\code {fopen}} +\entry {freopen}{84}{\code {freopen}} +\entry {fclose}{84}{\code {fclose}} +\entry {fputc}{85}{\code {fputc}} +\entry {putc}{85}{\code {putc}} +\entry {putchar}{85}{\code {putchar}} +\entry {fputs}{85}{\code {fputs}} +\entry {puts}{86}{\code {puts}} +\entry {putw}{86}{\code {putw}} +\entry {fgetc}{86}{\code {fgetc}} +\entry {getc}{86}{\code {getc}} +\entry {getchar}{86}{\code {getchar}} +\entry {getw}{87}{\code {getw}} +\entry {getline}{87}{\code {getline}} +\entry {getdelim}{88}{\code {getdelim}} +\entry {fgets}{89}{\code {fgets}} +\entry {gets}{89}{\code {gets}} +\entry {ungetc}{90}{\code {ungetc}} +\entry {printf}{100}{\code {printf}} +\entry {fprintf}{100}{\code {fprintf}} +\entry {sprintf}{100}{\code {sprintf}} +\entry {snprintf}{100}{\code {snprintf}} +\entry {asprintf}{101}{\code {asprintf}} +\entry {obstack{\_}printf}{102}{\code {obstack{\_}printf}} +\entry {vprintf}{103}{\code {vprintf}} +\entry {vfprintf}{103}{\code {vfprintf}} +\entry {vsprintf}{103}{\code {vsprintf}} +\entry {vsnprintf}{103}{\code {vsnprintf}} +\entry {vasprintf}{103}{\code {vasprintf}} +\entry {obstack{\_}vprintf}{103}{\code {obstack{\_}vprintf}} +\entry {parse{\_}printf{\_}format}{104}{\code {parse{\_}printf{\_}format}} +\entry {register{\_}printf{\_}function}{108}{\code {register{\_}printf{\_}function}} +\entry {scanf}{119}{\code {scanf}} +\entry {fscanf}{120}{\code {fscanf}} +\entry {sscanf}{120}{\code {sscanf}} +\entry {vscanf}{120}{\code {vscanf}} +\entry {vfscanf}{120}{\code {vfscanf}} +\entry {vsscanf}{120}{\code {vsscanf}} +\entry {fread}{121}{\code {fread}} +\entry {fwrite}{121}{\code {fwrite}} +\entry {clearerr}{122}{\code {clearerr}} +\entry {feof}{122}{\code {feof}} +\entry {ferror}{122}{\code {ferror}} +\entry {ftell}{124}{\code {ftell}} +\entry {fseek}{124}{\code {fseek}} +\entry {rewind}{125}{\code {rewind}} +\entry {fgetpos}{126}{\code {fgetpos}} +\entry {fsetpos}{126}{\code {fsetpos}} +\entry {fflush}{128}{\code {fflush}} +\entry {setvbuf}{129}{\code {setvbuf}} +\entry {setbuf}{130}{\code {setbuf}} +\entry {setbuffer}{130}{\code {setbuffer}} +\entry {setlinebuf}{130}{\code {setlinebuf}} +\entry {fmemopen}{131}{\code {fmemopen}} +\entry {open{\_}memstream}{132}{\code {open{\_}memstream}} +\entry {open{\_}obstack{\_}stream}{133}{\code {open{\_}obstack{\_}stream}} +\entry {fopencookie}{135}{\code {fopencookie}} +\entry {open}{137}{\code {open}} +\entry {creat}{139}{\code {creat}} +\entry {close}{139}{\code {close}} +\entry {read}{140}{\code {read}} +\entry {write}{141}{\code {write}} +\entry {lseek}{143}{\code {lseek}} +\entry {fdopen}{145}{\code {fdopen}} +\entry {fileno}{146}{\code {fileno}} +\entry {fclean}{148}{\code {fclean}} +\entry {FD{\_}ZERO}{149}{\code {FD{\_}ZERO}} +\entry {FD{\_}SET}{149}{\code {FD{\_}SET}} +\entry {FD{\_}CLR}{149}{\code {FD{\_}CLR}} +\entry {FD{\_}ISSET}{149}{\code {FD{\_}ISSET}} +\entry {select}{150}{\code {select}} +\entry {fcntl}{152}{\code {fcntl}} +\entry {dup}{153}{\code {dup}} +\entry {dup2}{153}{\code {dup2}} +\entry {getcwd}{165}{\code {getcwd}} +\entry {getwd}{166}{\code {getwd}} +\entry {chdir}{166}{\code {chdir}} +\entry {opendir}{168}{\code {opendir}} +\entry {readdir}{168}{\code {readdir}} +\entry {closedir}{169}{\code {closedir}} +\entry {rewinddir}{170}{\code {rewinddir}} +\entry {telldir}{170}{\code {telldir}} +\entry {seekdir}{170}{\code {seekdir}} +\entry {link}{170}{\code {link}} +\entry {symlink}{172}{\code {symlink}} +\entry {readlink}{172}{\code {readlink}} +\entry {unlink}{173}{\code {unlink}} +\entry {remove}{174}{\code {remove}} +\entry {rmdir}{174}{\code {rmdir}} +\entry {rename}{174}{\code {rename}} +\entry {mkdir}{176}{\code {mkdir}} +\entry {stat}{180}{\code {stat}} +\entry {fstat}{180}{\code {fstat}} +\entry {lstat}{180}{\code {lstat}} +\entry {S{\_}ISDIR}{181}{\code {S{\_}ISDIR}} +\entry {S{\_}ISCHR}{181}{\code {S{\_}ISCHR}} +\entry {S{\_}ISBLK}{181}{\code {S{\_}ISBLK}} +\entry {S{\_}ISREG}{181}{\code {S{\_}ISREG}} +\entry {S{\_}ISFIFO}{181}{\code {S{\_}ISFIFO}} +\entry {S{\_}ISLNK}{181}{\code {S{\_}ISLNK}} +\entry {S{\_}ISSOCK}{181}{\code {S{\_}ISSOCK}} +\entry {chown}{183}{\code {chown}} +\entry {fchown}{183}{\code {fchown}} +\entry {umask}{186}{\code {umask}} +\entry {getumask}{187}{\code {getumask}} +\entry {chmod}{187}{\code {chmod}} +\entry {fchmod}{187}{\code {fchmod}} +\entry {access}{188}{\code {access}} +\entry {utime}{190}{\code {utime}} +\entry {utimes}{191}{\code {utimes}} +\entry {mknod}{191}{\code {mknod}} +\entry {tmpfile}{192}{\code {tmpfile}} +\entry {tmpnam}{192}{\code {tmpnam}} +\entry {tempnam}{193}{\code {tempnam}} +\entry {mktemp}{193}{\code {mktemp}} +\entry {mkstemp}{194}{\code {mkstemp}} +\entry {pipe}{195}{\code {pipe}} +\entry {popen}{197}{\code {popen}} +\entry {pclose}{198}{\code {pclose}} +\entry {mkfifo}{199}{\code {mkfifo}} +\entry {bind}{205}{\code {bind}} +\entry {getsockname}{206}{\code {getsockname}} +\entry {inet{\_}aton}{212}{\code {inet{\_}aton}} +\entry {inet{\_}addr}{213}{\code {inet{\_}addr}} +\entry {inet{\_}network}{213}{\code {inet{\_}network}} +\entry {inet{\_}ntoa}{213}{\code {inet{\_}ntoa}} +\entry {inet{\_}makeaddr}{213}{\code {inet{\_}makeaddr}} +\entry {inet{\_}lnaof}{213}{\code {inet{\_}lnaof}} +\entry {inet{\_}netof}{213}{\code {inet{\_}netof}} +\entry {gethostbyname}{215}{\code {gethostbyname}} +\entry {gethostbyaddr}{215}{\code {gethostbyaddr}} +\entry {sethostent}{215}{\code {sethostent}} +\entry {gethostent}{216}{\code {gethostent}} +\entry {endhostent}{216}{\code {endhostent}} +\entry {getservbyname}{217}{\code {getservbyname}} +\entry {getservbyport}{217}{\code {getservbyport}} +\entry {setservent}{218}{\code {setservent}} +\entry {getservent}{218}{\code {getservent}} +\entry {endservent}{218}{\code {endservent}} +\entry {htons}{218}{\code {htons}} +\entry {ntohs}{219}{\code {ntohs}} +\entry {htonl}{219}{\code {htonl}} +\entry {ntohl}{219}{\code {ntohl}} +\entry {getprotobyname}{220}{\code {getprotobyname}} +\entry {getprotobynumber}{220}{\code {getprotobynumber}} +\entry {setprotoent}{220}{\code {setprotoent}} +\entry {getprotoent}{220}{\code {getprotoent}} +\entry {endprotoent}{220}{\code {endprotoent}} +\entry {socket}{222}{\code {socket}} +\entry {shutdown}{223}{\code {shutdown}} +\entry {socketpair}{224}{\code {socketpair}} +\entry {connect}{225}{\code {connect}} +\entry {listen}{227}{\code {listen}} +\entry {accept}{227}{\code {accept}} +\entry {getpeername}{228}{\code {getpeername}} +\entry {send}{229}{\code {send}} +\entry {recv}{230}{\code {recv}} +\entry {sendto}{239}{\code {sendto}} +\entry {recvfrom}{239}{\code {recvfrom}} +\entry {getsockopt}{245}{\code {getsockopt}} +\entry {setsockopt}{245}{\code {setsockopt}} +\entry {getnetbyname}{248}{\code {getnetbyname}} +\entry {getnetbyaddr}{248}{\code {getnetbyaddr}} +\entry {setnetent}{248}{\code {setnetent}} +\entry {getnetent}{248}{\code {getnetent}} +\entry {endnetent}{248}{\code {endnetent}} +\entry {isatty}{249}{\code {isatty}} +\entry {ttyname}{249}{\code {ttyname}} +\entry {tcgetattr}{252}{\code {tcgetattr}} +\entry {tcsetattr}{252}{\code {tcsetattr}} +\entry {cfgetospeed}{261}{\code {cfgetospeed}} +\entry {cfgetispeed}{261}{\code {cfgetispeed}} +\entry {cfsetospeed}{262}{\code {cfsetospeed}} +\entry {cfsetispeed}{262}{\code {cfsetispeed}} +\entry {cfsetspeed}{262}{\code {cfsetspeed}} +\entry {cfmakeraw}{262}{\code {cfmakeraw}} +\entry {tcsendbreak}{270}{\code {tcsendbreak}} +\entry {tcdrain}{270}{\code {tcdrain}} +\entry {tcflush}{270}{\code {tcflush}} +\entry {tcflow}{271}{\code {tcflow}} +\entry {sin}{276}{\code {sin}} +\entry {cos}{276}{\code {cos}} +\entry {tan}{276}{\code {tan}} +\entry {asin}{277}{\code {asin}} +\entry {acos}{277}{\code {acos}} +\entry {atan}{277}{\code {atan}} +\entry {atan2}{277}{\code {atan2}} +\entry {exp}{278}{\code {exp}} +\entry {log}{278}{\code {log}} +\entry {log10}{278}{\code {log10}} +\entry {pow}{278}{\code {pow}} +\entry {sqrt}{278}{\code {sqrt}} +\entry {cbrt}{278}{\code {cbrt}} +\entry {hypot}{279}{\code {hypot}} +\entry {expm1}{279}{\code {expm1}} +\entry {log1p}{279}{\code {log1p}} +\entry {sinh}{279}{\code {sinh}} +\entry {cosh}{279}{\code {cosh}} +\entry {tanh}{279}{\code {tanh}} +\entry {asinh}{279}{\code {asinh}} +\entry {acosh}{279}{\code {acosh}} +\entry {atanh}{280}{\code {atanh}} +\entry {rand}{280}{\code {rand}} +\entry {srand}{281}{\code {srand}} +\entry {random}{281}{\code {random}} +\entry {srandom}{281}{\code {srandom}} +\entry {initstate}{281}{\code {initstate}} +\entry {setstate}{281}{\code {setstate}} +\entry {isinf}{283}{\code {isinf}} +\entry {isnan}{283}{\code {isnan}} +\entry {finite}{284}{\code {finite}} +\entry {infnan}{284}{\code {infnan}} +\entry {abs}{284}{\code {abs}} +\entry {labs}{284}{\code {labs}} +\entry {fabs}{284}{\code {fabs}} +\entry {cabs}{284}{\code {cabs}} +\entry {frexp}{285}{\code {frexp}} +\entry {ldexp}{285}{\code {ldexp}} +\entry {scalb}{285}{\code {scalb}} +\entry {logb}{285}{\code {logb}} +\entry {copysign}{286}{\code {copysign}} +\entry {ceil}{286}{\code {ceil}} +\entry {floor}{286}{\code {floor}} +\entry {rint}{286}{\code {rint}} +\entry {modf}{286}{\code {modf}} +\entry {fmod}{287}{\code {fmod}} +\entry {drem}{287}{\code {drem}} +\entry {div}{288}{\code {div}} +\entry {ldiv}{288}{\code {ldiv}} +\entry {strtol}{289}{\code {strtol}} +\entry {strtoul}{289}{\code {strtoul}} +\entry {atol}{290}{\code {atol}} +\entry {atoi}{290}{\code {atoi}} +\entry {strtod}{291}{\code {strtod}} +\entry {atof}{291}{\code {atof}} +\entry {bsearch}{293}{\code {bsearch}} +\entry {qsort}{294}{\code {qsort}} +\entry {fnmatch}{299}{\code {fnmatch}} +\entry {glob}{301}{\code {glob}} +\entry {regcomp}{304}{\code {regcomp}} +\entry {regexec}{306}{\code {regexec}} +\entry {regfree}{309}{\code {regfree}} +\entry {regerror}{309}{\code {regerror}} +\entry {wordexp}{311}{\code {wordexp}} +\entry {wordfree}{312}{\code {wordfree}} +\entry {clock}{316}{\code {clock}} +\entry {times}{317}{\code {times}} +\entry {difftime}{318}{\code {difftime}} +\entry {time}{318}{\code {time}} +\entry {gettimeofday}{320}{\code {gettimeofday}} +\entry {settimeofday}{320}{\code {settimeofday}} +\entry {adjtime}{320}{\code {adjtime}} +\entry {localtime}{322}{\code {localtime}} +\entry {gmtime}{323}{\code {gmtime}} +\entry {mktime}{323}{\code {mktime}} +\entry {asctime}{323}{\code {asctime}} +\entry {ctime}{324}{\code {ctime}} +\entry {strftime}{324}{\code {strftime}} +\entry {tzset}{328}{\code {tzset}} +\entry {setitimer}{330}{\code {setitimer}} +\entry {getitimer}{330}{\code {getitimer}} +\entry {ITIMER{\_}REAL}{330}{\code {ITIMER{\_}REAL}} +\entry {ITIMER{\_}VIRTUAL}{330}{\code {ITIMER{\_}VIRTUAL}} +\entry {ITIMER{\_}PROF}{330}{\code {ITIMER{\_}PROF}} +\entry {alarm}{331}{\code {alarm}} +\entry {sleep}{331}{\code {sleep}} +\entry {getrusage}{332}{\code {getrusage}} +\entry {getrlimit}{334}{\code {getrlimit}} +\entry {setrlimit}{334}{\code {setrlimit}} +\entry {getpriority}{336}{\code {getpriority}} +\entry {setpriority}{336}{\code {setpriority}} +\entry {nice}{337}{\code {nice}} +\entry {mbstowcs}{344}{\code {mbstowcs}} +\entry {wcstombs}{345}{\code {wcstombs}} +\entry {mblen}{345}{\code {mblen}} +\entry {mbtowc}{346}{\code {mbtowc}} +\entry {wctomb}{346}{\code {wctomb}} +\entry {setlocale}{353}{\code {setlocale}} +\entry {localeconv}{355}{\code {localeconv}} +\entry {setjmp}{363}{\code {setjmp}} +\entry {longjmp}{363}{\code {longjmp}} +\entry {sigsetjmp}{364}{\code {sigsetjmp}} +\entry {siglongjmp}{364}{\code {siglongjmp}} +\entry {strsignal}{377}{\code {strsignal}} +\entry {psignal}{377}{\code {psignal}} +\entry {signal}{378}{\code {signal}} +\entry {ssignal}{380}{\code {ssignal}} +\entry {sigaction}{380}{\code {sigaction}} +\entry {TEMP{\_}FAILURE{\_}RETRY}{397}{\code {TEMP{\_}FAILURE{\_}RETRY}} +\entry {raise}{398}{\code {raise}} +\entry {gsignal}{398}{\code {gsignal}} +\entry {kill}{399}{\code {kill}} +\entry {killpg}{400}{\code {killpg}} +\entry {sigemptyset}{404}{\code {sigemptyset}} +\entry {sigfillset}{404}{\code {sigfillset}} +\entry {sigaddset}{404}{\code {sigaddset}} +\entry {sigdelset}{404}{\code {sigdelset}} +\entry {sigismember}{404}{\code {sigismember}} +\entry {sigprocmask}{405}{\code {sigprocmask}} +\entry {sigpending}{408}{\code {sigpending}} +\entry {pause}{411}{\code {pause}} +\entry {sigsuspend}{412}{\code {sigsuspend}} +\entry {sigvec}{415}{\code {sigvec}} +\entry {siginterrupt}{415}{\code {siginterrupt}} +\entry {sigmask}{415}{\code {sigmask}} +\entry {sigblock}{415}{\code {sigblock}} +\entry {sigsetmask}{415}{\code {sigsetmask}} +\entry {sigpause}{416}{\code {sigpause}} +\entry {sigaltstack}{417}{\code {sigaltstack}} +\entry {sigstack}{418}{\code {sigstack}} +\entry {getopt}{421}{\code {getopt}} +\entry {getopt{\_}long}{425}{\code {getopt{\_}long}} +\entry {getenv}{428}{\code {getenv}} +\entry {putenv}{429}{\code {putenv}} +\entry {exit}{431}{\code {exit}} +\entry {atexit}{433}{\code {atexit}} +\entry {on{\_}exit}{433}{\code {on{\_}exit}} +\entry {abort}{434}{\code {abort}} +\entry {{\_}exit}{434}{\code {{\_}exit}} +\entry {system}{437}{\code {system}} +\entry {getpid}{439}{\code {getpid}} +\entry {getppid}{439}{\code {getppid}} +\entry {fork}{439}{\code {fork}} +\entry {vfork}{440}{\code {vfork}} +\entry {execv}{440}{\code {execv}} +\entry {execl}{441}{\code {execl}} +\entry {execve}{441}{\code {execve}} +\entry {execle}{441}{\code {execle}} +\entry {execvp}{441}{\code {execvp}} +\entry {execlp}{441}{\code {execlp}} +\entry {waitpid}{443}{\code {waitpid}} +\entry {wait}{445}{\code {wait}} +\entry {WIFEXITED}{446}{\code {WIFEXITED}} +\entry {WEXITSTATUS}{446}{\code {WEXITSTATUS}} +\entry {WIFSIGNALED}{446}{\code {WIFSIGNALED}} +\entry {WTERMSIG}{446}{\code {WTERMSIG}} +\entry {WCOREDUMP}{446}{\code {WCOREDUMP}} +\entry {WIFSTOPPED}{446}{\code {WIFSTOPPED}} +\entry {WSTOPSIG}{446}{\code {WSTOPSIG}} +\entry {wait3}{447}{\code {wait3}} +\entry {wait4}{447}{\code {wait4}} +\entry {ctermid}{468}{\code {ctermid}} +\entry {setsid}{468}{\code {setsid}} +\entry {getpgrp}{469}{\code {getpgrp}} +\entry {getpgrp}{469}{\code {getpgrp}} +\entry {setpgid}{469}{\code {setpgid}} +\entry {setpgrp}{469}{\code {setpgrp}} +\entry {tcgetpgrp}{470}{\code {tcgetpgrp}} +\entry {tcsetpgrp}{470}{\code {tcsetpgrp}} +\entry {getuid}{475}{\code {getuid}} +\entry {getgid}{475}{\code {getgid}} +\entry {geteuid}{476}{\code {geteuid}} +\entry {getegid}{476}{\code {getegid}} +\entry {getgroups}{476}{\code {getgroups}} +\entry {setuid}{476}{\code {setuid}} +\entry {setreuid}{477}{\code {setreuid}} +\entry {setgid}{477}{\code {setgid}} +\entry {setregid}{478}{\code {setregid}} +\entry {setgroups}{478}{\code {setgroups}} +\entry {initgroups}{478}{\code {initgroups}} +\entry {getlogin}{483}{\code {getlogin}} +\entry {cuserid}{483}{\code {cuserid}} +\entry {getpwuid}{485}{\code {getpwuid}} +\entry {getpwnam}{485}{\code {getpwnam}} +\entry {fgetpwent}{485}{\code {fgetpwent}} +\entry {setpwent}{485}{\code {setpwent}} +\entry {getpwent}{485}{\code {getpwent}} +\entry {endpwent}{486}{\code {endpwent}} +\entry {putpwent}{486}{\code {putpwent}} +\entry {getgrgid}{487}{\code {getgrgid}} +\entry {getgrnam}{487}{\code {getgrnam}} +\entry {fgetgrent}{487}{\code {fgetgrent}} +\entry {setgrent}{488}{\code {setgrent}} +\entry {getgrent}{488}{\code {getgrent}} +\entry {endgrent}{488}{\code {endgrent}} +\entry {gethostname}{491}{\code {gethostname}} +\entry {sethostname}{491}{\code {sethostname}} +\entry {gethostid}{492}{\code {gethostid}} +\entry {sethostid}{492}{\code {sethostid}} +\entry {uname}{493}{\code {uname}} +\entry {sysconf}{499}{\code {sysconf}} +\entry {pathconf}{506}{\code {pathconf}} +\entry {fpathconf}{507}{\code {fpathconf}} +\entry {confstr}{509}{\code {confstr}} +\entry {assert}{511}{\code {assert}} +\entry {va{\_}start}{516}{\code {va{\_}start}} +\entry {va{\_}arg}{516}{\code {va{\_}arg}} +\entry {va{\_}end}{517}{\code {va{\_}end}} +\entry {va{\_}alist}{518}{\code {va{\_}alist}} +\entry {va{\_}dcl}{518}{\code {va{\_}dcl}} +\entry {va{\_}start}{518}{\code {va{\_}start}} +\entry {offsetof}{528}{\code {offsetof}} diff -ruN glibc-1.06/manual/libc.fns glibc-1.07/manual/libc.fns --- glibc-1.06/manual/libc.fns Mon May 17 16:59:13 1993 +++ glibc-1.07/manual/libc.fns Wed Dec 29 18:34:48 1993 @@ -1,496 +1,499 @@ -\initial {-} -\entry {\code {-lbsd-compat}}{510} \initial {{\_}} -\entry {\code {{\_}exit}}{474} -\entry {\code {{\_}tolower}}{60} -\entry {\code {{\_}toupper}}{60} +\entry {\code {{\_}exit}}{434} +\entry {\code {{\_}tolower}}{55} +\entry {\code {{\_}toupper}}{55} \initial {A} -\entry {\code {abort}}{473} -\entry {\code {abs}}{356} -\entry {\code {accept}}{293} -\entry {\code {access}}{254} -\entry {\code {acos}}{347} -\entry {\code {acosh}}{350} -\entry {\code {adjtime}}{373} -\entry {\code {alarm}}{384} -\entry {\code {alloca}}{51} -\entry {\code {asctime}}{376} -\entry {\code {asin}}{347} -\entry {\code {asinh}}{350} -\entry {\code {asprintf}}{157} -\entry {\code {assert}}{555} -\entry {\code {atan}}{347} -\entry {\code {atan2}}{347} -\entry {\code {atanh}}{350} -\entry {\code {atexit}}{472} -\entry {\code {atof}}{365} -\entry {\code {atoi}}{363} -\entry {\code {atol}}{363} +\entry {\code {abort}}{434} +\entry {\code {abs}}{284} +\entry {\code {accept}}{227} +\entry {\code {access}}{188} +\entry {\code {acos}}{277} +\entry {\code {acosh}}{279} +\entry {\code {adjtime}}{320} +\entry {\code {alarm}}{331} +\entry {\code {alloca}}{47} +\entry {\code {asctime}}{323} +\entry {\code {asin}}{277} +\entry {\code {asinh}}{279} +\entry {\code {asprintf}}{101} +\entry {\code {assert}}{511} +\entry {\code {atan}}{277} +\entry {\code {atan2}}{277} +\entry {\code {atanh}}{280} +\entry {\code {atexit}}{433} +\entry {\code {atof}}{291} +\entry {\code {atoi}}{290} +\entry {\code {atol}}{290} \initial {B} -\entry {\code {bcmp}}{70} -\entry {\code {bcopy}}{67} -\entry {\code {bind}}{269} -\entry {\code {bsd-compat}}{510} -\entry {\code {bsearch}}{104} -\entry {\code {bzero}}{67} +\entry {\code {bcmp}}{65} +\entry {\code {bcopy}}{63} +\entry {\code {bind}}{205} +\entry {\code {bsearch}}{293} +\entry {\code {bzero}}{63} \initial {C} -\entry {\code {cabs}}{357} -\entry {\code {calloc}}{33} -\entry {\code {cbrt}}{349} -\entry {\code {ceil}}{359} -\entry {\code {cfgetispeed}}{330} -\entry {\code {cfgetospeed}}{330} -\entry {\code {cfmakeraw}}{331} -\entry {\code {cfree}}{31} -\entry {\code {cfsetispeed}}{330} -\entry {\code {cfsetospeed}}{330} -\entry {\code {cfsetspeed}}{330} -\entry {\code {chdir}}{230} -\entry {\code {chmod}}{252} -\entry {\code {chown}}{248} -\entry {\code {clearerr}}{180} -\entry {\code {clock}}{368} -\entry {\code {close}}{201} -\entry {\code {closedir}}{233} -\entry {\code {confstr}}{552} -\entry {\code {connect}}{291} -\entry {\code {copysign}}{358} -\entry {\code {cos}}{346} -\entry {\code {cosh}}{350} -\entry {\code {creat}}{201} -\entry {\code {ctermid}}{509} -\entry {\code {ctime}}{377} -\entry {\code {cuserid}}{524} +\entry {\code {cabs}}{284} +\entry {\code {calloc}}{30} +\entry {\code {cbrt}}{278} +\entry {\code {ceil}}{286} +\entry {\code {cfgetispeed}}{261} +\entry {\code {cfgetospeed}}{261} +\entry {\code {cfmakeraw}}{262} +\entry {\code {cfree}}{28} +\entry {\code {cfsetispeed}}{262} +\entry {\code {cfsetospeed}}{262} +\entry {\code {cfsetspeed}}{262} +\entry {\code {chdir}}{166} +\entry {\code {chmod}}{187} +\entry {\code {chown}}{183} +\entry {\code {clearerr}}{122} +\entry {\code {clock}}{316} +\entry {\code {close}}{139} +\entry {\code {closedir}}{169} +\entry {\code {confstr}}{509} +\entry {\code {connect}}{225} +\entry {\code {copysign}}{286} +\entry {\code {cos}}{276} +\entry {\code {cosh}}{279} +\entry {\code {creat}}{139} +\entry {\code {ctermid}}{468} +\entry {\code {ctime}}{324} +\entry {\code {cuserid}}{483} \initial {D} -\entry {\code {difftime}}{371} -\entry {\code {div}}{361} -\entry {\code {drem}}{360} -\entry {\code {dup}}{216} -\entry {\code {dup2}}{216} +\entry {\code {difftime}}{318} +\entry {\code {div}}{288} +\entry {\code {drem}}{287} +\entry {\code {dup}}{153} +\entry {\code {dup2}}{153} \initial {E} -\entry {\code {endgrent}}{530} -\entry {\code {endhostent}}{281} -\entry {\code {endnetent}}{316} -\entry {\code {endprotoent}}{286} -\entry {\code {endpwent}}{527} -\entry {\code {endservent}}{283} -\entry {\code {execl}}{479} -\entry {\code {execle}}{479} -\entry {\code {execlp}}{480} -\entry {\code {execv}}{479} -\entry {\code {execve}}{479} -\entry {\code {execvp}}{480} -\entry {\code {exit}}{470} -\entry {\code {exp}}{348} -\entry {\code {expm1}}{349} +\entry {\code {endgrent}}{488} +\entry {\code {endhostent}}{216} +\entry {\code {endnetent}}{248} +\entry {\code {endprotoent}}{220} +\entry {\code {endpwent}}{486} +\entry {\code {endservent}}{218} +\entry {\code {execl}}{441} +\entry {\code {execle}}{441} +\entry {\code {execlp}}{441} +\entry {\code {execv}}{440} +\entry {\code {execve}}{441} +\entry {\code {execvp}}{441} +\entry {\code {exit}}{431} +\entry {\code {exp}}{278} +\entry {\code {expm1}}{279} \initial {F} -\entry {\code {fabs}}{357} -\entry {\code {fchmod}}{253} -\entry {\code {fchown}}{249} -\entry {\code {fclean}}{210} -\entry {\code {fclose}}{138} -\entry {\code {fcntl}}{214} -\entry {\code {FD{\_}CLR}}{212} -\entry {\code {FD{\_}ISSET}}{212} -\entry {\code {FD{\_}SET}}{212} -\entry {\code {FD{\_}ZERO}}{212} -\entry {\code {fdopen}}{208} -\entry {\code {feof}}{180} -\entry {\code {ferror}}{180} -\entry {\code {fflush}}{186} -\entry {\code {fgetc}}{140} -\entry {\code {fgetgrent}}{529} -\entry {\code {fgetpos}}{184} -\entry {\code {fgetpwent}}{527} -\entry {\code {fgets}}{143} -\entry {\code {fileno}}{208} -\entry {\code {finite}}{356} -\entry {\code {floor}}{359} -\entry {\code {fmemopen}}{191} -\entry {\code {fmod}}{359} -\entry {\code {fnmatch}}{109} -\entry {\code {fopen}}{136} -\entry {\code {fopencookie}}{196} -\entry {\code {fork}}{477} -\entry {\code {fpathconf}}{549} -\entry {\code {fprintf}}{155} -\entry {\code {fputc}}{139} -\entry {\code {fputs}}{140} -\entry {\code {fread}}{179} -\entry {\code {free}}{31} -\entry {\code {freopen}}{138} -\entry {\code {frexp}}{357} -\entry {\code {fscanf}}{177} -\entry {\code {fseek}}{182} -\entry {\code {fsetpos}}{184} -\entry {\code {fstat}}{245} -\entry {\code {ftell}}{182} -\entry {\code {fwrite}}{179} +\entry {\code {fabs}}{284} +\entry {\code {fchmod}}{187} +\entry {\code {fchown}}{183} +\entry {\code {fclean}}{148} +\entry {\code {fclose}}{84} +\entry {\code {fcntl}}{152} +\entry {\code {FD{\_}CLR}}{149} +\entry {\code {FD{\_}ISSET}}{149} +\entry {\code {FD{\_}SET}}{149} +\entry {\code {FD{\_}ZERO}}{149} +\entry {\code {fdopen}}{145} +\entry {\code {feof}}{122} +\entry {\code {ferror}}{122} +\entry {\code {fflush}}{128} +\entry {\code {fgetc}}{86} +\entry {\code {fgetgrent}}{487} +\entry {\code {fgetpos}}{126} +\entry {\code {fgetpwent}}{485} +\entry {\code {fgets}}{89} +\entry {\code {fileno}}{146} +\entry {\code {finite}}{284} +\entry {\code {floor}}{286} +\entry {\code {fmemopen}}{131} +\entry {\code {fmod}}{287} +\entry {\code {fnmatch}}{299} +\entry {\code {fopen}}{82} +\entry {\code {fopencookie}}{135} +\entry {\code {fork}}{439} +\entry {\code {fpathconf}}{507} +\entry {\code {fprintf}}{100} +\entry {\code {fputc}}{85} +\entry {\code {fputs}}{85} +\entry {\code {fread}}{121} +\entry {\code {free}}{28} +\entry {\code {freopen}}{84} +\entry {\code {frexp}}{285} +\entry {\code {fscanf}}{120} +\entry {\code {fseek}}{124} +\entry {\code {fsetpos}}{126} +\entry {\code {fstat}}{180} +\entry {\code {ftell}}{124} +\entry {\code {fwrite}}{121} \initial {G} -\entry {\code {getc}}{141} -\entry {\code {getchar}}{141} -\entry {\code {getcwd}}{229} -\entry {\code {getdelim}}{142} -\entry {\code {getegid}}{516} -\entry {\code {getenv}}{467} -\entry {\code {geteuid}}{516} -\entry {\code {getgid}}{516} -\entry {\code {getgrent}}{529} -\entry {\code {getgrgid}}{528} -\entry {\code {getgrnam}}{529} -\entry {\code {getgroups}}{516} -\entry {\code {gethostbyaddr}}{279} -\entry {\code {gethostbyname}}{279} -\entry {\code {gethostent}}{281} -\entry {\code {gethostid}}{534} -\entry {\code {gethostname}}{533} -\entry {\code {getitimer}}{384} -\entry {\code {getline}}{142} -\entry {\code {getlogin}}{524} -\entry {\code {getnetbyaddr}}{315} -\entry {\code {getnetbyname}}{315} -\entry {\code {getnetent}}{316} -\entry {\code {getopt}}{459} -\entry {\code {getopt{\_}long}}{463} -\entry {\code {getpeername}}{294} -\entry {\code {getpgrp}}{510} -\entry {\code {getpid}}{477} -\entry {\code {getppid}}{477} -\entry {\code {getpriority}}{390} -\entry {\code {getprotobyname}}{285} -\entry {\code {getprotobynumber}}{285} -\entry {\code {getprotoent}}{286} -\entry {\code {getpwent}}{527} -\entry {\code {getpwnam}}{526} -\entry {\code {getpwuid}}{526} -\entry {\code {getrlimit}}{388} -\entry {\code {getrusage}}{386} -\entry {\code {gets}}{143} -\entry {\code {getservbyname}}{282} -\entry {\code {getservbyport}}{283} -\entry {\code {getservent}}{283} -\entry {\code {getsockname}}{270} -\entry {\code {getsockopt}}{312} -\entry {\code {gettimeofday}}{372} -\entry {\code {getuid}}{516} -\entry {\code {getumask}}{252} -\entry {\code {getw}}{141} -\entry {\code {getwd}}{230} -\entry {\code {glob}}{111} -\entry {\code {gmtime}}{375} -\entry {\code {gsignal}}{435} +\entry {\code {getc}}{86} +\entry {\code {getchar}}{86} +\entry {\code {getcwd}}{165} +\entry {\code {getdelim}}{88} +\entry {\code {getegid}}{476} +\entry {\code {getenv}}{428} +\entry {\code {geteuid}}{476} +\entry {\code {getgid}}{475} +\entry {\code {getgrent}}{488} +\entry {\code {getgrgid}}{487} +\entry {\code {getgrnam}}{487} +\entry {\code {getgroups}}{476} +\entry {\code {gethostbyaddr}}{215} +\entry {\code {gethostbyname}}{215} +\entry {\code {gethostent}}{216} +\entry {\code {gethostid}}{492} +\entry {\code {gethostname}}{491} +\entry {\code {getitimer}}{330} +\entry {\code {getline}}{87} +\entry {\code {getlogin}}{483} +\entry {\code {getnetbyaddr}}{248} +\entry {\code {getnetbyname}}{248} +\entry {\code {getnetent}}{248} +\entry {\code {getopt}}{421} +\entry {\code {getopt{\_}long}}{425} +\entry {\code {getpeername}}{228} +\entry {\code {getpgrp}}{469} +\entry {\code {getpid}}{439} +\entry {\code {getppid}}{439} +\entry {\code {getpriority}}{336} +\entry {\code {getprotobyname}}{220} +\entry {\code {getprotobynumber}}{220} +\entry {\code {getprotoent}}{220} +\entry {\code {getpwent}}{485} +\entry {\code {getpwnam}}{485} +\entry {\code {getpwuid}}{485} +\entry {\code {getrlimit}}{334} +\entry {\code {getrusage}}{332} +\entry {\code {gets}}{89} +\entry {\code {getservbyname}}{217} +\entry {\code {getservbyport}}{217} +\entry {\code {getservent}}{218} +\entry {\code {getsockname}}{206} +\entry {\code {getsockopt}}{245} +\entry {\code {gettimeofday}}{320} +\entry {\code {getuid}}{475} +\entry {\code {getumask}}{187} +\entry {\code {getw}}{87} +\entry {\code {getwd}}{166} +\entry {\code {glob}}{301} +\entry {\code {gmtime}}{323} +\entry {\code {gsignal}}{398} \initial {H} -\entry {\code {htonl}}{284} -\entry {\code {htons}}{284} -\entry {\code {hypot}}{349} +\entry {\code {htonl}}{219} +\entry {\code {htons}}{218} +\entry {\code {hypot}}{279} \initial {I} -\entry {\code {inet{\_}addr}}{277} -\entry {\code {inet{\_}lnaof}}{278} -\entry {\code {inet{\_}makeaddr}}{278} -\entry {\code {inet{\_}netof}}{278} -\entry {\code {inet{\_}network}}{278} -\entry {\code {inet{\_}ntoa}}{278} -\entry {\code {infnan}}{356} -\entry {\code {initgroups}}{519} -\entry {\code {initstate}}{352} -\entry {\code {isalnum}}{58} -\entry {\code {isalpha}}{58} -\entry {\code {isascii}}{59} -\entry {\code {isatty}}{317} -\entry {\code {isblank}}{59} -\entry {\code {iscntrl}}{59} -\entry {\code {isdigit}}{58} -\entry {\code {isgraph}}{59} -\entry {\code {isinf}}{356} -\entry {\code {islower}}{57} -\entry {\code {isnan}}{356} -\entry {\code {isprint}}{59} -\entry {\code {ispunct}}{58} -\entry {\code {isspace}}{58} -\entry {\code {isupper}}{57} -\entry {\code {isxdigit}}{58} -\entry {\code {ITIMER{\_}PROF}}{384} -\entry {\code {ITIMER{\_}REAL}}{384} -\entry {\code {ITIMER{\_}VIRTUAL}}{384} +\entry {\code {index}}{69} +\entry {\code {inet{\_}addr}}{213} +\entry {\code {inet{\_}aton}}{212} +\entry {\code {inet{\_}lnaof}}{213} +\entry {\code {inet{\_}makeaddr}}{213} +\entry {\code {inet{\_}netof}}{213} +\entry {\code {inet{\_}network}}{213} +\entry {\code {inet{\_}ntoa}}{213} +\entry {\code {infnan}}{284} +\entry {\code {initgroups}}{478} +\entry {\code {initstate}}{281} +\entry {\code {isalnum}}{54} +\entry {\code {isalpha}}{53} +\entry {\code {isascii}}{55} +\entry {\code {isatty}}{249} +\entry {\code {isblank}}{54} +\entry {\code {iscntrl}}{55} +\entry {\code {isdigit}}{54} +\entry {\code {isgraph}}{54} +\entry {\code {isinf}}{283} +\entry {\code {islower}}{53} +\entry {\code {isnan}}{283} +\entry {\code {isprint}}{54} +\entry {\code {ispunct}}{54} +\entry {\code {isspace}}{54} +\entry {\code {isupper}}{53} +\entry {\code {isxdigit}}{54} +\entry {\code {ITIMER{\_}PROF}}{330} +\entry {\code {ITIMER{\_}REAL}}{330} +\entry {\code {ITIMER{\_}VIRTUAL}}{330} \initial {K} -\entry {\code {kill}}{436} -\entry {\code {killpg}}{437} +\entry {\code {kill}}{399} +\entry {\code {killpg}}{400} \initial {L} -\entry {\code {labs}}{357} -\entry {\code {ldexp}}{358} -\entry {\code {ldiv}}{361} -\entry {\code {link}}{235} -\entry {\code {listen}}{293} -\entry {\code {localeconv}}{98} -\entry {\code {localtime}}{375} -\entry {\code {log}}{348} -\entry {\code {log10}}{348} -\entry {\code {log1p}}{349} -\entry {\code {logb}}{358} -\entry {\code {longjmp}}{395} -\entry {\code {lseek}}{205} -\entry {\code {lstat}}{245} +\entry {\code {labs}}{284} +\entry {\code {ldexp}}{285} +\entry {\code {ldiv}}{288} +\entry {\code {link}}{170} +\entry {\code {listen}}{227} +\entry {\code {localeconv}}{355} +\entry {\code {localtime}}{322} +\entry {\code {log}}{278} +\entry {\code {log10}}{278} +\entry {\code {log1p}}{279} +\entry {\code {logb}}{285} +\entry {\code {longjmp}}{363} +\entry {\code {lseek}}{143} +\entry {\code {lstat}}{180} \initial {M} -\entry {\code {malloc}}{29} -\entry {\code {mblen}}{86} -\entry {\code {mbstowcs}}{84} -\entry {\code {mbtowc}}{86} -\entry {\code {mcheck}}{34} -\entry {\code {memalign}}{34} -\entry {\code {memccpy}}{64} -\entry {\code {memchr}}{74} -\entry {\code {memcmp}}{68} -\entry {\code {memcpy}}{64} -\entry {\code {memmem}}{75} -\entry {\code {memmove}}{64} -\entry {\code {memory{\_}warnings}}{55} -\entry {\code {memset}}{65} -\entry {\code {mkdir}}{241} -\entry {\code {mkfifo}}{263} -\entry {\code {mknod}}{257} -\entry {\code {mktime}}{376} -\entry {\code {modf}}{359} -\entry {\code {mstats}}{37} +\entry {\code {malloc}}{26} +\entry {\code {mblen}}{345} +\entry {\code {mbstowcs}}{344} +\entry {\code {mbtowc}}{346} +\entry {\code {mcheck}}{32} +\entry {\code {memalign}}{31} +\entry {\code {memccpy}}{60} +\entry {\code {memchr}}{68} +\entry {\code {memcmp}}{63} +\entry {\code {memcpy}}{60} +\entry {\code {memmem}}{69} +\entry {\code {memmove}}{60} +\entry {\code {memory{\_}warnings}}{50} +\entry {\code {memset}}{60} +\entry {\code {mkdir}}{176} +\entry {\code {mkfifo}}{199} +\entry {\code {mknod}}{191} +\entry {\code {mkstemp}}{194} +\entry {\code {mktemp}}{193} +\entry {\code {mktime}}{323} +\entry {\code {modf}}{286} +\entry {\code {mstats}}{34} \initial {N} -\entry {\code {nice}}{391} -\entry {\code {ntohl}}{284} -\entry {\code {ntohs}}{284} +\entry {\code {nice}}{337} +\entry {\code {ntohl}}{219} +\entry {\code {ntohs}}{219} \initial {O} -\entry {\code {obstack{\_}1grow}}{44} -\entry {\code {obstack{\_}1grow{\_}fast}}{46} -\entry {\code {obstack{\_}alignment{\_}mask}}{47} -\entry {\code {obstack{\_}alloc}}{40} -\entry {\code {obstack{\_}base}}{47} -\entry {\code {obstack{\_}blank}}{44} -\entry {\code {obstack{\_}blank{\_}fast}}{46} -\entry {\code {obstack{\_}chunk{\_}alloc}}{39} -\entry {\code {obstack{\_}chunk{\_}free}}{39} -\entry {\code {obstack{\_}chunk{\_}size}}{49} -\entry {\code {obstack{\_}copy}}{41} -\entry {\code {obstack{\_}copy0}}{41} -\entry {\code {obstack{\_}finish}}{44} -\entry {\code {obstack{\_}free}}{42} -\entry {\code {obstack{\_}grow}}{44} -\entry {\code {obstack{\_}grow0}}{44} -\entry {\code {obstack{\_}init}}{40} -\entry {\code {obstack{\_}next{\_}free}}{47} -\entry {\code {obstack{\_}object{\_}size}}{44, 47} -\entry {\code {obstack{\_}printf}}{158} -\entry {\code {obstack{\_}room}}{45} -\entry {\code {obstack{\_}vprintf}}{159} -\entry {\code {offsetof}}{573} -\entry {\code {on{\_}exit}}{472} -\entry {\code {open}}{199} -\entry {\code {open{\_}memstream}}{192} -\entry {\code {open{\_}obstack{\_}stream}}{194} -\entry {\code {opendir}}{232} +\entry {\code {obstack{\_}1grow}}{40} +\entry {\code {obstack{\_}1grow{\_}fast}}{41} +\entry {\code {obstack{\_}alignment{\_}mask}}{43} +\entry {\code {obstack{\_}alloc}}{37} +\entry {\code {obstack{\_}base}}{42} +\entry {\code {obstack{\_}blank}}{40} +\entry {\code {obstack{\_}blank{\_}fast}}{41} +\entry {\code {obstack{\_}chunk{\_}alloc}}{36} +\entry {\code {obstack{\_}chunk{\_}free}}{36} +\entry {\code {obstack{\_}chunk{\_}size}}{44} +\entry {\code {obstack{\_}copy}}{37} +\entry {\code {obstack{\_}copy0}}{38} +\entry {\code {obstack{\_}finish}}{40} +\entry {\code {obstack{\_}free}}{38} +\entry {\code {obstack{\_}grow}}{40} +\entry {\code {obstack{\_}grow0}}{40} +\entry {\code {obstack{\_}init}}{37} +\entry {\code {obstack{\_}next{\_}free}}{43} +\entry {\code {obstack{\_}object{\_}size}}{40, 43} +\entry {\code {obstack{\_}printf}}{102} +\entry {\code {obstack{\_}room}}{41} +\entry {\code {obstack{\_}vprintf}}{103} +\entry {\code {offsetof}}{528} +\entry {\code {on{\_}exit}}{433} +\entry {\code {open}}{137} +\entry {\code {open{\_}memstream}}{132} +\entry {\code {open{\_}obstack{\_}stream}}{133} +\entry {\code {opendir}}{168} \initial {P} -\entry {\code {parse{\_}printf{\_}format}}{160} -\entry {\code {pathconf}}{549} -\entry {\code {pause}}{449} -\entry {\code {pclose}}{262} -\entry {\code {perror}}{23} -\entry {\code {pipe}}{259} -\entry {\code {popen}}{261} -\entry {\code {pow}}{349} -\entry {\code {printf}}{155} -\entry {\code {psignal}}{412} -\entry {\code {putc}}{139} -\entry {\code {putchar}}{139} -\entry {\code {putenv}}{467} -\entry {\code {putpwent}}{527} -\entry {\code {puts}}{140} -\entry {\code {putw}}{140} +\entry {\code {parse{\_}printf{\_}format}}{104} +\entry {\code {pathconf}}{506} +\entry {\code {pause}}{411} +\entry {\code {pclose}}{198} +\entry {\code {perror}}{22} +\entry {\code {pipe}}{195} +\entry {\code {popen}}{197} +\entry {\code {pow}}{278} +\entry {\code {printf}}{100} +\entry {\code {psignal}}{377} +\entry {\code {putc}}{85} +\entry {\code {putchar}}{85} +\entry {\code {putenv}}{429} +\entry {\code {putpwent}}{486} +\entry {\code {puts}}{86} +\entry {\code {putw}}{86} \initial {Q} -\entry {\code {qsort}}{104} +\entry {\code {qsort}}{294} \initial {R} -\entry {\code {r{\_}alloc}}{54} -\entry {\code {r{\_}alloc{\_}free}}{55} -\entry {\code {r{\_}re{\_}alloc}}{55} -\entry {\code {raise}}{435} -\entry {\code {rand}}{351} -\entry {\code {random}}{352} -\entry {\code {read}}{202} -\entry {\code {readdir}}{233} -\entry {\code {readlink}}{237} -\entry {\code {realloc}}{32} -\entry {\code {recv}}{296} -\entry {\code {recvfrom}}{306} -\entry {\code {regcomp}}{114} -\entry {\code {regerror}}{119} -\entry {\code {regexec}}{116} -\entry {\code {regfree}}{119} -\entry {\code {register{\_}printf{\_}function}}{164} -\entry {\code {remove}}{239} -\entry {\code {rename}}{240} -\entry {\code {rewind}}{183} -\entry {\code {rewinddir}}{234} -\entry {\code {rint}}{359} -\entry {\code {rmdir}}{239} +\entry {\code {r{\_}alloc}}{50} +\entry {\code {r{\_}alloc{\_}free}}{50} +\entry {\code {r{\_}re{\_}alloc}}{50} +\entry {\code {raise}}{398} +\entry {\code {rand}}{280} +\entry {\code {random}}{281} +\entry {\code {read}}{140} +\entry {\code {readdir}}{168} +\entry {\code {readlink}}{172} +\entry {\code {realloc}}{29} +\entry {\code {recv}}{230} +\entry {\code {recvfrom}}{239} +\entry {\code {regcomp}}{304} +\entry {\code {regerror}}{309} +\entry {\code {regexec}}{306} +\entry {\code {regfree}}{309} +\entry {\code {register{\_}printf{\_}function}}{108} +\entry {\code {remove}}{174} +\entry {\code {rename}}{174} +\entry {\code {rewind}}{125} +\entry {\code {rewinddir}}{170} +\entry {\code {rindex}}{69} +\entry {\code {rint}}{286} +\entry {\code {rmdir}}{174} \initial {S} -\entry {\code {S{\_}ISBLK}}{246} -\entry {\code {S{\_}ISCHR}}{246} -\entry {\code {S{\_}ISDIR}}{246} -\entry {\code {S{\_}ISFIFO}}{246} -\entry {\code {S{\_}ISLNK}}{246} -\entry {\code {S{\_}ISREG}}{246} -\entry {\code {S{\_}ISSOCK}}{247} -\entry {\code {scalb}}{358} -\entry {\code {scanf}}{177} -\entry {\code {seekdir}}{235} -\entry {\code {select}}{212} -\entry {\code {send}}{295} -\entry {\code {sendto}}{305} -\entry {\code {setbuf}}{188} -\entry {\code {setbuffer}}{189} -\entry {\code {setgid}}{518} -\entry {\code {setgrent}}{529} -\entry {\code {setgroups}}{519} -\entry {\code {sethostent}}{280} -\entry {\code {sethostid}}{534} -\entry {\code {sethostname}}{533} -\entry {\code {setitimer}}{383} -\entry {\code {setjmp}}{395} -\entry {\code {setlinebuf}}{189} -\entry {\code {setlocale}}{95} -\entry {\code {setnetent}}{316} -\entry {\code {setpgid}}{510} -\entry {\code {setpgrp}}{511} -\entry {\code {setpriority}}{390} -\entry {\code {setprotoent}}{286} -\entry {\code {setpwent}}{527} -\entry {\code {setregid}}{518} -\entry {\code {setreuid}}{517} -\entry {\code {setrlimit}}{388} -\entry {\code {setservent}}{283} -\entry {\code {setsid}}{509} -\entry {\code {setsockopt}}{313} -\entry {\code {setstate}}{352} -\entry {\code {settimeofday}}{373} -\entry {\code {setuid}}{517} -\entry {\code {setvbuf}}{187} -\entry {\code {shutdown}}{289} -\entry {\code {sigaction}}{416} -\entry {\code {sigaddset}}{442} -\entry {\code {sigblock}}{454} -\entry {\code {sigdelset}}{442} -\entry {\code {sigemptyset}}{441} -\entry {\code {sigfillset}}{441} -\entry {\code {siginterrupt}}{454} -\entry {\code {sigismember}}{442} -\entry {\code {siglongjmp}}{396} -\entry {\code {sigmask}}{454} -\entry {\code {signal}}{413} -\entry {\code {sigpause}}{454} -\entry {\code {sigpending}}{446} -\entry {\code {sigprocmask}}{442} -\entry {\code {sigsetjmp}}{396} -\entry {\code {sigsetmask}}{454} -\entry {\code {sigstack}}{455} -\entry {\code {sigsuspend}}{451} -\entry {\code {sigvec}}{454} -\entry {\code {sin}}{346} -\entry {\code {sinh}}{350} -\entry {\code {sleep}}{385} -\entry {\code {snprintf}}{156} -\entry {\code {socket}}{288} -\entry {\code {socketpair}}{290} -\entry {\code {sprintf}}{155} -\entry {\code {sqrt}}{349} -\entry {\code {srand}}{351} -\entry {\code {srandom}}{352} -\entry {\code {sscanf}}{177} -\entry {\code {ssignal}}{415} -\entry {\code {stat}}{245} -\entry {\code {stpcpy}}{65} -\entry {\code {strcasecmp}}{69} -\entry {\code {strcat}}{66} -\entry {\code {strchr}}{74} -\entry {\code {strcmp}}{69} -\entry {\code {strcoll}}{71} -\entry {\code {strcpy}}{65} -\entry {\code {strcspn}}{75} -\entry {\code {strdup}}{65} -\entry {\code {strerror}}{23} -\entry {\code {strftime}}{377} -\entry {\code {strlen}}{63} -\entry {\code {strncasecmp}}{69} -\entry {\code {strncat}}{66} -\entry {\code {strncmp}}{69} -\entry {\code {strncpy}}{65} -\entry {\code {strpbrk}}{75} -\entry {\code {strrchr}}{74} -\entry {\code {strsignal}}{412} -\entry {\code {strspn}}{75} -\entry {\code {strstr}}{74} -\entry {\code {strtod}}{364} -\entry {\code {strtok}}{76} -\entry {\code {strtol}}{362} -\entry {\code {strtoul}}{363} -\entry {\code {strxfrm}}{71} -\entry {\code {symlink}}{237} -\entry {\code {sysconf}}{541} -\entry {\code {system}}{475} +\entry {\code {S{\_}ISBLK}}{181} +\entry {\code {S{\_}ISCHR}}{181} +\entry {\code {S{\_}ISDIR}}{181} +\entry {\code {S{\_}ISFIFO}}{181} +\entry {\code {S{\_}ISLNK}}{181} +\entry {\code {S{\_}ISREG}}{181} +\entry {\code {S{\_}ISSOCK}}{181} +\entry {\code {scalb}}{285} +\entry {\code {scanf}}{119} +\entry {\code {seekdir}}{170} +\entry {\code {select}}{150} +\entry {\code {send}}{229} +\entry {\code {sendto}}{239} +\entry {\code {setbuf}}{130} +\entry {\code {setbuffer}}{130} +\entry {\code {setgid}}{477} +\entry {\code {setgrent}}{488} +\entry {\code {setgroups}}{478} +\entry {\code {sethostent}}{215} +\entry {\code {sethostid}}{492} +\entry {\code {sethostname}}{491} +\entry {\code {setitimer}}{330} +\entry {\code {setjmp}}{363} +\entry {\code {setlinebuf}}{130} +\entry {\code {setlocale}}{353} +\entry {\code {setnetent}}{248} +\entry {\code {setpgid}}{469} +\entry {\code {setpgrp}}{469} +\entry {\code {setpriority}}{336} +\entry {\code {setprotoent}}{220} +\entry {\code {setpwent}}{485} +\entry {\code {setregid}}{478} +\entry {\code {setreuid}}{477} +\entry {\code {setrlimit}}{334} +\entry {\code {setservent}}{218} +\entry {\code {setsid}}{468} +\entry {\code {setsockopt}}{245} +\entry {\code {setstate}}{281} +\entry {\code {settimeofday}}{320} +\entry {\code {setuid}}{476} +\entry {\code {setvbuf}}{129} +\entry {\code {shutdown}}{223} +\entry {\code {sigaction}}{380} +\entry {\code {sigaddset}}{404} +\entry {\code {sigaltstack}}{417} +\entry {\code {sigblock}}{415} +\entry {\code {sigdelset}}{404} +\entry {\code {sigemptyset}}{404} +\entry {\code {sigfillset}}{404} +\entry {\code {siginterrupt}}{415} +\entry {\code {sigismember}}{404} +\entry {\code {siglongjmp}}{364} +\entry {\code {sigmask}}{415} +\entry {\code {signal}}{378} +\entry {\code {sigpause}}{416} +\entry {\code {sigpending}}{408} +\entry {\code {sigprocmask}}{405} +\entry {\code {sigsetjmp}}{364} +\entry {\code {sigsetmask}}{415} +\entry {\code {sigstack}}{418} +\entry {\code {sigsuspend}}{412} +\entry {\code {sigvec}}{415} +\entry {\code {sin}}{276} +\entry {\code {sinh}}{279} +\entry {\code {sleep}}{331} +\entry {\code {snprintf}}{100} +\entry {\code {socket}}{222} +\entry {\code {socketpair}}{224} +\entry {\code {sprintf}}{100} +\entry {\code {sqrt}}{278} +\entry {\code {srand}}{281} +\entry {\code {srandom}}{281} +\entry {\code {sscanf}}{120} +\entry {\code {ssignal}}{380} +\entry {\code {stat}}{180} +\entry {\code {stpcpy}}{61} +\entry {\code {strcasecmp}}{64} +\entry {\code {strcat}}{62} +\entry {\code {strchr}}{68} +\entry {\code {strcmp}}{64} +\entry {\code {strcoll}}{66} +\entry {\code {strcpy}}{60} +\entry {\code {strcspn}}{70} +\entry {\code {strdup}}{61} +\entry {\code {strerror}}{22} +\entry {\code {strftime}}{324} +\entry {\code {strlen}}{59} +\entry {\code {strncasecmp}}{64} +\entry {\code {strncat}}{62} +\entry {\code {strncmp}}{65} +\entry {\code {strncpy}}{60} +\entry {\code {strpbrk}}{70} +\entry {\code {strrchr}}{69} +\entry {\code {strsignal}}{377} +\entry {\code {strspn}}{70} +\entry {\code {strstr}}{69} +\entry {\code {strtod}}{291} +\entry {\code {strtok}}{71} +\entry {\code {strtol}}{289} +\entry {\code {strtoul}}{289} +\entry {\code {strxfrm}}{66} +\entry {\code {symlink}}{172} +\entry {\code {sysconf}}{499} +\entry {\code {system}}{437} \initial {T} -\entry {\code {tan}}{347} -\entry {\code {tanh}}{350} -\entry {\code {tcdrain}}{339} -\entry {\code {tcflow}}{340} -\entry {\code {tcflush}}{340} -\entry {\code {tcgetattr}}{320} -\entry {\code {tcgetpgrp}}{511} -\entry {\code {tcsendbreak}}{339} -\entry {\code {tcsetattr}}{321} -\entry {\code {tcsetpgrp}}{512} -\entry {\code {telldir}}{234} -\entry {\code {TEMP{\_}FAILURE{\_}RETRY}}{433} -\entry {\code {tempnam}}{190} -\entry {\code {time}}{371} -\entry {\code {times}}{369} -\entry {\code {tmpfile}}{189} -\entry {\code {tmpnam}}{189} -\entry {\code {toascii}}{60} -\entry {\code {tolower}}{60} -\entry {\code {toupper}}{60} -\entry {\code {ttyname}}{317} -\entry {\code {tzset}}{381} +\entry {\code {tan}}{276} +\entry {\code {tanh}}{279} +\entry {\code {tcdrain}}{270} +\entry {\code {tcflow}}{271} +\entry {\code {tcflush}}{270} +\entry {\code {tcgetattr}}{252} +\entry {\code {tcgetpgrp}}{470} +\entry {\code {tcsendbreak}}{270} +\entry {\code {tcsetattr}}{252} +\entry {\code {tcsetpgrp}}{470} +\entry {\code {telldir}}{170} +\entry {\code {TEMP{\_}FAILURE{\_}RETRY}}{397} +\entry {\code {tempnam}}{193} +\entry {\code {time}}{318} +\entry {\code {times}}{317} +\entry {\code {tmpfile}}{192} +\entry {\code {tmpnam}}{192} +\entry {\code {toascii}}{55} +\entry {\code {tolower}}{55} +\entry {\code {toupper}}{55} +\entry {\code {ttyname}}{249} +\entry {\code {tzset}}{328} \initial {U} -\entry {\code {umask}}{252} -\entry {\code {uname}}{535} -\entry {\code {ungetc}}{145} -\entry {\code {unlink}}{238} -\entry {\code {utime}}{256} -\entry {\code {utimes}}{257} +\entry {\code {umask}}{186} +\entry {\code {uname}}{493} +\entry {\code {ungetc}}{90} +\entry {\code {unlink}}{173} +\entry {\code {utime}}{190} +\entry {\code {utimes}}{191} \initial {V} -\entry {\code {va{\_}alist}}{563} -\entry {\code {va{\_}arg}}{561} -\entry {\code {va{\_}dcl}}{563} -\entry {\code {va{\_}end}}{561} -\entry {\code {va{\_}start}}{561, 563} -\entry {\code {valloc}}{34} -\entry {\code {vasprintf}}{159} -\entry {\code {vfork}}{478} -\entry {\code {vfprintf}}{159} -\entry {\code {vfscanf}}{178} -\entry {\code {vprintf}}{159} -\entry {\code {vscanf}}{178} -\entry {\code {vsnprintf}}{159} -\entry {\code {vsprintf}}{159} -\entry {\code {vsscanf}}{178} +\entry {\code {va{\_}alist}}{518} +\entry {\code {va{\_}arg}}{516} +\entry {\code {va{\_}dcl}}{518} +\entry {\code {va{\_}end}}{517} +\entry {\code {va{\_}start}}{516, 518} +\entry {\code {valloc}}{31} +\entry {\code {vasprintf}}{103} +\entry {\code {vfork}}{440} +\entry {\code {vfprintf}}{103} +\entry {\code {vfscanf}}{120} +\entry {\code {vprintf}}{103} +\entry {\code {vscanf}}{120} +\entry {\code {vsnprintf}}{103} +\entry {\code {vsprintf}}{103} +\entry {\code {vsscanf}}{120} \initial {W} -\entry {\code {wait}}{483} -\entry {\code {wait3}}{486} -\entry {\code {wait4}}{486} -\entry {\code {waitpid}}{482} -\entry {\code {WCOREDUMP}}{485} -\entry {\code {wcstombs}}{85} -\entry {\code {wctomb}}{87} -\entry {\code {WEXITSTATUS}}{484} -\entry {\code {WIFEXITED}}{484} -\entry {\code {WIFSIGNALED}}{484} -\entry {\code {WIFSTOPPED}}{485} -\entry {\code {wordexp}}{122} -\entry {\code {wordfree}}{123} -\entry {\code {write}}{204} -\entry {\code {WSTOPSIG}}{485} -\entry {\code {WTERMSIG}}{485} +\entry {\code {wait}}{445} +\entry {\code {wait3}}{447} +\entry {\code {wait4}}{447} +\entry {\code {waitpid}}{443} +\entry {\code {WCOREDUMP}}{446} +\entry {\code {wcstombs}}{345} +\entry {\code {wctomb}}{346} +\entry {\code {WEXITSTATUS}}{446} +\entry {\code {WIFEXITED}}{446} +\entry {\code {WIFSIGNALED}}{446} +\entry {\code {WIFSTOPPED}}{446} +\entry {\code {wordexp}}{311} +\entry {\code {wordfree}}{312} +\entry {\code {write}}{141} +\entry {\code {WSTOPSIG}}{446} +\entry {\code {WTERMSIG}}{446} diff -ruN glibc-1.06/manual/libc.pg glibc-1.07/manual/libc.pg --- glibc-1.06/manual/libc.pg Mon May 17 17:03:26 1993 +++ glibc-1.07/manual/libc.pg Wed Dec 29 18:38:49 1993 @@ -1,5 +1,5 @@ \entry {gcc}{2}{\code {gcc}} -\entry {dirent.h}{8}{\code {dirent.h}} +\entry {dirent.h}{7}{\code {dirent.h}} \entry {fcntl.h}{8}{\code {fcntl.h}} \entry {grp.h}{8}{\code {grp.h}} \entry {limits.h}{8}{\code {limits.h}} @@ -8,219 +8,223 @@ \entry {sys/stat.h}{8}{\code {sys/stat.h}} \entry {sys/times.h}{8}{\code {sys/times.h}} \entry {termios.h}{8}{\code {termios.h}} +\entry {-lbsd-compat}{9}{\code {-lbsd-compat}} +\entry {bsd-compat}{9}{\code {bsd-compat}} \entry {errno.h}{13}{\code {errno.h}} \entry {errno.h}{13}{\code {errno.h}} \entry {errno.h}{14}{\code {errno.h}} -\entry {errno.h}{15}{\code {errno.h}} +\entry {errno.h}{14}{\code {errno.h}} +\entry {stdlib.h}{26}{\code {stdlib.h}} +\entry {stdlib.h}{28}{\code {stdlib.h}} \entry {stdlib.h}{29}{\code {stdlib.h}} \entry {stdlib.h}{30}{\code {stdlib.h}} -\entry {stdlib.h}{32}{\code {stdlib.h}} -\entry {stdlib.h}{33}{\code {stdlib.h}} -\entry {stdlib.h}{34}{\code {stdlib.h}} -\entry {malloc.h}{34}{\code {malloc.h}} -\entry {malloc.h}{35}{\code {malloc.h}} -\entry {malloc.h}{36}{\code {malloc.h}} -\entry {obstack.h}{38}{\code {obstack.h}} -\entry {stdlib.h}{51}{\code {stdlib.h}} -\entry {malloc.h}{54}{\code {malloc.h}} -\entry {malloc.c}{55}{\code {malloc.c}} -\entry {ctype.h}{57}{\code {ctype.h}} -\entry {ctype.h}{57}{\code {ctype.h}} -\entry {ctype.h}{59}{\code {ctype.h}} -\entry {string.h}{63}{\code {string.h}} +\entry {stdlib.h}{31}{\code {stdlib.h}} +\entry {malloc.h}{32}{\code {malloc.h}} +\entry {malloc.h}{32}{\code {malloc.h}} +\entry {malloc.h}{33}{\code {malloc.h}} +\entry {obstack.h}{35}{\code {obstack.h}} +\entry {stdlib.h}{47}{\code {stdlib.h}} +\entry {malloc.h}{50}{\code {malloc.h}} +\entry {malloc.c}{50}{\code {malloc.c}} +\entry {ctype.h}{53}{\code {ctype.h}} +\entry {ctype.h}{53}{\code {ctype.h}} +\entry {ctype.h}{55}{\code {ctype.h}} +\entry {string.h}{59}{\code {string.h}} +\entry {string.h}{59}{\code {string.h}} \entry {string.h}{63}{\code {string.h}} +\entry {string.h}{65}{\code {string.h}} \entry {string.h}{68}{\code {string.h}} -\entry {string.h}{70}{\code {string.h}} -\entry {string.h}{73}{\code {string.h}} -\entry {string.h}{76}{\code {string.h}} -\entry {limits.h}{83}{\code {limits.h}} -\entry {stdlib.h}{83}{\code {stdlib.h}} -\entry {stddef.h}{84}{\code {stddef.h}} -\entry {stdlib.h}{84}{\code {stdlib.h}} -\entry {stdlib.h}{86}{\code {stdlib.h}} -\entry {stdlib.h}{86}{\code {stdlib.h}} -\entry {locale.h}{95}{\code {locale.h}} -\entry {locale.h}{98}{\code {locale.h}} -\entry {stdlib.h}{104}{\code {stdlib.h}} -\entry {stdlib.h}{104}{\code {stdlib.h}} -\entry {fnmatch.h}{109}{\code {fnmatch.h}} -\entry {stdio.h}{135}{\code {stdio.h}} +\entry {string.h}{71}{\code {string.h}} +\entry {stdio.h}{81}{\code {stdio.h}} +\entry {stdio.h}{81}{\code {stdio.h}} +\entry {stdio.h}{82}{\code {stdio.h}} +\entry {stdio.h}{85}{\code {stdio.h}} +\entry {stdio.h}{86}{\code {stdio.h}} +\entry {stdio.h}{100}{\code {stdio.h}} +\entry {stdio.h}{103}{\code {stdio.h}} +\entry {printf.h}{108}{\code {printf.h}} +\entry {printf.h}{108}{\code {printf.h}} +\entry {stdio.h}{119}{\code {stdio.h}} +\entry {stdio.h}{121}{\code {stdio.h}} +\entry {stdio.h}{122}{\code {stdio.h}} +\entry {stdio.h}{124}{\code {stdio.h}} +\entry {stdio.h}{126}{\code {stdio.h}} +\entry {stdio.h}{128}{\code {stdio.h}} +\entry {stdio.h}{129}{\code {stdio.h}} +\entry {stdio.h}{131}{\code {stdio.h}} \entry {stdio.h}{135}{\code {stdio.h}} -\entry {stdio.h}{136}{\code {stdio.h}} -\entry {stdio.h}{139}{\code {stdio.h}} -\entry {stdio.h}{140}{\code {stdio.h}} -\entry {stdio.h}{155}{\code {stdio.h}} -\entry {stdio.h}{158}{\code {stdio.h}} -\entry {printf.h}{164}{\code {printf.h}} -\entry {printf.h}{165}{\code {printf.h}} -\entry {stdio.h}{176}{\code {stdio.h}} -\entry {stdio.h}{178}{\code {stdio.h}} -\entry {stdio.h}{179}{\code {stdio.h}} -\entry {stdio.h}{181}{\code {stdio.h}} -\entry {stdio.h}{183}{\code {stdio.h}} -\entry {stdio.h}{186}{\code {stdio.h}} -\entry {stdio.h}{186}{\code {stdio.h}} -\entry {stdio.h}{189}{\code {stdio.h}} -\entry {stdio.h}{191}{\code {stdio.h}} -\entry {stdio.h}{195}{\code {stdio.h}} -\entry {unistd.h}{199}{\code {unistd.h}} -\entry {fcntl.h}{199}{\code {fcntl.h}} -\entry {unistd.h}{202}{\code {unistd.h}} -\entry {stdio.h}{207}{\code {stdio.h}} -\entry {unistd.h}{208}{\code {unistd.h}} -\entry {sys/types.h}{211}{\code {sys/types.h}} -\entry {fcntl.h}{214}{\code {fcntl.h}} -\entry {unistd.h}{216}{\code {unistd.h}} -\entry {fcntl.h}{216}{\code {fcntl.h}} -\entry {fcntl.h}{218}{\code {fcntl.h}} -\entry {fcntl.h}{220}{\code {fcntl.h}} -\entry {fcntl.h}{223}{\code {fcntl.h}} -\entry {fcntl.h}{226}{\code {fcntl.h}} -\entry {cd}{229}{\code {cd}} -\entry {unistd.h}{229}{\code {unistd.h}} -\entry {dirent.h}{231}{\code {dirent.h}} -\entry {dirent.h}{232}{\code {dirent.h}} -\entry {dirent.h}{233}{\code {dirent.h}} -\entry {dirent.h}{234}{\code {dirent.h}} -\entry {unistd.h}{235}{\code {unistd.h}} -\entry {unistd.h}{237}{\code {unistd.h}} -\entry {unistd.h}{238}{\code {unistd.h}} -\entry {stdio.h}{239}{\code {stdio.h}} -\entry {unistd.h}{239}{\code {unistd.h}} -\entry {mkdir}{241}{\code {mkdir}} -\entry {sys/stat.h}{242}{\code {sys/stat.h}} -\entry {ls}{242}{\code {ls}} -\entry {sys/stat.h}{242}{\code {sys/stat.h}} -\entry {sys/stat.h}{246}{\code {sys/stat.h}} -\entry {chown}{248}{\code {chown}} -\entry {chgrp}{248}{\code {chgrp}} -\entry {unistd.h}{248}{\code {unistd.h}} -\entry {sys/stat.h}{249}{\code {sys/stat.h}} -\entry {chmod}{251}{\code {chmod}} -\entry {umask}{251}{\code {umask}} -\entry {sys/stat.h}{252}{\code {sys/stat.h}} -\entry {unistd.h}{254}{\code {unistd.h}} -\entry {unistd.h}{255}{\code {unistd.h}} -\entry {time.h}{255}{\code {time.h}} -\entry {utime.h}{256}{\code {utime.h}} -\entry {sys/time.h}{257}{\code {sys/time.h}} -\entry {sys/stat.h}{257}{\code {sys/stat.h}} -\entry {unistd.h}{259}{\code {unistd.h}} -\entry {sys/stat.h}{263}{\code {sys/stat.h}} -\entry {sys/socket.h}{266}{\code {sys/socket.h}} -\entry {sys/socket.h}{268}{\code {sys/socket.h}} -\entry {sys/socket.h}{269}{\code {sys/socket.h}} -\entry {sys/socket.h}{270}{\code {sys/socket.h}} -\entry {sys/socket.h}{272}{\code {sys/socket.h}} -\entry {sys/un.h}{272}{\code {sys/un.h}} -\entry {sys/socket.h}{274}{\code {sys/socket.h}} -\entry {netinet/in.h}{275}{\code {netinet/in.h}} -\entry {netinet/in.h}{277}{\code {netinet/in.h}} -\entry {arpa/inet.h}{277}{\code {arpa/inet.h}} -\entry {/etc/hosts}{278}{\code {/etc/hosts}} -\entry {netdb.h}{278}{\code {netdb.h}} -\entry {netinet/in.h}{281}{\code {netinet/in.h}} -\entry {/etc/services}{282}{\code {/etc/services}} -\entry {netdb.h}{282}{\code {netdb.h}} -\entry {netinet/in.h}{284}{\code {netinet/in.h}} -\entry {/etc/protocols}{284}{\code {/etc/protocols}} -\entry {netdb.h}{285}{\code {netdb.h}} -\entry {sys/socket.h}{288}{\code {sys/socket.h}} -\entry {sys/socket.h}{289}{\code {sys/socket.h}} -\entry {sys/socket.h}{290}{\code {sys/socket.h}} -\entry {sys/socket.h}{295}{\code {sys/socket.h}} -\entry {sys/socket.h}{296}{\code {sys/socket.h}} -\entry {sys/socket.h}{297}{\code {sys/socket.h}} -\entry {sys/socket.h}{305}{\code {sys/socket.h}} -\entry {sys/socket.h}{312}{\code {sys/socket.h}} -\entry {sys/socket.h}{313}{\code {sys/socket.h}} -\entry {/etc/networks}{314}{\code {/etc/networks}} -\entry {netdb.h}{314}{\code {netdb.h}} -\entry {unistd.h}{317}{\code {unistd.h}} -\entry {termios.h}{319}{\code {termios.h}} -\entry {math.h}{345}{\code {math.h}} -\entry {stdlib.h}{351}{\code {stdlib.h}} -\entry {stdlib.h}{352}{\code {stdlib.h}} -\entry {math.h}{355}{\code {math.h}} -\entry {math.h}{356}{\code {math.h}} -\entry {stdlib.h}{356}{\code {stdlib.h}} -\entry {math.h}{357}{\code {math.h}} -\entry {math.h}{359}{\code {math.h}} -\entry {stdlib.h}{360}{\code {stdlib.h}} -\entry {stdlib.h}{362}{\code {stdlib.h}} -\entry {stdlib.h}{364}{\code {stdlib.h}} -\entry {time.h}{367}{\code {time.h}} -\entry {sys/times.h}{369}{\code {sys/times.h}} -\entry {time.h}{370}{\code {time.h}} -\entry {sys/time.h}{371}{\code {sys/time.h}} -\entry {time.h}{376}{\code {time.h}} -\entry {time.h}{378}{\code {time.h}} -\entry {unistd.h}{383}{\code {unistd.h}} -\entry {sys/time.h}{383}{\code {sys/time.h}} -\entry {sys/resource.h}{386}{\code {sys/resource.h}} -\entry {sys/resource.h}{387}{\code {sys/resource.h}} -\entry {sys/resource.h}{389}{\code {sys/resource.h}} -\entry {setjmp.h}{395}{\code {setjmp.h}} -\entry {setjmp.h}{396}{\code {setjmp.h}} -\entry {signal.h}{402}{\code {signal.h}} -\entry {kill}{406}{\code {kill}} -\entry {string.h}{411}{\code {string.h}} -\entry {stdio.h}{412}{\code {stdio.h}} -\entry {signal.h}{412}{\code {signal.h}} -\entry {signal.h}{415}{\code {signal.h}} -\entry {signal.h}{418}{\code {signal.h}} -\entry {signal.h}{434}{\code {signal.h}} -\entry {signal.h}{436}{\code {signal.h}} -\entry {signal.h}{441}{\code {signal.h}} -\entry {signal.h}{442}{\code {signal.h}} -\entry {signal.h}{446}{\code {signal.h}} -\entry {signal.h}{453}{\code {signal.h}} -\entry {unistd.h}{459}{\code {unistd.h}} -\entry {stdlib.h}{467}{\code {stdlib.h}} -\entry {stdlib.h}{471}{\code {stdlib.h}} -\entry {stdlib.h}{473}{\code {stdlib.h}} -\entry {unistd.h}{473}{\code {unistd.h}} -\entry {sh}{475}{\code {sh}} -\entry {stdlib.h}{475}{\code {stdlib.h}} -\entry {sys/types.h}{477}{\code {sys/types.h}} -\entry {unistd.h}{477}{\code {unistd.h}} +\entry {unistd.h}{137}{\code {unistd.h}} +\entry {fcntl.h}{137}{\code {fcntl.h}} +\entry {unistd.h}{140}{\code {unistd.h}} +\entry {stdio.h}{145}{\code {stdio.h}} +\entry {unistd.h}{146}{\code {unistd.h}} +\entry {sys/types.h}{149}{\code {sys/types.h}} +\entry {fcntl.h}{152}{\code {fcntl.h}} +\entry {unistd.h}{153}{\code {unistd.h}} +\entry {fcntl.h}{153}{\code {fcntl.h}} +\entry {fcntl.h}{155}{\code {fcntl.h}} +\entry {fcntl.h}{156}{\code {fcntl.h}} +\entry {fcntl.h}{159}{\code {fcntl.h}} +\entry {fcntl.h}{162}{\code {fcntl.h}} +\entry {cd}{165}{\code {cd}} +\entry {unistd.h}{165}{\code {unistd.h}} +\entry {dirent.h}{167}{\code {dirent.h}} +\entry {dirent.h}{168}{\code {dirent.h}} +\entry {dirent.h}{168}{\code {dirent.h}} +\entry {dirent.h}{170}{\code {dirent.h}} +\entry {unistd.h}{170}{\code {unistd.h}} +\entry {unistd.h}{172}{\code {unistd.h}} +\entry {unistd.h}{173}{\code {unistd.h}} +\entry {stdio.h}{174}{\code {stdio.h}} +\entry {unistd.h}{174}{\code {unistd.h}} +\entry {mkdir}{176}{\code {mkdir}} +\entry {sys/stat.h}{177}{\code {sys/stat.h}} +\entry {ls}{177}{\code {ls}} +\entry {sys/stat.h}{177}{\code {sys/stat.h}} +\entry {sys/stat.h}{181}{\code {sys/stat.h}} +\entry {chown}{182}{\code {chown}} +\entry {chgrp}{182}{\code {chgrp}} +\entry {unistd.h}{183}{\code {unistd.h}} +\entry {sys/stat.h}{184}{\code {sys/stat.h}} +\entry {chmod}{186}{\code {chmod}} +\entry {umask}{186}{\code {umask}} +\entry {sys/stat.h}{186}{\code {sys/stat.h}} +\entry {unistd.h}{188}{\code {unistd.h}} +\entry {unistd.h}{189}{\code {unistd.h}} +\entry {time.h}{189}{\code {time.h}} +\entry {utime.h}{190}{\code {utime.h}} +\entry {sys/time.h}{191}{\code {sys/time.h}} +\entry {sys/stat.h}{191}{\code {sys/stat.h}} +\entry {stdio.h}{192}{\code {stdio.h}} +\entry {unistd.h}{195}{\code {unistd.h}} +\entry {sys/stat.h}{199}{\code {sys/stat.h}} +\entry {sys/socket.h}{202}{\code {sys/socket.h}} +\entry {sys/socket.h}{204}{\code {sys/socket.h}} +\entry {sys/socket.h}{205}{\code {sys/socket.h}} +\entry {sys/socket.h}{206}{\code {sys/socket.h}} +\entry {sys/socket.h}{207}{\code {sys/socket.h}} +\entry {sys/un.h}{207}{\code {sys/un.h}} +\entry {sys/socket.h}{209}{\code {sys/socket.h}} +\entry {netinet/in.h}{210}{\code {netinet/in.h}} +\entry {netinet/in.h}{212}{\code {netinet/in.h}} +\entry {arpa/inet.h}{212}{\code {arpa/inet.h}} +\entry {/etc/hosts}{213}{\code {/etc/hosts}} +\entry {netdb.h}{213}{\code {netdb.h}} +\entry {netinet/in.h}{216}{\code {netinet/in.h}} +\entry {/etc/services}{217}{\code {/etc/services}} +\entry {netdb.h}{217}{\code {netdb.h}} +\entry {netinet/in.h}{218}{\code {netinet/in.h}} +\entry {/etc/protocols}{219}{\code {/etc/protocols}} +\entry {netdb.h}{219}{\code {netdb.h}} +\entry {sys/socket.h}{222}{\code {sys/socket.h}} +\entry {sys/socket.h}{223}{\code {sys/socket.h}} +\entry {sys/socket.h}{224}{\code {sys/socket.h}} +\entry {sys/socket.h}{229}{\code {sys/socket.h}} +\entry {sys/socket.h}{230}{\code {sys/socket.h}} +\entry {sys/socket.h}{231}{\code {sys/socket.h}} +\entry {sys/socket.h}{239}{\code {sys/socket.h}} +\entry {sys/socket.h}{244}{\code {sys/socket.h}} +\entry {sys/socket.h}{245}{\code {sys/socket.h}} +\entry {/etc/networks}{247}{\code {/etc/networks}} +\entry {netdb.h}{247}{\code {netdb.h}} +\entry {unistd.h}{249}{\code {unistd.h}} +\entry {termios.h}{251}{\code {termios.h}} +\entry {math.h}{275}{\code {math.h}} +\entry {stdlib.h}{280}{\code {stdlib.h}} +\entry {stdlib.h}{281}{\code {stdlib.h}} +\entry {math.h}{283}{\code {math.h}} +\entry {math.h}{284}{\code {math.h}} +\entry {stdlib.h}{284}{\code {stdlib.h}} +\entry {math.h}{285}{\code {math.h}} +\entry {math.h}{286}{\code {math.h}} +\entry {stdlib.h}{287}{\code {stdlib.h}} +\entry {stdlib.h}{289}{\code {stdlib.h}} +\entry {stdlib.h}{290}{\code {stdlib.h}} +\entry {stdlib.h}{293}{\code {stdlib.h}} +\entry {stdlib.h}{294}{\code {stdlib.h}} +\entry {fnmatch.h}{299}{\code {fnmatch.h}} +\entry {time.h}{315}{\code {time.h}} +\entry {sys/times.h}{316}{\code {sys/times.h}} +\entry {time.h}{318}{\code {time.h}} +\entry {sys/time.h}{318}{\code {sys/time.h}} +\entry {time.h}{323}{\code {time.h}} +\entry {time.h}{326}{\code {time.h}} +\entry {unistd.h}{329}{\code {unistd.h}} +\entry {sys/time.h}{329}{\code {sys/time.h}} +\entry {sys/resource.h}{332}{\code {sys/resource.h}} +\entry {sys/resource.h}{334}{\code {sys/resource.h}} +\entry {sys/resource.h}{335}{\code {sys/resource.h}} +\entry {limits.h}{342}{\code {limits.h}} +\entry {stdlib.h}{342}{\code {stdlib.h}} +\entry {stddef.h}{343}{\code {stddef.h}} +\entry {stdlib.h}{344}{\code {stdlib.h}} +\entry {stdlib.h}{345}{\code {stdlib.h}} +\entry {stdlib.h}{346}{\code {stdlib.h}} +\entry {locale.h}{353}{\code {locale.h}} +\entry {locale.h}{355}{\code {locale.h}} +\entry {setjmp.h}{362}{\code {setjmp.h}} +\entry {setjmp.h}{364}{\code {setjmp.h}} +\entry {signal.h}{367}{\code {signal.h}} +\entry {kill}{372}{\code {kill}} +\entry {string.h}{377}{\code {string.h}} +\entry {stdio.h}{377}{\code {stdio.h}} +\entry {signal.h}{377}{\code {signal.h}} +\entry {signal.h}{380}{\code {signal.h}} +\entry {signal.h}{383}{\code {signal.h}} +\entry {signal.h}{398}{\code {signal.h}} +\entry {signal.h}{399}{\code {signal.h}} +\entry {signal.h}{403}{\code {signal.h}} +\entry {signal.h}{405}{\code {signal.h}} +\entry {signal.h}{408}{\code {signal.h}} +\entry {signal.h}{414}{\code {signal.h}} +\entry {unistd.h}{421}{\code {unistd.h}} +\entry {stdlib.h}{428}{\code {stdlib.h}} +\entry {stdlib.h}{432}{\code {stdlib.h}} +\entry {stdlib.h}{434}{\code {stdlib.h}} +\entry {unistd.h}{434}{\code {unistd.h}} +\entry {sh}{437}{\code {sh}} +\entry {stdlib.h}{437}{\code {stdlib.h}} +\entry {sys/types.h}{438}{\code {sys/types.h}} +\entry {unistd.h}{438}{\code {unistd.h}} +\entry {unistd.h}{439}{\code {unistd.h}} +\entry {unistd.h}{440}{\code {unistd.h}} +\entry {sys/wait.h}{443}{\code {sys/wait.h}} +\entry {sys/wait.h}{446}{\code {sys/wait.h}} +\entry {sys/wait.h}{447}{\code {sys/wait.h}} +\entry {stdio.h}{467}{\code {stdio.h}} +\entry {unistd.h}{468}{\code {unistd.h}} +\entry {sys/types.h}{468}{\code {sys/types.h}} +\entry {-lbsd-compat}{469}{\code {-lbsd-compat}} +\entry {bsd-compat}{469}{\code {bsd-compat}} +\entry {unistd.h}{470}{\code {unistd.h}} +\entry {sys/types.h}{470}{\code {sys/types.h}} +\entry {unistd.h}{475}{\code {unistd.h}} +\entry {sys/types.h}{475}{\code {sys/types.h}} +\entry {unistd.h}{476}{\code {unistd.h}} +\entry {sys/types.h}{476}{\code {sys/types.h}} \entry {unistd.h}{477}{\code {unistd.h}} -\entry {unistd.h}{479}{\code {unistd.h}} -\entry {sys/wait.h}{482}{\code {sys/wait.h}} -\entry {sys/wait.h}{484}{\code {sys/wait.h}} -\entry {sys/wait.h}{485}{\code {sys/wait.h}} -\entry {stdio.h}{509}{\code {stdio.h}} -\entry {unistd.h}{509}{\code {unistd.h}} -\entry {sys/types.h}{509}{\code {sys/types.h}} -\entry {unistd.h}{511}{\code {unistd.h}} -\entry {sys/types.h}{511}{\code {sys/types.h}} -\entry {unistd.h}{515}{\code {unistd.h}} -\entry {sys/types.h}{515}{\code {sys/types.h}} -\entry {unistd.h}{517}{\code {unistd.h}} -\entry {sys/types.h}{517}{\code {sys/types.h}} -\entry {unistd.h}{518}{\code {unistd.h}} -\entry {sys/types.h}{518}{\code {sys/types.h}} -\entry {grp.h}{519}{\code {grp.h}} -\entry {stdio.h}{524}{\code {stdio.h}} -\entry {unistd.h}{524}{\code {unistd.h}} -\entry {/etc/passwd}{525}{\code {/etc/passwd}} -\entry {pwd.h}{525}{\code {pwd.h}} -\entry {/etc/group}{528}{\code {/etc/group}} -\entry {grp.h}{528}{\code {grp.h}} -\entry {hostname}{533}{\code {hostname}} -\entry {hostid}{533}{\code {hostid}} -\entry {unistd.h}{533}{\code {unistd.h}} -\entry {sys/param.h}{533}{\code {sys/param.h}} -\entry {sys/utsname.h}{534}{\code {sys/utsname.h}} -\entry {limits.h}{537}{\code {limits.h}} -\entry {unistd.h}{539}{\code {unistd.h}} -\entry {limits.h}{545}{\code {limits.h}} -\entry {unistd.h}{547}{\code {unistd.h}} -\entry {unistd.h}{548}{\code {unistd.h}} -\entry {assert.h}{555}{\code {assert.h}} -\entry {stdarg.h}{558}{\code {stdarg.h}} -\entry {stdarg.h}{561}{\code {stdarg.h}} -\entry {varargs.h}{563}{\code {varargs.h}} -\entry {stddef.h}{564}{\code {stddef.h}} -\entry {limits.h}{565}{\code {limits.h}} -\entry {float.h}{569}{\code {float.h}} +\entry {sys/types.h}{477}{\code {sys/types.h}} +\entry {grp.h}{478}{\code {grp.h}} +\entry {stdio.h}{483}{\code {stdio.h}} +\entry {unistd.h}{483}{\code {unistd.h}} +\entry {/etc/passwd}{484}{\code {/etc/passwd}} +\entry {pwd.h}{484}{\code {pwd.h}} +\entry {/etc/group}{486}{\code {/etc/group}} +\entry {grp.h}{486}{\code {grp.h}} +\entry {hostname}{491}{\code {hostname}} +\entry {hostid}{491}{\code {hostid}} +\entry {unistd.h}{491}{\code {unistd.h}} +\entry {sys/param.h}{491}{\code {sys/param.h}} +\entry {sys/utsname.h}{492}{\code {sys/utsname.h}} +\entry {limits.h}{495}{\code {limits.h}} +\entry {unistd.h}{496}{\code {unistd.h}} +\entry {limits.h}{503}{\code {limits.h}} +\entry {unistd.h}{504}{\code {unistd.h}} +\entry {unistd.h}{505}{\code {unistd.h}} +\entry {assert.h}{511}{\code {assert.h}} +\entry {stdarg.h}{514}{\code {stdarg.h}} +\entry {stdarg.h}{516}{\code {stdarg.h}} +\entry {varargs.h}{518}{\code {varargs.h}} +\entry {stddef.h}{519}{\code {stddef.h}} +\entry {limits.h}{520}{\code {limits.h}} +\entry {float.h}{524}{\code {float.h}} diff -ruN glibc-1.06/manual/libc.pgs glibc-1.07/manual/libc.pgs --- glibc-1.06/manual/libc.pgs Mon May 17 16:59:14 1993 +++ glibc-1.07/manual/libc.pgs Wed Dec 29 18:34:48 1993 @@ -1,77 +1,81 @@ +\initial {-} +\entry {\code {-lbsd-compat}}{9, 469} \initial {/} -\entry {\code {/etc/group}}{528} -\entry {\code {/etc/hosts}}{278} -\entry {\code {/etc/networks}}{315} -\entry {\code {/etc/passwd}}{525} -\entry {\code {/etc/protocols}}{285} -\entry {\code {/etc/services}}{282} +\entry {\code {/etc/group}}{486} +\entry {\code {/etc/hosts}}{213} +\entry {\code {/etc/networks}}{247} +\entry {\code {/etc/passwd}}{484} +\entry {\code {/etc/protocols}}{219} +\entry {\code {/etc/services}}{217} \initial {A} -\entry {\code {arpa/inet.h}}{277} -\entry {\code {assert.h}}{555} +\entry {\code {arpa/inet.h}}{212} +\entry {\code {assert.h}}{511} +\initial {B} +\entry {\code {bsd-compat}}{9, 469} \initial {C} -\entry {\code {cd}}{229} -\entry {\code {chgrp}}{248} -\entry {\code {chmod}}{251} -\entry {\code {chown}}{248} -\entry {\code {ctype.h}}{57, 59} +\entry {\code {cd}}{165} +\entry {\code {chgrp}}{182} +\entry {\code {chmod}}{186} +\entry {\code {chown}}{182} +\entry {\code {ctype.h}}{53, 55} \initial {D} -\entry {\code {dirent.h}}{8, 231, 232, 233, 234} +\entry {\code {dirent.h}}{7, 167, 168, 170} \initial {E} -\entry {\code {errno.h}}{13, 14, 15} +\entry {\code {errno.h}}{13, 14} \initial {F} -\entry {\code {fcntl.h}}{8, 199, 214, 216, 218, 220, 223, 226} -\entry {\code {float.h}}{569} -\entry {\code {fnmatch.h}}{109} +\entry {\code {fcntl.h}}{8, 137, 152, 153, 155, 156, 159, 162} +\entry {\code {float.h}}{524} +\entry {\code {fnmatch.h}}{299} \initial {G} \entry {\code {gcc}}{2} -\entry {\code {grp.h}}{8, 519, 528} +\entry {\code {grp.h}}{8, 478, 486} \initial {H} -\entry {\code {hostid}}{533} -\entry {\code {hostname}}{533} +\entry {\code {hostid}}{491} +\entry {\code {hostname}}{491} \initial {K} -\entry {\code {kill}}{406} +\entry {\code {kill}}{372} \initial {L} -\entry {\code {limits.h}}{8, 83, 537, 545, 565} -\entry {\code {locale.h}}{95, 98} -\entry {\code {ls}}{242} +\entry {\code {limits.h}}{8, 342, 495, 503, 520} +\entry {\code {locale.h}}{353, 355} +\entry {\code {ls}}{177} \initial {M} -\entry {\code {malloc.c}}{55} -\entry {\code {malloc.h}}{34, 35, 36, 54} -\entry {\code {math.h}}{345, 355, 356, 357, 359} -\entry {\code {mkdir}}{241} +\entry {\code {malloc.c}}{50} +\entry {\code {malloc.h}}{32, 33, 50} +\entry {\code {math.h}}{275, 283, 284, 285, 286} +\entry {\code {mkdir}}{176} \initial {N} -\entry {\code {netdb.h}}{278, 282, 285, 315} -\entry {\code {netinet/in.h}}{275, 277, 281, 284} +\entry {\code {netdb.h}}{213, 217, 219, 247} +\entry {\code {netinet/in.h}}{210, 212, 216, 218} \initial {O} -\entry {\code {obstack.h}}{38} +\entry {\code {obstack.h}}{35} \initial {P} -\entry {\code {printf.h}}{164, 165} -\entry {\code {pwd.h}}{8, 525} +\entry {\code {printf.h}}{108} +\entry {\code {pwd.h}}{8, 484} \initial {S} -\entry {\code {setjmp.h}}{395, 396} -\entry {\code {sh}}{475} -\entry {\code {signal.h}}{8, 402, 413, 415, 419, 435, 436, 441, 442, 446, 453} -\entry {\code {stdarg.h}}{558, 561} -\entry {\code {stddef.h}}{84, 564} -\entry {\code {stdio.h}}{135, 136, 139, 140, 155, 159, 177, 179, 180, 182, 184, 186, 187, 189, 191, 195, 208, 239, 412, 509, 524} -\entry {\code {stdlib.h}}{29, 30, 32, 33, 34, 51, 83, 84, 86, 104, 351, 352, 356, 360, 362, 364, 467, 471, 473, 475} -\entry {\code {string.h}}{63, 68, 70, 74, 76, 412} -\entry {\code {sys/param.h}}{533} -\entry {\code {sys/resource.h}}{386, 387, 389} -\entry {\code {sys/socket.h}}{266, 268, 269, 270, 272, 274, 288, 289, 290, 295, 296, 297, 305, 312, 313} -\entry {\code {sys/stat.h}}{8, 242, 246, 249, 252, 257, 263} -\entry {\code {sys/time.h}}{257, 371, 383} -\entry {\code {sys/times.h}}{9, 369} -\entry {\code {sys/types.h}}{211, 477, 509, 511, 515, 517, 518} -\entry {\code {sys/un.h}}{272} -\entry {\code {sys/utsname.h}}{534} -\entry {\code {sys/wait.h}}{482, 484, 485} +\entry {\code {setjmp.h}}{362, 364} +\entry {\code {sh}}{437} +\entry {\code {signal.h}}{8, 367, 377, 380, 383, 398, 399, 403, 405, 408, 414} +\entry {\code {stdarg.h}}{514, 516} +\entry {\code {stddef.h}}{343, 519} +\entry {\code {stdio.h}}{81, 82, 85, 86, 100, 103, 119, 121, 122, 124, 126, 128, 129, 131, 135, 145, 174, 192, 377, 467, 483} +\entry {\code {stdlib.h}}{26, 28, 29, 30, 31, 47, 280, 281, 284, 287, 289, 290, 293, 294, 342, 344, 345, 346, 428, 432, 434, 437} +\entry {\code {string.h}}{59, 63, 65, 68, 71, 377} +\entry {\code {sys/param.h}}{491} +\entry {\code {sys/resource.h}}{332, 334, 335} +\entry {\code {sys/socket.h}}{202, 204, 205, 206, 207, 209, 222, 223, 224, 229, 230, 231, 239, 244, 245} +\entry {\code {sys/stat.h}}{8, 177, 181, 184, 186, 191, 199} +\entry {\code {sys/time.h}}{191, 318, 329} +\entry {\code {sys/times.h}}{8, 316} +\entry {\code {sys/types.h}}{149, 438, 468, 470, 475, 476, 477} +\entry {\code {sys/un.h}}{207} +\entry {\code {sys/utsname.h}}{492} +\entry {\code {sys/wait.h}}{443, 446, 447} \initial {T} -\entry {\code {termios.h}}{9, 319} -\entry {\code {time.h}}{255, 367, 370, 376, 378} +\entry {\code {termios.h}}{8, 251} +\entry {\code {time.h}}{189, 315, 318, 323, 326} \initial {U} -\entry {\code {umask}}{251} -\entry {\code {unistd.h}}{199, 202, 208, 216, 229, 235, 237, 238, 239, 248, 254, 255, 259, 317, 383, 459, 473, 477, 479, 509, 511, 515, 517, 518, 524, 533, 539, 547, 548} -\entry {\code {utime.h}}{256} +\entry {\code {umask}}{186} +\entry {\code {unistd.h}}{137, 140, 146, 153, 165, 170, 172, 173, 174, 183, 188, 189, 195, 249, 329, 421, 434, 438, 439, 440, 468, 470, 475, 476, 477, 483, 491, 496, 504, 505} +\entry {\code {utime.h}}{190} \initial {V} -\entry {\code {varargs.h}}{563} +\entry {\code {varargs.h}}{518} diff -ruN glibc-1.06/manual/libc.texinfo glibc-1.07/manual/libc.texinfo --- glibc-1.06/manual/libc.texinfo Wed May 19 19:51:59 1993 +++ glibc-1.07/manual/libc.texinfo Mon Aug 30 15:25:47 1993 @@ -5,9 +5,14 @@ @setchapternewpage odd @comment %**end of header (This is for running Texinfo on a region.) -@set EDITION 0.03 -@set VERSION 1.06 Beta -@set UPDATED 19 May 1993 +@c This tells texinfo.tex to use the real section titles in xrefs in +@c place of the node name, when no section title is explicitly given. +@set xref-automatic-section-title +@smallbook + +@set EDITION 0.05 +@set VERSION 1.07 Beta +@set UPDATED 30 August 1993 @ifinfo This file documents the GNU C library. @@ -54,6 +59,8 @@ @center with @center Roland McGrath, Andrew Oram, and Richard M. Stallman @sp 3 +@center Edition @value{EDITION} +@sp 1 @center last updated @value{UPDATED} @sp 1 @center for version @value{VERSION} @@ -60,6 +67,28 @@ @page @vskip 0pt plus 1filll Copyright @copyright{} 1993 Free Software Foundation, Inc. +@sp 2 +Published by the Free Software Foundation @* +675 Massachusetts Avenue, @* +Cambridge, MA 02139 USA @* +Printed copies are available for $50 each. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided also that the +section entitled ``GNU Library General Public License'' is included +exactly as in the original, and provided that the entire resulting +derived work is distributed under the terms of a permission notice +identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that the text of the translation of the section entitled ``GNU +Library General Public License'' must be approved for accuracy by the +Foundation. @end titlepage @page @@ -914,10 +943,6 @@ @include memory.texi @include ctype.texi @include string.texi -@include mbyte.texi -@include locale.texi -@include search.texi -@include pattern.texi @include io.texi @include stdio.texi @include llio.texi @@ -927,7 +952,11 @@ @include terminal.texi @include math.texi @include arith.texi +@include search.texi +@include pattern.texi @include time.texi +@include mbyte.texi +@include locale.texi @include setjmp.texi @include signal.texi @include startup.texi diff -ruN glibc-1.06/manual/libc.tp glibc-1.07/manual/libc.tp --- glibc-1.06/manual/libc.tp Mon May 17 17:03:26 1993 +++ glibc-1.07/manual/libc.tp Wed Dec 29 18:38:49 1993 @@ -1,75 +1,76 @@ -\entry {struct}{36}{\code {struct}} -\entry {struct}{38}{\code {struct}} -\entry {wchar{\_}t}{84}{\code {wchar{\_}t}} -\entry {struct}{98}{\code {struct}} -\entry {comparison{\_}fn{\_}t}{103}{\code {comparison{\_}fn{\_}t}} -\entry {glob{\_}t}{110}{\code {glob{\_}t}} -\entry {regex{\_}t}{114}{\code {regex{\_}t}} -\entry {regmatch{\_}t}{117}{\code {regmatch{\_}t}} -\entry {regoff{\_}t}{118}{\code {regoff{\_}t}} -\entry {wordexp{\_}t}{121}{\code {wordexp{\_}t}} -\entry {FILE}{135}{\code {FILE}} -\entry {struct}{165}{\code {struct}} -\entry {printf{\_}function}{167}{\code {printf{\_}function}} -\entry {printf{\_}arginfo{\_}function}{167}{\code {printf{\_}arginfo{\_}function}} -\entry {fpos{\_}t}{183}{\code {fpos{\_}t}} -\entry {struct}{195}{\code {struct}} -\entry {cookie{\_}read{\_}function}{197}{\code {cookie{\_}read{\_}function}} -\entry {cookie{\_}write{\_}function}{197}{\code {cookie{\_}write{\_}function}} -\entry {cookie{\_}seek{\_}function}{197}{\code {cookie{\_}seek{\_}function}} -\entry {cookie{\_}close{\_}function}{197}{\code {cookie{\_}close{\_}function}} -\entry {ssize{\_}t}{202}{\code {ssize{\_}t}} -\entry {off{\_}t}{207}{\code {off{\_}t}} -\entry {fd{\_}set}{211}{\code {fd{\_}set}} -\entry {flock}{223}{\code {flock}} -\entry {struct}{231}{\code {struct}} -\entry {DIR}{232}{\code {DIR}} -\entry {struct}{242}{\code {struct}} -\entry {mode{\_}t}{244}{\code {mode{\_}t}} -\entry {ino{\_}t}{244}{\code {ino{\_}t}} -\entry {dev{\_}t}{244}{\code {dev{\_}t}} -\entry {nlink{\_}t}{245}{\code {nlink{\_}t}} -\entry {struct}{256}{\code {struct}} -\entry {struct}{268}{\code {struct}} -\entry {struct}{272}{\code {struct}} -\entry {struct}{275}{\code {struct}} -\entry {struct}{277}{\code {struct}} -\entry {struct}{278}{\code {struct}} -\entry {struct}{282}{\code {struct}} -\entry {struct}{285}{\code {struct}} -\entry {struct}{313}{\code {struct}} -\entry {struct}{314}{\code {struct}} -\entry {struct}{319}{\code {struct}} -\entry {tcflag{\_}t}{320}{\code {tcflag{\_}t}} -\entry {cc{\_}t}{320}{\code {cc{\_}t}} -\entry {speed{\_}t}{330}{\code {speed{\_}t}} -\entry {div{\_}t}{360}{\code {div{\_}t}} -\entry {ldiv{\_}t}{361}{\code {ldiv{\_}t}} -\entry {clock{\_}t}{368}{\code {clock{\_}t}} -\entry {struct}{369}{\code {struct}} -\entry {time{\_}t}{370}{\code {time{\_}t}} -\entry {struct}{371}{\code {struct}} -\entry {struct}{371}{\code {struct}} -\entry {struct}{374}{\code {struct}} -\entry {struct}{383}{\code {struct}} -\entry {struct}{387}{\code {struct}} -\entry {struct}{388}{\code {struct}} -\entry {jmp{\_}buf}{395}{\code {jmp{\_}buf}} -\entry {sigjmp{\_}buf}{396}{\code {sigjmp{\_}buf}} -\entry {sighandler{\_}t}{412}{\code {sighandler{\_}t}} -\entry {struct}{415}{\code {struct}} -\entry {sig{\_}atomic{\_}t}{432}{\code {sig{\_}atomic{\_}t}} -\entry {sigset{\_}t}{441}{\code {sigset{\_}t}} -\entry {struct}{453}{\code {struct}} -\entry {struct}{455}{\code {struct}} -\entry {struct}{463}{\code {struct}} -\entry {pid{\_}t}{477}{\code {pid{\_}t}} -\entry {union}{485}{\code {union}} -\entry {uid{\_}t}{516}{\code {uid{\_}t}} -\entry {gid{\_}t}{516}{\code {gid{\_}t}} -\entry {struct}{525}{\code {struct}} -\entry {struct}{528}{\code {struct}} -\entry {struct}{534}{\code {struct}} -\entry {va{\_}list}{561}{\code {va{\_}list}} -\entry {ptrdiff{\_}t}{564}{\code {ptrdiff{\_}t}} -\entry {size{\_}t}{564}{\code {size{\_}t}} +\entry {struct mstats}{33}{\code {struct mstats}} +\entry {struct obstack}{35}{\code {struct obstack}} +\entry {FILE}{81}{\code {FILE}} +\entry {struct printf{\_}info}{108}{\code {struct printf{\_}info}} +\entry {printf{\_}function}{110}{\code {printf{\_}function}} +\entry {printf{\_}arginfo{\_}function}{111}{\code {printf{\_}arginfo{\_}function}} +\entry {fpos{\_}t}{126}{\code {fpos{\_}t}} +\entry {struct cookie{\_}io{\_}functions}{135}{\code {struct cookie{\_}io{\_}functions}} +\entry {cookie{\_}read{\_}function}{136}{\code {cookie{\_}read{\_}function}} +\entry {cookie{\_}write{\_}function}{136}{\code {cookie{\_}write{\_}function}} +\entry {cookie{\_}seek{\_}function}{136}{\code {cookie{\_}seek{\_}function}} +\entry {cookie{\_}close{\_}function}{136}{\code {cookie{\_}close{\_}function}} +\entry {ssize{\_}t}{140}{\code {ssize{\_}t}} +\entry {off{\_}t}{145}{\code {off{\_}t}} +\entry {fd{\_}set}{149}{\code {fd{\_}set}} +\entry {struct flock}{159}{\code {struct flock}} +\entry {struct dirent}{167}{\code {struct dirent}} +\entry {DIR}{168}{\code {DIR}} +\entry {struct stat}{177}{\code {struct stat}} +\entry {mode{\_}t}{179}{\code {mode{\_}t}} +\entry {ino{\_}t}{179}{\code {ino{\_}t}} +\entry {dev{\_}t}{179}{\code {dev{\_}t}} +\entry {nlink{\_}t}{180}{\code {nlink{\_}t}} +\entry {struct utimbuf}{190}{\code {struct utimbuf}} +\entry {struct sockaddr}{204}{\code {struct sockaddr}} +\entry {struct sockaddr{\_}un}{207}{\code {struct sockaddr{\_}un}} +\entry {struct sockaddr{\_}in}{210}{\code {struct sockaddr{\_}in}} +\entry {struct in{\_}addr}{212}{\code {struct in{\_}addr}} +\entry {struct hostent}{214}{\code {struct hostent}} +\entry {struct servent}{217}{\code {struct servent}} +\entry {struct protoent}{219}{\code {struct protoent}} +\entry {struct linger}{246}{\code {struct linger}} +\entry {struct netent}{247}{\code {struct netent}} +\entry {struct termios}{251}{\code {struct termios}} +\entry {tcflag{\_}t}{252}{\code {tcflag{\_}t}} +\entry {cc{\_}t}{252}{\code {cc{\_}t}} +\entry {speed{\_}t}{262}{\code {speed{\_}t}} +\entry {div{\_}t}{288}{\code {div{\_}t}} +\entry {ldiv{\_}t}{288}{\code {ldiv{\_}t}} +\entry {comparison{\_}fn{\_}t}{293}{\code {comparison{\_}fn{\_}t}} +\entry {glob{\_}t}{300}{\code {glob{\_}t}} +\entry {regex{\_}t}{304}{\code {regex{\_}t}} +\entry {regmatch{\_}t}{307}{\code {regmatch{\_}t}} +\entry {regoff{\_}t}{307}{\code {regoff{\_}t}} +\entry {wordexp{\_}t}{311}{\code {wordexp{\_}t}} +\entry {clock{\_}t}{316}{\code {clock{\_}t}} +\entry {struct tms}{316}{\code {struct tms}} +\entry {time{\_}t}{318}{\code {time{\_}t}} +\entry {struct timeval}{318}{\code {struct timeval}} +\entry {struct timezone}{319}{\code {struct timezone}} +\entry {struct tm}{321}{\code {struct tm}} +\entry {struct itimerval}{329}{\code {struct itimerval}} +\entry {struct rusage}{333}{\code {struct rusage}} +\entry {struct rlimit}{334}{\code {struct rlimit}} +\entry {wchar{\_}t}{343}{\code {wchar{\_}t}} +\entry {struct lconv}{356}{\code {struct lconv}} +\entry {jmp{\_}buf}{363}{\code {jmp{\_}buf}} +\entry {sigjmp{\_}buf}{364}{\code {sigjmp{\_}buf}} +\entry {sighandler{\_}t}{377}{\code {sighandler{\_}t}} +\entry {struct sigaction}{380}{\code {struct sigaction}} +\entry {sig{\_}atomic{\_}t}{395}{\code {sig{\_}atomic{\_}t}} +\entry {sigset{\_}t}{403}{\code {sigset{\_}t}} +\entry {struct sigvec}{414}{\code {struct sigvec}} +\entry {struct sigaltstack}{416}{\code {struct sigaltstack}} +\entry {struct sigstack}{418}{\code {struct sigstack}} +\entry {struct option}{424}{\code {struct option}} +\entry {pid{\_}t}{438}{\code {pid{\_}t}} +\entry {union wait}{447}{\code {union wait}} +\entry {uid{\_}t}{475}{\code {uid{\_}t}} +\entry {gid{\_}t}{475}{\code {gid{\_}t}} +\entry {struct passwd}{484}{\code {struct passwd}} +\entry {struct group}{486}{\code {struct group}} +\entry {struct utsname}{492}{\code {struct utsname}} +\entry {va{\_}list}{516}{\code {va{\_}list}} +\entry {ptrdiff{\_}t}{519}{\code {ptrdiff{\_}t}} +\entry {size{\_}t}{519}{\code {size{\_}t}} diff -ruN glibc-1.06/manual/libc.tps glibc-1.07/manual/libc.tps --- glibc-1.06/manual/libc.tps Mon May 17 16:59:14 1993 +++ glibc-1.07/manual/libc.tps Wed Dec 29 18:34:49 1993 @@ -1,61 +1,93 @@ \initial {C} -\entry {\code {cc{\_}t}}{320} -\entry {\code {clock{\_}t}}{368} -\entry {\code {comparison{\_}fn{\_}t}}{103} -\entry {\code {cookie{\_}close{\_}function}}{197} -\entry {\code {cookie{\_}read{\_}function}}{197} -\entry {\code {cookie{\_}seek{\_}function}}{197} -\entry {\code {cookie{\_}write{\_}function}}{197} +\entry {\code {cc{\_}t}}{252} +\entry {\code {clock{\_}t}}{316} +\entry {\code {comparison{\_}fn{\_}t}}{293} +\entry {\code {cookie{\_}close{\_}function}}{136} +\entry {\code {cookie{\_}read{\_}function}}{136} +\entry {\code {cookie{\_}seek{\_}function}}{136} +\entry {\code {cookie{\_}write{\_}function}}{136} \initial {D} -\entry {\code {dev{\_}t}}{244} -\entry {\code {DIR}}{232} -\entry {\code {div{\_}t}}{360} +\entry {\code {dev{\_}t}}{179} +\entry {\code {DIR}}{168} +\entry {\code {div{\_}t}}{288} \initial {F} -\entry {\code {fd{\_}set}}{211} -\entry {\code {FILE}}{135} -\entry {\code {flock}}{223} -\entry {\code {fpos{\_}t}}{184} +\entry {\code {fd{\_}set}}{149} +\entry {\code {FILE}}{81} +\entry {\code {fpos{\_}t}}{126} \initial {G} -\entry {\code {gid{\_}t}}{516} -\entry {\code {glob{\_}t}}{110} +\entry {\code {gid{\_}t}}{475} +\entry {\code {glob{\_}t}}{300} \initial {I} -\entry {\code {ino{\_}t}}{244} +\entry {\code {ino{\_}t}}{179} \initial {J} -\entry {\code {jmp{\_}buf}}{395} +\entry {\code {jmp{\_}buf}}{363} \initial {L} -\entry {\code {ldiv{\_}t}}{361} +\entry {\code {ldiv{\_}t}}{288} \initial {M} -\entry {\code {mode{\_}t}}{244} +\entry {\code {mode{\_}t}}{179} \initial {N} -\entry {\code {nlink{\_}t}}{245} +\entry {\code {nlink{\_}t}}{180} \initial {O} -\entry {\code {off{\_}t}}{207} +\entry {\code {off{\_}t}}{145} \initial {P} -\entry {\code {pid{\_}t}}{477} -\entry {\code {printf{\_}arginfo{\_}function}}{167} -\entry {\code {printf{\_}function}}{167} -\entry {\code {ptrdiff{\_}t}}{564} +\entry {\code {pid{\_}t}}{438} +\entry {\code {printf{\_}arginfo{\_}function}}{111} +\entry {\code {printf{\_}function}}{110} +\entry {\code {ptrdiff{\_}t}}{519} \initial {R} -\entry {\code {regex{\_}t}}{114} -\entry {\code {regmatch{\_}t}}{117} -\entry {\code {regoff{\_}t}}{118} +\entry {\code {regex{\_}t}}{304} +\entry {\code {regmatch{\_}t}}{307} +\entry {\code {regoff{\_}t}}{307} \initial {S} -\entry {\code {sig{\_}atomic{\_}t}}{432} -\entry {\code {sighandler{\_}t}}{413} -\entry {\code {sigjmp{\_}buf}}{396} -\entry {\code {sigset{\_}t}}{441} -\entry {\code {size{\_}t}}{564} -\entry {\code {speed{\_}t}}{330} -\entry {\code {ssize{\_}t}}{202} -\entry {\code {struct}}{36, 38, 98, 165, 195, 231, 242, 256, 268, 272, 275, 277, 278, 282, 285, 314, 315, 319, 369, 371, 374, 383, 387, 388, 415, 453, 455, 463, 525, 528, 534} +\entry {\code {sig{\_}atomic{\_}t}}{395} +\entry {\code {sighandler{\_}t}}{377} +\entry {\code {sigjmp{\_}buf}}{364} +\entry {\code {sigset{\_}t}}{403} +\entry {\code {size{\_}t}}{519} +\entry {\code {speed{\_}t}}{262} +\entry {\code {ssize{\_}t}}{140} +\entry {\code {struct cookie{\_}io{\_}functions}}{135} +\entry {\code {struct dirent}}{167} +\entry {\code {struct flock}}{159} +\entry {\code {struct group}}{486} +\entry {\code {struct hostent}}{214} +\entry {\code {struct in{\_}addr}}{212} +\entry {\code {struct itimerval}}{329} +\entry {\code {struct lconv}}{356} +\entry {\code {struct linger}}{246} +\entry {\code {struct mstats}}{33} +\entry {\code {struct netent}}{247} +\entry {\code {struct obstack}}{35} +\entry {\code {struct option}}{424} +\entry {\code {struct passwd}}{484} +\entry {\code {struct printf{\_}info}}{108} +\entry {\code {struct protoent}}{219} +\entry {\code {struct rlimit}}{334} +\entry {\code {struct rusage}}{333} +\entry {\code {struct servent}}{217} +\entry {\code {struct sigaction}}{380} +\entry {\code {struct sigaltstack}}{416} +\entry {\code {struct sigstack}}{418} +\entry {\code {struct sigvec}}{414} +\entry {\code {struct sockaddr}}{204} +\entry {\code {struct sockaddr{\_}in}}{210} +\entry {\code {struct sockaddr{\_}un}}{207} +\entry {\code {struct stat}}{177} +\entry {\code {struct termios}}{251} +\entry {\code {struct timeval}}{318} +\entry {\code {struct timezone}}{319} +\entry {\code {struct tm}}{321} +\entry {\code {struct tms}}{316} +\entry {\code {struct utimbuf}}{190} +\entry {\code {struct utsname}}{492} \initial {T} -\entry {\code {tcflag{\_}t}}{320} -\entry {\code {time{\_}t}}{370} +\entry {\code {tcflag{\_}t}}{252} +\entry {\code {time{\_}t}}{318} \initial {U} -\entry {\code {uid{\_}t}}{516} -\entry {\code {union}}{485} +\entry {\code {uid{\_}t}}{475} +\entry {\code {union wait}}{447} \initial {V} -\entry {\code {va{\_}list}}{561} +\entry {\code {va{\_}list}}{516} \initial {W} -\entry {\code {wchar{\_}t}}{84} -\entry {\code {wordexp{\_}t}}{121} +\entry {\code {wchar{\_}t}}{343} +\entry {\code {wordexp{\_}t}}{311} diff -ruN glibc-1.06/manual/libc.vr glibc-1.07/manual/libc.vr --- glibc-1.06/manual/libc.vr Mon May 17 17:03:26 1993 +++ glibc-1.07/manual/libc.vr Wed Dec 29 18:38:49 1993 @@ -1,19 +1,19 @@ -\entry {{\_}POSIX{\_}SOURCE}{9}{\code {{\_}POSIX{\_}SOURCE}} -\entry {{\_}POSIX{\_}C{\_}SOURCE}{9}{\code {{\_}POSIX{\_}C{\_}SOURCE}} -\entry {{\_}BSD{\_}SOURCE}{9}{\code {{\_}BSD{\_}SOURCE}} +\entry {{\_}POSIX{\_}SOURCE}{8}{\code {{\_}POSIX{\_}SOURCE}} +\entry {{\_}POSIX{\_}C{\_}SOURCE}{8}{\code {{\_}POSIX{\_}C{\_}SOURCE}} +\entry {{\_}BSD{\_}SOURCE}{8}{\code {{\_}BSD{\_}SOURCE}} \entry {{\_}SVID{\_}SOURCE}{9}{\code {{\_}SVID{\_}SOURCE}} \entry {{\_}GNU{\_}SOURCE}{9}{\code {{\_}GNU{\_}SOURCE}} \entry {errno \relax }{13}{\code {errno \relax }} -\entry {EPERM \relax }{15}{\code {EPERM \relax }} -\entry {ENOENT \relax }{15}{\code {ENOENT \relax }} +\entry {EPERM \relax }{14}{\code {EPERM \relax }} +\entry {ENOENT \relax }{14}{\code {ENOENT \relax }} \entry {ESRCH \relax }{15}{\code {ESRCH \relax }} \entry {EINTR \relax }{15}{\code {EINTR \relax }} \entry {EIO \relax }{15}{\code {EIO \relax }} \entry {ENXIO \relax }{15}{\code {ENXIO \relax }} \entry {E2BIG \relax }{15}{\code {E2BIG \relax }} -\entry {ENOEXEC \relax }{16}{\code {ENOEXEC \relax }} -\entry {EBADF \relax }{16}{\code {EBADF \relax }} -\entry {ECHILD \relax }{16}{\code {ECHILD \relax }} +\entry {ENOEXEC \relax }{15}{\code {ENOEXEC \relax }} +\entry {EBADF \relax }{15}{\code {EBADF \relax }} +\entry {ECHILD \relax }{15}{\code {ECHILD \relax }} \entry {EDEADLK \relax }{16}{\code {EDEADLK \relax }} \entry {ENOMEM \relax }{16}{\code {ENOMEM \relax }} \entry {EACCES \relax }{16}{\code {EACCES \relax }} @@ -21,402 +21,413 @@ \entry {ENOTBLK \relax }{16}{\code {ENOTBLK \relax }} \entry {EBUSY \relax }{16}{\code {EBUSY \relax }} \entry {EEXIST \relax }{16}{\code {EEXIST \relax }} -\entry {EXDEV \relax }{17}{\code {EXDEV \relax }} -\entry {ENODEV \relax }{17}{\code {ENODEV \relax }} -\entry {ENOTDIR \relax }{17}{\code {ENOTDIR \relax }} +\entry {EXDEV \relax }{16}{\code {EXDEV \relax }} +\entry {ENODEV \relax }{16}{\code {ENODEV \relax }} +\entry {ENOTDIR \relax }{16}{\code {ENOTDIR \relax }} \entry {EISDIR \relax }{17}{\code {EISDIR \relax }} \entry {EINVAL \relax }{17}{\code {EINVAL \relax }} -\entry {ENFILE \relax }{17}{\code {ENFILE \relax }} \entry {EMFILE \relax }{17}{\code {EMFILE \relax }} +\entry {ENFILE \relax }{17}{\code {ENFILE \relax }} \entry {ENOTTY \relax }{17}{\code {ENOTTY \relax }} \entry {ETXTBSY \relax }{17}{\code {ETXTBSY \relax }} -\entry {EFBIG \relax }{18}{\code {EFBIG \relax }} -\entry {ENOSPC \relax }{18}{\code {ENOSPC \relax }} -\entry {ESPIPE \relax }{18}{\code {ESPIPE \relax }} -\entry {EROFS \relax }{18}{\code {EROFS \relax }} -\entry {EMLINK \relax }{18}{\code {EMLINK \relax }} +\entry {EFBIG \relax }{17}{\code {EFBIG \relax }} +\entry {ENOSPC \relax }{17}{\code {ENOSPC \relax }} +\entry {ESPIPE \relax }{17}{\code {ESPIPE \relax }} +\entry {EROFS \relax }{17}{\code {EROFS \relax }} +\entry {EMLINK \relax }{17}{\code {EMLINK \relax }} \entry {EPIPE \relax }{18}{\code {EPIPE \relax }} \entry {EDOM \relax }{18}{\code {EDOM \relax }} \entry {ERANGE \relax }{18}{\code {ERANGE \relax }} \entry {EAGAIN \relax }{18}{\code {EAGAIN \relax }} -\entry {EWOULDBLOCK \relax }{19}{\code {EWOULDBLOCK \relax }} -\entry {EINPROGRESS \relax }{19}{\code {EINPROGRESS \relax }} -\entry {EALREADY \relax }{19}{\code {EALREADY \relax }} -\entry {ENOTSOCK \relax }{19}{\code {ENOTSOCK \relax }} +\entry {EWOULDBLOCK \relax }{18}{\code {EWOULDBLOCK \relax }} +\entry {EINPROGRESS \relax }{18}{\code {EINPROGRESS \relax }} +\entry {EALREADY \relax }{18}{\code {EALREADY \relax }} +\entry {ENOTSOCK \relax }{18}{\code {ENOTSOCK \relax }} \entry {EDESTADDRREQ \relax }{19}{\code {EDESTADDRREQ \relax }} \entry {EMSGSIZE \relax }{19}{\code {EMSGSIZE \relax }} \entry {EPROTOTYPE \relax }{19}{\code {EPROTOTYPE \relax }} \entry {ENOPROTOOPT \relax }{19}{\code {ENOPROTOOPT \relax }} -\entry {EPROTONOSUPPORT \relax }{20}{\code {EPROTONOSUPPORT \relax }} -\entry {ESOCKTNOSUPPORT \relax }{20}{\code {ESOCKTNOSUPPORT \relax }} -\entry {EOPNOTSUPP \relax }{20}{\code {EOPNOTSUPP \relax }} -\entry {EPFNOSUPPORT \relax }{20}{\code {EPFNOSUPPORT \relax }} -\entry {EAFNOSUPPORT \relax }{20}{\code {EAFNOSUPPORT \relax }} -\entry {EADDRINUSE \relax }{20}{\code {EADDRINUSE \relax }} -\entry {EADDRNOTAVAIL \relax }{20}{\code {EADDRNOTAVAIL \relax }} +\entry {EPROTONOSUPPORT \relax }{19}{\code {EPROTONOSUPPORT \relax }} +\entry {ESOCKTNOSUPPORT \relax }{19}{\code {ESOCKTNOSUPPORT \relax }} +\entry {EOPNOTSUPP \relax }{19}{\code {EOPNOTSUPP \relax }} +\entry {EPFNOSUPPORT \relax }{19}{\code {EPFNOSUPPORT \relax }} +\entry {EAFNOSUPPORT \relax }{19}{\code {EAFNOSUPPORT \relax }} +\entry {EADDRINUSE \relax }{19}{\code {EADDRINUSE \relax }} +\entry {EADDRNOTAVAIL \relax }{19}{\code {EADDRNOTAVAIL \relax }} \entry {ENETDOWN \relax }{20}{\code {ENETDOWN \relax }} \entry {ENETUNREACH \relax }{20}{\code {ENETUNREACH \relax }} \entry {ENETRESET \relax }{20}{\code {ENETRESET \relax }} -\entry {ECONNABORTED \relax }{21}{\code {ECONNABORTED \relax }} -\entry {ECONNRESET \relax }{21}{\code {ECONNRESET \relax }} -\entry {ENOBUFS \relax }{21}{\code {ENOBUFS \relax }} -\entry {EISCONN \relax }{21}{\code {EISCONN \relax }} -\entry {ENOTCONN \relax }{21}{\code {ENOTCONN \relax }} -\entry {ESHUTDOWN \relax }{21}{\code {ESHUTDOWN \relax }} -\entry {ETIMEDOUT \relax }{21}{\code {ETIMEDOUT \relax }} -\entry {ECONNREFUSED \relax }{21}{\code {ECONNREFUSED \relax }} -\entry {ELOOP \relax }{21}{\code {ELOOP \relax }} -\entry {ENAMETOOLONG \relax }{22}{\code {ENAMETOOLONG \relax }} -\entry {EHOSTDOWN \relax }{22}{\code {EHOSTDOWN \relax }} -\entry {EHOSTUNREACH \relax }{22}{\code {EHOSTUNREACH \relax }} -\entry {ENOTEMPTY \relax }{22}{\code {ENOTEMPTY \relax }} -\entry {EUSERS \relax }{22}{\code {EUSERS \relax }} -\entry {EDQUOT \relax }{22}{\code {EDQUOT \relax }} -\entry {ESTALE \relax }{22}{\code {ESTALE \relax }} -\entry {EREMOTE \relax }{22}{\code {EREMOTE \relax }} -\entry {ENOLCK \relax }{22}{\code {ENOLCK \relax }} -\entry {ENOSYS \relax }{22}{\code {ENOSYS \relax }} -\entry {ED \relax }{23}{\code {ED \relax }} -\entry {EGRATUITOUS \relax }{23}{\code {EGRATUITOUS \relax }} -\entry {program{\_}invocation{\_}name \relax }{24}{\code {program{\_}invocation{\_}name \relax }} -\entry {program{\_}invocation{\_}short{\_}name \relax }{24}{\code {program{\_}invocation{\_}short{\_}name \relax }} -\entry {{\_}{\_}malloc{\_}hook}{35}{\code {{\_}{\_}malloc{\_}hook}} -\entry {{\_}{\_}realloc{\_}hook}{35}{\code {{\_}{\_}realloc{\_}hook}} -\entry {{\_}{\_}free{\_}hook}{35}{\code {{\_}{\_}free{\_}hook}} -\entry {MB{\_}LEN{\_}MAX \relax }{82}{\code {MB{\_}LEN{\_}MAX \relax }} -\entry {MB{\_}CUR{\_}MAX \relax }{83}{\code {MB{\_}CUR{\_}MAX \relax }} -\entry {LC{\_}COLLATE}{95}{\code {LC{\_}COLLATE}} -\entry {LC{\_}CTYPE}{95}{\code {LC{\_}CTYPE}} -\entry {LC{\_}MONETARY}{95}{\code {LC{\_}MONETARY}} -\entry {LC{\_}NUMERIC}{95}{\code {LC{\_}NUMERIC}} -\entry {LC{\_}TIME}{95}{\code {LC{\_}TIME}} -\entry {LC{\_}ALL}{95}{\code {LC{\_}ALL}} -\entry {LANG}{95}{\code {LANG}} -\entry {stdin \relax }{136}{\code {stdin \relax }} -\entry {stdout \relax }{136}{\code {stdout \relax }} -\entry {stderr \relax }{136}{\code {stderr \relax }} -\entry {FOPEN{\_}MAX \relax }{138}{\code {FOPEN{\_}MAX \relax }} -\entry {PA{\_}FLAG{\_}MASK \relax }{160}{\code {PA{\_}FLAG{\_}MASK \relax }} -\entry {PA{\_}INT}{160}{\code {PA{\_}INT}} -\entry {PA{\_}CHAR}{161}{\code {PA{\_}CHAR}} -\entry {PA{\_}STRING}{161}{\code {PA{\_}STRING}} -\entry {PA{\_}POINTER}{161}{\code {PA{\_}POINTER}} -\entry {PA{\_}FLOAT}{161}{\code {PA{\_}FLOAT}} -\entry {PA{\_}DOUBLE}{161}{\code {PA{\_}DOUBLE}} -\entry {PA{\_}LAST}{161}{\code {PA{\_}LAST}} -\entry {PA{\_}FLAG{\_}PTR}{161}{\code {PA{\_}FLAG{\_}PTR}} -\entry {PA{\_}FLAG{\_}SHORT}{161}{\code {PA{\_}FLAG{\_}SHORT}} -\entry {PA{\_}FLAG{\_}LONG}{161}{\code {PA{\_}FLAG{\_}LONG}} -\entry {PA{\_}FLAG{\_}LONG{\_}LONG}{161}{\code {PA{\_}FLAG{\_}LONG{\_}LONG}} -\entry {PA{\_}FLAG{\_}LONG{\_}DOUBLE}{161}{\code {PA{\_}FLAG{\_}LONG{\_}DOUBLE}} -\entry {EOF \relax }{179}{\code {EOF \relax }} -\entry {SEEK{\_}SET \relax }{182}{\code {SEEK{\_}SET \relax }} -\entry {SEEK{\_}CUR \relax }{182}{\code {SEEK{\_}CUR \relax }} -\entry {SEEK{\_}END \relax }{182}{\code {SEEK{\_}END \relax }} -\entry {L{\_}SET}{182}{\code {L{\_}SET}} -\entry {L{\_}INCR}{182}{\code {L{\_}INCR}} -\entry {L{\_}XTND}{182}{\code {L{\_}XTND}} -\entry {{\_}IOFBF \relax }{187}{\code {{\_}IOFBF \relax }} -\entry {{\_}IOLBF \relax }{187}{\code {{\_}IOLBF \relax }} -\entry {{\_}IONBF \relax }{187}{\code {{\_}IONBF \relax }} -\entry {BUFSIZ \relax }{187}{\code {BUFSIZ \relax }} -\entry {L{\_}tmpnam \relax }{189}{\code {L{\_}tmpnam \relax }} -\entry {TMP{\_}MAX \relax }{189}{\code {TMP{\_}MAX \relax }} -\entry {P{\_}tmpdir \relax }{190}{\code {P{\_}tmpdir \relax }} -\entry {O{\_}RDONLY}{200}{\code {O{\_}RDONLY}} -\entry {O{\_}WRONLY}{200}{\code {O{\_}WRONLY}} -\entry {O{\_}RDWR}{200}{\code {O{\_}RDWR}} -\entry {O{\_}APPEND}{200}{\code {O{\_}APPEND}} -\entry {O{\_}CREAT}{200}{\code {O{\_}CREAT}} -\entry {O{\_}EXCL}{200}{\code {O{\_}EXCL}} -\entry {O{\_}NOCTTY}{200}{\code {O{\_}NOCTTY}} -\entry {O{\_}NONBLOCK}{200}{\code {O{\_}NONBLOCK}} -\entry {O{\_}TRUNC}{200}{\code {O{\_}TRUNC}} -\entry {STDIN{\_}FILENO}{208}{\code {STDIN{\_}FILENO}} -\entry {STDOUT{\_}FILENO}{208}{\code {STDOUT{\_}FILENO}} -\entry {STDERR{\_}FILENO}{208}{\code {STDERR{\_}FILENO}} -\entry {FD{\_}SETSIZE \relax }{211}{\code {FD{\_}SETSIZE \relax }} -\entry {F{\_}DUPFD \relax }{216}{\code {F{\_}DUPFD \relax }} -\entry {F{\_}GETFD \relax }{218}{\code {F{\_}GETFD \relax }} -\entry {F{\_}SETFD \relax }{218}{\code {F{\_}SETFD \relax }} -\entry {FD{\_}CLOEXEC \relax }{219}{\code {FD{\_}CLOEXEC \relax }} -\entry {F{\_}GETFL \relax }{220}{\code {F{\_}GETFL \relax }} -\entry {F{\_}SETFL \relax }{220}{\code {F{\_}SETFL \relax }} -\entry {O{\_}ACCMODE \relax }{221}{\code {O{\_}ACCMODE \relax }} -\entry {F{\_}GETLK \relax }{223}{\code {F{\_}GETLK \relax }} -\entry {F{\_}SETLK \relax }{224}{\code {F{\_}SETLK \relax }} -\entry {F{\_}SETLKW \relax }{225}{\code {F{\_}SETLKW \relax }} -\entry {F{\_}RDLCK}{225}{\code {F{\_}RDLCK}} -\entry {F{\_}WRLCK}{226}{\code {F{\_}WRLCK}} -\entry {F{\_}UNLCK}{226}{\code {F{\_}UNLCK}} -\entry {F{\_}GETOWN \relax }{226}{\code {F{\_}GETOWN \relax }} -\entry {F{\_}SETOWN \relax }{227}{\code {F{\_}SETOWN \relax }} -\entry {S{\_}IFMT \relax }{247}{\code {S{\_}IFMT \relax }} -\entry {S{\_}IFDIR}{247}{\code {S{\_}IFDIR}} -\entry {S{\_}IFCHR}{247}{\code {S{\_}IFCHR}} -\entry {S{\_}IFBLK}{247}{\code {S{\_}IFBLK}} -\entry {S{\_}IFREG}{247}{\code {S{\_}IFREG}} -\entry {S{\_}IFLNK}{247}{\code {S{\_}IFLNK}} -\entry {S{\_}IFSOCK}{247}{\code {S{\_}IFSOCK}} -\entry {S{\_}IFIFO}{247}{\code {S{\_}IFIFO}} -\entry {S{\_}IRUSR}{249}{\code {S{\_}IRUSR}} -\entry {S{\_}IREAD}{249}{\code {S{\_}IREAD}} -\entry {S{\_}IWUSR}{249}{\code {S{\_}IWUSR}} -\entry {S{\_}IWRITE}{249}{\code {S{\_}IWRITE}} -\entry {S{\_}IXUSR}{249}{\code {S{\_}IXUSR}} -\entry {S{\_}IEXEC}{249}{\code {S{\_}IEXEC}} -\entry {S{\_}IRWXU}{250}{\code {S{\_}IRWXU}} -\entry {S{\_}IRGRP}{250}{\code {S{\_}IRGRP}} -\entry {S{\_}IWGRP}{250}{\code {S{\_}IWGRP}} -\entry {S{\_}IXGRP}{250}{\code {S{\_}IXGRP}} -\entry {S{\_}IRWXG}{250}{\code {S{\_}IRWXG}} -\entry {S{\_}IROTH}{250}{\code {S{\_}IROTH}} -\entry {S{\_}IWOTH}{250}{\code {S{\_}IWOTH}} -\entry {S{\_}IXOTH}{250}{\code {S{\_}IXOTH}} -\entry {S{\_}IRWXO}{250}{\code {S{\_}IRWXO}} -\entry {S{\_}ISUID}{250}{\code {S{\_}ISUID}} -\entry {S{\_}ISGID}{250}{\code {S{\_}ISGID}} -\entry {S{\_}ISVTX}{250}{\code {S{\_}ISVTX}} -\entry {R{\_}OK \relax }{255}{\code {R{\_}OK \relax }} -\entry {W{\_}OK \relax }{255}{\code {W{\_}OK \relax }} -\entry {X{\_}OK \relax }{255}{\code {X{\_}OK \relax }} -\entry {F{\_}OK \relax }{255}{\code {F{\_}OK \relax }} -\entry {SOCK{\_}STREAM \relax }{266}{\code {SOCK{\_}STREAM \relax }} -\entry {SOCK{\_}DGRAM \relax }{266}{\code {SOCK{\_}DGRAM \relax }} -\entry {SOCK{\_}RAW \relax }{267}{\code {SOCK{\_}RAW \relax }} -\entry {AF{\_}FILE}{269}{\code {AF{\_}FILE}} -\entry {AF{\_}UNIX}{269}{\code {AF{\_}UNIX}} -\entry {AF{\_}INET}{269}{\code {AF{\_}INET}} -\entry {AF{\_}UNSPEC}{269}{\code {AF{\_}UNSPEC}} -\entry {PF{\_}FILE \relax }{272}{\code {PF{\_}FILE \relax }} -\entry {PF{\_}UNIX \relax }{272}{\code {PF{\_}UNIX \relax }} -\entry {PF{\_}INET \relax }{274}{\code {PF{\_}INET \relax }} -\entry {INADDR{\_}ANY \relax }{277}{\code {INADDR{\_}ANY \relax }} -\entry {h{\_}errno}{280}{\code {h{\_}errno}} -\entry {HOST{\_}NOT{\_}FOUND}{280}{\code {HOST{\_}NOT{\_}FOUND}} -\entry {TRY{\_}AGAIN}{280}{\code {TRY{\_}AGAIN}} -\entry {NO{\_}RECOVERY}{280}{\code {NO{\_}RECOVERY}} -\entry {NO{\_}ADDRESS}{280}{\code {NO{\_}ADDRESS}} -\entry {IPPORT{\_}RESERVED \relax }{281}{\code {IPPORT{\_}RESERVED \relax }} -\entry {IPPORT{\_}USERRESERVED \relax }{281}{\code {IPPORT{\_}USERRESERVED \relax }} -\entry {PF{\_}NS}{287}{\code {PF{\_}NS}} -\entry {PF{\_}ISO}{287}{\code {PF{\_}ISO}} -\entry {PF{\_}CCITT}{287}{\code {PF{\_}CCITT}} -\entry {PF{\_}IMPLINK}{287}{\code {PF{\_}IMPLINK}} -\entry {PF{\_}ROUTE}{287}{\code {PF{\_}ROUTE}} -\entry {MSG{\_}OOB \relax }{297}{\code {MSG{\_}OOB \relax }} -\entry {MSG{\_}PEEK \relax }{297}{\code {MSG{\_}PEEK \relax }} -\entry {MSG{\_}DONTROUTE \relax }{297}{\code {MSG{\_}DONTROUTE \relax }} -\entry {SOL{\_}SOCKET \relax }{313}{\code {SOL{\_}SOCKET \relax }} -\entry {NCCS \relax }{320}{\code {NCCS \relax }} -\entry {TCSANOW}{321}{\code {TCSANOW}} -\entry {TCSADRAIN}{321}{\code {TCSADRAIN}} -\entry {TCSAFLUSH}{321}{\code {TCSAFLUSH}} -\entry {TCSASOFT}{321}{\code {TCSASOFT}} -\entry {INPCK}{323}{\code {INPCK}} -\entry {IGNPAR}{324}{\code {IGNPAR}} -\entry {PARMRK}{324}{\code {PARMRK}} -\entry {ISTRIP}{324}{\code {ISTRIP}} -\entry {IGNBRK}{324}{\code {IGNBRK}} -\entry {BRKINT}{324}{\code {BRKINT}} -\entry {IGNCR}{324}{\code {IGNCR}} -\entry {ICRNL}{324}{\code {ICRNL}} -\entry {INLCR}{324}{\code {INLCR}} -\entry {IXOFF}{324}{\code {IXOFF}} -\entry {IXON}{325}{\code {IXON}} -\entry {OPOST \relax }{325}{\code {OPOST \relax }} -\entry {ONLCR \relax }{325}{\code {ONLCR \relax }} -\entry {OXTABS \relax }{326}{\code {OXTABS \relax }} -\entry {ONOEOT \relax }{326}{\code {ONOEOT \relax }} -\entry {CLOCAL}{326}{\code {CLOCAL}} -\entry {HUPCL}{326}{\code {HUPCL}} -\entry {CREAD}{326}{\code {CREAD}} -\entry {CSTOPB}{326}{\code {CSTOPB}} -\entry {PARENB}{326}{\code {PARENB}} -\entry {PARODD}{327}{\code {PARODD}} -\entry {CSIZE}{327}{\code {CSIZE}} -\entry {CS5}{327}{\code {CS5}} -\entry {CS6}{327}{\code {CS6}} -\entry {CS7}{327}{\code {CS7}} -\entry {CS8}{327}{\code {CS8}} -\entry {CCTS{\_}OFLOW}{327}{\code {CCTS{\_}OFLOW}} -\entry {CRTS{\_}IFLOW}{327}{\code {CRTS{\_}IFLOW}} -\entry {MDMBUF}{327}{\code {MDMBUF}} -\entry {ICANON}{327}{\code {ICANON}} -\entry {ECHO}{327}{\code {ECHO}} -\entry {ECHOE}{327}{\code {ECHOE}} -\entry {ECHOK}{328}{\code {ECHOK}} -\entry {ECHONL}{328}{\code {ECHONL}} -\entry {ISIG}{328}{\code {ISIG}} -\entry {IEXTEN}{328}{\code {IEXTEN}} -\entry {NOFLSH}{328}{\code {NOFLSH}} -\entry {TOSTOP}{328}{\code {TOSTOP}} -\entry {ECHOKE}{329}{\code {ECHOKE}} -\entry {ECHOPRT}{329}{\code {ECHOPRT}} -\entry {ECHOCTL}{329}{\code {ECHOCTL}} -\entry {ALTWERASE}{329}{\code {ALTWERASE}} -\entry {FLUSHO}{329}{\code {FLUSHO}} -\entry {NOKERNINFO}{329}{\code {NOKERNINFO}} -\entry {PENDIN}{329}{\code {PENDIN}} -\entry {B0}{331}{\code {B0}} -\entry {B50}{331}{\code {B50}} -\entry {B75}{331}{\code {B75}} -\entry {B110}{331}{\code {B110}} -\entry {B134}{331}{\code {B134}} -\entry {B150}{331}{\code {B150}} -\entry {B200}{331}{\code {B200}} -\entry {B300}{331}{\code {B300}} -\entry {B600}{331}{\code {B600}} -\entry {B1200}{331}{\code {B1200}} -\entry {B1800}{331}{\code {B1800}} -\entry {B2400}{331}{\code {B2400}} -\entry {B4800}{331}{\code {B4800}} -\entry {B9600}{331}{\code {B9600}} -\entry {B19200}{331}{\code {B19200}} -\entry {B38400}{331}{\code {B38400}} -\entry {EXTA}{331}{\code {EXTA}} -\entry {EXTB}{331}{\code {EXTB}} -\entry {{\_}POSIX{\_}VDISABLE}{331}{\code {{\_}POSIX{\_}VDISABLE}} -\entry {VEOF \relax }{332}{\code {VEOF \relax }} -\entry {VEOL \relax }{332}{\code {VEOL \relax }} -\entry {VERASE \relax }{332}{\code {VERASE \relax }} -\entry {VKILL \relax }{333}{\code {VKILL \relax }} -\entry {VEOL2 \relax }{333}{\code {VEOL2 \relax }} -\entry {VWERASE \relax }{333}{\code {VWERASE \relax }} -\entry {VREPRINT \relax }{334}{\code {VREPRINT \relax }} -\entry {VLNEXT \relax }{334}{\code {VLNEXT \relax }} -\entry {VINTR \relax }{334}{\code {VINTR \relax }} -\entry {VQUIT \relax }{334}{\code {VQUIT \relax }} -\entry {VSUSP \relax }{335}{\code {VSUSP \relax }} -\entry {VDSUSP \relax }{335}{\code {VDSUSP \relax }} -\entry {VSTART \relax }{336}{\code {VSTART \relax }} -\entry {VSTOP \relax }{336}{\code {VSTOP \relax }} -\entry {VDISCARD \relax }{337}{\code {VDISCARD \relax }} -\entry {VSTATUS \relax }{337}{\code {VSTATUS \relax }} -\entry {VMIN \relax }{337}{\code {VMIN \relax }} -\entry {VTIME \relax }{338}{\code {VTIME \relax }} -\entry {TCIFLUSH}{340}{\code {TCIFLUSH}} -\entry {TCOFLUSH}{340}{\code {TCOFLUSH}} -\entry {TCIOFLUSH}{340}{\code {TCIOFLUSH}} -\entry {TCOOFF}{341}{\code {TCOOFF}} -\entry {TCOON}{341}{\code {TCOON}} -\entry {TCIOFF}{341}{\code {TCIOFF}} -\entry {TCION}{341}{\code {TCION}} -\entry {EBADF}{341}{\code {EBADF}} -\entry {ENOTTY}{341}{\code {ENOTTY}} -\entry {EINVAL}{341}{\code {EINVAL}} -\entry {HUGE{\_}VAL \relax }{346}{\code {HUGE{\_}VAL \relax }} -\entry {RAND{\_}MAX \relax }{351}{\code {RAND{\_}MAX \relax }} -\entry {NAN \relax }{355}{\code {NAN \relax }} -\entry {CLOCKS{\_}PER{\_}SEC \relax }{368}{\code {CLOCKS{\_}PER{\_}SEC \relax }} -\entry {CLK{\_}TCK \relax }{368}{\code {CLK{\_}TCK \relax }} -\entry {*tzname[2] \relax }{380}{\code {*tzname[2] \relax }} -\entry {timezone \relax }{381}{\code {timezone \relax }} -\entry {daylight \relax }{381}{\code {daylight \relax }} -\entry {RLIMIT{\_}CPU}{388}{\code {RLIMIT{\_}CPU}} -\entry {RLIMIT{\_}FSIZE}{389}{\code {RLIMIT{\_}FSIZE}} -\entry {RLIMIT{\_}DATA}{389}{\code {RLIMIT{\_}DATA}} -\entry {RLIMIT{\_}STACK}{389}{\code {RLIMIT{\_}STACK}} -\entry {RLIMIT{\_}CORE}{389}{\code {RLIMIT{\_}CORE}} -\entry {RLIMIT{\_}RSS}{389}{\code {RLIMIT{\_}RSS}} -\entry {RLIMIT{\_}OPEN{\_}FILES}{389}{\code {RLIMIT{\_}OPEN{\_}FILES}} -\entry {RLIM{\_}NLIMITS}{389}{\code {RLIM{\_}NLIMITS}} -\entry {int}{389}{\code {int}} -\entry {PRIO{\_}MIN}{390}{\code {PRIO{\_}MIN}} -\entry {PRIO{\_}MAX}{390}{\code {PRIO{\_}MAX}} -\entry {PRIO{\_}PROCESS}{391}{\code {PRIO{\_}PROCESS}} -\entry {PRIO{\_}PGRP}{391}{\code {PRIO{\_}PGRP}} -\entry {PRIO{\_}USER}{391}{\code {PRIO{\_}USER}} -\entry {NSIG \relax }{402}{\code {NSIG \relax }} -\entry {COREFILE}{402}{\code {COREFILE}} -\entry {SIGFPE \relax }{403}{\code {SIGFPE \relax }} -\entry {FPE{\_}INTOVF{\_}TRAP}{403}{\code {FPE{\_}INTOVF{\_}TRAP}} -\entry {FPE{\_}INTDIV{\_}TRAP}{403}{\code {FPE{\_}INTDIV{\_}TRAP}} -\entry {FPE{\_}SUBRNG{\_}TRAP}{403}{\code {FPE{\_}SUBRNG{\_}TRAP}} -\entry {FPE{\_}FLTOVF{\_}TRAP}{403}{\code {FPE{\_}FLTOVF{\_}TRAP}} -\entry {FPE{\_}FLTDIV{\_}TRAP}{404}{\code {FPE{\_}FLTDIV{\_}TRAP}} -\entry {FPE{\_}FLTUND{\_}TRAP}{404}{\code {FPE{\_}FLTUND{\_}TRAP}} -\entry {FPE{\_}DECOVF{\_}TRAP}{404}{\code {FPE{\_}DECOVF{\_}TRAP}} -\entry {SIGILL \relax }{404}{\code {SIGILL \relax }} -\entry {SIGSEGV \relax }{404}{\code {SIGSEGV \relax }} -\entry {SIGBUS \relax }{404}{\code {SIGBUS \relax }} -\entry {SIGABRT \relax }{405}{\code {SIGABRT \relax }} -\entry {SIGHUP \relax }{405}{\code {SIGHUP \relax }} -\entry {SIGINT \relax }{406}{\code {SIGINT \relax }} -\entry {SIGQUIT \relax }{406}{\code {SIGQUIT \relax }} -\entry {SIGTERM \relax }{406}{\code {SIGTERM \relax }} -\entry {SIGKILL \relax }{406}{\code {SIGKILL \relax }} -\entry {SIGALRM \relax }{407}{\code {SIGALRM \relax }} -\entry {SIGVTALRM \relax }{407}{\code {SIGVTALRM \relax }} -\entry {SIGPROF \relax }{407}{\code {SIGPROF \relax }} -\entry {SIGIO \relax }{407}{\code {SIGIO \relax }} -\entry {SIGURG \relax }{408}{\code {SIGURG \relax }} -\entry {SIGCHLD \relax }{408}{\code {SIGCHLD \relax }} -\entry {SIGCONT \relax }{408}{\code {SIGCONT \relax }} -\entry {SIGSTOP \relax }{408}{\code {SIGSTOP \relax }} -\entry {SIGTSTP \relax }{408}{\code {SIGTSTP \relax }} -\entry {SIGTTIN \relax }{409}{\code {SIGTTIN \relax }} -\entry {SIGTTOU \relax }{409}{\code {SIGTTOU \relax }} -\entry {SIGPIPE \relax }{410}{\code {SIGPIPE \relax }} -\entry {SIGUSR1 \relax }{410}{\code {SIGUSR1 \relax }} -\entry {SIGUSR2 \relax }{410}{\code {SIGUSR2 \relax }} -\entry {sys{\_}siglist}{412}{\code {sys{\_}siglist}} -\entry {SIG{\_}DFL}{413}{\code {SIG{\_}DFL}} -\entry {SIG{\_}IGN}{413}{\code {SIG{\_}IGN}} -\entry {SIG{\_}ERR \relax }{415}{\code {SIG{\_}ERR \relax }} -\entry {SA{\_}NOCLDSTOP \relax }{419}{\code {SA{\_}NOCLDSTOP \relax }} -\entry {SA{\_}ONSTACK \relax }{419}{\code {SA{\_}ONSTACK \relax }} -\entry {SA{\_}RESTART \relax }{419}{\code {SA{\_}RESTART \relax }} -\entry {SIG{\_}BLOCK}{443}{\code {SIG{\_}BLOCK}} -\entry {SIG{\_}UNBLOCK}{443}{\code {SIG{\_}UNBLOCK}} -\entry {SIG{\_}SETMASK}{443}{\code {SIG{\_}SETMASK}} -\entry {SV{\_}ONSTACK \relax }{453}{\code {SV{\_}ONSTACK \relax }} -\entry {SV{\_}INTERRUPT \relax }{453}{\code {SV{\_}INTERRUPT \relax }} -\entry {SV{\_}RESETHAND \relax }{453}{\code {SV{\_}RESETHAND \relax }} -\entry {opterr \relax }{459}{\code {opterr \relax }} -\entry {optopt \relax }{459}{\code {optopt \relax }} -\entry {optind \relax }{459}{\code {optind \relax }} -\entry {optarg \relax }{459}{\code {optarg \relax }} -\entry {environ \relax }{468}{\code {environ \relax }} -\entry {EXIT{\_}SUCCESS \relax }{471}{\code {EXIT{\_}SUCCESS \relax }} -\entry {EXIT{\_}FAILURE \relax }{471}{\code {EXIT{\_}FAILURE \relax }} -\entry {L{\_}ctermid \relax }{509}{\code {L{\_}ctermid \relax }} -\entry {L{\_}cuserid \relax }{524}{\code {L{\_}cuserid \relax }} -\entry {ARG{\_}MAX \relax }{537}{\code {ARG{\_}MAX \relax }} -\entry {CHILD{\_}MAX \relax }{537}{\code {CHILD{\_}MAX \relax }} -\entry {OPEN{\_}MAX \relax }{537}{\code {OPEN{\_}MAX \relax }} -\entry {STREAM{\_}MAX \relax }{538}{\code {STREAM{\_}MAX \relax }} -\entry {TZNAME{\_}MAX \relax }{538}{\code {TZNAME{\_}MAX \relax }} -\entry {NGROUPS{\_}MAX \relax }{538}{\code {NGROUPS{\_}MAX \relax }} -\entry {SSIZE{\_}MAX \relax }{538}{\code {SSIZE{\_}MAX \relax }} -\entry {RE{\_}DUP{\_}MAX \relax }{538}{\code {RE{\_}DUP{\_}MAX \relax }} -\entry {{\_}POSIX{\_}JOB{\_}CONTROL \relax }{539}{\code {{\_}POSIX{\_}JOB{\_}CONTROL \relax }} -\entry {{\_}POSIX{\_}SAVED{\_}IDS \relax }{539}{\code {{\_}POSIX{\_}SAVED{\_}IDS \relax }} -\entry {{\_}POSIX2{\_}C{\_}DEV \relax }{539}{\code {{\_}POSIX2{\_}C{\_}DEV \relax }} -\entry {{\_}POSIX2{\_}FORT{\_}DEV \relax }{539}{\code {{\_}POSIX2{\_}FORT{\_}DEV \relax }} -\entry {{\_}POSIX2{\_}FORT{\_}RUN \relax }{540}{\code {{\_}POSIX2{\_}FORT{\_}RUN \relax }} -\entry {{\_}POSIX2{\_}LOCALEDEF \relax }{540}{\code {{\_}POSIX2{\_}LOCALEDEF \relax }} -\entry {{\_}POSIX2{\_}SW{\_}DEV \relax }{540}{\code {{\_}POSIX2{\_}SW{\_}DEV \relax }} -\entry {{\_}POSIX{\_}VERSION \relax }{540}{\code {{\_}POSIX{\_}VERSION \relax }} -\entry {{\_}POSIX2{\_}C{\_}VERSION \relax }{541}{\code {{\_}POSIX2{\_}C{\_}VERSION \relax }} -\entry {LINK{\_}MAX \relax }{546}{\code {LINK{\_}MAX \relax }} -\entry {MAX{\_}CANON \relax }{546}{\code {MAX{\_}CANON \relax }} -\entry {MAX{\_}INPUT \relax }{546}{\code {MAX{\_}INPUT \relax }} -\entry {NAME{\_}MAX \relax }{546}{\code {NAME{\_}MAX \relax }} -\entry {PATH{\_}MAX \relax }{546}{\code {PATH{\_}MAX \relax }} -\entry {PIPE{\_}BUF \relax }{546}{\code {PIPE{\_}BUF \relax }} -\entry {MAXNAMLEN \relax }{546}{\code {MAXNAMLEN \relax }} -\entry {FILENAME{\_}MAX \relax }{547}{\code {FILENAME{\_}MAX \relax }} -\entry {{\_}POSIX{\_}CHOWN{\_}RESTRICTED \relax }{547}{\code {{\_}POSIX{\_}CHOWN{\_}RESTRICTED \relax }} -\entry {{\_}POSIX{\_}NO{\_}TRUNC \relax }{547}{\code {{\_}POSIX{\_}NO{\_}TRUNC \relax }} -\entry {{\_}POSIX{\_}VDISABLE \relax }{548}{\code {{\_}POSIX{\_}VDISABLE \relax }} -\entry {BC{\_}BASE{\_}MAX \relax }{550}{\code {BC{\_}BASE{\_}MAX \relax }} -\entry {BC{\_}SCALE{\_}MAX \relax }{551}{\code {BC{\_}SCALE{\_}MAX \relax }} -\entry {BC{\_}DIM{\_}MAX \relax }{551}{\code {BC{\_}DIM{\_}MAX \relax }} -\entry {BC{\_}STRING{\_}MAX \relax }{551}{\code {BC{\_}STRING{\_}MAX \relax }} -\entry {BC{\_}DIM{\_}MAX \relax }{551}{\code {BC{\_}DIM{\_}MAX \relax }} -\entry {COLL{\_}WEIGHTS{\_}MAX \relax }{551}{\code {COLL{\_}WEIGHTS{\_}MAX \relax }} -\entry {EXPR{\_}NEST{\_}MAX \relax }{551}{\code {EXPR{\_}NEST{\_}MAX \relax }} -\entry {LINE{\_}MAX \relax }{551}{\code {LINE{\_}MAX \relax }} -\entry {NDEBUG}{555}{\code {NDEBUG}} -\entry {NULL \relax }{564}{\code {NULL \relax }} +\entry {ECONNABORTED \relax }{20}{\code {ECONNABORTED \relax }} +\entry {ECONNRESET \relax }{20}{\code {ECONNRESET \relax }} +\entry {ENOBUFS \relax }{20}{\code {ENOBUFS \relax }} +\entry {EISCONN \relax }{20}{\code {EISCONN \relax }} +\entry {ENOTCONN \relax }{20}{\code {ENOTCONN \relax }} +\entry {ESHUTDOWN \relax }{20}{\code {ESHUTDOWN \relax }} +\entry {ETIMEDOUT \relax }{20}{\code {ETIMEDOUT \relax }} +\entry {ECONNREFUSED \relax }{20}{\code {ECONNREFUSED \relax }} +\entry {ELOOP \relax }{20}{\code {ELOOP \relax }} +\entry {ENAMETOOLONG \relax }{20}{\code {ENAMETOOLONG \relax }} +\entry {EHOSTDOWN \relax }{21}{\code {EHOSTDOWN \relax }} +\entry {EHOSTUNREACH \relax }{21}{\code {EHOSTUNREACH \relax }} +\entry {ENOTEMPTY \relax }{21}{\code {ENOTEMPTY \relax }} +\entry {EUSERS \relax }{21}{\code {EUSERS \relax }} +\entry {EDQUOT \relax }{21}{\code {EDQUOT \relax }} +\entry {ESTALE \relax }{21}{\code {ESTALE \relax }} +\entry {EREMOTE \relax }{21}{\code {EREMOTE \relax }} +\entry {ENOLCK \relax }{21}{\code {ENOLCK \relax }} +\entry {ENOSYS \relax }{21}{\code {ENOSYS \relax }} +\entry {EBACKGROUND \relax }{21}{\code {EBACKGROUND \relax }} +\entry {ED \relax }{22}{\code {ED \relax }} +\entry {EGREGIOUS \relax }{22}{\code {EGREGIOUS \relax }} +\entry {EIEIO \relax }{22}{\code {EIEIO \relax }} +\entry {EGRATUITOUS \relax }{22}{\code {EGRATUITOUS \relax }} +\entry {program{\_}invocation{\_}name \relax }{23}{\code {program{\_}invocation{\_}name \relax }} +\entry {program{\_}invocation{\_}short{\_}name \relax }{23}{\code {program{\_}invocation{\_}short{\_}name \relax }} +\entry {{\_}{\_}malloc{\_}hook}{32}{\code {{\_}{\_}malloc{\_}hook}} +\entry {{\_}{\_}realloc{\_}hook}{32}{\code {{\_}{\_}realloc{\_}hook}} +\entry {{\_}{\_}free{\_}hook}{33}{\code {{\_}{\_}free{\_}hook}} +\entry {stdin \relax }{81}{\code {stdin \relax }} +\entry {stdout \relax }{82}{\code {stdout \relax }} +\entry {stderr \relax }{82}{\code {stderr \relax }} +\entry {FOPEN{\_}MAX \relax }{84}{\code {FOPEN{\_}MAX \relax }} +\entry {PA{\_}FLAG{\_}MASK \relax }{105}{\code {PA{\_}FLAG{\_}MASK \relax }} +\entry {PA{\_}INT}{105}{\code {PA{\_}INT}} +\entry {PA{\_}CHAR}{105}{\code {PA{\_}CHAR}} +\entry {PA{\_}STRING}{105}{\code {PA{\_}STRING}} +\entry {PA{\_}POINTER}{105}{\code {PA{\_}POINTER}} +\entry {PA{\_}FLOAT}{105}{\code {PA{\_}FLOAT}} +\entry {PA{\_}DOUBLE}{105}{\code {PA{\_}DOUBLE}} +\entry {PA{\_}LAST}{105}{\code {PA{\_}LAST}} +\entry {PA{\_}FLAG{\_}PTR}{105}{\code {PA{\_}FLAG{\_}PTR}} +\entry {PA{\_}FLAG{\_}SHORT}{105}{\code {PA{\_}FLAG{\_}SHORT}} +\entry {PA{\_}FLAG{\_}LONG}{105}{\code {PA{\_}FLAG{\_}LONG}} +\entry {PA{\_}FLAG{\_}LONG{\_}LONG}{106}{\code {PA{\_}FLAG{\_}LONG{\_}LONG}} +\entry {PA{\_}FLAG{\_}LONG{\_}DOUBLE}{106}{\code {PA{\_}FLAG{\_}LONG{\_}DOUBLE}} +\entry {EOF \relax }{122}{\code {EOF \relax }} +\entry {SEEK{\_}SET \relax }{124}{\code {SEEK{\_}SET \relax }} +\entry {SEEK{\_}CUR \relax }{124}{\code {SEEK{\_}CUR \relax }} +\entry {SEEK{\_}END \relax }{125}{\code {SEEK{\_}END \relax }} +\entry {L{\_}SET}{125}{\code {L{\_}SET}} +\entry {L{\_}INCR}{125}{\code {L{\_}INCR}} +\entry {L{\_}XTND}{125}{\code {L{\_}XTND}} +\entry {{\_}IOFBF \relax }{129}{\code {{\_}IOFBF \relax }} +\entry {{\_}IOLBF \relax }{129}{\code {{\_}IOLBF \relax }} +\entry {{\_}IONBF \relax }{129}{\code {{\_}IONBF \relax }} +\entry {BUFSIZ \relax }{129}{\code {BUFSIZ \relax }} +\entry {O{\_}RDONLY}{137}{\code {O{\_}RDONLY}} +\entry {O{\_}WRONLY}{137}{\code {O{\_}WRONLY}} +\entry {O{\_}RDWR}{137}{\code {O{\_}RDWR}} +\entry {O{\_}APPEND}{138}{\code {O{\_}APPEND}} +\entry {O{\_}CREAT}{138}{\code {O{\_}CREAT}} +\entry {O{\_}EXCL}{138}{\code {O{\_}EXCL}} +\entry {O{\_}NOCTTY}{138}{\code {O{\_}NOCTTY}} +\entry {O{\_}NONBLOCK}{138}{\code {O{\_}NONBLOCK}} +\entry {O{\_}TRUNC}{138}{\code {O{\_}TRUNC}} +\entry {STDIN{\_}FILENO}{146}{\code {STDIN{\_}FILENO}} +\entry {STDOUT{\_}FILENO}{146}{\code {STDOUT{\_}FILENO}} +\entry {STDERR{\_}FILENO}{146}{\code {STDERR{\_}FILENO}} +\entry {FD{\_}SETSIZE \relax }{149}{\code {FD{\_}SETSIZE \relax }} +\entry {F{\_}DUPFD \relax }{153}{\code {F{\_}DUPFD \relax }} +\entry {F{\_}GETFD \relax }{155}{\code {F{\_}GETFD \relax }} +\entry {F{\_}SETFD \relax }{155}{\code {F{\_}SETFD \relax }} +\entry {FD{\_}CLOEXEC \relax }{155}{\code {FD{\_}CLOEXEC \relax }} +\entry {F{\_}GETFL \relax }{156}{\code {F{\_}GETFL \relax }} +\entry {F{\_}SETFL \relax }{157}{\code {F{\_}SETFL \relax }} +\entry {O{\_}ACCMODE \relax }{157}{\code {O{\_}ACCMODE \relax }} +\entry {F{\_}GETLK \relax }{159}{\code {F{\_}GETLK \relax }} +\entry {F{\_}SETLK \relax }{160}{\code {F{\_}SETLK \relax }} +\entry {F{\_}SETLKW \relax }{161}{\code {F{\_}SETLKW \relax }} +\entry {F{\_}RDLCK}{161}{\code {F{\_}RDLCK}} +\entry {F{\_}WRLCK}{161}{\code {F{\_}WRLCK}} +\entry {F{\_}UNLCK}{161}{\code {F{\_}UNLCK}} +\entry {F{\_}GETOWN \relax }{162}{\code {F{\_}GETOWN \relax }} +\entry {F{\_}SETOWN \relax }{163}{\code {F{\_}SETOWN \relax }} +\entry {S{\_}IFMT \relax }{182}{\code {S{\_}IFMT \relax }} +\entry {S{\_}IFDIR}{182}{\code {S{\_}IFDIR}} +\entry {S{\_}IFCHR}{182}{\code {S{\_}IFCHR}} +\entry {S{\_}IFBLK}{182}{\code {S{\_}IFBLK}} +\entry {S{\_}IFREG}{182}{\code {S{\_}IFREG}} +\entry {S{\_}IFLNK}{182}{\code {S{\_}IFLNK}} +\entry {S{\_}IFSOCK}{182}{\code {S{\_}IFSOCK}} +\entry {S{\_}IFIFO}{182}{\code {S{\_}IFIFO}} +\entry {S{\_}IRUSR}{184}{\code {S{\_}IRUSR}} +\entry {S{\_}IREAD}{184}{\code {S{\_}IREAD}} +\entry {S{\_}IWUSR}{184}{\code {S{\_}IWUSR}} +\entry {S{\_}IWRITE}{184}{\code {S{\_}IWRITE}} +\entry {S{\_}IXUSR}{184}{\code {S{\_}IXUSR}} +\entry {S{\_}IEXEC}{184}{\code {S{\_}IEXEC}} +\entry {S{\_}IRWXU}{184}{\code {S{\_}IRWXU}} +\entry {S{\_}IRGRP}{184}{\code {S{\_}IRGRP}} +\entry {S{\_}IWGRP}{184}{\code {S{\_}IWGRP}} +\entry {S{\_}IXGRP}{184}{\code {S{\_}IXGRP}} +\entry {S{\_}IRWXG}{184}{\code {S{\_}IRWXG}} +\entry {S{\_}IROTH}{184}{\code {S{\_}IROTH}} +\entry {S{\_}IWOTH}{184}{\code {S{\_}IWOTH}} +\entry {S{\_}IXOTH}{184}{\code {S{\_}IXOTH}} +\entry {S{\_}IRWXO}{184}{\code {S{\_}IRWXO}} +\entry {S{\_}ISUID}{184}{\code {S{\_}ISUID}} +\entry {S{\_}ISGID}{185}{\code {S{\_}ISGID}} +\entry {S{\_}ISVTX}{185}{\code {S{\_}ISVTX}} +\entry {R{\_}OK \relax }{189}{\code {R{\_}OK \relax }} +\entry {W{\_}OK \relax }{189}{\code {W{\_}OK \relax }} +\entry {X{\_}OK \relax }{189}{\code {X{\_}OK \relax }} +\entry {F{\_}OK \relax }{189}{\code {F{\_}OK \relax }} +\entry {L{\_}tmpnam \relax }{192}{\code {L{\_}tmpnam \relax }} +\entry {TMP{\_}MAX \relax }{193}{\code {TMP{\_}MAX \relax }} +\entry {P{\_}tmpdir \relax }{193}{\code {P{\_}tmpdir \relax }} +\entry {SOCK{\_}STREAM \relax }{202}{\code {SOCK{\_}STREAM \relax }} +\entry {SOCK{\_}DGRAM \relax }{202}{\code {SOCK{\_}DGRAM \relax }} +\entry {SOCK{\_}RAW \relax }{203}{\code {SOCK{\_}RAW \relax }} +\entry {AF{\_}FILE}{204}{\code {AF{\_}FILE}} +\entry {AF{\_}UNIX}{204}{\code {AF{\_}UNIX}} +\entry {AF{\_}INET}{205}{\code {AF{\_}INET}} +\entry {AF{\_}UNSPEC}{205}{\code {AF{\_}UNSPEC}} +\entry {PF{\_}FILE \relax }{207}{\code {PF{\_}FILE \relax }} +\entry {PF{\_}UNIX \relax }{207}{\code {PF{\_}UNIX \relax }} +\entry {PF{\_}INET \relax }{209}{\code {PF{\_}INET \relax }} +\entry {INADDR{\_}LOOPBACK \relax }{212}{\code {INADDR{\_}LOOPBACK \relax }} +\entry {INADDR{\_}ANY \relax }{212}{\code {INADDR{\_}ANY \relax }} +\entry {INADDR{\_}BROADCAST \relax }{212}{\code {INADDR{\_}BROADCAST \relax }} +\entry {INADDR{\_}NONE \relax }{212}{\code {INADDR{\_}NONE \relax }} +\entry {h{\_}errno}{215}{\code {h{\_}errno}} +\entry {HOST{\_}NOT{\_}FOUND}{215}{\code {HOST{\_}NOT{\_}FOUND}} +\entry {TRY{\_}AGAIN}{215}{\code {TRY{\_}AGAIN}} +\entry {NO{\_}RECOVERY}{215}{\code {NO{\_}RECOVERY}} +\entry {NO{\_}ADDRESS}{215}{\code {NO{\_}ADDRESS}} +\entry {IPPORT{\_}RESERVED \relax }{216}{\code {IPPORT{\_}RESERVED \relax }} +\entry {IPPORT{\_}USERRESERVED \relax }{216}{\code {IPPORT{\_}USERRESERVED \relax }} +\entry {PF{\_}NS}{222}{\code {PF{\_}NS}} +\entry {PF{\_}ISO}{222}{\code {PF{\_}ISO}} +\entry {PF{\_}CCITT}{222}{\code {PF{\_}CCITT}} +\entry {PF{\_}IMPLINK}{222}{\code {PF{\_}IMPLINK}} +\entry {PF{\_}ROUTE}{222}{\code {PF{\_}ROUTE}} +\entry {MSG{\_}OOB \relax }{231}{\code {MSG{\_}OOB \relax }} +\entry {MSG{\_}PEEK \relax }{231}{\code {MSG{\_}PEEK \relax }} +\entry {MSG{\_}DONTROUTE \relax }{231}{\code {MSG{\_}DONTROUTE \relax }} +\entry {SOL{\_}SOCKET \relax }{245}{\code {SOL{\_}SOCKET \relax }} +\entry {NCCS \relax }{252}{\code {NCCS \relax }} +\entry {TCSANOW}{252}{\code {TCSANOW}} +\entry {TCSADRAIN}{252}{\code {TCSADRAIN}} +\entry {TCSAFLUSH}{252}{\code {TCSAFLUSH}} +\entry {TCSASOFT}{253}{\code {TCSASOFT}} +\entry {INPCK}{255}{\code {INPCK}} +\entry {IGNPAR}{255}{\code {IGNPAR}} +\entry {PARMRK}{255}{\code {PARMRK}} +\entry {ISTRIP}{255}{\code {ISTRIP}} +\entry {IGNBRK}{255}{\code {IGNBRK}} +\entry {BRKINT}{255}{\code {BRKINT}} +\entry {IGNCR}{256}{\code {IGNCR}} +\entry {ICRNL}{256}{\code {ICRNL}} +\entry {INLCR}{256}{\code {INLCR}} +\entry {IXOFF}{256}{\code {IXOFF}} +\entry {IXON}{256}{\code {IXON}} +\entry {OPOST \relax }{257}{\code {OPOST \relax }} +\entry {ONLCR \relax }{257}{\code {ONLCR \relax }} +\entry {OXTABS \relax }{257}{\code {OXTABS \relax }} +\entry {ONOEOT \relax }{257}{\code {ONOEOT \relax }} +\entry {CLOCAL}{257}{\code {CLOCAL}} +\entry {HUPCL}{258}{\code {HUPCL}} +\entry {CREAD}{258}{\code {CREAD}} +\entry {CSTOPB}{258}{\code {CSTOPB}} +\entry {PARENB}{258}{\code {PARENB}} +\entry {PARODD}{258}{\code {PARODD}} +\entry {CSIZE}{258}{\code {CSIZE}} +\entry {CS5}{258}{\code {CS5}} +\entry {CS6}{258}{\code {CS6}} +\entry {CS7}{258}{\code {CS7}} +\entry {CS8}{258}{\code {CS8}} +\entry {CCTS{\_}OFLOW}{258}{\code {CCTS{\_}OFLOW}} +\entry {CRTS{\_}IFLOW}{258}{\code {CRTS{\_}IFLOW}} +\entry {MDMBUF}{258}{\code {MDMBUF}} +\entry {ICANON}{259}{\code {ICANON}} +\entry {ECHO}{259}{\code {ECHO}} +\entry {ECHOE}{259}{\code {ECHOE}} +\entry {ECHOK}{259}{\code {ECHOK}} +\entry {ECHONL}{259}{\code {ECHONL}} +\entry {ISIG}{259}{\code {ISIG}} +\entry {IEXTEN}{260}{\code {IEXTEN}} +\entry {NOFLSH}{260}{\code {NOFLSH}} +\entry {TOSTOP}{260}{\code {TOSTOP}} +\entry {ECHOKE}{260}{\code {ECHOKE}} +\entry {ECHOPRT}{260}{\code {ECHOPRT}} +\entry {ECHOCTL}{260}{\code {ECHOCTL}} +\entry {ALTWERASE}{260}{\code {ALTWERASE}} +\entry {FLUSHO}{260}{\code {FLUSHO}} +\entry {NOKERNINFO}{261}{\code {NOKERNINFO}} +\entry {PENDIN}{261}{\code {PENDIN}} +\entry {B0}{262}{\code {B0}} +\entry {B50}{262}{\code {B50}} +\entry {B75}{262}{\code {B75}} +\entry {B110}{262}{\code {B110}} +\entry {B134}{262}{\code {B134}} +\entry {B150}{262}{\code {B150}} +\entry {B200}{262}{\code {B200}} +\entry {B300}{262}{\code {B300}} +\entry {B600}{262}{\code {B600}} +\entry {B1200}{262}{\code {B1200}} +\entry {B1800}{262}{\code {B1800}} +\entry {B2400}{262}{\code {B2400}} +\entry {B4800}{262}{\code {B4800}} +\entry {B9600}{262}{\code {B9600}} +\entry {B19200}{262}{\code {B19200}} +\entry {B38400}{262}{\code {B38400}} +\entry {EXTA}{262}{\code {EXTA}} +\entry {EXTB}{262}{\code {EXTB}} +\entry {{\_}POSIX{\_}VDISABLE}{263}{\code {{\_}POSIX{\_}VDISABLE}} +\entry {VEOF \relax }{263}{\code {VEOF \relax }} +\entry {VEOL \relax }{264}{\code {VEOL \relax }} +\entry {VERASE \relax }{264}{\code {VERASE \relax }} +\entry {VKILL \relax }{264}{\code {VKILL \relax }} +\entry {VEOL2 \relax }{264}{\code {VEOL2 \relax }} +\entry {VWERASE \relax }{265}{\code {VWERASE \relax }} +\entry {VREPRINT \relax }{265}{\code {VREPRINT \relax }} +\entry {VLNEXT \relax }{265}{\code {VLNEXT \relax }} +\entry {VINTR \relax }{265}{\code {VINTR \relax }} +\entry {VQUIT \relax }{266}{\code {VQUIT \relax }} +\entry {VSUSP \relax }{266}{\code {VSUSP \relax }} +\entry {VDSUSP \relax }{266}{\code {VDSUSP \relax }} +\entry {VSTART \relax }{267}{\code {VSTART \relax }} +\entry {VSTOP \relax }{267}{\code {VSTOP \relax }} +\entry {VDISCARD \relax }{267}{\code {VDISCARD \relax }} +\entry {VSTATUS \relax }{268}{\code {VSTATUS \relax }} +\entry {VMIN \relax }{268}{\code {VMIN \relax }} +\entry {VTIME \relax }{268}{\code {VTIME \relax }} +\entry {TCIFLUSH}{270}{\code {TCIFLUSH}} +\entry {TCOFLUSH}{270}{\code {TCOFLUSH}} +\entry {TCIOFLUSH}{270}{\code {TCIOFLUSH}} +\entry {TCOOFF}{271}{\code {TCOOFF}} +\entry {TCOON}{271}{\code {TCOON}} +\entry {TCIOFF}{271}{\code {TCIOFF}} +\entry {TCION}{271}{\code {TCION}} +\entry {EBADF}{271}{\code {EBADF}} +\entry {ENOTTY}{271}{\code {ENOTTY}} +\entry {EINVAL}{271}{\code {EINVAL}} +\entry {HUGE{\_}VAL \relax }{276}{\code {HUGE{\_}VAL \relax }} +\entry {RAND{\_}MAX \relax }{280}{\code {RAND{\_}MAX \relax }} +\entry {NAN \relax }{283}{\code {NAN \relax }} +\entry {CLOCKS{\_}PER{\_}SEC \relax }{316}{\code {CLOCKS{\_}PER{\_}SEC \relax }} +\entry {CLK{\_}TCK \relax }{316}{\code {CLK{\_}TCK \relax }} +\entry {* tzname [2] \relax }{327}{\code {* tzname [2] \relax }} +\entry {timezone \relax }{328}{\code {timezone \relax }} +\entry {daylight \relax }{328}{\code {daylight \relax }} +\entry {RLIMIT{\_}CPU}{334}{\code {RLIMIT{\_}CPU}} +\entry {RLIMIT{\_}FSIZE}{335}{\code {RLIMIT{\_}FSIZE}} +\entry {RLIMIT{\_}DATA}{335}{\code {RLIMIT{\_}DATA}} +\entry {RLIMIT{\_}STACK}{335}{\code {RLIMIT{\_}STACK}} +\entry {RLIMIT{\_}CORE}{335}{\code {RLIMIT{\_}CORE}} +\entry {RLIMIT{\_}RSS}{335}{\code {RLIMIT{\_}RSS}} +\entry {RLIMIT{\_}OPEN{\_}FILES}{335}{\code {RLIMIT{\_}OPEN{\_}FILES}} +\entry {RLIM{\_}NLIMITS}{335}{\code {RLIM{\_}NLIMITS}} +\entry {int}{335}{\code {int}} +\entry {PRIO{\_}MIN}{336}{\code {PRIO{\_}MIN}} +\entry {PRIO{\_}MAX}{336}{\code {PRIO{\_}MAX}} +\entry {PRIO{\_}PROCESS}{336}{\code {PRIO{\_}PROCESS}} +\entry {PRIO{\_}PGRP}{337}{\code {PRIO{\_}PGRP}} +\entry {PRIO{\_}USER}{337}{\code {PRIO{\_}USER}} +\entry {MB{\_}LEN{\_}MAX \relax }{342}{\code {MB{\_}LEN{\_}MAX \relax }} +\entry {MB{\_}CUR{\_}MAX \relax }{342}{\code {MB{\_}CUR{\_}MAX \relax }} +\entry {LC{\_}COLLATE}{352}{\code {LC{\_}COLLATE}} +\entry {LC{\_}CTYPE}{352}{\code {LC{\_}CTYPE}} +\entry {LC{\_}MONETARY}{353}{\code {LC{\_}MONETARY}} +\entry {LC{\_}NUMERIC}{353}{\code {LC{\_}NUMERIC}} +\entry {LC{\_}TIME}{353}{\code {LC{\_}TIME}} +\entry {LC{\_}ALL}{353}{\code {LC{\_}ALL}} +\entry {LANG}{353}{\code {LANG}} +\entry {NSIG \relax }{368}{\code {NSIG \relax }} +\entry {COREFILE}{368}{\code {COREFILE}} +\entry {SIGFPE \relax }{368}{\code {SIGFPE \relax }} +\entry {FPE{\_}INTOVF{\_}TRAP}{369}{\code {FPE{\_}INTOVF{\_}TRAP}} +\entry {FPE{\_}INTDIV{\_}TRAP}{369}{\code {FPE{\_}INTDIV{\_}TRAP}} +\entry {FPE{\_}SUBRNG{\_}TRAP}{369}{\code {FPE{\_}SUBRNG{\_}TRAP}} +\entry {FPE{\_}FLTOVF{\_}TRAP}{369}{\code {FPE{\_}FLTOVF{\_}TRAP}} +\entry {FPE{\_}FLTDIV{\_}TRAP}{369}{\code {FPE{\_}FLTDIV{\_}TRAP}} +\entry {FPE{\_}FLTUND{\_}TRAP}{369}{\code {FPE{\_}FLTUND{\_}TRAP}} +\entry {FPE{\_}DECOVF{\_}TRAP}{369}{\code {FPE{\_}DECOVF{\_}TRAP}} +\entry {SIGILL \relax }{369}{\code {SIGILL \relax }} +\entry {SIGSEGV \relax }{370}{\code {SIGSEGV \relax }} +\entry {SIGBUS \relax }{370}{\code {SIGBUS \relax }} +\entry {SIGABRT \relax }{370}{\code {SIGABRT \relax }} +\entry {SIGHUP \relax }{371}{\code {SIGHUP \relax }} +\entry {SIGINT \relax }{371}{\code {SIGINT \relax }} +\entry {SIGQUIT \relax }{371}{\code {SIGQUIT \relax }} +\entry {SIGTERM \relax }{372}{\code {SIGTERM \relax }} +\entry {SIGKILL \relax }{372}{\code {SIGKILL \relax }} +\entry {SIGALRM \relax }{372}{\code {SIGALRM \relax }} +\entry {SIGVTALRM \relax }{372}{\code {SIGVTALRM \relax }} +\entry {SIGPROF \relax }{372}{\code {SIGPROF \relax }} +\entry {SIGIO \relax }{373}{\code {SIGIO \relax }} +\entry {SIGURG \relax }{373}{\code {SIGURG \relax }} +\entry {SIGCHLD \relax }{373}{\code {SIGCHLD \relax }} +\entry {SIGCONT \relax }{373}{\code {SIGCONT \relax }} +\entry {SIGSTOP \relax }{374}{\code {SIGSTOP \relax }} +\entry {SIGTSTP \relax }{374}{\code {SIGTSTP \relax }} +\entry {SIGTTIN \relax }{374}{\code {SIGTTIN \relax }} +\entry {SIGTTOU \relax }{374}{\code {SIGTTOU \relax }} +\entry {SIGPIPE \relax }{375}{\code {SIGPIPE \relax }} +\entry {SIGUSR1 \relax }{375}{\code {SIGUSR1 \relax }} +\entry {SIGUSR2 \relax }{375}{\code {SIGUSR2 \relax }} +\entry {sys{\_}siglist}{377}{\code {sys{\_}siglist}} +\entry {SIG{\_}DFL}{378}{\code {SIG{\_}DFL}} +\entry {SIG{\_}IGN}{378}{\code {SIG{\_}IGN}} +\entry {SIG{\_}ERR \relax }{380}{\code {SIG{\_}ERR \relax }} +\entry {SA{\_}NOCLDSTOP \relax }{383}{\code {SA{\_}NOCLDSTOP \relax }} +\entry {SA{\_}ONSTACK \relax }{383}{\code {SA{\_}ONSTACK \relax }} +\entry {SA{\_}RESTART \relax }{383}{\code {SA{\_}RESTART \relax }} +\entry {SIG{\_}BLOCK}{405}{\code {SIG{\_}BLOCK}} +\entry {SIG{\_}UNBLOCK}{405}{\code {SIG{\_}UNBLOCK}} +\entry {SIG{\_}SETMASK}{405}{\code {SIG{\_}SETMASK}} +\entry {SV{\_}ONSTACK \relax }{414}{\code {SV{\_}ONSTACK \relax }} +\entry {SV{\_}INTERRUPT \relax }{415}{\code {SV{\_}INTERRUPT \relax }} +\entry {SV{\_}RESETHAND \relax }{415}{\code {SV{\_}RESETHAND \relax }} +\entry {SIGSTKSZ}{417}{\code {SIGSTKSZ}} +\entry {MINSIGSTKSZ}{417}{\code {MINSIGSTKSZ}} +\entry {SA{\_}DISABLE}{417}{\code {SA{\_}DISABLE}} +\entry {SA{\_}ONSTACK}{417}{\code {SA{\_}ONSTACK}} +\entry {opterr \relax }{421}{\code {opterr \relax }} +\entry {optopt \relax }{421}{\code {optopt \relax }} +\entry {optind \relax }{421}{\code {optind \relax }} +\entry {optarg \relax }{421}{\code {optarg \relax }} +\entry {environ \relax }{429}{\code {environ \relax }} +\entry {EXIT{\_}SUCCESS \relax }{432}{\code {EXIT{\_}SUCCESS \relax }} +\entry {EXIT{\_}FAILURE \relax }{433}{\code {EXIT{\_}FAILURE \relax }} +\entry {L{\_}ctermid \relax }{468}{\code {L{\_}ctermid \relax }} +\entry {L{\_}cuserid \relax }{483}{\code {L{\_}cuserid \relax }} +\entry {ARG{\_}MAX \relax }{495}{\code {ARG{\_}MAX \relax }} +\entry {CHILD{\_}MAX \relax }{495}{\code {CHILD{\_}MAX \relax }} +\entry {OPEN{\_}MAX \relax }{495}{\code {OPEN{\_}MAX \relax }} +\entry {STREAM{\_}MAX \relax }{495}{\code {STREAM{\_}MAX \relax }} +\entry {TZNAME{\_}MAX \relax }{496}{\code {TZNAME{\_}MAX \relax }} +\entry {NGROUPS{\_}MAX \relax }{496}{\code {NGROUPS{\_}MAX \relax }} +\entry {SSIZE{\_}MAX \relax }{496}{\code {SSIZE{\_}MAX \relax }} +\entry {RE{\_}DUP{\_}MAX \relax }{496}{\code {RE{\_}DUP{\_}MAX \relax }} +\entry {{\_}POSIX{\_}JOB{\_}CONTROL \relax }{497}{\code {{\_}POSIX{\_}JOB{\_}CONTROL \relax }} +\entry {{\_}POSIX{\_}SAVED{\_}IDS \relax }{497}{\code {{\_}POSIX{\_}SAVED{\_}IDS \relax }} +\entry {{\_}POSIX2{\_}C{\_}DEV \relax }{497}{\code {{\_}POSIX2{\_}C{\_}DEV \relax }} +\entry {{\_}POSIX2{\_}FORT{\_}DEV \relax }{497}{\code {{\_}POSIX2{\_}FORT{\_}DEV \relax }} +\entry {{\_}POSIX2{\_}FORT{\_}RUN \relax }{497}{\code {{\_}POSIX2{\_}FORT{\_}RUN \relax }} +\entry {{\_}POSIX2{\_}LOCALEDEF \relax }{498}{\code {{\_}POSIX2{\_}LOCALEDEF \relax }} +\entry {{\_}POSIX2{\_}SW{\_}DEV \relax }{498}{\code {{\_}POSIX2{\_}SW{\_}DEV \relax }} +\entry {{\_}POSIX{\_}VERSION \relax }{498}{\code {{\_}POSIX{\_}VERSION \relax }} +\entry {{\_}POSIX2{\_}C{\_}VERSION \relax }{498}{\code {{\_}POSIX2{\_}C{\_}VERSION \relax }} +\entry {LINK{\_}MAX \relax }{503}{\code {LINK{\_}MAX \relax }} +\entry {MAX{\_}CANON \relax }{503}{\code {MAX{\_}CANON \relax }} +\entry {MAX{\_}INPUT \relax }{503}{\code {MAX{\_}INPUT \relax }} +\entry {NAME{\_}MAX \relax }{503}{\code {NAME{\_}MAX \relax }} +\entry {PATH{\_}MAX \relax }{504}{\code {PATH{\_}MAX \relax }} +\entry {PIPE{\_}BUF \relax }{504}{\code {PIPE{\_}BUF \relax }} +\entry {MAXNAMLEN \relax }{504}{\code {MAXNAMLEN \relax }} +\entry {FILENAME{\_}MAX \relax }{504}{\code {FILENAME{\_}MAX \relax }} +\entry {{\_}POSIX{\_}CHOWN{\_}RESTRICTED \relax }{505}{\code {{\_}POSIX{\_}CHOWN{\_}RESTRICTED \relax }} +\entry {{\_}POSIX{\_}NO{\_}TRUNC \relax }{505}{\code {{\_}POSIX{\_}NO{\_}TRUNC \relax }} +\entry {{\_}POSIX{\_}VDISABLE \relax }{505}{\code {{\_}POSIX{\_}VDISABLE \relax }} +\entry {BC{\_}BASE{\_}MAX \relax }{508}{\code {BC{\_}BASE{\_}MAX \relax }} +\entry {BC{\_}SCALE{\_}MAX \relax }{508}{\code {BC{\_}SCALE{\_}MAX \relax }} +\entry {BC{\_}DIM{\_}MAX \relax }{508}{\code {BC{\_}DIM{\_}MAX \relax }} +\entry {BC{\_}STRING{\_}MAX \relax }{508}{\code {BC{\_}STRING{\_}MAX \relax }} +\entry {BC{\_}DIM{\_}MAX \relax }{508}{\code {BC{\_}DIM{\_}MAX \relax }} +\entry {COLL{\_}WEIGHTS{\_}MAX \relax }{508}{\code {COLL{\_}WEIGHTS{\_}MAX \relax }} +\entry {EXPR{\_}NEST{\_}MAX \relax }{508}{\code {EXPR{\_}NEST{\_}MAX \relax }} +\entry {LINE{\_}MAX \relax }{508}{\code {LINE{\_}MAX \relax }} +\entry {EQUIV{\_}CLASS{\_}MAX \relax }{508}{\code {EQUIV{\_}CLASS{\_}MAX \relax }} +\entry {NDEBUG}{511}{\code {NDEBUG}} +\entry {NULL \relax }{519}{\code {NULL \relax }} diff -ruN glibc-1.06/manual/libc.vrs glibc-1.07/manual/libc.vrs --- glibc-1.06/manual/libc.vrs Mon May 17 16:59:15 1993 +++ glibc-1.07/manual/libc.vrs Wed Dec 29 18:34:49 1993 @@ -1,442 +1,453 @@ \initial {*} -\entry {\code {*tzname[2] \relax }}{380} +\entry {\code {* tzname [2] \relax }}{327} \initial {{\_}} -\entry {\code {{\_}{\_}free{\_}hook}}{35} -\entry {\code {{\_}{\_}malloc{\_}hook}}{35} -\entry {\code {{\_}{\_}realloc{\_}hook}}{35} -\entry {\code {{\_}BSD{\_}SOURCE}}{9} -\entry {\code {{\_}GNU{\_}SOURCE}}{10} -\entry {\code {{\_}IOFBF \relax }}{188} -\entry {\code {{\_}IOLBF \relax }}{188} -\entry {\code {{\_}IONBF \relax }}{188} -\entry {\code {{\_}POSIX{\_}C{\_}SOURCE}}{9} -\entry {\code {{\_}POSIX{\_}CHOWN{\_}RESTRICTED \relax }}{547} -\entry {\code {{\_}POSIX{\_}JOB{\_}CONTROL \relax }}{539} -\entry {\code {{\_}POSIX{\_}NO{\_}TRUNC \relax }}{547} -\entry {\code {{\_}POSIX{\_}SAVED{\_}IDS \relax }}{539} -\entry {\code {{\_}POSIX{\_}SOURCE}}{9} -\entry {\code {{\_}POSIX{\_}VDISABLE}}{331} -\entry {\code {{\_}POSIX{\_}VDISABLE \relax }}{548} -\entry {\code {{\_}POSIX{\_}VERSION \relax }}{540} -\entry {\code {{\_}POSIX2{\_}C{\_}DEV \relax }}{539} -\entry {\code {{\_}POSIX2{\_}C{\_}VERSION \relax }}{541} -\entry {\code {{\_}POSIX2{\_}FORT{\_}DEV \relax }}{539} -\entry {\code {{\_}POSIX2{\_}FORT{\_}RUN \relax }}{540} -\entry {\code {{\_}POSIX2{\_}LOCALEDEF \relax }}{540} -\entry {\code {{\_}POSIX2{\_}SW{\_}DEV \relax }}{540} +\entry {\code {{\_}{\_}free{\_}hook}}{33} +\entry {\code {{\_}{\_}malloc{\_}hook}}{32} +\entry {\code {{\_}{\_}realloc{\_}hook}}{32} +\entry {\code {{\_}BSD{\_}SOURCE}}{8} +\entry {\code {{\_}GNU{\_}SOURCE}}{9} +\entry {\code {{\_}IOFBF \relax }}{129} +\entry {\code {{\_}IOLBF \relax }}{129} +\entry {\code {{\_}IONBF \relax }}{129} +\entry {\code {{\_}POSIX{\_}C{\_}SOURCE}}{8} +\entry {\code {{\_}POSIX{\_}CHOWN{\_}RESTRICTED \relax }}{505} +\entry {\code {{\_}POSIX{\_}JOB{\_}CONTROL \relax }}{497} +\entry {\code {{\_}POSIX{\_}NO{\_}TRUNC \relax }}{505} +\entry {\code {{\_}POSIX{\_}SAVED{\_}IDS \relax }}{497} +\entry {\code {{\_}POSIX{\_}SOURCE}}{8} +\entry {\code {{\_}POSIX{\_}VDISABLE}}{263} +\entry {\code {{\_}POSIX{\_}VDISABLE \relax }}{505} +\entry {\code {{\_}POSIX{\_}VERSION \relax }}{498} +\entry {\code {{\_}POSIX2{\_}C{\_}DEV \relax }}{497} +\entry {\code {{\_}POSIX2{\_}C{\_}VERSION \relax }}{498} +\entry {\code {{\_}POSIX2{\_}FORT{\_}DEV \relax }}{497} +\entry {\code {{\_}POSIX2{\_}FORT{\_}RUN \relax }}{497} +\entry {\code {{\_}POSIX2{\_}LOCALEDEF \relax }}{498} +\entry {\code {{\_}POSIX2{\_}SW{\_}DEV \relax }}{498} \entry {\code {{\_}SVID{\_}SOURCE}}{9} \initial {A} -\entry {\code {AF{\_}FILE}}{269} -\entry {\code {AF{\_}INET}}{269} -\entry {\code {AF{\_}UNIX}}{269} -\entry {\code {AF{\_}UNSPEC}}{269} -\entry {\code {ALTWERASE}}{329} -\entry {\code {ARG{\_}MAX \relax }}{537} +\entry {\code {AF{\_}FILE}}{204} +\entry {\code {AF{\_}INET}}{205} +\entry {\code {AF{\_}UNIX}}{204} +\entry {\code {AF{\_}UNSPEC}}{205} +\entry {\code {ALTWERASE}}{260} +\entry {\code {ARG{\_}MAX \relax }}{495} \initial {B} -\entry {\code {B0}}{331} -\entry {\code {B110}}{331} -\entry {\code {B1200}}{331} -\entry {\code {B134}}{331} -\entry {\code {B150}}{331} -\entry {\code {B1800}}{331} -\entry {\code {B19200}}{331} -\entry {\code {B200}}{331} -\entry {\code {B2400}}{331} -\entry {\code {B300}}{331} -\entry {\code {B38400}}{331} -\entry {\code {B4800}}{331} -\entry {\code {B50}}{331} -\entry {\code {B600}}{331} -\entry {\code {B75}}{331} -\entry {\code {B9600}}{331} -\entry {\code {BC{\_}BASE{\_}MAX \relax }}{550} -\entry {\code {BC{\_}DIM{\_}MAX \relax }}{551} -\entry {\code {BC{\_}SCALE{\_}MAX \relax }}{551} -\entry {\code {BC{\_}STRING{\_}MAX \relax }}{551} -\entry {\code {BRKINT}}{324} -\entry {\code {BUFSIZ \relax }}{188} +\entry {\code {B0}}{262} +\entry {\code {B110}}{262} +\entry {\code {B1200}}{262} +\entry {\code {B134}}{262} +\entry {\code {B150}}{262} +\entry {\code {B1800}}{262} +\entry {\code {B19200}}{262} +\entry {\code {B200}}{262} +\entry {\code {B2400}}{262} +\entry {\code {B300}}{262} +\entry {\code {B38400}}{262} +\entry {\code {B4800}}{262} +\entry {\code {B50}}{262} +\entry {\code {B600}}{262} +\entry {\code {B75}}{262} +\entry {\code {B9600}}{262} +\entry {\code {BC{\_}BASE{\_}MAX \relax }}{508} +\entry {\code {BC{\_}DIM{\_}MAX \relax }}{508} +\entry {\code {BC{\_}SCALE{\_}MAX \relax }}{508} +\entry {\code {BC{\_}STRING{\_}MAX \relax }}{508} +\entry {\code {BRKINT}}{255} +\entry {\code {BUFSIZ \relax }}{129} \initial {C} -\entry {\code {CCTS{\_}OFLOW}}{327} -\entry {\code {CHILD{\_}MAX \relax }}{537} -\entry {\code {CLK{\_}TCK \relax }}{368} -\entry {\code {CLOCAL}}{326} -\entry {\code {CLOCKS{\_}PER{\_}SEC \relax }}{368} -\entry {\code {COLL{\_}WEIGHTS{\_}MAX \relax }}{551} -\entry {\code {COREFILE}}{403} -\entry {\code {CREAD}}{326} -\entry {\code {CRTS{\_}IFLOW}}{327} -\entry {\code {CS5}}{327} -\entry {\code {CS6}}{327} -\entry {\code {CS7}}{327} -\entry {\code {CS8}}{327} -\entry {\code {CSIZE}}{327} -\entry {\code {CSTOPB}}{326} +\entry {\code {CCTS{\_}OFLOW}}{258} +\entry {\code {CHILD{\_}MAX \relax }}{495} +\entry {\code {CLK{\_}TCK \relax }}{316} +\entry {\code {CLOCAL}}{257} +\entry {\code {CLOCKS{\_}PER{\_}SEC \relax }}{316} +\entry {\code {COLL{\_}WEIGHTS{\_}MAX \relax }}{508} +\entry {\code {COREFILE}}{368} +\entry {\code {CREAD}}{258} +\entry {\code {CRTS{\_}IFLOW}}{258} +\entry {\code {CS5}}{258} +\entry {\code {CS6}}{258} +\entry {\code {CS7}}{258} +\entry {\code {CS8}}{258} +\entry {\code {CSIZE}}{258} +\entry {\code {CSTOPB}}{258} \initial {D} -\entry {\code {daylight \relax }}{381} +\entry {\code {daylight \relax }}{328} \initial {E} \entry {\code {E2BIG \relax }}{15} \entry {\code {EACCES \relax }}{16} -\entry {\code {EADDRINUSE \relax }}{20} -\entry {\code {EADDRNOTAVAIL \relax }}{20} -\entry {\code {EAFNOSUPPORT \relax }}{20} +\entry {\code {EADDRINUSE \relax }}{19} +\entry {\code {EADDRNOTAVAIL \relax }}{19} +\entry {\code {EAFNOSUPPORT \relax }}{19} \entry {\code {EAGAIN \relax }}{18} -\entry {\code {EALREADY \relax }}{19} -\entry {\code {EBADF}}{341} -\entry {\code {EBADF \relax }}{16} +\entry {\code {EALREADY \relax }}{18} +\entry {\code {EBACKGROUND \relax }}{21} +\entry {\code {EBADF}}{271} +\entry {\code {EBADF \relax }}{15} \entry {\code {EBUSY \relax }}{16} -\entry {\code {ECHILD \relax }}{16} -\entry {\code {ECHO}}{327} -\entry {\code {ECHOCTL}}{329} -\entry {\code {ECHOE}}{327} -\entry {\code {ECHOK}}{328} -\entry {\code {ECHOKE}}{329} -\entry {\code {ECHONL}}{328} -\entry {\code {ECHOPRT}}{329} -\entry {\code {ECONNABORTED \relax }}{21} -\entry {\code {ECONNREFUSED \relax }}{21} -\entry {\code {ECONNRESET \relax }}{21} -\entry {\code {ED \relax }}{23} +\entry {\code {ECHILD \relax }}{15} +\entry {\code {ECHO}}{259} +\entry {\code {ECHOCTL}}{260} +\entry {\code {ECHOE}}{259} +\entry {\code {ECHOK}}{259} +\entry {\code {ECHOKE}}{260} +\entry {\code {ECHONL}}{259} +\entry {\code {ECHOPRT}}{260} +\entry {\code {ECONNABORTED \relax }}{20} +\entry {\code {ECONNREFUSED \relax }}{20} +\entry {\code {ECONNRESET \relax }}{20} +\entry {\code {ED \relax }}{22} \entry {\code {EDEADLK \relax }}{16} \entry {\code {EDESTADDRREQ \relax }}{19} \entry {\code {EDOM \relax }}{18} -\entry {\code {EDQUOT \relax }}{22} +\entry {\code {EDQUOT \relax }}{21} \entry {\code {EEXIST \relax }}{16} \entry {\code {EFAULT \relax }}{16} -\entry {\code {EFBIG \relax }}{18} -\entry {\code {EGRATUITOUS \relax }}{23} -\entry {\code {EHOSTDOWN \relax }}{22} -\entry {\code {EHOSTUNREACH \relax }}{22} -\entry {\code {EINPROGRESS \relax }}{19} +\entry {\code {EFBIG \relax }}{17} +\entry {\code {EGRATUITOUS \relax }}{22} +\entry {\code {EGREGIOUS \relax }}{22} +\entry {\code {EHOSTDOWN \relax }}{21} +\entry {\code {EHOSTUNREACH \relax }}{21} +\entry {\code {EIEIO \relax }}{22} +\entry {\code {EINPROGRESS \relax }}{18} \entry {\code {EINTR \relax }}{15} -\entry {\code {EINVAL}}{341} +\entry {\code {EINVAL}}{271} \entry {\code {EINVAL \relax }}{17} \entry {\code {EIO \relax }}{15} -\entry {\code {EISCONN \relax }}{21} +\entry {\code {EISCONN \relax }}{20} \entry {\code {EISDIR \relax }}{17} -\entry {\code {ELOOP \relax }}{21} +\entry {\code {ELOOP \relax }}{20} \entry {\code {EMFILE \relax }}{17} -\entry {\code {EMLINK \relax }}{18} +\entry {\code {EMLINK \relax }}{17} \entry {\code {EMSGSIZE \relax }}{19} -\entry {\code {ENAMETOOLONG \relax }}{22} +\entry {\code {ENAMETOOLONG \relax }}{20} \entry {\code {ENETDOWN \relax }}{20} \entry {\code {ENETRESET \relax }}{20} \entry {\code {ENETUNREACH \relax }}{20} \entry {\code {ENFILE \relax }}{17} -\entry {\code {ENOBUFS \relax }}{21} -\entry {\code {ENODEV \relax }}{17} -\entry {\code {ENOENT \relax }}{15} -\entry {\code {ENOEXEC \relax }}{16} -\entry {\code {ENOLCK \relax }}{22} +\entry {\code {ENOBUFS \relax }}{20} +\entry {\code {ENODEV \relax }}{16} +\entry {\code {ENOENT \relax }}{14} +\entry {\code {ENOEXEC \relax }}{15} +\entry {\code {ENOLCK \relax }}{21} \entry {\code {ENOMEM \relax }}{16} \entry {\code {ENOPROTOOPT \relax }}{19} -\entry {\code {ENOSPC \relax }}{18} -\entry {\code {ENOSYS \relax }}{22} +\entry {\code {ENOSPC \relax }}{17} +\entry {\code {ENOSYS \relax }}{21} \entry {\code {ENOTBLK \relax }}{16} -\entry {\code {ENOTCONN \relax }}{21} -\entry {\code {ENOTDIR \relax }}{17} -\entry {\code {ENOTEMPTY \relax }}{22} -\entry {\code {ENOTSOCK \relax }}{19} -\entry {\code {ENOTTY}}{341} +\entry {\code {ENOTCONN \relax }}{20} +\entry {\code {ENOTDIR \relax }}{16} +\entry {\code {ENOTEMPTY \relax }}{21} +\entry {\code {ENOTSOCK \relax }}{18} +\entry {\code {ENOTTY}}{271} \entry {\code {ENOTTY \relax }}{17} -\entry {\code {environ \relax }}{468} +\entry {\code {environ \relax }}{429} \entry {\code {ENXIO \relax }}{15} -\entry {\code {EOF \relax }}{180} -\entry {\code {EOPNOTSUPP \relax }}{20} -\entry {\code {EPERM \relax }}{15} -\entry {\code {EPFNOSUPPORT \relax }}{20} +\entry {\code {EOF \relax }}{122} +\entry {\code {EOPNOTSUPP \relax }}{19} +\entry {\code {EPERM \relax }}{14} +\entry {\code {EPFNOSUPPORT \relax }}{19} \entry {\code {EPIPE \relax }}{18} -\entry {\code {EPROTONOSUPPORT \relax }}{20} +\entry {\code {EPROTONOSUPPORT \relax }}{19} \entry {\code {EPROTOTYPE \relax }}{19} +\entry {\code {EQUIV{\_}CLASS{\_}MAX \relax }}{508} \entry {\code {ERANGE \relax }}{18} -\entry {\code {EREMOTE \relax }}{22} -\entry {\code {EROFS \relax }}{18} +\entry {\code {EREMOTE \relax }}{21} +\entry {\code {EROFS \relax }}{17} \entry {\code {errno \relax }}{13} -\entry {\code {ESHUTDOWN \relax }}{21} -\entry {\code {ESOCKTNOSUPPORT \relax }}{20} -\entry {\code {ESPIPE \relax }}{18} +\entry {\code {ESHUTDOWN \relax }}{20} +\entry {\code {ESOCKTNOSUPPORT \relax }}{19} +\entry {\code {ESPIPE \relax }}{17} \entry {\code {ESRCH \relax }}{15} -\entry {\code {ESTALE \relax }}{22} -\entry {\code {ETIMEDOUT \relax }}{21} +\entry {\code {ESTALE \relax }}{21} +\entry {\code {ETIMEDOUT \relax }}{20} \entry {\code {ETXTBSY \relax }}{17} -\entry {\code {EUSERS \relax }}{22} -\entry {\code {EWOULDBLOCK \relax }}{19} -\entry {\code {EXDEV \relax }}{17} -\entry {\code {EXIT{\_}FAILURE \relax }}{471} -\entry {\code {EXIT{\_}SUCCESS \relax }}{471} -\entry {\code {EXPR{\_}NEST{\_}MAX \relax }}{551} -\entry {\code {EXTA}}{331} -\entry {\code {EXTB}}{331} +\entry {\code {EUSERS \relax }}{21} +\entry {\code {EWOULDBLOCK \relax }}{18} +\entry {\code {EXDEV \relax }}{16} +\entry {\code {EXIT{\_}FAILURE \relax }}{433} +\entry {\code {EXIT{\_}SUCCESS \relax }}{432} +\entry {\code {EXPR{\_}NEST{\_}MAX \relax }}{508} +\entry {\code {EXTA}}{262} +\entry {\code {EXTB}}{262} \initial {F} -\entry {\code {F{\_}DUPFD \relax }}{216} -\entry {\code {F{\_}GETFD \relax }}{218} -\entry {\code {F{\_}GETFL \relax }}{220} -\entry {\code {F{\_}GETLK \relax }}{223} -\entry {\code {F{\_}GETOWN \relax }}{226} -\entry {\code {F{\_}OK \relax }}{255} -\entry {\code {F{\_}RDLCK}}{225} -\entry {\code {F{\_}SETFD \relax }}{218} -\entry {\code {F{\_}SETFL \relax }}{220} -\entry {\code {F{\_}SETLK \relax }}{224} -\entry {\code {F{\_}SETLKW \relax }}{225} -\entry {\code {F{\_}SETOWN \relax }}{227} -\entry {\code {F{\_}UNLCK}}{226} -\entry {\code {F{\_}WRLCK}}{226} -\entry {\code {FD{\_}CLOEXEC \relax }}{219} -\entry {\code {FD{\_}SETSIZE \relax }}{212} -\entry {\code {FILENAME{\_}MAX \relax }}{547} -\entry {\code {FLUSHO}}{329} -\entry {\code {FOPEN{\_}MAX \relax }}{138} -\entry {\code {FPE{\_}DECOVF{\_}TRAP}}{404} -\entry {\code {FPE{\_}FLTDIV{\_}TRAP}}{404} -\entry {\code {FPE{\_}FLTOVF{\_}TRAP}}{404} -\entry {\code {FPE{\_}FLTUND{\_}TRAP}}{404} -\entry {\code {FPE{\_}INTDIV{\_}TRAP}}{403} -\entry {\code {FPE{\_}INTOVF{\_}TRAP}}{403} -\entry {\code {FPE{\_}SUBRNG{\_}TRAP}}{404} +\entry {\code {F{\_}DUPFD \relax }}{153} +\entry {\code {F{\_}GETFD \relax }}{155} +\entry {\code {F{\_}GETFL \relax }}{156} +\entry {\code {F{\_}GETLK \relax }}{159} +\entry {\code {F{\_}GETOWN \relax }}{162} +\entry {\code {F{\_}OK \relax }}{189} +\entry {\code {F{\_}RDLCK}}{161} +\entry {\code {F{\_}SETFD \relax }}{155} +\entry {\code {F{\_}SETFL \relax }}{157} +\entry {\code {F{\_}SETLK \relax }}{160} +\entry {\code {F{\_}SETLKW \relax }}{161} +\entry {\code {F{\_}SETOWN \relax }}{163} +\entry {\code {F{\_}UNLCK}}{161} +\entry {\code {F{\_}WRLCK}}{161} +\entry {\code {FD{\_}CLOEXEC \relax }}{155} +\entry {\code {FD{\_}SETSIZE \relax }}{149} +\entry {\code {FILENAME{\_}MAX \relax }}{504} +\entry {\code {FLUSHO}}{260} +\entry {\code {FOPEN{\_}MAX \relax }}{84} +\entry {\code {FPE{\_}DECOVF{\_}TRAP}}{369} +\entry {\code {FPE{\_}FLTDIV{\_}TRAP}}{369} +\entry {\code {FPE{\_}FLTOVF{\_}TRAP}}{369} +\entry {\code {FPE{\_}FLTUND{\_}TRAP}}{369} +\entry {\code {FPE{\_}INTDIV{\_}TRAP}}{369} +\entry {\code {FPE{\_}INTOVF{\_}TRAP}}{369} +\entry {\code {FPE{\_}SUBRNG{\_}TRAP}}{369} \initial {H} -\entry {\code {h{\_}errno}}{280} -\entry {\code {HOST{\_}NOT{\_}FOUND}}{280} -\entry {\code {HUGE{\_}VAL \relax }}{346} -\entry {\code {HUPCL}}{326} +\entry {\code {h{\_}errno}}{215} +\entry {\code {HOST{\_}NOT{\_}FOUND}}{215} +\entry {\code {HUGE{\_}VAL \relax }}{276} +\entry {\code {HUPCL}}{258} \initial {I} -\entry {\code {ICANON}}{327} -\entry {\code {ICRNL}}{324} -\entry {\code {IEXTEN}}{328} -\entry {\code {IGNBRK}}{324} -\entry {\code {IGNCR}}{324} -\entry {\code {IGNPAR}}{324} -\entry {\code {INADDR{\_}ANY \relax }}{277} -\entry {\code {INLCR}}{324} -\entry {\code {INPCK}}{323} -\entry {\code {int}}{389} -\entry {\code {IPPORT{\_}RESERVED \relax }}{282} -\entry {\code {IPPORT{\_}USERRESERVED \relax }}{282} -\entry {\code {ISIG}}{328} -\entry {\code {ISTRIP}}{324} -\entry {\code {IXOFF}}{324} -\entry {\code {IXON}}{325} +\entry {\code {ICANON}}{259} +\entry {\code {ICRNL}}{256} +\entry {\code {IEXTEN}}{260} +\entry {\code {IGNBRK}}{255} +\entry {\code {IGNCR}}{256} +\entry {\code {IGNPAR}}{255} +\entry {\code {INADDR{\_}ANY \relax }}{212} +\entry {\code {INADDR{\_}BROADCAST \relax }}{212} +\entry {\code {INADDR{\_}LOOPBACK \relax }}{212} +\entry {\code {INADDR{\_}NONE \relax }}{212} +\entry {\code {INLCR}}{256} +\entry {\code {INPCK}}{255} +\entry {\code {int}}{335} +\entry {\code {IPPORT{\_}RESERVED \relax }}{216} +\entry {\code {IPPORT{\_}USERRESERVED \relax }}{216} +\entry {\code {ISIG}}{259} +\entry {\code {ISTRIP}}{255} +\entry {\code {IXOFF}}{256} +\entry {\code {IXON}}{256} \initial {L} -\entry {\code {L{\_}ctermid \relax }}{509} -\entry {\code {L{\_}cuserid \relax }}{524} -\entry {\code {L{\_}INCR}}{183} -\entry {\code {L{\_}SET}}{183} -\entry {\code {L{\_}tmpnam \relax }}{190} -\entry {\code {L{\_}XTND}}{183} -\entry {\code {LANG}}{95} -\entry {\code {LC{\_}ALL}}{95} -\entry {\code {LC{\_}COLLATE}}{95} -\entry {\code {LC{\_}CTYPE}}{95} -\entry {\code {LC{\_}MONETARY}}{95} -\entry {\code {LC{\_}NUMERIC}}{95} -\entry {\code {LC{\_}TIME}}{95} -\entry {\code {LINE{\_}MAX \relax }}{551} -\entry {\code {LINK{\_}MAX \relax }}{546} +\entry {\code {L{\_}ctermid \relax }}{468} +\entry {\code {L{\_}cuserid \relax }}{483} +\entry {\code {L{\_}INCR}}{125} +\entry {\code {L{\_}SET}}{125} +\entry {\code {L{\_}tmpnam \relax }}{192} +\entry {\code {L{\_}XTND}}{125} +\entry {\code {LANG}}{353} +\entry {\code {LC{\_}ALL}}{353} +\entry {\code {LC{\_}COLLATE}}{352} +\entry {\code {LC{\_}CTYPE}}{352} +\entry {\code {LC{\_}MONETARY}}{353} +\entry {\code {LC{\_}NUMERIC}}{353} +\entry {\code {LC{\_}TIME}}{353} +\entry {\code {LINE{\_}MAX \relax }}{508} +\entry {\code {LINK{\_}MAX \relax }}{503} \initial {M} -\entry {\code {MAX{\_}CANON \relax }}{546} -\entry {\code {MAX{\_}INPUT \relax }}{546} -\entry {\code {MAXNAMLEN \relax }}{546} -\entry {\code {MB{\_}CUR{\_}MAX \relax }}{83} -\entry {\code {MB{\_}LEN{\_}MAX \relax }}{82} -\entry {\code {MDMBUF}}{327} -\entry {\code {MSG{\_}DONTROUTE \relax }}{297} -\entry {\code {MSG{\_}OOB \relax }}{297} -\entry {\code {MSG{\_}PEEK \relax }}{297} +\entry {\code {MAX{\_}CANON \relax }}{503} +\entry {\code {MAX{\_}INPUT \relax }}{503} +\entry {\code {MAXNAMLEN \relax }}{504} +\entry {\code {MB{\_}CUR{\_}MAX \relax }}{342} +\entry {\code {MB{\_}LEN{\_}MAX \relax }}{342} +\entry {\code {MDMBUF}}{258} +\entry {\code {MINSIGSTKSZ}}{417} +\entry {\code {MSG{\_}DONTROUTE \relax }}{231} +\entry {\code {MSG{\_}OOB \relax }}{231} +\entry {\code {MSG{\_}PEEK \relax }}{231} \initial {N} -\entry {\code {NAME{\_}MAX \relax }}{546} -\entry {\code {NAN \relax }}{355} -\entry {\code {NCCS \relax }}{320} -\entry {\code {NDEBUG}}{555} -\entry {\code {NGROUPS{\_}MAX \relax }}{538} -\entry {\code {NO{\_}ADDRESS}}{280} -\entry {\code {NO{\_}RECOVERY}}{280} -\entry {\code {NOFLSH}}{328} -\entry {\code {NOKERNINFO}}{329} -\entry {\code {NSIG \relax }}{402} -\entry {\code {NULL \relax }}{564} +\entry {\code {NAME{\_}MAX \relax }}{503} +\entry {\code {NAN \relax }}{283} +\entry {\code {NCCS \relax }}{252} +\entry {\code {NDEBUG}}{511} +\entry {\code {NGROUPS{\_}MAX \relax }}{496} +\entry {\code {NO{\_}ADDRESS}}{215} +\entry {\code {NO{\_}RECOVERY}}{215} +\entry {\code {NOFLSH}}{260} +\entry {\code {NOKERNINFO}}{261} +\entry {\code {NSIG \relax }}{368} +\entry {\code {NULL \relax }}{519} \initial {O} -\entry {\code {O{\_}ACCMODE \relax }}{221} -\entry {\code {O{\_}APPEND}}{200} -\entry {\code {O{\_}CREAT}}{200} -\entry {\code {O{\_}EXCL}}{200} -\entry {\code {O{\_}NOCTTY}}{200} -\entry {\code {O{\_}NONBLOCK}}{200} -\entry {\code {O{\_}RDONLY}}{200} -\entry {\code {O{\_}RDWR}}{200} -\entry {\code {O{\_}TRUNC}}{200} -\entry {\code {O{\_}WRONLY}}{200} -\entry {\code {ONLCR \relax }}{325} -\entry {\code {ONOEOT \relax }}{326} -\entry {\code {OPEN{\_}MAX \relax }}{537} -\entry {\code {OPOST \relax }}{325} -\entry {\code {optarg \relax }}{459} -\entry {\code {opterr \relax }}{459} -\entry {\code {optind \relax }}{459} -\entry {\code {optopt \relax }}{459} -\entry {\code {OXTABS \relax }}{326} +\entry {\code {O{\_}ACCMODE \relax }}{157} +\entry {\code {O{\_}APPEND}}{138} +\entry {\code {O{\_}CREAT}}{138} +\entry {\code {O{\_}EXCL}}{138} +\entry {\code {O{\_}NOCTTY}}{138} +\entry {\code {O{\_}NONBLOCK}}{138} +\entry {\code {O{\_}RDONLY}}{137} +\entry {\code {O{\_}RDWR}}{137} +\entry {\code {O{\_}TRUNC}}{138} +\entry {\code {O{\_}WRONLY}}{137} +\entry {\code {ONLCR \relax }}{257} +\entry {\code {ONOEOT \relax }}{257} +\entry {\code {OPEN{\_}MAX \relax }}{495} +\entry {\code {OPOST \relax }}{257} +\entry {\code {optarg \relax }}{421} +\entry {\code {opterr \relax }}{421} +\entry {\code {optind \relax }}{421} +\entry {\code {optopt \relax }}{421} +\entry {\code {OXTABS \relax }}{257} \initial {P} -\entry {\code {P{\_}tmpdir \relax }}{190} -\entry {\code {PA{\_}CHAR}}{161} -\entry {\code {PA{\_}DOUBLE}}{161} -\entry {\code {PA{\_}FLAG{\_}LONG}}{162} -\entry {\code {PA{\_}FLAG{\_}LONG{\_}DOUBLE}}{162} -\entry {\code {PA{\_}FLAG{\_}LONG{\_}LONG}}{162} -\entry {\code {PA{\_}FLAG{\_}MASK \relax }}{161} -\entry {\code {PA{\_}FLAG{\_}PTR}}{162} -\entry {\code {PA{\_}FLAG{\_}SHORT}}{162} -\entry {\code {PA{\_}FLOAT}}{161} -\entry {\code {PA{\_}INT}}{161} -\entry {\code {PA{\_}LAST}}{161} -\entry {\code {PA{\_}POINTER}}{161} -\entry {\code {PA{\_}STRING}}{161} -\entry {\code {PARENB}}{326} -\entry {\code {PARMRK}}{324} -\entry {\code {PARODD}}{327} -\entry {\code {PATH{\_}MAX \relax }}{546} -\entry {\code {PENDIN}}{329} -\entry {\code {PF{\_}CCITT}}{288} -\entry {\code {PF{\_}FILE \relax }}{272} -\entry {\code {PF{\_}IMPLINK}}{288} -\entry {\code {PF{\_}INET \relax }}{274} -\entry {\code {PF{\_}ISO}}{288} -\entry {\code {PF{\_}NS}}{288} -\entry {\code {PF{\_}ROUTE}}{288} -\entry {\code {PF{\_}UNIX \relax }}{272} -\entry {\code {PIPE{\_}BUF \relax }}{546} -\entry {\code {PRIO{\_}MAX}}{390} -\entry {\code {PRIO{\_}MIN}}{390} -\entry {\code {PRIO{\_}PGRP}}{391} -\entry {\code {PRIO{\_}PROCESS}}{391} -\entry {\code {PRIO{\_}USER}}{391} -\entry {\code {program{\_}invocation{\_}name \relax }}{24} -\entry {\code {program{\_}invocation{\_}short{\_}name \relax }}{24} +\entry {\code {P{\_}tmpdir \relax }}{193} +\entry {\code {PA{\_}CHAR}}{105} +\entry {\code {PA{\_}DOUBLE}}{105} +\entry {\code {PA{\_}FLAG{\_}LONG}}{105} +\entry {\code {PA{\_}FLAG{\_}LONG{\_}DOUBLE}}{106} +\entry {\code {PA{\_}FLAG{\_}LONG{\_}LONG}}{106} +\entry {\code {PA{\_}FLAG{\_}MASK \relax }}{105} +\entry {\code {PA{\_}FLAG{\_}PTR}}{105} +\entry {\code {PA{\_}FLAG{\_}SHORT}}{105} +\entry {\code {PA{\_}FLOAT}}{105} +\entry {\code {PA{\_}INT}}{105} +\entry {\code {PA{\_}LAST}}{105} +\entry {\code {PA{\_}POINTER}}{105} +\entry {\code {PA{\_}STRING}}{105} +\entry {\code {PARENB}}{258} +\entry {\code {PARMRK}}{255} +\entry {\code {PARODD}}{258} +\entry {\code {PATH{\_}MAX \relax }}{504} +\entry {\code {PENDIN}}{261} +\entry {\code {PF{\_}CCITT}}{222} +\entry {\code {PF{\_}FILE \relax }}{207} +\entry {\code {PF{\_}IMPLINK}}{222} +\entry {\code {PF{\_}INET \relax }}{209} +\entry {\code {PF{\_}ISO}}{222} +\entry {\code {PF{\_}NS}}{222} +\entry {\code {PF{\_}ROUTE}}{222} +\entry {\code {PF{\_}UNIX \relax }}{207} +\entry {\code {PIPE{\_}BUF \relax }}{504} +\entry {\code {PRIO{\_}MAX}}{336} +\entry {\code {PRIO{\_}MIN}}{336} +\entry {\code {PRIO{\_}PGRP}}{337} +\entry {\code {PRIO{\_}PROCESS}}{336} +\entry {\code {PRIO{\_}USER}}{337} +\entry {\code {program{\_}invocation{\_}name \relax }}{23} +\entry {\code {program{\_}invocation{\_}short{\_}name \relax }}{23} \initial {R} -\entry {\code {R{\_}OK \relax }}{255} -\entry {\code {RAND{\_}MAX \relax }}{351} -\entry {\code {RE{\_}DUP{\_}MAX \relax }}{538} -\entry {\code {RLIM{\_}NLIMITS}}{389} -\entry {\code {RLIMIT{\_}CORE}}{389} -\entry {\code {RLIMIT{\_}CPU}}{388} -\entry {\code {RLIMIT{\_}DATA}}{389} -\entry {\code {RLIMIT{\_}FSIZE}}{389} -\entry {\code {RLIMIT{\_}OPEN{\_}FILES}}{389} -\entry {\code {RLIMIT{\_}RSS}}{389} -\entry {\code {RLIMIT{\_}STACK}}{389} +\entry {\code {R{\_}OK \relax }}{189} +\entry {\code {RAND{\_}MAX \relax }}{280} +\entry {\code {RE{\_}DUP{\_}MAX \relax }}{496} +\entry {\code {RLIM{\_}NLIMITS}}{335} +\entry {\code {RLIMIT{\_}CORE}}{335} +\entry {\code {RLIMIT{\_}CPU}}{334} +\entry {\code {RLIMIT{\_}DATA}}{335} +\entry {\code {RLIMIT{\_}FSIZE}}{335} +\entry {\code {RLIMIT{\_}OPEN{\_}FILES}}{335} +\entry {\code {RLIMIT{\_}RSS}}{335} +\entry {\code {RLIMIT{\_}STACK}}{335} \initial {S} -\entry {\code {S{\_}IEXEC}}{249} -\entry {\code {S{\_}IFBLK}}{247} -\entry {\code {S{\_}IFCHR}}{247} -\entry {\code {S{\_}IFDIR}}{247} -\entry {\code {S{\_}IFIFO}}{247} -\entry {\code {S{\_}IFLNK}}{247} -\entry {\code {S{\_}IFMT \relax }}{247} -\entry {\code {S{\_}IFREG}}{247} -\entry {\code {S{\_}IFSOCK}}{247} -\entry {\code {S{\_}IREAD}}{249} -\entry {\code {S{\_}IRGRP}}{250} -\entry {\code {S{\_}IROTH}}{250} -\entry {\code {S{\_}IRUSR}}{249} -\entry {\code {S{\_}IRWXG}}{250} -\entry {\code {S{\_}IRWXO}}{250} -\entry {\code {S{\_}IRWXU}}{250} -\entry {\code {S{\_}ISGID}}{250} -\entry {\code {S{\_}ISUID}}{250} -\entry {\code {S{\_}ISVTX}}{250} -\entry {\code {S{\_}IWGRP}}{250} -\entry {\code {S{\_}IWOTH}}{250} -\entry {\code {S{\_}IWRITE}}{249} -\entry {\code {S{\_}IWUSR}}{249} -\entry {\code {S{\_}IXGRP}}{250} -\entry {\code {S{\_}IXOTH}}{250} -\entry {\code {S{\_}IXUSR}}{249} -\entry {\code {SA{\_}NOCLDSTOP \relax }}{419} -\entry {\code {SA{\_}ONSTACK \relax }}{419} -\entry {\code {SA{\_}RESTART \relax }}{419} -\entry {\code {SEEK{\_}CUR \relax }}{183} -\entry {\code {SEEK{\_}END \relax }}{183} -\entry {\code {SEEK{\_}SET \relax }}{182} -\entry {\code {SIG{\_}BLOCK}}{443} -\entry {\code {SIG{\_}DFL}}{413} -\entry {\code {SIG{\_}ERR \relax }}{415} -\entry {\code {SIG{\_}IGN}}{413} -\entry {\code {SIG{\_}SETMASK}}{443} -\entry {\code {SIG{\_}UNBLOCK}}{443} -\entry {\code {SIGABRT \relax }}{405} -\entry {\code {SIGALRM \relax }}{407} -\entry {\code {SIGBUS \relax }}{405} -\entry {\code {SIGCHLD \relax }}{408} -\entry {\code {SIGCONT \relax }}{408} -\entry {\code {SIGFPE \relax }}{403} -\entry {\code {SIGHUP \relax }}{405} -\entry {\code {SIGILL \relax }}{404} -\entry {\code {SIGINT \relax }}{406} -\entry {\code {SIGIO \relax }}{408} -\entry {\code {SIGKILL \relax }}{406} -\entry {\code {SIGPIPE \relax }}{410} -\entry {\code {SIGPROF \relax }}{407} -\entry {\code {SIGQUIT \relax }}{406} -\entry {\code {SIGSEGV \relax }}{404} -\entry {\code {SIGSTOP \relax }}{409} -\entry {\code {SIGTERM \relax }}{406} -\entry {\code {SIGTSTP \relax }}{409} -\entry {\code {SIGTTIN \relax }}{409} -\entry {\code {SIGTTOU \relax }}{409} -\entry {\code {SIGURG \relax }}{408} -\entry {\code {SIGUSR1 \relax }}{410} -\entry {\code {SIGUSR2 \relax }}{410} -\entry {\code {SIGVTALRM \relax }}{407} -\entry {\code {SOCK{\_}DGRAM \relax }}{266} -\entry {\code {SOCK{\_}RAW \relax }}{267} -\entry {\code {SOCK{\_}STREAM \relax }}{266} -\entry {\code {SOL{\_}SOCKET \relax }}{313} -\entry {\code {SSIZE{\_}MAX \relax }}{538} -\entry {\code {stderr \relax }}{136} -\entry {\code {STDERR{\_}FILENO}}{208} -\entry {\code {stdin \relax }}{136} -\entry {\code {STDIN{\_}FILENO}}{208} -\entry {\code {stdout \relax }}{136} -\entry {\code {STDOUT{\_}FILENO}}{208} -\entry {\code {STREAM{\_}MAX \relax }}{538} -\entry {\code {SV{\_}INTERRUPT \relax }}{453} -\entry {\code {SV{\_}ONSTACK \relax }}{453} -\entry {\code {SV{\_}RESETHAND \relax }}{453} -\entry {\code {sys{\_}siglist}}{412} +\entry {\code {S{\_}IEXEC}}{184} +\entry {\code {S{\_}IFBLK}}{182} +\entry {\code {S{\_}IFCHR}}{182} +\entry {\code {S{\_}IFDIR}}{182} +\entry {\code {S{\_}IFIFO}}{182} +\entry {\code {S{\_}IFLNK}}{182} +\entry {\code {S{\_}IFMT \relax }}{182} +\entry {\code {S{\_}IFREG}}{182} +\entry {\code {S{\_}IFSOCK}}{182} +\entry {\code {S{\_}IREAD}}{184} +\entry {\code {S{\_}IRGRP}}{184} +\entry {\code {S{\_}IROTH}}{184} +\entry {\code {S{\_}IRUSR}}{184} +\entry {\code {S{\_}IRWXG}}{184} +\entry {\code {S{\_}IRWXO}}{184} +\entry {\code {S{\_}IRWXU}}{184} +\entry {\code {S{\_}ISGID}}{185} +\entry {\code {S{\_}ISUID}}{184} +\entry {\code {S{\_}ISVTX}}{185} +\entry {\code {S{\_}IWGRP}}{184} +\entry {\code {S{\_}IWOTH}}{184} +\entry {\code {S{\_}IWRITE}}{184} +\entry {\code {S{\_}IWUSR}}{184} +\entry {\code {S{\_}IXGRP}}{184} +\entry {\code {S{\_}IXOTH}}{184} +\entry {\code {S{\_}IXUSR}}{184} +\entry {\code {SA{\_}DISABLE}}{417} +\entry {\code {SA{\_}NOCLDSTOP \relax }}{383} +\entry {\code {SA{\_}ONSTACK}}{417} +\entry {\code {SA{\_}ONSTACK \relax }}{383} +\entry {\code {SA{\_}RESTART \relax }}{383} +\entry {\code {SEEK{\_}CUR \relax }}{124} +\entry {\code {SEEK{\_}END \relax }}{125} +\entry {\code {SEEK{\_}SET \relax }}{124} +\entry {\code {SIG{\_}BLOCK}}{405} +\entry {\code {SIG{\_}DFL}}{378} +\entry {\code {SIG{\_}ERR \relax }}{380} +\entry {\code {SIG{\_}IGN}}{378} +\entry {\code {SIG{\_}SETMASK}}{405} +\entry {\code {SIG{\_}UNBLOCK}}{405} +\entry {\code {SIGABRT \relax }}{370} +\entry {\code {SIGALRM \relax }}{372} +\entry {\code {SIGBUS \relax }}{370} +\entry {\code {SIGCHLD \relax }}{373} +\entry {\code {SIGCONT \relax }}{373} +\entry {\code {SIGFPE \relax }}{368} +\entry {\code {SIGHUP \relax }}{371} +\entry {\code {SIGILL \relax }}{369} +\entry {\code {SIGINT \relax }}{371} +\entry {\code {SIGIO \relax }}{373} +\entry {\code {SIGKILL \relax }}{372} +\entry {\code {SIGPIPE \relax }}{375} +\entry {\code {SIGPROF \relax }}{372} +\entry {\code {SIGQUIT \relax }}{371} +\entry {\code {SIGSEGV \relax }}{370} +\entry {\code {SIGSTKSZ}}{417} +\entry {\code {SIGSTOP \relax }}{374} +\entry {\code {SIGTERM \relax }}{372} +\entry {\code {SIGTSTP \relax }}{374} +\entry {\code {SIGTTIN \relax }}{374} +\entry {\code {SIGTTOU \relax }}{374} +\entry {\code {SIGURG \relax }}{373} +\entry {\code {SIGUSR1 \relax }}{375} +\entry {\code {SIGUSR2 \relax }}{375} +\entry {\code {SIGVTALRM \relax }}{372} +\entry {\code {SOCK{\_}DGRAM \relax }}{202} +\entry {\code {SOCK{\_}RAW \relax }}{203} +\entry {\code {SOCK{\_}STREAM \relax }}{202} +\entry {\code {SOL{\_}SOCKET \relax }}{245} +\entry {\code {SSIZE{\_}MAX \relax }}{496} +\entry {\code {stderr \relax }}{82} +\entry {\code {STDERR{\_}FILENO}}{146} +\entry {\code {stdin \relax }}{81} +\entry {\code {STDIN{\_}FILENO}}{146} +\entry {\code {stdout \relax }}{82} +\entry {\code {STDOUT{\_}FILENO}}{146} +\entry {\code {STREAM{\_}MAX \relax }}{495} +\entry {\code {SV{\_}INTERRUPT \relax }}{415} +\entry {\code {SV{\_}ONSTACK \relax }}{414} +\entry {\code {SV{\_}RESETHAND \relax }}{415} +\entry {\code {sys{\_}siglist}}{377} \initial {T} -\entry {\code {TCIFLUSH}}{340} -\entry {\code {TCIOFF}}{341} -\entry {\code {TCIOFLUSH}}{340} -\entry {\code {TCION}}{341} -\entry {\code {TCOFLUSH}}{340} -\entry {\code {TCOOFF}}{341} -\entry {\code {TCOON}}{341} -\entry {\code {TCSADRAIN}}{321} -\entry {\code {TCSAFLUSH}}{321} -\entry {\code {TCSANOW}}{321} -\entry {\code {TCSASOFT}}{321} -\entry {\code {timezone \relax }}{381} -\entry {\code {TMP{\_}MAX \relax }}{190} -\entry {\code {TOSTOP}}{328} -\entry {\code {TRY{\_}AGAIN}}{280} -\entry {\code {TZNAME{\_}MAX \relax }}{538} +\entry {\code {TCIFLUSH}}{270} +\entry {\code {TCIOFF}}{271} +\entry {\code {TCIOFLUSH}}{270} +\entry {\code {TCION}}{271} +\entry {\code {TCOFLUSH}}{270} +\entry {\code {TCOOFF}}{271} +\entry {\code {TCOON}}{271} +\entry {\code {TCSADRAIN}}{252} +\entry {\code {TCSAFLUSH}}{252} +\entry {\code {TCSANOW}}{252} +\entry {\code {TCSASOFT}}{253} +\entry {\code {timezone \relax }}{328} +\entry {\code {TMP{\_}MAX \relax }}{193} +\entry {\code {TOSTOP}}{260} +\entry {\code {TRY{\_}AGAIN}}{215} +\entry {\code {TZNAME{\_}MAX \relax }}{496} \initial {V} -\entry {\code {VDISCARD \relax }}{337} -\entry {\code {VDSUSP \relax }}{335} -\entry {\code {VEOF \relax }}{332} -\entry {\code {VEOL \relax }}{332} -\entry {\code {VEOL2 \relax }}{333} -\entry {\code {VERASE \relax }}{332} -\entry {\code {VINTR \relax }}{334} -\entry {\code {VKILL \relax }}{333} -\entry {\code {VLNEXT \relax }}{334} -\entry {\code {VMIN \relax }}{337} -\entry {\code {VQUIT \relax }}{335} -\entry {\code {VREPRINT \relax }}{334} -\entry {\code {VSTART \relax }}{336} -\entry {\code {VSTATUS \relax }}{337} -\entry {\code {VSTOP \relax }}{336} -\entry {\code {VSUSP \relax }}{335} -\entry {\code {VTIME \relax }}{338} -\entry {\code {VWERASE \relax }}{333} +\entry {\code {VDISCARD \relax }}{267} +\entry {\code {VDSUSP \relax }}{266} +\entry {\code {VEOF \relax }}{263} +\entry {\code {VEOL \relax }}{264} +\entry {\code {VEOL2 \relax }}{264} +\entry {\code {VERASE \relax }}{264} +\entry {\code {VINTR \relax }}{265} +\entry {\code {VKILL \relax }}{264} +\entry {\code {VLNEXT \relax }}{265} +\entry {\code {VMIN \relax }}{268} +\entry {\code {VQUIT \relax }}{266} +\entry {\code {VREPRINT \relax }}{265} +\entry {\code {VSTART \relax }}{267} +\entry {\code {VSTATUS \relax }}{268} +\entry {\code {VSTOP \relax }}{267} +\entry {\code {VSUSP \relax }}{266} +\entry {\code {VTIME \relax }}{268} +\entry {\code {VWERASE \relax }}{265} \initial {W} -\entry {\code {W{\_}OK \relax }}{255} +\entry {\code {W{\_}OK \relax }}{189} \initial {X} -\entry {\code {X{\_}OK \relax }}{255} +\entry {\code {X{\_}OK \relax }}{189} diff -ruN glibc-1.06/manual/llio.texi glibc-1.07/manual/llio.texi --- glibc-1.06/manual/llio.texi Wed May 12 14:26:10 1993 +++ glibc-1.07/manual/llio.texi Thu Jun 24 20:35:23 1993 @@ -222,18 +222,18 @@ @comment fcntl.h @comment POSIX.1 @deftypefn {Obsolete function} int creat (const char *@var{filename}, mode_t @var{mode}) -This function is obsolete. The call +This function is obsolete. The call: -@example +@smallexample creat (@var{filename}, @var{mode}) -@end example +@end smallexample @noindent -is equivalent to +is equivalent to: -@example +@smallexample open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode}) -@end example +@end smallexample @end deftypefn @comment unistd.h @@ -263,12 +263,13 @@ The @var{filedes} argument is not a valid file descriptor. @item EINTR -The call was interrupted by a signal. @xref{Interrupted Primitives}. -Here's an example of how to handle @code{EINTR} properly: +The @code{close} call was interrupted by a signal. +@xref{Interrupted Primitives}. +Here is an example of how to handle @code{EINTR} properly: -@example +@smallexample TEMP_FAILURE_RETRY (close (desc)); -@end example +@end smallexample @end table @end deftypefun @@ -440,9 +441,9 @@ @xref{Interrupted Primitives}. The easy way to do this is with the macro @code{TEMP_FAILURE_RETRY}, as follows: -@example +@smallexample nbytes = TEMP_FAILURE_RETRY (write (desc, buffer, count)); -@end example +@end smallexample The @code{write} function is the underlying primitive for all of the functions that write to streams, such as @code{fputc}. @@ -531,7 +532,8 @@ file positions; using @code{lseek} on one descriptor has no effect on the other. For example, -@example +@smallexample +@group @{ int d1, d2; char buf[4]; @@ -540,7 +542,8 @@ lseek (d1, 1024, SEEK_SET); read (d2, buf, 4); @} -@end example +@end group +@end smallexample @noindent will read the first four characters of the file @file{foo}. (The @@ -552,7 +555,7 @@ which alters the file position of one of the duplicates, including reading or writing data, affects all of them alike. Thus, for example, -@example +@smallexample @{ int d1, d2, d3; char buf1[4], buf2[4]; @@ -563,7 +566,7 @@ read (d1, buf1, 4); read (d2, buf2, 4); @} -@end example +@end smallexample @noindent will read four characters starting with the 1024'th character of @@ -673,7 +676,7 @@ @cindex standard error file descriptor @node Stream/Descriptor Precautions -@section Precautions for Mixing Streams and Descriptors +@section Dangers of Mixing Streams and Descriptors @cindex channels @cindex streams and descriptors @cindex descriptors and streams @@ -735,8 +738,8 @@ The system handles each channel independently. Most of the time, this is quite predictable and natural (especially for input): each channel -can read or write sequentially at its own place in the file. -The precautions you should take are these: +can read or write sequentially at its own place in the file. However, +if some of the channels are streams, you must take these precautions: @itemize @bullet @item @@ -772,7 +775,7 @@ @comment stdio.h @comment GNU -@deftypefun int fclean (@var{stream}) +@deftypefun int fclean (FILE *@var{stream}) Clean up the stream @var{stream} so that its buffer is empty. If @var{stream} is doing output, force it out. If @var{stream} is doing input, give the data in the buffer back to the system, arranging to @@ -964,9 +967,9 @@ function blocks the calling process until input is available on the file descriptor, or until the timeout period expires. -@example +@smallexample @include select.c.texi -@end example +@end smallexample There is another example showing the use of @code{select} to multiplex input from multiple sockets in @ref{Server Example}. @@ -1085,10 +1088,10 @@ If @var{old} and @var{new} are different numbers, and @var{old} is a valid descriptor number, then @code{dup2} is equivalent to: -@example +@smallexample close (@var{new}); fcntl (@var{old}, F_DUPFD, @var{new}) -@end example +@end smallexample However, @code{dup2} does this atomically; there is no instant in the middle of calling @code{dup2} at which @var{new} is closed and not yet a @@ -1103,9 +1106,9 @@ The form of the call in this case is: -@example +@smallexample fcntl (@var{old}, F_DUPFD, @var{next_filedes}) -@end example +@end smallexample The @var{next_filedes} argument is of type @code{int} and specifies that the file descriptor returned should be the next available one greater @@ -1149,7 +1152,7 @@ So, to redirect standard input to a file, the shell could do something like: -@example +@smallexample pid = fork (); if (pid == 0) @{ @@ -1162,7 +1165,7 @@ TEMP_FAILURE_RETRY (close (file)); execv (program, NULL); @} -@end example +@end smallexample There is also a more detailed example showing how to implement redirection in the context of a pipeline of processes in @ref{Launching Jobs}. @@ -1214,9 +1217,9 @@ @var{filedes} argument. This requires a third @code{int} argument to specify the new flags, so the form of the call is: -@example +@smallexample fcntl (@var{filedes}, F_SETFD, @var{new_flags}) -@end example +@end smallexample The normal return value from @code{fcntl} with this command is an unspecified value other than @code{-1}, which indicates an error. @@ -1241,12 +1244,12 @@ If you want to modify the file descriptor flags, you should get the current flags with @code{F_GETFD} and modify the value. Don't assume -that the flag listed here is the only ones that are implemented; your -program may be run years from now and more flags may exist then. -For example, here is a function to set or clear the flag @code{FD_CLOEXEC} +that the flags listed here are the only ones that are implemented; your +program may be run years from now and more flags may exist then. For +example, here is a function to set or clear the flag @code{FD_CLOEXEC} without altering any other flags: -@example +@smallexample /* @r{Set the @code{FD_CLOEXEC} flag of @var{desc} if @var{value} is nonzero,} @r{or clear the flag if @var{value} is 0.} @r{Return 0 on success, or -1 on error with @code{errno} set.} */ @@ -1266,7 +1269,7 @@ /* @r{Store modified flag word in the descriptor.} */ return fcntl (desc, F_SETFD, oldflags); @} -@end example +@end smallexample @node File Status Flags @section File Status Flags @@ -1323,9 +1326,9 @@ @var{filedes} argument. This command requires a third @code{int} argument to specify the new flags, so the call looks like this: -@example +@smallexample fcntl (@var{filedes}, F_SETFL, @var{new_flags}) -@end example +@end smallexample You can't change the access mode for the file in this way; that is, whether the file descriptor was opened for reading or writing. You can @@ -1389,7 +1392,7 @@ here is a function to set or clear the flag @code{O_NONBLOCK} without altering any other flags: -@example +@smallexample @group /* @r{Set the @code{O_NONBLOCK} flag of @var{desc} if @var{value} is nonzero,} @r{or clear the flag if @var{value} is 0.} @@ -1411,7 +1414,7 @@ return fcntl (desc, F_SETFL, oldflags); @} @end group -@end example +@end smallexample @node File Locks @section File Locks @@ -1456,7 +1459,7 @@ @comment fcntl.h @comment POSIX.1 -@deftp {struct Type} flock +@deftp {Data Type} {struct flock} This structure is used with the @code{fcntl} function to describe a file lock. It has these members: @@ -1495,9 +1498,9 @@ requires a third argument of type @w{@code{struct flock *}} to be passed to @code{fcntl}, so that the form of the call is: -@example +@smallexample fcntl (@var{filedes}, F_GETLK, @var{lockp}) -@end example +@end smallexample If there is a lock already in place that would block the lock described by the @var{lockp} argument, information about that lock overwrites @@ -1539,13 +1542,13 @@ third argument of type @w{@code{struct flock *}} to be passed to @code{fcntl}, so that the form of the call is: -@example +@smallexample fcntl (@var{filedes}, F_SETLK, @var{lockp}) -@end example +@end smallexample If the process already has a lock on any part of the region, the old lock on that part is replaced with the new lock. You can remove a lock -by specifying the a lock type of @code{F_UNLCK}. +by specifying a lock type of @code{F_UNLCK}. If the lock cannot be set, @code{fcntl} returns immediately with a value of @code{-1}. This function does not block waiting for other processes @@ -1707,9 +1710,9 @@ of type @code{pid_t} to be passed to @code{fcntl}, so that the form of the call is: -@example +@smallexample fcntl (@var{filedes}, F_SETOWN, @var{pid}) -@end example +@end smallexample The @var{pid} argument should be a process ID. You can also pass a negative number whose absolute value is a process group ID. diff -ruN glibc-1.06/manual/locale.texi glibc-1.07/manual/locale.texi --- glibc-1.06/manual/locale.texi Wed May 12 14:26:12 1993 +++ glibc-1.07/manual/locale.texi Mon Aug 30 17:07:14 1993 @@ -53,7 +53,7 @@ (@pxref{Collation Functions}). @item -Formatting of numbers and currency amounts. +Formatting of numbers and currency amounts (@pxref{Numeric Formatting}). @item Formatting of dates and times (@pxref{Formatting Date and Time}). @@ -102,7 +102,7 @@ @cindex combining locales A user also has the option of specifying different locales for different -purposes---in effect, choosing a mixture of two locales. +purposes---in effect, choosing a mixture of multiple locales. For example, the user might specify the locale @samp{espana-castellano} for most purposes, but specify the locale @samp{usa-english} for @@ -138,8 +138,9 @@ @comment ANSI @item LC_CTYPE @vindex LC_CTYPE -This category applies to classification and conversion of characters; -see @ref{Character Handling}. +This category applies to classification and conversion of characters, +and to multibyte and wide characters; +see @ref{Character Handling} and @ref{Extended Characters}. @comment locale.h @comment ANSI @@ -200,9 +201,9 @@ locale. To use the locales specified by the environment, you must call @code{setlocale}. Call it as follows: -@example +@smallexample setlocale (LC_ALL, ""); -@end example +@end smallexample @noindent to select a locale based on the appropriate environment variables. @@ -261,7 +262,7 @@ Here is an example showing how you might use @code{setlocale} to temporarily switch to a new locale. -@example +@smallexample #include #include #include @@ -290,7 +291,7 @@ setlocale (LC_ALL, saved_locale); free (saved_locale); @} -@end example +@end smallexample @strong{Portability Note:} Some ANSI C systems may define additional locale categories. For portability, assume that any symbol beginning @@ -313,8 +314,8 @@ standard C locale. @item "" -The empty name stands for a site-specific default locale. It's supposed -to be a good default for the machine on which the program is running. +The empty name says to select a locale based on environment variables. +@xref{Locale Categories}. @end table Defining and installing named locales is normally a responsibility of @@ -325,10 +326,10 @@ @c ??? to be changed. If your program needs to use something other than the @samp{C} locale, -it will be more portable if you use the whatever locale the user -specifies with the environment, rather than trying to specify some -non-standard locale explicitly by name. Remember, different machines -might have different sets of locales installed. +it will be more portable if you use whatever locale the user specifies +with the environment, rather than trying to specify some non-standard +locale explicitly by name. Remember, different machines might have +different sets of locales installed. @node Numeric Formatting, , Standard Locales, Locales @section Numeric Formatting @@ -413,8 +414,8 @@ grouping---or, put another way, any remaining digits form one large group without separators. -For example, if @code{grouping} is @code{"4;3;2"}, the number -@code{123456787654321} should be grouped into @samp{12}, @samp{34}, +For example, if @code{grouping} is @code{"4;3;2"}, the correct grouping +for the number @code{123456787654321} is @samp{12}, @samp{34}, @samp{56}, @samp{78}, @samp{765}, @samp{4321}. This uses a group of 4 digits at the end, preceded by a group of 3 digits, preceded by groups of 2 digits (as many as needed). With a separator of @samp{,}, the @@ -504,7 +505,7 @@ @code{int_curr_symbol} as well as the @code{currency_symbol}. The ANSI C standard seems to imply that they should apply only to the @code{currency_symbol}---so the @code{int_curr_symbol} should always -preceed the amount. +precede the amount. We can only guess which of these (if either) matches the usual conventions for printing international currency symbols. Our guess is diff -ruN glibc-1.06/manual/longopt.c.texi glibc-1.07/manual/longopt.c.texi --- glibc-1.06/manual/longopt.c.texi Tue Oct 27 19:00:05 1992 +++ glibc-1.07/manual/longopt.c.texi Thu Jun 10 18:00:47 1993 @@ -1,6 +1,6 @@ #include -/* @r{Flag set by @samp{--verbose}. } */ +/* @r{Flag set by @samp{--verbose}.} */ static int verbose_flag; int @@ -13,78 +13,78 @@ while (1) @{ static struct option long_options[] = - @{ - /* @r{These options set a flag. } */ - @{"verbose", 0, &verbose_flag, 1@}, - @{"brief", 0, &verbose_flag, 0@}, - /* These options don't set a flag. - We distinguish them by their indices. */ - @{"add", 1, 0, 0@}, - @{"append", 0, 0, 0@}, - @{"delete", 1, 0, 0@}, - @{"create", 0, 0, 0@}, - @{"file", 1, 0, 0@}, - @{0, 0, 0, 0@} - @}; - /* @r{@code{getopt_long} stores the option index here. } */ + @{ + /* @r{These options set a flag.} */ + @{"verbose", 0, &verbose_flag, 1@}, + @{"brief", 0, &verbose_flag, 0@}, + /* @r{These options don't set a flag. + We distinguish them by their indices.} */ + @{"add", 1, 0, 0@}, + @{"append", 0, 0, 0@}, + @{"delete", 1, 0, 0@}, + @{"create", 0, 0, 0@}, + @{"file", 1, 0, 0@}, + @{0, 0, 0, 0@} + @}; + /* @r{@code{getopt_long} stores the option index here.} */ int option_index = 0; c = getopt_long (argc, argv, "abc:d:", - long_options, &option_index); + long_options, &option_index); - /* @r{Detect the end of the options. } */ + /* @r{Detect the end of the options.} */ if (c == -1) - break; + break; switch (c) - @{ - case 0: - /* @r{If this option set a flag, do nothing else now. } */ - if (long_options[option_index].flag != 0) - break; - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case 'a': - puts ("option -a\n"); - break; - - case 'b': - puts ("option -b\n"); - break; - - case 'c': - printf ("option -c with value `%s'\n", optarg); - break; - - case 'd': - printf ("option -d with value `%s'\n", optarg); - break; - - case '?': - /* @r{@code{getopt_long} already printed an error message. } */ - break; - - default: - abort (); - @} + @{ + case 0: + /* @r{If this option set a flag, do nothing else now.} */ + if (long_options[option_index].flag != 0) + break; + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case 'a': + puts ("option -a\n"); + break; + + case 'b': + puts ("option -b\n"); + break; + + case 'c': + printf ("option -c with value `%s'\n", optarg); + break; + + case 'd': + printf ("option -d with value `%s'\n", optarg); + break; + + case '?': + /* @r{@code{getopt_long} already printed an error message.} */ + break; + + default: + abort (); + @} @} - /* Instead of reporting @samp{--verbose} + /* @r{Instead of reporting @samp{--verbose} and @samp{--brief} as they are encountered, - we report the final status resulting from them. */ + we report the final status resulting from them.} */ if (verbose_flag) puts ("verbose flag is set"); - /* @r{Print any remaining command line arguments (not options). } */ + /* @r{Print any remaining command line arguments (not options).} */ if (optind < argc) @{ printf ("non-option ARGV-elements: "); while (optind < argc) - printf ("%s ", argv[optind++]); + printf ("%s ", argv[optind++]); putchar ('\n'); @} diff -ruN glibc-1.06/manual/maint.texi glibc-1.07/manual/maint.texi --- glibc-1.06/manual/maint.texi Sat May 22 23:47:58 1993 +++ glibc-1.07/manual/maint.texi Tue Dec 28 02:23:11 1993 @@ -44,36 +44,38 @@ The GNU C Library currently supports configurations that match the following patterns: -@example -sparc-sun-sunos4.@var{n} -sparc-sun-solaris2.@var{n} -m68k-hp-bsd4.3 -m68k-sun-sunos4.@var{n} -m68k-sony-newsos -mips-dec-ultrix4.@var{n} +@smallexample +alpha-dec-osf1 i386-@var{anything}-bsd4.3 +i386-@var{anything}-gnu +i386-@var{anything}-sco3.2 +i386-@var{anything}-sco3.2v4 i386-@var{anything}-sysv i386-@var{anything}-sysv4 -i386-@var{anything}-sco3.2v2 -i386-@var{anything}-sco3.2v4 i386-sequent-bsd -@end example +m68k-hp-bsd4.3 +m68k-sony-newsos +m68k-sun-sunos4.@var{n} +mips-dec-ultrix4.@var{n} +sparc-sun-solaris2.@var{n} +sparc-sun-sunos4.@var{n} +@end smallexample While no other configurations are supported, there are handy aliases for these few. (These aliases work in other GNU software as well.) -@example -sun4-sunos4.@var{n} sun4 -sun4-solaris2.@var{n} sun4-sunos5.@var{n} -hp320-bsd4.3 hp300bsd -sun3-sunos4.@var{n} sun3 -news +@smallexample decstation -i386-svr4 +hp320-bsd4.3 hp300bsd i386-sco i386-sco3.2v4 i386-sequent-dynix -@end example +i386-svr4 +news +sun3-sunos4.@var{n} sun3 +sun4-solaris2.@var{n} sun4-sunos5.@var{n} +sun4-sunos4.@var{n} sun4 +@end smallexample Here are some options that you should specify (if appropriate) when you run @code{configure}: @@ -112,11 +114,11 @@ to that other directory to run @code{configure}. In order to run configure, you will have to specify a directory for it, like this: -@example +@smallexample mkdir ../hp320 cd ../hp320 ../src/configure hp320-bsd4.3 -@end example +@end smallexample @noindent @code{configure} looks for the sources in whatever directory you @@ -170,9 +172,9 @@ The GNU C library code which expects @code{size_t} to be unsigned is correct. The definition of @code{size_t} as a signed type is incorrect. -We plan that in version 2.4, GCC will always define @code{size_t} as an -unsigned type, and the @file{fixincludes} script will massage the -system's @file{sys/types.h} so as not to conflict with this. +Versions 2.4 and later of GCC always define @code{size_t} as an unsigned +type, and GCC's @file{fixincludes} script massages the system's +@file{sys/types.h} so as not to conflict with this. In the meantime, we work around this problem by telling GCC explicitly to use an unsigned type for @code{size_t} when compiling the GNU C @@ -182,10 +184,7 @@ To build the library, type @code{make lib}. This will produce a lot of output, some of which looks like errors from @code{make} (but isn't). Look for error messages from @code{make} containing @samp{***}. Those -indicate that something is really wrong. Using the @samp{-w} option to -@code{make} may make the output easier to understand (this option tells -@code{make} to print messages telling you what subdirectories it is -working on).@refill +indicate that something is really wrong. To build and run some test programs which exercise some of the library facilities, type @code{make tests}. This will produce several files @@ -196,7 +195,7 @@ line reading with @kbd{C-h i} in Emacs or with the @code{info} program, type @w{@code{make info}}. -To install the library and header files, and the Info files of the +To install the library and its header files, and the Info files of the manual, type @code{make install}, after setting the installation directories in @file{configparms}. This will build things if necessary, before installing them.@refill @@ -205,9 +204,10 @@ @appendixsec Reporting Bugs @cindex reporting bugs -There are probably bugs in the GNU C library. If you report them, -they will get fixed. If you don't, no one will ever know about them -and they will remain unfixed for all eternity, if not longer. +There are probably bugs in the GNU C library. There are certainly +errors and omissions in this manual. If you report them, they will get +fixed. If you don't, no one will ever know about them and they will +remain unfixed for all eternity, if not longer. To report a bug, first you must find it. Hopefully, this will be the hard part. Once you've found a bug, make sure it's really a bug. A @@ -221,18 +221,14 @@ library, you really only need to narrow it down to one library function call, if possible. This should not be too difficult. -The final step when you have a simple test case is to report the -bug. When reporting a bug, send your test case, the results you -got, the results you expected, what you think the problem might be -(if you've thought of anything), your system type, and the version -of the GNU C library which you are using. - -@ignore @c this makes no sense for `INSTALL' before the manual is out. --rm -If you are not sure how a function should behave, and this manual -doesn't tell you, that's a bug in the manual. Report that too! -If the function's behavior disagrees with the manual, then either the -library or the manual has a bug, so report the disagreement. -@end ignore +The final step when you have a simple test case is to report the bug. +When reporting a bug, send your test case, the results you got, the +results you expected, what you think the problem might be (if you've +thought of anything), your system type, and the version of the GNU C +library which you are using. Also include the files +@file{config.status} and @file{config.make} which are created by running +@file{configure}; they will be in whatever directory was current when +you ran @file{configure}. If you think you have found some way in which the GNU C library does not conform to the ANSI and POSIX standards (@pxref{Standards and @@ -241,8 +237,15 @@ Send bug reports to the Internet address @samp{bug-glibc@@prep.ai.mit.edu} or the UUCP path @samp{mit-eddie!prep.ai.mit.edu!bug-glibc}. If you have other problems -with installation, use, or the documentation, please report those as -well.@refill +with installation or use, please report those as well.@refill + +If you are not sure how a function should behave, and this manual +doesn't tell you, that's a bug in the manual. Report that too! If the +function's behavior disagrees with the manual, then either the library +or the manual has a bug, so report the disagreement. If you find any +errors or omissions in this manual, please report them to the Internet +address @samp{bug-glibc-manual@@prep.ai.mit.edu} or the UUCP path +@samp{mit-eddie!prep.ai.mit.edu!bug-glibc-manual}. @node Source Layout @appendixsec Adding New Functions @@ -261,9 +264,9 @@ which defines a few @code{make} variables and then includes the global makefile @file{Rules} with a line like: -@example +@smallexample include ../Rules -@end example +@end smallexample @noindent The basic variables that a subdirectory makefile defines are: @@ -306,13 +309,14 @@ @item install-lib @itemx install-data @itemx install -Files to be installed by @w{@samp{make install}}. Things listed in +Files to be installed by @w{@samp{make install}}. Files listed in @samp{install-lib} are installed in the directory specified by -@samp{libdir} in @file{Makeconfig} (@pxref{Installation}). Files listed -in @code{install-data} are installed in the directory specified by -@samp{datadir} in @file{configparms} or @file{Makeconfig}. Files listed -in @code{install} are installed in the directory specified by -@samp{bindir} in @file{Makeconfig}.@refill +@samp{libdir} in @file{configparms} or @file{Makeconfig} +(@pxref{Installation}). Files listed in @code{install-data} are +installed in the directory specified by @samp{datadir} in +@file{configparms} or @file{Makeconfig}. Files listed in @code{install} +are installed in the directory specified by @samp{bindir} in +@file{configparms} or @file{Makeconfig}.@refill @item distribute Other files from this subdirectory which should be put into a @@ -365,15 +369,16 @@ @file{Implies} file. Lines in an @file{Implies} file that begin with a @samp{#} character are ignored as comments. For example, @file{unix/bsd/Implies} contains:@refill -@example +@smallexample # BSD has Internet-related things. unix/inet -@end example +@end smallexample @noindent and @file{unix/Implies} contains: -@example +@need 300 +@smallexample posix -@end example +@end smallexample @noindent So the final list is @file{unix/bsd/vax unix/bsd unix/inet unix posix}. @@ -405,8 +410,10 @@ There are a few special files that may exist in each subdirectory of @file{sysdeps}: +@comment Blank lines after items make the table look better. @table @file @item Makefile + A makefile for this machine or operating system, or class of machine or operating system. This file is included by the library makefile @file{Makerules}, which is used by the top-level makefile and the @@ -425,11 +432,13 @@ makefiles may be included, each should append to @samp{sysdep-routines} rather than simply setting it: -@example +@smallexample sysdep-routines := $(sysdep-routines) foo bar -@end example +@end smallexample +@need 1000 @item Subdirs + This file contains the names of new whole subdirectories under the top-level library source tree that should be included for this system. These subdirectories are treated just like the system-independent @@ -436,15 +445,16 @@ subdirectories in the library source tree, such as @file{stdio} and @file{math}. -Use this when there are whole new sets of routines and header files that -should go into the library for the system this subdirectory of -@file{sysdeps} implements. For example, +Use this when there are completely new sets of functions and header +files that should go into the library for the system this subdirectory +of @file{sysdeps} implements. For example, @file{sysdeps/unix/inet/Subdirs} contains @file{inet}; the @file{inet} directory contains various network-oriented operations which only make sense to put in the library on systems that support the Internet.@refill @item Dist -This file contains the names of files (relative the the subdirectory of + +This file contains the names of files (relative to the subdirectory of @file{sysdeps} in which it appears) which should be included in the distribution. List any new files used by rules in the @file{Makefile} in the same directory, or header files used by the source files in that @@ -453,23 +463,36 @@ machine-independent makefiles in the main source tree. @item configure + This file is a shell script fragment to be run at configuration time. The top-level @file{configure} script uses the shell @code{.} command to read the @file{configure} file in each system-dependent directory -chosen. The @file{configure} files are usually generated from -@file{configure.in} files using Autoconf. A system-dependent -@file{configure} script will usually add things to the shell variables -@samp{DEFS} and @samp{config_vars}; see the top-level @file{configure} -script for details. +chosen, in order. The @file{configure} files are often generated from +@file{configure.in} files using Autoconf. + +A system-dependent @file{configure} script will usually add things to +the shell variables @samp{DEFS} and @samp{config_vars}; see the +top-level @file{configure} script for details. The script can check for +@w{@samp{--with-@var{package}}} options that were passed to the +top-level @file{configure}. For an option +@w{@samp{--with-@var{package}=@var{value}}} @file{configure} sets the +shell variable @w{@samp{with_@var{package}}} (with any dashes in +@var{package} converted to underscores) to @var{value}; if the option is +just @w{@samp{--with-@var{package}}} (no argument), then it sets +@w{@samp{with_@var{package}}} to @samp{yes}. @item configure.in -This file is an Autoconf input fragment to be processed into -@file{configure}. You should write either @file{configure} or -@file{configure.in}, but not both. The first line of @file{configure} -should invoke the @code{m4} macro @samp{GLIBC_PROVIDES}. This macro -does several @code{AC_PROVIDE} calls for Autoconf macros which are used -by the top-level @file{configure} script; without this, those macros -might be invoked again unnecessarily by Autoconf. + +This file is an Autoconf input fragment to be processed into the file +@file{configure} in this subdirectory. @xref{Introduction,,, +autoconf.info, Autoconf: Generating Automatic Configuration Scripts}, +for a description of Autoconf. You should write either @file{configure} +or @file{configure.in}, but not both. The first line of +@file{configure.in} should invoke the @code{m4} macro +@samp{GLIBC_PROVIDES}. This macro does several @code{AC_PROVIDE} calls +for Autoconf macros which are used by the top-level @file{configure} +script; without this, those macros might be invoked again unnecessarily +by Autoconf. @end table That is the general system for how system-dependencies are isolated. @@ -486,7 +509,7 @@ @end menu @node Hierarchy Conventions -@appendixsubsec The Layout of the @file{sysdeps} Directory Hierarchy +@appendixsubsec Layout of the @file{sysdeps} Directory Hierarchy A GNU configuration name has three parts: the CPU type, the manufacturer's name, and the operating system. @file{configure} uses @@ -509,16 +532,18 @@ @file{configure} tries successively less specific operating system names by removing trailing suffixes starting with a period. -Here is the complete list of directories that would be tried for the -configuration @samp{sparc-sun-sunos4.1}: +As an example, here is the complete list of directories that would be +tried for the configuration @w{@samp{sparc-sun-sunos4.1}} (without the +@w{@samp{--nfp}} option): -@example -@group +@smallexample sparc/fpu unix/bsd/sun/sunos4.1/sparc unix/bsd/sun/sunos4.1 unix/bsd/sun/sunos4/sparc unix/bsd/sun/sunos4 +unix/bsd/sun/sunos/sparc +unix/bsd/sun/sunos unix/bsd/sun/sparc unix/bsd/sun unix/bsd/sunos4.1/sparc @@ -525,12 +550,32 @@ unix/bsd/sunos4.1 unix/bsd/sunos4/sparc unix/bsd/sunos4 +unix/bsd/sunos/sparc +unix/bsd/sunos unix/bsd/sparc unix/bsd +unix/sun/sunos4.1/sparc +unix/sun/sunos4.1 +unix/sun/sunos4/sparc +unix/sun/sunos4 +unix/sun/sunos/sparc +unix/sun/sunos +unix/sun/sparc +unix/sun +unix/sunos4.1/sparc +unix/sunos4.1 +unix/sunos4/sparc +unix/sunos4 +unix/sunos/sparc +unix/sunos +unix/sparc +unix sun/sunos4.1/sparc sun/sunos4.1 sun/sunos4/sparc sun/sunos4 +sun/sunos/sparc +sun/sunos sun/sparc sun sunos4.1/sparc @@ -537,18 +582,20 @@ sunos4.1 sunos4/sparc sunos4 +sunos/sparc +sunos sparc -@end group -@end example +@end smallexample -Different machine architectures are generally at the top level of the -@file{sysdeps} directory tree. For example, @w{@file{sysdeps/sparc}} -and @w{@file{sysdeps/m68k}}. These contain files specific to those -machine architectures, but not specific to any particular operating -system. There might be subdirectories for specializations of those -architectures, such as @w{@file{sysdeps/m68k/68020}}. Code which is -specific to the floating-point coprocessor used with a particular -machine should go in @w{@file{sysdeps/@var{machine}/fpu}}. +Different machine architectures are conventionally subdirectories at the +top level of the @file{sysdeps} directory tree. For example, +@w{@file{sysdeps/sparc}} and @w{@file{sysdeps/m68k}}. These contain +files specific to those machine architectures, but not specific to any +particular operating system. There might be subdirectories for +specializations of those architectures, such as +@w{@file{sysdeps/m68k/68020}}. Code which is specific to the +floating-point coprocessor used with a particular machine should go in +@w{@file{sysdeps/@var{machine}/fpu}}. There are a few directories at the top level of the @file{sysdeps} hierarchy that are not for particular machine architectures. @@ -574,7 +621,7 @@ @file{posix} cannot be complete. @item unix -This is the directory for Unix-like things. See @xref{Porting to Unix}. +This is the directory for Unix-like things. @xref{Porting to Unix}. @file{unix} implies @file{posix}. There are some special-purpose subdirectories of @file{unix}: @@ -622,11 +669,11 @@ @file{sysdep.h} implementations to see what these macros are and what they should do.@refill -The system-specific makefile for the @file{unix} directory, -@file{sysdeps/unix/Makefile}, gives rules to generate several files from -the Unix system you are building the library on (which is assumed to be -the target system you are building the library @emph{for}). All the -generated files are put in the directory where the object files are +The system-specific makefile for the @file{unix} directory (that is, the +file @file{sysdeps/unix/Makefile}) gives rules to generate several files +from the Unix system you are building the library on (which is assumed +to be the target system you are building the library @emph{for}). All +the generated files are put in the directory where the object files are kept; they should not affect the source tree itself. The files generated are @file{ioctls.h}, @file{errnos.h}, @file{sys/param.h}, and @file{errlist.c} (for the @file{stdio} section of the library). @@ -649,13 +696,14 @@ @node Contributors @appendixsec Contributors to the GNU C Library -The GNU C library was written almost entirely by Roland McGrath. -Some parts of the library were contributed by other people. +The GNU C library was written almost entirely by Roland McGrath, who now +maintains it. Some parts of the library were contributed or worked on +by other people. @itemize @bullet @item The @code{getopt} function and related code were written by -@w{Richard Stallman}, @w{David J. MacKenzie}, and @w{Roland McGrath}. +Richard Stallman, @w{David J. MacKenzie}, and @w{Roland McGrath}. @item Most of the math functions are taken from 4.4 BSD; they have been @@ -688,8 +736,8 @@ All advertising materials mentioning features or use of this software must display the following acknowledgement: @quotation - This product includes software developed by the University of - California, Berkeley and its contributors. +This product includes software developed by the University of +California, Berkeley and its contributors. @end quotation @item Neither the name of the University nor the names of its contributors @@ -730,16 +778,16 @@ The memory allocation functions @code{malloc}, @code{realloc} and @code{free} and related code were written by Michael J. Haertel. -@item -Fast implementations of many of the string functions (@code{memcpy}, -@code{strlen}, etc.) were written by +@comment tege's name has an umlaut. @tex -Torbj\"orn +\xdef\SETtege{Torbj\"orn Granlund} @end tex @ifinfo -Torbjorn +@set tege Torbjorn Granlund @end ifinfo -Granlund.@refill +@item +Fast implementations of many of the string functions (@code{memcpy}, +@code{strlen}, etc.) were written by @value{tege}. @item Some of the support code for Mach is taken from Mach 3.0 by CMU, @@ -804,7 +852,7 @@ @item The timezone support code is derived from the public-domain timezone -package by Arthur David Olsen. +package by Arthur David Olson. @item The Internet resolver code is taken directly from BIND 4.9.1, which is @@ -811,9 +859,7 @@ under both the Berkeley copyright above and also: @quotation -@display Portions Copyright @copyright{} 1993 by Digital Equipment Corporation. -@end display Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -831,6 +877,16 @@ negligence or other tortious action, arising out of or in connection with the use or performance of this software.} @end quotation + +@item +The port to the DEC Alpha running OSF/1 (@code{alpha-dec-osf1}) was +contributed by Brendan Kehoe, using some code written by Roland McGrath. + +@item +The floating-point printing function used by @code{printf} and friends +was written by Roland McGrath and @value{tege}. The multi-precision +integer functions used in that function are taken from GNU MP, which was +contributed by @value{tege}. @end itemize @c @bye diff -ruN glibc-1.06/manual/makefsock.c.texi glibc-1.07/manual/makefsock.c.texi --- glibc-1.06/manual/makefsock.c.texi Tue Jan 5 14:35:36 1993 +++ glibc-1.07/manual/makefsock.c.texi @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int -make_named_socket (const char *filename) -@{ - struct sockaddr_un name; - int sock; - size_t size; - - /* @r{Create the socket. } */ - - sock = socket (PF_UNIX, SOCK_DGRAM, 0); - if (sock < 0) - @{ - perror ("socket"); - exit (EXIT_FAILURE); - @} - - /* @r{Bind a name to the socket. } */ - - name.sun_family = AF_FILE; - strcpy (name.sun_path, filename); - - /* The size of the address is - the offset of the start of the filename, - plus its length, - plus one for the terminating null byte. */ - size = (offsetof (struct sockaddr_un, sun_path) - + strlen (name.sun_path) + 1); - - if (bind (sock, (struct sockaddr *) &name, size) < 0) - @{ - perror ("bind"); - exit (EXIT_FAILURE); - @} - - return sock; -@} diff -ruN glibc-1.06/manual/makeisock.c.texi glibc-1.07/manual/makeisock.c.texi --- glibc-1.06/manual/makeisock.c.texi Tue Jan 5 14:44:25 1993 +++ glibc-1.07/manual/makeisock.c.texi @@ -1,31 +0,0 @@ -#include -#include -#include -#include - -int -make_socket (unsigned short int port) -@{ - int sock; - struct sockaddr_in name; - - /* @r{Create the socket. } */ - sock = socket (PF_INET, SOCK_STREAM, 0); - if (sock < 0) - @{ - perror ("socket"); - exit (EXIT_FAILURE); - @} - - /* @r{Give the socket a name. } */ - name.sin_family = AF_INET; - name.sin_port = htons (port); - name.sin_addr.s_addr = htonl (INADDR_ANY); - if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0) - @{ - perror ("bind"); - exit (EXIT_FAILURE); - @} - - return sock; -@} diff -ruN glibc-1.06/manual/math.texi glibc-1.07/manual/math.texi --- glibc-1.06/manual/math.texi Wed May 12 14:26:15 1993 +++ glibc-1.07/manual/math.texi Thu Jun 24 20:35:26 1993 @@ -99,9 +99,9 @@ The math library doesn't define a symbolic constant for pi, but you can define your own if you need one: -@example +@smallexample #define PI 3.14159265358979323846264338327 -@end example +@end smallexample @noindent You can also compute the value of pi with the expression @code{acos @@ -282,10 +282,10 @@ @cindex cube root function @comment math.h -@comment GNU +@comment BSD @deftypefun double cbrt (double @var{x}) This function returns the cube root of @var{x}. This function cannot -fail; every representable real value has a represetable real cube root. +fail; every representable real value has a representable real cube root. @end deftypefun @comment math.h diff -ruN glibc-1.06/manual/mbyte.texi glibc-1.07/manual/mbyte.texi --- glibc-1.06/manual/mbyte.texi Wed May 19 14:06:00 1993 +++ glibc-1.07/manual/mbyte.texi Mon Aug 30 17:07:15 1993 @@ -38,7 +38,7 @@ @itemize @bullet @item -As @dfn{Multibyte characters} which can be embedded in an ordinary +As @dfn{multibyte characters} which can be embedded in an ordinary string, an array of @code{char} objects. Their advantage is that many programs and operating systems can handle occasional multibyte characters scattered among ordinary ASCII characters, without any @@ -380,19 +380,20 @@ Here is an example showing how to convert a string of multibyte characters, allocating enough space for the result. -@example +@smallexample wchar_t * -mbstowcs_alloc (char *string) +mbstowcs_alloc (const char *string) @{ - int size = strlen (string) + 1; - wchar_t *buffer = (wchar_t) xmalloc (size * sizeof (wchar_t)); + size_t size = strlen (string) + 1; + wchar_t *buf = xmalloc (size * sizeof (wchar_t)); - size = mbstowcs (buffer, string, size); - if (size < 0) + size = mbstowcs (buf, string, size); + if (size == (size_t) -1) return NULL; - return (wchar_t) xrealloc (buffer, (size + 1) * sizeof (wchar_t)); + buf = xrealloc (buf, (size + 1) * sizeof (wchar_t)); + return buf; @} -@end example +@end smallexample @end deftypefun @@ -430,10 +431,10 @@ @comment stdlib.h @comment ANSI @deftypefun int mblen (const char *@var{string}, size_t @var{size}) -The @code{mblen} function with non-null @var{string} returns the number -of bytes that make up the multibyte character beginning at @var{string}, -never examining more than @var{size} bytes. (The idea is to supply -for @var{size} the number of bytes of data you have in hand.) +The @code{mblen} function with a non-null @var{string} argument returns +the number of bytes that make up the multibyte character beginning at +@var{string}, never examining more than @var{size} bytes. (The idea is +to supply for @var{size} the number of bytes of data you have in hand.) The return value of @code{mblen} distinguishes three possibilities: the first @var{size} bytes at @var{string} start with valid multibyte @@ -535,7 +536,7 @@ @end deftypefun @node Example of Conversion, Shift State, Converting One Char, Extended Characters -@section Example of Character-by-Character Conversion +@section Character-by-Character Conversion Example Here is an example that reads multibyte character text from descriptor @code{input} and writes the corresponding wide characters to descriptor @@ -544,7 +545,7 @@ character, and cannot cope with an apparently invalid partial character by reading more input. -@example +@smallexample int file_mbstowcs (int input, int output) @{ @@ -562,10 +563,11 @@ /* @r{Fill up the buffer from the input file.} */ nread = read (input, buffer + filled, BUFSIZ); - if (nread < 0) @{ - perror ("read"); - return 0; - @} + if (nread < 0) + @{ + perror ("read"); + return 0; + @} /* @r{If we reach end of file, make a note to read no more.} */ if (nread == 0) eof = 1; @@ -610,8 +612,8 @@ return 0; @} - /* @r{If any characters must be carried forward, - put them at the beginning of @code{buffer}.} */ + /* @r{If any characters must be carried forward,} + @r{put them at the beginning of @code{buffer}.} */ if (filled > 0) memcpy (inp, buffer, filled); @} @@ -619,7 +621,7 @@ return 1; @} -@end example +@end smallexample @node Shift State, , Example of Conversion, Extended Characters @section Multibyte Codes Using Shift Sequences @@ -660,7 +662,7 @@ Here is an example of using @code{mblen} following these rules: -@example +@smallexample void scan_string (char *s) @{ @@ -685,7 +687,7 @@ length -= thischar; @} @} -@end example +@end smallexample The functions @code{mblen}, @code{mbtowc} and @code{wctomb} are not reentrant when using a multibyte code that uses a shift state. However, diff -ruN glibc-1.06/manual/memory.texi glibc-1.07/manual/memory.texi --- glibc-1.06/manual/memory.texi Wed May 19 14:06:13 1993 +++ glibc-1.07/manual/memory.texi Mon Aug 30 20:10:39 1993 @@ -1,3 +1,6 @@ +@comment !!! describe mmap et al (here?) +@c !!! doc brk/sbrk + @node Memory Allocation, Character Handling, Error Reporting, Top @chapter Memory Allocation @cindex memory allocation @@ -103,7 +106,7 @@ address of the space. Then you can use the operators @samp{*} and @samp{->} on this pointer variable to refer to the contents of the space: -@example +@smallexample @{ struct foobar *ptr = (struct foobar *) malloc (sizeof (struct foobar)); @@ -111,7 +114,7 @@ ptr->next = current_foobar; current_foobar = ptr; @} -@end example +@end smallexample @node Unconstrained Allocation @section Unconstrained Allocation @@ -167,13 +170,13 @@ so, and of initializing the space with zeros using the library function @code{memset} (@pxref{Copying and Concatenation}): -@example +@smallexample struct foo *ptr; @dots{} ptr = (struct foo *) malloc (sizeof (struct foo)); if (ptr == 0) abort (); memset (ptr, 0, sizeof (struct foo)); -@end example +@end smallexample You can store the result of @code{malloc} into any pointer variable without a cast, because ANSI C automatically converts the type @@ -186,11 +189,11 @@ because a string is terminated with a null character that doesn't count in the ``length'' of the string but does need space. For example: -@example +@smallexample char *ptr; @dots{} ptr = (char *) malloc (length + 1); -@end example +@end smallexample @noindent @xref{Representation of Strings}, for more information about this. @@ -205,7 +208,7 @@ nonzero. This function is conventionally called @code{xmalloc}. Here it is: -@example +@smallexample void * xmalloc (size_t size) @{ @@ -214,22 +217,22 @@ fatal ("virtual memory exhausted"); return value; @} -@end example +@end smallexample Here is a real example of using @code{malloc} (by way of @code{xmalloc}). The function @code{savestring} will copy a sequence of characters into a newly allocated null-terminated string: -@example +@smallexample char * savestring (const char *ptr, size_t len) @{ register char *value = (char *) xmalloc (len + 1); memcpy (value, ptr, len); - value[len] = 0; + value[len] = '\0'; return value; @} -@end example +@end smallexample The block that @code{malloc} gives you is guaranteed to be aligned so that it can hold any type of data. In the GNU system, the address is @@ -277,7 +280,7 @@ freeing it! Here is an example of the proper way to free all the blocks in a chain, and the strings that they point to: -@example +@smallexample struct chain @{ struct chain *next; @@ -295,7 +298,7 @@ chain = next; @} @} -@end example +@end smallexample Occasionally, @code{free} can actually return memory to the operating system and make the process smaller. Usually, all it can do is allow a @@ -332,6 +335,12 @@ space is available. The value of @code{realloc} is the new address of the block. If the block needs to be moved, @code{realloc} copies the old contents. + +If you pass a null pointer for @var{ptr}, @code{realloc} behaves just +like @samp{malloc (@var{newsize})}. This can be convenient, but beware +that older implementations (before ANSI C) may not support this +behavior, and will probably crash when @code{realloc} is passed a null +pointer. @end deftypefun Like @code{malloc}, @code{realloc} may return a null pointer if no @@ -345,7 +354,7 @@ conventionally called @code{xrealloc}, that takes care of the error message as @code{xmalloc} does for @code{malloc}: -@example +@smallexample void * xrealloc (void *ptr, size_t size) @{ @@ -354,7 +363,7 @@ fatal ("Virtual memory exhausted"); return value; @} -@end example +@end smallexample You can also use @code{realloc} to make a block smaller. The reason you would do this is to avoid tying up a lot of memory space when only a little @@ -381,7 +390,7 @@ You could define @code{calloc} as follows: -@example +@smallexample void * calloc (size_t count, size_t eltsize) @{ @@ -391,7 +400,7 @@ memset (value, 0, size); return value; @} -@end example +@end smallexample We rarely use @code{calloc} today, because it is equivalent to such a simple combination of other features that are more often used. It is a @@ -407,6 +416,7 @@ power of two. This holds for sizes up to a page size. Therefore, if you are free to choose the size of a small block in order to make @code{malloc} more efficient, make it a power of two. +@c !!! xref getpagesize Once a page is split up for a particular block size, it can't be reused for another size unless all the blocks in it are freed. In many @@ -443,7 +453,7 @@ @comment malloc.h stdlib.h @comment BSD -@deftypefun {void *} memalign (size_t @var{size}, int @var{boundary}) +@deftypefun {void *} memalign (size_t @var{size}, size_t @var{boundary}) The @code{memalign} function allocates a block of @var{size} bytes whose address is a multiple of @var{boundary}. The @var{boundary} must be a power of two! The function @code{memalign} works by calling @@ -455,7 +465,16 @@ @comment BSD @deftypefun {void *} valloc (size_t @var{size}) Using @code{valloc} is like using @code{memalign} and passing the page size -as the value of the second argument. +as the value of the second argument. It is implemented like this: + +@smallexample +void * +valloc (size_t size) +@{ + return memalign (size, getpagesize ()); +@} +@end smallexample +@c !!! xref getpagesize @end deftypefun @node Heap Consistency Checking @@ -471,7 +490,7 @@ @comment malloc.h @comment GNU -@deftypefun void mcheck (void (*@var{abortfn}) (void)) +@deftypefun int mcheck (void (*@var{abortfn}) (void)) Calling @code{mcheck} tells @code{malloc} to perform occasional consistency checks. These will catch things such as writing past the end of a block that was allocated with @code{malloc}. @@ -486,7 +505,8 @@ @code{0} otherwise (when it is successful). The easiest way to arrange to call @code{mcheck} early enough is to use -the option @samp{-lmcheck} when you link your program. +the option @samp{-lmcheck} when you link your program; then you don't +need to modify your program source at all. @end deftypefun @node Hooks for Malloc @@ -508,9 +528,9 @@ uses whenever it is called. You should define this function to look like @code{malloc}; that is, like: -@example +@smallexample void *@var{function} (size_t @var{size}) -@end example +@end smallexample @end defvar @comment malloc.h @@ -520,9 +540,9 @@ uses whenever it is called. You should define this function to look like @code{realloc}; that is, like: -@example +@smallexample void *@var{function} (void *@var{ptr}, size_t @var{size}) -@end example +@end smallexample @end defvar @comment malloc.h @@ -532,9 +552,9 @@ uses whenever it is called. You should define this function to look like @code{free}; that is, like: -@example +@smallexample void @var{function} (void *@var{ptr}) -@end example +@end smallexample @end defvar You must make sure that the function you install as a hook for one of @@ -546,7 +566,7 @@ installs a function that prints out information every time @code{malloc} is called. -@example +@smallexample static void *(*old_malloc_hook) (size_t); static void * my_malloc_hook (size_t size) @@ -566,7 +586,7 @@ __malloc_hook = my_malloc_hook; ... @} -@end example +@end smallexample The @code{mcheck} function (@pxref{Heap Consistency Checking}) works by installing such hooks. @@ -591,7 +611,7 @@ @table @code @item size_t bytes_total -This is the total size of memory managed by malloc, in bytes. +This is the total size of memory managed by @code{malloc}, in bytes. @item size_t chunks_used This is the number of chunks in use. (The storage allocator internally @@ -642,14 +662,14 @@ Space}. @item void *valloc (size_t @var{size}) -Allocate a block @var{size} bytes, starting on a page boundary. +Allocate a block of @var{size} bytes, starting on a page boundary. @xref{Aligned Memory Blocks}. @item void *memalign (size_t @var{size}, size_t @var{boundary}) -Allocate a block @var{size} bytes, starting on an address that is a +Allocate a block of @var{size} bytes, starting on an address that is a multiple of @var{boundary}. @xref{Aligned Memory Blocks}. -@item void mcheck (void (*@var{abortfn}) (void)) +@item int mcheck (void (*@var{abortfn}) (void)) Tell @code{malloc} to perform occasional consistency checks on dynamically allocated memory, and to call @var{abortfn} when an inconsistency is found. @xref{Heap Consistency Checking}. @@ -663,8 +683,8 @@ @item void (*__free_hook) (void *@var{ptr}) A pointer to a function that @code{free} uses whenever it is called. -@item void struct mstats mstats (void) -Read information about the current dynamic memory usage. +@item struct mstats mstats (void) +Return information about the current dynamic memory usage. @xref{Statistics of Malloc}. @end table @@ -749,9 +769,9 @@ Each source file in which you plan to use the obstack functions must include the header file @file{obstack.h}, like this: -@example +@smallexample #include -@end example +@end smallexample @findex obstack_chunk_alloc @findex obstack_chunk_free @@ -766,10 +786,10 @@ @code{xmalloc} (@pxref{Unconstrained Allocation}). This is done with the following pair of macro definitions: -@example +@smallexample #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -@end example +@end smallexample @noindent Though the storage you get using obstacks really comes from @code{malloc}, @@ -789,21 +809,21 @@ Here are two examples of how to allocate the space for an obstack and initialize it. First, an obstack that is a static variable: -@example +@smallexample static struct obstack myobstack; @dots{} obstack_init (&myobstack); -@end example +@end smallexample @noindent Second, an obstack that is itself dynamically allocated: -@example +@smallexample struct obstack *myobstack_ptr = (struct obstack *) xmalloc (sizeof (struct obstack)); obstack_init (myobstack_ptr); -@end example +@end smallexample @node Allocation in an Obstack @subsection Allocation in an Obstack @@ -823,9 +843,9 @@ @end deftypefun For example, here is a function that allocates a copy of a string @var{str} -in a specific obstack, which is the variable @code{string_obstack}: +in a specific obstack, which is in the variable @code{string_obstack}: -@example +@smallexample struct obstack string_obstack; char * @@ -836,7 +856,7 @@ memcpy (s, string, strlen (string)); return s; @} -@end example +@end smallexample To allocate a block with specified contents, use the function @code{obstack_copy}, declared like this: @@ -859,13 +879,13 @@ of characters into an obstack as a null-terminated string. Here is an example of its use: -@example +@smallexample char * obstack_savestring (char *addr, size_t size) @{ return obstack_copy0 (&myobstack, addr, size); @} -@end example +@end smallexample @noindent Contrast this with the previous example of @code{savestring} using @@ -894,9 +914,9 @@ valid for further allocation, call @code{obstack_free} with the address of the first object allocated on the obstack: -@example +@smallexample obstack_free (obstack_ptr, first_object_allocated_ptr); -@end example +@end smallexample Recall that the objects in an obstack are grouped into chunks. When all the objects in a chunk become free, the obstack library automatically @@ -921,9 +941,9 @@ operand (the obstack pointer) may not contain any side effects, because it may be computed more than once. For example, if you write this: -@example +@smallexample obstack_alloc (get_obstack (), 4); -@end example +@end smallexample @noindent you will find that @code{get_obstack} may be called several times. @@ -937,7 +957,7 @@ default, but you can request the function definition instead by writing the function name in parentheses, as shown here: -@example +@smallexample char *x; void *(*funcp) (); /* @r{Use the macro}. */ @@ -946,7 +966,7 @@ x = (char *) (obstack_alloc) (obptr, size); /* @r{Take the address of the function}. */ funcp = obstack_alloc; -@end example +@end smallexample @noindent This is the same situation that exists in ANSI C for the standard library @@ -1043,9 +1063,9 @@ If you have started growing an object and wish to cancel it, you should finish it and then free it, like this: -@example +@smallexample obstack_free (obstack_ptr, obstack_finish (obstack_ptr)); -@end example +@end smallexample @noindent This has no effect if no object was growing. @@ -1113,7 +1133,7 @@ Here is an example: -@example +@smallexample @group void add_string (struct obstack *obstack, char *ptr, size_t len) @@ -1136,7 +1156,7 @@ @} @} @end group -@end example +@end smallexample @node Status of an Obstack @subsection Status of an Obstack @@ -1175,9 +1195,9 @@ This function returns the size in bytes of the currently growing object. This is equivalent to -@example +@smallexample obstack_next_free (@var{obstack_ptr}) - obstack_base (@var{obstack_ptr}) -@end example +@end smallexample @end deftypefun @node Obstacks Data Alignment @@ -1205,9 +1225,9 @@ The expansion of the macro @code{obstack_alignment_mask} is an lvalue, so you can alter the mask by assignment. For example, this statement: -@example +@smallexample obstack_alignment_mask (obstack_ptr) = 0; -@end example +@end smallexample @noindent has the effect of turning off alignment processing in the specified obstack. @@ -1242,10 +1262,10 @@ source file that uses @code{obstack_init} (@pxref{Creating Obstacks}). Most often they are defined as macros like this: -@example +@smallexample #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -@end example +@end smallexample Note that these are simple macros (no arguments). Macro definitions with arguments will not work! It is necessary that @code{obstack_chunk_alloc} @@ -1278,10 +1298,10 @@ allocating many objects whose size is comparable to the chunk size. Here is how to do so cleanly: -@example +@smallexample if (obstack_chunk_size (obstack_ptr) < @var{new_chunk_size}) obstack_chunk_size (obstack_ptr) = @var{new_chunk_size}; -@end example +@end smallexample @node Summary of Obstacks @subsection Summary of Obstack Functions @@ -1414,7 +1434,7 @@ name made from concatenating two argument strings, and returns a file descriptor or minus one signifying failure: -@example +@smallexample int open2 (char *str1, char *str2, int flags, int mode) @{ @@ -1423,13 +1443,13 @@ strcat (name, str2); return open (name, flags, mode); @} -@end example +@end smallexample @noindent Here is how you would get the same results with @code{malloc} and @code{free}: -@example +@smallexample int open2 (char *str1, char *str2, int flags, int mode) @{ @@ -1443,7 +1463,7 @@ free (name); return desc; @} -@end example +@end smallexample As you can see, it is simpler with @code{alloca}. But @code{alloca} has other, more important advantages, and some disadvantages. @@ -1478,7 +1498,7 @@ Let's change @code{open2} (@pxref{Alloca Example}) to use this subroutine:@refill -@example +@smallexample int open2 (char *str1, char *str2, int flags, int mode) @{ @@ -1487,7 +1507,7 @@ strcat (name, str2); return open_or_report_error (name, flags, mode); @} -@end example +@end smallexample @noindent Because of the way @code{alloca} works, the storage it allocates is @@ -1527,7 +1547,7 @@ In GNU C, you can replace most uses of @code{alloca} with an array of variable size. Here is how @code{open2} would look then: -@example +@smallexample int open2 (char *str1, char *str2, int flags, int mode) @{ char name[strlen (str1) + strlen (str2) + 1]; @@ -1535,7 +1555,7 @@ strcat (name, str2); return open (name, flags, mode); @} -@end example +@end smallexample But @code{alloca} is not always equivalent to a variable-sized array, for several reasons: @@ -1543,14 +1563,13 @@ @itemize @bullet @item A variable size array's space is freed at the end of the scope of the -name of the array. The space allocated with @code{alloca} usually +name of the array. The space allocated with @code{alloca} remains until the end of the function. @item It is possible to use @code{alloca} within a loop, allocating an additional block on each iteration. This is impossible with -variable-sized arrays. On the other hand, this is also slightly -unclean. +variable-sized arrays. @end itemize @strong{Note:} If you mix use of @code{alloca} and variable-sized arrays @@ -1650,12 +1669,13 @@ @pindex malloc.c You can ask for warnings as the program approaches running out of memory -space, by calling @code{memory_warnings}. This is a GNU extension -declared in @file{malloc.h}. +space, by calling @code{memory_warnings}. This tells @code{malloc} to +check memory usage every time it asks for more memory from the operating +system. This is a GNU extension declared in @file{malloc.h}. @comment malloc.h @comment GNU -@deftypefun void memory_warnings (void *@var{start}, void (*@var{warn_func}) (char *)) +@deftypefun void memory_warnings (void *@var{start}, void (*@var{warn_func}) (const char *)) Call this function to request warnings for nearing exhaustion of virtual memory. diff -ruN glibc-1.06/manual/memstream.c.texi glibc-1.07/manual/memstream.c.texi --- glibc-1.06/manual/memstream.c.texi Fri Oct 16 17:52:51 1992 +++ glibc-1.07/manual/memstream.c.texi @@ -1,19 +0,0 @@ -#include - -int -main (void) -@{ - char *bp; - size_t size; - FILE *stream; - - stream = open_memstream (&bp, &size); - fprintf (stream, "hello"); - fflush (stream); - printf ("buf = %s, size = %d\n", bp, size); - fprintf (stream, ", world"); - fclose (stream); - printf ("buf = %s, size = %d\n", bp, size); - - return 0; -@} diff -ruN glibc-1.06/manual/memstrm.c.texi glibc-1.07/manual/memstrm.c.texi --- glibc-1.06/manual/memstrm.c.texi +++ glibc-1.07/manual/memstrm.c.texi Thu Jun 10 18:00:17 1993 @@ -0,0 +1,19 @@ +#include + +int +main (void) +@{ + char *bp; + size_t size; + FILE *stream; + + stream = open_memstream (&bp, &size); + fprintf (stream, "hello"); + fflush (stream); + printf ("buf = %s, size = %d\n", bp, size); + fprintf (stream, ", world"); + fclose (stream); + printf ("buf = %s, size = %d\n", bp, size); + + return 0; +@} diff -ruN glibc-1.06/manual/mkfsock.c.texi glibc-1.07/manual/mkfsock.c.texi --- glibc-1.06/manual/mkfsock.c.texi +++ glibc-1.07/manual/mkfsock.c.texi Thu Jun 10 18:00:26 1993 @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include +#include + +int +make_named_socket (const char *filename) +@{ + struct sockaddr_un name; + int sock; + size_t size; + + /* @r{Create the socket.} */ + + sock = socket (PF_UNIX, SOCK_DGRAM, 0); + if (sock < 0) + @{ + perror ("socket"); + exit (EXIT_FAILURE); + @} + + /* @r{Bind a name to the socket.} */ + + name.sun_family = AF_FILE; + strcpy (name.sun_path, filename); + + /* @r{The size of the address is + the offset of the start of the filename, + plus its length, + plus one for the terminating null byte.} */ + size = (offsetof (struct sockaddr_un, sun_path) + + strlen (name.sun_path) + 1); + + if (bind (sock, (struct sockaddr *) &name, size) < 0) + @{ + perror ("bind"); + exit (EXIT_FAILURE); + @} + + return sock; +@} diff -ruN glibc-1.06/manual/mkisock.c.texi glibc-1.07/manual/mkisock.c.texi --- glibc-1.06/manual/mkisock.c.texi +++ glibc-1.07/manual/mkisock.c.texi Thu Jun 10 18:00:27 1993 @@ -0,0 +1,31 @@ +#include +#include +#include +#include + +int +make_socket (unsigned short int port) +@{ + int sock; + struct sockaddr_in name; + + /* @r{Create the socket.} */ + sock = socket (PF_INET, SOCK_STREAM, 0); + if (sock < 0) + @{ + perror ("socket"); + exit (EXIT_FAILURE); + @} + + /* @r{Give the socket a name.} */ + name.sin_family = AF_INET; + name.sin_port = htons (port); + name.sin_addr.s_addr = htonl (INADDR_ANY); + if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0) + @{ + perror ("bind"); + exit (EXIT_FAILURE); + @} + + return sock; +@} diff -ruN glibc-1.06/manual/pattern.texi glibc-1.07/manual/pattern.texi --- glibc-1.06/manual/pattern.texi Wed May 12 14:26:20 1993 +++ glibc-1.07/manual/pattern.texi Mon Aug 30 20:36:12 1993 @@ -1,8 +1,10 @@ @node Pattern Matching, I/O Overview, Searching and Sorting, Top @chapter Pattern Matching -The GNU C Library provides pattern matching facilities for two kinds -of patterns: regular expressions and file-name wildcards. +The GNU C Library provides pattern matching facilities for two kinds of +patterns: regular expressions and file-name wildcards. The library also +provides a facility for expanding variable and command references and +parsing text into words in the way the shell does. @menu * Wildcard Matching:: Matching a wildcard pattern against a single string. @@ -66,8 +68,10 @@ cannot match @samp{.} as the first character of @var{string}. If you set both @code{FNM_PERIOD} and @code{FNM_FILE_NAME}, then the -special treatment applies to @samp{.} following @samp{/} as well as -to @samp{.} at the beginning of @var{string}. +special treatment applies to @samp{.} following @samp{/} as well as to +@samp{.} at the beginning of @var{string}. (The shell uses the +@code{FNM_PERIOD} and @code{FNM_FILE_NAME} falgs together for matching +file names.) @comment fnmatch.h @comment POSIX.2 @@ -137,7 +141,7 @@ The number of elements in the vector. @item gl_pathv -The address of the vector. This field has type @code{char **}. +The address of the vector. This field has type @w{@code{char **}}. @item gl_offs The offset of the first real element of the vector, from its nominal @@ -161,7 +165,7 @@ The function @code{glob} does globbing using the pattern @var{pattern} in the current directory. It puts the result in a newly allocated vector, and stores the size and address of this vector into -@code{*@var{vector-ptr}}. The argument @var{flags} is a combination of +@code{*@var{vector_ptr}}. The argument @var{flags} is a combination of bit flags; see @ref{Flags for Globbing}, for details of the flags. The result of globbing is a sequence of file names. The function @@ -172,7 +176,7 @@ To return this vector, @code{glob} stores both its address and its length (number of elements, not counting the terminating null pointer) -into @code{*@var{vector-ptr}}. +into @code{*@var{vector_ptr}}. Normally, @code{glob} sorts the file names alphabetically before returning them. You can turn this off with the flag @code{GLOB_NOSORT} @@ -191,6 +195,13 @@ There was an error opening a directory, and you used the flag @code{GLOB_ERR} or your specified @var{errfunc} returned a nonzero value. +@iftex +See below +@end iftex +@ifinfo +@xref{Flags for Globbing}, +@end ifinfo +for an explanation of the @code{GLOB_ERR} flag and @var{errfunc}. @comment glob.h @comment POSIX.2 @@ -207,7 +218,7 @@ @end table In the event of an error, @code{glob} stores information in -@code{*@var{vector-ptr}} about all the matches it has found so far. +@code{*@var{vector_ptr}} about all the matches it has found so far. @end deftypefun @node Flags for Globbing @@ -215,7 +226,7 @@ This section describes the flags that you can specify in the @var{flags} argument to @code{glob}. Choose the flags you want, -and combine them with the C operator @code{|}. +and combine them with the C bitwise OR operator @code{|}. @table @code @comment glob.h @@ -230,6 +241,12 @@ @code{GLOB_DOOFFS} in the first call to @code{glob}, you must also set it when you append to the results. +Note that the pointer stored in @code{gl_pathv} may no longer be valid +after you call @code{glob} the second time, because @code{glob} might +have relocated the vector. So always fetch @code{gl_pathv} from the +@code{glob_t} structure after each @code{glob} call; @strong{never} save +the pointer across calls. + @comment glob.h @comment POSIX.2 @item GLOB_DOOFFS @@ -246,15 +263,15 @@ have the requisite access. Normally, @code{glob} tries its best to keep on going despite any errors, reading whatever directories it can. -You can exercise even more control than this by specifying an error-handler -function @var{errfunc} when you call @code{glob}. If @var{errfunc} is -nonzero, then @code{glob} doesn't give up right away when it can't read -a directory; instead, it calls @var{errfunc} with two arguments, like -this: +You can exercise even more control than this by specifying an +error-handler function @var{errfunc} when you call @code{glob}. If +@var{errfunc} is not a null pointer, then @code{glob} doesn't give up +right away when it can't read a directory; instead, it calls +@var{errfunc} with two arguments, like this: -@example +@smallexample (*@var{errfunc}) (@var{filename}, @var{error-code}) -@end example +@end smallexample @noindent The argument @var{filename} is the name of the directory that @@ -309,10 +326,9 @@ what the GNU system has had for many years. Both interfaces are declared in the header file @file{regex.h}. -If you define @code{_GNU_SOURCE}, then the GNU functions, structures -and constants are declared. Otherwise, only the POSIX names are -declared. -@c !!! wrong-- default is GNU +If you define @w{@code{_POSIX_C_SOURCE}}, then only the POSIX.2 +functions, structures, and constants are declared. +@c !!! we only document the POSIX.2 interface here!! @menu * POSIX Regexp Compilation:: Using @code{regcomp} to prepare to match. @@ -459,7 +475,7 @@ @comment regex.h @comment POSIX.2 @item REG_ESPACE -@code{regcomp} or @code{regexec} ran out of memory. +@code{regcomp} ran out of memory. @end table @node Flags for POSIX Regexps @@ -559,21 +575,20 @@ @comment regex.h @comment POSIX.2 @item REG_ESPACE -@code{regcomp} or @code{regexec} ran out of memory. +@code{regexec} ran out of memory. @end table @node Regexp Subexpressions -@c !!! I think this title is awkward -rm -@subsection Subexpressions Match Results +@subsection Match Results with Subexpressions When @code{regexec} matches parenthetical subexpressions of @var{pattern}, it records which parts of @var{string} they match. It returns that information by storing the offsets into an array whose elements are structures of type @code{regmatch_t}. The first element of -the array records the part of the string that matched the entire regular -expression. Each other element of the array records the beginning and -end of the part that matched a single parenthetical subexpression. -@c !!! in this paragraph, [0] is called "first"; see below +the array (index @code{0}) records the part of the string that matched +the entire regular expression. Each other element of the array records +the beginning and end of the part that matched a single parenthetical +subexpression. @comment regex.h @comment POSIX.2 @@ -599,10 +614,10 @@ @end deftp The @code{regmatch_t} elements correspond to subexpressions -positionally; the first element records where the first subexpression -matched, the second element records the second subexpression, and so on. -The order of the subexpressions is the order in which they begin. -@c !!! here [1] is called "first"; see above +positionally; the first element (index @code{1}) records where the first +subexpression matched, the second element records the second +subexpression, and so on. The order of the subexpressions is the order +in which they begin. When you call @code{regexec}, you specify how long the @var{matchptr} array is, with the @var{nmatch} argument. This tells @code{regexec} how @@ -644,19 +659,20 @@ that takes precedence. What this means is that when one subexpression appears within another, then the results reported for the inner subexpression reflect whatever happened on the last match of the outer -subexpression. For an example, consider @samp{\(ba\(na\)*s \)} matching +subexpression. For an example, consider @samp{\(ba\(na\)*s \)*} matching the string @samp{bananas bas }. The last time the inner expression actually matches is near the end of the first word. But it is @emph{considered} again in the second word, and fails to match there. @code{regexec} reports nonuse of the ``na'' subexpression. -Another place where this rule applies is when @samp{\(ba\(na\)*s -\|nefer\(ti\)* \)*} matches @samp{bananas nefertiti}. The ``na'' -subexpression does match in the first word, but it doesn't match in the -second word because the other alternative is used there. Once again, -the second repetition of the outer subexpression overrides the first, -and within that second repetition, the ``na'' subexpression is not used. -So @code{regexec} reports nonuse of the ``na'' subexpression. +Another place where this rule applies is when the regular expression +@w{@samp{\(ba\(na\)*s \|nefer\(ti\)* \)*}} matches @samp{bananas nefertiti}. +The ``na'' subexpression does match in the first word, but it doesn't +match in the second word because the other alternative is used there. +Once again, the second repetition of the outer subexpression overrides +the first, and within that second repetition, the ``na'' subexpression +is not used. So @code{regexec} reports nonuse of the ``na'' +subexpression. @node Regexp Cleanup @subsection POSIX Regexp Matching Cleanup @@ -702,8 +718,10 @@ the error message was not truncated, and you can use it. Otherwise, you should call @code{regerror} again with a larger buffer. -@c !!! i wrote this example of how to do it right (i think) -- intro it. -rm -@example +Here is a function which uses @code{regerror}, but always dynamically +allocates a buffer for the error message: + +@smallexample char *get_regerror (int errcode, regex_t *compiled) @{ size_t length = regerror (errcode, compiled, NULL, 0); @@ -711,7 +729,7 @@ (void) regerror (errcode, compiled, buffer, length); return buffer; @} -@end example +@end smallexample @end deftypefun @c !!!! this is not actually in the library.... @@ -767,19 +785,19 @@ @item @cindex variable substitution @cindex substitution of variables and commands -@dfn{Variable substitution}: The substitution of environment variables -for references such as @samp{$foo}. +@dfn{Variable substitution}: Environment variables are substituted for +references such as @samp{$foo}. @item @cindex command substitution -@dfn{Command substitution}: Replacement of constructs such as -@samp{`cat foo`} or @samp{$(cat foo)} with the output from the inner -command. +@dfn{Command substitution}: Constructs such as @w{@samp{`cat foo`}} and +the equivalent @w{@samp{$(cat foo)}} are replaced with the output from +the inner command. @item @cindex arithmetic expansion -@dfn{Arithmetic expansion}: Replacement of constructs such as -@samp{$(($x-1))} with the result of the arithmetic computation. +@dfn{Arithmetic expansion}: Constructs such as @samp{$(($x-1))} are +replaced with the result of the arithmetic computation. @end itemize @item @@ -825,7 +843,7 @@ The number of elements in the vector. @item we_wordv -The address of the vector. This field has type @code{char **}. +The address of the vector. This field has type @w{@code{char **}}. @item we_offs The offset of the first real element of the vector, from its nominal @@ -955,6 +973,10 @@ Instead of allocating a new vector of words, this call to @code{wordexp} will use the vector that already exists (making it larger if necessary). +Note that the vector may move, so it is not safe to save an old pointer +and use it again after calling @code{wordexp}. You must fetch +@code{we_pathv} anew after each call. + @comment wordexp.h @comment POSIX.2 @item WRDE_SHOWERR @@ -978,7 +1000,7 @@ @code{WRDE_APPEND} to concatenate the expansions and of @code{wordfree} to free the space allocated by @code{wordexp}. -@example +@smallexample int expand_and_execute (const char *program, const char *options) @{ @@ -1027,7 +1049,7 @@ wordfree (&result); return status; @} -@end example +@end smallexample In practice, since @code{wordexp} is executed by running a subshell, it would be faster to do this by concatenating the strings with spaces diff -ruN glibc-1.06/manual/pipe.c.texi glibc-1.07/manual/pipe.c.texi --- glibc-1.06/manual/pipe.c.texi Tue Oct 27 18:59:51 1992 +++ glibc-1.07/manual/pipe.c.texi Thu Jun 10 18:00:23 1993 @@ -3,7 +3,7 @@ #include #include -/* @r{Read characters from the pipe and echo them to @code{stdout}. } */ +/* @r{Read characters from the pipe and echo them to @code{stdout}.} */ void read_from_pipe (int file) @@ -16,7 +16,7 @@ fclose (stream); @} -/* @r{Write some random text to the pipe. } */ +/* @r{Write some random text to the pipe.} */ void write_to_pipe (int file) @@ -35,7 +35,7 @@ int mypipe[2]; @group - /* @r{Create the pipe. } */ + /* @r{Create the pipe.} */ if (pipe (mypipe)) @{ fprintf (stderr, "Pipe failed.\n"); @@ -43,23 +43,23 @@ @} @end group - /* @r{Create the child process. } */ + /* @r{Create the child process.} */ pid = fork (); if (pid == (pid_t) 0) @{ - /* @r{This is the child process. } */ + /* @r{This is the child process.} */ read_from_pipe (mypipe[0]); return EXIT_SUCCESS; @} else if (pid < (pid_t) 0) @{ - /* @r{The fork failed. } */ + /* @r{The fork failed.} */ fprintf (stderr, "Fork failed.\n"); return EXIT_FAILURE; @} else @{ - /* @r{This is the parent process. } */ + /* @r{This is the parent process.} */ write_to_pipe (mypipe[1]); return EXIT_SUCCESS; @} diff -ruN glibc-1.06/manual/pipe.texi glibc-1.07/manual/pipe.texi --- glibc-1.06/manual/pipe.texi Wed May 12 14:26:21 1993 +++ glibc-1.07/manual/pipe.texi Thu Jun 24 20:35:30 1993 @@ -82,9 +82,9 @@ a child process. The parent process writes data to the pipe, which is read by the child process. -@example +@smallexample @include pipe.c.texi -@end example +@end smallexample @node Pipe to a Subprocess @section Pipe to a Subprocess @@ -138,9 +138,9 @@ filter output through another program, in this case the paging program @code{more}. -@example +@smallexample @include popen.c.texi -@end example +@end smallexample @node FIFO Special Files @section FIFO Special Files diff -ruN glibc-1.06/manual/rprintf.c.texi glibc-1.07/manual/rprintf.c.texi --- glibc-1.06/manual/rprintf.c.texi Tue Oct 27 18:59:48 1992 +++ glibc-1.07/manual/rprintf.c.texi Thu Jun 10 18:00:13 1993 @@ -16,18 +16,18 @@ char *buffer; int len; - /* @r{Format the output into a string. } */ + /* @r{Format the output into a string.} */ w = va_arg (*app, Widget *); len = asprintf (&buffer, "", w, w->name); if (len == -1) return -1; - /* @r{Pad to the minimum field width and print to the stream. } */ + /* @r{Pad to the minimum field width and print to the stream.} */ len = fprintf (stream, "%*s", - (info->left ? - info->width : info->width), - buffer); + (info->left ? - info->width : info->width), + buffer); - /* @r{Clean up and return. } */ + /* @r{Clean up and return.} */ free (buffer); return len; @} @@ -36,14 +36,14 @@ int main (void) @{ - /* @r{Make a widget to print. } */ + /* @r{Make a widget to print.} */ Widget mywidget; mywidget.name = "mywidget"; - /* @r{Register the print function for widgets. } */ - register_printf_function ('W', print_widget, NULL); /* @r{No arginfo. } */ + /* @r{Register the print function for widgets.} */ + register_printf_function ('W', print_widget, NULL); /* @r{No arginfo.} */ - /* @r{Now print the widget. } */ + /* @r{Now print the widget.} */ printf ("|%W|\n", &mywidget); printf ("|%35W|\n", &mywidget); printf ("|%-35W|\n", &mywidget); diff -ruN glibc-1.06/manual/search.c.texi glibc-1.07/manual/search.c.texi --- glibc-1.06/manual/search.c.texi Mon Oct 19 15:28:18 1992 +++ glibc-1.07/manual/search.c.texi Wed Oct 27 19:19:55 1993 @@ -2,37 +2,38 @@ #include #include -/* @r{Define an array of critters to sort. } */ +/* @r{Define an array of critters to sort.} */ struct critter -@{ - char *name; - char *species; -@}; - -struct critter muppets[]= -@{ - @{"Kermit", "frog"@}, - @{"Piggy", "pig"@}, - @{"Gonzo", "whatever"@}, - @{"Fozzie", "bear"@}, - @{"Sam", "eagle"@}, - @{"Robin", "frog"@}, - @{"Animal", "animal"@}, - @{"Camilla", "chicken"@}, - @{"Sweetums", "monster"@}, - @{"Dr. Strangepork", "pig"@}, - @{"Link Hogthrob", "pig"@}, - @{"Zoot", "human"@}, - @{"Dr. Bunsen Honeydew", "human"@}, - @{"Beaker", "human"@}, - @{"Swedish Chef", "human"@}@}; + @{ + const char *name; + const char *species; + @}; + +struct critter muppets[] = + @{ + @{"Kermit", "frog"@}, + @{"Piggy", "pig"@}, + @{"Gonzo", "whatever"@}, + @{"Fozzie", "bear"@}, + @{"Sam", "eagle"@}, + @{"Robin", "frog"@}, + @{"Animal", "animal"@}, + @{"Camilla", "chicken"@}, + @{"Sweetums", "monster"@}, + @{"Dr. Strangepork", "pig"@}, + @{"Link Hogthrob", "pig"@}, + @{"Zoot", "human"@}, + @{"Dr. Bunsen Honeydew", "human"@}, + @{"Beaker", "human"@}, + @{"Swedish Chef", "human"@} + @}; int count = sizeof (muppets) / sizeof (struct critter); -/* @r{This is the comparison function used for sorting and searching. } */ +/* @r{This is the comparison function used for sorting and searching.} */ int critter_cmp (const struct critter *c1, const struct critter *c2) @@ -41,7 +42,7 @@ @} -/* @r{Print information about a critter. } */ +/* @r{Print information about a critter.} */ void print_critter (const struct critter *c) @@ -51,15 +52,15 @@ @group -/* @r{Do the lookup into the sorted array. } */ +/* @r{Do the lookup into the sorted array.} */ void -find_critter (char *name) +find_critter (const char *name) @{ struct critter target, *result; target.name = name; result = bsearch (&target, muppets, count, sizeof (struct critter), - critter_cmp); + critter_cmp); if (result) print_critter (result); else @@ -67,7 +68,7 @@ @} @end group -/* @r{Main program. } */ +/* @r{Main program.} */ int main (void) diff -ruN glibc-1.06/manual/search.texi glibc-1.07/manual/search.texi --- glibc-1.06/manual/search.texi Wed May 12 14:26:22 1993 +++ glibc-1.07/manual/search.texi Mon Aug 30 17:12:46 1993 @@ -34,30 +34,23 @@ Here is an example of a comparison function which works with an array of numbers of type @code{double}: -@example +@smallexample int compare_doubles (const double *a, const double *b) @{ - double temp = *a - *b; - if (temp > 0) - return 1; - else if (temp < 0) - return -1; - else - return 0; + return (int) (*a - *b); @} -@end example +@end smallexample The header file @file{stdlib.h} defines a name for the data type of -comparison functions. This is a GNU extension and thus defined only if -you request the GNU extensions. +comparison functions. This type is a GNU extension. @comment stdlib.h @comment GNU @tindex comparison_fn_t -@example +@smallexample int comparison_fn_t (const void *, const void *); -@end example +@end smallexample @node Array Search Function, Array Sort Function, Comparison Functions, Searching and Sorting @section Array Search Function @@ -75,7 +68,7 @@ @deftypefun {void *} bsearch (const void *@var{key}, const void *@var{array}, size_t @var{count}, size_t @var{size}, comparison_fn_t @var{compare}) The @code{bsearch} function searches the sorted array @var{array} for an object that is equivalent to @var{key}. The array contains @var{count} elements, -each of which is of size @var{size}. +each of which is of size @var{size} bytes. The @var{compare} function is used to perform the comparison. This function is called with two pointer arguments and should return an @@ -89,7 +82,7 @@ that matches, the one that is returned is unspecified. This function derives its name from the fact that it is implemented -using the binary search. +using the binary search algorithm. @end deftypefun @node Array Sort Function, Search/Sort Example, Array Search Function, Searching and Sorting @@ -130,7 +123,7 @@ order, using the comparison function defined above (@pxref{Comparison Functions}): -@example +@smallexample @{ double *array; int size; @@ -137,10 +130,10 @@ @dots{} qsort (array, size, sizeof (double), compare_doubles); @} -@end example +@end smallexample The @code{qsort} function derives its name from the fact that it was -originally implemented using the algorithm ``quick sort''. +originally implemented using the ``quick sort'' algorithm. @end deftypefun @node Search/Sort Example, , Array Sort Function, Searching and Sorting @@ -152,14 +145,30 @@ Then, we can look up individual objects based on their names. @comment This example is dedicated to the memory of Jim Henson. RIP. -@example +@smallexample @include search.c.texi -@end example +@end smallexample @cindex Kermit the frog The output from this program looks like: -@example +@smallexample +Kermit, the frog +Piggy, the pig +Gonzo, the whatever +Fozzie, the bear +Sam, the eagle +Robin, the frog +Animal, the animal +Camilla, the chicken +Sweetums, the monster +Dr. Strangepork, the pig +Link Hogthrob, the pig +Zoot, the human +Dr. Bunsen Honeydew, the human +Beaker, the human +Swedish Chef, the human + Animal, the animal Beaker, the human Camilla, the chicken @@ -176,10 +185,9 @@ Sweetums, the monster Zoot, the human - Kermit, the frog Gonzo, the whatever Couldn't find Janice. -@end example +@end smallexample diff -ruN glibc-1.06/manual/select.c.texi glibc-1.07/manual/select.c.texi --- glibc-1.06/manual/select.c.texi Tue Oct 27 18:59:49 1992 +++ glibc-1.07/manual/select.c.texi Sun Jun 20 19:56:30 1993 @@ -9,21 +9,24 @@ fd_set set; struct timeval timeout; - /* @r{Initialize the file descriptor set. } */ + /* @r{Initialize the file descriptor set.} */ FD_ZERO (&set); FD_SET (filedes, &set); - /* @r{Initialize the timeout data structure. } */ + /* @r{Initialize the timeout data structure.} */ timeout.tv_sec = seconds; timeout.tv_usec = 0; - /* @r{@code{select} returns 0 if timeout, 1 if input available, -1 if error. } */ - return TEMP_FAILURE_RETRY (select (FD_SETSIZE, &set, NULL, NULL, &timeout)); + /* @r{@code{select} returns 0 if timeout, 1 if input available, -1 if error.} */ + return TEMP_FAILURE_RETRY (select (FD_SETSIZE, + &set, NULL, NULL, + &timeout)); @} int main (void) @{ - fprintf (stderr, "select returned %d.\n", input_timeout (STDIN_FILENO, 5)); + fprintf (stderr, "select returned %d.\n", + input_timeout (STDIN_FILENO, 5)); return 0; @} diff -ruN glibc-1.06/manual/setjmp.texi glibc-1.07/manual/setjmp.texi --- glibc-1.06/manual/setjmp.texi Wed May 12 14:26:23 1993 +++ glibc-1.07/manual/setjmp.texi Thu Jun 24 20:35:31 1993 @@ -57,9 +57,9 @@ Here is how the example program described above might be set up: -@example +@smallexample @include setjmp.c.texi -@end example +@end smallexample The function @code{abort_to_main_loop} causes an immediate transfer of control back to the main loop of the program, no matter where it is @@ -77,7 +77,7 @@ @need 250 So, the general pattern for using @code{setjmp} looks something like: -@example +@smallexample if (setjmp (@var{buffer})) /* @r{Code to clean up after premature return.} */ @dots{} @@ -84,7 +84,7 @@ else /* @r{Code to be executed normally after setting up the return point.} */ @dots{} -@end example +@end smallexample @node Non-Local Details, Non-Local Exits and Signals, Non-Local Intro, Non-Local Exits @section Details of Non-Local Exits diff -ruN glibc-1.06/manual/sigh1.c.texi glibc-1.07/manual/sigh1.c.texi --- glibc-1.06/manual/sigh1.c.texi Tue Oct 27 18:59:59 1992 +++ glibc-1.07/manual/sigh1.c.texi Thu Jun 10 18:00:42 1993 @@ -2,10 +2,10 @@ #include #include -/* @r{This flag controls termination of the main loop. } */ +/* @r{This flag controls termination of the main loop.} */ volatile sig_atomic_t keep_going = 1; -/* @r{The signal handler just clears the flag and re-enables itself. } */ +/* @r{The signal handler just clears the flag and re-enables itself.} */ void catch_alarm (int sig) @{ @@ -22,13 +22,13 @@ int main (void) @{ - /* @r{Establish a handler for SIGALRM signals. } */ + /* @r{Establish a handler for SIGALRM signals.} */ signal (SIGALRM, catch_alarm); - /* @r{Set an alarm to go off in a little while. } */ + /* @r{Set an alarm to go off in a little while.} */ alarm (2); - /* @r{Check the flag once in a while to see when to quit. } */ + /* @r{Check the flag once in a while to see when to quit.} */ while (keep_going) do_stuff (); diff -ruN glibc-1.06/manual/signal.texi glibc-1.07/manual/signal.texi --- glibc-1.06/manual/signal.texi Wed May 12 14:26:26 1993 +++ glibc-1.07/manual/signal.texi Sun Sep 5 10:06:37 1993 @@ -100,7 +100,7 @@ An error means that a program has done something invalid and cannot continue execution. But not all kinds of errors generate signals---in -fact, most do not. For example, opening a nonexistant file is an error, +fact, most do not. For example, opening a nonexistent file is an error, but it does not raise a signal; instead, @code{open} returns @code{-1}. In general, errors that are necessarily associated with certain library functions are reported by returning a value that indicates an error. @@ -897,9 +897,9 @@ integer argument specifying the signal number, and have return type @code{void}. So, you should define handler functions like this: -@example +@smallexample void @var{handler} (int @code{signum}) @{ @dots{} @} -@end example +@end smallexample The name @code{sighandler_t} for this data type is a GNU extension. @end deftp @@ -978,7 +978,7 @@ Here is a simple example of setting up a handler to delete temporary files when certain fatal signals happen: -@example +@smallexample #include void @@ -1002,7 +1002,7 @@ signal (SIGTERM, SIG_IGN); @dots{} @} -@end example +@end smallexample @noindent Note how if a given signal was previously set to be ignored, this code @@ -1150,7 +1150,7 @@ simple handler for termination signals using @code{signal}. Here is an equivalent example using @code{sigaction}: -@example +@smallexample #include void @@ -1184,7 +1184,7 @@ sigaction (SIGTERM, &new_action, NULL); @dots{} @} -@end example +@end smallexample The program just loads the @code{new_action} structure with the desired parameters and passes it in the @code{sigaction} call. The usage of @@ -1198,7 +1198,7 @@ Here is another example. It retrieves information about the current action for @code{SIGINT} without changing that action. -@example +@smallexample struct sigaction query_action; if (sigaction (SIGINT, NULL, &query_action) < 0) @@ -1209,7 +1209,7 @@ /* @r{@code{SIGINT} is ignored.} */ else /* @r{A programmer-defined signal handler is in effect.} */ -@end example +@end smallexample @node Flags for Sigaction @subsection Flags for @code{sigaction} @@ -1296,7 +1296,7 @@ Here is an example of how to establish a handler for @code{SIGHUP}, but not if @code{SIGHUP} is currently ignored: -@example +@smallexample @group @dots{} struct sigaction temp; @@ -1310,7 +1310,7 @@ sigaction (SIGHUP, &temp, NULL); @} @end group -@end example +@end smallexample @node Defining Handlers @section Defining Signal Handlers @@ -1384,9 +1384,9 @@ This technique is useful because it allows the iteration in progress when the signal arrives to complete before the loop exits. -@example +@smallexample @include sigh1.c.texi -@end example +@end smallexample @node Termination in Handler @subsection Handlers That Terminate the Process @@ -1399,7 +1399,7 @@ same signal that ran the handler in the first place. Here is how to do this: -@example +@smallexample volatile sig_atomic_t fatal_error_in_progress = 0; void @@ -1431,7 +1431,7 @@ raise (sig); @} @end group -@end example +@end smallexample @node Longjmp in Handler @subsection Nonlocal Control Transfer in Handlers @@ -1458,7 +1458,7 @@ Here is a rather schematic example showing the reinitialization of one global variable. -@example +@smallexample @group #include #include @@ -1506,7 +1506,7 @@ @} @} @end group -@end example +@end smallexample @node Signals in Handler @@ -1565,7 +1565,7 @@ child processes generate them. It assumes that the program keeps track of all the child processes with a chain of structures as follows: -@example +@smallexample struct process @{ struct process *next; @@ -1582,21 +1582,21 @@ @}; struct process *process_list; -@end example +@end smallexample This example also uses a flag to indicate whether signals have arrived since some time in the past---whenever the program last cleared it to zero. -@example +@smallexample /* @r{Nonzero means some child's status has changed} @r{so look at @code{process_list} for the details.} */ int process_status_change; -@end example +@end smallexample Here is the handler itself: -@example +@smallexample void sigchld_handler (int signo) @{ @@ -1645,11 +1645,11 @@ @r{that have something to tell us.} */ @} @} -@end example +@end smallexample Here is the proper way to check the flag @code{process_status_change}: -@example +@smallexample if (process_status_change) @{ struct process *p; process_status_change = 0; @@ -1658,7 +1658,7 @@ @dots{} @r{Examine @code{p->status}} @dots{} @} @} -@end example +@end smallexample @noindent It is vital to clear the flag before examining the list; otherwise, if a @@ -1686,7 +1686,7 @@ the program can check independently, each part checking whether there has been a signal since that part last checked. -@example +@smallexample sig_atomic_t process_status_change; sig_atomic_t last_process_status_change; @@ -1703,7 +1703,7 @@ @} @} @} -@end example +@end smallexample @node Nonreentrancy @subsection Signal Handling and Nonreentrant Functions @@ -1852,7 +1852,7 @@ @end menu @node Non-atomic Example -@subsubsection Example of Problems with Non-Atomic Access +@subsubsection Problems with Non-Atomic Access Here is an example which shows what can happen if a signal handler runs in the middle of modifying a variable. (Interrupting the reading of a @@ -1859,7 +1859,7 @@ variable can also lead to paradoxical results, but here we only show writing.) -@example +@smallexample #include #include @@ -1887,7 +1887,7 @@ @} @} @end group -@end example +@end smallexample This program fills @code{memory} with zeros, ones, zeros, ones, alternating forever; meanwhile, once per second, the alarm signal handler @@ -2086,7 +2086,7 @@ @comment the example is written, the signal that is raise'd will be delivered @comment as soon as the SIGTSTP handler returns, which is fine. -@example +@smallexample #include /* @r{When a stop signal arrives, set the action back to the default @@ -2121,7 +2121,7 @@ @dots{} @} @end group -@end example +@end smallexample @strong{Portability note:} @code{raise} was invented by the ANSI C committee. Older systems may not support it, so using @code{kill} may @@ -2184,11 +2184,12 @@ processes with the same effective user ID. @end table -A process can send a signal to itself with @w{@code{kill (getpid(), -@var{signum});}}. If @code{kill} is used by a process to send a signal to -itself, and the signal is not blocked, then @code{kill} delivers at -least one signal (which might be some other pending unblocked signal -instead of the signal @var{signum}) to that process before it returns. +A process can send a signal @var{signum} to itself with a call like +@w{@code{kill (getpid(), @var{signum})}}. If @code{kill} is used by a +process to send a signal to itself, and the signal is not blocked, then +@code{kill} delivers at least one signal (which might be some other +pending unblocked signal instead of the signal @var{signum}) to that +process before it returns. The return value from @code{kill} is zero if the signal can be sent successfully. Otherwise, no signal is sent, and a value of @code{-1} is @@ -2269,9 +2270,9 @@ the parent when it is ready by sending it a @code{SIGUSR1} signal, using the @code{kill} function. -@example +@smallexample @include sigusr.c.texi -@end example +@end smallexample This example uses a busy wait, which is bad, because it wastes CPU cycles that other programs could otherwise use. It is better to ask the @@ -2497,7 +2498,7 @@ unblocked, at least one of those signals is delivered to the process before @code{sigprocmask} returns. The order in which pending signals are delivered is not specified, but you can control the order explicitly -by making multiple @code{sigprockmask} calls to unblock various signals +by making multiple @code{sigprocmask} calls to unblock various signals one at a time. The @code{sigprocmask} function returns @code{0} if successful, and @code{-1} @@ -2531,7 +2532,7 @@ meantime by wrapping the critical part of the code with calls to @code{sigprocmask}, like this: -@example +@smallexample /* @r{This variable is set by the SIGALRM signal handler.} */ volatile sig_atomic_t flag = 0; @@ -2562,7 +2563,7 @@ @} @} @end group -@end example +@end smallexample @node Blocking for Handler @subsection Blocking Signals for a Handler @@ -2589,7 +2590,7 @@ Here is an example: -@example +@smallexample #include #include @@ -2610,7 +2611,7 @@ setup_action.sa_flags = 0; sigaction (SIGTSTP, &setup_action, NULL); @} -@end example +@end smallexample This is more reliable than blocking the other signals explicitly in the code for the handler. If you block signals explicity in the handler, @@ -2651,7 +2652,7 @@ Here is an example. -@example +@smallexample #include #include @@ -2673,7 +2674,7 @@ else if (sigismember (&waiting_mask, SIGTSTP)) @{ /* @r{User has tried to stop the process.} */ @} -@end example +@end smallexample Remember that if there is a particular signal pending for your process, additional signals of that same type that arrive in the meantime might @@ -2691,7 +2692,7 @@ almost the same results by making the handler set a flag to be tested later, when you ``unblock''. Here is an example: -@example +@smallexample /* @r{If this flag is nonzero, don't handle the signal right away.} */ volatile sig_atomic_t signal_pending; @@ -2723,7 +2724,7 @@ if (defer_signal == 0 && signal_pending != 0) raise (signal_pending); @} -@end example +@end smallexample Note how the particular signal that arrives is stored in @code{signal_pending}. That way, we can handle several types of @@ -2747,11 +2748,11 @@ @code{signal_pending}, because this avoids a subtle bug. If we did these things in the other order, like this, -@example +@smallexample if (defer_signal == 1 && signal_pending != 0) raise (signal_pending); defer_signal--; -@end example +@end smallexample @noindent then a signal arriving in between the @code{if} statement and the decrement @@ -2842,7 +2843,7 @@ to cooperate by setting a flag, you still can't use @code{pause} reliably. Here is an example of this problem: -@example +@smallexample /* @r{@code{usr_interrupt} is set by the signal handler.} */ if (!usr_interrupt) pause (); @@ -2849,7 +2850,7 @@ /* @r{Do work once the signal arrives.} */ @dots{} -@end example +@end smallexample @noindent This has a bug: the signal could arrive after the variable @@ -2860,7 +2861,7 @@ in a loop, instead of using @code{pause}. (@xref{Sleeping}, for more about @code{sleep}.) Here is what this looks like: -@example +@smallexample /* @r{@code{usr_interrupt} is set by the signal handler.} while (!usr_interrupt) sleep (1); @@ -2867,7 +2868,7 @@ /* @r{Do work once the signal arrives.} */ @dots{} -@end example +@end smallexample For some purposes, that is good enough. But with a little more complexity, you can wait reliably until a particular signal handler is @@ -2907,7 +2908,7 @@ With @code{sigsuspend}, you can replace the @code{pause} or @code{sleep} loop in the previous section with something completely reliable: -@example +@smallexample sigset_t mask, oldmask; @dots{} @@ -2923,7 +2924,7 @@ while (!usr_interrupt) sigsuspend (&oldmask); sigprocmask (SIG_UNBLOCK, &mask, NULL); -@end example +@end smallexample This last piece of code is a little tricky. The key point to remember here is that when @code{sigsuspend} returns, it resets the process's @@ -3081,10 +3082,10 @@ set. You can bitwise-OR the results of several calls to @code{sigmask} together to specify more than one signal. For example, -@example +@smallexample (sigmask (SIGTSTP) | sigmask (SIGSTOP) | sigmask (SIGTTIN) | sigmask (SIGTTOU)) -@end example +@end smallexample @noindent specifies a mask that includes all the job-control stop signals. @@ -3093,16 +3094,16 @@ @comment signal.h @comment BSD @deftypefun int sigblock (int @var{mask}) -This function is the equivalent of @code{sigprocmask} (@pxref{Process -Signal Mask}) with a @var{how} argument of @code{SIG_BLOCK}: it adds the -signals specified by @var{mask} to the calling process's signal mask. -The return value is the previous set of blocked signals. +This function is equivalent to @code{sigprocmask} (@pxref{Process Signal +Mask}) with a @var{how} argument of @code{SIG_BLOCK}: it adds the +signals specified by @var{mask} to the calling process's set of blocked +signals. The return value is the previous set of blocked signals. @end deftypefun @comment signal.h @comment BSD @deftypefun int sigsetmask (int @var{mask}) -This function is the equivalent of @code{sigprocmask} (@pxref{Process +This function equivalent to @code{sigprocmask} (@pxref{Process Signal Mask}) with a @var{how} argument of @code{SIG_SETMASK}: it sets the calling process's signal mask to @var{mask}. The return value is the previous set of blocked signals. @@ -3120,13 +3121,13 @@ @node Signal Stack @subsection Using a Separate Signal Stack -@c ??? Can we do better than recommending a magic constant size? A signal stack is a special area of memory to be used as the execution stack during signal handlers. It should be fairly large, to avoid any -danger that it will overflow in turn---we recommend at least 16,000 -bytes. You can use @code{malloc} to allocate the space for the stack. -Then call @code{sigstack} to tell the system to use that space for the -signal stack. +danger that it will overflow in turn; the macro @code{SIGSTKSZ} is +defined to a canonical size for signal stacks. You can use +@code{malloc} to allocate the space for the stack. Then call +@code{sigaltstack} or @code{sigstack} to tell the system to use that +space for the signal stack. You don't need to write signal handlers differently in order to use a signal stack. Switching from one stack to the other happens @@ -3134,6 +3135,92 @@ confused if you examine a stack trace while a handler that uses the signal stack is running. +There are two interfaces for telling the system to use a separate signal +stack. @code{sigstack} is the older interface, which comes from 4.2 +BSD. @code{sigaltstack} is the newer interface, and comes from 4.4 +BSD. The @code{sigaltstack} interface has the advantage that it does +not require your program to know which direction the stack grows, which +depends on the specific machine and operating system. + +@comment signal.h +@comment BSD +@deftp {Data Type} {struct sigaltstack} +This structure describes a signal stack. It contains the following members: + +@table @code +@item void *ss_sp +This points to the base of the signal stack. + +@item size_t ss_size +This is the size (in bytes) of the signal stack which @samp{ss_sp} points to. +You should set this to however much space you allocated for the stack. + +There are two macros defined in @file{signal.h} that you should use in +calculating this size: + +@vtable @code +@item SIGSTKSZ +This is the canonical size for a signal stack. It is judged to be +sufficient for normal uses. + +@item MINSIGSTKSZ +This is the amount of signal stack space the operating system needs just +to implement signal delivery. The size of a signal stack @strong{must} +be greater than this. + +For most cases, just using @code{SIGSTKSZ} for @code{ss_size} is +sufficient. But if you know how much stack space your program's signal +handlers will need, you may want to use a different size. In this case, +you should allocate @code{MINSIGSTKSZ} additional bytes for the signal +stack and increase @code{ss_size} accordinly. +@end vtable + +@item int ss_flags +This field contains the bitwise @sc{or} of these flags: + +@vtable @code +@item SA_DISABLE +This tells the system that it should not use the signal stack. + +@item SA_ONSTACK +This is set by the system, and indicates that the signal stack is +currently in use. If this bit is not set, then signals will be +delivered on the normal user stack. +@end vtable +@end table +@end deftp + +@comment signal.h +@comment BSD +@deftypefun int sigaltstack (const struct sigaltstack *@var{stack}, struct sigaltstack *@var{oldstack}) +The @code{sigaltstack} function specifies an alternate stack for use +during signal handling. When a signal is received by the process and +its action indicates that the signal stack is used, the system arranges +a switch to the currently installed signal stack while the handler for +that signal is executed. + +If @var{oldstack} is not a null pointer, information about the currently +installed signal stack is returned in the location it points to. If +@var{stack} is not a null pointer, then this is installed as the new +stack for use by signal handlers. + +The return value is @code{0} on success and @code{-1} on failure. If +@code{sigaltstack} fails, it sets @code{errno} to one of these values: + +@table @code +@item +@item EINVAL +You tried to disable a stack that was in fact currently in use. + +@item ENOMEM +The size of the alternate stack was too small. +It must be greater than @code{MINSIGSTKSZ}. +@end table +@end deftypefun + +Here is the older @code{sigstack} interface. You should use +@code{sigaltstack} instead on systems that have it. + @comment signal.h @comment BSD @deftp {Data Type} {struct sigstack} @@ -3141,7 +3228,9 @@ @table @code @item void *ss_sp -This is the stack pointer. +This is the stack pointer. If the stack grows downwards on your +machine, this should point to the top of the area you allocated. If the +stack grows upwards, it should point to the bottom. @item int ss_onstack This field is true if the process is currently using this stack. @@ -3162,7 +3251,5 @@ @var{stack} is not a null pointer, then this is installed as the new stack for use by signal handlers. -The return value is @code{0} on success and @code{1} on failure. +The return value is @code{0} on success and @code{-1} on failure. @end deftypefun - -@c !!! 4.4 and GNU has a better interface: sigaltstack diff -ruN glibc-1.06/manual/sigusr.c.texi glibc-1.07/manual/sigusr.c.texi --- glibc-1.06/manual/sigusr.c.texi Tue Oct 27 19:00:01 1992 +++ glibc-1.07/manual/sigusr.c.texi Thu Jun 10 18:00:44 1993 @@ -5,7 +5,7 @@ #include @end group -/* @r{When a @code{SIGUSR1} signal arrives, set this variable. } */ +/* @r{When a @code{SIGUSR1} signal arrives, set this variable.} */ volatile sig_atomic_t usr_interrupt = 0; void @@ -14,17 +14,17 @@ usr_interrupt = 1; @} -/* @r{The child process executes this function. } */ +/* @r{The child process executes this function.} */ void child_function (void) @{ - /* @r{Perform initialization. } */ + /* @r{Perform initialization.} */ printf ("I'm here!!! My pid is %d.\n", (int) getpid ()); - /* @r{Let parent know you're done. } */ + /* @r{Let parent know you're done.} */ kill (getppid (), SIGUSR1); - /* @r{Continue with execution. } */ + /* @r{Continue with execution.} */ puts ("Bye, now...."); exit (0); @} @@ -36,7 +36,7 @@ sigset_t block_mask; pid_t child_id; - /* @r{Establish the signal handler. } */ + /* @r{Establish the signal handler.} */ sigfillset (&block_mask); usr_action.sa_handler = synch_signal; usr_action.sa_mask = block_mask; @@ -43,18 +43,18 @@ usr_action.sa_flags = 0; sigaction (SIGUSR1, &usr_action, NULL); - /* @r{Create the child process. } */ + /* @r{Create the child process.} */ child_id = fork (); if (child_id == 0) - child_function (); /* @r{Does not return. } */ + child_function (); /* @r{Does not return.} */ @group - /* @r{Busy wait for the child to send a signal. } */ + /* @r{Busy wait for the child to send a signal.} */ while (!usr_interrupt) ; @end group - /* @r{Now continue execution. } */ + /* @r{Now continue execution.} */ puts ("That's all, folks!"); return 0; diff -ruN glibc-1.06/manual/socket.texi glibc-1.07/manual/socket.texi --- glibc-1.06/manual/socket.texi Wed May 19 16:16:02 1993 +++ glibc-1.07/manual/socket.texi Thu Jun 24 20:35:35 1993 @@ -66,7 +66,7 @@ @cindex data loss on sockets @strong{Can data be lost during normal operation?} Some communication styles guarantee that all the data sent arrives in the order it was -sent (barring system or network crashes); others styles occasionally +sent (barring system or network crashes); other styles occasionally lose data as a normal part of operation, and may sometimes deliver packets more than once or in the wrong order. @@ -99,7 +99,7 @@ @cindex protocol (of socket) @cindex socket protocol @cindex protocol family -Finally you must next choose the @dfn{protocol} to carry out the +Finally you must choose the @dfn{protocol} to carry out the communication. The protocol determines what low-level mechanism is used to transmit and receive data. Each protocol is valid for a particular namespace and communication style; a namespace is sometimes called a @@ -165,7 +165,7 @@ sixth, and may arrive a second time after the sixth. The typical use for @code{SOCK_DGRAM} is in situations where it is -acceptible to simply resend a packet if no response is seen in a +acceptable to simply resend a packet if no response is seen in a reasonable amount of time. @xref{Datagrams}, for detailed information about how to use datagram @@ -292,7 +292,7 @@ @item char sa_data[14] This is the actual socket address data, which is format-dependent. Its -length is also format-dependent, and may well be more than 14. The +length also depends on the format, and may well be more than 14. The length 14 of @code{sa_data} is essentially arbitrary. @end table @end deftp @@ -343,7 +343,7 @@ information about how to use them. @node Setting Address -@subsection Setting a Socket's Address +@subsection Setting the Address of a Socket @pindex sys/socket.h Use the @code{bind} function to assign an address to a socket. The @@ -391,7 +391,7 @@ @end deftypefun @node Reading Address -@subsection Reading a Socket's Address +@subsection Reading the Address of a Socket @pindex sys/socket.h Use the function @code{getsockname} to examine the address of an @@ -536,9 +536,9 @@ Here is an example showing how to create and name a socket in the file namespace. -@example -@include makefsock.c.texi -@end example +@smallexample +@include mkfsock.c.texi +@end smallexample @node Internet Namespace @section The Internet Namespace @@ -945,9 +945,9 @@ with other systems.) Before using @code{h_errno}, you must declare it like this: -@example +@smallexample extern int h_errno; -@end example +@end smallexample Here are the error codes that you may find in @code{h_errno}: @@ -1328,16 +1328,16 @@ Internet address, this example specifies @code{INADDR_ANY} as the host address; the system replaces that with the machine's actual address. -@example -@include makeisock.c.texi -@end example +@smallexample +@include mkisock.c.texi +@end smallexample Here is another example, showing how you can fill in a @code{sockaddr_in} structure, given a host name string and a port number: -@example -@include isockaddr.c.texi -@end example +@smallexample +@include isockad.c.texi +@end smallexample @node Misc Namespaces @section Other Namespaces @@ -1585,7 +1585,8 @@ In making a connection, the client makes a connection while the server waits for and accepts the connection. Here we discuss what the client -program must do, using the @code{connect} function. +program must do, using the @code{connect} function, which is declared in +@file{sys/socket.h}. @comment sys/socket.h @comment BSD @@ -1978,9 +1979,9 @@ particularly interesting once it has connected to the server; it just sends a text string to the server and exits. -@example -@include inetclient.c.texi -@end example +@smallexample +@include inetcli.c.texi +@end smallexample @node Server Example @subsection Byte Stream Connection Server Example @@ -2001,9 +2002,9 @@ This program uses @code{make_socket} and @code{init_sockaddr} to set up the socket address; see @ref{Inet Example}. -@example -@include inetserver.c.texi -@end example +@smallexample +@include inetsrv.c.texi +@end smallexample @node Out-of-Band Data @subsection Out-of-Band Data @@ -2050,14 +2051,14 @@ in the receiving process, whether any ordinary data was sent before the mark: -@example +@smallexample success = ioctl (socket, SIOCATMARK, &result); -@end example +@end smallexample Here's a function to discard any ordinary data preceding the out-of-band mark: -@example +@smallexample int discard_until_mark (int socket) @{ @@ -2082,7 +2083,7 @@ perror ("read"); @} @} -@end example +@end smallexample If you don't want to discard the ordinary data preceding the mark, you may need to read some of it anyway, to make room in internal system @@ -2091,7 +2092,7 @@ (saving it so that you can use it when you want it) and see if that makes room. Here is an example: -@example +@smallexample struct buffer @{ char *buffer; @@ -2171,7 +2172,7 @@ @} @} @} -@end example +@end smallexample @node Datagrams @section Datagram Socket Operations @@ -2311,9 +2312,9 @@ Obviously, this isn't a particularly useful program, but it does show the general ideas involved. -@example -@include fileserver.c.texi -@end example +@smallexample +@include filesrv.c.texi +@end smallexample @node Example Receiver @subsection Example of Reading Datagrams @@ -2327,9 +2328,9 @@ connection state, the only way the server can do this is by referencing the name of the client. -@example -@include fileclient.c.texi -@end example +@smallexample +@include filecli.c.texi +@end smallexample Keep in mind that datagram socket communications are unreliable. In this example, the client program waits indefinitely if the message @@ -2400,9 +2401,9 @@ An entry has this format: -@example +@smallexample @var{service} @var{style} @var{protocol} @var{wait} @var{username} @var{program} @var{arguments} -@end example +@end smallexample The @var{service} field says which service this program provides. It should be the name of a service defined in @file{/etc/services}. @@ -2510,7 +2511,8 @@ @var{level} for socket @var{socket}. The value of the option is passed in the buffer @var{optval}, which has size @var{optlen}. -The return value and error codes are the same as for @code{getsockopt}. +The return value and error codes for @code{setsockopt} are the same as +for @code{getsockopt}. @end deftypefun @node Socket-Level Options @@ -2611,13 +2613,13 @@ @comment sys/socket.h @comment BSD @item SO_SNDBUF -This option gets or sets the size of the output buffer. The value is an +This option gets or sets the size of the output buffer. The value is a @code{size_t}, which is the size in bytes. @comment sys/socket.h @comment BSD @item SO_RCVBUF -This option gets or sets the size of the input buffer. The value is an +This option gets or sets the size of the input buffer. The value is a @code{size_t}, which is the size in bytes. @comment sys/socket.h diff -ruN glibc-1.06/manual/stamp-summary glibc-1.07/manual/stamp-summary --- glibc-1.06/manual/stamp-summary Mon May 17 16:49:54 1993 +++ glibc-1.07/manual/stamp-summary Thu Jan 6 21:47:39 1994 @@ -1 +1 @@ -Mon May 17 16:49:54 EDT 1993 +Thu Jan 6 21:47:36 EST 1994 diff -ruN glibc-1.06/manual/startup.texi glibc-1.07/manual/startup.texi --- glibc-1.06/manual/startup.texi Wed May 12 14:26:31 1993 +++ glibc-1.07/manual/startup.texi Tue Jun 29 03:19:50 1993 @@ -35,9 +35,9 @@ arguments that represent the command line arguments to the program, like this: -@example +@smallexample int main (int @var{argc}, char *@var{argv}[]) -@end example +@end smallexample @cindex argc (program argument count) @cindex argv (program argument vector) @@ -251,14 +251,14 @@ A second loop is used to process the remaining non-option arguments. @end itemize -@example +@smallexample @include testopt.c.texi -@end example +@end smallexample Here are some examples showing what this program prints with different combinations of arguments: -@example +@smallexample % testopt aflag = 0, bflag = 0, cvalue = (null) @@ -293,7 +293,7 @@ % testopt -a - aflag = 1, bflag = 0, cvalue = (null) Non-option argument - -@end example +@end smallexample @node Long Options @subsection Parsing Long Options @@ -387,9 +387,9 @@ @node Long Option Example @subsection Example of Parsing Long Options -@example +@smallexample @include longopt.c.texi -@end example +@end smallexample @node Environment Variables @section Environment Variables @@ -450,12 +450,11 @@ @comment ANSI @deftypefun {char *} getenv (const char *@var{name}) This function returns a string that is the value of the environment -variable @var{name}. You must not modify this string. In some systems -not using the GNU library, it might be overwritten by subsequent calls -to @code{getenv} (but not by any other library function). -@c !!! never overwritten on any unix system -If the environment variable @var{name} is not defined, the value is a -null pointer. +variable @var{name}. You must not modify this string. In some non-Unix +systems not using the GNU library, it might be overwritten by subsequent +calls to @code{getenv} (but not by any other library function). If the +environment variable @var{name} is not defined, the value is a null +pointer. @end deftypefun @@ -549,9 +548,9 @@ A typical value for this environment variable might be a string like: -@example -:/bin:/etc:/usr/bin:/usr/new/X11:/usr/new:/usr/local:/usr/local/bin -@end example +@smallexample +:/bin:/etc:/usr/bin:/usr/new/X11:/usr/new:/usr/local/bin +@end smallexample This means that if the user tries to execute a program named @code{foo}, the system will look for files named @file{foo}, @file{/bin/foo}, @@ -800,9 +799,9 @@ Here's a trivial program that illustrates the use of @code{exit} and @code{atexit}: -@example +@smallexample @include atexit.c.texi -@end example +@end smallexample @noindent When this program is executed, it just prints the message and exits. diff -ruN glibc-1.06/manual/stdio.texi glibc-1.07/manual/stdio.texi --- glibc-1.06/manual/stdio.texi Wed May 12 14:26:34 1993 +++ glibc-1.07/manual/stdio.texi Thu Jan 6 17:19:04 1994 @@ -27,7 +27,6 @@ * File Positioning:: About random-access streams. * Portable Positioning:: Random access on peculiar ANSI C systems. * Stream Buffering:: How to control buffering of streams. -* Temporary Files:: How to open a temporary file. * Other Kinds of Streams:: Streams that do not necessarily correspond to an open file. @end menu @@ -50,12 +49,12 @@ @comment stdio.h @comment ANSI @deftp {Data Type} FILE -This is the data type is used to represent stream objects. A -@code{FILE} object holds all of the internal state information about the -connection to the associated file, including such things as the file -position indicator and buffering information. Each stream also has -error and end-of-file status indicators that can be tested with the -@code{ferror} and @code{feof} functions; see @ref{EOF and Errors}. +This is the data type used to represent stream objects. A @code{FILE} +object holds all of the internal state information about the connection +to the associated file, including such things as the file position +indicator and buffering information. Each stream also has error and +end-of-file status indicators that can be tested with the @code{ferror} +and @code{feof} functions; see @ref{EOF and Errors}. @end deftp @code{FILE} objects are allocated and managed internally by the @@ -75,34 +74,31 @@ the ``standard'' input and output channels that have been established for the process. -@c !!! in glibc, these are variables that you can set. i.e., freopen is -@c obsolete because you can do "fclose(stdout);stdout=fopen(...);" - These streams are declared in the header file @file{stdio.h}. @pindex stdio.h @comment stdio.h @comment ANSI -@deftypevr Macro {FILE *} stdin +@deftypevar {FILE *} stdin The @dfn{standard input} stream, which is the normal source of input for the program. -@end deftypevr +@end deftypevar @cindex standard input stream @comment stdio.h @comment ANSI -@deftypevr Macro {FILE *} stdout +@deftypevar {FILE *} stdout The @dfn{standard output} stream, which is used for normal output from the program. -@end deftypevr +@end deftypevar @cindex standard output stream @comment stdio.h @comment ANSI -@deftypevr Macro {FILE *} stderr +@deftypevar {FILE *} stderr The @dfn{standard error} stream, which is used for error messages and diagnostics issued by the program. -@end deftypevr +@end deftypevar @cindex standard error stream In the GNU system, you can specify what files or processes correspond to @@ -111,8 +107,18 @@ described in @ref{File System Interface}.) Most other operating systems provide similar mechanisms, but the details of how to use them can vary. -It is probably not a good idea to close any of the standard streams. -But you can use @code{freopen} to get te effect of closing one and +In the GNU C library, @code{stdin}, @code{stdout}, and @code{stderr} are +normal variables which you can set just like any others. For example, to redirect +the standard output to a file, you could do: + +@smallexample +fclose (stdout); +stdout = fopen ("standard-output-file", "w"); +@end smallexample + +Note however, that in other systems @code{stdin}, @code{stdout}, and +@code{stderr} are macros that you cannot assign to in the normal way. +But you can use @code{freopen} to get the effect of closing one and reopening it. @xref{Opening Streams}. @node Opening Streams @@ -146,35 +152,35 @@ truncated to zero length. Otherwise a new file is created. @item a -Open file for append access; that is, writing at the end of file only. +Open a file for append access; that is, writing at the end of file only. If the file already exists, its initial contents are unchanged and output to the stream is appended to the end of the file. Otherwise, a new, empty file is created. @item r+ -Open existing file for both reading and writing. The initial contents +Open an existing file for both reading and writing. The initial contents of the file are unchanged and the initial file position is at the beginning of the file. @item w+ -Open file for both reading and writing. If the file already exists, it +Open a file for both reading and writing. If the file already exists, it is truncated to zero length. Otherwise, a new file is created. @item a+ Open or create file for both reading and appending. If the file exists, -its initial contents are unchanged. Otherwise, a new file is -created. The initial file position for reading might be at either -the beginning or end of the file, but output is always appended -to the end of the file. +its initial contents are unchanged. Otherwise, a new file is created. +The initial file position for reading is at the beginning of the file, +but output is always appended to the end of the file. @end table -@c !!! this paragraph is false in glibc; "getc(fp);putc('x',fp);" works fine. As you can see, @samp{+} requests a stream that can do both input and -output. When using such a stream, you must call @code{fflush} -(@pxref{Stream Buffering}) or a file positioning function such as -@code{fseek} (@pxref{File Positioning}) when switching from reading to -writing or vice versa. Otherwise, internal buffers might not be emptied -properly. +output. The ANSI standard says that when using such a stream, you must +call @code{fflush} (@pxref{Stream Buffering}) or a file positioning +function such as @code{fseek} (@pxref{File Positioning}) when switching +from reading to writing or vice versa. Otherwise, internal buffers +might not be emptied properly. The GNU C library does not have this +limitation; you can do arbitrary reading and writing operations on a +stream in whatever order. The GNU C library defines one additional character for use in @var{opentype}: the character @samp{x} insists on creating a new @@ -227,10 +233,12 @@ If the operation fails, a null pointer is returned; otherwise, @code{freopen} returns @var{stream}. -The main use of @code{freopen} is to connect a standard stream such as -@code{stdir} with a file of your own choice. This is useful in programs -in which use of a standard stream for certain purposes is hard-coded. -@c !!! can do stdout=... in glibc +@code{freopen} has traditionally been used to connect a standard stream +such as @code{stdin} with a file of your own choice. This is useful in +programs in which use of a standard stream for certain purposes is +hard-coded. In the GNU C library, you can simply close the standard +streams and open new ones with @code{fopen}. But other systems lack +this ability, so using @code{freopen} is more portable. @end deftypefun @@ -240,7 +248,7 @@ @cindex closing a stream When a stream is closed with @code{fclose}, the connection between the stream and the file is cancelled. After you have closed a stream, you -cannot perform any additional operations on it any more. +cannot perform any additional operations on it. @comment stdio.h @comment ANSI @@ -254,7 +262,7 @@ It is important to check for errors when you call @code{fclose} to close an output stream, because real, everyday errors can be detected at this time. For example, when @code{fclose} writes the remaining buffered -output, it might get an error because the disk is full. Even if you you +output, it might get an error because the disk is full. Even if you know the buffer is empty, errors can still occur when closing a file if you are using NFS. @@ -275,13 +283,7 @@ @cindex writing to a stream, by characters This section describes functions for performing character- and -line-oriented output. Largely for historical compatibility, there are -several variants of these functions, but as a matter of style (and for -simplicity!) we suggest you stick with using @code{fputc} and -@code{fputs}, and perhaps @code{putc} and @code{putchar}. -@c !!! this "style" shit is completely bogus. you should use the -@c function most appropriate for what you are doing. use putc for -@c efficiency; there is never a reason to use fputc. +line-oriented output. These functions are declared in the header file @file{stdio.h}. @pindex stdio.h @@ -300,13 +302,14 @@ @deftypefun int putc (int @var{c}, FILE *@var{stream}) This is just like @code{fputc}, except that most systems implement it as a macro, making it faster. One consequence is that it may evaluate the -@var{stream} argument more than once. +@var{stream} argument more than once. @code{putc} is usually the best +function to use for writing a single character. @end deftypefun @comment stdio.h @comment ANSI @deftypefun int putchar (int @var{c}) -The @code{putchar} function is equivalent to @code{fputc} with +The @code{putchar} function is equivalent to @code{putc} with @code{stdout} as the value of the @var{stream} argument. @end deftypefun @@ -323,11 +326,11 @@ For example: -@example +@smallexample fputs ("Are ", stdout); fputs ("you ", stdout); fputs ("hungry?\n", stdout); -@end example +@end smallexample @noindent outputs the text @samp{Are you hungry?} followed by a newline. @@ -339,6 +342,13 @@ The @code{puts} function writes the string @var{s} to the stream @code{stdout} followed by a newline. The terminating null character of the string is not written. + +@code{puts} is the most convenient function for printing simple +messages. For example: + +@smallexample +puts ("This is a message."); +@end smallexample @end deftypefun @comment stdio.h @@ -354,13 +364,7 @@ @cindex reading from a stream, by characters This section describes functions for performing character- and -line-oriented input. Again, there are several variants of these -functions, some of which are considered obsolete stylistically. It's -suggested that you stick with @code{fgetc}, @code{getline}, and maybe -@code{getc}, @code{getchar} and @code{fgets}. -@c !!! this "style" shit is also completely bogus. use getc for speed; -@c there is never a reason to use fgetc. - +line-oriented input. These functions are declared in the header file @file{stdio.h}. @pindex stdio.h @@ -376,49 +380,51 @@ @comment stdio.h @comment ANSI @deftypefun int getc (FILE *@var{stream}) -This is just like @code{fgetc}, except that it is permissible (and typical) -for it to be implemented as a macro that evaluates the @var{stream} -argument more than once. -@c !!! and it's faster +This is just like @code{fgetc}, except that it is permissible (and +typical) for it to be implemented as a macro that evaluates the +@var{stream} argument more than once. @code{getc} is often highly +optimized, so it is usually the best function to use to read a single +character. @end deftypefun @comment stdio.h @comment ANSI @deftypefun int getchar (void) -The @code{getchar} function is equivalent to @code{fgetc} with @code{stdin} +The @code{getchar} function is equivalent to @code{getc} with @code{stdin} as the value of the @var{stream} argument. @end deftypefun Here is an example of a function that does input using @code{fgetc}. It would work just as well using @code{getc} instead, or using -@code{getchar ()} instead of @code{fgetc (stdin)}. +@code{getchar ()} instead of @w{@code{fgetc (stdin)}}. -@example +@smallexample int y_or_n_p (const char *question) @{ fputs (question, stdout); - while (1) @{ - int c, answer; - /* @r{Write a space to separate answer from question.} */ - fputc (' ', stdout); - /* @r{Read the first character of the line.} - @r{This should be the answer character, but might not be.} */ - c = tolower (fgetc (stdin)); - answer = c; - /* @r{Discard rest of input line.} */ - while (c != '\n') - c = fgetc (stdin); - /* @r{Obey the answer if it was valid.} */ - if (answer == 'y') - return 1; - if (answer == 'n') - return 0; - /* @r{Answer was invalid: ask for valid answer.} */ - fputs ("Please answer y or n:", stdout); - @} + while (1) + @{ + int c, answer; + /* @r{Write a space to separate answer from question.} */ + fputc (' ', stdout); + /* @r{Read the first character of the line.} + @r{This should be the answer character, but might not be.} */ + c = tolower (fgetc (stdin)); + answer = c; + /* @r{Discard rest of input line.} */ + while (c != '\n') + c = fgetc (stdin); + /* @r{Obey the answer if it was valid.} */ + if (answer == 'y') + return 1; + if (answer == 'n') + return 0; + /* @r{Answer was invalid: ask for valid answer.} */ + fputs ("Please answer y or n:", stdout); + @} @} -@end example +@end smallexample @comment stdio.h @comment SVID @@ -441,7 +447,7 @@ Another GNU extension, @code{getdelim}, generalizes @code{getline}. It reads a delimited record, defined as everything through the next -occurrence of a specified delimeter character. +occurrence of a specified delimiter character. All these functions are declared in @file{stdio.h}. @@ -453,11 +459,17 @@ and storing the buffer address in @code{*@var{lineptr}}. Before calling @code{getline}, you should place in @code{*@var{lineptr}} -the address of a buffer @code{*@var{n}} bytes long. If this buffer is -long enough to hold the line, @code{getline} stores the line in this -buffer. Otherwise, @code{getline} makes the buffer bigger using -@code{realloc}, storing the new buffer address back in -@code{*@var{lineptr}} and the increased size back in @code{*@var{n}}. +the address of a buffer @code{*@var{n}} bytes long, allocated with +@code{malloc}. If this buffer is long enough to hold the line, +@code{getline} stores the line in this buffer. Otherwise, +@code{getline} makes the buffer bigger using @code{realloc}, storing the +new buffer address back in @code{*@var{lineptr}} and the increased size +back in @code{*@var{n}}. +@xref{Unconstrained Allocation}. + +If you set @code{*@var{lineptr}} to a null pointer, and @code{*@var{n}} +to zero, before the call, then @code{getline} allocates the initial +buffer for you by calling @code{malloc}. In either case, when @code{getline} returns, @code{*@var{lineptr}} is a @code{char *} which points to the text of the line. @@ -479,12 +491,23 @@ @deftypefun ssize_t getdelim (char **@var{lineptr}, size_t *@var{n}, int @var{delimiter}, FILE *@var{stream}) This function is like @code{getline} except that the character which tells it to stop reading is not necessarily newline. The argument -@var{delimeter} specifies the delimeter character; @code{getdelim} keeps +@var{delimiter} specifies the delimiter character; @code{getdelim} keeps reading until it sees that character (or end of file). -The text is stored in @var{lineptr}, including the delimeter character +The text is stored in @var{lineptr}, including the delimiter character and a terminating null. Like @code{getline}, @code{getdelim} makes @var{lineptr} bigger if it isn't big enough. + +@code{getline} is in fact implemented in terms of @code{getdelim}, just +like this: + +@smallexample +ssize_t +getline (char **lineptr, size_t *n, FILE *stream) +@{ + return getdelim (lineptr, n, '\n', stream); +@} +@end smallexample @end deftypefun @comment stdio.h @@ -517,14 +540,15 @@ up to the next newline character, and stores them in the string @var{s}. The newline character is discarded (note that this differs from the behavior of @code{fgets}, which copies the newline character into the -string). - -@c !!! say what it returns!! either S if winning, or NULL if losing. +string). If @code{gets} encounters a read error or end-of-file, it +returns a null pointer; otherwise it returns @var{s}. -@strong{Warning:} The @code{gets} function is @strong{very dangerous} -because it provides no protection against overflowing the string @var{s}. -The GNU library includes it for compatibility only. You should -@strong{always} use @code{fgets} or @code{getline} instead. +@strong{Warning:} The @code{gets} function is @strong{very dangerous} +because it provides no protection against overflowing the string +@var{s}. The GNU library includes it for compatibility only. You +should @strong{always} use @code{fgets} or @code{getline} instead. To +remind you of this, the linker (if using GNU @code{ld}) will issue a +warning whenever you use @code{gets}. @end deftypefn @node Unreading @@ -556,10 +580,10 @@ @samp{foobar}. Suppose you have read three characters so far. The situation looks like this: -@example +@smallexample f o o b a r ^ -@end example +@end smallexample @noindent so the next input character will be @samp{b}. @@ -568,12 +592,12 @@ If instead of reading @samp{b} you unread the letter @samp{o}, you get a situation like this: -@example +@smallexample f o o b a r | o-- ^ -@end example +@end smallexample @noindent so that the next input characters will be @samp{o} and @samp{b}. @@ -582,12 +606,12 @@ @c @group If you unread @samp{9} instead of @samp{o}, you get this situation: -@example +@smallexample f o o b a r | 9-- ^ -@end example +@end smallexample @noindent so that the next input characters will be @samp{9} and @samp{b}. @@ -597,7 +621,7 @@ @subsection Using @code{ungetc} To Do Unreading The function to unread a character is called @code{ungetc}, because it -reverses the action of @code{fgetc}. +reverses the action of @code{getc}. @comment stdio.h @comment ANSI @@ -606,7 +630,9 @@ input stream @var{stream}. So the next input from @var{stream} will read @var{c} before anything else. -@c !!! if c==EOF, ungetc does nothing and returns EOF +If @var{c} is @code{EOF}, @code{ungetc} does nothing and just returns +@code{EOF}. This lets you call @code{ungetc} with the return value of +@code{getc} without needing to check for an error from @code{getc}. The character that you push back doesn't have to be the same as the last character that was actually read from the stream. In fact, it isn't @@ -628,9 +654,8 @@ Unreading a character on a stream that is at end of file clears the end-of-file indicator for the stream, because it makes the character of -input available. Reading that character will set the end-of-file -indicator again. -@c !!! no, it won't; EOF is not set until you try & fail to read a char. +input available. After you read that character, trying to read again +will encounter end of file. @end deftypefun Here is an example showing the use of @code{getc} and @code{ungetc} to @@ -638,8 +663,9 @@ non-whitespace character, it unreads that character to be seen again on the next read operation on the stream. -@example +@smallexample #include +#include void skip_whitespace (FILE *stream) @@ -646,13 +672,13 @@ @{ int c; do - /* @r{No need to check for @code{EOF} because it is not - @code{isspace}, and @code{ungetc} ignores @code{EOF}.} */ + /* @r{No need to check for @code{EOF} because it is not} + @r{@code{isspace}, and @code{ungetc} ignores @code{EOF}.} */ c = getc (stream); while (isspace (c)); ungetc (c, stream); @} -@end example +@end smallexample @node Formatted Output @section Formatted Output @@ -705,20 +731,20 @@ formatted and written to the output stream. For example, @cindex conversion specifications (@code{printf}) -@example +@smallexample int pct = 37; char filename[] = "foo.txt"; printf ("Processing of `%s' is %d%% finished.\nPlease be patient.\n", filename, pct); -@end example +@end smallexample @noindent produces output like -@example +@smallexample Processing of `foo.txt' is 37% finished. Please be patient. -@end example +@end smallexample This example shows the use of the @samp{%d} conversion to specify that an @code{int} argument should be printed in decimal notation, the @@ -795,13 +821,11 @@ within the field. @cindex minimum field width (@code{printf}) -The GNU library's version of @code{printf} also allows you to specify a -field width of @samp{*}. This means that the next argument in the -argument list (before the actual value to be printed) is used as the -field width. The value must be an @code{int}. Other C library versions may -not recognize this syntax. -@c !!! ANSI specifies *. it is not a GNU extension. if the passed -@c number is negative, it sets the - flag and is negated to get the width. +You can also specify a field width of @samp{*}. This means that the +next argument in the argument list (before the actual value to be +printed) is used as the field width. The value must be an @code{int}. +If the value is negative, this means to set the @samp{-} flag (see +below) and to use the absolute value as the field width. @item An optional @dfn{precision} to specify the number of digits to be @@ -810,15 +834,12 @@ (which defaults to zero if omitted). @cindex precision (@code{printf}) -The GNU library's version of @code{printf} also allows you to specify a -precision of @samp{*}. This means that the next argument in the -argument list (before the actual value to be printed) is used as the -precision. The value must be an @code{int}. If you specify @samp{*} -for both the field width and precision, the field width argument -precedes the precision argument. Other C library versions may not -recognize this syntax. -@c !!! ANSI specifies *. it is not a GNU extension. if the passed -@c number is negative, it is ignored. +You can also specify a precision of @samp{*}. This means that the next +argument in the argument list (before the actual value to be printed) is +used as the precision. The value must be an @code{int}, and is ignored +if it is negative. If you specify @samp{*} for both the field width and +precision, the field width argument precedes the precision argument. +Other C library versions may not recognize this syntax. @item An optional @dfn{type modifier character}, which is used to specify the @@ -861,6 +882,7 @@ @item @samp{%Z} Print an integer as an unsigned decimal number, assuming it was passed with type @code{size_t}. @xref{Integer Conversions}, for details. +This is a GNU extension. @item @samp{%x}, @samp{%X} Print an integer as an unsigned hexadecimal number. @samp{%x} uses @@ -897,6 +919,7 @@ @item @samp{%m} Print the string corresponding to the value of @code{errno}. +(This is a GNU extension.) @xref{Other Output Conversions}. @item @samp{%%} @@ -944,12 +967,14 @@ includes a sign, this flag is ignored if you supply both of them. @item @samp{#} -For the @samp{%o} conversion, this forces the leading digit to be @samp{0}, -as if by increasing the precision. For @samp{%x} or @samp{%X}, this -prefixes a leading @samp{0x} or @samp{0X} (respectively) to the result. -This doesn't do anything useful for the @samp{%d}, @samp{%i}, or @samp{%u} -conversions. -@c !!! should mention this is the fmt grokked by strtoul, and xref to it. +For the @samp{%o} conversion, this forces the leading digit to be +@samp{0}, as if by increasing the precision. For @samp{%x} or +@samp{%X}, this prefixes a leading @samp{0x} or @samp{0X} (respectively) +to the result. This doesn't do anything useful for the @samp{%d}, +@samp{%i}, or @samp{%u} conversions. Using this flag produces output +which can be parsed by the @code{strtoul} function (@pxref{Parsing of +Integers}) and @code{scanf} with the @samp{%i} conversion +(@pxref{Numeric Input Conversions}). @item @samp{0} Pad the field with zeros instead of spaces. The zeros are placed after @@ -996,20 +1021,20 @@ Here is an example. Using the template string: -@example -|%5d|%-5d|%+5d|%+-5d|% 5d|%05d|%5.0d|%5.2d|%d|\n" -@end example +@smallexample +"|%5d|%-5d|%+5d|%+-5d|% 5d|%05d|%5.0d|%5.2d|%d|\n" +@end smallexample @noindent to print numbers using the different options for the @samp{%d} conversion gives results like: -@example +@smallexample | 0|0 | +0|+0 | 0|00000| | 00|0| | 1|1 | +1|+1 | 1|00001| 1| 01|1| | -1|-1 | -1|-1 | -1|-0001| -1| -01|-1| |100000|100000|+100000| 100000|100000|100000|100000|100000| -@end example +@end smallexample In particular, notice what happens in the last case where the number is too large to fit in the minimum field width specified. @@ -1017,15 +1042,15 @@ Here are some more examples showing how unsigned integers print under various format options, using the template string: -@example +@smallexample "|%5u|%5o|%5x|%5X|%#5o|%#5x|%#5X|%#10.8x|\n" -@end example +@end smallexample -@example +@smallexample | 0| 0| 0| 0| 0| 0x0| 0X0|0x00000000| | 1| 1| 1| 1| 01| 0x1| 0X1|0x00000001| |100000|303240|186a0|186A0|0303240|0x186a0|0X186A0|0x000186a0| -@end example +@end smallexample @node Floating-Point Conversions @@ -1037,13 +1062,13 @@ The @samp{%f} conversion prints its argument in fixed-point notation, producing output of the form -[@code{-}]@var{ddd}@code{.}@var{ddd}, +@w{[@code{-}]@var{ddd}@code{.}@var{ddd}}, where the number of digits following the decimal point is controlled by the precision you specify. The @samp{%e} conversion prints its argument in exponential notation, producing output of the form -[@code{-}]@var{d}@code{.}@var{ddd}@code{e}[@code{+}|@code{-}]@var{dd}. +@w{[@code{-}]@var{d}@code{.}@var{ddd}@code{e}[@code{+}|@code{-}]@var{dd}}. Again, the number of digits following the decimal point is controlled by the precision. The exponent always contains at least two digits. The @samp{%E} conversion is similar but the exponent is marked with the letter @@ -1058,6 +1083,7 @@ The following flags can be used to modify the behavior: +@comment We use @asis instead of @samp so we can have ` ' as an item. @table @asis @item @samp{-} Left-justify the result in the field. Normally the result is @@ -1085,14 +1111,15 @@ The precision specifies how many digits follow the decimal-point character for the @samp{%f}, @samp{%e}, and @samp{%E} conversions. For -these conversions, the default is @code{6}. If the precision is -explicitly @code{0}, this has the rather strange effect of suppressing -the decimal point character entirely! For the @samp{%g} and @samp{%G} -conversions, the precision specifies how many significant digits to -print; if @code{0} or not specified, it is treated like a value of -@code{1}. -@c !!! clarify "significant digits" -- that is something that caused -@c confusion just between Sandra and me. -rm +these conversions, the default precision is @code{6}. If the precision +is explicitly @code{0}, this suppresses the decimal point character +entirely. For the @samp{%g} and @samp{%G} conversions, the precision +specifies how many significant digits to print. Significant digits are +the first digit before the decimal point, and all the digits after it. +If the precision @code{0} or not specified for @samp{%g} or @samp{%G}, +it is treated like a value of @code{1}. If the value being printed +cannot be expressed precisely in the specified number of digits, the +value is rounded to the nearest number that fits. Without a type modifier, the floating-point conversions use an argument of type @code{double}. (By the default argument promotions, any @@ -1109,13 +1136,13 @@ floating-point conversions. All of the numbers were printed using this template string: -@example +@smallexample "|%12.4f|%12.4e|%12.4g|\n" -@end example +@end smallexample Here is the output: -@example +@smallexample | 0.0000| 0.0000e+00| 0| | 1.0000| 1.0000e+00| 1| | -1.0000| -1.0000e+00| -1| @@ -1125,7 +1152,7 @@ | 12345.0000| 1.2345e+04| 1.234e+04| | 100000.0000| 1.0000e+05| 1e+05| | 123456.0000| 1.2346e+05| 1.234e+05| -@end example +@end smallexample Notice how the @samp{%g} conversion drops trailing zeros. @@ -1140,24 +1167,25 @@ other flags are defined, and no precision or type modifier can be given. For example: -@example +@smallexample printf ("%c%c%c%c%c", 'h', 'e', 'l', 'l', 'o'); -@end example +@end smallexample @noindent prints @samp{hello}. The @samp{%s} conversion prints a string. The corresponding argument -must be of type @code{char *}. A precision can be specified to indicate -the maximum number of characters to write; otherwise characters in the -string up to but not including the terminating null character are -written to the output stream. The @samp{-} flag can be used to specify -left-justification in the field, but no other flags or type modifiers -are defined for this conversion. For example: +must be of type @code{char *} (or @code{const char *}). A precision can +be specified to indicate the maximum number of characters to write; +otherwise characters in the string up to but not including the +terminating null character are written to the output stream. The +@samp{-} flag can be used to specify left-justification in the field, +but no other flags or type modifiers are defined for this conversion. +For example: -@example +@smallexample printf ("%3s%-6s", "no", "where"); -@end example +@end smallexample @noindent prints @samp{ nowhere }. @@ -1170,16 +1198,16 @@ The @samp{%m} conversion prints the string corresponding to the error code in @code{errno}. @xref{Error Messages}. Thus: -@example +@smallexample fprintf (stderr, "can't open `%s': %m\n", filename); -@end example +@end smallexample @noindent is equivalent to: -@example +@smallexample fprintf (stderr, "can't open `%s': %s\n", filename, strerror (errno)); -@end example +@end smallexample @noindent The @samp{%m} conversion is a GNU C library extension. @@ -1194,9 +1222,9 @@ For example: -@example +@smallexample printf ("%p", "testing"); -@end example +@end smallexample @noindent prints @samp{0x} followed by a hexadecimal number---the address of the @@ -1217,17 +1245,17 @@ For example, -@example +@smallexample int nchar; printf ("%d %s%n\n", 3, "bears", &nchar); -@end example +@end smallexample @noindent prints: -@example +@smallexample 3 bears -@end example +@end smallexample @noindent and sets @code{nchar} to @code{7}, because @samp{3 bears} is seven @@ -1244,7 +1272,10 @@ This section describes how to call @code{printf} and related functions. Prototypes for these functions are in the header file @file{stdio.h}. -@c !!! mention you must have prototypes for these fns (because varargs). +Because these functions take a variable number of arguments, you +@emph{must} declare prototypes for them before using them. Of course, +the easiest way to make sure you have all the right prototypes is to +just include @file{stdio.h}. @pindex stdio.h @comment stdio.h @@ -1296,9 +1327,10 @@ you should allocate at least @var{size} characters for the string @var{s}. The return value is the number of characters stored, not including the -terminating null. If this value equals @var{size}, then there was not -enough space in @var{s} for all the output. You should try again with a -bigger output string. Here is an example of doing this: +terminating null. If this value equals @code{@var{size} - 1}, then +there was not enough space in @var{s} for all the output. You should +try again with a bigger output string. Here is an example of doing +this: @smallexample @group @@ -1310,11 +1342,14 @@ /* @r{Guess we need no more than 100 chars of space.} */ int size = 100; char *buffer = (char *) xmalloc (size); +@end group +@group while (1) @{ /* @r{Try to print in the allocated space.} */ int nchars = snprintf (buffer, size, - "value of %s is %s", name, value); + "value of %s is %s", + name, value); /* @r{If that worked, return the string.} */ if (nchars < size) return buffer; @@ -1345,7 +1380,7 @@ address of a @code{char *} object, and @code{asprintf} stores a pointer to the newly allocated string at that location. -Here is how to use @code{asprint} to get the same result as the +Here is how to use @code{asprintf} to get the same result as the @code{snprintf} example, but more easily: @smallexample @@ -1405,14 +1440,15 @@ after you call @code{vprintf}. Instead, you should call @code{va_end} to retire the pointer from service. However, you can safely call @code{va_start} on another pointer variable and begin fetching the -arguments again through that pointer. Calling @code{vfprintf} does -not destroy the argument list of your function, merely the particular +arguments again through that pointer. Calling @code{vprintf} does not +destroy the argument list of your function, merely the particular pointer that you passed to it. -The GNU library does not have such restrictions. You can safely continue -to fetch arguments from a @code{va_list} pointer after passing it to -@code{vprintf}, and @code{va_end} is a no-op. -@c !!! but note that you will see the args vprintf already saw. +GNU C does not have such restrictions. You can safely continue to fetch +arguments from a @code{va_list} pointer after passing it to +@code{vprintf}, and @code{va_end} is a no-op. (Note, however, that +subsequent @code{va_arg} calls will fetch the same arguments which +@code{vprintf} previously used.) Prototypes for these functions are declared in @file{stdio.h}. @pindex stdio.h @@ -1468,7 +1504,7 @@ (@pxref{Error Messages}, for a description of @code{program_invocation_short_name}). -@example +@smallexample @group #include #include @@ -1485,14 +1521,14 @@ va_end (ap); @} @end group -@end example +@end smallexample @noindent You could call @code{eprintf} like this: -@example +@smallexample eprintf ("file `%s' does not exist\n", filename); -@end example +@end smallexample @node Parsing a Template String @subsection Parsing a Template String @@ -1588,10 +1624,10 @@ and @samp{bar} with their own specialized @code{printf} conversions, you could define encodings for these types as: -@example +@smallexample #define PA_FOO PA_LAST #define PA_BAR (PA_LAST + 1) -@end example +@end smallexample @end table Here are the flag bits that modify a basic type. They are combined with @@ -1647,7 +1683,7 @@ @code{NUMBER}, @code{CHAR}, @code{STRING} and @code{STRUCTURE} (and perhaps others which are not valid here). -@example +@smallexample /* @r{Test whether the @var{nargs} specified objects} @r{in the vector @var{args} are valid} @r{for the format string @var{format}:} @@ -1657,57 +1693,59 @@ int validate_args (char *format, int nargs, OBJECT *args) @{ - int nelts = 20; int *argtypes; int nwanted; - /* @r{Get the information about the arguments.} */ - while (1) @{ - argtypes = (int *) alloca (nelts * sizeof (int)); - nwanted = parse_printf_format (string, nelts, argtypes); - if (nwanted <= nelts) - break; - nelts *= 2; - @} + /* @r{Get the information about the arguments.} + @r{Each conversion specification must be at least two characters} + @r{long, so there cannot be more specifications than half the} + @r{length of the string.} */ + + argtypes = (int *) alloca (strlen (format) / 2 * sizeof (int)); + nwanted = parse_printf_format (string, nelts, argtypes); /* @r{Check the number of arguments.} */ - if (nwanted > nargs) @{ - error ("too few arguments (at least %d required)", nwanted); - return 0; - @} + if (nwanted > nargs) + @{ + error ("too few arguments (at least %d required)", nwanted); + return 0; + @} /* @r{Check the C type wanted for each argument} @r{and see if the object given is suitable.} */ - for (i = 0; i < nwanted; i++) @{ - int wanted; + for (i = 0; i < nwanted; i++) + @{ + int wanted; - if (argtypes[i] & PA_FLAG_PTR) - wanted = STRUCTURE; - else - switch (argtypes[i] & ~PA_FLAG_MASK) @{ - case PA_INT: - case PA_FLOAT: - case PA_DOUBLE: - wanted = NUMBER; - break; - case PA_CHAR: - wanted = CHAR; - break; - case PA_STRING: - wanted = STRING; - break; - case PA_POINTER: + if (argtypes[i] & PA_FLAG_PTR) wanted = STRUCTURE; - break; - @} - if (TYPE (args[i]) != wanted) @{ - error ("type mismatch for arg number %d", i); - return 0; + else + switch (argtypes[i] & ~PA_FLAG_MASK) + @{ + case PA_INT: + case PA_FLOAT: + case PA_DOUBLE: + wanted = NUMBER; + break; + case PA_CHAR: + wanted = CHAR; + break; + case PA_STRING: + wanted = STRING; + break; + case PA_POINTER: + wanted = STRUCTURE; + break; + @} + if (TYPE (args[i]) != wanted) + @{ + error ("type mismatch for arg number %d", i); + return 0; + @} @} - @} return 1; @} -@end example +@end smallexample @node Customizing Printf @section Customizing @code{printf} @@ -1719,7 +1757,7 @@ for @code{printf} template strings, to teach @code{printf} clever ways to print the important data structures of your program. -The way you do this is by registering the conversion with +The way you do this is by registering the conversion with the function @code{register_printf_function}; see @ref{Registering New Conversions}. One of the arguments you pass to this function is a pointer to a handler function that produces the actual output; see @ref{Defining the Output @@ -1789,13 +1827,13 @@ @subsection Conversion Specifier Options If you define a meaning for @samp{%q}, what if the template contains -@samp{%+Sq} or @samp{%-#q}? To implement a sensible meaning for these, +@samp{%+23q} or @samp{%-#q}? To implement a sensible meaning for these, the handler when called needs to be able to get the options specified in the template. Both the @var{handler_function} and @var{arginfo_function} arguments to @code{register_printf_function} accept an argument of type -@code{struct print_info}, which contains information about the options +@code{struct printf_info}, which contains information about the options appearing in an instance of the conversion specifier. This data type is declared in the header file @file{printf.h}. @pindex printf.h @@ -1868,10 +1906,10 @@ You should define your handler functions with a prototype like: -@example +@smallexample int @var{function} (FILE *stream, const struct printf_info *info, va_list *ap_pointer) -@end example +@end smallexample The @code{stream} argument passed to the handler function is the stream to which it should write output. @@ -1893,9 +1931,9 @@ function to update its own @code{va_list} variable to account for the arguments that your handler processes. @xref{Variadic Functions}.) -The return value from your handler function should be the number of -argument values that it processes from the variable argument list. You -can also return a value of @code{-1} to indicate an error. +Your handler function should return a value just like @code{printf} +does: it should return the number of characters it has written, or a +negative value to indicate an error. @comment printf.h @comment GNU @@ -1910,15 +1948,15 @@ You should define these functions with a prototype like: -@example +@smallexample int @var{function} (const struct printf_info *info, size_t n, int *argtypes) -@end example +@end smallexample The return value from the function should be the number of arguments the -conversion expects, up to a maximum of @var{n}. The function should -also fill in the @var{argtypes} array with information about the types -of each of these arguments. This information is encoded using the +conversion expects. The function should also fill in no more than +@var{n} elements of the @var{argtypes} array with information about the +types of each of these arguments. This information is encoded using the various @samp{PA_} macros. (You will notice that this is the same calling convention @code{parse_printf_format} itself uses.) @@ -1939,17 +1977,17 @@ structure. The @samp{%W} conversion supports the minimum field width and left-justification options, but ignores everything else. -@example +@smallexample @include rprintf.c.texi -@end example +@end smallexample The output produced by this program looks like: -@example +@smallexample || | | | | -@end example +@end smallexample @node Formatted Input @section Formatted Input @@ -2013,7 +2051,7 @@ the contents of tables. For example, here is a function that uses @code{scanf} to initialize an array of @code{double}: -@example +@smallexample void readarray (double *array, int n) @{ @@ -2022,7 +2060,7 @@ if (scanf (" %lf", &(array[i])) != 1) invalid_input_error (); @} -@end example +@end smallexample The formatted input functions are not used as frequently as the formatted output functions. Partly, this is because it takes some care @@ -2030,10 +2068,11 @@ from a matching error. If you are trying to read input that doesn't match a single, fixed -pattern, you may be better off using a tool such as Bison to generate a -parser, rather than using @code{scanf}. For more information about -this, see @ref{Top, Bison, Bison, bison.info, The Bison Reference -Manual}. +pattern, you may be better off using a tool such as Flex to generate a +lexical scanner, or Bison to generate a parser, rather than using +@code{scanf}. For more information about this, see @ref{Top, Flex, +Flex, flex.info, Flex: The Lexical Scanner Generator} and @ref{Top, +Bison, Bison, bison.info, The Bison Reference Manual}. @node Input Conversion Syntax @subsection Input Conversion Syntax @@ -2057,9 +2096,9 @@ The conversion specifications in a @code{scanf} template string have the general form: -@example +@smallexample % @var{flags} @var{width} @var{type} @var{conversion} -@end example +@end smallexample In more detail, an input conversion specification consists of an initial @samp{%} character followed in sequence by: @@ -2077,6 +2116,7 @@ @item An optional flag character @samp{a} (valid with string conversions only) which requests allocation of a buffer long enough to store the string in. +(This is a GNU extension.) @xref{Dynamic String Input}. @item @@ -2086,7 +2126,7 @@ whichever happens first. Most conversions discard initial whitespace characters (those that don't are explicitly documented), and these discarded characters don't count towards the maximum field width. -Most input conversions store a null character to mark the end of the +String input conversions store a null character to mark the end of the input; the maximum field width does not include this terminator. @cindex maximum field width (@code{scanf}) @@ -2123,16 +2163,16 @@ Input Conversions}. @item @samp{%o} -Matches an unsigned integer in octal radix. @xref{Numeric -Input Conversions}. +Matches an unsigned integer written in octal radix. +@xref{Numeric Input Conversions}. @item @samp{%u} -Matches an unsigned integer in decimal radix. @xref{Numeric -Input Conversions}. +Matches an unsigned integer written in decimal radix. +@xref{Numeric Input Conversions}. @item @samp{%x}, @samp{%X} -Matches an unsigned integer in hexadecimal radix. @xref{Numeric -Input Conversions}. +Matches an unsigned integer written in hexadecimal radix. +@xref{Numeric Input Conversions}. @item @samp{%e}, @samp{%f}, @samp{%g}, @samp{%E}, @samp{%G} Matches an optionally signed floating-point number. @xref{Numeric Input @@ -2139,8 +2179,8 @@ Conversions}. @item @samp{%s} -Matches a string of non-whitespace characters. @xref{String Input -Conversions}. +Matches a string containing only non-whitespace characters. +@xref{String Input Conversions}. @item @samp{%[} Matches a string of characters that belong to a specified set. @@ -2187,8 +2227,9 @@ the formats that the C language defines for specifying an integer constant. The syntax that is recognized is the same as that for the @code{strtol} function (@pxref{Parsing of Integers}) with the value -@code{0} for the @var{base} argument. -@c !!! mention printf %#[xod] generates something this can read. +@code{0} for the @var{base} argument. (You can print integers in this +syntax with @code{printf} by using the @samp{#} flag character with the +@samp{%x}, @samp{%o}, or @samp{%d} conversion. @xref{Integer Conversions}.) For example, any of the strings @samp{10}, @samp{0xa}, or @samp{012} could be read in as integers under the @samp{%i} conversion. Each of @@ -2289,9 +2330,9 @@ For example, reading the input: -@example +@smallexample hello, world -@end example +@end smallexample @noindent with the conversion @samp{%10c} produces @code{" hello, wo"}, but @@ -2371,7 +2412,7 @@ conversion specification to read a ``variable assignment'' of the form @samp{@var{variable} = @var{value}}. -@example +@smallexample @{ char *variable, *value; @@ -2384,7 +2425,7 @@ @dots{} @} -@end example +@end smallexample @node Other Input Conversions @subsection Other Input Conversions @@ -2393,8 +2434,10 @@ The @samp{%p} conversion is used to read a pointer value. It recognizes the same syntax as is used by the @samp{%p} output conversion for -@code{printf}. The corresponding argument should be of type @code{void **}; -that is, the address of a place to store a pointer. +@code{printf} (@pxref{Other Output Conversions}); that is, a hexadecimal +number just as the @samp{%x} conversion accepts. The corresponding +argument should be of type @code{void **}; that is, the address of a +place to store a pointer. The resulting pointer value is not guaranteed to be valid if it was not originally written during the same program execution that reads it in. @@ -2642,7 +2685,7 @@ character value. @item -Space characters that are written immediately preceeding a newline +Space characters that are written immediately preceding a newline character in a text stream may disappear when the file is read in again. @item @@ -3130,103 +3173,6 @@ @code{setvbuf} instead. @end deftypefun - -@node Temporary Files -@section Temporary Files - -If you need to use a temporary file in your program, you can use the -@code{tmpfile} function to open it. Or you can use the @code{tmpnam} -function make a name for a temporary file and then open it in the usual -way with @code{fopen}. - -These facilities are declared in the header file @file{stdio.h}. -@pindex stdio.h - -@comment stdio.h -@comment ANSI -@deftypefun {FILE *} tmpfile (void) -This function creates a temporary binary file for update mode, as if by -calling @code{fopen} with mode @code{"wb+"}. The file is deleted -automatically when it is closed or when the program terminates. (On -some other ANSI C systems the file may fail to be deleted if the program -terminates abnormally). -@end deftypefun - -@comment stdio.h -@comment ANSI -@deftypefun {char *} tmpnam (char *@var{result}) -This function constructs and returns a file name that is a valid file -name and that does not name any existing file. If the @var{result} -argument is a null pointer, the return value is a pointer to an internal -static string, which might be modified by subsequent calls. Otherwise, -the @var{result} argument should be a pointer to an array of at least -@code{L_tmpnam} characters, and the result is written into that array. - -It is possible for @code{tmpnam} to fail if you call it too many times. -This is because the fixed length of a temporary file name gives room for -only a finite number of different names. If @code{tmpnam} fails, it -returns a null pointer. -@end deftypefun - -@comment stdio.h -@comment ANSI -@deftypevr Macro int L_tmpnam -The value of this macro is an integer constant expression that represents -the minimum allocation size of a string large enough to hold the -file name generated by the @code{tmpnam} function. -@end deftypevr - -@comment stdio.h -@comment ANSI -@deftypevr Macro int TMP_MAX -The macro @code{TMP_MAX} is a lower bound for how many temporary names -you can create with @code{tmpnam}. You can rely on being able to call -@code{tmpnam} at least this many times before it might fail saying you -have made too many temporary file names. - -With the GNU library, you can create a very large number of temporary -file names---if you actually create the files, you will probably run out -of disk space before you run out of names. Some other systems have a -fixed, small limit on the number of temporary files. The limit is never -less than @code{25}. -@end deftypevr - -@comment stdio.h -@comment SVID -@deftypefun {char *} tempnam (const char *@var{dir}, const char *@var{prefix}) -This function generates a unique temporary filename. If @var{prefix} is -not a null pointer, up to five characters of this string are used as -a prefix for the file name. - -The directory prefix for the temporary file name is determined by testing -each of the following, in sequence. The directory must exist and be -writable. - -@itemize @bullet -@item -The environment variable @code{TMPDIR}, if it is defined. - -@item -The @var{dir} argument, if it is not a null pointer. - -@item -The value of the @code{P_tmpdir} macro. - -@item -The directory @file{/tmp}. -@end itemize - -This function is defined for SVID compatibility. -@end deftypefun -@cindex TMPDIR environment variable - -@comment stdio.h -@comment SVID -@c !!! are we putting SVID/GNU/POSIX.1/BSD in here or not?? -@deftypevr {SVID Macro} {char *} P_tmpdir -This macro is the name of the default directory for temporary files. -@end deftypevr - @node Other Kinds of Streams @section Other Kinds of Streams @@ -3301,13 +3247,13 @@ Here is an example of using @code{fmemopen} to create a stream for reading from a string: -@example +@smallexample @include memopen.c.texi -@end example +@end smallexample This program produces the following output: -@example +@smallexample Got f Got o Got o @@ -3314,7 +3260,7 @@ Got b Got a Got r -@end example +@end smallexample @comment stdio.h @comment GNU @@ -3340,16 +3286,16 @@ Here is an example of using @code{open_memstream}: -@example -@include memstream.c.texi -@end example +@smallexample +@include memstrm.c.texi +@end smallexample This program produces the following output: -@example +@smallexample buf = `hello', size = 5 buf = `hello, world', size = 12 -@end example +@end smallexample @c @group Invalid outside @example. @node Obstack Streams @@ -3384,9 +3330,9 @@ in bytes by calling @code{obstack_object_size} (@pxref{Status of an Obstack}), or you can null-terminate the object like this: -@example +@smallexample obstack_1grow (@var{obstack}, 0); -@end example +@end smallexample Whichever one you do, you must do it @emph{before} calling @code{obstack_finish}. (You can do both if you wish.) @@ -3394,7 +3340,7 @@ Here is a sample function that uses @code{open_obstack_stream}: -@example +@smallexample char * make_message_string (const char *a, int b) @{ @@ -3407,7 +3353,7 @@ obstack_1grow (&message_obstack, 0); return obstack_finish (&message_obstack); @} -@end example +@end smallexample @node Custom Streams @subsection Programming Your Own Custom Streams @@ -3474,8 +3420,9 @@ @item cookie_seek_function *seek This is the function that performs the equivalent of file positioning on the cookie. If the value is a null pointer instead of a function, calls -to @code{fseek} on this stream return an @code{ESPIPE} error. -@c !!! fseek works if you never seek outside the buffer +to @code{fseek} on this stream can only seek to locations within the +buffer; any attempt to seek outside the buffer will return an +@code{ESPIPE} error. @item cookie_close_function *close This function performs any appropriate cleanup on the cookie when @@ -3507,9 +3454,9 @@ You should define the function to read data from the cookie as: -@example +@smallexample ssize_t @var{reader} (void *@var{cookie}, void *@var{buffer}, size_t @var{size}) -@end example +@end smallexample This is very similar to the @code{read} function; see @ref{I/O Primitives}. Your function should transfer up to @var{size} bytes into @@ -3519,9 +3466,9 @@ You should define the function to write data to the cookie as: -@example +@smallexample ssize_t @var{writer} (void *@var{cookie}, const void *@var{buffer}, size_t @var{size}) -@end example +@end smallexample This is very similar to the @code{write} function; see @ref{I/O Primitives}. Your function should transfer up to @var{size} bytes from @@ -3531,9 +3478,9 @@ You should define the function to perform seek operations on the cookie as: -@example +@smallexample int @var{seeker} (void *@var{cookie}, fpos_t *@var{position}, int @var{whence}) -@end example +@end smallexample For this function, the @var{position} and @var{whence} arguments are interpreted as for @code{fgetpos}; see @ref{Portable Positioning}. In @@ -3549,9 +3496,9 @@ You should define the function to do cleanup operations on the cookie appropriate for closing the stream as: -@example +@smallexample int @var{cleaner} (void *@var{cookie}) -@end example +@end smallexample Your function should return @code{-1} to indicate an error, and @code{0} otherwise. diff -ruN glibc-1.06/manual/stpcpy.c.texi glibc-1.07/manual/stpcpy.c.texi --- glibc-1.06/manual/stpcpy.c.texi Tue Oct 27 18:59:45 1992 +++ glibc-1.07/manual/stpcpy.c.texi Wed Oct 27 19:19:50 1993 @@ -1,10 +1,13 @@ #include +#include int main (void) @{ + char buffer[10]; char *to = buffer; to = stpcpy (to, "foo"); to = stpcpy (to, "bar"); - printf ("%s\n", buffer); + puts (buffer); + return 0; @} diff -ruN glibc-1.06/manual/strftim.c.texi glibc-1.07/manual/strftim.c.texi --- glibc-1.06/manual/strftim.c.texi +++ glibc-1.07/manual/strftim.c.texi Thu Jun 10 18:00:38 1993 @@ -0,0 +1,31 @@ +#include +#include + +#define SIZE 256 + +int +main (void) +@{ + char buffer[SIZE]; + time_t curtime; + struct tm *loctime; + + /* @r{Get the current time.} */ + curtime = time (NULL); + + /* @r{Convert it to local time representation.} */ + loctime = localtime (&curtime); + + /* @r{Print out the date and time in the standard format.} */ + fputs (asctime (loctime), stdout); + +@group + /* @r{Print it out in a nice format.} */ + strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime); + fputs (buffer, stdout); + strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime); + fputs (buffer, stdout); + + return 0; +@} +@end group diff -ruN glibc-1.06/manual/strftime.c.texi glibc-1.07/manual/strftime.c.texi --- glibc-1.06/manual/strftime.c.texi Tue Oct 27 18:59:57 1992 +++ glibc-1.07/manual/strftime.c.texi @@ -1,31 +0,0 @@ -#include -#include - -#define SIZE 256 - -int -main (void) -@{ - char buffer[SIZE]; - time_t curtime; - struct tm *loctime; - - /* @r{Get the current time. } */ - curtime = time (NULL); - - /* @r{Convert it to local time representation. } */ - loctime = localtime (&curtime); - - /* @r{Print out the date and time in the standard format. } */ - fputs (asctime (loctime), stdout); - -@group - /* @r{Print it out in a nice format. } */ - strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime); - fputs (buffer, stdout); - strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime); - fputs (buffer, stdout); - - return 0; -@} -@end group diff -ruN glibc-1.06/manual/string.texi glibc-1.07/manual/string.texi --- glibc-1.06/manual/string.texi Wed May 12 14:26:35 1993 +++ glibc-1.07/manual/string.texi Mon Aug 30 20:10:38 1993 @@ -99,9 +99,8 @@ an extra byte to hold the null character that marks the end of the string. -@c !!! I think the / looks bad in the printed manual---use `and' instead? -rm @node String/Array Conventions, String Length, Representation of Strings, String and Array Utilities -@section String/Array Conventions +@section String and Array Conventions This chapter describes both functions that work on arbitrary arrays or blocks of memory, and functions that are specific to null-terminated @@ -148,10 +147,10 @@ null character within the array.) For example, -@example +@smallexample strlen ("hello, world") @result{} 12 -@end example +@end smallexample When applied to a character array, the @code{strlen} function returns the length of the string stored there, not its allocation size. You can @@ -158,13 +157,13 @@ get the allocation size of the character array that holds a string using the @code{sizeof} operator: -@example +@smallexample char string[32] = "hello, world"; sizeof (string) @result{} 32 strlen (string) @result{} 12 -@end example +@end smallexample @end deftypefun @node Copying and Concatenation, String/Array Comparison, String Length, String and Array Utilities @@ -212,13 +211,14 @@ The value returned by @code{memcpy} is the value of @var{to}. Here is an example of how you might use @code{memcpy} to copy the -contents of a @code{struct}: +contents of an array: -@example -struct foo *old, *new; +@smallexample +struct foo *oldarray, *newarray; +int arraysize; @dots{} -memcpy (new, old, sizeof(struct foo)); -@end example +memcpy (new, old, arraysize * sizeof (struct foo)); +@end smallexample @end deftypefun @comment string.h @@ -302,9 +302,9 @@ For example, this program uses @code{stpcpy} to concatenate @samp{foo} and @samp{bar} to produce @samp{foobar}, which it then prints. -@example +@smallexample @include stpcpy.c.texi -@end example +@end smallexample This function is not part of the ANSI or POSIX standards, and is not customary on Unix systems, but we did not invent it either. Perhaps it @@ -323,7 +323,7 @@ An equivalent definition for @code{strcat} would be: -@example +@smallexample char * strcat (char *to, const char *from) @{ @@ -330,7 +330,7 @@ strcpy (to + strlen (to), from); return to; @} -@end example +@end smallexample This function has undefined results if the strings overlap. @end deftypefun @@ -344,8 +344,9 @@ allocated size of @var{to} must be at least @code{@var{size} + 1} bytes longer than its initial length. -@c !!! why is this here? It should be introduced. -@example +The @code{strncat} function could be implemented like this: + +@smallexample @group char * strncat (char *to, const char *from, size_t size) @@ -354,7 +355,7 @@ return to; @} @end group -@end example +@end smallexample The behavior of @code{strncat} is undefined if the strings overlap. @end deftypefun @@ -363,17 +364,17 @@ Notice how, in the call to @code{strncat}, the @var{size} parameter is computed to avoid overflowing the character array @code{buffer}. -@example +@smallexample @include strncat.c.texi -@end example +@end smallexample @noindent The output produced by this program looks like: -@example +@smallexample hello hello, wo -@end example +@end smallexample @comment string.h @comment BSD @@ -388,7 +389,9 @@ @deftypefun {void *} bzero (void *@var{block}, size_t @var{size}) This is a partially obsolete alternative for @code{memset}, derived from BSD. Note that it is not as general as @code{memset}, because the only -value it can store is zero. +value it can store is zero. Some machines have special instructions for +zeroing memory, so @code{bzero} might be more efficient than +@code{memset}. @end deftypefun @node String/Array Comparison, Collation Functions, Copying and Concatenation, String and Array Utilities @@ -416,9 +419,9 @@ find it makes for a cleaner program to hide them behind a macro definition, like this: -@example +@smallexample #define str_eq(s1,s2) (!strcmp ((s1),(s2))) -@end example +@end smallexample All of these functions are declared in the header file @file{string.h}. @pindex string.h @@ -454,7 +457,7 @@ For example, given a structure type definition like: -@example +@smallexample struct foo @{ unsigned char tag; @@ -465,7 +468,7 @@ char *p; @} value; @}; -@end example +@end smallexample @noindent you are better off writing a specialized comparison function to compare @@ -518,7 +521,7 @@ are associated with different numeric codes, and the return values and ordering may differ.) -@example +@smallexample strcmp ("hello", "hello") @result{} 0 /* @r{These two strings are the same.} */ strcmp ("hello", "Hello") @@ -531,7 +534,7 @@ @result{} 0 /* @r{The initial 5 characters are the same.} */ strncmp ("hello, world", "hello, stupid world!!!", 5) @result{} 0 /* @r{The initial 5 characters are the same.} */ -@end example +@end smallexample @comment string.h @comment BSD @@ -590,7 +593,7 @@ (Later on in this section, we will show a way to do this more efficiently using @code{strxfrm}.) -@example +@smallexample /* @r{This is the comparison function used with @code{qsort}.} */ int @@ -609,7 +612,7 @@ qsort (array, sizeof (char *), nstrings, compare_elements); @} -@end example +@end smallexample @cindex converting string to collation order @comment string.h @@ -648,7 +651,7 @@ the time needed to allocate and free storage is much less than the time we save, when there are many strings. -@example +@smallexample struct sorter @{ char *input; char *transformed; @}; /* @r{This is the comparison function used with @code{qsort}} @@ -706,7 +709,7 @@ for (i = 0; i < nstrings; i++) free (temp_array[i].transformed); @} -@end example +@end smallexample @strong{Compatibility Note:} The string collation functions are a new feature of ANSI C. Older C dialects have no equivalent feature. @@ -739,12 +742,12 @@ character, or a null pointer if no match was found. For example, -@example +@smallexample strchr ("hello, world", 'l') @result{} "llo, world" strchr ("hello, world", '?') @result{} NULL -@end example +@end smallexample The terminating null character is considered to be part of the string, so you can use this function get a pointer to the end of a string by @@ -752,6 +755,12 @@ @end deftypefun @comment string.h +@comment BSD +@deftypefun {char *} index (const char *@var{string}, int @var{c}) +@code{index} is another name for @code{strchr}; they are exactly the same. +@end deftypefun + +@comment string.h @comment ANSI @deftypefun {char *} strrchr (const char *@var{string}, int @var{c}) The function @code{strrchr} is like @code{strchr}, except that it searches @@ -759,10 +768,16 @@ from the front). For example, -@example +@smallexample strrchr ("hello, world", 'l') @result{} "ld" -@end example +@end smallexample +@end deftypefun + +@comment string.h +@comment BSD +@deftypefun {char *} rindex (const char *@var{string}, int @var{c}) +@code{rindex} is another name for @code{strrchr}; they are exactly the same. @end deftypefun @comment string.h @@ -775,12 +790,12 @@ @var{needle} is an empty string, the function returns @var{haystack}. For example, -@example +@smallexample strstr ("hello, world", "l") @result{} "llo, world" strstr ("hello, world", "wo") @result{} "world" -@end example +@end smallexample @end deftypefun @@ -804,10 +819,10 @@ of the characters in @var{skipset} is not important. For example, -@example +@smallexample strspn ("hello, world", "abcdefghijklmnopqrstuvwxyz") @result{} 5 -@end example +@end smallexample @end deftypefun @comment string.h @@ -820,10 +835,10 @@ that is a member of the set @var{stopset}.) For example, -@example +@smallexample strcspn ("hello, world", " \t\n,.;!?") @result{} 5 -@end example +@end smallexample @end deftypefun @comment string.h @@ -838,10 +853,10 @@ @c @group Invalid outside the example. For example, -@example +@smallexample strpbrk ("hello, world", " \t\n,.;!?") @result{} ", world" -@end example +@end smallexample @c @end group @end deftypefun @@ -916,7 +931,7 @@ Here is a simple example showing the use of @code{strtok}. @comment Yes, this example has been tested. -@example +@smallexample #include #include @@ -935,4 +950,4 @@ token = strtok (NULL, delimiters); /* token => "and" */ token = strtok (NULL, delimiters); /* token => "punctuation" */ token = strtok (NULL, delimiters); /* token => NULL */ -@end example +@end smallexample diff -ruN glibc-1.06/manual/strncat.c.texi glibc-1.07/manual/strncat.c.texi --- glibc-1.06/manual/strncat.c.texi Fri Oct 16 17:52:46 1992 +++ glibc-1.07/manual/strncat.c.texi Wed Oct 27 19:19:52 1993 @@ -8,7 +8,7 @@ main () @{ strncpy (buffer, "hello", SIZE); - printf ("%s\n", buffer); + puts (buffer); strncat (buffer, ", world", SIZE - strlen (buffer) - 1); - printf ("%s\n", buffer); + puts (buffer); @} diff -ruN glibc-1.06/manual/summary.awk glibc-1.07/manual/summary.awk --- glibc-1.06/manual/summary.awk Wed May 12 14:26:36 1993 +++ glibc-1.07/manual/summary.awk Fri Jun 25 13:12:39 1993 @@ -1,6 +1,6 @@ # awk script to create summary.texinfo from the library texinfo files. -# Copyright (C) 1992 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993 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 @@ -69,6 +69,8 @@ header=header ", @file{" $i "}" } +$1 == "@comment" && $2 == "(none)" { header = -1; } + $1 == "@comment" && header != 0 { std=$2; for (i=3;i<=NF;++i) std=std " " $i } @@ -102,6 +104,7 @@ } } printf "@comment %s%c", name, 012 # FF - printf "@item%s%c", defn, 012 - printf "%s (%s): @ref{%s}.%c\n", header, std, node, 012; + printf "@item%s%c%c", defn, 012, 012 + if (header != -1) printf "%s ", header; + printf "(%s): @ref{%s}.%c\n", std, node, 012; header = 0 } diff -ruN glibc-1.06/manual/summary.texi glibc-1.07/manual/summary.texi --- glibc-1.06/manual/summary.texi Mon May 17 16:35:30 1993 +++ glibc-1.07/manual/summary.texi Wed Dec 29 18:34:37 1993 @@ -1,4430 +1,5647 @@ -@comment *tzname[2] -@item char *tzname[2] -@file{time.h} (POSIX.1): @ref{Time Zone Functions}. +@comment abort +@item void abort (void) + +@file{stdlib.h} (ANSI): @ref{Aborting a Program}. + +@comment abs +@item int abs (int @var{number}) + +@file{stdlib.h} (ANSI): @ref{Absolute Value}. + +@comment accept +@item int accept (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) + +@file{sys/socket.h} (BSD): @ref{Accepting Connections}. + +@comment access +@item int access (const char *@var{filename}, int @var{how}) + +@file{unistd.h} (POSIX.1): @ref{Testing File Access}. + +@comment acosh +@item double acosh (double @var{x}) + +@file{math.h} (BSD): @ref{Hyperbolic Functions}. + +@comment acos +@item double acos (double @var{x}) + +@file{math.h} (ANSI): @ref{Inverse Trig Functions}. + +@comment adjtime +@item int adjtime (const struct timeval *@var{delta}, struct timeval *@var{olddelta}) + +@file{sys/time.h} (BSD): @ref{High-Resolution Calendar}. @comment AF_FILE @item AF_FILE + @file{sys/socket.h} (GNU): @ref{Address Formats}. @comment AF_INET @item AF_INET + @file{sys/socket.h} (BSD): @ref{Address Formats}. @comment AF_UNIX @item AF_UNIX + @file{sys/socket.h} (BSD): @ref{Address Formats}. @comment AF_UNSPEC @item AF_UNSPEC + @file{sys/socket.h} (BSD): @ref{Address Formats}. +@comment alarm +@item unsigned int alarm (unsigned int @var{seconds}) + +@file{unistd.h} (POSIX.1): @ref{Setting an Alarm}. + +@comment alloca +@item void * alloca (size_t @var{size}); + +@file{stdlib.h} (GNU, BSD): @ref{Variable Size Automatic}. + @comment ALTWERASE @item ALTWERASE + @file{termios.h} (BSD): @ref{Local Modes}. @comment ARG_MAX @item int ARG_MAX + @file{limits.h} (POSIX.1): @ref{General Limits}. +@comment asctime +@item char * asctime (const struct tm *@var{brokentime}) + +@file{time.h} (ANSI): @ref{Formatting Date and Time}. + +@comment asinh +@item double asinh (double @var{x}) + +@file{math.h} (BSD): @ref{Hyperbolic Functions}. + +@comment asin +@item double asin (double @var{x}) + +@file{math.h} (ANSI): @ref{Inverse Trig Functions}. + +@comment asprintf +@item int asprintf (char **@var{ptr}, const char *@var{template}, @dots{}) + +@file{stdio.h} (GNU): @ref{Dynamic Output}. + +@comment assert +@item void assert (int @var{expression}) + +@file{assert.h} (ANSI): @ref{Consistency Checking}. + +@comment atan2 +@item double atan2 (double @var{y}, double @var{x}) + +@file{math.h} (ANSI): @ref{Inverse Trig Functions}. + +@comment atanh +@item double atanh (double @var{x}) + +@file{math.h} (BSD): @ref{Hyperbolic Functions}. + +@comment atan +@item double atan (double @var{x}) + +@file{math.h} (ANSI): @ref{Inverse Trig Functions}. + +@comment atexit +@item int atexit (void (*@var{function}) (void)) + +@file{stdlib.h} (ANSI): @ref{Cleanups on Exit}. + +@comment atof +@item double atof (const char *@var{string}) + +@file{stdlib.h} (ANSI): @ref{Parsing of Floats}. + +@comment atoi +@item int atoi (const char *@var{string}) + +@file{stdlib.h} (ANSI): @ref{Parsing of Integers}. + +@comment atol +@item long int atol (const char *@var{string}) + +@file{stdlib.h} (ANSI): @ref{Parsing of Integers}. + @comment B0 @item B0 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B110 @item B110 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B1200 @item B1200 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B134 @item B134 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B150 @item B150 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B1800 @item B1800 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B19200 @item B19200 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B200 @item B200 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B2400 @item B2400 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B300 @item B300 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B38400 @item B38400 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B4800 @item B4800 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B50 @item B50 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B600 @item B600 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B75 @item B75 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment B9600 @item B9600 + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment BC_BASE_MAX @item int BC_BASE_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. @comment BC_DIM_MAX @item int BC_DIM_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. @comment BC_DIM_MAX @item int BC_DIM_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. +@comment bcmp +@item int bcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size}) + +@file{string.h} (BSD): @ref{String/Array Comparison,}. + +@comment bcopy +@item void * bcopy (void *@var{from}, const void *@var{to}, size_t @var{size}) + +@file{string.h} (BSD): @ref{Copying and Concatenation,}. + @comment BC_SCALE_MAX @item int BC_SCALE_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. @comment BC_STRING_MAX @item int BC_STRING_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. +@comment bind +@item int bind (int @var{socket}, struct sockaddr *@var{addr}, size_t @var{length}) + +@file{sys/socket.h} (BSD): @ref{Setting Address}. + @comment BRKINT @item BRKINT + @file{termios.h} (POSIX.1): @ref{Input Modes}. +@comment _BSD_SOURCE +@item _BSD_SOURCE + +(GNU): @ref{Feature Test Macros,}. + +@comment bsearch +@item void * bsearch (const void *@var{key}, const void *@var{array}, size_t @var{count}, size_t @var{size}, comparison_fn_t @var{compare}) + +@file{stdlib.h} (ANSI): @ref{Array Search Function,}. + @comment BUFSIZ @item int BUFSIZ + @file{stdio.h} (ANSI): @ref{Controlling Buffering}. +@comment bzero +@item void * bzero (void *@var{block}, size_t @var{size}) + +@file{string.h} (BSD): @ref{Copying and Concatenation,}. + +@comment cabs +@item double cabs (struct @{ double real, imag; @} @var{z}) + +@file{math.h} (BSD): @ref{Absolute Value}. + +@comment calloc +@item void * calloc (size_t @var{count}, size_t @var{eltsize}) + +@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Allocating Cleared Space}. + +@comment cbrt +@item double cbrt (double @var{x}) + +@file{math.h} (BSD): @ref{Exponents and Logarithms}. + +@comment cc_t +@item cc_t + +@file{termios.h} (POSIX.1): @ref{Mode Data Types}. + @comment CCTS_OFLOW @item CCTS_OFLOW + @file{termios.h} (BSD): @ref{Control Modes}. +@comment ceil +@item double ceil (double @var{x}) + +@file{math.h} (ANSI): @ref{Rounding and Remainders}. + +@comment cfgetispeed +@item speed_t cfgetispeed (const struct termios *@var{termios_p}) + +@file{termios.h} (POSIX.1): @ref{Line Speed}. + +@comment cfgetospeed +@item speed_t cfgetospeed (const struct termios *@var{termios_p}) + +@file{termios.h} (POSIX.1): @ref{Line Speed}. + +@comment cfmakeraw +@item int cfmakeraw (struct termios *@var{termios_p}) + +@file{termios.h} (BSD): @ref{Line Speed}. + +@comment cfree +@item void cfree (void *@var{ptr}) + +@file{stdlib.h} (Sun): @ref{Freeing after Malloc}. + +@comment cfsetispeed +@item int cfsetispeed (struct termios *@var{termios_p}, speed_t @var{speed}) + +@file{termios.h} (POSIX.1): @ref{Line Speed}. + +@comment cfsetospeed +@item int cfsetospeed (struct termios *@var{termios_p}, speed_t @var{speed}) + +@file{termios.h} (POSIX.1): @ref{Line Speed}. + +@comment cfsetspeed +@item int cfsetspeed (struct termios *@var{termios_p}, speed_t @var{speed}) + +@file{termios.h} (BSD): @ref{Line Speed}. + @comment CHAR_BIT @item CHAR_BIT + @file{limits.h} (ANSI): @ref{Width of Type}. @comment CHAR_MAX @item CHAR_MAX + @file{limits.h} (ANSI): @ref{Range of Type}. @comment CHAR_MIN @item CHAR_MIN + @file{limits.h} (ANSI): @ref{Range of Type}. +@comment chdir +@item int chdir (const char *@var{filename}) + +@file{unistd.h} (POSIX.1): @ref{Working Directory}. + @comment CHILD_MAX @item int CHILD_MAX + @file{limits.h} (POSIX.1): @ref{General Limits}. +@comment chmod +@item int chmod (const char *@var{filename}, mode_t @var{mode}) + +@file{sys/stat.h} (POSIX.1): @ref{Setting Permissions}. + +@comment chown +@item int chown (const char *@var{filename}, uid_t @var{owner}, gid_t @var{group}) + +@file{unistd.h} (POSIX.1): @ref{File Owner}. + +@comment clearerr +@item void clearerr (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{EOF and Errors}. + @comment CLK_TCK @item int CLK_TCK + @file{time.h} (POSIX.1): @ref{Basic CPU Time}. @comment CLOCAL @item CLOCAL + @file{termios.h} (POSIX.1): @ref{Control Modes}. +@comment clock +@item clock_t clock (void) + +@file{time.h} (ANSI): @ref{Basic CPU Time}. + @comment CLOCKS_PER_SEC @item int CLOCKS_PER_SEC + +@file{time.h} (ANSI): @ref{Basic CPU Time}. + +@comment clock_t +@item clock_t + @file{time.h} (ANSI): @ref{Basic CPU Time}. +@comment closedir +@item int closedir (DIR *@var{dirstream}) + +@file{dirent.h} (POSIX.1): @ref{Reading/Closing Directory}. + +@comment close +@item int close (int @var{filedes}) + +@file{unistd.h} (POSIX.1): @ref{Opening and Closing Files}. + @comment COLL_WEIGHTS_MAX @item int COLL_WEIGHTS_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. +@comment confstr +@item size_t confstr (int @var{parameter}, char *@var{buf}, size_t @var{len}) + +@file{unistd.h} (POSIX.2): @ref{String Parameters}. + +@comment connect +@item int connect (int @var{socket}, struct sockaddr *@var{addr}, size_t @var{length}) + +@file{sys/socket.h} (BSD): @ref{Connecting}. + +@comment cookie_close_function +@item cookie_close_function + +@file{stdio.h} (GNU): @ref{Hook Functions}. + +@comment cookie_read_function +@item cookie_read_function + +@file{stdio.h} (GNU): @ref{Hook Functions}. + +@comment cookie_seek_function +@item cookie_seek_function + +@file{stdio.h} (GNU): @ref{Hook Functions}. + +@comment cookie_write_function +@item cookie_write_function + +@file{stdio.h} (GNU): @ref{Hook Functions}. + +@comment copysign +@item double copysign (double @var{value}, double @var{sign}) + +@file{math.h} (BSD): @ref{Normalization Functions}. + +@comment cosh +@item double cosh (double @var{x}) + +@file{math.h} (ANSI): @ref{Hyperbolic Functions}. + +@comment cos +@item double cos (double @var{x}) + +@file{math.h} (ANSI): @ref{Trig Functions}. + @comment CREAD @item CREAD + @file{termios.h} (POSIX.1): @ref{Control Modes}. +@comment creat +@item int creat (const char *@var{filename}, mode_t @var{mode}) + +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. + @comment CRTS_IFLOW @item CRTS_IFLOW + @file{termios.h} (BSD): @ref{Control Modes}. @comment CS5 @item CS5 + @file{termios.h} (POSIX.1): @ref{Control Modes}. @comment CS6 @item CS6 + @file{termios.h} (POSIX.1): @ref{Control Modes}. @comment CS7 @item CS7 + @file{termios.h} (POSIX.1): @ref{Control Modes}. @comment CS8 @item CS8 + @file{termios.h} (POSIX.1): @ref{Control Modes}. @comment CSIZE @item CSIZE + @file{termios.h} (POSIX.1): @ref{Control Modes}. +@comment _CS_PATH +@item _CS_PATH + +@file{unistd.h} (POSIX.2): @ref{String Parameters}. + @comment CSTOPB @item CSTOPB + @file{termios.h} (POSIX.1): @ref{Control Modes}. +@comment ctermid +@item char * ctermid (char *@var{string}) + +@file{stdio.h} (POSIX.1): @ref{Identifying the Terminal,}. + +@comment ctime +@item char * ctime (const time_t *@var{time}) + +@file{time.h} (ANSI): @ref{Formatting Date and Time}. + +@comment cuserid +@item char * cuserid (char *@var{string}) + +@file{stdio.h} (POSIX.1): @ref{Who Logged In}. + +@comment daylight +@item int daylight + +@file{time.h} (SVID): @ref{Time Zone Functions}. + @comment DBL_DIG @item DBL_DIG + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment DBL_EPSILON @item DBL_EPSILON + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment DBL_MANT_DIG @item DBL_MANT_DIG -@file{float.h} (ANSI): @ref{Floating Point Parameters}. -@comment DBL_MAX -@item DBL_MAX @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment DBL_MAX_10_EXP @item DBL_MAX_10_EXP + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment DBL_MAX_EXP @item DBL_MAX_EXP + @file{float.h} (ANSI): @ref{Floating Point Parameters}. -@comment DBL_MIN -@item DBL_MIN +@comment DBL_MAX +@item DBL_MAX + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment DBL_MIN_10_EXP @item DBL_MIN_10_EXP + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment DBL_MIN_EXP @item DBL_MIN_EXP + +@file{float.h} (ANSI): @ref{Floating Point Parameters}. + +@comment DBL_MIN +@item DBL_MIN + @file{float.h} (ANSI): @ref{Floating Point Parameters}. +@comment dev_t +@item dev_t + +@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. + +@comment difftime +@item double difftime (time_t @var{time1}, time_t @var{time0}) + +@file{time.h} (ANSI): @ref{Simple Calendar Time}. + @comment DIR @item DIR + @file{dirent.h} (POSIX.1): @ref{Opening a Directory}. +@comment div +@item div_t div (int @var{numerator}, int @var{denominator}) + +@file{stdlib.h} (ANSI): @ref{Integer Division}. + +@comment div_t +@item div_t + +@file{stdlib.h} (ANSI): @ref{Integer Division}. + @c DO NOT EDIT THIS FILE! +@comment drem +@item double drem (double @var{numerator}, double @var{denominator}) + +@file{math.h} (BSD): @ref{Rounding and Remainders}. + +@comment dup2 +@item int dup2 (int @var{old}, int @var{new}) + +@file{unistd.h} (POSIX.1): @ref{Duplicating Descriptors}. + +@comment dup +@item int dup (int @var{old}) + +@file{unistd.h} (POSIX.1): @ref{Duplicating Descriptors}. + @comment E2BIG @item int E2BIG + @file{errno.h} (POSIX.1: Argument list too long): @ref{Error Codes,}. @comment EACCES @item int EACCES + @file{errno.h} (POSIX.1: Permission denied): @ref{Error Codes,}. @comment EADDRINUSE @item int EADDRINUSE + @file{errno.h} (BSD: Address already in use): @ref{Error Codes,}. @comment EADDRNOTAVAIL @item int EADDRNOTAVAIL + @file{errno.h} (BSD: Can't assign requested address): @ref{Error Codes,}. @comment EAFNOSUPPORT @item int EAFNOSUPPORT + @file{errno.h} (BSD: Address family not supported by protocol family): @ref{Error Codes,}. @comment EAGAIN @item int EAGAIN + @file{errno.h} (POSIX.1: Resource temporarily unavailable): @ref{Error Codes,}. @comment EALREADY @item int EALREADY + @file{errno.h} (BSD: Operation already in progress): @ref{Error Codes,}. +@comment EBACKGROUND +@item int EBACKGROUND + +@file{errno.h} (GNU: Inappropriate operation for background process): @ref{Error Codes,}. + @comment EBADF @item int EBADF + @file{errno.h} (POSIX.1: Bad file descriptor): @ref{Error Codes,}. @comment EBUSY @item int EBUSY + @file{errno.h} (POSIX.1: Device busy): @ref{Error Codes,}. @comment ECHILD @item int ECHILD -@file{errno.h} (POSIX.1: No child processes): @ref{Error Codes,}. -@comment ECHO -@item ECHO -@file{termios.h} (POSIX.1): @ref{Local Modes}. +@file{errno.h} (POSIX.1: No child processes): @ref{Error Codes,}. @comment ECHOCTL @item ECHOCTL + @file{termios.h} (BSD): @ref{Local Modes}. @comment ECHOE @item ECHOE + @file{termios.h} (POSIX.1): @ref{Local Modes}. -@comment ECHOK -@item ECHOK +@comment ECHO +@item ECHO + @file{termios.h} (POSIX.1): @ref{Local Modes}. @comment ECHOKE @item ECHOKE + @file{termios.h} (BSD): @ref{Local Modes}. +@comment ECHOK +@item ECHOK + +@file{termios.h} (POSIX.1): @ref{Local Modes}. + @comment ECHONL @item ECHONL + @file{termios.h} (POSIX.1): @ref{Local Modes}. @comment ECHOPRT @item ECHOPRT + @file{termios.h} (BSD): @ref{Local Modes}. @comment ECONNABORTED @item int ECONNABORTED + @file{errno.h} (BSD: Software caused connection abort): @ref{Error Codes,}. @comment ECONNREFUSED @item int ECONNREFUSED + @file{errno.h} (BSD: Connection refused): @ref{Error Codes,}. @comment ECONNRESET @item int ECONNRESET -@file{errno.h} (BSD: Connection reset by peer): @ref{Error Codes,}. -@comment ED -@item int ED -@file{errno.h} (GNU: ?): @ref{Error Codes,}. +@file{errno.h} (BSD: Connection reset by peer): @ref{Error Codes,}. @comment EDEADLK @item int EDEADLK + @file{errno.h} (POSIX.1: Resource deadlock avoided): @ref{Error Codes,}. @comment EDESTADDRREQ @item int EDESTADDRREQ + @file{errno.h} (BSD: Destination address required): @ref{Error Codes,}. +@comment ED +@item int ED + +@file{errno.h} (GNU: ?): @ref{Error Codes,}. + @comment EDOM @item int EDOM + @file{errno.h} (ANSI: Numerical argument out of domain): @ref{Error Codes,}. @comment EDQUOT @item int EDQUOT + @file{errno.h} (BSD: Disc quota exceeded): @ref{Error Codes,}. @comment EEXIST @item int EEXIST + @file{errno.h} (POSIX.1: File exists): @ref{Error Codes,}. @comment EFAULT @item int EFAULT + @file{errno.h} (POSIX.1: Bad address): @ref{Error Codes,}. @comment EFBIG @item int EFBIG + @file{errno.h} (POSIX.1: File too large): @ref{Error Codes,}. @comment EGRATUITOUS @item int EGRATUITOUS + @file{errno.h} (GNU: Gratuitous error): @ref{Error Codes,}. +@comment EGREGIOUS +@item int EGREGIOUS + +@file{errno.h} (GNU: You really blew it this time): @ref{Error Codes,}. + @comment EHOSTDOWN @item int EHOSTDOWN + @file{errno.h} (BSD: Host is down): @ref{Error Codes,}. @comment EHOSTUNREACH @item int EHOSTUNREACH + @file{errno.h} (BSD: No route to host): @ref{Error Codes,}. +@comment EIEIO +@item int EIEIO + +@file{errno.h} (GNU: Computer bought the farm): @ref{Error Codes,}. + @comment EINPROGRESS @item int EINPROGRESS + @file{errno.h} (BSD: Operation now in progress): @ref{Error Codes,}. @comment EINTR @item int EINTR + @file{errno.h} (POSIX.1: Interrupted system call): @ref{Error Codes,}. @comment EINVAL @item int EINVAL + @file{errno.h} (POSIX.1: Invalid argument): @ref{Error Codes,}. @comment EIO @item int EIO + @file{errno.h} (POSIX.1: Input/output error): @ref{Error Codes,}. @comment EISCONN @item int EISCONN + @file{errno.h} (BSD: Socket is already connected): @ref{Error Codes,}. @comment EISDIR @item int EISDIR + @file{errno.h} (POSIX.1: Is a directory): @ref{Error Codes,}. @comment ELOOP @item int ELOOP + @file{errno.h} (BSD: Too many levels of symbolic links): @ref{Error Codes,}. @comment EMFILE @item int EMFILE + @file{errno.h} (POSIX.1: Too many open files): @ref{Error Codes,}. @comment EMLINK @item int EMLINK + @file{errno.h} (POSIX.1: Too many links): @ref{Error Codes,}. @comment EMSGSIZE @item int EMSGSIZE + @file{errno.h} (BSD: Message too long): @ref{Error Codes,}. @comment ENAMETOOLONG @item int ENAMETOOLONG + @file{errno.h} (POSIX.1: File name too long): @ref{Error Codes,}. +@comment endgrent +@item void endgrent (void) + +@file{grp.h} (SVID, BSD): @ref{Scanning All Groups}. + +@comment endhostent +@item void endhostent () + +@file{netdb.h} (BSD): @ref{Host Names}. + +@comment endnetent +@item void endnetent (void) + +@file{netdb.h} (BSD): @ref{Networks Database}. + +@comment endprotoent +@item void endprotoent (void) + +@file{netdb.h} (BSD): @ref{Protocols Database}. + +@comment endpwent +@item void endpwent (void) + +@file{pwd.h} (SVID, BSD): @ref{Scanning All Users}. + +@comment endservent +@item void endservent (void) + +@file{netdb.h} (BSD): @ref{Services Database}. + @comment ENETDOWN @item int ENETDOWN + @file{errno.h} (BSD: Network is down): @ref{Error Codes,}. @comment ENETRESET @item int ENETRESET + @file{errno.h} (BSD: Network dropped connection on reset): @ref{Error Codes,}. @comment ENETUNREACH @item int ENETUNREACH + @file{errno.h} (BSD: Network is unreachable): @ref{Error Codes,}. @comment ENFILE @item int ENFILE + @file{errno.h} (POSIX.1: Too many open files in system): @ref{Error Codes,}. @comment ENOBUFS @item int ENOBUFS + @file{errno.h} (BSD: No buffer space available): @ref{Error Codes,}. @comment ENODEV @item int ENODEV + @file{errno.h} (POSIX.1: Operation not supported by device): @ref{Error Codes,}. @comment ENOENT @item int ENOENT + @file{errno.h} (POSIX.1: No such file or directory): @ref{Error Codes,}. @comment ENOEXEC @item int ENOEXEC + @file{errno.h} (POSIX.1: Exec format error): @ref{Error Codes,}. @comment ENOLCK @item int ENOLCK + @file{errno.h} (POSIX.1: No locks available): @ref{Error Codes,}. @comment ENOMEM @item int ENOMEM + @file{errno.h} (POSIX.1: Cannot allocate memory): @ref{Error Codes,}. @comment ENOPROTOOPT @item int ENOPROTOOPT + @file{errno.h} (BSD: Protocol not available): @ref{Error Codes,}. @comment ENOSPC @item int ENOSPC + @file{errno.h} (POSIX.1: No space left on device): @ref{Error Codes,}. @comment ENOSYS @item int ENOSYS + @file{errno.h} (POSIX.1: Function not implemented): @ref{Error Codes,}. @comment ENOTBLK @item int ENOTBLK + @file{errno.h} (BSD: Block device required): @ref{Error Codes,}. @comment ENOTCONN @item int ENOTCONN + @file{errno.h} (BSD: Socket is not connected): @ref{Error Codes,}. @comment ENOTDIR @item int ENOTDIR + @file{errno.h} (POSIX.1: Not a directory): @ref{Error Codes,}. @comment ENOTEMPTY @item int ENOTEMPTY + @file{errno.h} (POSIX.1: Directory not empty): @ref{Error Codes,}. @comment ENOTSOCK @item int ENOTSOCK + @file{errno.h} (BSD: Socket operation on non-socket): @ref{Error Codes,}. @comment ENOTTY @item int ENOTTY + @file{errno.h} (POSIX.1: Inappropriate ioctl for device): @ref{Error Codes,}. +@comment environ +@item char ** environ + +@file{unistd.h} (POSIX.1): @ref{Environment Access}. + @comment ENXIO @item int ENXIO + @file{errno.h} (POSIX.1: Device not configured): @ref{Error Codes,}. @comment EOF @item int EOF + @file{stdio.h} (ANSI): @ref{EOF and Errors}. @comment EOPNOTSUPP @item int EOPNOTSUPP + @file{errno.h} (BSD: Operation not supported): @ref{Error Codes,}. @comment EPERM @item int EPERM + @file{errno.h} (POSIX.1: Operation not permitted): @ref{Error Codes,}. @comment EPFNOSUPPORT @item int EPFNOSUPPORT + @file{errno.h} (BSD: Protocol family not supported): @ref{Error Codes,}. @comment EPIPE @item int EPIPE + @file{errno.h} (POSIX.1: Broken pipe): @ref{Error Codes,}. @comment EPROTONOSUPPORT @item int EPROTONOSUPPORT + @file{errno.h} (BSD: Protocol not supported): @ref{Error Codes,}. @comment EPROTOTYPE @item int EPROTOTYPE + @file{errno.h} (BSD: Protocol wrong type for socket): @ref{Error Codes,}. +@comment EQUIV_CLASS_MAX +@item int EQUIV_CLASS_MAX + +@file{limits.h} (POSIX.2): @ref{Utility Limits}. + @comment ERANGE @item int ERANGE + @file{errno.h} (ANSI: Numerical result out of range): @ref{Error Codes,}. @comment EREMOTE @item int EREMOTE + @file{errno.h} (BSD: Too many levels of remote in path): @ref{Error Codes,}. @comment EROFS @item int EROFS + @file{errno.h} (POSIX.1: Read-only file system): @ref{Error Codes,}. +@comment errno +@item volatile int errno + +@file{errno.h} (ANSI): @ref{Checking for Errors,}. + @comment ESHUTDOWN @item int ESHUTDOWN + @file{errno.h} (BSD: Can't send after socket shutdown): @ref{Error Codes,}. @comment ESOCKTNOSUPPORT @item int ESOCKTNOSUPPORT + @file{errno.h} (BSD: Socket type not supported): @ref{Error Codes,}. @comment ESPIPE @item int ESPIPE + @file{errno.h} (POSIX.1: Illegal seek): @ref{Error Codes,}. @comment ESRCH @item int ESRCH + @file{errno.h} (POSIX.1: No such process): @ref{Error Codes,}. @comment ESTALE @item int ESTALE + @file{errno.h} (BSD: Stale NFS file handle): @ref{Error Codes,}. @comment ETIMEDOUT @item int ETIMEDOUT + @file{errno.h} (BSD: Connection timed out): @ref{Error Codes,}. @comment ETXTBSY @item int ETXTBSY + @file{errno.h} (BSD: Text file busy): @ref{Error Codes,}. @comment EUSERS @item int EUSERS + @file{errno.h} (BSD: Too many users): @ref{Error Codes,}. @comment EWOULDBLOCK @item int EWOULDBLOCK + @file{errno.h} (BSD: Operation would block): @ref{Error Codes,}. @comment EXDEV @item int EXDEV + @file{errno.h} (POSIX.1: Invalid cross-device link): @ref{Error Codes,}. +@comment execle +@item int execle (const char *@var{filename}, const char *@var{arg0}, char *const @var{env}@t{[]}, @dots{}) + +@file{unistd.h} (POSIX.1): @ref{Executing a File}. + +@comment execl +@item int execl (const char *@var{filename}, const char *@var{arg0}, @dots{}) + +@file{unistd.h} (POSIX.1): @ref{Executing a File}. + +@comment execlp +@item int execlp (const char *@var{filename}, const char *@var{arg0}, @dots{}) + +@file{unistd.h} (POSIX.1): @ref{Executing a File}. + +@comment execve +@item int execve (const char *@var{filename}, char *const @var{argv}@t{[]}, char *const @var{env}@t{[]}) + +@file{unistd.h} (POSIX.1): @ref{Executing a File}. + +@comment execv +@item int execv (const char *@var{filename}, char *const @var{argv}@t{[]}) + +@file{unistd.h} (POSIX.1): @ref{Executing a File}. + +@comment execvp +@item int execvp (const char *@var{filename}, char *const @var{argv}@t{[]}) + +@file{unistd.h} (POSIX.1): @ref{Executing a File}. + @comment EXIT_FAILURE @item int EXIT_FAILURE + @file{stdlib.h} (ANSI): @ref{Exit Status}. +@comment exit +@item void exit (int @var{status}) + +@file{stdlib.h} (ANSI): @ref{Normal Termination}. + +@comment _exit +@item void _exit (int @var{status}) + +@file{unistd.h} (POSIX.1): @ref{Termination Internals}. + @comment EXIT_SUCCESS @item int EXIT_SUCCESS + @file{stdlib.h} (ANSI): @ref{Exit Status}. +@comment exp +@item double exp (double @var{x}) + +@file{math.h} (ANSI): @ref{Exponents and Logarithms}. + +@comment expm1 +@item double expm1 (double @var{x}) + +@file{math.h} (BSD): @ref{Exponents and Logarithms}. + @comment EXPR_NEST_MAX @item int EXPR_NEST_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. +@comment fabs +@item double fabs (double @var{number}) + +@file{math.h} (ANSI): @ref{Absolute Value}. + +@comment fchmod +@item int fchmod (int @var{filedes}, int @var{mode}) + +@file{sys/stat.h} (BSD): @ref{Setting Permissions}. + +@comment fchown +@item int fchown (int @var{filedes}, int @var{owner}, int @var{group}) + +@file{unistd.h} (BSD): @ref{File Owner}. + +@comment fclean +@item int fclean (FILE *@var{stream}) + +@file{stdio.h} (GNU): @ref{Cleaning Streams}. + +@comment fclose +@item int fclose (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Closing Streams}. + +@comment fcntl +@item int fcntl (int @var{filedes}, int @var{command}, @dots{}) + +@file{fcntl.h} (POSIX.1): @ref{Control Operations}. + @comment FD_CLOEXEC @item int FD_CLOEXEC + @file{fcntl.h} (POSIX.1): @ref{Descriptor Flags}. @comment FD_CLR @item void FD_CLR (int @var{filedes}, fd_set *@var{set}) + @file{sys/types.h} (BSD): @ref{Waiting for I/O}. @comment FD_ISSET @item int FD_ISSET (int @var{filedes}, fd_set *@var{set}) + @file{sys/types.h} (BSD): @ref{Waiting for I/O}. +@comment fdopen +@item FILE * fdopen (int @var{filedes}, const char *@var{opentype}) + +@file{stdio.h} (POSIX.1): @ref{Descriptors and Streams}. + @comment FD_SET @item void FD_SET (int @var{filedes}, fd_set *@var{set}) + +@file{sys/types.h} (BSD): @ref{Waiting for I/O}. + +@comment fd_set +@item fd_set + @file{sys/types.h} (BSD): @ref{Waiting for I/O}. @comment FD_SETSIZE @item int FD_SETSIZE + @file{sys/types.h} (BSD): @ref{Waiting for I/O}. +@comment F_DUPFD +@item int F_DUPFD + +@file{fcntl.h} (POSIX.1): @ref{Duplicating Descriptors}. + @comment FD_ZERO @item void FD_ZERO (fd_set *@var{set}) + @file{sys/types.h} (BSD): @ref{Waiting for I/O}. +@comment feof +@item int feof (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{EOF and Errors}. + +@comment ferror +@item int ferror (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{EOF and Errors}. + +@comment fflush +@item int fflush (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Flushing Buffers}. + +@comment fgetc +@item int fgetc (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Character Input}. + +@comment F_GETFD +@item int F_GETFD + +@file{fcntl.h} (POSIX.1): @ref{Descriptor Flags}. + +@comment F_GETFL +@item int F_GETFL + +@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. + +@comment fgetgrent +@item struct group * fgetgrent (FILE *@var{stream}) + +@file{grp.h} (SVID): @ref{Scanning All Groups}. + +@comment F_GETLK +@item int F_GETLK + +@file{fcntl.h} (POSIX.1): @ref{File Locks}. + +@comment F_GETOWN +@item int F_GETOWN + +@file{fcntl.h} (BSD): @ref{Interrupt Input}. + +@comment fgetpos +@item int fgetpos (FILE *@var{stream}, fpos_t *@var{position}) + +@file{stdio.h} (ANSI): @ref{Portable Positioning}. + +@comment fgetpwent +@item struct passwd * fgetpwent (FILE *@var{stream}) + +@file{pwd.h} (SVID): @ref{Scanning All Users}. + +@comment fgets +@item char * fgets (char *@var{s}, int @var{count}, FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Line Input}. + @comment FILE @item FILE + @file{stdio.h} (ANSI): @ref{Streams}. @comment FILENAME_MAX @item int FILENAME_MAX + @file{stdio.h} (ANSI): @ref{Limits for Files}. +@comment fileno +@item int fileno (FILE *@var{stream}) + +@file{stdio.h} (POSIX.1): @ref{Descriptors and Streams}. + +@comment finite +@item int finite (double @var{x}) + +@file{math.h} (BSD): @ref{Predicates on Floats}. + +@comment floor +@item double floor (double @var{x}) + +@file{math.h} (ANSI): @ref{Rounding and Remainders}. + @comment FLT_DIG @item FLT_DIG + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_EPSILON @item FLT_EPSILON + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_MANT_DIG @item FLT_MANT_DIG -@file{float.h} (ANSI): @ref{Floating Point Parameters}. -@comment FLT_MAX -@item FLT_MAX @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_MAX_10_EXP @item FLT_MAX_10_EXP + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_MAX_EXP @item FLT_MAX_EXP + @file{float.h} (ANSI): @ref{Floating Point Parameters}. -@comment FLT_MIN -@item FLT_MIN +@comment FLT_MAX +@item FLT_MAX + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_MIN_10_EXP @item FLT_MIN_10_EXP + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_MIN_EXP @item FLT_MIN_EXP + +@file{float.h} (ANSI): @ref{Floating Point Parameters}. + +@comment FLT_MIN +@item FLT_MIN + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_RADIX @item FLT_RADIX + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLT_ROUNDS @item FLT_ROUNDS + @file{float.h} (ANSI): @ref{Floating Point Parameters}. @comment FLUSHO @item FLUSHO + @file{termios.h} (BSD): @ref{Local Modes}. +@comment fmemopen +@item FILE * fmemopen (void *@var{buf}, size_t @var{size}, const char *@var{opentype}) + +@file{stdio.h} (GNU): @ref{String Streams}. + +@comment fmod +@item double fmod (double @var{numerator}, double @var{denominator}) + +@file{math.h} (ANSI): @ref{Rounding and Remainders}. + +@comment fnmatch +@item int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags}) + +@file{fnmatch.h} (POSIX.2): @ref{Wildcard Matching}. + @comment FNM_CASEFOLD @item FNM_CASEFOLD + @file{fnmatch.h} (GNU): @ref{Wildcard Matching}. @comment FNM_FILE_NAME @item FNM_FILE_NAME + @file{fnmatch.h} (GNU): @ref{Wildcard Matching}. @comment FNM_LEADING_DIR @item FNM_LEADING_DIR + @file{fnmatch.h} (GNU): @ref{Wildcard Matching}. @comment FNM_NOESCAPE @item FNM_NOESCAPE + @file{fnmatch.h} (POSIX.2): @ref{Wildcard Matching}. @comment FNM_PATHNAME @item FNM_PATHNAME + @file{fnmatch.h} (POSIX.2): @ref{Wildcard Matching}. @comment FNM_PERIOD @item FNM_PERIOD + @file{fnmatch.h} (POSIX.2): @ref{Wildcard Matching}. +@comment F_OK +@item int F_OK + +@file{unistd.h} (POSIX.1): @ref{Testing File Access}. + +@comment fopencookie +@item FILE * fopencookie (void *@var{cookie}, const char *@var{opentype}, struct cookie_functions @var{io_functions}) + +@file{stdio.h} (GNU): @ref{Streams and Cookies}. + +@comment fopen +@item FILE * fopen (const char *@var{filename}, const char *@var{opentype}) + +@file{stdio.h} (ANSI): @ref{Opening Streams}. + @comment FOPEN_MAX @item int FOPEN_MAX + @file{stdio.h} (ANSI): @ref{Opening Streams}. +@comment fork +@item pid_t fork (void) + +@file{unistd.h} (POSIX.1): @ref{Creating a Process}. + +@comment fpathconf +@item long int fpathconf (int @var{filedes}, int @var{parameter}) + +@file{unistd.h} (POSIX.1): @ref{Pathconf}. + @comment FPE_DECOVF_TRAP @item FPE_DECOVF_TRAP + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_FLTDIV_FAULT @item FPE_FLTDIV_FAULT + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_FLTDIV_TRAP @item FPE_FLTDIV_TRAP + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_FLTOVF_FAULT @item FPE_FLTOVF_FAULT + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_FLTOVF_TRAP @item FPE_FLTOVF_TRAP + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_FLTUND_FAULT @item FPE_FLTUND_FAULT + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_FLTUND_TRAP @item FPE_FLTUND_TRAP + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_INTDIV_TRAP @item FPE_INTDIV_TRAP + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_INTOVF_TRAP @item FPE_INTOVF_TRAP + @file{signal.h} (BSD): @ref{Program Error Signals}. @comment FPE_SUBRNG_TRAP @item FPE_SUBRNG_TRAP + @file{signal.h} (BSD): @ref{Program Error Signals}. -@comment F_DUPFD -@item int F_DUPFD -@file{fcntl.h} (POSIX.1): @ref{Duplicating Descriptors}. +@comment fpos_t +@item fpos_t -@comment F_GETFD -@item int F_GETFD -@file{fcntl.h} (POSIX.1): @ref{Descriptor Flags}. +@file{stdio.h} (ANSI): @ref{Portable Positioning}. -@comment F_GETFL -@item int F_GETFL -@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. +@comment fprintf +@item int fprintf (FILE *@var{stream}, const char *@var{template}, @dots{}) -@comment F_GETLK -@item int F_GETLK -@file{fcntl.h} (POSIX.1): @ref{File Locks}. +@file{stdio.h} (ANSI): @ref{Formatted Output Functions}. -@comment F_GETOWN -@item int F_GETOWN -@file{fcntl.h} (BSD): @ref{Interrupt Input}. +@comment fputc +@item int fputc (int @var{c}, FILE *@var{stream}) -@comment F_OK -@item int F_OK -@file{unistd.h} (POSIX.1): @ref{Testing File Access}. +@file{stdio.h} (ANSI): @ref{Simple Output}. + +@comment fputs +@item int fputs (const char *@var{s}, FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Simple Output}. @comment F_RDLCK @item F_RDLCK + @file{fcntl.h} (POSIX.1): @ref{File Locks}. +@comment fread +@item size_t fread (void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Block Input/Output}. + +@comment __free_hook +@item __free_hook + +@file{malloc.h} (GNU): @ref{Hooks for Malloc}. + +@comment free +@item void free (void *@var{ptr}) + +@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Freeing after Malloc}. + +@comment freopen +@item FILE * freopen (const char *@var{filename}, const char *@var{opentype}, FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Opening Streams}. + +@comment frexp +@item double frexp (double @var{value}, int *@var{exponent}) + +@file{math.h} (ANSI): @ref{Normalization Functions}. + +@comment fscanf +@item int fscanf (FILE *@var{stream}, const char *@var{template}, @dots{}) + +@file{stdio.h} (ANSI): @ref{Formatted Input Functions}. + +@comment fseek +@item int fseek (FILE *@var{stream}, long int @var{offset}, int @var{whence}) + +@file{stdio.h} (ANSI): @ref{File Positioning}. + @comment F_SETFD @item int F_SETFD + @file{fcntl.h} (POSIX.1): @ref{Descriptor Flags}. @comment F_SETFL @item int F_SETFL + @file{fcntl.h} (POSIX.1): @ref{File Status Flags}. @comment F_SETLK @item int F_SETLK + @file{fcntl.h} (POSIX.1): @ref{File Locks}. @comment F_SETLKW @item int F_SETLKW + @file{fcntl.h} (POSIX.1): @ref{File Locks}. @comment F_SETOWN @item int F_SETOWN + @file{fcntl.h} (BSD): @ref{Interrupt Input}. +@comment fsetpos +@item int fsetpos (FILE *@var{stream}, const fpos_t @var{position}) + +@file{stdio.h} (ANSI): @ref{Portable Positioning}. + +@comment fstat +@item int fstat (int @var{filedes}, struct stat *@var{buf}) + +@file{sys/stat.h} (POSIX.1): @ref{Reading Attributes}. + +@comment ftell +@item long int ftell (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{File Positioning}. + @comment F_UNLCK @item F_UNLCK + @file{fcntl.h} (POSIX.1): @ref{File Locks}. +@comment fwrite +@item size_t fwrite (const void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Block Input/Output}. + @comment F_WRLCK @item F_WRLCK + @file{fcntl.h} (POSIX.1): @ref{File Locks}. +@comment getchar +@item int getchar (void) + +@file{stdio.h} (ANSI): @ref{Character Input}. + +@comment getc +@item int getc (FILE *@var{stream}) + +@file{stdio.h} (ANSI): @ref{Character Input}. + +@comment getcwd +@item char * getcwd (char *@var{buffer}, size_t @var{size}) + +@file{unistd.h} (POSIX.1): @ref{Working Directory}. + +@comment getdelim +@item ssize_t getdelim (char **@var{lineptr}, size_t *@var{n}, int @var{delimiter}, FILE *@var{stream}) + +@file{stdio.h} (GNU): @ref{Line Input}. + +@comment getegid +@item gid_t getegid (void) + +@file{unistd.h} (POSIX.1): @ref{Reading Persona}. + +@comment getenv +@item char * getenv (const char *@var{name}) + +@file{stdlib.h} (ANSI): @ref{Environment Access}. + +@comment geteuid +@item uid_t geteuid (void) + +@file{unistd.h} (POSIX.1): @ref{Reading Persona}. + +@comment getgid +@item gid_t getgid (void) + +@file{unistd.h} (POSIX.1): @ref{Reading Persona}. + +@comment getgrent +@item struct group * getgrent (void) + +@file{grp.h} (SVID, BSD): @ref{Scanning All Groups}. + +@comment getgrgid +@item struct group * getgrgid (gid_t @var{gid}) + +@file{grp.h} (POSIX.1): @ref{Lookup Group}. + +@comment getgrnam +@item struct group * getgrnam (const char *@var{name}) + +@file{grp.h} (SVID, BSD): @ref{Lookup Group}. + +@comment getgroups +@item int getgroups (int @var{count}, gid_t *@var{groups}) + +@file{unistd.h} (POSIX.1): @ref{Reading Persona}. + +@comment gethostbyaddr +@item struct hostent * gethostbyaddr (const char *@var{addr}, int @var{length}, int @var{format}) + +@file{netdb.h} (BSD): @ref{Host Names}. + +@comment gethostbyname +@item struct hostent * gethostbyname (const char *@var{name}) + +@file{netdb.h} (BSD): @ref{Host Names}. + +@comment gethostent +@item struct hostent * gethostent () + +@file{netdb.h} (BSD): @ref{Host Names}. + +@comment gethostid +@item long int gethostid (void) + +@file{unistd.h} (BSD): @ref{Host Identification}. + +@comment gethostname +@item int gethostname (char *@var{name}, size_t @var{size}) + +@file{unistd.h} (BSD): @ref{Host Identification}. + +@comment getitimer +@item int getitimer (int @var{which}, struct itimerval *@var{old}) + +@file{sys/time.h} (BSD): @ref{Setting an Alarm}. + +@comment getline +@item ssize_t getline (char **@var{lineptr}, size_t *@var{n}, FILE *@var{stream}) + +@file{stdio.h} (GNU): @ref{Line Input}. + +@comment getlogin +@item char * getlogin (void) + +@file{unistd.h} (POSIX.1): @ref{Who Logged In}. + +@comment getnetbyaddr +@item struct netent * getnetbyaddr (long @var{net}, int @var{type}) + +@file{netdb.h} (BSD): @ref{Networks Database}. + +@comment getnetbyname +@item struct netent * getnetbyname (const char *@var{name}) + +@file{netdb.h} (BSD): @ref{Networks Database}. + +@comment getnetent +@item struct netent * getnetent (void) + +@file{netdb.h} (BSD): @ref{Networks Database}. + +@comment getopt +@item int getopt (int @var{argc}, char **@var{argv}, const char *@var{options}) + +@file{unistd.h} (POSIX.2): @ref{Parsing Options}. + +@comment getopt_long +@item int getopt_long (int @var{argc}, char **@var{argv}, const char *@var{shortopts}, struct option *@var{longopts}, int *@var{indexptr}) + +@file{getopt.h} (GNU): @ref{Long Options}. + +@comment getpeername +@item int getpeername (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) + +@file{sys/socket.h} (BSD): @ref{Who is Connected}. + +@comment getpgrp +@item pid_t getpgrp (pid_t @var{pid}) + +@file{unistd.h} (BSD): @ref{Process Group Functions,}. + +@comment getpgrp +@item pid_t getpgrp (void) + +@file{unistd.h} (POSIX.1): @ref{Process Group Functions,}. + +@comment getpid +@item pid_t getpid (void) + +@file{unistd.h} (POSIX.1): @ref{Process Identification}. + +@comment getppid +@item pid_t getppid (void) + +@file{unistd.h} (POSIX.1): @ref{Process Identification}. + +@comment getpriority +@item int getpriority (int @var{class}, int @var{id}) + +@file{sys/resource.h} (BSD): @ref{Priority}. + +@comment getprotobyname +@item struct protoent * getprotobyname (const char *@var{name}) + +@file{netdb.h} (BSD): @ref{Protocols Database}. + +@comment getprotobynumber +@item struct protoent * getprotobynumber (int @var{protocol}) + +@file{netdb.h} (BSD): @ref{Protocols Database}. + +@comment getprotoent +@item struct protoent * getprotoent (void) + +@file{netdb.h} (BSD): @ref{Protocols Database}. + +@comment getpwent +@item struct passwd * getpwent (void) + +@file{pwd.h} (POSIX.1): @ref{Scanning All Users}. + +@comment getpwnam +@item struct passwd * getpwnam (const char *@var{name}) + +@file{pwd.h} (POSIX.1): @ref{Lookup User}. + +@comment getpwuid +@item struct passwd * getpwuid (uid_t @var{uid}) + +@file{pwd.h} (POSIX.1): @ref{Lookup User}. + +@comment getrlimit +@item int getrlimit (int @var{resource}, struct rlimit *@var{rlp}) + +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. + +@comment getrusage +@item int getrusage (int @var{processes}, struct rusage *@var{rusage}) + +@file{sys/resource.h} (BSD): @ref{Resource Usage}. + +@comment getservbyname +@item struct servent * getservbyname (const char *@var{name}, const char *@var{proto}) + +@file{netdb.h} (BSD): @ref{Services Database}. + +@comment getservbyport +@item struct servent * getservbyport (int @var{port}, const char *@var{proto}) + +@file{netdb.h} (BSD): @ref{Services Database}. + +@comment getservent +@item struct servent * getservent (void) + +@file{netdb.h} (BSD): @ref{Services Database}. + +@comment gets +@item char * gets (char *@var{s}) + +@file{stdio.h} (ANSI): @ref{Line Input}. + +@comment getsockname +@item int getsockname (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) + +@file{sys/socket.h} (BSD): @ref{Reading Address}. + +@comment getsockopt +@item int getsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, size_t *@var{optlen_ptr}) + +@file{sys/socket.h} (BSD): @ref{Socket Option Functions}. + +@comment gettimeofday +@item int gettimeofday (struct timeval *@var{tp}, struct timezone *@var{tzp}) + +@file{sys/time.h} (BSD): @ref{High-Resolution Calendar}. + +@comment getuid +@item uid_t getuid (void) + +@file{unistd.h} (POSIX.1): @ref{Reading Persona}. + +@comment getumask +@item mode_t getumask (void) + +@file{sys/stat.h} (GNU): @ref{Setting Permissions}. + +@comment getwd +@item char * getwd (char *@var{buffer}) + +@file{unistd.h} (BSD): @ref{Working Directory}. + +@comment getw +@item int getw (FILE *@var{stream}) + +@file{stdio.h} (SVID): @ref{Character Input}. + +@comment gid_t +@item gid_t + +@file{sys/types.h} (POSIX.1): @ref{Reading Persona}. + @comment GLOB_ABORTED @item GLOB_ABORTED + @file{glob.h} (POSIX.2): @ref{Calling Glob}. @comment GLOB_APPEND @item GLOB_APPEND + @file{glob.h} (POSIX.2): @ref{Flags for Globbing}. @comment GLOB_DOOFFS @item GLOB_DOOFFS + @file{glob.h} (POSIX.2): @ref{Flags for Globbing}. @comment GLOB_ERR @item GLOB_ERR + @file{glob.h} (POSIX.2): @ref{Flags for Globbing}. +@comment glob +@item int glob (const char *@var{pattern}, int @var{flags}, int (*@var{errfunc}) (const char *@var{filename}, int @var{error-code}), glob_t *@var{vector_ptr}) + +@file{glob.h} (POSIX.2): @ref{Calling Glob}. + @comment GLOB_MARK @item GLOB_MARK + @file{glob.h} (POSIX.2): @ref{Flags for Globbing}. @comment GLOB_NOCHECK @item GLOB_NOCHECK + @file{glob.h} (POSIX.2): @ref{Flags for Globbing}. @comment GLOB_NOESCAPE @item GLOB_NOESCAPE + @file{glob.h} (POSIX.2): @ref{Flags for Globbing}. @comment GLOB_NOMATCH @item GLOB_NOMATCH + @file{glob.h} (POSIX.2): @ref{Calling Glob}. @comment GLOB_NOSORT @item GLOB_NOSORT + @file{glob.h} (POSIX.2): @ref{Flags for Globbing}. @comment GLOB_NOSPACE @item GLOB_NOSPACE + +@file{glob.h} (POSIX.2): @ref{Calling Glob}. + +@comment glob_t +@item glob_t + @file{glob.h} (POSIX.2): @ref{Calling Glob}. +@comment gmtime +@item struct tm * gmtime (const time_t *@var{time}) + +@file{time.h} (ANSI): @ref{Broken-down Time}. + +@comment _GNU_SOURCE +@item _GNU_SOURCE + +(GNU): @ref{Feature Test Macros,}. + +@comment gsignal +@item int gsignal (int @var{signum}) + +@file{signal.h} (SVID): @ref{Signaling Yourself}. + @comment HOST_NOT_FOUND @item HOST_NOT_FOUND + @file{netdb.h} (BSD): @ref{Host Names}. +@comment htonl +@item unsigned long int htonl (unsigned long int @var{hostlong}) + +@file{netinet/in.h} (BSD): @ref{Byte Order}. + +@comment htons +@item unsigned short int htons (unsigned short int @var{hostshort}) + +@file{netinet/in.h} (BSD): @ref{Byte Order}. + @comment HUGE_VAL @item double HUGE_VAL + @file{math.h} (ANSI): @ref{Domain and Range Errors}. @comment HUPCL @item HUPCL + @file{termios.h} (POSIX.1): @ref{Control Modes}. +@comment hypot +@item double hypot (double @var{x}, double @var{y}) + +@file{math.h} (BSD): @ref{Exponents and Logarithms}. + @comment ICANON @item ICANON + @file{termios.h} (POSIX.1): @ref{Local Modes}. @comment ICRNL @item ICRNL + @file{termios.h} (POSIX.1): @ref{Input Modes}. @comment IEXTEN @item IEXTEN + @file{termios.h} (POSIX.1): @ref{Local Modes}. @comment IGNBRK @item IGNBRK + @file{termios.h} (POSIX.1): @ref{Input Modes}. @comment IGNCR @item IGNCR + @file{termios.h} (POSIX.1): @ref{Input Modes}. @comment IGNPAR @item IGNPAR + @file{termios.h} (POSIX.1): @ref{Input Modes}. @comment IMAXBEL @item IMAXBEL + @file{termios.h} (BSD): @ref{Input Modes}. @comment INADDR_ANY @item unsigned long int INADDR_ANY + +@file{netinet/in.h} (BSD): @ref{Host Address Data Type}. + +@comment INADDR_BROADCAST +@item unsigned long int INADDR_BROADCAST + +@file{netinet/in.h} (BSD): @ref{Host Address Data Type}. + +@comment INADDR_LOOPBACK +@item unsigned long int INADDR_LOOPBACK + @file{netinet/in.h} (BSD): @ref{Host Address Data Type}. +@comment INADDR_NONE +@item unsigned long int INADDR_NONE + +@file{netinet/in.h} (BSD): @ref{Host Address Data Type}. + +@comment index +@item char * index (const char *@var{string}, int @var{c}) + +@file{string.h} (BSD): @ref{Search Functions,}. + +@comment inet_addr +@item unsigned long int inet_addr (const char *@var{name}) + +@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. + +@comment inet_aton +@item int inet_aton (const char *@var{name}, struct in_addr *@var{addr}) + +@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. + +@comment inet_lnaof +@item int inet_lnaof (struct in_addr @var{addr}) + +@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. + +@comment inet_makeaddr +@item struct in_addr inet_makeaddr (int @var{net}, int @var{local}) + +@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. + +@comment inet_netof +@item int inet_netof (struct in_addr @var{addr}) + +@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. + +@comment inet_network +@item unsigned long int inet_network (const char *@var{name}) + +@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. + +@comment inet_ntoa +@item char * inet_ntoa (struct in_addr @var{addr}) + +@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. + +@comment infnan +@item double infnan (int @var{error}) + +@file{math.h} (BSD): @ref{Predicates on Floats}. + +@comment initgroups +@item int initgroups (const char *@var{user}, gid_t @var{gid}) + +@file{grp.h} (BSD): @ref{Setting Groups}. + +@comment initstate +@item void * initstate (unsigned int @var{seed}, void *@var{state}, size_t @var{size}) + +@file{stdlib.h} (BSD): @ref{BSD Random}. + @comment INLCR @item INLCR + @file{termios.h} (POSIX.1): @ref{Input Modes}. +@comment ino_t +@item ino_t + +@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. + @comment INPCK @item INPCK + @file{termios.h} (POSIX.1): @ref{Input Modes}. +@comment int +@item int RLIM_INFINITY + +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. + @comment INT_MAX @item INT_MAX + @file{limits.h} (ANSI): @ref{Range of Type}. @comment INT_MIN @item INT_MIN + @file{limits.h} (ANSI): @ref{Range of Type}. +@comment _IOFBF +@item int _IOFBF + +@file{stdio.h} (ANSI): @ref{Controlling Buffering}. + +@comment _IOLBF +@item int _IOLBF + +@file{stdio.h} (ANSI): @ref{Controlling Buffering}. + +@comment _IONBF +@item int _IONBF + +@file{stdio.h} (ANSI): @ref{Controlling Buffering}. + @comment IPPORT_RESERVED @item int IPPORT_RESERVED + @file{netinet/in.h} (BSD): @ref{Ports}. @comment IPPORT_USERRESERVED @item int IPPORT_USERRESERVED + @file{netinet/in.h} (BSD): @ref{Ports}. +@comment isalnum +@item int isalnum (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment isalpha +@item int isalpha (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment isascii +@item int isascii (int @var{c}) + +@file{ctype.h} (SVID, BSD): @ref{Classification of Characters,}. + +@comment isatty +@item int isatty (int @var{filedes}) + +@file{unistd.h} (POSIX.1): @ref{Is It a Terminal}. + +@comment isblank +@item int isblank (int @var{c}) + +@file{ctype.h} (GNU): @ref{Classification of Characters,}. + +@comment iscntrl +@item int iscntrl (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment isdigit +@item int isdigit (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment isgraph +@item int isgraph (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + @comment ISIG @item ISIG + @file{termios.h} (POSIX.1): @ref{Local Modes}. +@comment isinf +@item int isinf (double @var{x}) + +@file{math.h} (BSD): @ref{Predicates on Floats}. + +@comment islower +@item int islower (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment isnan +@item int isnan (double @var{x}) + +@file{math.h} (BSD): @ref{Predicates on Floats}. + +@comment isprint +@item int isprint (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment ispunct +@item int ispunct (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment isspace +@item int isspace (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + @comment ISTRIP @item ISTRIP + @file{termios.h} (POSIX.1): @ref{Input Modes}. +@comment isupper +@item int isupper (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment isxdigit +@item int isxdigit (int @var{c}) + +@file{ctype.h} (ANSI): @ref{Classification of Characters,}. + +@comment * +@item char * tzname [2] + +@file{time.h} (POSIX.1): @ref{Time Zone Functions}. + @comment ITIMER_PROF @item ITIMER_PROF + @file{sys/time.h} (BSD): @ref{Setting an Alarm}. @comment ITIMER_REAL @item ITIMER_REAL + @file{sys/time.h} (BSD): @ref{Setting an Alarm}. @comment ITIMER_VIRTUAL @item ITIMER_VIRTUAL + @file{sys/time.h} (BSD): @ref{Setting an Alarm}. @comment IXANY @item IXANY + @file{termios.h} (BSD): @ref{Input Modes}. @comment IXOFF @item IXOFF + @file{termios.h} (POSIX.1): @ref{Input Modes}. @comment IXON @item IXON + @file{termios.h} (POSIX.1): @ref{Input Modes}. +@comment jmp_buf +@item jmp_buf + +@file{setjmp.h} (ANSI): @ref{Non-Local Details,}. + +@comment kill +@item int kill (pid_t @var{pid}, int @var{signum}) + +@file{signal.h} (POSIX.1): @ref{Signaling Another Process}. + +@comment killpg +@item int killpg (int @var{pgid}, int @var{signum}) + +@file{signal.h} (BSD): @ref{Signaling Another Process}. + +@comment labs +@item long int labs (long int @var{number}) + +@file{stdlib.h} (ANSI): @ref{Absolute Value}. + @comment LANG @item LANG + @file{locale.h} (ANSI): @ref{Locale Categories,}. @comment LC_ALL @item LC_ALL + @file{locale.h} (ANSI): @ref{Locale Categories,}. @comment LC_COLLATE @item LC_COLLATE + @file{locale.h} (ANSI): @ref{Locale Categories,}. @comment LC_CTYPE @item LC_CTYPE + @file{locale.h} (ANSI): @ref{Locale Categories,}. @comment LC_MONETARY @item LC_MONETARY + @file{locale.h} (ANSI): @ref{Locale Categories,}. @comment LC_NUMERIC @item LC_NUMERIC + @file{locale.h} (ANSI): @ref{Locale Categories,}. @comment LC_RESPONSE @item LC_RESPONSE + @file{locale.h} (GNU): @ref{Locale Categories,}. +@comment L_ctermid +@item int L_ctermid + +@file{stdio.h} (POSIX.1): @ref{Identifying the Terminal,}. + @comment LC_TIME @item LC_TIME + @file{locale.h} (ANSI): @ref{Locale Categories,}. +@comment L_cuserid +@item int L_cuserid + +@file{stdio.h} (POSIX.1): @ref{Who Logged In}. + +@comment ldexp +@item double ldexp (double @var{value}, int @var{exponent}) + +@file{math.h} (ANSI): @ref{Normalization Functions}. + +@comment ldiv +@item ldiv_t ldiv (long int @var{numerator}, long int @var{denominator}) + +@file{stdlib.h} (ANSI): @ref{Integer Division}. + +@comment ldiv_t +@item ldiv_t + +@file{stdlib.h} (ANSI): @ref{Integer Division}. + +@comment L_INCR +@item L_INCR + +@file{sys/file.h} (BSD): @ref{File Positioning}. + @comment LINE_MAX @item int LINE_MAX + @file{limits.h} (POSIX.2): @ref{Utility Limits}. +@comment link +@item int link (const char *@var{oldname}, const char *@var{newname}) + +@file{unistd.h} (POSIX.1): @ref{Hard Links}. + @comment LINK_MAX @item int LINK_MAX + @file{limits.h} (POSIX.1): @ref{Limits for Files}. +@comment listen +@item int listen (int @var{socket}, unsigned int @var{n}) + +@file{sys/socket.h} (BSD): @ref{Listening}. + +@comment localeconv +@item struct lconv * localeconv (void) + +@file{locale.h} (ANSI): @ref{Numeric Formatting,}. + +@comment localtime +@item struct tm * localtime (const time_t *@var{time}) + +@file{time.h} (ANSI): @ref{Broken-down Time}. + +@comment log10 +@item double log10 (double @var{x}) + +@file{math.h} (ANSI): @ref{Exponents and Logarithms}. + +@comment log1p +@item double log1p (double @var{x}) + +@file{math.h} (BSD): @ref{Exponents and Logarithms}. + +@comment logb +@item double logb (double @var{x}) + +@file{math.h} (BSD): @ref{Normalization Functions}. + +@comment log +@item double log (double @var{x}) + +@file{math.h} (ANSI): @ref{Exponents and Logarithms}. + +@comment longjmp +@item void longjmp (jmp_buf @var{state}, int @var{value}) + +@file{setjmp.h} (ANSI): @ref{Non-Local Details,}. + @comment LONG_LONG_MAX @item LONG_LONG_MAX + @file{limits.h} (GNU): @ref{Range of Type}. @comment LONG_LONG_MIN @item LONG_LONG_MIN + @file{limits.h} (GNU): @ref{Range of Type}. @comment LONG_MAX @item LONG_MAX + @file{limits.h} (ANSI): @ref{Range of Type}. @comment LONG_MIN @item LONG_MIN + @file{limits.h} (ANSI): @ref{Range of Type}. -@comment L_INCR -@item L_INCR -@file{sys/file.h} (BSD): @ref{File Positioning}. +@comment lseek +@item off_t lseek (int @var{filedes}, off_t @var{offset}, int @var{whence}) + +@file{unistd.h} (POSIX.1): @ref{File Position Primitive}. @comment L_SET @item L_SET -@file{sys/file.h} (BSD): @ref{File Positioning}. -@comment L_XTND -@item L_XTND @file{sys/file.h} (BSD): @ref{File Positioning}. -@comment L_ctermid -@item int L_ctermid -@file{stdio.h} (POSIX.1): @ref{Identifying the Terminal,}. +@comment lstat +@item int lstat (const char *@var{filename}, struct stat *@var{buf}) -@comment L_cuserid -@item int L_cuserid -@file{stdio.h} (POSIX.1): @ref{Who Logged In}. +@file{sys/stat.h} (BSD): @ref{Reading Attributes}. @comment L_tmpnam @item int L_tmpnam + @file{stdio.h} (ANSI): @ref{Temporary Files}. -@comment MAXNAMLEN -@item int MAXNAMLEN -@file{dirent.h} (BSD): @ref{Limits for Files}. +@comment L_XTND +@item L_XTND + +@file{sys/file.h} (BSD): @ref{File Positioning}. + +@comment __malloc_hook +@item __malloc_hook + +@file{malloc.h} (GNU): @ref{Hooks for Malloc}. +@comment malloc +@item void * malloc (size_t @var{size}) + +@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Basic Allocation}. + @comment MAX_CANON @item int MAX_CANON + @file{limits.h} (POSIX.1): @ref{Limits for Files}. @comment MAX_INPUT @item int MAX_INPUT + @file{limits.h} (POSIX.1): @ref{Limits for Files}. +@comment MAXNAMLEN +@item int MAXNAMLEN + +@file{dirent.h} (BSD): @ref{Limits for Files}. + @comment MB_CUR_MAX @item int MB_CUR_MAX + @file{stdlib.h} (ANSI): @ref{Multibyte Char Intro,}. +@comment mblen +@item int mblen (const char *@var{string}, size_t @var{size}) + +@file{stdlib.h} (ANSI): @ref{Length of Char,}. + @comment MB_LEN_MAX @item int MB_LEN_MAX + @file{limits.h} (ANSI): @ref{Multibyte Char Intro,}. -@comment MDMBUF -@item MDMBUF -@file{termios.h} (BSD): @ref{Control Modes}. +@comment mbstowcs +@item size_t mbstowcs (wchar_t *@var{wstring}, const char *@var{string}, size_t @var{size}) -@comment MSG_DONTROUTE -@item int MSG_DONTROUTE -@file{sys/socket.h} (BSD): @ref{Socket Data Options}. +@file{stdlib.h} (ANSI): @ref{Wide String Conversion,}. -@comment MSG_OOB -@item int MSG_OOB -@file{sys/socket.h} (BSD): @ref{Socket Data Options}. +@comment mbtowc +@item int mbtowc (wchar_t *@var{result}, const char *@var{string}, size_t @var{size}) -@comment MSG_PEEK -@item int MSG_PEEK -@file{sys/socket.h} (BSD): @ref{Socket Data Options}. +@file{stdlib.h} (ANSI): @ref{Converting One Char,}. -@comment NAME_MAX -@item int NAME_MAX -@file{limits.h} (POSIX.1): @ref{Limits for Files}. +@comment mcheck +@item int mcheck (void (*@var{abortfn}) (void)) -@comment NAN -@item double NAN -@file{math.h} (GNU): @ref{Not a Number}. +@file{malloc.h} (GNU): @ref{Heap Consistency Checking}. -@comment NCCS -@item int NCCS -@file{termios.h} (POSIX.1): @ref{Mode Data Types}. +@comment MDMBUF +@item MDMBUF -@comment NGROUPS_MAX -@item int NGROUPS_MAX -@file{limits.h} (POSIX.1): @ref{General Limits}. +@file{termios.h} (BSD): @ref{Control Modes}. -@comment NOFLSH -@item NOFLSH -@file{termios.h} (POSIX.1): @ref{Local Modes}. +@comment memalign +@item void * memalign (size_t @var{size}, size_t @var{boundary}) -@comment NOKERNINFO -@item NOKERNINFO -@file{termios.h} (BSD): @ref{Local Modes}. +@file{malloc.h}, @file{stdlib.h} (BSD): @ref{Aligned Memory Blocks}. -@comment NO_ADDRESS -@item NO_ADDRESS -@file{netdb.h} (BSD): @ref{Host Names}. +@comment memccpy +@item void * memccpy (void *@var{to}, const void *@var{from}, int @var{c}, size_t @var{size}) -@comment NO_RECOVERY -@item NO_RECOVERY -@file{netdb.h} (BSD): @ref{Host Names}. +@file{string.h} (SVID): @ref{Copying and Concatenation,}. -@comment NSIG -@item int NSIG -@file{signal.h} (BSD): @ref{Standard Signals}. +@comment memchr +@item void * memchr (const void *@var{block}, int @var{c}, size_t @var{size}) -@comment NULL -@item void * NULL -@file{stddef.h} (ANSI): @ref{Null Pointer Constant}. +@file{string.h} (ANSI): @ref{Search Functions,}. -@comment ONLCR -@item int ONLCR -@file{termios.h} (BSD): @ref{Output Modes}. +@comment memcmp +@item int memcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size}) -@comment ONOEOT -@item int ONOEOT -@file{termios.h} (BSD): @ref{Output Modes}. +@file{string.h} (ANSI): @ref{String/Array Comparison,}. -@comment OPEN_MAX -@item int OPEN_MAX -@file{limits.h} (POSIX.1): @ref{General Limits}. +@comment memcpy +@item void * memcpy (void *@var{to}, const void *@var{from}, size_t @var{size}) -@comment OPOST -@item int OPOST -@file{termios.h} (POSIX.1): @ref{Output Modes}. +@file{string.h} (ANSI): @ref{Copying and Concatenation,}. -@comment OXTABS -@item int OXTABS -@file{termios.h} (BSD): @ref{Output Modes}. +@comment memmem +@item void * memmem (const void *@var{needle}, size_t @var{needle_len},@*const void *@var{haystack}, size_t @var{haystack_len}) -@comment O_ACCMODE -@item int O_ACCMODE -@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. +@file{string.h} (GNU): @ref{Search Functions,}. -@comment O_APPEND -@item O_APPEND -@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. +@comment memmove +@item void * memmove (void *@var{to}, const void *@var{from}, size_t @var{size}) -@comment O_APPEND -@item O_APPEND -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@file{string.h} (ANSI): @ref{Copying and Concatenation,}. -@comment O_CREAT -@item O_CREAT -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@comment memory_warnings +@item void memory_warnings (void *@var{start}, void (*@var{warn_func}) (const char *)) -@comment O_EXCL -@item O_EXCL -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@file{malloc.h} (GNU): @ref{Memory Warnings}. -@comment O_NDELAY -@item O_NDELAY -@file{fcntl.h} (BSD): @ref{File Status Flags}. +@comment memset +@item void * memset (void *@var{block}, int @var{c}, size_t @var{size}) -@comment O_NOCTTY -@item O_NOCTTY -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@file{string.h} (ANSI): @ref{Copying and Concatenation,}. -@comment O_NONBLOCK -@item O_NONBLOCK -@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. +@comment mkdir +@item int mkdir (const char *@var{filename}, mode_t @var{mode}) -@comment O_NONBLOCK -@item O_NONBLOCK -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@file{sys/stat.h} (POSIX.1): @ref{Creating Directories}. -@comment O_RDONLY -@item O_RDONLY -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@comment mkfifo +@item int mkfifo (const char *@var{filename}, mode_t @var{mode}) -@comment O_RDWR -@item O_RDWR -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@file{sys/stat.h} (POSIX.1): @ref{FIFO Special Files}. -@comment O_TRUNC -@item O_TRUNC -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@comment mknod +@item int mknod (const char *@var{filename}, int @var{mode}, int @var{dev}) -@comment O_WRONLY -@item O_WRONLY -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. +@file{sys/stat.h} (BSD): @ref{Making Special Files}. -@comment PARENB -@item PARENB -@file{termios.h} (POSIX.1): @ref{Control Modes}. +@comment mkstemp +@item int mkstemp (char *@var{template}) -@comment PARMRK -@item PARMRK -@file{termios.h} (POSIX.1): @ref{Input Modes}. +@file{unistd.h} (BSD): @ref{Temporary Files}. -@comment PARODD -@item PARODD -@file{termios.h} (POSIX.1): @ref{Control Modes}. +@comment mktemp +@item char * mktemp (char *@var{template}) -@comment PATH_MAX -@item int PATH_MAX -@file{limits.h} (POSIX.1): @ref{Limits for Files}. +@file{unistd.h} (Unix): @ref{Temporary Files}. -@comment PA_CHAR -@item PA_CHAR -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@comment mktime +@item time_t mktime (struct tm *@var{brokentime}) -@comment PA_DOUBLE -@item PA_DOUBLE -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@file{time.h} (ANSI): @ref{Broken-down Time}. -@comment PA_FLAG_LONG -@item PA_FLAG_LONG -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@comment mode_t +@item mode_t -@comment PA_FLAG_LONG_DOUBLE -@item PA_FLAG_LONG_DOUBLE -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. -@comment PA_FLAG_LONG_LONG -@item PA_FLAG_LONG_LONG -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@comment modf +@item double modf (double @var{value}, double *@var{integer_part}) -@comment PA_FLAG_MASK -@item int PA_FLAG_MASK -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@file{math.h} (ANSI): @ref{Rounding and Remainders}. -@comment PA_FLAG_PTR -@item PA_FLAG_PTR -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@comment MSG_DONTROUTE +@item int MSG_DONTROUTE -@comment PA_FLAG_SHORT -@item PA_FLAG_SHORT -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@file{sys/socket.h} (BSD): @ref{Socket Data Options}. -@comment PA_FLOAT -@item PA_FLOAT -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@comment MSG_OOB +@item int MSG_OOB -@comment PA_INT -@item PA_INT -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@file{sys/socket.h} (BSD): @ref{Socket Data Options}. -@comment PA_LAST -@item PA_LAST -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@comment MSG_PEEK +@item int MSG_PEEK -@comment PA_POINTER -@item PA_POINTER -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@file{sys/socket.h} (BSD): @ref{Socket Data Options}. -@comment PA_STRING -@item PA_STRING -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@comment mstats +@item struct mstats mstats (void) -@comment PENDIN -@item PENDIN -@file{termios.h} (BSD): @ref{Local Modes}. +@file{malloc.h} (GNU): @ref{Statistics of Malloc}. -@comment PF_FILE -@item int PF_FILE -@file{sys/socket.h} (GNU): @ref{File Namespace Details}. +@comment NAME_MAX +@item int NAME_MAX -@comment PF_INET -@item int PF_INET -@file{sys/socket.h} (BSD): @ref{Internet Namespace}. +@file{limits.h} (POSIX.1): @ref{Limits for Files}. -@comment PF_UNIX -@item int PF_UNIX -@file{sys/socket.h} (BSD): @ref{File Namespace Details}. +@comment NAN +@item double NAN -@comment PIPE_BUF -@item int PIPE_BUF -@file{limits.h} (POSIX.1): @ref{Limits for Files}. +@file{math.h} (GNU): @ref{Not a Number}. -@comment PRIO_MAX -@item PRIO_MAX -@file{sys/resource.h} (BSD): @ref{Priority}. +@comment NCCS +@item int NCCS -@comment PRIO_MIN -@item PRIO_MIN -@file{sys/resource.h} (BSD): @ref{Priority}. +@file{termios.h} (POSIX.1): @ref{Mode Data Types}. -@comment PRIO_PGRP -@item PRIO_PGRP -@file{sys/resource.h} (BSD): @ref{Priority}. +@comment NGROUPS_MAX +@item int NGROUPS_MAX -@comment PRIO_PROCESS -@item PRIO_PROCESS -@file{sys/resource.h} (BSD): @ref{Priority}. +@file{limits.h} (POSIX.1): @ref{General Limits}. -@comment PRIO_USER -@item PRIO_USER -@file{sys/resource.h} (BSD): @ref{Priority}. +@comment nice +@item int nice (int @var{increment}) -@comment P_tmpdir -@item char * P_tmpdir -@file{stdio.h} (SVID): @ref{Temporary Files}. +@file{dunno.h} (dunno.h): @ref{Priority}. -@comment RAND_MAX -@item int RAND_MAX -@file{stdlib.h} (ANSI): @ref{ANSI Random}. +@comment nlink_t +@item nlink_t -@comment REG_BADBR -@item REG_BADBR -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. -@comment REG_BADPAT -@item REG_BADPAT -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@comment NO_ADDRESS +@item NO_ADDRESS -@comment REG_BADRPT -@item REG_BADRPT -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{netdb.h} (BSD): @ref{Host Names}. -@comment REG_EBRACE -@item REG_EBRACE -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@comment NOFLSH +@item NOFLSH -@comment REG_EBRACK -@item REG_EBRACK -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{termios.h} (POSIX.1): @ref{Local Modes}. -@comment REG_ECOLLATE -@item REG_ECOLLATE -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@comment NOKERNINFO +@item NOKERNINFO -@comment REG_ECTYPE -@item REG_ECTYPE -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{termios.h} (BSD): @ref{Local Modes}. -@comment REG_EESCAPE -@item REG_EESCAPE -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@comment NO_RECOVERY +@item NO_RECOVERY -@comment REG_EPAREN -@item REG_EPAREN -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{netdb.h} (BSD): @ref{Host Names}. -@comment REG_ERANGE -@item REG_ERANGE -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@comment NSIG +@item int NSIG -@comment REG_ESPACE -@item REG_ESPACE -@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. +@file{signal.h} (BSD): @ref{Standard Signals}. -@comment REG_ESPACE -@item REG_ESPACE -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@comment ntohl +@item unsigned long int ntohl (unsigned long int @var{netlong}) -@comment REG_ESUBREG -@item REG_ESUBREG -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{netinet/in.h} (BSD): @ref{Byte Order}. -@comment REG_EXTENDED -@item REG_EXTENDED -@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. +@comment ntohs +@item unsigned short int ntohs (unsigned short int @var{netshort}) -@comment REG_ICASE -@item REG_ICASE -@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. +@file{netinet/in.h} (BSD): @ref{Byte Order}. -@comment REG_NEWLINE -@item REG_NEWLINE -@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. +@comment NULL +@item void * NULL -@comment REG_NOMATCH -@item REG_NOMATCH -@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. +@file{stddef.h} (ANSI): @ref{Null Pointer Constant}. -@comment REG_NOSUB -@item REG_NOSUB -@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. +@comment O_ACCMODE +@item int O_ACCMODE -@comment REG_NOTBOL -@item REG_NOTBOL -@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. +@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. -@comment REG_NOTEOL -@item REG_NOTEOL -@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. +@comment O_APPEND +@item O_APPEND -@comment RE_DUP_MAX -@item int RE_DUP_MAX -@file{limits.h} (POSIX.2): @ref{General Limits}. +@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. -@comment RLIMIT_CORE -@item RLIMIT_CORE -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@comment O_APPEND +@item O_APPEND -@comment RLIMIT_CPU -@item RLIMIT_CPU -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment RLIMIT_DATA -@item RLIMIT_DATA -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@comment obstack_1grow_fast +@item void obstack_1grow_fast (struct obstack *@var{obstack_ptr}, char @var{c}) -@comment RLIMIT_FSIZE -@item RLIMIT_FSIZE -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@file{obstack.h} (GNU): @ref{Extra Fast Growing}. -@comment RLIMIT_OPEN_FILES -@item RLIMIT_OPEN_FILES -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@comment obstack_1grow +@item void obstack_1grow (struct obstack *@var{obstack_ptr}, char @var{c}) -@comment RLIMIT_RSS -@item RLIMIT_RSS -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@file{obstack.h} (GNU): @ref{Growing Objects}. -@comment RLIMIT_STACK -@item RLIMIT_STACK -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@comment obstack_alignment_mask +@item int obstack_alignment_mask (struct obstack *@var{obstack_ptr}) -@comment RLIM_NLIMITS -@item RLIM_NLIMITS -@file{sys/resource.h} (BSD): @ref{Limits on Resources}. +@file{obstack.h} (GNU): @ref{Obstacks Data Alignment}. -@comment RUSAGE_CHILDREN -@item RUSAGE_CHILDREN -@file{sys/resource.h} (BSD): @ref{Resource Usage}. +@comment obstack_alloc +@item void * obstack_alloc (struct obstack *@var{obstack_ptr}, size_t @var{size}) -@comment RUSAGE_SELF -@item RUSAGE_SELF -@file{sys/resource.h} (BSD): @ref{Resource Usage}. +@file{obstack.h} (GNU): @ref{Allocation in an Obstack}. -@comment R_OK -@item int R_OK -@file{unistd.h} (POSIX.1): @ref{Testing File Access}. +@comment obstack_base +@item void * obstack_base (struct obstack *@var{obstack_ptr}) -@comment SA_NOCLDSTOP -@item int SA_NOCLDSTOP -@file{signal.h} (POSIX.1): @ref{Flags for Sigaction}. +@file{obstack.h} (GNU): @ref{Status of an Obstack}. -@comment SA_ONSTACK -@item int SA_ONSTACK -@file{signal.h} (BSD): @ref{Flags for Sigaction}. +@comment obstack_blank_fast +@item void obstack_blank_fast (struct obstack *@var{obstack_ptr}, size_t @var{size}) -@comment SA_RESTART -@item int SA_RESTART -@file{signal.h} (BSD): @ref{Flags for Sigaction}. +@file{obstack.h} (GNU): @ref{Extra Fast Growing}. -@comment SCHAR_MAX -@item SCHAR_MAX -@file{limits.h} (ANSI): @ref{Range of Type}. +@comment obstack_blank +@item void obstack_blank (struct obstack *@var{obstack_ptr}, size_t @var{size}) -@comment SCHAR_MIN -@item SCHAR_MIN -@file{limits.h} (ANSI): @ref{Range of Type}. +@file{obstack.h} (GNU): @ref{Growing Objects}. -@comment SEEK_CUR -@item int SEEK_CUR -@file{stdio.h} (ANSI): @ref{File Positioning}. +@comment obstack_chunk_size +@item size_t obstack_chunk_size (struct obstack *@var{obstack_ptr}) -@comment SEEK_END -@item int SEEK_END -@file{stdio.h} (ANSI): @ref{File Positioning}. +@file{obstack.h} (GNU): @ref{Obstack Chunks}. -@comment SEEK_SET -@item int SEEK_SET -@file{stdio.h} (ANSI): @ref{File Positioning}. +@comment obstack_copy0 +@item void * obstack_copy0 (struct obstack *@var{obstack_ptr}, void *@var{address}, size_t @var{size}) -@comment SHRT_MAX -@item SHRT_MAX -@file{limits.h} (ANSI): @ref{Range of Type}. +@file{obstack.h} (GNU): @ref{Allocation in an Obstack}. -@comment SHRT_MIN -@item SHRT_MIN -@file{limits.h} (ANSI): @ref{Range of Type}. +@comment obstack_copy +@item void * obstack_copy (struct obstack *@var{obstack_ptr}, void *@var{address}, size_t @var{size}) -@comment SIGABRT -@item int SIGABRT -@file{signal.h} (ANSI): @ref{Program Error Signals}. +@file{obstack.h} (GNU): @ref{Allocation in an Obstack}. -@comment SIGALRM -@item int SIGALRM -@file{signal.h} (POSIX.1): @ref{Alarm Signals}. +@comment obstack_finish +@item void * obstack_finish (struct obstack *@var{obstack_ptr}) -@comment SIGBUS -@item int SIGBUS -@file{signal.h} (BSD): @ref{Program Error Signals}. +@file{obstack.h} (GNU): @ref{Growing Objects}. -@comment SIGCHLD -@item int SIGCHLD -@file{signal.h} (POSIX.1): @ref{Job Control Signals}. +@comment obstack_free +@item void obstack_free (struct obstack *@var{obstack_ptr}, void *@var{object}) -@comment SIGCONT -@item int SIGCONT -@file{signal.h} (POSIX.1): @ref{Job Control Signals}. +@file{obstack.h} (GNU): @ref{Freeing Obstack Objects}. -@comment SIGFPE -@item int SIGFPE -@file{signal.h} (ANSI): @ref{Program Error Signals}. +@comment obstack_grow0 +@item void obstack_grow0 (struct obstack *@var{obstack_ptr}, void *@var{data}, size_t @var{size}) -@comment SIGHUP -@item int SIGHUP -@file{signal.h} (POSIX.1): @ref{Termination Signals}. +@file{obstack.h} (GNU): @ref{Growing Objects}. -@comment SIGILL -@item int SIGILL -@file{signal.h} (ANSI): @ref{Program Error Signals}. +@comment obstack_grow +@item void obstack_grow (struct obstack *@var{obstack_ptr}, void *@var{data}, size_t @var{size}) -@comment SIGINT -@item int SIGINT -@file{signal.h} (ANSI): @ref{Termination Signals}. +@file{obstack.h} (GNU): @ref{Growing Objects}. -@comment SIGIO -@item int SIGIO -@file{signal.h} (BSD): @ref{Asynchronous I/O Signals}. +@comment obstack_init +@item void obstack_init (struct obstack *@var{obstack_ptr}) -@comment SIGKILL -@item int SIGKILL -@file{signal.h} (POSIX.1): @ref{Termination Signals}. +@file{obstack.h} (GNU): @ref{Preparing for Obstacks}. -@comment SIGPIPE -@item int SIGPIPE -@file{signal.h} (POSIX.1): @ref{Miscellaneous Signals}. +@comment obstack_next_free +@item void * obstack_next_free (struct obstack *@var{obstack_ptr}) -@comment SIGPROF -@item int SIGPROF -@file{signal.h} (BSD): @ref{Alarm Signals}. +@file{obstack.h} (GNU): @ref{Status of an Obstack}. -@comment SIGQUIT -@item int SIGQUIT -@file{signal.h} (POSIX.1): @ref{Termination Signals}. +@comment obstack_object_size +@item size_t obstack_object_size (struct obstack *@var{obstack_ptr}) -@comment SIGSEGV -@item int SIGSEGV -@file{signal.h} (ANSI): @ref{Program Error Signals}. +@file{obstack.h} (GNU): @ref{Growing Objects}. -@comment SIGSTOP -@item int SIGSTOP -@file{signal.h} (POSIX.1): @ref{Job Control Signals}. +@comment obstack_object_size +@item size_t obstack_object_size (struct obstack *@var{obstack_ptr}) -@comment SIGTERM -@item int SIGTERM -@file{signal.h} (ANSI): @ref{Termination Signals}. +@file{obstack.h} (GNU): @ref{Status of an Obstack}. -@comment SIGTSTP -@item int SIGTSTP -@file{signal.h} (POSIX.1): @ref{Job Control Signals}. +@comment obstack_printf +@item int obstack_printf (struct obstack *@var{obstack}, const char *@var{template}, @dots{}) -@comment SIGTTIN -@item int SIGTTIN -@file{signal.h} (POSIX.1): @ref{Job Control Signals}. +@file{stdio.h} (GNU): @ref{Dynamic Output}. -@comment SIGTTOU -@item int SIGTTOU -@file{signal.h} (POSIX.1): @ref{Job Control Signals}. +@comment obstack_room +@item size_t obstack_room (struct obstack *@var{obstack_ptr}) -@comment SIGURG -@item int SIGURG -@file{signal.h} (BSD): @ref{Asynchronous I/O Signals}. +@file{obstack.h} (GNU): @ref{Extra Fast Growing}. -@comment SIGUSR1 -@item int SIGUSR1 -@file{signal.h} (POSIX.1): @ref{Miscellaneous Signals}. +@comment obstack_vprintf +@item int obstack_vprintf (struct obstack *@var{obstack}, const char *@var{template}, va_list @var{ap}) -@comment SIGUSR2 -@item int SIGUSR2 -@file{signal.h} (POSIX.1): @ref{Miscellaneous Signals}. +@file{stdio.h} (GNU): @ref{Variable Arguments Output}. -@comment SIGVTALRM -@item int SIGVTALRM -@file{signal.h} (BSD): @ref{Alarm Signals}. +@comment O_CREAT +@item O_CREAT -@comment SIG_BLOCK -@item SIG_BLOCK -@file{signal.h} (POSIX.1): @ref{Process Signal Mask}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment SIG_ERR -@item sighandler_t SIG_ERR -@file{signal.h} (ANSI): @ref{Basic Signal Handling}. +@comment O_EXCL +@item O_EXCL -@comment SIG_SETMASK -@item SIG_SETMASK -@file{signal.h} (POSIX.1): @ref{Process Signal Mask}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment SIG_UNBLOCK -@item SIG_UNBLOCK -@file{signal.h} (POSIX.1): @ref{Process Signal Mask}. +@comment offsetof +@item size_t offsetof (@var{type}, @var{member}) -@comment SOCK_DGRAM -@item int SOCK_DGRAM -@file{sys/socket.h} (BSD): @ref{Communication Styles}. +@file{stddef.h} (ANSI): @ref{Structure Measurement}. -@comment SOCK_RAW -@item int SOCK_RAW -@file{sys/socket.h} (BSD): @ref{Communication Styles}. +@comment off_t +@item off_t -@comment SOCK_RDM -@item int SOCK_RDM -@file{sys/socket.h} (BSD): @ref{Communication Styles}. +@file{sys/types.h} (POSIX.1): @ref{File Position Primitive}. -@comment SOCK_SEQPACKET -@item int SOCK_SEQPACKET -@file{sys/socket.h} (BSD): @ref{Communication Styles}. +@comment O_NDELAY +@item O_NDELAY -@comment SOCK_STREAM -@item int SOCK_STREAM -@file{sys/socket.h} (BSD): @ref{Communication Styles}. +@file{fcntl.h} (BSD): @ref{File Status Flags}. -@comment SOL_SOCKET -@item int SOL_SOCKET -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@comment on_exit +@item int on_exit (void (*@var{function})(int @var{status}, void *@var{arg}), void *@var{arg}) -@comment SO_BROADCAST -@item SO_BROADCAST -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@file{stdlib.h} (SunOS): @ref{Cleanups on Exit}. -@comment SO_DEBUG -@item SO_DEBUG -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@comment ONLCR +@item int ONLCR -@comment SO_DONTROUTE -@item SO_DONTROUTE -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@file{termios.h} (BSD): @ref{Output Modes}. -@comment SO_ERROR -@item SO_ERROR -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@comment O_NOCTTY +@item O_NOCTTY -@comment SO_KEEPALIVE -@item SO_KEEPALIVE -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment SO_LINGER -@item SO_LINGER -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@comment ONOEOT +@item int ONOEOT -@comment SO_OOBINLINE -@item SO_OOBINLINE -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@file{termios.h} (BSD): @ref{Output Modes}. -@comment SO_RCVBUF -@item SO_RCVBUF -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@comment O_NONBLOCK +@item O_NONBLOCK -@comment SO_REUSEADDR -@item SO_REUSEADDR -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@file{fcntl.h} (POSIX.1): @ref{File Status Flags}. -@comment SO_SNDBUF -@item SO_SNDBUF -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@comment O_NONBLOCK +@item O_NONBLOCK -@comment SO_STYLE -@item SO_STYLE -@file{sys/socket.h} (GNU): @ref{Socket-Level Options}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment SO_TYPE -@item SO_TYPE -@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. +@comment opendir +@item DIR * opendir (const char *@var{dirname}) -@comment SSIZE_MAX -@item int SSIZE_MAX -@file{limits.h} (POSIX.1): @ref{General Limits}. +@file{dirent.h} (POSIX.1): @ref{Opening a Directory}. -@comment STDERR_FILENO -@item STDERR_FILENO -@file{unistd.h} (POSIX.1): @ref{Descriptors and Streams}. +@comment open +@item int open (const char *@var{filename}, int @var{flags}[, mode_t @var{mode}]) -@comment STDIN_FILENO -@item STDIN_FILENO -@file{unistd.h} (POSIX.1): @ref{Descriptors and Streams}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment STDOUT_FILENO -@item STDOUT_FILENO -@file{unistd.h} (POSIX.1): @ref{Descriptors and Streams}. +@comment OPEN_MAX +@item int OPEN_MAX -@comment STREAM_MAX -@item int STREAM_MAX @file{limits.h} (POSIX.1): @ref{General Limits}. -@comment SV_INTERRUPT -@item int SV_INTERRUPT -@file{signal.h} (BSD): @ref{BSD Handler}. +@comment open_memstream +@item FILE * open_memstream (char **@var{ptr}, size_t *@var{sizeloc}) -@comment SV_ONSTACK -@item int SV_ONSTACK -@file{signal.h} (BSD): @ref{BSD Handler}. +@file{stdio.h} (GNU): @ref{String Streams}. -@comment SV_RESETHAND -@item int SV_RESETHAND -@file{signal.h} (Sun): @ref{BSD Handler}. +@comment open_obstack_stream +@item FILE * open_obstack_stream (struct obstack *@var{obstack}) -@comment S_IEXEC -@item S_IEXEC -@file{sys/stat.h} (BSD): @ref{Permission Bits}. +@file{stdio.h} (GNU): @ref{Obstack Streams}. -@comment S_IFBLK -@item S_IFBLK -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@comment OPOST +@item int OPOST -@comment S_IFCHR -@item S_IFCHR -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@file{termios.h} (POSIX.1): @ref{Output Modes}. -@comment S_IFDIR -@item S_IFDIR -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@comment optarg +@item char * optarg -@comment S_IFIFO -@item S_IFIFO -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@file{unistd.h} (POSIX.2): @ref{Parsing Options}. -@comment S_IFLNK -@item S_IFLNK -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@comment opterr +@item int opterr -@comment S_IFMT -@item int S_IFMT -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@file{unistd.h} (POSIX.2): @ref{Parsing Options}. -@comment S_IFREG -@item S_IFREG -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@comment optind +@item int optind -@comment S_IFSOCK -@item S_IFSOCK -@file{sys/stat.h} (BSD): @ref{Testing File Type}. +@file{unistd.h} (POSIX.2): @ref{Parsing Options}. -@comment S_IREAD -@item S_IREAD -@file{sys/stat.h} (BSD): @ref{Permission Bits}. +@comment optopt +@item int optopt -@comment S_IRGRP -@item S_IRGRP -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@file{unistd.h} (POSIX.2): @ref{Parsing Options}. -@comment S_IROTH -@item S_IROTH -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@comment O_RDONLY +@item O_RDONLY -@comment S_IRUSR -@item S_IRUSR -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment S_IRWXG -@item S_IRWXG -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@comment O_RDWR +@item O_RDWR -@comment S_IRWXO -@item S_IRWXO -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment S_IRWXU -@item S_IRWXU -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@comment O_TRUNC +@item O_TRUNC -@comment S_ISBLK -@item int S_ISBLK (mode_t @var{m}) -@file{sys/stat.h} (POSIX): @ref{Testing File Type}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment S_ISCHR -@item int S_ISCHR (mode_t @var{m}) -@file{sys/stat.h} (POSIX): @ref{Testing File Type}. +@comment O_WRONLY +@item O_WRONLY -@comment S_ISDIR -@item int S_ISDIR (mode_t @var{m}) -@file{sys/stat.h} (POSIX): @ref{Testing File Type}. +@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. -@comment S_ISFIFO -@item int S_ISFIFO (mode_t @var{m}) -@file{sys/stat.h} (POSIX): @ref{Testing File Type}. +@comment OXTABS +@item int OXTABS -@comment S_ISGID -@item S_ISGID -@file{sys/stat.h} (POSIX): @ref{Permission Bits}. +@file{termios.h} (BSD): @ref{Output Modes}. -@comment S_ISLNK -@item int S_ISLNK (mode_t @var{m}) -@file{sys/stat.h} (GNU): @ref{Testing File Type}. +@comment PA_CHAR +@item PA_CHAR -@comment S_ISREG -@item int S_ISREG (mode_t @var{m}) -@file{sys/stat.h} (POSIX): @ref{Testing File Type}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment S_ISSOCK -@item int S_ISSOCK (mode_t @var{m}) -@file{sys/stat.h} (GNU): @ref{Testing File Type}. +@comment PA_DOUBLE +@item PA_DOUBLE -@comment S_ISUID -@item S_ISUID -@file{sys/stat.h} (POSIX): @ref{Permission Bits}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment S_ISVTX -@item S_ISVTX -@file{sys/stat.h} (BSD): @ref{Permission Bits}. +@comment PA_FLAG_LONG_DOUBLE +@item PA_FLAG_LONG_DOUBLE -@comment S_IWGRP -@item S_IWGRP -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment S_IWOTH -@item S_IWOTH -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@comment PA_FLAG_LONG +@item PA_FLAG_LONG -@comment S_IWRITE -@item S_IWRITE -@file{sys/stat.h} (BSD): @ref{Permission Bits}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment S_IWUSR -@item S_IWUSR -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@comment PA_FLAG_LONG_LONG +@item PA_FLAG_LONG_LONG -@comment S_IXGRP -@item S_IXGRP -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment S_IXOTH -@item S_IXOTH -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@comment PA_FLAG_MASK +@item int PA_FLAG_MASK -@comment S_IXUSR -@item S_IXUSR -@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment TCSADRAIN -@item TCSADRAIN -@file{termios.h} (POSIX.1): @ref{Mode Functions}. +@comment PA_FLAG_PTR +@item PA_FLAG_PTR -@comment TCSAFLUSH -@item TCSAFLUSH -@file{termios.h} (POSIX.1): @ref{Mode Functions}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment TCSANOW -@item TCSANOW -@file{termios.h} (POSIX.1): @ref{Mode Functions}. +@comment PA_FLAG_SHORT +@item PA_FLAG_SHORT -@comment TCSASOFT -@item TCSASOFT -@file{termios.h} (BSD): @ref{Mode Functions}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment TEMP_FAILURE_RETRY -@item TEMP_FAILURE_RETRY (@var{expression}) -@file{unistd.h} (GNU): @ref{Interrupted Primitives}. +@comment PA_FLOAT +@item PA_FLOAT -@comment TMP_MAX -@item int TMP_MAX -@file{stdio.h} (ANSI): @ref{Temporary Files}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment TOSTOP -@item TOSTOP -@file{termios.h} (POSIX.1): @ref{Local Modes}. +@comment PA_INT +@item PA_INT -@comment TRY_AGAIN -@item TRY_AGAIN -@file{netdb.h} (BSD): @ref{Host Names}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment TZNAME_MAX -@item int TZNAME_MAX -@file{limits.h} (POSIX.1): @ref{General Limits}. +@comment PA_LAST +@item PA_LAST -@c This file is generated by summary.awk from the Texinfo sources. -@comment UCHAR_MAX -@item UCHAR_MAX -@file{limits.h} (ANSI): @ref{Range of Type}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment UINT_MAX -@item UINT_MAX -@file{limits.h} (ANSI): @ref{Range of Type}. +@comment PA_POINTER +@item PA_POINTER -@comment ULONG_LONG_MAX -@item ULONG_LONG_MAX -@file{limits.h} (ANSI): @ref{Range of Type}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment ULONG_MAX -@item ULONG_MAX -@file{limits.h} (ANSI): @ref{Range of Type}. +@comment PARENB +@item PARENB -@comment USHRT_MAX -@item USHRT_MAX -@file{limits.h} (ANSI): @ref{Range of Type}. +@file{termios.h} (POSIX.1): @ref{Control Modes}. -@comment VDISCARD -@item int VDISCARD -@file{termios.h} (BSD): @ref{Other Special}. +@comment PARMRK +@item PARMRK -@comment VDSUSP -@item int VDSUSP -@file{termios.h} (BSD): @ref{Signal Characters}. +@file{termios.h} (POSIX.1): @ref{Input Modes}. -@comment VEOF -@item int VEOF -@file{termios.h} (POSIX.1): @ref{Editing Characters}. +@comment PARODD +@item PARODD -@comment VEOL -@item int VEOL -@file{termios.h} (POSIX.1): @ref{Editing Characters}. +@file{termios.h} (POSIX.1): @ref{Control Modes}. -@comment VEOL2 -@item int VEOL2 -@file{termios.h} (BSD): @ref{BSD Editing}. +@comment parse_printf_format +@item size_t parse_printf_format (const char *@var{template}, size_t @var{n}, int *@var{argtypes}) -@comment VERASE -@item int VERASE -@file{termios.h} (POSIX.1): @ref{Editing Characters}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment VINTR -@item int VINTR -@file{termios.h} (POSIX.1): @ref{Signal Characters}. +@comment PA_STRING +@item PA_STRING -@comment VKILL -@item int VKILL -@file{termios.h} (POSIX.1): @ref{Editing Characters}. +@file{printf.h} (GNU): @ref{Parsing a Template String}. -@comment VLNEXT -@item int VLNEXT -@file{termios.h} (BSD): @ref{BSD Editing}. +@comment pathconf +@item long int pathconf (const char *@var{filename}, int @var{parameter}) -@comment VMIN -@item int VMIN -@file{termios.h} (POSIX.1): @ref{Noncanonical Input}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment VQUIT -@item int VQUIT -@file{termios.h} (POSIX.1): @ref{Signal Characters}. +@comment PATH_MAX +@item int PATH_MAX -@comment VREPRINT -@item int VREPRINT -@file{termios.h} (BSD): @ref{BSD Editing}. +@file{limits.h} (POSIX.1): @ref{Limits for Files}. -@comment VSTART -@item int VSTART -@file{termios.h} (POSIX.1): @ref{Start/Stop Characters}. +@comment pause +@item int pause () -@comment VSTATUS -@item int VSTATUS -@file{termios.h} (BSD): @ref{Other Special}. +@file{unistd.h} (POSIX.1): @ref{Using Pause}. -@comment VSTOP -@item int VSTOP -@file{termios.h} (POSIX.1): @ref{Start/Stop Characters}. +@comment _PC_CHOWN_RESTRICTED +@item _PC_CHOWN_RESTRICTED -@comment VSUSP -@item int VSUSP -@file{termios.h} (POSIX.1): @ref{Signal Characters}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment VTIME -@item int VTIME -@file{termios.h} (POSIX.1): @ref{Noncanonical Input}. +@comment _PC_LINK_MAX +@item _PC_LINK_MAX -@comment VWERASE -@item int VWERASE -@file{termios.h} (BSD): @ref{BSD Editing}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WCHAR_MAX -@item WCHAR_MAX -@file{limits.h} (GNU): @ref{Range of Type}. +@comment pclose +@item int pclose (FILE *@var{stream}) -@comment WCOREDUMP -@item int WCOREDUMP (int @var{status}) -@file{sys/wait.h} (BSD): @ref{Process Completion Status}. +@file{stdio.h} (POSIX.2, SVID, BSD): @ref{Pipe to a Subprocess}. -@comment WEXITSTATUS -@item int WEXITSTATUS (int @var{status}) -@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. +@comment _PC_MAX_CANON +@item _PC_MAX_CANON -@comment WIFEXITED -@item int WIFEXITED (int @var{status}) -@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WIFSIGNALED -@item int WIFSIGNALED (int @var{status}) -@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. +@comment _PC_MAX_INPUT +@item _PC_MAX_INPUT -@comment WIFSTOPPED -@item int WIFSTOPPED (int @var{status}) -@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WRDE_APPEND -@item WRDE_APPEND -@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. +@comment _PC_NAME_MAX +@item _PC_NAME_MAX -@comment WRDE_BADCHAR -@item WRDE_BADCHAR -@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WRDE_BADVAL -@item WRDE_BADVAL -@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. +@comment _PC_NO_TRUNC +@item _PC_NO_TRUNC -@comment WRDE_CMDSUB -@item WRDE_CMDSUB -@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WRDE_DOOFFS -@item WRDE_DOOFFS -@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. +@comment _PC_PATH_MAX +@item _PC_PATH_MAX -@comment WRDE_NOCMD -@item WRDE_NOCMD -@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WRDE_NOSPACE -@item WRDE_NOSPACE -@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. +@comment _PC_PIPE_BUF +@item _PC_PIPE_BUF -@comment WRDE_REUSE -@item WRDE_REUSE -@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WRDE_SHOWERR -@item WRDE_SHOWERR -@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. +@comment _PC_VDISABLE +@item _PC_VDISABLE -@comment WRDE_SYNTAX -@item WRDE_SYNTAX -@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. +@file{unistd.h} (POSIX.1): @ref{Pathconf}. -@comment WRDE_UNDEF -@item WRDE_UNDEF -@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. +@comment PENDIN +@item PENDIN -@comment WSTOPSIG -@item int WSTOPSIG (int @var{status}) -@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. +@file{termios.h} (BSD): @ref{Local Modes}. -@comment WTERMSIG -@item int WTERMSIG (int @var{status}) -@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. +@comment perror +@item void perror (const char *@var{message}) -@comment W_OK -@item int W_OK -@file{unistd.h} (POSIX.1): @ref{Testing File Access}. +@file{stdio.h} (ANSI): @ref{Error Messages,}. -@comment X_OK -@item int X_OK -@file{unistd.h} (POSIX.1): @ref{Testing File Access}. +@comment PF_FILE +@item int PF_FILE -@comment _CS_PATH -@item _CS_PATH -@file{unistd.h} (POSIX.2): @ref{String Parameters}. +@file{sys/socket.h} (GNU): @ref{File Namespace Details}. -@comment _IOFBF -@item int _IOFBF -@file{stdio.h} (ANSI): @ref{Controlling Buffering}. +@comment PF_INET +@item int PF_INET -@comment _IOLBF -@item int _IOLBF -@file{stdio.h} (ANSI): @ref{Controlling Buffering}. +@file{sys/socket.h} (BSD): @ref{Internet Namespace}. -@comment _IONBF -@item int _IONBF -@file{stdio.h} (ANSI): @ref{Controlling Buffering}. +@comment PF_UNIX +@item int PF_UNIX -@comment _PC_CHOWN_RESTRICTED -@item _PC_CHOWN_RESTRICTED -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@file{sys/socket.h} (BSD): @ref{File Namespace Details}. -@comment _PC_LINK_MAX -@item _PC_LINK_MAX -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@comment pid_t +@item pid_t -@comment _PC_MAX_CANON -@item _PC_MAX_CANON -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@file{sys/types.h} (POSIX.1): @ref{Process Identification}. -@comment _PC_MAX_INPUT -@item _PC_MAX_INPUT -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@comment PIPE_BUF +@item int PIPE_BUF -@comment _PC_NAME_MAX -@item _PC_NAME_MAX -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@file{limits.h} (POSIX.1): @ref{Limits for Files}. -@comment _PC_NO_TRUNC -@item _PC_NO_TRUNC -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@comment pipe +@item int pipe (int @var{filedes}@t{[2]}) -@comment _PC_PATH_MAX -@item _PC_PATH_MAX -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@file{unistd.h} (POSIX.1): @ref{Creating a Pipe}. -@comment _PC_PIPE_BUF -@item _PC_PIPE_BUF -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@comment popen +@item FILE * popen (const char *@var{command}, const char *@var{mode}) -@comment _PC_VDISABLE -@item _PC_VDISABLE -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@file{stdio.h} (POSIX.2, SVID, BSD): @ref{Pipe to a Subprocess}. @comment _POSIX2_BC_BASE_MAX @item _POSIX2_BC_BASE_MAX + @file{limits.h} (POSIX.2): @ref{Utility Minimums}. @comment _POSIX2_BC_DIM_MAX @item _POSIX2_BC_DIM_MAX + @file{limits.h} (POSIX.2): @ref{Utility Minimums}. @comment _POSIX2_BC_SCALE_MAX @item _POSIX2_BC_SCALE_MAX + @file{limits.h} (POSIX.2): @ref{Utility Minimums}. @comment _POSIX2_BC_STRING_MAX @item _POSIX2_BC_STRING_MAX -@file{limits.h} (POSIX.2): @ref{Utility Minimums}. -@comment _POSIX2_COLL_WEIGHTS_MAX -@item _POSIX2_COLL_WEIGHTS_MAX @file{limits.h} (POSIX.2): @ref{Utility Minimums}. @comment _POSIX2_C_DEV @item int _POSIX2_C_DEV + @file{unistd.h} (POSIX.2): @ref{System Options}. +@comment _POSIX2_COLL_WEIGHTS_MAX +@item _POSIX2_COLL_WEIGHTS_MAX + +@file{limits.h} (POSIX.2): @ref{Utility Minimums}. + @comment _POSIX2_C_VERSION @item long int _POSIX2_C_VERSION + @file{unistd.h} (POSIX.2): @ref{Version Supported}. +@comment _POSIX2_EQUIV_CLASS_MAX +@item _POSIX2_EQUIV_CLASS_MAX + +@file{limits.h} (POSIX.2): @ref{Utility Minimums}. + @comment _POSIX2_EXPR_NEST_MAX @item _POSIX2_EXPR_NEST_MAX + @file{limits.h} (POSIX.2): @ref{Utility Minimums}. @comment _POSIX2_FORT_DEV @item int _POSIX2_FORT_DEV + @file{unistd.h} (POSIX.2): @ref{System Options}. @comment _POSIX2_FORT_RUN @item int _POSIX2_FORT_RUN + @file{unistd.h} (POSIX.2): @ref{System Options}. @comment _POSIX2_LINE_MAX @item _POSIX2_LINE_MAX + @file{limits.h} (POSIX.2): @ref{Utility Minimums}. @comment _POSIX2_LOCALEDEF @item int _POSIX2_LOCALEDEF + @file{unistd.h} (POSIX.2): @ref{System Options}. @comment _POSIX2_RE_DUP_MAX @item _POSIX2_RE_DUP_MAX + @file{limits.h} (POSIX.2): @ref{Minimums}. @comment _POSIX2_SW_DEV @item int _POSIX2_SW_DEV + @file{unistd.h} (POSIX.2): @ref{System Options}. @comment _POSIX_ARG_MAX @item _POSIX_ARG_MAX + @file{limits.h} (POSIX.1): @ref{Minimums}. @comment _POSIX_CHILD_MAX @item _POSIX_CHILD_MAX + @file{limits.h} (POSIX.1): @ref{Minimums}. @comment _POSIX_CHOWN_RESTRICTED @item int _POSIX_CHOWN_RESTRICTED + @file{unistd.h} (POSIX.1): @ref{Options for Files}. +@comment _POSIX_C_SOURCE +@item _POSIX_C_SOURCE + +(POSIX.2): @ref{Feature Test Macros,}. + @comment _POSIX_JOB_CONTROL @item int _POSIX_JOB_CONTROL + @file{unistd.h} (POSIX.1): @ref{System Options}. @comment _POSIX_LINK_MAX @item _POSIX_LINK_MAX + @file{limits.h} (POSIX.1): @ref{File Minimums}. @comment _POSIX_MAX_CANON @item _POSIX_MAX_CANON + @file{limits.h} (POSIX.1): @ref{File Minimums}. @comment _POSIX_MAX_INPUT @item _POSIX_MAX_INPUT + @file{limits.h} (POSIX.1): @ref{File Minimums}. @comment _POSIX_NAME_MAX @item _POSIX_NAME_MAX + @file{limits.h} (POSIX.1): @ref{File Minimums}. @comment _POSIX_NGROUPS_MAX @item _POSIX_NGROUPS_MAX + @file{limits.h} (POSIX.1): @ref{Minimums}. @comment _POSIX_NO_TRUNC @item int _POSIX_NO_TRUNC + @file{unistd.h} (POSIX.1): @ref{Options for Files}. @comment _POSIX_OPEN_MAX @item _POSIX_OPEN_MAX + @file{limits.h} (POSIX.1): @ref{Minimums}. @comment _POSIX_PATH_MAX @item _POSIX_PATH_MAX + @file{limits.h} (POSIX.1): @ref{File Minimums}. @comment _POSIX_PIPE_BUF @item _POSIX_PIPE_BUF + @file{limits.h} (POSIX.1): @ref{File Minimums}. @comment _POSIX_SAVED_IDS @item int _POSIX_SAVED_IDS + @file{unistd.h} (POSIX.1): @ref{System Options}. +@comment _POSIX_SOURCE +@item _POSIX_SOURCE + +(POSIX.1): @ref{Feature Test Macros,}. + @comment _POSIX_SSIZE_MAX @item _POSIX_SSIZE_MAX + @file{limits.h} (POSIX.1): @ref{Minimums}. @comment _POSIX_STREAM_MAX @item _POSIX_STREAM_MAX + @file{limits.h} (POSIX.1): @ref{Minimums}. @comment _POSIX_TZNAME_MAX @item _POSIX_TZNAME_MAX + @file{limits.h} (POSIX.1): @ref{Minimums}. @comment _POSIX_VDISABLE @item unsigned char _POSIX_VDISABLE + @file{unistd.h} (POSIX.1): @ref{Options for Files}. @comment _POSIX_VERSION @item long int _POSIX_VERSION -@file{unistd.h} (POSIX.1): @ref{Version Supported}. - -@comment _SC_2_C_DEV -@item _SC_2_C_DEV -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_2_FORT_DEV -@item _SC_2_FORT_DEV -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_2_FORT_RUN -@item _SC_2_FORT_RUN -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_2_LOCALEDEF -@item _SC_2_LOCALEDEF -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_2_SW_DEV -@item _SC_2_SW_DEV -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_2_VERSION -@item _SC_2_VERSION -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_ARG_MAX -@item _SC_ARG_MAX -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. - -@comment _SC_BC_BASE_MAX -@item _SC_BC_BASE_MAX -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_BC_DIM_MAX -@item _SC_BC_DIM_MAX -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_BC_SCALE_MAX -@item _SC_BC_SCALE_MAX -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_BC_STRING_MAX -@item _SC_BC_STRING_MAX -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_CHILD_MAX -@item _SC_CHILD_MAX -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. - -@comment _SC_CLK_TCK -@item _SC_CLK_TCK -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. - -@comment _SC_COLL_WEIGHTS_MAX -@item _SC_COLL_WEIGHTS_MAX -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_EXPR_NEST_MAX -@item _SC_EXPR_NEST_MAX -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_JOB_CONTROL -@item _SC_JOB_CONTROL -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. - -@comment _SC_LINE_MAX -@item _SC_LINE_MAX -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. - -@comment _SC_NGROUPS_MAX -@item _SC_NGROUPS_MAX -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. - -@comment _SC_OPEN_MAX -@item _SC_OPEN_MAX -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment _SC_SAVED_IDS -@item _SC_SAVED_IDS -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. +@file{unistd.h} (POSIX.1): @ref{Version Supported}. -@comment _SC_STREAM_MAX -@item _SC_STREAM_MAX -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. +@comment pow +@item double pow (double @var{base}, double @var{power}) -@comment _SC_TZNAME_MAX -@item _SC_TZNAME_MAX -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. +@file{math.h} (ANSI): @ref{Exponents and Logarithms}. -@comment _SC_VERSION -@item _SC_VERSION -@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. +@comment printf_arginfo_function +@item printf_arginfo_function -@comment _SC_VERSION -@item _SC_VERSION -@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. +@file{printf.h} (GNU): @ref{Defining the Output Handler}. -@comment __free_hook -@item __free_hook -@file{malloc.h} (GNU): @ref{Hooks for Malloc}. +@comment printf_function +@item printf_function -@comment __malloc_hook -@item __malloc_hook -@file{malloc.h} (GNU): @ref{Hooks for Malloc}. +@file{printf.h} (GNU): @ref{Defining the Output Handler}. -@comment __realloc_hook -@item __realloc_hook -@file{malloc.h} (GNU): @ref{Hooks for Malloc}. +@comment printf +@item int printf (const char *@var{template}, @dots{}) -@comment _exit -@item void _exit (int @var{status}) -@file{unistd.h} (POSIX.1): @ref{Termination Internals}. +@file{stdio.h} (ANSI): @ref{Formatted Output Functions}. -@comment _tolower -@item int _tolower (int @var{c}) -@file{ctype.h} (SVID): @ref{Case Conversion,}. +@comment PRIO_MAX +@item PRIO_MAX -@comment _toupper -@item int _toupper (int @var{c}) -@file{ctype.h} (SVID): @ref{Case Conversion,}. +@file{sys/resource.h} (BSD): @ref{Priority}. -@comment abort -@item void abort (void) -@file{stdlib.h} (ANSI): @ref{Aborting a Program}. +@comment PRIO_MIN +@item PRIO_MIN -@comment abs -@item int abs (int @var{number}) -@file{stdlib.h} (ANSI): @ref{Absolute Value}. +@file{sys/resource.h} (BSD): @ref{Priority}. -@comment accept -@item int accept (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) -@file{sys/socket.h} (BSD): @ref{Accepting Connections}. +@comment PRIO_PGRP +@item PRIO_PGRP -@comment access -@item int access (const char *@var{filename}, int @var{how}) -@file{unistd.h} (POSIX.1): @ref{Testing File Access}. +@file{sys/resource.h} (BSD): @ref{Priority}. -@comment acos -@item double acos (double @var{x}) -@file{math.h} (ANSI): @ref{Inverse Trig Functions}. +@comment PRIO_PROCESS +@item PRIO_PROCESS -@comment acosh -@item double acosh (double @var{x}) -@file{math.h} (BSD): @ref{Hyperbolic Functions}. +@file{sys/resource.h} (BSD): @ref{Priority}. -@comment adjtime -@item int adjtime (const struct timeval *@var{delta}, struct timeval *@var{olddelta}) -@file{sys/time.h} (BSD): @ref{High-Resolution Calendar}. +@comment PRIO_USER +@item PRIO_USER -@comment alarm -@item unsigned int alarm (unsigned int @var{seconds}) -@file{unistd.h} (POSIX.1): @ref{Setting an Alarm}. +@file{sys/resource.h} (BSD): @ref{Priority}. -@comment alloca -@item void * alloca (size_t @var{size}); -@file{stdlib.h} (GNU, BSD): @ref{Variable Size Automatic}. +@comment program_invocation_name +@item char * program_invocation_name -@comment asctime -@item char * asctime (const struct tm *@var{brokentime}) -@file{time.h} (ANSI): @ref{Formatting Date and Time}. +@file{errno.h} (GNU): @ref{Error Messages,}. -@comment asin -@item double asin (double @var{x}) -@file{math.h} (ANSI): @ref{Inverse Trig Functions}. +@comment program_invocation_short_name +@item char * program_invocation_short_name -@comment asinh -@item double asinh (double @var{x}) -@file{math.h} (BSD): @ref{Hyperbolic Functions}. +@file{errno.h} (GNU): @ref{Error Messages,}. -@comment asprintf -@item int asprintf (char **@var{ptr}, const char *@var{template}, @dots{}) -@file{stdio.h} (GNU): @ref{Dynamic Output}. +@comment psignal +@item void psignal (int @var{signum}, const char *@var{message}) -@comment assert -@item void assert (int @var{expression}) -@file{assert.h} (ANSI): @ref{Consistency Checking}. +@file{stdio.h} (BSD): @ref{Signal Messages}. -@comment atan -@item double atan (double @var{x}) -@file{math.h} (ANSI): @ref{Inverse Trig Functions}. +@comment P_tmpdir +@item char * P_tmpdir -@comment atan2 -@item double atan2 (double @var{y}, double @var{x}) -@file{math.h} (ANSI): @ref{Inverse Trig Functions}. +@file{stdio.h} (SVID): @ref{Temporary Files}. -@comment atanh -@item double atanh (double @var{x}) -@file{math.h} (BSD): @ref{Hyperbolic Functions}. +@comment ptrdiff_t +@item ptrdiff_t -@comment atexit -@item int atexit (void (*@var{function}) (void)) -@file{stdlib.h} (ANSI): @ref{Cleanups on Exit}. +@file{stddef.h} (ANSI): @ref{Important Data Types}. -@comment atof -@item double atof (const char *@var{string}) -@file{stdlib.h} (ANSI): @ref{Parsing of Floats}. +@comment putchar +@item int putchar (int @var{c}) -@comment atoi -@item int atoi (const char *@var{string}) -@file{stdlib.h} (ANSI): @ref{Parsing of Integers}. +@file{stdio.h} (ANSI): @ref{Simple Output}. -@comment atol -@item long int atol (const char *@var{string}) -@file{stdlib.h} (ANSI): @ref{Parsing of Integers}. +@comment putc +@item int putc (int @var{c}, FILE *@var{stream}) -@comment bcmp -@item int bcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size}) -@file{string.h} (BSD): @ref{String/Array Comparison,}. +@file{stdio.h} (ANSI): @ref{Simple Output}. -@comment bcopy -@item void * bcopy (void *@var{from}, const void *@var{to}, size_t @var{size}) -@file{string.h} (BSD): @ref{Copying and Concatenation,}. +@comment putenv +@item int putenv (const char *@var{string}) -@comment bind -@item int bind (int @var{socket}, struct sockaddr *@var{addr}, size_t @var{length}) -@file{sys/socket.h} (BSD): @ref{Setting Address}. +@file{stdlib.h} (SVID): @ref{Environment Access}. -@comment bsearch -@item void * bsearch (const void *@var{key}, const void *@var{array}, size_t @var{count}, size_t @var{size}, comparison_fn_t @var{compare}) -@file{stdlib.h} (ANSI): @ref{Array Search Function,}. +@comment putpwent +@item int putpwent (const struct passwd *@var{p}, FILE *@var{stream}) -@comment bzero -@item void * bzero (void *@var{block}, size_t @var{size}) -@file{string.h} (BSD): @ref{Copying and Concatenation,}. +@file{pwd.h} (SVID): @ref{Writing a User Entry}. -@comment cabs -@item double cabs (struct @{ double real, imag; @} @var{z}) -@file{math.h} (BSD): @ref{Absolute Value}. +@comment puts +@item int puts (const char *@var{s}) -@comment calloc -@item void * calloc (size_t @var{count}, size_t @var{eltsize}) -@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Allocating Cleared Space}. +@file{stdio.h} (ANSI): @ref{Simple Output}. -@comment cbrt -@item double cbrt (double @var{x}) -@file{math.h} (GNU): @ref{Exponents and Logarithms}. +@comment putw +@item int putw (int @var{w}, FILE *@var{stream}) -@comment cc_t -@item cc_t -@file{termios.h} (POSIX.1): @ref{Mode Data Types}. +@file{stdio.h} (SVID): @ref{Simple Output}. -@comment ceil -@item double ceil (double @var{x}) -@file{math.h} (ANSI): @ref{Rounding and Remainders}. +@comment qsort +@item void qsort (void *@var{array}, size_t @var{count}, size_t @var{size}, comparison_fn_t @var{compare}) -@comment cfgetispeed -@item speed_t cfgetispeed (const struct termios *@var{termios_p}) -@file{termios.h} (POSIX.1): @ref{Line Speed}. +@file{stdlib.h} (ANSI): @ref{Array Sort Function,}. -@comment cfgetospeed -@item speed_t cfgetospeed (const struct termios *@var{termios_p}) -@file{termios.h} (POSIX.1): @ref{Line Speed}. +@comment raise +@item int raise (int @var{signum}) -@comment cfmakeraw -@item int cfmakeraw (struct termios *@var{termios_p}) -@file{termios.h} (BSD): @ref{Line Speed}. +@file{signal.h} (ANSI): @ref{Signaling Yourself}. -@comment cfree -@item void cfree (void *@var{ptr}) -@file{stdlib.h} (Sun): @ref{Freeing after Malloc}. +@comment r_alloc_free +@item void r_alloc_free (void **@var{handleptr}) -@comment cfsetispeed -@item int cfsetispeed (struct termios *@var{termios_p}, speed_t @var{speed}) -@file{termios.h} (POSIX.1): @ref{Line Speed}. +@file{malloc.h} (GNU): @ref{Using Relocator}. -@comment cfsetospeed -@item int cfsetospeed (struct termios *@var{termios_p}, speed_t @var{speed}) -@file{termios.h} (POSIX.1): @ref{Line Speed}. +@comment r_alloc +@item void * r_alloc (void **@var{handleptr}, size_t @var{size}) -@comment cfsetspeed -@item int cfsetspeed (struct termios *@var{termios_p}, speed_t @var{speed}) -@file{termios.h} (BSD): @ref{Line Speed}. +@file{malloc.h} (GNU): @ref{Using Relocator}. -@comment chdir -@item int chdir (const char *@var{filename}) -@file{unistd.h} (POSIX.1): @ref{Working Directory}. +@comment rand +@item int rand () -@comment chmod -@item int chmod (const char *@var{filename}, mode_t @var{mode}) -@file{sys/stat.h} (POSIX.1): @ref{Setting Permissions}. +@file{stdlib.h} (ANSI): @ref{ANSI Random}. -@comment chown -@item int chown (const char *@var{filename}, uid_t @var{owner}, gid_t @var{group}) -@file{unistd.h} (POSIX.1): @ref{File Owner}. +@comment RAND_MAX +@item int RAND_MAX -@comment clearerr -@item void clearerr (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{EOF and Errors}. +@file{stdlib.h} (ANSI): @ref{ANSI Random}. -@comment clock -@item clock_t clock (void) -@file{time.h} (ANSI): @ref{Basic CPU Time}. +@comment random +@item long int random () -@comment clock_t -@item clock_t -@file{time.h} (ANSI): @ref{Basic CPU Time}. +@file{stdlib.h} (BSD): @ref{BSD Random}. -@comment close -@item int close (int @var{filedes}) -@file{unistd.h} (POSIX.1): @ref{Opening and Closing Files}. +@comment readdir +@item struct dirent * readdir (DIR *@var{dirstream}) -@comment closedir -@item int closedir (DIR *@var{dirstream}) @file{dirent.h} (POSIX.1): @ref{Reading/Closing Directory}. -@comment confstr -@item size_t confstr (int @var{parameter}, char *@var{buf}, size_t @var{len}) -@file{unistd.h} (POSIX.2): @ref{String Parameters}. - -@comment connect -@item int connect (int @var{socket}, struct sockaddr *@var{addr}, size_t @var{length}) -@file{sys/socket.h} (BSD): @ref{Connecting}. - -@comment cookie_close_function -@item cookie_close_function -@file{stdio.h} (GNU): @ref{Hook Functions}. - -@comment cookie_read_function -@item cookie_read_function -@file{stdio.h} (GNU): @ref{Hook Functions}. - -@comment cookie_seek_function -@item cookie_seek_function -@file{stdio.h} (GNU): @ref{Hook Functions}. - -@comment cookie_write_function -@item cookie_write_function -@file{stdio.h} (GNU): @ref{Hook Functions}. - -@comment copysign -@item double copysign (double @var{value}, double @var{sign}) -@file{math.h} (BSD): @ref{Normalization Functions}. - -@comment cos -@item double cos (double @var{x}) -@file{math.h} (ANSI): @ref{Trig Functions}. - -@comment cosh -@item double cosh (double @var{x}) -@file{math.h} (ANSI): @ref{Hyperbolic Functions}. - -@comment creat -@item int creat (const char *@var{filename}, mode_t @var{mode}) -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. - -@comment ctermid -@item char * ctermid (char *@var{string}) -@file{stdio.h} (POSIX.1): @ref{Identifying the Terminal,}. - -@comment ctime -@item char * ctime (const time_t *@var{time}) -@file{time.h} (ANSI): @ref{Formatting Date and Time}. - -@comment cuserid -@item char * cuserid (char *@var{string}) -@file{stdio.h} (POSIX.1): @ref{Who Logged In}. - -@comment daylight -@item int daylight -@file{time.h} (SVID): @ref{Time Zone Functions}. - -@comment dev_t -@item dev_t -@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. - -@comment difftime -@item double difftime (time_t @var{time1}, time_t @var{time0}) -@file{time.h} (ANSI): @ref{Simple Calendar Time}. - -@comment div -@item div_t div (int @var{numerator}, int @var{denominator}) -@file{stdlib.h} (ANSI): @ref{Integer Division}. - -@comment div_t -@item div_t -@file{stdlib.h} (ANSI): @ref{Integer Division}. - -@comment drem -@item double drem (double @var{numerator}, double @var{denominator}) -@file{math.h} (BSD): @ref{Rounding and Remainders}. - -@comment dup -@item int dup (int @var{old}) -@file{unistd.h} (POSIX.1): @ref{Duplicating Descriptors}. - -@comment dup2 -@item int dup2 (int @var{old}, int @var{new}) -@file{unistd.h} (POSIX.1): @ref{Duplicating Descriptors}. - -@comment endgrent -@item void endgrent (void) -@file{grp.h} (SVID, BSD): @ref{Scanning All Groups}. - -@comment endhostent -@item void endhostent () -@file{netdb.h} (BSD): @ref{Host Names}. - -@comment endnetent -@item void endnetent (void) -@file{netdb.h} (BSD): @ref{Networks Database}. - -@comment endprotoent -@item void endprotoent (void) -@file{netdb.h} (BSD): @ref{Protocols Database}. - -@comment endpwent -@item void endpwent (void) -@file{pwd.h} (SVID, BSD): @ref{Scanning All Users}. - -@comment endservent -@item void endservent (void) -@file{netdb.h} (BSD): @ref{Services Database}. - -@comment environ -@item char ** environ -@file{unistd.h} (POSIX.1): @ref{Environment Access}. - -@comment errno -@item volatile int errno -@file{errno.h} (ANSI): @ref{Checking for Errors,}. - -@comment execl -@item int execl (const char *@var{filename}, const char *@var{arg0}, @dots{}) -@file{unistd.h} (POSIX.1): @ref{Executing a File}. - -@comment execle -@item int execle (const char *@var{filename}, const char *@var{arg0}, char *const @var{env}@t{[]}, @dots{}) -@file{unistd.h} (POSIX.1): @ref{Executing a File}. - -@comment execlp -@item int execlp (const char *@var{filename}, const char *@var{arg0}, @dots{}) -@file{unistd.h} (POSIX.1): @ref{Executing a File}. +@comment read +@item ssize_t read (int @var{filedes}, void *@var{buffer}, size_t @var{size}) -@comment execv -@item int execv (const char *@var{filename}, char *const @var{argv}@t{[]}) -@file{unistd.h} (POSIX.1): @ref{Executing a File}. +@file{unistd.h} (POSIX.1): @ref{I/O Primitives}. -@comment execve -@item int execve (const char *@var{filename}, char *const @var{argv}@t{[]}, char *const @var{env}@t{[]}) -@file{unistd.h} (POSIX.1): @ref{Executing a File}. +@comment readlink +@item int readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size}) -@comment execvp -@item int execvp (const char *@var{filename}, char *const @var{argv}@t{[]}) -@file{unistd.h} (POSIX.1): @ref{Executing a File}. +@file{unistd.h} (BSD): @ref{Symbolic Links}. -@comment exit -@item void exit (int @var{status}) -@file{stdlib.h} (ANSI): @ref{Normal Termination}. +@comment __realloc_hook +@item __realloc_hook -@comment exp -@item double exp (double @var{x}) -@file{math.h} (ANSI): @ref{Exponents and Logarithms}. +@file{malloc.h} (GNU): @ref{Hooks for Malloc}. -@comment expm1 -@item double expm1 (double @var{x}) -@file{math.h} (BSD): @ref{Exponents and Logarithms}. +@comment realloc +@item void * realloc (void *@var{ptr}, size_t @var{newsize}) -@comment fabs -@item double fabs (double @var{number}) -@file{math.h} (ANSI): @ref{Absolute Value}. +@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Changing Block Size}. -@comment fchmod -@item int fchmod (int @var{filedes}, int @var{mode}) -@file{sys/stat.h} (BSD): @ref{Setting Permissions}. +@comment recvfrom +@item int recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) -@comment fchown -@item int fchown (int @var{filedes}, int @var{owner}, int @var{group}) -@file{unistd.h} (BSD): @ref{File Owner}. +@file{sys/socket.h} (BSD): @ref{Receiving Datagrams}. -@comment fclean -@item int fclean (@var{stream}) -@file{stdio.h} (GNU): @ref{Cleaning Streams}. +@comment recv +@item int recv (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}) -@comment fclose -@item int fclose (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Closing Streams}. +@file{sys/socket.h} (BSD): @ref{Receiving Data}. -@comment fcntl -@item int fcntl (int @var{filedes}, int @var{command}, @dots{}) -@file{fcntl.h} (POSIX.1): @ref{Control Operations}. +@comment recvmsg +@item int recvmsg (int @var{socket}, struct msghdr *@var{message}, int @var{flags}) -@comment fd_set -@item fd_set -@file{sys/types.h} (BSD): @ref{Waiting for I/O}. +@file{sys/socket.h} (BSD): @ref{Receiving Datagrams}. -@comment fdopen -@item FILE * fdopen (int @var{filedes}, const char *@var{opentype}) -@file{stdio.h} (POSIX.1): @ref{Descriptors and Streams}. +@comment RE_DUP_MAX +@item int RE_DUP_MAX -@comment feof -@item int feof (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{EOF and Errors}. +@file{limits.h} (POSIX.2): @ref{General Limits}. -@comment ferror -@item int ferror (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{EOF and Errors}. +@comment REG_BADBR +@item REG_BADBR -@comment fflush -@item int fflush (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Flushing Buffers}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fgetc -@item int fgetc (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Character Input}. +@comment REG_BADPAT +@item REG_BADPAT -@comment fgetgrent -@item struct group * fgetgrent (FILE *@var{stream}) -@file{grp.h} (SVID): @ref{Scanning All Groups}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fgetpos -@item int fgetpos (FILE *@var{stream}, fpos_t *@var{position}) -@file{stdio.h} (ANSI): @ref{Portable Positioning}. +@comment REG_BADRPT +@item REG_BADRPT -@comment fgetpwent -@item struct passwd * fgetpwent (FILE *@var{stream}) -@file{pwd.h} (SVID): @ref{Scanning All Users}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fgets -@item char * fgets (char *@var{s}, int @var{count}, FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Line Input}. +@comment regcomp +@item int regcomp (regex_t *@var{compiled}, const char *@var{pattern}, int @var{cflags}) -@comment fileno -@item int fileno (FILE *@var{stream}) -@file{stdio.h} (POSIX.1): @ref{Descriptors and Streams}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment finite -@item int finite (double @var{x}) -@file{math.h} (BSD): @ref{Predicates on Floats}. +@comment REG_EBRACE +@item REG_EBRACE -@comment flock -@item flock -@file{fcntl.h} (POSIX.1): @ref{File Locks}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment floor -@item double floor (double @var{x}) -@file{math.h} (ANSI): @ref{Rounding and Remainders}. +@comment REG_EBRACK +@item REG_EBRACK -@comment fmemopen -@item FILE * fmemopen (void *@var{buf}, size_t @var{size}, const char *@var{opentype}) -@file{stdio.h} (GNU): @ref{String Streams}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fmod -@item double fmod (double @var{numerator}, double @var{denominator}) -@file{math.h} (ANSI): @ref{Rounding and Remainders}. +@comment REG_ECOLLATE +@item REG_ECOLLATE -@comment fnmatch -@item int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags}) -@file{fnmatch.h} (POSIX.2): @ref{Wildcard Matching}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fopen -@item FILE * fopen (const char *@var{filename}, const char *@var{opentype}) -@file{stdio.h} (ANSI): @ref{Opening Streams}. +@comment REG_ECTYPE +@item REG_ECTYPE -@comment fopencookie -@item FILE * fopencookie (void *@var{cookie}, const char *@var{opentype}, struct cookie_functions @var{io_functions}) -@file{stdio.h} (GNU): @ref{Streams and Cookies}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fork -@item pid_t fork (void) -@file{unistd.h} (POSIX.1): @ref{Creating a Process}. +@comment REG_EESCAPE +@item REG_EESCAPE -@comment fpathconf -@item long int fpathconf (int @var{filedes}, int @var{parameter}) -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fpos_t -@item fpos_t -@file{stdio.h} (ANSI): @ref{Portable Positioning}. +@comment REG_EPAREN +@item REG_EPAREN -@comment fprintf -@item int fprintf (FILE *@var{stream}, const char *@var{template}, @dots{}) -@file{stdio.h} (ANSI): @ref{Formatted Output Functions}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fputc -@item int fputc (int @var{c}, FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Simple Output}. +@comment REG_ERANGE +@item REG_ERANGE -@comment fputs -@item int fputs (const char *@var{s}, FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Simple Output}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fread -@item size_t fread (void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Block Input/Output}. +@comment regerror +@item size_t regerror (int @var{errcode}, regex_t *@var{compiled}, char *@var{buffer}, size_t @var{length}) -@comment free -@item void free (void *@var{ptr}) -@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Freeing after Malloc}. +@file{regex.h} (POSIX.2): @ref{Regexp Cleanup}. -@comment freopen -@item FILE * freopen (const char *@var{filename}, const char *@var{opentype}, FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Opening Streams}. +@comment REG_ESPACE +@item REG_ESPACE -@comment frexp -@item double frexp (double @var{value}, int *@var{exponent}) -@file{math.h} (ANSI): @ref{Normalization Functions}. +@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. -@comment fscanf -@item int fscanf (FILE *@var{stream}, const char *@var{template}, @dots{}) -@file{stdio.h} (ANSI): @ref{Formatted Input Functions}. +@comment REG_ESPACE +@item REG_ESPACE -@comment fseek -@item int fseek (FILE *@var{stream}, long int @var{offset}, int @var{whence}) -@file{stdio.h} (ANSI): @ref{File Positioning}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment fsetpos -@item int fsetpos (FILE *@var{stream}, const fpos_t @var{position}) -@file{stdio.h} (ANSI): @ref{Portable Positioning}. +@comment REG_ESUBREG +@item REG_ESUBREG -@comment fstat -@item int fstat (int @var{filedes}, struct stat *@var{buf}) -@file{sys/stat.h} (POSIX.1): @ref{Reading Attributes}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment ftell -@item long int ftell (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{File Positioning}. +@comment regexec +@item int regexec (regex_t *@var{compiled}, char *@var{string}, size_t @var{nmatch}, regmatch_t @var{matchptr} @t{[]}, int @var{eflags}) -@comment fwrite -@item size_t fwrite (const void *@var{data}, size_t @var{size}, size_t @var{count}, FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Block Input/Output}. +@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. -@comment getc -@item int getc (FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Character Input}. +@comment REG_EXTENDED +@item REG_EXTENDED -@comment getchar -@item int getchar (void) -@file{stdio.h} (ANSI): @ref{Character Input}. +@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. -@comment getcwd -@item char * getcwd (char *@var{buffer}, size_t @var{size}) -@file{unistd.h} (POSIX.1): @ref{Working Directory}. +@comment regex_t +@item regex_t -@comment getdelim -@item ssize_t getdelim (char **@var{lineptr}, size_t *@var{n}, int @var{delimiter}, FILE *@var{stream}) -@file{stdio.h} (GNU): @ref{Line Input}. +@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. -@comment getegid -@item gid_t getegid (void) -@file{unistd.h} (POSIX.1): @ref{Reading Persona}. +@comment regfree +@item void regfree (regex_t *@var{compiled}) -@comment getenv -@item char * getenv (const char *@var{name}) -@file{stdlib.h} (ANSI): @ref{Environment Access}. +@file{regex.h} (POSIX.2): @ref{Regexp Cleanup}. -@comment geteuid -@item uid_t geteuid (void) -@file{unistd.h} (POSIX.1): @ref{Reading Persona}. +@comment REG_ICASE +@item REG_ICASE -@comment getgid -@item gid_t getgid (void) -@file{unistd.h} (POSIX.1): @ref{Reading Persona}. +@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. -@comment getgrent -@item struct group * getgrent (void) -@file{grp.h} (SVID, BSD): @ref{Scanning All Groups}. +@comment register_printf_function +@item int register_printf_function (int @var{spec}, printf_function @var{handler_function}, printf_arginfo_function @var{arginfo_function}) -@comment getgrgid -@item struct group * getgrgid (gid_t @var{gid}) -@file{grp.h} (POSIX.1): @ref{Lookup Group}. +@file{printf.h} (GNU): @ref{Registering New Conversions}. -@comment getgrnam -@item struct group * getgrnam (const char *@var{name}) -@file{grp.h} (POSIX.1): @ref{Lookup Group}. +@comment regmatch_t +@item regmatch_t -@comment getgroups -@item int getgroups (int @var{count}, gid_t *@var{groups}) -@file{unistd.h} (POSIX.1): @ref{Reading Persona}. +@file{regex.h} (POSIX.2): @ref{Regexp Subexpressions}. -@comment gethostbyaddr -@item struct hostent * gethostbyaddr (const char *@var{addr}, int @var{length}, int @var{format}) -@file{netdb.h} (BSD): @ref{Host Names}. +@comment REG_NEWLINE +@item REG_NEWLINE -@comment gethostbyname -@item struct hostent * gethostbyname (const char *@var{name}) -@file{netdb.h} (BSD): @ref{Host Names}. +@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. -@comment gethostent -@item struct hostent * gethostent () -@file{netdb.h} (BSD): @ref{Host Names}. +@comment REG_NOMATCH +@item REG_NOMATCH -@comment gethostid -@item long int gethostid (void) -@file{unistd.h} (BSD): @ref{Host Identification}. +@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. -@comment gethostname -@item int gethostname (char *@var{name}, size_t @var{size}) -@file{unistd.h} (BSD): @ref{Host Identification}. +@comment REG_NOSUB +@item REG_NOSUB -@comment getitimer -@item int getitimer (int @var{which}, struct itimerval *@var{old}) -@file{sys/time.h} (BSD): @ref{Setting an Alarm}. +@file{regex.h} (POSIX.2): @ref{Flags for POSIX Regexps}. -@comment getline -@item ssize_t getline (char **@var{lineptr}, size_t *@var{n}, FILE *@var{stream}) -@file{stdio.h} (GNU): @ref{Line Input}. +@comment REG_NOTBOL +@item REG_NOTBOL -@comment getlogin -@item char * getlogin (void) -@file{unistd.h} (POSIX.1): @ref{Who Logged In}. +@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. -@comment getnetbyaddr -@item struct netent * getnetbyaddr (long @var{net}, int @var{type}) -@file{netdb.h} (BSD): @ref{Networks Database}. +@comment REG_NOTEOL +@item REG_NOTEOL -@comment getnetbyname -@item struct netent * getnetbyname (const char *@var{name}) -@file{netdb.h} (BSD): @ref{Networks Database}. +@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. -@comment getnetent -@item struct netent * getnetent (void) -@file{netdb.h} (BSD): @ref{Networks Database}. +@comment regoff_t +@item regoff_t -@comment getopt -@item int getopt (int @var{argc}, char **@var{argv}, const char *@var{options}) -@file{unistd.h} (POSIX.2): @ref{Parsing Options}. +@file{regex.h} (POSIX.2): @ref{Regexp Subexpressions}. -@comment getopt_long -@item int getopt_long (int @var{argc}, char **@var{argv}, const char *@var{shortopts}, struct option *@var{longopts}, int *@var{indexptr}) -@file{getopt.h} (GNU): @ref{Long Options}. +@comment remove +@item int remove (const char *@var{filename}) -@comment getpeername -@item int getpeername (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) -@file{sys/socket.h} (BSD): @ref{Who is Connected}. +@file{stdio.h} (ANSI): @ref{Deleting Files}. -@comment getpgrp -@item pid_t getpgrp (pid_t @var{pid}) -@file{unistd.h} (BSD): @ref{Process Group Functions,}. +@comment rename +@item int rename (const char *@var{oldname}, const char *@var{newname}) -@comment getpgrp -@item pid_t getpgrp (void) -@file{unistd.h} (POSIX.1): @ref{Process Group Functions,}. +@file{stdio.h} (ANSI): @ref{Renaming Files}. -@comment getpid -@item pid_t getpid (void) -@file{unistd.h} (POSIX.1): @ref{Process Identification}. +@comment rewinddir +@item void rewinddir (DIR *@var{dirstream}) -@comment getppid -@item pid_t getppid (void) -@file{unistd.h} (POSIX.1): @ref{Process Identification}. +@file{dirent.h} (POSIX.1): @ref{Random Access Directory}. -@comment getpriority -@item int getpriority (int @var{class}, int @var{id}) -@file{sys/resource.h} (BSD): @ref{Priority}. +@comment rewind +@item void rewind (FILE *@var{stream}) -@comment getprotobyname -@item struct protoent * getprotobyname (const char *@var{name}) -@file{netdb.h} (BSD): @ref{Protocols Database}. +@file{stdio.h} (ANSI): @ref{File Positioning}. -@comment getprotobynumber -@item struct protoent * getprotobynumber (int @var{protocol}) -@file{netdb.h} (BSD): @ref{Protocols Database}. +@comment rindex +@item char * rindex (const char *@var{string}, int @var{c}) -@comment getprotoent -@item struct protoent * getprotoent (void) -@file{netdb.h} (BSD): @ref{Protocols Database}. +@file{string.h} (BSD): @ref{Search Functions,}. -@comment getpwent -@item struct passwd * getpwent (void) -@file{pwd.h} (SVID, BSD): @ref{Scanning All Users}. +@comment rint +@item double rint (double @var{x}) -@comment getpwnam -@item struct passwd * getpwnam (const char *@var{name}) -@file{pwd.h} (POSIX.1): @ref{Lookup User}. +@file{math.h} (BSD): @ref{Rounding and Remainders}. -@comment getpwuid -@item struct passwd * getpwuid (uid_t @var{uid}) -@file{pwd.h} (POSIX.1): @ref{Lookup User}. +@comment RLIMIT_CORE +@item RLIMIT_CORE -@comment getrlimit -@item int getrlimit (int @var{resource}, struct rlimit *@var{rlp}) @file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment getrusage -@item int getrusage (int @var{processes}, struct rusage *@var{rusage}) -@file{sys/resource.h} (BSD): @ref{Resource Usage}. - -@comment gets -@item char * gets (char *@var{s}) -@file{stdio.h} (ANSI): @ref{Line Input}. - -@comment getservbyname -@item struct servent * getservbyname (const char *@var{name}, const char *@var{proto}) -@file{netdb.h} (BSD): @ref{Services Database}. - -@comment getservbyport -@item struct servent * getservbyport (int @var{port}, const char *@var{proto}) -@file{netdb.h} (BSD): @ref{Services Database}. - -@comment getservent -@item struct servent * getservent (void) -@file{netdb.h} (BSD): @ref{Services Database}. - -@comment getsockname -@item int getsockname (int @var{socket}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) -@file{sys/socket.h} (BSD): @ref{Reading Address}. - -@comment getsockopt -@item int getsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, size_t *@var{optlen_ptr}) -@file{sys/socket.h} (BSD): @ref{Socket Option Functions}. - -@comment gettimeofday -@item int gettimeofday (struct timeval *@var{tp}, struct timezone *@var{tzp}) -@file{sys/time.h} (BSD): @ref{High-Resolution Calendar}. - -@comment getuid -@item uid_t getuid (void) -@file{unistd.h} (POSIX.1): @ref{Reading Persona}. - -@comment getumask -@item mode_t getumask (void) -@file{sys/stat.h} (GNU): @ref{Setting Permissions}. - -@comment getw -@item int getw (FILE *@var{stream}) -@file{stdio.h} (SVID): @ref{Character Input}. - -@comment getwd -@item char * getwd (char *@var{buffer}) -@file{unistd.h} (BSD): @ref{Working Directory}. - -@comment gid_t -@item gid_t -@file{sys/types.h} (POSIX.1): @ref{Reading Persona}. - -@comment glob -@item int glob (const char *@var{pattern}, int @var{flags}, int (*@var{errfunc}) (const char *@var{filename}, int @var{error-code}), glob_t *@var{vector_ptr}) -@file{glob.h} (POSIX.2): @ref{Calling Glob}. - -@comment glob_t -@item glob_t -@file{glob.h} (POSIX.2): @ref{Calling Glob}. - -@comment gmtime -@item struct tm * gmtime (const time_t *@var{time}) -@file{time.h} (ANSI): @ref{Broken-down Time}. - -@comment gsignal -@item int gsignal (int @var{signum}) -@file{signal.h} (SVID): @ref{Signaling Yourself}. - -@comment htonl -@item unsigned long int htonl (unsigned long int @var{hostlong}) -@file{netinet/in.h} (BSD): @ref{Byte Order}. +@comment RLIMIT_CPU +@item RLIMIT_CPU -@comment htons -@item unsigned short int htons (unsigned short int @var{hostshort}) -@file{netinet/in.h} (BSD): @ref{Byte Order}. +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment hypot -@item double hypot (double @var{x}, double @var{y}) -@file{math.h} (BSD): @ref{Exponents and Logarithms}. +@comment RLIMIT_DATA +@item RLIMIT_DATA -@comment inet_addr -@item unsigned long int inet_addr (const char *@var{name}) -@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment inet_lnaof -@item int inet_lnaof (struct in_addr @var{addr}) -@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. +@comment RLIMIT_FSIZE +@item RLIMIT_FSIZE -@comment inet_makeaddr -@item struct in_addr inet_makeaddr (int @var{net}, int @var{local}) -@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment inet_netof -@item int inet_netof (struct in_addr @var{addr}) -@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. +@comment RLIMIT_OPEN_FILES +@item RLIMIT_OPEN_FILES -@comment inet_network -@item unsigned long int inet_network (const char *@var{name}) -@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment inet_ntoa -@item char * inet_ntoa (struct in_addr @var{addr}) -@file{arpa/inet.h} (BSD): @ref{Host Address Functions}. +@comment RLIMIT_RSS +@item RLIMIT_RSS -@comment infnan -@item double infnan (int @var{error}) -@file{math.h} (BSD): @ref{Predicates on Floats}. +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment initgroups -@item int initgroups (const char *@var{user}, gid_t @var{gid}) -@file{grp.h} (BSD): @ref{Setting Groups}. +@comment RLIMIT_STACK +@item RLIMIT_STACK -@comment initstate -@item void * initstate (unsigned int @var{seed}, void *@var{state}, size_t @var{size}) -@file{stdlib.h} (BSD): @ref{BSD Random}. +@file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment ino_t -@item ino_t -@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. +@comment RLIM_NLIMITS +@item RLIM_NLIMITS -@comment int -@item int RLIM_INFINITY @file{sys/resource.h} (BSD): @ref{Limits on Resources}. -@comment isalnum -@item int isalnum (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. - -@comment isalpha -@item int isalpha (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@comment rmdir +@item int rmdir (const char *@var{filename}) -@comment isascii -@item int isascii (int @var{c}) -@file{ctype.h} (SVID, BSD): @ref{Classification of Characters,}. +@file{unistd.h} (POSIX.1): @ref{Deleting Files}. -@comment isatty -@item int isatty (int @var{filedes}) -@file{unistd.h} (POSIX.1): @ref{Is It a Terminal}. +@comment R_OK +@item int R_OK -@comment isblank -@item int isblank (int @var{c}) -@file{ctype.h} (GNU): @ref{Classification of Characters,}. +@file{unistd.h} (POSIX.1): @ref{Testing File Access}. -@comment iscntrl -@item int iscntrl (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@comment r_re_alloc +@item void * r_re_alloc (void **@var{handleptr}, size_t @var{size}) -@comment isdigit -@item int isdigit (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@file{malloc.h} (GNU): @ref{Using Relocator}. -@comment isgraph -@item int isgraph (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@comment RUSAGE_CHILDREN +@item RUSAGE_CHILDREN -@comment isinf -@item int isinf (double @var{x}) -@file{math.h} (BSD): @ref{Predicates on Floats}. +@file{sys/resource.h} (BSD): @ref{Resource Usage}. -@comment islower -@item int islower (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@comment RUSAGE_SELF +@item RUSAGE_SELF -@comment isnan -@item int isnan (double @var{x}) -@file{math.h} (BSD): @ref{Predicates on Floats}. +@file{sys/resource.h} (BSD): @ref{Resource Usage}. -@comment isprint -@item int isprint (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@comment SA_NOCLDSTOP +@item int SA_NOCLDSTOP -@comment ispunct -@item int ispunct (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@file{signal.h} (POSIX.1): @ref{Flags for Sigaction}. -@comment isspace -@item int isspace (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@comment SA_ONSTACK +@item int SA_ONSTACK -@comment isupper -@item int isupper (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@file{signal.h} (BSD): @ref{Flags for Sigaction}. -@comment isxdigit -@item int isxdigit (int @var{c}) -@file{ctype.h} (ANSI): @ref{Classification of Characters,}. +@comment SA_RESTART +@item int SA_RESTART -@comment jmp_buf -@item jmp_buf -@file{setjmp.h} (ANSI): @ref{Non-Local Details,}. +@file{signal.h} (BSD): @ref{Flags for Sigaction}. -@comment kill -@item int kill (pid_t @var{pid}, int @var{signum}) -@file{signal.h} (POSIX.1): @ref{Signaling Another Process}. +@comment _SC_2_C_DEV +@item _SC_2_C_DEV -@comment killpg -@item int killpg (int @var{pgid}, int @var{signum}) -@file{signal.h} (BSD): @ref{Signaling Another Process}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment labs -@item long int labs (long int @var{number}) -@file{stdlib.h} (ANSI): @ref{Absolute Value}. +@comment _SC_2_FORT_DEV +@item _SC_2_FORT_DEV -@comment ldexp -@item double ldexp (double @var{value}, int @var{exponent}) -@file{math.h} (ANSI): @ref{Normalization Functions}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment ldiv -@item ldiv_t ldiv (long int @var{numerator}, long int @var{denominator}) -@file{stdlib.h} (ANSI): @ref{Integer Division}. +@comment _SC_2_FORT_RUN +@item _SC_2_FORT_RUN -@comment ldiv_t -@item ldiv_t -@file{stdlib.h} (ANSI): @ref{Integer Division}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment link -@item int link (const char *@var{oldname}, const char *@var{newname}) -@file{unistd.h} (POSIX.1): @ref{Hard Links}. +@comment _SC_2_LOCALEDEF +@item _SC_2_LOCALEDEF -@comment listen -@item int listen (int @var{socket}, unsigned int @var{n}) -@file{sys/socket.h} (BSD): @ref{Listening}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment localeconv -@item struct lconv * localeconv (void) -@file{locale.h} (ANSI): @ref{Numeric Formatting,}. +@comment _SC_2_SW_DEV +@item _SC_2_SW_DEV -@comment localtime -@item struct tm * localtime (const time_t *@var{time}) -@file{time.h} (ANSI): @ref{Broken-down Time}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment log -@item double log (double @var{x}) -@file{math.h} (ANSI): @ref{Exponents and Logarithms}. +@comment _SC_2_VERSION +@item _SC_2_VERSION -@comment log10 -@item double log10 (double @var{x}) -@file{math.h} (ANSI): @ref{Exponents and Logarithms}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment log1p -@item double log1p (double @var{x}) -@file{math.h} (BSD): @ref{Exponents and Logarithms}. +@comment scalb +@item double scalb (double @var{value}, int @var{exponent}) -@comment logb -@item double logb (double @var{x}) @file{math.h} (BSD): @ref{Normalization Functions}. -@comment longjmp -@item void longjmp (jmp_buf @var{state}, int @var{value}) -@file{setjmp.h} (ANSI): @ref{Non-Local Details,}. - -@comment lseek -@item off_t lseek (int @var{filedes}, off_t @var{offset}, int @var{whence}) -@file{unistd.h} (POSIX.1): @ref{File Position Primitive}. - -@comment lstat -@item int lstat (const char *@var{filename}, struct stat *@var{buf}) -@file{sys/stat.h} (BSD): @ref{Reading Attributes}. - -@comment malloc -@item void * malloc (size_t @var{size}) -@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Basic Allocation}. - -@comment mblen -@item int mblen (const char *@var{string}, size_t @var{size}) -@file{stdlib.h} (ANSI): @ref{Length of Char,}. - -@comment mbstowcs -@item size_t mbstowcs (wchar_t *@var{wstring}, const char *@var{string}, size_t @var{size}) -@file{stdlib.h} (ANSI): @ref{Wide String Conversion,}. - -@comment mbtowc -@item int mbtowc (wchar_t *@var{result}, const char *@var{string}, size_t @var{size}) -@file{stdlib.h} (ANSI): @ref{Converting One Char,}. - -@comment mcheck -@item void mcheck (void (*@var{abortfn}) (void)) -@file{malloc.h} (GNU): @ref{Heap Consistency Checking}. - -@comment memalign -@item void * memalign (size_t @var{size}, int @var{boundary}) -@file{malloc.h}, @file{stdlib.h} (BSD): @ref{Aligned Memory Blocks}. - -@comment memccpy -@item void * memccpy (void *@var{to}, const void *@var{from}, int @var{c}, size_t @var{size}) -@file{string.h} (SVID): @ref{Copying and Concatenation,}. - -@comment memchr -@item void * memchr (const void *@var{block}, int @var{c}, size_t @var{size}) -@file{string.h} (ANSI): @ref{Search Functions,}. - -@comment memcmp -@item int memcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size}) -@file{string.h} (ANSI): @ref{String/Array Comparison,}. - -@comment memcpy -@item void * memcpy (void *@var{to}, const void *@var{from}, size_t @var{size}) -@file{string.h} (ANSI): @ref{Copying and Concatenation,}. - -@comment memmem -@item void * memmem (const void *@var{needle}, size_t @var{needle_len},@*const void *@var{haystack}, size_t @var{haystack_len}) -@file{string.h} (GNU): @ref{Search Functions,}. - -@comment memmove -@item void * memmove (void *@var{to}, const void *@var{from}, size_t @var{size}) -@file{string.h} (ANSI): @ref{Copying and Concatenation,}. - -@comment memory_warnings -@item void memory_warnings (void *@var{start}, void (*@var{warn_func}) (char *)) -@file{malloc.h} (GNU): @ref{Memory Warnings}. - -@comment memset -@item void * memset (void *@var{block}, int @var{c}, size_t @var{size}) -@file{string.h} (ANSI): @ref{Copying and Concatenation,}. - -@comment mkdir -@item int mkdir (const char *@var{filename}, mode_t @var{mode}) -@file{sys/stat.h} (POSIX.1): @ref{Creating Directories}. - -@comment mkfifo -@item int mkfifo (const char *@var{filename}, mode_t @var{mode}) -@file{sys/stat.h} (POSIX.1): @ref{FIFO Special Files}. - -@comment mknod -@item int mknod (const char *@var{filename}, int @var{mode}, int @var{dev}) -@file{sys/stat.h} (BSD): @ref{Making Special Files}. - -@comment mktime -@item time_t mktime (struct tm *@var{brokentime}) -@file{time.h} (ANSI): @ref{Broken-down Time}. - -@comment mode_t -@item mode_t -@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. - -@comment modf -@item double modf (double @var{value}, double *@var{integer_part}) -@file{math.h} (ANSI): @ref{Rounding and Remainders}. - -@comment mstats -@item struct mstats mstats (void) -@file{malloc.h} (GNU): @ref{Statistics of Malloc}. - -@comment nice -@item int nice (int @var{increment}) -@file{dunno.h} (dunno.h): @ref{Priority}. - -@comment nlink_t -@item nlink_t -@file{sys/types.h} (POSIX.1): @ref{Attribute Meanings}. - -@comment ntohl -@item unsigned long int ntohl (unsigned long int @var{netlong}) -@file{netinet/in.h} (BSD): @ref{Byte Order}. - -@comment ntohs -@item unsigned short int ntohs (unsigned short int @var{netshort}) -@file{netinet/in.h} (BSD): @ref{Byte Order}. - -@comment obstack_1grow -@item void obstack_1grow (struct obstack *@var{obstack_ptr}, char @var{c}) -@file{obstack.h} (GNU): @ref{Growing Objects}. - -@comment obstack_1grow_fast -@item void obstack_1grow_fast (struct obstack *@var{obstack_ptr}, char @var{c}) -@file{obstack.h} (GNU): @ref{Extra Fast Growing}. - -@comment obstack_alignment_mask -@item int obstack_alignment_mask (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Obstacks Data Alignment}. - -@comment obstack_alloc -@item void * obstack_alloc (struct obstack *@var{obstack_ptr}, size_t @var{size}) -@file{obstack.h} (GNU): @ref{Allocation in an Obstack}. - -@comment obstack_base -@item void * obstack_base (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Status of an Obstack}. - -@comment obstack_blank -@item void obstack_blank (struct obstack *@var{obstack_ptr}, size_t @var{size}) -@file{obstack.h} (GNU): @ref{Growing Objects}. - -@comment obstack_blank_fast -@item void obstack_blank_fast (struct obstack *@var{obstack_ptr}, size_t @var{size}) -@file{obstack.h} (GNU): @ref{Extra Fast Growing}. - -@comment obstack_chunk_size -@item size_t obstack_chunk_size (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Obstack Chunks}. - -@comment obstack_copy -@item void * obstack_copy (struct obstack *@var{obstack_ptr}, void *@var{address}, size_t @var{size}) -@file{obstack.h} (GNU): @ref{Allocation in an Obstack}. - -@comment obstack_copy0 -@item void * obstack_copy0 (struct obstack *@var{obstack_ptr}, void *@var{address}, size_t @var{size}) -@file{obstack.h} (GNU): @ref{Allocation in an Obstack}. - -@comment obstack_finish -@item void * obstack_finish (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Growing Objects}. - -@comment obstack_free -@item void obstack_free (struct obstack *@var{obstack_ptr}, void *@var{object}) -@file{obstack.h} (GNU): @ref{Freeing Obstack Objects}. - -@comment obstack_grow -@item void obstack_grow (struct obstack *@var{obstack_ptr}, void *@var{data}, size_t @var{size}) -@file{obstack.h} (GNU): @ref{Growing Objects}. - -@comment obstack_grow0 -@item void obstack_grow0 (struct obstack *@var{obstack_ptr}, void *@var{data}, size_t @var{size}) -@file{obstack.h} (GNU): @ref{Growing Objects}. - -@comment obstack_init -@item void obstack_init (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Preparing for Obstacks}. - -@comment obstack_next_free -@item void * obstack_next_free (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Status of an Obstack}. - -@comment obstack_object_size -@item size_t obstack_object_size (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Growing Objects}. - -@comment obstack_object_size -@item size_t obstack_object_size (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Status of an Obstack}. - -@comment obstack_printf -@item int obstack_printf (struct obstack *@var{obstack}, const char *@var{template}, @dots{}) -@file{stdio.h} (GNU): @ref{Dynamic Output}. - -@comment obstack_room -@item size_t obstack_room (struct obstack *@var{obstack_ptr}) -@file{obstack.h} (GNU): @ref{Extra Fast Growing}. - -@comment obstack_vprintf -@item int obstack_vprintf (struct obstack *@var{obstack}, const char *@var{template}, va_list @var{ap}) -@file{stdio.h} (GNU): @ref{Variable Arguments Output}. - -@comment off_t -@item off_t -@file{sys/types.h} (POSIX.1): @ref{File Position Primitive}. - -@comment offsetof -@item size_t offsetof (@var{type}, @var{member}) -@file{stddef.h} (ANSI): @ref{Structure Measurement}. - -@comment on_exit -@item int on_exit (void (*@var{function})(int @var{status}, void *@var{arg}), void *@var{arg}) -@file{stdlib.h} (SunOS): @ref{Cleanups on Exit}. - -@comment open -@item int open (const char *@var{filename}, int @var{flags}[, mode_t @var{mode}]) -@file{fcntl.h} (POSIX.1): @ref{Opening and Closing Files}. - -@comment open_memstream -@item FILE * open_memstream (char **@var{ptr}, size_t *@var{sizeloc}) -@file{stdio.h} (GNU): @ref{String Streams}. - -@comment open_obstack_stream -@item FILE * open_obstack_stream (struct obstack *@var{obstack}) -@file{stdio.h} (GNU): @ref{Obstack Streams}. - -@comment opendir -@item DIR * opendir (const char *@var{dirname}) -@file{dirent.h} (POSIX.1): @ref{Opening a Directory}. - -@comment optarg -@item char * optarg -@file{unistd.h} (POSIX.2): @ref{Parsing Options}. - -@comment opterr -@item int opterr -@file{unistd.h} (POSIX.2): @ref{Parsing Options}. - -@comment optind -@item int optind -@file{unistd.h} (POSIX.2): @ref{Parsing Options}. - -@comment optopt -@item int optopt -@file{unistd.h} (POSIX.2): @ref{Parsing Options}. +@comment scanf +@item int scanf (const char *@var{template}, @dots{}) -@comment parse_printf_format -@item size_t parse_printf_format (const char *@var{template}, size_t @var{n}, int *@var{argtypes}) -@file{printf.h} (GNU): @ref{Parsing a Template String}. +@file{stdio.h} (ANSI): @ref{Formatted Input Functions}. -@comment pathconf -@item long int pathconf (const char *@var{filename}, int @var{parameter}) -@file{unistd.h} (POSIX.1): @ref{Pathconf}. +@comment _SC_ARG_MAX +@item _SC_ARG_MAX -@comment pause -@item int pause () -@file{unistd.h} (POSIX.1): @ref{Using Pause}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment pclose -@item int pclose (FILE *@var{stream}) -@file{stdio.h} (POSIX.2, SVID, BSD): @ref{Pipe to a Subprocess}. +@comment _SC_BC_BASE_MAX +@item _SC_BC_BASE_MAX -@comment perror -@item void perror (const char *@var{message}) -@file{stdio.h} (ANSI): @ref{Error Messages,}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment pid_t -@item pid_t -@file{sys/types.h} (POSIX.1): @ref{Process Identification}. +@comment _SC_BC_DIM_MAX +@item _SC_BC_DIM_MAX -@comment pipe -@item int pipe (int @var{filedes}@t{[2]}) -@file{unistd.h} (POSIX.1): @ref{Creating a Pipe}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment popen -@item FILE * popen (const char *@var{command}, const char *@var{mode}) -@file{stdio.h} (POSIX.2, SVID, BSD): @ref{Pipe to a Subprocess}. +@comment _SC_BC_SCALE_MAX +@item _SC_BC_SCALE_MAX -@comment pow -@item double pow (double @var{base}, double @var{power}) -@file{math.h} (ANSI): @ref{Exponents and Logarithms}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment printf -@item int printf (const char *@var{template}, @dots{}) -@file{stdio.h} (ANSI): @ref{Formatted Output Functions}. +@comment _SC_BC_STRING_MAX +@item _SC_BC_STRING_MAX -@comment printf_arginfo_function -@item printf_arginfo_function -@file{printf.h} (GNU): @ref{Defining the Output Handler}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment printf_function -@item printf_function -@file{printf.h} (GNU): @ref{Defining the Output Handler}. +@comment _SC_CHILD_MAX +@item _SC_CHILD_MAX -@comment program_invocation_name -@item char * program_invocation_name -@file{errno.h} (GNU): @ref{Error Messages,}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment program_invocation_short_name -@item char * program_invocation_short_name -@file{errno.h} (GNU): @ref{Error Messages,}. +@comment _SC_CLK_TCK +@item _SC_CLK_TCK -@comment psignal -@item void psignal (int @var{signum}, const char *@var{message}) -@file{stdio.h} (BSD): @ref{Signal Messages}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment ptrdiff_t -@item ptrdiff_t -@file{stddef.h} (ANSI): @ref{Important Data Types}. +@comment _SC_COLL_WEIGHTS_MAX +@item _SC_COLL_WEIGHTS_MAX -@comment putc -@item int putc (int @var{c}, FILE *@var{stream}) -@file{stdio.h} (ANSI): @ref{Simple Output}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment putchar -@item int putchar (int @var{c}) -@file{stdio.h} (ANSI): @ref{Simple Output}. +@comment _SC_EQUIV_CLASS_MAX +@item _SC_EQUIV_CLASS_MAX -@comment putenv -@item int putenv (const char *@var{string}) -@file{stdlib.h} (SVID): @ref{Environment Access}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment putpwent -@item int putpwent (const struct passwd *@var{p}, FILE *@var{stream}) -@file{pwd.h} (SVID): @ref{Writing a User Entry}. +@comment _SC_EXPR_NEST_MAX +@item _SC_EXPR_NEST_MAX -@comment puts -@item int puts (const char *@var{s}) -@file{stdio.h} (ANSI): @ref{Simple Output}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment putw -@item int putw (int @var{w}, FILE *@var{stream}) -@file{stdio.h} (SVID): @ref{Simple Output}. +@comment SCHAR_MAX +@item SCHAR_MAX -@comment qsort -@item void qsort (void *@var{array}, size_t @var{count}, size_t @var{size}, comparison_fn_t @var{compare}) -@file{stdlib.h} (ANSI): @ref{Array Sort Function,}. +@file{limits.h} (ANSI): @ref{Range of Type}. -@comment r_alloc -@item void * r_alloc (void **@var{handleptr}, size_t @var{size}) -@file{malloc.h} (GNU): @ref{Using Relocator}. +@comment SCHAR_MIN +@item SCHAR_MIN -@comment r_alloc_free -@item void r_alloc_free (void **@var{handleptr}) -@file{malloc.h} (GNU): @ref{Using Relocator}. +@file{limits.h} (ANSI): @ref{Range of Type}. -@comment r_re_alloc -@item void * r_re_alloc (void **@var{handleptr}, size_t @var{size}) -@file{malloc.h} (GNU): @ref{Using Relocator}. +@comment _SC_JOB_CONTROL +@item _SC_JOB_CONTROL -@comment raise -@item int raise (int @var{signum}) -@file{signal.h} (ANSI): @ref{Signaling Yourself}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment rand -@item int rand () -@file{stdlib.h} (ANSI): @ref{ANSI Random}. +@comment _SC_LINE_MAX +@item _SC_LINE_MAX -@comment random -@item long int random () -@file{stdlib.h} (BSD): @ref{BSD Random}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment read -@item ssize_t read (int @var{filedes}, void *@var{buffer}, size_t @var{size}) -@file{unistd.h} (POSIX.1): @ref{I/O Primitives}. +@comment _SC_NGROUPS_MAX +@item _SC_NGROUPS_MAX -@comment readdir -@item struct dirent * readdir (DIR *@var{dirstream}) -@file{dirent.h} (POSIX.1): @ref{Reading/Closing Directory}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment readlink -@item int readlink (const char *@var{filename}, char *@var{buffer}, size_t @var{size}) -@file{unistd.h} (BSD): @ref{Symbolic Links}. +@comment _SC_OPEN_MAX +@item _SC_OPEN_MAX -@comment realloc -@item void * realloc (void *@var{ptr}, size_t @var{newsize}) -@file{malloc.h}, @file{stdlib.h} (ANSI): @ref{Changing Block Size}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment recv -@item int recv (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}) -@file{sys/socket.h} (BSD): @ref{Receiving Data}. +@comment _SC_PAGESIZE +@item _SC_PAGESIZE -@comment recvfrom -@item int recvfrom (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, size_t *@var{length_ptr}) -@file{sys/socket.h} (BSD): @ref{Receiving Datagrams}. +@file{unistd.h} (GNU): @ref{Constants for Sysconf}. -@comment recvmsg -@item int recvmsg (int @var{socket}, struct msghdr *@var{message}, int @var{flags}) -@file{sys/socket.h} (BSD): @ref{Receiving Datagrams}. +@comment _SC_SAVED_IDS +@item _SC_SAVED_IDS -@comment regcomp -@item int regcomp (regex_t *@var{compiled}, const char *@var{pattern}, int @var{cflags}) -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment regerror -@item size_t regerror (int @var{errcode}, regex_t *@var{compiled}, char *@var{buffer}, size_t @var{length}) -@file{regex.h} (POSIX.2): @ref{Regexp Cleanup}. +@comment _SC_STREAM_MAX +@item _SC_STREAM_MAX -@comment regex_t -@item regex_t -@file{regex.h} (POSIX.2): @ref{POSIX Regexp Compilation}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment regexec -@item int regexec (regex_t *@var{compiled}, char *@var{string}, size_t @var{nmatch}, regmatch_t @var{matchptr} @t{[]}, int @var{eflags}) -@file{regex.h} (POSIX.2): @ref{Matching POSIX Regexps}. +@comment _SC_TZNAME_MAX +@item _SC_TZNAME_MAX -@comment regfree -@item void regfree (regex_t *@var{compiled}) -@file{regex.h} (POSIX.2): @ref{Regexp Cleanup}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment register_printf_function -@item int register_printf_function (int @var{spec}, printf_function @var{handler_function}, printf_arginfo_function @var{arginfo_function}) -@file{printf.h} (GNU): @ref{Registering New Conversions}. +@comment _SC_VERSION +@item _SC_VERSION -@comment regmatch_t -@item regmatch_t -@file{regex.h} (POSIX.2): @ref{Regexp Subexpressions}. +@file{unistd.h} (POSIX.1): @ref{Constants for Sysconf}. -@comment regoff_t -@item regoff_t -@file{regex.h} (POSIX.2): @ref{Regexp Subexpressions}. +@comment _SC_VERSION +@item _SC_VERSION -@comment remove -@item int remove (const char *@var{filename}) -@file{stdio.h} (ANSI): @ref{Deleting Files}. +@file{unistd.h} (POSIX.2): @ref{Constants for Sysconf}. -@comment rename -@item int rename (const char *@var{oldname}, const char *@var{newname}) -@file{stdio.h} (ANSI): @ref{Renaming Files}. +@comment SEEK_CUR +@item int SEEK_CUR -@comment rewind -@item void rewind (FILE *@var{stream}) @file{stdio.h} (ANSI): @ref{File Positioning}. -@comment rewinddir -@item void rewinddir (DIR *@var{dirstream}) -@file{dirent.h} (POSIX.1): @ref{Random Access Directory}. +@comment seekdir +@item void seekdir (DIR *@var{dirstream}, off_t @var{pos}) -@comment rint -@item double rint (double @var{x}) -@file{math.h} (BSD): @ref{Rounding and Remainders}. +@file{dirent.h} (BSD): @ref{Random Access Directory}. -@comment rmdir -@item int rmdir (const char *@var{filename}) -@file{unistd.h} (POSIX.1): @ref{Deleting Files}. +@comment SEEK_END +@item int SEEK_END -@comment scalb -@item double scalb (double @var{value}, int @var{exponent}) -@file{math.h} (BSD): @ref{Normalization Functions}. +@file{stdio.h} (ANSI): @ref{File Positioning}. -@comment scanf -@item int scanf (const char *@var{template}, @dots{}) -@file{stdio.h} (ANSI): @ref{Formatted Input Functions}. +@comment SEEK_SET +@item int SEEK_SET -@comment seekdir -@item void seekdir (DIR *@var{dirstream}, off_t @var{pos}) -@file{dirent.h} (BSD): @ref{Random Access Directory}. +@file{stdio.h} (ANSI): @ref{File Positioning}. @comment select @item int select (int @var{nfds}, fd_set *@var{read_fds}, fd_set *@var{write_fds}, fd_set *@var{except_fds}, struct timeval *@var{timeout}) + @file{sys/types.h} (BSD): @ref{Waiting for I/O}. @comment send @item int send (int @var{socket}, void *@var{buffer}, size_t @var{size}, int @var{flags}) + @file{sys/socket.h} (BSD): @ref{Sending Data}. @comment sendmsg @item int sendmsg (int @var{socket}, const struct msghdr *@var{message}, int @var{flags}) + @file{sys/socket.h} (BSD): @ref{Receiving Datagrams}. @comment sendto @item int sendto (int @var{socket}, void *@var{buffer}. size_t @var{size}, int @var{flags}, struct sockaddr *@var{addr}, size_t @var{length}) -@file{sys/socket.h} (BSD): @ref{Sending Datagrams}. -@comment setbuf -@item void setbuf (FILE *@var{stream}, char *@var{buf}) -@file{stdio.h} (ANSI): @ref{Controlling Buffering}. +@file{sys/socket.h} (BSD): @ref{Sending Datagrams}. @comment setbuffer @item void setbuffer (FILE *@var{stream}, char *@var{buf}, size_t @var{size}) + @file{stdio.h} (BSD): @ref{Controlling Buffering}. +@comment setbuf +@item void setbuf (FILE *@var{stream}, char *@var{buf}) + +@file{stdio.h} (ANSI): @ref{Controlling Buffering}. + @comment setgid @item int setgid (gid_t @var{newgid}) + @file{unistd.h} (POSIX.1): @ref{Setting Groups}. @comment setgrent @item void setgrent (void) + @file{grp.h} (SVID, BSD): @ref{Scanning All Groups}. @comment setgroups @item int setgroups (size_t @var{count}, gid_t *@var{groups}) + @file{grp.h} (BSD): @ref{Setting Groups}. @comment sethostent @item void sethostent (int @var{stayopen}) + @file{netdb.h} (BSD): @ref{Host Names}. @comment sethostid @item int sethostid (long int @var{id}) + @file{unistd.h} (BSD): @ref{Host Identification}. @comment sethostname @item int sethostname (const char *@var{name}, size_t @var{length}) + @file{unistd.h} (BSD): @ref{Host Identification}. @comment setitimer @item int setitimer (int @var{which}, struct itimerval *@var{old}, struct itimerval *@var{new}) + @file{sys/time.h} (BSD): @ref{Setting an Alarm}. @comment setjmp @item int setjmp (jmp_buf @var{state}) + @file{setjmp.h} (ANSI): @ref{Non-Local Details,}. @comment setlinebuf @item void setlinebuf (FILE *@var{stream}) + @file{stdio.h} (BSD): @ref{Controlling Buffering}. @comment setlocale @item char * setlocale (int @var{category}, const char *@var{locale}) + @file{locale.h} (ANSI): @ref{Setting the Locale,}. @comment setnetent @item void setnetent (int @var{stayopen}) + @file{netdb.h} (BSD): @ref{Networks Database}. @comment setpgid @item int setpgid (pid_t @var{pid}, pid_t @var{pgid}) + @file{unistd.h} (POSIX.1): @ref{Process Group Functions,}. @comment setpgrp @item int setpgrp (pid_t @var{pid}, pid_t @var{pgid}) + @file{unistd.h} (BSD): @ref{Process Group Functions,}. @comment setpriority @item int setpriority (int @var{class}, int @var{id}, int @var{priority}) + @file{sys/resource.h} (BSD): @ref{Priority}. @comment setprotoent @item void setprotoent (int @var{stayopen}) + @file{netdb.h} (BSD): @ref{Protocols Database}. @comment setpwent @item void setpwent (void) + @file{pwd.h} (SVID, BSD): @ref{Scanning All Users}. @comment setregid @item int setregid (gid_t @var{rgid}, fid_t @var{egid}) + @file{unistd.h} (BSD): @ref{Setting Groups}. @comment setreuid @item int setreuid (uid_t @var{ruid}, uid_t @var{euid}) + @file{unistd.h} (BSD): @ref{Setting User ID}. @comment setrlimit @item int setrlimit (int @var{resource}, struct rlimit *@var{rlp}) + @file{sys/resource.h} (BSD): @ref{Limits on Resources}. @comment setservent @item void setservent (int @var{stayopen}) + @file{netdb.h} (BSD): @ref{Services Database}. @comment setsid @item pid_t setsid (void) + @file{unistd.h} (POSIX.1): @ref{Process Group Functions,}. @comment setsockopt @item int setsockopt (int @var{socket}, int @var{level}, int @var{optname}, void *@var{optval}, size_t @var{optlen}) + @file{sys/socket.h} (BSD): @ref{Socket Option Functions}. @comment setstate @item void * setstate (void *@var{state}) + @file{stdlib.h} (BSD): @ref{BSD Random}. @comment settimeofday @item int settimeofday (const struct timeval *@var{tp}, const struct timezone *@var{tzp}) + @file{sys/time.h} (BSD): @ref{High-Resolution Calendar}. @comment setuid @item int setuid (uid_t @var{newuid}) + @file{unistd.h} (POSIX.1): @ref{Setting User ID}. @comment setvbuf @item int setvbuf (FILE *@var{stream}, char *@var{buf}, int @var{mode}, size_t @var{size}) + @file{stdio.h} (ANSI): @ref{Controlling Buffering}. +@comment SHRT_MAX +@item SHRT_MAX + +@file{limits.h} (ANSI): @ref{Range of Type}. + +@comment SHRT_MIN +@item SHRT_MIN + +@file{limits.h} (ANSI): @ref{Range of Type}. + @comment shutdown @item int shutdown (int @var{socket}, int @var{how}) + @file{sys/socket.h} (BSD): @ref{Closing a Socket}. -@comment sig_atomic_t -@item sig_atomic_t -@file{signal.h} (ANSI): @ref{Atomic Types}. +@comment S_IEXEC +@item S_IEXEC + +@file{sys/stat.h} (BSD): @ref{Permission Bits}. + +@comment S_IFBLK +@item S_IFBLK + +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment S_IFCHR +@item S_IFCHR + +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment S_IFDIR +@item S_IFDIR + +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment S_IFIFO +@item S_IFIFO +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment S_IFLNK +@item S_IFLNK + +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment S_IFMT +@item int S_IFMT + +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment S_IFREG +@item S_IFREG + +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment S_IFSOCK +@item S_IFSOCK + +@file{sys/stat.h} (BSD): @ref{Testing File Type}. + +@comment SIGABRT +@item int SIGABRT + +@file{signal.h} (ANSI): @ref{Program Error Signals}. + @comment sigaction @item int sigaction (int @var{signum}, const struct sigaction *@var{action}, struct sigaction *@var{old_action}) + @file{signal.h} (POSIX.1): @ref{Advanced Signal Handling}. @comment sigaddset @item int sigaddset (sigset_t *@var{set}, int @var{signum}) + @file{signal.h} (POSIX.1): @ref{Signal Sets}. +@comment SIGALRM +@item int SIGALRM + +@file{signal.h} (POSIX.1): @ref{Alarm Signals}. + +@comment sigaltstack +@item int sigaltstack (const struct sigaltstack *@var{stack}, struct sigaltstack *@var{oldstack}) + +@file{signal.h} (BSD): @ref{Signal Stack}. + +@comment sig_atomic_t +@item sig_atomic_t + +@file{signal.h} (ANSI): @ref{Atomic Types}. + @comment sigblock @item int sigblock (int @var{mask}) + @file{signal.h} (BSD): @ref{Blocking in BSD}. +@comment SIG_BLOCK +@item SIG_BLOCK + +@file{signal.h} (POSIX.1): @ref{Process Signal Mask}. + +@comment SIGBUS +@item int SIGBUS + +@file{signal.h} (BSD): @ref{Program Error Signals}. + +@comment SIGCHLD +@item int SIGCHLD + +@file{signal.h} (POSIX.1): @ref{Job Control Signals}. + +@comment SIGCONT +@item int SIGCONT + +@file{signal.h} (POSIX.1): @ref{Job Control Signals}. + @comment sigdelset @item int sigdelset (sigset_t *@var{set}, int @var{signum}) + @file{signal.h} (POSIX.1): @ref{Signal Sets}. @comment sigemptyset @item int sigemptyset (sigset_t *@var{set}) + @file{signal.h} (POSIX.1): @ref{Signal Sets}. +@comment SIG_ERR +@item sighandler_t SIG_ERR + +@file{signal.h} (ANSI): @ref{Basic Signal Handling}. + @comment sigfillset @item int sigfillset (sigset_t *@var{set}) + @file{signal.h} (POSIX.1): @ref{Signal Sets}. +@comment SIGFPE +@item int SIGFPE + +@file{signal.h} (ANSI): @ref{Program Error Signals}. + @comment sighandler_t @item sighandler_t + @file{signal.h} (GNU): @ref{Basic Signal Handling}. +@comment SIGHUP +@item int SIGHUP + +@file{signal.h} (POSIX.1): @ref{Termination Signals}. + +@comment SIGILL +@item int SIGILL + +@file{signal.h} (ANSI): @ref{Program Error Signals}. + @comment siginterrupt @item int siginterrupt (int @var{signum}, int @var{failflag}) + @file{signal.h} (BSD): @ref{BSD Handler}. +@comment SIGINT +@item int SIGINT + +@file{signal.h} (ANSI): @ref{Termination Signals}. + +@comment SIGIO +@item int SIGIO + +@file{signal.h} (BSD): @ref{Asynchronous I/O Signals}. + @comment sigismember @item int sigismember (const sigset_t *@var{set}, int @var{signum}) + @file{signal.h} (POSIX.1): @ref{Signal Sets}. @comment sigjmp_buf @item sigjmp_buf + @file{setjmp.h} (POSIX.1): @ref{Non-Local Exits and Signals,,}. +@comment SIGKILL +@item int SIGKILL + +@file{signal.h} (POSIX.1): @ref{Termination Signals}. + @comment siglongjmp @item void siglongjmp (sigjmp_buf @var{state}, int @var{value}) + @file{setjmp.h} (POSIX.1): @ref{Non-Local Exits and Signals,,}. @comment sigmask @item int sigmask (int @var{signum}) + @file{signal.h} (BSD): @ref{Blocking in BSD}. @comment signal @item sighandler_t signal (int @var{signum}, sighandler_t @var{action}) + @file{signal.h} (ANSI): @ref{Basic Signal Handling}. @comment sigpause @item int sigpause (int @var{mask}) + @file{signal.h} (BSD): @ref{Blocking in BSD}. @comment sigpending @item int sigpending (sigset_t *@var{set}) + @file{signal.h} (POSIX.1): @ref{Checking for Pending Signals}. +@comment SIGPIPE +@item int SIGPIPE + +@file{signal.h} (POSIX.1): @ref{Miscellaneous Signals}. + @comment sigprocmask @item int sigprocmask (int @var{how}, const sigset_t *@var{set}, sigset_t *@var{oldset}) + @file{signal.h} (POSIX.1): @ref{Process Signal Mask}. -@comment sigset_t -@item sigset_t -@file{signal.h} (POSIX.1): @ref{Signal Sets}. +@comment SIGPROF +@item int SIGPROF + +@file{signal.h} (BSD): @ref{Alarm Signals}. + +@comment SIGQUIT +@item int SIGQUIT + +@file{signal.h} (POSIX.1): @ref{Termination Signals}. + +@comment SIGSEGV +@item int SIGSEGV +@file{signal.h} (ANSI): @ref{Program Error Signals}. + @comment sigsetjmp @item int sigsetjmp (sigjmp_buf @var{state}, int @var{savesigs}) + @file{setjmp.h} (POSIX.1): @ref{Non-Local Exits and Signals,,}. @comment sigsetmask @item int sigsetmask (int @var{mask}) + @file{signal.h} (BSD): @ref{Blocking in BSD}. +@comment SIG_SETMASK +@item SIG_SETMASK + +@file{signal.h} (POSIX.1): @ref{Process Signal Mask}. + +@comment sigset_t +@item sigset_t + +@file{signal.h} (POSIX.1): @ref{Signal Sets}. + @comment sigstack @item int sigstack (const struct sigstack *@var{stack}, struct sigstack *@var{oldstack}) + @file{signal.h} (BSD): @ref{Signal Stack}. +@comment SIGSTOP +@item int SIGSTOP + +@file{signal.h} (POSIX.1): @ref{Job Control Signals}. + @comment sigsuspend @item int sigsuspend (const sigset_t *@var{set}) + @file{signal.h} (POSIX.1): @ref{Sigsuspend}. +@comment SIGTERM +@item int SIGTERM + +@file{signal.h} (ANSI): @ref{Termination Signals}. + +@comment SIGTSTP +@item int SIGTSTP + +@file{signal.h} (POSIX.1): @ref{Job Control Signals}. + +@comment SIGTTIN +@item int SIGTTIN + +@file{signal.h} (POSIX.1): @ref{Job Control Signals}. + +@comment SIGTTOU +@item int SIGTTOU + +@file{signal.h} (POSIX.1): @ref{Job Control Signals}. + +@comment SIG_UNBLOCK +@item SIG_UNBLOCK + +@file{signal.h} (POSIX.1): @ref{Process Signal Mask}. + +@comment SIGURG +@item int SIGURG + +@file{signal.h} (BSD): @ref{Asynchronous I/O Signals}. + +@comment SIGUSR1 +@item int SIGUSR1 + +@file{signal.h} (POSIX.1): @ref{Miscellaneous Signals}. + +@comment SIGUSR2 +@item int SIGUSR2 + +@file{signal.h} (POSIX.1): @ref{Miscellaneous Signals}. + @comment sigvec @item int sigvec (int @var{signum}, const struct sigvec *@var{action},struct sigvec *@var{old_action}) + @file{signal.h} (BSD): @ref{BSD Handler}. -@comment sin -@item double sin (double @var{x}) -@file{math.h} (ANSI): @ref{Trig Functions}. +@comment SIGVTALRM +@item int SIGVTALRM + +@file{signal.h} (BSD): @ref{Alarm Signals}. @comment sinh @item double sinh (double @var{x}) + @file{math.h} (ANSI): @ref{Hyperbolic Functions}. +@comment sin +@item double sin (double @var{x}) + +@file{math.h} (ANSI): @ref{Trig Functions}. + +@comment S_IREAD +@item S_IREAD + +@file{sys/stat.h} (BSD): @ref{Permission Bits}. + +@comment S_IRGRP +@item S_IRGRP + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IROTH +@item S_IROTH + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IRUSR +@item S_IRUSR + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IRWXG +@item S_IRWXG + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IRWXO +@item S_IRWXO + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IRWXU +@item S_IRWXU + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_ISBLK +@item int S_ISBLK (mode_t @var{m}) + +@file{sys/stat.h} (POSIX): @ref{Testing File Type}. + +@comment S_ISCHR +@item int S_ISCHR (mode_t @var{m}) + +@file{sys/stat.h} (POSIX): @ref{Testing File Type}. + +@comment S_ISDIR +@item int S_ISDIR (mode_t @var{m}) + +@file{sys/stat.h} (POSIX): @ref{Testing File Type}. + +@comment S_ISFIFO +@item int S_ISFIFO (mode_t @var{m}) + +@file{sys/stat.h} (POSIX): @ref{Testing File Type}. + +@comment S_ISGID +@item S_ISGID + +@file{sys/stat.h} (POSIX): @ref{Permission Bits}. + +@comment S_ISLNK +@item int S_ISLNK (mode_t @var{m}) + +@file{sys/stat.h} (GNU): @ref{Testing File Type}. + +@comment S_ISREG +@item int S_ISREG (mode_t @var{m}) + +@file{sys/stat.h} (POSIX): @ref{Testing File Type}. + +@comment S_ISSOCK +@item int S_ISSOCK (mode_t @var{m}) + +@file{sys/stat.h} (GNU): @ref{Testing File Type}. + +@comment S_ISUID +@item S_ISUID + +@file{sys/stat.h} (POSIX): @ref{Permission Bits}. + +@comment S_ISVTX +@item S_ISVTX + +@file{sys/stat.h} (BSD): @ref{Permission Bits}. + +@comment S_IWGRP +@item S_IWGRP + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IWOTH +@item S_IWOTH + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IWRITE +@item S_IWRITE + +@file{sys/stat.h} (BSD): @ref{Permission Bits}. + +@comment S_IWUSR +@item S_IWUSR + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IXGRP +@item S_IXGRP + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IXOTH +@item S_IXOTH + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + +@comment S_IXUSR +@item S_IXUSR + +@file{sys/stat.h} (POSIX.1): @ref{Permission Bits}. + @comment size_t @item size_t + @file{stddef.h} (ANSI): @ref{Important Data Types}. @comment sleep @item unsigned int sleep (unsigned int @var{seconds}) + @file{unistd.h} (POSIX.1): @ref{Sleeping}. @comment snprintf @item int snprintf (char *@var{s}, size_t @var{size}, const char *@var{template}, @dots{}) + @file{stdio.h} (GNU): @ref{Formatted Output Functions}. +@comment SO_BROADCAST +@item SO_BROADCAST + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SOCK_DGRAM +@item int SOCK_DGRAM + +@file{sys/socket.h} (BSD): @ref{Communication Styles}. + @comment socket @item int socket (int @var{namespace}, int @var{style}, int @var{protocol}) + @file{sys/socket.h} (BSD): @ref{Creating a Socket}. @comment socketpair @item int socketpair (int @var{namespace}, int @var{style}, int @var{protocol}, int @var{filedes}@t{[2]}) + @file{sys/socket.h} (BSD): @ref{Socket Pairs}. +@comment SOCK_RAW +@item int SOCK_RAW + +@file{sys/socket.h} (BSD): @ref{Communication Styles}. + +@comment SOCK_RDM +@item int SOCK_RDM + +@file{sys/socket.h} (BSD): @ref{Communication Styles}. + +@comment SOCK_SEQPACKET +@item int SOCK_SEQPACKET + +@file{sys/socket.h} (BSD): @ref{Communication Styles}. + +@comment SOCK_STREAM +@item int SOCK_STREAM + +@file{sys/socket.h} (BSD): @ref{Communication Styles}. + +@comment SO_DEBUG +@item SO_DEBUG + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_DONTROUTE +@item SO_DONTROUTE + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_ERROR +@item SO_ERROR + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_KEEPALIVE +@item SO_KEEPALIVE + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_LINGER +@item SO_LINGER + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SOL_SOCKET +@item int SOL_SOCKET + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_OOBINLINE +@item SO_OOBINLINE + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_RCVBUF +@item SO_RCVBUF + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_REUSEADDR +@item SO_REUSEADDR + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_SNDBUF +@item SO_SNDBUF + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + +@comment SO_STYLE +@item SO_STYLE + +@file{sys/socket.h} (GNU): @ref{Socket-Level Options}. + +@comment SO_TYPE +@item SO_TYPE + +@file{sys/socket.h} (BSD): @ref{Socket-Level Options}. + @comment speed_t @item speed_t + @file{termios.h} (POSIX.1): @ref{Line Speed}. @comment sprintf @item int sprintf (char *@var{s}, const char *@var{template}, @dots{}) + @file{stdio.h} (ANSI): @ref{Formatted Output Functions}. @comment sqrt @item double sqrt (double @var{x}) + @file{math.h} (ANSI): @ref{Exponents and Logarithms}. @comment srand @item void srand (unsigned int @var{seed}) + @file{stdlib.h} (ANSI): @ref{ANSI Random}. @comment srandom @item void srandom (unsigned int @var{seed}) + @file{stdlib.h} (BSD): @ref{BSD Random}. @comment sscanf @item int sscanf (const char *@var{s}, const char *@var{template}, @dots{}) + @file{stdio.h} (ANSI): @ref{Formatted Input Functions}. @comment ssignal @item sighandler_t ssignal (int @var{signum}, sighandler_t @var{action}) + @file{signal.h} (SVID): @ref{Basic Signal Handling}. +@comment SSIZE_MAX +@item int SSIZE_MAX + +@file{limits.h} (POSIX.1): @ref{General Limits}. + @comment ssize_t @item ssize_t + @file{unistd.h} (POSIX.1): @ref{I/O Primitives}. @comment stat @item int stat (const char *@var{filename}, struct stat *@var{buf}) + @file{sys/stat.h} (POSIX.1): @ref{Reading Attributes}. +@comment STDERR_FILENO +@item STDERR_FILENO + +@file{unistd.h} (POSIX.1): @ref{Descriptors and Streams}. + @comment stderr @item FILE * stderr + @file{stdio.h} (ANSI): @ref{Standard Streams}. +@comment STDIN_FILENO +@item STDIN_FILENO + +@file{unistd.h} (POSIX.1): @ref{Descriptors and Streams}. + @comment stdin @item FILE * stdin + @file{stdio.h} (ANSI): @ref{Standard Streams}. +@comment STDOUT_FILENO +@item STDOUT_FILENO + +@file{unistd.h} (POSIX.1): @ref{Descriptors and Streams}. + @comment stdout @item FILE * stdout + @file{stdio.h} (ANSI): @ref{Standard Streams}. @comment stpcpy @item char * stpcpy (char *@var{to}, const char *@var{from}) + @file{string.h} (Unknown origin): @ref{Copying and Concatenation,}. @comment strcasecmp @item int strcasecmp (const char *@var{s1}, const char *@var{s2}) + @file{string.h} (BSD): @ref{String/Array Comparison,}. @comment strcat @item char * strcat (char *@var{to}, const char *@var{from}) + @file{string.h} (ANSI): @ref{Copying and Concatenation,}. @comment strchr @item char * strchr (const char *@var{string}, int @var{c}) + @file{string.h} (ANSI): @ref{Search Functions,}. @comment strcmp @item int strcmp (const char *@var{s1}, const char *@var{s2}) + @file{string.h} (ANSI): @ref{String/Array Comparison,}. @comment strcoll @item int strcoll (const char *@var{s1}, const char *@var{s2}) + @file{string.h} (ANSI): @ref{Collation Functions,}. @comment strcpy @item char * strcpy (char *@var{to}, const char *@var{from}) + @file{string.h} (ANSI): @ref{Copying and Concatenation,}. @comment strcspn @item size_t strcspn (const char *@var{string}, const char *@var{stopset}) + @file{string.h} (ANSI): @ref{Search Functions,}. @comment strdup @item char * strdup (const char *@var{s}) + @file{string.h} (SVID): @ref{Copying and Concatenation,}. +@comment STREAM_MAX +@item int STREAM_MAX + +@file{limits.h} (POSIX.1): @ref{General Limits}. + @comment strerror @item char * strerror (int @var{errnum}) + @file{string.h} (ANSI): @ref{Error Messages,}. @comment strftime @item size_t strftime (char *@var{s}, size_t @var{size}, const char *@var{template}, const struct tm *@var{brokentime}) + @file{time.h} (ANSI): @ref{Formatting Date and Time}. @comment strlen @item size_t strlen (const char *@var{s}) + @file{string.h} (ANSI): @ref{String Length,}. @comment strncasecmp @item int strncasecmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n}) + @file{string.h} (BSD): @ref{String/Array Comparison,}. @comment strncat @item char * strncat (char *@var{to}, const char *@var{from}, size_t @var{size}) + @file{string.h} (ANSI): @ref{Copying and Concatenation,}. @comment strncmp @item int strncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{size}) + @file{string.h} (ANSI): @ref{String/Array Comparison,}. @comment strncpy @item char * strncpy (char *@var{to}, const char *@var{from}, size_t @var{size}) + @file{string.h} (ANSI): @ref{Copying and Concatenation,}. @comment strpbrk @item char * strpbrk (const char *@var{string}, const char *@var{stopset}) + @file{string.h} (ANSI): @ref{Search Functions,}. @comment strrchr @item char * strrchr (const char *@var{string}, int @var{c}) + @file{string.h} (ANSI): @ref{Search Functions,}. @comment strsignal @item char * strsignal (int @var{signum}) + @file{string.h} (GNU): @ref{Signal Messages}. @comment strspn @item size_t strspn (const char *@var{string}, const char *@var{skipset}) + @file{string.h} (ANSI): @ref{Search Functions,}. @comment strstr @item char * strstr (const char *@var{haystack}, const char *@var{needle}) + @file{string.h} (ANSI): @ref{Search Functions,}. @comment strtod @item double strtod (const char *@var{string}, char **@var{tailptr}) + @file{stdlib.h} (ANSI): @ref{Parsing of Floats}. @comment strtok @item char * strtok (char *@var{newstring}, const char *@var{delimiters}) + @file{string.h} (ANSI): @ref{Finding Tokens in a String,}. @comment strtol @item long int strtol (const char *@var{string}, char **@var{tailptr}, int @var{base}) + @file{stdlib.h} (ANSI): @ref{Parsing of Integers}. @comment strtoul @item unsigned long int strtoul (const char *@var{string}, char **@var{tailptr}, int @var{base}) + @file{stdlib.h} (ANSI): @ref{Parsing of Integers}. @comment struct cookie_io_functions @item struct cookie_io_functions + @file{stdio.h} (GNU): @ref{Streams and Cookies}. @comment struct dirent @item struct dirent + @file{dirent.h} (POSIX.1): @ref{Directory Entries}. +@comment struct flock +@item struct flock + +@file{fcntl.h} (POSIX.1): @ref{File Locks}. + @comment struct group @item struct group + @file{grp.h} (POSIX.1): @ref{Group Data Structure}. @comment struct hostent @item struct hostent + @file{netdb.h} (BSD): @ref{Host Names}. @comment struct in_addr @item struct in_addr + @file{netinet/in.h} (BSD): @ref{Host Address Data Type}. @comment struct itimerval @item struct itimerval + @file{sys/time.h} (BSD): @ref{Setting an Alarm}. @comment struct lconv @item struct lconv + @file{locale.h} (ANSI): @ref{Numeric Formatting,}. @comment struct linger @item struct linger + @file{sys/socket.h} (BSD): @ref{Socket-Level Options}. @comment struct msghdr @item struct msghdr + @file{sys/socket.h} (BSD): @ref{Receiving Datagrams}. @comment struct mstats @item struct mstats + @file{malloc.h} (GNU): @ref{Statistics of Malloc}. @comment struct netent @item struct netent + @file{netdb.h} (BSD): @ref{Networks Database}. @comment struct obstack @item struct obstack + @file{obstack.h} (GNU): @ref{Creating Obstacks}. @comment struct option @item struct option + @file{getopt.h} (GNU): @ref{Long Options}. @comment struct passwd @item struct passwd + @file{pwd.h} (POSIX.1): @ref{User Data Structure}. @comment struct printf_info @item struct printf_info + @file{printf.h} (GNU): @ref{Conversion Specifier Options}. @comment struct protoent @item struct protoent + @file{netdb.h} (BSD): @ref{Protocols Database}. @comment struct rlimit @item struct rlimit + @file{sys/resource.h} (BSD): @ref{Limits on Resources}. @comment struct rusage @item struct rusage + @file{sys/resource.h} (BSD): @ref{Resource Usage}. @comment struct servent @item struct servent + @file{netdb.h} (BSD): @ref{Services Database}. @comment struct sigaction @item struct sigaction + @file{signal.h} (POSIX.1): @ref{Advanced Signal Handling}. +@comment struct sigaltstack +@item struct sigaltstack + +@file{signal.h} (BSD): @ref{Signal Stack}. + @comment struct sigstack @item struct sigstack + @file{signal.h} (BSD): @ref{Signal Stack}. @comment struct sigvec @item struct sigvec + @file{signal.h} (BSD): @ref{BSD Handler}. @comment struct sockaddr @item struct sockaddr + @file{sys/socket.h} (BSD): @ref{Address Formats}. @comment struct sockaddr_in @item struct sockaddr_in + @file{netinet/in.h} (BSD): @ref{Internet Address Format}. @comment struct sockaddr_un @item struct sockaddr_un + @file{sys/un.h} (BSD): @ref{File Namespace Details}. @comment struct stat @item struct stat + @file{sys/stat.h} (POSIX.1): @ref{Attribute Meanings}. @comment struct termios @item struct termios + @file{termios.h} (POSIX.1): @ref{Mode Data Types}. @comment struct timeval @item struct timeval + @file{sys/time.h} (BSD): @ref{High-Resolution Calendar}. @comment struct timezone @item struct timezone + @file{sys/time.h} (BSD): @ref{High-Resolution Calendar}. @comment struct tm @item struct tm + @file{time.h} (ANSI): @ref{Broken-down Time}. @comment struct tms @item struct tms + @file{sys/times.h} (POSIX.1): @ref{Detailed CPU Time}. @comment struct utimbuf @item struct utimbuf + @file{time.h} (POSIX.1): @ref{File Times}. @comment struct utsname @item struct utsname + @file{sys/utsname.h} (POSIX.1): @ref{Hardware/Software Type ID}. @comment strxfrm @item size_t strxfrm (char *@var{to}, const char *@var{from}, size_t @var{size}) + @file{string.h} (ANSI): @ref{Collation Functions,}. +@comment _SVID_SOURCE +@item _SVID_SOURCE + +(GNU): @ref{Feature Test Macros,}. + +@comment SV_INTERRUPT +@item int SV_INTERRUPT + +@file{signal.h} (BSD): @ref{BSD Handler}. + +@comment SV_ONSTACK +@item int SV_ONSTACK + +@file{signal.h} (BSD): @ref{BSD Handler}. + +@comment SV_RESETHAND +@item int SV_RESETHAND + +@file{signal.h} (Sun): @ref{BSD Handler}. + @comment symlink @item int symlink (const char *@var{oldname}, const char *@var{newname}) + @file{unistd.h} (BSD): @ref{Symbolic Links}. @comment sysconf @item long int sysconf (int @var{parameter}) + @file{unistd.h} (POSIX.1): @ref{Sysconf Definition}. @comment system @item int system (const char *@var{command}) -@file{stdlib.h} (ANSI): @ref{Running a Command}. -@comment tan -@item double tan (double @var{x}) -@file{math.h} (ANSI): @ref{Trig Functions}. +@file{stdlib.h} (ANSI): @ref{Running a Command}. @comment tanh @item double tanh (double @var{x}) + @file{math.h} (ANSI): @ref{Hyperbolic Functions}. +@comment tan +@item double tan (double @var{x}) + +@file{math.h} (ANSI): @ref{Trig Functions}. + @comment tcdrain @item int tcdrain (int @var{filedes}) + @file{termios.h} (POSIX.1): @ref{Line Control}. @comment tcflag_t @item tcflag_t + @file{termios.h} (POSIX.1): @ref{Mode Data Types}. @comment tcflow @item int tcflow (int @var{filedes}, int @var{action}) + @file{termios.h} (POSIX.1): @ref{Line Control}. @comment tcflush @item int tcflush (int @var{filedes}, int @var{queue}) + @file{termios.h} (POSIX.1): @ref{Line Control}. @comment tcgetattr @item int tcgetattr (int @var{filedes}, struct termios *@var{termios_p}) + @file{termios.h} (POSIX.1): @ref{Mode Functions}. @comment tcgetpgrp @item pid_t tcgetpgrp (int @var{filedes}) + @file{unistd.h} (POSIX.1): @ref{Terminal Access Functions,}. +@comment TCSADRAIN +@item TCSADRAIN + +@file{termios.h} (POSIX.1): @ref{Mode Functions}. + +@comment TCSAFLUSH +@item TCSAFLUSH + +@file{termios.h} (POSIX.1): @ref{Mode Functions}. + +@comment TCSANOW +@item TCSANOW + +@file{termios.h} (POSIX.1): @ref{Mode Functions}. + +@comment TCSASOFT +@item TCSASOFT + +@file{termios.h} (BSD): @ref{Mode Functions}. + @comment tcsendbreak @item int tcsendbreak (int @var{filedes}, int @var{duration}) + @file{termios.h} (POSIX.1): @ref{Line Control}. @comment tcsetattr @item int tcsetattr (int @var{filedes}, int @var{when}, const struct termios *@var{termios_p}) + @file{termios.h} (POSIX.1): @ref{Mode Functions}. @comment tcsetpgrp @item int tcsetpgrp (int @var{filedes}, pid_t @var{pgid}) + @file{unistd.h} (POSIX.1): @ref{Terminal Access Functions,}. @comment telldir @item off_t telldir (DIR *@var{dirstream}) + @file{dirent.h} (BSD): @ref{Random Access Directory}. +@comment TEMP_FAILURE_RETRY +@item TEMP_FAILURE_RETRY (@var{expression}) + +@file{unistd.h} (GNU): @ref{Interrupted Primitives}. + @comment tempnam @item char * tempnam (const char *@var{dir}, const char *@var{prefix}) + @file{stdio.h} (SVID): @ref{Temporary Files}. +@c This file is generated by summary.awk from the Texinfo sources. @comment time @item time_t time (time_t *@var{result}) -@file{time.h} (ANSI): @ref{Simple Calendar Time}. -@comment time_t -@item time_t @file{time.h} (ANSI): @ref{Simple Calendar Time}. @comment times @item clock_t times (struct tms *@var{buffer}) + @file{sys/times.h} (POSIX.1): @ref{Detailed CPU Time}. +@comment time_t +@item time_t + +@file{time.h} (ANSI): @ref{Simple Calendar Time}. + @comment timezone @item long int timezone + @file{time.h} (SVID): @ref{Time Zone Functions}. @comment tmpfile @item FILE * tmpfile (void) + @file{stdio.h} (ANSI): @ref{Temporary Files}. +@comment TMP_MAX +@item int TMP_MAX + +@file{stdio.h} (ANSI): @ref{Temporary Files}. + @comment tmpnam @item char * tmpnam (char *@var{result}) + @file{stdio.h} (ANSI): @ref{Temporary Files}. @comment toascii @item int toascii (int @var{c}) + @file{ctype.h} (SVID, BSD): @ref{Case Conversion,}. @comment tolower @item int tolower (int @var{c}) + @file{ctype.h} (ANSI): @ref{Case Conversion,}. +@comment _tolower +@item int _tolower (int @var{c}) + +@file{ctype.h} (SVID): @ref{Case Conversion,}. + +@comment TOSTOP +@item TOSTOP + +@file{termios.h} (POSIX.1): @ref{Local Modes}. + @comment toupper @item int toupper (int @var{c}) + @file{ctype.h} (ANSI): @ref{Case Conversion,}. +@comment _toupper +@item int _toupper (int @var{c}) + +@file{ctype.h} (SVID): @ref{Case Conversion,}. + +@comment TRY_AGAIN +@item TRY_AGAIN + +@file{netdb.h} (BSD): @ref{Host Names}. + @comment ttyname @item char * ttyname (int @var{filedes}) + @file{unistd.h} (POSIX.1): @ref{Is It a Terminal}. +@comment TZNAME_MAX +@item int TZNAME_MAX + +@file{limits.h} (POSIX.1): @ref{General Limits}. + @comment tzset @item void tzset (void) + @file{time.h} (POSIX.1): @ref{Time Zone Functions}. +@comment UCHAR_MAX +@item UCHAR_MAX + +@file{limits.h} (ANSI): @ref{Range of Type}. + @comment uid_t @item uid_t + @file{sys/types.h} (POSIX.1): @ref{Reading Persona}. +@comment UINT_MAX +@item UINT_MAX + +@file{limits.h} (ANSI): @ref{Range of Type}. + +@comment ULONG_LONG_MAX +@item ULONG_LONG_MAX + +@file{limits.h} (ANSI): @ref{Range of Type}. + +@comment ULONG_MAX +@item ULONG_MAX + +@file{limits.h} (ANSI): @ref{Range of Type}. + @comment umask @item mode_t umask (mode_t @var{mask}) + @file{sys/stat.h} (POSIX.1): @ref{Setting Permissions}. @comment uname @item int uname (struct utsname *@var{info}) + @file{sys/utsname.h} (POSIX.1): @ref{Hardware/Software Type ID}. @comment ungetc @item int ungetc (int @var{c}, FILE *@var{stream}) + @file{stdio.h} (ANSI): @ref{How Unread}. @comment union wait @item union wait + @file{sys/wait.h} (BSD): @ref{BSD Wait Functions}. @comment unlink @item int unlink (const char *@var{filename}) + @file{unistd.h} (POSIX.1): @ref{Deleting Files}. +@comment USHRT_MAX +@item USHRT_MAX + +@file{limits.h} (ANSI): @ref{Range of Type}. + @comment utime @item int utime (const char *@var{filename}, const struct utimbuf *@var{times}) + @file{time.h} (POSIX.1): @ref{File Times}. @comment utimes @item int utimes (const char *@var{filename}, struct timeval @var{tvp}@t{[2]}) + @file{sys/time.h} (BSD): @ref{File Times}. @comment va_alist @item va_alist + @file{varargs.h} (Unix): @ref{Old Varargs}. @comment va_arg @item @var{type} va_arg (va_list @var{ap}, @var{type}) + @file{stdarg.h} (ANSI): @ref{Argument Macros}. @comment va_dcl @item va_dcl + @file{varargs.h} (Unix): @ref{Old Varargs}. @comment va_end @item void va_end (va_list @var{ap}) + @file{stdarg.h} (ANSI): @ref{Argument Macros}. @comment va_list @item va_list + @file{stdarg.h} (ANSI): @ref{Argument Macros}. +@comment valloc +@item void * valloc (size_t @var{size}) + +@file{malloc.h}, @file{stdlib.h} (BSD): @ref{Aligned Memory Blocks}. + +@comment vasprintf +@item int vasprintf (char **@var{ptr}, const char *@var{template}, va_list @var{ap}) + +@file{stdio.h} (GNU): @ref{Variable Arguments Output}. + @comment va_start @item void va_start (va_list @var{ap}) + @file{varargs.h} (Unix): @ref{Old Varargs}. @comment va_start @item void va_start (va_list @var{ap}, @var{last_required}) + @file{stdarg.h} (ANSI): @ref{Argument Macros}. -@comment valloc -@item void * valloc (size_t @var{size}) -@file{malloc.h}, @file{stdlib.h} (BSD): @ref{Aligned Memory Blocks}. +@comment VDISCARD +@item int VDISCARD -@comment vasprintf -@item int vasprintf (char **@var{ptr}, const char *@var{template}, va_list @var{ap}) -@file{stdio.h} (GNU): @ref{Variable Arguments Output}. +@file{termios.h} (BSD): @ref{Other Special}. + +@comment VDSUSP +@item int VDSUSP + +@file{termios.h} (BSD): @ref{Signal Characters}. + +@comment VEOF +@item int VEOF + +@file{termios.h} (POSIX.1): @ref{Editing Characters}. + +@comment VEOL2 +@item int VEOL2 + +@file{termios.h} (BSD): @ref{BSD Editing}. + +@comment VEOL +@item int VEOL + +@file{termios.h} (POSIX.1): @ref{Editing Characters}. +@comment VERASE +@item int VERASE + +@file{termios.h} (POSIX.1): @ref{Editing Characters}. + @comment vfork @item pid_t vfork (void) + @file{unistd.h} (BSD): @ref{Creating a Process}. @comment vfprintf @item int vfprintf (FILE *@var{stream}, const char *@var{template}, va_list @var{ap}) + @file{stdio.h} (ANSI): @ref{Variable Arguments Output}. @comment vfscanf @item int vfscanf (FILE *@var{stream}, const char *@var{template}, va_list @var{ap}) + @file{stdio.h} (GNU): @ref{Variable Arguments Input}. +@comment VINTR +@item int VINTR + +@file{termios.h} (POSIX.1): @ref{Signal Characters}. + +@comment VKILL +@item int VKILL + +@file{termios.h} (POSIX.1): @ref{Editing Characters}. + +@comment VLNEXT +@item int VLNEXT + +@file{termios.h} (BSD): @ref{BSD Editing}. + +@comment VMIN +@item int VMIN + +@file{termios.h} (POSIX.1): @ref{Noncanonical Input}. + @comment vprintf @item int vprintf (const char *@var{template}, va_list @var{ap}) + @file{stdio.h} (ANSI): @ref{Variable Arguments Output}. +@comment VQUIT +@item int VQUIT + +@file{termios.h} (POSIX.1): @ref{Signal Characters}. + +@comment VREPRINT +@item int VREPRINT + +@file{termios.h} (BSD): @ref{BSD Editing}. + @comment vscanf @item int vscanf (const char *@var{template}, va_list @var{ap}) + @file{stdio.h} (GNU): @ref{Variable Arguments Input}. @comment vsnprintf @item int vsnprintf (char *@var{s}, size_t @var{size}, const char *@var{template}, va_list @var{ap}) + @file{stdio.h} (GNU): @ref{Variable Arguments Output}. @comment vsprintf @item int vsprintf (char *@var{s}, const char *@var{template}, va_list @var{ap}) + @file{stdio.h} (ANSI): @ref{Variable Arguments Output}. @comment vsscanf @item int vsscanf (const char *@var{s}, const char *@var{template}, va_list @var{ap}) + @file{stdio.h} (GNU): @ref{Variable Arguments Input}. -@comment wait -@item pid_t wait (int *@var{status_ptr}) -@file{sys/wait.h} (POSIX.1): @ref{Process Completion}. +@comment VSTART +@item int VSTART + +@file{termios.h} (POSIX.1): @ref{Start/Stop Characters}. + +@comment VSTATUS +@item int VSTATUS + +@file{termios.h} (BSD): @ref{Other Special}. + +@comment VSTOP +@item int VSTOP + +@file{termios.h} (POSIX.1): @ref{Start/Stop Characters}. + +@comment VSUSP +@item int VSUSP + +@file{termios.h} (POSIX.1): @ref{Signal Characters}. + +@comment VTIME +@item int VTIME + +@file{termios.h} (POSIX.1): @ref{Noncanonical Input}. + +@comment VWERASE +@item int VWERASE + +@file{termios.h} (BSD): @ref{BSD Editing}. @comment wait3 @item pid_t wait3 (union wait *@var{status_ptr}, int @var{options}, struct rusage *@var{usage}) + @file{sys/wait.h} (BSD): @ref{BSD Wait Functions}. @comment wait4 @item pid_t wait4 (pid_t @var{pid}, union wait *@var{status_ptr}, int @var{options}, struct rusage *@var{usage}) + @file{sys/wait.h} (BSD): @ref{BSD Wait Functions}. +@comment wait +@item pid_t wait (int *@var{status_ptr}) + +@file{sys/wait.h} (POSIX.1): @ref{Process Completion}. + @comment waitpid @item pid_t waitpid (pid_t @var{pid}, int *@var{status_ptr}, int @var{options}) + @file{sys/wait.h} (POSIX.1): @ref{Process Completion}. +@comment WCHAR_MAX +@item WCHAR_MAX + +@file{limits.h} (GNU): @ref{Range of Type}. + @comment wchar_t @item wchar_t + @file{stddef.h} (ANSI): @ref{Wide Char Intro,}. +@comment WCOREDUMP +@item int WCOREDUMP (int @var{status}) + +@file{sys/wait.h} (BSD): @ref{Process Completion Status}. + @comment wcstombs @item size_t wcstombs (char *@var{string}, const wchar_t @var{wstring}, size_t @var{size}) + @file{stdlib.h} (ANSI): @ref{Wide String Conversion,}. @comment wctomb @item int wctomb (char *@var{string}, wchar_t @var{wchar}) + @file{stdlib.h} (ANSI): @ref{Converting One Char,}. +@comment WEXITSTATUS +@item int WEXITSTATUS (int @var{status}) + +@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. + +@comment WIFEXITED +@item int WIFEXITED (int @var{status}) + +@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. + +@comment WIFSIGNALED +@item int WIFSIGNALED (int @var{status}) + +@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. + +@comment WIFSTOPPED +@item int WIFSTOPPED (int @var{status}) + +@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. + +@comment W_OK +@item int W_OK + +@file{unistd.h} (POSIX.1): @ref{Testing File Access}. + @comment wordexp @item int wordexp (const char *@var{words}, wordexp_t *@var{word-vector-ptr}, int @var{flags}) + @file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. @comment wordexp_t @item wordexp_t + @file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. @comment wordfree @item void wordfree (wordexp_t *@var{word-vector-ptr}) + +@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. + +@comment WRDE_APPEND +@item WRDE_APPEND + +@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. + +@comment WRDE_BADCHAR +@item WRDE_BADCHAR + +@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. + +@comment WRDE_BADVAL +@item WRDE_BADVAL + +@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. + +@comment WRDE_CMDSUB +@item WRDE_CMDSUB + +@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. + +@comment WRDE_DOOFFS +@item WRDE_DOOFFS + +@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. + +@comment WRDE_NOCMD +@item WRDE_NOCMD + +@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. + +@comment WRDE_NOSPACE +@item WRDE_NOSPACE + +@file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. + +@comment WRDE_REUSE +@item WRDE_REUSE + +@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. + +@comment WRDE_SHOWERR +@item WRDE_SHOWERR + +@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. + +@comment WRDE_SYNTAX +@item WRDE_SYNTAX + @file{wordexp.h} (POSIX.2): @ref{Calling Wordexp}. +@comment WRDE_UNDEF +@item WRDE_UNDEF + +@file{wordexp.h} (POSIX.2): @ref{Flags for Wordexp}. + @comment write @item ssize_t write (int @var{filedes}, const void *@var{buffer}, size_t @var{size}) + @file{unistd.h} (POSIX.1): @ref{I/O Primitives}. + +@comment WSTOPSIG +@item int WSTOPSIG (int @var{status}) + +@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. + +@comment WTERMSIG +@item int WTERMSIG (int @var{status}) + +@file{sys/wait.h} (POSIX.1): @ref{Process Completion Status}. + +@comment X_OK +@item int X_OK + +@file{unistd.h} (POSIX.1): @ref{Testing File Access}. diff -ruN glibc-1.06/manual/sysinfo.texi glibc-1.07/manual/sysinfo.texi --- glibc-1.06/manual/sysinfo.texi Wed May 12 14:26:37 1993 +++ glibc-1.07/manual/sysinfo.texi Thu Jun 24 20:35:41 1993 @@ -75,20 +75,19 @@ @comment unistd.h @comment BSD @deftypefun {long int} gethostid (void) -This function returns the Internet address of the machine the program is -running on. -@c !!! this is not necessarily the IP address. it is whatever was set -@c with sethostid (or the `hostid' program). on sun4s, it is an -@c unchangeable constant that is unique for each machine. -@c making it the primary IP address is a convention. +This function returns the ``host ID'' of the machine the program is +running on. By convention, this is usually the primary Internet address +of that machine, converted to a @w{@code{long int}}. But on some +systems it is a meaningless but unique number which is hard-coded for +each machine. @end deftypefun @comment unistd.h @comment BSD @deftypefun int sethostid (long int @var{id}) -The @code{sethostid} function sets the address of the host machine to -@var{id}. Only privileged processes are allowed to do this. Usually it -happens just once, at system boot time. +The @code{sethostid} function sets the ``host ID'' of the host machine +to @var{id}. Only privileged processes are allowed to do this. Usually +it happens just once, at system boot time. The return value is @code{0} on success and @code{-1} on failure. The following @code{errno} error condition is defined for this function: @@ -96,6 +95,11 @@ @table @code @item EPERM This process cannot set the host name because it is not privileged. + +@item ENOSYS +The operating system does not support setting the host ID. On some +systems, the host ID is a meaningless but unique number hard-coded for +each machine. @end table @end deftypefun @@ -133,12 +137,14 @@ @item char machine[] This is a description of the type of hardware that is in use. -@c !!! this is only true if the operating system has no uname system call. -The GNU C Library fills in this field based on the configuration name -that was specified when building and installing the library. GNU uses a -three-part name to describe a system configuration; the three parts are -@var{cpu}, @var{manufacturer} and @var{system-type}, and they are -separated with dashes. Any possible combination of three names is +Some systems provide a mechanism to interrogate the kernel directly for +this information. On systems without such a mechanism, the GNU C +library fills in this field based on the configuration name that was +specified when building and installing the library. + +GNU uses a three-part name to describe a system configuration; the three +parts are @var{cpu}, @var{manufacturer} and @var{system-type}, and they +are separated with dashes. Any possible combination of three names is potentially meaningful, but most such combinations are meaningless in practice and even the meaningful ones are not necessarily supported by any particular GNU program. @@ -145,15 +151,15 @@ Since the value in @code{machine} is supposed to describe just the hardware, it consists of the first two parts of the configuration name: -@samp{@var{cpu}-@var{manufacturer}}. - -@c !!! this is yet another case where you are losing massively because -@c you want to have an explicit list. many others are possible. -Here is a list of all the possible alternatives: +@samp{@var{cpu}-@var{manufacturer}}. For example, it might be one of these: @quotation -@code{"i386-@var{anything}"}, @code{"m68k-hp"}, @code{"sparc-sun"}, -@code{"m68k-sun"}, @code{"m68k-sony"}, @code{"mips-dec"} +@code{"sparc-sun"}, +@code{"i386-@var{anything}"}, +@code{"m68k-hp"}, +@code{"m68k-sony"}, +@code{"m68k-sun"}, +@code{"mips-dec"} @end quotation @end table @end deftp diff -ruN glibc-1.06/manual/terminal.texi glibc-1.07/manual/terminal.texi --- glibc-1.06/manual/terminal.texi Wed May 12 14:26:39 1993 +++ glibc-1.07/manual/terminal.texi Tue Jun 29 03:19:47 1993 @@ -176,13 +176,13 @@ @table @code @item tcflag_t c_iflag -A bit mask specifying input modes; see @ref{Input Modes}. +A bit mask specifying flags for input modes; see @ref{Input Modes}. @item tcflag_t c_oflag -A bit mask specifying output modes; see @ref{Output Modes}. +A bit mask specifying flags for output modes; see @ref{Output Modes}. @item tcflag_t c_cflag -A bit mask specifying control modes; see @ref{Control Modes}. +A bit mask specifying flags for control modes; see @ref{Control Modes}. @item tcflag_t c_lflag A bit mask specifying flags for local modes; see @ref{Local Modes}. @@ -357,7 +357,7 @@ @code{struct termios} structure while properly preserving all the other data in the structure: -@example +@smallexample @group int set_istrip (int desc, int value) @@ -383,7 +383,7 @@ return 1; @} @end group -@end example +@end smallexample @node Input Modes @subsection Input Modes @@ -840,8 +840,7 @@ The following bits are BSD extensions; the GNU library defines these symbols on any system if you ask for them, but the settings of the bits -have no effect except on BSD systems. -@c !!! and GNU +have no effect except on BSD systems and on the GNU system. @table @code @comment termios.h @@ -1054,11 +1053,11 @@ @comment termios.h @comment POSIX.1 @vindex B38400 -@example +@smallexample B0 B50 B75 B110 B134 B150 B200 B300 B600 B1200 B1800 B2400 B4800 B9600 B19200 B38400 -@end example +@end smallexample @vindex EXTA @vindex EXTB @@ -1069,15 +1068,16 @@ @comment termios.h @comment BSD @deftypefun int cfmakeraw (struct termios *@var{termios_p}) -@c !!! this is a BSD extension. it does: -@example - t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP +This function provides an easy way to set up @code{*@var{termios_p}} for +what has traditionally been called ``raw mode'' in BSD. It does exactly this: +@smallexample + @var{termios_p}->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP |INLCR|IGNCR|ICRNL|IXON); - t->c_oflag &= ~OPOST; - t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); - t->c_cflag &= ~(CSIZE|PARENB); - t->c_cflag |= CS8; -@end example + @var{termios_p}->c_oflag &= ~OPOST; + @var{termios_p}->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + @var{termios_p}->c_cflag &= ~(CSIZE|PARENB); + @var{termios_p}->c_cflag |= CS8; +@end smallexample @end deftypefun @node Special Characters @@ -1700,9 +1700,9 @@ device to read single characters in noncanonical input mode, without echo. -@example +@smallexample @include termios.c.texi -@end example +@end smallexample This program is careful to restore the original terminal modes before exiting or terminating with a signal. It uses the @code{atexit} @@ -1709,10 +1709,12 @@ function (@pxref{Cleanups on Exit}) to make sure this is done by @code{exit}. +@ignore @c !!!! the example doesn't handle any signals! The signals handled in the example are the ones that typically occur due to actions of the user. It might be desirable to handle other signals such as SIGSEGV that can result from bugs in the program. +@end ignore The shell is supposed to take care of resetting the terminal modes when a process is stopped or continued; see @ref{Job Control}. But some diff -ruN glibc-1.06/manual/termios.c.texi glibc-1.07/manual/termios.c.texi --- glibc-1.06/manual/termios.c.texi Tue Oct 27 18:59:56 1992 +++ glibc-1.07/manual/termios.c.texi Thu Jun 10 18:00:37 1993 @@ -3,7 +3,7 @@ #include #include -/* @r{Use this variable to remember original terminal attributes. } */ +/* @r{Use this variable to remember original terminal attributes.} */ struct termios saved_attributes; @@ -19,7 +19,7 @@ struct termios tattr; char *name; - /* @r{Make sure stdin is a terminal. } */ + /* @r{Make sure stdin is a terminal.} */ if (!isatty (STDIN_FILENO)) @{ fprintf (stderr, "Not a terminal.\n"); @@ -26,14 +26,14 @@ exit (EXIT_FAILURE); @} - /* @r{Save the terminal attributes so we can restore them later. } */ + /* @r{Save the terminal attributes so we can restore them later.} */ tcgetattr (STDIN_FILENO, &saved_attributes); atexit (reset_input_mode); @group - /* @r{Set the funny terminal modes. } */ + /* @r{Set the funny terminal modes.} */ tcgetattr (STDIN_FILENO, &tattr); - tattr.c_lflag &= ~(ICANON|ECHO); /* @r{Clear ICANON and ECHO. } */ + tattr.c_lflag &= ~(ICANON|ECHO); /* @r{Clear ICANON and ECHO.} */ tattr.c_cc[VMIN] = 1; tattr.c_cc[VTIME] = 0; tcsetattr (STDIN_FILENO, TCSAFLUSH, &tattr); @@ -50,10 +50,10 @@ while (1) @{ read (STDIN_FILENO, &c, 1); - if (c == '\004') /* @r{@kbd{C-d} } */ - break; + if (c == '\004') /* @r{@kbd{C-d}} */ + break; else - putchar (c); + putchar (c); @} return EXIT_SUCCESS; diff -ruN glibc-1.06/manual/texinfo.tex glibc-1.07/manual/texinfo.tex --- glibc-1.06/manual/texinfo.tex Sun May 9 10:33:22 1993 +++ glibc-1.07/manual/texinfo.tex Sat Dec 25 22:32:06 1993 @@ -22,7 +22,7 @@ %You are forbidden to forbid anyone else to use, share and improve %what you give them. Help stamp out software-hoarding! -\def\texinfoversion{2.108} +\def\texinfoversion{2.118} \message{Loading texinfo package [Version \texinfoversion]:} % Print the version number if in a .fmt file. @@ -460,7 +460,7 @@ % @dots{} output some dots -\def\dots{$\ldots$} +\def\dots{.$\,$.$\,$.\:} % @page forces the start of a new page @@ -679,6 +679,11 @@ \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont \let\tensf = \nullfont + % Similarly for index fonts (mostly for their use in + % smallexample) + \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont + \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont + \let\indsf = \nullfont % % Don't complain when characters are missing from the fonts. \tracinglostchars = 0 @@ -1074,10 +1079,17 @@ % and arrange explicitly to hyphenate an a dash. % -- rms. { -\catcode `\-=\active -\catcode `\_=\active -\global\def\code{\begingroup \catcode `\-=\active \let-\codedash \let_\codeunder \codex} +\catcode`\-=\active +\catcode`\_=\active +\global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} +% The following is used by \doprintindex to insure that long function names +% wrap around. It is necessary for - and _ to be active before the index is +% read from the file, as \entry parses the arguments long before \code is +% ever called. -- mycroft +\global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder} } +\def\realdash{-} +\def\realunder{_} \def\codedash{-\discretionary{}{}{}} \def\codeunder{\normalunderscore\discretionary{}{}{}} \def\codex #1{\tclose{#1}\endgroup} @@ -1140,7 +1152,7 @@ \def\titlezzz##1{\leftline{\titlefont{##1}} % print a rule at the page bottom also. \finishedtitlepagefalse - \vskip4pt \hrule height 4pt \vskip4pt}% + \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % @@ -1180,7 +1192,7 @@ } \def\finishtitlepage{% - \vskip4pt \hrule height 2pt + \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } @@ -1354,14 +1366,18 @@ % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). +\newif\ifitemxneedsnegativevskip + +\def\itemxpar{\par\ifitemxneedsnegativevskip\vskip-\parskip\nobreak\fi} + \def\internalBitem{\smallbreak \parsearg\itemzzz} -\def\internalBitemx{\par \parsearg\itemzzz} +\def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} -\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \par \parsearg\xitemzzz} +\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} \def\internalBkitem{\smallbreak \parsearg\kitemzzz} -\def\internalBkitemx{\par \parsearg\kitemzzz} +\def\internalBkitemx{\itemxpar \parsearg\kitemzzz} \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% \itemzzz {#1}} @@ -1377,9 +1393,9 @@ \nobreak % This prevents a break before @itemx. % % Be sure we are not still in the middle of a paragraph. - {\parskip = 0in - \par - }% + %{\parskip = 0in + %\par + %}% % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that @@ -1387,7 +1403,15 @@ % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax - \setbox0=\hbox{\hskip \leftskip \hskip -\tableindent \unhbox0}\box0 + % + % Make this a paragraph so we get the \parskip glue and wrapping, + % but leave it ragged-right. + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent + \advance\rightskip by0pt plus1fil + \leavevmode\unhbox0\par + \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. @@ -1397,6 +1421,8 @@ % we can't prevent a possible page break at the following % \baselineskip glue. \nobreak + \endgroup + \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. Since that @@ -1403,9 +1429,10 @@ % text will be indented by \tableindent, we make the item text be in % a zero-width box. \noindent - \rlap{\hskip -\tableindent\box0}% + \rlap{\hskip -\tableindent\box0}\ignorespaces% + \endgroup% + \itemxneedsnegativevskiptrue% \fi - \endgroup } \def\item{\errmessage{@item while not in a table}} @@ -1477,7 +1504,7 @@ \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% - \begingroup % ended by the @end itemsize + \begingroup % ended by the @end itemize \itemizey {#1}{\Eitemize} } @@ -1838,8 +1865,9 @@ \tex \dobreak \chapheadingskip {10000} \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other - \catcode`\$=\other\catcode`\_=\other + \catcode`\$=\other \catcode`\~=\other + \indexbreaks % % The following don't help, since the chars were translated % when the raw index was written, and their fonts were discarded @@ -1932,23 +1960,32 @@ % % Insert the text of the index entry. TeX will do line-breaking on it. #1% - % - % If we must, put the page number on a line of its own, and fill out - % this line with blank space. (The \hfil is overwhelmed with the - % fill leaders glue in \indexdotfill if the page number does fit.) - \hfil\penalty50 - \null\nobreak\indexdotfill % Have leaders before the page number. - % - % The `\ ' here is removed by the implicit \unskip that TeX does as - % part of (the primitive) \par. Without it, a spurious underfull - % \hbox ensues. - \ #2% The page number ends the paragraph. + % The following is kluged to not output a line of dots in the index if + % there are no page numbers. The next person who breaks this will be + % cursed by a Unix daemon. + \def\tempa{{\rm }}% + \def\tempb{#2}% + \edef\tempc{\tempa}% + \edef\tempd{\tempb}% + \ifx\tempc\tempd\ \else% + % + % If we must, put the page number on a line of its own, and fill out + % this line with blank space. (The \hfil is overwhelmed with the + % fill leaders glue in \indexdotfill if the page number does fit.) + \hfil\penalty50 + \null\nobreak\indexdotfill % Have leaders before the page number. + % + % The `\ ' here is removed by the implicit \unskip that TeX does as + % part of (the primitive) \par. Without it, a spurious underfull + % \hbox ensues. + \ #2% The page number ends the paragraph. + \fi% \par \endgroup} % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders - \hbox{$\mathsurround=0pt \mkern1.5mu . \mkern1.5mu$}\hskip 1em plus 1fill} + \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} @@ -2809,7 +2846,7 @@ % Define \obeyedspace to be our active space, whatever it is. This is % for use in \parsearg. -{\sepspaces % +{\sepspaces% \global\let\obeyedspace= } % This space is always present above and below environments. @@ -3104,7 +3141,7 @@ \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % -\catcode 61=\active % +\catcode 61=\active % 61 is `=' \obeylines\activeparens\spacesplit#3} \def\defmethparsebody #1#2#3#4 {\begingroup\inENV % @@ -3147,55 +3184,54 @@ \catcode 61=\active % \obeylines\spacesplit#3} -\def\defvrparsebody #1#2#3#4 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% -\parindent=0in -\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\spacesplit{#3{#4}}} - -% This seems to work right in all cases. -\let\deftpparsebody=\defvrparsebody -% This fails to work. When given `@deftp {Data Type} foo_t', -% it thinks the type name is just `f'. -%%% This is the same as all the others except for the last line. We need -%%% to parse the arguments differently for @deftp, since the ``attributes'' -%%% there are optional. -%%% -%%\def\deftpparsebody #1#2#3#4 {\begingroup\inENV % -%%\medbreak % -%%% Define the end token that this defining construct specifies -%%% so that it will exit this group. -%%\def#1{\endgraf\endgroup\medbreak}% -%%\def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% -%%\parindent=0in -%%\advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent -%%\exdentamount=\defbodyindent -%%\begingroup\obeylines\parsetpheaderline{#3{#4}}} - -%%{\obeylines % -%% % Parse the type name and any attributes (field names, etc.). -%% % #1 is the beginning of the macro call that will produce the output, -%% % i.e., \deftpheader{CLASS}; this is passed from \deftpparsebody. -%% % #2 is the type name, e.g., `struct termios'. -%% % #3 is the (possibly empty) attribute list. -%% % -%% \gdef\parsetpheaderline#1#2#3^^M{% -%% \endgroup % Started in \deftpparsebody. -%% % -%% % If the attribute list is in fact empty, there will be no space after -%% % #2; so we can't put a space in our TeX parameter list. But if it -%% % isn't empty, then #3 will begin with an unwanted space. -%% \def\theargs{\ignorespaces #3}% -%% % -%% % Call the macro to produce the output. -%% #1{#2}\theargs % -%% }% -%%} +% This is used for \def{tp,vr}parsebody. It could probably be used for +% some of the others, too, with some judicious conditionals. +% +\def\parsebodycommon#1#2#3{% + \begingroup\inENV % + \medbreak % + % Define the end token that this defining construct specifies + % so that it will exit this group. + \def#1{\endgraf\endgroup\medbreak}% + \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% + \parindent=0in + \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent + \exdentamount=\defbodyindent + \begingroup\obeylines +} + +\def\defvrparsebody#1#2#3#4 {% + \parsebodycommon{#1}{#2}{#3}% + \spacesplit{#3{#4}}% +} + +% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the +% type is just `struct', because we lose the braces in `{struct +% termios}' when \spacesplit reads its undelimited argument. Sigh. +% \let\deftpparsebody=\defvrparsebody +% +% So, to get around this, we put \empty in with the type name. That +% way, TeX won't find exactly `{...}' as an undelimited argument, and +% won't strip off the braces. +% +\def\deftpparsebody #1#2#3#4 {% + \parsebodycommon{#1}{#2}{#3}% + \spacesplit{\parsetpheaderline{#3{#4}}}\empty +} + +% Fine, but then we have to eventually remove the \empty *and* the +% braces (if any). That's what this does, putting the result in \tptemp. +% +\def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}% + +% After \spacesplit has done its work, this is called -- #1 is the final +% thing to call, #2 the type name (which starts with \empty), and #3 +% (which might be empty) the arguments. +% +\def\parsetpheaderline#1#2#3{% + \removeemptybraces#2\relax + #1{\tptemp}{#3}% +}% \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % @@ -3245,7 +3281,7 @@ % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. \functionparens -\code{#1}% +\tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% @@ -3295,7 +3331,10 @@ % #1 is the classification, #2 the data type, #3 the name, #4 the args. \def\deftypefnheaderx #1#2#3 #4\relax{% \doind {fn}{\code{#3}}% Make entry in function index -\begingroup\defname {\code{#2} #3}{#1}% +\begingroup +\normalparens % notably, turn off `&' magic, which prevents +% at least some C++ text from working +\defname {\code{#2} #3}{#1}% \deftypefunargs {#4}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } @@ -3474,17 +3513,17 @@ % \setref{foo} defines a cross-reference point named foo. \def\setref#1{% -%\dosetq{#1-title}{Ytitle}% +\dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{Ysectionnumberandtype}} \def\unnumbsetref#1{% -%\dosetq{#1-title}{Ytitle}% +\dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{Ynothing}} \def\appendixsetref#1{% -%\dosetq{#1-title}{Ytitle}% +\dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{Yappendixletterandtype}} @@ -3504,11 +3543,22 @@ \setbox1=\hbox{\printedmanual}% \setbox0=\hbox{\printednodename}% \ifdim \wd0=0pt% +% No printed node name was explicitly given. +\ifx SETxref-automatic-section-title % +% This line should make the actual chapter or section title appear inside +% the square brackets. Use the real section title if we have it. +\ifdim \wd1>0pt% +% It is in another manual, so we don't have it. +\def\printednodename{\ignorespaces #1} \else% +% We know the real title if we have the xref values. +\ifhavexrefs \def\printednodename{\refx{#1-title}}% +% Otherwise just copy the Info node name. +\else \def\printednodename{\ignorespaces #1} \fi% +\fi\def\printednodename{#1-title}% +\else% This line just uses the node name. \def\printednodename{\ignorespaces #1}% -%%% Uncommment the following line to make the actual chapter or section title -%%% appear inside the square brackets. -%\def\printednodename{#1-title}% -\fi% +\fi% ends \ifx SETxref-automatic-section-title +\fi% ends \ifdim \wd0 % % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does @@ -3544,7 +3594,7 @@ \def\Ypagenumber{\folio} -\def\Ytitle{\thischapter} +\def\Ytitle{\thissection} \def\Ynothing{} diff -ruN glibc-1.06/manual/time.texi glibc-1.07/manual/time.texi --- glibc-1.06/manual/time.texi Wed May 12 14:26:41 1993 +++ glibc-1.07/manual/time.texi Thu Jun 24 20:35:43 1993 @@ -65,7 +65,7 @@ end of the interval you want to time, subtract the values, and then divide by @code{CLOCKS_PER_SEC} (the number of clock ticks per second), like this: -@example +@smallexample @group #include @@ -77,7 +77,7 @@ end = clock(); elapsed = ((double) (end - start)) / CLOCKS_PER_SEC; @end group -@end example +@end smallexample Different computers and operating systems vary wildly in how they keep track of processor time. It's common for the internal processor clock @@ -305,7 +305,6 @@ @end table @end deftp -@c !!! struct timezone is obsolete and should NEVER, EVER be used. @comment sys/time.h @comment BSD @deftp {Data Type} {struct timezone} @@ -319,6 +318,9 @@ @item int tz_dsttime If nonzero, daylight savings time applies during some part of the year. @end table + +The @code{struct timezone} type is obsolete and should never be used. +Instead, use the facilities described in @ref{Time Zone Functions}. @end deftp It is often necessary to subtract two values of type @w{@code{struct @@ -326,7 +328,7 @@ peculiar operating systems where the @code{tv_sec} member has an unsigned type. -@example +@smallexample /* @r{Subtract the `struct timeval' values X and Y,} @r{storing the result in RESULT.} @r{Return 1 if the difference is negative, otherwise 0.} */ @@ -335,7 +337,7 @@ timeval_subtract (result, x, y) struct timeval *result, *x, *y; @{ - /* @r{Perform the carry for the later subtraction by updating y.} */ + /* @r{Perform the carry for the later subtraction by updating @var{y}.} */ if (x->tv_usec < y->tv_usec) @{ int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1; y->tv_usec -= 1000000 * nsec; @@ -355,7 +357,7 @@ /* @r{Return 1 if result is negative.} */ return x->tv_sec < y->tv_sec; @} -@end example +@end smallexample @comment sys/time.h @comment BSD @@ -370,12 +372,11 @@ @table @code @item ENOSYS -@c !!! rms check my writing The operating system does not support getting time zone information, and @var{tzp} is not a null pointer. The GNU operating system does not support using @w{@code{struct timezone}} to represent time zone -information. Use @code{tzname} et al instead. @strong{Say something -more helpful here.} +information; that is an obsolete feature of 4.3 BSD. +Instead, use the facilities described in @ref{Time Zone Functions}. @end table @end deftypefun @@ -572,12 +573,12 @@ @comment time.h @comment ANSI @deftypefun {char *} asctime (const struct tm *@var{brokentime}) -The @code{asctime} function writes the broken-down time value pointed at by -@var{brokentime} into a string in a standard format: +The @code{asctime} function converts the broken-down time value that +@var{brokentime} points to into a string in a standard format: -@example +@smallexample "Tue May 21 13:46:22 1991\n" -@end example +@end smallexample The abbreviations for the days of week are: @samp{Sun}, @samp{Mon}, @samp{Tue}, @samp{Wed}, @samp{Thu}, @samp{Fri}, and @samp{Sat}. @@ -599,9 +600,9 @@ the time value is specified in calendar time (rather than local time) format. It is equivalent to -@example +@smallexample asctime (localtime (@var{time})) -@end example +@end smallexample @code{ctime} sets the variable @code{tzname}, because @code{localtime} does so. @xref{Time Zone Functions}. @@ -705,7 +706,9 @@ not including the terminating null character. If the value equals @var{size}, it means that the array @var{s} was too small; you should repeat the call, providing a bigger array. -@c !!! can pass NULL for S to find size to allocate. + +If @var{s} is a null pointer, @code{strftime} does not actually write +anything, but instead returns the number of characters it would have written. For an example of @code{strftime}, see @ref{Time Functions Example}. @end deftypefun @@ -724,9 +727,9 @@ first format is used when there is no Daylight Saving Time (or summer time) in the local time zone: -@example +@smallexample @r{@var{std} @var{offset}} -@end example +@end smallexample The @var{std} string specifies the name of the time zone. It must be three or more characters long and must not contain a leading colon or @@ -744,15 +747,15 @@ For example, here is how we would specify Eastern Standard Time, but without any daylight savings time alternative: -@example +@smallexample EST+5 -@end example +@end smallexample The second format is used when there is Daylight Saving Time: -@example +@smallexample @r{@var{std} @var{offset} @var{dst} [@var{offset}]@code{,}@var{start}[@code{/}@var{time}]@code{,}@var{end}[@code{/}@var{time}]} -@end example +@end smallexample The initial @var{std} and @var{offset} specify the standard time zone, as described above. The @var{dst} string and @var{offset} specify the name @@ -793,9 +796,9 @@ the first Sunday in April at 2:00am, and ends on the last Sunday in October at 2:00am. -@example +@smallexample EST+5EDT,M4.1.0/M10.5.0 -@end example +@end smallexample @c !!! this is not true if using the tzfile database The schedule of daylight savings time in any particular jurisdiction has @@ -808,9 +811,9 @@ The third format looks like this: -@example +@smallexample :@var{characters} -@end example +@end smallexample Each operating system interprets this format differently; in the GNU C library, @var{characters} is the name of a file which describes the time @@ -831,7 +834,7 @@ @comment time.h @comment POSIX.1 -@deftypevar char *tzname[2] +@deftypevar char * tzname [2] The array @code{tzname} contains two strings, which are the standard three-letter names of the pair of time zones (standard and daylight savings) that the user has selected. @code{tzname[0]} is the name of @@ -879,17 +882,17 @@ Here is an example program showing the use of some of the local time and calendar time functions. -@example -@include strftime.c.texi -@end example +@smallexample +@include strftim.c.texi +@end smallexample It produces output like this: -@example +@smallexample Wed Jul 31 13:02:36 1991 Today is Wednesday, July 31. The time is 01:02 PM. -@end example +@end smallexample @node Setting an Alarm @@ -897,7 +900,7 @@ The @code{alarm} and @code{setitimer} functions provide a mechanism for a process to interrupt itself at some future time. They do this by setting a -timer; when the timer expires, the process recieves a signal. +timer; when the timer expires, the process receives a signal. @cindex setting an alarm @cindex interval timer, setting @@ -1031,7 +1034,7 @@ The @code{alarm} function could be defined in terms of @code{setitimer} like this: -@example +@smallexample unsigned int alarm (unsigned int seconds) @{ @@ -1045,7 +1048,7 @@ else return old.it_value.tv_sec; @} -@end example +@end smallexample There is an example showing the use of the @code{alarm} function in @ref{Handler Returns}. @@ -1465,7 +1468,7 @@ Here is an equivalent definition for @code{nice}: -@example +@smallexample int nice (int increment) @{ @@ -1472,5 +1475,5 @@ int old = getpriority (PRIO_PROCESS, 0); setpriority (PRIO_PROCESS, 0, old + increment); @} -@end example +@end smallexample @end deftypefun diff -ruN glibc-1.06/manual/users.texi glibc-1.07/manual/users.texi --- glibc-1.06/manual/users.texi Wed May 12 14:26:43 1993 +++ glibc-1.07/manual/users.texi Thu Jun 24 20:35:44 1993 @@ -241,13 +241,14 @@ Here's how to use @code{getgroups} to read all the supplementary group IDs: -@example +@smallexample @group gid_t * read_all_groups (void) @{ int ngroups = getgroups (NULL, 0); - gid_t *groups = (gid_t *) xmalloc (ngroups * sizeof (gid_t)); + gid_t *groups + = (gid_t *) xmalloc (ngroups * sizeof (gid_t)); int val = getgroups (ngroups, groups); if (val < 0) @{ @@ -257,7 +258,7 @@ return groups; @} @end group -@end example +@end smallexample @end deftypefun @node Setting User ID @@ -300,9 +301,10 @@ @comment unistd.h @comment BSD @deftypefun int setreuid (uid_t @var{ruid}, uid_t @var{euid}) -This function sets the real user ID of the process to @var{ruid} and -the effective user ID to @var{euid}. -@c !!! args can be -1 to mean no change +This function sets the real user ID of the process to @var{ruid} and the +effective user ID to @var{euid}. If @var{ruid} is @code{-1}, it means +not to change the real user ID; likewise if @var{euid} is @code{-1}, it +means not to change the effective user ID. The @code{setreuid} function exists for compatibility with 4.3 BSD Unix, which does not support saved IDs. You can use this function to swap the @@ -350,8 +352,9 @@ @comment BSD @deftypefun int setregid (gid_t @var{rgid}, fid_t @var{egid}) This function sets the real group ID of the process to @var{rgid} and -the effective group ID to @var{egid}. -@c !!! args can be -1 to mean no change +the effective group ID to @var{egid}. If @var{rgid} is @code{-1}, it +means not to change the real group ID; likewise if @var{egid} is +@code{-1}, it means not to change the effective group ID. The @code{setregid} function is provided for compatibility with 4.3 BSD Unix, which does not support saved IDs. You can use this function to @@ -409,23 +412,23 @@ user ID is also @code{games}. The program should record both user ID values once at the beginning, like this: -@example +@smallexample user_user_id = getuid (); game_user_id = geteuid (); -@end example +@end smallexample Then it can turn off game file access with -@example +@smallexample setuid (user_user_id); -@end example +@end smallexample @noindent and turn it on with -@example +@smallexample setuid (game_user_id); -@end example +@end smallexample @noindent Throughout this process, the real user ID remains @code{jdoe} and the @@ -436,9 +439,9 @@ turn setuid access on and off by using @code{setreuid} to swap the real and effective user IDs of the process, as follows: -@example +@smallexample setreuid (geteuid (), getuid ()); -@end example +@end smallexample @noindent This special case is always allowed---it cannot fail. @@ -454,13 +457,13 @@ In order to handle both kinds of systems, test for the saved user ID feature with a preprocessor conditional, like this: -@example +@smallexample #ifdef _POSIX_SAVED_IDS setuid (user_user_id); #else setreuid (geteuid (), getuid ()); #endif -@end example +@end smallexample @node Setuid Program Example @section Setuid Program Example @@ -478,9 +481,9 @@ The executable file is given mode @code{4755}, so that doing an @samp{ls -l} on it produces output like: -@example +@smallexample -rwsr-xr-x 1 games 184422 Jul 30 15:17 caber-toss -@end example +@end smallexample @noindent The set-user-ID bit shows up in the file modes as the @samp{s}. @@ -488,9 +491,9 @@ The scores file is given mode @code{644}, and doing an @samp{ls -l} on it shows: -@example +@smallexample -rw-r--r-- 1 games 0 Jul 31 15:33 scores -@end example +@end smallexample Here are the parts of the program that show how to set up the changed user ID. This program is conditionalized so that it makes use of the @@ -497,7 +500,7 @@ saved IDs feature if it is supported, and otherwise uses @code{setreuid} to swap the effective and real user IDs. -@example +@smallexample #include #include #include @@ -561,7 +564,7 @@ /* @r{Do the game and record the score.} */ @dots{} @} -@end example +@end smallexample Notice how the first thing the @code{main} function does is to set the effective user ID back to the real user ID. This is so that any other @@ -570,7 +573,7 @@ needs to open the scores file does it switch back to the original effective user ID, like this: -@example +@smallexample /* @r{Record the score.} */ int @@ -600,7 +603,7 @@ return -1; @} @end group -@end example +@end smallexample @node Tips for Setuid @section Tips for Writing Setuid Programs @@ -798,9 +801,8 @@ the system, one user at a time. The functions described here are declared in @file{pwd.h}. -@c !!!! no; this is NOT the recommended way. use getpwent! -The recommended way to scan the users is to open the user file and -then call @code{fgetpwent} for each successive user: +You can use the @code{fgetpwent} function to read user entries from a +particular file. @comment pwd.h @comment SVID @@ -807,7 +809,7 @@ @deftypefun {struct passwd *} fgetpwent (FILE *@var{stream}) This function reads the next user entry from @var{stream} and returns a pointer to the entry. The structure is statically allocated and is -rewritten on subsequent calls to @code{getpwent}. You must copy the +rewritten on subsequent calls to @code{fgetpwent}. You must copy the contents of the structure if you wish to save the information. This stream must correspond to a file in the same format as the standard @@ -814,12 +816,8 @@ password database file. This function comes from System V. @end deftypefun -Another way to scan all the entries in the group database is with -@code{setpwent}, @code{getpwent}, and @code{endpwent}. But this method -is less robust than @code{fgetpwent}, so we provide it only for -compatibility with SVID. In particular, these functions are not -reentrant and are not suitable for use in programs with multiple threads -of control. +The way to scan all the entries in the user database is with +@code{setpwent}, @code{getpwent}, and @code{endpwent}. @comment pwd.h @comment SVID, BSD @@ -829,7 +827,7 @@ @end deftypefun @comment pwd.h -@comment SVID, BSD +@comment POSIX.1 @deftypefun {struct passwd *} getpwent (void) The @code{getpwent} function reads the next entry from the stream initialized by @code{setpwent}. It returns a pointer to the entry. The @@ -928,7 +926,7 @@ @end deftypefun @comment grp.h -@comment POSIX.1 +@comment SVID, BSD @deftypefun {struct group *} getgrnam (const char *@var{name}) This function returns a pointer to a statically-allocated structure containing information about the group whose group name is @var{name}. @@ -946,9 +944,8 @@ the system, one group at a time. The functions described here are declared in @file{grp.h}. -@c !!!! no; this is NOT the recommended way. use getgrent! -The recommended way to scan the groups is to open the group file and -then call @code{fgetgrent} for each successive group: +You can use the @code{fgetgrent} function to read group entries from a +particular file. @comment grp.h @comment SVID @@ -955,7 +952,7 @@ @deftypefun {struct group *} fgetgrent (FILE *@var{stream}) The @code{fgetgrent} function reads the next entry from @var{stream}. It returns a pointer to the entry. The structure is statically -allocated and is rewritten on subsequent calls to @code{getgrent}. You +allocated and is rewritten on subsequent calls to @code{fgetgrent}. You must copy the contents of the structure if you wish to save the information. @@ -963,12 +960,8 @@ group database file. @end deftypefun -Another way to scan all the entries in the group database is with -@code{setgrent}, @code{getgrent}, and @code{endgrent}. But this method -is less robust than @code{fgetgrent}, so we provide it only for -compatibility with SVID. In particular, these functions are not -reentrant and are not suitable for use in programs with multiple threads -of control. +The way to scan all the entries in the group database is with +@code{setgrent}, @code{getgrent}, and @code{endgrent}. @comment grp.h @comment SVID, BSD @@ -1000,13 +993,13 @@ functions. The program prints some information about the user running the program. -@example +@smallexample @include db.c.texi -@end example +@end smallexample Here is some output from this program: -@example +@smallexample I am Throckmorton Snurd. My login name is snurd. My uid is 31093. @@ -1016,4 +1009,4 @@ The members of this group are: friedman tami -@end example +@end smallexample diff -ruN glibc-1.06/math/Makefile glibc-1.07/math/Makefile --- glibc-1.06/math/Makefile Thu Jul 30 18:09:59 1992 +++ glibc-1.07/math/Makefile Mon Jan 17 17:40:23 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1994 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 @@ -29,16 +29,16 @@ isinf isnan finite infnan copysign scalb drem logb \ __isinf __isnan __finite __infnan __copysign __scalb __drem __logb\ __rint rint hypot cabs cbrt __expm1 expm1 log1p acosh asinh atanh -tests := test-math +tests := # test-math install-lib := libm.a include ../Rules - $(objpfx)libm.a: $(AR) cr $@ /dev/null +lib: $(objpfx)libm.a ifneq (,) # the code is now distributed through ../sysdeps/ diff -ruN glibc-1.06/math/TAGS glibc-1.07/math/TAGS --- glibc-1.06/math/TAGS Sun May 16 22:33:09 1993 +++ glibc-1.07/math/TAGS Sat Dec 25 03:19:52 1993 @@ -23,7 +23,7 @@ #define FUNC 1,0 ../sysdeps/generic/atan.c,19 -DEFUN(atan,24,913 +DEFUN(atan,24,926 ../sysdeps/m68k/fpu/cos.c,18 #define FUNC 1,0 @@ -49,13 +49,8 @@ ../sysdeps/m68k/fpu/cosh.c,18 #define FUNC 1,0 -../sysdeps/generic/cosh.c,172 +../sysdeps/generic/cosh.c,112 vc(87,3523 -vc(88,3604 -vc(89,3685 -ic(91,3767 -ic(92,3827 -ic(93,3887 #define mln2hi 96,3962 #define mln2lo 97,3997 #define lnovfl 98,4032 @@ -67,13 +62,8 @@ ../sysdeps/m68k/fpu/sinh.c,18 #define FUNC 1,0 -../sysdeps/generic/sinh.c,166 +../sysdeps/generic/sinh.c,106 vc(80,3267 -vc(81,3348 -vc(82,3429 -ic(84,3511 -ic(85,3571 -ic(86,3631 #define mln2hi 89,3706 #define mln2lo 90,3736 #define lnovfl 91,3766 @@ -95,17 +85,8 @@ #define FUNC 1,0 #define OP 2,17 -../sysdeps/generic/exp.c,535 +../sysdeps/generic/exp.c,297 vc(82,3209 -vc(83,3290 -vc(84,3371 -vc(85,3452 -vc(86,3533 -vc(87,3614 -vc(88,3695 -vc(89,3776 -vc(90,3857 -vc(91,3938 #define ln2hi 94,4034 #define ln2lo 95,4068 #define lnhuge 96,4102 @@ -116,16 +97,6 @@ #define p3 101,4269 #define p4 102,4300 #define p5 103,4331 -ic(106,4370 -ic(107,4430 -ic(108,4490 -ic(109,4550 -ic(110,4610 -ic(111,4670 -ic(112,4730 -ic(113,4790 -ic(114,4850 -ic(115,4910 double exp(117,4971 ../sysdeps/stub/exp.c,18 @@ -138,8 +109,9 @@ ../sysdeps/generic/fabs.c,19 DEFUN(fabs,24,912 -../sysdeps/alpha/fabs.c,13 -fabs 22,851 +../sysdeps/alpha/fabs.c,46 +#define __NO_MATH_INLINES19,825 +fabs 24,887 ../sysdeps/m68k/fpu/ldexp.c,53 #define __NO_MATH_INLINES20,847 @@ -146,7 +118,7 @@ DEFUN(ldexp,24,899 ../sysdeps/ieee754/ldexp.c,21 -DEFUN(ldexp,44,1917 +DEFUN(ldexp,44,1930 ../sysdeps/generic/ldexp.c,20 DEFUN(ldexp,24,919 @@ -155,13 +127,8 @@ #define FUNC 1,0 #define OP 2,17 -../sysdeps/generic/log.c,165 +../sysdeps/generic/log.c,105 vc(92,3559 -vc(93,3639 -vc(94,3719 -ic(96,3800 -ic(97,3859 -ic(98,3918 #define ln2hi 101,3992 #define ln2lo 102,4020 #define sqrt2 103,4048 @@ -174,7 +141,7 @@ #define FUNC 1,0 ../sysdeps/ieee754/log10.c,20 -DEFUN(log10,25,935 +DEFUN(log10,25,948 ../sysdeps/generic/log10.c,41 #define LN10 24,898 @@ -194,9 +161,8 @@ #define FUNC 1,0 #define OP 2,19 -../sysdeps/generic/floor.c,58 +../sysdeps/generic/floor.c,46 vc(40,1981 -ic(42,2052 #define L 45,2120 floor(56,2384 @@ -213,7 +179,7 @@ DEFUN(sqrt,29,1028 ../sysdeps/mips/sqrt.c,20 -DEFUN(sqrt,30,1060 +DEFUN(sqrt,30,1053 ../sysdeps/m68k/fpu/fmod.c,52 #define __NO_MATH_INLINES20,847 @@ -247,15 +213,8 @@ #define __NO_MATH_INLINES20,847 DEFUN(pow,24,899 -../sysdeps/generic/pow.c,252 +../sysdeps/generic/pow.c,161 vc(110,4441 -vc(111,4522 -vc(112,4603 -vc(113,4684 -ic(115,4766 -ic(116,4826 -ic(117,4886 -ic(118,4946 #define ln2hi 121,5021 #define ln2lo 122,5049 #define invln2 123,5077 @@ -266,44 +225,8 @@ ../sysdeps/m68k/fpu/atan2.c,20 DEFUN(atan2,25,896 -../sysdeps/generic/atan2.c,926 +../sysdeps/generic/atan2.c,458 vc(114,4952 -vc(115,5033 -vc(116,5114 -vc(117,5195 -vc(118,5276 -vc(119,5357 -vc(120,5438 -vc(121,5519 -vc(122,5600 -vc(123,5681 -vc(124,5762 -vc(125,5843 -vc(126,5924 -vc(127,6005 -vc(128,6086 -vc(129,6167 -vc(130,6248 -vc(131,6329 -vc(132,6410 -ic(134,6492 -ic(135,6554 -ic(136,6616 -ic(137,6678 -ic(138,6740 -ic(139,6802 -ic(140,6864 -ic(141,6926 -ic(142,6988 -ic(143,7050 -ic(144,7112 -ic(145,7174 -ic(146,7236 -ic(147,7298 -ic(148,7360 -ic(149,7422 -ic(150,7484 -ic(151,7546 #define athfhi 154,7623 #define athflo 155,7653 #define PIo4 156,7683 @@ -331,9 +254,8 @@ ../sysdeps/m68k/fpu/ceil.c,18 #define FUNC 2,1 -../sysdeps/generic/ceil.c,57 +../sysdeps/generic/ceil.c,45 vc(40,1981 -ic(42,2052 #define L 45,2120 ceil(49,2155 @@ -341,28 +263,28 @@ DEFUN(modf,26,941 isinf.c,28 - DEFUN(isinf,25,947 + DEFUN(isinf,25,960 isnan.c,28 - DEFUN(isnan,25,947 + DEFUN(isnan,25,960 finite.c,29 - DEFUN(finite,25,950 + DEFUN(finite,25,963 infnan.c,29 - DEFUN(infnan,25,953 + DEFUN(infnan,25,966 copysign.c,31 - DEFUN(copysign,25,958 + DEFUN(copysign,25,971 scalb.c,28 - DEFUN(scalb,25,949 + DEFUN(scalb,25,962 drem.c,27 - DEFUN(drem,25,952 + DEFUN(drem,25,965 logb.c,27 - DEFUN(logb,25,943 + DEFUN(logb,25,956 ../sysdeps/m68k/fpu/__isinf.c,73 #define __NO_MATH_INLINES20,847 @@ -369,8 +291,8 @@ #define FUNC 24,905 DEFUN(FUNC,29,939 -../sysdeps/ieee754/__isinf.c,22 -DEFUN(__isinf,26,989 +../sysdeps/ieee754/__isinf.c,23 +DEFUN(__isinf,26,1002 ../sysdeps/stub/__isinf.c,22 DEFUN(__isinf,25,962 @@ -379,13 +301,13 @@ #define FUNC 1,0 ../sysdeps/ieee754/__isnan.c,22 -DEFUN(__isnan,25,945 +DEFUN(__isnan,25,958 ../sysdeps/generic/__isnan.c,22 DEFUN(__isnan,24,918 __finite.c,23 -DEFUN(__finite,26,947 +DEFUN(__finite,26,960 ../sysdeps/ieee754/__infnan.c,68 DEFUN(__infnan,32,1205 @@ -400,16 +322,17 @@ DEFUN(__infnan, (error), int error)34,1258 ../sysdeps/ieee754/__copysign.c,25 -DEFUN(__copysign,25,948 +DEFUN(__copysign,25,961 ../sysdeps/generic/__copysign.c,25 DEFUN(__copysign,24,921 -../sysdeps/alpha/__copysign.c,19 -__copysign 23,903 +../sysdeps/alpha/__copysign.c,52 +#define __NO_MATH_INLINES19,831 +__copysign 25,952 __scalb.c,30 - DEFUN(__scalb,25,951 + DEFUN(__scalb,25,964 ../sysdeps/m68k/fpu/__drem.c,54 #define __NO_MATH_INLINES20,853 @@ -416,7 +339,7 @@ DEFUN(__drem,26,918 ../sysdeps/ieee754/__drem.c,22 -DEFUN(__drem,45,1953 +DEFUN(__drem,45,1966 ../sysdeps/stub/__drem.c,21 DEFUN(__drem,25,928 @@ -425,7 +348,7 @@ DEFUN(__logb,26,958 ../sysdeps/ieee754/__logb.c,21 -DEFUN(__logb,26,969 +DEFUN(__logb,26,982 ../sysdeps/stub/__logb.c,21 DEFUN(__logb,25,948 @@ -434,25 +357,19 @@ #define FUNC 1,0 #define OP 2,20 -../sysdeps/generic/__rint.c,59 +../sysdeps/generic/__rint.c,47 vc(40,1981 -ic(42,2052 #define L 45,2120 __rint(70,2766 rint.c,27 - DEFUN(rint,25,943 + DEFUN(rint,25,956 ../sysdeps/generic/hypot.c,20 DEFUN(hypot,24,906 -../sysdeps/ieee754/cabs.c,216 +../sysdeps/ieee754/cabs.c,156 vc(92,3659 -vc(93,3740 -vc(94,3821 -ic(96,3903 -ic(97,3964 -ic(98,4025 #define r2p1hi 101,4101 #define r2p1lo 102,4131 #define sqrt2 103,4161 @@ -474,15 +391,8 @@ #define FUNC 1,0 #define OP 2,21 -../sysdeps/generic/__expm1.c,217 +../sysdeps/generic/__expm1.c,133 vc(91,3512 -vc(92,3593 -vc(93,3674 -vc(94,3755 -ic(96,3837 -ic(97,3897 -ic(98,3957 -ic(99,4017 #define ln2hi 102,4092 #define ln2lo 103,4120 #define lnhuge 104,4148 @@ -490,37 +400,26 @@ double expm1(108,4216 expm1.c,28 - DEFUN(expm1,25,946 + DEFUN(expm1,25,959 ../sysdeps/m68k/fpu/log1p.c,18 #define FUNC 1,0 -../sysdeps/generic/log1p.c,173 +../sysdeps/generic/log1p.c,108 vc(100,4014 -vc(101,4094 -vc(102,4174 -ic(104,4255 -ic(105,4314 -ic(106,4373 #define ln2hi 109,4447 #define ln2lo 110,4475 #define sqrt2 111,4503 double log1p(114,4539 -../sysdeps/generic/acosh.c,122 +../sysdeps/generic/acosh.c,86 vc(77,3138 -vc(78,3218 -ic(80,3299 -ic(81,3357 #define ln2hi 84,3430 #define ln2lo 85,3464 double acosh(88,3506 -../sysdeps/generic/asinh.c,122 +../sysdeps/generic/asinh.c,86 vc(72,3004 -vc(73,3084 -ic(75,3165 -ic(76,3224 #define ln2hi 79,3298 #define ln2lo 80,3332 double asinh(83,3374 @@ -531,50 +430,30 @@ ../sysdeps/generic/atanh.c,22 double atanh(70,2943 -math.h,390 +math.h,331 #define _MATH_H 25,911 #define __need_Emath30,967 -#define __CONSTVALUE 46,1390 -#define __CONSTVALUE48,1425 -#define __finite(159,4703 -#define __scalb(177,5313 -struct __cabs_complex196,5888 -#define isinf(214,6517 -#define isnan(215,6553 -#define infnan(216,6589 -#define finite(217,6627 -#define copysign(218,6665 -#define scalb(219,6709 -#define drem(220,6747 -#define logb(221,6783 - -../sysdeps/m68k/fpu/__math.h,679 -#define __m81_u(24,897 -#define __m81_u(26,937 -#define __MATH_INLINES 27,958 -#define __inline_mathop2(30,991 -#define __inline_mathop(38,1304 -__inline_mathop(40,1359 -__inline_mathop(41,1381 -__inline_mathop(42,1403 -__inline_mathop(43,1425 -__inline_mathop(44,1446 -__inline_mathop(45,1467 -__inline_mathop(46,1488 -__inline_mathop(47,1510 -__inline_mathop(48,1532 -__inline_mathop2(49,1554 -__inline_mathop2(50,1582 -__inline_mathop(51,1610 -__inline_mathop2(52,1633 -__inline_mathop2(53,1661 -__inline_mathop(54,1692 -__inline_mathop2(56,1715 -__inline_mathop2(57,1745 -__inline_mathop2(60,1798 -__inline_mathop2(61,1826 -__inline_mathop2(62,1858 -__inline_mathop(63,1890 +#define __finite(148,4413 +#define __scalb(166,5023 +struct __cabs_complex185,5598 +#define isinf(203,6227 +#define isnan(204,6263 +#define infnan(205,6299 +#define finite(206,6337 +#define copysign(207,6375 +#define scalb(208,6419 +#define drem(209,6457 +#define logb(210,6493 + +../sysdeps/m68k/fpu/__math.h,222 +#define __m81_u(24,903 +#define __m81_u(26,943 +#define __MATH_INLINES 27,964 +#define __inline_mathop2(30,997 +#define __inline_mathop(38,1310 +__inline_mathop(40,1365 +__inline_mathop2(57,1751 +__inline_mathop2(61,1832 ../sysdeps/stub/__math.h,0 @@ -581,8 +460,8 @@ ../sysdeps/m68k/fpu/switch/__math.h,0 ../sysdeps/alpha/__math.h,33 -__copysign 22,904 -fabs 29,1047 +__copysign 22,917 +fabs 29,1060 ../sysdeps/ieee754/huge_val.h,151 #define _HUGE_VAL_H 23,974 diff -ruN glibc-1.06/math/__finite.c glibc-1.07/math/__finite.c --- glibc-1.06/math/__finite.c Mon Mar 30 17:23:41 1992 +++ glibc-1.07/math/__finite.c Sat Nov 20 22:10:04 1993 @@ -22,7 +22,7 @@ #undef __finite /* Return nonzero if VALUE is finite and not NaN. */ -int +__CONSTVALUE int DEFUN(__finite, (value), double value) { return !__isinf (value) && !__isnan (value); diff -ruN glibc-1.06/math/__scalb.c glibc-1.07/math/__scalb.c --- glibc-1.06/math/__scalb.c Thu Mar 5 22:07:34 1992 +++ glibc-1.07/math/__scalb.c Sat Nov 20 22:10:05 1993 @@ -21,5 +21,5 @@ #include #undef __scalb -function_alias(__scalb, ldexp, double, (x, n), +function_alias(__scalb, ldexp, __CONSTVALUE double, (x, n), DEFUN(__scalb, (x, n), double x AND int n)) diff -ruN glibc-1.06/math/copysign.c glibc-1.07/math/copysign.c --- glibc-1.06/math/copysign.c Wed Jun 12 13:18:58 1991 +++ glibc-1.07/math/copysign.c Sat Nov 20 22:10:06 1993 @@ -21,5 +21,5 @@ #include #undef copysign -function_alias(copysign, __copysign, double, (x, y), +function_alias(copysign, __copysign, __CONSTVALUE double, (x, y), DEFUN(copysign, (x, y), double x AND double y)) diff -ruN glibc-1.06/math/drem.c glibc-1.07/math/drem.c --- glibc-1.06/math/drem.c Sat Feb 15 18:03:48 1992 +++ glibc-1.07/math/drem.c Sat Nov 20 22:10:06 1993 @@ -21,5 +21,5 @@ #include #undef drem -function_alias(drem, __drem, double, (x, y), +function_alias(drem, __drem, __CONSTVALUE double, (x, y), DEFUN(drem, (x, y), double x AND double y)) diff -ruN glibc-1.06/math/expm1.c glibc-1.07/math/expm1.c --- glibc-1.06/math/expm1.c Tue Feb 11 02:33:39 1992 +++ glibc-1.07/math/expm1.c Sat Nov 20 22:10:07 1993 @@ -21,5 +21,5 @@ #include #undef expm1 -function_alias(expm1, __expm1, double, (x), +function_alias(expm1, __expm1, __CONSTVALUE double, (x), DEFUN(expm1, (x), double x)) diff -ruN glibc-1.06/math/finite.c glibc-1.07/math/finite.c --- glibc-1.06/math/finite.c Wed Jun 12 13:19:12 1991 +++ glibc-1.07/math/finite.c Sat Nov 20 22:10:08 1993 @@ -21,5 +21,5 @@ #include #undef finite -function_alias(finite, __finite, int, (value), +function_alias(finite, __finite, __CONSTVALUE int, (value), DEFUN(finite, (value), double value)) diff -ruN glibc-1.06/math/infnan.c glibc-1.07/math/infnan.c --- glibc-1.06/math/infnan.c Wed Jun 12 13:19:18 1991 +++ glibc-1.07/math/infnan.c Sat Nov 20 22:10:09 1993 @@ -21,5 +21,5 @@ #include #undef infnan -function_alias(infnan, __infnan, double, (error), +function_alias(infnan, __infnan, __CONSTVALUE double, (error), DEFUN(infnan, (error), int error)) diff -ruN glibc-1.06/math/isinf.c glibc-1.07/math/isinf.c --- glibc-1.06/math/isinf.c Wed Jun 12 13:19:25 1991 +++ glibc-1.07/math/isinf.c Sat Nov 20 22:10:10 1993 @@ -21,5 +21,5 @@ #include #undef isinf -function_alias(isinf, __isinf, int, (value), +function_alias(isinf, __isinf, __CONSTVALUE int, (value), DEFUN(isinf, (value), double value)) diff -ruN glibc-1.06/math/isnan.c glibc-1.07/math/isnan.c --- glibc-1.06/math/isnan.c Wed Jun 12 13:19:29 1991 +++ glibc-1.07/math/isnan.c Sat Nov 20 22:10:12 1993 @@ -21,5 +21,5 @@ #include #undef isnan -function_alias(isnan, __isnan, int, (value), +function_alias(isnan, __isnan, __CONSTVALUE int, (value), DEFUN(isnan, (value), double value)) diff -ruN glibc-1.06/math/logb.c glibc-1.07/math/logb.c --- glibc-1.06/math/logb.c Wed Jun 12 13:19:32 1991 +++ glibc-1.07/math/logb.c Sat Nov 20 22:10:13 1993 @@ -21,5 +21,5 @@ #include #undef logb -function_alias(logb, __logb, double, (x), +function_alias(logb, __logb, __CONSTVALUE double, (x), DEFUN(logb, (x), double x)) diff -ruN glibc-1.06/math/math.h glibc-1.07/math/math.h --- glibc-1.06/math/math.h Fri May 14 16:46:28 1993 +++ glibc-1.07/math/math.h Fri May 14 16:46:28 1993 @@ -39,17 +39,6 @@ #endif -#ifndef __CONSTVALUE -#ifdef __GNUC__ -/* The `const' keyword tells GCC that a function's return value is - based solely on its arguments, and there are no side-effects. */ -#define __CONSTVALUE __const -#else -#define __CONSTVALUE -#endif /* GCC. */ -#endif /* __CONSTVALUE not defined. */ - - /* Trigonometric functions. */ /* Arc cosine of X. */ diff -ruN glibc-1.06/math/rint.c glibc-1.07/math/rint.c --- glibc-1.06/math/rint.c Tue Feb 11 02:21:29 1992 +++ glibc-1.07/math/rint.c Sat Nov 20 22:10:13 1993 @@ -21,5 +21,5 @@ #include #undef rint -function_alias(rint, __rint, double, (x), +function_alias(rint, __rint, __CONSTVALUE double, (x), DEFUN(rint, (x), double x)) diff -ruN glibc-1.06/math/scalb.c glibc-1.07/math/scalb.c --- glibc-1.06/math/scalb.c Wed Jun 12 13:19:40 1991 +++ glibc-1.07/math/scalb.c Sat Nov 20 22:10:14 1993 @@ -21,5 +21,5 @@ #include #undef scalb -function_alias(scalb, __scalb, double, (x, n), +function_alias(scalb, __scalb, __CONSTVALUE double, (x, n), DEFUN(scalb, (x, n), double x AND int n)) diff -ruN glibc-1.06/math/test-math.c glibc-1.07/math/test-math.c --- glibc-1.06/math/test-math.c Thu Dec 31 13:18:38 1992 +++ glibc-1.07/math/test-math.c @@ -1,83 +0,0 @@ -#include -#include -#include -#include - -int -DEFUN_VOID(main) -{ - CONST char str[] = "123.456"; - double x,h,li,lr,a,lrr; - - x = atof (str); - - printf ("%g %g\n", x, pow (10.0, 3.0)); - - x = sinh(2.0); - - printf("sinh(2.0) = %g\n", x); - - x = sinh(3.0); - - printf("sinh(3.0) = %g\n", x); - - h = hypot(2.0,3.0); - - printf("h=%g\n", h); - - a = atan2(3.0, 2.0); - - printf("atan2(3,2) = %g\n", a); - - lr = pow(h,4.0); - - printf("pow(%g,4.0) = %g\n", h, lr); - - lrr = lr; - - li = 4.0 * a; - - lr = lr / exp(a*5.0); - - printf("%g / exp(%g * 5) = %g\n", lrr, a, lr); - - lrr = li; - - li += 5.0 * log(h); - - printf("%g + 5*log(%g) = %g\n", lrr, h, li); - - printf("cos(%g) = %g, sin(%g) = %g\n", li, cos(li), li, sin(li)); - - x = drem(10.3435,6.2831852); - - printf("drem(10.3435,6.2831852) = %g\n", x); - - x = drem(-10.3435,6.2831852); - - printf("drem(-10.3435,6.2831852) = %g\n", x); - - x = drem(-10.3435,-6.2831852); - - printf("drem(-10.3435,-6.2831852) = %g\n", x); - - x = drem(10.3435,-6.2831852); - - printf("drem(10.3435,-6.2831852) = %g\n", x); - - - printf("x%8.6gx\n", .5); - printf("x%-8.6gx\n", .5); - printf("x%6.6gx\n", .5); - - { - double x = atof ("-1e-17-"); - printf ("%g %c= %g %s!\n", - x, - x == -1e-17 ? '=' : '!', - -1e-17, - x == -1e-17 ? "Worked" : "Failed"); - } - - return 0; -} diff -ruN glibc-1.06/misc/Makefile glibc-1.07/misc/Makefile --- glibc-1.06/misc/Makefile Fri Mar 26 15:23:21 1993 +++ glibc-1.07/misc/Makefile Mon Jan 17 17:40:27 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -24,7 +24,7 @@ headers := sys/uio.h sys/ioctl.h sys/ptrace.h ioctls.h sys/file.h \ a.out.h nlist.h stab.h stab.def sgtty.h sys/dir.h sys/cdefs.h \ - ttyent.h syscall.h sys/syslog.h paths.h + ttyent.h syscall.h sys/syslog.h paths.h sys/reboot.h routines := brk sbrk sstk ioctl \ __brk __sbrk __ioctl \ @@ -51,7 +51,7 @@ truncate ftruncate \ chflags fchflags \ insremque getttyent getusersh getpass ttyslot \ - syslog + syslog syscall aux := data_start progname distribute := bsd-compat.c extra-objs := bsd-compat.o @@ -62,3 +62,5 @@ $(objpfx)libbsd-compat.a: $(objpfx)bsd-compat.o rm -f $@ ln $< $@ + +lib: $(objpfx)libbsd-compat.a diff -ruN glibc-1.06/misc/TAGS glibc-1.07/misc/TAGS --- glibc-1.06/misc/TAGS Fri May 21 17:28:58 1993 +++ glibc-1.07/misc/TAGS Mon Jan 17 23:29:53 1994 @@ -14,22 +14,20 @@ ioctl.c,21 DEFUN(ioctl,34,1004 -../sysdeps/unix/bsd/hp/m68k/__brk.S,111 -#define SYS_brk 22,862 -#define __end 26,909 -ENTRY (__brk)35,990 - movel d0, sp@39,1053 - trap POUND(41,1099 +../sysdeps/unix/bsd/hp/m68k/__brk.S,90 +#define SYS_brk 22,868 +#define __end 26,915 +ENTRY (__brk)35,996 + movel d0, sp@39,1059 ../sysdeps/stub/__brk.c,20 DEFUN(__brk,25,965 -../sysdeps/unix/bsd/sun/m68k/__brk.S,111 +../sysdeps/unix/bsd/sun/m68k/__brk.S,90 #define SYS_brk 22,868 #define __end 26,915 ENTRY (__brk)35,996 movel d0, sp@39,1052 - trap POUND(41,1085 ../sysdeps/unix/bsd/vax/__brk.S,67 #define SYS_brk 22,862 @@ -37,35 +35,38 @@ ENTRY (__brk)35,990 ../sysdeps/unix/bsd/ultrix4/mips/__brk.S,90 -#define SYS_brk 22,880 -#define __end 26,933 -ENTRY(__curbrk)31,982 -ENTRY(__brk)38,1044 +#define SYS_brk 22,873 +#define __end 26,926 +ENTRY(__curbrk)31,975 +ENTRY(__brk)38,1037 + +../sysdeps/unix/bsd/osf1/alpha/__brk.S,67 +#define SYS_brk 22,873 +#define __end 26,926 +ENTRY(__brk)36,1032 -../sysdeps/unix/i386/__brk.S,187 +../sysdeps/unix/i386/__brk.S,171 #define SYS_brk 22,874 .globl C_SYMBOL_NAME(26,907 -C_LABEL(27,938 .long C_SYMBOL_NAME(29,975 .long C_SYMBOL_NAME(31,1008 SYSCALL__ (brk,35,1048 movl %eax, C_SYMBOL_NAME(37,1087 -../sysdeps/unix/sparc/__brk.S,182 +../sysdeps/unix/sparc/__brk.S,166 #define SYS_brk 22,862 #define C_SYMBOL_NAME(26,911 .global C_SYMBOL_NAME(30,961 -C_LABEL(31,993 .long C_SYMBOL_NAME(33,1030 .long C_SYMBOL_NAME(35,1063 ENTRY (__brk)39,1103 ../sysdeps/mach/hurd/__brk.c,120 -#define DATA_SIZE 27,1017 -DEFUN(__brk,43,1486 -_hurd_set_brk 53,1672 -init_brk 89,2442 -_hurd_set_data_limit 116,3018 +#define DATA_SIZE 27,1023 +DEFUN(__brk,48,1601 +_hurd_set_brk 58,1787 +init_brk 94,2557 +_hurd_set_data_limit 125,3196 ../sysdeps/unix/__sbrk.c,22 DEFUN(__sbrk,28,1061 @@ -83,7 +84,7 @@ DEFUN(__ioctl,26,1043 ../sysdeps/mach/hurd/__ioctl.c,23 -DEFUN(__ioctl,27,1055 +DEFUN(__ioctl,39,1388 ../sysdeps/unix/common/readv.S,23 SYSCALL (readv,21,852 @@ -120,7 +121,7 @@ DEFUN(__setreuid,27,1041 ../sysdeps/mach/hurd/__setreuid.c,19 -__setreuid 24,897 +__setreuid 26,932 ../sysdeps/unix/bsd/__setregid.S,28 SYSCALL__ (setregid,21,852 @@ -129,7 +130,7 @@ DEFUN(__setregid,27,1043 ../sysdeps/mach/hurd/__setregid.c,19 -__setregid 24,897 +__setregid 26,932 ../sysdeps/unix/bsd/seteuid.c,22 DEFUN(seteuid,24,895 @@ -143,7 +144,7 @@ ../sysdeps/unix/sysv/sysv4/seteuid.S,0 ../sysdeps/mach/hurd/seteuid.c,22 -DEFUN(seteuid,26,973 +DEFUN(seteuid,27,996 ../sysdeps/unix/bsd/setegid.c,22 DEFUN(setegid,24,895 @@ -157,7 +158,7 @@ ../sysdeps/unix/sysv/sysv4/setegid.S,0 ../sysdeps/mach/hurd/setegid.c,22 -DEFUN(setegid,26,974 +DEFUN(setegid,27,996 getpgsz.c,39 DEFUN_VOID(getpagesize)26,991 @@ -172,7 +173,7 @@ DEFUN_VOID(__getpagesize)26,938 ../sysdeps/stub/__getpgsz.c,33 -DEFUN_VOID(__getpagesize)24,910 +DEFUN_VOID(__getpagesize)25,936 ../sysdeps/unix/sysv/sysv4/__getpgsz.c,0 @@ -194,7 +195,7 @@ ../sysdeps/unix/sysv/sysv4/__getdtsz.c,0 ../sysdeps/mach/hurd/__getdtsz.c,36 -DEFUN_VOID(__getdtablesize)27,1049 +DEFUN_VOID(__getdtablesize)27,1055 ../sysdeps/unix/inet/__gethstnm.S,31 SYSCALL__ (gethostname,21,852 @@ -206,7 +207,7 @@ DEFUN(__gethostname,28,1088 ../sysdeps/mach/hurd/__gethstnm.c,29 -DEFUN(__gethostname,28,1087 +DEFUN(__gethostname,28,1093 gethstnm.c,34 DEFUN(gethostname,27,998 @@ -218,7 +219,7 @@ DEFUN(sethostname,26,1011 ../sysdeps/mach/hurd/sethostnam.c,27 -DEFUN(sethostname,26,1017 +DEFUN(sethostname,27,1041 ../sysdeps/unix/common/__select.S,26 SYSCALL__ (select,21,852 @@ -226,8 +227,9 @@ ../sysdeps/stub/__select.c,24 DEFUN(__select,30,1264 -../sysdeps/mach/hurd/__select.c,24 -DEFUN(__select,30,1270 +../sysdeps/mach/hurd/__select.c,58 +#define SELECT_DONE_MSGID 25,950 +DEFUN(__select,33,1345 select.c,30 DEFUN(select,28,1030 @@ -244,8 +246,8 @@ ../sysdeps/stub/chroot.c,22 DEFUN(chroot,26,1017 -../sysdeps/mach/hurd/chroot.c,21 -DEFUN(chroot,27,975 +../sysdeps/mach/hurd/chroot.c,22 +DEFUN(chroot,28,1000 ../sysdeps/unix/fsync.S,23 SYSCALL (fsync,21,852 @@ -254,7 +256,7 @@ DEFUN(fsync,25,951 ../sysdeps/mach/hurd/fsync.c,20 -DEFUN(fsync,26,975 +DEFUN(fsync,26,981 ../sysdeps/unix/sync.S,22 SYSCALL (sync,21,852 @@ -263,13 +265,13 @@ DEFUN_VOID(sync)25,958 ../sysdeps/mach/hurd/sync.c,24 -DEFUN_VOID(sync)25,964 +DEFUN_VOID(sync)26,988 ../sysdeps/stub/reboot.c,21 DEFUN(reboot,25,917 ../sysdeps/mach/hurd/reboot.c,21 -DEFUN(reboot,27,961 +DEFUN(reboot,27,967 ../sysdeps/unix/inet/gethostid.S,27 SYSCALL (gethostid,21,852 @@ -278,7 +280,7 @@ DEFUN_VOID(gethostid)25,949 ../sysdeps/mach/hurd/gethostid.c,29 -DEFUN_VOID(gethostid)25,955 +DEFUN_VOID(gethostid)26,979 ../sysdeps/unix/inet/sethostid.S,27 SYSCALL (sethostid,21,852 @@ -297,8 +299,8 @@ ../sysdeps/unix/bsd/sun/m68k/sethostid.S,27 SYSCALL (sethostid,23,875 -../sysdeps/mach/hurd/sethostid.c,24 -DEFUN(sethostid,26,999 +../sysdeps/mach/hurd/sethostid.c,25 +DEFUN(sethostid,27,1011 mknod.c,28 DEFUN(mknod,25,967 @@ -307,10 +309,10 @@ SYSCALL__ (mknod,21,852 ../sysdeps/stub/__mknod.c,23 -DEFUN(__mknod,27,1094 +DEFUN(__mknod,28,1123 ../sysdeps/mach/hurd/__mknod.c,23 -DEFUN(__mknod,28,1118 +DEFUN(__mknod,30,1173 ../sysdeps/unix/common/swapon.S,24 SYSCALL (swapon,21,852 @@ -324,8 +326,12 @@ ../sysdeps/stub/vhangup.c,28 DEFUN_VOID(vhangup)27,1074 +../sysdeps/unix/bsd/osf1/alpha/vhangup.S,53 +#define SYS_vhangup 22,881 +SYSCALL (vhangup,24,918 + ../sysdeps/posix/mktemp.c,22 -DEFUN(mktemp,31,1168 +DEFUN(mktemp,31,1174 ../sysdeps/stub/mktemp.c,22 DEFUN(mktemp,27,1078 @@ -349,7 +355,7 @@ DEFUN(usleep,24,958 ../sysdeps/mach/hurd/usleep.c,21 -DEFUN(usleep,25,976 +DEFUN(usleep,25,982 ../sysdeps/unix/bsd/gtty.c,19 DEFUN(gtty,25,958 @@ -369,7 +375,7 @@ SYSCALL (ptrace,21,852 ../sysdeps/stub/ptrace.c,22 -DEFUN(ptrace,35,1370 +DEFUN(ptrace,35,1376 ../sysdeps/unix/nlist.c,21 DEFUN(nlist,30,1075 @@ -390,7 +396,7 @@ ../sysdeps/unix/sysv/sysv4/solaris2/__utimes.S,0 ../sysdeps/mach/hurd/__utimes.c,24 -DEFUN(__utimes,27,1015 +DEFUN(__utimes,28,1039 ../sysdeps/unix/common/truncate.S,26 SYSCALL (truncate,21,852 @@ -399,7 +405,7 @@ DEFUN(truncate,25,932 ../sysdeps/mach/hurd/truncate.c,23 -DEFUN(truncate,26,956 +DEFUN(truncate,27,981 ../sysdeps/unix/common/ftruncate.S,27 SYSCALL (ftruncate,21,852 @@ -408,7 +414,7 @@ DEFUN(ftruncate,25,949 ../sysdeps/mach/hurd/ftruncate.c,24 -DEFUN(ftruncate,25,955 +DEFUN(ftruncate,26,979 ../sysdeps/stub/chflags.c,91 DEFUN(chflags,26,955 @@ -418,7 +424,7 @@ SYSCALL (chflags,21,852 ../sysdeps/mach/hurd/chflags.c,22 -DEFUN(chflags,26,961 +DEFUN(chflags,27,985 ../sysdeps/stub/fchflags.c,81 DEFUN(fchflags,26,972 @@ -427,8 +433,8 @@ ../sysdeps/unix/bsd/bsd4.4/fchflags.S,26 SYSCALL (fchflags,21,852 -../sysdeps/mach/hurd/fchflags.c,23 -DEFUN(fchflags,26,978 +../sysdeps/mach/hurd/fchflags.c,24 +DEFUN(fchflags,27,1002 insremque.c,64 struct qelem22,868 @@ -458,14 +464,37 @@ ttyslot.c,17 ttyslot(44,2050 -syslog.c,107 +syslog.c,91 syslog(69,2754 -syslog(71,2798 vsyslog(89,2984 openlog(190,5153 closelog(219,5819 setlogmask(227,5932 +../sysdeps/unix/bsd/m68k/syscall.S,40 +ENTRY (syscall)21,846 + DO_CALL 23,914 + +../sysdeps/unix/syscall.S,54 +#define SYS_syscall 22,866 +SYSCALL (syscall,28,1054 + +../sysdeps/stub/syscall.c,22 +DEFUN(syscall,26,991 + +../sysdeps/unix/bsd/sun/m68k/syscall.S,45 +ENTRY (syscall)21,846 + movel d0, sp@24,974 + +../sysdeps/unix/bsd/sequent/i386/syscall.S,23 +ENTRY (syscall)25,947 + +../sysdeps/unix/i386/syscall.S,23 +ENTRY (syscall)22,867 + +../sysdeps/mach/i386/syscall.S,23 +ENTRY (syscall)21,846 + data_start.c,0 progname.c,27 @@ -928,219 +957,219 @@ #define EXTA 288,13568 #define EXTB 289,13584 -../sysdeps/mach/hurd/ioctls.h,5814 -#define _IOCTLS_H 21,844 -enum __ioctl_dir23,865 -union __ioctl32,1091 -#define _IOCT(55,1726 -#define _IOC(61,2004 -#define _IO(67,2234 -#define _IOR(68,2281 -#define _IOW(69,2337 -#define _IOWR(70,2394 -#define _IOT(74,2543 -#define _IOTS(78,2702 -#define _IOT_SIMPLE(82,2832 -#define _IOT_int 85,2916 -#define _IOT_char 86,2952 -#define _IOT_short 87,2990 -#define TIOCMODG 92,3112 -#define TIOCMODS 93,3177 -#define TIOCM_LE 94,3242 -#define TIOCM_DTR 95,3284 -#define TIOCM_RTS 96,3335 -#define TIOCM_ST 97,3382 -#define TIOCM_SR 98,3431 -#define TIOCM_CTS 99,3479 -#define TIOCM_CAR 100,3524 -#define TIOCM_CD 101,3570 -#define TIOCM_RNG 102,3598 -#define TIOCM_RI 103,3634 -#define TIOCM_DSR 104,3662 -#define TIOCEXCL 106,3732 -#define TIOCNXCL 107,3794 -#define TIOCFLUSH 109,3880 -#define TIOCGETA 111,3962 -#define TIOCSETA 112,4027 -#define TIOCSETAW 113,4092 -#define TIOCSETAF 114,4157 -#define TIOCGETD 115,4225 -#define TIOCSETD 116,4287 -#define TIOCSBRK 118,4376 -#define TIOCCBRK 119,4428 -#define TIOCSDTR 120,4482 -#define TIOCCDTR 121,4544 -#define TIOCGPGRP 122,4608 -#define TIOCSPGRP 123,4668 -#define TIOCOUTQ 125,4755 -#define TIOCSTI 126,4816 -#define TIOCNOTTY 127,4884 -#define TIOCPKT 128,4944 -#define TIOCPKT_DATA 129,5014 -#define TIOCPKT_FLUSHREAD 130,5060 -#define TIOCPKT_FLUSHWRITE 131,5111 -#define TIOCPKT_STOP 132,5163 -#define TIOCPKT_START 133,5209 -#define TIOCPKT_NOSTOP 134,5257 -#define TIOCPKT_DOSTOP 135,5308 -#define TIOCPKT_IOCTL 136,5357 -#define TIOCSTOP 137,5419 -#define TIOCSTART 138,5478 -#define TIOCMSET 139,5539 -#define TIOCMBIS 140,5601 -#define TIOCMBIC 141,5659 -#define TIOCMGET 142,5717 -#define TIOCREMOTE 143,5779 -#define TIOCGWINSZ 144,5845 -#define TIOCSWINSZ 145,5910 -#define TIOCUCNTL 146,5975 -#define UIOCCMD(147,6046 -#define TIOCCONS 148,6101 -#define TIOCSCTTY 149,6167 -#define TIOCEXT 150,6228 -#define TIOCSIG 151,6295 -#define TIOCDRAIN 152,6353 -#define TTYDISC 154,6417 -#define TABLDISC 155,6471 -#define SLIPDISC 156,6515 -#define FIOCLEX 159,6564 -#define FIONCLEX 160,6624 -#define FIONREAD 161,6681 -#define FIONBIO 162,6744 -#define FIOASYNC 163,6814 -#define FIOSETOWN 164,6877 -#define FIOGETOWN 165,6931 -#define SIOCSHIWAT 168,7012 -#define SIOCGHIWAT 169,7076 -#define SIOCSLOWAT 170,7140 -#define SIOCGLOWAT 171,7203 -#define SIOCATMARK 172,7266 -#define SIOCSPGRP 173,7324 -#define SIOCGPGRP 174,7386 -#define SIOCADDRT 176,7449 -#define SIOCDELRT 177,7507 -#define SIOCSIFADDR 179,7569 -#define OSIOCGIFADDR 180,7634 -#define SIOCGIFADDR 181,7700 -#define SIOCSIFDSTADDR 182,7765 -#define OSIOCGIFDSTADDR 183,7831 -#define SIOCGIFDSTADDR 184,7898 -#define SIOCSIFFLAGS 185,7964 -#define SIOCGIFFLAGS 186,8028 -#define OSIOCGIFBRDADDR 187,8092 -#define SIOCGIFBRDADDR 188,8162 -#define SIOCSIFBRDADDR 189,8231 -#define OSIOCGIFCONF 190,8299 -#define SIOCGIFCONF 191,8363 -#define OSIOCGIFNETMASK 192,8426 -#define SIOCGIFNETMASK 193,8495 -#define SIOCSIFNETMASK 194,8563 -#define SIOCGIFMETRIC 195,8630 -#define SIOCSIFMETRIC 196,8693 -#define SIOCDIFADDR 197,8755 -#define SIOCAIFADDR 198,8816 -#define SIOCSARP 200,8885 -#define OSIOCGARP 201,8944 -#define SIOCGARP 202,9004 -#define SIOCDARP 203,9063 -# define TIOCGETD 211,9250 -# define TIOCSETD 213,9330 -# define OTIOCGETD 215,9398 -# define OTIOCSETD 216,9461 -#define TIOCHPCL 218,9531 -#define TIOCGETP 219,9589 -#define TIOCSETP 220,9654 -#define TIOCSETN 221,9719 -#define TIOCSETC 222,9786 -#define TIOCGETC 223,9851 -#define TANDEM 224,9916 -#define CBREAK 225,9975 -#define LCASE 226,10026 -#define ECHO 227,10079 -#define CRMOD 228,10122 -#define RAW 229,10180 -#define ODDP 230,10229 -#define EVENP 231,10281 -#define ANYP 232,10335 -#define NLDELAY 233,10392 -#define NL0 234,10436 -#define NL1 235,10461 -#define NL2 236,10499 -#define NL3 237,10535 -#define TBDELAY 238,10560 -#define TAB0 239,10616 -#define TAB1 240,10642 -#define TAB2 241,10681 -#define XTABS 242,10707 -#define CRDELAY 243,10762 -#define CR0 244,10806 -#define CR1 245,10831 -#define CR2 246,10869 -#define CR3 247,10907 -#define VTDELAY 248,10950 -#define FF0 249,11004 -#define FF1 250,11029 -#define BSDELAY 251,11067 -#define BS0 252,11111 -#define BS1 253,11136 -#define ALLDELAY 254,11161 -#define CRTBS 255,11221 -#define PRTERA 256,11277 -#define CRTERA 257,11325 -#define TILDE 258,11383 -#define MDMBUF 259,11439 -#define LITOUT 260,11500 -#define TOSTOP 261,11549 -#define FLUSHO 262,11610 -#define NOHANG 263,11669 -#define L001000 264,11741 -#define CRTKIL 265,11770 -#define PASS8 266,11826 -#define CTLECH 267,11853 -#define PENDIN 268,11912 -#define DECCTQ 269,11970 -#define NOFLSH 270,12028 -#define TIOCLBIS 271,12088 -#define TIOCLBIC 272,12151 -#define TIOCLSET 273,12214 -#define TIOCLGET 274,12284 -#define LCRTBS 275,12343 -#define LPRTERA 276,12372 -#define LCRTERA 277,12403 -#define LTILDE 278,12434 -#define LMDMBUF 279,12463 -#define LLITOUT 280,12494 -#define LTOSTOP 281,12525 -#define LFLUSHO 282,12556 -#define LNOHANG 283,12587 -#define LCRTKIL 284,12618 -#define LPASS8 285,12649 -#define LCTLECH 286,12678 -#define LPENDIN 287,12709 -#define LDECCTQ 288,12740 -#define LNOFLSH 289,12771 -#define TIOCSLTC 290,12802 -#define TIOCGLTC 291,12869 -#define OTIOCCONS 292,12936 -#define OTTYDISC 293,12999 -#define NETLDISC 294,13018 -#define NTTYDISC 295,13037 -#define B0 299,13109 -#define B50 300,13122 -#define B75 301,13136 -#define B110 302,13150 -#define B134 303,13165 -#define B150 304,13180 -#define B200 305,13195 -#define B300 306,13210 -#define B600 307,13225 -#define B1200 308,13240 -#define B1800 309,13256 -#define B2400 310,13273 -#define B4800 311,13290 -#define B9600 312,13307 -#define EXTA 313,13324 -#define EXTB 314,13340 +../sysdeps/mach/hurd/ioctls.h,5815 +#define _IOCTLS_H 21,850 +enum __ioctl_dir23,871 +union __ioctl32,1097 +#define _IOCT(55,1752 +#define _IOC(61,2033 +#define _IO(67,2265 +#define _IOR(68,2312 +#define _IOW(69,2368 +#define _IOWR(70,2425 +#define _IOT(74,2574 +#define _IOTS(78,2733 +#define _IOT_SIMPLE(82,2863 +#define _IOT_int 85,2947 +#define _IOT_char 86,2983 +#define _IOT_short 87,3021 +#define TIOCMODG 92,3143 +#define TIOCMODS 93,3208 +#define TIOCM_LE 94,3273 +#define TIOCM_DTR 95,3315 +#define TIOCM_RTS 96,3366 +#define TIOCM_ST 97,3413 +#define TIOCM_SR 98,3462 +#define TIOCM_CTS 99,3510 +#define TIOCM_CAR 100,3555 +#define TIOCM_CD 101,3601 +#define TIOCM_RNG 102,3629 +#define TIOCM_RI 103,3665 +#define TIOCM_DSR 104,3693 +#define TIOCEXCL 106,3763 +#define TIOCNXCL 107,3825 +#define TIOCFLUSH 109,3911 +#define TIOCGETA 111,3993 +#define TIOCSETA 112,4058 +#define TIOCSETAW 113,4123 +#define TIOCSETAF 114,4188 +#define TIOCGETD 115,4256 +#define TIOCSETD 116,4318 +#define TIOCSBRK 118,4407 +#define TIOCCBRK 119,4459 +#define TIOCSDTR 120,4513 +#define TIOCCDTR 121,4575 +#define TIOCGPGRP 122,4639 +#define TIOCSPGRP 123,4699 +#define TIOCOUTQ 125,4786 +#define TIOCSTI 126,4847 +#define TIOCNOTTY 127,4915 +#define TIOCPKT 128,4975 +#define TIOCPKT_DATA 129,5045 +#define TIOCPKT_FLUSHREAD 130,5091 +#define TIOCPKT_FLUSHWRITE 131,5142 +#define TIOCPKT_STOP 132,5194 +#define TIOCPKT_START 133,5240 +#define TIOCPKT_NOSTOP 134,5288 +#define TIOCPKT_DOSTOP 135,5339 +#define TIOCPKT_IOCTL 136,5388 +#define TIOCSTOP 137,5450 +#define TIOCSTART 138,5509 +#define TIOCMSET 139,5570 +#define TIOCMBIS 140,5632 +#define TIOCMBIC 141,5690 +#define TIOCMGET 142,5748 +#define TIOCREMOTE 143,5810 +#define TIOCGWINSZ 144,5876 +#define TIOCSWINSZ 145,5941 +#define TIOCUCNTL 146,6006 +#define UIOCCMD(147,6077 +#define TIOCCONS 148,6132 +#define TIOCSCTTY 149,6198 +#define TIOCEXT 150,6259 +#define TIOCSIG 151,6326 +#define TIOCDRAIN 152,6384 +#define TTYDISC 154,6448 +#define TABLDISC 155,6502 +#define SLIPDISC 156,6546 +#define FIOCLEX 159,6595 +#define FIONCLEX 160,6655 +#define FIONREAD 161,6712 +#define FIONBIO 162,6775 +#define FIOASYNC 163,6845 +#define FIOSETOWN 164,6908 +#define FIOGETOWN 165,6962 +#define SIOCSHIWAT 168,7043 +#define SIOCGHIWAT 169,7107 +#define SIOCSLOWAT 170,7171 +#define SIOCGLOWAT 171,7234 +#define SIOCATMARK 172,7297 +#define SIOCSPGRP 173,7355 +#define SIOCGPGRP 174,7417 +#define SIOCADDRT 176,7480 +#define SIOCDELRT 177,7538 +#define SIOCSIFADDR 179,7600 +#define OSIOCGIFADDR 180,7665 +#define SIOCGIFADDR 181,7731 +#define SIOCSIFDSTADDR 182,7796 +#define OSIOCGIFDSTADDR 183,7862 +#define SIOCGIFDSTADDR 184,7929 +#define SIOCSIFFLAGS 185,7995 +#define SIOCGIFFLAGS 186,8059 +#define OSIOCGIFBRDADDR 187,8123 +#define SIOCGIFBRDADDR 188,8193 +#define SIOCSIFBRDADDR 189,8262 +#define OSIOCGIFCONF 190,8330 +#define SIOCGIFCONF 191,8394 +#define OSIOCGIFNETMASK 192,8457 +#define SIOCGIFNETMASK 193,8526 +#define SIOCSIFNETMASK 194,8594 +#define SIOCGIFMETRIC 195,8661 +#define SIOCSIFMETRIC 196,8724 +#define SIOCDIFADDR 197,8786 +#define SIOCAIFADDR 198,8847 +#define SIOCSARP 200,8916 +#define OSIOCGARP 201,8975 +#define SIOCGARP 202,9035 +#define SIOCDARP 203,9094 +# define TIOCGETD 211,9281 +# define TIOCSETD 213,9361 +# define OTIOCGETD 215,9429 +# define OTIOCSETD 216,9492 +#define TIOCHPCL 218,9562 +#define TIOCGETP 219,9620 +#define TIOCSETP 220,9685 +#define TIOCSETN 221,9750 +#define TIOCSETC 222,9817 +#define TIOCGETC 223,9882 +#define TANDEM 224,9947 +#define CBREAK 225,10006 +#define LCASE 226,10057 +#define ECHO 227,10110 +#define CRMOD 228,10153 +#define RAW 229,10211 +#define ODDP 230,10260 +#define EVENP 231,10312 +#define ANYP 232,10366 +#define NLDELAY 233,10423 +#define NL0 234,10467 +#define NL1 235,10492 +#define NL2 236,10530 +#define NL3 237,10566 +#define TBDELAY 238,10591 +#define TAB0 239,10647 +#define TAB1 240,10673 +#define TAB2 241,10712 +#define XTABS 242,10738 +#define CRDELAY 243,10793 +#define CR0 244,10837 +#define CR1 245,10862 +#define CR2 246,10900 +#define CR3 247,10938 +#define VTDELAY 248,10981 +#define FF0 249,11035 +#define FF1 250,11060 +#define BSDELAY 251,11098 +#define BS0 252,11142 +#define BS1 253,11167 +#define ALLDELAY 254,11192 +#define CRTBS 255,11252 +#define PRTERA 256,11308 +#define CRTERA 257,11356 +#define TILDE 258,11414 +#define MDMBUF 259,11470 +#define LITOUT 260,11531 +#define TOSTOP 261,11580 +#define FLUSHO 262,11641 +#define NOHANG 263,11700 +#define L001000 264,11772 +#define CRTKIL 265,11801 +#define PASS8 266,11857 +#define CTLECH 267,11884 +#define PENDIN 268,11943 +#define DECCTQ 269,12001 +#define NOFLSH 270,12059 +#define TIOCLBIS 271,12119 +#define TIOCLBIC 272,12182 +#define TIOCLSET 273,12245 +#define TIOCLGET 274,12315 +#define LCRTBS 275,12374 +#define LPRTERA 276,12403 +#define LCRTERA 277,12434 +#define LTILDE 278,12465 +#define LMDMBUF 279,12494 +#define LLITOUT 280,12525 +#define LTOSTOP 281,12556 +#define LFLUSHO 282,12587 +#define LNOHANG 283,12618 +#define LCRTKIL 284,12649 +#define LPASS8 285,12680 +#define LCTLECH 286,12709 +#define LPENDIN 287,12740 +#define LDECCTQ 288,12771 +#define LNOFLSH 289,12802 +#define TIOCSLTC 290,12833 +#define TIOCGLTC 291,12900 +#define OTIOCCONS 292,12967 +#define OTTYDISC 293,13030 +#define NETLDISC 294,13049 +#define NTTYDISC 295,13068 +#define B0 299,13140 +#define B50 300,13153 +#define B75 301,13167 +#define B110 302,13181 +#define B134 303,13196 +#define B150 304,13211 +#define B200 305,13226 +#define B300 306,13241 +#define B600 307,13256 +#define B1200 308,13271 +#define B1800 309,13287 +#define B2400 310,13304 +#define B4800 311,13321 +#define B9600 312,13338 +#define EXTA 313,13355 +#define EXTB 314,13371 sys/file.h,199 #define _SYS_FILE_H 21,858 @@ -1239,48 +1268,8 @@ #define __define_stab(7,87 enum __stab_debug_code9,141 -stab.def,963 +stab.def,22 __define_stab 22,965 -__define_stab 26,1139 -__define_stab 31,1355 -__define_stab 35,1483 -__define_stab 38,1597 -__define_stab 42,1723 -__define_stab 46,1852 -__define_stab 49,1960 -__define_stab 52,2077 -__define_stab 56,2228 -__define_stab 61,2443 -__define_stab 64,2535 -__define_stab 67,2647 -__define_stab 71,2780 -__define_stab 74,2854 -__define_stab 77,2929 -__define_stab 82,3144 -__define_stab(88,3433 -__define_stab 93,3640 -__define_stab 95,3752 -__define_stab 102,4092 -__define_stab 105,4202 -__define_stab 109,4327 -__define_stab 113,4474 -__define_stab 118,4681 -__define_stab 122,4823 -__define_stab 126,5002 -__define_stab 132,5262 -__define_stab 135,5355 -__define_stab 141,5623 -__define_stab 147,5944 -__define_stab 150,6057 -__define_stab 154,6228 -__define_stab 157,6332 -__define_stab 161,6471 -__define_stab 165,6595 -__define_stab 170,6854 -__define_stab 171,6895 -__define_stab 172,6936 -__define_stab 173,6976 -__define_stab 174,7016 sgtty.h,25 #define _SGTYY_H 20,854 @@ -1289,35 +1278,41 @@ #define _SYS_DIR_H 21,845 #define direct 26,910 -sys/cdefs.h,744 -#define _SYS_CDEFS_H 21,847 -#define __P(26,910 -#define __DOTS 27,972 -#define __inline 31,1018 -#define __P(35,1128 -#define __const 36,1151 -#define __signed 37,1174 -#define __volatile 38,1198 -#define __DOTS 39,1226 -#define __P(43,1282 -#define __const 44,1325 -#define __signed45,1370 -#define __volatile46,1387 -#define __DOTS47,1406 -#define __CONCAT(58,1613 -#define __STRING(59,1642 -#define __ptr_t 62,1736 -typedef long double __long_double_t;63,1759 -#define __CONCAT(67,1804 -#define __STRING(68,1833 -#define __ptr_t 70,1858 -typedef double __long_double_t;71,1881 -#define const 80,2163 -#define signed 81,2186 -#define volatile 82,2211 -#define __BEGIN_DECLS 87,2335 -#define __BEGIN_DECLS90,2398 -#define __END_DECLS91,2420 +sys/cdefs.h,921 +#define _SYS_CDEFS_H 21,853 +#define __P(26,916 +#define __DOTS 27,978 +#define __NORETURN 33,1264 +#define __CONSTVALUE 34,1294 +#define __NORETURN 39,1495 +#define __CONSTVALUE 40,1541 +#define __inline 45,1617 +#define __NORETURN 46,1663 +#define __CONSTVALUE 47,1728 +#define __P(51,1861 +#define __const 52,1884 +#define __signed 53,1907 +#define __volatile 54,1931 +#define __DOTS 55,1959 +#define __P(59,2015 +#define __const 60,2058 +#define __signed61,2103 +#define __volatile62,2120 +#define __DOTS63,2139 +#define __CONCAT(74,2346 +#define __STRING(75,2375 +#define __ptr_t 78,2469 +typedef long double __long_double_t;79,2492 +#define __CONCAT(83,2537 +#define __STRING(84,2566 +#define __ptr_t 86,2591 +typedef double __long_double_t;87,2614 +#define const 96,2896 +#define signed 97,2919 +#define volatile 98,2944 +#define __BEGIN_DECLS 103,3068 +#define __BEGIN_DECLS106,3131 +#define __END_DECLS107,3153 ttyent.h,253 #define _TTYENT_H_37,1885 @@ -1590,7 +1585,7 @@ #define SYS_wait4 120,2785 #define SYS_swapoff 121,2808 -../sysdeps/unix/sysv/sco3.2.4/syscall.h,2654 +../sysdeps/unix/sysv/sco3.2.4/syscall.h,2749 #define _SYSCALL_H4,47 #define SYS_access 6,67 #define SYS_acct 7,89 @@ -1618,77 +1613,80 @@ #define SYS_getdents 29,561 #define SYS_getgid 30,585 #define SYS_getgroups 31,607 -#define SYS_getmsg 32,636 -#define SYS_getpid 33,658 -#define SYS_getuid 34,680 -#define SYS_gtty 35,702 -#define SYS_ioctl 36,722 -#define SYS_kill 37,743 -#define SYS_link 38,763 -#define SYS_lock 39,782 -#define SYS_lseek 40,802 -#define SYS_lstat 41,823 -#define SYS_mkdir 42,844 -#define SYS_mknod 43,865 -#define SYS_mount 44,886 -#define SYS_msgsys 45,907 -#define SYS_nap 46,929 -#define SYS_nice 47,953 -#define SYS_open 48,973 -#define SYS_pathconf 49,992 -#define SYS_pause 50,1020 -#define SYS_pipe 51,1041 -#define SYS_plock 52,1061 -#define SYS_poll 53,1082 -#define SYS_prof 54,1102 -#define SYS_ptrace 55,1122 -#define SYS_putmsg 56,1144 -#define SYS_rdebug 57,1166 -#define SYS_read 58,1188 -#define SYS_readlink 59,1207 -#define SYS_rename 60,1231 -#define SYS_rfstart 61,1257 -#define SYS_rfstop 62,1280 -#define SYS_rfsys 63,1302 -#define SYS_rmdir 64,1323 -#define SYS_rmount 65,1344 -#define SYS_rumount 66,1366 -#define SYS_seek 67,1389 -#define SYS_select 68,1409 -#define SYS_semsys 69,1435 -#define SYS_setgid 70,1457 -#define SYS_setgroups 71,1479 -#define SYS_setpgrp 72,1508 -#define SYS_setuid 73,1531 -#define SYS_shmsys 74,1553 -#define SYS_sigaction 75,1575 -#define SYS_signal 76,1604 -#define SYS_sigpending 77,1626 -#define SYS_sigprocmask 78,1656 -#define SYS_sigsuspend 79,1687 -#define SYS_stat 80,1717 -#define SYS_statfs 81,1737 -#define SYS_stime 82,1759 -#define SYS_stty 83,1780 -#define SYS_symlink 84,1800 -#define SYS_sync 85,1823 -#define SYS_sys3b 86,1843 -#define SYS_sysacct 87,1864 -#define SYS_sysconf 88,1887 -#define SYS_sysfs 89,1914 -#define SYS_sysi86 90,1935 -#define SYS_time 91,1959 -#define SYS_times 92,1979 -#define SYS_uadmin 93,2000 -#define SYS_ulimit 94,2022 -#define SYS_umask 95,2044 -#define SYS_umount 96,2065 -#define SYS_unadvfs 97,2087 -#define SYS_unlink 98,2110 -#define SYS_utime 99,2132 -#define SYS_utssys 100,2153 -#define SYS_wait 101,2175 -#define SYS_write 102,2194 +#define SYS_getitimer 32,636 +#define SYS_getmsg 33,665 +#define SYS_getpid 34,687 +#define SYS_getuid 35,709 +#define SYS_gtty 36,731 +#define SYS_ioctl 37,751 +#define SYS_kill 38,772 +#define SYS_link 39,792 +#define SYS_lock 40,811 +#define SYS_lseek 41,831 +#define SYS_lstat 42,852 +#define SYS_mkdir 43,873 +#define SYS_mknod 44,894 +#define SYS_mount 45,915 +#define SYS_msgsys 46,936 +#define SYS_nap 47,958 +#define SYS_nice 48,982 +#define SYS_open 49,1002 +#define SYS_pathconf 50,1021 +#define SYS_pause 51,1049 +#define SYS_pgrpsys 52,1070 +#define SYS_pipe 53,1093 +#define SYS_plock 54,1113 +#define SYS_poll 55,1134 +#define SYS_prof 56,1154 +#define SYS_ptrace 57,1174 +#define SYS_putmsg 58,1196 +#define SYS_rdebug 59,1218 +#define SYS_read 60,1240 +#define SYS_readlink 61,1259 +#define SYS_rename 62,1283 +#define SYS_rfstart 63,1309 +#define SYS_rfstop 64,1332 +#define SYS_rfsys 65,1354 +#define SYS_rmdir 66,1375 +#define SYS_rmount 67,1396 +#define SYS_rumount 68,1418 +#define SYS_seek 69,1441 +#define SYS_select 70,1461 +#define SYS_semsys 71,1487 +#define SYS_setgid 72,1509 +#define SYS_setgroups 73,1531 +#define SYS_setitimer 74,1560 +#define SYS_setpgrp 75,1589 +#define SYS_setuid 76,1612 +#define SYS_shmsys 77,1634 +#define SYS_sigaction 78,1656 +#define SYS_signal 79,1685 +#define SYS_sigpending 80,1707 +#define SYS_sigprocmask 81,1737 +#define SYS_sigsuspend 82,1768 +#define SYS_stat 83,1798 +#define SYS_statfs 84,1818 +#define SYS_stime 85,1840 +#define SYS_stty 86,1861 +#define SYS_symlink 87,1881 +#define SYS_sync 88,1904 +#define SYS_sys3b 89,1924 +#define SYS_sysacct 90,1945 +#define SYS_sysconf 91,1968 +#define SYS_sysfs 92,1995 +#define SYS_sysi86 93,2016 +#define SYS_time 94,2040 +#define SYS_times 95,2060 +#define SYS_uadmin 96,2081 +#define SYS_ulimit 97,2103 +#define SYS_umask 98,2125 +#define SYS_umount 99,2146 +#define SYS_unadvfs 100,2168 +#define SYS_unlink 101,2191 +#define SYS_utime 102,2213 +#define SYS_utssys 103,2234 +#define SYS_wait 104,2256 +#define SYS_write 105,2275 sys/syslog.h,1301 #define _PATH_LOG 36,1876 @@ -1761,3 +1759,71 @@ #define _PATH_TMP 60,2571 #define _PATH_VARRUN 61,2597 #define _PATH_VARTMP 62,2630 + +../sysdeps/unix/bsd/sys/reboot.h,834 +#define _SYS_REBOOT_H_38,1957 +#define RB_AUTOBOOT 45,2087 +#define RB_ASKNAME 47,2153 +#define RB_SINGLE 48,2216 +#define RB_NOSYNC 49,2272 +#define RB_HALT 50,2325 +#define RB_INITNAME 51,2377 +#define RB_DFLTROOT 52,2442 +#define RB_KDB 53,2497 +#define RB_RDONLY 54,2556 +#define RB_DUMP 55,2609 +#define B_ADAPTORSHIFT 69,3121 +#define B_ADAPTORMASK 70,3148 +#define B_ADAPTOR(71,3176 +#define B_CONTROLLERSHIFT 72,3244 +#define B_CONTROLLERMASK 73,3273 +#define B_CONTROLLER(74,3302 +#define B_UNITSHIFT 75,3376 +#define B_UNITMASK 76,3400 +#define B_UNIT(77,3424 +#define B_PARTITIONSHIFT 78,3483 +#define B_PARTITIONMASK 79,3510 +#define B_PARTITION(80,3540 +#define B_TYPESHIFT 81,3613 +#define B_TYPEMASK 82,3636 +#define B_TYPE(83,3661 +#define B_MAGICMASK 85,3721 +#define B_DEVMAGIC 86,3762 +#define MAKEBOOTDEV(88,3803 + +../sysdeps/stub/sys/reboot.h,55 +#define _SYS_REBOOT_H5,138 +#define RB_AUTOBOOT 7,161 + +../sysdeps/mach/sys/reboot.h,914 +#define _SYS_REBOOT_H_78,2880 +#define RB_AUTOBOOT 85,3033 +#define RB_ASKNAME 87,3099 +#define RB_SINGLE 88,3166 +#define RB_KDB 89,3226 +#define RB_HALT 90,3288 +#define RB_INITNAME 93,3408 +#define RB_DFLTROOT 94,3477 +#define RB_NOBOOTRC 95,3536 +#define RB_ALTBOOT 96,3594 +#define RB_UNIPROC 97,3651 +#define RB_SHIFT 99,3711 +#define RB_DEBUGGER 101,3759 +#define B_ADAPTORSHIFT 116,4314 +#define B_ADAPTORMASK 117,4341 +#define B_ADAPTOR(118,4369 +#define B_CONTROLLERSHIFT 119,4437 +#define B_CONTROLLERMASK 120,4466 +#define B_CONTROLLER(121,4495 +#define B_UNITSHIFT 122,4569 +#define B_UNITMASK 123,4593 +#define B_UNIT(124,4617 +#define B_PARTITIONSHIFT 125,4676 +#define B_PARTITIONMASK 126,4703 +#define B_PARTITION(127,4733 +#define B_TYPESHIFT 128,4806 +#define B_TYPEMASK 129,4829 +#define B_TYPE(130,4854 +#define B_MAGICMASK 132,4914 +#define B_DEVMAGIC 133,4955 +#define MAKEBOOTDEV(135,4996 diff -ruN glibc-1.06/misc/bsd-compat.c glibc-1.07/misc/bsd-compat.c --- glibc-1.06/misc/bsd-compat.c Thu Apr 30 18:47:08 1992 +++ glibc-1.07/misc/bsd-compat.c Sun Jan 9 19:05:40 1994 @@ -1,6 +1,6 @@ /* BSD-compatible versions of functions where BSD and POSIX.1 conflict. -Copyright (C) 1991, 1992 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1994 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 @@ -32,5 +32,8 @@ DEFUN(getpgrp, (pid), pid_t pid)) #undef longjmp +#ifdef __STDC__ +#define void __NORETURN void +#endif function_alias_void(longjmp, siglongjmp, (env, val), DEFUN(longjmp, (env, val), CONST jmp_buf env AND int val)) diff -ruN glibc-1.06/misc/ioctl.c glibc-1.07/misc/ioctl.c --- glibc-1.06/misc/ioctl.c Fri May 7 16:45:50 1993 +++ glibc-1.07/misc/ioctl.c Tue Dec 21 20:32:46 1993 @@ -32,7 +32,7 @@ int DEFUN(ioctl, (fd, request), - int fd AND int request DOTS) + int fd AND unsigned long int request DOTS) { va_list arglist; __ptr_t arg; diff -ruN glibc-1.06/misc/sys/cdefs.h glibc-1.07/misc/sys/cdefs.h --- glibc-1.06/misc/sys/cdefs.h Sun May 24 00:07:42 1992 +++ glibc-1.07/misc/sys/cdefs.h Sun Nov 14 19:30:54 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -26,9 +26,25 @@ #define __P(args) args /* GCC can always grok prototypes. */ #define __DOTS , ... +/* In GCC versions before 2.5, the `volatile' and `const' keywords have + special meanings when applied to functions. In version 2.5, the + `__attribute__' syntax used below does not work properly. */ +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) +#define __NORETURN __volatile +#define __CONSTVALUE __const +#else +/* In GCC 2.6 and later, these keywords are meaningless when applied to + functions, as ANSI requires. Instead, we use GCC's special + `__attribute__' syntax. */ +#define __NORETURN __attribute__ ((volatile)) +#define __CONSTVALUE __attribute__ ((const)) +#endif + #else /* Not GCC. */ #define __inline /* No inline functions. */ +#define __NORETURN /* No way to say functions never return. */ +#define __CONSTVALUE /* No way to say functions are functional. */ #if (defined (__STDC__) && __STDC__) || defined (__cplusplus) diff -ruN glibc-1.06/misc/sys/ioctl.h glibc-1.07/misc/sys/ioctl.h --- glibc-1.06/misc/sys/ioctl.h Thu May 6 20:39:53 1993 +++ glibc-1.07/misc/sys/ioctl.h Fri Dec 17 18:31:19 1993 @@ -108,8 +108,8 @@ /* Perform the I/O control operation specified by REQUEST on FD. One argument may follow; its presence and type depend on REQUEST. Return value depends on REQUEST. Usually -1 indicates error. */ -extern int __ioctl __P ((int __fd, int __request, ...)); -extern int ioctl __P ((int __fd, int __request, ...)); +extern int __ioctl __P ((int __fd, unsigned long int __request, ...)); +extern int ioctl __P ((int __fd, unsigned long int __request, ...)); __END_DECLS diff -ruN glibc-1.06/mkinstalldirs glibc-1.07/mkinstalldirs --- glibc-1.06/mkinstalldirs Sat May 22 20:14:19 1993 +++ glibc-1.07/mkinstalldirs Fri Aug 13 11:07:14 1993 @@ -7,6 +7,8 @@ ' IFS="${IFS-${defaultIFS}}" +errstatus=0 + for file in ${1+"$@"} ; do oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. @@ -13,21 +15,21 @@ IFS='%' set - `echo ${file} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" - test ".${1}" = "." && shift pathcomp='' - while test $# -ne 0 ; do - pathcomp="${pathcomp}${1}" - shift + for d in ${1+"$@"} ; do + pathcomp="${pathcomp}${d}" if test ! -d "${pathcomp}"; then echo "mkdir $pathcomp" 1>&2 - mkdir "${pathcomp}" + mkdir "${pathcomp}" || errstatus=$? fi pathcomp="${pathcomp}/" done done + +exit $errstatus # eof diff -ruN glibc-1.06/move-if-change glibc-1.07/move-if-change --- glibc-1.06/move-if-change +++ glibc-1.07/move-if-change Thu Feb 18 20:16:37 1993 @@ -0,0 +1,17 @@ +#!/bin/sh +# Like mv $1 $2, but if the files are the same, just delete $1. +# Status is 0 if $2 is changed, 1 otherwise. +if +test -r $2 +then +if +cmp -s $1 $2 +then +echo $2 is unchanged +rm -f $1 +else +mv -f $1 $2 +fi +else +mv -f $1 $2 +fi diff -ruN glibc-1.06/netinet/in.h glibc-1.07/netinet/in.h --- glibc-1.06/netinet/in.h Thu May 13 00:45:22 1993 +++ glibc-1.07/netinet/in.h Thu Jul 22 18:57:06 1993 @@ -1 +1 @@ -#include +#include diff -ruN glibc-1.06/posix/Makefile glibc-1.07/posix/Makefile --- glibc-1.06/posix/Makefile Fri May 21 14:40:20 1993 +++ glibc-1.07/posix/Makefile Mon Jan 17 18:06:30 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -47,6 +47,7 @@ aux := init-posix environ tests := tstgetopt testfnm others := getconf +install := getconf install-lib := libposix.a gpl2lgpl := getopt.c getopt1.c getopt.h # Frob these guys' copying notices. @@ -54,6 +55,8 @@ $(objpfx)libposix.a: $(AR) cr $@ /dev/null + +lib: $(objpfx)libposix.a # Make the standalone glob/fnmatch package. diff -ruN glibc-1.06/posix/TAGS glibc-1.07/posix/TAGS --- glibc-1.06/posix/TAGS Fri May 21 17:31:12 1993 +++ glibc-1.07/posix/TAGS Sun Jan 16 01:11:22 1994 @@ -8,7 +8,7 @@ DEFUN(__execve,28,1056 ../sysdeps/mach/hurd/__execve.c,24 -DEFUN(__execve,28,1085 +DEFUN(__execve,27,1065 ../sysdeps/unix/__fork.S,24 SYSCALL__ (fork,23,903 @@ -17,8 +17,11 @@ DEFUN_VOID(__fork)28,1058 ../sysdeps/unix/bsd/ultrix4/mips/__fork.S,24 -SYSCALL__ (fork,21,864 +SYSCALL__ (fork,21,857 +../sysdeps/unix/bsd/osf1/alpha/__fork.S,24 +SYSCALL__ (fork,21,857 + ../sysdeps/unix/i386/__fork.S,24 SYSCALL__ (fork,21,858 @@ -26,8 +29,8 @@ SYSCALL__ (fork,21,852 ../sysdeps/mach/hurd/__fork.c,50 -start_threads 43,1285 -DEFUN_VOID(__fork)64,1866 +start_threads 45,1306 +DEFUN_VOID(__fork)66,1887 ../sysdeps/posix/__fpathcon.c,85 DEFUN(__fpathconf,28,995 @@ -46,7 +49,7 @@ DEFUN_VOID(__getegid)25,959 ../sysdeps/mach/hurd/__getegid.c,29 -DEFUN_VOID(__getegid)26,975 +DEFUN_VOID(__getegid)26,969 ../sysdeps/unix/__geteuid.S,67 SYSCALL__ (geteuid,22,871 @@ -57,16 +60,16 @@ DEFUN_VOID(__geteuid)26,959 ../sysdeps/mach/hurd/__geteuid.c,29 -DEFUN_VOID(__geteuid)26,974 +DEFUN_VOID(__geteuid)26,968 ../sysdeps/unix/__getgid.S,26 SYSCALL__ (getgid,21,852 ../sysdeps/stub/__getgid.c,28 -DEFUN_VOID(__getgid)25,944 +DEFUN_VOID(__getgid)26,975 ../sysdeps/mach/hurd/__getgid.c,28 -DEFUN_VOID(__getgid)26,970 +DEFUN_VOID(__getgid)26,964 ../sysdeps/unix/common/__getgrps.c,27 DEFUN(__getgroups,34,1209 @@ -75,7 +78,7 @@ DEFUN(__getgroups,31,1161 ../sysdeps/mach/hurd/__getgrps.c,20 -__getgroups 25,915 +__getgroups 25,909 ../sysdeps/unix/common/__getpgrp.S,27 SYSCALL__ (getpgrp,21,852 @@ -83,11 +86,13 @@ ../sysdeps/stub/__getpgrp.c,24 DEFUN(__getpgrp,26,962 -../sysdeps/unix/sysv/sco3.2.4/__getpgrp.c,25 -DEFUN(__getpgrp,28,1008 +../sysdeps/unix/sysv/sysv4/__getpgrp.c,25 +DEFUN(__getpgrp,28,1007 + +../sysdeps/unix/sysv/sco3.2.4/__getpgrp.c,0 ../sysdeps/mach/hurd/__getpgrp.c,24 -DEFUN(__getpgrp,26,963 +DEFUN(__getpgrp,26,969 ../sysdeps/unix/__getpid.S,26 SYSCALL__ (getpid,21,852 @@ -96,7 +101,7 @@ DEFUN_VOID(__getpid)26,942 ../sysdeps/mach/hurd/__getpid.c,28 -DEFUN_VOID(__getpid)26,959 +DEFUN_VOID(__getpid)26,967 ../sysdeps/unix/__getppid.S,67 SYSCALL__ (getppid,22,871 @@ -107,16 +112,16 @@ DEFUN_VOID(__getppid)26,949 ../sysdeps/mach/hurd/__getppid.c,29 -DEFUN_VOID(__getppid)26,949 +DEFUN_VOID(__getppid)28,998 ../sysdeps/unix/__getuid.S,26 SYSCALL__ (getuid,21,852 ../sysdeps/stub/__getuid.c,28 -DEFUN_VOID(__getuid)26,944 +DEFUN_VOID(__getuid)26,974 ../sysdeps/mach/hurd/__getuid.c,28 -DEFUN_VOID(__getuid)26,969 +DEFUN_VOID(__getuid)26,963 ../sysdeps/stub/__pathconf.c,95 DEFUN(__pathconf,27,966 @@ -132,10 +137,10 @@ SYSCALL__ (setgid,21,852 ../sysdeps/stub/__setgid.c,24 -DEFUN(__setgid,28,1112 +DEFUN(__setgid,29,1141 ../sysdeps/mach/hurd/__setgid.c,24 -DEFUN(__setgid,28,1119 +DEFUN(__setgid,30,1165 ../sysdeps/unix/common/__setpgrp.S,27 SYSCALL__ (setpgrp,21,852 @@ -143,11 +148,13 @@ ../sysdeps/stub/__setpgrp.c,25 DEFUN(__setpgrp,27,1085 -../sysdeps/unix/sysv/sco3.2.4/__setpgrp.c,25 -DEFUN(__setpgrp,29,1131 +../sysdeps/unix/sysv/sysv4/__setpgrp.c,25 +DEFUN(__setpgrp,29,1130 + +../sysdeps/unix/sysv/sco3.2.4/__setpgrp.c,0 ../sysdeps/mach/hurd/__setpgrp.c,25 -DEFUN(__setpgrp,27,1091 +DEFUN(__setpgrp,28,1103 ../sysdeps/unix/bsd/__setsid.c,29 DEFUN_VOID(__setsid)30,1160 @@ -155,14 +162,22 @@ ../sysdeps/stub/__setsid.c,29 DEFUN_VOID(__setsid)28,1096 -../sysdeps/unix/sysv/linux/__setsid.S,26 +../sysdeps/unix/bsd/sun/sunos4/__setsid.S,0 + +../sysdeps/unix/bsd/ultrix4/__setsid.S,0 + +../sysdeps/unix/bsd/bsd4.4/__setsid.S,26 SYSCALL__ (setsid,21,852 -../sysdeps/unix/sysv/sco3.2.4/__setsid.c,29 -DEFUN_VOID(__setsid)29,1141 +../sysdeps/unix/sysv/linux/__setsid.S,0 + +../sysdeps/unix/sysv/sysv4/__setsid.c,29 +DEFUN_VOID(__setsid)29,1140 + +../sysdeps/unix/sysv/sco3.2.4/__setsid.c,0 ../sysdeps/mach/hurd/__setsid.c,29 -DEFUN_VOID(__setsid)28,1102 +DEFUN_VOID(__setsid)29,1114 ../sysdeps/unix/bsd/__setuid.c,24 DEFUN(__setuid,30,1157 @@ -171,18 +186,18 @@ SYSCALL__ (setuid,21,852 ../sysdeps/stub/__setuid.c,24 -DEFUN(__setuid,28,1108 +DEFUN(__setuid,29,1137 ../sysdeps/mach/hurd/__setuid.c,24 -DEFUN(__setuid,28,1114 +DEFUN(__setuid,30,1161 ../sysdeps/posix/__sysconf.c,68 -DEFUN(__sysconf,32,1115 -DEFUN(__sysconf, (name), int name)32,1115 +DEFUN(__sysconf,32,1121 +DEFUN(__sysconf, (name), int name)32,1121 ../sysdeps/stub/__sysconf.c,66 -DEFUN(__sysconf,26,947 -DEFUN(__sysconf, (name), int name)26,947 +DEFUN(__sysconf,28,991 +DEFUN(__sysconf, (name), int name)28,991 ../sysdeps/unix/bsd/ultrix4/__sysconf.c,95 DEFUN(__sysconf,36,1336 @@ -190,11 +205,12 @@ #define __sysconf 59,1779 ../sysdeps/unix/sysv/sysv4/__sysconf.c,68 -DEFUN(__sysconf,31,1079 -DEFUN(__sysconf, (name), int name)31,1079 +DEFUN(__sysconf,31,1076 +DEFUN(__sysconf, (name), int name)31,1076 -../sysdeps/unix/sysv/sco3.2.4/__sysconf.S,27 -SYSCALL__ (sysconf,21,846 +../sysdeps/unix/sysv/sco3.2.4/__sysconf.S,42 +ENTRY (__sysconf)23,894 + DO_CALL 26,988 ../sysdeps/unix/bsd/__times.c,57 DEFUN(timeval_to_clock_t,34,1085 @@ -214,7 +230,7 @@ function_alias (__vfork, __fork, __pid_t, (), DEFUN_VOID(__vfork)26,964 ../sysdeps/unix/bsd/sun/m68k/__vfork.S,26 -#define SYS_vfork 22,870 +#define SYS_vfork 22,876 ../sysdeps/unix/bsd/vax/__vfork.S,47 #define SYS_vfork 22,870 @@ -225,8 +241,8 @@ DO_CALL 28,1099 ../sysdeps/unix/bsd/ultrix4/mips/__vfork.S,58 -#define SYS_vfork 22,889 -SYSCALL__ (vfork,25,930 +#define SYS_vfork 22,882 +SYSCALL__ (vfork,25,923 ../sysdeps/unix/sparc/__vfork.S,52 #define SYS_vfork 22,871 @@ -233,11 +249,11 @@ SYSCALL__ (vfork,25,901 ../sysdeps/mach/hurd/__vfork.c,28 -DEFUN_VOID(__vfork)35,1300 +DEFUN_VOID(__vfork)37,1324 -../sysdeps/unix/bsd/m68k/__wait.S,41 -SYSCALL__ (wait,21,852 - tstl sp@22,872 +../sysdeps/unix/bsd/m68k/__wait.S,39 +SYSCALL__ (wait,21,858 + tst.l 23,898 ../sysdeps/posix/__wait.c,22 DEFUN(__wait,26,1017 @@ -253,7 +269,7 @@ SYSCALL__ (wait,21,852 ../sysdeps/unix/bsd/ultrix4/__wait.S,21 -ENTRY(__wait)23,880 +ENTRY(__wait)23,873 ../sysdeps/unix/bsd/bsd4.4/__wait.c,22 DEFUN(__wait,28,1081 @@ -268,12 +284,12 @@ ENTRY(__wait3)21,852 tstl sp@30,1029 -../sysdeps/posix/__wait3.c,102 +../sysdeps/posix/__wait3.c,107 DEFUN(__wait3,31,1288 - __WAIT_STATUS stat_loc AND int options AND struct rusage *usage)32,1331 + __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage)32,1331 ../sysdeps/stub/__wait3.c,23 -DEFUN(__wait3,30,1262 +DEFUN(__wait3,30,1268 ../sysdeps/unix/bsd/sun/sunos4/__wait3.c,0 @@ -286,7 +302,7 @@ DO_CALL 36,1386 ../sysdeps/unix/bsd/ultrix4/__wait3.S,25 -SYSCALL__ (wait3,21,864 +SYSCALL__ (wait3,21,857 ../sysdeps/unix/bsd/bsd4.4/__wait3.c,23 DEFUN(__wait3,30,1274 @@ -295,16 +311,18 @@ DEFUN(__wait4,25,924 ../sysdeps/unix/bsd/sun/sunos4/__wait4.c,75 -DEFUN(__wait4,32,1238 - int options AND struct rusage *usage)34,1333 +DEFUN(__wait4,32,1243 + int options AND struct rusage *usage)34,1343 ../sysdeps/unix/bsd/bsd4.4/__wait4.S,25 SYSCALL__ (wait4,21,846 +../sysdeps/unix/bsd/osf1/alpha/__wait4.S,0 + ../sysdeps/unix/sysv/linux/__wait4.S,0 ../sysdeps/mach/hurd/__wait4.c,22 -DEFUN(__wait4,26,942 +DEFUN(__wait4,26,936 ../sysdeps/stub/__waitpid.c,25 DEFUN(__waitpid,38,1580 @@ -312,14 +330,21 @@ ../sysdeps/unix/bsd/sun/sunos4/__waitpid.c,0 ../sysdeps/unix/bsd/ultrix4/__waitpid.S,27 -SYSCALL__ (waitpid,21,864 +SYSCALL__ (waitpid,21,857 ../sysdeps/unix/bsd/bsd4.4/__waitpid.c,25 DEFUN(__waitpid,38,1599 +../sysdeps/unix/bsd/osf1/alpha/__waitpid.c,0 + ../sysdeps/unix/sysv/linux/__waitpid.S,27 SYSCALL__ (waitpid,21,852 +../sysdeps/unix/sysv/sysv4/__waitpid.c,76 +typedef enum __idtype26,964 +} __idtype_t;36,1174 +DEFUN(__waitpid,56,2003 + ../sysdeps/unix/sysv/sco3.2.4/__waitpid.S,43 ENTRY (__waitpid)21,846 DO_CALL 29,1198 @@ -331,8 +356,8 @@ DEFUN(_exit,27,1056 ../sysdeps/mach/hurd/_exit.c,40 -_hurd_exit 24,906 -DEFUN(_exit,42,1303 +_hurd_exit 26,944 +DEFUN(_exit,52,1499 ../sysdeps/unix/bsd/alarm.c,21 DEFUN(alarm,31,1407 @@ -368,7 +393,7 @@ DEFUN(execvp,35,1205 fnmatch.c,17 -fnmatch 45,1651 +fnmatch 52,1916 fork.c,32 DEFUN_VOID(fork)25,951 @@ -395,28 +420,24 @@ DEFUN_VOID(getlogin)27,1063 ../sysdeps/mach/hurd/getlogin.c,29 -DEFUN_VOID(getlogin)28,1087 +DEFUN_VOID(getlogin)28,1093 -getopt.c,271 -#define alloca 37,1280 -#define const49,1617 -#define _NO_PROTO54,1734 -#define __alloca 78,2645 -#define my_index 185,6721 -#define my_bcopy(186,6745 -my_index 195,6928 -my_bcopy 209,7098 -exchange 239,8026 -_getopt_internal 317,11420 -getopt 651,19549 -main 670,19931 - -getopt1.c,105 -#define const29,1032 -#define NULL 54,1816 -getopt_long 58,1843 -getopt_long_only 74,2346 -main 92,2702 +getopt.c,175 +#define _NO_PROTO32,1281 +#define const50,1762 +#define my_index 179,6682 +my_index 188,6832 +exchange 235,8143 +_getopt_internal 347,12330 +getopt 681,20459 +main 700,20841 + +getopt1.c,106 +#define const40,1494 +#define NULL 66,2285 +getopt_long 70,2312 +getopt_long_only 86,2815 +main 104,3171 ../sysdeps/unix/bsd/getpgrp.c,27 DEFUN_VOID(getpgrp)28,965 @@ -486,7 +507,7 @@ SYSCALL (setlogin,21,852 ../sysdeps/mach/hurd/setlogin.c,23 -DEFUN(setlogin,25,947 +DEFUN(setlogin,26,971 setpgid.c,30 DEFUN(setpgid,26,988 @@ -501,14 +522,14 @@ DEFUN(setuid,26,957 ../sysdeps/posix/sleep.c,50 -DEFUN(sleep_handler,28,1053 -DEFUN(sleep,41,1626 +DEFUN(sleep_handler,29,1072 +DEFUN(sleep,42,1645 ../sysdeps/stub/sleep.c,21 DEFUN(sleep,33,1452 ../sysdeps/mach/hurd/sleep.c,21 -DEFUN(sleep,31,1267 +DEFUN(sleep,31,1273 sysconf.c,30 DEFUN(sysconf,26,960 @@ -527,7 +548,7 @@ SYSCALL (uname,21,846 ../sysdeps/mach/hurd/uname.c,14 -uname 24,899 +uname 24,905 ../sysdeps/generic/vfork.c,33 DEFUN_VOID(vfork)25,954 @@ -536,7 +557,7 @@ ENTRY(vfork)22,884 ../sysdeps/unix/bsd/ultrix4/mips/vfork.S,20 -ENTRY(vfork)23,936 +ENTRY(vfork)23,929 wait.c,27 DEFUN(wait,25,948 @@ -570,25 +591,28 @@ #define __need_clock_t28,966 struct tms35,1097 -sys/wait.h,508 -#define _SYS_WAIT_H 25,933 -#define __WAIT_INT(42,1294 -#define __WAIT_INT(46,1455 -#define __WAIT_STATUS 54,1745 -#define __WAIT_STATUS 56,1781 -#define __WAIT_INT(61,1889 -#define __WAIT_STATUS 62,1925 -#define WEXITSTATUS(69,2051 -#define WTERMSIG(70,2113 -#define WSTOPSIG(71,2169 -#define WIFEXITED(72,2225 -#define WIFSIGNALED(73,2283 -#define WIFSTOPPED(74,2345 -#define WCOREDUMP(77,2423 -#define W_EXITCODE(78,2481 -#define W_STOPCODE(79,2533 -#define WAIT_ANY 90,2920 -#define WAIT_MYPGRP 91,2962 +sys/wait.h,616 +#define _SYS_WAIT_H 25,945 +#define __WAIT_INT(42,1306 +#define __WAIT_INT(46,1467 +#define __WAIT_STATUS 58,2055 +#define __WAIT_STATUS_DEFN 59,2086 +#define __WAIT_STATUS 61,2127 +#define __WAIT_STATUS_DEFN 62,2193 +#define __WAIT_INT(67,2263 +#define __WAIT_STATUS 68,2299 +#define __WAIT_STATUS_DEFN 69,2328 +#define WEXITSTATUS(76,2458 +#define WTERMSIG(77,2520 +#define WSTOPSIG(78,2576 +#define WIFEXITED(79,2632 +#define WIFSIGNALED(80,2690 +#define WIFSTOPPED(81,2752 +#define WCOREDUMP(84,2830 +#define W_EXITCODE(85,2888 +#define W_STOPCODE(86,2940 +#define WAIT_ANY 97,3327 +#define WAIT_MYPGRP 98,3369 sys/types.h,668 #define _SYS_TYPES_H 25,932 @@ -619,7 +643,7 @@ #define FD_CLR(72,1755 #define FD_ISSET(73,1799 -unistd.h,621 +unistd.h,563 #define _UNISTD_H 25,919 #define _POSIX_VERSION 34,1189 #define _POSIX2_C_VERSION 39,1333 @@ -639,9 +663,7 @@ #define SEEK_SET 117,3867 #define SEEK_CUR 118,3922 #define SEEK_END 119,3976 -#define __NORETURN 262,9972 -#define __NORETURN264,10024 -#define getpgrp(310,11628 +#define getpgrp(301,11393 glob.h,24 #define _GLOB_H 20,793 @@ -687,28 +709,28 @@ #define __FD_ISSET(80,2854 getopt.h,125 -#define _GETOPT_H 22,896 -#define no_argument 96,3298 -#define required_argument 97,3321 -#define optional_argument 98,3349 +#define _GETOPT_H 23,995 +#define no_argument 97,3397 +#define required_argument 98,3420 +#define optional_argument 99,3448 posix1_lim.h,528 -#define _POSIX1_LIMITS_H 25,925 -#define _POSIX_ARG_MAX 31,1081 -#define _POSIX_CHILD_MAX 34,1167 -#define _POSIX_LINK_MAX 37,1232 -#define _POSIX_MAX_CANON 40,1320 -#define _POSIX_MAX_INPUT 44,1437 -#define _POSIX_NGROUPS_MAX 47,1534 -#define _POSIX_OPEN_MAX 50,1622 -#define _POSIX_NAME_MAX 53,1689 -#define _POSIX_PATH_MAX 56,1756 -#define _POSIX_PIPE_BUF 59,1851 -#define _POSIX_SSIZE_MAX 62,1918 -#define _POSIX_STREAM_MAX 65,2008 -#define _POSIX_TZNAME_MAX 68,2073 -#define SSIZE_MAX 76,2207 -#define NGROUPS_MAX 84,2364 +#define _POSIX1_LIMITS_H 25,931 +#define _POSIX_ARG_MAX 31,1087 +#define _POSIX_CHILD_MAX 34,1173 +#define _POSIX_LINK_MAX 37,1238 +#define _POSIX_MAX_CANON 40,1326 +#define _POSIX_MAX_INPUT 44,1443 +#define _POSIX_NGROUPS_MAX 47,1540 +#define _POSIX_OPEN_MAX 50,1628 +#define _POSIX_NAME_MAX 53,1695 +#define _POSIX_PATH_MAX 56,1762 +#define _POSIX_PIPE_BUF 59,1857 +#define _POSIX_SSIZE_MAX 62,1924 +#define _POSIX_STREAM_MAX 65,2014 +#define _POSIX_TZNAME_MAX 68,2107 +#define SSIZE_MAX 76,2241 +#define NGROUPS_MAX 84,2398 posix2_lim.h,568 #define _POSIX2_LIMITS_H 21,851 @@ -776,6 +798,10 @@ #define NAME_MAX 33,1270 #define PATH_MAX 35,1292 +../sysdeps/mach/hurd/local_lim.h,58 +#define NGROUPS_MAX 31,1402 +#define SYMLINK_MAX 39,1715 + tar.h,644 #define _TAR_H 24,919 #define TSUID 74,2657 @@ -821,7 +847,7 @@ ../sysdeps/generic/confname.h,0 -../sysdeps/unix/sysv/sco3.2.4/confname.h,588 +../sysdeps/unix/sysv/sco3.2.4/confname.h,620 #define _PC_LINK_MAX 21,960 #define _PC_MAX_CANON 22,984 #define _PC_MAX_INPUT 23,1009 @@ -841,6 +867,7 @@ #define _SC_VERSION 39,1405 #define _SC_PASS_MAX 40,1428 #define _SC_XOPEN_VERSION 41,1452 +#define _SC_TZNAME_MAX 42,1480 ../sysdeps/unix/bsd/waitflags.h,80 #define _WAITFLAGS_H 22,893 @@ -851,6 +878,13 @@ #define _WAITFLAGS_H 22,893 #define WNOHANG 25,965 #define WUNTRACED 26,1012 + +../sysdeps/unix/sysv/sysv4/waitflags.h,131 +#define _WAITFLAGS_H 22,907 +#define WNOHANG 25,979 +#define WUNTRACED 26,1027 +#define WEXITED 29,1108 +#define WTRAPPED 30,1170 ../sysdeps/generic/waitstatus.h,481 #define _WAITSTATUS_H23,947 diff -ruN glibc-1.06/posix/fnmatch.c glibc-1.07/posix/fnmatch.c --- glibc-1.06/posix/fnmatch.c Fri Apr 16 12:24:54 1993 +++ glibc-1.07/posix/fnmatch.c Tue Oct 12 11:18:06 1993 @@ -16,7 +16,14 @@ Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ +#include +#else #include "config.h" +#endif #endif #include diff -ruN glibc-1.06/posix/fnmatch.h glibc-1.07/posix/fnmatch.h --- glibc-1.06/posix/fnmatch.h Sun Apr 11 18:54:32 1993 +++ glibc-1.07/posix/fnmatch.h Tue Dec 14 15:02:10 1993 @@ -34,6 +34,13 @@ non-ANSI C where `const' is problematical. */ #endif /* C++ or ANSI C. */ + +/* We #undef these before defining them because some losing systems + (HP-UX A.08.07 for example) define these in . */ +#undef FNM_PATHNAME +#undef FNM_NOESCAPE +#undef FNM_PERIOD + /* Bits set in the FLAGS argument to `fnmatch'. */ #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ diff -ruN glibc-1.06/posix/getopt.c glibc-1.07/posix/getopt.c --- glibc-1.06/posix/getopt.c Fri May 7 19:23:14 1993 +++ glibc-1.07/posix/getopt.c Sat Dec 25 02:24:07 1993 @@ -6,7 +6,8 @@ Copyright (C) 1987, 88, 89, 90, 91, 92, 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 @@ -23,35 +24,31 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* NOTE!!! AIX requires this to be the first thing in the file. - Do not put ANYTHING before it! */ -#if !defined (__GNUC__) && defined (_AIX) - #pragma alloca +/* + * This tells Alpha OSF/1 not to define a getopt prototype in . + * Ditto for AIX 3.2 and . + */ +#ifndef _NO_PROTO +#define _NO_PROTO #endif #ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ +#include +#else #include "config.h" #endif - -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else /* not __GNUC__ */ -#if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__)))) -#include -#else -#ifndef _AIX -char *alloca (); #endif -#endif /* alloca.h */ -#endif /* not __GNUC__ */ -#if !__STDC__ && !defined(const) && IN_GCC +#ifndef __STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +#ifndef const #define const #endif - -/* This tells Alpha OSF/1 not to define a getopt prototype in . */ -#ifndef _NO_PROTO -#define _NO_PROTO #endif #include @@ -70,12 +67,9 @@ /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ -#undef alloca /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ #include -#else /* Not GNU C library. */ -#define __alloca alloca #endif /* GNU C library. */ /* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a @@ -183,7 +177,6 @@ in GCC. */ #include #define my_index strchr -#define my_bcopy(src, dst, n) memcpy ((dst), (src), (n)) #else /* Avoid depending on library functions or files @@ -205,16 +198,19 @@ return 0; } -static void -my_bcopy (from, to, size) - const char *from; - char *to; - int size; -{ - int i; - for (i = 0; i < size; i++) - to[i] = from[i]; -} +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. + (Supposedly there are some machines where it might get a warning, + but changing this conditional to __STDC__ is too risky.) */ +#ifdef __GNUC__ +#ifdef IN_GCC +#include "gstddef.h" +#else +#include +#endif +extern size_t strlen (const char *); +#endif + #endif /* GNU C library. */ /* Handle permutation of arguments. */ @@ -239,17 +235,51 @@ exchange (argv) char **argv; { - int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *); - char **temp = (char **) __alloca (nonopts_size); - - /* Interchange the two blocks of data in ARGV. */ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ - my_bcopy ((char *) &argv[first_nonopt], (char *) temp, nonopts_size); - my_bcopy ((char *) &argv[last_nonopt], (char *) &argv[first_nonopt], - (optind - last_nonopt) * sizeof (char *)); - my_bcopy ((char *) temp, - (char *) &argv[first_nonopt + optind - last_nonopt], - nonopts_size); + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } /* Update records for the slots the non-options now occupy. */ diff -ruN glibc-1.06/posix/getopt.h glibc-1.07/posix/getopt.h --- glibc-1.06/posix/getopt.h Fri May 7 19:23:07 1993 +++ glibc-1.07/posix/getopt.h Sat Aug 7 02:02:39 1993 @@ -1,7 +1,8 @@ /* Declarations for getopt. Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 diff -ruN glibc-1.06/posix/getopt1.c glibc-1.07/posix/getopt1.c --- glibc-1.06/posix/getopt1.c Fri May 7 19:23:05 1993 +++ glibc-1.07/posix/getopt1.c Thu Oct 14 16:12:30 1993 @@ -2,7 +2,8 @@ Copyright (C) 1987, 88, 89, 90, 91, 92, 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. +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. 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 @@ -20,13 +21,24 @@ Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ +#include +#else #include "config.h" #endif +#endif #include "getopt.h" -#if !__STDC__ && !defined(const) && IN_GCC +#ifndef __STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +#ifndef const #define const +#endif #endif #include diff -ruN glibc-1.06/posix/glob.c glibc-1.07/posix/glob.c --- glibc-1.06/posix/glob.c Wed May 12 18:25:51 1993 +++ glibc-1.07/posix/glob.c Thu Aug 12 18:15:21 1993 @@ -21,7 +21,7 @@ #endif #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include diff -ruN glibc-1.06/posix/posix1_lim.h glibc-1.07/posix/posix1_lim.h --- glibc-1.06/posix/posix1_lim.h Wed Feb 12 13:14:52 1992 +++ glibc-1.07/posix/posix1_lim.h Fri Jun 25 16:49:38 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -64,7 +64,7 @@ /* Number of streams a process can have open at once. */ #define _POSIX_STREAM_MAX 8 -/* Number of bytes in `tzname'. */ +/* Maximum length of a timezone name (element of `tzname'). */ #define _POSIX_TZNAME_MAX 3 diff -ruN glibc-1.06/posix/sys/wait.h glibc-1.07/posix/sys/wait.h --- glibc-1.06/posix/sys/wait.h Wed Nov 18 16:06:09 1992 +++ glibc-1.07/posix/sys/wait.h Tue Jan 11 22:39:28 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -46,14 +46,20 @@ #define __WAIT_INT(status) (*(int *) &(status)) #endif -/* This is the type of the argument to `wait'. - With GCC 2, the funky union causes redeclarations with either `int *' or - `union wait *' to be allowed. */ - -#if !defined (__GNUC__) || __GNUC__ < 2 || 1 /* GCC broken as of 2.3.1 */ -#define __WAIT_STATUS __ptr_t +/* This is the type of the argument to `wait'. With GCC 2.4 and later, the + funky union causes redeclarations with either `int *' or `union wait *' + to be allowed without complaint. (__GNUC_MINOR__ is in fact only + defined in later versions, after 2.5.0; and versions prior to 2.6 have a + bug that produces bad code on some machines when using the union.) + __WAIT_STATUS_DEFN is the type used in the actual function definitions. */ + +#if (!defined (__GNUC__) || __GNUC__ < 2 || \ + (__GNUC__ == 2 && __GNUC_MINOR__ < 6)) +#define __WAIT_STATUS __ptr_t +#define __WAIT_STATUS_DEFN __ptr_t #else -#define __WAIT_STATUS union { union wait *__unionptr; int *__intptr; } +#define __WAIT_STATUS union { union wait *__uptr; int *__iptr; } +#define __WAIT_STATUS_DEFN int * #endif #else /* Don't use BSD. */ @@ -60,6 +66,7 @@ #define __WAIT_INT(status) (status) #define __WAIT_STATUS int * +#define __WAIT_STATUS_DEFN int * #endif /* Use BSD. */ diff -ruN glibc-1.06/posix/unistd.h glibc-1.07/posix/unistd.h --- glibc-1.06/posix/unistd.h Sat May 15 17:12:59 1993 +++ glibc-1.07/posix/unistd.h Wed Nov 10 06:26:47 1993 @@ -256,15 +256,6 @@ extern int execlp __P ((__const char *__file, ...)); -#ifndef __NORETURN -#ifdef __GNUC__ -/* The `volatile' keyword tells GCC that a function never returns. */ -#define __NORETURN __volatile -#else /* Not GCC. */ -#define __NORETURN -#endif /* GCC. */ -#endif /* __NORETURN not defined. */ - /* Terminate program execution with the low-order 8 bits of STATUS. */ extern __NORETURN void _exit __P ((int __status)); @@ -553,11 +544,43 @@ extern void endusershell __P ((void)); /* Discard cached info. */ extern void setusershell __P ((void)); /* Rewind and re-read the file. */ + /* Prompt with PROMPT and read a string from the terminal without echoing. Uses /dev/tty if possible; otherwise stderr and stdin. */ extern char *getpass __P ((const char *__prompt)); #endif /* Use BSD. */ + + +#ifdef __USE_MISC + +/* Generate a unique temporary file name from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + Returns TEMPLATE, or a null pointer if it cannot get a unique file name. */ +extern char *mktemp __P ((char *__template)); + +/* Generate a unique temporary file name from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the filename unique. + Returns a file descriptor open on the file for reading and writing, + or -1 if it cannot create a uniquely-named file. */ +extern int mkstemp __P ((char *__template)); + + +/* Invoke `system call' number SYSNO, passing it the remaining arguments. + This is completely system-dependent, and not often useful. + + In Unix, `syscall' sets `errno' for all errors and most calls return -1 + for errors; in many systems you cannot pass arguments or get return + values for all system calls (`pipe', `fork', and `getppid' typically + among them). + + In Mach, all system calls take normal arguments and always return an + error code (zero for success). */ +extern int syscall __P ((int __sysno, ...)); + +#endif /* Use misc. */ __END_DECLS diff -ruN glibc-1.06/posix/wait.c glibc-1.07/posix/wait.c --- glibc-1.06/posix/wait.c Thu Jun 27 19:41:29 1991 +++ glibc-1.07/posix/wait.c Thu Dec 2 19:03:14 1993 @@ -22,4 +22,4 @@ #undef wait function_alias(wait, __wait, __pid_t, (s), - DEFUN(wait, (s), __WAIT_STATUS s)) + DEFUN(wait, (s), __WAIT_STATUS_DEFN s)) diff -ruN glibc-1.06/posix/wait3.c glibc-1.07/posix/wait3.c --- glibc-1.06/posix/wait3.c Thu May 6 17:42:12 1993 +++ glibc-1.07/posix/wait3.c Thu Dec 2 19:03:16 1993 @@ -24,4 +24,4 @@ #undef wait3 function_alias(wait3, __wait3, pid_t, (s, o, u), DEFUN(wait3, (s, o, u), - __WAIT_STATUS s AND int o AND struct rusage *u)) + __WAIT_STATUS_DEFN s AND int o AND struct rusage *u)) diff -ruN glibc-1.06/posix/wait4.c glibc-1.07/posix/wait4.c --- glibc-1.06/posix/wait4.c Thu May 6 17:42:11 1993 +++ glibc-1.07/posix/wait4.c Thu Dec 2 19:03:17 1993 @@ -24,5 +24,5 @@ #undef wait4 function_alias(wait4, __wait4, pid_t, (p, s, o, u), DEFUN(wait4, (p, s, o, u), - pid_t p AND __WAIT_STATUS s AND + pid_t p AND __WAIT_STATUS_DEFN s AND int o AND struct rusage *u)) diff -ruN glibc-1.06/resource/TAGS glibc-1.07/resource/TAGS --- glibc-1.06/resource/TAGS Thu May 13 01:57:13 1993 +++ glibc-1.07/resource/TAGS Sat Dec 25 03:26:44 1993 @@ -6,8 +6,8 @@ DEFUN(getrlimit,26,1015 ../sysdeps/mach/hurd/getrlimit.c,99 -DEFUN(getrlimit,27,1033 - enum __rlimit_resource resource AND struct rlimit *rlimits)28,1071 +DEFUN(getrlimit,27,1039 + enum __rlimit_resource resource AND struct rlimit *rlimits)28,1077 ../sysdeps/unix/common/setrlimit.S,27 SYSCALL (setrlimit,21,852 @@ -20,7 +20,7 @@ enum __rlimit_resource resource AND struct rlimit *rlimits)33,1268 ../sysdeps/mach/hurd/setrlimit.c,25 -DEFUN(setrlimit,27,1069 +DEFUN(setrlimit,29,1094 getrusage.c,32 DEFUN(getrusage,25,978 @@ -52,7 +52,7 @@ DEFUN(getpriority,28,1191 ../sysdeps/mach/hurd/getprio.c,27 -DEFUN(getpriority,29,1215 +DEFUN(getpriority,29,1209 ../sysdeps/unix/bsd/setprio.S,29 SYSCALL (setpriority,21,852 @@ -82,9 +82,9 @@ #define RLIM_INFINITY 64,1920 enum __rusage_who79,2464 struct rusage90,2743 -#define PRIO_MIN 149,5180 -#define PRIO_MAX 150,5245 -enum __priority_which154,5448 +#define PRIO_MIN 149,5194 +#define PRIO_MAX 150,5259 +enum __priority_which154,5462 sys/vlimit.h,87 #define _SYS_VLIMIT_H 21,860 diff -ruN glibc-1.06/resource/sys/resource.h glibc-1.07/resource/sys/resource.h --- glibc-1.06/resource/sys/resource.h Tue Nov 10 17:13:22 1992 +++ glibc-1.07/resource/sys/resource.h Thu Dec 23 00:57:51 1993 @@ -94,39 +94,39 @@ /* Total amount of system time used. */ struct timeval ru_stime; /* Maximum resident set size (in kilobytes). */ - int ru_maxrss; + long ru_maxrss; /* Amount of sharing of text segment memory with other processes (kilobyte-seconds). */ - int ru_ixrss; + long ru_ixrss; /* Amount of data segment memory used (kilobyte-seconds). */ - int ru_idrss; + long ru_idrss; /* Amount of stack memory used (kilobyte-seconds). */ - int ru_isrss; + long ru_isrss; /* Number of soft page faults (i.e. those serviced by reclaiming a page from the list of pages awaiting reallocation. */ - int ru_minflt; + long ru_minflt; /* Number of hard page faults (i.e. those that required I/O). */ - int ru_majflt; + long ru_majflt; /* Number of times a process was swapped out of physical memory. */ - int ru_nswap; + long ru_nswap; /* Number of input operations via the file system. Note: This and `ru_oublock' do not include operations with the cache. */ - int ru_inblock; + long ru_inblock; /* Number of output operations via the file system. */ - int ru_oublock; + long ru_oublock; /* Number of IPC messages sent. */ - int ru_msgsnd; + long ru_msgsnd; /* Number of IPC messages received. */ - int ru_msgrcv; + long ru_msgrcv; /* Number of signals delivered. */ - int ru_nsignals; + long ru_nsignals; /* Number of voluntary context switches, i.e. because the process gave up the process before it had to (usually to wait for some resource to be available). */ - int ru_nvcsw; + long ru_nvcsw; /* Number of involuntary context switches, i.e. a higher priority process became runnable or the current process used up its time slice. */ - int ru_nivcsw; + long ru_nivcsw; }; /* Return resource usage information on process indicated by WHO diff -ruN glibc-1.06/setjmp/Makefile glibc-1.07/setjmp/Makefile --- glibc-1.06/setjmp/Makefile Wed Sep 9 18:50:32 1992 +++ glibc-1.07/setjmp/Makefile Mon May 24 16:55:39 1993 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993 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 @@ -23,7 +23,7 @@ headers := setjmp.h jmp_buf.h -routines := setjmp sigjmp_save _setjmp \ +routines := setjmp sigjmp _setjmp \ longjmp _longjmp __longjmp siglongjmp tests := tst-setjmp diff -ruN glibc-1.06/setjmp/TAGS glibc-1.07/setjmp/TAGS --- glibc-1.06/setjmp/TAGS Thu May 13 00:03:54 1993 +++ glibc-1.07/setjmp/TAGS Sat Dec 25 03:27:44 1993 @@ -22,7 +22,7 @@ ../sysdeps/alpha/setjmp.S,25 ENTRY (__setjmp)24,1007 -sigjmp_save.c,29 +sigjmp.c,29 DEFUN(__sigjmp_save,28,1019 _setjmp.c,49 @@ -29,15 +29,15 @@ #define _BSD_SOURCE19,831 DEFUN(_setjmp,28,938 -longjmp.c,28 - DEFUN(longjmp,26,965 +longjmp.c,29 + DEFUN(longjmp,29,1003 -_longjmp.c,56 +_longjmp.c,57 #define _BSD_SOURCE19,831 - DEFUN(_longjmp,28,989 + DEFUN(_longjmp,31,1027 ../sysdeps/m68k/__longjmp.c,25 -DEFUN(__longjmp,31,1116 +DEFUN(__longjmp,31,1122 ../sysdeps/stub/__longjmp.c,25 DEFUN(__longjmp,28,1016 @@ -56,7 +56,7 @@ DEFUN(__longjmp,34,1215 ../sysdeps/mips/__longjmp.c,25 -DEFUN(__longjmp,31,1034 +DEFUN(__longjmp,31,1027 ../sysdeps/alpha/__longjmp.c,43 #define jmp_buf 25,962 @@ -65,22 +65,21 @@ siglongjmp.c,26 DEFUN(siglongjmp,30,1102 -setjmp.h,415 -#define _SETJMP_H 25,913 -#define __NORETURN 33,1077 -#define __NORETURN35,1129 -#define __need_sigset_t45,1309 - } sigjmp_buf[54,1598 -#define sigsetjmp(60,1813 -#define sigsetjmp(66,2083 -typedef sigjmp_buf jmp_buf;83,2680 -typedef __jmp_buf jmp_buf;88,2791 -#define longjmp(99,3124 -#define setjmp(105,3353 -#define setjmp(120,3682 -#define longjmp(123,3745 -#define _setjmp(126,3824 -#define _setjmp(131,3943 +setjmp.h,386 +#define _SETJMP_H 25,919 +#define __need_sigset_t35,1079 + } sigjmp_buf[44,1368 +#define sigsetjmp(50,1583 +#define sigsetjmp(56,1853 +typedef sigjmp_buf jmp_buf;73,2450 +typedef __jmp_buf jmp_buf;78,2561 +#define longjmp(89,2894 +#define setjmp(95,3123 +#define setjmp(110,3452 +#define longjmp(113,3515 +#define _setjmp(116,3594 +#define _setjmp(121,3713 +#define _longjmp(124,3795 ../sysdeps/m68k/jmp_buf.h,22 } __jmp_buf[19,510 @@ -98,8 +97,8 @@ } __jmp_buf[7,114 ../sysdeps/mips/jmp_buf.h,46 - } __jmp_buf[42,1348 -#define JB_PC 46,1436 + } __jmp_buf[42,1345 +#define JB_PC 46,1433 ../sysdeps/alpha/jmp_buf.h,23 } __jmp_buf[46,1853 diff -ruN glibc-1.06/setjmp/_longjmp.c glibc-1.07/setjmp/_longjmp.c --- glibc-1.06/setjmp/_longjmp.c Fri Apr 10 17:53:13 1992 +++ glibc-1.07/setjmp/_longjmp.c Thu Dec 2 18:32:58 1993 @@ -24,5 +24,8 @@ #undef _longjmp +#ifndef HAVE_GNU_LD +__NORETURN +#endif function_alias_void(_longjmp, siglongjmp, (env, val), DEFUN(_longjmp, (env, val), CONST jmp_buf env AND int val)) diff -ruN glibc-1.06/setjmp/longjmp.c glibc-1.07/setjmp/longjmp.c --- glibc-1.06/setjmp/longjmp.c Sat Mar 14 22:53:43 1992 +++ glibc-1.07/setjmp/longjmp.c Thu Dec 2 18:33:00 1993 @@ -22,5 +22,8 @@ #undef longjmp +#ifndef HAVE_GNU_LD +__NORETURN +#endif function_alias_void(longjmp, __longjmp, (env, val), DEFUN(longjmp, (env, val), CONST jmp_buf env AND int val)) diff -ruN glibc-1.06/setjmp/setjmp.h glibc-1.07/setjmp/setjmp.h --- glibc-1.06/setjmp/setjmp.h Mon Nov 16 12:20:30 1992 +++ glibc-1.07/setjmp/setjmp.h Sun Jul 25 22:20:08 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -27,16 +27,6 @@ __BEGIN_DECLS -#ifndef __NORETURN -#ifdef __GNUC__ -/* The `volatile' keyword tells GCC that a function never returns. */ -#define __NORETURN __volatile -#else /* Not GCC. */ -#define __NORETURN -#endif /* GCC. */ -#endif /* __NORETURN not defined. */ - - /* Get the machine-dependent definition of `__jmp_buf'. */ #include @@ -129,6 +119,9 @@ /* `setjmp' and `_setjmp' are the same. */ #define _setjmp(env) setjmp (env) + +/* `longjmp' and `_longjmp' are the same. */ +#define _longjmp(env, val) longjmp ((env), (val)) #endif /* Favor BSD. */ diff -ruN glibc-1.06/setjmp/sigjmp.c glibc-1.07/setjmp/sigjmp.c --- glibc-1.06/setjmp/sigjmp.c +++ glibc-1.07/setjmp/sigjmp.c Mon Nov 16 12:19:03 1992 @@ -0,0 +1,33 @@ +/* Copyright (C) 1992 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 +#include +#include +#include + +/* This function is called by the `sigsetjmp' macro + before doing a `__setjmp' on ENV[0].__jmpbuf. */ + +void +DEFUN(__sigjmp_save, (env, savemask), sigjmp_buf env AND int savemask) +{ + env[0].__mask_was_saved = (savemask && + sigprocmask (SIG_BLOCK, (sigset_t *) NULL, + &env[0].__saved_mask) == 0); +} diff -ruN glibc-1.06/setjmp/sigjmp_save.c glibc-1.07/setjmp/sigjmp_save.c --- glibc-1.06/setjmp/sigjmp_save.c Mon Nov 16 12:19:03 1992 +++ glibc-1.07/setjmp/sigjmp_save.c @@ -1,33 +0,0 @@ -/* Copyright (C) 1992 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 -#include -#include -#include - -/* This function is called by the `sigsetjmp' macro - before doing a `__setjmp' on ENV[0].__jmpbuf. */ - -void -DEFUN(__sigjmp_save, (env, savemask), sigjmp_buf env AND int savemask) -{ - env[0].__mask_was_saved = (savemask && - sigprocmask (SIG_BLOCK, (sigset_t *) NULL, - &env[0].__saved_mask) == 0); -} diff -ruN glibc-1.06/signal/Makefile glibc-1.07/signal/Makefile --- glibc-1.06/signal/Makefile Thu Nov 5 20:37:38 1992 +++ glibc-1.07/signal/Makefile Mon Oct 25 15:57:53 1993 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993 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 @@ -29,7 +29,7 @@ sigpending sigsuspend \ sigblock sigsetmask sigpause sigvec \ __sigblock __sigstmsk __sigpause __sigvec \ - sigstack sigaltstack sigintr \ + sigstack sigaltstk sigintr \ sigempty sigfillset sigaddset sigdelset sigismem \ sigret __sigret \ gsignal ssignal diff -ruN glibc-1.06/signal/TAGS glibc-1.07/signal/TAGS --- glibc-1.06/signal/TAGS Fri May 21 17:35:21 1993 +++ glibc-1.07/signal/TAGS Sun Jan 16 01:16:33 1994 @@ -21,13 +21,20 @@ ../sysdeps/unix/bsd/killpg.S,24 SYSCALL (killpg,21,852 -../sysdeps/posix/killpg.c,79 -DEFUN(killpg,28,1037 -DEFUN(killpg, (pgrp, sig), int pgrp AND int sig)28,1037 +../sysdeps/posix/killpg.c,83 +DEFUN(killpg,28,1043 +DEFUN(killpg, (pgrp, sig), __pid_t pgrp AND int sig)28,1043 ../sysdeps/stub/killpg.c,22 -DEFUN(killpg,28,1037 +DEFUN(killpg,28,1043 +../sysdeps/unix/bsd/osf1/alpha/killpg.S,51 +#define SYS_killpg 22,886 +SYSCALL (killpg,24,921 + +../sysdeps/mach/hurd/killpg.c,22 +DEFUN(killpg,27,1040 + sigaction.c,32 DEFUN(sigaction,26,983 @@ -51,7 +58,7 @@ SYSCALL__ (sigaction,21,846 ../sysdeps/mach/hurd/__sigact.c,27 -DEFUN(__sigaction,27,1038 +DEFUN(__sigaction,27,1044 ../sysdeps/unix/bsd/__sigproc.c,29 DEFUN(__sigprocmask,29,1131 @@ -61,13 +68,13 @@ int how AND CONST sigset_t *set AND sigset_t *oset)29,1144 ../sysdeps/unix/sysv/sysv4/__sigproc.S,31 -SYSCALL__ (sigprocmask,21,860 +SYSCALL__ (sigprocmask,21,857 ../sysdeps/unix/sysv/sco3.2.4/__sigproc.S,31 SYSCALL__ (sigprocmask,21,846 ../sysdeps/mach/hurd/__sigproc.c,29 -DEFUN(__sigprocmask,28,1111 +DEFUN(__sigprocmask,29,1135 ../sysdeps/unix/__kill.S,24 SYSCALL__ (kill,21,852 @@ -75,8 +82,8 @@ ../sysdeps/stub/__kill.c,22 DEFUN(__kill,28,1093 -../sysdeps/mach/hurd/__kill.c,22 -DEFUN(__kill,28,1116 +../sysdeps/mach/hurd/__kill.c,16 +__kill 28,1123 ../sysdeps/stub/sigpending.c,72 DEFUN(sigpending,27,974 @@ -86,7 +93,7 @@ SYSCALL (sigpending,21,846 ../sysdeps/mach/hurd/sigpending.c,25 -DEFUN(sigpending,27,974 +DEFUN(sigpending,28,998 ../sysdeps/unix/bsd/sigsuspend.c,26 DEFUN(sigsuspend,29,1053 @@ -101,7 +108,7 @@ SYSCALL (sigsuspend,21,846 ../sysdeps/mach/hurd/sigsuspend.c,26 -DEFUN(sigsuspend,27,1019 +DEFUN(sigsuspend,28,1043 sigblock.c,31 DEFUN(sigblock,26,958 @@ -137,6 +144,10 @@ ../sysdeps/unix/bsd/bsd4.4/__sigstmsk.c,0 +../sysdeps/unix/bsd/osf1/alpha/__sigstmsk.S,61 +#define SYS_sigsetmask 22,886 +SYSCALL__ (sigsetmask,24,929 + ../sysdeps/unix/bsd/__sigpause.S,28 SYSCALL__ (sigpause,21,852 @@ -146,6 +157,10 @@ ../sysdeps/stub/__sigpause.c,25 DEFUN(__sigpause,24,891 +../sysdeps/unix/bsd/osf1/alpha/__sigpause.S,57 +#define SYS_sigpause 22,886 +SYSCALL__ (sigpause,24,925 + ../sysdeps/unix/bsd/__sigvec.S,26 SYSCALL__ (sigvec,21,852 @@ -160,13 +175,10 @@ ../sysdeps/unix/bsd/sun/__sigvec.S,29 PSEUDO (__raw_sigvec,23,895 -../sysdeps/unix/bsd/sequent/i386/__sigvec.S,120 +../sysdeps/unix/bsd/sequent/i386/__sigvec.S,70 call C_SYMBOL_NAME 31,1204 ENTRY (__sigvec)34,1260 pushl 36,1340 - pushl 37,1395 - pushl 38,1452 - DO_CALL 41,1613 ../sysdeps/unix/bsd/ultrix4/mips/__sigvec.S,29 PSEUDO (__raw_sigvec,23,895 @@ -173,6 +185,10 @@ ../sysdeps/unix/bsd/bsd4.4/__sigvec.c,0 +../sysdeps/unix/bsd/osf1/alpha/__sigvec.S,53 +#define SYS_sigvec 22,886 +SYSCALL__ (sigvec,24,921 + ../sysdeps/unix/bsd/sigstack.S,26 SYSCALL (sigstack,21,852 @@ -182,16 +198,14 @@ ../sysdeps/mach/hurd/sigstack.c,24 DEFUN(sigstack,27,1054 -../sysdeps/stub/sigaltstack.c,27 +../sysdeps/stub/sigaltstk.c,27 DEFUN(sigaltstack,26,1036 -../sysdeps/unix/bsd/bsd4.4/sigaltstack.S,29 +../sysdeps/unix/bsd/bsd4.4/sigaltstk.S,29 SYSCALL (sigaltstack,21,852 -../sysdeps/unix/sysv/sysv4/solaris2/sigaltstack.S,0 - -../sysdeps/mach/hurd/sigaltstack.c,27 -DEFUN(sigaltstack,27,1054 +../sysdeps/mach/hurd/sigaltstk.c,27 +DEFUN(sigaltstack,27,1060 ../sysdeps/posix/sigintr.c,28 DEFUN(siginterrupt,27,1075 @@ -230,8 +244,11 @@ SYSCALL__ (sigreturn,25,902 ../sysdeps/unix/bsd/ultrix4/mips/__sigret.S,26 -ENTRY(__sigreturn)21,864 +ENTRY(__sigreturn)21,857 +../sysdeps/unix/sysv/i386/__sigret.S,27 +ENTRY (__sigreturn)22,852 + ../sysdeps/unix/i386/__sigret.S,27 ENTRY (__sigreturn)22,858 @@ -241,32 +258,31 @@ ssignal.c,30 DEFUN(ssignal,26,974 -signal.h,666 -#define _SIGNAL_H 26,976 -#define __need_size_t32,1041 -typedef __sig_atomic_t sig_atomic_t;43,1419 -typedef void (*__sighandler_t)50,1613 -typedef void (*__sighandler_t) __P 50,1613 -#define sigmask(92,3088 -#define NSIG 101,3290 -typedef __sighandler_t sighandler_t;105,3334 -typedef __sigset_t sigset_t;115,3526 -#define __sigset_t_defined 116,3555 -#define sigemptyset(139,4240 -#define sigfillset(140,4284 -#define sigaddset(141,4327 -#define sigdelset(142,4381 -#define sigismember(143,4435 -struct sigvec176,5586 -#define SV_ONSTACK 186,5851 -#define SV_INTERRUPT 187,5922 -#define SV_RESETHAND 188,5987 -struct sigstack209,6902 -struct sigaltstack221,7303 +signal.h,633 +#define _SIGNAL_H 26,982 +#define __need_size_t32,1047 +typedef __sig_atomic_t sig_atomic_t;43,1425 +typedef void (*__sighandler_t) __P ((int)50,1619 +#define sigmask(92,3098 +#define NSIG 101,3300 +typedef __sighandler_t sighandler_t;105,3344 +typedef __sigset_t sigset_t;115,3536 +#define __sigset_t_defined 116,3565 +#define sigemptyset(139,4250 +#define sigfillset(140,4294 +#define sigaddset(141,4337 +#define sigdelset(142,4391 +#define sigismember(143,4445 +struct sigvec176,5596 +#define SV_ONSTACK 186,5861 +#define SV_INTERRUPT 187,5932 +#define SV_RESETHAND 188,5997 +struct sigstack209,6912 +struct sigaltstack221,7313 sys/signal.h,0 -../sysdeps/unix/bsd/signum.h,914 +../sysdeps/unix/bsd/signum.h,939 #define SIG_ERR 25,1008 #define SIG_DFL 26,1067 #define SIG_IGN 27,1127 @@ -301,32 +317,33 @@ #define SIGVTALRM 59,2661 #define SIGPROF 60,2720 #define SIGWINCH 61,2780 -#define SIGUSR1 62,2842 -#define SIGUSR2 63,2900 -#define _NSIG 67,2995 +#define SIGINFO 62,2842 +#define SIGUSR1 63,2900 +#define SIGUSR2 64,2958 +#define _NSIG 68,3053 ../sysdeps/stub/signum.h,518 -#define SIG_ERR 25,954 -#define SIG_DFL 27,1027 -#define SIG_IGN 29,1078 -#define SIGABRT 34,1151 -#define SIGFPE 35,1198 -#define SIGILL 36,1254 -#define SIGINT 37,1299 -#define SIGSEGV 38,1353 -#define SIGTERM 39,1405 -#define SIGHUP 42,1474 -#define SIGQUIT 43,1506 -#define SIGPIPE 44,1537 -#define SIGKILL 45,1575 -#define SIGALRM 46,1646 -#define SIGSTOP 47,1685 -#define SIGTSTP 48,1757 -#define SIGCONT 49,1798 -#define SIGCHLD 50,1834 -#define SIGTTIN 51,1889 -#define SIGTTOU 52,1954 -#define _NSIG 56,2055 +#define SIG_ERR 25,956 +#define SIG_DFL 26,1015 +#define SIG_IGN 27,1064 +#define SIGABRT 31,1134 +#define SIGFPE 32,1181 +#define SIGILL 33,1237 +#define SIGINT 34,1282 +#define SIGSEGV 35,1336 +#define SIGTERM 36,1388 +#define SIGHUP 39,1457 +#define SIGQUIT 40,1489 +#define SIGPIPE 41,1520 +#define SIGKILL 42,1558 +#define SIGALRM 43,1629 +#define SIGSTOP 44,1668 +#define SIGTSTP 45,1740 +#define SIGCONT 46,1781 +#define SIGCHLD 47,1817 +#define SIGTTIN 48,1872 +#define SIGTTOU 49,1937 +#define _NSIG 53,2038 ../sysdeps/unix/sysv/signum.h,612 #define SIG_ERR 25,992 @@ -356,44 +373,44 @@ #define _NSIG 55,2300 ../sysdeps/unix/sysv/sysv4/signum.h,938 -#define SIG_ERR 25,1005 -#define SIG_DFL 26,1043 -#define SIG_IGN 27,1080 -#define SIGHUP 31,1135 -#define SIGINT 32,1176 -#define SIGQUIT 33,1219 -#define SIGILL 34,1259 -#define SIGABRT 35,1312 -#define SIGTRAP 36,1357 -#define SIGIOT 37,1403 -#define SIGEMT 38,1438 -#define SIGFPE 39,1473 -#define SIGKILL 40,1531 -#define SIGBUS 41,1584 -#define SIGSEGV 42,1621 -#define SIGSYS 43,1679 -#define SIGPIPE 44,1731 -#define SIGALRM 45,1779 -#define SIGTERM 46,1827 -#define SIGUSR1 47,1874 -#define SIGUSR2 48,1932 -#define SIGCHLD 49,1990 -#define SIGCLD 50,2051 -#define SIGPWR 51,2110 -#define SIGWINCH 52,2154 -#define SIGURG 53,2201 -#define SIGIO 54,2253 -#define SIGPOLL 55,2301 -#define SIGSTOP 56,2351 -#define SIGTSTP 57,2405 -#define SIGCONT 58,2455 -#define SIGTTIN 59,2500 -#define SIGTTOU 60,2561 -#define SIGVTALRM 61,2621 -#define SIGPROF 62,2670 -#define SIGXCPU 63,2720 -#define SIGXFSZ 64,2767 -#define _NSIG 68,2857 +#define SIG_ERR 25,1002 +#define SIG_DFL 26,1040 +#define SIG_IGN 27,1077 +#define SIGHUP 31,1132 +#define SIGINT 32,1173 +#define SIGQUIT 33,1216 +#define SIGILL 34,1256 +#define SIGABRT 35,1309 +#define SIGTRAP 36,1354 +#define SIGIOT 37,1400 +#define SIGEMT 38,1435 +#define SIGFPE 39,1470 +#define SIGKILL 40,1528 +#define SIGBUS 41,1581 +#define SIGSEGV 42,1618 +#define SIGSYS 43,1676 +#define SIGPIPE 44,1728 +#define SIGALRM 45,1776 +#define SIGTERM 46,1824 +#define SIGUSR1 47,1871 +#define SIGUSR2 48,1929 +#define SIGCHLD 49,1987 +#define SIGCLD 50,2048 +#define SIGPWR 51,2107 +#define SIGWINCH 52,2151 +#define SIGURG 53,2198 +#define SIGIO 54,2250 +#define SIGPOLL 55,2298 +#define SIGSTOP 56,2348 +#define SIGTSTP 57,2402 +#define SIGCONT 58,2452 +#define SIGTTIN 59,2497 +#define SIGTTOU 60,2558 +#define SIGVTALRM 61,2618 +#define SIGPROF 62,2667 +#define SIGXCPU 63,2717 +#define SIGXFSZ 64,2764 +#define _NSIG 68,2854 ../sysdeps/stub/sigcontext.h,25 struct sigcontext20,880 @@ -405,7 +422,7 @@ struct sigcontext20,899 ../sysdeps/unix/bsd/ultrix4/mips/sigcontext.h,25 -struct sigcontext21,923 +struct sigcontext21,916 ../sysdeps/mach/hurd/i386/sigcontext.h,530 struct sigcontext23,992 @@ -434,6 +451,16 @@ #define SIG_BLOCK 48,1794 #define SIG_UNBLOCK 49,1836 #define SIG_SETMASK 50,1882 + +../sysdeps/unix/bsd/osf1/sigaction.h,223 +struct sigaction21,991 +#define SA_ONSTACK 35,1242 +#define SA_RESTART 36,1301 +#define SA_DISABLE 37,1371 +#define SA_NOCLDSTOP 39,1440 +#define SIG_BLOCK 43,1566 +#define SIG_UNBLOCK 44,1608 +#define SIG_SETMASK 45,1654 ../sysdeps/unix/sysv/minix/sigaction.h,366 struct sigaction20,905 diff -ruN glibc-1.06/signal/signal.h glibc-1.07/signal/signal.h --- glibc-1.06/signal/signal.h Wed Nov 18 15:47:56 1992 +++ glibc-1.07/signal/signal.h Thu Oct 21 15:50:57 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -65,7 +65,7 @@ /* Send SIG to all processes in process group PGRP. If PGRP is zero, send SIG to all processes in the current process's process group. */ -extern int killpg __P ((int __pgrp, int __sig)); +extern int killpg __P ((__pid_t __pgrp, int __sig)); #endif /* Use BSD. */ /* Raise signal SIG, i.e., send SIG to yourself. */ diff -ruN glibc-1.06/socket/TAGS glibc-1.07/socket/TAGS --- glibc-1.06/socket/TAGS Thu May 13 01:59:53 1993 +++ glibc-1.07/socket/TAGS Sat Dec 25 03:31:00 1993 @@ -9,7 +9,7 @@ #define socket 1,0 ../sysdeps/mach/hurd/accept.c,22 -DEFUN(accept,30,1218 +DEFUN(accept,30,1224 ../sysdeps/unix/inet/bind.S,22 SYSCALL (bind,21,852 @@ -86,6 +86,10 @@ ../sysdeps/stub/recv.c,19 DEFUN(recv,26,985 +../sysdeps/unix/bsd/osf1/alpha/recv.S,47 +#define SYS_recv 22,881 +SYSCALL (recv,24,912 + ../sysdeps/unix/inet/recvfrom.S,26 SYSCALL (recvfrom,21,852 @@ -104,6 +108,10 @@ ../sysdeps/stub/send.c,19 DEFUN(send,25,968 +../sysdeps/unix/bsd/osf1/alpha/send.S,47 +#define SYS_send 22,881 +SYSCALL (send,24,912 + ../sysdeps/unix/inet/sendmsg.S,25 SYSCALL (sendmsg,21,852 @@ -144,7 +152,7 @@ ENTRY (socket)31,1282 ../sysdeps/mach/hurd/socket.c,22 -DEFUN(socket,28,1117 +DEFUN(socket,28,1123 ../sysdeps/unix/inet/socketpair.S,28 SYSCALL (socketpair,21,852 diff -ruN glibc-1.06/stdarg.h glibc-1.07/stdarg.h --- glibc-1.06/stdarg.h Mon May 17 13:54:42 1993 +++ glibc-1.07/stdarg.h Fri Nov 12 20:54:16 1993 @@ -40,6 +40,9 @@ #ifdef __alpha__ #include #else +#if defined (__H8300__) || defined (__H8300H__) +#include +#else /* Define __gnuc_va_list. */ @@ -72,7 +75,7 @@ /* We cast to void * and then to TYPE * because this avoids a warning about increasing the alignment requirement. */ -#if defined (__arm__) || defined (__i386__) || defined (__ns32000__) || defined (__vax__) +#if defined (__arm__) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) /* This is for little-endian machines; small args are padded upward. */ #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ @@ -87,6 +90,7 @@ #endif /* big-endian */ #endif /* _STDARG_H */ +#endif /* not h8300 */ #endif /* not alpha */ #endif /* not i960 */ #endif /* not sparc */ @@ -132,13 +136,13 @@ But on BSD NET2 we must not test or define or undef it. (Note that the comments in NET 2's ansi.h are incorrect for _VA_LIST_--see stdio.h!) */ -#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) +#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) /* The macro _VA_LIST is used in SCO Unix 3.2. */ #ifndef _VA_LIST /* The macro _VA_LIST_T_H is used in the Bull dpx2 */ #ifndef _VA_LIST_T_H #define _VA_LIST_T_H -#if !(defined (__BSD_NET2__) || defined (____386BSD____)) +#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__)) #define _VA_LIST_ #endif #define _VA_LIST diff -ruN glibc-1.06/stddef.h glibc-1.07/stddef.h --- glibc-1.06/stddef.h Thu May 20 18:13:19 1993 +++ glibc-1.07/stddef.h Fri Dec 3 06:47:17 1993 @@ -1,6 +1,7 @@ #ifndef _STDDEF_H #ifndef _STDDEF_H_ #ifndef _ANSI_STDDEF_H +#ifndef __STDDEF_H__ /* Any one of these symbols __need_* means that GNU libc wants us just to define one data type. So don't define @@ -11,6 +12,8 @@ #define _STDDEF_H_ /* snaroff@next.com says the NeXT needs this. */ #define _ANSI_STDDEF_H +/* Irix 5.1 needs this. */ +#define __STDDEF_H__ #endif #ifndef __sys_stdtypes_h @@ -109,6 +112,7 @@ #ifndef ___int_size_t_h #ifndef _GCC_SIZE_T #ifndef _SIZET_ +#ifndef __size_t #define _SIZE_T #define _SYS_SIZE_T_H #define _T_SIZE_ @@ -118,10 +122,14 @@ #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ +#define __size_t #ifndef __SIZE_TYPE__ #define __SIZE_TYPE__ long unsigned int #endif +#if !(defined (__GNUG__) && defined (size_t)) typedef __SIZE_TYPE__ size_t; +#endif /* !(defined (__GNUG__) && defined (size_t)) */ +#endif /* __size_t */ #endif /* _SIZET_ */ #endif /* _GCC_SIZE_T */ #endif /* ___int_size_t_h */ @@ -148,7 +156,9 @@ #ifndef _T_WCHAR #ifndef __WCHAR_T #ifndef _WCHAR_T_ +#ifndef _WCHAR_T_H #ifndef ___int_wchar_t_h +#ifndef __INT_WCHAR_T_H #ifndef _GCC_WCHAR_T #define _WCHAR_T #define _T_WCHAR_ @@ -155,7 +165,9 @@ #define _T_WCHAR #define __WCHAR_T #define _WCHAR_T_ +#define _WCHAR_T_H #define ___int_wchar_t_h +#define __INT_WCHAR_T_H #define _GCC_WCHAR_T #ifndef __WCHAR_TYPE__ #define __WCHAR_TYPE__ int @@ -175,6 +187,8 @@ #endif #endif #endif +#endif +#endif #undef __need_wchar_t #endif /* _STDDEF_H or __need_wchar_t. */ @@ -210,6 +224,7 @@ #endif /* _STDDEF_H was defined this time */ +#endif /* __STDDEF_H__ was not defined before */ #endif /* _ANSI_STDDEF_H was not defined before */ #endif /* _STDDEF_H_ was not defined before */ #endif /* _STDDEF_H was not defined before */ diff -ruN glibc-1.06/stdio/Makefile glibc-1.07/stdio/Makefile --- glibc-1.06/stdio/Makefile Fri May 14 18:21:26 1993 +++ glibc-1.07/stdio/Makefile Sun Jan 16 00:14:45 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -47,11 +47,63 @@ remove rename \ memstream obstream \ internals sysd-stdio pipestream stdio_init libc_fatal -routines := $(strip $(routines)) -aux := errlist siglist defs syms-stdio glue +# Several mpn functions from GNU MP are used by the printf_fp function. +mpn-routines := add_1 add_n addmul_1 cmp divmod divmod_1 udiv_qrnnd \ + lshift rshift mod_1 mul mul_1 mul_n sub_n submul_1 +mpn-headers = longlong.h gmp.h gmp-impl.h gmp-mparam.h asm.h + +routines := $(strip $(routines) $(mpn-routines)) dbl2mpn +aux := errlist siglist defs syms-stdio glue mp_clz_tab +distribute = $(mpn-headers) mpn-copy.mk + tests := tst-printf tstscanf test_rdwr test-popen tstgetln test-fseek \ - bug1 bug2 bug3 bug4 bug5 bug6 + bug1 bug2 bug3 bug4 bug5 bug6 temptest include ../Rules + + +ifdef gmp-srcdir + +gmp-srcdir := $(firstword $(filter-out ..//%,$(..)$(gmp-srcdir) $(gmp-srcdir))) + +# Copy the mpn source files we use from the GNU MP source directory. +# `gmp-srcdir' is set by doing `configure --with-gmp=DIR'. +# (Do not try this at home. You need an as yet unreleased version of GNU MP.) + +mpn-sysdep := $(addsuffix .c,$(mpn-routines)) \ + $(addsuffix .S,$(mpn-routines)) \ + $(addsuffix .s,$(mpn-routines)) gmp-mparam.h asm.h + +mpn-try := $(addprefix $(gmp-srcdir)/mpn/*/,$(mpn-sysdep)) +mpn-found := $(wildcard $(mpn-try)) +mpn-found := $(filter-out $(patsubst %.S,%.s,$(filter %.s,$(mpn-found))),\ + $(mpn-found)) + +include mpn-copy.mk +%.mk: gen-%; sh $< > $@ + +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/%,$(sysdep_dir)/%,$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/%: gmp2glibc.sed $(gmp-srcdir)/mpn/% + $(gmp2glibc) + +mpn-stuff = $(mpn-copy-sysdep) $(mpn-copy) + +# chmod so I don't edit them by mistake. +define gmp2glibc +sed -f $^ > $@-tmp +chmod a-w $@-tmp +mv -f $@-tmp $@ +endef + +mpn-copy = $(filter-out $(mpn-sysdep),$(mpn-headers) mp_clz_tab.c) +$(mpn-copy): %: gmp2glibc.sed $(gmp-srcdir)/%; $(gmp2glibc) + +.PHONY: copy-mpn clean-mpn +copy-mpn: $(mpn-stuff) +clean-mpn: + rm -f $(mpn-stuff) + +endif diff -ruN glibc-1.06/stdio/TAGS glibc-1.07/stdio/TAGS --- glibc-1.06/stdio/TAGS Wed May 19 20:41:35 1993 +++ glibc-1.07/stdio/TAGS Mon Jan 17 23:40:52 1994 @@ -21,7 +21,7 @@ DEFUN(clearerr,28,963 fileno.c,21 -DEFUN(fileno,28,971 +DEFUN(fileno,25,961 newstream.c,32 DEFUN_VOID(__newstream)31,1182 @@ -35,7 +35,7 @@ DEFUN(freopen,26,941 ../sysdeps/posix/fdopen.c,22 -DEFUN(fdopen,29,1072 +DEFUN(fdopen,29,1078 ../sysdeps/stub/fdopen.c,21 DEFUN(fdopen,25,953 @@ -47,7 +47,7 @@ DEFUN(fopencookie,28,1038 fmemopen.c,24 -DEFUN(fmemopen,43,1790 +DEFUN(fmemopen,43,1796 setbuf.c,22 DEFUN(setbuf,27,1004 @@ -86,29 +86,27 @@ #define LONGLONG 64,2007 #define LONGLONG 66,2040 DEFUN(vfprintf,71,2075 -#define RETURN 638,13960 -DEFUN(printf_unknown,641,13994 +#define RETURN 639,13961 +DEFUN(printf_unknown,642,13995 vprintf.c,23 -DEFUN(vprintf,30,1082 +DEFUN(vprintf,30,1088 -../sysdeps/m68k/fpu/printf_fp.c,116 -DEFUN(is_neg_68881,24,885 -DEFUN(is_neg_68881, (num), register LONG_DOUBLE num)24,885 -#define IS_NEGATIVE(36,1113 - -../sysdeps/ieee754/printf_fp.c,148 -#define outchar(25,932 -DEFUN(special_ieee754,41,1263 -#define HANDLE_SPECIAL(93,2170 -DEFUN(is_neg_ieee754,110,2542 -#define IS_NEGATIVE(118,2677 - -../sysdeps/generic/printf_fp.c,82 -#define outchar(36,1337 -frexp 49,1627 -ldexp 59,1788 -DEFUN(__printf_fp,77,1952 +printf_fp.c,347 +#define MPN_DUMP(38,1373 +#define MPN_DUMP(40,1419 +#define outchar(43,1451 +#define MPN_VAR(68,2263 +#define MPN_ASSIGN(69,2342 +#define MPN_POW2(71,2436 +#define MPN_GT(80,2770 +#define MPN_LT(82,2871 +#define MPN_GE(84,2972 +#define MPN_LE(86,3074 +#define MPN_EQ(88,3176 +#define MPN_NE(90,3255 +DEFUN(__printf_fp,94,3299 +mpn_dump 698,16792 reg-printf.c,40 DEFUN(register_printf_function,32,1189 @@ -146,7 +144,7 @@ DEFUN(dprintf,27,982 vdprintf.c,24 -DEFUN(vdprintf,30,1082 +DEFUN(vdprintf,30,1088 __vfscanf.c,218 #define HAVE_LONGLONG31,1038 @@ -237,10 +235,8 @@ __getline.c,24 DEFUN(__getline,27,973 -perror.c,77 -#define _sys_errlist 24,912 -#define _sys_nerr 25,945 -DEFUN(perror,32,1196 +perror.c,22 +DEFUN(perror,29,1176 psignal.c,52 #define _sys_siglist 25,914 @@ -247,18 +243,18 @@ DEFUN(psignal,36,1249 tmpfile.c,28 -DEFUN_VOID(tmpfile)28,1114 +DEFUN_VOID(tmpfile)28,1120 tmpnam.c,21 -DEFUN(tmpnam,27,962 +DEFUN(tmpnam,27,968 tempnam.c,23 -DEFUN(tempnam,35,1422 +DEFUN(tempnam,35,1428 ../sysdeps/posix/tempname.c,83 DEFUN(diraccess,32,1108 DEFUN(exists,40,1281 -DEFUN(__stdio_gen_tempname,80,2928 +DEFUN(__stdio_gen_tempname,80,3052 ../sysdeps/stub/tempname.c,36 DEFUN(__stdio_gen_tempname,30,1223 @@ -288,7 +284,7 @@ ../sysdeps/unix/sysv/isc2.2/rename.S,0 ../sysdeps/mach/hurd/rename.c,21 -DEFUN(rename,25,930 +DEFUN(rename,25,942 memstream.c,193 struct memstream_info24,913 @@ -308,59 +304,70 @@ DEFUN(obstack_vprintf,168,5064 DEFUN(obstack_printf,178,5297 -internals.c,307 -#define MIN_BUFSIZE 29,1100 -DEFUN(init_stream,34,1236 -DEFUN(init_stream, (fp), register FILE *fp)34,1236 -DEFUN(__stdio_check_offset,91,2785 -DEFUN(seek_to_target,134,3847 -DEFUN(flushbuf,178,4913 -DEFUN(fillbuf,358,10194 -DEFUN(__flshfp,473,13102 -DEFUN(__fillbf,554,15443 -DEFUN(__invalidate,638,17737 +internals.c,348 +DEFUN(__stdio_check_funcs,28,998 +DEFUN(__stdio_check_funcs, (fp), register FILE *fp)28,998 +#define MIN_BUFSIZE 49,1724 +DEFUN(init_stream,54,1860 +DEFUN(__stdio_check_offset,99,2931 +DEFUN(seek_to_target,142,3993 +DEFUN(flushbuf,186,5059 +DEFUN(fillbuf,367,10374 +DEFUN(__flshfp,483,13348 +DEFUN(__fillbf,564,15689 +DEFUN(__invalidate,648,17983 -../sysdeps/posix/sysd-stdio.c,144 +../sysdeps/posix/sysd-stdio.c,175 DEFUN(__stdio_read,32,1088 -DEFUN(__stdio_write,60,1604 -DEFUN(__stdio_seek,92,2273 -DEFUN(__stdio_close,106,2529 -DEFUN(__stdio_open,114,2691 +DEFUN(__stdio_write,60,1584 +DEFUN(__stdio_seek,92,2250 +DEFUN(__stdio_close,106,2504 +DEFUN(__stdio_fileno,115,2790 +DEFUN(__stdio_open,123,2941 -../sysdeps/stub/sysd-stdio.c,142 +../sysdeps/stub/sysd-stdio.c,172 DEFUN(__stdio_read,27,1014 DEFUN(__stdio_write,37,1257 DEFUN(__stdio_seek,48,1564 DEFUN(__stdio_close,58,1785 -DEFUN(__stdio_open,70,2092 +DEFUN(__stdio_fileno,68,2069 +DEFUN(__stdio_open,79,2321 ../sysdeps/unix/sysv/sysd-stdio.c,25 #define EINTR_REPEAT1,0 -../sysdeps/mach/hurd/sysd-stdio.c,231 -DEFUN(__stdio_read,31,1053 -DEFUN(__stdio_write,54,1552 -DEFUN(__stdio_seek,71,1990 -DEFUN(__stdio_close,83,2305 -DEFUN(__stdio_open,99,2727 -DEFUN(__stdio_errmsg,133,3435 -DEFUN(__stdio_gen_tempname,152,4022 -fork_stdio 179,4648 +../sysdeps/mach/hurd/sysd-stdio.c,232 +DEFUN(__stdio_read,34,1102 +DEFUN(__stdio_write,57,1601 +DEFUN(__stdio_seek,74,2039 +DEFUN(__stdio_close,86,2354 +DEFUN(__stdio_open,102,2776 +DEFUN(__stdio_errmsg,136,3484 +DEFUN(__stdio_gen_tempname,155,4071 +fork_stdio 182,4697 ../sysdeps/unix/pipestream.c,23 #define NO_WAITPID1,0 -../sysdeps/posix/pipestream.c,115 -#define SH_PATH 30,1036 -#define SH_NAME 31,1083 -struct child34,1173 -DEFUN(popen,46,1555 -DEFUN(pclose,155,4335 +../sysdeps/posix/pipestream.c,271 +#define SH_PATH 30,1042 +#define SH_NAME 31,1089 +struct child34,1179 +#define FUNC(45,1495 +#define readdecl 55,1849 +#define writedecl 57,1957 +#define seekdecl 59,2073 +#define closedecl 61,2172 +#define filenodecl 63,2229 +DEFUN(popen,72,2513 +DEFUN(pclose,191,5580 ../sysdeps/stub/pipestream.c,43 -DEFUN(popen,29,1037 -DEFUN(pclose,44,1393 +DEFUN(popen,29,1043 +DEFUN(pclose,44,1399 +../sysdeps/unix/sysv/sysv4/pipestream.c,0 + ../sysdeps/posix/stdio_init.c,35 DEFUN(__stdio_init_stream,30,1148 @@ -368,14 +375,14 @@ DEFUN(__stdio_init_stream,27,1071 ../sysdeps/mach/hurd/stdio_init.c,222 -struct mapped24,910 -DEFUN(get_it,44,1383 -DEFUN(release_it,81,2082 -DEFUN(mapped_close,102,2542 -DEFUN(mapped_seek,131,3293 -DEFUN(mapped_input,199,4388 -DEFUN(mapped_output,325,7740 -DEFUN(__stdio_init_stream,421,10326 +struct mapped27,954 +DEFUN(get_it,47,1427 +DEFUN(release_it,84,2126 +DEFUN(mapped_close,105,2586 +DEFUN(mapped_seek,134,3337 +DEFUN(mapped_input,202,4432 +DEFUN(mapped_output,328,7784 +DEFUN(__stdio_init_stream,424,10370 ../sysdeps/posix/libc_fatal.c,27 DEFUN(__libc_fatal,26,939 @@ -383,11 +390,219 @@ ../sysdeps/stub/libc_fatal.c,27 DEFUN(__libc_fatal,25,919 +../sysdeps/generic/add_1.c,44 +#define __mpn_add_1 1,0 +__mpn_add_1 9,119 + +../sysdeps/generic/add_n.c,21 +__mpn_add_n 30,1127 + +../sysdeps/i386/add_n.S,28 +ENTRY (__mpn_add_n)34,1230 + +../sysdeps/m68k/m68020/add_n.S,13 +LAB(40,1260 + +../sysdeps/m88k/m88100/add_n.S,53 +ENTRY (__mpn_add_n)37,1251 + or r12,r0,lo16(46,1461 + +../sysdeps/sparc/add_n.S,100 +! License, or 15,608 +ENTRY (__mpn_add_n)36,1246 +Lzero: sub %g1,1,%g1 ! add 0 + 16r limbs 66,1809 + +../sysdeps/generic/addmul_1.c,24 +__mpn_addmul_1 33,1360 + +../sysdeps/i386/addmul_1.S,170 +#define res_ptr 36,1237 +#define s1_ptr 37,1257 +#define size 38,1276 +#define s2_limb 39,1293 +ENTRY (__mpn_addmul_1)41,1314 + INSN2(mov,l ,R(res_ptr),MEM_DISP(48,1431 + +../sysdeps/m68k/m68020/addmul_1.S,109 +LAB(40,1264 +#define res_ptr 42,1286 +#define s1_ptr 43,1305 +#define size 44,1323 +#define s2_limb 45,1339 + +../sysdeps/sparc/addmul_1.S,73 +! License, or 15,614 +ENTRY (__mpn_addmul_1)36,1249 + ! and put 38,1332 + +../sysdeps/sparc/sparc8/addmul_1.S,53 +! License, or 15,617 +ENTRY (__mpn_addmul_1)36,1252 + +../sysdeps/generic/cmp.c,19 +__mpn_cmp 35,1320 + +../sysdeps/generic/divmod.c,22 +__mpn_divmod 43,1745 + +../sysdeps/generic/divmod_1.c,120 +#define UMUL_TIME 36,1419 +#define UDIV_TIME 40,1465 +#define UDIV_NEEDS_NORMALIZATION 45,1563 +__mpn_divmod_1 50,1627 + +../sysdeps/stub/udiv_qrnnd.c,0 + +../sysdeps/sparc/udiv_qrnnd.S,47 +! Copyright 3,63 +ENTRY (__udiv_qrnnd)38,1250 + +../sysdeps/sparc/sparc8/udiv_qrnnd.S,87 +! License, or 14,563 +ENTRY (__udiv_qrnnd)34,1187 + or %g2,%o2,%o2 ! %o2 = lo(96,2127 + +../sysdeps/alpha/udiv_qrnnd.S,139 +#define cnt 12,200 +#define tmp 13,215 +#define rem_ptr 14,230 +#define n1 15,250 +#define n0 16,265 +#define d 17,280 +#define qb 18,294 + +../sysdeps/generic/lshift.c,22 +__mpn_lshift 40,1510 + +../sysdeps/i386/lshift.S,29 +ENTRY (__mpn_lshift)34,1148 + +../sysdeps/generic/rshift.c,22 +__mpn_rshift 39,1454 + +../sysdeps/i386/rshift.S,29 +ENTRY (__mpn_rshift)34,1148 + +../sysdeps/generic/mod_1.c,117 +#define UMUL_TIME 35,1352 +#define UDIV_TIME 39,1398 +#define UDIV_NEEDS_NORMALIZATION 44,1496 +__mpn_mod_1 49,1560 + +../sysdeps/generic/mul.c,56 +#define KARATSUBA_THRESHOLD 46,1821 +__mpn_mul 51,1881 + +../sysdeps/sparc/mul.S,29 +FUNC(14,273 + ! %o1 67,1640 + +../sysdeps/generic/mul_1.c,21 +__mpn_mul_1 31,1186 + +../sysdeps/i386/mul_1.S,167 +#define res_ptr 36,1236 +#define s1_ptr 37,1256 +#define size 38,1275 +#define s2_limb 39,1292 +ENTRY (__mpn_mul_1)41,1313 + INSN2(mov,l ,R(res_ptr),MEM_DISP(48,1427 + +../sysdeps/m68k/m68020/mul_1.S,109 +LAB(40,1260 +#define res_ptr 42,1279 +#define s1_ptr 43,1298 +#define size 44,1316 +#define s2_limb 45,1332 + +../sysdeps/m88k/m88100/mul_1.S,105 +; With these techniques the 46,1823 +ENTRY (__mpn_mul_1)52,2030 + mask r7,r5,0xffff ; r7 = lo(62,2265 + +../sysdeps/m88k/m88110/mul_1.S,28 +ENTRY (__mpn_mul_1)31,1014 + +../sysdeps/sparc/mul_1.S,71 +! License, or 15,613 +ENTRY (__mpn_mul_1)99,1970 + ! and put 101,2050 + +../sysdeps/sparc/sparc8/mul_1.S,50 +! License, or 15,618 +ENTRY (__mpn_mul_1)36,1253 + +../sysdeps/generic/mul_n.c,206 +#define KARATSUBA_THRESHOLD 40,1626 +#define KARATSUBA_THRESHOLD 46,1785 +___mpn_mul_n_basecase 65,2257 +___mpn_mul_n 116,3354 +___mpn_sqr_n_basecase 243,7249 +___mpn_sqr_n 293,8309 +__mpn_mul_n 391,11422 + +../sysdeps/generic/sub_n.c,21 +__mpn_sub_n 30,1132 + +../sysdeps/i386/sub_n.S,28 +ENTRY (__mpn_sub_n)35,1231 + +../sysdeps/m68k/m68020/sub_n.S,13 +LAB(40,1272 + +../sysdeps/m88k/m88100/sub_n.S,53 +ENTRY (__mpn_sub_n)37,1263 + or r12,r0,lo16(46,1473 + +../sysdeps/sparc/sub_n.S,100 +! License, or 15,620 +ENTRY (__mpn_sub_n)36,1258 +Lzero: sub %g1,1,%g1 ! add 0 + 16r limbs 66,1821 + +../sysdeps/generic/submul_1.c,24 +__mpn_submul_1 33,1370 + +../sysdeps/i386/submul_1.S,170 +#define res_ptr 36,1244 +#define s1_ptr 37,1264 +#define size 38,1283 +#define s2_limb 39,1300 +ENTRY (__mpn_submul_1)41,1321 + INSN2(mov,l ,R(res_ptr),MEM_DISP(48,1438 + +../sysdeps/m68k/m68020/submul_1.S,109 +LAB(40,1271 +#define res_ptr 42,1293 +#define s1_ptr 43,1312 +#define size 44,1330 +#define s2_limb 45,1346 + +../sysdeps/sparc/submul_1.S,73 +! License, or 15,621 +ENTRY (__mpn_submul_1)36,1256 + ! and put 38,1339 + +../sysdeps/sparc/sparc8/submul_1.S,53 +! License, or 15,624 +ENTRY (__mpn_submul_1)36,1259 + +../sysdeps/ieee754/dbl2mpn.c,30 +__mpn_extract_double 29,1146 + +../sysdeps/stub/dbl2mpn.c,30 +__mpn_extract_double 27,1096 + ../hp300/errlist.c,53 #define _sys_nerr 8,115 #define _sys_errlist 9,142 -../sysdeps/stub/errlist.c,0 +../sysdeps/stub/errlist.c,55 +#define _sys_errlist 23,894 +#define _sys_nerr 24,927 + +../sysdeps/mach/hurd/errlist.c,52 +#define _sys_nerr 4,83 +#define _sys_errlist 5,110 ../hp300/siglist.c,27 #define _sys_siglist 5,63 @@ -402,14 +617,14 @@ #define BUFFERED 31,1094 #define UNBUFFERED 32,1113 #define stdstream(33,1134 -DEFUN_VOID(_cleanup)68,2527 +DEFUN_VOID(_cleanup)68,2522 ../sysdeps/stub/defs.c,29 DEFUN_VOID(_cleanup)41,1572 ../sysdeps/mach/hurd/defs.c,49 -init_stdio 34,1101 -DEFUN_VOID(_cleanup)51,1742 +init_stdio 37,1145 +DEFUN_VOID(_cleanup)54,1840 syms-stdio.c,0 @@ -420,7 +635,9 @@ DEFUN(_flsbuf,98,3149 int c AND unix_FILE *file)99,3175 -stdio.h,1864 +mp_clz_tab.c,0 + +stdio.h,1328 #define _STDIO_H 26,934 #define __need_size_t31,991 #define __need_NULL32,1013 @@ -430,55 +647,41 @@ #define __FILE_defined 51,1330 typedef __off_t fpos_t;58,1473 } __io_mode;70,1970 -typedef __ssize_t __io_read 77,2149 -typedef __ssize_t __io_read __P 77,2149 -typedef __ssize_t __io_read __P ((__ptr_t 77,2149 -typedef __ssize_t __io_read __P ((__ptr_t __cookie,77,2149 -typedef __ssize_t __io_write 86,2619 -typedef __ssize_t __io_write __P 86,2619 -typedef __ssize_t __io_write __P ((__ptr_t 86,2619 -typedef __ssize_t __io_write __P ((__ptr_t __cookie,86,2619 -typedef int __io_seek 95,2993 -typedef int __io_seek __P 95,2993 -typedef int __io_seek __P ((__ptr_t 95,2993 -typedef int __io_seek __P ((__ptr_t __cookie,95,2993 -typedef int __io_close 98,3087 -typedef int __io_close __P 98,3087 -typedef int __io_close __P ((__ptr_t 98,3087 -typedef int __io_close __P ((__ptr_t __cookie)98,3087 -} __io_functions;107,3400 -} __room_functions;116,3675 -#define __NORETURN 136,4371 -#define __NORETURN138,4423 -struct __stdio_file147,4654 -#define __validfp(190,6615 -#define __clearerr(196,6885 -#define _IOFBF 208,7343 -#define _IOLBF 209,7386 -#define _IONBF 210,7429 -#define BUFSIZ 214,7500 -#define EOF 219,7613 -#define SEEK_SET 224,7731 -#define SEEK_CUR 225,7786 -#define SEEK_END 226,7840 -#define P_tmpdir 231,7964 -#define vprintf(364,13112 -#define vfscanf(413,14945 -#define vscanf(414,15009 -#define vsscanf(415,15071 -#define __getc(434,15624 -#define getc(440,15885 -#define getchar(443,15942 -#define __putc(457,16301 -#define putc(464,16625 -#define putchar(469,16844 -#define getdelim(508,18216 -#define getline(509,18277 -#define __getline(510,18328 -#define puts(521,18647 -#define feof(558,19926 -#define ferror(559,19970 -#define fileno(587,20726 + size_t __nbytes)78,2217 + size_t __n)87,2702 +typedef int __io_seek_fn __P ((__ptr_t __cookie, fpos_t *__pos, int __w)95,3005 +typedef int __io_close_fn __P ((__ptr_t __cookie)98,3102 +typedef int __io_fileno_fn __P ((__ptr_t __cookie)102,3283 +} __io_functions;112,3671 +} __room_functions;121,3946 +struct __stdio_file147,4828 +#define __validfp(189,6740 +#define __clearerr(196,7034 +#define _IOFBF 208,7492 +#define _IOLBF 209,7535 +#define _IONBF 210,7578 +#define BUFSIZ 214,7649 +#define EOF 219,7762 +#define SEEK_SET 224,7880 +#define SEEK_CUR 225,7935 +#define SEEK_END 226,7989 +#define P_tmpdir 231,8113 +#define vprintf(364,13268 +#define vfscanf(413,15101 +#define vscanf(414,15165 +#define vsscanf(415,15227 +#define __getc(434,15780 +#define getc(440,16041 +#define getchar(443,16098 +#define __putc(457,16457 +#define putc(464,16781 +#define putchar(469,17000 +#define getdelim(508,18372 +#define getline(509,18433 +#define __getline(510,18484 +#define puts(521,18803 +#define feof(558,20082 +#define ferror(559,20126 ../hp300/stdio_lim.h,145 #define L_tmpnam 1,0 @@ -496,23 +699,16 @@ #define FOPEN_MAX 5,77 #define FILENAME_MAX 6,98 -printf.h,810 -#define _PRINTF_H 21,856 -#define __need_FILE26,914 -#define __need_size_t28,953 -struct printf_info34,1040 -typedef int printf_function 57,1785 -typedef int printf_function __P 57,1785 -typedef int printf_function __P ((FILE 57,1785 -typedef int printf_function __P ((FILE * __stream,57,1785 -typedef int printf_arginfo_function 60,1905 -typedef int printf_arginfo_function __P 60,1905 -typedef int printf_arginfo_function __P ((__const 60,1905 -typedef int printf_arginfo_function __P ((__const struct printf_info 60,1905 -typedef int printf_arginfo_function __P ((__const struct printf_info * __info,60,1905 -#define PA_FLAG_MASK 103,3557 -#define PA_FLAG_LONG_LONG 104,3586 -#define PA_FLAG_LONG_DOUBLE 105,3621 -#define PA_FLAG_LONG 106,3667 -#define PA_FLAG_SHORT 107,3698 -#define PA_FLAG_PTR 108,3731 +printf.h,371 +#define _PRINTF_H 21,862 +#define __need_FILE26,920 +#define __need_size_t28,959 +struct printf_info34,1046 + va_list * __args)59,1885 + int *__argtypes)62,2009 +#define PA_FLAG_MASK 103,3565 +#define PA_FLAG_LONG_LONG 104,3594 +#define PA_FLAG_LONG_DOUBLE 105,3629 +#define PA_FLAG_LONG 106,3675 +#define PA_FLAG_SHORT 107,3706 +#define PA_FLAG_PTR 108,3739 diff -ruN glibc-1.06/stdio/__vfscanf.c glibc-1.07/stdio/__vfscanf.c --- glibc-1.06/stdio/__vfscanf.c Mon Apr 5 21:31:23 1993 +++ glibc-1.07/stdio/__vfscanf.c Thu Jan 6 01:31:34 1994 @@ -73,6 +73,8 @@ char not_in; /* Base for integral numbers. */ int base; + /* Signedness for integral numbers. */ + int number_signed; /* Integral holding variables. */ long int num; unsigned long int unum; @@ -315,21 +317,29 @@ case 'x': /* Hexadecimal integer. */ case 'X': /* Ditto. */ base = 16; + number_signed = 0; goto number; case 'o': /* Octal integer. */ base = 8; + number_signed = 0; goto number; - case 'u': /* Decimal integer. */ - case 'd': /* Ditto. */ + case 'u': /* Unsigned decimal integer. */ base = 10; + number_signed = 0; goto number; + case 'd': /* Signed decimal integer. */ + base = 10; + number_signed = 1; + goto number; + case 'i': /* Generic number. */ base = 0; + number_signed = 1; - number:; + number: if (c == EOF) input_error(); @@ -387,24 +397,43 @@ /* Convert the number. */ *w = '\0'; - num = strtol(work, &w, base); + if (number_signed) + num = strtol (work, &w, base); + else + unum = strtoul (work, &w, base); if (w == work) - conv_error(); + conv_error (); if (do_assign) { - if (is_longlong) - *va_arg(arg, LONGLONG int *) = num; - else if (is_long) - *va_arg(arg, long int *) = num; - else if (is_short) - *va_arg(arg, short int *) = (short int) num; + if (! number_signed) + { + if (is_longlong) + *va_arg (arg, unsigned LONGLONG int *) = unum; + else if (is_long) + *va_arg (arg, unsigned long int *) = unum; + else if (is_short) + *va_arg (arg, unsigned short int *) + = (unsigned short int) unum; + else + *va_arg(arg, unsigned int *) = (unsigned int) unum; + } else - *va_arg(arg, int *) = (int) num; + { + if (is_longlong) + *va_arg(arg, LONGLONG int *) = num; + else if (is_long) + *va_arg(arg, long int *) = num; + else if (is_short) + *va_arg(arg, short int *) = (short int) num; + else + *va_arg(arg, int *) = (int) num; + } ++done; } break; +#ifndef MIB_HACKS case 'e': /* Floating-point numbers. */ case 'E': case 'f': @@ -469,6 +498,7 @@ ++done; } break; +#endif /* MIB_HACKS */ case '[': /* Character class. */ STRING_ARG; diff -ruN glibc-1.06/stdio/fileno.c glibc-1.07/stdio/fileno.c --- glibc-1.06/stdio/fileno.c Wed Jun 12 14:08:37 1991 +++ glibc-1.07/stdio/fileno.c Wed May 26 18:29:32 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -20,24 +20,25 @@ #include #include -#undef fileno - - /* Return the system file descriptor associated with STREAM. */ int -DEFUN(fileno, (stream), CONST FILE *stream) +DEFUN(fileno, (stream), FILE *stream) { - if (!__validfp(stream)) + if (! __validfp (stream)) { errno = EINVAL; return -1; } - if (stream->__cookie != &stream->__fileno) + if (stream->__io_funcs.__fileno == NULL) { +#ifdef EOPNOTSUPP + errno = EOPNOTSUPP; +#else errno = ENOSYS; +#endif return -1; } - return stream->__fileno; + return (*stream->__io_funcs.__fileno) (stream->__cookie); } diff -ruN glibc-1.06/stdio/fmemopen.c glibc-1.07/stdio/fmemopen.c --- glibc-1.06/stdio/fmemopen.c Wed Jul 1 01:08:57 1992 +++ glibc-1.07/stdio/fmemopen.c Thu May 27 17:49:10 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -64,6 +64,8 @@ stream->__io_funcs.__close = NULL; /* Can't seek outside the buffer. */ stream->__io_funcs.__seek = NULL; + /* There is no associated file descriptor to fetch. */ + stream->__io_funcs.__fileno = NULL; stream->__seen = 1; @@ -88,8 +90,7 @@ (stream->__mode.__read ? stream->__bufsize : 0)); stream->__put_limit = (stream->__buffer + (stream->__mode.__write ? stream->__bufsize : 0)); - stream->__fileno = -1; - stream->__cookie = &stream->__fileno; + stream->__cookie = NULL; if (stream->__mode.__append) { diff -ruN glibc-1.06/stdio/fopen.c glibc-1.07/stdio/fopen.c --- glibc-1.06/stdio/fopen.c Mon Apr 19 19:21:38 1993 +++ glibc-1.07/stdio/fopen.c Wed May 26 20:05:53 1993 @@ -81,8 +81,6 @@ DEFUN(fopen, (filename, mode), CONST char *filename AND CONST char *mode) { FILE *stream; - int fd; - PTR cookie; __io_mode m; if (filename == NULL) @@ -98,21 +96,13 @@ if (stream == NULL) return NULL; - cookie = __stdio_open (filename, m, &fd); - if (cookie == NULL) + if (__stdio_open (filename, m, &stream->__cookie)) { - if (fd < 0) - { - int save = errno; - (void) fclose (stream); - errno = save; - return NULL; - } - stream->__fileno = fd; - stream->__cookie = &stream->__fileno; + int save = errno; + (void) fclose (stream); + errno = save; + return NULL; } - else - stream->__cookie = cookie; stream->__mode = m; diff -ruN glibc-1.06/stdio/gmp-impl.h glibc-1.07/stdio/gmp-impl.h --- glibc-1.06/stdio/gmp-impl.h +++ glibc-1.07/stdio/gmp-impl.h Sun Jan 16 00:17:22 1994 @@ -0,0 +1,234 @@ +/* Include file for internal GNU MP types and definitions. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 alloca +#if defined (__GNUC__) || defined (__sparc__) || defined (sparc) +#define alloca __builtin_alloca +#endif +#endif + +#ifndef NULL +#define NULL 0L +#endif + +#if defined (__GNUC__) +volatile void abort (void); +#else +#define inline /* Empty */ +void *alloca(); +#endif + +#define ABS(x) (x >= 0 ? x : -x) +#define MIN(l,o) ((l) < (o) ? (l) : (o)) +#define MAX(h,i) ((h) > (i) ? (h) : (i)) + +#include "gmp-mparam.h" +#include "longlong.h" + +#ifdef __STDC__ +void *malloc (size_t); +void *realloc (void *, size_t); +void free (void *); + +extern void * (*_mp_allocate_func) (size_t); +extern void * (*_mp_reallocate_func) (void *, size_t, size_t); +extern void (*_mp_free_func) (void *, size_t); + +void *_mp_default_allocate (size_t); +void *_mp_default_reallocate (void *, size_t, size_t); +void _mp_default_free (void *, size_t); + +#else + +#define const /* Empty */ +#define signed /* Empty */ + +void *malloc (); +void *realloc (); +void free (); + +extern void * (*_mp_allocate_func) (); +extern void * (*_mp_reallocate_func) (); +extern void (*_mp_free_func) (); + +void *_mp_default_allocate (); +void *_mp_default_reallocate (); +void _mp_default_free (); +#endif + +/* Copy NLIMBS *limbs* from SRC to DST. */ +#define MPN_COPY_INCR(DST, SRC, NLIMBS) \ + do { \ + mp_size_t __i; \ + for (__i = 0; __i < (NLIMBS); __i++) \ + (DST)[__i] = (SRC)[__i]; \ + } while (0) +#define MPN_COPY_DECR(DST, SRC, NLIMBS) \ + do { \ + mp_size_t __i; \ + for (__i = (NLIMBS) - 1; __i >= 0; __i--) \ + (DST)[__i] = (SRC)[__i]; \ + } while (0) +#define MPN_COPY MPN_COPY_INCR + +/* Zero NLIMBS *limbs* AT DST. */ +#define MPN_ZERO(DST, NLIMBS) \ + do { \ + mp_size_t __i; \ + for (__i = 0; __i < (NLIMBS); __i++) \ + (DST)[__i] = 0; \ + } while (0) + +#define MPN_NORMALIZE(DST, NLIMBS) \ + do { \ + while (NLIMBS > 0) \ + { \ + if ((DST)[(NLIMBS) - 1] != 0) \ + break; \ + NLIMBS--; \ + } \ + } while (0) +#define MPN_NORMALIZE_NOT_ZERO(DST, NLIMBS) \ + do { \ + while (1) \ + { \ + if ((DST)[(NLIMBS) - 1] != 0) \ + break; \ + NLIMBS--; \ + } \ + } while (0) + +/* Swap (mp_ptr, mp_size_t) (U, UL) with (V, VL) */ +#define MPN_SWAP(u, l, v, m) \ + do { \ + { mp_ptr _; _ = (u), (u) = (v), (v) = _;} \ + { mp_size_t _; _ = (l), (l) = (m), (m) = _;} \ + } while (0) + +/* Return true iff the limb X has less bits than the limb Y. */ +#define MPN_LESS_BITS_LIMB(x,y) ((x) < (y) && (x) < ((x) ^ (y))) + +/* Return true iff (mp_ptr, mp_size_t) (U, UL) has less bits than (V, VL). */ +#define MPN_LESS_BITS(u, l, v, m) \ + ((l) < (m) \ + || ((l) == (m) && (l) != 0 && MPN_LESS_BITS_LIMB ((u)[(l - 1)], (v)[(l) - 1]))) + +/* Return true iff (mp_ptr, mp_size_t) (U, UL) has more bits than (V, VL). */ +#define MPN_MORE_BITS(u, l, v, m) MPN_LESS_BITS (v, m, u, l) + +/* Perform twos complement on (mp_ptr, mp_size_t) (U, UL), + putting result at (v, VL). Precondition: U[0] != 0. */ +#define MPN_COMPL_INCR(u, v, l) \ + do { \ + mp_size_t _ = 0; \ + (u)[0] = -(v)[_]; \ + while (_++ < (l)) \ + (u)[_] = ~(v)[_]; \ + } while (0) +#define MPN_COMPL MPN_COMPL_INCR + +/* Initialize the MP_INT X with space for NLIMBS limbs. + X should be a temporary variable, and it will be automatically + cleared out when the running function returns. + We use __x here to make it possible to accept both mpz_ptr and mpz_t + arguments. */ +#define MPZ_TMP_INIT(X, NLIMBS) \ + do { \ + mpz_ptr __x = (X); \ + __x->alloc = (NLIMBS); \ + __x->d = (mp_ptr) alloca ((NLIMBS) * BYTES_PER_MP_LIMB); \ + } while (0) + +#define MPN_MUL_N_RECURSE(prodp, up, vp, size, tspace) \ + do { \ + if ((size) < KARATSUBA_THRESHOLD) \ + ___mpn_mul_n_basecase (prodp, up, vp, size); \ + else \ + ___mpn_mul_n (prodp, up, vp, size, tspace); \ + } while (0); +#define MPN_SQR_N_RECURSE(prodp, up, size, tspace) \ + do { \ + if ((size) < KARATSUBA_THRESHOLD) \ + ___mpn_sqr_n_basecase (prodp, up, size); \ + else \ + ___mpn_sqr_n (prodp, up, size, tspace); \ + } while (0); + +/* Structure for conversion between internal binary format and + strings in base 2..36. */ +struct bases +{ + /* Number of digits in the conversion base that always fits in + an mp_limb. For example, for base 10 this is 10, since + 2**32 = 4294967296 has ten digits. */ + int chars_per_limb; + + /* log(2)/log(conversion_base) */ + float chars_per_bit_exactly; + + /* big_base is conversion_base**chars_per_limb, i.e. the biggest + number that fits a word, built by factors of conversion_base. + Exception: For 2, 4, 8, etc, big_base is log2(base), i.e. the + number of bits used to represent each digit in the base. */ + mp_limb big_base; + + /* big_base_inverted is a BITS_PER_MP_LIMB bit approximation to + 1/big_base, represented as a fixed-point number. Instead of + dividing by big_base an application can choose to multiply + by big_base_inverted. */ + mp_limb big_base_inverted; +}; + +extern const struct bases __mp_bases[]; +extern mp_size_t __gmp_default_fp_limb_precision; + +/* Divide the two-limb number in (NH,,NL) by D, with DI being a 32 bit + approximation to (2**(2*BITS_PER_MP_LIMB))/D - (2**BITS_PER_MP_LIMB). + Put the quotient in Q and the remainder in R. */ +#define udiv_qrnnd_preinv(q, r, nh, nl, d, di) \ + do { \ + unsigned long int _q, _ql, _r; \ + unsigned long int _xh, _xl; \ + umul_ppmm (_q, _ql, (nh), (di)); \ + _q += (nh); /* DI is 2**BITS_PER_MP_LIMB too small */\ + umul_ppmm (_xh, _xl, _q, (d)); \ + sub_ddmmss (_xh, _r, (nh), (nl), _xh, _xl); \ + if (_xh != 0) \ + { \ + sub_ddmmss (_xh, _r, _xh, _r, 0, (d)); \ + _q += 1; \ + if (_xh != 0) \ + { \ + sub_ddmmss (_xh, _r, _xh, _r, 0, (d)); \ + _q += 1; \ + } \ + } \ + if (_r >= (d)) \ + { \ + _r -= (d); \ + _q += 1; \ + } \ + (r) = _r; \ + (q) = _q; \ + } while (0) diff -ruN glibc-1.06/stdio/gmp.h glibc-1.07/stdio/gmp.h --- glibc-1.06/stdio/gmp.h +++ glibc-1.07/stdio/gmp.h Sun Jan 16 00:17:20 1994 @@ -0,0 +1,604 @@ +/* gmp.h -- Definitions for GNU multiple precision functions. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 __GMP_H__ + +#ifndef __GNU_MP__ +#define __need_size_t +#include + +#ifdef __STDC__ +#define __gmp_const const +#else +#define __gmp_const +#endif + +#ifdef __GNUC__ +#define __gmp_inline inline +#else +#define __gmp_inline +#endif + +#ifdef _SHORT_LIMB +typedef unsigned int mp_limb; +typedef int mp_limb_signed; +#else +typedef unsigned long int mp_limb; +typedef long int mp_limb_signed; +#endif + +typedef mp_limb * mp_ptr; +typedef __gmp_const mp_limb * mp_srcptr; +typedef int mp_size_t; +typedef long int mp_exp_t; + +#ifndef __MP_SMALL__ +typedef struct +{ + long int alloc; /* Number of *limbs* allocated and pointed + to by the D field. */ + long int size; /* abs(SIZE) is the number of limbs + the last field points to. If SIZE + is negative this is a negative + number. */ + mp_limb *d; /* Pointer to the limbs. */ +} __mpz_struct; +#else +typedef struct +{ + short int alloc; /* Number of *limbs* allocated and pointed + to by the D field. */ + short int size; /* abs(SIZE) is the number of limbs + the last field points to. If SIZE + is negative this is a negative + number. */ + mp_limb *d; /* Pointer to the limbs. */ +} __mpz_struct; +#endif +#endif /* __GNU_MP__ */ + +/* User-visible types. */ +typedef __mpz_struct MP_INT; +typedef __mpz_struct mpz_t[1]; + +/* Structure for rational numbers. Zero is represented as 0/any, i.e. + the denominator is ignored. Negative numbers have the sign in + the numerator. */ +typedef struct +{ + __mpz_struct num; + __mpz_struct den; +#if 0 + long int num_alloc; /* Number of limbs allocated + for the numerator. */ + long int num_size; /* The absolute value of this field is the + length of the numerator; the sign is the + sign of the entire rational number. */ + mp_ptr num; /* Pointer to the numerator limbs. */ + long int den_alloc; /* Number of limbs allocated + for the denominator. */ + long int den_size; /* Length of the denominator. (This field + should always be positive.) */ + mp_ptr den; /* Pointer to the denominator limbs. */ +#endif +} __mpq_struct; + +typedef __mpq_struct MP_RAT; +typedef __mpq_struct mpq_t[1]; + +typedef struct +{ + mp_size_t alloc; /* Number of *limbs* allocated and pointed + to by the D field. */ + mp_size_t prec; /* Max precision, in number of `mp_limb's. + Set by mpf_init and modified by + mpf_set_prec. */ + mp_size_t size; /* abs(SIZE) is the number of limbs + the last field points to. If SIZE + is negative this is a negative + number. */ + mp_exp_t exp; /* Exponent, in the base of `mp_limb'. */ + mp_limb *d; /* Pointer to the limbs. */ +} __mpf_struct; + +/* typedef __mpf_struct MP_FLOAT; */ +typedef __mpf_struct mpf_t[1]; + +/* Types for function declarations in gmp files. */ +/* ??? Should not pollute user name space ??? */ +typedef __gmp_const __mpz_struct *mpz_srcptr; +typedef __mpz_struct *mpz_ptr; +typedef __gmp_const __mpf_struct *mpf_srcptr; +typedef __mpf_struct *mpf_ptr; + + +#ifdef __STDC__ +void mp_set_memory_functions (void *(*) (size_t), + void *(*) (void *, size_t, size_t), + void (*) (void *, size_t)); + +/**************** Integer (i.e. Z) routines. ****************/ + +void mpz_init (mpz_ptr); +void mpz_set (mpz_ptr, mpz_srcptr); +void mpz_set_ui (mpz_ptr, unsigned long int); +void mpz_set_si (mpz_ptr, signed long int); +int mpz_set_str (mpz_ptr, const char *, int); +void mpz_init_set (mpz_ptr, mpz_srcptr); +void mpz_init_set_ui (mpz_ptr, unsigned long int); +void mpz_init_set_si (mpz_ptr, signed long int); +int mpz_init_set_str (mpz_ptr, const char *, int); +unsigned long int mpz_get_ui (mpz_srcptr); +signed long int mpz_get_si (mpz_srcptr); +char * mpz_get_str (char *, int, mpz_srcptr); +void mpz_clear (mpz_ptr); +void * _mpz_realloc (mpz_ptr, mp_size_t); +void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_div (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_div_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_mod_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_divmod (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_divmod_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_mdiv (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_mdiv_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_mmod (mpz_ptr, mpz_srcptr, mpz_srcptr); +unsigned long int mpz_mmod_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_mdivmod (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); +unsigned long int mpz_mdivmod_ui (mpz_ptr, mpz_ptr, mpz_srcptr, + unsigned long int); +void mpz_sqrt (mpz_ptr, mpz_srcptr); +void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); +int mpz_perfect_square_p (mpz_srcptr); +int mpz_probab_prime_p (mpz_srcptr, int); +void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); +void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); +void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_fac_ui (mpz_ptr, unsigned long int); +void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); +int mpz_divides(mpz_srcptr, mpz_srcptr); +void mpz_neg (mpz_ptr, mpz_srcptr); +void mpz_com (mpz_ptr, mpz_srcptr src); +void mpz_abs (mpz_ptr, mpz_srcptr); +int mpz_cmp (mpz_srcptr, mpz_srcptr); +int mpz_cmp_ui (mpz_srcptr, unsigned long int); +int mpz_cmp_si (mpz_srcptr, signed long int); +void mpz_mul_2exp (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_div_2exp (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_mod_2exp (mpz_ptr, mpz_srcptr, unsigned long int); +void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); +void mpz_not (mpz_ptr, mpz_srcptr); + +#ifdef FILE +void mpz_inp_raw (mpz_ptr, FILE *); +void mpz_inp_str (mpz_ptr, FILE *, int); +void mpz_out_raw (FILE *, mpz_srcptr); +void mpz_out_str (FILE *, int, mpz_srcptr); +#endif + +void mpz_array_init (mpz_ptr [], size_t, mp_size_t); +void mpz_random (mpz_ptr, mp_size_t); +void mpz_random2 (mpz_ptr, mp_size_t); +size_t mpz_size (mpz_srcptr); +size_t mpz_sizeinbase (mpz_srcptr, int); + +/**************** Rational (i.e. Q) routines. ****************/ + +void mpq_init (MP_RAT *); +void mpq_clear (MP_RAT *); +void mpq_set (MP_RAT *, const MP_RAT *); +void mpq_set_ui (MP_RAT *, unsigned long int, unsigned long int); +void mpq_set_si (MP_RAT *, signed long int, unsigned long int); +void mpq_add (MP_RAT *, const MP_RAT *, const MP_RAT *); +void mpq_sub (MP_RAT *, const MP_RAT *, const MP_RAT *); +void mpq_mul (MP_RAT *, const MP_RAT *, const MP_RAT *); +void mpq_div (MP_RAT *, const MP_RAT *, const MP_RAT *); +void mpq_neg (MP_RAT *, const MP_RAT *); +int mpq_cmp (const MP_RAT *, const MP_RAT *); +void mpq_inv (MP_RAT *, const MP_RAT *); +void mpq_set_num (MP_RAT *, mpz_srcptr); +void mpq_set_den (MP_RAT *, mpz_srcptr); +void mpq_get_num (mpz_ptr, const MP_RAT *); +void mpq_get_den (mpz_ptr, const MP_RAT *); + +/**************** Float (i.e. F) routines. ****************/ + +char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); +mp_size_t mpf_set_default_prec (mp_size_t); +void mpf_init (mpf_ptr); +void mpf_init_set (mpf_ptr, mpf_srcptr); +void mpf_init_set_ui (mpf_ptr, unsigned int); +void mpf_init_set_si (mpf_ptr, int); +void mpf_set (mpf_ptr, mpf_srcptr); +void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); +void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned int); +void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); +void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned int); +void mpf_ui_sub (mpf_ptr, unsigned int, mpf_srcptr); +void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); +void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned int); +void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); +void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned int); +void mpf_ui_div (mpf_ptr, unsigned int, mpf_srcptr); +void mpf_sqrt (mpf_ptr, mpf_srcptr); +void mpf_sqrt_ui (mpf_ptr, unsigned int); +int mpf_cmp (mpf_srcptr, mpf_srcptr); + + +/************ Low level positive-integer (i.e. N) routines. ************/ + +/* mp_limb __mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); */ +mp_limb __mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +/* mp_limb __mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb); */ + +/* mp_limb __mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); */ +mp_limb __mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +/* mp_limb __mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb); */ + +mp_limb __mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); +void __mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); +mp_limb __mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb); +mp_limb __mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb); +mp_limb __mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb); + +mp_limb __mpn_divmod (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); +mp_limb __mpn_divmod_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb); +mp_limb __mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb); + +mp_limb __mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); +mp_limb __mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); +mp_limb __mpn_rshiftci (mp_ptr, mp_srcptr, mp_size_t, unsigned int, mp_limb); +mp_size_t __mpn_sqrt (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); +int __mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t); + +void __mpn_random2 (mp_ptr, mp_size_t); +mp_size_t __mpn_set_str (mp_ptr, const unsigned char *, size_t, int); +size_t __mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); + +mp_size_t __mpn_bingcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); +mp_size_t __mpn_accelgcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); +mp_size_t __mpn_bmod (mp_ptr, mp_size_t, mp_srcptr, mp_size_t); +mp_size_t __mpn_bmodgcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); +void __mpn_compl (mp_ptr, mp_srcptr, mp_size_t); +mp_limb __mpn_compl_rsh (mp_ptr, mp_srcptr, mp_size_t, unsigned int); +mp_limb __mpn_sub_n_rsh (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int); + +#else /* ! __STDC__ */ +void mp_set_memory_functions (); + +/**************** Integer (i.e. Z) routines. ****************/ + +void mpz_init (); +void mpz_set (); +void mpz_set_ui (); +void mpz_set_si (); +int mpz_set_str (); +void mpz_init_set (); +void mpz_init_set_ui (); +void mpz_init_set_si (); +int mpz_init_set_str (); +unsigned long int mpz_get_ui (); +long int mpz_get_si (); +char * mpz_get_str (); +void mpz_clear (); +void * _mpz_realloc (); +void mpz_add (); +void mpz_add_ui (); +void mpz_sub (); +void mpz_sub_ui (); +void mpz_mul (); +void mpz_mul_ui (); +void mpz_div (); +void mpz_div_ui (); +void mpz_mod (); +void mpz_mod_ui (); +void mpz_divmod (); +void mpz_divmod_ui (); +void mpz_mdiv (); +void mpz_mdiv_ui (); +void mpz_mmod (); +unsigned long int mpz_mmod_ui (); +void mpz_mdivmod (); +unsigned long int mpz_mdivmod_ui (); +void mpz_sqrt (); +void mpz_sqrtrem (); +int mpz_perfect_square_p (); +int mpz_probab_prime_p (); +void mpz_powm (); +void mpz_powm_ui (); +void mpz_pow_ui (); +void mpz_fac_ui (); +void mpz_gcd (); +void mpz_gcdext (); +int mpz_divides(); +void mpz_neg (); +void mpz_com (); +void mpz_abs (); +int mpz_cmp (); +int mpz_cmp_ui (); +int mpz_cmp_si (); +void mpz_mul_2exp (); +void mpz_div_2exp (); +void mpz_mod_2exp (); +void mpz_and (); +void mpz_ior (); +void mpz_xor (); +void mpz_not (); + +#ifdef FILE +void mpz_inp_raw (); +void mpz_inp_str (); +void mpz_out_raw (); +void mpz_out_str (); +#endif + +void mpz_array_init (); +void mpz_random (); +void mpz_random2 (); +size_t mpz_size (); +size_t mpz_sizeinbase (); + +/**************** Rational (i.e. Q) routines. ****************/ + +void mpq_init (); +void mpq_clear (); +void mpq_set (); +void mpq_set_ui (); +void mpq_set_si (); +void mpq_add (); +void mpq_sub (); +void mpq_mul (); +void mpq_div (); +void mpq_neg (); +int mpq_cmp (); +void mpq_inv (); +void mpq_set_num (); +void mpq_set_den (); +void mpq_get_num (); +void mpq_get_den (); + +/**************** Float (i.e. F) routines. ****************/ + +char *mpf_get_str (); +mp_size_t mpf_set_default_prec (); +void mpf_init (); +void mpf_init_set (); +void mpf_init_set_ui (); +void mpf_init_set_si (); +void mpf_set (); +void mpf_add (); +void mpf_add_ui (); +void mpf_sub (); +void mpf_sub_ui (); +void mpf_ui_sub (); +void mpf_mul (); +void mpf_mul_ui (); +void mpf_div (); +void mpf_div_ui (); +void mpf_ui_div (); +void mpf_sqrt (); +void mpf_sqrt_ui (); +int mpf_cmp (); + +/************ Low level positive-integer (i.e. N) routines. ************/ + +/* mp_limb __mpn_add (); */ +mp_limb __mpn_add_n (); +/* mp_limb __mpn_add_1 (); */ + +/* mp_limb __mpn_sub (); */ +mp_limb __mpn_sub_n (); +/* mp_limb __mpn_sub_1 (); */ + +mp_limb __mpn_mul (); +void __mpn_mul_n (); +mp_limb __mpn_mul_1 (); +mp_limb __mpn_addmul_1 (); +mp_limb __mpn_submul_1 (); + +mp_limb __mpn_divmod (); +mp_limb __mpn_divmod_1 (); +mp_limb __mpn_mod_1 (); + +mp_limb __mpn_lshift (); +mp_limb __mpn_rshift (); +mp_limb __mpn_rshiftci (); +mp_size_t __mpn_sqrt (); +int __mpn_cmp (); + +void __mpn_random2 (); +mp_size_t __mpn_set_str (); +size_t __mpn_get_str (); + +#endif /* __STDC__ */ + +static __gmp_inline mp_limb +#if __STDC__ +__mpn_add_1 (register mp_ptr res_ptr, + register mp_srcptr s1_ptr, + register mp_size_t s1_size, + register mp_limb s2_limb) +#else +__mpn_add_1 (res_ptr, s1_ptr, s1_size, s2_limb) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + register mp_size_t s1_size; + register mp_limb s2_limb; +#endif +{ + register mp_limb x; + + x = *s1_ptr++; + s2_limb = x + s2_limb; + *res_ptr++ = s2_limb; + if (s2_limb < x) + { + while (--s1_size != 0) + { + x = *s1_ptr++ + 1; + *res_ptr++ = x; + if (x != 0) + goto fin; + } + + return 1; + } + + fin: + if (res_ptr != s1_ptr) + memcpy (res_ptr, s1_ptr, (size_t) (s1_size - 1) * sizeof (mp_limb)); + return 0; +} + +static __gmp_inline mp_limb +#if __STDC__ +__mpn_add (register mp_ptr res_ptr, + register mp_srcptr s1_ptr, + register mp_size_t s1_size, + register mp_srcptr s2_ptr, + register mp_size_t s2_size) +#else +__mpn_add (res_ptr, s1_ptr, s1_size, s2_ptr, s2_size) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + register mp_size_t s1_size; + register mp_srcptr s2_ptr; + register mp_size_t s2_size; +#endif +{ + mp_limb cy_limb = 0; + + if (s2_size != 0) + cy_limb = __mpn_add_n (res_ptr, + s1_ptr, + s2_ptr, + s2_size); + + if (s1_size - s2_size != 0) + cy_limb = __mpn_add_1 (res_ptr + s2_size, + s1_ptr + s2_size, + s1_size - s2_size, + cy_limb); + return cy_limb; +} + +static __gmp_inline mp_limb +#if __STDC__ +__mpn_sub_1 (register mp_ptr res_ptr, + register mp_srcptr s1_ptr, + register mp_size_t s1_size, + register mp_limb s2_limb) +#else +__mpn_sub_1 (res_ptr, s1_ptr, s1_size, s2_limb) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + register mp_size_t s1_size; + register mp_limb s2_limb; +#endif +{ + register mp_limb x; + + x = *s1_ptr++; + s2_limb = x - s2_limb; + *res_ptr++ = s2_limb; + if (s2_limb > x) + { + while (--s1_size != 0) + { + x = *s1_ptr++; + *res_ptr++ = x - 1; + if (x != 0) + goto fin; + } + + return 1; + } + + fin: + if (res_ptr != s1_ptr) + memcpy (res_ptr, s1_ptr, (size_t) (s1_size - 1) * sizeof (mp_limb)); + return 0; +} + +static __gmp_inline mp_limb +#if __STDC__ +__mpn_sub (register mp_ptr res_ptr, + register mp_srcptr s1_ptr, + register mp_size_t s1_size, + register mp_srcptr s2_ptr, + register mp_size_t s2_size) +#else +__mpn_sub (res_ptr, s1_ptr, s1_size, s2_ptr, s2_size) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + register mp_size_t s1_size; + register mp_srcptr s2_ptr; + register mp_size_t s2_size; +#endif +{ + mp_limb cy_limb = 0; + + if (s2_size != 0) + cy_limb = __mpn_sub_n (res_ptr, + s1_ptr, + s2_ptr, + s2_size); + + if (s1_size - s2_size != 0) + cy_limb = __mpn_sub_1 (res_ptr + s2_size, + s1_ptr + s2_size, + s1_size - s2_size, + cy_limb); + return cy_limb; +} + +static __gmp_inline mp_size_t +#if __STDC__ +__mpn_normal_size (mp_srcptr ptr, mp_size_t size) +#else +__mpn_normal_size (ptr, size) + mp_srcptr ptr; + mp_size_t size; +#endif +{ + while (size) + { + size--; + if (ptr[size] != 0) + return size + 1; + } + return 0; +} + +#define __GNU_MP__ +#define __GMP_H__ +#endif /* __GMP_H__ */ diff -ruN glibc-1.06/stdio/internals.c glibc-1.07/stdio/internals.c --- glibc-1.06/stdio/internals.c Wed Apr 21 17:53:04 1993 +++ glibc-1.07/stdio/internals.c Mon Jan 17 17:31:19 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -23,15 +23,9 @@ #include -/* Minimum size of a buffer we will allocate by default. - If this much memory is not available, - the stream in question will be made unbuffered instead. */ -#define MIN_BUFSIZE 128 - -/* Figure out what kind of buffering (none, line, or full) - and what buffer size to give FP. */ -static void -DEFUN(init_stream, (fp), register FILE *fp) +/* Make sure that FP has its functions set. */ +void +DEFUN(__stdio_check_funcs, (fp), register FILE *fp) { if (!fp->__seen) { @@ -43,9 +37,23 @@ extern void EXFUN(__stdio_init_stream, (FILE *)); fp->__room_funcs = __default_room_functions; fp->__io_funcs = __default_io_functions; - __stdio_init_stream(fp); + __stdio_init_stream (fp); fp->__seen = 1; } +} + + +/* Minimum size of a buffer we will allocate by default. + If this much memory is not available, + the stream in question will be made unbuffered instead. */ +#define MIN_BUFSIZE 128 + +/* Figure out what kind of buffering (none, line, or full) + and what buffer size to give FP. */ +static void +DEFUN(init_stream, (fp), register FILE *fp) +{ + __stdio_check_funcs (fp); if (fp->__buffer == NULL && !fp->__userbuf) { @@ -199,7 +207,8 @@ !fp->__mode.__append) { int save = errno; - CONST int aligned = (__stdio_check_offset(fp) == EOF || + CONST int aligned = (fp->__buffer == NULL || + __stdio_check_offset(fp) == EOF || fp->__target % fp->__bufsize == 0); errno = save; @@ -452,13 +461,14 @@ /* Default I/O and room functions. */ -extern __io_read __stdio_read; -extern __io_write __stdio_write; -extern __io_seek __stdio_seek; -extern __io_close __stdio_close; +extern __io_read_fn __stdio_read; +extern __io_write_fn __stdio_write; +extern __io_seek_fn __stdio_seek; +extern __io_close_fn __stdio_close; +extern __io_fileno_fn __stdio_fileno; CONST __io_functions __default_io_functions = { - __stdio_read, __stdio_write, __stdio_seek, __stdio_close + __stdio_read, __stdio_write, __stdio_seek, __stdio_close, __stdio_fileno }; CONST __room_functions __default_room_functions = diff -ruN glibc-1.06/stdio/longlong.h glibc-1.07/stdio/longlong.h --- glibc-1.06/stdio/longlong.h +++ glibc-1.07/stdio/longlong.h Sun Jan 16 00:17:16 1994 @@ -0,0 +1,1254 @@ +/* longlong.h -- definitions for mixed size 32/64 bit arithmetic. + Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 LONG_TYPE_SIZE +#ifdef BITS_PER_LONGINT +#define LONG_TYPE_SIZE BITS_PER_LONGINT +#else +#define LONG_TYPE_SIZE 32 +#endif +#endif + +#define __BITS4 (LONG_TYPE_SIZE / 4) +#define __ll_B (1L << (LONG_TYPE_SIZE / 2)) +#define __ll_lowpart(t) ((unsigned long int) (t) % __ll_B) +#define __ll_highpart(t) ((unsigned long int) (t) / __ll_B) + +/* Define auxiliary asm macros. + + 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) + multiplies two unsigned long integers MULTIPLER and MULTIPLICAND, + and generates a two unsigned word product in HIGH_PROD and + LOW_PROD. + + 2) __umulsidi3(a,b) multiplies two unsigned long integers A and B, + and returns a long long product. This is just a variant of umul_ppmm. + + 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator, + denominator) divides a two-word unsigned integer, composed by the + integers HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and + places the quotient in QUOTIENT and the remainder in REMAINDER. + HIGH_NUMERATOR must be less than DENOMINATOR for correct operation. + If, in addition, the most significant bit of DENOMINATOR must be 1, + then the pre-processor symbol UDIV_NEEDS_NORMALIZATION is defined to 1. + + 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator, + denominator). Like udiv_qrnnd but the numbers are signed. The + quotient is rounded towards 0. + + 5) count_leading_zeros(count, x) counts the number of zero-bits from + the msb to the first non-zero bit. This is the number of steps X + needs to be shifted left to set the msb. Undefined for X == 0. + + 6) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1, + high_addend_2, low_addend_2) adds two two-word unsigned integers, + composed by HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and + LOW_ADDEND_2 respectively. The result is placed in HIGH_SUM and + LOW_SUM. Overflow (i.e. carry out) is not stored anywhere, and is + lost. + + 7) sub_ddmmss(high_difference, low_difference, high_minuend, + low_minuend, high_subtrahend, low_subtrahend) subtracts two + two-word unsigned integers, composed by HIGH_MINUEND_1 and + LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and LOW_SUBTRAHEND_2 + respectively. The result is placed in HIGH_DIFFERENCE and + LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere, + and is lost. + + If any of these macros are left undefined for a particular CPU, + C macros are used. */ + +/* The CPUs come in alphabetical order below. + + Please add support for more CPUs here, or improve the current support + for the CPUs below! */ + +#if defined (__GNUC__) && !defined (NO_ASM) + +/* We sometimes need to clobber "cc" with gcc2, but that would not be + understood by gcc1. Use cpp to avoid major code duplication. */ +#if __GNUC__ < 2 +#define __CLOBBER_CC +#define __AND_CLOBBER_CC +#else /* __GNUC__ >= 2 */ +#define __CLOBBER_CC : "cc" +#define __AND_CLOBBER_CC , "cc" +#endif /* __GNUC__ < 2 */ + +#if defined (__a29k__) || defined (___AM29K__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add %1,%4,%5 + addc %0,%2,%3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%r" ((unsigned long int)(ah)), \ + "rI" ((unsigned long int)(bh)), \ + "%r" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub %1,%4,%5 + subc %0,%2,%3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "r" ((unsigned long int)(ah)), \ + "rI" ((unsigned long int)(bh)), \ + "r" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl))) +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ("multiplu %0,%1,%2" \ + : "=r" ((unsigned long int)(xl)) \ + : "r" (__m0), \ + "r" (__m1)); \ + __asm__ ("multmu %0,%1,%2" \ + : "=r" ((unsigned long int)(xh)) \ + : "r" (__m0), \ + "r" (__m1)); \ + } while (0) +#define udiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("dividu %0,%3,%4" \ + : "=r" ((unsigned long int)(q)), \ + "=q" ((unsigned long int)(r)) \ + : "1" ((unsigned long int)(n1)), \ + "r" ((unsigned long int)(n0)), \ + "r" ((unsigned long int)(d))) +#define count_leading_zeros(count, x) \ + __asm__ ("clz %0,%1" \ + : "=r" ((unsigned long int)(count)) \ + : "r" ((unsigned long int)(x))) +#endif /* __a29k__ */ + +#if defined (__alpha__) +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ("umulh %r1,%2,%0" \ + : "=r" ((unsigned long int) ph) \ + : "%rJ" (__m0), \ + "rI" (__m1)); \ + (pl) = (unsigned long int) (__m0) * (unsigned long int) (__m1); \ + } while (0) +#define UMUL_TIME 46 +#define udiv_qrnnd(q, r, n1, n0, d) \ + do { unsigned long int __r; \ + (q) = __udiv_qrnnd(&__r, (n1), (n0), (d)); \ + (r) = __r; \ + } while (0) +extern unsigned long __udiv_qrnnd (); +#define UDIV_TIME 220 +#endif + +#if defined (__arm__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("adds %1,%4,%5 + adc %0,%2,%3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%r" ((unsigned long int)(ah)), \ + "rI" ((unsigned long int)(bh)), \ + "%r" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subs %1,%4,%5 + sbc %0,%2,%3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "r" ((unsigned long int)(ah)), \ + "rI" ((unsigned long int)(bh)), \ + "r" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl))) +#define umul_ppmm(xh, xl, a, b) \ + __asm__ ("; Inlined umul_ppmm + mov r0,%2 lsr 16 + mov r2,%3 lsr 16 + bic r1,%2,r0 lsl 16 + bic r2,%3,r2 lsl 16 + mul %1,r1,r2 + mul r2,r0,r2 + mul r1,%0,r1 + mul %0,r0,%0 + adds r1,r2,r1 + addcs %0,%0,0x10000 + adds %1,%1,r1 lsl 16 + adc %0,%0,r1 lsr 16" \ + : "=&r" ((unsigned long int)(xh)), \ + "=r" ((unsigned long int)(xl)) \ + : "r" ((unsigned long int)(a)), \ + "r" ((unsigned long int)(b)) \ + : "r0", "r1", "r2") +#define UMUL_TIME 20 +#define UDIV_TIME 100 +#endif /* __arm__ */ + +#if defined (__clipper__) +#define umul_ppmm(w1, w0, u, v) \ + ({union {long long int __ll; \ + struct {unsigned long int __l, __h;} __i; \ + } __xx; \ + __asm__ ("mulwux %2,%0" \ + : "=r" (__xx.__ll) \ + : "%0" ((unsigned long int)(u)), \ + "r" ((unsigned long int)(v))); \ + (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) +#define smul_ppmm(w1, w0, u, v) \ + ({union {long long int __ll; \ + struct {unsigned long int __l, __h;} __i; \ + } __xx; \ + __asm__ ("mulwx %2,%0" \ + : "=r" (__xx.__ll) \ + : "%0" ((unsigned long int)(u)), \ + "r" ((unsigned long int)(v))); \ + (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) +#define __umulsidi3(u, v) \ + ({long long int __w; \ + __asm__ ("mulwux %2,%0" \ + : "=r" (__w) \ + : "%0" ((unsigned long int)(u)), \ + "r" ((unsigned long int)(v))); \ + __w; }) +#endif /* __clipper__ */ + +#if defined (__gmicro__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add.w %5,%1 + addx %3,%0" \ + : "=g" ((unsigned long int)(sh)), \ + "=&g" ((unsigned long int)(sl)) \ + : "%0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "%1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub.w %5,%1 + subx %3,%0" \ + : "=g" ((unsigned long int)(sh)), \ + "=&g" ((unsigned long int)(sl)) \ + : "0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define umul_ppmm(ph, pl, m0, m1) \ + __asm__ ("mulx %3,%0,%1" \ + : "=g" ((unsigned long int)(ph)), \ + "=r" ((unsigned long int)(pl)) \ + : "%0" ((unsigned long int)(m0)), \ + "g" ((unsigned long int)(m1))) +#define udiv_qrnnd(q, r, nh, nl, d) \ + __asm__ ("divx %4,%0,%1" \ + : "=g" ((unsigned long int)(q)), \ + "=r" ((unsigned long int)(r)) \ + : "1" ((unsigned long int)(nh)), \ + "0" ((unsigned long int)(nl)), \ + "g" ((unsigned long int)(d))) +#define count_leading_zeros(count, x) \ + __asm__ ("bsch/1 %1,%0" \ + : "=g" (count) \ + : "g" ((unsigned long int)(x)), \ + "0" (0UL)) +#endif + +#if defined (__hppa) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add %4,%5,%1 + addc %2,%3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%rM" ((unsigned long int)(ah)), \ + "rM" ((unsigned long int)(bh)), \ + "%rM" ((unsigned long int)(al)), \ + "rM" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub %4,%5,%1 + subb %2,%3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "rM" ((unsigned long int)(ah)), \ + "rM" ((unsigned long int)(bh)), \ + "rM" ((unsigned long int)(al)), \ + "rM" ((unsigned long int)(bl))) +#if defined (_PA_RISC1_1) +#define umul_ppmm(wh, wl, u, v) \ + do { \ + union {long long int __ll; \ + struct {unsigned long int __h, __l;} __i; \ + } __xx; \ + __asm__ ("xmpyu %1,%2,%0" \ + : "=x" (__xx.__ll) \ + : "x" ((unsigned long int)(u)), \ + "x" ((unsigned long int)(v))); \ + (wh) = __xx.__i.__h; \ + (wl) = __xx.__i.__l; \ + } while (0) +#define UMUL_TIME 8 +#define UDIV_TIME 60 +#else +#define UMUL_TIME 40 +#define UDIV_TIME 80 +#endif +#define udiv_qrnnd(q, r, n1, n0, d) \ + do { unsigned long int __r; \ + (q) = __udiv_qrnnd(&__r, (n1), (n0), (d)); \ + (r) = __r; \ + } while (0) +extern unsigned long __udiv_qrnnd (); +#define count_leading_zeros(count, x) \ + do { \ + unsigned long int __tmp; \ + __asm__ ( \ + "ldi 1,%0 + extru,= %1,15,16,%%r0 ; Bits 31..16 zero? + extru,tr %1,15,16,%1 ; No. Shift down, skip add. + ldo 16(%0),%0 ; Yes. Perform add. + extru,= %1,23,8,%%r0 ; Bits 15..8 zero? + extru,tr %1,23,8,%1 ; No. Shift down, skip add. + ldo 8(%0),%0 ; Yes. Perform add. + extru,= %1,27,4,%%r0 ; Bits 7..4 zero? + extru,tr %1,27,4,%1 ; No. Shift down, skip add. + ldo 4(%0),%0 ; Yes. Perform add. + extru,= %1,29,2,%%r0 ; Bits 3..2 zero? + extru,tr %1,29,2,%1 ; No. Shift down, skip add. + ldo 2(%0),%0 ; Yes. Perform add. + extru %1,30,1,%1 ; Extract bit 1. + sub %0,%1,%0 ; Subtract it. + " : "=r" (count), "=r" (__tmp) : "1" (x)); \ + } while (0) +#endif + +#if defined (__i370__) || defined (__mvs__) +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + union {long long int __ll; \ + struct {unsigned long int __h, __l;} __i; \ + } __xx; \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ("mr %0,%3" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "%1" (__m0), \ + "r" (__m1)); \ + (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + (xh) += ((((signed int) __m0 >> 31) & __m1) \ + + (((signed int) __m1 >> 31) & __m0)); \ + } while (0) +#define smul_ppmm(xh, xl, m0, m1) \ + do { \ + union {long long int __ll; \ + struct {unsigned long int __h, __l;} __i; \ + } __xx; \ + __asm__ ("mr %0,%3" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "%1" (m0), \ + "r" (m1)); \ + (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + } while (0) +#define sdiv_qrnnd(q, r, n1, n0, d) \ + do { \ + union {long long int __ll; \ + struct {unsigned long int __h, __l;} __i; \ + } __xx; \ + __xx.__i.__h = n1; __xx.__i.__l = n0; \ + __asm__ ("dr %0,%2" \ + : "=r" (__xx.__ll) \ + : "0" (__xx.__ll), "r" (d)); \ + (q) = __xx.__i.__l; (r) = __xx.__i.__h; \ + } while (0) +#endif + +#if defined (__i386__) || defined (__i486__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addl %5,%1 + adcl %3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "%1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subl %5,%1 + sbbl %3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("mull %3" \ + : "=a" ((unsigned long int)(w0)), \ + "=d" ((unsigned long int)(w1)) \ + : "%0" ((unsigned long int)(u)), \ + "rm" ((unsigned long int)(v))) +#define udiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("divl %4" \ + : "=a" ((unsigned long int)(q)), \ + "=d" ((unsigned long int)(r)) \ + : "0" ((unsigned long int)(n0)), \ + "1" ((unsigned long int)(n1)), \ + "rm" ((unsigned long int)(d))) +#define count_leading_zeros(count, x) \ + do { \ + unsigned long int __cbtmp; \ + __asm__ ("bsrl %1,%0" \ + : "=r" (__cbtmp) : "rm" ((unsigned long int)(x))); \ + (count) = __cbtmp ^ 31; \ + } while (0) +#define count_trailing_zeros(count, x) \ + __asm__ ("bsfl %1,%0" : "=r" (count) : "rm" ((unsigned long int)(x))) +#define UMUL_TIME 40 +#define UDIV_TIME 40 +#endif /* 80x86 */ + +#if defined (__i860__) +#if 0 +/* Make sure these patterns really improve the code before + switching them on. */ +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + do { \ + union \ + { \ + long long int ll; \ + struct {unsigned long int l, h;} i; \ + } __a, __b, __s; \ + __a.i.l = (al); __a.i.h = (ah); \ + __b.i.l = (bl); __b.i.h = (bh); \ + __asm__ ("fiadd.dd %1,%2,%0" \ + : "=f" (__s.ll) \ + : "%f" (__a.ll), "f" (__b.ll)); \ + (sh) = __s.i.h; (sl) = __s.i.l; \ + } while (0) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + do { \ + union \ + { \ + long long int ll; \ + struct {unsigned long int l, h;} i; \ + } __a, __b, __s; \ + __a.i.l = (al); __a.i.h = (ah); \ + __b.i.l = (bl); __b.i.h = (bh); \ + __asm__ ("fisub.dd %1,%2,%0" \ + : "=f" (__s.ll) \ + : "%f" (__a.ll), "f" (__b.ll)); \ + (sh) = __s.i.h; (sl) = __s.i.l; \ + } while (0) +#endif +#endif /* __i860__ */ + +#if defined (__i960__) +#define umul_ppmm(w1, w0, u, v) \ + ({union {long long int __ll; \ + struct {unsigned long int __l, __h;} __i; \ + } __xx; \ + __asm__ ("emul %2,%1,%0" \ + : "=d" (__xx.__ll) \ + : "%dI" ((unsigned long int)(u)), \ + "dI" ((unsigned long int)(v))); \ + (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) +#define __umulsidi3(u, v) \ + ({long long int __w; \ + __asm__ ("emul %2,%1,%0" \ + : "=d" (__w) \ + : "%dI" ((unsigned long int)(u)), \ + "dI" ((unsigned long int)(v))); \ + __w; }) +#endif /* __i960__ */ + +#if defined (__mc68000__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add%.l %5,%1 + addx%.l %3,%0" \ + : "=d" ((unsigned long int)(sh)), \ + "=&d" ((unsigned long int)(sl)) \ + : "%0" ((unsigned long int)(ah)), \ + "d" ((unsigned long int)(bh)), \ + "%1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub%.l %5,%1 + subx%.l %3,%0" \ + : "=d" ((unsigned long int)(sh)), \ + "=&d" ((unsigned long int)(sl)) \ + : "0" ((unsigned long int)(ah)), \ + "d" ((unsigned long int)(bh)), \ + "1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#if defined (__mc68020__) || defined (__NeXT__) || defined(mc68020) +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("mulu%.l %3,%1:%0" \ + : "=d" ((unsigned long int)(w0)), \ + "=d" ((unsigned long int)(w1)) \ + : "%0" ((unsigned long int)(u)), \ + "dmi" ((unsigned long int)(v))) +#define UMUL_TIME 45 +#define udiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("divu%.l %4,%1:%0" \ + : "=d" ((unsigned long int)(q)), \ + "=d" ((unsigned long int)(r)) \ + : "0" ((unsigned long int)(n0)), \ + "1" ((unsigned long int)(n1)), \ + "dmi" ((unsigned long int)(d))) +#define UDIV_TIME 90 +#define sdiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("divs%.l %4,%1:%0" \ + : "=d" ((unsigned long int)(q)), \ + "=d" ((unsigned long int)(r)) \ + : "0" ((unsigned long int)(n0)), \ + "1" ((unsigned long int)(n1)), \ + "dmi" ((unsigned long int)(d))) +#define count_leading_zeros(count, x) \ + __asm__ ("bfffo %1{%b2:%b2},%0" \ + : "=d" ((unsigned long int)(count)) \ + : "od" ((unsigned long int)(x)), "n" (0)) +#else /* not mc68020 */ +/* This ought to be improved by relying on reload to move inputs and + outputs to their positions. */ +#define umul_ppmm(xh, xl, a, b) \ + __asm__ ("| Inlined umul_ppmm + movel %2,d0 + movel %3,d1 + movel d0,d2 + swap d0 + movel d1,d3 + swap d1 + movew d2,d4 + mulu d3,d4 + mulu d1,d2 + mulu d0,d3 + mulu d0,d1 + movel d4,d0 + eorw d0,d0 + swap d0 + addl d0,d2 + addl d3,d2 + jcc 1f + addl #65536,d1 +1: swap d2 + moveq #0,d0 + movew d2,d0 + movew d4,d2 + movel d2,%1 + addl d1,d0 + movel d0,%0" \ + : "=g" ((unsigned long int)(xh)), \ + "=g" ((unsigned long int)(xl)) \ + : "g" ((unsigned long int)(a)), \ + "g" ((unsigned long int)(b)) \ + : "d0", "d1", "d2", "d3", "d4") +#define UMUL_TIME 100 +#define UDIV_TIME 400 +#endif /* not mc68020 */ +#endif /* mc68000 */ + +#if defined (__m88000__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addu.co %1,%r4,%r5 + addu.ci %0,%r2,%r3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%rJ" ((unsigned long int)(ah)), \ + "rJ" ((unsigned long int)(bh)), \ + "%rJ" ((unsigned long int)(al)), \ + "rJ" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subu.co %1,%r4,%r5 + subu.ci %0,%r2,%r3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "rJ" ((unsigned long int)(ah)), \ + "rJ" ((unsigned long int)(bh)), \ + "rJ" ((unsigned long int)(al)), \ + "rJ" ((unsigned long int)(bl))) +#define count_leading_zeros(count, x) \ + do { \ + unsigned long int __cbtmp; \ + __asm__ ("ff1 %0,%1" \ + : "=r" (__cbtmp) \ + : "r" ((unsigned long int)(x))); \ + (count) = __cbtmp ^ 31; \ + } while (0) +#if defined (__mc88110__) +#define umul_ppmm(wh, wl, u, v) \ + do { \ + union {long long int __ll; \ + struct {unsigned long int __h, __l;} __i; \ + } __xx; \ + __asm__ ("mulu.d %0,%1,%2" \ + : "=r" (__xx.__ll) \ + : "r" ((unsigned long int)(u)), \ + "r" ((unsigned long int)(v))); \ + (wh) = __xx.__i.__h; \ + (wl) = __xx.__i.__l; \ + } while (0) +#define udiv_qrnnd(q, r, n1, n0, d) \ + ({union {long long int __ll; \ + struct {unsigned long int __h, __l;} __i; \ + } __xx; \ + unsigned long int __q; \ + __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ + __asm__ ("divu.d %0,%1,%2" \ + : "=r" (__q) \ + : "r" (__xx.__ll), \ + "r" ((unsigned long int)(d))); \ + (r) = (n0) - __q * (d); (q) = __q; }) +#define UMUL_TIME 5 +#define UDIV_TIME 25 +#else +#define UMUL_TIME 17 +#define UDIV_TIME 150 +#endif /* __mc88110__ */ +#endif /* __m88000__ */ + +#if defined (__mips__) +/* The LO and HI registers are fixed in gcc/mips.h, for some reason. */ +#if 0 && __GNUC__ >= 2 +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("multu %2,%3" \ + : "=l" ((unsigned long int)(w0)), \ + "=h" ((unsigned long int)(w1)) \ + : "d" ((unsigned long int)(u)), \ + "d" ((unsigned long int)(v))) +#else +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("multu %2,%3 + mflo %0 + mfhi %1" \ + : "=d" ((unsigned long int)(w0)), \ + "=d" ((unsigned long int)(w1)) \ + : "d" ((unsigned long int)(u)), \ + "d" ((unsigned long int)(v))) +#endif +#define UMUL_TIME 10 +#define UDIV_TIME 100 +#endif /* __mips__ */ + +#if defined (__ns32000__) +#define umul_ppmm(w1, w0, u, v) \ + ({union {long long int __ll; \ + struct {unsigned long int __l, __h;} __i; \ + } __xx; \ + __asm__ ("meid %2,%0" \ + : "=g" (__xx.__ll) \ + : "%0" ((unsigned long int)(u)), \ + "g" ((unsigned long int)(v))); \ + (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) +#define __umulsidi3(u, v) \ + ({long long int __w; \ + __asm__ ("meid %2,%0" \ + : "=g" (__w) \ + : "%0" ((unsigned long int)(u)), \ + "g" ((unsigned long int)(v))); \ + __w; }) +#define udiv_qrnnd(q, r, n1, n0, d) \ + ({union {long long int __ll; \ + struct {unsigned long int __l, __h;} __i; \ + } __xx; \ + __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ + __asm__ ("deid %2,%0" \ + : "=g" (__xx.__ll) \ + : "0" (__xx.__ll), \ + "g" ((unsigned long int)(d))); \ + (r) = __xx.__i.__l; (q) = __xx.__i.__h; }) +#define count_trailing_zeros(count,x) \ + do { + __asm__ ("ffsd %2,%0" \ + : "=r" ((unsigned long int) (count)) \ + : "0" ((unsigned long int) 0), \ + "r" ((unsigned long int) (x))); \ + } while (0) +#endif /* __ns32000__ */ + +#if defined (__power__) || defined (___IBMR2__) /* IBM RS6000 */ +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + do { \ + if (__builtin_constant_p (bh) && (bh) == 0) \ + __asm__ ("a%I4 %1,%3,%4\n\taze %0,%2" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%r" ((unsigned long int)(ah)), \ + "%r" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl))); \ + else if (__builtin_constant_p (bh) && (bh) ==~(unsigned long int) 0)\ + __asm__ ("a%I4 %1,%3,%4\n\tame %0,%2" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%r" ((unsigned long int)(ah)), \ + "%r" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl))); \ + else \ + __asm__ ("a%I5 %1,%4,%5\n\tae %0,%2,%3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%r" ((unsigned long int)(ah)), \ + "r" ((unsigned long int)(bh)), \ + "%r" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl))); \ + } while (0) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + do { \ + if (__builtin_constant_p (ah) && (ah) == 0) \ + __asm__ ("sf%I3 %1,%4,%3\n\tsfze %0,%2" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "r" ((unsigned long int)(bh)), \ + "rI" ((unsigned long int)(al)), \ + "r" ((unsigned long int)(bl))); \ + else if (__builtin_constant_p (ah) && (ah) ==~(unsigned long int) 0)\ + __asm__ ("sf%I3 %1,%4,%3\n\tsfme %0,%2" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "r" ((unsigned long int)(bh)), \ + "rI" ((unsigned long int)(al)), \ + "r" ((unsigned long int)(bl))); \ + else \ + __asm__ ("sf%I4 %1,%5,%4\n\tsfe %0,%3,%2" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "r" ((unsigned long int)(ah)), \ + "r" ((unsigned long int)(bh)), \ + "rI" ((unsigned long int)(al)), \ + "r" ((unsigned long int)(bl))); \ + } while (0) +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ("mul %0,%2,%3" \ + : "=r" ((unsigned long int)(xh)), \ + "=q" ((unsigned long int)(xl)) \ + : "r" (__m0), \ + "r" (__m1)); \ + (xh) += ((((signed long int) __m0 >> 31) & __m1) \ + + (((signed long int) __m1 >> 31) & __m0)); \ + } while (0) +#define smul_ppmm(xh, xl, m0, m1) \ + __asm__ ("mul %0,%2,%3" \ + : "=r" ((unsigned long int)(xh)), \ + "=q" ((unsigned long int)(xl)) \ + : "r" (m0), \ + "r" (m1)) +#define UMUL_TIME 8 +#define sdiv_qrnnd(q, r, nh, nl, d) \ + __asm__ ("div %0,%2,%4" \ + : "=r" (q), "=q" (r) \ + : "r" (nh), "1" (nl), "r" (d)) +#define UDIV_TIME 100 +#define count_leading_zeros(count, x) \ + __asm__ ("cntlz %0,%1" \ + : "=r" ((unsigned long int)(count)) \ + : "r" ((unsigned long int)(x))) +#endif /* ___IBMR2__ */ + +#if defined (__powerpc__) && !defined (__powerpc64__) +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ("mulhwu %0,%1,%2" \ + : "=r" ((unsigned long int) ph) \ + : "%r" (__m0), \ + "r" (__m1)); \ + (pl) = (unsigned long int) (__m0) * (unsigned long int) (__m1); \ + } while (0) +#define UMUL_TIME 15 +#define smul_ppmm(ph, pl, m0, m1) \ + do { \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ("mulhw %0,%1,%2" \ + : "=r" ((unsigned long int) ph) \ + : "%r" (__m0), \ + "r" (__m1)); \ + (pl) = (unsigned long int) (__m0) * (unsigned long int) (__m1); \ + } while (0) +#define SMUL_TIME 14 +#define UDIV_TIME 120 +#define count_leading_zeros(count, x) \ + __asm__ ("cntlzw %0,%1" \ + : "=r" ((unsigned long int)(count)) \ + : "r" ((unsigned long int)(x))) +#endif /* ___IBMR2__ */ + +#if defined (__pyr__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addw %5,%1 + addwc %3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "%1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subw %5,%1 + subwb %3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +/* This insn doesn't work on ancient pyramids. */ +#define umul_ppmm(w1, w0, u, v) \ + ({union {long long int __ll; \ + struct {unsigned long int __h, __l;} __i; \ + } __xx; \ + __xx.__i.__l = u; \ + __asm__ ("uemul %3,%0" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "1" (__xx.__i.__l), \ + "g" (v)); \ + (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) +#endif /* __pyr__ */ + +#if defined (__ibm032__) /* RT/ROMP */ +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("a %1,%5 + ae %0,%3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%0" ((unsigned long int)(ah)), \ + "r" ((unsigned long int)(bh)), \ + "%1" ((unsigned long int)(al)), \ + "r" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("s %1,%5 + se %0,%3" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "0" ((unsigned long int)(ah)), \ + "r" ((unsigned long int)(bh)), \ + "1" ((unsigned long int)(al)), \ + "r" ((unsigned long int)(bl))) +#define umul_ppmm(ph, pl, m0, m1) \ + do { \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ( \ + "s r2,r2 + mts r10,%2 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + m r2,%3 + cas %0,r2,r0 + mfs r10,%1" \ + : "=r" ((unsigned long int)(ph)), \ + "=r" ((unsigned long int)(pl)) \ + : "%r" (__m0), \ + "r" (__m1) \ + : "r2"); \ + (ph) += ((((signed long int) __m0 >> 31) & __m1) \ + + (((signed long int) __m1 >> 31) & __m0)); \ + } while (0) +#define UMUL_TIME 20 +#define UDIV_TIME 200 +#define count_leading_zeros(count, x) \ + do { \ + if ((x) >= 0x10000) \ + __asm__ ("clz %0,%1" \ + : "=r" ((unsigned long int)(count)) \ + : "r" ((unsigned long int)(x) >> 16)); \ + else \ + { \ + __asm__ ("clz %0,%1" \ + : "=r" ((unsigned long int)(count)) \ + : "r" ((unsigned long int)(x))); \ + (count) += 16; \ + } \ + } while (0) +#endif + +#if defined (__sparc__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addcc %r4,%5,%1 + addx %r2,%3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "%rJ" ((unsigned long int)(ah)), \ + "rI" ((unsigned long int)(bh)), \ + "%rJ" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl)) \ + __CLOBBER_CC) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subcc %r4,%5,%1 + subx %r2,%3,%0" \ + : "=r" ((unsigned long int)(sh)), \ + "=&r" ((unsigned long int)(sl)) \ + : "rJ" ((unsigned long int)(ah)), \ + "rI" ((unsigned long int)(bh)), \ + "rJ" ((unsigned long int)(al)), \ + "rI" ((unsigned long int)(bl)) \ + __CLOBBER_CC) +#if defined (__sparc_v8__) +/* Don't match immediate range because, 1) it is not often useful, + 2) the 'I' flag thinks of the range as a 13 bit signed interval, + while we want to match a 13 bit interval, sign extended to 32 bits, + but INTERPRETED AS UNSIGNED. */ +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("umul %2,%3,%1;rd %%y,%0" \ + : "=r" ((unsigned long int)(w1)), \ + "=r" ((unsigned long int)(w0)) \ + : "r" ((unsigned long int)(u)), \ + "r" ((unsigned long int)(v))) +/* We might want to leave this undefined for `SuperSPARC (tm)' since + its implementation is crippled and often traps. */ +#define udiv_qrnnd(q, r, n1, n0, d) \ + __asm__ ("mov %2,%%y;nop;nop;nop;udiv %3,%4,%0;umul %0,%4,%1;sub %3,%1,%1"\ + : "=&r" ((unsigned long int)(q)), \ + "=&r" ((unsigned long int)(r)) \ + : "r" ((unsigned long int)(n1)), \ + "r" ((unsigned long int)(n0)), \ + "r" ((unsigned long int)(d))) +#define UMUL_TIME 5 +#define UDIV_TIME 25 +#else +/* SPARC without integer multiplication and divide instructions. + (i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */ +#define umul_ppmm(w1, w0, u, v) \ + __asm__ ("! Inlined umul_ppmm + wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr + sra %3,31,%%g2 ! Don't move this insn + and %2,%%g2,%%g2 ! Don't move this insn + andcc %%g0,0,%%g1 ! Don't move this insn + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,%3,%%g1 + mulscc %%g1,0,%%g1 + add %%g1,%%g2,%0 + rd %%y,%1" \ + : "=r" ((unsigned long int)(w1)), \ + "=r" ((unsigned long int)(w0)) \ + : "%rI" ((unsigned long int)(u)), \ + "r" ((unsigned long int)(v)) \ + : "%g1", "%g2" __AND_CLOBBER_CC) +#define UMUL_TIME 39 /* 39 instructions */ +/* It's quite necessary to add this much assembler for the sparc. + The default udiv_qrnnd (in C) is more than 10 times slower! */ +#define udiv_qrnnd(q, r, n1, n0, d) \ + do { unsigned long int __r; \ + (q) = __udiv_qrnnd(&__r, (n1), (n0), (d)); \ + (r) = __r; \ + } while (0) +extern unsigned long __udiv_qrnnd (); +#define UDIV_TIME 140 +#endif /* __sparc8__ */ +#endif /* __sparc__ */ + +#if defined (__vax__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("addl2 %5,%1 + adwc %3,%0" \ + : "=g" ((unsigned long int)(sh)), \ + "=&g" ((unsigned long int)(sl)) \ + : "%0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "%1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("subl2 %5,%1 + sbwc %3,%0" \ + : "=g" ((unsigned long int)(sh)), \ + "=&g" ((unsigned long int)(sl)) \ + : "0" ((unsigned long int)(ah)), \ + "g" ((unsigned long int)(bh)), \ + "1" ((unsigned long int)(al)), \ + "g" ((unsigned long int)(bl))) +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + union {long long int __ll; \ + struct {unsigned long int __l, __h;} __i; \ + } __xx; \ + unsigned long int __m0 = (m0), __m1 = (m1); \ + __asm__ ("emul %1,%2,$0,%0" \ + : "=g" (__xx.__ll) \ + : "g" (__m0), \ + "g" (__m1)); \ + (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + (xh) += ((((signed long int) __m0 >> 31) & __m1) \ + + (((signed long int) __m1 >> 31) & __m0)); \ + } while (0) +#define sdiv_qrnnd(q, r, n1, n0, d) \ + do { \ + union {long long int __ll; \ + struct {unsigned long int __l, __h;} __i; \ + } __xx; \ + __xx.__i.__h = n1; __xx.__i.__l = n0; \ + __asm__ ("ediv %3,%2,%0,%1" \ + : "=g" (q), "=g" (r) \ + : "g" (__n1n0.ll), "g" (d)); \ + } while (0) +#endif /* __vax__ */ + +#if defined (__z8000__) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + __asm__ ("add %H1,%H5\n\tadc %H0,%H3" \ + : "=r" ((unsigned int)(sh)), \ + "=&r" ((unsigned int)(sl)) \ + : "%0" ((unsigned int)(ah)), \ + "r" ((unsigned int)(bh)), \ + "%1" ((unsigned int)(al)), \ + "rQR" ((unsigned int)(bl))) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + __asm__ ("sub %H1,%H5\n\tsbc %H0,%H3" \ + : "=r" ((unsigned int)(sh)), \ + "=&r" ((unsigned int)(sl)) \ + : "0" ((unsigned int)(ah)), \ + "r" ((unsigned int)(bh)), \ + "1" ((unsigned int)(al)), \ + "rQR" ((unsigned int)(bl))) +#define umul_ppmm(xh, xl, m0, m1) \ + do { \ + union {long int __ll; \ + struct {unsigned int __h, __l;} __i; \ + } __xx; \ + unsigned int __m0 = (m0), __m1 = (m1); \ + __asm__ ("mult %S0,%H3" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "%1" (__m0), \ + "rQR" (__m1)); \ + (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ + (xh) += ((((signed int) __m0 >> 15) & __m1) \ + + (((signed int) __m1 >> 15) & __m0)); \ + } while (0) +#define umul_ppmm_off(xh, xl, m0, m1) \ + do { \ + union {long int __ll; \ + struct {unsigned int __h, __l;} __i; \ + } __xx; \ + __asm__ ("mult %S0,%H3" \ + : "=r" (__xx.__i.__h), \ + "=r" (__xx.__i.__l) \ + : "%1" (m0), \ + "rQR" (m1)); \ + (xh) = __xx.__i.__h + ((((signed int) m0 >> 15) & m1) \ + + (((signed int) m1 >> 15) & m0)); \ + (xl) = __xx.__i.__l; \ + } while (0) +#endif /* __z8000__ */ + +#endif /* __GNUC__ */ + + +#if !defined (umul_ppmm) && defined (__umulsidi3) +#define umul_ppmm(ph, pl, m0, m1) \ + { \ + unsigned long long int __ll = __umulsidi3 (m0, m1); \ + ph = (unsigned long int) (__ll >> LONG_TYPE_SIZE); \ + pl = (unsigned long int) __ll; \ + } +#endif + +#if !defined (__umulsidi3) +#define __umulsidi3(u, v) \ + ({long __hi, __lo; \ + umul_ppmm (__hi, __lo, u, v); \ + ((unsigned long long) __hi << LONG_TYPE_SIZE) | __lo; }) +#endif + +/* If this machine has no inline assembler, use C macros. */ + +#if !defined (add_ssaaaa) +#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ + do { \ + unsigned long int __x; \ + __x = (al) + (bl); \ + (sh) = (ah) + (bh) + (__x < (al)); \ + (sl) = __x; \ + } while (0) +#endif + +#if !defined (sub_ddmmss) +#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ + do { \ + unsigned long int __x; \ + __x = (al) - (bl); \ + (sh) = (ah) - (bh) - (__x > (al)); \ + (sl) = __x; \ + } while (0) +#endif + +#if !defined (umul_ppmm) +#define umul_ppmm(w1, w0, u, v) \ + do { \ + unsigned long int __x0, __x1, __x2, __x3; \ + unsigned int __ul, __vl, __uh, __vh; \ + \ + __ul = __ll_lowpart (u); \ + __uh = __ll_highpart (u); \ + __vl = __ll_lowpart (v); \ + __vh = __ll_highpart (v); \ + \ + __x0 = (unsigned long int) __ul * __vl; \ + __x1 = (unsigned long int) __ul * __vh; \ + __x2 = (unsigned long int) __uh * __vl; \ + __x3 = (unsigned long int) __uh * __vh; \ + \ + __x1 += __ll_highpart (__x0);/* this can't give carry */ \ + __x1 += __x2; /* but this indeed can */ \ + if (__x1 < __x2) /* did we get it? */ \ + __x3 += __ll_B; /* yes, add it in the proper pos. */ \ + \ + (w1) = __x3 + __ll_highpart (__x1); \ + (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ + } while (0) +#endif + +/* Define this unconditionally, so it can be used for debugging. */ +#define __udiv_qrnnd_c(q, r, n1, n0, d) \ + do { \ + unsigned long int __d1, __d0, __q1, __q0, __r1, __r0, __m; \ + __d1 = __ll_highpart (d); \ + __d0 = __ll_lowpart (d); \ + \ + __r1 = (n1) % __d1; \ + __q1 = (n1) / __d1; \ + __m = (unsigned long int) __q1 * __d0; \ + __r1 = __r1 * __ll_B | __ll_highpart (n0); \ + if (__r1 < __m) \ + { \ + __q1--, __r1 += (d); \ + if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\ + if (__r1 < __m) \ + __q1--, __r1 += (d); \ + } \ + __r1 -= __m; \ + \ + __r0 = __r1 % __d1; \ + __q0 = __r1 / __d1; \ + __m = (unsigned long int) __q0 * __d0; \ + __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ + if (__r0 < __m) \ + { \ + __q0--, __r0 += (d); \ + if (__r0 >= (d)) \ + if (__r0 < __m) \ + __q0--, __r0 += (d); \ + } \ + __r0 -= __m; \ + \ + (q) = (unsigned long int) __q1 * __ll_B | __q0; \ + (r) = __r0; \ + } while (0) + +/* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through + __udiv_w_sdiv (defined in libgcc or elsewhere). */ +#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd) +#define udiv_qrnnd(q, r, nh, nl, d) \ + do { \ + unsigned long int __r; \ + (q) = __udiv_w_sdiv (&__r, nh, nl, d); \ + (r) = __r; \ + } while (0) +#endif + +/* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */ +#if !defined (udiv_qrnnd) +#define UDIV_NEEDS_NORMALIZATION 1 +#define udiv_qrnnd __udiv_qrnnd_c +#endif + +#if !defined (count_leading_zeros) +extern +#ifdef __STDC__ +const +#endif +unsigned char __clz_tab[]; +#define count_leading_zeros(count, x) \ + do { \ + unsigned long int __xr = (x); \ + unsigned int __a; \ + \ + if (LONG_TYPE_SIZE <= 32) \ + { \ + __a = __xr < (1<<2*__BITS4) \ + ? (__xr < (1<<__BITS4) ? 0 : __BITS4) \ + : (__xr < (1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \ + } \ + else \ + { \ + for (__a = LONG_TYPE_SIZE - 8; __a > 0; __a -= 8) \ + if (((__xr >> __a) & 0xff) != 0) \ + break; \ + } \ + \ + (count) = LONG_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \ + } while (0) +/* This version gives a well-defined value for zero. */ +#define COUNT_LEADING_ZEROS_0 LONG_TYPE_SIZE +#endif + +#if !defined (count_trailing_zeros) +/* Define count_trailing_zeros using count_leading_zeros. The latter might be + defined in asm, but if it is not, the C version above is good enough. */ +#define count_trailing_zeros(count, x) \ + do { \ + unsigned long int __ctz_x = (x); \ + unsigned int __ctz_c; \ + count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \ + (count) = LONG_TYPE_SIZE - 1 - __ctz_c; \ + } while (0) +#endif + +#ifndef UDIV_NEEDS_NORMALIZATION +#define UDIV_NEEDS_NORMALIZATION 0 +#endif diff -ruN glibc-1.06/stdio/mp_clz_tab.c glibc-1.07/stdio/mp_clz_tab.c --- glibc-1.06/stdio/mp_clz_tab.c +++ glibc-1.07/stdio/mp_clz_tab.c Sun Jan 16 00:17:24 1994 @@ -0,0 +1,40 @@ +/* __clz_tab -- support for longlong.h + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +#if 0 +#include "gmp.h" +#include "gmp-impl.h" +#endif + +const unsigned char __clz_tab[] = +{ + 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +}; diff -ruN glibc-1.06/stdio/mpn-copy.mk glibc-1.07/stdio/mpn-copy.mk --- glibc-1.06/stdio/mpn-copy.mk +++ glibc-1.07/stdio/mpn-copy.mk Sat Jan 15 21:33:28 1994 @@ -0,0 +1,56 @@ +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/sparc8/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/sparc8/%,$(sysdep_dir)/sparc/sparc8/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/sparc/sparc8/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/sparc8/% + $(gmp2glibc) +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/sparc9/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/sparc9/%,$(sysdep_dir)/sparc/sparc9/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/sparc/sparc9/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/sparc9/% + $(gmp2glibc) +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/mc68000/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/mc68000/%,$(sysdep_dir)/m68k/m68000/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/m68k/m68000/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/mc68000/% + $(gmp2glibc) +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/mc68020/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/mc68020/%,$(sysdep_dir)/m68k/m68020/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/m68k/m68020/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/mc68020/% + $(gmp2glibc) +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/mc88100/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/mc88100/%,$(sysdep_dir)/m88k/m88100/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/m88k/m88100/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/mc88100/% + $(gmp2glibc) +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/mc88110/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/mc88110/%,$(sysdep_dir)/m88k/m88110/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/m88k/m88110/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/mc88110/% + $(gmp2glibc) +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/r3000/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/r3000/%,$(sysdep_dir)/mips/r3000/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/mips/r3000/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/r3000/% + $(gmp2glibc) +mpn-found-1 := $(filter $(gmp-srcdir)/mpn/r4000/%,$(mpn-found)) +mpn-copy-1 := $(patsubst $(gmp-srcdir)/mpn/r4000/%,$(sysdep_dir)/mips/r4000/%,$(mpn-found-1)) +mpn-found := $(filter-out $(mpn-found-1),$(mpn-found)) +mpn-copy-sysdep := $(mpn-copy-sysdep) $(mpn-copy-1) +$(mpn-copy-1): $(sysdep_dir)/mips/r4000/%: \ + gmp2glibc.sed $(gmp-srcdir)/mpn/r4000/% + $(gmp2glibc) diff -ruN glibc-1.06/stdio/perror.c glibc-1.07/stdio/perror.c --- glibc-1.06/stdio/perror.c Fri Aug 7 17:39:06 1992 +++ glibc-1.07/stdio/perror.c Thu Nov 18 05:49:20 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -20,10 +20,7 @@ #include #include -#ifndef HAVE_GNU_LD -#define _sys_errlist sys_errlist -#define _sys_nerr sys_nerr -#endif +extern char *_strerror_internal __P ((int, char buf[1024])); /* Print a line on stderr consisting of the text in S, a colon, a space, a message describing the meaning of the contents of `errno' and a newline. @@ -31,6 +28,7 @@ void DEFUN(perror, (s), register CONST char *s) { + char buf[1024]; int errnum = errno; CONST char *colon; @@ -39,8 +37,6 @@ else colon = ": "; - if (errnum >= 0 && errnum < _sys_nerr) - (void) fprintf(stderr, "%s%s%s\n", s, colon, _sys_errlist[errnum]); - else - (void) fprintf(stderr, "%s%sUnknown error %d\n", s, colon, errnum); + (void) fprintf (stderr, "%s%s%s\n", + s, colon, _strerror_internal (errnum, buf)); } diff -ruN glibc-1.06/stdio/printf.h glibc-1.07/stdio/printf.h --- glibc-1.06/stdio/printf.h Tue Jul 7 04:06:30 1992 +++ glibc-1.07/stdio/printf.h Tue Jun 8 01:53:30 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -66,7 +66,7 @@ to determine how many arguments a SPEC conversion requires, and what their types are. */ extern int register_printf_function __P ((int __spec, printf_function __func, - printf_arginfo_function __arginfo)); + printf_arginfo_function __arginfo)); /* Parse FMT, and fill in N elements of ARGTYPES with the types needed for the conversions FMT specifies. Returns diff -ruN glibc-1.06/stdio/printf_fp.c glibc-1.07/stdio/printf_fp.c --- glibc-1.06/stdio/printf_fp.c +++ glibc-1.07/stdio/printf_fp.c Sat Jan 15 17:28:38 1994 @@ -0,0 +1,711 @@ +/* Floating-point printing for `printf'. + This is an implementation of a restricted form of the `Dragon4' + algorithm described in "How to Print Floating-Point Numbers Accurately", + by Guy L. Steele, Jr. and Jon L. White, presented at the ACM SIGPLAN '90 + Conference on Programming Language Design and Implementation. + +Copyright (C) 1992, 1993, 1994 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 +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#if DEBUG +#define MPN_DUMP(x,y,z) mpn_dump(x,y,z) +#else +#define MPN_DUMP(x,y,z) +#endif + +#define outchar(x) \ + do \ + { \ + register CONST int outc = (x); \ + if (putc (outc, s) == EOF) \ + return -1; \ + else \ + ++done; \ + } while (0) + +#if FLT_RADIX != 2 + #error "FLT_RADIX != 2. Write your own __printf_fp." +#endif + +#include "gmp.h" +#include "gmp-impl.h" + +extern mp_size_t __mpn_extract_double (mp_ptr res_ptr, mp_size_t size, + int *expt, int *is_neg, + double value); + +/* 1000 words is an arbitrarily chosen size that is big enough. Some day I + should figure out how big it actually needs to be (which should be + computable from the parameters). The size initialization is + just a notable random number to catch uninitialized variable bugs. */ +#define MPN_VAR(name) mp_limb name[1000]; mp_size_t name##size /*= 314159265*/ +#define MPN_ASSIGN(dst,src) \ + memcpy (dst, src, (dst##size = src##size) * sizeof (mp_limb)) +#define MPN_POW2(dst, power) \ + do { \ + MPN_ZERO (dst, (power) / BITS_PER_MP_LIMB); \ + dst[(power) / BITS_PER_MP_LIMB] = \ + (mp_limb) 1 << (power) % BITS_PER_MP_LIMB; \ + dst##size = (power) / BITS_PER_MP_LIMB + 1; \ + } while (0) + +/* Compare *normalized* mpn vars. */ +#define MPN_GT(u,v) \ + (u##size > v##size || (u##size == v##size && __mpn_cmp (u, v, u##size) > 0)) +#define MPN_LT(u,v) \ + (u##size < v##size || (u##size == v##size && __mpn_cmp (u, v, u##size) < 0)) +#define MPN_GE(u,v) \ + (u##size > v##size || (u##size == v##size && __mpn_cmp (u, v, u##size) >= 0)) +#define MPN_LE(u,v) \ + (u##size < v##size || (u##size == v##size && __mpn_cmp (u, v, u##size) <= 0)) +#define MPN_EQ(u,v) \ + (u##size == v##size && __mpn_cmp (u, v, u##size) == 0) +#define MPN_NE(u,v) \ + (!MPN_EQ(u,v)) + +int +DEFUN(__printf_fp, (s, info, args), + FILE *s AND CONST struct printf_info *info AND va_list *args) +{ + mp_limb cy; + + int done = 0; + + /* Decimal point character. */ + CONST char *CONST decimal = _numeric_info->decimal_point; + + LONG_DOUBLE fpnum; /* Input. */ + int is_neg; + + MPN_VAR (f); /* Fraction. */ + + int e; /* Base-2 exponent of the input. */ + CONST int p = DBL_MANT_DIG; /* Internal precision. */ + MPN_VAR (scale); MPN_VAR (scale2); MPN_VAR (scale10); /* Scale factor. */ + MPN_VAR (loerr); MPN_VAR (hierr); /* Potential error in the fraction. */ + int k; /* Digits to the left of the decimal point. */ + int cutoff; /* Where to stop generating digits. */ + MPN_VAR (r); MPN_VAR (r2); MPN_VAR (r10); /* Remainder. */ + int roundup; + int low, high; + char digit; + + MPN_VAR (tmp); /* Scratch space. */ + + int j; + + char type = tolower (info->spec); + int prec = info->prec; + int width = info->width; + + /* This algorithm has the nice property of not needing a buffer. + However, to get the padding right for %g format, we need to know + the length of the number before printing it. */ + +#ifndef LDBL_DIG +#define LDBL_DIG DBL_DIG +#endif +#ifndef LDBL_MAX_10_EXP +#define LDBL_MAX_10_EXP DBL_MAX_10_EXP +#endif + + char *buf = __alloca ((prec > LDBL_DIG ? prec : LDBL_DIG) + + LDBL_MAX_10_EXP + 3); /* Dot, e, exp. sign. */ + register char *bp = buf; +#define put(c) *bp++ = (c) + + + /* Produce the next digit in DIGIT. + Return nonzero if it is the last. */ + inline int hack_digit (void) + { + int cnt; + mp_limb high_qlimb; + + --k; + cy = __mpn_mul_1 (r10, r, rsize, 10); + r10size = rsize; + if (cy != 0) + r10[r10size++] = cy; + + MPN_DUMP ("r", r, rsize); + MPN_DUMP ("r10", r10, r10size); + MPN_DUMP ("scale", scale, scalesize); + + /* Compute tmp = R10 / scale and R10 = R10 % scale. */ + count_leading_zeros (cnt, scale[scalesize - 1]); + if (cnt != 0) + { + mp_limb norm_scale[scalesize]; + mp_limb cy; + __mpn_lshift (norm_scale, scale, scalesize, cnt); + cy = __mpn_lshift (r10, r10, r10size, cnt); + if (cy != 0) + r10[r10size++] = cy; + high_qlimb = __mpn_divmod (tmp, r10, r10size, norm_scale, scalesize); + tmp[r10size - scalesize] = high_qlimb; + r10size = scalesize; + __mpn_rshift (r10, r10, r10size, cnt); + } + else + { + high_qlimb = __mpn_divmod (tmp, r10, r10size, scale, scalesize); + tmp[r10size - scalesize] = high_qlimb; + r10size = scalesize; + } + + MPN_DUMP ("high_qlimb", &high_qlimb, 1); + MPN_DUMP ("r10", r10, r10size); + + /* We should have a quotient < 10. It might be stored */ + high_qlimb = tmp[0]; + digit = '0' + high_qlimb; + + r10size = __mpn_normal_size (r10, r10size); + + MPN_ASSIGN (r, r10); + cy = __mpn_lshift (r2, r, rsize, 1); + r2size = rsize; + if (cy != 0) + r2[r2size++] = cy; + + cy = __mpn_mul_1 (loerr, loerr, loerrsize, 10); + if (cy) + loerr[loerrsize++] = cy; + cy = __mpn_mul_1 (hierr, hierr, hierrsize, 10); + if (cy) + hierr[hierrsize++] = cy; + + low = MPN_LT (r2, loerr); + + /* tmp = scale2 - hierr; */ + if (scale2size < hierrsize) + high = 1; + else + { + cy = __mpn_sub (tmp, scale2, scale2size, hierr, hierrsize); + tmpsize = scale2size; + high = cy || (roundup ? MPN_GE (r2, tmp) : MPN_GT (r2, tmp)); + } + + if (low || high || k == cutoff) + { + /* This is confusing, since the text and the code in Steele's and + White's paper are contradictory. Problem numbers: + printf("%20.15e\n", <1/2^106>) is printed as + 1.232595164407830e-32 (instead of 1.232595164407831e-32) + if we obey the description in the text; + 1/2^330 is badly misprinted if we obey the code. */ + if (high && !low) + ++digit; +#define OBEY_TEXT 1 +#if OBEY_TEXT + else if (high && low && MPN_GT (r2, scale)) +#else + else if (high == low && MPN_GT (r2, scale)) +#endif + ++digit; + return 1; + } + + return 0; + } + + const char *special = NULL; /* "NaN" or "Inf" for the special cases. */ + + /* Fetch the argument value. */ + if (info->is_long_double) + fpnum = va_arg (*args, LONG_DOUBLE); + else + fpnum = (LONG_DOUBLE) va_arg (*args, double); + + /* Check for special values: not a number or infinity. */ + + if (__isnan ((double) fpnum)) + { + special = "NaN"; + is_neg = 0; + } + else if (__isinf ((double) fpnum)) + { + special = "Inf"; + is_neg = fpnum < 0; + } + + if (special) + { + int width = info->prec > info->width ? info->prec : info->width; + + if (is_neg || info->showsign || info->space) + --width; + width -= 3; + + if (!info->left) + while (width-- > 0) + outchar (' '); + + if (is_neg) + outchar ('-'); + else if (info->showsign) + outchar ('+'); + else if (info->space) + outchar (' '); + + { + register size_t len = 3; + while (len-- > 0) + outchar (*special++); + } + + if (info->left) + while (width-- > 0) + outchar (' '); + + return done; + } + + /* Split the number into a fraction and base-2 exponent. The fractional + part is scaled by the highest possible number of significant bits of + fraction. We represent the fractional part as a (very) large integer. */ + + fsize = __mpn_extract_double (f, sizeof (f) / sizeof (f[0]), + &e, &is_neg, fpnum); + + if (prec == -1) + prec = 6; + else if (prec == 0 && type == 'g') + prec = 1; + + if (type == 'g') + { + if (fpnum != 0) + { + if (fpnum < 1e-4) + type = 'e'; + else + { /* XXX do this more efficiently */ + /* Is (int) floor (log10 (FPNUM)) >= PREC? */ + LONG_DOUBLE power = 10; + j = prec; + if (j > p) + j = p; + while (--j > 0) + { + power *= 10; + if (fpnum < power) + /* log10 (POWER) == floor (log10 (FPNUM)) + 1 + log10 (FPNUM) == Number of iterations minus one. */ + break; + } + if (j <= 0) + /* We got all the way through the loop and F (i.e., 10**J) + never reached FPNUM, so we want to use %e format. */ + type = 'e'; + } + } + + /* For 'g'/'G' format, the precision specifies "significant digits", + not digits to come after the decimal point. */ + --prec; + } + + if (fsize == 1 && f[0] == 0) + /* Special case for zero. + The general algorithm does not work for zero. */ + { + put ('0'); + if (tolower (info->spec) != 'g' || info->alt) + { + if (prec > 0 || info->alt) + put (*decimal); + while (prec-- > 0) + put ('0'); + } + if (type == 'e') + { + put (info->spec); + put ('+'); + put ('0'); + put ('0'); + } + } + else + { + cutoff = -prec; + + roundup = 0; + + if (e > p) + { + /* The exponent is bigger than the number of fractional digits. */ + MPN_ZERO (r, (e - p) / BITS_PER_MP_LIMB); + if ((e - p) % BITS_PER_MP_LIMB == 0) + { + MPN_COPY (r + (e - p) / BITS_PER_MP_LIMB, f, fsize); + rsize = fsize + (e - p) / BITS_PER_MP_LIMB; + } + else + { + cy = __mpn_lshift (r + (e - p) / BITS_PER_MP_LIMB, f, fsize, + (e - p) % BITS_PER_MP_LIMB); + rsize = fsize + (e - p) / BITS_PER_MP_LIMB; + if (cy) + r[rsize++] = cy; + } + + MPN_POW2 (scale, 0); + + /* The number is (E - P) factors of two larger than + the fraction can represent; this is the potential error. */ + MPN_POW2 (loerr, e - p); + } + else + { + /* The number of fractional digits is greater than the exponent. + Scale by the difference factors of two. */ + MPN_ASSIGN (r, f); + MPN_POW2 (scale, p - e); + MPN_POW2 (loerr, 0); + } + MPN_ASSIGN (hierr, loerr); + + /* Fixup. */ + + MPN_POW2 (tmp, p - 1); + + if (MPN_EQ (f, tmp)) + { + /* Account for unequal gaps. */ + cy = __mpn_lshift (hierr, hierr, hierrsize, 1); + if (cy) + hierr[hierrsize++] = cy; + + cy = __mpn_lshift (r, r, rsize, 1); + if (cy) + r[rsize++] = cy; + + cy = __mpn_lshift (scale, scale, scalesize, 1); + if (cy) + scale[scalesize++] = cy; + } + + /* scale10 = ceil (scale / 10.0). */ + if (__mpn_divmod_1 (scale10, scale, scalesize, 10) != 0) + { + /* We got a remainder. __mpn_divmod_1 has floor'ed the quotient + but we want it to be ceil'ed. Adjust. */ + cy = __mpn_add_1 (scale10, scale10, scalesize, 1); + if (cy) + abort (); + } + scale10size = scalesize; + scale10size -= scale10[scale10size - 1] == 0; + + k = 0; + while (MPN_LT (r, scale10)) + { + mp_limb cy; + + --k; + + cy = __mpn_mul_1 (r, r, rsize, 10); + if (cy != 0) + r[rsize++] = cy; + + cy = __mpn_mul_1 (loerr, loerr, loerrsize, 10); + if (cy != 0) + loerr[loerrsize++] = cy; + + cy = __mpn_mul_1 (hierr, hierr, hierrsize, 10); + if (cy != 0) + hierr[hierrsize++] = cy; + } + + do + { + mp_limb cy; + cy = __mpn_lshift (r2, r, rsize, 1); + r2size = rsize; + if (cy != 0) + r2[r2size++] = cy; + + /* tmp = r2 + hierr; */ + if (r2size > hierrsize) + { + cy = __mpn_add (tmp, r2, r2size, hierr, hierrsize); + tmpsize = r2size; + } + else + { + cy = __mpn_add (tmp, hierr, hierrsize, r2, r2size); + tmpsize = hierrsize; + } + if (cy != 0) + tmp[tmpsize++] = cy; + + /* while (r2 + hierr >= 2 * scale) */ + cy = __mpn_lshift (scale2, scale, scalesize, 1); + scale2size = scalesize; + if (cy) + scale2[scale2size++] = cy; + while (MPN_GE (tmp, scale2)) + { + cy = __mpn_mul_1 (scale, scale, scalesize, 10); + if (cy) + scale[scalesize++] = cy; + ++k; + cy = __mpn_lshift (scale2, scale, scalesize, 1); + scale2size = scalesize; + if (cy) + scale2[scale2size++] = cy; + } + + /* Perform any necessary adjustment of loerr and hierr to + take into account the formatting requirements. */ + + if (type == 'e') + cutoff += k - 1; /* CutOffMode == "relative". */ + /* Otherwise CutOffMode == "absolute". */ + + { /* CutOffAdjust. */ + int a = cutoff - k; + MPN_VAR (y); + MPN_ASSIGN (y, scale); + + /* There is probably a better way to do this. */ + + while (a > 0) + { + cy = __mpn_mul_1 (y, y, ysize, 10); + if (cy) + y[ysize++] = cy; + --a; + } + while (a < 0) + { + if (__mpn_divmod_1 (y, y, ysize, 10) != 0) + { + /* We got a remainder. __mpn_divmod_1 has floor'ed the + quotient but we want it to be ceil'ed. Adjust. */ + cy = __mpn_add_1 (y, y, ysize, 1); + if (cy) + abort (); + } + ysize -= y[ysize - 1] == 0; + ++a; + } + + if (MPN_GT (y, loerr)) + MPN_ASSIGN (loerr, y); + if (MPN_GE (y, hierr)) + { + MPN_ASSIGN (hierr, y); + roundup = 1; + /* Recalculate: tmp = r2 + hierr */ + if (r2size > hierrsize) + { + cy = __mpn_add (tmp, r2, r2size, hierr, hierrsize); + tmpsize = r2size; + } + else + { + cy = __mpn_add (tmp, hierr, hierrsize, r2, r2size); + tmpsize = hierrsize; + } + if (cy != 0) + tmp[tmpsize++] = cy; + } + } /* End CutOffAdjust. */ + + } while (MPN_GE (tmp, scale2)); + + /* End Fixup. */ + + /* First digit. */ + + hack_digit (); + + if (type == 'e') + { + /* Exponential notation. */ + + int expt = k; /* Base-10 exponent. */ + int expt_neg; + + expt_neg = k < 0; + if (expt_neg) + expt = - expt; + + /* Find the magnitude of the exponent. */ + j = 10; + while (j <= expt) + j *= 10; + + /* Write the first digit. */ + put (digit); + + if (low || high || k == cutoff) + { + if ((tolower (info->spec) != 'g' && prec > 0) || info->alt) + put (*decimal); + } + else + { + int stop; + + put (*decimal); + + /* Remaining digits. */ + do + { + stop = hack_digit (); + put (digit); + } while (! stop); + } + + if (tolower (info->spec) != 'g' || info->alt) + /* Pad with zeros. */ + while (--k >= cutoff) + put ('0'); + + /* Write the exponent. */ + put (isupper (info->spec) ? 'E' : 'e'); + put (expt_neg ? '-' : '+'); + if (expt < 10) + /* Exponent always has at least two digits. */ + put ('0'); + do + { + j /= 10; + put ('0' + (expt / j)); + expt %= j; + } + while (j > 1); + } + else + { + /* Decimal fraction notation. */ + + if (k < 0) + { + put ('0'); + if (prec > 0 || info->alt) + put (*decimal); + + /* Write leading fractional zeros. */ + j = 0; + while (--j > k) + put ('0'); + } + + put (digit); + if (!low && !high && k != cutoff) + { + int stop; + do + { + stop = hack_digit (); + if (k == -1) + put (*decimal); + put (digit); + } while (! stop); + } + + while (k > 0) + { + put ('0'); + --k; + } + if ((type != 'g' && prec > 0) || info->alt) + { + if (k == 0) + put (*decimal); + while (k-- > -prec) + put ('0'); + } + } + } + +#undef put + + /* The number is all converted in BUF. + Now write it with sign and appropriate padding. */ + + if (is_neg || info->showsign || info->space) + --width; + + width -= bp - buf; + + if (!info->left && info->pad == ' ') + /* Pad with spaces on the left. */ + while (width-- > 0) + outchar (' '); + + /* Write the sign. */ + if (is_neg) + outchar ('-'); + else if (info->showsign) + outchar ('+'); + else if (info->space) + outchar (' '); + + if (!info->left && info->pad == '0') + /* Pad with zeros on the left. */ + while (width-- > 0) + outchar ('0'); + + if (fwrite (buf, bp - buf, 1, s) != 1) + return -1; + done += bp - buf; + + if (info->left) + /* Pad with spaces on the right. */ + while (width-- > 0) + outchar (' '); + + return done; +} + +#if DEBUG +static void +mpn_dump (str, p, size) + char *str; + mp_limb *p; + mp_size_t size; +{ + printf ("%s = ", str); + while (size != 0) + { + size--; + printf ("%08lX", p[size]); + } + printf ("\n"); +} +#endif diff -ruN glibc-1.06/stdio/stdio.h glibc-1.07/stdio/stdio.h --- glibc-1.06/stdio/stdio.h Sun Apr 11 23:17:03 1993 +++ glibc-1.07/stdio/stdio.h Mon Oct 25 17:37:21 1993 @@ -74,8 +74,8 @@ /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ -typedef __ssize_t __io_read __P ((__ptr_t __cookie, char *__buf, - size_t __nbytes)); +typedef __ssize_t __io_read_fn __P ((__ptr_t __cookie, char *__buf, + size_t __nbytes)); /* Write N bytes pointed to by BUF to COOKIE. Write all N bytes unless there is an error. Return number of bytes written, or -1 if @@ -83,8 +83,8 @@ opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ -typedef __ssize_t __io_write __P ((__ptr_t __cookie, __const char *__buf, - size_t __n)); +typedef __ssize_t __io_write_fn __P ((__ptr_t __cookie, __const char *__buf, + size_t __n)); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), @@ -92,18 +92,23 @@ or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ -typedef int __io_seek __P ((__ptr_t __cookie, fpos_t *__pos, int __w)); +typedef int __io_seek_fn __P ((__ptr_t __cookie, fpos_t *__pos, int __w)); /* Close COOKIE. */ -typedef int __io_close __P ((__ptr_t __cookie)); +typedef int __io_close_fn __P ((__ptr_t __cookie)); +/* Return the file descriptor associated with COOKIE, + or -1 on error. There need not be any associated file descriptor. */ +typedef int __io_fileno_fn __P ((__ptr_t __cookie)); + /* Low level interface, independent of FILE representation. */ typedef struct { - __io_read *__read; /* Read bytes. */ - __io_write *__write; /* Write bytes. */ - __io_seek *__seek; /* Seek/tell file position. */ - __io_close *__close; /* Close file. */ + __io_read_fn *__read; /* Read bytes. */ + __io_write_fn *__write; /* Write bytes. */ + __io_seek_fn *__seek; /* Seek/tell file position. */ + __io_close_fn *__close; /* Close file. */ + __io_fileno_fn *__fileno; /* Return file descriptor. */ } __io_functions; /* Higher level interface, dependent on FILE representation. */ @@ -120,24 +125,19 @@ /* Default close function. */ -extern __io_close __stdio_close; -/* Open FILE with mode M, return cookie or NULL to use an int in *DP. */ -extern __ptr_t __stdio_open __P ((__const char *__file, __io_mode __m, - int *__dp)); +extern __io_close_fn __stdio_close; +/* Open FILE with mode M, store cookie in *COOKIEPTR. */ +extern int __stdio_open __P ((__const char *__file, __io_mode __m, + __ptr_t *__cookieptr)); /* Put out an error message for when stdio needs to die. */ extern void __stdio_errmsg __P ((__const char *__msg, size_t __len)); -/* Generate a unique file name. */ +/* Generate a unique file name (and possibly open it with mode "w+b"). */ extern char *__stdio_gen_tempname __P ((__const char *__dir, __const char *__pfx, - int __dir_search, size_t *__lenptr)); + int __dir_search, + size_t *__lenptr, + FILE **__streamptr)); -#ifndef __NORETURN -#ifdef __GNUC__ -#define __NORETURN __volatile -#else /* Not GCC. */ -#define __NORETURN -#endif /* GCC. */ -#endif /* __NORETURN not defined. */ /* Print out MESSAGE on the error output and abort. */ extern __NORETURN void __libc_fatal __P ((__const char *__message)); @@ -160,7 +160,6 @@ char *__buffer; /* Base of buffer. */ size_t __bufsize; /* Size of the buffer. */ __ptr_t __cookie; /* Magic cookie. */ - int __fileno; /* System file descriptor. */ __io_mode __mode; /* File access mode. */ __io_functions __io_funcs; /* I/O functions. */ __room_functions __room_funcs;/* I/O buffer room functions. */ @@ -188,9 +187,10 @@ STREAM must be a modifiable lvalue (wow, I got to use that term). See stdio/glue.c for what the confusing bit is about. */ #define __validfp(stream) \ - (stream != NULL && ((stream->__magic == _GLUEMAGIC && \ - (stream = *(FILE **) ((int *) stream)[1])), \ - (stream->__magic == _IOMAGIC))) \ + (stream != NULL && \ + ((stream->__magic == _GLUEMAGIC && \ + (stream = *(((struct { int __magic; FILE **__p; } *) stream)->__p))), \ + (stream->__magic == _IOMAGIC))) /* Clear the error and EOF indicators of STREAM. */ #define __clearerr(stream) ((stream)->__error = (stream)->__eof = 0) @@ -355,7 +355,7 @@ extern int vfprintf __P ((FILE *__s, __const char *__format, __gnuc_va_list __arg)); /* Write formatted output to stdout from argument list ARG. */ -extern int vprintf __P ((__const char *__format, __ptr_t __arg)); +extern int vprintf __P ((__const char *__format, __gnuc_va_list __arg)); /* Write formatted output to S from argument list ARG. */ extern int vsprintf __P ((char *__s, __const char *__format, __gnuc_va_list __arg)); @@ -580,13 +580,7 @@ #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ -extern int fileno __P ((__const FILE *__stream)); - -#ifdef __OPTIMIZE__ -/* The `+ 0' makes this not be an lvalue, so it can't be changed. */ -#define fileno(stream) ((stream)->__fileno + 0) -#endif /* Optimizing. */ - +extern int fileno __P ((FILE *__stream)); #endif /* Use POSIX. */ diff -ruN glibc-1.06/stdio/tempnam.c glibc-1.07/stdio/tempnam.c --- glibc-1.06/stdio/tempnam.c Wed Jun 12 14:11:30 1991 +++ glibc-1.07/stdio/tempnam.c Mon Oct 25 17:39:57 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ { size_t len; register char *s; - register char *t = __stdio_gen_tempname(dir, pfx, 1, &len); + register char *t = __stdio_gen_tempname(dir, pfx, 1, &len, (FILE **) NULL); if (t == NULL) return NULL; diff -ruN glibc-1.06/stdio/temptest.c glibc-1.07/stdio/temptest.c --- glibc-1.06/stdio/temptest.c +++ glibc-1.07/stdio/temptest.c Thu Dec 16 18:00:40 1993 @@ -0,0 +1,31 @@ +#include +#include +#include + +char *files[500]; + +int +main () +{ + char *fn; + FILE *fp; + int i; + + for (i = 0; i < 500; i++) { + fn = __stdio_gen_tempname((CONST char *) NULL, + "file", 0, (size_t *) NULL, (FILE **) NULL); + if (fn == NULL) { + printf ("__stdio_gen_tempname failed\n"); + exit (1); + } + files[i] = strdup (fn); + printf ("file: %s\n", fn); + fp = fopen (fn, "w"); + fclose (fp); + } + + for (i = 0; i < 500; i++) + remove (files[i]); + + exit (0); +} diff -ruN glibc-1.06/stdio/tmpfile.c glibc-1.07/stdio/tmpfile.c --- glibc-1.06/stdio/tmpfile.c Wed Jun 12 14:12:01 1991 +++ glibc-1.07/stdio/tmpfile.c Mon Oct 25 17:38:22 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -27,18 +27,17 @@ FILE * DEFUN_VOID(tmpfile) { - register char *filename; - register FILE *f; + char *filename; + FILE *f; - filename = __stdio_gen_tempname((char *) NULL, "tmpf", 0, (size_t *) NULL); + filename = __stdio_gen_tempname ((char *) NULL, "tmpf", 0, + (size_t *) NULL, &f); if (filename == NULL) return NULL; - f = fopen(filename, "w+b"); - if (f == NULL) - return NULL; /* Note that this relies on the Unix semantics that a file is not really removed until it is closed. */ - (void) remove(filename); + (void) remove (filename); + return f; } diff -ruN glibc-1.06/stdio/tmpnam.c glibc-1.07/stdio/tmpnam.c --- glibc-1.06/stdio/tmpnam.c Wed Jun 12 14:12:13 1991 +++ glibc-1.07/stdio/tmpnam.c Mon Oct 25 17:41:15 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -28,7 +28,7 @@ { register char *t = __stdio_gen_tempname((CONST char *) NULL, (CONST char *) NULL, 0, - (size_t *) NULL); + (size_t *) NULL, (FILE **) NULL); if (t == NULL) return NULL; diff -ruN glibc-1.06/stdio/tst-printf.c glibc-1.07/stdio/tst-printf.c --- glibc-1.06/stdio/tst-printf.c Wed May 19 17:03:12 1993 +++ glibc-1.07/stdio/tst-printf.c Sat Dec 25 01:15:11 1993 @@ -151,13 +151,13 @@ printf("decimal negative:\t\"%d\"\n", -2345); printf("octal negative:\t\"%o\"\n", -2345); printf("hex negative:\t\"%x\"\n", -2345); - printf("long decimal number:\t\"%ld\"\n", -123456); + printf("long decimal number:\t\"%ld\"\n", -123456L); printf("long octal negative:\t\"%lo\"\n", -2345L); - printf("long unsigned decimal number:\t\"%lu\"\n", -123456); - printf("zero-padded LDN:\t\"%010ld\"\n", -123456); + printf("long unsigned decimal number:\t\"%lu\"\n", -123456L); + printf("zero-padded LDN:\t\"%010ld\"\n", -123456L); printf("left-adjusted ZLDN:\t\"%-010ld\"\n", -123456); - printf("space-padded LDN:\t\"%10ld\"\n", -123456); - printf("left-adjusted SLDN:\t\"%-10ld\"\n", -123456); + printf("space-padded LDN:\t\"%10ld\"\n", -123456L); + printf("left-adjusted SLDN:\t\"%-10ld\"\n", -123456L); printf("zero-padded string:\t\"%010s\"\n", shortstr); printf("left-adjusted Z string:\t\"%-010s\"\n", shortstr); @@ -179,13 +179,13 @@ printf("g-style < .1:\t\"%g\"\n", 0.001234); printf("g-style big:\t\"%.60g\"\n", 1e20); - printf (" %6.5lf\n", .099999999860301614); - printf (" %6.5lf\n", .1); - printf ("x%5.4lfx\n", .5); + printf (" %6.5f\n", .099999999860301614); + printf (" %6.5f\n", .1); + printf ("x%5.4fx\n", .5); printf ("%#03x\n", 1); -#if 0 /* XXX printf_fp still broken */ + { double d = FLT_MIN; int niter = 17; @@ -196,7 +196,6 @@ } printf ("%15.5e\n", 4.9406564584124654e-324); -#endif #define FORMAT "|%12.4f|%12.4e|%12.4g|\n" printf (FORMAT, 0.0, 0.0, 0.0); diff -ruN glibc-1.06/stdio/vdprintf.c glibc-1.07/stdio/vdprintf.c --- glibc-1.06/stdio/vdprintf.c Mon May 25 21:46:47 1992 +++ glibc-1.07/stdio/vdprintf.c Thu Jul 22 15:06:02 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,8 +37,7 @@ memset ((PTR) &f, 0, sizeof(f)); f.__magic = _IOMAGIC; f.__mode.__write = 1; - f.__fileno = d; - f.__cookie = (PTR) &f.__fileno; + f.__cookie = (PTR) (long int) d; /* Casting to long quiets GCC on Alpha. */ f.__room_funcs = __default_room_functions; f.__io_funcs = __default_io_functions; f.__seen = 1; diff -ruN glibc-1.06/stdio/vfprintf.c glibc-1.07/stdio/vfprintf.c --- glibc-1.06/stdio/vfprintf.c Thu Apr 8 20:31:42 1993 +++ glibc-1.07/stdio/vfprintf.c Wed Nov 3 08:14:14 1993 @@ -582,6 +582,7 @@ #define _sys_errlist sys_errlist #define _sys_nerr sys_nerr #endif + if (errno < 0 || errno > _sys_nerr) { sprintf (unknown_error, "Unknown error %d", errno); diff -ruN glibc-1.06/stdio/vprintf.c glibc-1.07/stdio/vprintf.c --- glibc-1.06/stdio/vprintf.c Thu Mar 5 18:51:45 1992 +++ glibc-1.07/stdio/vprintf.c Thu Jul 22 15:20:21 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -27,7 +27,7 @@ /* Write formatted output to stdout according to the format string FORMAT, using the argument list in ARG. */ int -DEFUN(vprintf, (format, arg), CONST char *format AND PTR arg) +DEFUN(vprintf, (format, arg), CONST char *format AND __gnuc_va_list arg) { return vfprintf (stdout, format, arg); } diff -ruN glibc-1.06/stdlib/Makefile glibc-1.07/stdlib/Makefile --- glibc-1.06/stdlib/Makefile Wed Mar 17 19:34:02 1993 +++ glibc-1.07/stdlib/Makefile Sat Jan 15 23:49:18 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -38,9 +38,5 @@ distribute := exit.h tests := tst-strtol tst-strtod testmb testrand testsort testdiv - -$(objpfx)testsort.input: /usr/dict/words - cp $< $@ -generated := testsort.input include ../Rules diff -ruN glibc-1.06/stdlib/TAGS glibc-1.07/stdlib/TAGS --- glibc-1.06/stdlib/TAGS Fri May 7 18:44:16 1993 +++ glibc-1.07/stdlib/TAGS Sun Nov 7 08:57:53 1993 @@ -1,38 +1,185 @@ -stdlib.h,1073 -#define _STDLIB_H 25,916 -#define __need_size_t29,1012 -#define __need_wchar_t30,1034 -#define __need_NULL31,1057 -#define __need_Emath34,1098 - } div_t;44,1265 - } ldiv_t;51,1397 -#define RAND_MAX 55,1473 -#define EXIT_FAILURE 60,1622 -#define EXIT_SUCCESS 61,1673 -#define MB_CUR_MAX 66,1863 -#define atof(86,2597 -#define atoi(87,2647 -#define atol(88,2685 -#define random(124,4340 -#define srandom(125,4369 -#define initstate(126,4408 -#define setstate(127,4462 -#define rand(132,4575 -#define srand(133,4610 -#define cfree(152,5299 -#define __NORETURN 169,5759 -#define __NORETURN171,5811 -typedef int (*__compar_fn_t)217,7334 -typedef int (*__compar_fn_t) __P 217,7334 -typedef int (*__compar_fn_t) __P ((__const 217,7334 -typedef int (*__compar_fn_t) __P ((__const __ptr_t,217,7334 -typedef int (*__compar_fn_t) __P ((__const __ptr_t, __const 217,7334 -typedef int (*__compar_fn_t) __P ((__const __ptr_t, __const __ptr_t)217,7334 -typedef __compar_fn_t comparison_fn_t;220,7423 -#define __CONSTVALUE 239,8135 -#define __CONSTVALUE241,8170 -#define mblen(268,9161 +atof.c,19 +DEFUN(atof,27,926 + +atoi.c,19 +DEFUN(atoi,27,921 + +atol.c,19 +DEFUN(atol,27,930 + +../sysdeps/generic/abort.c,26 +DEFUN_VOID(abort)29,1030 + +../sysdeps/i386/abort.c,25 +DEFUN_VOID(abort)25,945 + +bsearch.c,23 +DEFUN(bsearch,26,1016 + +qsort.c,203 +#define SWAP(25,992 +#define MAX_THRESH 40,1521 + } stack_node;47,1670 +#define STACK_SIZE 50,1762 +#define PUSH(51,1813 +#define POP(52,1893 +#define STACK_NOT_EMPTY 53,1968 +DEFUN(_quicksort,80,3184 + +msort.c,74 +#define MEMCPY(26,999 +DEFUN(msort_with_tmp,32,1147 +DEFUN(qsort,74,1780 + +../sysdeps/posix/getenv.c,48 +#define __environ 26,953 +DEFUN(getenv,31,1052 + +../sysdeps/stub/getenv.c,21 +DEFUN(getenv,25,952 + +../sysdeps/posix/putenv.c,48 +#define __environ 26,947 +DEFUN(putenv,31,1059 + +../sysdeps/stub/putenv.c,22 +DEFUN(putenv,26,1022 + +../sysdeps/posix/setenv.c,47 +#define __environ 25,928 +DEFUN(setenv,29,966 + +../sysdeps/stub/setenv.c,21 +DEFUN(setenv,24,891 + +exit.c,20 +DEFUN(exit,38,1252 + +on_exit.c,22 +DEFUN(on_exit,25,939 + +atexit.c,54 +DEFUN(atexit,26,938 +DEFUN_VOID(__new_exitfn)43,1268 + +abs.c,18 +DEFUN(abs,27,936 + +labs.c,19 +DEFUN(labs,28,943 + +div.c,19 +DEFUN(div,62,2855 + +ldiv.c,20 +DEFUN(ldiv,62,2857 + +mblen.c,21 +DEFUN(mblen,28,1003 + +mbstowcs.c,24 +DEFUN(mbstowcs,31,1173 + +mbtowc.c,22 +DEFUN(mbtowc,34,1174 + +wcstombs.c,24 +DEFUN(wcstombs,32,1194 + +wctomb.c,22 +DEFUN(wctomb,32,1126 + +__random.c,670 +#define TYPE_0 73,3873 +#define BREAK_0 74,3891 +#define DEG_0 75,3910 +#define SEP_0 76,3927 +#define TYPE_1 79,3969 +#define BREAK_1 80,3987 +#define DEG_1 81,4007 +#define SEP_1 82,4024 +#define TYPE_2 85,4064 +#define BREAK_2 86,4082 +#define DEG_2 87,4102 +#define SEP_2 88,4120 +#define TYPE_3 91,4163 +#define BREAK_3 92,4181 +#define DEG_3 93,4202 +#define SEP_3 94,4220 +#define TYPE_4 97,4260 +#define BREAK_4 98,4278 +#define DEG_4 99,4299 +#define SEP_4 100,4317 +#define MAX_TYPES 106,4445 +static long int *end_ptr = &randtbl[sizeof(164,7010 +DEFUN(__srandom,175,7681 +DEFUN(__initstate,202,8776 +DEFUN(__setstate,268,10443 +DEFUN_VOID(__random)321,12072 + +random.c,131 + DEFUN_VOID(random)30,1002 + DEFUN(srandom,32,1079 + DEFUN(initstate,34,1193 + DEFUN(setstate,37,1341 + +rand.c,24 +DEFUN_VOID(rand)27,941 + +srand.c,28 + DEFUN(srand,27,953 + +strtod.c,22 +DEFUN(strtod,32,1145 + +strtol.c,71 +#define UNSIGNED 27,951 +#define strtol 38,1381 +DEFUN(strtol,42,1426 + +strtoul.c,25 +#define UNSIGNED 19,825 + +../sysdeps/unix/system.c,23 +#define NO_WAITPID1,0 + +../sysdeps/posix/system.c,105 +#define __environ 29,1000 +#define SHELL_PATH 32,1034 +#define SHELL_NAME 33,1089 +DEFUN(system,37,1205 + +../sysdeps/stub/system.c,21 +DEFUN(system,26,938 + +stdlib.h,751 +#define _STDLIB_H 25,922 +#define __need_size_t29,1018 +#define __need_wchar_t30,1040 +#define __need_NULL31,1063 +#define __need_Emath34,1104 + } div_t;44,1271 + } ldiv_t;51,1403 +#define RAND_MAX 55,1479 +#define EXIT_FAILURE 60,1628 +#define EXIT_SUCCESS 61,1679 +#define MB_CUR_MAX 66,1869 +#define atof(86,2603 +#define atoi(87,2653 +#define atol(88,2691 +#define random(124,4346 +#define srandom(125,4375 +#define initstate(126,4414 +#define setstate(127,4468 +#define rand(132,4581 +#define srand(133,4616 +#define cfree(152,5305 +typedef int (*__compar_fn_t) __P ((__const __ptr_t, __const __ptr_t)208,7105 +typedef __compar_fn_t comparison_fn_t;211,7194 +#define __CONSTVALUE 230,7906 +#define __CONSTVALUE232,7941 +#define mblen(259,8932 alloca.h,105 #define _ALLOCA_H 20,849 diff -ruN glibc-1.06/stdlib/abort.c glibc-1.07/stdlib/abort.c --- glibc-1.06/stdlib/abort.c Sun Mar 8 15:41:13 1992 +++ glibc-1.07/stdlib/abort.c @@ -1,62 +0,0 @@ -/* Copyright (C) 1991 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 -#include -#include -#include -#include -#include - -/* Cause an abnormal program termination with core-dump. */ -__NORETURN -void -DEFUN_VOID(abort) -{ - sig_atomic_t aborting = 0; - sigset_t sigs; - - if (__sigemptyset(&sigs) == 0 && - __sigaddset(&sigs, SIGABRT) == 0) - (void) __sigprocmask(SIG_UNBLOCK, &sigs, (sigset_t *) NULL); - - if (!aborting) - { - aborting = 1; -#ifdef HAVE_GNU_LD - { - extern unsigned long int __libc_atexit[]; - register unsigned long int i; - for (i = 1; i <= __libc_atexit[0]; ++i) - (*(void EXFUN((*), (NOARGS))) __libc_atexit[i])(); - } -#else - { - extern void EXFUN(_cleanup, (NOARGS)); - _cleanup(); - } -#endif - } - - while (1) - if (raise(SIGABRT)) - /* If we can't signal ourselves, exit. */ - _exit(127); - /* If we signal ourselves and are still alive, - or can't exit, loop forever. */ -} diff -ruN glibc-1.06/stdlib/stdlib.h glibc-1.07/stdlib/stdlib.h --- glibc-1.06/stdlib/stdlib.h Mon Nov 16 13:55:29 1992 +++ glibc-1.07/stdlib/stdlib.h Mon Nov 16 13:55:29 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -162,15 +162,6 @@ extern __ptr_t valloc __P ((size_t __size)); #endif - -#ifndef __NORETURN -#ifdef __GNUC__ -/* The `volatile' keyword tells GCC that a function never returns. */ -#define __NORETURN __volatile -#else /* Not GCC. */ -#define __NORETURN -#endif /* GCC. */ -#endif /* __NORETURN not defined. */ /* Abort execution and generate a core-dump. */ extern __NORETURN void abort __P ((void)); diff -ruN glibc-1.06/stdlib/testsort.c glibc-1.07/stdlib/testsort.c --- glibc-1.06/stdlib/testsort.c Mon May 11 02:15:01 1992 +++ glibc-1.07/stdlib/testsort.c Sat Jan 15 23:48:43 1994 @@ -9,25 +9,24 @@ return strcmp (*(char **) a, *(char **) b); } + int DEFUN_VOID(main) { - static char *lines[500]; - static size_t lens[500]; - size_t i; + char bufs[20][500]; + char *lines[500]; + size_t lens[500]; + size_t i, j; - i = 0; - while (i < 500 && getline (&lines[i], &lens[500], stdin) > 0) - ++i; - if (i < 500) - lines[i] = NULL; + srandom (1); - while (--i > 0) + for (i = 0; i < 500; ++i) { - size_t swap = random () % i; - char *line = lines[swap]; - lines[swap] = lines[i]; - lines[i] = line; + lens[i] = random() % 19; + lines[i] = bufs[i]; + for (j = 0; j < lens[i]; ++j) + lines[i][j] = random() % 26 + 'a'; + lines[i][j] = '\0'; } qsort (lines, 500, sizeof (char *), compare); diff -ruN glibc-1.06/stdlib/testsort.input glibc-1.07/stdlib/testsort.input --- glibc-1.06/stdlib/testsort.input Thu Aug 6 21:10:09 1992 +++ glibc-1.07/stdlib/testsort.input @@ -1,25144 +0,0 @@ -10th -1st -2nd -3rd -4th -5th -6th -7th -8th -9th -a -AAA -AAAS -Aarhus -Aaron -AAU -ABA -Ababa -aback -abacus -abalone -abandon -abase -abash -abate -abater -abbas -abbe -abbey -abbot -Abbott -abbreviate -abc -abdicate -abdomen -abdominal -abduct -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberrate -abet -abetted -abetting -abeyance -abeyant -abhorred -abhorrent -abide -Abidjan -Abigail -abject -ablate -ablaze -able -ablution -Abner -abnormal -Abo -aboard -abode -abolish -abolition -abominable -abominate -aboriginal -aborigine -aborning -abort -abound -about -above -aboveboard -aboveground -abovementioned -abrade -Abraham -Abram -Abramson -abrasion -abrasive -abreact -abreast -abridge -abridgment -abroad -abrogate -abrupt -abscess -abscissa -abscissae -absence -absent -absentee -absenteeism -absentia -absentminded -absinthe -absolute -absolution -absolve -absorb -absorbent -absorption -absorptive -abstain -abstention -abstinent -abstract -abstracter -abstractor -abstruse -absurd -abuilding -abundant -abusable -abuse -abusive -abut -abutted -abutting -abysmal -abyss -Abyssinia -AC -academe -academia -academic -academician -academy -Acadia -acanthus -Acapulco -accede -accelerate -accelerometer -accent -accentual -accentuate -accept -acceptant -acceptor -access -accessible -accession -accessory -accident -accidental -accipiter -acclaim -acclamation -acclimate -accolade -accommodate -accompaniment -accompanist -accompany -accomplice -accomplish -accord -accordant -accordion -accost -account -accountant -Accra -accredit -accreditate -accreditation -accretion -accrual -accrue -acculturate -accumulate -accuracy -accurate -accusation -accusative -accusatory -accuse -accustom -ace -acerbic -acerbity -acetate -acetic -acetone -acetylene -ache -achieve -Achilles -aching -achromatic -acid -acidic -acidulous -Ackerman -Ackley -acknowledge -acknowledgeable -ACM -acme -acolyte -acorn -acoustic -acquaint -acquaintance -acquiesce -acquiescent -acquire -acquisition -acquisitive -acquit -acquittal -acquitting -acre -acreage -acrid -acrimonious -acrimony -acrobacy -acrobat -acrobatic -acronym -acropolis -across -acrylate -acrylic -ACS -act -Actaeon -actinic -actinide -actinium -actinolite -actinometer -activate -activation -activism -Acton -actor -actress -Acts -actual -actuarial -actuate -acuity -acumen -acute -acyclic -ad -Ada -adage -adagio -Adair -Adam -adamant -Adams -Adamson -adapt -adaptation -adaptive -add -added -addend -addenda -addendum -addict -Addis -Addison -addition -additional -additive -addle -address -addressee -Addressograph -adduce -Adelaide -Adele -Adelia -Aden -adenine -adenoma -adenosine -adept -adequacy -adequate -adhere -adherent -adhesion -adhesive -adiabatic -adieu -adipic -Adirondack -adjacent -adject -adjectival -adjective -adjoin -adjoint -adjourn -adjudge -adjudicate -adjunct -adjust -adjutant -Adkins -Adler -administer -administrable -administrate -administratrix -admiral -admiralty -admiration -admire -admissible -admission -admit -admittance -admitted -admitting -admix -admixture -admonish -admonition -ado -adobe -adolescent -Adolph -Adolphus -Adonis -adopt -adoption -adoptive -adore -adorn -adposition -adrenal -adrenaline -Adrian -Adriatic -Adrienne -adrift -adroit -adsorb -adsorbate -adsorption -adsorptive -adulate -adult -adulterate -adulterous -adultery -adulthood -advance -advantage -advantageous -advent -adventitious -adventure -adventurous -adverb -adverbial -adversary -adverse -advert -advertise -advice -advisable -advise -advisee -advisor -advisory -advocacy -advocate -Aegean -aegis -Aeneas -Aeneid -aeolian -Aeolus -aerate -aerial -Aerobacter -aerobic -aerodynamic -aerogene -aeronautic -aerosol -aerospace -Aeschylus -aesthete -aesthetic -afar -affable -affair -affect -affectate -affectation -affectionate -afferent -affiance -affidavit -affiliate -affine -affinity -affirm -affirmation -affirmative -affix -afflict -affluence -affluent -afford -afforest -afforestation -affricate -affront -Afghan -Afghanistan -aficionado -afield -afire -aflame -afloat -afoot -aforementioned -aforesaid -aforethought -afoul -afraid -afresh -Africa -afro -aft -aftereffect -afterglow -afterimage -afterlife -aftermath -afternoon -afterthought -afterward -afterword -again -against -Agamemnon -agate -Agatha -agave -age -Agee -agenda -agent -agglomerate -agglutinate -agglutinin -aggravate -aggregate -aggression -aggressive -aggressor -aggrieve -aghast -agile -aging -agitate -agleam -Agnes -Agnew -agnomen -agnostic -ago -agone -agony -agouti -agrarian -agree -agreeable -agreed -agreeing -agribusiness -Agricola -agricultural -agriculture -agrimony -ague -Agway -ah -ahead -ahem -Ahmadabad -Ahmedabad -ahoy -aid -Aida -aide -Aides -Aiken -ail -ailanthus -aile -Aileen -aileron -aim -ain't -Ainu -air -airborne -aircraft -airdrop -airedale -Aires -airfare -airfield -airflow -airfoil -airframe -airlift -airline -airlock -airmail -airman -airmass -airmen -airpark -airplane -airport -airspace -airspeed -airstrip -airtight -airway -airy -aisle -Aitken -ajar -Ajax -AK -Akers -akin -Akron -AL -ala -Alabama -Alabamian -alabaster -alacrity -alai -Alameda -Alamo -Alan -alan -alarm -Alaska -alb -alba -albacore -Albania -Albanian -Albany -albatross -albeit -Alberich -Albert -Alberta -Alberto -Albrecht -Albright -album -albumin -Albuquerque -Alcestis -alchemy -Alcmena -Alcoa -alcohol -alcoholic -alcoholism -Alcott -alcove -Aldebaran -aldehyde -Alden -alder -alderman -aldermen -Aldrich -aldrin -ale -Alec -Aleck -aleph -alert -alewife -Alex -Alexander -Alexandra -Alexandre -Alexandria -Alexei -Alexis -alfalfa -Alfonso -alfonso -Alfred -Alfredo -alfresco -alga -algae -algaecide -algal -algebra -algebraic -Algenib -Alger -Algeria -Algerian -Algiers -alginate -Algol -Algonquin -algorithm -algorithmic -Alhambra -Ali -alia -alias -alibi -Alice -Alicia -alien -alienate -alight -align -alike -alimony -aliphatic -aliquot -Alison -Alistair -alive -alizarin -alkali -alkaline -alkaloid -alkane -alkene -all -Allah -Allan -allay -allegate -allegation -allege -Allegheny -allegiant -allegoric -allegory -Allegra -allegro -allele -allemand -Allen -Allentown -allergic -allergy -alleviate -alley -alleyway -alliance -allied -alligator -Allis -Allison -alliterate -allocable -allocate -allot -allotropic -allotted -allotting -allow -allowance -alloy -allspice -Allstate -allude -allure -allusion -allusive -alluvial -alluvium -ally -allyl -Allyn -alma -Almaden -almagest -almanac -almighty -almond -almost -aloe -aloft -aloha -alone -along -alongside -aloof -aloud -alp -alpenstock -Alpert -alpha -alphabet -alphabetic -alphameric -alphanumeric -Alpheratz -Alphonse -alpine -Alps -already -Alsatian -also -Alsop -Altair -altar -alter -alterate -alteration -altercate -alterman -altern -alternate -althea -although -altimeter -altitude -alto -altogether -Alton -altruism -altruist -alum -alumina -aluminate -alumna -alumnae -alumni -alumnus -alundum -Alva -Alvarez -alveolar -alveoli -alveolus -Alvin -alway -always -alyssum -am -A&M -AMA -Amadeus -amalgam -amalgamate -amanita -amanuensis -amaranth -Amarillo -amass -amateur -amateurish -amatory -amaze -Amazon -ambassador -amber -ambiance -ambidextrous -ambient -ambiguity -ambiguous -ambition -ambitious -ambivalent -amble -ambling -ambrose -ambrosia -ambrosial -ambulant -ambulate -ambulatory -ambuscade -ambush -Amelia -ameliorate -amen -amend -amende -Amerada -America -American -Americana -Americanism -americium -Ames -Ameslan -amethyst -amethystine -Amherst -ami -amicable -amid -amide -amidst -amigo -amino -aminobenzoic -amiss -amity -Amman -Ammerman -ammeter -ammo -ammonia -ammoniac -ammonium -ammunition -amnesia -Amoco -amoeba -amoebae -amok -among -amongst -amoral -amorous -amorphous -amort -Amos -amount -amp -amperage -ampere -ampersand -Ampex -amphetamine -amphibian -amphibious -amphibole -amphibology -amphioxis -ample -amplifier -amplify -amplitude -amply -amputate -amputee -amra -Amsterdam -Amtrak -amulet -amuse -Amy -amy -amygdaloid -an -ana -Anabaptist -Anabel -anachronism -anachronistic -anaconda -anaerobic -anaglyph -anagram -Anaheim -analeptic -analgesic -analogous -analogue -analogy -analyses -analysis -analyst -analytic -anamorphic -anaplasmosis -anarch -anarchic -anarchy -Anastasia -anastigmat -anastigmatic -anastomosis -anastomotic -anathema -Anatole -anatomic -anatomy -ancestor -ancestral -ancestry -anchor -anchorage -anchorite -anchoritism -anchovy -ancient -ancillary -and -Andean -Andersen -Anderson -Andes -andesine -andesite -andiron -Andorra -Andover -Andre -Andrea -Andrei -Andrew -Andrews -Andromache -Andromeda -Andy -anecdotal -anecdote -anemone -anent -anew -angel -Angela -Angeles -angelfish -angelic -Angelica -Angelina -Angeline -Angelo -anger -Angie -angiosperm -angle -Angles -Anglican -Anglicanism -angling -Anglo -Anglophobia -Angola -Angora -angry -angst -angstrom -anguish -angular -Angus -anharmonic -Anheuser -anhydride -anhydrite -anhydrous -ani -aniline -animadversion -animadvert -animal -animate -animism -animosity -anion -anionic -anise -aniseikonic -anisotropic -anisotropy -Anita -Ankara -ankle -Ann -Anna -annal -Annale -Annalen -annals -Annapolis -Anne -anneal -Annette -annex -Annie -annihilate -anniversary -annotate -announce -annoy -annoyance -annual -annuity -annul -annular -annuli -annulled -annulling -annulus -annum -annunciate -anode -anodic -anomalous -anomaly -anomie -anonymity -anonymous -anorexia -anorthic -anorthite -anorthosite -another -Anselm -Anselmo -ANSI -answer -ant -antacid -Antaeus -antagonism -antagonist -antagonistic -antarctic -Antarctica -Antares -ante -anteater -antebellum -antecedent -antedate -antelope -antenna -antennae -anterior -anteroom -anthem -anther -anthology -Anthony -anthracite -anthracnose -anthropogenic -anthropology -anthropomorphic -anthropomorphism -anti -antic -anticipate -anticipatory -Antietam -antigen -Antigone -antigorite -antimony -Antioch -antipasto -antipathy -antiperspirant -antiphonal -antipode -antipodean -antipodes -antiquarian -antiquary -antiquated -antique -antiquity -antisemite -antisemitic -antisemitism -antithetic -antler -Antoine -Antoinette -Anton -Antonio -Antony -antonym -Antwerp -anus -anvil -anxiety -anxious -any -anybody -anybody'd -anyhow -anyone -anyplace -anything -anyway -anywhere -aorta -apace -A&P -apache -apart -apartheid -apathetic -apathy -apatite -ape -aperiodic -aperture -apex -aphasia -aphasic -aphelion -aphid -aphorism -Aphrodite -apices -apiece -aplomb -apocalypse -apocalyptic -Apocrypha -apocryphal -apogee -Apollo -Apollonian -apologetic -apologia -apology -apostate -apostle -apostolic -apostrophe -apothecary -apothegm -apotheosis -Appalachia -appall -appanage -apparatus -apparel -apparent -apparition -appeal -appear -appearance -appeasable -appease -appellant -appellate -append -appendage -appendices -appendix -apperception -appertain -appetite -Appian -applaud -applause -apple -Appleby -applejack -Appleton -appliance -applicable -applicant -applicate -application -applied -applique -apply -appoint -appointe -appointee -apport -apportion -apposite -apposition -appraisal -appraise -appreciable -appreciate -apprehend -apprehension -apprehensive -apprentice -apprise -approach -approbation -appropriable -appropriate -approval -approve -approximable -approximant -approximate -Apr -apricot -April -apron -apropos -APS -apse -apt -aptitude -aqua -aquarium -Aquarius -aquatic -aqueduct -aqueous -Aquila -Aquinas -AR -Arab -arabesque -Arabia -Arabic -Araby -Arachne -arachnid -arbiter -arbitrage -arbitrary -arbitrate -arboreal -arboretum -arbutus -arc -arcade -Arcadia -arcana -arcane -arccos -arccosine -arch -archae -archaic -archaism -archangel -archbishop -archdiocese -archenemy -Archer -archery -archetype -archetypical -archfool -Archibald -Archimedes -arching -archipelago -architect -architectonic -architectural -architecture -archival -archive -arcing -arclength -arcsin -arcsine -arctan -arctangent -arctic -Arcturus -Arden -ardency -ardent -arduous -are -area -areaway -areawide -arena -arenaceous -aren't -Arequipa -Ares -Argentina -argillaceous -arginine -Argive -argo -argon -Argonaut -Argonne -argot -argue -argument -argumentation -argumentative -Argus -arhat -Ariadne -Arianism -arid -Aries -arise -arisen -aristocracy -aristocrat -aristocratic -Aristotelean -Aristotelian -Aristotle -arithmetic -Arizona -ark -Arkansan -Arkansas -Arlen -Arlene -Arlington -arm -armada -armadillo -Armageddon -armament -Armata -armature -armchair -Armco -Armenia -Armenian -armful -armhole -armillaria -armistice -armload -armoire -Armonk -Armour -armpit -Armstrong -army -Arnold -aroma -aromatic -arose -around -arousal -arouse -ARPA -arpeggio -arrack -Arragon -arraign -arrange -arrangeable -array -arrear -arrest -Arrhenius -arrival -arrive -arrogant -arrogate -arrow -arrowhead -arrowroot -arroyo -arsenal -arsenate -arsenic -arsenide -arsine -arson -art -Artemis -artemisia -arterial -arteriole -arteriolosclerosis -arteriosclerosis -artery -artful -arthritis -Arthur -artichoke -article -articulate -articulatory -Artie -artifact -artifice -artificial -artillery -artisan -artistry -Arturo -artwork -arty -Aruba -arum -aryl -a's -as -asbestos -ascend -ascendant -ascension -ascent -ascertain -ascetic -asceticism -ascomycetes -ascribe -ascription -aseptic -asexual -ash -ashame -ashamed -ashen -Asher -Asheville -Ashland -Ashley -ashman -ashmen -Ashmolean -ashore -ashtray -ashy -Asia -Asiatic -aside -Asilomar -asinine -ask -askance -askew -asleep -asocial -asparagine -asparagus -aspartic -aspect -aspen -asperity -aspersion -asphalt -aspheric -asphyxiate -aspidistra -aspirant -aspirate -aspire -aspirin -asplenium -ass -assai -assail -assailant -Assam -assassin -assassinate -assault -assay -assemblage -assemble -assent -assert -assess -assessor -asset -assiduity -assiduous -assign -assignation -assignee -assimilable -assimilate -assist -assistant -associable -associate -assonant -assort -assuage -assume -assumption -assurance -assure -Assyria -Assyriology -Astarte -astatine -aster -asteria -asterisk -asteroid -asteroidal -asthma -astigmat -astigmatic -astigmatism -ASTM -astonish -Astor -Astoria -astound -astraddle -astral -astray -astride -astringent -astrology -astronaut -astronautic -astronomer -astronomic -astronomy -astrophysical -astrophysicist -astrophysics -astute -Asuncion -asunder -asylum -asymmetry -asymptote -asymptotic -asynchronous -asynchrony -at -Atalanta -atavism -atavistic -Atchison -ate -Athabascan -atheism -atheist -Athena -Athenian -Athens -athlete -athletic -athwart -Atkins -Atkinson -Atlanta -atlantes -Atlantic -atlantic -Atlantica -Atlantis -atlas -atmosphere -atmospheric -atom -atomic -atonal -atone -atop -Atreus -atrium -atrocious -atrocity -atrophic -atrophy -Atropos -AT&T -attach -attache -attack -attain -attainder -attempt -attend -attendant -attendee -attention -attentive -attenuate -attest -attestation -attic -Attica -attire -attitude -attitudinal -attorney -attract -attribute -attribution -attributive -attrition -attune -Atwater -Atwood -atypic -Auberge -Aubrey -auburn -Auckland -auction -auctioneer -audacious -audacity -audible -audience -audio -audiotape -audiovisual -audit -audition -auditor -auditorium -auditory -Audrey -Audubon -Auerbach -Aug -Augean -augend -auger -augite -augment -augmentation -augur -august -Augusta -Augustan -Augustine -Augustus -auk -aunt -auntie -aura -aural -Aurelius -aureomycin -auric -Auriga -aurochs -aurora -Auschwitz -auspices -auspicious -austenite -austere -Austin -Australia -Australis -australite -Austria -authentic -authenticate -author -authoritarian -authoritative -autism -autistic -auto -autobiography -autoclave -autocollimate -autocorrelate -autocracy -autocrat -autocratic -autograph -automat -automata -automate -automatic -automaton -automobile -automorphic -automorphism -automotive -autonomic -autonomous -autonomy -autopsy -autosuggestible -autotransformer -autumn -autumnal -auxiliary -avail -avalanche -avarice -avaricious -Ave -avenge -Aventine -avenue -aver -average -averred -averring -averse -aversion -avert -avertive -Avery -Avesta -aviary -aviate -aviatrix -avid -avionic -Avis -Aviv -avocado -avocate -avocation -avocet -Avogadro -avoid -avoidance -Avon -avow -avowal -avuncular -await -awake -awaken -award -aware -awash -away -awe -awesome -awful -awhile -awkward -awl -awn -awoke -awry -ax -axe -axes -axial -axiology -axiom -axiomatic -axis -axisymmetric -axle -axolotl -axon -aye -Ayers -Aylesbury -AZ -azalea -Azerbaijan -azimuth -azimuthal -Aztec -Aztecan -azure -b -babbitt -babble -Babcock -babe -Babel -baboon -baby -babyhood -Babylon -Babylonian -babysat -babysit -babysitter -babysitting -baccalaureate -baccarat -Bacchus -Bach -bachelor -bacilli -bacillus -back -backboard -backbone -backdrop -backfill -backgammon -background -backhand -backlash -backlog -backorder -backpack -backplane -backplate -backscatter -backside -backspace -backstage -backstitch -backstop -backtrack -backup -backward -backwater -backwood -backyard -bacon -bacteria -bacterial -bacterium -bad -bade -Baden -badge -badinage -badland -badminton -Baffin -baffle -bag -bagatelle -bagel -baggage -bagging -baggy -Baghdad -Bagley -bagpipe -bah -Bahama -Bahrein -bail -Bailey -bailiff -bainite -Baird -bait -bake -Bakelite -Bakersfield -bakery -Bakhtiari -baklava -Baku -balance -Balboa -balcony -bald -baldpate -Baldwin -baldy -bale -baleen -baleful -Balfour -Bali -Balinese -balk -Balkan -balky -ball -ballad -Ballard -ballast -balled -ballerina -ballet -balletic -balletomane -ballfield -balloon -ballot -ballroom -ballyhoo -balm -balmy -balsa -balsam -Baltic -Baltimore -Baltimorean -balustrade -Balzac -bam -Bamako -Bamberger -Bambi -bamboo -ban -Banach -banal -banana -Banbury -band -bandage -bandgap -bandit -bandpass -bandstand -bandstop -bandwagon -bandwidth -bandy -bane -baneberry -baneful -bang -bangkok -Bangladesh -bangle -Bangor -Bangui -banish -banister -banjo -bank -bankrupt -bankruptcy -Banks -banquet -banshee -bantam -banter -Bantu -Bantus -baptism -baptismal -Baptist -Baptiste -baptistery -bar -barb -Barbados -Barbara -barbarian -barbaric -barbarism -barbarous -barbecue -barbell -barber -barberry -barbital -barbiturate -Barbour -barbudo -Barcelona -Barclay -bard -bare -barefaced -barefoot -barfly -bargain -barge -baritone -barium -bark -barkeep -barley -Barlow -barn -Barnabas -barnacle -Barnard -Barnes -Barnet -Barnett -Barney -Barnhard -barnstorm -barnyard -barometer -baron -baroness -baronet -baronial -barony -baroque -Barr -barrack -barracuda -barrage -barre -barrel -barren -Barrett -barrette -barricade -barrier -Barrington -barrow -Barry -Barrymore -Barstow -Bart -bartend -bartender -barter -Barth -Bartholomew -Bartlett -Bartok -Barton -barycentric -basal -basalt -base -baseball -baseband -baseboard -Basel -baseline -baseman -basemen -baseplate -basepoint -bash -bashaw -bashful -basic -basidiomycetes -basil -basilar -basilisk -basin -basis -bask -basket -basketball -basophilic -bass -Bassett -bassi -bassinet -basso -basswood -bastard -baste -bastion -bat -Batavia -batch -Batchelder -bate -bateau -Bateman -bater -Bates -bath -bathe -bathos -bathrobe -bathroom -bathtub -Bathurst -batik -baton -Bator -batt -battalion -Battelle -batten -battery -battle -battlefield -battlefront -battleground -batwing -bauble -baud -Baudelaire -Bauer -Bauhaus -Bausch -bauxite -Bavaria -bawd -bawdy -bawl -Baxter -bay -bayberry -Bayda -bayed -Bayesian -Baylor -bayonet -Bayonne -bayou -Bayport -Bayreuth -bazaar -be -beach -beachcomb -beachhead -beacon -bead -beadle -beady -beak -beam -bean -bear -bearberry -beard -Beardsley -bearish -beast -beastie -beat -beaten -beater -beatific -beatify -beatitude -beatnik -Beatrice -beau -Beaujolais -Beaumont -Beauregard -beauteous -beautiful -beautify -beauty -beaux -beaver -bebop -becalm -became -because -Bechtel -beck -Becker -becket -Beckman -beckon -Becky -becloud -become -bed -bedazzle -bedbug -bedevil -bedfast -Bedford -bedim -bedimmed -bedimming -bedlam -bedpost -bedraggle -bedridden -bedrock -bedroom -bedside -bedspread -bedspring -bedstraw -bedtime -bee -Beebe -beebread -beech -Beecham -beechwood -beef -beefsteak -beefy -beehive -been -beep -beer -beet -Beethoven -beetle -befall -befallen -befell -befit -befitting -befog -befogging -before -beforehand -befoul -befuddle -beg -began -beget -begetting -beggar -beggary -begging -begin -beginner -beginning -begonia -begotten -begrudge -beguile -begun -behalf -behave -behavioral -behead -beheld -behest -behind -behold -beige -Beijing -being -Beirut -bel -Bela -belate -belch -Belfast -belfry -Belgian -Belgium -Belgrade -belie -belief -belies -believe -belittle -bell -Bella -belladonna -Bellamy -Bellatrix -bellboy -belle -bellflower -bellhop -bellicose -belligerent -Bellingham -Bellini -bellman -bellmen -bellow -bellum -bellwether -belly -bellyache -bellyfull -Belmont -Beloit -belong -belove -below -Belshazzar -belt -Beltsville -belvedere -belvidere -belying -BEMA -bemadden -beman -bemoan -bemuse -Ben -bench -benchmark -bend -Bender -Bendix -beneath -Benedict -Benedictine -benediction -Benedikt -benefactor -benefice -beneficent -beneficial -beneficiary -benefit -Benelux -benevolent -Bengal -Bengali -benight -benign -Benjamin -Bennett -Bennington -Benny -Benson -bent -Bentham -benthic -Bentley -Benton -Benz -Benzedrine -benzene -Beograd -Beowulf -beplaster -bequeath -bequest -berate -Berea -bereave -bereft -Berenices -Beresford -beret -berg -bergamot -Bergen -Bergland -Berglund -Bergman -Bergson -Bergstrom -beribbon -beriberi -Berkeley -berkelium -Berkowitz -Berkshire -Berlin -Berlioz -Berlitz -Berman -Bermuda -Bern -Bernadine -Bernard -Bernardino -Bernardo -berne -Bernet -Bernhard -Bernice -Bernie -Berniece -Bernini -Bernoulli -Bernstein -Berra -berry -berserk -Bert -berth -Bertha -Bertie -Bertram -Bertrand -Berwick -beryl -beryllium -beseech -beset -besetting -beside -besiege -besmirch -besotted -bespeak -bespectacled -bespoke -Bess -Bessel -Bessemer -Bessie -best -bestial -bestir -bestirring -bestow -bestowal -bestseller -bestselling -bestubble -bet -beta -betatron -betel -Betelgeuse -beth -bethel -Bethesda -Bethlehem -bethought -betide -betoken -betony -betray -betrayal -betrayer -betroth -betrothal -Betsey -Betsy -Bette -bettor -Betty -between -betwixt -bevel -beverage -Beverly -bevy -bewail -beware -bewhisker -bewilder -bewitch -bey -beyond -bezel -bhoy -Bhutan -Bialystok -bianco -bias -biaxial -bib -bibb -Bible -biblical -bibliography -bibliophile -bicameral -bicarbonate -bicentennial -bicep -biceps -bichromate -bicker -biconcave -biconnected -bicycle -bid -biddable -bidden -biddy -bide -bidiagonal -bidirectional -bien -biennial -biennium -bifocal -bifurcate -big -Bigelow -Biggs -bigot -bigotry -biharmonic -bijection -bijective -bijouterie -bike -bikini -bilabial -bilateral -bilayer -bile -bilge -bilharziasis -bilinear -bilingual -bilk -bill -billboard -billet -billfold -billiard -Billie -Billiken -Billings -billion -billionth -billow -billy -Biltmore -bimetallic -bimetallism -Bimini -bimodal -bimolecular -bimonthly -bin -binary -binaural -bind -bindery -bindle -bindweed -bing -binge -Bingham -Binghamton -bingle -Bini -binocular -binomial -binuclear -biochemic -biography -biology -Biometrika -biometry -biopsy -biota -biotic -biotite -bipartisan -bipartite -biplane -bipolar -biracial -birch -bird -birdbath -birdie -birdlike -birdseed -birdwatch -birefringent -Birgit -Birmingham -birth -birthday -birthplace -birthright -biscuit -bisect -bisexual -bishop -bishopric -Bismarck -Bismark -bismuth -bison -bisque -Bissau -bistable -bistate -bit -bitch -bite -bitnet -bitt -bitten -bittern -bitternut -bitterroot -bittersweet -bitumen -bituminous -bitwise -bivalve -bivariate -bivouac -biz -bizarre -Bizet -blab -black -blackball -blackberry -blackbird -blackboard -blackbody -Blackburn -blacken -Blackfeet -blackjack -blackmail -Blackman -blackout -blacksmith -Blackstone -Blackwell -bladder -bladdernut -bladderwort -blade -Blaine -Blair -Blake -blame -blameworthy -blanc -blanch -Blanchard -Blanche -bland -blandish -blank -blanket -blare -blaspheme -blasphemous -blasphemy -blast -blastula -blat -blatant -blather -Blatz -blaze -blazon -bleach -bleak -bleary -bleat -bled -bleed -Bleeker -blemish -blend -Blenheim -bless -blest -blew -blight -blimp -blind -blindfold -blink -Blinn -blip -bliss -blissful -blister -blithe -blitz -blizzard -bloat -blob -bloc -Bloch -block -blockade -blockage -blockhouse -blocky -bloke -Blomberg -Blomquist -blond -blonde -blood -bloodbath -bloodhound -bloodline -bloodroot -bloodshed -bloodshot -bloodstain -bloodstone -bloodstream -bloody -bloom -Bloomfield -Bloomington -bloop -blossom -blot -blotch -blouse -blow -blowback -blowfish -blown -blowup -blubber -bludgeon -blue -blueback -blueberry -bluebill -bluebird -bluebonnet -bluebook -bluebush -bluefish -bluegill -bluegrass -bluejacket -blueprint -bluestocking -bluet -bluff -bluish -Blum -Blumenthal -blunder -blunt -blur -blurb -blurry -blurt -blush -bluster -blustery -blutwurst -Blvd -Blythe -BMW -boa -boar -board -boardinghouse -boast -boastful -boat -boathouse -boatload -boatman -boatmen -boatswain -boatyard -bob -Bobbie -bobbin -bobble -bobby -bobcat -bobolink -Boca -bock -bocklogged -bode -bodhisattva -bodice -bodied -Bodleian -body -bodybuild -bodybuilder -bodybuilding -bodyguard -Boeing -Boeotia -Boeotian -bog -bogey -bogeymen -bogging -boggle -boggy -Bogota -bogus -bogy -Bohemia -Bohr -boil -Bois -Boise -boisterous -bold -boldface -bole -boletus -bolivar -Bolivia -bolo -Bologna -bolometer -Bolshevik -Bolshevism -Bolshevist -Bolshoi -bolster -bolt -Bolton -Boltzmann -bomb -bombard -bombast -bombastic -Bombay -bombproof -bon -bona -bonanza -Bonaparte -Bonaventure -bond -bondage -bondholder -bondsman -bondsmen -bone -bonfire -bong -bongo -Boniface -bonito -Bonn -bonnet -Bonneville -Bonnie -bonus -bony -bonze -boo -booby -boogie -book -bookbind -bookcase -bookend -bookie -bookish -bookkeep -booklet -bookmobile -bookplate -bookseller -bookshelf -bookshelves -bookstore -booky -boolean -boom -boomerang -boon -Boone -boor -boorish -boost -boot -Bootes -booth -bootleg -bootlegged -bootlegger -bootlegging -bootstrap -bootstrapped -bootstrapping -booty -booze -bop -borate -borax -Bordeaux -bordello -Borden -border -borderland -borderline -bore -Borealis -Boreas -boredom -Borg -boric -Boris -born -borne -Borneo -boron -borosilicate -borough -Borroughs -borrow -Bosch -Bose -bosom -boson -bosonic -boss -Boston -Bostonian -Boswell -botanic -botanist -botany -botch -botfly -both -bothersome -Botswana -bottle -bottleneck -bottom -bottommost -botulin -botulism -Boucher -bouffant -bough -bought -boulder -boule -boulevard -bounce -bouncy -bound -boundary -bounty -bouquet -Bourbaki -bourbon -bourgeois -bourgeoisie -bourn -boustrophedon -bout -boutique -bovine -bow -Bowditch -Bowdoin -bowel -Bowen -bowfin -bowie -bowl -bowline -bowman -bowmen -bowstring -box -boxcar -boxwood -boxy -boy -boyar -Boyce -boycott -Boyd -boyfriend -boyhood -boyish -Boyle -Boylston -BP -brace -bracelet -bracken -bracket -brackish -bract -brad -Bradbury -Bradford -Bradley -Bradshaw -Brady -brae -brag -Bragg -braggart -bragging -Brahmaputra -Brahms -Brahmsian -braid -Braille -brain -Brainard -brainchild -brainchildren -brainstorm -brainwash -brainy -brake -brakeman -bramble -bran -branch -brand -Brandeis -Brandenburg -brandish -Brandon -Brandt -brandy -brandywine -Braniff -brant -brash -Brasilia -brass -brassiere -brassy -bratwurst -Braun -bravado -brave -bravery -bravo -bravura -brawl -bray -brazen -brazier -Brazil -Brazilian -Brazzaville -breach -bread -breadboard -breadfruit -breadroot -breadth -breadwinner -break -breakage -breakaway -breakdown -breakfast -breakoff -breakpoint -breakthrough -breakup -breakwater -bream -breast -breastplate -breastwork -breath -breathe -breathtaking -breathy -breccia -bred -breech -breeches -breed -breeze -breezy -Bremen -bremsstrahlung -Brenda -Brendan -Brennan -Brenner -Brent -Brest -brethren -Breton -Brett -breve -brevet -brevity -brew -brewery -Brewster -Brian -briar -bribe -bribery -Brice -brick -brickbat -bricklay -bricklayer -bricklaying -bridal -bride -bridegroom -bridesmaid -bridge -bridgeable -bridgehead -Bridgeport -Bridget -Bridgetown -Bridgewater -bridgework -bridle -brief -briefcase -brig -brigade -brigadier -brigantine -Briggs -Brigham -bright -brighten -Brighton -brilliant -Brillouin -brim -brimful -brimstone -Brindisi -brindle -brine -bring -brink -brinkmanship -briny -Brisbane -brisk -bristle -Bristol -Britain -Britannic -Britannica -britches -British -Briton -Brittany -Britten -brittle -broach -broad -broadcast -broaden -broadloom -broadside -Broadway -brocade -broccoli -brochure -Brock -brockle -Broglie -broil -broke -broken -brokerage -Bromfield -bromide -bromine -Bromley -bronchi -bronchial -bronchiolar -bronchiole -bronchitis -bronchus -bronco -Brontosaurus -Bronx -bronze -bronzy -brood -broody -brook -Brooke -Brookhaven -Brookline -Brooklyn -brookside -broom -broomcorn -broth -brothel -brother -brotherhood -brought -brouhaha -brow -browbeaten -brown -Browne -Brownell -Brownian -brownie -brownish -browse -Bruce -brucellosis -Bruckner -Bruegel -bruise -bruit -Brumidi -brunch -brunette -Brunhilde -Bruno -Brunswick -brunt -brush -brushfire -brushlike -brushwork -brushy -brusque -Brussels -brutal -brute -Bryan -Bryant -Bryce -Bryn -bryophyta -bryophyte -bryozoa -b's -BSTJ -BTL -BTU -bub -bubble -Buchanan -Bucharest -Buchenwald -Buchwald -buck -buckaroo -buckboard -bucket -bucketfull -buckeye -buckhorn -buckle -Buckley -Bucknell -buckshot -buckskin -buckthorn -buckwheat -bucolic -bud -Budapest -Budd -Buddha -Buddhism -Buddhist -buddy -budge -budget -budgetary -Budweiser -Buena -Buenos -buff -buffalo -buffet -bufflehead -buffoon -bug -bugaboo -bugeyed -bugging -buggy -bugle -Buick -build -buildup -built -builtin -Bujumbura -bulb -bulblet -Bulgaria -bulge -bulk -bulkhead -bulky -bull -bulldog -bulldoze -bullet -bulletin -bullfinch -bullfrog -bullhead -bullhide -bullish -bullock -bullseye -bullwhack -bully -bullyboy -bulrush -bulwark -bum -bumble -bumblebee -bump -bumptious -bun -bunch -Bundestag -bundle -Bundoora -bundy -bungalow -bungle -bunk -bunkmate -bunny -Bunsen -bunt -Bunyan -buoy -buoyant -burbank -Burch -burden -burdensome -burdock -bureau -bureaucracy -bureaucrat -bureaucratic -buret -burette -burg -burgeon -burgess -burgher -burglar -burglarproof -burglary -Burgundian -Burgundy -burial -buried -Burke -burl -burlap -burlesque -burley -Burlington -burly -Burma -Burmese -burn -Burnett -Burnham -burnish -burnout -Burnside -burnt -burp -Burr -burro -Burroughs -burrow -bursitis -burst -bursty -Burt -Burton -Burtt -Burundi -bury -bus -busboy -Busch -buses -bush -bushel -bushmaster -Bushnell -bushwhack -bushy -business -businessman -businessmen -buss -bust -bustard -bustle -busy -but -butadiene -butane -butch -butchery -butene -buteo -butler -butt -butte -butterball -buttercup -butterfat -Butterfield -butterfly -buttermilk -butternut -buttery -buttock -button -buttonhole -buttonweed -buttress -Buttrick -butyl -butyrate -butyric -buxom -Buxtehude -Buxton -buy -buyer -buzz -Buzzard -buzzer -buzzing -buzzsaw -buzzword -buzzy -by -bye -Byers -bygone -bylaw -byline -bypass -bypath -byproduct -Byrd -Byrne -byroad -Byron -Byronic -bystander -byte -byway -byword -Byzantine -Byzantium -c -CA -cab -cabal -cabana -cabaret -cabbage -cabdriver -cabin -cabinet -cabinetmake -cabinetry -cable -Cabot -cacao -cachalot -cache -cackle -CACM -cacophonist -cacophony -cacti -cactus -cadaver -cadaverous -caddis -caddy -cadent -cadenza -cadet -Cadillac -cadmium -cadre -Cady -Caesar -cafe -cafeteria -cage -cagey -Cahill -cahoot -caiman -Cain -Caine -cairn -Cairo -cajole -cake -Cal -Calais -calamitous -calamity -calamus -calcareous -calcify -calcine -calcite -calcium -calculable -calculate -calculi -calculus -Calcutta -Calder -caldera -Caldwell -Caleb -calendar -calendrical -calf -calfskin -Calgary -Calhoun -caliber -calibrate -calibre -calico -California -californium -caliper -caliph -caliphate -calisthenic -Calkins -call -calla -Callaghan -Callahan -caller -calligraph -calligraphy -calliope -Callisto -callous -callus -calm -caloric -calorie -calorimeter -Calumet -calumniate -calumny -Calvary -calve -Calvert -Calvin -Calvinist -calypso -cam -camaraderie -camber -Cambodia -Cambrian -cambric -Cambridge -Camden -came -camel -camelback -camellia -camelopard -Camelot -cameo -camera -cameraman -cameramen -Cameron -Cameroun -Camilla -camilla -Camille -Camino -camouflage -camp -campaign -campanile -Campbell -campfire -campground -campion -campsite -campus -can -Canaan -Canada -Canadian -canal -canary -Canaveral -Canberra -cancel -cancellate -cancelled -cancelling -cancer -cancerous -Candace -candela -candelabra -candid -candidacy -candidate -Candide -candle -candlelight -candlelit -candlestick -candlewick -candy -cane -Canfield -canine -Canis -canister -canker -cankerworm -canna -cannabis -cannel -cannery -cannibal -cannister -cannon -cannonball -cannot -canny -canoe -Canoga -canon -canonic -canopy -canst -can't -cant -Cantabrigian -cantaloupe -canteen -Canterbury -canterelle -canticle -cantilever -cantle -canto -canton -Cantonese -cantor -canvas -canvasback -canvass -canyon -cap -capacious -capacitance -capacitate -capacitive -capacitor -capacity -cape -capella -caper -Capetown -capillary -Capistrano -capita -capital -capitol -Capitoline -capitulate -capo -caprice -capricious -Capricorn -capsize -capstan -capstone -capsule -captain -captaincy -caption -captious -captivate -captive -captor -capture -Caputo -capybara -car -carabao -Caracas -caramel -caravan -caraway -carbide -carbine -carbohydrate -Carboloy -carbon -carbonaceous -carbonate -Carbondale -Carbone -carbonic -carbonium -carbonyl -carborundum -carboxy -carboxylic -carboy -carbuncle -carburetor -carcass -carcinogen -carcinogenic -carcinoma -card -cardamom -cardboard -cardiac -Cardiff -cardinal -cardiod -cardioid -cardiology -cardiovascular -care -careen -career -carefree -careful -caress -caret -caretaker -careworn -Carey -carfare -Cargill -cargo -cargoes -Carib -Caribbean -caribou -caricature -Carl -Carla -Carleton -Carlin -Carlisle -Carlo -carload -Carlson -Carlton -Carlyle -Carmela -Carmen -Carmichael -carmine -carnage -carnal -carnation -carne -Carnegie -carney -carnival -carob -carol -Carolina -Caroline -Carolingian -Carolinian -Carolyn -carouse -carp -Carpathia -carpenter -carpentry -carpet -carport -Carr -carrageen -Carrara -carrel -carriage -Carrie -carrion -Carroll -carrot -Carruthers -carry -carryover -Carson -cart -carte -cartel -Cartesian -Carthage -Carthaginian -cartilage -cartilaginous -cartographer -cartographic -cartography -carton -cartoon -cartridge -cartwheel -Caruso -carve -carven -caryatid -Casanova -casbah -cascade -cascara -case -casebook -casein -casework -Casey -cash -cashew -cashier -cashmere -casino -cask -casket -Caspian -Cassandra -casserole -cassette -Cassiopeia -Cassius -cassock -cast -castanet -caste -casteth -castigate -Castillo -castle -castor -Castro -casual -casualty -cat -catabolic -cataclysm -cataclysmic -Catalina -catalogue -catalpa -catalysis -catalyst -catalytic -catapult -cataract -catastrophe -catastrophic -catatonia -catatonic -catawba -catbird -catcall -catch -catchup -catchword -catchy -catechism -categoric -category -catenate -cater -caterpillar -catfish -catharsis -cathedra -cathedral -Catherine -Catherwood -catheter -cathode -cathodic -catholic -Catholicism -Cathy -cation -cationic -catkin -catlike -catnip -Catskill -catsup -cattail -cattle -cattleman -cattlemen -CATV -Caucasian -Caucasus -Cauchy -caucus -caught -cauldron -cauliflower -caulk -causal -causate -causation -cause -caustic -caution -cautionary -cautious -cavalcade -cavalier -cavalry -cave -caveat -caveman -cavemen -Cavendish -cavern -cavernous -caviar -cavil -cavilling -Caviness -cavitate -cavort -caw -cayenne -Cayley -Cayuga -CB -CBS -CCNY -CDC -cease -Cecil -Cecilia -Cecropia -cedar -cede -cedilla -Cedric -ceil -celandine -Celanese -Celebes -celebrant -celebrate -celebrity -celerity -celery -celesta -Celeste -celestial -Celia -celibacy -cell -cellar -cellophane -cellular -celluloid -cellulose -Celsius -Celtic -cement -cemetery -Cenozoic -censor -censorial -censorious -censure -census -cent -centaur -centenary -centennial -centerline -centerpiece -centigrade -centimeter -centipede -central -centrex -centric -centrifugal -centrifugate -centrifuge -centrist -centroid -centum -century -Cepheus -CEQ -ceramic -ceramium -Cerberus -cereal -cerebellum -cerebral -cerebrate -ceremonial -ceremonious -ceremony -Ceres -cereus -cerise -cerium -CERN -certain -certainty -certificate -certified -certify -certiorari -certitude -cerulean -Cervantes -cervix -Cesare -cesium -cessation -cession -Cessna -cetera -Cetus -Ceylon -Cezanne -cf -Chablis -Chad -Chadwick -chafe -chaff -chagrin -chain -chair -chairlady -chairman -chairmen -chairperson -chairwoman -chairwomen -chaise -chalcedony -chalcocite -chalet -chalice -chalk -chalkboard -chalkline -chalky -challenge -Chalmers -chamber -chamberlain -chambermaid -Chambers -chameleon -chamfer -chamois -chamomile -champ -champagne -Champaign -champion -Champlain -chance -chancel -chancellor -chancery -chancy -chandelier -chandler -Chang -change -changeable -changeover -channel -chanson -chant -chantey -Chantilly -chantry -Chao -chaos -chaotic -chap -chaparral -chapel -chaperon -chaperone -chaplain -chaplaincy -Chaplin -Chapman -chapter -char -character -characteristic -charcoal -chard -charge -chargeable -chariot -charisma -charismatic -charitable -charity -Charlemagne -Charles -Charleston -Charley -Charlie -Charlotte -Charlottesville -charm -Charon -chart -Charta -Chartres -chartreuse -chartroom -Charybdis -chase -chasm -chassis -chaste -chastise -chastity -chat -chateau -chateaux -Chatham -Chattanooga -chattel -chatty -Chaucer -chauffeur -Chauncey -Chautauqua -chaw -cheap -cheat -cheater -check -checkbook -checkerberry -checkerboard -checklist -checkmate -checkout -checkpoint -checksum -checksummed -checksumming -checkup -cheek -cheekbone -cheeky -cheer -cheerful -cheerlead -cheerleader -cheery -cheese -cheesecake -cheesecloth -cheesy -cheetah -chef -chelate -chemic -chemise -chemisorb -chemisorption -chemist -chemistry -chemotherapy -Chen -Cheney -chenille -cherish -Cherokee -cherry -chert -cherub -cherubim -Cheryl -Chesapeake -Cheshire -chess -chest -Chester -Chesterton -chestnut -chevalier -Chevrolet -chevron -Chevy -chevy -chew -Cheyenne -chi -Chiang -chianti -chic -Chicago -Chicagoan -chicanery -Chicano -chick -chickadee -chicken -chickweed -chicory -chide -chief -chiefdom -chieftain -chiffon -chigger -chignon -chilblain -child -childbear -childbirth -childhood -childish -childlike -children -Chile -Chilean -chili -chill -chilly -chime -chimera -chimeric -Chimique -chimney -chimpanzee -chin -china -Chinaman -Chinamen -Chinatown -chinch -chinchilla -chine -Chinese -chink -Chinook -chinquapin -chip -chipboard -chipmunk -Chippendale -chiropractor -chirp -chisel -Chisholm -chit -chiton -chivalrous -chivalry -chive -chlorate -chlordane -chloride -chlorinate -chlorine -chloroform -chlorophyll -chloroplast -chloroplatinate -chock -chocolate -Choctaw -choice -choir -choirmaster -choke -chokeberry -cholera -cholesterol -cholinesterase -chomp -Chomsky -choose -choosy -chop -Chopin -choppy -choral -chorale -chord -chordal -chordata -chordate -chore -choreograph -choreography -chorine -chortle -chorus -chose -chosen -Chou -chow -chowder -Chris -Christ -christen -Christendom -Christensen -Christenson -Christian -Christiana -Christianson -Christie -Christina -Christine -Christlike -Christmas -Christoffel -Christoph -Christopher -Christy -chromate -chromatic -chromatin -chromatogram -chromatograph -chromatography -chrome -chromic -chromium -chromosome -chromosphere -chronic -chronicle -chronograph -chronography -chronology -chrysanthemum -Chrysler -chrysolite -chub -chubby -chuck -chuckle -chuckwalla -chuff -chug -chugging -chum -chummy -chump -Chungking -chunk -chunky -church -churchgo -churchgoer -churchgoing -Churchill -Churchillian -churchman -churchmen -churchwoman -churchwomen -churchyard -churn -chute -chutney -CIA -cicada -Cicero -Ciceronian -cider -cigar -cigarette -cilia -ciliate -cinch -Cincinnati -cinder -Cinderella -Cindy -cinema -cinematic -Cinerama -cinnabar -cinnamon -cinquefoil -cipher -circa -Circe -circle -circlet -circuit -circuitous -circuitry -circulant -circular -circulate -circulatory -circumcircle -circumcise -circumcision -circumference -circumferential -circumflex -circumlocution -circumpolar -circumscribe -circumscription -circumspect -circumsphere -circumstance -circumstantial -circumvent -circumvention -circus -cistern -cit -citadel -citation -cite -citizen -citizenry -citrate -citric -Citroen -citron -citrus -city -cityscape -citywide -civet -civic -civil -civilian -clad -cladophora -claim -claimant -Claire -clairvoyant -clam -clamber -clammy -clamorous -clamp -clamshell -clan -clandestine -clang -clank -clannish -clap -clapboard -Clapeyron -Clara -Clare -Claremont -Clarence -Clarendon -claret -clarify -clarinet -clarity -Clark -Clarke -clash -clasp -class -classic -classification -classificatory -classify -classmate -classroom -classy -clatter -clattery -Claude -Claudia -Claudio -Claus -clause -Clausen -Clausius -claustrophobia -claustrophobic -claw -clay -Clayton -clean -cleanse -cleanup -clear -clearance -clearheaded -Clearwater -cleat -cleavage -cleave -cleft -clement -Clemson -clench -clergy -clergyman -clergymen -cleric -clerk -Cleveland -clever -cliche -click -client -clientele -cliff -cliffhang -Clifford -Clifton -climactic -climate -climatic -climatology -climax -climb -clime -clinch -cling -clinging -clinic -clinician -clink -Clint -Clinton -Clio -clip -clipboard -clique -clitoris -Clive -cloak -cloakroom -clobber -clock -clockwatcher -clockwise -clockwork -clod -cloddish -clog -clogging -cloister -clomp -clone -clonic -close -closet -closeup -closure -clot -cloth -clothbound -clothe -clothesbrush -clotheshorse -clothesline -clothesman -clothesmen -clothier -Clotho -cloture -cloud -cloudburst -cloudy -clout -clove -cloven -clown -cloy -club -clubhouse -clubroom -cluck -clue -Cluj -clump -clumsy -clung -cluster -clutch -clutter -Clyde -Clytemnestra -CO -coach -coachman -coachmen -coachwork -coadjutor -coagulable -coagulate -coal -coalesce -coalescent -coalition -coarse -coarsen -coast -coastal -coastline -coat -Coates -coattail -coauthor -coax -coaxial -cobalt -Cobb -cobble -cobblestone -Cobol -cobra -cobweb -coca -cocaine -coccidiosis -cochineal -cochlea -Cochran -Cochrane -cock -cockatoo -cockcrow -cockeye -cockle -cocklebur -cockleshell -cockpit -cockroach -cocksure -cocktail -cocky -coco -cocoa -coconut -cocoon -cod -coda -Coddington -coddle -code -codebreak -codeposit -codetermine -codeword -codfish -codicil -codify -codomain -codon -codpiece -Cody -coed -coeditor -coeducation -coefficient -coequal -coerce -coercible -coercion -coercive -coexist -coexistent -coextensive -cofactor -coffee -coffeecup -coffeepot -coffer -Coffey -coffin -Coffman -cog -cogent -cogitate -cognac -cognate -cognition -cognitive -cognizable -cognizant -Cohen -cohere -coherent -cohesion -cohesive -Cohn -cohomology -cohort -cohosh -coiffure -coil -coin -coinage -coincide -coincident -coincidental -coke -col -cola -colander -colatitude -Colby -cold -Cole -Coleman -Coleridge -Colette -coleus -Colgate -colicky -coliform -coliseum -collaborate -collage -collagen -collapse -collapsible -collar -collarbone -collard -collate -collateral -colleague -collect -collectible -collector -college -collegial -collegian -collegiate -collet -collide -collie -Collier -collimate -collinear -Collins -collision -collocation -colloidal -Colloq -colloquia -colloquial -colloquium -colloquy -collude -collusion -Cologne -Colombia -Colombo -colon -colonel -colonial -colonist -colonnade -colony -Colorado -colorate -coloratura -colorimeter -colossal -Colosseum -colossi -colossus -colt -coltish -coltsfoot -Columbia -columbine -Columbus -column -columnar -colza -coma -Comanche -comatose -comb -combat -combatant -combatted -combinate -combination -combinator -combinatorial -combinatoric -combine -combustible -combustion -come -comeback -comedian -comedy -comet -cometary -cometh -comfort -comic -Cominform -comma -command -commandant -commandeer -commando -commemorate -commend -commendation -commendatory -commensurable -commensurate -comment -commentary -commentator -commerce -commercial -commingle -commiserate -commissariat -commissary -commission -commit -committable -committal -committed -committee -committeeman -committeemen -committeewoman -committeewomen -committing -commodious -commodity -commodore -common -commonality -commonplace -commonweal -commonwealth -commotion -communal -commune -communicable -communicant -communicate -communion -communique -commutate -commute -compact -compacter -compactify -Compagnie -companion -companionway -company -comparative -comparator -compare -comparison -compartment -compass -compassion -compassionate -compatible -compatriot -compel -compellable -compelled -compelling -compendia -compendium -compensable -compensate -compensatory -compete -competent -competition -competitive -competitor -compilation -compile -complacent -complain -complainant -complaint -complaisant -compleat -complement -complementarity -complementary -complementation -complete -completion -complex -complexion -compliant -complicate -complicity -compliment -complimentary -compline -comply -component -componentry -comport -compose -composite -composition -compositor -compost -composure -compote -compound -comprehend -comprehensible -comprehension -comprehensive -compress -compressible -compression -compressive -compressor -comprise -compromise -Compton -comptroller -compulsion -compulsive -compulsory -compunction -computation -compute -comrade -con -Conakry -Conant -concatenate -concave -conceal -concede -conceit -conceive -concentrate -concentric -concept -conception -conceptual -concern -concert -concerti -concertina -concertmaster -concerto -concession -concessionaire -conch -concierge -conciliate -conciliatory -concise -concision -conclave -conclude -conclusion -conclusive -concoct -concocter -concomitant -concord -concordant -concourse -concrete -concretion -concubine -concur -concurred -concurrent -concurring -concussion -condemn -condemnate -condemnatory -condensate -condense -condensible -condescend -condescension -condiment -condition -condolence -condominium -condone -conduce -conducive -conduct -conductance -conductor -conduit -cone -coneflower -Conestoga -coney -confabulate -confect -confectionery -confederacy -confederate -confer -conferee -conference -conferrable -conferred -conferring -confess -confession -confessor -confidant -confidante -confide -confident -confidential -configuration -configure -confine -confirm -confirmation -confirmatory -confiscable -confiscate -confiscatory -conflagrate -conflagration -conflict -confluent -confocal -conform -conformal -conformance -conformation -confound -confrere -confront -confrontation -Confucian -Confucianism -Confucius -confuse -confusion -confute -congeal -congener -congenial -congenital -congest -congestion -congestive -conglomerate -Congo -Congolese -congratulate -congratulatory -congregate -congress -congressional -congressman -congressmen -congresswoman -congresswomen -congruent -conic -conifer -coniferous -conjectural -conjecture -conjoin -conjoint -conjugacy -conjugal -conjugate -conjunct -conjuncture -conjure -Conklin -Conley -conn -Connally -connect -Connecticut -connector -Conner -Connie -connivance -connive -connoisseur -Connors -connotation -connotative -connote -connubial -conquer -conqueror -conquest -conquistador -Conrad -Conrail -consanguine -consanguineous -conscience -conscientious -conscionable -conscious -conscript -conscription -consecrate -consecutive -consensus -consent -consequent -consequential -conservation -conservatism -conservative -conservator -conservatory -conserve -consider -considerate -consign -consignee -consignor -consist -consistent -consolation -console -consolidate -consonant -consonantal -consort -consortium -conspicuous -conspiracy -conspirator -conspiratorial -conspire -Constance -constant -Constantine -Constantinople -constellate -consternate -constipate -constituent -constitute -constitution -constitutive -constrain -constraint -constrict -constrictor -construct -constructible -constructor -construe -consul -consular -consulate -consult -consultant -consultation -consultative -consume -consummate -consumption -consumptive -contact -contagion -contagious -contain -contaminant -contaminate -contemplate -contemporaneous -contemporary -contempt -contemptible -contemptuous -contend -content -contention -contentious -contest -contestant -context -contextual -contiguity -contiguous -continent -continental -contingent -continua -continual -continuant -continuation -continue -continued -continuity -continuo -continuous -continuum -contort -contour -contraband -contrabass -contraception -contraceptive -contract -contractor -contractual -contradict -contradictory -contradistinct -contradistinction -contradistinguish -contralateral -contralto -contraption -contrariety -contrariwise -contrary -contrast -contravariant -contravene -contravention -contretemps -contribute -contribution -contributor -contributory -contrite -contrition -contrivance -contrive -control -controllable -controlled -controller -controlling -controversial -controversy -controvertible -contumacy -contusion -conundrum -Convair -convalesce -convalescent -convect -convene -convenient -convent -convention -converge -convergent -conversant -conversation -converse -conversion -convert -convertible -convex -convey -conveyance -conveyor -convict -convince -convivial -convocate -convocation -convoke -convolute -convolution -convolve -convoy -convulse -convulsion -convulsive -Conway -cony -coo -cook -cookbook -Cooke -cookery -cookie -cooky -cool -coolant -Cooley -coolheaded -Coolidge -coon -coop -cooperate -coordinate -Coors -coot -cop -cope -Copeland -Copenhagen -Copernican -Copernicus -copious -coplanar -copolymer -copperas -Copperfield -copperhead -coppery -copra -coprinus -coproduct -copter -copy -copybook -copyright -copywriter -coquette -coquina -coral -coralberry -coralline -corbel -Corbett -Corcoran -cord -cordage -cordial -cordite -cordon -corduroy -core -Corey -coriander -Corinth -Corinthian -Coriolanus -cork -corkscrew -cormorant -corn -cornbread -cornea -Cornelia -Cornelius -Cornell -cornerstone -cornet -cornfield -cornflower -Cornish -cornish -cornmeal -cornstarch -cornucopia -Cornwall -corny -corollary -corona -Coronado -coronary -coronate -coroner -coronet -coroutine -Corp -corpora -corporal -corporate -corporeal -corps -corpse -corpsman -corpsmen -corpulent -corpus -corpuscular -corral -corralled -correct -corrector -correlate -correspond -correspondent -corridor -corrigenda -corrigendum -corrigible -corroborate -corroboree -corrode -corrodible -corrosion -corrosive -corrugate -corrupt -corruptible -corruption -corsage -corset -cortege -cortex -cortical -Cortland -corundum -coruscate -Corvallis -corvette -Corvus -cos -cosec -coset -Cosgrove -cosh -cosine -cosmetic -cosmic -cosmology -cosmopolitan -cosmos -cosponsor -Cossack -cost -Costa -Costello -costume -cosy -cot -cotangent -cotillion -cotman -cotoneaster -cotta -cottage -cotton -cottonmouth -cottonseed -cottonwood -cottony -Cottrell -cotty -cotyledon -couch -cougar -cough -could -couldn't -coulomb -Coulter -council -councilman -councilmen -councilwoman -councilwomen -counsel -counselor -count -countdown -countenance -counteract -counterargument -counterattack -counterbalance -counterclockwise -counterexample -counterfeit -counterflow -counterintuitive -counterman -countermen -counterpart -counterpoint -counterpoise -counterproductive -counterproposal -countersink -countersunk -countervail -countrify -country -countryman -countrymen -countryside -countrywide -county -countywide -coup -coupe -couple -coupon -courage -courageous -courier -course -court -courteous -courtesan -courtesy -courthouse -courtier -Courtney -courtroom -courtyard -couscous -cousin -couturier -covalent -covariant -covariate -covary -cove -coven -covenant -Coventry -cover -coverage -coverall -coverlet -covert -covet -covetous -cow -Cowan -coward -cowardice -cowbell -cowbird -cowboy -cowgirl -cowhand -cowherd -cowhide -cowl -cowlick -cowman -cowmen -coworker -cowpea -cowpoke -cowpony -cowpox -cowpunch -cowry -cowslip -cox -coxcomb -coy -coyote -coypu -cozen -cozy -CPA -cpu -crab -crabapple -crabmeat -crack -crackle -crackpot -cradle -craft -craftsman -craftsmen -craftspeople -craftsperson -crafty -crag -craggy -Craig -cram -Cramer -cramp -cranberry -Crandall -crane -cranelike -Cranford -crania -cranium -crank -crankcase -crankshaft -cranky -cranny -Cranston -crap -crappie -crash -crass -crate -crater -cravat -crave -craven -craw -Crawford -crawl -crawlspace -crayfish -crayon -craze -crazy -creak -creaky -cream -creamery -creamy -crease -create -creating -creature -creche -credent -credential -credenza -credible -credit -creditor -credo -credulity -credulous -creed -creedal -creek -creekside -creep -creepy -cremate -crematory -Creole -Creon -creosote -crepe -crept -crescendo -crescent -cress -crest -crestfallen -Crestview -Cretaceous -Cretan -Crete -cretin -cretinous -crevice -crew -crewcut -crewel -crewman -crewmen -crib -cricket -cried -crime -Crimea -criminal -crimp -crimson -cringe -crinkle -cripple -crises -crisis -crisp -Crispin -criss -crisscross -criteria -criterion -critic -critique -critter -croak -Croatia -crochet -crock -crockery -Crockett -crocodile -crocodilian -crocus -croft -Croix -Cromwell -Cromwellian -crone -crony -crook -croon -crop -croquet -Crosby -cross -crossarm -crossbar -crossbill -crossbow -crosscut -crosshatch -crosslink -crossover -crosspoint -crossroad -crosstalk -crosswalk -crossway -crosswise -crossword -crosswort -crotch -crotchety -crouch -croupier -crow -crowbait -crowberry -crowd -crowfoot -Crowley -crown -croydon -CRT -crucial -crucible -crucifix -crucifixion -crucify -crud -cruddy -crude -cruel -cruelty -Cruickshank -cruise -crumb -crumble -crummy -crump -crumple -crunch -crupper -crusade -crush -Crusoe -crust -crusty -crutch -crux -Cruz -cry -cryogenic -cryostat -crypt -cryptanalysis -cryptanalyst -cryptanalytic -cryptanalyze -cryptic -cryptogram -cryptographer -cryptography -cryptology -crystal -crystalline -crystallite -crystallographer -crystallography -c's -csnet -CT -cub -Cuba -cubbyhole -cube -cubic -cuckoo -cucumber -cud -cuddle -cuddly -cudgel -cue -cuff -cufflink -cuisine -Culbertson -culinary -cull -culminate -culpa -culpable -culprit -cult -cultivable -cultivate -cultural -culture -Culver -culvert -Cumberland -cumbersome -cumin -Cummings -Cummins -cumulate -cumulus -Cunard -cunning -Cunningham -CUNY -cup -cupboard -cupful -Cupid -cupidity -cupric -cuprous -cur -curate -curb -curbside -curd -curdle -cure -curfew -curia -curie -curio -curiosity -curious -curium -curl -curlew -curlicue -Curran -currant -current -curricula -curricular -curriculum -curry -curse -cursive -cursor -cursory -curt -curtail -curtain -Curtis -curtsey -curvaceous -curvature -curve -curvilinear -Cushing -cushion -Cushman -cusp -Custer -custodial -custodian -custody -custom -customary -customhouse -cut -cutaneous -cutback -cute -cutesy -cutlass -cutler -cutlet -cutoff -cutout -cutover -cutset -cutthroat -cuttlebone -cuttlefish -cutworm -Cyanamid -cyanate -cyanic -cyanide -cybernetic -cybernetics -cycad -Cyclades -cycle -cyclic -cyclist -cyclone -cyclopean -Cyclops -cyclorama -cyclotomic -cyclotron -Cygnus -cylinder -cylindric -cynic -Cynthia -cypress -Cyprian -Cypriot -Cyprus -Cyril -Cyrillic -Cyrus -cyst -cysteine -cytochemistry -cytology -cytolysis -cytoplasm -cytosine -CZ -czar -czarina -Czech -Czechoslovakia -Czerniak -d -dab -dabble -Dacca -dachshund -dactyl -dactylic -dad -Dada -Dadaism -Dadaist -daddy -Dade -Daedalus -daffodil -daffy -dagger -Dahl -dahlia -Dahomey -Dailey -Daimler -dainty -dairy -Dairylea -dairyman -dairymen -dais -daisy -Dakar -Dakota -dale -Daley -Dalhousie -Dallas -dally -Dalton -Daly -Dalzell -dam -damage -Damascus -damask -dame -damn -damnation -Damon -damp -dampen -damsel -Dan -Dana -Danbury -dance -dandelion -dandy -Dane -dang -danger -dangerous -dangle -Daniel -Danielson -Danish -dank -Danny -Dante -Danube -Danubian -Danzig -Daphne -dapper -dapple -Dar -dare -daredevil -Darius -dark -darken -darkle -Darlene -darling -darn -DARPA -Darrell -Darry -d'art -dart -Dartmouth -Darwin -Darwinian -dash -dashboard -dastard -data -database -date -dateline -dater -Datsun -datum -daub -Daugherty -daughter -daunt -dauphin -dauphine -Dave -davenport -David -Davidson -Davies -Davis -Davison -davit -Davy -dawn -Dawson -day -daybed -daybreak -daydream -daylight -daytime -Dayton -Daytona -daze -dazzle -DC -De -deacon -deaconess -deactivate -dead -deaden -deadhead -deadline -deadlock -deadwood -deaf -deafen -deal -deallocate -dealt -dean -Deane -Deanna -dear -Dearborn -dearie -dearth -death -deathbed -deathward -debacle -debar -debarring -debase -debate -debater -debauch -debauchery -Debbie -Debby -debenture -debilitate -debility -debit -debonair -Deborah -Debra -debrief -debris -debt -debtor -debug -debugged -debugger -debugging -debunk -Debussy -debut -debutante -Dec -decade -decadent -decaffeinate -decal -decant -decathlon -Decatur -decay -Decca -decease -decedent -deceit -deceitful -deceive -decelerate -December -decennial -decent -deception -deceptive -decertify -decibel -decide -deciduous -decile -decimal -decimate -decipher -decision -decisional -decisionmake -decisive -deck -Decker -declaim -declamation -declamatory -declaration -declarative -declarator -declaratory -declare -declassify -declination -decline -declivity -decode -decolletage -decollimate -decolonize -decommission -decompile -decomposable -decompose -decomposition -decompress -decompression -decontrol -decontrolled -decontrolling -deconvolution -deconvolve -decor -decorate -decorous -decorticate -decorum -decouple -decoy -decrease -decree -decreeing -decrement -decry -decrypt -decryption -dedicate -deduce -deducible -deduct -deductible -Dee -deed -deem -deemphasize -deep -deepen -deer -Deere -deerskin -deerstalker -deface -default -defeat -defecate -defect -defector -defend -defendant -defensible -defensive -defer -deferent -deferrable -deferral -deferred -deferring -defiant -deficient -deficit -define -definite -definition -definitive -deflate -deflater -deflect -deflector -defocus -deforest -deforestation -deform -deformation -defraud -defray -defrock -defrost -deft -defunct -defuse -defy -degas -degassing -degeneracy -degenerate -degradation -degrade -degrease -degree -degum -degumming -dehumidify -dehydrate -deify -deign -deity -deja -deject -Del -Delaney -Delano -Delaware -delay -delectable -delectate -delegable -delegate -delete -deleterious -deletion -Delft -Delhi -Delia -deliberate -delicacy -delicate -delicatessen -delicious -delicti -delight -delightful -Delilah -delimit -delimitation -delineament -delineate -delinquent -deliquesce -deliquescent -delirious -delirium -deliver -deliverance -delivery -dell -Della -Delmarva -delouse -Delphi -Delphic -delphine -delphinium -Delphinus -delta -deltoid -delude -deluge -delusion -delusive -deluxe -delve -demagnify -demagogue -demand -demarcate -demark -demean -demented -dementia -demerit -demigod -demijohn -demiscible -demise -demit -demitted -demitting -demo -democracy -democrat -democratic -demodulate -demography -demolish -demolition -demon -demoniac -demonic -demonstrable -demonstrate -demote -demountable -Dempsey -demultiplex -demur -demure -demurred -demurrer -demurring -demystify -den -denature -dendrite -dendritic -Deneb -Denebola -deniable -denial -denigrate -denizen -Denmark -Dennis -Denny -denominate -denotation -denotative -denote -denouement -denounce -dense -densitometer -dent -dental -dentistry -Denton -denture -denudation -denude -denumerable -denunciate -denunciation -Denver -deny -deodorant -deoxyribonucleic -deoxyribose -depart -department -departure -depend -dependent -depict -deplete -depletion -deplore -deploy -deport -deportation -deportee -depose -deposit -depositary -deposition -depositor -depository -depot -deprave -deprecate -deprecatory -depreciable -depreciate -depredate -depress -depressant -depressible -depression -depressive -depressor -deprivation -deprive -depth -deputation -depute -deputy -derail -derange -derate -derby -Derbyshire -dereference -deregulate -deregulatory -Derek -derelict -deride -derision -derisive -derivate -derive -derogate -derogatory -derrick -derriere -dervish -Des -descant -Descartes -descend -descendant -descendent -descent -describe -description -descriptive -descriptor -desecrate -desecrater -desegregate -desert -deserve -desicate -desiderata -desideratum -design -designate -desire -desirous -desist -desk -Desmond -desolate -desolater -desorption -despair -desperado -desperate -despicable -despise -despite -despoil -despond -despondent -despot -despotic -dessert -dessicate -destabilize -destinate -destine -destiny -destitute -destroy -destruct -destructor -desuetude -desultory -detach -detail -detain -d'etat -detect -detector -detent -detente -detention -deter -detergent -deteriorate -determinant -determinate -determine -deterred -deterrent -deterring -detest -detestation -detonable -detonate -detour -detoxify -detract -detractor -detriment -Detroit -deuce -deus -deuterate -deuterium -deuteron -devastate -develop -deviant -deviate -device -devil -devilish -devious -devise -devisee -devoid -devolution -devolve -Devon -Devonshire -devote -devotee -devotion -devour -devout -dew -dewar -dewdrop -Dewey -Dewitt -dewy -dexter -dexterity -dextrose -dextrous -dey -Dhabi -dharma -diabase -diabetes -diabetic -diabolic -diachronic -diacritic -diacritical -diadem -diagnosable -diagnose -diagnoses -diagnosis -diagnostic -diagnostician -diagonal -diagram -diagrammatic -dial -dialect -dialectic -dialogue -dialup -dialysis -diamagnetic -diamagnetism -diameter -diamond -Diana -Diane -Dianne -diaper -diaphanous -diaphragm -diary -diathermy -diathesis -diatom -diatomaceous -diatomic -diatonic -diatribe -dibble -dice -dichloride -dichondra -dichotomize -dichotomous -dichotomy -dick -dickcissel -dickens -Dickerson -dickey -Dickinson -Dickson -dicotyledon -dicta -dictate -dictatorial -diction -dictionary -dictum -did -didactic -diddle -didn't -Dido -die -Diebold -died -Diego -diehard -dieldrin -dielectric -diem -diesel -diet -dietary -dietetic -diethylstilbestrol -dietician -Dietrich -diety -Dietz -diffeomorphic -diffeomorphism -differ -different -differentiable -differential -differentiate -difficult -difficulty -diffident -diffract -diffractometer -diffuse -diffusible -diffusion -diffusive -difluoride -dig -digest -digestible -digestion -digestive -digging -digit -digital -digitalis -digitate -dignify -dignitary -dignity -digram -digress -digression -dihedral -dilapidate -dilatation -dilate -dilatory -dilemma -dilettante -diligent -dill -Dillon -dilogarithm -diluent -dilute -dilution -dim -dime -dimension -dimethyl -diminish -diminution -diminutive -dimple -din -Dinah -dine -ding -dinghy -dingo -dingy -dinnertime -dinnerware -dinosaur -dint -diocesan -diocese -diode -Dionysian -Dionysus -Diophantine -diopter -diorama -diorite -dioxide -dip -diphtheria -diphthong -diploid -diploidy -diploma -diplomacy -diplomat -diplomatic -dipole -Dirac -dire -direct -director -directorate -directorial -directory -directrices -directrix -dirge -Dirichlet -dirt -dirty -Dis -disaccharide -disambiguate -disastrous -disburse -disc -discern -discernible -disciple -disciplinarian -disciplinary -discipline -disco -discoid -discomfit -discordant -discovery -discreet -discrepant -discrete -discretion -discretionary -discriminable -discriminant -discriminate -discriminatory -discus -discuss -discussant -discussion -disdain -disdainful -disembowel -disgruntle -disgustful -dish -dishes -dishevel -dishwasher -dishwater -disjunct -disk -dismal -dismissal -Disney -Disneyland -disparage -disparate -dispel -dispelled -dispelling -dispensable -dispensary -dispensate -dispense -dispersal -disperse -dispersible -dispersion -dispersive -disposable -disposal -disputant -dispute -disquietude -disquisition -disrupt -disruption -disruptive -dissemble -disseminate -dissension -dissertation -dissident -dissipate -dissociable -dissociate -dissonant -dissuade -distaff -distal -distant -distillate -distillery -distinct -distinguish -distort -distortion -distraught -distribution -distributive -distributor -district -disturb -disturbance -disulfide -disyllable -ditch -dither -ditto -ditty -Ditzel -diurnal -diva -divalent -divan -dive -diverge -divergent -diverse -diversify -diversion -diversionary -divert -divest -divestiture -divide -dividend -divination -divine -divisible -division -divisional -divisive -divisor -divorce -divorcee -divulge -Dixie -Dixieland -dixieland -Dixon -dizzy -Djakarta -DNA -Dnieper -do -Dobbin -Dobbs -doberman -dobson -docile -dock -docket -dockside -dockyard -doctor -doctoral -doctorate -doctrinaire -doctrinal -doctrine -document -documentary -documentation -DOD -Dodd -dodecahedra -dodecahedral -dodecahedron -dodge -dodo -Dodson -doe -doesn't -d'oeuvre -doff -dog -dogbane -dogberry -Doge -dogfish -dogging -doggone -doghouse -dogleg -dogma -dogmatic -dogmatism -dogtooth -dogtrot -dogwood -Doherty -Dolan -dolce -doldrum -doldrums -dole -doleful -doll -dollar -dollop -dolly -dolomite -dolomitic -Dolores -dolphin -dolt -doltish -domain -dome -Domenico -Domesday -domestic -domesticate -domicile -dominant -dominate -domineer -Domingo -Dominic -Dominican -Dominick -dominion -Dominique -domino -don -Donahue -Donald -Donaldson -donate -done -Doneck -donkey -Donna -Donnelly -Donner -donnybrook -donor -Donovan -don't -doodle -Dooley -Doolittle -doom -doomsday -door -doorbell -doorkeep -doorkeeper -doorknob -doorman -doormen -doorstep -doorway -dopant -dope -Doppler -Dora -Dorado -Dorcas -Dorchester -Doreen -Doria -Doric -Doris -dormant -dormitory -Dorothea -Dorothy -Dorset -Dortmund -dosage -dose -dosimeter -dossier -Dostoevsky -dot -dote -double -Doubleday -doubleheader -doublet -doubleton -doubloon -doubt -doubtful -douce -Doug -dough -Dougherty -doughnut -Douglas -Douglass -dour -douse -dove -dovekie -dovetail -Dow -dowager -dowel -dowitcher -Dowling -down -downbeat -downcast -downdraft -Downey -downfall -downgrade -downhill -Downing -downplay -downpour -downright -downriver -Downs -downside -downslope -downspout -downstairs -downstate -downstream -downtown -downtrend -downtrodden -downturn -downward -downwind -dowry -Doyle -doze -dozen -Dr -drab -Draco -draft -draftee -draftsman -draftsmen -draftsperson -drafty -drag -dragging -dragnet -dragon -dragonfly -dragonhead -dragoon -drain -drainage -drake -dram -drama -dramatic -dramatist -dramaturgy -drank -drape -drapery -drastic -draw -drawback -drawbridge -drawl -drawn -dread -dreadful -dreadnought -dream -dreamboat -dreamlike -dreamt -dreamy -dreary -dredge -dreg -drench -dress -dressmake -dressy -drew -Drexel -Dreyfuss -drib -dribble -dried -drier -drift -drill -drink -drip -drippy -Driscoll -drive -driven -driveway -drizzle -drizzly -droll -dromedary -drone -drool -droop -droopy -drop -drophead -droplet -dropout -drosophila -dross -drought -drove -drown -drowse -drowsy -drub -drudge -drudgery -drug -drugging -drugstore -druid -drum -drumhead -drumlin -Drummond -drunk -drunkard -drunken -Drury -dry -dryad -Dryden -d's -du -dual -dualism -Duane -dub -Dubhe -dubious -dubitable -Dublin -ducat -duchess -duck -duckling -duct -ductile -ductwork -dud -Dudley -due -duel -duet -duff -duffel -Duffy -dug -Dugan -dugout -duke -dukedom -dulcet -dull -dully -dulse -Duluth -duly -Duma -dumb -dumbbell -dummy -dump -Dumpty -dumpy -dun -Dunbar -Duncan -dunce -dune -Dunedin -dung -dungeon -Dunham -dunk -Dunkirk -Dunlap -Dunlop -Dunn -duopolist -duopoly -dupe -duplex -duplicable -duplicate -duplicity -DuPont -Duquesne -durable -durance -Durango -duration -Durer -duress -Durham -during -Durkee -Durkin -Durrell -Durward -Dusenberg -Dusenbury -dusk -dusky -Dusseldorf -dust -dustbin -dusty -Dutch -dutchess -Dutchman -Dutchmen -dutiable -dutiful -Dutton -duty -dwarf -dwarves -dwell -dwelt -Dwight -dwindle -Dwyer -dyad -dyadic -dye -dyeing -dyer -dying -Dyke -Dylan -dynamic -dynamism -dynamite -dynamo -dynast -dynastic -dynasty -dyne -dysentery -dyspeptic -dysplasia -dysprosium -dystrophy -e -each -Eagan -eager -eagle -ear -eardrum -earl -earmark -earn -earnest -earphone -earring -earsplitting -earth -earthen -earthenware -earthmen -earthmove -earthmover -earthmoving -earthquake -earthshaking -earthworm -earthy -earwig -ease -easel -east -eastbound -eastern -easternmost -Eastland -Eastman -eastward -Eastwood -easy -easygoing -eat -eaten -eater -Eaton -eave -eavesdrop -eavesdropped -eavesdropper -eavesdropping -ebb -Eben -ebony -ebullient -eccentric -Eccles -ecclesiastic -echelon -echidna -echinoderm -echo -echoes -eclat -eclectic -eclipse -ecliptic -eclogue -Ecole -ecology -econometric -Econometrica -economic -economist -economy -ecosystem -ecstasy -ecstatic -ectoderm -ectopic -Ecuador -ecumenic -ecumenist -Ed -Eddie -eddy -edelweiss -edematous -Eden -Edgar -edge -Edgerton -edgewise -edging -edgy -edible -edict -edifice -edify -Edinburgh -Edison -edit -Edith -edition -editor -editorial -Edmonds -Edmondson -Edmonton -Edmund -Edna -EDT -Eduardo -educable -educate -Edward -Edwardian -Edwardine -Edwards -Edwin -Edwina -eel -eelgrass -EEOC -e'er -eerie -eerily -efface -effaceable -effect -effectual -effectuate -effeminate -efferent -effete -efficacious -efficacy -efficient -Effie -effloresce -efflorescent -effluent -effluvia -effluvium -effort -effusion -effusive -eft -e.g -egalitarian -Egan -egg -egghead -eggplant -eggshell -ego -egocentric -egotism -egotist -egregious -egress -egret -Egypt -Egyptian -eh -Ehrlich -eider -eidetic -eigenfunction -eigenspace -eigenstate -eigenvalue -eigenvector -eight -eighteen -eighteenth -eightfold -eighth -eightieth -eighty -Eileen -Einstein -Einsteinian -einsteinium -Eire -Eisenhower -Eisner -either -ejaculate -eject -ejector -eke -Ekstrom -Ektachrome -el -elaborate -Elaine -elan -elapse -elastic -elastomer -elate -Elba -elbow -elder -eldest -Eldon -Eleanor -Eleazar -elect -elector -electoral -electorate -Electra -electress -electret -electric -electrician -electrify -electro -electrocardiogram -electrocardiograph -electrode -electroencephalogram -electroencephalograph -electroencephalography -electrolysis -electrolyte -electrolytic -electron -electronic -electrophoresis -electrophorus -elegant -elegiac -elegy -element -elementary -Elena -elephant -elephantine -elevate -eleven -eleventh -elfin -Elgin -Eli -elicit -elide -eligible -Elijah -eliminate -Elinor -Eliot -Elisabeth -Elisha -elision -elite -Elizabeth -Elizabethan -elk -Elkhart -ell -Ella -Ellen -Elliot -Elliott -ellipse -ellipsis -ellipsoid -ellipsoidal -ellipsometer -elliptic -Ellis -Ellison -Ellsworth -Ellwood -elm -Elmer -Elmhurst -Elmira -Elmsford -Eloise -elongate -elope -eloquent -else -Elsevier -elsewhere -Elsie -Elsinore -Elton -eluate -elucidate -elude -elusive -elute -elution -elves -Ely -Elysee -elysian -em -emaciate -emanate -emancipate -Emanuel -emasculate -embalm -embank -embarcadero -embargo -embargoes -embark -embarrass -embassy -embattle -embed -embeddable -embedded -embedder -embedding -embellish -ember -embezzle -emblazon -emblem -emblematic -embodiment -embody -embolden -emboss -embouchure -embower -embrace -embraceable -embrittle -embroider -embroidery -embroil -embryo -embryology -embryonic -emcee -emendable -emerald -emerge -emergent -emeriti -emeritus -Emerson -Emery -emigrant -emigrate -Emil -Emile -Emilio -Emily -eminent -emirate -emissary -emission -emissivity -emit -emittance -emitted -emitter -emitting -Emma -emma -Emmanuel -Emmett -emolument -Emory -emotion -emotional -empathy -emperor -emphases -emphasis -emphatic -emphysema -emphysematous -empire -empiric -emplace -employ -employed -employee -employer -employing -emporium -empower -empress -empty -emulate -emulsify -emulsion -en -enable -enamel -encapsulate -encephalitis -enchantress -enclave -encomia -encomium -encore -encroach -encryption -encumber -encumbrance -encyclopedic -end -endemic -endgame -Endicott -endoderm -endogamous -endogamy -endogenous -endomorphism -endorse -endosperm -endothelial -endothermic -endow -endpoint -endurance -endure -enemy -energetic -energy -enervate -enfant -Enfield -enforceable -enforcible -Eng -engage -Engel -engine -engineer -England -Englander -Engle -Englewood -English -Englishman -Englishmen -enhance -Enid -enigma -enigmatic -enjoinder -enlargeable -enliven -enmity -Enoch -enol -enormity -enormous -Enos -enough -enquire -enquiry -Enrico -enrollee -ensconce -ensemble -enstatite -entendre -enter -enterprise -entertain -enthalpy -enthrall -enthusiasm -enthusiast -enthusiastic -entice -entire -entirety -entity -entomology -entourage -entranceway -entrant -entrepreneur -entrepreneurial -entropy -entry -enumerable -enumerate -enunciable -enunciate -envelop -envelope -enviable -envious -environ -envoy -envy -enzymatic -enzyme -enzymology -Eocene -eohippus -eosine -EPA -epaulet -ephemeral -ephemerides -ephemeris -Ephesian -Ephesus -Ephraim -epic -epicure -Epicurean -epicycle -epicyclic -epidemic -epidemiology -epidermic -epidermis -epigenetic -epigram -epigrammatic -epigraph -epileptic -epilogue -epimorphism -Epiphany -epiphyseal -epiphysis -episcopal -Episcopalian -episcopate -episode -episodic -epistemology -epistle -epistolatory -epitaph -epitaxial -epitaxy -epithelial -epithelium -epithet -epitome -epoch -epochal -epoxy -epsilon -Epsom -Epstein -equable -equal -equanimity -equate -equatorial -equestrian -equidistant -equilateral -equilibrate -equilibria -equilibrium -equine -equinoctial -equinox -equip -equipoise -equipotent -equipped -equipping -equitable -equitation -equity -equivalent -equivocal -equivocate -era -eradicable -eradicate -erasable -erase -Erasmus -Erastus -erasure -Erato -Eratosthenes -erbium -ERDA -ere -erect -erg -ergative -ergodic -Eric -Erich -Erickson -Ericsson -Erie -Erik -Erlenmeyer -Ernest -Ernestine -Ernie -Ernst -erode -erodible -Eros -erosible -erosion -erosive -erotic -erotica -err -errancy -errand -errant -errantry -errata -erratic -erratum -Errol -erroneous -error -ersatz -Erskine -erudite -erudition -erupt -eruption -Ervin -Erwin -e's -escadrille -escalate -escapade -escape -escapee -escheat -Escherichia -eschew -escort -escritoire -escrow -escutcheon -Eskimo -Esmark -esophagi -esoteric -especial -espionage -esplanade -Esposito -espousal -espouse -esprit -esquire -essay -Essen -essence -essential -Essex -EST -establish -estate -esteem -Estella -ester -Estes -Esther -estimable -estimate -Estonia -estop -estoppal -estrange -estuarine -estuary -et -eta -etc -etch -eternal -eternity -Ethan -ethane -ethanol -Ethel -ether -ethereal -ethic -Ethiopia -ethnic -ethnography -ethnology -ethology -ethos -ethyl -ethylene -etiology -etiquette -Etruscan -etude -etymology -eucalyptus -Eucharist -Euclid -Euclidean -eucre -Eugene -Eugenia -eugenic -eukaryote -Euler -Eulerian -eulogy -Eumenides -Eunice -euphemism -euphemist -euphorbia -euphoria -euphoric -Euphrates -Eurasia -eureka -Euridyce -Euripides -Europa -Europe -European -europium -Eurydice -eutectic -Euterpe -euthanasia -Eva -evacuate -evade -evaluable -evaluate -evanescent -evangel -evangelic -Evans -Evanston -Evansville -evaporate -evasion -evasive -eve -Evelyn -even -evenhanded -evensong -event -eventful -eventide -eventual -eventuate -Eveready -Everett -Everglades -evergreen -Everhart -everlasting -every -everybody -everyday -everyman -everyone -everything -everywhere -evict -evident -evidential -evil -evildoer -evince -evocable -evocate -evocation -evoke -evolution -evolutionary -evolve -evzone -ewe -Ewing -ex -exacerbate -exact -exacter -exaggerate -exalt -exaltation -exam -examination -examine -example -exasperate -exasperater -excavate -exceed -excel -excelled -excellent -excelling -excelsior -except -exception -exceptional -excerpt -excess -excessive -exchange -exchangeable -exchequer -excisable -excise -excision -excitation -excitatory -excite -exciton -exclaim -exclamation -exclamatory -exclude -exclusion -exclusionary -exclusive -excommunicate -excoriate -excrescent -excrete -excretion -excretory -excruciate -exculpate -exculpatory -excursion -excursus -excusable -excuse -execrable -execrate -execute -execution -executive -executor -executrix -exegesis -exegete -exemplar -exemplary -exemplify -exempt -exemption -exercisable -exercise -exert -Exeter -exhale -exhaust -exhaustible -exhaustion -exhaustive -exhibit -exhibition -exhibitor -exhilarate -exhort -exhortation -exhumation -exhume -exigent -exile -exist -existent -existential -exit -exodus -exogamous -exogamy -exogenous -exonerate -exorbitant -exorcise -exorcism -exorcist -exoskeleton -exothermic -exotic -exotica -expand -expanse -expansible -expansion -expansive -expatiate -expect -expectant -expectation -expectorant -expectorate -expedient -expedite -expedition -expeditious -expel -expellable -expelled -expelling -expend -expenditure -expense -expensive -experience -experiential -experiment -experimentation -expert -expertise -expiable -expiate -expiration -expire -explain -explanation -explanatory -expletive -explicable -explicate -explicit -explode -exploit -exploitation -exploration -exploratory -explore -explosion -explosive -exponent -exponential -exponentiate -export -exportation -expose -exposit -exposition -expositor -expository -exposure -expound -express -expressible -expression -expressive -expressway -expropriate -expulsion -expunge -expurgate -exquisite -extant -extemporaneous -extempore -extend -extendible -extensible -extension -extensive -extensor -extent -extenuate -exterior -exterminate -external -extinct -extinguish -extirpate -extol -extolled -extoller -extolling -extort -extra -extracellular -extract -extractor -extracurricular -extraditable -extradite -extradition -extralegal -extralinguistic -extramarital -extramural -extraneous -extraordinary -extrapolate -extraterrestrial -extravagant -extravaganza -extrema -extremal -extreme -extremis -extremum -extricable -extricate -extrinsic -extroversion -extrovert -extrude -extrusion -extrusive -exuberant -exudate -exudation -exude -exult -exultant -exultation -Exxon -eye -eyeball -eyebright -eyebrow -eyed -eyeful -eyeglass -eyelash -eyelet -eyelid -eyepiece -eyesight -eyesore -eyewitness -Ezekiel -Ezra -f -FAA -Faber -Fabian -fable -fabric -fabricate -fabulous -facade -face -faceplate -facet -facetious -facial -facile -facilitate -facsimile -fact -factious -facto -factor -factorial -factory -factual -facultative -faculty -fad -fade -fadeout -faery -Fafnir -fag -Fahey -Fahrenheit -fail -failsafe -failsoft -failure -fain -faint -fair -Fairchild -Fairfax -Fairfield -fairgoer -Fairport -fairway -fairy -faith -faithful -fake -falcon -falconry -fall -fallacious -fallacy -fallen -fallible -falloff -fallout -fallow -Falmouth -false -falsehood -falsify -Falstaff -falter -fame -familial -familiar -familiarly -familism -family -famine -famish -famous -fan -fanatic -fanciful -fancy -fanfare -fanfold -fang -fangled -Fanny -fanout -fantasia -fantasist -fantastic -fantasy -fantod -far -farad -Faraday -Farber -farce -farcical -fare -farewell -farfetched -Fargo -farina -Farkas -Farley -farm -farmhouse -Farmington -farmland -Farnsworth -faro -Farrell -farsighted -farther -farthest -fascicle -fasciculate -fascinate -fascism -fascist -fashion -fast -fasten -fastidious -fat -fatal -fate -fateful -father -fathom -fatigue -Fatima -fatten -fatty -fatuous -faucet -Faulkner -fault -faulty -faun -fauna -Faust -Faustian -Faustus -fawn -fay -Fayette -Fayetteville -faze -FBI -FCC -FDA -Fe -fealty -fear -fearful -fearsome -feasible -feast -feat -feather -featherbed -featherbedding -featherbrain -feathertop -featherweight -feathery -feature -Feb -febrile -February -fecund -fed -Fedders -federal -federate -Fedora -fee -feeble -feed -feedback -feel -Feeney -feet -feign -feint -Feldman -feldspar -Felice -Felicia -felicitous -felicity -feline -Felix -fell -fellow -felon -felonious -felony -felsite -felt -female -feminine -feminism -feminist -femur -fence -fencepost -fend -fennel -Fenton -fenugreek -Ferber -Ferdinand -Ferguson -Fermat -ferment -fermentation -Fermi -fermion -fermium -fern -Fernando -fernery -ferocious -ferocity -Ferreira -Ferrer -ferret -ferric -ferris -ferrite -ferroelectric -ferromagnet -ferromagnetic -ferromagnetism -ferrous -ferruginous -ferrule -ferry -fertile -fervent -fescue -fest -festival -festive -fetal -fetch -fete -fetid -fetish -fetter -fettle -fetus -feud -feudal -feudatory -fever -feverish -few -fiance -fiancee -fiasco -fiat -fib -fiberboard -Fiberglas -Fibonacci -fibration -fibrin -fibrosis -fibrous -fiche -fickle -fiction -fictitious -fictive -fiddle -fiddlestick -fide -fidelity -fidget -fiducial -fiduciary -fief -fiefdom -field -Fields -fieldstone -fieldwork -fiend -fiendish -fierce -fiery -fiesta -fife -FIFO -fifteen -fifteenth -fifth -fiftieth -fifty -fig -figaro -fight -figural -figurate -figure -figurine -filament -filamentary -filbert -filch -file -filet -filial -filibuster -filigree -Filipino -fill -filled -filler -fillet -fillip -filly -film -filmdom -filmmake -filmstrip -filmy -filter -filth -filthy -filtrate -fin -final -finale -finance -financial -financier -finch -find -fine -finery -finesse -finessed -finessing -finger -fingernail -fingerprint -fingertip -finial -finicky -finish -finitary -finite -fink -Finland -Finley -Finn -Finnegan -Finnish -finny -fir -fire -firearm -fireboat -firebreak -firebug -firecracker -firefly -firehouse -firelight -fireman -firemen -fireplace -firepower -fireproof -fireside -Firestone -firewall -firewood -firework -firm -firmware -first -firsthand -fiscal -Fischbein -Fischer -fish -fisherman -fishermen -fishery -fishmonger -fishpond -fishy -Fisk -Fiske -fissile -fission -fissure -fist -fisticuff -fit -Fitch -Fitchburg -fitful -Fitzgerald -Fitzpatrick -Fitzroy -five -fivefold -fix -fixate -fixture -Fizeau -fizzle -fjord -FL -flabbergast -flabby -flack -flag -flagellate -flageolet -flagging -Flagler -flagpole -flagrant -Flagstaff -flagstone -flail -flair -flak -flake -flaky -flam -flamboyant -flame -flamingo -flammable -Flanagan -Flanders -flange -flank -flannel -flap -flare -flash -flashback -flashlight -flashy -flask -flat -flatbed -flathead -flatiron -flatland -flatten -flattery -flatulent -flatus -flatware -flatworm -flaunt -flautist -flaw -flax -flaxen -flaxseed -flea -fleabane -fleawort -fleck -fled -fledge -fledgling -flee -fleece -fleeing -fleet -Fleming -Flemish -flemish -flesh -fleshy -fletch -Fletcher -flew -flex -flexible -flexural -flexure -flick -flier -flight -flimsy -flinch -fling -flint -flintlock -flinty -flip -flipflop -flippant -flirt -flirtation -flirtatious -flit -Flo -float -floc -flocculate -flock -floe -flog -flogging -flood -floodgate -floodlight -floodlit -floor -floorboard -flop -floppy -flora -floral -Florence -Florentine -florican -florid -Florida -Floridian -florin -florist -flotation -flotilla -flounce -flounder -flour -flourish -floury -flout -flow -flowchart -flowerpot -flowery -flown -Floyd -flu -flub -fluctuate -flue -fluency -fluent -fluff -fluffy -fluid -fluke -flung -flunk -fluoresce -fluorescein -fluorescent -fluoridate -fluoride -fluorine -fluorite -fluorocarbon -fluorspar -flurry -flush -fluster -flute -flutter -fluvial -flux -fly -flycatcher -flyer -Flynn -flyway -FM -FMC -foal -foam -foamflower -foamy -fob -focal -foci -focus -focussed -fodder -foe -fog -Fogarty -fogging -foggy -fogy -foible -foil -foist -fold -foldout -Foley -foliage -foliate -folio -folk -folklore -folksong -folksy -follicle -follicular -follow -followeth -folly -Fomalhaut -fond -fondle -fondly -font -Fontaine -Fontainebleau -food -foodstuff -fool -foolhardy -foolish -foolproof -foot -footage -football -footbridge -Foote -footfall -foothill -footman -footmen -footnote -footpad -footpath -footprint -footstep -footstool -footwear -footwork -fop -foppish -for -forage -foray -forbade -forbear -forbearance -Forbes -forbid -forbidden -forbidding -forbore -forborne -force -forceful -forcible -ford -Fordham -fore -foregoing -foreign -forensic -forest -forestry -forever -forfeit -forfeiture -forfend -forgave -forge -forgery -forget -forgetful -forgettable -forgetting -forgive -forgiven -forgo -forgot -forgotten -fork -forklift -forlorn -form -formal -formaldehyde -formant -format -formate -formatted -formatting -formic -Formica -formidable -Formosa -formula -formulae -formulaic -formulate -Forrest -forsake -forsaken -forsook -forswear -Forsythe -fort -forte -Fortescue -forth -forthcome -forthright -forthwith -fortieth -fortify -fortin -fortiori -fortitude -fortnight -Fortran -fortran -fortress -fortuitous -fortunate -fortune -forty -forum -forward -forwent -Foss -fossil -fossiliferous -foster -fosterite -fought -foul -foulmouth -found -foundation -foundling -foundry -fount -fountain -fountainhead -four -fourfold -Fourier -foursome -foursquare -fourteen -fourteenth -fourth -fovea -fowl -fox -foxglove -Foxhall -foxhole -foxhound -foxtail -foxy -foyer -FPC -fraction -fractionate -fractious -fracture -fragile -fragment -fragmentary -fragmentation -fragrant -frail -frailty -frambesia -frame -framework -Fran -franc -franca -France -Frances -franchise -Francine -Francis -Franciscan -Francisco -francium -Franco -franco -Francoise -frangipani -frank -Frankel -Frankfort -Frankfurt -frankfurter -franklin -frantic -Franz -Fraser -fraternal -fraternity -Frau -fraud -fraudulent -fraught -fray -frayed -Frazier -frazzle -freak -freakish -freckle -Fred -Freddie -Freddy -Frederic -Frederick -Fredericks -Fredericksburg -Fredericton -Fredholm -Fredrickson -free -freeboot -freed -Freedman -freedmen -freedom -freehand -freehold -freeing -freeman -freemen -Freeport -freer -freest -freestone -freethink -Freetown -freeway -freewheel -freeze -freight -French -Frenchman -Frenchmen -frenetic -frenzy -freon -frequent -fresco -frescoes -fresh -freshen -freshman -freshmen -freshwater -Fresnel -Fresno -fret -Freud -Freudian -Frey -Freya -friable -friar -fricative -Frick -friction -frictional -Friday -fried -Friedman -Friedrich -friend -frieze -frigate -Frigga -fright -frighten -frightful -frigid -Frigidaire -frill -frilly -fringe -frisky -fritillary -fritter -Fritz -frivolity -frivolous -frizzle -fro -frock -frog -frolic -from -front -frontage -frontal -frontier -frontiersman -frontiersmen -frost -frostbite -frostbitten -frosty -froth -frothy -frown -frowzy -froze -frozen -fructify -fructose -Fruehauf -frugal -fruit -fruitful -fruition -frustrate -frustrater -frustum -fry -Frye -f's -Ft -FTC -Fuchs -Fuchsia -fudge -fuel -fugal -fugitive -fugue -Fuji -Fujitsu -fulcrum -fulfill -full -fullback -Fullerton -fully -fulminate -fulsome -Fulton -fum -fumble -fume -fumigant -fumigate -fun -function -functionary -functor -functorial -fund -fundamental -fundraise -funeral -funereal -fungal -fungi -fungible -fungicide -fungoid -fungus -funk -funnel -funny -fur -furbish -furious -furl -furlong -furlough -Furman -furnace -furnish -furniture -furrier -furrow -furry -further -furtherance -furthermore -furthermost -furthest -furtive -fury -furze -fuse -fuselage -fusible -fusiform -fusillade -fusion -fuss -fussy -fusty -futile -future -fuzz -fuzzy -g -GA -gab -gabardine -gabble -gabbro -Gaberones -gable -Gabon -Gabriel -Gabrielle -gad -gadfly -gadget -gadgetry -gadolinium -gadwall -Gaelic -gaff -gaffe -gag -gage -gagging -gaggle -gagwriter -gaiety -Gail -gaillardia -gain -Gaines -Gainesville -gainful -gait -Gaithersburg -gal -gala -galactic -galactose -Galapagos -Galatea -Galatia -galaxy -Galbreath -gale -Galen -galena -galenite -Galilee -gall -Gallagher -gallant -gallantry -gallberry -gallery -galley -gallinule -gallium -gallivant -gallon -gallonage -gallop -Galloway -gallows -gallstone -Gallup -gallus -Galois -Galt -galvanic -galvanism -galvanometer -Galveston -Galway -gam -Gambia -gambit -gamble -gambol -game -gamecock -gamesman -gamin -gamma -gamut -gander -gang -Ganges -gangland -gangling -ganglion -gangplank -gangster -gangway -gannet -Gannett -gantlet -gantry -Ganymede -GAO -gap -gape -gar -garage -garb -garbage -garble -Garcia -garden -gardenia -Gardner -Garfield -gargantuan -gargle -Garibaldi -garish -garland -garlic -garner -garnet -Garrett -garrison -Garrisonian -garrulous -Garry -garter -Garth -Garvey -Gary -gas -Gascony -gaseous -gases -gash -gasify -gasket -gaslight -gasohol -gasoline -gasp -Gaspee -gassy -Gaston -gastrointestinal -gastronome -gastronomy -gate -gatekeep -Gates -gateway -gather -Gatlinburg -gator -gauche -gaucherie -gaudy -gauge -gaugeable -Gauguin -Gaul -gauleiter -Gaulle -gaunt -gauntlet -gaur -gauss -Gaussian -gauze -gave -gavel -Gavin -gavotte -gawk -gawky -gay -Gaylord -gaze -gazelle -gazette -GE -gear -gecko -gedanken -gee -geese -Gegenschein -Geiger -Geigy -geisha -gel -gelable -gelatin -gelatine -gelatinous -geld -gem -geminate -Gemini -gemlike -Gemma -gemstone -gender -gene -genealogy -genera -general -generate -generic -generosity -generous -Genesco -genesis -genetic -Geneva -Genevieve -genial -genie -genii -genital -genitive -genius -Genoa -genotype -genre -gent -genteel -gentian -gentile -gentility -gentle -gentleman -gentlemen -gentry -genuine -genus -geocentric -geochemical -geochemistry -geochronology -geodesic -geodesy -geodetic -geoduck -Geoffrey -geographer -geography -geology -geometer -geometrician -geophysical -geophysics -geopolitic -George -Georgetown -Georgia -Gerald -Geraldine -geranium -Gerard -Gerber -gerbil -Gerhard -Gerhardt -geriatric -germ -German -germane -Germanic -germanium -Germantown -Germany -germicidal -germicide -germinal -germinate -gerontology -Gerry -Gershwin -Gertrude -gerund -gerundial -gerundive -gestalt -Gestapo -gesticulate -gesture -get -getaway -Getty -Gettysburg -geyser -Ghana -ghastly -Ghent -gherkin -ghetto -ghost -ghostlike -ghostly -ghoul -ghoulish -Giacomo -giant -giantess -gibberish -gibbet -gibbon -Gibbons -gibbous -Gibbs -gibby -gibe -giblet -Gibraltar -Gibson -giddap -giddy -Gideon -Gifford -gift -gig -gigabit -gigabyte -gigacycle -gigahertz -gigaherz -gigantic -gigavolt -gigawatt -gigging -giggle -Gil -gila -gilbert -Gilbertson -Gilchrist -gild -Gilead -Giles -gill -Gillespie -Gillette -Gilligan -Gilmore -gilt -gimbal -Gimbel -gimmick -gimmickry -gimpy -gin -Gina -ginger -gingham -gingko -ginkgo -ginmill -Ginn -Gino -Ginsberg -Ginsburg -ginseng -Giovanni -giraffe -gird -girdle -girl -girlie -girlish -girth -gist -Giuliano -Giuseppe -give -giveaway -given -giveth -glacial -glaciate -glacier -glacis -glad -gladden -gladdy -glade -gladiator -gladiolus -Gladstone -Gladys -glamor -glamorous -glamour -glance -gland -glandular -glans -glare -Glasgow -glass -glassine -glassware -glasswort -glassy -Glaswegian -glaucoma -glaucous -glaze -gleam -glean -Gleason -glee -gleeful -glen -Glenda -Glendale -Glenn -glib -Glidden -glide -glimmer -glimpse -glint -glissade -glisten -glitch -glitter -gloat -glob -global -globe -globular -globule -globulin -glom -glomerular -gloom -gloomy -Gloria -Gloriana -glorify -glorious -glory -gloss -glossary -glossed -glossolalia -glossy -glottal -glottis -Gloucester -glove -glow -glucose -glue -glued -gluey -gluing -glum -glut -glutamate -glutamic -glutamine -glutinous -glutton -glyceride -glycerin -glycerinate -glycerine -glycerol -glycine -glycogen -glycol -glyph -GM -GMT -gnarl -gnash -gnat -gnaw -gneiss -gnome -gnomon -gnomonic -gnostic -GNP -gnu -go -Goa -goad -goal -goat -goatherd -gob -gobble -gobbledygook -goblet -god -Goddard -goddess -godfather -Godfrey -godhead -godkin -godlike -godmother -godparent -godsend -godson -Godwin -godwit -goer -goes -Goethe -Goff -gog -goggle -Gogh -gogo -gold -Goldberg -golden -goldeneye -goldenrod -goldenseal -goldfinch -goldfish -Goldman -goldsmith -Goldstein -Goldstine -Goldwater -Goleta -golf -Goliath -golly -gondola -gone -gong -goniometer -Gonzales -Gonzalez -goober -good -goodbye -Goode -Goodman -Goodrich -goodwill -Goodwin -goody -Goodyear -goof -goofy -goose -gooseberry -GOP -gopher -Gordian -Gordon -gore -Goren -gorge -gorgeous -gorgon -Gorham -gorilla -Gorky -gorse -Gorton -gory -gosh -goshawk -gosling -gospel -gossamer -gossip -got -Gotham -Gothic -gotten -Gottfried -Goucher -Gouda -gouge -Gould -gourd -gourmet -gout -govern -governance -governess -governor -gown -GPO -grab -grace -graceful -gracious -grackle -grad -gradate -grade -gradient -gradual -graduate -Grady -Graff -graft -graham -grail -grain -grainy -grammar -grammarian -grammatic -granary -grand -grandchild -grandchildren -granddaughter -grandeur -grandfather -grandiloquent -grandiose -grandma -grandmother -grandnephew -grandniece -grandpa -grandparent -grandson -grandstand -granite -granitic -granny -granola -grant -grantee -grantor -granular -granulate -granule -Granville -grape -grapefruit -grapevine -graph -grapheme -graphic -graphite -grapple -grasp -grass -grassland -grassy -grata -grate -grateful -grater -gratify -gratis -gratitude -gratuitous -gratuity -grave -gravel -graven -Graves -gravestone -graveyard -gravid -gravitate -gravy -gray -graybeard -grayish -Grayson -graywacke -graze -grease -greasy -great -greatcoat -greater -grebe -Grecian -Greece -greed -greedy -Greek -green -Greenbelt -Greenberg -Greenblatt -Greenbriar -Greene -greenery -Greenfield -greengrocer -greenhouse -greenish -Greenland -Greensboro -greensward -greenware -Greenwich -greenwood -Greer -greet -Greg -gregarious -Gregg -Gregory -gremlin -grenade -Grendel -Grenoble -Gresham -Greta -Gretchen -grew -grey -greyhound -greylag -grid -griddle -gridiron -grief -grievance -grieve -grievous -griffin -Griffith -grill -grille -grilled -grillwork -grim -grimace -Grimaldi -grime -Grimes -Grimm -grin -grind -grindstone -grip -gripe -grippe -grisly -grist -gristmill -Griswold -grit -gritty -grizzle -grizzly -groan -groat -grocer -grocery -groggy -groin -grommet -groom -groove -grope -grosbeak -gross -Grosset -Grossman -Grosvenor -grotesque -Groton -ground -groundsel -groundskeep -groundwork -group -groupoid -grout -grove -grovel -Grover -grow -growl -grown -grownup -growth -grub -grubby -grudge -gruesome -gruff -grumble -Grumman -grunt -gryphon -g's -GSA -GU -Guam -guanidine -guanine -guano -guarantee -guaranteeing -guarantor -guaranty -guard -guardhouse -Guardia -guardian -Guatemala -gubernatorial -Guelph -Guenther -guerdon -guernsey -guerrilla -guess -guesswork -guest -guffaw -Guggenheim -Guiana -guidance -guide -guidebook -guideline -guidepost -guiding -guignol -guild -guildhall -guile -Guilford -guillemot -guillotine -guilt -guilty -guinea -guise -guitar -gules -gulf -gull -Gullah -gullet -gullible -gully -gulp -gum -gumbo -gumdrop -gummy -gumption -gumshoe -gun -Gunderson -gunfight -gunfire -gunflint -gunk -gunky -gunman -gunmen -gunnery -gunny -gunplay -gunpowder -gunshot -gunsling -Gunther -gurgle -Gurkha -guru -Gus -gush -gusset -gust -Gustafson -Gustav -Gustave -Gustavus -gusto -gusty -gut -Gutenberg -Guthrie -gutsy -guttural -guy -Guyana -guzzle -Gwen -Gwyn -gym -gymnasium -gymnast -gymnastic -gymnosperm -gyp -gypsite -gypsum -gypsy -gyrate -gyrfalcon -gyro -gyrocompass -gyroscope -h -ha -Haag -Haas -habeas -haberdashery -Haberman -Habib -habit -habitant -habitat -habitation -habitual -habituate -hacienda -hack -hackberry -Hackett -hackle -hackmatack -hackney -hackneyed -hacksaw -had -Hadamard -Haddad -haddock -Hades -Hadley -hadn't -Hadrian -hadron -hafnium -Hagen -Hager -haggard -haggle -Hagstrom -Hague -Hahn -Haifa -haiku -hail -hailstone -hailstorm -Haines -hair -haircut -hairdo -hairpin -hairy -Haiti -Haitian -Hal -halcyon -hale -Haley -half -halfback -halfhearted -halfway -halibut -halide -Halifax -halite -hall -hallelujah -Halley -hallmark -hallow -Halloween -hallucinate -hallway -halma -halo -halocarbon -halogen -Halpern -Halsey -Halstead -halt -halvah -halve -Halverson -ham -Hamal -Hamburg -hamburger -Hamilton -hamlet -Hamlin -hammerhead -hammock -Hammond -hamper -Hampshire -Hampton -hamster -Han -Hancock -hand -handbag -handbook -handclasp -handcuff -Handel -handful -handgun -handhold -handicap -handicapped -handicapper -handicapping -handicraft -handicraftsman -handicraftsmen -handiwork -handkerchief -handle -handleable -handlebar -handline -handmade -handmaiden -handout -handset -handshake -handsome -handspike -handstand -handwaving -handwrite -handwritten -handy -handyman -handymen -Haney -Hanford -hang -hangable -hangar -hangman -hangmen -hangout -hangover -hank -Hankel -Hanley -Hanlon -Hanna -Hannah -Hannibal -Hanoi -Hanover -Hanoverian -Hans -Hansel -Hansen -hansom -Hanson -Hanukkah -hap -haphazard -haploid -haploidy -haplology -happen -happenstance -happy -Hapsburg -harangue -harass -Harbin -harbinger -Harcourt -hard -hardbake -hardboard -hardboiled -hardcopy -harden -hardhat -Hardin -Harding -hardscrabble -hardtack -hardtop -hardware -hardwood -hardworking -hardy -hare -harelip -harem -hark -Harlan -Harlem -Harley -harm -harmful -Harmon -harmonic -harmonica -harmonious -harmony -harness -Harold -harp -harpoon -harpsichord -Harpy -Harriet -Harriman -Harrington -Harris -Harrisburg -Harrison -harrow -harry -harsh -harshen -hart -Hartford -Hartley -Hartman -Harvard -harvest -harvestman -Harvey -hash -hashish -hasn't -hasp -hassle -hast -haste -hasten -Hastings -hasty -hat -hatch -hatchet -hatchway -hate -hateful -hater -Hatfield -hath -Hathaway -hatred -Hatteras -Hattie -Hattiesburg -Haugen -haughty -haul -haulage -haunch -haunt -Hausdorff -Havana -have -haven -haven't -Havilland -havoc -haw -Hawaii -Hawaiian -hawk -Hawkins -Hawley -hawthorn -Hawthorne -hay -Hayden -Haydn -Hayes -hayfield -Haynes -Hays -haystack -Hayward -hayward -hazard -hazardous -haze -hazel -hazelnut -hazy -he -head -headache -headboard -headdress -headland -headlight -headline -headmaster -headphone -headquarter -headquarters -headroom -headset -headsman -headsmen -headstand -headstone -headstrong -headwall -headwater -headway -headwind -heady -heal -Healey -health -healthful -healthy -Healy -heap -hear -heard -hearken -hearsay -hearse -Hearst -heart -heartbeat -heartbreak -hearten -heartfelt -hearth -hearty -heat -heater -heath -heathen -heathenish -Heathkit -heave -heaven -heavenward -heavy -heavyweight -Hebe -hebephrenic -Hebraic -Hebrew -Hecate -hecatomb -heck -heckle -Heckman -hectic -hector -Hecuba -he'd -hedge -hedgehog -hedonism -hedonist -heed -heel -heft -hefty -Hegelian -hegemony -Heidelberg -heigh -height -heighten -Heine -Heinrich -Heinz -heir -heiress -Heisenberg -held -Helen -Helena -Helene -Helga -helical -helicopter -heliocentric -heliotrope -helium -helix -he'll -hell -hellbender -hellebore -Hellenic -hellfire -hellgrammite -hellish -hello -helm -helmet -Helmholtz -helmsman -helmsmen -Helmut -help -helpful -helpmate -Helsinki -Helvetica -hem -hematite -Hemingway -hemisphere -hemispheric -hemlock -hemoglobin -hemolytic -hemorrhage -hemorrhoid -hemosiderin -hemp -Hempstead -hen -henbane -hence -henceforth -henchman -henchmen -Henderson -Hendrick -Hendricks -Hendrickson -henequen -Henley -henpeck -Henri -Henrietta -henry -hepatica -hepatitis -Hepburn -heptane -her -Hera -Heraclitus -herald -herb -Herbert -Herculean -Hercules -herd -herdsman -here -hereabout -hereafter -hereby -hereditary -heredity -Hereford -herein -hereinabove -hereinafter -hereinbelow -hereof -heresy -heretic -hereto -heretofore -hereunder -hereunto -herewith -heritable -heritage -Herkimer -Herman -Hermann -hermeneutic -Hermes -hermetic -Hermite -hermitian -Hermosa -Hernandez -hero -Herodotus -heroes -heroic -heroin -heroine -heroism -heron -herpes -herpetology -Herr -herringbone -Herschel -herself -Hershel -Hershey -hertz -Hertzog -hesitant -hesitate -hesitater -Hesperus -Hess -Hesse -Hessian -Hester -heterocyclic -heterodyne -heterogamous -heterogeneity -heterogeneous -heterosexual -heterostructure -heterozygous -Hetman -Hettie -Hetty -Heublein -heuristic -Heusen -Heuser -hew -Hewett -Hewitt -Hewlett -hewn -hex -hexachloride -hexadecimal -hexafluoride -hexagon -hexagonal -hexameter -hexane -hey -heyday -hi -Hiatt -hiatus -Hiawatha -hibachi -Hibbard -hibernate -Hibernia -hick -Hickey -Hickman -hickory -Hicks -hid -hidalgo -hidden -hide -hideaway -hideous -hideout -hierarchal -hierarchic -hierarchy -hieratic -hieroglyphic -Hieronymus -hifalutin -Higgins -high -highball -highboy -highest -highfalutin -highhanded -highland -highlight -highroad -hightail -highway -highwayman -highwaymen -hijack -hijinks -hike -hilarious -hilarity -Hilbert -Hildebrand -hill -hillbilly -Hillcrest -Hillel -hillman -hillmen -hillock -hillside -hilltop -hilly -hilt -Hilton -hilum -him -Himalaya -himself -hind -hindmost -hindrance -hindsight -Hindu -Hinduism -Hines -hinge -Hinman -hint -hinterland -hip -hippo -Hippocrates -Hippocratic -hippodrome -hippopotamus -hippy -hipster -Hiram -hire -hireling -Hiroshi -Hiroshima -Hirsch -hirsute -his -Hispanic -hiss -histamine -histidine -histochemic -histochemistry -histogram -histology -historian -historic -historiography -history -histrionic -hit -Hitachi -hitch -Hitchcock -hither -hitherto -Hitler -hive -ho -hoagie -Hoagland -hoagy -hoar -hoard -hoarfrost -hoarse -hob -Hobart -Hobbes -hobble -Hobbs -hobby -hobbyhorse -hobgoblin -hobo -Hoboken -hoc -hock -hockey -hocus -hodge -hodgepodge -Hodges -Hodgkin -hoe -Hoff -Hoffman -hog -hogan -hogging -hoi -Hokan -Holbrook -Holcomb -hold -holden -holdout -holdover -holdup -hole -holeable -holiday -Holland -Hollandaise -holler -Hollerith -Hollingsworth -Hollister -hollow -Holloway -hollowware -holly -hollyhock -Hollywood -Holm -Holman -Holmdel -Holmes -holmium -holocaust -Holocene -hologram -holography -Holst -Holstein -holster -holt -Holyoke -holystone -Hom -homage -home -homebound -homebuild -homebuilder -homebuilding -homecome -homecoming -homeland -homemade -homemake -homeomorph -homeomorphic -homeopath -homeostasis -homeown -homeowner -Homeric -homesick -homestead -homeward -homework -homicidal -homicide -homily -homo -homogenate -homogeneity -homogeneous -homologous -homologue -homology -homomorphic -homomorphism -homonym -homophobia -homosexual -homotopy -homozygous -homunculus -Honda -hondo -Honduras -hone -honest -honesty -honey -honeybee -honeycomb -honeydew -honeymoon -honeysuckle -Honeywell -hong -honk -Honolulu -honoraria -honorarium -honorary -honoree -honorific -Honshu -hooch -hood -hoodlum -hoof -hoofmark -hook -hookup -hookworm -hooligan -hoop -hoopla -hoosegow -Hoosier -hoot -Hoover -hooves -hop -hope -hopeful -Hopkins -Hopkinsian -hopple -hopscotch -Horace -Horatio -horde -horehound -horizon -horizontal -hormone -horn -hornbeam -hornblende -Hornblower -hornet -hornmouth -horntail -hornwort -horny -horology -horoscope -Horowitz -horrendous -horrible -horrid -horrify -horror -horse -horseback -horsedom -horseflesh -horsefly -horsehair -horseman -horsemen -horseplay -horsepower -horseshoe -horsetail -horsewoman -horsewomen -horticulture -Horton -Horus -hose -hosiery -hospice -hospitable -hospital -host -hostage -hostelry -hostess -hostile -hostler -hot -hotbed -hotbox -hotel -hotelman -hothead -hothouse -hotrod -hotshot -Houdaille -Houdini -hough -Houghton -hound -hour -hourglass -house -houseboat -housebreak -housebroken -housefly -household -housekeep -housewares -housewife -housewives -housework -Houston -hove -hovel -hover -how -Howard -howdy -Howe -Howell -however -howl -howsoever -howsomever -hoy -hoyden -hoydenish -Hoyt -Hrothgar -h's -hub -Hubbard -Hubbell -hubbub -hubby -Huber -Hubert -hubris -huck -huckleberry -huckster -huddle -Hudson -hue -hued -huff -Huffman -hug -huge -hugging -Huggins -Hugh -Hughes -Hugo -huh -hulk -hull -hum -human -humane -humanitarian -humanoid -humble -Humboldt -humerus -humid -humidify -humidistat -humiliate -humility -Hummel -hummingbird -hummock -humorous -hump -humpback -Humphrey -humpty -humus -Hun -hunch -hundred -hundredfold -hundredth -hung -Hungarian -Hungary -hungry -hunk -hunt -Hunter -Huntington -Huntley -Huntsville -Hurd -hurdle -hurl -hurley -Huron -hurrah -hurray -hurricane -hurry -Hurst -hurt -hurtle -hurty -Hurwitz -husband -husbandman -husbandmen -husbandry -hush -husky -hustle -Huston -hut -hutch -Hutchins -Hutchinson -Hutchison -Huxley -Huxtable -huzzah -hyacinth -Hyades -hyaline -Hyannis -hybrid -Hyde -hydra -hydrangea -hydrant -hydrate -hydraulic -hydride -hydro -hydrocarbon -hydrochemistry -hydrochloric -hydrochloride -hydrodynamic -hydroelectric -hydrofluoric -hydrogen -hydrogenate -hydrology -hydrolysis -hydrometer -hydronium -hydrophilic -hydrophobia -hydrophobic -hydrosphere -hydrostatic -hydrothermal -hydrous -hydroxide -hydroxy -hydroxyl -hydroxylate -hyena -hygiene -hygrometer -hygroscopic -hying -Hyman -hymen -hymn -hymnal -hyperbola -hyperbolic -hyperboloid -hyperboloidal -hypertensive -hyphen -hyphenate -hypnosis -hypnotic -hypoactive -hypochlorite -hypochlorous -hypocrisy -hypocrite -hypocritic -hypocritical -hypocycloid -hypodermic -hypophyseal -hypotenuse -hypothalamic -hypothalamus -hypotheses -hypothesis -hypothetic -hypothyroid -hysterectomy -hysteresis -hysteria -hysteric -hysteron -i -IA -iambic -Ian -Iberia -ibex -ibid -ibis -IBM -Ibn -Icarus -ICC -ice -iceberg -icebox -Iceland -iceland -Icelandic -ichneumon -icicle -icky -icon -iconic -iconoclasm -iconoclast -icosahedra -icosahedral -icosahedron -icy -I'd -ID -Ida -Idaho -idea -ideal -ideate -idempotent -identical -identify -identity -ideolect -ideologue -ideology -idiocy -idiom -idiomatic -idiosyncrasy -idiosyncratic -idiot -idiotic -idle -idol -idolatry -idyll -idyllic -i.e -IEEE -if -iffy -Ifni -igloo -igneous -ignite -ignition -ignoble -ignominious -ignoramus -ignorant -ignore -Igor -ii -iii -Ike -IL -ileum -iliac -Iliad -I'll -ill -illegal -illegible -illegitimacy -illegitimate -illicit -illimitable -Illinois -illiteracy -illiterate -illogic -illume -illuminate -illumine -illusion -illusionary -illusive -illusory -illustrate -illustrious -Ilona -Ilyushin -I'm -image -imagen -imagery -imaginary -imaginate -imagine -imbalance -imbecile -imbibe -Imbrium -imbroglio -imbrue -imbue -imitable -imitate -immaculate -immanent -immaterial -immature -immeasurable -immediacy -immediate -immemorial -immense -immerse -immersion -immigrant -immigrate -imminent -immiscible -immobile -immobility -immoderate -immodest -immodesty -immoral -immortal -immovable -immune -immunization -immunoelectrophoresis -immutable -imp -impact -impair -impale -impalpable -impart -impartation -impartial -impassable -impasse -impassion -impassive -impatient -impeach -impeccable -impedance -impede -impediment -impel -impelled -impeller -impelling -impend -impenetrable -imperate -imperative -imperceivable -imperceptible -imperfect -imperial -imperil -imperious -imperishable -impermeable -impermissible -impersonal -impersonate -impertinent -imperturbable -impervious -impetuous -impetus -impiety -impinge -impious -impish -implacable -implant -implantation -implausible -implement -implementation -implementer -implementor -implicant -implicate -implicit -implode -implore -implosion -impolite -impolitic -imponderable -import -important -importation -importunate -importune -impose -imposition -impossible -impost -imposture -impotent -impound -impoverish -impracticable -impractical -imprecate -imprecise -imprecision -impregnable -impregnate -impresario -impress -impressible -impression -impressive -imprimatur -imprint -imprison -improbable -impromptu -improper -impropriety -improve -improvident -improvisate -improvisation -improvise -imprudent -impudent -impugn -impulse -impulsive -impunity -impure -imputation -impute -in -inability -inaccessible -inaccuracy -inaccurate -inaction -inactivate -inactive -inadequacy -inadequate -inadmissible -inadvertent -inadvisable -inalienable -inalterable -inane -inanimate -inappeasable -inapplicable -inappreciable -inapproachable -inappropriate -inapt -inaptitude -inarticulate -inasmuch -inattention -inattentive -inaudible -inaugural -inaugurate -inauspicious -inboard -inborn -inbred -inbreed -Inc -Inca -incalculable -incandescent -incant -incantation -incapable -incapacitate -incapacity -incarcerate -incarnate -incaution -incautious -incendiary -incense -incentive -inception -inceptor -incessant -incest -incestuous -inch -incident -incidental -incinerate -incipient -incise -incisive -incite -inclement -inclination -incline -inclose -include -inclusion -inclusive -incoherent -incombustible -income -incommensurable -incommensurate -incommunicable -incommutable -incomparable -incompatible -incompetent -incomplete -incompletion -incomprehensible -incomprehension -incompressible -incomputable -inconceivable -inconclusive -incondensable -incongruity -incongruous -inconsequential -inconsiderable -inconsiderate -inconsistent -inconsolable -inconspicuous -inconstant -incontestable -incontrollable -incontrovertible -inconvenient -inconvertible -incorporable -incorporate -incorrect -incorrigible -incorruptible -increasable -increase -incredible -incredulity -incredulous -increment -incriminate -incubate -incubi -incubus -inculcate -inculpable -incumbent -incur -incurred -incurrer -incurring -incursion -indebted -indecent -indecipherable -indecision -indecisive -indecomposable -indeed -indefatigable -indefensible -indefinable -indefinite -indelible -indelicate -indemnify -indemnity -indent -indentation -indenture -independent -indescribable -indestructible -indeterminable -indeterminacy -indeterminate -index -India -Indian -Indiana -Indianapolis -indicant -indicate -indices -indict -indicter -Indies -indifferent -indigene -indigenous -indigent -indigestible -indigestion -indignant -indignation -indignity -indigo -Indira -indirect -indiscernible -indiscoverable -indiscreet -indiscretion -indiscriminate -indispensable -indispose -indisposition -indisputable -indissoluble -indistinct -indistinguishable -indium -individual -individualism -individuate -indivisible -Indochina -Indochinese -indoctrinate -Indoeuropean -indolent -indomitable -Indonesia -indoor -indorse -indubitable -induce -inducible -induct -inductance -inductee -inductor -indulge -indulgent -industrial -industrialism -industrious -industry -indwell -indy -ineducable -ineffable -ineffective -ineffectual -inefficacy -inefficient -inelastic -inelegant -ineligible -ineluctable -inept -inequality -inequitable -inequity -inequivalent -ineradicable -inert -inertance -inertia -inertial -inescapable -inestimable -inevitable -inexact -inexcusable -inexhaustible -inexorable -inexpedient -inexpensive -inexperience -inexpert -inexpiable -inexplainable -inexplicable -inexplicit -inexpressible -inextinguishable -inextricable -infallible -infamous -infamy -infancy -infant -infantile -infantry -infantryman -infantrymen -infarct -infatuate -infeasible -infect -infectious -infelicitous -infelicity -infer -inference -inferential -inferior -infernal -inferno -inferred -inferring -infertile -infest -infestation -infidel -infield -infight -infighting -infiltrate -infima -infimum -infinite -infinitesimal -infinitive -infinitude -infinitum -infinity -infirm -infirmary -infix -inflame -inflammable -inflammation -inflammatory -inflate -inflater -inflationary -inflect -inflexible -inflict -inflicter -inflow -influence -influent -influential -influenza -influx -info -inform -informal -informant -Informatica -information -informative -infra -infract -infrared -infrastructure -infrequent -infringe -infuriate -infuse -infusible -infusion -ingather -ingenious -ingenuity -ingenuous -Ingersoll -ingest -ingestible -ingestion -inglorious -ingot -Ingram -ingrate -ingratiate -ingratitude -ingredient -ingrown -inhabit -inhabitant -inhabitation -inhalation -inhale -inharmonious -inhere -inherent -inherit -inheritance -inheritor -inhibit -inhibition -inhibitor -inhibitory -inholding -inhomogeneity -inhomogeneous -inhospitable -inhuman -inhumane -inimical -inimitable -iniquitous -iniquity -initial -initiate -inject -injudicious -Injun -injunct -injunction -injure -injurious -injury -injustice -ink -inkling -inlaid -inland -inlay -inlet -Inman -inmate -inn -innards -innate -inner -innermost -innkeeper -innocent -innocuous -innovate -innuendo -innumerable -inoculate -inoffensive -inoperable -inoperative -inopportune -inordinate -inorganic -input -inputting -inquest -inquire -inquiry -inquisition -inquisitive -inquisitor -inroad -insane -insatiable -inscribe -inscription -inscrutable -insect -insecticide -insecure -inseminate -insensible -insensitive -inseparable -insert -inset -inshore -inside -insidious -insight -insightful -insignia -insignificant -insincere -insinuate -insipid -insist -insistent -insofar -insolent -insoluble -insolvable -insolvent -insomnia -insomniac -insouciant -inspect -inspector -inspiration -inspire -instable -install -installation -instalment -instance -instant -instantaneous -instantiate -instead -instep -instigate -instill -instillation -instinct -instinctual -institute -institution -instruct -instructor -instrument -instrumentation -insubordinate -insubstantial -insufferable -insufficient -insular -insulate -insulin -insult -insuperable -insupportable -insuppressible -insurance -insure -insurgent -insurmountable -insurrect -insurrection -intact -intake -intangible -integer -integrable -integral -integrand -integrate -integrity -integument -intellect -intellectual -intelligent -intelligentsia -intelligible -intemperance -intemperate -intend -intendant -intense -intensify -intensive -intent -intention -inter -intercalate -intercept -interception -interceptor -intercom -interdict -interest -interfere -interference -interferometer -interim -interior -interject -interlude -intermediary -intermit -intermittent -intern -internal -internecine -internescine -Interpol -interpolant -interpolate -interpolatory -interpret -interpretation -interpretive -interregnum -interrogate -interrogatory -interrupt -interruptible -interruption -intersect -intersperse -interstice -interstitial -interval -intervene -intervenor -intervention -interviewee -intestate -intestinal -intestine -intimacy -intimal -intimate -intimater -intimidate -into -intolerable -intolerant -intonate -intone -intoxicant -intoxicate -intractable -intramolecular -intransigent -intransitive -intrepid -intricacy -intricate -intrigue -intrinsic -introduce -introduction -introductory -introit -introject -introspect -introversion -introvert -intrude -intrusion -intrusive -intuit -intuitable -intuition -intuitive -inundate -inure -invade -invalid -invalidate -invaluable -invariable -invariant -invasion -invasive -invective -inveigh -inveigle -invent -invention -inventive -inventor -inventory -Inverness -inverse -inversion -invert -invertebrate -invertible -invest -investigate -investigatory -investor -inveterate -inviable -invidious -invigorate -invincible -inviolable -inviolate -invisible -invitation -invite -invitee -invocate -invoice -invoke -involuntary -involute -involution -involutorial -involutory -involve -invulnerable -inward -Io -iodate -iodide -iodinate -iodine -ion -ionic -ionosphere -ionospheric -iota -Iowa -ipecac -ipsilateral -ipso -IQ -IR -Ira -Iran -Iranian -Iraq -irate -ire -Ireland -Irene -iridium -iris -Irish -Irishman -Irishmen -irk -irksome -Irma -iron -ironic -ironside -ironstone -ironwood -irony -Iroquois -irradiate -irrational -Irrawaddy -irreclaimable -irreconcilable -irrecoverable -irredeemable -irredentism -irredentist -irreducible -irrefutable -irregular -irrelevancy -irrelevant -irremediable -irremovable -irreparable -irreplaceable -irrepressible -irreproachable -irreproducible -irresistible -irresolute -irresolution -irresolvable -irrespective -irresponsible -irretrievable -irreverent -irreversible -irrevocable -irrigate -irritable -irritant -irritate -irruption -IRS -Irvin -Irvine -Irving -Irwin -i's -is -Isaac -Isaacson -Isabel -Isabella -Isadore -Isaiah -isentropic -Isfahan -Ising -isinglass -Isis -Islam -Islamabad -Islamic -island -isle -isn't -isochronal -isochronous -isocline -isolate -Isolde -isomer -isomorph -isomorphic -isopleth -isotherm -isothermal -isotope -isotopic -isotropic -isotropy -Israel -Israeli -Israelite -issuance -issuant -issue -Istanbul -Istvan -it -Italian -italic -Italy -itch -it'd -item -iterate -Ithaca -itinerant -itinerary -it'll -Ito -itself -IT&T -ITT -iv -Ivan -Ivanhoe -I've -Iverson -ivory -ivy -ix -Izvestia -j -jab -Jablonsky -jack -jackanapes -jackass -jackboot -jackdaw -jacket -Jackie -jackknife -Jackman -jackpot -Jackson -Jacksonian -Jacksonville -Jacky -JACM -Jacob -Jacobean -Jacobi -Jacobian -Jacobite -Jacobs -Jacobsen -Jacobson -Jacobus -Jacqueline -Jacques -jade -Jaeger -jag -jagging -jaguar -jail -Jaime -Jakarta -Jake -jake -jalopy -jam -Jamaica -jamboree -James -Jamestown -Jan -Jane -Janeiro -Janet -jangle -Janice -janissary -janitor -janitorial -Janos -Jansenist -January -Janus -Japan -Japanese -jar -jargon -Jarvin -Jason -jasper -jaundice -jaunty -Java -javelin -jaw -jawbone -jawbreak -jay -jazz -jazzy -jealous -jealousy -jean -Jeannie -Jed -jeep -Jeff -Jefferson -Jeffersonian -Jeffrey -Jehovah -jejune -jejunum -jelly -jellyfish -Jenkins -Jennie -Jennifer -Jennings -jenny -Jensen -jeopard -jeopardy -Jeremiah -Jeremy -Jeres -Jericho -jerk -jerky -Jeroboam -Jerome -jerry -jersey -Jerusalem -jess -Jesse -Jessica -Jessie -jest -Jesuit -Jesus -jet -jetliner -jettison -Jew -jewel -Jewell -jewelry -Jewett -Jewish -jibe -jiffy -jig -jigging -jiggle -jigsaw -Jill -jilt -Jim -Jimenez -Jimmie -jimmy -jingle -jinx -jitter -jitterbug -jitterbugger -jitterbugging -jittery -jive -Jo -Joan -Joanna -Joanne -Joaquin -job -jobholder -jock -jockey -jockstrap -jocose -jocular -jocund -Joe -Joel -joey -jog -jogging -joggle -Johann -Johannes -Johannesburg -Johansen -Johanson -John -Johnny -Johns -Johnsen -Johnson -Johnston -Johnstown -join -joint -joke -Joliet -Jolla -jolly -jolt -Jon -Jonas -Jonathan -Jones -jonquil -Jordan -Jorge -Jorgensen -Jorgenson -Jose -Josef -Joseph -Josephine -Josephson -Josephus -Joshua -Josiah -joss -jostle -jot -joule -jounce -journal -journalese -journey -journeyman -journeymen -joust -Jovanovich -Jove -jovial -Jovian -jowl -jowly -joy -Joyce -joyful -joyous -joyride -joystick -Jr -j's -Juan -Juanita -jubilant -jubilate -jubilee -Judaism -Judas -Judd -Jude -judge -judicable -judicatory -judicature -judicial -judiciary -judicious -Judith -judo -Judson -Judy -jug -jugate -jugging -juggle -Jugoslavia -juice -juicy -juju -jujube -juke -Jukes -julep -Jules -Julia -Julie -Juliet -Julio -Julius -July -jumble -jumbo -jump -jumpy -junco -junction -junctor -juncture -June -Juneau -jungle -junior -juniper -junk -junkerdom -junketeer -junky -Juno -junta -Jupiter -Jura -Jurassic -jure -juridic -jurisdiction -jurisprudent -jurisprudential -juror -jury -just -justice -justiciable -justify -Justine -Justinian -jut -jute -Jutish -juvenile -juxtapose -juxtaposition -k -Kabuki -Kabul -Kaddish -Kafka -Kafkaesque -Kahn -kaiser -Kajar -Kalamazoo -kale -kaleidescope -kaleidoscope -kalmia -Kalmuk -Kamchatka -kamikaze -Kampala -Kane -kangaroo -Kankakee -Kansas -Kant -kaolin -kaolinite -Kaplan -kapok -kappa -Karachi -Karamazov -karate -Karen -Karl -karma -Karol -Karp -karyatid -Kaskaskia -Kate -Katharine -Katherine -Kathleen -Kathy -Katie -Katmandu -Katowice -Katz -Kauffman -Kaufman -kava -Kay -kayo -kazoo -Keaton -Keats -keddah -keel -keelson -keen -Keenan -keep -keeshond -keg -Keith -Keller -Kelley -Kellogg -Kelly -kelly -kelp -Kelsey -Kelvin -Kemp -ken -Kendall -Kennan -Kennecott -Kennedy -kennel -Kenneth -Kenney -keno -Kensington -Kent -Kenton -Kentucky -Kenya -Kenyon -Kepler -kept -kerchief -Kermit -kern -kernel -Kernighan -kerosene -Kerr -kerry -kerygma -Kessler -kestrel -ketch -ketchup -ketone -ketosis -Kettering -kettle -Kevin -key -keyboard -keyed -Keyes -keyhole -Keynes -Keynesian -keynote -keypunch -keys -keystone -keyword -khaki -khan -Khartoum -Khmer -Khrushchev -kibbutzim -kibitz -kick -kickback -kickoff -kid -Kidde -kiddie -kidnap -kidnapped -kidnapping -kidney -Kieffer -Kiev -Kiewit -Kigali -Kikuyu -Kilgore -kill -killdeer -killjoy -kilo -kilohm -Kim -Kimball -Kimberly -kimono -kin -kind -kindergarten -kindle -kindred -kinematic -kinesic -kinesthesis -kinetic -king -kingbird -kingdom -kingfisher -kinglet -kingpin -Kingsbury -Kingsley -Kingston -kink -kinky -Kinney -Kinshasha -kiosk -Kiowa -Kipling -Kirby -Kirchner -Kirchoff -kirk -Kirkland -Kirkpatrick -Kirov -kiss -kissing -kit -Kitakyushu -kitchen -kitchenette -kite -kitten -kittenish -kittle -kitty -kiva -kivu -Kiwanis -kiwi -Klan -Klaus -klaxon -kleenex -Klein -Kline -Klux -klystron -knack -Knapp -knapsack -Knauer -knead -knee -kneecap -kneel -knell -knelt -knew -knick -Knickerbocker -knife -knifelike -knight -Knightsbridge -knit -knives -knob -knobby -knock -knockdown -knockout -knoll -knot -Knott -knotty -know -knoweth -knowhow -knowledge -knowledgeable -Knowles -Knowlton -known -Knox -Knoxville -knuckle -knuckleball -Knudsen -Knudson -knurl -Knutsen -Knutson -koala -Kobayashi -Koch -Kochab -Kodachrome -Kodak -kodak -Kodiak -Koenig -Koenigsberg -kohlrabi -koinonia -kola -kolkhoz -kombu -Kong -Konrad -Koppers -Koran -Korea -kosher -Kovacs -Kowalewski -Kowalski -Kowloon -kraft -Krakatoa -Krakow -Kramer -Krause -kraut -Krebs -Kremlin -Kresge -Krieger -Krishna -Kristin -Kronecker -Krueger -Kruger -Kruse -krypton -k's -KS -Ku -kudo -kudzu -Kuhn -kulak -kumquat -Kurd -Kurt -Kuwait -kwashiorkor -KY -Kyle -Kyoto -l -la -lab -Laban -label -labia -labial -labile -lability -laboratory -laborious -labour -Labrador -labradorite -labyrinth -lac -lace -lacerate -Lacerta -lacewing -Lachesis -lack -lackadaisic -lackey -lackluster -laconic -lacquer -lacrosse -lactate -lactose -lacuna -lacunae -lacustrine -lacy -lad -laden -ladle -lady -ladyfern -ladylike -Lafayette -lag -lager -lagging -lagoon -Lagos -Lagrange -Lagrangian -Laguerre -Lahore -laid -Laidlaw -lain -lair -laissez -laity -lake -Lakehurst -lakeside -lam -Lamar -Lamarck -lamb -lambda -lambert -lame -lamellar -lament -lamentation -laminar -laminate -lamp -lampblack -lamplight -lampoon -lamprey -Lana -Lancashire -Lancaster -lance -land -landau -landfill -landhold -Landis -landlord -landmark -landowner -landscape -landslide -lane -Lang -Lange -Langley -Langmuir -language -languid -languish -lank -Lanka -lanky -Lansing -lantern -lanthanide -lanthanum -Lao -Laocoon -Laos -Laotian -lap -lapel -lapelled -lapidary -Laplace -Laplacian -lappet -lapse -Laramie -larceny -larch -lard -Laredo -Lares -large -largemouth -largesse -lariat -lark -Larkin -larkspur -Larry -Lars -Larsen -Larson -larva -larvae -larval -laryngeal -larynges -larynx -lascar -lascivious -lase -lash -lass -lasso -last -Laszlo -latch -late -latent -later -latera -lateral -Lateran -laterite -latex -lath -lathe -Lathrop -Latin -Latinate -latitude -latitudinal -latitudinary -Latrobe -latter -lattice -latus -Latvia -laud -laudanum -laudatory -Lauderdale -Laue -laugh -laughingstock -Laughlin -laughter -launch -launder -laundry -laura -laureate -laurel -Lauren -Laurence -Laurent -Laurentian -Laurie -Lausanne -lava -lavabo -lavatory -lavender -lavish -Lavoisier -law -lawbreak -lawbreaker -lawbreaking -lawful -lawgive -lawgiver -lawgiving -lawmake -lawman -lawmen -lawn -Lawrence -lawrencium -Lawson -lawsuit -lawyer -lax -laxative -lay -layette -layman -laymen -layoff -layout -Layton -layup -Lazarus -laze -lazy -lazybones -lea -leach -leachate -lead -leaden -leadeth -leadsman -leadsmen -leaf -leaflet -leafy -league -leak -leakage -leaky -lean -Leander -leap -leapfrog -leapt -Lear -learn -lease -leasehold -leash -least -leather -leatherback -leatherneck -leatherwork -leathery -leave -leaven -Leavenworth -Lebanese -Lebanon -lebensraum -Lebesgue -lecher -lechery -lectern -lectionary -lecture -led -ledge -lee -leech -Leeds -leek -leer -leery -Leeuwenhoek -leeward -leeway -left -leftmost -leftover -leftward -lefty -leg -legacy -legal -legate -legatee -legato -legend -legendary -Legendre -legerdemain -legging -leggy -leghorn -legible -legion -legislate -legislature -legitimacy -legitimate -legume -leguminous -Lehigh -Lehman -Leigh -Leighton -Leila -leisure -leitmotif -leitmotiv -Leland -lemma -lemming -lemon -lemonade -Lemuel -Len -Lena -lend -length -lengthen -lengthwise -lengthy -lenient -Lenin -Leningrad -Leninism -Leninist -Lennox -Lenny -Lenore -lens -lent -Lenten -lenticular -lentil -Leo -Leon -Leona -Leonard -Leonardo -Leone -Leonid -leonine -leopard -Leopold -leper -lepidolite -leprosy -Leroy -Lesbian -lesbian -lesion -Leslie -Lesotho -less -lessee -lessen -lesson -lessor -lest -Lester -let -lethal -lethargic -lethargy -Lethe -Letitia -letterhead -letterman -lettermen -lettuce -leucine -leukemia -Lev -levee -level -lever -leverage -Levi -Levin -Levine -Levis -levitate -Leviticus -Levitt -levity -levulose -levy -Lew -lew -lewd -lewis -lexical -lexicography -lexicon -Lexington -Leyden -liable -liaison -liar -libation -libel -libelous -liberal -liberate -Liberia -libertarian -libertine -liberty -libidinous -libido -librarian -library -librate -librettist -libretto -Libreville -Libya -lice -licensable -licensee -licensor -licentious -lichen -lick -licorice -lid -lie -Liechtenstein -lied -lien -lieu -lieutenant -life -lifeblood -lifeboat -lifeguard -lifelike -lifelong -lifespan -lifestyle -lifetime -LIFO -lift -ligament -ligand -ligature -Ligget -Liggett -light -lighten -lightface -lighthearted -lighthouse -lightning -lightproof -lightweight -lignite -lignum -like -liken -likewise -Lila -lilac -Lilian -Lillian -Lilliputian -Lilly -lilt -lily -lim -Lima -limb -limbic -limbo -lime -limelight -Limerick -limestone -limit -limitate -limitation -limousine -limp -limpet -limpid -limpkin -Lin -Lincoln -Lind -Linda -Lindberg -Lindbergh -linden -Lindholm -Lindquist -Lindsay -Lindsey -Lindstrom -line -lineage -lineal -linear -linebacker -lineman -linemen -linen -lineprinter -lineup -linger -lingerie -lingo -lingua -lingual -linguist -liniment -link -linkage -linoleum -Linotype -linseed -lint -Linus -lion -Lionel -lioness -lip -lipid -Lippincott -lipread -Lipschitz -Lipscomb -lipstick -Lipton -liquefaction -liquefy -liqueur -liquid -liquidate -liquidus -liquor -Lisa -Lisbon -Lise -lisle -lisp -Lissajous -list -listen -lit -litany -literacy -literal -literary -literate -literature -lithe -lithic -lithium -lithograph -lithography -lithology -lithosphere -lithospheric -Lithuania -litigant -litigate -litigious -litmus -litterbug -little -littleneck -Littleton -Litton -littoral -liturgic -liturgy -live -liven -Livermore -Liverpool -Liverpudlian -liverwort -livery -livestock -liveth -livid -Livingston -livre -Liz -lizard -Lizzie -Lloyd -lo -load -loaf -loam -loamy -loan -loath -loathe -loathsome -loaves -lob -lobar -lobby -lobe -loblolly -lobo -lobotomy -lobscouse -lobster -lobular -lobule -local -locale -locate -loci -lock -Locke -Lockhart -Lockheed -Lockian -locknut -lockout -locksmith -lockstep -lockup -Lockwood -locomote -locomotion -locomotive -locomotor -locomotory -locoweed -locus -locust -locution -locutor -lodestone -lodge -lodgepole -Lodowick -Loeb -l'oeil -loess -loft -lofty -log -Logan -logarithm -logarithmic -loge -loggerhead -logging -logic -logician -logistic -logjam -logo -loin -loincloth -Loire -Lois -loiter -Loki -Lola -loll -lollipop -lolly -Lomb -Lombard -Lombardy -Lome -London -lone -lonesome -long -longevity -Longfellow -longhand -longhorn -longish -longitude -longitudinal -longleg -longstanding -longtime -longue -look -lookout -lookup -loom -Loomis -loon -loop -loophole -loose -looseleaf -loosen -loosestrife -loot -lop -lope -Lopez -lopseed -lopsided -loquacious -loquacity -loquat -lord -lordosis -lore -Lorelei -Loren -Lorenz -Loretta -Lorinda -Lorraine -Los -losable -lose -loss -lossy -lost -lot -lotion -Lotte -lottery -Lottie -lotus -Lou -loud -loudspeak -loudspeaker -loudspeaking -Louis -Louisa -Louise -Louisiana -Louisville -lounge -Lounsbury -Lourdes -louse -lousewort -lousy -louver -Louvre -love -lovebird -Lovelace -Loveland -lovelorn -low -lowboy -lowdown -Lowe -Lowell -lower -lowland -Lowry -loy -loyal -loyalty -lozenge -l's -LSI -Ltd -LTV -Lubbock -Lubell -lubricant -lubricate -lubricious -lubricity -Lucas -Lucerne -Lucia -Lucian -lucid -Lucifer -Lucille -Lucius -luck -lucky -lucrative -lucre -Lucretia -Lucretius -Lucy -lucy -ludicrous -Ludlow -Ludwig -Lufthansa -Luftwaffe -lug -luge -luger -luggage -lugging -Luis -Luke -luke -lukemia -lukewarm -lull -lullaby -lulu -lumbar -lumber -lumberman -lumbermen -lumen -luminance -luminary -luminescent -luminosity -luminous -lummox -lump -lumpish -Lumpur -lumpy -lunacy -lunar -lunary -lunate -lunatic -lunch -luncheon -lunchroom -lunchtime -Lund -Lundberg -Lundquist -lung -lunge -lupine -Lura -lurch -lure -lurid -lurk -Lusaka -luscious -lush -lust -lustful -lustrous -lusty -lutanist -lute -lutetium -Luther -Lutheran -Lutz -lux -luxe -Luxembourg -luxuriant -luxuriate -luxurious -luxury -Luzon -L'vov -lycopodium -Lydia -lye -lying -Lykes -Lyle -Lyman -lymph -lymphocyte -lymphoma -lynch -Lynchburg -Lynn -lynx -Lyon -Lyons -Lyra -lyric -lyricism -Lysenko -lysergic -lysine -m -ma -Mabel -Mac -macabre -macaque -MacArthur -Macassar -Macbeth -MacDonald -MacDougall -mace -Macedon -Macedonia -MacGregor -Mach -Machiavelli -machination -machine -machinelike -machinery -machismo -macho -macintosh -mack -MacKenzie -mackerel -Mackey -Mackinac -Mackinaw -mackintosh -MacMillan -Macon -macrame -macro -macromolecular -macromolecule -macrophage -macroprocessor -macroscopic -macrostructure -mad -Madagascar -madam -Madame -madcap -madden -Maddox -made -Madeira -Madeleine -Madeline -madhouse -Madison -madman -madmen -Madonna -Madras -Madrid -madrigal -Madsen -madstone -Mae -Maelstrom -maestro -Mafia -magazine -Magdalene -magenta -Maggie -maggot -maggoty -magi -magic -magician -magisterial -magistrate -magma -magna -magnanimity -magnanimous -magnate -magnesia -magnesite -magnesium -magnet -magnetic -magnetite -magneto -magnetron -magnificent -magnify -magnitude -magnolia -magnum -Magnuson -Magog -magpie -Magruder -Mahayana -Mahayanist -mahogany -Mahoney -maid -maiden -maidenhair -maidservant -Maier -mail -mailbox -mailman -mailmen -maim -main -Maine -mainland -mainline -mainstay -mainstream -maintain -maintenance -maitre -majestic -majesty -major -make -makeshift -makeup -Malabar -maladapt -maladaptive -maladjust -maladroit -malady -Malagasy -malaise -malaprop -malaria -malarial -Malawi -Malay -Malaysia -Malcolm -malconduct -malcontent -Malden -maldistribute -Maldive -male -maledict -malefactor -malevolent -malfeasant -malformation -malformed -malfunction -Mali -malice -malicious -malign -malignant -mall -mallard -malleable -mallet -Mallory -mallow -malnourished -malnutrition -malocclusion -Malone -Maloney -malposed -malpractice -Malraux -malt -Malta -Maltese -Malton -maltose -maltreat -mambo -mamma -mammal -mammalian -mammoth -man -mana -manage -manageable -managerial -Managua -Manama -manatee -Manchester -mandamus -mandarin -mandate -mandatory -mandrake -mandrel -mandrill -mane -maneuver -Manfred -manganese -mange -mangel -mangle -Manhattan -manhole -manhood -mania -maniac -maniacal -manic -manifest -manifestation -manifold -manikin -Manila -manipulable -manipulate -Manitoba -mankind -Manley -Mann -manna -mannequin -mannerism -manometer -manor -manpower -Mans -manse -manservant -Mansfield -mansion -manslaughter -mantel -mantic -mantis -mantissa -mantle -mantlepiece -mantrap -manual -Manuel -manufacture -manumission -manumit -manumitted -manure -manuscript -Manville -many -manzanita -Mao -Maori -map -maple -mar -marathon -maraud -marble -Marc -Marceau -Marcel -Marcello -march -Marcia -Marco -Marcus -Marcy -Mardi -mare -Margaret -margarine -Margery -margin -marginal -marginalia -Margo -Marguerite -maria -Marianne -Marie -Marietta -marigold -marijuana -Marilyn -marimba -Marin -marina -marinade -marinate -marine -Marino -Mario -Marion -marionette -marital -maritime -marjoram -Marjorie -Marjory -mark -market -marketeer -marketplace -marketwise -Markham -Markov -Markovian -Marks -marksman -marksmen -Marlboro -Marlborough -Marlene -marlin -Marlowe -marmalade -marmot -maroon -marque -marquee -marquess -Marquette -marquis -marriage -marriageable -married -Marrietta -Marriott -marrow -marrowbone -marry -Mars -Marseilles -marsh -Marsha -marshal -Marshall -marshland -marshmallow -marsupial -mart -marten -martensite -Martha -martial -Martian -martin -Martinez -martingale -martini -Martinique -Martinson -Marty -martyr -martyrdom -marvel -marvelous -Marvin -Marx -Mary -Maryland -mascara -masculine -maser -Maseru -mash -mask -masochism -masochist -mason -Masonic -Masonite -masonry -masque -masquerade -mass -Massachusetts -massacre -massage -masseur -Massey -massif -massive -mast -masterful -mastermind -masterpiece -mastery -mastic -mastiff -mastodon -masturbate -mat -match -matchbook -matchmake -mate -Mateo -mater -material -materiel -maternal -maternity -math -mathematic -mathematician -Mathematik -Mathews -Mathewson -Mathias -Mathieu -Matilda -matinal -matinee -matins -Matisse -matriarch -matriarchal -matrices -matriculate -matrimonial -matrimony -matrix -matroid -matron -Matson -Matsumoto -matte -Matthew -Matthews -mattock -mattress -Mattson -maturate -mature -maudlin -maul -Maureen -Maurice -Mauricio -Maurine -Mauritania -Mauritius -mausoleum -mauve -maverick -Mavis -maw -mawkish -Mawr -Max -max -maxim -maxima -maximal -Maximilian -maximum -Maxine -maxwell -Maxwellian -may -Maya -mayapple -maybe -Mayer -Mayfair -Mayflower -mayhem -Maynard -Mayo -mayonnaise -mayor -mayoral -mayst -Mazda -maze -mazurka -MBA -Mbabane -McAdams -McAllister -McBride -McCabe -McCall -McCallum -McCann -McCarthy -McCarty -McCauley -McClain -McClellan -McClure -McCluskey -McConnel -McConnell -McCormick -McCoy -McCracken -McCullough -McDaniel -McDermott -McDonald -McDonnell -McDougall -McDowell -McElroy -McFadden -McFarland -McGee -McGill -McGinnis -McGovern -McGowan -McGrath -McGraw -McGregor -McGuire -McHugh -McIntosh -McIntyre -McKay -McKee -McKenna -McKenzie -McKeon -McKesson -McKinley -McKinney -McKnight -McLaughlin -McLean -McLeod -McMahon -McMillan -McMullen -McNally -McNaughton -McNeil -McNulty -McPherson -MD -me -mead -meadow -meadowland -meadowsweet -meager -meal -mealtime -mealy -mean -meander -meaningful -meant -meantime -meanwhile -measle -measure -meat -meaty -Mecca -mechanic -mechanism -mechanist -mecum -medal -medallion -meddle -Medea -Medford -media -medial -median -mediate -medic -medicate -Medici -medicinal -medicine -medico -mediocre -mediocrity -meditate -Mediterranean -medium -medlar -medley -Medusa -meek -meet -meetinghouse -Meg -megabit -megabyte -megahertz -megalomania -megalomaniac -megaton -megavolt -megawatt -megaword -megohm -Meier -meiosis -Meistersinger -Mekong -Mel -melamine -melancholy -Melanesia -melange -Melanie -melanin -melanoma -Melbourne -Melcher -meld -melee -Melinda -meliorate -Melissa -Mellon -mellow -melodic -melodious -melodrama -melodramatic -melody -melon -Melpomene -melt -meltdown -meltwater -Melville -Melvin -member -membrane -memento -memo -memoir -memorabilia -memorable -memoranda -memorandum -memorial -memory -Memphis -men -menace -menagerie -menarche -mend -mendacious -mendacity -Mendel -mendelevium -Mendelssohn -Menelaus -menfolk -menhaden -menial -meningitis -meniscus -Menlo -Mennonite -menopause -menstruate -mensurable -mensuration -mental -mention -mentor -menu -Menzies -Mephistopheles -mercantile -Mercator -Mercedes -mercenary -mercer -merchandise -merchant -merciful -mercilessly -Merck -mercurial -mercuric -mercury -mercy -mere -Meredith -meretricious -merganser -merge -meridian -meridional -meringue -merit -meritorious -Merle -merlin -mermaid -Merriam -Merrill -Merrimack -merriment -Merritt -merry -merrymake -Mervin -mesa -mescal -mescaline -mesenteric -mesh -mesmeric -mesoderm -meson -Mesopotamia -Mesozoic -mesquite -mess -message -messenger -Messiah -messiah -messieurs -Messrs -messy -met -metabole -metabolic -metabolism -metabolite -metal -metallic -metalliferous -metallography -metalloid -metallurgic -metallurgist -metallurgy -metalwork -metamorphic -metamorphism -metamorphose -metamorphosis -metaphor -metaphoric -Metcalf -mete -meteor -meteoric -meteorite -meteoritic -meteorology -meter -methacrylate -methane -methanol -methionine -method -methodic -Methodism -Methodist -methodology -Methuen -Methuselah -methyl -methylene -meticulous -metier -metric -metro -metronome -metropolis -metropolitan -mettle -mettlesome -Metzler -mew -Mexican -Mexico -Meyer -Meyers -mezzanine -mezzo -mi -Miami -miasma -miasmal -mica -mice -Michael -Michaelangelo -Michel -Michelangelo -Michele -Michelin -Michelson -Michigan -michigan -Mickelson -Mickey -Micky -micro -microbial -microcosm -microfiche -micrography -microjoule -micron -Micronesia -microscopy -mid -Midas -midband -midday -middle -Middlebury -middleman -middlemen -Middlesex -Middleton -Middletown -middleweight -midge -midget -midland -midmorn -midnight -midpoint -midrange -midscale -midsection -midshipman -midshipmen -midspan -midst -midstream -midterm -midway -midweek -Midwest -Midwestern -midwife -midwinter -midwives -mien -miff -mig -might -mightn't -mighty -mignon -migrant -migrate -migratory -Miguel -mike -mila -Milan -milch -mild -mildew -Mildred -mile -mileage -Miles -milestone -milieu -militant -militarism -militarist -military -militate -militia -militiamen -milk -milkweed -milky -mill -Millard -millenarian -millenia -millennia -millennium -miller -millet -Millie -Millikan -millinery -million -millionaire -millions -millionth -millipede -Mills -millstone -milord -milt -Milton -Miltonic -Milwaukee -mimeograph -mimesis -mimetic -Mimi -mimic -mimicked -mimicking -min -minaret -mince -mincemeat -mind -Mindanao -mindful -mine -minefield -mineral -mineralogy -Minerva -minestrone -minesweeper -mingle -mini -miniature -minibike -minicomputer -minim -minima -minimal -minimax -minimum -minion -ministerial -ministry -mink -Minneapolis -Minnesota -Minnie -minnow -Minoan -minor -Minos -minot -Minsk -Minsky -minstrel -minstrelsy -mint -minuend -minuet -minus -minuscule -minute -minuteman -minutemen -minutiae -Miocene -Mira -miracle -miraculous -mirage -Miranda -mire -Mirfak -Miriam -mirror -mirth -misanthrope -misanthropic -miscegenation -miscellaneous -miscellany -mischievous -miscible -miscreant -miser -misery -misnomer -misogynist -misogyny -mispronunciation -miss -misshapen -missile -mission -missionary -Mississippi -Mississippian -missive -Missoula -Missouri -Missy -mist -mistletoe -mistress -misty -MIT -Mitchell -mite -miterwort -mitigate -mitochondria -mitosis -mitral -mitre -mitt -mitten -mix -mixture -mixup -Mizar -MN -mnemonic -MO -moan -moat -mob -mobcap -Mobil -mobile -mobility -mobster -moccasin -mock -mockernut -mockery -mockingbird -mockup -modal -mode -model -modem -moderate -modern -modest -Modesto -modesty -modicum -modify -modish -modular -modulate -module -moduli -modulo -modulus -modus -Moe -Moen -Mogadiscio -Mohammedan -Mohawk -Mohr -moiety -Moines -moire -Moiseyev -moist -moisten -moisture -molal -molar -molasses -mold -Moldavia -moldboard -mole -molecular -molecule -molehill -molest -Moliere -Moline -Moll -Mollie -mollify -mollusk -Molly -mollycoddle -Moloch -molt -molten -Moluccas -molybdate -molybdenite -molybdenum -moment -momenta -momentary -momentous -momentum -mommy -Mona -Monaco -monad -monadic -monarch -monarchic -monarchy -Monash -monastery -monastic -monaural -Monday -monel -monetarism -monetarist -monetary -money -moneymake -moneywort -Mongolia -mongoose -monic -Monica -monies -monitor -monitory -monk -monkey -monkeyflower -monkish -Monmouth -Monoceros -monochromatic -monochromator -monocotyledon -monocular -monogamous -monogamy -monoid -monolith -monologist -monologue -monomer -monomeric -monomial -Monongahela -monopoly -monotonous -monotreme -monoxide -Monroe -Monrovia -Monsanto -monsieur -monsoon -monster -monstrosity -monstrous -Mont -montage -Montague -Montana -Montclair -monte -Montenegrin -Monterey -Monteverdi -Montevideo -Montgomery -month -Monticello -Montmartre -Montpelier -Montrachet -Montreal -Monty -monument -moo -mood -moody -moon -Mooney -moonlight -moonlit -moor -Moore -Moorish -moose -moot -mop -moraine -moral -morale -Moran -morass -moratorium -Moravia -morbid -more -morel -Moreland -moreover -Moresby -Morgan -morgen -morgue -Moriarty -moribund -Morley -Mormon -morn -Moroccan -Morocco -moron -morose -morpheme -morphemic -morphine -morphism -morphology -morphophonemic -Morrill -morris -Morrison -Morrissey -Morristown -morrow -Morse -morsel -mort -mortal -mortar -mortem -mortgage -mortgagee -mortgagor -mortician -mortify -mortise -Morton -mosaic -Moscow -Moser -Moses -Moslem -mosque -mosquito -moss -mossy -most -mot -motel -motet -moth -mothball -mother -motherhood -motherland -motif -motion -motivate -motive -motley -motor -motorcycle -Motorola -mottle -motto -mould -Moulton -mound -mount -mountain -mountaineer -mountainous -mountainside -mourn -mournful -mouse -moustache -mousy -mouth -mouthful -mouthpiece -Mouton -move -movie -mow -Moyer -Mozart -MPH -Mr -Mrs -m's -Ms -Mt -mu -much -mucilage -muck -mucosa -mucus -mud -Mudd -muddle -muddlehead -muddy -mudguard -mudsling -Mueller -muezzin -muff -muffin -muffle -mug -mugging -muggy -mugho -Muir -Mukden -mulatto -mulberry -mulch -mulct -mule -mulish -mull -mullah -mullein -Mullen -mulligan -mulligatawny -mullion -multi -multifarious -multinomial -multiple -multiplet -multiplex -multiplexor -multipliable -multiplicand -multiplication -multiplicative -multiplicity -multiply -multitude -multitudinous -mum -mumble -Mumford -mummy -munch -Muncie -mundane -mung -Munich -municipal -munificent -munition -Munson -muon -Muong -mural -murder -murderous -muriatic -Muriel -murk -murky -murmur -Murphy -Murray -murre -Muscat -muscle -Muscovite -Muscovy -muscular -musculature -muse -museum -mush -mushroom -mushy -music -musicale -musician -musicology -musk -Muskegon -muskellunge -musket -muskmelon -muskox -muskoxen -muskrat -Muslim -muslim -muslin -mussel -must -mustache -mustachio -mustang -mustard -mustn't -musty -mutagen -mutandis -mutant -mutate -mutatis -mute -mutilate -mutineer -mutiny -mutt -mutter -mutton -mutual -mutuel -Muzak -Muzo -muzzle -my -Mycenae -Mycenaean -mycobacteria -mycology -myel -myeline -myeloid -Myers -mylar -mynah -Mynheer -myocardial -myocardium -myofibril -myoglobin -myopia -myopic -myosin -Myra -myriad -Myron -myrrh -myrtle -myself -mysterious -mystery -mystic -mystify -mystique -myth -mythic -mythology -n -NAACP -nab -Nabisco -nabla -Nadia -Nadine -nadir -nag -Nagasaki -nagging -Nagoya -Nagy -naiad -nail -Nair -Nairobi -naive -naivete -Nakayama -naked -name -nameable -nameplate -namesake -Nan -Nancy -Nanette -Nanking -nanometer -nanosecond -Nantucket -Naomi -nap -nape -napkin -Naples -Napoleon -Napoleonic -Narbonne -narcissism -narcissist -narcissus -narcosis -narcotic -Narragansett -narrate -narrow -nary -NASA -nasal -nascent -Nash -Nashua -Nashville -Nassau -nasturtium -nasty -Nat -natal -Natalie -Natchez -Nate -Nathan -Nathaniel -nation -nationhood -nationwide -native -NATO -natty -natural -nature -naturopath -naughty -nausea -nauseate -nauseum -nautical -nautilus -Navajo -naval -nave -navel -navigable -navigate -navy -nay -Nazarene -Nazareth -Nazi -Nazism -NBC -NBS -NC -NCAA -NCAR -NCO -NCR -ND -Ndjamena -ne -Neal -Neanderthal -neap -Neapolitan -near -nearby -nearest -nearsighted -neat -neater -neath -Nebraska -nebula -nebulae -nebular -nebulous -necessary -necessitate -necessity -neck -necklace -neckline -necktie -necromancer -necromancy -necromantic -necropsy -necrosis -necrotic -nectar -nectareous -nectarine -nectary -Ned -nee -need -needful -Needham -needham -needle -needlepoint -needlework -needn't -needy -Neff -negate -neglect -neglecter -negligee -negligent -negligible -negotiable -negotiate -Negro -Negroes -Negroid -Nehru -Neil -neither -Nell -Nellie -Nelsen -Nelson -nemesis -neoclassic -neoconservative -neodymium -neolithic -neologism -neon -neonatal -neonate -neophyte -neoprene -Nepal -nepenthe -nephew -Neptune -neptunium -nereid -Nero -nerve -nervous -Ness -nest -nestle -Nestor -net -nether -Netherlands -netherworld -nettle -nettlesome -network -Neumann -neural -neuralgia -neurasthenic -neuritis -neuroanatomic -neuroanatomy -neuroanotomy -neurology -neuromuscular -neuron -neuronal -neuropathology -neurophysiology -neuropsychiatric -neuroses -neurosis -neurotic -neuter -neutral -neutrino -neutron -Neva -Nevada -neve -never -nevertheless -Nevins -new -Newark -Newbold -newborn -Newcastle -newcomer -newel -Newell -newfound -Newfoundland -newline -newlywed -Newman -Newport -newsboy -newscast -newsletter -newsman -newsmen -newspaper -newspaperman -newspapermen -newsreel -newsstand -Newsweek -newt -newton -Newtonian -next -Nguyen -NH -niacin -Niagara -Niamey -nib -nibble -Nibelung -nibs -Nicaragua -nice -nicety -niche -Nicholas -Nicholls -Nichols -Nicholson -nichrome -nick -nickel -nickname -Nicodemus -Nicosia -nicotinamide -nicotine -niece -Nielsen -Nielson -Nietzsche -Niger -Nigeria -niggardly -nigger -niggle -nigh -night -nightcap -nightclub -nightdress -nightfall -nightgown -nighthawk -nightingale -nightmare -nightmarish -nightshirt -nighttime -NIH -nihilism -nihilist -Nikko -Nikolai -nil -Nile -nilpotent -nimble -nimbus -NIMH -Nina -nine -ninebark -ninefold -nineteen -nineteenth -ninetieth -ninety -Nineveh -ninth -Niobe -niobium -nip -nipple -Nippon -nirvana -nit -nitpick -nitrate -nitric -nitride -nitrite -nitrogen -nitrogenous -nitroglycerine -nitrous -nitty -Nixon -NJ -NM -NNE -NNW -no -NOAA -Noah -nob -Nobel -nobelium -noble -nobleman -noblemen -noblesse -nobody -nobody'd -nocturnal -nocturne -nod -nodal -node -nodular -nodule -Noel -Noetherian -noise -noisemake -noisy -Nolan -Noll -nolo -nomad -nomadic -nomenclature -nominal -nominate -nominee -nomogram -nomograph -non -nonagenarian -nonce -nonchalant -nondescript -none -nonetheless -nonogenarian -nonsensic -nonsensical -noodle -nook -noon -noontime -noose -nor -Nora -Nordhoff -Nordstrom -Noreen -Norfolk -norm -Norma -normal -normalcy -Norman -Normandy -normative -Norris -north -Northampton -northbound -northeast -northeastern -northerly -northern -northernmost -northland -Northrop -Northrup -Northumberland -northward -northwest -northwestern -Norton -Norwalk -Norway -Norwegian -Norwich -nose -nosebag -nosebleed -nostalgia -nostalgic -Nostradamus -Nostrand -nostril -not -notary -notate -notch -note -notebook -noteworthy -nothing -notice -noticeable -notify -notion -notocord -notoriety -notorious -Notre -Nottingham -notwithstanding -Nouakchott -noun -nourish -nouveau -Nov -nova -Novak -novel -novelty -November -novice -novitiate -novo -Novosibirsk -now -nowaday -nowadays -nowhere -nowise -noxious -nozzle -NRC -n's -NSF -NTIS -nu -nuance -Nubia -nubile -nucleant -nuclear -nucleate -nuclei -nucleic -nucleoli -nucleolus -nucleotide -nucleus -nuclide -nude -nudge -nugatory -nugget -nuisance -null -nullify -Nullstellensatz -numb -numerable -numeral -numerate -numeric -Numerische -numerology -numerous -numinous -numismatic -numismatist -nun -nuptial -nurse -nursery -nurture -nut -nutate -nutcrack -nuthatch -nutmeg -nutria -nutrient -nutrition -nutritious -nutritive -nutshell -nuzzle -NV -NW -NY -NYC -nylon -nymph -nymphomania -nymphomaniac -Nyquist -NYU -o -oaf -oak -oaken -Oakland -Oakley -oakwood -oar -oases -oasis -oat -oath -oatmeal -obduracy -obdurate -obedient -obeisant -obelisk -Oberlin -obese -obey -obfuscate -obfuscatory -obituary -object -objectify -objectivity -objector -objet -oblate -obligate -obligatory -oblige -oblique -obliterate -oblivion -oblivious -oblong -obnoxious -oboe -oboist -O'Brien -obscene -obscure -obsequious -obsequy -observant -observation -observatory -observe -obsess -obsession -obsessive -obsidian -obsolescent -obsolete -obstacle -obstetric -obstinacy -obstinate -obstruct -obstruent -obtain -obtrude -obtrusion -obtrusive -obverse -obviate -obvious -ocarina -occasion -occident -occidental -occipital -occlude -occlusion -occlusive -occult -occultate -occultation -occupant -occupation -occupy -occur -occurred -occurrent -occurring -ocean -Oceania -oceanic -oceanographer -oceanography -oceanside -ocelot -o'clock -O'Connell -O'Connor -Oct -octagon -octagonal -octahedra -octahedral -octahedron -octal -octane -octant -octave -Octavia -octennial -octet -octile -octillion -October -octogenarian -octopus -octoroon -ocular -odd -ode -O'Dell -Odessa -Odin -odious -odium -odometer -O'Donnell -odorous -O'Dwyer -Odysseus -Odyssey -Oedipal -Oedipus -o'er -oersted -of -off -offal -offbeat -Offenbach -offend -offensive -offer -offertory -offhand -office -officeholder -officemate -official -officialdom -officiate -officio -officious -offload -offprint -offsaddle -offset -offsetting -offshoot -offshore -offspring -offstage -oft -often -oftentimes -Ogden -ogle -ogre -ogress -oh -O'Hare -Ohio -ohm -ohmic -ohmmeter -oil -oilcloth -oilman -oilmen -oilseed -oily -oint -ointment -OK -Okay -okay -Okinawa -Oklahoma -Olaf -Olav -old -olden -Oldenburg -Oldsmobile -oldster -oldy -oleander -O'Leary -olefin -oleomargarine -olfactory -Olga -oligarchic -oligarchy -oligoclase -oligopoly -Olin -olive -Oliver -Olivetti -Olivia -olivine -Olsen -Olson -Olympia -Olympic -Omaha -Oman -ombudsman -ombudsperson -omega -omelet -omen -omicron -ominous -omission -omit -omitted -omitting -omnibus -omnipotent -omnipresent -omniscient -on -once -oncology -oncoming -one -Oneida -O'Neill -onerous -oneself -onetime -oneupmanship -ongoing -onion -onlook -onlooker -onlooking -only -onomatopoeia -onomatopoeic -Onondaga -onrush -onrushing -onset -onslaught -Ontario -onto -ontogeny -ontology -onus -onward -onyx -oocyte -oodles -ooze -opacity -opal -opalescent -opaque -OPEC -Opel -open -opera -operable -operand -operant -operate -operatic -operetta -operon -Ophiuchus -ophthalmic -ophthalmology -opiate -opine -opinion -opinionate -opium -opossum -Oppenheimer -opponent -opportune -opposable -oppose -opposite -opposition -oppress -oppression -oppressive -oppressor -opprobrium -opt -optic -optima -optimal -optimism -optimist -optimistic -optimum -option -optoacoustic -optoelectronic -optoisolate -optometrist -optometry -opulent -opus -or -oracle -oracular -oral -orange -orangeroot -orangutan -orate -oratoric -oratorical -oratorio -oratory -orb -orbit -orbital -orchard -orchestra -orchestral -orchestrate -orchid -orchis -ordain -ordeal -order -orderly -ordinal -ordinance -ordinary -ordinate -ordnance -ore -oregano -Oregon -Oresteia -Orestes -organ -organdy -organic -organismic -organometallic -orgasm -orgiastic -orgy -orient -oriental -orifice -origin -original -originate -Orin -Orinoco -oriole -Orion -Orkney -Orlando -Orleans -ornament -ornamentation -ornate -ornately -ornery -orographic -orography -Orono -orphan -orphanage -Orpheus -Orphic -Orr -Ortega -orthant -orthicon -orthoclase -orthodontic -orthodontist -orthodox -orthodoxy -orthogonal -orthography -orthonormal -orthopedic -orthophosphate -orthorhombic -Orville -Orwell -Orwellian -o's -Osaka -Osborn -Osborne -Oscar -oscillate -oscillatory -oscilloscope -Osgood -OSHA -O'Shea -Oshkosh -osier -Osiris -Oslo -osmium -osmosis -osmotic -osprey -osseous -ossify -ostensible -ostentatious -osteology -osteopath -osteopathic -osteopathy -osteoporosis -ostracism -ostracod -Ostrander -ostrich -O'Sullivan -Oswald -Othello -other -otherwise -otherworld -otherworldly -otiose -Otis -Ott -Ottawa -otter -Otto -Ottoman -Ouagadougou -ouch -ought -oughtn't -ounce -our -ourselves -oust -out -outermost -outlandish -outlawry -outrageous -ouvre -ouzel -ouzo -ova -oval -ovary -ovate -oven -ovenbird -over -overhang -overt -overture -Ovid -oviform -ovum -ow -owe -Owens -owing -owl -owly -own -ox -oxalate -oxalic -oxcart -oxen -oxeye -Oxford -oxidant -oxidate -oxide -Oxnard -Oxonian -oxygen -oxygenate -oyster -Ozark -ozone -p -pa -Pablo -Pabst -pace -pacemake -pacesetting -pacific -pacifism -pacifist -pacify -pack -package -Packard -packet -pact -pad -paddle -paddock -paddy -padlock -padre -paean -pagan -page -pageant -pageantry -paginate -pagoda -paid -pail -pain -Paine -painful -painstaking -paint -paintbrush -pair -pairwise -Pakistan -Pakistani -pal -palace -palate -Palatine -palazzi -palazzo -pale -Paleolithic -Paleozoic -Palermo -Palestine -Palestinian -palette -palfrey -palindrome -palindromic -palisade -pall -palladia -Palladian -palladium -pallet -palliate -pallid -palm -palmate -palmetto -Palmolive -Palmyra -Palo -Palomar -palpable -palsy -Pam -Pamela -pampa -pamper -pamphlet -pan -panacea -panama -pancake -Pancho -pancreas -pancreatic -panda -Pandanus -pandemic -pandemonium -pander -Pandora -pane -panel -pang -panhandle -panic -panicked -panicky -panicle -panjandrum -panoply -panorama -panoramic -pansy -pant -pantheism -pantheist -pantheon -panther -pantomime -pantomimic -pantry -panty -Paoli -pap -papa -papacy -papal -papaw -paper -paperback -paperbound -paperweight -paperwork -papery -papillary -papoose -Pappas -pappy -paprika -Papua -papyri -papyrus -par -parabola -parabolic -paraboloid -paraboloidal -parachute -parade -paradigm -paradigmatic -paradise -paradox -paradoxic -paraffin -paragon -paragonite -paragraph -Paraguay -parakeet -paralinguistic -parallax -parallel -parallelepiped -parallelogram -paralysis -paramagnet -paramagnetic -paramedic -parameter -paramilitary -paramount -Paramus -paranoia -paranoiac -paranoid -paranormal -parapet -paraphernalia -paraphrase -parapsychology -parasite -parasitic -parasol -parasympathetic -paratroop -paraxial -parboil -parcel -parch -pardon -pare -paregoric -parent -parentage -parental -parentheses -parenthesis -parenthetic -parenthood -Pareto -pariah -parimutuel -Paris -parish -parishioner -Parisian -park -Parke -Parkinson -parkish -parkland -Parks -parkway -parlance -parlay -parley -parliament -parliamentarian -parliamentary -parochial -parody -parole -parolee -parquet -Parr -Parrish -parrot -parry -parse -Parsifal -parsimonious -parsimony -parsley -parsnip -parson -parsonage -Parsons -part -partake -Parthenon -partial -participant -participate -participle -particle -particular -particulate -partisan -partition -partner -partook -partridge -party -parvenu -Pasadena -Pascal -paschal -pasha -Paso -pass -passage -passageway -Passaic -passband -passe -passenger -passer -passerby -passion -passionate -passivate -passive -Passover -passport -password -past -paste -pasteboard -pastel -pasteup -Pasteur -pastiche -pastime -pastor -pastoral -pastry -pasture -pasty -pat -Patagonia -patch -patchwork -patchy -pate -patent -patentee -pater -paternal -paternoster -Paterson -path -pathetic -pathfind -pathogen -pathogenesis -pathogenic -pathology -pathos -pathway -patient -patina -patio -patriarch -patriarchal -patriarchy -Patrice -Patricia -patrician -Patrick -patrimonial -patrimony -patriot -patriotic -patristic -patrol -patrolled -patrolling -patrolman -patrolmen -patron -patronage -patroness -Patsy -pattern -Patterson -Patti -Patton -patty -paucity -Paul -Paula -Paulette -Pauli -Pauline -Paulo -Paulsen -Paulson -Paulus -paunch -paunchy -pauper -pause -pavanne -pave -pavilion -Pavlov -paw -pawn -pawnshop -Pawtucket -pax -pay -paycheck -payday -paymaster -Payne -payoff -payroll -Paz -PBS -PDP -pea -Peabody -peace -peaceable -peaceful -peacemake -peacetime -peach -Peachtree -peacock -peafowl -peak -peaky -peal -Peale -peanut -pear -Pearce -pearl -pearlite -pearlstone -Pearson -peasant -peasanthood -Pease -peat -pebble -pecan -peccary -peck -Pecos -pectoral -pectoralis -peculate -peculiar -pecuniary -pedagogic -pedagogue -pedagogy -pedal -pedant -pedantic -pedantry -peddle -pedestal -pedestrian -pediatric -pediatrician -pedigree -pediment -Pedro -pee -peed -peek -peel -peep -peephole -peepy -peer -peg -Pegasus -pegboard -pegging -Peggy -pejorative -Peking -Pelham -pelican -pellagra -pellet -pelt -peltry -pelvic -pelvis -Pembroke -pemmican -pen -penal -penalty -penance -penates -pence -penchant -pencil -pend -pendant -pendulum -Penelope -penetrable -penetrate -penguin -Penh -penicillin -peninsula -penis -penitent -penitential -penitentiary -penman -penmen -Penn -penna -pennant -Pennsylvania -penny -pennyroyal -Penrose -Pensacola -pension -pensive -pent -pentagon -pentagonal -pentagram -pentane -Pentecost -pentecostal -penthouse -penultimate -penumbra -penurious -penury -peony -people -Peoria -pep -peppergrass -peppermint -pepperoni -peppery -peppy -Pepsi -PepsiCo -peptide -per -perceive -percent -percentage -percentile -percept -perceptible -perception -perceptive -perceptual -perch -perchance -perchlorate -Percival -percolate -percussion -percussive -Percy -perdition -peregrine -peremptory -perennial -Perez -perfect -perfecter -perfectible -perfidious -perfidy -perforate -perforce -perform -performance -perfume -perfumery -perfunctory -perfuse -perfusion -Pergamon -perhaps -Periclean -Pericles -peridotite -perihelion -peril -Perilla -perilous -perimeter -period -periodic -peripatetic -peripheral -periphery -periphrastic -periscope -perish -peritectic -periwinkle -perjure -perjury -perk -Perkins -perky -Perle -permalloy -permanent -permeable -permeate -Permian -permissible -permission -permissive -permit -permitted -permitting -permutation -permute -pernicious -peroxide -perpendicular -perpetrate -perpetual -perpetuate -perpetuity -perplex -perquisite -Perry -persecute -persecution -persecutory -Perseus -perseverance -perseverant -persevere -Pershing -Persia -Persian -persiflage -persimmon -persist -persistent -person -persona -personage -personal -personify -personnel -perspective -perspicacious -perspicuity -perspicuous -perspiration -perspire -persuade -persuasion -persuasive -pert -pertain -Perth -pertinacious -pertinent -perturb -perturbate -perturbation -Peru -perusal -peruse -Peruvian -pervade -pervasion -pervasive -perverse -perversion -pervert -pessimal -pessimism -pessimist -pessimum -pest -peste -pesticide -pestilent -pestilential -pestle -pet -petal -Pete -Petersburg -Petersen -Peterson -petit -petite -petition -petrel -petri -petrifaction -petrify -petrochemical -petroglyph -petrol -petroleum -petrology -petticoat -petty -petulant -petunia -Peugeot -pew -pewee -pewter -pfennig -Pfizer -phage -phagocyte -phalanger -phalanx -phalarope -phantasy -phantom -pharaoh -pharmaceutic -pharmacist -pharmacology -pharmacopoeia -pharmacy -phase -PhD -Ph.D -pheasant -Phelps -phenol -phenolic -phenomena -phenomenal -phenomenology -phenomenon -phenotype -phenyl -phenylalanine -phi -Phil -Philadelphia -philanthrope -philanthropic -philanthropy -philharmonic -Philip -Philippine -Philistine -Phillip -Phillips -philodendron -philology -philosoph -philosopher -philosophic -philosophy -Phipps -phloem -phlox -phobic -phoebe -Phoenicia -phoenix -phon -phone -phoneme -phonemic -phonetic -phonic -phonograph -phonology -phonon -phony -phosgene -phosphate -phosphide -phosphine -phosphor -phosphoresce -phosphorescent -phosphoric -phosphorus -phosphorylate -photo -photogenic -photography -photolysis -photolytic -photometry -photon -phrase -phrasemake -phraseology -phthalate -phycomycetes -phyla -Phyllis -phylogeny -physic -physician -Physik -physiochemical -physiognomy -physiology -physiotherapist -physiotherapy -physique -phytoplankton -pi -pianissimo -pianist -piano -piazza -pica -Picasso -picayune -Piccadilly -piccolo -pick -pickaxe -pickerel -Pickering -picket -Pickett -Pickford -pickle -Pickman -pickoff -pickup -picky -picnic -picnicked -picnicker -picnicking -picofarad -picojoule -picosecond -pictorial -picture -picturesque -piddle -pidgin -pie -piece -piecemeal -piecewise -Piedmont -pier -pierce -Pierre -Pierson -pietism -piety -piezoelectric -pig -pigeon -pigeonberry -pigeonfoot -pigeonhole -pigging -piggish -piggy -piggyback -pigment -pigmentation -pigpen -pigroot -pigskin -pigtail -pike -Pilate -pile -pilewort -pilfer -pilferage -pilgrim -pilgrimage -pill -pillage -pillar -pillory -pillow -Pillsbury -pilot -pimp -pimple -pin -pinafore -pinball -pinch -pincushion -pine -pineapple -Pinehurst -ping -pinhead -pinhole -pinion -pink -pinkie -pinkish -pinnacle -pinnate -pinochle -pinpoint -pinscher -Pinsky -pint -pintail -pinto -pinwheel -pinxter -pion -pioneer -Piotr -pious -pip -pipe -pipeline -Piper -pipette -pipsissewa -piquant -pique -piracy -Piraeus -pirate -pirogue -pirouette -Piscataway -Pisces -piss -pistachio -pistol -pistole -piston -pit -pitch -pitchblende -pitchfork -pitchstone -piteous -pitfall -pith -pithy -pitiable -pitiful -pitilessly -pitman -Pitney -Pitt -Pittsburgh -Pittsfield -Pittston -pituitary -pity -Pius -pivot -pivotal -pixel -pixy -pizza -pizzeria -pizzicato -Pl -placate -placater -place -placeable -placebo -placeholder -placenta -placental -placid -plagiarism -plagiarist -plagioclase -plague -plagued -plaguey -plaid -plain -Plainfield -plaintiff -plaintive -plan -planar -Planck -plane -planeload -planet -planetaria -planetarium -planetary -planetesimal -planetoid -plank -plankton -planoconcave -planoconvex -plant -plantain -plantation -plaque -plasm -plasma -plasmon -plaster -plastic -plastisol -plastron -plat -plate -plateau -platelet -platen -platform -platinum -platitude -platitudinous -Plato -platonic -Platonism -Platonist -platoon -Platte -platypus -plausible -play -playa -playback -playboy -playful -playground -playhouse -playmate -playoff -playroom -plaything -playtime -playwright -playwriting -plaza -plea -plead -pleasant -please -pleasure -pleat -plebeian -plebian -pledge -Pleiades -Pleistocene -plenary -plenipotentiary -plenitude -plentiful -plenty -plenum -plethora -pleura -pleural -Plexiglas -pliable -pliancy -pliant -pliers -plight -Pliny -Pliocene -plod -plop -plot -plover -plowman -plowshare -pluck -plucky -plug -plugboard -pluggable -plugging -plum -plumage -plumb -plumbago -plumbate -plume -plummet -plump -plunder -plunge -plunk -pluperfect -plural -plus -plush -plushy -Plutarch -Pluto -pluton -plutonium -ply -Plymouth -plyscore -plywood -PM -pneumatic -pneumococcus -pneumonia -Po -poach -POBox -pocket -pocketbook -pocketful -Pocono -pocus -pod -podge -podia -podium -Poe -poem -poesy -poet -poetic -poetry -pogo -pogrom -poi -poignant -Poincare -poinsettia -point -pointwise -poise -poison -poisonous -Poisson -poke -pokerface -pol -Poland -polar -polarimeter -Polaris -polariscope -polariton -polarogram -polarograph -polarography -Polaroid -polaron -pole -polecat -polemic -police -policeman -policemen -policy -polio -poliomyelitis -polis -polish -Politburo -polite -politic -politician -politicking -politico -polity -Polk -polka -polkadot -poll -Pollard -pollen -pollinate -pollock -polloi -pollster -pollutant -pollute -pollution -Pollux -polo -polonaise -polonium -polopony -polyglot -polygon -polygonal -polygynous -polyhedra -polyhedral -polyhedron -Polyhymnia -polymer -polymerase -polymeric -polymorph -polymorphic -polynomial -Polyphemus -polyphony -polyploidy -polypropylene -polysaccharide -polytechnic -polytope -polytypy -pomade -pomegranate -Pomona -pomp -pompadour -pompano -Pompeii -pompey -pompon -pomposity -pompous -Ponce -Ponchartrain -poncho -pond -ponder -ponderous -pong -pont -Pontiac -pontiff -pontific -pontificate -pony -pooch -poodle -pooh -pool -Poole -poop -poor -pop -popcorn -pope -popish -poplar -poplin -poppy -populace -popular -populate -populism -populist -populous -porcelain -porch -porcine -porcupine -pore -pork -pornographer -pornography -porosity -porous -porphyry -porpoise -porridge -port -portage -portal -Porte -portend -portent -portentous -porterhouse -portfolio -Portia -portico -Portland -portland -portmanteau -Porto -portrait -portraiture -portray -portrayal -Portsmouth -Portugal -Portuguese -portulaca -posable -pose -Poseidon -poseur -posey -posh -posit -position -positive -positron -Posner -posse -posseman -possemen -possess -possession -possessive -possessor -possible -possum -post -postage -postal -postcard -postcondition -postdoctoral -posterior -posteriori -posterity -postfix -postgraduate -posthumous -postlude -postman -postmark -postmaster -postmen -postmortem -postmultiply -postoperative -postorder -postpaid -postpone -postposition -postprocess -postprocessor -postscript -postulate -posture -postwar -posy -pot -potable -potash -potassium -potato -potatoes -potbelly -potboil -potent -potentate -potential -potentiometer -pothole -potion -potlatch -Potomac -potpourri -pottery -Potts -pouch -Poughkeepsie -poultice -poultry -pounce -pound -pour -pout -poverty -pow -powder -powderpuff -powdery -Powell -power -powerful -powerhouse -Powers -Poynting -ppm -PR -practicable -practical -practice -practise -practitioner -Prado -praecox -pragmatic -pragmatism -pragmatist -Prague -prairie -praise -praiseworthy -pram -prance -prank -praseodymium -Pratt -Pravda -pray -prayer -prayerful -preach -preachy -preamble -Precambrian -precarious -precaution -precautionary -precede -precedent -precept -precess -precession -precinct -precious -precipice -precipitable -precipitate -precipitous -precis -precise -precision -preclude -precocious -precocity -precursor -predatory -predecessor -predicament -predicate -predict -predictor -predilect -predispose -predisposition -predominant -predominate -preeminent -preempt -preemption -preemptive -preemptor -preen -prefab -prefabricate -preface -prefatory -prefect -prefecture -prefer -preference -preferential -preferred -preferring -prefix -pregnant -prehistoric -prejudice -prejudicial -preliminary -prelude -premature -premeditate -premier -premiere -premise -premium -premonition -premonitory -Prentice -preoccupy -prep -preparation -preparative -preparatory -prepare -preponderant -preponderate -preposition -preposterous -prerequisite -prerogative -presage -Presbyterian -presbytery -Prescott -prescribe -prescript -prescription -prescriptive -presence -present -presentation -presentational -preservation -preserve -preside -president -presidential -press -pressure -prestidigitate -prestige -prestigious -presto -Preston -presume -presumed -presuming -presumption -presumptive -presumptuous -presuppose -presupposition -pretend -pretense -pretension -pretentious -pretext -Pretoria -pretty -prevail -prevalent -prevent -prevention -preventive -preview -previous -prexy -prey -Priam -price -prick -prickle -pride -priest -Priestley -prig -priggish -prim -prima -primacy -primal -primary -primate -prime -primeval -primitive -primitivism -primordial -primp -primrose -prince -princess -Princeton -principal -Principia -principle -print -printmake -printout -prior -priori -priory -Priscilla -prism -prismatic -prison -prissy -pristine -Pritchard -privacy -private -privet -privilege -privy -prize -prizewinning -pro -probabilist -probate -probe -probity -problem -problematic -procaine -procedural -procedure -proceed -process -procession -processor -proclaim -proclamation -proclivity -procrastinate -procreate -procrustean -Procrustes -Procter -proctor -procure -Procyon -prod -prodigal -prodigious -prodigy -produce -producible -product -productivity -Prof -profane -profess -profession -professional -professor -professorial -proffer -proficient -profile -profit -profiteer -profligacy -profligate -profound -profundity -profuse -profusion -progenitor -progeny -prognosis -prognosticate -programmable -programmed -programmer -programming -progress -progression -progressive -prohibit -prohibition -prohibitive -prohibitory -project -projectile -projector -prokaryote -Prokofieff -prolate -prolegomena -proletariat -proliferate -prolific -proline -prolix -prologue -prolong -prolongate -prolusion -prom -promenade -Promethean -Prometheus -promethium -prominent -promiscuity -promiscuous -promise -promote -promotion -prompt -promptitude -promulgate -prone -prong -pronoun -pronounce -pronounceable -pronto -pronunciation -proof -proofread -prop -propaganda -propagandist -propagate -propane -propel -propellant -propelled -propeller -propelling -propensity -proper -property -prophecy -prophesy -prophet -prophetic -prophylactic -propionate -propitiate -propitious -proponent -proportion -proportionate -propos -proposal -propose -proposition -propound -proprietary -proprietor -propriety -proprioception -proprioceptive -propulsion -propyl -propylene -prorate -prorogue -prosaic -proscenium -proscribe -proscription -prose -prosecute -prosecution -prosecutor -Proserpine -prosodic -prosody -prosopopoeia -prospect -prospector -prospectus -prosper -prosperous -prostate -prostheses -prosthesis -prosthetic -prostitute -prostitution -prostrate -protactinium -protagonist -protean -protease -protect -protector -protectorate -protege -protein -proteolysis -proteolytic -protest -protestant -protestation -prothonotary -protocol -proton -Protophyta -protoplasm -protoplasmic -prototype -prototypic -Protozoa -protozoan -protract -protrude -protrusion -protrusive -protuberant -proud -Proust -prove -proven -provenance -proverb -proverbial -provide -provident -providential -province -provincial -provision -provisional -proviso -provocateur -provocation -provocative -provoke -provost -prow -prowess -prowl -proximal -proximate -proximity -proxy -prudent -prudential -prune -prurient -Prussia -pry -p's -psalm -psalter -psaltery -pseudo -psi -psych -psyche -psychiatric -psychiatrist -psychiatry -psychic -psycho -psychoacoustic -psychoanalysis -psychoanalyst -psychoanalytic -psychobiology -psychology -psychometry -psychopath -psychopathic -psychophysic -psychophysiology -psychopomp -psychoses -psychosis -psychosomatic -psychotherapeutic -psychotherapist -psychotherapy -psychotic -psyllium -PTA -ptarmigan -pterodactyl -Ptolemaic -Ptolemy -pub -puberty -pubescent -public -publication -publish -PUC -Puccini -puck -puckish -pudding -puddingstone -puddle -puddly -pueblo -puerile -Puerto -puff -puffball -puffed -puffery -puffin -puffy -pug -Pugh -pugnacious -puissant -puke -Pulaski -Pulitzer -pull -pullback -pulley -Pullman -pullover -pulmonary -pulp -pulpit -pulsar -pulsate -pulse -pulverable -puma -pumice -pummel -pump -pumpkin -pumpkinseed -pun -punch -punctual -punctuate -puncture -pundit -punditry -pungent -Punic -punish -punitive -punk -punky -punster -punt -puny -pup -pupal -pupate -pupil -puppet -puppeteer -puppy -puppyish -Purcell -purchasable -purchase -Purdue -pure -purgation -purgative -purgatory -purge -purify -Purina -purine -Puritan -puritanic -purl -purloin -purple -purport -purpose -purposeful -purposive -purr -purse -purslane -pursuant -pursue -pursuer -pursuit -purvey -purveyor -purview -pus -Pusan -Pusey -push -pushbutton -pushout -pushpin -pussy -pussycat -put -putative -Putnam -putt -putty -puzzle -PVC -Pygmalion -pygmy -Pyhrric -pyknotic -Pyle -Pyongyang -pyracanth -pyramid -pyramidal -pyre -Pyrex -pyridine -pyrimidine -pyrite -pyroelectric -pyrolyse -pyrolysis -pyrometer -pyrophosphate -pyrotechnic -pyroxene -pyroxenite -Pyrrhic -pyrrhic -Pythagoras -Pythagorean -python -q -Qatar -QED -q's -qua -quack -quackery -quad -quadrangle -quadrangular -quadrant -quadratic -quadrature -quadrennial -quadric -quadriceps -quadrilateral -quadrille -quadrillion -quadripartite -quadrivium -quadruple -quadrupole -quaff -quagmire -quahog -quail -quaint -quake -Quakeress -qualified -qualify -qualitative -quality -qualm -quandary -quanta -Quantico -quantify -quantile -quantitative -quantity -quantum -quarantine -quark -quarrel -quarrelsome -quarry -quarryman -quarrymen -quart -quarterback -quartermaster -quartet -quartic -quartile -quartz -quartzite -quasar -quash -quasi -quasicontinuous -quasiorder -quasiparticle -quasiperiodic -quasistationary -quaternary -quatrain -quaver -quay -queasy -Quebec -queen -queer -quell -quench -querulous -query -quest -question -questionnaire -quetzal -queue -Quezon -quibble -quick -quicken -quickie -quicklime -quicksand -quicksilver -quickstep -quid -quiescent -quiet -quietus -quill -quillwort -quilt -quince -quinine -Quinn -quint -quintessence -quintessential -quintet -quintic -quintillion -quintus -quip -quipping -Quirinal -quirk -quirky -quirt -quit -quite -Quito -quitting -quiver -Quixote -quixotic -quiz -quizzes -quizzical -quo -quod -quonset -quorum -quota -quotation -quote -quotient -r -Rabat -rabat -rabbet -rabbi -rabbit -rabble -rabid -rabies -Rabin -raccoon -race -racetrack -raceway -Rachel -Rachmaninoff -racial -rack -racket -racketeer -rackety -racy -radar -Radcliffe -radial -radian -radiant -radiate -radical -radices -radii -radio -radioactive -radioastronomy -radiocarbon -radiochemical -radiochemistry -radiogram -radiography -radiology -radiometer -radiophysics -radiosonde -radiotelegraph -radiotelephone -radiotherapy -radish -radium -radius -radix -radon -Rae -Rafael -Rafferty -raffia -raffish -raffle -raft -rag -rage -ragging -ragout -ragweed -raid -rail -railbird -railhead -raillery -railroad -railway -rain -rainbow -raincoat -raindrop -rainfall -rainstorm -rainy -raise -raisin -raj -rajah -rake -rakish -Raleigh -rally -Ralph -Ralston -ram -Ramada -Raman -ramble -ramify -Ramo -ramp -rampage -rampant -rampart -ramrod -Ramsey -ran -ranch -rancho -rancid -rancorous -Rand -Randall -Randolph -random -randy -rang -range -rangeland -Rangoon -rangy -Ranier -rank -Rankin -Rankine -rankle -ransack -ransom -rant -Raoul -rap -rapacious -rape -Raphael -rapid -rapier -rapport -rapprochement -rapt -rapture -rare -rarefy -Raritan -rasa -rascal -rash -Rasmussen -rasp -raspberry -raster -Rastus -rat -rata -rate -ratepayer -rater -rather -ratify -ratio -ratiocinate -rationale -rattail -rattle -rattlesnake -ratty -raucous -Raul -ravage -rave -ravel -raven -ravenous -ravine -ravish -raw -rawboned -rawhide -Rawlinson -ray -Rayleigh -Raymond -Raytheon -raze -razor -razorback -razzle -RCA -Rd -R&D -re -reach -reactant -reactionary -read -readout -ready -Reagan -real -realisable -realm -realtor -realty -ream -reap -rear -reason -reave -reb -Rebecca -rebel -rebelled -rebelling -rebellion -rebellious -rebuke -rebut -rebuttal -rebutted -rebutting -recalcitrant -recappable -receipt -receive -recent -receptacle -reception -receptive -receptor -recess -recession -recessive -recherche -Recife -recipe -recipient -reciprocal -reciprocate -reciprocity -recital -recitative -reck -reckon -reclamation -recline -recluse -recombinant -recompense -reconcile -recondite -reconnaissance -recovery -recriminate -recriminatory -recruit -rectangle -rectangular -rectifier -rectify -rectilinear -rectitude -rector -rectory -recumbent -recuperate -recur -recurred -recurrent -recurring -recursion -recusant -recuse -red -redact -redactor -redbird -redbud -redcoat -redden -reddish -redemption -redemptive -redhead -Redmond -redneck -redound -redpoll -redshank -redstart -Redstone -redtop -reduce -reducible -redundant -redwood -reed -reedbuck -reedy -reef -reek -reel -Reese -reeve -Reeves -refection -refectory -refer -referable -referee -refereeing -referenda -referendum -referent -referential -referral -referred -referring -refinery -reflect -reflectance -reflector -reflexive -reformatory -refract -refractometer -refractory -refrain -refrigerate -refuge -refugee -refusal -refutation -refute -regal -regale -regalia -regard -regatta -regent -regime -regimen -regiment -regimentation -Regina -Reginald -region -regional -Regis -registrable -registrant -registrar -registration -registry -regress -regression -regressive -regret -regretful -regrettable -regretted -regretting -regular -regulate -regulatory -Regulus -regurgitate -rehabilitate -rehearsal -rehearse -Reich -Reid -reign -Reilly -reimbursable -reimburse -rein -reindeer -reinforce -Reinhold -reinstate -reject -rejecter -rejoice -rejoinder -rejuvenate -relate -relaxation -relayed -releasable -relevant -reliant -relic -relict -relief -relieve -religion -religiosity -religious -relinquish -reliquary -relish -reluctant -remainder -reman -remand -remark -Rembrandt -remediable -remedial -remedy -remember -remembrance -Remington -reminisce -reminiscent -remiss -remission -remit -remittance -remitted -remitting -remnant -remonstrate -remorse -remorseful -remote -removal -remunerate -Remus -Rena -renaissance -renal -Renault -rend -render -rendezvous -rendition -Rene -renegotiable -renewal -Renoir -renounce -renovate -renown -Rensselaer -rent -rental -renunciate -rep -repairman -repairmen -reparation -repartee -repeal -repeat -repeater -repel -repelled -repellent -repelling -repent -repentant -repertoire -repertory -repetition -repetitious -repetitive -replaceable -replenish -replete -replica -replicate -report -reportorial -repository -reprehensible -representative -repression -repressive -reprieve -reprimand -reprisal -reprise -reproach -reptile -reptilian -republic -republican -repudiate -repugnant -repulsion -repulsive -reputation -repute -request -require -requisite -requisition -requited -reredos -rerouted -rerouting -rescind -rescue -resemblant -resemble -resent -resentful -reserpine -reservation -reserve -reservoir -reside -resident -residential -residual -residuary -residue -residuum -resign -resignation -resilient -resin -resiny -resist -resistant -resistible -resistive -resistor -resolute -resolution -resolve -resonant -resonate -resorcinol -resort -resourceful -respect -respecter -respectful -respiration -respirator -respiratory -respire -respite -resplendent -respond -respondent -response -responsible -responsive -rest -restaurant -restaurateur -restful -restitution -restive -restoration -restorative -restrain -restraint -restrict -restroom -result -resultant -resume -resuming -resumption -resurgent -resurrect -resuscitate -ret -retail -retain -retaliate -retaliatory -retard -retardant -retardation -retch -retention -retentive -reticent -reticulate -reticulum -retina -retinal -retinue -retire -retiree -retort -retract -retribution -retrieval -retrieve -retroactive -retrofit -retrofitted -retrofitting -retrograde -retrogress -retrogression -retrogressive -retrorocket -retrospect -retrovision -return -Reub -Reuben -Reuters -rev -reveal -revel -revelation -revelatory -revelry -revenge -revenue -rever -reverberate -revere -reverend -reverent -reverie -reversal -reverse -reversible -reversion -revert -revertive -revery -revet -revile -revisable -revisal -revise -revision -revisionary -revival -revive -revocable -revoke -revolt -revolution -revolutionary -revolve -revulsion -revved -revving -reward -Rex -Reykjavik -Reynolds -rhapsodic -rhapsody -Rhea -Rhenish -rhenium -rheology -rheostat -rhesus -rhetoric -rhetorician -rheum -rheumatic -rheumatism -Rhine -rhinestone -rhino -rhinoceros -rho -Rhoda -Rhode -Rhodes -Rhodesia -rhodium -rhododendron -rhodolite -rhodonite -rhombi -rhombic -rhombohedral -rhombus -rhubarb -rhyme -rhythm -rhythmic -RI -rib -ribald -ribbon -riboflavin -ribonucleic -ribose -ribosome -Rica -rice -rich -Richard -Richards -Richardson -Richfield -Richmond -Richter -rick -rickets -Rickettsia -rickety -rickshaw -Rico -ricochet -rid -riddance -ridden -riddle -ride -ridge -ridgepole -Ridgway -ridicule -ridiculous -Riemann -Riemannian -riffle -rifle -rifleman -riflemen -rift -rig -Riga -Rigel -rigging -Riggs -right -righteous -rightful -rightmost -rightward -rigid -rigorous -Riley -rill -rilly -rim -rime -rimy -Rinehart -ring -ringlet -ringmaster -ringside -rink -rinse -Rio -Riordan -riot -riotous -rip -riparian -ripe -ripen -Ripley -ripoff -ripple -rise -risen -risible -risk -risky -Ritchie -rite -Ritter -ritual -Ritz -rival -rivalry -riven -river -riverbank -riverfront -riverine -riverside -rivet -Riviera -rivulet -Riyadh -RNA -roach -road -roadbed -roadblock -roadhouse -roadside -roadster -roadway -roam -roar -roast -rob -robbery -robbin -Robbins -robe -Robert -Roberta -Roberto -Roberts -Robertson -robin -Robinson -robot -robotic -robotics -robust -Rocco -Rochester -rock -rockabye -rockaway -rockbound -Rockefeller -rocket -Rockford -Rockies -Rockland -Rockwell -rocky -rococo -rod -rode -rodent -rodeo -Rodgers -Rodney -Rodriguez -roe -roebuck -Roentgen -Roger -Rogers -rogue -roil -roister -Roland -role -roll -rollback -rollick -Rollins -Roman -romance -Romania -Romano -romantic -Rome -Romeo -romp -Romulus -Ron -Ronald -rondo -Ronnie -rood -roof -rooftop -rooftree -rook -rookie -rooky -room -roomful -roommate -roomy -Roosevelt -Rooseveltian -roost -root -rope -Rosa -Rosalie -rosary -rose -rosebud -rosebush -Roseland -rosemary -Rosen -Rosenberg -Rosenblum -Rosenthal -Rosenzweig -Rosetta -rosette -Ross -roster -rostrum -rosy -rot -Rotarian -rotary -rotate -ROTC -rote -rotenone -Roth -Rothschild -rotogravure -rotor -rototill -rotten -rotund -rotunda -rouge -rough -roughcast -roughen -roughish -roughneck -roughshod -roulette -round -roundabout -roundhead -roundhouse -roundoff -roundtable -roundup -roundworm -rouse -Rousseau -roustabout -rout -route -routine -rove -row -rowboat -rowdy -Rowe -Rowena -Rowland -Rowley -Roxbury -Roy -royal -royalty -Royce -RPM -r's -RSVP -Ruanda -rub -rubbery -rubbish -rubble -rubdown -Rube -Ruben -rubicund -rubidium -Rubin -rubric -ruby -ruckus -rudder -ruddy -rude -rudiment -rudimentary -Rudolf -Rudolph -Rudy -Rudyard -rue -rueful -ruff -ruffian -ruffle -rufous -Rufus -rug -ruin -ruination -ruinous -rule -rum -Rumania -rumble -rumen -Rumford -ruminant -ruminate -rummage -rummy -rump -rumple -rumpus -run -runabout -runaway -rundown -rune -rung -Runge -runic -runneth -Runnymede -runoff -runt -runty -runway -Runyon -rupee -rupture -rural -ruse -rush -Rushmore -rusk -Russ -Russell -russet -Russia -Russo -russula -rust -rustic -rustle -rustproof -rusty -rut -rutabaga -Rutgers -Ruth -ruthenium -Rutherford -ruthless -rutile -Rutland -Rutledge -rutty -Rwanda -Ryan -Rydberg -Ryder -rye -s -sa -sabbath -sabbatical -Sabina -Sabine -sable -sabotage -sabra -sac -saccade -saccharine -sachem -Sachs -sack -sacral -sacrament -Sacramento -sacred -sacrifice -sacrificial -sacrilege -sacrilegious -sacrosanct -sad -sadden -saddle -saddlebag -Sadie -sadism -sadist -Sadler -safari -safe -safeguard -safekeeping -safety -saffron -sag -saga -sagacious -sagacity -sage -sagebrush -sagging -Saginaw -sagittal -Sagittarius -sago -saguaro -Sahara -said -Saigon -sail -sailboat -sailfish -sailor -saint -sainthood -sake -Sal -Salaam -salacious -salad -salamander -salami -salaried -salary -sale -Salem -Salerno -salesgirl -Salesian -saleslady -salesman -salesmen -salesperson -salient -Salina -saline -Salisbury -Salish -saliva -salivary -salivate -Salk -Salle -sallow -sally -salmon -salmonberry -salmonella -salon -saloon -saloonkeep -saloonkeeper -salsify -salt -saltbush -saltwater -salty -salubrious -salutary -salutation -salute -Salvador -salvage -salvageable -salvation -Salvatore -salve -salvo -Sam -samarium -samba -same -Sammy -Samoa -samovar -sample -Sampson -Samson -Samuel -Samuelson -San -Sana -sanatoria -sanatorium -Sanborn -Sanchez -Sancho -sanctify -sanctimonious -sanction -sanctity -sanctuary -sand -sandal -sandalwood -sandbag -sandblast -Sandburg -sanderling -Sanders -Sanderson -sandhill -Sandia -sandman -sandpaper -sandpile -sandpiper -Sandra -sandstone -Sandusky -sandwich -sandy -sane -Sanford -sang -sangaree -sanguinary -sanguine -sanguineous -Sanhedrin -sanicle -sanitarium -sanitary -sanitate -sank -sans -Sanskrit -Santa -Santayana -Santiago -Santo -Sao -sap -sapiens -sapient -sapling -saponify -sapphire -sappy -sapsucker -Sara -Saracen -Sarah -Saran -Sarasota -Saratoga -sarcasm -sarcastic -sarcoma -sarcophagus -sardine -sardonic -Sargent -sari -sarsaparilla -sarsparilla -sash -sashay -Saskatchewan -Saskatoon -sassafras -sat -Satan -satan -satanic -satellite -satiable -satiate -satiety -satin -satire -satiric -satisfaction -satisfactory -satisfy -saturable -saturate -saturater -Saturday -Saturn -Saturnalia -saturnine -satyr -sauce -saucepan -saucy -Saud -Saudi -sauerkraut -Saul -Sault -Saunders -sausage -saute -sauterne -savage -savagery -Savannah -savant -save -Saviour -Savonarola -savoy -Savoyard -savvy -saw -sawbelly -sawdust -sawfish -sawfly -sawmill -sawtimber -sawtooth -sawyer -sax -saxifrage -Saxon -Saxony -saxophone -say -SC -scab -scabbard -scabious -scabrous -scaffold -Scala -scalar -scald -scale -scallop -scalp -scam -scamp -scan -scandal -scandalous -Scandinavia -scandium -scant -scanty -scapegoat -scapula -scapular -scar -Scarborough -scarce -scare -scarecrow -scarf -scarface -scarify -Scarlatti -scarlet -Scarsdale -scarves -scary -scat -scathe -scatterbrain -scattergun -scaup -scavenge -scenario -scene -scenery -scenic -scent -sceptic -Schaefer -Schafer -Schantz -schedule -schelling -schema -schemata -schematic -scheme -Schenectady -scherzo -Schiller -schism -schist -schizoid -schizomycetes -schizophrenia -schizophrenic -Schlesinger -schlieren -Schlitz -Schloss -Schmidt -Schmitt -Schnabel -schnapps -Schneider -Schoenberg -Schofield -scholar -scholastic -school -schoolbook -schoolboy -schoolgirl -schoolgirlish -schoolhouse -schoolmarm -schoolmaster -schoolmate -schoolroom -schoolteacher -schoolwork -schooner -Schottky -Schroeder -Schroedinger -Schubert -Schultz -Schulz -Schumacher -Schumann -Schuster -Schuyler -Schuylkill -Schwab -Schwartz -Schweitzer -Sci -sciatica -science -scientific -scientist -scimitar -scintillate -scion -scissor -sclerosis -sclerotic -SCM -scoff -scold -scoop -scoot -scope -scopic -scops -scorch -score -scoreboard -scorecard -scoria -scorn -scornful -Scorpio -scorpion -Scot -scotch -Scotia -Scotland -Scotsman -Scotsmen -Scott -Scottish -Scottsdale -Scotty -scoundrel -scour -scourge -scout -scowl -scrabble -scraggly -scram -scramble -Scranton -scrap -scrapbook -scrape -scratch -scratchy -scrawl -scrawny -scream -screech -screechy -screed -screen -screenplay -screw -screwball -screwbean -screwdriver -screwworm -scribble -scribe -Scribners -scrim -scrimmage -Scripps -script -scription -scriptural -scripture -scriven -scroll -scrooge -scrotum -scrounge -scrub -scrumptious -scruple -scrupulosity -scrupulous -scrutable -scrutiny -scuba -scud -scuff -scuffle -scull -sculpin -sculpt -sculptor -sculptural -sculpture -scum -scurrilous -scurry -scurvy -scuttle -scutum -Scylla -scythe -Scythia -SD -SE -sea -seaboard -seacoast -seafare -seafood -Seagram -seagull -seahorse -seal -sealant -seam -seaman -seamen -seamstress -seamy -Sean -seance -seaport -seaquake -sear -search -searchlight -Sears -seashore -seaside -season -seasonal -seat -seater -Seattle -seaward -seaweed -Sebastian -sec -secant -secede -secession -seclude -seclusion -second -secondary -secondhand -secrecy -secret -secretarial -secretariat -secretary -secrete -secretion -secretive -sect -sectarian -section -sector -sectoral -secular -secure -sedan -sedate -sedentary -seder -sedge -sediment -sedimentary -sedimentation -sedition -seditious -seduce -seduction -seductive -sedulous -see -seeable -seed -seedbed -seedling -seedy -seeing -seek -seem -seen -seep -seepage -seersucker -seethe -seethed -seething -segment -segmentation -Segovia -segregant -segregate -Segundo -Seidel -seismic -seismograph -seismography -seismology -seize -seizure -seldom -select -selectman -selectmen -selector -Selectric -Selena -selenate -selenite -selenium -self -selfadjoint -selfish -Selfridge -Selkirk -sell -seller -sellout -Selma -seltzer -selves -Selwyn -semantic -semaphore -semblance -semester -semi -seminal -seminar -seminarian -seminary -Seminole -Semiramis -Semite -Semitic -semper -sen -senate -senatorial -send -Seneca -Senegal -senile -senior -senor -Senora -senorita -sensate -sense -sensible -sensitive -sensor -sensorimotor -sensory -sensual -sensuous -sent -sentence -sentential -sentient -sentiment -sentinel -sentry -Seoul -sepal -separable -separate -sepia -Sepoy -sept -septa -septate -September -septennial -septic -septillion -septuagenarian -septum -sepuchral -sepulchral -seq -sequel -sequent -sequential -sequester -sequestration -sequin -sequitur -Sequoia -sera -seraglio -serape -seraphim -Serbia -serenade -serendipitous -serendipity -serene -serf -serfdom -serge -sergeant -Sergei -serial -seriate -seriatim -series -serif -serine -serious -sermon -serology -Serpens -serpent -serpentine -serum -servant -serve -service -serviceable -serviceberry -serviceman -servicemen -serviette -servile -servitor -servitude -servo -servomechanism -sesame -session -set -setback -Seth -Seton -setscrew -settle -setup -seven -sevenfold -seventeen -seventeenth -seventh -seventieth -seventy -sever -several -severalfold -severalty -severe -Severn -Seville -sew -sewage -Seward -sewerage -sewn -sex -Sextans -sextet -sextillion -sexton -sextuple -sextuplet -sexual -sexy -Seymour -sforzando -shabby -shack -shackle -shad -shadbush -shade -shadflower -shadow -shadowy -shady -Shafer -Shaffer -shaft -shag -shagbark -shagging -shaggy -shah -shake -shakeable -shakedown -shaken -Shakespeare -Shakespearean -Shakespearian -shako -shaky -shale -shall -shallot -shallow -shalom -sham -shamble -shame -shameface -shamefaced -shameful -shampoo -shamrock -Shanghai -shank -Shannon -shan't -Shantung -shanty -shape -Shapiro -shard -share -sharecrop -shareholder -shareown -Shari -shark -Sharon -sharp -Sharpe -sharpen -sharpshoot -Shasta -shatter -shatterproof -Shattuck -shave -shaven -shaw -shawl -Shawnee -shay -she -Shea -sheaf -shear -Shearer -sheath -sheathe -sheave -she'd -shed -Shedir -Sheehan -sheen -sheep -sheepskin -sheer -sheet -Sheffield -sheik -Sheila -Shelby -Sheldon -shelf -she'll -shell -Shelley -shelter -Shelton -shelve -Shenandoah -shenanigan -Shepard -shepherd -Sheppard -Sheraton -sherbet -Sheridan -sheriff -Sherlock -Sherman -Sherrill -sherry -Sherwin -Sherwood -shibboleth -shied -shield -Shields -shift -shifty -shill -Shiloh -shim -shimmy -shin -shinbone -shine -shingle -Shinto -shiny -ship -shipboard -shipbuild -shipbuilding -shiplap -Shipley -shipman -shipmate -shipmen -shipshape -shipwreck -shipyard -shire -shirk -Shirley -shirt -shirtmake -shish -shitepoke -shiv -shiver -shivery -Shmuel -shoal -shock -Shockley -shod -shoddy -shoe -shoehorn -shoelace -shoemake -shoestring -shoji -shone -shoo -shoofly -shook -shoot -shop -shopkeep -shopworn -shore -shoreline -short -shortage -shortcoming -shortcut -shorten -shortfall -shorthand -shortish -shortsighted -shortstop -shot -shotbush -shotgun -should -shoulder -shouldn't -shout -shove -shovel -show -showboat -showcase -showdown -showman -showmen -shown -showpiece -showplace -showroom -showy -shrank -shrapnel -shred -Shreveport -shrew -shrewd -shrewish -shriek -shrift -shrike -shrill -shrilly -shrimp -shrine -shrink -shrinkage -shrive -shrivel -shroud -shrove -shrub -shrubbery -shrug -shrugging -shrunk -shrunken -Shu -shuck -shudder -shuddery -shuffle -shuffleboard -Shulman -shun -shunt -shut -shutdown -shutoff -shutout -shuttle -shuttlecock -shy -Shylock -sial -SIAM -Siamese -Sian -sib -Siberia -sibilant -Sibley -sibling -sibyl -sic -Sicilian -Sicily -sick -sicken -sickish -sickle -sicklewort -sickroom -side -sidearm -sideband -sideboard -sidecar -sidelight -sideline -sidelong -sideman -sidemen -sidereal -siderite -sidesaddle -sideshow -sidestep -sidestepping -sidetrack -sidewalk -sidewall -sideway -sidewinder -sidewise -sidle -Sidney -siege -Siegel -Siegfried -Sieglinda -Siegmund -Siemens -Siena -sienna -sierra -siesta -sieve -sift -sigh -sight -sightsee -sightseeing -sightseer -sigma -Sigmund -sign -signal -signature -signboard -signet -significant -signify -Signor -Signora -signpost -Sikorsky -silage -silane -Silas -silent -silhouette -silica -silicate -siliceous -silicic -silicide -silicon -silicone -silk -silken -silkworm -silky -sill -silly -silo -silt -siltation -siltstone -silty -silver -Silverman -silversmith -silverware -silvery -sima -similar -simile -similitude -simmer -Simmons -Simon -Simons -Simonson -simper -simple -simplectic -simpleminded -simpleton -simplex -simplicial -simplicity -simplify -simplistic -simply -Simpson -Sims -simulate -simulcast -simultaneity -simultaneous -sin -Sinai -since -sincere -Sinclair -sine -sinew -sinewy -sinful -sing -singable -Singapore -singe -single -singlehanded -singlet -singleton -singsong -singular -sinh -sinister -sinistral -sink -sinkhole -sinter -sinuous -sinus -sinusoid -sinusoidal -Sioux -sip -sir -sire -siren -Sirius -sis -sisal -siskin -sister -Sistine -Sisyphean -Sisyphus -sit -site -situ -situate -situs -siva -six -sixfold -sixgun -sixteen -sixteenth -sixth -sixtieth -sixty -size -sizzle -skat -skate -skater -skeet -skeletal -skeleton -skeptic -sketch -sketchbook -sketchpad -sketchy -skew -ski -skid -skiddy -skied -skiff -skill -skillet -skillful -skim -skimp -skimpy -skin -skindive -skinny -skip -skipjack -Skippy -skirmish -skirt -skit -skittle -Skopje -skulk -skull -skullcap -skullduggery -skunk -sky -Skye -skyhook -skyjack -skylark -skylight -skyline -skyrocket -skyscrape -skyward -skywave -skyway -slab -slack -slacken -sladang -slag -slain -slake -slam -slander -slanderous -slang -slant -slap -slapstick -slash -slat -slate -slater -slaughter -slaughterhouse -Slav -slave -slavery -Slavic -slavish -Slavonic -slay -sled -sledge -sledgehammer -sleek -sleep -sleepwalk -sleepy -sleet -sleety -sleeve -sleigh -sleight -slender -slept -sleuth -slew -slice -slick -slid -slide -slight -slim -slime -slimy -sling -slingshot -slip -slippage -slippery -slit -slither -sliver -slivery -Sloan -Sloane -slob -Slocum -sloe -slog -slogan -sloganeer -slogging -sloop -slop -slope -sloppy -slosh -slot -sloth -slothful -slouch -slough -Slovakia -sloven -Slovenia -slow -slowdown -sludge -slug -slugging -sluggish -sluice -slum -slumber -slump -slung -slur -slurp -slurry -slut -sly -smack -small -smaller -Smalley -smallish -smallpox -smalltime -smart -smash -smatter -smattering -smear -smell -smelt -smile -smirk -smith -smithereens -Smithfield -Smithson -Smithsonian -smithy -smitten -smog -smoke -smokehouse -smokescreen -smokestack -smoky -smolder -smooch -smooth -smoothbore -smother -Smucker -smudge -smudgy -smug -smuggle -smut -smutty -Smyrna -Smythe -snack -snafu -snag -snagging -snail -snake -snakebird -snakelike -snakeroot -snap -snapback -snapdragon -snappish -snappy -snapshot -snare -snark -snarl -snatch -snazzy -sneak -sneaky -sneer -sneeze -snell -snick -Snider -sniff -sniffle -sniffly -snifter -snigger -snip -snipe -snippet -snippy -snivel -snob -snobbery -snobbish -snook -snoop -snoopy -snore -snorkel -snort -snotty -snout -snow -snowball -snowfall -snowflake -snowmobile -snowshoe -snowstorm -snowy -snub -snuff -snuffer -snuffle -snuffly -snug -snuggle -snuggly -snyaptic -Snyder -so -soak -soap -soapstone -soapsud -soapy -soar -sob -sober -sobriety -sobriquet -Soc -soccer -sociable -social -societal -Societe -society -socioeconomic -sociology -sociometry -sock -socket -sockeye -Socrates -Socratic -sod -soda -sodden -sodium -sofa -soffit -Sofia -soft -softball -soften -software -softwood -soggy -soignee -soil -soiree -sojourn -Sol -solace -solar -sold -solder -soldier -soldiery -sole -solecism -solemn -solemnity -solenoid -solicit -solicitation -solicitor -solicitous -solicitude -solid -solidarity -solidify -solidus -soliloquy -solipsism -solitaire -solitary -soliton -solitude -solo -Solomon -Solon -solstice -soluble -solute -solution -solvate -solve -solvent -soma -somal -Somali -somatic -somber -sombre -some -somebody -somebody'll -someday -somehow -someone -someone'll -someplace -Somers -somersault -Somerset -Somerville -something -sometime -somewhat -somewhere -sommelier -Sommerfeld -somnolent -son -sonant -sonar -sonata -song -songbag -songbook -songful -sonic -sonnet -sonny -sonogram -Sonoma -Sonora -sonority -sonorous -Sony -soon -soot -sooth -soothe -soothsay -soothsayer -sop -Sophia -sophia -Sophie -sophism -sophisticate -sophistry -Sophoclean -Sophocles -sophomore -sophomoric -soprano -sora -sorb -sorcery -sordid -sore -Sorensen -Sorenson -sorghum -sorority -sorption -sorrel -sorrow -sorrowful -sorry -sort -sortie -sou -souffle -sough -sought -soul -soulful -sound -soundproof -soup -sour -sourberry -source -sourdough -sourwood -Sousa -soutane -south -Southampton -southbound -southeast -southeastern -southern -southernmost -Southey -southland -southpaw -southward -southwest -southwestern -souvenir -sovereign -sovereignty -soviet -sovkhoz -sow -sowbelly -sown -soy -soya -soybean -spa -space -spacecraft -spacesuit -spacetime -spacious -spade -spaghetti -Spain -spalding -span -spandrel -spangle -Spaniard -spaniel -Spanish -spar -spare -sparge -spark -sparkle -Sparkman -sparky -sparling -sparrow -sparse -Sparta -Spartan -spasm -spastic -spat -spate -spatial -spatlum -spatterdock -spatula -Spaulding -spavin -spawn -spay -spayed -speak -speakeasy -spear -spearhead -spearmint -spec -special -specie -species -specific -specify -specimen -specious -speck -speckle -spectacle -spectacular -spectator -Spector -spectra -spectral -spectrogram -spectrograph -spectrography -spectrometer -spectrophotometer -spectroscope -spectroscopic -spectroscopy -spectrum -specular -speculate -sped -speech -speed -speedboat -speedometer -speedup -speedwell -speedy -spell -spellbound -Spencer -Spencerian -spend -spent -sperm -spermatophyte -Sperry -spew -sphagnum -sphalerite -sphere -spheric -spheroid -spheroidal -spherule -sphinx -Spica -spice -spicebush -spicy -spider -spiderwort -spidery -Spiegel -spigot -spike -spikenard -spiky -spill -spilt -spin -spinach -spinal -spindle -spine -spinnaker -spinneret -spinodal -spinoff -spinster -spiny -spiral -spire -spirit -spiritual -Spiro -spit -spite -spiteful -spitfire -spittle -spitz -splash -splashy -splat -splay -splayed -spleen -spleenwort -splendid -splenetic -splice -spline -splint -splintery -split -splotch -splotchy -splurge -splutter -spoil -spoilage -Spokane -spoke -spoken -spokesman -spokesmen -spokesperson -sponge -spongy -sponsor -spontaneity -spontaneous -spoof -spook -spooky -spool -spoon -spoonful -sporadic -spore -sport -sportsman -sportsmen -sportswear -sportswrite -sportswriter -sportswriting -sporty -spot -spotlight -spotty -spouse -spout -Sprague -sprain -sprang -sprawl -spray -spread -spree -sprig -sprightly -spring -springboard -springe -Springfield -springtail -springtime -springy -sprinkle -sprint -sprite -sprocket -Sproul -sprout -spruce -sprue -sprung -spud -spume -spumoni -spun -spunk -spur -spurge -spurious -spurn -spurt -sputnik -sputter -spy -spyglass -squabble -squad -squadron -squalid -squall -squamous -squander -square -squash -squashberry -squashy -squat -squatted -squatter -squatting -squaw -squawbush -squawk -squawroot -squeak -squeaky -squeal -squeamish -squeegee -squeeze -squelch -Squibb -squid -squill -squint -squire -squirehood -squirm -squirmy -squirrel -squirt -squishy -Sri -s's -SSE -SST -SSW -St -stab -stabile -stable -stableman -stablemen -staccato -stack -Stacy -stadia -stadium -staff -Stafford -stag -stage -stagecoach -stagestruck -stagnant -stagnate -stagy -Stahl -staid -stain -stair -staircase -stairway -stairwell -stake -stalactite -stale -stalemate -Staley -Stalin -stalk -stall -stallion -stalwart -stamen -Stamford -stamina -staminate -stammer -stamp -stampede -Stan -stance -stanch -stanchion -stand -standard -standby -standeth -Standish -standoff -standpoint -standstill -Stanford -Stanhope -stank -Stanley -stannic -stannous -Stanton -stanza -staph -staphylococcus -staple -Stapleton -star -starboard -starch -starchy -stardom -stare -starfish -stargaze -stark -Starkey -starlet -starlight -starling -Starr -start -startle -startup -starvation -starve -stash -stasis -state -Staten -stater -stateroom -statesman -statesmanlike -statesmen -statewide -static -stationarity -stationary -stationery -stationmaster -statistician -Statler -stator -statuary -statue -statuette -stature -status -statute -statutory -Stauffer -staunch -Staunton -stave -stay -stayed -stead -steadfast -steady -steak -steal -stealth -stealthy -steam -steamboat -steamy -stearate -stearic -Stearns -steed -steel -Steele -steelmake -steely -Steen -steep -steepen -steeple -steeplebush -steeplechase -steer -steeve -Stefan -Stegosaurus -stein -Steinberg -Steiner -Stella -stella -stellar -stem -stench -stencil -stenographer -stenography -stenotype -step -stepchild -Stephanie -stephanotis -Stephen -Stephens -Stephenson -stepmother -steppe -steprelation -stepson -stepwise -steradian -stereo -stereography -stereoscopy -sterile -sterling -stern -sternal -Sternberg -Sterno -sternum -steroid -stethoscope -Stetson -Steuben -Steve -stevedore -Steven -Stevens -Stevenson -stew -steward -stewardess -Stewart -stick -stickle -stickleback -stickpin -sticktight -sticky -stiff -stiffen -stifle -stigma -stigmata -stile -stiletto -still -stillbirth -stillwater -stilt -stimulant -stimulate -stimulatory -stimuli -stimulus -sting -stingy -stink -stinkpot -stinky -stint -stipend -stipple -stipulate -stir -Stirling -stirrup -stitch -stochastic -stock -stockade -stockbroker -stockholder -Stockholm -stockpile -stockroom -Stockton -stocky -stodgy -stoic -stoichiometry -stoke -Stokes -stole -stolen -stolid -stomach -stomp -stone -stonecrop -Stonehenge -stonewall -stoneware -stonewort -stony -stood -stooge -stool -stoop -stop -stopband -stopcock -stopgap -stopover -stoppage -stopwatch -storage -store -storehouse -storekeep -storeroom -Storey -stork -storm -stormbound -stormy -story -storyboard -storyteller -stout -stove -stow -stowage -stowaway -strabismic -strabismus -straddle -strafe -straggle -straight -straightaway -straighten -straightforward -straightway -strain -strait -strand -strange -strangle -strangulate -strap -strata -stratagem -strategic -strategist -strategy -Stratford -stratify -stratosphere -stratospheric -Stratton -stratum -Strauss -straw -strawberry -strawflower -stray -streak -stream -streamline -streamside -street -streetcar -strength -strengthen -strenuous -streptococcus -streptomycin -stress -stressful -stretch -strewn -striate -stricken -Strickland -strict -stricter -stricture -stride -strident -strife -strike -strikebreak -string -stringent -stringy -strip -stripe -striptease -stripy -strive -striven -strobe -stroboscopic -strode -stroke -stroll -Strom -Stromberg -strong -stronghold -strongroom -strontium -strop -strophe -strove -struck -structural -structure -struggle -strum -strung -strut -strychnine -Stu -Stuart -stub -stubble -stubborn -stubby -stucco -stuck -stud -Studebaker -student -studio -studious -study -stuff -stuffy -stultify -stumble -stump -stumpage -stumpy -stun -stung -stunk -stunt -stupefaction -stupefy -stupendous -stupid -stupor -Sturbridge -sturdy -sturgeon -Sturm -stutter -Stuttgart -Stuyvesant -Stygian -style -styli -stylish -stylites -stylus -stymie -styrene -Styrofoam -Styx -suave -sub -subject -subjectivity -subjunctive -sublimate -subliminal -submersible -submit -submittal -submitted -submitting -subpoena -subrogation -subservient -subsidiary -subsidy -subsist -subsistent -substantial -substantiate -substantive -substituent -substitute -substitution -substitutionary -substrate -subsume -subsumed -subsuming -subterfuge -subterranean -subtle -subtlety -subtly -subtracter -subtrahend -suburb -suburbia -subversive -subvert -succeed -success -successful -succession -successive -successor -succinct -succubus -succumb -such -suck -suckling -sucrose -suction -sud -Sudan -Sudanese -sudden -suds -sue -suey -Suez -suffer -suffice -sufficient -suffix -suffocate -Suffolk -suffrage -suffragette -suffuse -sugar -suggest -suggestible -suggestion -suggestive -suicidal -suicide -suit -suitcase -suite -suitor -sulfa -sulfanilamide -sulfate -sulfide -sulfite -sulfonamide -sulfur -sulfuric -sulfurous -sulk -sulky -sullen -Sullivan -sully -sulphur -sultan -sultanate -sultry -sum -sumac -Sumatra -Sumeria -Sumerian -summand -summarily -summary -summate -summation -Summers -summertime -summit -summitry -summon -Sumner -sumptuous -Sumter -sun -sunbeam -sunbonnet -sunburn -sunburnt -Sunday -sunder -sundew -sundial -sundown -sundry -sunfish -sunflower -sung -sunglasses -sunk -sunken -sunlight -sunlit -sunny -Sunnyvale -sunrise -sunscreen -sunset -sunshade -sunshine -sunshiny -sunspot -suntan -suntanned -suntanning -SUNY -sup -super -superannuate -superb -superbly -supercilious -superficial -superfluity -superfluous -superintendent -superior -superlative -superlunary -supernatant -supernovae -superposable -supersede -superstition -superstitious -supervene -supervisory -supine -supplant -supple -supplementary -supplicate -supply -support -supposable -suppose -supposition -suppress -suppressible -suppression -suppressor -supra -supranational -supremacy -supreme -supremum -surcease -surcharge -sure -surety -surf -surface -surfactant -surfeit -surge -surgeon -surgery -surgical -surjection -surjective -surmise -surmount -surname -surpass -surplus -surprise -surreal -surrender -surreptitious -surrey -surrogate -surround -surtax -surtout -surveillant -survey -surveyor -survival -survive -survivor -Sus -Susan -Susanne -susceptance -susceptible -sushi -Susie -suspect -suspend -suspense -suspension -suspensor -suspicion -suspicious -Sussex -sustain -sustenance -Sutherland -Sutton -suture -Suzanne -suzerain -suzerainty -Suzuki -svelte -SW -swab -swabby -swag -swage -Swahili -swain -swallow -swallowtail -swam -swami -swamp -swampy -swan -swank -swanky -swanlike -Swanson -swap -swarm -swart -Swarthmore -Swarthout -swarthy -swastika -swat -swatch -swath -swathe -sway -Swaziland -swear -sweat -sweatband -sweater -sweatshirt -sweaty -Swede -Sweden -Swedish -Sweeney -sweep -sweepstake -sweet -sweeten -sweetheart -sweetish -swell -swelt -swelter -Swenson -swept -swerve -swift -swig -swigging -swim -swimsuit -swindle -swine -swing -swingable -swingy -swipe -swirl -swirly -swish -swishy -swiss -switch -switchblade -switchboard -switchgear -switchman -Switzer -Switzerland -swivel -swizzle -swollen -swoop -sword -swordfish -swordplay -swordtail -swore -sworn -swum -swung -sybarite -Sybil -sycamore -sycophant -sycophantic -Sydney -syenite -Sykes -syllabi -syllabic -syllabify -syllable -syllabus -syllogism -syllogistic -Sylow -sylvan -Sylvania -Sylvester -Sylvia -symbiosis -symbiotic -symbol -symbolic -symmetry -sympathetic -sympathy -symphonic -symphony -symplectic -symposia -symposium -symptom -symptomatic -synagogue -synapse -synapses -synaptic -synchronism -synchronous -synchrony -synchrotron -syncopate -syndic -syndicate -syndrome -synergism -synergistic -synergy -Synge -synod -synonym -synonymous -synonymy -synopses -synopsis -synoptic -syntactic -syntax -syntheses -synthesis -synthetic -Syracuse -Syria -syringa -syringe -syrinx -syrup -syrupy -system -systematic -systemic -systemization -systemwide -syzygy -Szilard -t -TA -tab -tabernacle -table -tableau -tableaux -tablecloth -tableland -tablespoon -tablespoonful -tablet -tabloid -taboo -tabu -tabula -tabular -tabulate -tachinid -tachistoscope -tachometer -tacit -Tacitus -tack -tackle -tacky -Tacoma -tact -tactful -tactic -tactician -tactile -tactual -tad -tadpole -taffeta -taffy -Taft -taft -tag -tagging -Tahiti -Tahoe -tail -tailgate -tailor -tailspin -tailwind -taint -Taipei -Taiwan -take -taken -takeoff -takeover -taketh -talc -talcum -tale -talent -talisman -talismanic -talk -talkative -talkie -talky -tall -Tallahassee -tallow -tally -tallyho -Talmud -talon -talus -tam -tamale -tamarack -tamarind -tambourine -tame -Tammany -tamp -Tampa -tampon -tan -tanager -Tanaka -Tananarive -tandem -tang -tangent -tangential -tangerine -tangible -tangle -tango -tangy -tanh -tank -tannin -tansy -tantalum -Tantalus -tantamount -tantrum -Tanya -Tanzania -tao -Taoist -Taos -tap -tapa -tape -taper -tapestry -tapeworm -tapir -tapis -tappa -tappet -tar -tara -tarantara -tarantula -Tarbell -tardy -target -tariff -tarnish -tarpaper -tarpaulin -tarpon -tarry -Tarrytown -tart -tartar -Tartary -Tarzan -task -taskmaster -Tasmania -Tass -tassel -taste -tasteful -tasting -tasty -tat -tate -tater -tattle -tattler -tattletale -tattoo -tatty -tau -taught -taunt -Taurus -taut -tautology -tavern -taverna -tawdry -tawny -tax -taxation -taxi -taxicab -taxied -taxiway -taxonomic -taxonomy -taxpayer -taxpaying -Taylor -tea -teacart -teach -teacup -teahouse -teakettle -teakwood -teal -team -teammate -teamster -teamwork -teapot -tear -teardrop -tearful -tease -teasel -teaspoon -teaspoonful -teat -tech -technetium -technic -technician -Technion -technique -technocrat -technocratic -technology -tectonic -tecum -Ted -ted -Teddy -tedious -tedium -tee -teeing -teem -teen -teenage -teensy -teet -teeter -teeth -teethe -teethed -teething -teetotal -Teflon -Tegucigalpa -Teheran -Tehran -tektite -Tektronix -Tel -telecommunicate -teleconference -Teledyne -Telefunken -telegram -telegraph -telegraphy -telekinesis -telemeter -teleology -teleost -telepathic -telepathy -telephone -telephonic -telephony -telephotography -teleprinter -teleprocessing -teleprompter -telescope -telescopic -telethon -teletype -teletypesetting -teletypewrite -televise -television -Telex -tell -teller -telltale -tellurium -temerity -temper -tempera -temperance -temperate -temperature -tempest -tempestuous -template -temple -Templeton -tempo -temporal -temporary -tempt -temptation -temptress -ten -tenable -tenacious -tenacity -tenant -tend -tendency -tenderfoot -tenderloin -tendon -tenebrous -tenement -tenet -tenfold -Tenneco -Tennessee -Tenney -tennis -Tennyson -tenon -tenor -tense -tensile -tension -tensional -tensor -tenspot -tent -tentacle -tentative -tenterhooks -tenth -tenuous -tenure -tepee -tepid -teratogenic -teratology -terbium -tercel -Teresa -term -terminable -terminal -terminate -termini -terminology -terminus -termite -tern -ternary -Terpsichore -terpsichorean -Terra -terrace -terrain -terramycin -terrapin -Terre -terrestrial -terrible -terrier -terrific -terrify -territorial -territory -terror -terry -terse -tertiary -Tess -tessellate -test -testament -testamentary -testate -testbed -testes -testicle -testicular -testify -testimonial -testimony -testy -tetanus -tete -tether -tetrachloride -tetrafluoride -tetrafluouride -tetragonal -tetrahedra -tetrahedral -tetrahedron -tetravalent -Teutonic -Texaco -Texan -Texas -text -textbook -textile -Textron -textual -textural -texture -Thai -Thailand -Thalia -thallium -thallophyte -than -thank -thankful -thanksgiving -that -thatch -that'd -that'll -thaw -Thayer -the -Thea -theatric -Thebes -thee -theft -their -theism -theist -Thelma -them -thematic -theme -themselves -then -thence -thenceforth -theocracy -Theodore -Theodosian -theologian -theology -theorem -theoretic -theoretician -theorist -theory -therapeutic -therapist -therapy -there -thereabouts -thereafter -thereat -thereby -there'd -therefor -therefore -therefrom -therein -there'll -thereof -thereon -Theresa -thereto -theretofore -thereunder -thereupon -therewith -thermal -thermionic -thermistor -thermo -Thermofax -thermostat -thesaurus -these -theses -Theseus -thesis -thespian -theta -Thetis -they -they'd -they'll -they're -they've -thiamin -thick -thicken -thicket -thickish -thief -thieves -thieving -thigh -thimble -Thimbu -thin -thine -thing -think -thinnish -thiocyanate -thiouracil -third -thirst -thirsty -thirteen -thirteenth -thirtieth -thirty -this -this'll -thistle -thistledown -thither -Thomas -Thomistic -Thompson -Thomson -thong -Thor -Thoreau -thoriate -thorium -thorn -Thornton -thorny -thorough -thoroughbred -thoroughfare -thoroughgoing -Thorpe -Thorstein -those -thou -though -thought -thoughtful -thousand -thousandfold -thousandth -thrall -thrash -thread -threadbare -threat -threaten -three -threefold -threesome -threonine -thresh -threshold -threw -thrice -thrift -thrifty -thrill -thrips -thrive -throat -throaty -throb -throes -thrombosis -throne -throng -throttle -through -throughout -throughput -throw -throwaway -throwback -thrown -thrum -thrush -thrust -Thruway -Thuban -thud -thug -thuggee -Thule -thulium -thumb -thumbnail -thump -thunder -thunderbird -thunderbolt -thunderclap -thunderflower -thunderous -thundershower -thunderstorm -Thurman -Thursday -thus -thwack -thwart -thy -thyme -thymine -thymus -thyratron -thyroglobulin -thyroid -thyroidal -thyronine -thyrotoxic -thyroxine -ti -Tiber -Tibet -tibet -Tibetan -tibia -tic -tick -ticket -tickle -ticklish -tid -tidal -tidbit -tide -tideland -tidewater -tidy -tie -tied -Tientsin -tier -Tiffany -tift -tiger -tight -tighten -tigress -Tigris -til -tilde -tile -till -tilt -tilth -Tim -timber -timberland -timbre -time -timeout -timepiece -timeshare -timetable -timeworn -Timex -timid -Timon -timothy -tin -Tina -tincture -tinder -tine -tinfoil -tinge -tingle -tinker -tinkle -tinsel -tint -tintype -tiny -Tioga -tip -tipoff -Tipperary -tipple -tippy -tipsy -tiptoe -tirade -Tirana -tire -tiresome -tissue -tit -Titan -titanate -titanic -titanium -tithe -titian -titillate -title -titmouse -titrate -titular -Titus -TN -TNT -to -toad -toady -toast -toastmaster -tobacco -Tobago -Toby -toccata -today -today'll -Todd -toddle -toe -TOEFL -toenail -toffee -tofu -tog -together -togging -toggle -Togo -togs -toil -toilet -toiletry -toilsome -tokamak -token -Tokyo -told -Toledo -tolerable -tolerant -tolerate -toll -tollgate -tollhouse -Tolstoy -toluene -Tom -tomato -tomatoes -tomb -tombstone -tome -Tomlinson -Tommie -tommy -tomograph -tomography -tomorrow -Tompkins -ton -tonal -tone -tong -tongue -Toni -tonic -tonight -tonk -tonnage -tonsil -tonsillitis -tony -too -toodle -took -tool -toolkit -toolmake -toolsmith -toot -tooth -toothbrush -toothpaste -toothpick -tootle -top -topaz -topcoat -Topeka -topgallant -topic -topmost -topnotch -topocentric -topography -topologize -topology -topple -topsoil -Topsy -tor -Torah -torah -torch -tore -tori -torn -tornado -toroid -toroidal -Toronto -torpedo -torpid -torpor -torque -torr -Torrance -torrent -torrid -torsion -torso -tort -tortoise -tortoiseshell -tortuous -torture -torus -tory -Toshiba -toss -tot -total -totalitarian -tote -totem -totemic -touch -touchdown -touchstone -touchy -tough -tour -tournament -tousle -tout -tow -toward -towboat -towel -tower -towhead -towhee -town -townhouse -Townsend -townsman -townsmen -toxic -toxicology -toxin -toy -Toyota -trace -traceable -tracery -trachea -track -trackage -tract -tractor -Tracy -trade -trademark -tradeoff -tradesman -tradesmen -tradition -traffic -trafficked -trafficking -trag -tragedian -tragedy -tragic -tragicomic -trail -trailblaze -trailhead -trailside -train -trainee -trainman -trainmen -traipse -trait -traitor -traitorous -trajectory -tram -trammel -tramp -trample -tramway -trance -tranquil -tranquillity -transact -transalpine -transatlantic -transceiver -transcend -transcendent -transcendental -transconductance -transcontinental -transcribe -transcript -transcription -transducer -transduction -transect -transept -transfer -transferable -transferee -transference -transferor -transferral -transferred -transferring -transfinite -transfix -transform -transformation -transfusable -transfuse -transfusion -transgress -transgression -transgressor -transient -transistor -transit -Transite -transition -transitive -transitory -translate -transliterate -translucent -transmissible -transmission -transmit -transmittable -transmittal -transmittance -transmitted -transmitter -transmitting -transmogrify -transmutation -transmute -transoceanic -transom -transpacific -transparent -transpiration -transpire -transplant -transplantation -transpond -transport -transportation -transposable -transpose -transposition -transship -transshipped -transshipping -transversal -transverse -transvestite -Transylvania -trap -trapezium -trapezoid -trapezoidal -trash -trashy -Trastevere -trauma -traumatic -travail -travel -travelogue -traversable -traversal -traverse -travertine -travesty -Travis -trawl -tray -treacherous -treachery -tread -treadle -treadmill -treason -treasonous -treasure -treasury -treat -treatise -treaty -treble -tree -treetop -trefoil -trek -trellis -tremble -tremendous -tremor -tremulous -trench -trenchant -trencherman -trenchermen -trend -trendy -Trenton -trepidation -trespass -tress -trestle -Trevelyan -triable -triac -triad -trial -triangle -triangular -triangulate -Triangulum -Trianon -Triassic -triatomic -tribal -tribe -tribesman -tribesmen -tribulate -tribunal -tribune -tributary -tribute -Triceratops -Trichinella -trichloroacetic -trichloroethane -trichrome -trick -trickery -trickle -trickster -tricky -trident -tridiagonal -tried -triennial -trifle -trifluoride -trifluouride -trig -trigonal -trigonometry -trigram -trihedral -trill -trillion -trillionth -trilobite -trilogy -trim -trimer -trimester -Trinidad -trinitarian -trinity -trinket -trio -triode -trioxide -trip -tripartite -tripe -triphenylphosphine -triple -triplet -Triplett -triplex -triplicate -tripod -tripoli -triptych -trisodium -Tristan -tristate -trisyllable -trite -tritium -triton -triumph -triumphal -triumphant -triune -trivalent -trivia -trivial -trivium -trod -trodden -troglodyte -troika -Trojan -troll -trolley -trollop -trombone -trompe -troop -trophic -trophy -tropic -tropopause -troposphere -tropospheric -trot -troubador -trouble -troubleshoot -troublesome -trough -trounce -troupe -trouser -trout -Troutman -troy -truancy -truant -truce -truck -truculent -trudge -Trudy -true -truism -truly -Truman -Trumbull -trump -trumpery -trumpet -truncate -trundle -trunk -truss -trust -trustee -trustful -trustworthy -truth -truthful -TRW -try -trypsin -trytophan -t's -tsar -tsarina -tsunami -TTL -TTY -tub -tuba -tube -tuberculin -tuberculosis -tubular -tubule -tuck -Tucker -Tucson -Tudor -Tuesday -tuff -tuft -tug -tugging -tuition -Tulane -tularemia -tulip -tulle -Tulsa -tum -tumble -tumbrel -tumult -tumultuous -tun -tuna -tundra -tune -tuneful -tung -tungstate -tungsten -tunic -Tunis -Tunisia -tunnel -tupelo -tuple -turban -turbid -turbidity -turbinate -turbine -turbofan -turbojet -turbulent -turf -turgid -Turin -Turing -turk -turkey -Turkish -turmoil -turn -turnabout -turnaround -turnery -turnip -turnkey -turnoff -turnout -turnover -turnpike -turnstone -turntable -turpentine -turpitude -turquoise -turret -turtle -turtleback -turtleneck -turvy -Tuscaloosa -Tuscan -Tuscany -Tuscarora -tusk -Tuskegee -tussle -tutelage -tutor -tutorial -Tuttle -tutu -tuxedo -TV -TVA -TWA -twaddle -twain -tweak -tweed -tweedy -tweeze -twelfth -twelve -twentieth -twenty -twice -twiddle -twig -twigging -twilight -twill -twin -twine -twinge -twinkle -twirl -twirly -twist -twisty -twit -twitch -twitchy -two -twofold -Twombly -twosome -TWX -TX -Tyburn -tycoon -tying -Tyler -Tyndall -type -typeface -typescript -typeset -typesetter -typesetting -typewrite -typewritten -typhoid -Typhon -typhoon -typhus -typic -typify -typo -typographer -typography -typology -tyrannic -tyrannicide -Tyrannosaurus -tyranny -tyrant -tyrosine -Tyson -u -ubiquitous -ubiquity -UCLA -Uganda -ugh -ugly -UHF -UK -Ukraine -Ukrainian -Ulan -ulcer -ulcerate -Ullman -Ulster -ulterior -ultimate -ultimatum -ultra -Ulysses -umber -umbilical -umbilici -umbilicus -umbra -umbrage -umbrella -umlaut -umpire -UN -unanimity -unanimous -unary -unbeknownst -unbidden -unchristian -uncle -uncouth -unction -under -underclassman -underclassmen -underling -undulate -UNESCO -uniaxial -unicorn -unidimensional -unidirectional -uniform -unify -unilateral -unimodal -unimodular -uninominal -union -uniplex -unipolar -uniprocessor -unique -Uniroyal -unisex -unison -unit -unital -unitarian -unitary -unite -unity -Univac -univalent -univariate -universal -universe -Unix -unkempt -unruly -until -unwieldy -up -upbeat -upbraid -upbring -upcome -update -updraft -upend -upgrade -upheaval -upheld -uphill -uphold -upholster -upholstery -upkeep -upland -uplift -upon -upper -upperclassman -upperclassmen -uppercut -uppermost -upraise -upright -uprise -upriver -uproar -uproarious -uproot -upset -upsetting -upshot -upside -upsilon -upslope -upstair -upstand -upstart -upstate -upstater -upstream -upsurge -upswing -uptake -Upton -uptown -uptrend -upturn -upward -upwind -uracil -urania -uranium -Uranus -uranyl -urban -Urbana -urbane -urbanite -urchin -urea -uremia -urethane -urethra -urge -urgency -urgent -urging -Uri -urinal -urinary -urine -Uris -urn -Ursa -Ursula -Ursuline -Uruguay -u's -U.S -us -USA -U.S.A -usable -USAF -usage -USC -USC&GS -USDA -use -useful -USGS -usher -USIA -USN -USPS -USSR -usual -usurer -usurious -usurp -usurpation -usury -UT -Utah -utensil -uterine -uterus -Utica -utile -utilitarian -utility -utmost -utopia -utopian -Utrecht -utter -utterance -uttermost -v -VA -vacant -vacate -vacationland -vaccinate -vaccine -vacillate -vacua -vacuo -vacuolate -vacuole -vacuous -vacuum -vade -Vaduz -vagabond -vagary -vagina -vaginal -vagrant -vague -Vail -vain -vainglorious -vale -valediction -valedictorian -valedictory -valent -valentine -Valerie -Valery -valet -valeur -Valhalla -valiant -valid -validate -valine -Valkyrie -Valletta -valley -Valois -Valparaiso -valuate -value -valve -vamp -vampire -van -vanadium -Vance -Vancouver -vandal -Vandenberg -Vanderbilt -Vanderpoel -vane -vanguard -vanilla -vanish -vanity -vanquish -vantage -vapid -vaporous -variable -variac -Varian -variant -variate -variegate -variety -various -varistor -Varitype -varnish -varsity -vary -vascular -vase -vasectomy -Vasquez -vassal -Vassar -vast -vat -Vatican -vaudeville -Vaudois -Vaughan -Vaughn -vault -vaunt -veal -vector -vectorial -Veda -vee -veer -veery -Vega -vegetable -vegetarian -vegetate -vehement -vehicle -vehicular -veil -vein -velar -Velasquez -veldt -Vella -vellum -velocity -velours -velvet -velvety -venal -vend -vendetta -vendible -vendor -veneer -venerable -venerate -venereal -Venetian -Veneto -Venezuela -vengeance -vengeful -venial -Venice -venison -venom -venomous -venous -vent -ventilate -ventricle -venture -venturesome -venturi -Venus -Venusian -Vera -veracious -veracity -veranda -verandah -verb -verbal -verbatim -verbena -verbiage -verbose -verbosity -verdant -Verde -Verdi -verdict -verge -veridic -verify -verisimilitude -veritable -verity -Verlag -vermeil -vermiculite -vermilion -vermin -Vermont -vermouth -Verna -vernacular -vernal -Verne -vernier -Vernon -Verona -Veronica -versa -Versailles -versatec -versatile -verse -version -versus -vertebra -vertebrae -vertebral -vertebrate -vertex -vertical -vertices -vertigo -verve -very -vesicular -vesper -vessel -vest -vestal -vestibule -vestige -vestigial -vestry -vet -vetch -veteran -veterinarian -veterinary -veto -vex -vexation -vexatious -VHF -vi -via -viaduct -vial -vibrant -vibrate -vibrato -viburnum -vicar -vicarious -vice -viceroy -Vichy -vicinal -vicinity -vicious -vicissitude -Vicksburg -Vicky -victim -victor -Victoria -Victorian -victorious -victory -victrola -victual -Vida -vide -video -videotape -vie -Vienna -Viennese -Vientiane -Viet -Vietnam -Vietnamese -view -viewpoint -viewport -vigil -vigilant -vigilante -vigilantism -vignette -vigorous -vii -viii -Viking -vile -vilify -villa -village -villain -villainous -villein -Vincent -vindicate -vindictive -vine -vinegar -vineyard -Vinson -vintage -vintner -vinyl -viola -violate -violent -violet -violin -Virgil -virgin -virginal -Virginia -Virginian -Virgo -virgule -virile -virtual -virtue -virtuosi -virtuosity -virtuoso -virtuous -virulent -virus -vis -visa -visage -viscera -visceral -viscoelastic -viscometer -viscosity -viscount -viscous -vise -Vishnu -visible -Visigoth -vision -visionary -visit -visitation -visitor -visor -vista -visual -vita -vitae -vital -vitamin -vitiate -Vito -vitreous -vitrify -vitriol -vitriolic -vitro -viva -vivace -vivacious -vivacity -Vivaldi -Vivian -vivid -vivify -vivo -vixen -viz -Vladimir -Vladivostok -vocable -vocabularian -vocabulary -vocal -vocalic -vocate -vociferous -Vogel -vogue -voice -voiceband -void -volatile -volcanic -volcanism -volcano -volition -Volkswagen -volley -volleyball -Volstead -volt -Volta -voltage -voltaic -Voltaire -Volterra -voltmeter -voluble -volume -volumetric -voluminous -voluntarism -voluntary -volunteer -voluptuous -Volvo -vomit -von -voodoo -voracious -voracity -vortex -vortices -vorticity -Voss -votary -vote -votive -vouch -vouchsafe -Vought -vow -vowel -voyage -Vreeland -v's -VT -Vulcan -vulgar -vulnerable -vulpine -vulture -vying -w -WA -Waals -Wabash -WAC -wack -wacke -wacky -Waco -wad -waddle -wade -wadi -Wadsworth -wafer -waffle -wag -wage -wagging -waggle -Wagner -wagoneer -wah -Wahl -wail -wainscot -Wainwright -waist -waistcoat -waistline -wait -Waite -waitress -waive -wake -Wakefield -wakeful -waken -wakerobin -wakeup -Walcott -Walden -Waldo -Waldorf -Waldron -wale -Walgreen -walk -walkie -walkout -walkover -walkway -wall -wallaby -Wallace -wallboard -Waller -wallet -Wallis -wallop -wallow -wallpaper -Walls -wally -walnut -Walpole -walrus -Walsh -Walt -Walter -Walters -Waltham -Walton -waltz -waltzing -wan -wand -wander -wane -Wang -wangle -want -wanton -wapato -wapiti -Wappinger -war -warble -ward -warden -wardrobe -wardroom -ware -warehouse -warehouseman -warfare -warhead -Waring -warlike -warm -warmhearted -warmish -warmonger -warmth -warmup -warn -warp -warplane -warrant -warranty -warren -warrior -Warsaw -wart -wartime -warty -Warwick -wary -was -wash -washbasin -washboard -washbowl -Washburn -Washington -washout -washy -wasn't -wasp -waspish -Wasserman -wast -wastage -waste -wastebasket -wasteful -wasteland -wastewater -wastrel -Watanabe -watch -watchband -watchdog -watchful -watchmake -watchman -watchmen -watchword -water -Waterbury -watercourse -waterfall -waterfront -Watergate -Waterhouse -waterline -Waterloo -Waterman -watermelon -waterproof -Waters -watershed -waterside -Watertown -waterway -watery -Watkins -Watson -watt -wattage -wattle -Watts -wave -waveform -wavefront -waveguide -wavelength -wavelet -wavenumber -wavy -wax -waxen -waxwork -waxy -way -waybill -waylaid -waylay -Wayne -wayside -wayward -we -weak -weaken -weal -wealth -wealthy -wean -weapon -weaponry -wear -wearied -wearisome -weary -weasel -weather -weatherbeaten -weatherproof -weatherstrip -weatherstripping -weave -web -Webb -weber -Webster -WECo -we'd -wed -wedge -wedlock -Wednesday -wee -weed -weedy -week -weekday -weekend -Weeks -weep -Wehr -Wei -Weierstrass -weigh -weight -weighty -Weinberg -Weinstein -weir -weird -Weiss -Welch -welcome -weld -Weldon -welfare -we'll -well -wellbeing -Weller -Welles -Wellesley -wellington -Wells -welsh -welt -Wendell -Wendy -went -wept -we're -were -weren't -Werner -wert -Werther -Wesley -Wesleyan -west -westbound -Westchester -westerly -western -westernmost -Westfield -Westinghouse -Westminster -Weston -westward -wet -wetland -we've -Weyerhauser -whack -whale -Whalen -wham -wharf -Wharton -wharves -what -what'd -whatever -Whatley -whatnot -what're -whatsoever -wheat -Wheatstone -whee -wheedle -wheel -wheelbase -wheelchair -wheelhouse -wheeze -wheezy -Whelan -whelk -Wheller -whelm -whelp -when -whence -whenever -where -whereabout -whereas -whereby -where'd -wherefore -wherein -whereof -whereon -where're -wheresoever -whereupon -wherever -wherewith -wherewithal -whet -whether -which -whichever -whiff -whig -while -whim -whimper -whimsey -whimsic -whine -whinny -whip -whiplash -Whippany -whippet -Whipple -whipsaw -whir -whirl -whirligig -whirlpool -whirlwind -whish -whisk -whisper -whistle -whistleable -whit -Whitaker -Whitcomb -white -whiteface -Whitehall -whitehead -Whitehorse -whiten -whitetail -whitewash -whither -Whitlock -Whitman -Whitney -Whittaker -Whittier -whittle -whiz -whizzing -who -who've -whoa -who'd -whoever -whole -wholehearted -wholesale -wholesome -who'll -wholly -whom -whomever -whomsoever -whoop -whoosh -whop -whore -whose -whosoever -whup -why -WI -Wichita -wick -wicket -wide -widen -widespread -widgeon -widget -widow -widowhood -width -widthwise -wield -wiener -Wier -wife -wig -wigging -Wiggins -wiggle -wiggly -Wightman -wigmake -wigwam -Wilbur -Wilcox -wild -wildcat -wildcatter -wilderness -wildfire -wildlife -wile -Wiley -Wilfred -wilful -Wilhelm -Wilhelmina -Wilkes -Wilkie -Wilkins -Wilkinson -will -Willa -Willard -willful -William -Williams -Williamsburg -Williamson -Willie -Willis -Willoughby -willow -willowy -Wills -Wilma -Wilmington -Wilshire -Wilson -Wilsonian -wilt -wily -win -wince -winch -Winchester -wind -windbag -windbreak -windfall -windmill -window -windowpane -windowsill -windshield -Windsor -windstorm -windsurf -windup -windward -windy -wine -winemake -winemaster -winery -wineskin -Winfield -wing -wingback -wingman -wingmen -wingspan -wingtip -Winifred -wink -winkle -Winnetka -Winnie -Winnipeg -Winnipesaukee -winnow -wino -Winslow -winsome -Winston -winter -Winters -wintertime -Winthrop -wintry -winy -wipe -wire -wireman -wiremen -wiretap -wiretapper -wiretapping -wiry -Wisconsin -wisdom -wise -wiseacre -wisecrack -wisenheimer -wish -wishbone -wishful -wishy -wisp -wispy -wistful -wit -witch -witchcraft -with -withal -withdraw -withdrawal -withdrawn -withdrew -withe -wither -withheld -withhold -within -without -withstand -withstood -withy -witness -Witt -witty -wive -wizard -wobble -woe -woebegone -woeful -wok -woke -Wolcott -wold -wolf -Wolfe -Wolff -Wolfgang -wolfish -wolve -wolves -woman -womanhood -womb -wombat -women -won -wonder -wonderful -wonderland -wondrous -Wong -won't -wont -woo -wood -Woodard -Woodbury -woodcarver -woodcock -woodcut -wooden -woodgrain -woodhen -woodland -Woodlawn -woodlot -woodpeck -Woodrow -woodrow -woodruff -Woods -woodshed -woodside -Woodward -woodward -woodwind -woodwork -woody -woodyard -wool -woolgather -Woolworth -Wooster -wop -Worcester -word -Wordsworth -wordy -wore -work -workaday -workbench -workbook -workday -workforce -workhorse -workload -workman -workmanlike -workmen -workout -workpiece -workplace -worksheet -workshop -workspace -workstation -worktable -world -worldwide -worm -wormy -worn -worrisome -worry -worse -worsen -worship -worshipful -worst -worth -Worthington -worthwhile -worthy -Wotan -would -wouldn't -wound -wove -woven -wow -wrack -wraith -wrangle -wrap -wrapup -wrath -wrathful -wreak -wreath -wreathe -wreck -wreckage -wrench -wrest -wrestle -wretch -wriggle -wright -Wrigley -wring -wrinkle -wrist -wristband -wristwatch -writ -write -writeup -writhe -written -wrong -wrongdo -wrongdoer -wrongdoing -wrongful -Wronskian -wrote -wrought -wry -w's -Wu -Wuhan -WV -WY -Wyandotte -Wyatt -Wyeth -Wylie -Wyman -Wyner -wynn -Wyoming -x -Xavier -xenon -xenophobia -xerography -Xerox -xerox -Xerxes -xi -x's -xylem -xylene -xylophone -y -yacht -yachtsman -yachtsmen -yah -yak -Yakima -Yale -Yalta -yam -Yamaha -yang -yank -Yankee -Yankton -Yaounde -yap -yapping -Yaqui -yard -yardage -yardstick -Yarmouth -yarmulke -yarn -yarrow -Yates -yaw -yawl -yawn -ye -yea -Yeager -yeah -year -yearbook -yearn -yeast -yeasty -Yeats -yell -yellow -yellowish -Yellowknife -Yellowstone -yelp -Yemen -yen -yeoman -yeomanry -Yerkes -yeshiva -yesterday -yesteryear -yet -Yiddish -yield -yin -yip -yipping -YMCA -yodel -Yoder -yoga -yoghurt -yogi -yogurt -yoke -yokel -Yokohama -Yokuts -yolk -yon -yond -Yonkers -yore -York -Yorktown -Yosemite -Yost -you -you'd -you'll -young -youngish -youngster -Youngstown -your -you're -yourself -yourselves -youth -youthful -you've -yow -Ypsilanti -y's -ytterbium -yttrium -Yucatan -yucca -yuck -Yugoslav -Yugoslavia -yuh -Yuki -Yukon -yule -Yves -Yvette -YWCA -z -Zachary -zag -zagging -Zagreb -Zaire -Zambia -Zan -Zanzibar -zap -zazen -zeal -Zealand -zealot -zealous -zebra -Zeiss -Zellerbach -Zen -zenith -zero -zeroes -zeroth -zest -zesty -zeta -Zeus -Ziegler -zig -zigging -zigzag -zigzagging -zilch -Zimmerman -zinc -zing -Zion -Zionism -zip -zippy -zircon -zirconium -zloty -zodiac -zodiacal -Zoe -Zomba -zombie -zone -zoo -zoology -zoom -Zorn -Zoroaster -Zoroastrian -zounds -z's -zucchini -Zurich -zygote diff -ruN glibc-1.06/string/Makefile glibc-1.07/string/Makefile --- glibc-1.06/string/Makefile Wed Nov 18 14:05:40 1992 +++ glibc-1.07/string/Makefile Thu Nov 18 05:49:35 1993 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993 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 @@ -24,10 +24,11 @@ headers := string.h strings.h memory.h endian.h bytesex.h routines := strcat strchr strcmp strcoll strcpy strcspn strdup \ - strerror strlen strncat strncmp strncpy strpbrk \ - strrchr strsignal strspn strstr strtok strxfrm \ - __memccpy memchr memcmp memmove memset \ - bcopy bzero ffs stpcpy strcasecmp strncase \ + strerror _strerror strlen strncat strncmp strncpy \ + strrchr strpbrk strsignal strspn strstr strtok \ + strxfrm __memccpy memchr memcmp memmove memset \ + bcopy bzero ffs stpcpy stpncpy __stpncpy \ + strcasecmp strncase \ rindex index bcmp memccpy memcpy wordcopy strsep \ swab strfry memfrob memmem diff -ruN glibc-1.06/string/TAGS glibc-1.07/string/TAGS --- glibc-1.06/string/TAGS Wed May 19 20:44:12 1993 +++ glibc-1.07/string/TAGS Mon Jan 17 23:43:45 1994 @@ -5,7 +5,7 @@ ../sysdeps/vax/strcat.s,0 ../sysdeps/generic/strchr.c,22 -DEFUN(strchr,30,1186 +DEFUN(strchr,30,1192 ../sysdeps/vax/strchr.s,31 Lzero:78,2770 @@ -12,7 +12,7 @@ Lreent:91,3208 ../sysdeps/alpha/strchr.c,15 -strchr 24,949 +strchr 24,955 ../sysdeps/generic/strcmp.c,22 DEFUN(strcmp,27,1042 @@ -35,17 +35,22 @@ strdup.c,21 DEFUN(strdup,27,976 -strerror.c,125 -#define _sys_errlist 24,913 -#define _sys_nerr 25,946 -DEFUN(strerror,32,1161 -DEFUN(strerror, (errnum), int errnum)32,1161 +strerror.c,24 +DEFUN(strerror,29,1141 +../sysdeps/generic/_strerror.c,89 +#define _sys_errlist 24,911 +#define _sys_nerr 25,944 +DEFUN(_strerror_internal,30,1046 + +../sysdeps/mach/_strerror.c,34 +DEFUN(_strerror_internal,27,1005 + ../sysdeps/generic/strlen.c,22 -DEFUN(strlen,29,1110 +DEFUN(strlen,29,1116 ../sysdeps/i386/strlen.c,21 -DEFUN(strlen,25,966 +DEFUN(strlen,25,972 ../sysdeps/vax/strlen.s,0 @@ -69,11 +74,6 @@ ../sysdeps/vax/strncpy.s,14 done:82,2989 -../sysdeps/generic/strpbrk.c,22 -DEFUN(strpbrk,25,941 - -../sysdeps/vax/strpbrk.s,0 - ../sysdeps/generic/strrchr.c,22 DEFUN(strrchr,25,918 @@ -81,6 +81,11 @@ Lzero:81,2881 Lreent:94,3290 +../sysdeps/generic/strpbrk.c,22 +DEFUN(strpbrk,25,941 + +../sysdeps/vax/strpbrk.s,0 + strsignal.c,101 #define _sys_siglist 26,928 DEFUN(strsignal,35,1129 @@ -109,29 +114,30 @@ DEFUN(__memccpy,27,1078 ../sysdeps/generic/memchr.c,22 -DEFUN(memchr,30,1175 +DEFUN(memchr,30,1181 ../sysdeps/i386/memchr.c,22 -DEFUN(memchr,28,1023 +DEFUN(memchr,28,1029 ../sysdeps/vax/memchr.s,0 ../sysdeps/alpha/memchr.c,15 -memchr 23,861 +memchr 23,867 -../sysdeps/generic/memcmp.c,314 +../sysdeps/generic/memcmp.c,337 #define __ptr_t 25,969 #define const28,1037 #define __ptr_t 29,1051 -#define op_t 45,1390 -#define OPSIZ 46,1421 -#define OP_T_THRES 49,1512 -typedef unsigned char byte;52,1580 -#define MERGE(55,1633 -#define MERGE(57,1711 -memcmp_common_alignment 83,2504 -memcmp_not_common_alignment 171,4232 -memcmp 273,6485 +#define op_t 47,1441 +#define OPSIZ 48,1472 +#define OP_T_THRES 51,1563 +typedef unsigned char byte;54,1631 +#define MERGE(57,1684 +#define MERGE(59,1762 +memcmp_bytes 86,2560 +memcmp_common_alignment 112,3080 +memcmp_not_common_alignment 219,5253 +memcmp 341,7832 ../sysdeps/vax/memcmp.s,0 @@ -196,6 +202,12 @@ ../sysdeps/generic/stpcpy.c,21 DEFUN(stpcpy,25,956 +stpncpy.c,30 + DEFUN(stpncpy,27,967 + +../sysdeps/generic/__stpncpy.c,25 +DEFUN(__stpncpy,29,1093 + ../sysdeps/generic/strcasecmp.c,26 DEFUN(strcasecmp,27,1061 @@ -247,13 +259,14 @@ DEFUN(memfrob,23,872 ../sysdeps/generic/memmem.c,21 -DEFUN(memmem,26,957 +DEFUN(memmem,26,963 -string.h,109 -#define _STRING_H 25,914 -#define __need_size_t31,1016 -#define __need_NULL32,1038 -#define memccpy(53,1858 +string.h,135 +#define _STRING_H 25,920 +#define __need_size_t31,1022 +#define __need_NULL32,1044 +#define memccpy(53,1864 +#define stpncpy(174,6801 strings.h,27 #define _STRINGS_H 23,893 @@ -273,6 +286,9 @@ ../hp300/bytesex.h,26 #define __BYTE_ORDER 1,0 + +../sysdeps/m68k/bytesex.h,27 +#define __BYTE_ORDER 3,28 ../sysdeps/stub/bytesex.h,0 diff -ruN glibc-1.06/string/stpncpy.c glibc-1.07/string/stpncpy.c --- glibc-1.06/string/stpncpy.c +++ glibc-1.07/string/stpncpy.c Thu Nov 4 01:25:14 1993 @@ -0,0 +1,29 @@ +/* Copyright (C) 1993 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 +#include + +#undef stpncpy + +#include + +function_alias(stpncpy, __stpncpy, char *, (dest, src, n), + DEFUN(stpncpy, (dest, src, n), + char *dest AND CONST char *src AND size_t n)) + diff -ruN glibc-1.06/string/strerror.c glibc-1.07/string/strerror.c --- glibc-1.06/string/strerror.c Fri Aug 7 17:39:07 1992 +++ glibc-1.07/string/strerror.c Sun Jan 16 04:38:41 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993, 1994 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 @@ -20,10 +20,7 @@ #include #include -#ifndef HAVE_GNU_LD -#define _sys_errlist sys_errlist -#define _sys_nerr sys_nerr -#endif +extern char *_strerror_internal __P ((int, char buf[1024])); /* Return a string descibing the errno code in ERRNUM. The storage is good only until the next call to strerror. @@ -31,16 +28,6 @@ char * DEFUN(strerror, (errnum), int errnum) { - if (errnum < 0 || errnum > _sys_nerr) - { - static char unknown_error[] = "Unknown error 000000000000000000"; - static char fmt[] = "Unknown error %d"; - size_t len = sprintf(unknown_error, fmt, errnum); - if (len < sizeof(fmt) - 2) - return NULL; - unknown_error[len - 1] = '\0'; - return unknown_error; - } - - return (char *) _sys_errlist[errnum]; + static char buf[1024]; + return _strerror_internal (errnum, buf); } diff -ruN glibc-1.06/string/string.h glibc-1.07/string/string.h --- glibc-1.06/string/string.h Fri Nov 6 15:51:09 1992 +++ glibc-1.07/string/string.h Fri Dec 17 15:06:45 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -72,7 +72,7 @@ extern char *strncpy __P ((char *__dest, __const char *__src, size_t __n)); /* Append SRC onto DEST. */ -extern char *strcat __P ((char *__src, __const char *__dest)); +extern char *strcat __P ((char *__dest, __const char *__src)); /* Append no more than N characters from SRC onto DEST. */ extern char *strncat __P ((char *__dest, __const char *__src, size_t __n)); @@ -113,8 +113,8 @@ /* Find the first occurence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ -extern __ptr_t memmem __P ((__const __ptr_t __needle, size_t __needlelen, - __const __ptr_t __haystack, size_t __haystacklen)); +extern __ptr_t memmem __P ((__const __ptr_t __haystack, size_t __haystacklen, + __const __ptr_t __needle, size_t __needlelen)); #endif /* Return the length of S. */ @@ -151,6 +151,10 @@ extern char *strsep __P ((char **__stringp, __const char *__delim)); #endif +/* Copy no more than N characters of SRC to DEST, returning the address of + the last character written into DEST. */ +extern char *__stpncpy __P ((char *__dest, __const char *__src, size_t __n)); + #ifdef __USE_GNU /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int strncasecmp __P ((__const char *__s1, __const char *__s2, @@ -161,6 +165,14 @@ /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *stpcpy __P ((char *__dest, __const char *__src)); + +/* Copy no more than N characters of SRC to DEST, returning the address of + the last character written into DEST. */ +extern char *stpncpy __P ((char *__dest, __const char *__src, size_t __n)); + +#ifdef __OPTIMIZE__ +#define stpncpy(dest, src, n) __stpncpy ((dest), (src), (n)) +#endif /* Sautee STRING briskly. */ extern char *strfry __P ((char *__string)); diff -ruN glibc-1.06/sysdeps/alpha/DEFS.h glibc-1.07/sysdeps/alpha/DEFS.h --- glibc-1.06/sysdeps/alpha/DEFS.h +++ glibc-1.07/sysdeps/alpha/DEFS.h Thu Dec 23 01:26:49 1993 @@ -0,0 +1,27 @@ +#ifdef __STDC__ +#define FUNC__(name) \ + .align 3; \ + .globl __##name; \ + .ent __##name; \ + __##name: \ + lda sp, -16(sp); \ + .frame sp, 16, t9, 0; \ + .prologue 0 +#else +#define FUNC__(name) \ + .align 3; \ + .globl __/**/name; \ + .ent __/**/name,0; \ + __/**/name: \ + lda sp, -16(sp); \ + .frame sp, 16, t9, 0; \ + .prologue 0 +#endif + +#ifdef __STDC__ +#define NAME__(name) \ + __##name +#else +#define NAME__(name) \ + __/**/name +#endif diff -ruN glibc-1.06/sysdeps/alpha/Dist glibc-1.07/sysdeps/alpha/Dist --- glibc-1.06/sysdeps/alpha/Dist Tue Nov 24 22:04:00 1992 +++ glibc-1.07/sysdeps/alpha/Dist Thu Dec 23 00:57:55 1993 @@ -1 +1,4 @@ setjmp_aux.c +DEFS.h +divrem.m4 macros.m4 +divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S diff -ruN glibc-1.06/sysdeps/alpha/Makefile glibc-1.07/sysdeps/alpha/Makefile --- glibc-1.06/sysdeps/alpha/Makefile Tue Nov 24 22:04:52 1992 +++ glibc-1.07/sysdeps/alpha/Makefile Thu Dec 23 00:57:53 1993 @@ -1,3 +1,91 @@ +# Copyright (C) 1993 Free Software Foundation, Inc. +# Contributed by Brendan Kehoe (brendan@zen.org). + +# 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. + ifeq ($(subdir),setjmp) sysdep_routines := $(sysdep_routines) setjmp_aux endif + +ifeq ($(subdir),gnulib) +routines = $(divrem) +endif # gnulib + +# We distribute these files, even though they are generated, +# so as to avoid the need for a functioning m4 to build the library. +divrem := divl divlu divq divqu reml remlu remq remqu + ++divrem-NAME-divl := divl ++divrem-NAME-divlu := divlu ++divrem-NAME-divq := divq ++divrem-NAME-divqu := divqu ++divrem-NAME-reml := reml ++divrem-NAME-remlu := remlu ++divrem-NAME-remq := remq ++divrem-NAME-remqu := remqu ++divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@))) + ++divrem-OP-divl := divl ++divrem-OP-divlu := divlu ++divrem-OP-divq := divq ++divrem-OP-divqu := divqu ++divrem-OP-reml := reml ++divrem-OP-remlu := remlu ++divrem-OP-remq := remq ++divrem-OP-remqu := remqu ++divrem-BASEOP-divl := div ++divrem-BASEOP-divlu := div ++divrem-BASEOP-divq := div ++divrem-BASEOP-divqu := div ++divrem-BASEOP-reml := rem ++divrem-BASEOP-remlu := rem ++divrem-BASEOP-remq := rem ++divrem-BASEOP-remqu := rem ++divrem-S-divl := true ++divrem-S-divlu := false ++divrem-S-divq := true ++divrem-S-divqu := false ++divrem-S-reml := true ++divrem-S-remlu := false ++divrem-S-remq := true ++divrem-S-remqu := false ++divrem-SIZE-divl := l ++divrem-SIZE-divlu := l ++divrem-SIZE-divq := q ++divrem-SIZE-divqu := q ++divrem-SIZE-reml := l ++divrem-SIZE-remlu := l ++divrem-SIZE-remq := q ++divrem-SIZE-remqu := q ++divrem-MODE-divl := l ++divrem-MODE-divlu := lu ++divrem-MODE-divq := q ++divrem-MODE-divqu := qu ++divrem-MODE-reml := l ++divrem-MODE-remlu := lu ++divrem-MODE-remq := q ++divrem-MODE-remqu := qu + +$(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)/alpha/DEFS.h $(sysdep_dir)/alpha/macros.m4 + (echo "define(OP,\`$(+divrem-NAME)')\ + define(BASEOP,\`$(+divrem-BASEOP-$(+divrem-NAME))')\ + define(MODE,\`$(+divrem-MODE-$(+divrem-NAME))')\ + define(SIZE,\`$(+divrem-SIZE-$(+divrem-NAME))')\ + define(SIGNED,\`$(+divrem-S-$(+divrem-NAME))')\ + define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\ + /* This file is generated from divrem.m4; DO NOT EDIT! */"; \ + cat $<) | $(M4) > $@-tmp + mv $@-tmp $@ diff -ruN glibc-1.06/sysdeps/alpha/__copysign.c glibc-1.07/sysdeps/alpha/__copysign.c --- glibc-1.06/sysdeps/alpha/__copysign.c Sun Apr 11 20:49:08 1993 +++ glibc-1.07/sysdeps/alpha/__copysign.c Thu Dec 23 00:58:05 1993 @@ -16,12 +16,14 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __NO_MATH_INLINES + #include /* Return X with its sign changed to Y's. */ -double -__copysign (double x, double y) +__inline __CONSTVALUE double +__copysign (double __x, double __y) { - asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x)); - return x; + __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); + return __x; } diff -ruN glibc-1.06/sysdeps/alpha/__math.h glibc-1.07/sysdeps/alpha/__math.h --- glibc-1.06/sysdeps/alpha/__math.h Wed Nov 25 14:11:17 1992 +++ glibc-1.07/sysdeps/alpha/__math.h Thu Dec 23 00:58:05 1993 @@ -18,7 +18,7 @@ #if defined (__GNUC__) && !defined (__NO_MATH_INLINES) -extern __inline double +extern __inline __CONSTVALUE double __copysign (double __x, double __y) { __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x)); diff -ruN glibc-1.06/sysdeps/alpha/divl.S glibc-1.07/sysdeps/alpha/divl.S --- glibc-1.06/sysdeps/alpha/divl.S +++ glibc-1.07/sysdeps/alpha/divl.S Thu Dec 23 01:27:51 1993 @@ -0,0 +1,54 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divl) + ! First set up the dividend. + sextl t10, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + ! Then set up the divisor. + sextl t11, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divl) diff -ruN glibc-1.06/sysdeps/alpha/divlu.S glibc-1.07/sysdeps/alpha/divlu.S --- glibc-1.06/sysdeps/alpha/divlu.S +++ glibc-1.07/sysdeps/alpha/divlu.S Thu Dec 23 01:27:54 1993 @@ -0,0 +1,54 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divlu) + ! First set up the dividend. + zapnot t10, 0xf, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + ! Then set up the divisor. + zapnot t11, 0xf, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divlu) diff -ruN glibc-1.06/sysdeps/alpha/divq.S glibc-1.07/sysdeps/alpha/divq.S --- glibc-1.06/sysdeps/alpha/divq.S +++ glibc-1.07/sysdeps/alpha/divq.S Thu Dec 23 01:27:54 1993 @@ -0,0 +1,51 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divq) + ! First set up the dividend. + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + ! Then set up the divisor. + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divq) diff -ruN glibc-1.06/sysdeps/alpha/divqu.S glibc-1.07/sysdeps/alpha/divqu.S --- glibc-1.06/sysdeps/alpha/divqu.S +++ glibc-1.07/sysdeps/alpha/divqu.S Thu Dec 23 01:27:55 1993 @@ -0,0 +1,57 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(divqu) + ! First set up the dividend. + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + ldit $f26, 18446744073709551616.0 + addt $f26, $f10, $f26 + fcmovlt $f10, $f26, $f10 + + + ! Then set up the divisor. + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + ldit $f26, 18446744073709551616.0 + addt $f26, $f1, $f26 + fcmovlt $f1, $f26, $f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + + + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(divqu) diff -ruN glibc-1.06/sysdeps/alpha/divrem.m4 glibc-1.07/sysdeps/alpha/divrem.m4 --- glibc-1.06/sysdeps/alpha/divrem.m4 +++ glibc-1.07/sysdeps/alpha/divrem.m4 Thu Dec 23 00:57:54 1993 @@ -0,0 +1,48 @@ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + +define(path, `SYSDEP_DIR/macros.m4')dnl +include(path) + +FUNC__(OP) + ! First set up the dividend. + EXTEND(t10) + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + ADJQU($f10) + + ! Then set up the divisor. + EXTEND(t11) + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + ADJQU($f1) + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + FULLEXTEND(t12) + + DOREM + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(OP) diff -ruN glibc-1.06/sysdeps/alpha/fabs.c glibc-1.07/sysdeps/alpha/fabs.c --- glibc-1.06/sysdeps/alpha/fabs.c Tue Nov 24 22:10:26 1992 +++ glibc-1.07/sysdeps/alpha/fabs.c Thu Dec 23 00:58:06 1993 @@ -16,11 +16,13 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define __NO_MATH_INLINES + #include -double -fabs (double x) +__inline double +fabs (double __x) { - asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x)); - return x; + __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x)); + return __x; } diff -ruN glibc-1.06/sysdeps/alpha/gmp-mparam.h glibc-1.07/sysdeps/alpha/gmp-mparam.h --- glibc-1.06/sysdeps/alpha/gmp-mparam.h +++ glibc-1.07/sysdeps/alpha/gmp-mparam.h Sun Jan 16 00:16:55 1994 @@ -0,0 +1,29 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. +Copyright (C) 1991 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT 64 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff -ruN glibc-1.06/sysdeps/alpha/macros.m4 glibc-1.07/sysdeps/alpha/macros.m4 --- glibc-1.06/sysdeps/alpha/macros.m4 +++ glibc-1.07/sysdeps/alpha/macros.m4 Thu Dec 23 00:57:55 1993 @@ -0,0 +1,34 @@ +dnl NOTE: The $1 below is the argument to EXTEND, not register $1. +define(EXTEND, +`ifelse(SIZE, `l', +`ifelse(SIGNED, `true', +` sextl $1, $1 +',dnl +` zapnot $1, 0xf, $1 +')')')dnl + +dnl FULLEXTEND -- extend the register named in the first argument +define(FULLEXTEND, +`ifelse(SIZE, `l', +` sextl $1, $1 +')')dnl + +dnl This is used by divqu. +define(ADJQU, +`ifelse(MODE, `qu', +` ldit $f26, 18446744073709551616.0 + addt $f26, $1, $f26 + fcmovlt $1, $f26, $1 +')')dnl + +define(DOREM, +`ifelse(BASEOP, `rem', +` ! Compute the remainder. +ifelse(SIZE, `l', +` mull t11, t12, t11 + subl t10, t11, t12 +',dnl Note mulq/subq were only really used in remq, but we will find out +dnl if assuming they apply to remqu as well is wrong or not. +` mulq t11, t12, t11 + subq t10, t11, t12 +')')')dnl diff -ruN glibc-1.06/sysdeps/alpha/memchr.c glibc-1.07/sysdeps/alpha/memchr.c --- glibc-1.06/sysdeps/alpha/memchr.c Wed Nov 25 14:02:23 1992 +++ glibc-1.07/sysdeps/alpha/memchr.c Thu Dec 23 00:57:52 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. 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 @@ -25,6 +25,7 @@ const char *char_ptr; const unsigned long int *longword_ptr; unsigned long int charmask; + size_t x; c = (unsigned char) c; @@ -33,8 +34,13 @@ for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0; --n, ++char_ptr) if (*char_ptr == c) - return char_ptr; + return (void *) char_ptr; + if (n == (size_t)0) + return NULL; + + x = n; + longword_ptr = (unsigned long int *) char_ptr; /* Set up a longword, each of whose bytes is C. */ @@ -41,6 +47,7 @@ charmask = c | (c << 8); charmask |= charmask << 16; charmask |= charmask << 32; + charmask |= charmask << 64; for (;;) { @@ -47,6 +54,11 @@ const unsigned long int longword = *longword_ptr++; int ge, le; + if (x < 4) + x = (size_t) 0; + else + x -= 4; + /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */ asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword)); @@ -58,15 +70,18 @@ { /* Which of the bytes was the C? */ - const char *cp = (const char *) (longword_ptr - 1); + unsigned char *cp = (unsigned char *) (longword_ptr - 1); + int i; - if (cp[0] == c) - return cp; - if (cp[1] == c) - return &cp[1]; - if (cp[2] == c) - return &cp[2]; - return &cp[3]; + for (i = 0; i < 6; i++) + if (cp[i] == c) + return &cp[i]; + return &cp[7]; } + + if (x == (size_t)0) + break; } + + return NULL; } diff -ruN glibc-1.06/sysdeps/alpha/reml.S glibc-1.07/sysdeps/alpha/reml.S --- glibc-1.06/sysdeps/alpha/reml.S +++ glibc-1.07/sysdeps/alpha/reml.S Thu Dec 23 01:27:56 1993 @@ -0,0 +1,57 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(reml) + ! First set up the dividend. + sextl t10, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + ! Then set up the divisor. + sextl t11, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + ! Compute the remainder. + mull t11, t12, t11 + subl t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(reml) diff -ruN glibc-1.06/sysdeps/alpha/remlu.S glibc-1.07/sysdeps/alpha/remlu.S --- glibc-1.06/sysdeps/alpha/remlu.S +++ glibc-1.07/sysdeps/alpha/remlu.S Thu Dec 23 01:27:56 1993 @@ -0,0 +1,57 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(remlu) + ! First set up the dividend. + zapnot t10, 0xf, t10 + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + ! Then set up the divisor. + zapnot t11, 0xf, t11 + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + sextl t12, t12 + + + ! Compute the remainder. + mull t11, t12, t11 + subl t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(remlu) diff -ruN glibc-1.06/sysdeps/alpha/remq.S glibc-1.07/sysdeps/alpha/remq.S --- glibc-1.06/sysdeps/alpha/remq.S +++ glibc-1.07/sysdeps/alpha/remq.S Thu Dec 23 01:27:57 1993 @@ -0,0 +1,54 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(remq) + ! First set up the dividend. + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + + + ! Then set up the divisor. + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + + + ! Compute the remainder. + mulq t11, t12, t11 + subq t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(remq) diff -ruN glibc-1.06/sysdeps/alpha/remqu.S glibc-1.07/sysdeps/alpha/remqu.S --- glibc-1.06/sysdeps/alpha/remqu.S +++ glibc-1.07/sysdeps/alpha/remqu.S Thu Dec 23 01:27:57 1993 @@ -0,0 +1,60 @@ + /* This file is generated from divrem.m4; DO NOT EDIT! */ +/* For each N divided by D, we do: + result = (double) N / (double) D + Then, for each N mod D, we do: + result = N - (D * divMODE (N, D)) + + FIXME: + The q and qu versions won't deal with operands > 50 bits. We also + don't check for divide by zero. */ + +#include "DEFS.h" +#if 0 +/* We do not handle div by zero yet. */ +#include +#endif +#include + + + + + + +FUNC__(remqu) + ! First set up the dividend. + + stq t10,0(sp) + ldt $f10,0(sp) + cvtqt $f10,$f10 + ldit $f26, 18446744073709551616.0 + addt $f26, $f10, $f26 + fcmovlt $f10, $f26, $f10 + + + ! Then set up the divisor. + + stq t11,0(sp) + ldt $f1,0(sp) + cvtqt $f1,$f1 + ldit $f26, 18446744073709551616.0 + addt $f26, $f1, $f26 + fcmovlt $f1, $f26, $f1 + + + ! Do the division. + divt $f10,$f1,$f10 + cvttqc $f10,$f10 + + ! Put the result in t12. + stt $f10,0(sp) + ldq t12,0(sp) + + + ! Compute the remainder. + mulq t11, t12, t11 + subq t10, t11, t12 + + + lda sp,16(sp) + ret zero,(t9),1 + .end NAME__(remqu) diff -ruN glibc-1.06/sysdeps/alpha/setjmp.S glibc-1.07/sysdeps/alpha/setjmp.S --- glibc-1.06/sysdeps/alpha/setjmp.S Tue Nov 24 21:32:40 1992 +++ glibc-1.07/sysdeps/alpha/setjmp.S Thu Dec 23 00:57:47 1993 @@ -26,3 +26,4 @@ bis $15, $15, $17 /* Pass FP as 2nd arg. */ bis $30, $30, $18 /* Pass SP as 3nd arg. */ jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */ + .end __setjmp diff -ruN glibc-1.06/sysdeps/alpha/strchr.c glibc-1.07/sysdeps/alpha/strchr.c --- glibc-1.06/sysdeps/alpha/strchr.c Wed Nov 25 14:02:14 1992 +++ glibc-1.07/sysdeps/alpha/strchr.c Thu Dec 23 00:57:52 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. 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 @@ -32,10 +32,10 @@ /* Handle the first few characters by reading one character at a time. Do this until STR is aligned on a 8-byte border. */ for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr) - if (*char_ptr == '\0') + if (*char_ptr == c) + return (char *) char_ptr; + else if (*char_ptr == '\0') return NULL; - else if (*char_ptr == c) - return char_ptr; longword_ptr = (unsigned long int *) char_ptr; @@ -43,6 +43,7 @@ charmask = c | (c << 8); charmask |= charmask << 16; charmask |= charmask << 32; + charmask |= charmask << 64; for (;;) { @@ -63,22 +64,16 @@ { /* Which of the bytes was the C? */ - const char *cp = (const char *) (longword_ptr - 1); + char *cp = (char *) (longword_ptr - 1); + int i; - if (cp[0] == c) - return cp; - if (cp[0] == 0) - return NULL; - if (cp[1] == c) - return &cp[1]; - if (cp[1] == 0) - return NULL; - if (cp[2] == c) - return &cp[2]; - if (cp[2] == 0) - return NULL; - if (cp[3] == c) - return &cp[3]; + for (i = 0; i < 8; i++) + { + if (cp[i] == c) + return &cp[i]; + if (cp[i] == 0) + return NULL; + } return NULL; } } diff -ruN glibc-1.06/sysdeps/alpha/strlen.c glibc-1.07/sysdeps/alpha/strlen.c --- glibc-1.06/sysdeps/alpha/strlen.c Wed Nov 25 13:54:10 1992 +++ glibc-1.07/sysdeps/alpha/strlen.c Thu Dec 23 00:57:51 1993 @@ -43,14 +43,12 @@ /* Which of the bytes was the zero? */ const char *cp = (const char *) (longword_ptr - 1); + int i; - if (cp[0] == 0) - return cp - str; - if (cp[1] == 0) - return cp - str + 1; - if (cp[2] == 0) - return cp - str + 2; - return cp - str + 3; + for (i = 0; i < 6; i++) + if (cp[i] == 0) + return cp - str + i; + return cp - str + 7; } } } diff -ruN glibc-1.06/sysdeps/alpha/udiv_qrnnd.S glibc-1.07/sysdeps/alpha/udiv_qrnnd.S --- glibc-1.06/sysdeps/alpha/udiv_qrnnd.S +++ glibc-1.07/sysdeps/alpha/udiv_qrnnd.S Sun Jan 16 00:16:38 1994 @@ -0,0 +1,59 @@ + .set noreorder + .set noat + +.text + .align 3 + .globl __udiv_qrnnd + .ent __udiv_qrnnd 0 +__udiv_qrnnd: +__udiv_qrnnd..ng: + .frame $30,0,$26,0 + .prologue 0 +#define cnt $2 +#define tmp $3 +#define rem_ptr $16 +#define n1 $17 +#define n0 $18 +#define d $19 +#define qb $20 + + ldiq cnt,16 +Loop: cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + cmplt n0,0,tmp + addq n1,n1,n1 + bis n1,tmp,n1 + addq n0,n0,n0 + cmpule d,n1,qb + subq n1,d,tmp + cmovne qb,tmp,n1 + bis n0,qb,n0 + + subq cnt,1,cnt + bgt cnt,Loop + stq n1,0(rem_ptr) + bis $31,n0,$0 + ret $31,($26),1 + .end diff -ruN glibc-1.06/sysdeps/generic/Makefile glibc-1.07/sysdeps/generic/Makefile --- glibc-1.06/sysdeps/generic/Makefile Sat May 22 23:10:32 1993 +++ glibc-1.07/sysdeps/generic/Makefile Mon May 24 17:25:14 1993 @@ -49,7 +49,7 @@ before-compile := $(before-compile) $(objpfx)siglist.c $(objpfx)siglist.c: $(objpfx)make_siglist @rm -f $@ - $< > $@-tmp + $(dir $<)$(notdir $<) > $@-tmp mv $@-tmp $@ $(objpfx)make_siglist: $(sysdep_dir)/generic/make_siglist.c diff -ruN glibc-1.06/sysdeps/generic/__stpncpy.c glibc-1.07/sysdeps/generic/__stpncpy.c --- glibc-1.06/sysdeps/generic/__stpncpy.c +++ glibc-1.07/sysdeps/generic/__stpncpy.c Thu Nov 4 02:02:22 1993 @@ -0,0 +1,87 @@ +/* Copyright (C) 1993 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 is almost copied from strncpy.c, written by Torbjorn Granlund. */ + +#include +#include +#include + + +/* Copy no more than N characters of SRC to DEST, returning the address of + the last character written into DEST. */ +char * +DEFUN(__stpncpy, (dest, src, n), char *dest AND CONST char *src AND size_t n) +{ + reg_char c; + char *s = dest; + + --dest; + + if (n >= 4) + { + size_t n4 = n >> 2; + + for (;;) + { + c = *src++; + *++dest = c; + if (c == '\0') + break; + c = *src++; + *++dest = c; + if (c == '\0') + break; + c = *src++; + *++dest = c; + if (c == '\0') + break; + c = *src++; + *++dest = c; + if (c == '\0') + break; + if (--n4 == 0) + goto last_chars; + } + n = n - (dest - s) - 1; + if (n == 0) + return dest; + goto zero_fill; + } + + last_chars: + n &= 3; + if (n == 0) + return s; + + do + { + c = *src++; + *++dest = c; + if (--n == 0) + return dest; + } + while (c != '\0'); + + zero_fill: + do + *++dest = '\0'; + while (--n > 0); + + return dest; +} diff -ruN glibc-1.06/sysdeps/generic/_strerror.c glibc-1.07/sysdeps/generic/_strerror.c --- glibc-1.06/sysdeps/generic/_strerror.c +++ glibc-1.07/sysdeps/generic/_strerror.c Thu Nov 18 05:43:03 1993 @@ -0,0 +1,43 @@ +/* Copyright (C) 19911993 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 +#include +#include + +#ifndef HAVE_GNU_LD +#define _sys_errlist sys_errlist +#define _sys_nerr sys_nerr +#endif + +/* Return a string describing the errno code in ERRNUM. */ +char * +DEFUN(_strerror_internal, (errnum, buf), int errnum AND char buf[1024]) +{ + if (errnum < 0 || errnum > _sys_nerr) + { + static char fmt[] = "Unknown error %d"; + size_t len = sprintf (buf, fmt, errnum); + if (len < sizeof(fmt) - 2) + return NULL; + buf[len - 1] = '\0'; + return buf; + } + + return (char *) _sys_errlist[errnum]; +} diff -ruN glibc-1.06/sysdeps/generic/abort.c glibc-1.07/sysdeps/generic/abort.c --- glibc-1.06/sysdeps/generic/abort.c +++ glibc-1.07/sysdeps/generic/abort.c Fri Aug 20 19:37:51 1993 @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 1993 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 +#include +#include +#include +#include +#include + +/* Cause an abnormal program termination with core-dump. */ +__NORETURN +void +DEFUN_VOID(abort) +{ + sigset_t sigs; + + if (__sigemptyset(&sigs) == 0 && + __sigaddset(&sigs, SIGABRT) == 0) + (void) __sigprocmask(SIG_UNBLOCK, &sigs, (sigset_t *) NULL); + + while (1) + if (raise (SIGABRT)) + /* If we can't signal ourselves, exit. */ + _exit (127); + /* If we signal ourselves and are still alive, + or can't exit, loop forever. */ +} diff -ruN glibc-1.06/sysdeps/generic/add_1.c glibc-1.07/sysdeps/generic/add_1.c --- glibc-1.06/sysdeps/generic/add_1.c +++ glibc-1.07/sysdeps/generic/add_1.c Sun Jan 16 00:16:02 1994 @@ -0,0 +1,37 @@ +#define __mpn_add_1 __noname +#include "gmp.h" +#undef __mpn_add_1 + +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb +__mpn_add_1 (res_ptr, s1_ptr, s1_size, s2_limb) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + register mp_size_t s1_size; + register mp_limb s2_limb; +{ + register mp_limb x; + + x = *s1_ptr++; + s2_limb = x + s2_limb; + *res_ptr++ = s2_limb; + if (s2_limb < x) + { + while (--s1_size != 0) + { + x = *s1_ptr++ + 1; + *res_ptr++ = x; + if (x != 0) + goto fin; + } + + return 1; + } + + fin: + if (res_ptr != s1_ptr) + memcpy (res_ptr, s1_ptr, (s1_size - 1) * sizeof (mp_limb)); + return 0; +} diff -ruN glibc-1.06/sysdeps/generic/add_n.c glibc-1.07/sysdeps/generic/add_n.c --- glibc-1.06/sysdeps/generic/add_n.c +++ glibc-1.07/sysdeps/generic/add_n.c Sun Jan 16 00:16:04 1994 @@ -0,0 +1,66 @@ +/* __mpn_add_n -- Add two limb vectors of equal, non-zero length. + +Copyright (C) 1992, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" + +mp_limb +#if __STDC__ +__mpn_add_n (mp_ptr res_ptr, + mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size) +#else +__mpn_add_n (res_ptr, s1_ptr, s2_ptr, size) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + register mp_srcptr s2_ptr; + mp_size_t size; +#endif +{ + register mp_limb x, y, cy; + register mp_size_t j; + + /* The loop counter and index J goes from -SIZE to -1. This way + the loop becomes faster. */ + j = -size; + + /* Offset the base pointers to compensate for the negative indices. */ + s1_ptr -= j; + s2_ptr -= j; + res_ptr -= j; + + cy = 0; + do + { + y = s2_ptr[j]; + x = s1_ptr[j]; + y += cy; /* add previous carry to one addend */ + cy = (y < cy); /* get out carry from that addition */ + y = x + y; /* add other addend */ + cy = (y < x) + cy; /* get out carry from that add, combine */ + res_ptr[j] = y; + } + while (++j != 0); + + return cy; +} diff -ruN glibc-1.06/sysdeps/generic/addmul_1.c glibc-1.07/sysdeps/generic/addmul_1.c --- glibc-1.06/sysdeps/generic/addmul_1.c +++ glibc-1.07/sysdeps/generic/addmul_1.c Sun Jan 16 00:16:05 1994 @@ -0,0 +1,68 @@ +/* __mpn_addmul_1 -- multiply the S1_SIZE long limb vector pointed to by S1_PTR + by S2_LIMB, add the S1_SIZE least significant limbs of the product to the + limb vector pointed to by RES_PTR. Return the most significant limb of + the product, adjusted for carry-out from the addition. + +Copyright (C) 1992, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb +__mpn_addmul_1 (res_ptr, s1_ptr, s1_size, s2_limb) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + mp_size_t s1_size; + register mp_limb s2_limb; +{ + register mp_limb cy_limb; + register mp_size_t j; + register mp_limb prod_high, prod_low; + register mp_limb x; + + /* The loop counter and index J goes from -SIZE to -1. This way + the loop becomes faster. */ + j = -s1_size; + + /* Offset the base pointers to compensate for the negative indices. */ + res_ptr -= j; + s1_ptr -= j; + + cy_limb = 0; + do + { + umul_ppmm (prod_high, prod_low, s1_ptr[j], s2_limb); + + prod_low += cy_limb; + cy_limb = (prod_low < cy_limb) + prod_high; + + x = res_ptr[j]; + prod_low = x + prod_low; + cy_limb += (prod_low < x); + res_ptr[j] = prod_low; + } + while (++j != 0); + + return cy_limb; +} diff -ruN glibc-1.06/sysdeps/generic/atan.c glibc-1.07/sysdeps/generic/atan.c --- glibc-1.06/sysdeps/generic/atan.c Wed Jun 12 14:21:51 1991 +++ glibc-1.07/sysdeps/generic/atan.c Sat Nov 20 22:10:17 1993 @@ -20,7 +20,7 @@ #include /* Return the inverse tangent of X. */ -double +__CONSTVALUE double DEFUN(atan, (x), register double x) { return atan2(x, 1.0); diff -ruN glibc-1.06/sysdeps/generic/cmp.c glibc-1.07/sysdeps/generic/cmp.c --- glibc-1.06/sysdeps/generic/cmp.c +++ glibc-1.07/sysdeps/generic/cmp.c Sun Jan 16 00:16:09 1994 @@ -0,0 +1,59 @@ +/* __mpn_cmp -- Compare two low-level natural-number integers. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" + +/* Compare OP1_PTR/OP1_SIZE with OP2_PTR/OP2_SIZE. + There are no restrictions on the relative sizes of + the two arguments. + Return 1 if OP1 > OP2, 0 if they are equal, and -1 if OP1 < OP2. */ + +int +#if __STDC__ +__mpn_cmp (mp_srcptr op1_ptr, mp_srcptr op2_ptr, mp_size_t size) +#else +__mpn_cmp (op1_ptr, op2_ptr, size) + mp_srcptr op1_ptr; + mp_srcptr op2_ptr; + mp_size_t size; +#endif +{ + mp_size_t i; + mp_limb op1_word, op2_word; + + for (i = size - 1; i >= 0; i--) + { + op1_word = op1_ptr[i]; + op2_word = op2_ptr[i]; + if (op1_word != op2_word) + goto diff; + } + return 0; + diff: + /* This can *not* be simplified to + op2_word - op2_word + since that expression might give signed overflow. */ + return (op1_word > op2_word) ? 1 : -1; +} diff -ruN glibc-1.06/sysdeps/generic/divmod.c glibc-1.07/sysdeps/generic/divmod.c --- glibc-1.06/sysdeps/generic/divmod.c +++ glibc-1.07/sysdeps/generic/divmod.c Sun Jan 16 00:16:11 1994 @@ -0,0 +1,236 @@ +/* __mpn_divmod -- Divide natural numbers, producing both remainder and + quotient. + +Copyright (C) 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" + +/* Divide num (NUM_PTR/NUM_SIZE) by den (DEN_PTR/DEN_SIZE) and write + the NUM_SIZE-DEN_SIZE least significant quotient limbs at QUOT_PTR + and the DEN_SIZE long remainder at NUM_PTR. + Return the most significant limb of the quotient, this is always 0 or 1. + + Argument constraints: + 1. The most significant bit of the divisor must be set. + 2. If QUOT_PTR must either not overlap with the input operands at all, + or QUOT_PTR + DEN_SIZE >= NUM_PTR must hold true. (This means that + it's possible to put the quotient in the high part of NUM, right + after the remainder in NUM. */ + +mp_limb +#if __STDC__ +__mpn_divmod (mp_ptr quot_ptr, + mp_ptr num_ptr, mp_size_t num_size, + mp_srcptr den_ptr, mp_size_t den_size) +#else +__mpn_divmod (quot_ptr, num_ptr, num_size, den_ptr, den_size) + mp_ptr quot_ptr; + mp_ptr num_ptr; + mp_size_t num_size; + mp_srcptr den_ptr; + mp_size_t den_size; +#endif +{ + mp_limb most_significant_q_limb = 0; + + switch (den_size) + { + case 0: + /* We are asked to divide by zero, so go ahead and do it! (To make + the compiler not remove this statement, return the value.) */ + return 1 / den_size; + + case 1: + { + mp_size_t i; + mp_limb n1, n0; + mp_limb d; + + d = den_ptr[0]; + n1 = num_ptr[num_size - 1]; + + if (n1 >= d) + { + most_significant_q_limb = 1; + n1 -= d; + } + + for (i = num_size - 2; i >= 0; i--) + { + n0 = num_ptr[i]; + udiv_qrnnd (quot_ptr[i], n1, n1, n0, d); + } + + num_ptr[0] = n1; + } + break; + + case 2: + { + mp_size_t i; + mp_limb n1, n0, n2; + mp_limb d1, d0; + + num_ptr += num_size - 2; + d1 = den_ptr[1]; + d0 = den_ptr[0]; + n1 = num_ptr[1]; + n0 = num_ptr[0]; + + if (n1 >= d1 && (n1 > d1 || n0 >= d0)) + { + most_significant_q_limb = 1; + sub_ddmmss (n1, n0, n1, n0, d1, d0); + } + + for (i = num_size - den_size - 1; i >= 0; i--) + { + mp_limb q; + mp_limb r; + + num_ptr--; + if (n1 == d1) + { + /* Q should be either 111..111 or 111..110. Need special + treatment of this rare case as normal division would + give overflow. */ + q = ~(mp_limb) 0; + + r = n0 + d1; + if (r < d1) /* Carry in the addition? */ + { + add_ssaaaa (n1, n0, r - d0, num_ptr[0], 0, d0); + quot_ptr[i] = q; + continue; + } + n1 = d0 - (d0 != 0); + n0 = -d0; + } + else + { + udiv_qrnnd (q, r, n1, n0, d1); + umul_ppmm (n1, n0, d0, q); + } + + n2 = num_ptr[0]; + q_test: + if (n1 > r || (n1 == r && n0 > n2)) + { + /* The estimated Q was too large. */ + q--; + + sub_ddmmss (n1, n0, n1, n0, 0, d0); + r += d1; + if (r >= d1) /* If not carry, test Q again. */ + goto q_test; + } + + quot_ptr[i] = q; + sub_ddmmss (n1, n0, r, n2, n1, n0); + } + num_ptr[1] = n1; + num_ptr[0] = n0; + } + break; + + default: + { + mp_size_t i; + mp_limb dX, d1, n0; + + num_ptr += num_size; + den_ptr += den_size; + dX = den_ptr[-1]; + d1 = den_ptr[-2]; + n0 = num_ptr[-1]; + + if (n0 >= dX) + { + if (n0 > dX + || __mpn_cmp (num_ptr - den_size, den_ptr - den_size, + den_size - 1) >= 0) + { + __mpn_sub_n (num_ptr - den_size, + num_ptr - den_size, den_ptr - den_size, + den_size); + most_significant_q_limb = 1; + } + + n0 = num_ptr[-1]; + } + + for (i = num_size - den_size - 1; i >= 0; i--) + { + mp_limb q; + mp_limb n1; + mp_limb cy_limb; + + num_ptr--; + if (n0 == dX) + /* This might over-estimate q, but it's probably not worth + the extra code here to find out. */ + q = ~(mp_limb) 0; + else + { + mp_limb r; + + udiv_qrnnd (q, r, n0, num_ptr[-1], dX); + umul_ppmm (n1, n0, d1, q); + + while (n1 > r || (n1 == r && n0 > num_ptr[-2])) + { + q--; + r += dX; + if (r < dX) /* I.e. "carry in previous addition?" */ + break; + n1 -= n0 < d1; + n0 -= d1; + } + } + + /* Possible optimization: We already have (q * n0) and (1 * n1) + after the calculation of q. Taking advantage of that, we + could make this loop make two iterations less. */ + + cy_limb = __mpn_submul_1 (num_ptr - den_size, + den_ptr - den_size, den_size, q); + + if (num_ptr[0] != cy_limb) + { + mp_limb cy; + cy = __mpn_add_n (num_ptr - den_size, + num_ptr - den_size, den_ptr - den_size, den_size); + if (cy == 0) + abort (); + q--; + } + + quot_ptr[i] = q; + n0 = num_ptr[-1]; + } + } + } + + return most_significant_q_limb; +} diff -ruN glibc-1.06/sysdeps/generic/divmod_1.c glibc-1.07/sysdeps/generic/divmod_1.c --- glibc-1.06/sysdeps/generic/divmod_1.c +++ glibc-1.07/sysdeps/generic/divmod_1.c Sun Jan 16 00:16:13 1994 @@ -0,0 +1,162 @@ +/* __mpn_divmod_1(quot_ptr, dividend_ptr, dividend_size, divisor_limb) -- + Divide (DIVIDEND_PTR,,DIVIDEND_SIZE) by DIVISOR_LIMB. + Write DIVIDEND_SIZE limbs of quotient at QUOT_PTR. + Return the single-limb remainder. + There are no constraints on the value of the divisor. + + QUOT_PTR and DIVIDEND_PTR might point to the same limb. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +#ifndef UMUL_TIME +#define UMUL_TIME 1 +#endif + +#ifndef UDIV_TIME +#define UDIV_TIME UMUL_TIME +#endif + +#if UDIV_TIME > 2 * UMUL_TIME +#undef UDIV_NEEDS_NORMALIZATION +#define UDIV_NEEDS_NORMALIZATION 1 +#endif + +mp_limb +#if __STDC__ +__mpn_divmod_1 (mp_ptr quot_ptr, + mp_srcptr dividend_ptr, mp_size_t dividend_size, + unsigned long int divisor_limb) +#else +__mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb) + mp_ptr quot_ptr; + mp_srcptr dividend_ptr; + mp_size_t dividend_size; + unsigned long int divisor_limb; +#endif +{ + mp_size_t i; + mp_limb n1, n0, r; + + /* Botch: Should this be handled at all? Rely on callers? */ + if (dividend_size == 0) + return 0; + + if (UDIV_NEEDS_NORMALIZATION) + { + int normalization_steps; + + count_leading_zeros (normalization_steps, divisor_limb); + if (normalization_steps != 0) + { + divisor_limb <<= normalization_steps; + + n1 = dividend_ptr[dividend_size - 1]; + r = n1 >> (BITS_PER_MP_LIMB - normalization_steps); + + /* Possible optimization: + if (r == 0 + && divisor_limb > ((n1 << normalization_steps) + | (dividend_ptr[dividend_size - 2] >> ...))) + ...one division less... + [Don't forget to zero most sign. quotient limb!] */ + + /* If multiplication is much faster than division, and the + dividend is large, pre-invert the divisor, and use + only multiplications in the inner loop. */ + if (UDIV_TIME > 2 * UMUL_TIME && dividend_size >= 4) + { + mp_limb divisor_limb_inverted; + int dummy; + /* Compute (2**64 - 2**32 * DIVISOR_LIMB) / DIVISOR_LIMB. + The result is an 33-bit approximation to 1/DIVISOR_LIMB, + with the most significant bit (weight 2**32) implicit. */ + + /* Special case for DIVISOR_LIMB == 100...000. */ + if (divisor_limb << 1 == 0) + divisor_limb_inverted = ~(mp_limb) 0; + else + udiv_qrnnd (divisor_limb_inverted, dummy, + -divisor_limb, 0, divisor_limb); + + for (i = dividend_size - 2; i >= 0; i--) + { + n0 = dividend_ptr[i]; + udiv_qrnnd_preinv (quot_ptr[i + 1], r, r, + ((n1 << normalization_steps) + | (n0 >> (BITS_PER_MP_LIMB - normalization_steps))), + divisor_limb, divisor_limb_inverted); + n1 = n0; + } + udiv_qrnnd_preinv (quot_ptr[0], r, r, + n1 << normalization_steps, + divisor_limb, divisor_limb_inverted); + return r >> normalization_steps; + } + else + { + for (i = dividend_size - 2; i >= 0; i--) + { + n0 = dividend_ptr[i]; + udiv_qrnnd (quot_ptr[i + 1], r, r, + ((n1 << normalization_steps) + | (n0 >> (BITS_PER_MP_LIMB - normalization_steps))), + divisor_limb); + n1 = n0; + } + udiv_qrnnd (quot_ptr[0], r, r, + n1 << normalization_steps, + divisor_limb); + return r >> normalization_steps; + } + } + } + + /* No normalization needed, either because udiv_qrnnd doesn't require + it, or because DIVISOR_LIMB is already normalized. */ + + i = dividend_size - 1; + r = dividend_ptr[i]; + + if (r >= divisor_limb) + { + r = 0; + } + else + { + /* Callers expect the quotient to be DIVIDEND_SIZE limbs. Store + a leading zero to make that expectation come true. */ + quot_ptr[i] = 0; + i--; + } + + for (; i >= 0; i--) + { + n0 = dividend_ptr[i]; + udiv_qrnnd (quot_ptr[i], r, r, n0, divisor_limb); + } + return r; +} diff -ruN glibc-1.06/sysdeps/generic/gmp-mparam.h glibc-1.07/sysdeps/generic/gmp-mparam.h --- glibc-1.06/sysdeps/generic/gmp-mparam.h +++ glibc-1.07/sysdeps/generic/gmp-mparam.h Sun Jan 16 00:16:57 1994 @@ -0,0 +1,29 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +#define BITS_PER_MP_LIMB 32 +#define BYTES_PER_MP_LIMB 4 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff -ruN glibc-1.06/sysdeps/generic/lshift.c glibc-1.07/sysdeps/generic/lshift.c --- glibc-1.06/sysdeps/generic/lshift.c +++ glibc-1.07/sysdeps/generic/lshift.c Sun Jan 16 00:16:15 1994 @@ -0,0 +1,91 @@ +/* __mpn_lshift -- Shift left low level. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" + +/* Shift U (pointed to by UP and USIZE digits long) CNT bits to the left + and store the USIZE least significant digits of the result at WP. + Return the bits shifted out from the most significant digit. + + Argument constraints: + 0. U must be normalized (i.e. it's most significant digit != 0). + 1. 0 < CNT < BITS_PER_MP_LIMB + 2. If the result is to be written over the input, WP must be >= UP. +*/ + +mp_limb +#if __STDC__ +__mpn_lshift (register mp_ptr wp, + register mp_srcptr up, mp_size_t usize, + register unsigned int cnt) +#else +__mpn_lshift (wp, up, usize, cnt) + register mp_ptr wp; + register mp_srcptr up; + mp_size_t usize; + register unsigned int cnt; +#endif +{ + register mp_limb high_limb, low_limb; + register unsigned sh_1, sh_2; + register mp_size_t i; + mp_limb retval; + +#ifdef DEBUG + if (usize == 0 || cnt == 0) + abort (); +#endif + + sh_1 = cnt; +#if 0 + if (sh_1 == 0) + { + if (wp != up) + { + /* Copy from high end to low end, to allow specified input/output + overlapping. */ + for (i = usize - 1; i >= 0; i--) + wp[i] = up[i]; + } + return 0; + } +#endif + + wp += 1; + sh_2 = BITS_PER_MP_LIMB - sh_1; + i = usize - 1; + low_limb = up[i]; + retval = low_limb >> sh_2; + high_limb = low_limb; + while (--i >= 0) + { + low_limb = up[i]; + wp[i] = (high_limb << sh_1) | (low_limb >> sh_2); + high_limb = low_limb; + } + wp[i] = high_limb << sh_1; + + return retval; +} diff -ruN glibc-1.06/sysdeps/generic/memchr.c glibc-1.07/sysdeps/generic/memchr.c --- glibc-1.06/sysdeps/generic/memchr.c Wed Jun 12 14:22:44 1991 +++ glibc-1.07/sysdeps/generic/memchr.c Thu May 27 17:05:48 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. Based on strlen implemention by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and commentary by Jim Blandy (jimb@ai.mit.edu); @@ -36,12 +36,16 @@ c = (unsigned char) c; /* Handle the first few characters by reading one character at a time. - Do this until CHAR_PTR is aligned on a 4-byte border. */ - for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 3) != 0; + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr + & (sizeof (longword) - 1)) != 0; --n, ++char_ptr) if (*char_ptr == c) return (PTR) char_ptr; + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to 8-byte longwords. */ + longword_ptr = (unsigned long int *) char_ptr; /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits @@ -53,16 +57,26 @@ The 1-bits make sure that carries propagate to the next 0-bit. The 0-bits provide holes for carries to fall into. */ - magic_bits = 0x7efefeff; + switch (sizeof (longword)) + { + case 4: magic_bits = 0x7efefeffL; break; + case 8: magic_bits = (0x7efefefeL << 32) | 0xfefefeffL; break; + default: + abort (); + } /* Set up a longword, each of whose bytes is C. */ charmask = c | (c << 8); charmask |= charmask << 16; + if (sizeof (longword) > 4) + charmask |= charmask << 32; + if (sizeof (longword) > 8) + abort (); /* Instead of the traditional loop which tests each character, we will test a longword at a time. The tricky part is testing if *any of the four* bytes in the longword in question are zero. */ - while (n >= 4) + while (n >= sizeof (longword)) { /* We tentatively exit the loop if adding MAGIC_BITS to LONGWORD fails to change any of the hole bits of LONGWORD. @@ -124,9 +138,20 @@ return (PTR) &cp[2]; if (cp[3] == c) return (PTR) &cp[3]; + if (sizeof (longword) > 4) + { + if (cp[4] == c) + return (PTR) &cp[4]; + if (cp[5] == c) + return (PTR) &cp[5]; + if (cp[6] == c) + return (PTR) &cp[6]; + if (cp[7] == c) + return (PTR) &cp[7]; + } } - n -= 4; + n -= sizeof (longword); } char_ptr = (CONST unsigned char *) longword_ptr; diff -ruN glibc-1.06/sysdeps/generic/memcmp.c glibc-1.07/sysdeps/generic/memcmp.c --- glibc-1.06/sysdeps/generic/memcmp.c Mon May 3 17:46:20 1993 +++ glibc-1.07/sysdeps/generic/memcmp.c Mon Jan 17 17:26:47 1994 @@ -39,9 +39,11 @@ #else /* Not in the GNU C library. */ +#include + /* Type to use for aligned memory operations. This should normally be the biggest type supported by a single load - and store. */ + and store. Must be an unsigned type. */ #define op_t unsigned long int #define OPSIZ (sizeof(op_t)) @@ -73,6 +75,33 @@ 3. Compare the few remaining bytes. */ +#ifndef WORDS_BIGENDIAN +/* memcmp_bytes -- Compare A and B bytewise in the byte order of the machine. + A and B are known to be different. + This is needed only on little-endian machines. */ +#ifdef __GNUC__ +__inline +#endif +static int +memcmp_bytes (a, b) + op_t a, b; +{ + long int srcp1 = (long int) &a; + long int srcp2 = (long int) &b; + op_t a0, b0; + + do + { + a0 = ((byte *) srcp1)[0]; + b0 = ((byte *) srcp2)[0]; + srcp1 += 1; + srcp2 += 1; + } + while (a0 == b0); + return a0 - b0; +} +#endif + /* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t' objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for memory operations on `op_t's. */ @@ -87,7 +116,6 @@ { op_t a0, a1; op_t b0, b1; - op_t res; switch (len % 4) { @@ -126,27 +154,42 @@ { a0 = ((op_t *) srcp1)[0]; b0 = ((op_t *) srcp2)[0]; - res = a1 - b1; - if (res != 0) - return res; + if (a1 != b1) +#ifdef WORDS_BIGENDIAN + return a1 > b1 ? 1 : -1; +#else + return memcmp_bytes (a1, b1); +#endif + do3: a1 = ((op_t *) srcp1)[1]; b1 = ((op_t *) srcp2)[1]; - res = a0 - b0; - if (res != 0) - return res; + if (a0 != b0) +#ifdef WORDS_BIGENDIAN + return a0 > b0 ? 1 : -1; +#else + return memcmp_bytes (a0, b0); +#endif + do2: a0 = ((op_t *) srcp1)[2]; b0 = ((op_t *) srcp2)[2]; - res = a1 - b1; - if (res != 0) - return res; + if (a1 != b1) +#ifdef WORDS_BIGENDIAN + return a1 > b1 ? 1 : -1; +#else + return memcmp_bytes (a1, b1); +#endif + do1: a1 = ((op_t *) srcp1)[3]; b1 = ((op_t *) srcp2)[3]; - res = a0 - b0; - if (res != 0) - return res; + if (a0 != b0) +#ifdef WORDS_BIGENDIAN + return a0 > b0 ? 1 : -1; +#else + return memcmp_bytes (a0, b0); +#endif srcp1 += 4 * OPSIZ; srcp2 += 4 * OPSIZ; @@ -157,13 +200,18 @@ /* This is the right position for do0. Please don't move it into the loop. */ do0: - return a1 - b1; + if (a1 != b1) +#ifdef WORDS_BIGENDIAN + return a1 > b1 ? 1 : -1; +#else + return memcmp_bytes (a1, b1); +#endif + return 0; } - -/* SRCP2 should be aligned for memory operations on `op_t', - but SRCP1 *should be unaligned*. */ - +/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN + `op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory + operations on `op_t', but SRCP1 *should be unaligned*. */ #ifdef __GNUC__ __inline #endif @@ -175,7 +223,6 @@ { op_t a0, a1, a2, a3; op_t b0, b1, b2, b3; - op_t res; op_t x; int shl, shr; @@ -231,30 +278,45 @@ a0 = ((op_t *) srcp1)[0]; b0 = ((op_t *) srcp2)[0]; x = MERGE(a2, shl, a3, shr); - res = x - b3; - if (res != 0) - return res; + if (x != b3) +#ifdef WORDS_BIGENDIAN + return x > b3 ? 1 : -1; +#else + return memcmp_bytes (x, b3); +#endif + do3: a1 = ((op_t *) srcp1)[1]; b1 = ((op_t *) srcp2)[1]; x = MERGE(a3, shl, a0, shr); - res = x - b0; - if (res != 0) - return res; + if (x != b0) +#ifdef WORDS_BIGENDIAN + return x > b0 ? 1 : -1; +#else + return memcmp_bytes (x, b0); +#endif + do2: a2 = ((op_t *) srcp1)[2]; b2 = ((op_t *) srcp2)[2]; x = MERGE(a0, shl, a1, shr); - res = x - b1; - if (res != 0) - return res; + if (x != b1) +#ifdef WORDS_BIGENDIAN + return x > b1 ? 1 : -1; +#else + return memcmp_bytes (x, b1); +#endif + do1: a3 = ((op_t *) srcp1)[3]; b3 = ((op_t *) srcp2)[3]; x = MERGE(a1, shl, a2, shr); - res = x - b2; - if (res != 0) - return res; + if (x != b2) +#ifdef WORDS_BIGENDIAN + return x > b2 ? 1 : -1; +#else + return memcmp_bytes (x, b2); +#endif srcp1 += 4 * OPSIZ; srcp2 += 4 * OPSIZ; @@ -266,7 +328,13 @@ it into the loop. */ do0: x = MERGE(a2, shl, a3, shr); - return x - b3; + if (x != b3) +#ifdef WORDS_BIGENDIAN + return x > b3 ? 1 : -1; +#else + return memcmp_bytes (x, b3); +#endif + return 0; } int diff -ruN glibc-1.06/sysdeps/generic/memmem.c glibc-1.07/sysdeps/generic/memmem.c --- glibc-1.06/sysdeps/generic/memmem.c Thu Sep 3 18:35:56 1992 +++ glibc-1.07/sysdeps/generic/memmem.c Mon Aug 30 20:10:37 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -23,10 +23,10 @@ /* Return the first occurrence of NEEDLE in HAYSTACK. */ PTR -DEFUN(memmem, (needle, needle_len, - haystack, haystack_len), - CONST PTRCONST needle AND CONST size_t needle_len AND - CONST PTRCONST haystack AND CONST size_t haystack_len) +DEFUN(memmem, (haystack, haystack_len, + needle, needle_len), + CONST PTRCONST haystack AND CONST size_t haystack_len AND + CONST PTRCONST needle AND CONST size_t needle_len) { register CONST char *begin; diff -ruN glibc-1.06/sysdeps/generic/mod_1.c glibc-1.07/sysdeps/generic/mod_1.c --- glibc-1.06/sysdeps/generic/mod_1.c +++ glibc-1.07/sysdeps/generic/mod_1.c Sun Jan 16 00:16:18 1994 @@ -0,0 +1,157 @@ +/* __mpn_mod_1(dividend_ptr, dividend_size, divisor_limb) -- + Divide (DIVIDEND_PTR,,DIVIDEND_SIZE) by DIVISOR_LIMB. + Return the single-limb remainder. + There are no constraints on the value of the divisor. + + QUOT_PTR and DIVIDEND_PTR might point to the same limb. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +#ifndef UMUL_TIME +#define UMUL_TIME 1 +#endif + +#ifndef UDIV_TIME +#define UDIV_TIME UMUL_TIME +#endif + +#if UDIV_TIME > 2 * UMUL_TIME +#undef UDIV_NEEDS_NORMALIZATION +#define UDIV_NEEDS_NORMALIZATION 1 +#endif + +mp_limb +#if __STDC__ +__mpn_mod_1 (mp_srcptr dividend_ptr, mp_size_t dividend_size, + unsigned long int divisor_limb) +#else +__mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb) + mp_srcptr dividend_ptr; + mp_size_t dividend_size; + unsigned long int divisor_limb; +#endif +{ + mp_size_t i; + mp_limb n1, n0, r; + int dummy; + + /* Botch: Should this be handled at all? Rely on callers? */ + if (dividend_size == 0) + return 0; + + if (UDIV_NEEDS_NORMALIZATION) + { + int normalization_steps; + + count_leading_zeros (normalization_steps, divisor_limb); + if (normalization_steps != 0) + { + divisor_limb <<= normalization_steps; + + n1 = dividend_ptr[dividend_size - 1]; + r = n1 >> (BITS_PER_MP_LIMB - normalization_steps); + + /* Possible optimization: + if (r == 0 + && divisor_limb > ((n1 << normalization_steps) + | (dividend_ptr[dividend_size - 2] >> ...))) + ...one division less... */ + + /* If multiplication is much faster than division, and the + dividend is large, pre-invert the divisor, and use + only multiplications in the inner loop. */ + if (UDIV_TIME > 2 * UMUL_TIME && dividend_size >= 4) + { + mp_limb divisor_limb_inverted; + int dummy; + /* Compute (2**64 - 2**32 * DIVISOR_LIMB) / DIVISOR_LIMB. + The result is an 33-bit approximation to 1/DIVISOR_LIMB, + with the most significant bit (with weight 2**32) + implicit. */ + + /* Special case for DIVISOR_LIMB == 100...000. */ + if (divisor_limb << 1 == 0) + divisor_limb_inverted = ~(mp_limb) 0; + else + udiv_qrnnd (divisor_limb_inverted, dummy, + -divisor_limb, 0, divisor_limb); + + for (i = dividend_size - 2; i >= 0; i--) + { + n0 = dividend_ptr[i]; + udiv_qrnnd_preinv (dummy, r, r, + ((n1 << normalization_steps) + | (n0 >> (BITS_PER_MP_LIMB - normalization_steps))), + divisor_limb, divisor_limb_inverted); + n1 = n0; + } + udiv_qrnnd_preinv (dummy, r, r, + n1 << normalization_steps, + divisor_limb, divisor_limb_inverted); + return r >> normalization_steps; + } + else + { + for (i = dividend_size - 2; i >= 0; i--) + { + n0 = dividend_ptr[i]; + udiv_qrnnd (dummy, r, r, + ((n1 << normalization_steps) + | (n0 >> (BITS_PER_MP_LIMB - normalization_steps))), + divisor_limb); + n1 = n0; + } + udiv_qrnnd (dummy, r, r, + n1 << normalization_steps, + divisor_limb); + return r >> normalization_steps; + } + } + } + + /* No normalization needed, either because udiv_qrnnd doesn't require + it, or because DIVISOR_LIMB is already normalized. */ + + i = dividend_size - 1; + r = dividend_ptr[i]; + + if (r >= divisor_limb) + { + r = 0; + } + else + { + i--; + } + + for (; i >= 0; i--) + { + n0 = dividend_ptr[i]; + udiv_qrnnd (dummy, r, r, n0, divisor_limb); + } + return r; +} diff -ruN glibc-1.06/sysdeps/generic/mul.c glibc-1.07/sysdeps/generic/mul.c --- glibc-1.06/sysdeps/generic/mul.c +++ glibc-1.07/sysdeps/generic/mul.c Sun Jan 16 00:16:19 1994 @@ -0,0 +1,152 @@ +/* __mpn_mul -- Multiply two natural numbers. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +/* Multiply the natural numbers u (pointed to by UP, with USIZE limbs) + and v (pointed to by VP, with VSIZE limbs), and store the result at + PRODP. USIZE + VSIZE limbs are always stored, but if the input + operands are normalized. Return the most significant limb of the + result. + + NOTE: The space pointed to by PRODP is overwritten before finished + with U and V, so overlap is an error. + + Argument constraints: + 1. USIZE >= VSIZE. + 2. PRODP != UP and PRODP != VP, i.e. the destination + must be distinct from the multiplier and the multiplicand. */ + +/* If KARATSUBA_THRESHOLD is not already defined, define it to a + value which is good on most machines. */ +#ifndef KARATSUBA_THRESHOLD +#define KARATSUBA_THRESHOLD 32 +#endif + +mp_limb +#if __STDC__ +__mpn_mul (mp_ptr prodp, + mp_srcptr up, mp_size_t usize, + mp_srcptr vp, mp_size_t vsize) +#else +__mpn_mul (prodp, up, usize, vp, vsize) + mp_ptr prodp; + mp_srcptr up; + mp_size_t usize; + mp_srcptr vp; + mp_size_t vsize; +#endif +{ + mp_ptr prod_endp = prodp + usize + vsize - 1; + mp_limb cy; + mp_ptr tspace; + + if (vsize < KARATSUBA_THRESHOLD) + { + /* Handle simple cases with traditional multiplication. + + This is the most critical code of the entire function. All + multiplies rely on this, both small and huge. Small ones arrive + here immediately. Huge ones arrive here as this is the base case + for Karatsuba's recursive algorithm below. */ + mp_size_t i; + mp_limb cy_limb; + mp_limb v_limb; + + if (vsize == 0) + return 0; + + /* Multiply by the first limb in V separately, as the result can be + stored (not added) to PROD. We also avoid a loop for zeroing. */ + v_limb = vp[0]; + if (v_limb <= 1) + { + if (v_limb == 1) + MPN_COPY (prodp, up, usize); + else + MPN_ZERO (prodp, usize); + cy_limb = 0; + } + else + cy_limb = __mpn_mul_1 (prodp, up, usize, v_limb); + + prodp[usize] = cy_limb; + prodp++; + + /* For each iteration in the outer loop, multiply one limb from + U with one limb from V, and add it to PROD. */ + for (i = 1; i < vsize; i++) + { + v_limb = vp[i]; + if (v_limb <= 1) + { + cy_limb = 0; + if (v_limb == 1) + cy_limb = __mpn_add_n (prodp, prodp, up, usize); + } + else + cy_limb = __mpn_addmul_1 (prodp, up, usize, v_limb); + + prodp[usize] = cy_limb; + prodp++; + } + return cy_limb; + } + + tspace = (mp_ptr) alloca (2 * vsize * BYTES_PER_MP_LIMB); + MPN_MUL_N_RECURSE (prodp, up, vp, vsize, tspace); + + prodp += vsize; + up += vsize; + usize -= vsize; + if (usize >= vsize) + { + mp_ptr tp = (mp_ptr) alloca (2 * vsize * BYTES_PER_MP_LIMB); + do + { + MPN_MUL_N_RECURSE (tp, up, vp, vsize, tspace); + cy = __mpn_add_n (prodp, prodp, tp, vsize); + __mpn_add_1 (prodp + vsize, tp + vsize, vsize, cy); + prodp += vsize; + up += vsize; + usize -= vsize; + } + while (usize >= vsize); + } + + /* True: usize < vsize. */ + + /* Make life simple: Recurse. */ + + if (usize != 0) + { + __mpn_mul (tspace, vp, vsize, up, usize); + cy = __mpn_add_n (prodp, prodp, tspace, vsize); + __mpn_add_1 (prodp + vsize, tspace + vsize, usize, cy); + } + + return *prod_endp; +} diff -ruN glibc-1.06/sysdeps/generic/mul_1.c glibc-1.07/sysdeps/generic/mul_1.c --- glibc-1.06/sysdeps/generic/mul_1.c +++ glibc-1.07/sysdeps/generic/mul_1.c Sun Jan 16 00:16:21 1994 @@ -0,0 +1,62 @@ +/* __mpn_mul_1 -- Multiply a limb vector with a single limb and + store the product in a second limb vector. + +Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb +__mpn_mul_1 (res_ptr, s1_ptr, s1_size, s2_limb) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + mp_size_t s1_size; + register mp_limb s2_limb; +{ + register mp_limb cy_limb; + register mp_size_t j; + register mp_limb prod_high, prod_low; + + /* The loop counter and index J goes from -S1_SIZE to -1. This way + the loop becomes faster. */ + j = -s1_size; + + /* Offset the base pointers to compensate for the negative indices. */ + s1_ptr -= j; + res_ptr -= j; + + cy_limb = 0; + do + { + umul_ppmm (prod_high, prod_low, s1_ptr[j], s2_limb); + + prod_low += cy_limb; + cy_limb = (prod_low < cy_limb) + prod_high; + + res_ptr[j] = prod_low; + } + while (++j != 0); + + return cy_limb; +} diff -ruN glibc-1.06/sysdeps/generic/mul_n.c glibc-1.07/sysdeps/generic/mul_n.c --- glibc-1.06/sysdeps/generic/mul_n.c +++ glibc-1.07/sysdeps/generic/mul_n.c Sun Jan 16 00:16:23 1994 @@ -0,0 +1,426 @@ +/* __mpn_mul_n -- Multiply two natural numbers of length n. + +Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +/* Multiply the natural numbers u (pointed to by UP) and v (pointed to by VP), + both with SIZE limbs, and store the result at PRODP. 2 * SIZE limbs are + always stored. Return the most significant limb. + + Argument constraints: + 1. PRODP != UP and PRODP != VP, i.e. the destination + must be distinct from the multiplier and the multiplicand. */ + +/* If KARATSUBA_THRESHOLD is not already defined, define it to a + value which is good on most machines. */ +#ifndef KARATSUBA_THRESHOLD +#define KARATSUBA_THRESHOLD 32 +#endif + +/* The code can't handle KARATSUBA_THRESHOLD smaller than 2. */ +#if KARATSUBA_THRESHOLD < 2 +#undef KARATSUBA_THRESHOLD +#define KARATSUBA_THRESHOLD 2 +#endif + +void +#if __STDC__ +___mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr); +#else +___mpn_mul_n (); +#endif + +/* Handle simple cases with traditional multiplication. + + This is the most critical code of multiplication. All multiplies rely + on this, both small and huge. Small ones arrive here immediately. Huge + ones arrive here as this is the base case for Karatsuba's recursive + algorithm below. */ + +void +#if __STDC__ +___mpn_mul_n_basecase (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size) +#else +___mpn_mul_n_basecase (prodp, up, vp, size) + mp_ptr prodp; + mp_srcptr up; + mp_srcptr vp; + mp_size_t size; +#endif +{ + mp_size_t i; + mp_limb cy_limb; + mp_limb v_limb; + + /* Multiply by the first limb in V separately, as the result can be + stored (not added) to PROD. We also avoid a loop for zeroing. */ + v_limb = vp[0]; + if (v_limb <= 1) + { + if (v_limb == 1) + MPN_COPY (prodp, up, size); + else + MPN_ZERO (prodp, size); + cy_limb = 0; + } + else + cy_limb = __mpn_mul_1 (prodp, up, size, v_limb); + + prodp[size] = cy_limb; + prodp++; + + /* For each iteration in the outer loop, multiply one limb from + U with one limb from V, and add it to PROD. */ + for (i = 1; i < size; i++) + { + v_limb = vp[i]; + if (v_limb <= 1) + { + cy_limb = 0; + if (v_limb == 1) + cy_limb = __mpn_add_n (prodp, prodp, up, size); + } + else + cy_limb = __mpn_addmul_1 (prodp, up, size, v_limb); + + prodp[size] = cy_limb; + prodp++; + } +} + +void +#if __STDC__ +___mpn_mul_n (mp_ptr prodp, + mp_srcptr up, mp_srcptr vp, mp_size_t size, mp_ptr tspace) +#else +___mpn_mul_n (prodp, up, vp, size, tspace) + mp_ptr prodp; + mp_srcptr up; + mp_srcptr vp; + mp_size_t size; + mp_ptr tspace; +#endif +{ + if ((size & 1) != 0) + { + /* The size is odd, the code code below doesn't handle that. + Multiply the least significant (size - 1) limbs with a recursive + call, and handle the most significant limb of S1 and S2 + separately. */ + /* A slightly faster way to do this would be to make the Karatsuba + code below behave as if the size were even, and let it check for + odd size in the end. I.e., in essence move this code to the end. + Doing so would save us a recursive call, and potentially make the + stack grow a lot less. */ + + mp_size_t esize = size - 1; /* even size */ + mp_limb cy_limb; + + MPN_MUL_N_RECURSE (prodp, up, vp, esize, tspace); + cy_limb = __mpn_addmul_1 (prodp + esize, up, esize, vp[esize]); + prodp[esize + esize] = cy_limb; + cy_limb = __mpn_addmul_1 (prodp + esize, vp, size, up[esize]); + + prodp[esize + size] = cy_limb; + } + else + { + /* Anatolij Alekseevich Karatsuba's divide-and-conquer algorithm. + + Split U in two pieces, U1 and U0, such that + U = U0 + U1*(B**n), + and V in V1 and V0, such that + V = V0 + V1*(B**n). + + UV is then computed recursively using the identity + + 2n n n n + UV = (B + B )U V + B (U -U )(V -V ) + (B + 1)U V + 1 1 1 0 0 1 0 0 + + Where B = 2**BITS_PER_MP_LIMB. */ + + mp_size_t hsize = size >> 1; + mp_limb cy; + int negflg; + + /*** Product H. ________________ ________________ + |_____U1 x V1____||____U0 x V0_____| */ + /* Put result in upper part of PROD and pass low part of TSPACE + as new TSPACE. */ + MPN_MUL_N_RECURSE (prodp + size, up + hsize, vp + hsize, hsize, tspace); + + /*** Product M. ________________ + |_(U1-U0)(V0-V1)_| */ + if (__mpn_cmp (up + hsize, up, hsize) >= 0) + { + __mpn_sub_n (prodp, up + hsize, up, hsize); + negflg = 0; + } + else + { + __mpn_sub_n (prodp, up, up + hsize, hsize); + negflg = 1; + } + if (__mpn_cmp (vp + hsize, vp, hsize) >= 0) + { + __mpn_sub_n (prodp + hsize, vp + hsize, vp, hsize); + negflg ^= 1; + } + else + { + __mpn_sub_n (prodp + hsize, vp, vp + hsize, hsize); + /* No change of NEGFLG. */ + } + /* Read temporary operands from low part of PROD. + Put result in low part of TSPACE using upper part of TSPACE + as new TSPACE. */ + MPN_MUL_N_RECURSE (tspace, prodp, prodp + hsize, hsize, tspace + size); + + /*** Add/copy product H. */ + MPN_COPY (prodp + hsize, prodp + size, hsize); + cy = __mpn_add_n (prodp + size, prodp + size, prodp + size + hsize, hsize); + + /*** Add product M (if NEGFLG M is a negative number). */ + if (negflg) + cy -= __mpn_sub_n (prodp + hsize, prodp + hsize, tspace, size); + else + cy += __mpn_add_n (prodp + hsize, prodp + hsize, tspace, size); + + /*** Product L. ________________ ________________ + |________________||____U0 x V0_____| */ + /* Read temporary operands from low part of PROD. + Put result in low part of TSPACE using upper part of TSPACE + as new TSPACE. */ + MPN_MUL_N_RECURSE (tspace, up, vp, hsize, tspace + size); + + /*** Add/copy Product L (twice). */ + + cy += __mpn_add_n (prodp + hsize, prodp + hsize, tspace, size); + if (cy) + { + if (cy > 0) + __mpn_add_1 (prodp + hsize + size, prodp + hsize + size, hsize, cy); + else + { + __mpn_sub_1 (prodp + hsize + size, prodp + hsize + size, hsize, cy); + abort (); + } + } + + MPN_COPY (prodp, tspace, hsize); + cy = __mpn_add_n (prodp + hsize, prodp + hsize, tspace + hsize, hsize); + if (cy) + __mpn_add_1 (prodp + size, prodp + size, size, 1); + } +} + +void +#if __STDC__ +___mpn_sqr_n_basecase (mp_ptr prodp, mp_srcptr up, mp_size_t size) +#else +___mpn_sqr_n_basecase (prodp, up, size) + mp_ptr prodp; + mp_srcptr up; + mp_size_t size; +#endif +{ + mp_size_t i; + mp_limb cy_limb; + mp_limb v_limb; + + /* Multiply by the first limb in V separately, as the result can be + stored (not added) to PROD. We also avoid a loop for zeroing. */ + v_limb = up[0]; + if (v_limb <= 1) + { + if (v_limb == 1) + MPN_COPY (prodp, up, size); + else + MPN_ZERO (prodp, size); + cy_limb = 0; + } + else + cy_limb = __mpn_mul_1 (prodp, up, size, v_limb); + + prodp[size] = cy_limb; + prodp++; + + /* For each iteration in the outer loop, multiply one limb from + U with one limb from V, and add it to PROD. */ + for (i = 1; i < size; i++) + { + v_limb = up[i]; + if (v_limb <= 1) + { + cy_limb = 0; + if (v_limb == 1) + cy_limb = __mpn_add_n (prodp, prodp, up, size); + } + else + cy_limb = __mpn_addmul_1 (prodp, up, size, v_limb); + + prodp[size] = cy_limb; + prodp++; + } +} + +void +#if __STDC__ +___mpn_sqr_n (mp_ptr prodp, + mp_srcptr up, mp_size_t size, mp_ptr tspace) +#else +___mpn_sqr_n (prodp, up, size, tspace) + mp_ptr prodp; + mp_srcptr up; + mp_size_t size; + mp_ptr tspace; +#endif +{ + if ((size & 1) != 0) + { + /* The size is odd, the code code below doesn't handle that. + Multiply the least significant (size - 1) limbs with a recursive + call, and handle the most significant limb of S1 and S2 + separately. */ + /* A slightly faster way to do this would be to make the Karatsuba + code below behave as if the size were even, and let it check for + odd size in the end. I.e., in essence move this code to the end. + Doing so would save us a recursive call, and potentially make the + stack grow a lot less. */ + + mp_size_t esize = size - 1; /* even size */ + mp_limb cy_limb; + + MPN_SQR_N_RECURSE (prodp, up, esize, tspace); + cy_limb = __mpn_addmul_1 (prodp + esize, up, esize, up[esize]); + prodp[esize + esize] = cy_limb; + cy_limb = __mpn_addmul_1 (prodp + esize, up, size, up[esize]); + + prodp[esize + size] = cy_limb; + } + else + { + mp_size_t hsize = size >> 1; + mp_limb cy; + int negflg; + + /*** Product H. ________________ ________________ + |_____U1 x U1____||____U0 x U0_____| */ + /* Put result in upper part of PROD and pass low part of TSPACE + as new TSPACE. */ + MPN_SQR_N_RECURSE (prodp + size, up + hsize, hsize, tspace); + + /*** Product M. ________________ + |_(U1-U0)(U0-U1)_| */ + if (__mpn_cmp (up + hsize, up, hsize) >= 0) + { + __mpn_sub_n (prodp, up + hsize, up, hsize); + } + else + { + __mpn_sub_n (prodp, up, up + hsize, hsize); + } + + /* Read temporary operands from low part of PROD. + Put result in low part of TSPACE using upper part of TSPACE + as new TSPACE. */ + MPN_SQR_N_RECURSE (tspace, prodp, hsize, tspace + size); + + /*** Add/copy product H. */ + MPN_COPY (prodp + hsize, prodp + size, hsize); + cy = __mpn_add_n (prodp + size, prodp + size, prodp + size + hsize, hsize); + + /*** Add product M (if NEGFLG M is a negative number). */ + cy -= __mpn_sub_n (prodp + hsize, prodp + hsize, tspace, size); + + /*** Product L. ________________ ________________ + |________________||____U0 x U0_____| */ + /* Read temporary operands from low part of PROD. + Put result in low part of TSPACE using upper part of TSPACE + as new TSPACE. */ + MPN_SQR_N_RECURSE (tspace, up, hsize, tspace + size); + + /*** Add/copy Product L (twice). */ + + cy += __mpn_add_n (prodp + hsize, prodp + hsize, tspace, size); + if (cy) + { + if (cy > 0) + __mpn_add_1 (prodp + hsize + size, prodp + hsize + size, hsize, cy); + else + { + __mpn_sub_1 (prodp + hsize + size, prodp + hsize + size, hsize, cy); + abort (); + } + } + + MPN_COPY (prodp, tspace, hsize); + cy = __mpn_add_n (prodp + hsize, prodp + hsize, tspace + hsize, hsize); + if (cy) + __mpn_add_1 (prodp + size, prodp + size, size, 1); + } +} + +/* This should be made into an inline function in gmp.h. */ +inline void +#if __STDC__ +__mpn_mul_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size) +#else +__mpn_mul_n (prodp, up, vp, size) + mp_ptr prodp; + mp_srcptr up; + mp_srcptr vp; + mp_size_t size; +#endif +{ + if (up == vp) + { + if (size < KARATSUBA_THRESHOLD) + { + ___mpn_sqr_n_basecase (prodp, up, size); + } + else + { + mp_ptr tspace; + tspace = (mp_ptr) alloca (2 * size * BYTES_PER_MP_LIMB); + ___mpn_sqr_n (prodp, up, size, tspace); + } + } + else + { + if (size < KARATSUBA_THRESHOLD) + { + ___mpn_mul_n_basecase (prodp, up, vp, size); + } + else + { + mp_ptr tspace; + tspace = (mp_ptr) alloca (2 * size * BYTES_PER_MP_LIMB); + ___mpn_mul_n (prodp, up, vp, size, tspace); + } + } +} diff -ruN glibc-1.06/sysdeps/generic/printf_fp.c glibc-1.07/sysdeps/generic/printf_fp.c --- glibc-1.06/sysdeps/generic/printf_fp.c Thu Apr 22 19:13:14 1993 +++ glibc-1.07/sysdeps/generic/printf_fp.c @@ -1,491 +0,0 @@ -/* Floating-point printing for `printf'. - This is an implementation of a restricted form of the `Dragon4' - algorithm described in "How to Print Floating-Point Numbers Accurately", - by Guy L. Steele, Jr. and Jon L. White, presented at the ACM SIGPLAN '90 - Conference on Programming Language Design and Implementation. - -Copyright (C) 1992, 1993 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 -#include -#include -#include -#include -#include -#include -#include - -#include - -#define outchar(x) \ - do \ - { \ - register CONST int outc = (x); \ - if (putc (outc, s) == EOF) \ - return -1; \ - else \ - ++done; \ - } while (0) - -#if FLT_RADIX != 2 - -double -frexp (double f, int *e) -{ - #error "Don't know how to extract fraction and exponent from `double'." -} - -#undef ldexp -#ifdef __GNUC__ -inline -#endif -static double -ldexp (double f, int e) -{ - while (e > 0) - { - f *= FLT_RADIX; - --e; - } - while (e < 0) - { - f /= FLT_RADIX; - ++e; - } -} - -#endif - - -int -DEFUN(__printf_fp, (s, info, args), - FILE *s AND CONST struct printf_info *info AND va_list *args) -{ - int done = 0; - - /* Decimal point character. */ - CONST char *CONST decimal = _numeric_info->decimal_point; - - LONG_DOUBLE fpnum; /* Input. */ - int is_neg; - - LONG_DOUBLE f; /* Fraction. */ - - int e; /* Base-2 exponent of the input. */ - CONST int p = DBL_MANT_DIG; /* Internal precision. */ - LONG_DOUBLE scale, scale10; /* Scale factor. */ - LONG_DOUBLE loerr, hierr; /* Potential error in the fraction. */ - int k; /* Digits to the left of the decimal point. */ - int cutoff; /* Where to stop generating digits. */ - LONG_DOUBLE r, r2, r10; /* Remainder. */ - int roundup; - int low, high; - char digit; - - int j; - - char type = tolower (info->spec); - int prec = info->prec; - int width = info->width; - - /* This algorithm has the nice property of not needing a buffer. - However, to get the padding right for %g format, we need to know - the length of the number before printing it. */ - -#ifndef LDBL_DIG -#define LDBL_DIG DBL_DIG -#endif -#ifndef LDBL_MAX_10_EXP -#define LDBL_MAX_10_EXP DBL_MAX_10_EXP -#endif - - char *buf = __alloca ((prec > LDBL_DIG ? prec : LDBL_DIG) + - LDBL_MAX_10_EXP + 3); /* Dot, e, exp. sign. */ - register char *bp = buf; -#define put(c) *bp++ = (c) - - /* Fetch the argument value. */ - if (info->is_long_double) - fpnum = va_arg (*args, LONG_DOUBLE); - else - fpnum = (LONG_DOUBLE) va_arg (*args, double); - -#ifdef HANDLE_SPECIAL - /* Allow for machine-dependent (or floating point format-dependent) code. */ - HANDLE_SPECIAL (done, s, info, fpnum); -#endif - -#ifndef IS_NEGATIVE -#define IS_NEGATIVE(num) ((num) < 0) -#endif - - is_neg = IS_NEGATIVE (fpnum); - if (is_neg) - fpnum = - fpnum; - - if (prec == -1) - prec = 6; - - if (type == 'g') - { - if (prec == 0) - prec = 1; - - if (fpnum != 0) - { - if (fpnum < 1e-4) - type = 'e'; - else - { - /* Is (int) floor (log10 (FPNUM)) >= PREC? */ - j = prec; - if (j > p) - j = p; - f = 10; - while (--j > 0) - { - f *= 10; - if (fpnum < f) - /* log10 (F) == floor (log10 (FPNUM)) + 1 - log10 (FPNUM) == Number of iterations minus one. */ - break; - } - if (j <= 0) - /* We got all the way through the loop and F (i.e., 10**J) - never reached FPNUM, so we want to use %e format. */ - type = 'e'; - } - } - - /* For 'g'/'G' format, the precision specifies "significant digits", - not digits to come after the decimal point. */ - --prec; - } - - if (fpnum == 0) - /* Special case for zero. - The general algorithm does not work for zero. */ - { - put ('0'); - if (tolower (info->spec) != 'g' || info->alt) - { - if (prec > 0 || info->alt) - put (*decimal); - while (prec-- > 0) - put ('0'); - } - if (type == 'e') - { - put (info->spec); - put ('+'); - put ('0'); - put ('0'); - } - } - else - { - /* Split the number into a fraction and base-2 exponent. */ - f = frexp (fpnum, &e); - - /* Scale the fractional part by the highest possible number of - significant bits of fraction. We want to represent the - fractional part as a (very) large integer. */ - f = ldexp (f, p); - - cutoff = -prec; - - roundup = 0; - - if (e > p) - { - /* The exponent is bigger than the number of fractional digits. */ - r = ldexp (f, e - p); - scale = 1; - /* The number is (E - P) factors of two larger than - the fraction can represent; this is the potential error. */ - loerr = ldexp (1.0, e - p); - } - else - { - /* The number of fractional digits is greater than the exponent. - Scale by the difference factors of two. */ - r = f; - scale = ldexp (1.0, p - e); - loerr = 1.0; - } - hierr = loerr; - - /* Fixup. */ - - if (f == ldexp (1.0, p - 1)) - { - /* Account for unequal gaps. */ - hierr = ldexp (hierr, 1); - r = ldexp (r, 1); - scale = ldexp (scale, 1); - } - - scale10 = ceil (scale / 10.0); - k = 0; - while (r < scale10) - { - --k; - r *= 10; - loerr *= 10; - hierr *= 10; - } - do - { - r2 = 2 * r; - - while (r2 + hierr >= 2 * scale) - { - scale *= 10; - ++k; - } - - /* Perform any necessary adjustment of loerr and hierr to - take into account the formatting requirements. */ - - if (type == 'e') - cutoff += k - 1; /* CutOffMode == "relative". */ - /* Otherwise CutOffMode == "absolute". */ - - { /* CutOffAdjust. */ - int a = cutoff - k; - double y = scale; - while (a > 0) - { - y *= 10; - --a; - } - while (a < 0) - { - y = ceil (y / 10); - ++a; - } - /* y == ceil (scale * pow (10.0, (double) (cutoff - k))) */ - if (y > loerr) - loerr = y; - if (y > hierr) - { - hierr = y; - roundup = 1; - } - } /* End CutOffAdjust. */ - } while (r2 + hierr >= 2 * scale); - - /* End Fixup. */ - - /* First digit. */ - --k; - r10 = r * 10; - digit = '0' + (unsigned int) floor (r10 / scale); - r = fmod (r10, scale); - loerr *= 10; - hierr *= 10; - - low = 2 * r < loerr; - if (roundup) - high = 2 * r >= (2 * scale) - hierr; - else - high = 2 * r > (2 * scale) - hierr; - - if (low || high || k == cutoff) - { - if ((high && !low) || (2 * r > scale)) - ++digit; - } - - if (type == 'e') - { - /* Exponential notation. */ - - int expt = k; /* Base-10 exponent. */ - int expt_neg; - - expt_neg = k < 0; - if (expt_neg) - expt = - expt; - - /* Find the magnitude of the exponent. */ - j = 10; - while (j <= expt) - j *= 10; - - /* Write the first digit. */ - put (digit); - - if (low || high || k == cutoff) - { - if ((tolower (info->spec) != 'g' && prec > 0) || info->alt) - put (*decimal); - } - else - { - put (*decimal); - - /* Remaining digits. */ - while (1) - { - --k; - r10 = r * 10; - digit = '0' + (unsigned int) floor (r10 / scale); - r = fmod (r10, scale); - loerr *= 10; - hierr *= 10; - - low = 2 * r < loerr; - if (roundup) - high = 2 * r >= (2 * scale) - hierr; - else - high = 2 * r > (2 * scale) - hierr; - - if (low || high || k == cutoff) - { - if ((high && !low) || (2 * r > scale)) - ++digit; - put (digit); - break; - } - - put (digit); - } - } - - if (tolower (info->spec) != 'g' || info->alt) - /* Pad with zeros. */ - while (--k >= cutoff) - put ('0'); - - /* Write the exponent. */ - put (isupper (info->spec) ? 'E' : 'e'); - put (expt_neg ? '-' : '+'); - if (expt < 10) - /* Exponent always has at least two digits. */ - put ('0'); - do - { - j /= 10; - put ('0' + (expt / j)); - expt %= j; - } - while (j > 1); - } - else - { - /* Decimal fraction notation. */ - - if (k < 0) - { - put ('0'); - if (prec > 0 || info->alt) - put (*decimal); - - /* Write leading fractional zeros. */ - j = 0; - while (--j > k) - put ('0'); - } - - if (low || high || k == cutoff) - put (digit); - else - while (1) - { - put (digit); - - --k; - r10 = r * 10; - digit = '0' + (unsigned int) floor (r10 / scale); - r = fmod (r10, scale); - loerr *= 10; - hierr *= 10; - - low = 2 * r < loerr; - if (roundup) - high = 2 * r >= (2 * scale) - hierr; - else - high = 2 * r > (2 * scale) - hierr; - - if (k == -1) - put (*decimal); - - if (low || high || k == cutoff) - { - if ((high && !low) || (2 * r > scale)) - ++digit; - put (digit); - break; - } - } - while (k > 0) - { - put ('0'); - --k; - } - if ((type != 'g' && prec > 0) || info->alt) - { - if (k == 0) - put (*decimal); - while (k-- > -prec) - put ('0'); - } - } - } - -#undef put - - /* The number is all converted in BUF. - Now write it with sign and appropriate padding. */ - - if (is_neg || info->showsign || info->space) - --width; - - width -= bp - buf; - - if (!info->left && info->pad == ' ') - /* Pad with spaces on the left. */ - while (width-- > 0) - outchar (' '); - - /* Write the sign. */ - if (is_neg) - outchar ('-'); - else if (info->showsign) - outchar ('+'); - else if (info->space) - outchar (' '); - - if (!info->left && info->pad == '0') - /* Pad with zeros on the left. */ - while (width-- > 0) - outchar ('0'); - - if (fwrite (buf, bp - buf, 1, s) != 1) - return -1; - done += bp - buf; - - if (info->left) - /* Pad with spaces on the right. */ - while (width-- > 0) - outchar (' '); - - return done; -} diff -ruN glibc-1.06/sysdeps/generic/rshift.c glibc-1.07/sysdeps/generic/rshift.c --- glibc-1.06/sysdeps/generic/rshift.c +++ glibc-1.07/sysdeps/generic/rshift.c Sun Jan 16 00:16:16 1994 @@ -0,0 +1,92 @@ +/* __mpn_rshift -- Shift right a low-level natural-number integer. + +Copyright (C) 1991, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" + +/* Shift U (pointed to by UP and USIZE limbs long) CNT bits to the right + and store the USIZE least significant limbs of the result at WP. + The bits shifted out to the right are returned. + + Argument constraints: + 1. 0 < CNT < BITS_PER_MP_LIMB + 2. If the result is to be written over the input, WP must be <= UP. +*/ + +mp_limb +#if __STDC__ +__mpn_rshift (register mp_ptr wp, + register mp_srcptr up, mp_size_t usize, + register unsigned int cnt) +#else +__mpn_rshift (wp, up, usize, cnt) + register mp_ptr wp; + register mp_srcptr up; + mp_size_t usize; + register unsigned int cnt; +#endif +{ + register mp_limb high_limb, low_limb; + register unsigned sh_1, sh_2; + register mp_size_t i; + mp_limb retval; + +#ifdef DEBUG + if (usize == 0 || cnt == 0) + abort (); +#endif + + sh_1 = cnt; + +#if 0 + if (sh_1 == 0) + { + if (wp != up) + { + /* Copy from low end to high end, to allow specified input/output + overlapping. */ + for (i = 0; i < usize; i++) + wp[i] = up[i]; + } + return usize; + } +#endif + + wp -= 1; + sh_2 = BITS_PER_MP_LIMB - sh_1; + high_limb = up[0]; + retval = high_limb << sh_2; + low_limb = high_limb; + + for (i = 1; i < usize; i++) + { + high_limb = up[i]; + wp[i] = (low_limb >> sh_1) | (high_limb << sh_2); + low_limb = high_limb; + } + low_limb >>= sh_1; + wp[i] = low_limb; + + return retval; +} diff -ruN glibc-1.06/sysdeps/generic/signame.c glibc-1.07/sysdeps/generic/signame.c --- glibc-1.06/sysdeps/generic/signame.c Sun Feb 21 14:53:02 1993 +++ glibc-1.07/sysdeps/generic/signame.c Mon Sep 20 16:03:20 1993 @@ -19,9 +19,16 @@ #include /* Some systems need this for . */ #include -#ifdef HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ +#include +#else #include "config.h" #endif +#endif /* Some systems do not define NSIG in . */ #ifndef NSIG @@ -45,8 +52,15 @@ static const char undoc[] = "unknown signal"; const char *sys_siglist[NSIG]; -#endif /* !HAVE_SYS_SIGLIST */ + +#else /* HAVE_SYS_SIGLIST. */ +#ifndef SYS_SIGLIST_DECLARED +extern char *sys_siglist[]; +#endif /* Not SYS_SIGLIST_DECLARED. */ + +#endif /* Not HAVE_SYS_SIGLIST. */ + /* Table of abbreviations for signals. Note: A given number can appear more than once with different abbreviations. */ typedef struct @@ -251,7 +265,7 @@ return -1; } -#ifndef HAVE_SYS_SIGLIST +#ifndef HAVE_PSIGNAL /* Print to standard error the name of SIGNAL, preceded by MESSAGE and a colon, and followed by a newline. */ diff -ruN glibc-1.06/sysdeps/generic/signame.h glibc-1.07/sysdeps/generic/signame.h --- glibc-1.06/sysdeps/generic/signame.h Fri Jan 22 14:46:32 1993 +++ glibc-1.07/sysdeps/generic/signame.h Mon Jul 26 16:20:46 1993 @@ -31,7 +31,7 @@ /* Avoid conflicts with a system header file that might define these two. */ -#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL) +#ifndef HAVE_PSIGNAL /* Print to standard error the name of SIGNAL, preceded by MESSAGE and a colon, and followed by a newline. */ void psignal (int signal, const char *message); diff -ruN glibc-1.06/sysdeps/generic/strchr.c glibc-1.07/sysdeps/generic/strchr.c --- glibc-1.06/sysdeps/generic/strchr.c Wed Jun 12 14:23:54 1991 +++ glibc-1.07/sysdeps/generic/strchr.c Mon Jun 28 02:05:21 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. Based on strlen implemention by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and bug fix and commentary by Jim Blandy (jimb@ai.mit.edu); @@ -36,15 +36,17 @@ c = (unsigned char) c; /* Handle the first few characters by reading one character at a time. - Do this until CHAR_PTR is aligned on a 4-byte border. */ - for (char_ptr = (CONST unsigned char *) s; - ((unsigned long int) char_ptr & 3) != 0; ++char_ptr) - { - if (*char_ptr == c) - return (char *) char_ptr; - else if (*char_ptr == '\0') - return NULL; - } + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = s; ((unsigned long int) char_ptr + & (sizeof (longword) - 1)) != 0; + ++char_ptr) + if (*char_ptr == c) + return (PTR) char_ptr; + else if (*char_ptr == '\0') + return NULL; + + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to 8-byte longwords. */ longword_ptr = (unsigned long int *) char_ptr; @@ -57,10 +59,21 @@ The 1-bits make sure that carries propagate to the next 0-bit. The 0-bits provide holes for carries to fall into. */ - magic_bits = 0x7efefeff; + switch (sizeof (longword)) + { + case 4: magic_bits = 0x7efefeffL; break; + case 8: magic_bits = (0x7efefefeL << 32) | 0xfefefeffL; break; + default: + abort (); + } /* Set up a longword, each of whose bytes is C. */ - charmask = (c << 24) | (c << 16) | (c << 8) | c; + charmask = c | (c << 8); + charmask |= charmask << 16; + if (sizeof (longword) > 4) + charmask |= charmask << 32; + if (sizeof (longword) > 8) + abort (); /* Instead of the traditional loop which tests each character, we will test a longword at a time. The tricky part is testing @@ -139,6 +152,25 @@ return (char *) cp; else if (*cp == '\0') return NULL; + if (sizeof (longword) > 4) + { + if (*cp == c) + return (char *) cp; + else if (*cp == '\0') + return NULL; + if (*++cp == c) + return (char *) cp; + else if (*cp == '\0') + return NULL; + if (*++cp == c) + return (char *) cp; + else if (*cp == '\0') + return NULL; + if (*++cp == c) + return (char *) cp; + else if (*cp == '\0') + return NULL; + } } } diff -ruN glibc-1.06/sysdeps/generic/strlen.c glibc-1.07/sysdeps/generic/strlen.c --- glibc-1.06/sysdeps/generic/strlen.c Mon Jan 20 22:39:54 1992 +++ glibc-1.07/sysdeps/generic/strlen.c Thu May 27 17:48:54 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. Written by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se); commentary by Jim Blandy (jimb@ai.mit.edu). @@ -33,26 +33,39 @@ unsigned long int longword, magic_bits, himagic, lomagic; /* Handle the first few characters by reading one character at a time. - Do this until STR is aligned on a 4-byte border. */ - for (char_ptr = str; ((unsigned long int) char_ptr & 3) != 0; ++char_ptr) - if (*char_ptr == 0) + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = str; ((unsigned long int) char_ptr + & (sizeof (longword) - 1)) != 0; + ++char_ptr) + if (*char_ptr == '\0') return char_ptr - str; + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to 8-byte longwords. */ + longword_ptr = (unsigned long int *) char_ptr; /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits the "holes." Note that there is a hole just to the left of each byte, with an extra at the end: - + bits: 01111110 11111110 11111110 11111111 bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD The 1-bits make sure that carries propagate to the next 0-bit. The 0-bits provide holes for carries to fall into. */ - magic_bits = 0x7efefeff; - - himagic = 0x80808080; - lomagic = 0x01010101; + magic_bits = 0x7efefeffL; + himagic = 0x80808080L; + lomagic = 0x01010101L; + if (sizeof (longword) > 4) + { + /* 64-bit version of the magic. */ + magic_bits = (0x7efefefeL << 32) | 0xfefefeffL; + himagic = (himagic << 32) | himagic; + lomagic = (lomagic << 32) | lomagic; + } + if (sizeof (longword) > 8) + abort (); /* Instead of the traditional loop which tests each character, we will test a longword at a time. The tricky part is testing @@ -120,6 +133,17 @@ return cp - str + 2; if (cp[3] == 0) return cp - str + 3; + if (sizeof (longword) > 4) + { + if (cp[4] == 0) + return cp - str + 4; + if (cp[5] == 0) + return cp - str + 5; + if (cp[6] == 0) + return cp - str + 6; + if (cp[7] == 0) + return cp - str + 7; + } } } } diff -ruN glibc-1.06/sysdeps/generic/sub_n.c glibc-1.07/sysdeps/generic/sub_n.c --- glibc-1.06/sysdeps/generic/sub_n.c +++ glibc-1.07/sysdeps/generic/sub_n.c Sun Jan 16 00:16:25 1994 @@ -0,0 +1,66 @@ +/* __mpn_sub_n -- Subtract two limb vectors of equal, non-zero length. + +Copyright (C) 1992, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" + +mp_limb +#if __STDC__ +__mpn_sub_n (mp_ptr res_ptr, + mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size) +#else +__mpn_sub_n (res_ptr, s1_ptr, s2_ptr, size) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + register mp_srcptr s2_ptr; + mp_size_t size; +#endif +{ + register mp_limb x, y, cy; + register mp_size_t j; + + /* The loop counter and index J goes from -SIZE to -1. This way + the loop becomes faster. */ + j = -size; + + /* Offset the base pointers to compensate for the negative indices. */ + s1_ptr -= j; + s2_ptr -= j; + res_ptr -= j; + + cy = 0; + do + { + y = s2_ptr[j]; + x = s1_ptr[j]; + y += cy; /* add previous carry to subtrahend */ + cy = (y < cy); /* get out carry from that addition */ + y = x - y; /* main subtract */ + cy = (y > x) + cy; /* get out carry from the subtract, combine */ + res_ptr[j] = y; + } + while (++j != 0); + + return cy; +} diff -ruN glibc-1.06/sysdeps/generic/submul_1.c glibc-1.07/sysdeps/generic/submul_1.c --- glibc-1.06/sysdeps/generic/submul_1.c +++ glibc-1.07/sysdeps/generic/submul_1.c Sun Jan 16 00:16:26 1994 @@ -0,0 +1,68 @@ +/* __mpn_submul_1 -- multiply the S1_SIZE long limb vector pointed to by S1_PTR + by S2_LIMB, subtract the S1_SIZE least significant limbs of the product + from the limb vector pointed to by RES_PTR. Return the most significant + limb of the product, adjusted for carry-out from the subtraction. + +Copyright (C) 1992, 1993 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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 "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb +__mpn_submul_1 (res_ptr, s1_ptr, s1_size, s2_limb) + register mp_ptr res_ptr; + register mp_srcptr s1_ptr; + mp_size_t s1_size; + register mp_limb s2_limb; +{ + register mp_limb cy_limb; + register mp_size_t j; + register mp_limb prod_high, prod_low; + register mp_limb x; + + /* The loop counter and index J goes from -SIZE to -1. This way + the loop becomes faster. */ + j = -s1_size; + + /* Offset the base pointers to compensate for the negative indices. */ + res_ptr -= j; + s1_ptr -= j; + + cy_limb = 0; + do + { + umul_ppmm (prod_high, prod_low, s1_ptr[j], s2_limb); + + prod_low += cy_limb; + cy_limb = (prod_low < cy_limb) + prod_high; + + x = res_ptr[j]; + prod_low = x - prod_low; + cy_limb += (prod_low > x); + res_ptr[j] = prod_low; + } + while (++j != 0); + + return cy_limb; +} diff -ruN glibc-1.06/sysdeps/generic/termbits.h glibc-1.07/sysdeps/generic/termbits.h --- glibc-1.06/sysdeps/generic/termbits.h Thu May 6 19:29:24 1993 +++ glibc-1.07/sysdeps/generic/termbits.h Mon Jul 26 18:05:32 1993 @@ -42,8 +42,8 @@ #define IGNPAR (1 << 2) /* Ignore characters with parity errors. */ #define PARMRK (1 << 3) /* Mark parity and framing errors. */ #define INPCK (1 << 4) /* Enable input parity check. */ -#define INLCR (1 << 5) /* Map NL to CR on input. */ -#define ISTRIP (1 << 6) /* Strip 8th bit off characters. */ +#define ISTRIP (1 << 5) /* Strip 8th bit off characters. */ +#define INLCR (1 << 6) /* Map NL to CR on input. */ #define IGNCR (1 << 7) /* Ignore CR. */ #define ICRNL (1 << 8) /* Map CR to NL on input. */ #define IXON (1 << 9) /* Enable start/stop output control. */ @@ -87,7 +87,7 @@ /* Local modes. */ tcflag_t c_lflag; #ifdef __USE_BSD -#define ECHOKE (1 << 0) /* Visual erase for KILL. */ + #define ECHOKE (1 << 0) /* Visual erase for KILL. */ #endif #define _ECHOE (1 << 1) /* Visual erase for ERASE. */ #define ECHOE _ECHOE diff -ruN glibc-1.06/sysdeps/i386/Makefile glibc-1.07/sysdeps/i386/Makefile --- glibc-1.06/sysdeps/i386/Makefile +++ glibc-1.07/sysdeps/i386/Makefile Sat Dec 25 02:12:24 1993 @@ -0,0 +1,3 @@ +# The mpn functions need a #define for asm syntax flavor. +# Every i386 port in use uses gas syntax (I think). +asm-CPPFLAGS := $(asm-CPPFLAGS) -DGAS_SYNTAX diff -ruN glibc-1.06/sysdeps/i386/abort.c glibc-1.07/sysdeps/i386/abort.c --- glibc-1.06/sysdeps/i386/abort.c +++ glibc-1.07/sysdeps/i386/abort.c Mon Aug 9 16:57:44 1993 @@ -0,0 +1,29 @@ +/* Copyright (C) 1993 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 +#include + +/* Cause an abnormal program termination with core-dump. */ +__NORETURN +void +DEFUN_VOID(abort) +{ + while (1) + asm ("hlt"); +} diff -ruN glibc-1.06/sysdeps/i386/add_n.S glibc-1.07/sysdeps/i386/add_n.S --- glibc-1.06/sysdeps/i386/add_n.S +++ glibc-1.07/sysdeps/i386/add_n.S Mon Jan 17 17:30:10 1994 @@ -0,0 +1,91 @@ +/* i80386 __mpn_add_n -- Add two limb vectors of the same length > 0 and store +sum in a third limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 12) + size (sp + 16) */ + +#include "sysdep.h" + +ENTRY (__mpn_add_n) + pushl %edi + pushl %esi + + movl 12(%esp),%edi /* res_ptr */ + movl 16(%esp),%esi /* s1_ptr */ + movl 20(%esp),%edx /* s2_ptr */ + movl 24(%esp),%ecx /* size */ + + movl %ecx,%eax + shrl $3,%ecx /* compute loop count for unrolled loop */ + negl %eax + andl $7,%eax /* get index where to start loop */ + jz Loop /* necessary special case for 0 */ + incl %ecx /* adjust loop count for `loop' insn */ + shll $2,%eax /* adjustment for pointers... */ + subl %eax,%edi /* ... since they are offset ... */ + subl %eax,%esi /* ... by a constant when we enter ... */ + subl %eax,%edx /* ... the loop */ + shrl $2,%eax /* restore previous value */ + leal (Loop - 3)(%eax,%eax,8),%eax /* calc start addr in loop */ + jmp *%eax /* jump into loop */ + .align 2 +Loop: movl (%esi),%eax + adcl (%edx),%eax + movl %eax,(%edi) + movl 4(%esi),%eax + adcl 4(%edx),%eax + movl %eax,4(%edi) + movl 8(%esi),%eax + adcl 8(%edx),%eax + movl %eax,8(%edi) + movl 12(%esi),%eax + adcl 12(%edx),%eax + movl %eax,12(%edi) + movl 16(%esi),%eax + adcl 16(%edx),%eax + movl %eax,16(%edi) + movl 20(%esi),%eax + adcl 20(%edx),%eax + movl %eax,20(%edi) + movl 24(%esi),%eax + adcl 24(%edx),%eax + movl %eax,24(%edi) + movl 28(%esi),%eax + adcl 28(%edx),%eax + movl %eax,28(%edi) + leal 32(%edi),%edi + leal 32(%esi),%esi + leal 32(%edx),%edx + loop Loop + + sbbl %eax,%eax + negl %eax + + popl %esi + popl %edi + ret diff -ruN glibc-1.06/sysdeps/i386/addmul_1.S glibc-1.07/sysdeps/i386/addmul_1.S --- glibc-1.06/sysdeps/i386/addmul_1.S +++ glibc-1.07/sysdeps/i386/addmul_1.S Mon Jan 17 17:30:15 1994 @@ -0,0 +1,74 @@ +/* i80386 __mpn_addmul_1 -- Multiply a limb vector with a limb and add + the result to a second limb vector. + + Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm.h" + +#define res_ptr edi +#define s1_ptr esi +#define size ecx +#define s2_limb ebp + +ENTRY (__mpn_addmul_1) + + INSN1(push,l ,R(edi)) + INSN1(push,l ,R(esi)) + INSN1(push,l ,R(ebx)) + INSN1(push,l ,R(ebp)) + + INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) + INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) + INSN2(mov,l ,R(size),MEM_DISP(esp,28)) + INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) + + INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) + INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) + INSN1(neg,l ,R(size)) + INSN2(xor,l ,R(ebx),R(ebx)) +Loop: + INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) + INSN1(mul,l ,R(s2_limb)) + INSN2(add,l ,R(eax),R(ebx)) + INSN2(adc,l ,R(edx),$0) + INSN2(add,l ,MEM_INDEX(res_ptr,size,4),R(eax)) + INSN2(adc,l ,R(edx),$0) + INSN2(mov,l ,R(ebx),R(edx)) + + INSN1(inc,l ,R(size)) + INSN1(jnz, ,Loop) + INSN2(mov,l ,R(eax),R(ebx)) + + INSN1(pop,l ,R(ebp)) + INSN1(pop,l ,R(ebx)) + INSN1(pop,l ,R(esi)) + INSN1(pop,l ,R(edi)) + ret diff -ruN glibc-1.06/sysdeps/i386/asm.h glibc-1.07/sysdeps/i386/asm.h --- glibc-1.06/sysdeps/i386/asm.h +++ glibc-1.07/sysdeps/i386/asm.h Mon Jan 17 17:30:26 1994 @@ -0,0 +1,19 @@ +#ifdef GAS_SYNTAX +#define R(r) %##r +#define MEM(base)(base) +#define MEM_DISP(base,displacement)displacement##(R(base)) +#define MEM_INDEX(base,index,size)(R(base),R(index),size) +#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src##,##dst +#endif + +#ifdef INTEL_SYNTAX +#define R(r) r +#define MEM(base)[base] +#define MEM_DISP(base,displacement)[base+(displacement)] +#define MEM_INDEX(base,index,size)[base+index*size] +#define INSN1(mnemonic,size_suffix,dst)mnemonic dst +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic dst##,##src +#endif + +#include diff -ruN glibc-1.06/sysdeps/i386/lshift.S glibc-1.07/sysdeps/i386/lshift.S --- glibc-1.06/sysdeps/i386/lshift.S +++ glibc-1.07/sysdeps/i386/lshift.S Mon Jan 17 17:30:17 1994 @@ -0,0 +1,83 @@ +/* i80386 __mpn_lshift -- + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +/* INPUT PARAMETERS + res_ptr (sp + 4) + s_ptr (sp + 8) + size (sp + 12) + cnt (sp + 16) */ + +#include "sysdep.h" + +ENTRY (__mpn_lshift) + pushl %edi + pushl %esi + pushl %ebx + + movl 16(%esp),%edi /* res_ptr */ + movl 20(%esp),%esi /* s_ptr */ + movl 24(%esp),%edx /* size */ + movl 28(%esp),%ecx /* cnt */ + + subl $4,%esi /* adjust s_ptr */ + + movl (%esi,%edx,4),%ebx /* read most significant limb */ + xorl %eax,%eax + shldl %cl,%ebx,%eax /* compute carry limb */ + decl %edx + jz Lend + pushl %eax /* push carry limb onto stack */ + testb $1,%edx + jnz L1 /* enter loop in the middle */ + movl %ebx,%eax + + .align 2,0x90 +Loop: movl (%esi,%edx,4),%ebx /* load next lower limb */ + shldl %cl,%ebx,%eax /* compute result limb */ + movl %eax,(%edi,%edx,4) /* store it */ + decl %edx +L1: movl (%esi,%edx,4),%eax + shldl %cl,%eax,%ebx + movl %ebx,(%edi,%edx,4) + decl %edx + jnz Loop + + shll %cl,%eax /* compute least significant limb */ + movl %eax,(%edi) /* store it */ + + popl %eax /* pop carry limb */ + + popl %ebx + popl %esi + popl %edi + ret + +Lend: shll %cl,%ebx /* compute least significant limb */ + movl %ebx,(%edi) /* store it */ + + popl %ebx + popl %esi + popl %edi + ret diff -ruN glibc-1.06/sysdeps/i386/memchr.c glibc-1.07/sysdeps/i386/memchr.c --- glibc-1.06/sysdeps/i386/memchr.c Fri Oct 2 18:20:07 1992 +++ glibc-1.07/sysdeps/i386/memchr.c Fri Jun 4 14:46:58 1993 @@ -1,7 +1,7 @@ /* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less than N. For Intel 80x86, x>=3. - Copyright (C) 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +31,8 @@ PTR retval; asm("cld\n" /* Search forward. */ "testl %1,%1\n" /* Clear Z flag, to handle LEN == 0. */ - "repne\n" /* Search for C in al. */ + /* Some old versions of gas need `repne' instead of `repnz'. */ + "repnz\n" /* Search for C in al. */ "scasb\n" "movl %2,%0\n" /* Set %0 to 0 (without affecting Z flag). */ "jnz done\n" /* Jump if we found nothing equal to C. */ diff -ruN glibc-1.06/sysdeps/i386/mul_1.S glibc-1.07/sysdeps/i386/mul_1.S --- glibc-1.06/sysdeps/i386/mul_1.S +++ glibc-1.07/sysdeps/i386/mul_1.S Mon Jan 17 17:30:20 1994 @@ -0,0 +1,73 @@ +/* i80386 __mpn_mul_1 -- Multiply a limb vector with a limb and store + the result in a second limb vector. + + Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm.h" + +#define res_ptr edi +#define s1_ptr esi +#define size ecx +#define s2_limb ebp + +ENTRY (__mpn_mul_1) + + INSN1(push,l ,R(edi)) + INSN1(push,l ,R(esi)) + INSN1(push,l ,R(ebx)) + INSN1(push,l ,R(ebp)) + + INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) + INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) + INSN2(mov,l ,R(size),MEM_DISP(esp,28)) + INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) + + INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) + INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) + INSN1(neg,l ,R(size)) + INSN2(xor,l ,R(ebx),R(ebx)) +Loop: + INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) + INSN1(mul,l ,R(s2_limb)) + INSN2(add,l ,R(eax),R(ebx)) + INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(eax)) + INSN2(adc,l ,R(edx),$0) + INSN2(mov,l ,R(ebx),R(edx)) + + INSN1(inc,l ,R(size)) + INSN1(jnz, ,Loop) + INSN2(mov,l ,R(eax),R(ebx)) + + INSN1(pop,l ,R(ebp)) + INSN1(pop,l ,R(ebx)) + INSN1(pop,l ,R(esi)) + INSN1(pop,l ,R(edi)) + ret diff -ruN glibc-1.06/sysdeps/i386/rshift.S glibc-1.07/sysdeps/i386/rshift.S --- glibc-1.06/sysdeps/i386/rshift.S +++ glibc-1.07/sysdeps/i386/rshift.S Mon Jan 17 17:30:19 1994 @@ -0,0 +1,85 @@ +/* i80386 __mpn_rshift -- + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +/* INPUT PARAMETERS + res_ptr (sp + 4) + s_ptr (sp + 8) + size (sp + 12) + cnt (sp + 16) */ + +#include "sysdep.h" + +ENTRY (__mpn_rshift) + pushl %edi + pushl %esi + pushl %ebx + + movl 16(%esp),%edi /* res_ptr */ + movl 20(%esp),%esi /* s_ptr */ + movl 24(%esp),%edx /* size */ + movl 28(%esp),%ecx /* cnt */ + + leal -4(%edi,%edx,4),%edi + leal (%esi,%edx,4),%esi + negl %edx + + movl (%esi,%edx,4),%ebx /* read least significant limb */ + xorl %eax,%eax + shrdl %cl,%ebx,%eax /* compute carry limb */ + incl %edx + jz Lend + pushl %eax /* push carry limb onto stack */ + testb $1,%edx + jnz L1 /* enter loop in the middle */ + movl %ebx,%eax + + .align 2,0x90 +Loop: movl (%esi,%edx,4),%ebx /* load next higher limb */ + shrdl %cl,%ebx,%eax /* compute result limb */ + movl %eax,(%edi,%edx,4) /* store it */ + incl %edx +L1: movl (%esi,%edx,4),%eax + shrdl %cl,%eax,%ebx + movl %ebx,(%edi,%edx,4) + incl %edx + jnz Loop + + shrl %cl,%eax /* compute most significant limb */ + movl %eax,(%edi) /* store it */ + + popl %eax /* pop carry limb */ + + popl %ebx + popl %esi + popl %edi + ret + +Lend: shrl %cl,%ebx /* compute most significant limb */ + movl %ebx,(%edi) /* store it */ + + popl %ebx + popl %esi + popl %edi + ret diff -ruN glibc-1.06/sysdeps/i386/strlen.c glibc-1.07/sysdeps/i386/strlen.c --- glibc-1.06/sysdeps/i386/strlen.c Wed Apr 1 01:38:39 1992 +++ glibc-1.07/sysdeps/i386/strlen.c Fri Jun 4 14:47:04 1993 @@ -1,6 +1,6 @@ /* strlen -- determine the length of a string. For Intel 80x86, x>=3. - Copyright (C) 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -27,7 +27,8 @@ int cnt; asm("cld\n" /* Search forward. */ - "repne\n" /* Look for a zero byte. */ + /* Some old versions of gas need `repne' instead of `repnz'. */ + "repnz\n" /* Look for a zero byte. */ "scasb" /* %0, %1, %3 */ : "=c" (cnt) : "D" (str), "0" (-1), "a" (0)); diff -ruN glibc-1.06/sysdeps/i386/sub_n.S glibc-1.07/sysdeps/i386/sub_n.S --- glibc-1.06/sysdeps/i386/sub_n.S +++ glibc-1.07/sysdeps/i386/sub_n.S Mon Jan 17 17:30:22 1994 @@ -0,0 +1,92 @@ +/* i80386 __mpn_sub_n -- Add two limb vectors of the same length > 0 and store +sum in a third limb vector. + +Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +/* INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 12) + size (sp + 16) */ + +#include "sysdep.h" + +ENTRY (__mpn_sub_n) + pushl %edi + pushl %esi + + movl 12(%esp),%edi /* res_ptr */ + movl 16(%esp),%esi /* s1_ptr */ + movl 20(%esp),%edx /* s2_ptr */ + movl 24(%esp),%ecx /* size */ + + movl %ecx,%eax + shrl $3,%ecx /* compute loop count for unrolled loop */ + negl %eax + andl $7,%eax /* get index where to start loop */ + jz Loop /* necessary special case for 0 */ + incl %ecx /* adjust loop count for `loop' insn */ + shll $2,%eax /* adjustment for pointers... */ + subl %eax,%edi /* ... since they are offset ... */ + subl %eax,%esi /* ... by a constant when we enter ... */ + subl %eax,%edx /* ... the loop */ + shrl $2,%eax /* restore previous value */ + leal (Loop - 3)(%eax,%eax,8),%eax /* calc start addr in loop */ + jmp *%eax /* jump into loop */ + .align 2 +Loop: movl (%esi),%eax + sbbl (%edx),%eax + movl %eax,(%edi) + movl 4(%esi),%eax + sbbl 4(%edx),%eax + movl %eax,4(%edi) + movl 8(%esi),%eax + sbbl 8(%edx),%eax + movl %eax,8(%edi) + movl 12(%esi),%eax + sbbl 12(%edx),%eax + movl %eax,12(%edi) + movl 16(%esi),%eax + sbbl 16(%edx),%eax + movl %eax,16(%edi) + movl 20(%esi),%eax + sbbl 20(%edx),%eax + movl %eax,20(%edi) + movl 24(%esi),%eax + sbbl 24(%edx),%eax + movl %eax,24(%edi) + movl 28(%esi),%eax + sbbl 28(%edx),%eax + movl %eax,28(%edi) + leal 32(%edi),%edi + leal 32(%esi),%esi + leal 32(%edx),%edx + loop Loop + + sbbl %eax,%eax + negl %eax + + popl %esi + popl %edi + ret diff -ruN glibc-1.06/sysdeps/i386/submul_1.S glibc-1.07/sysdeps/i386/submul_1.S --- glibc-1.06/sysdeps/i386/submul_1.S +++ glibc-1.07/sysdeps/i386/submul_1.S Mon Jan 17 17:30:23 1994 @@ -0,0 +1,74 @@ +/* i80386 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract + the result from a second limb vector. + + Copyright (C) 1992, 1994 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm.h" + +#define res_ptr edi +#define s1_ptr esi +#define size ecx +#define s2_limb ebp + +ENTRY (__mpn_submul_1) + + INSN1(push,l ,R(edi)) + INSN1(push,l ,R(esi)) + INSN1(push,l ,R(ebx)) + INSN1(push,l ,R(ebp)) + + INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) + INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) + INSN2(mov,l ,R(size),MEM_DISP(esp,28)) + INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) + + INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) + INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) + INSN1(neg,l ,R(size)) + INSN2(xor,l ,R(ebx),R(ebx)) +Loop: + INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) + INSN1(mul,l ,R(s2_limb)) + INSN2(add,l ,R(eax),R(ebx)) + INSN2(adc,l ,R(edx),$0) + INSN2(sub,l ,MEM_INDEX(res_ptr,size,4),R(eax)) + INSN2(adc,l ,R(edx),$0) + INSN2(mov,l ,R(ebx),R(edx)) + + INSN1(inc,l ,R(size)) + INSN1(jnz, ,Loop) + INSN2(mov,l ,R(eax),R(ebx)) + + INSN1(pop,l ,R(ebp)) + INSN1(pop,l ,R(ebx)) + INSN1(pop,l ,R(esi)) + INSN1(pop,l ,R(edi)) + ret diff -ruN glibc-1.06/sysdeps/ieee754/__copysign.c glibc-1.07/sysdeps/ieee754/__copysign.c --- glibc-1.06/sysdeps/ieee754/__copysign.c Thu Mar 5 17:43:12 1992 +++ glibc-1.07/sysdeps/ieee754/__copysign.c Sat Nov 20 22:10:17 1993 @@ -21,7 +21,7 @@ #include "ieee754.h" /* Return X with its signed changed to Y's. */ -double +__CONSTVALUE double DEFUN(__copysign, (x, y), double x AND double y) { union ieee754_double ux, uy; diff -ruN glibc-1.06/sysdeps/ieee754/__drem.c glibc-1.07/sysdeps/ieee754/__drem.c --- glibc-1.06/sysdeps/ieee754/__drem.c Mon Apr 6 02:59:19 1992 +++ glibc-1.07/sysdeps/ieee754/__drem.c Sat Nov 20 22:10:20 1993 @@ -41,7 +41,7 @@ #include "ieee754.h" /* Return the remainder of X/Y. */ -double +__CONSTVALUE double DEFUN(__drem, (x, y), double x AND double y) { diff -ruN glibc-1.06/sysdeps/ieee754/__isinf.c glibc-1.07/sysdeps/ieee754/__isinf.c --- glibc-1.06/sysdeps/ieee754/__isinf.c Thu Mar 5 17:43:08 1992 +++ glibc-1.07/sysdeps/ieee754/__isinf.c Sat Nov 20 22:10:20 1993 @@ -22,7 +22,7 @@ /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ -int +__CONSTVALUE int DEFUN(__isinf, (value), double value) { union ieee754_double u; diff -ruN glibc-1.06/sysdeps/ieee754/__isnan.c glibc-1.07/sysdeps/ieee754/__isnan.c --- glibc-1.06/sysdeps/ieee754/__isnan.c Thu Mar 5 17:36:23 1992 +++ glibc-1.07/sysdeps/ieee754/__isnan.c Thu Dec 2 17:14:35 1993 @@ -21,7 +21,7 @@ #include "ieee754.h" /* Return nonzero if VALUE is not a number. */ -int +__CONSTVALUE int DEFUN(__isnan, (value), double value) { union ieee754_double u; diff -ruN glibc-1.06/sysdeps/ieee754/__logb.c glibc-1.07/sysdeps/ieee754/__logb.c --- glibc-1.06/sysdeps/ieee754/__logb.c Mon Mar 30 19:41:06 1992 +++ glibc-1.07/sysdeps/ieee754/__logb.c Sat Nov 20 22:10:21 1993 @@ -22,7 +22,7 @@ #include "ieee754.h" /* Return the base 2 signed integral exponent of X. */ -double +__CONSTVALUE double DEFUN(__logb, (x), double x) { union ieee754_double u; diff -ruN glibc-1.06/sysdeps/ieee754/dbl2mpn.c glibc-1.07/sysdeps/ieee754/dbl2mpn.c --- glibc-1.06/sysdeps/ieee754/dbl2mpn.c +++ glibc-1.07/sysdeps/ieee754/dbl2mpn.c Sun Jan 9 20:09:34 1994 @@ -0,0 +1,75 @@ +/* Copyright (C) 1993, 1994 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 "gmp.h" +#include "gmp-impl.h" +#include "ieee754.h" +#include + +/* Convert a `double' in IEEE754 standard double-precision format to a + multi-precision integer representing the significand scaled up by its + number of bits (52 for double) and an integral power of two (MPN frexp). */ + +mp_size_t +__mpn_extract_double (mp_ptr res_ptr, mp_size_t size, + int *expt, int *is_neg, + double value) +{ + union ieee754_double u; + u.d = value; + + *is_neg = u.ieee.negative; + *expt = (int) u.ieee.exponent - 1022; + +#if BITS_PER_MP_LIMB == 32 + res_ptr[0] = u.ieee.mantissa1; /* Low-order 32 bits of fraction. */ + res_ptr[1] = u.ieee.mantissa0; /* High-order 20 bits. */ + #define N 2 + #define IMPL1 1 << 20 +#elif BITS_PER_MP_LIMB == 64 + /* Hopefully the compiler will combine the two bitfield extracts + and this composition into just the original quadword extract. */ + res_ptr[0] = (u.ieee.mantissa0 << 20) | u.ieee.mantissa1; + #define N 1 +#else + #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for" +#endif + + if (u.ieee.exponent == 0) + { + /* A biased exponent of zero is a special case. + Either it is a zero or it is a denormal number. */ + if (res_ptr[0] == 0 && res_ptr[N - 1] == 0) /* Assumes N<=2. */ + /* It's zero. Just one limb records that. */ + return 1; + + /* It is a denormal number, meaning it has no implicit leading + one bit, and its exponent is in fact the format minimum. */ + *expt = -1021; +#if N == 2 + if (res_ptr[1] == 0) + /* No point in using an extra high-order limb that is zero. */ + return 1; +#endif + } + else + /* Add the implicit leading one bit for a normalized number. */ + res_ptr[N - 1] |= 1 << (52 - ((N - 1) * BITS_PER_MP_LIMB)); + + return N; +} diff -ruN glibc-1.06/sysdeps/ieee754/ldexp.c glibc-1.07/sysdeps/ieee754/ldexp.c --- glibc-1.06/sysdeps/ieee754/ldexp.c Mon Mar 30 20:42:50 1992 +++ glibc-1.07/sysdeps/ieee754/ldexp.c Sat Nov 20 22:10:22 1993 @@ -40,7 +40,7 @@ #include #include "ieee754.h" -double +__CONSTVALUE double DEFUN(ldexp, (x, exp), double x AND int exp) { diff -ruN glibc-1.06/sysdeps/ieee754/log10.c glibc-1.07/sysdeps/ieee754/log10.c --- glibc-1.06/sysdeps/ieee754/log10.c Wed Jun 12 14:26:42 1991 +++ glibc-1.07/sysdeps/ieee754/log10.c Sat Nov 20 22:10:22 1993 @@ -21,7 +21,7 @@ #include /* Return the base-ten logarithm of X. */ -double +__CONSTVALUE double DEFUN(log10, (x), double x) { CONST double inverse_ln10 = 4.3429448190325181667e-1; /* 1 / log(10) */ diff -ruN glibc-1.06/sysdeps/ieee754/printf_fp.c glibc-1.07/sysdeps/ieee754/printf_fp.c --- glibc-1.06/sysdeps/ieee754/printf_fp.c Mon Apr 13 18:54:40 1992 +++ glibc-1.07/sysdeps/ieee754/printf_fp.c @@ -1,124 +0,0 @@ -/* Copyright (C) 1991, 1992 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 -#include -#include -#include -#include "ieee754.h" - -#define outchar(x) \ - do \ - { \ - register CONST int outc = (x); \ - if (putc (outc, s) == EOF) \ - return -1; \ - else \ - ++done; \ - } while (0) - -#ifndef HANDLE_SPECIAL - -#ifdef __GNUC__ - __inline -#endif -static int -DEFUN(special_ieee754, (s, info, fpnum), - FILE *s AND CONST struct printf_info *info AND LONG_DOUBLE fpnum) -{ - int is_neg; - CONST char *string; - - if (__isnan ((double) fpnum)) - { - string = "NaN"; - is_neg = 0; - } - else if (__isinf ((double) fpnum)) - { - string = "Inf"; - is_neg = fpnum < 0; - } - else - return 0; - - { - size_t done = 0; - int width = info->prec > info->width ? info->prec : info->width; - - if (is_neg || info->showsign || info->space) - --width; - width -= 3; - - if (!info->left) - while (width-- > 0) - outchar (' '); - - if (is_neg) - outchar ('-'); - else if (info->showsign) - outchar ('+'); - else if (info->space) - outchar (' '); - - { - register size_t len = 3; - while (len-- > 0) - outchar (*string++); - } - - if (info->left) - while (width-- > 0) - outchar (' '); - - return done; - } -} - -#define HANDLE_SPECIAL(done, s, info, fpnum) \ - { \ - int more_done = special_ieee754 (s, info, fpnum); \ - if (more_done == -1) \ - return -1; \ - else if (more_done != 0) \ - return done + more_done; \ - } - -#endif - -#ifndef IS_NEGATIVE - -#ifdef __GNUC__ -__inline -#endif -static int -DEFUN(is_neg_ieee754, (num), register LONG_DOUBLE num) -{ - union ieee754_double u; - - u.d = (double) num; - return u.ieee.negative; -} - -#define IS_NEGATIVE(num) is_neg_ieee754 (num) - -#endif - -#undef outchar - -#include <../sysdeps/generic/printf_fp.c> diff -ruN glibc-1.06/sysdeps/m68k/Makefile glibc-1.07/sysdeps/m68k/Makefile --- glibc-1.06/sysdeps/m68k/Makefile Thu Mar 25 15:17:39 1993 +++ glibc-1.07/sysdeps/m68k/Makefile Thu Dec 23 18:51:09 1993 @@ -1,11 +1,61 @@ +# Copyright (C) 1993 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 uses MIT assembler syntax. We have no convenient # way to choose a sysdep file based on MIT vs Motorola syntax. # No existing m68k ports use Motorola syntax. crypt := crypt.sun3 # Use crypt/crypt.sun3.S. - + # Disgusting magic to get `#'s into the asm code. + +# Set `as-pipe-ok' if piping input to the assembler is likely to work. +ifneq (,$(filter -pipe,$(compile.c) $(compile.S))) +# The `-pipe' switch the compiler does it, so it must work. +as-pipe-ok = yes +endif +ifdef gnu-as +# GNU as can deal with input pipes. +as-pipe-ok = yes +endif + +ifdef as-pipe-ok + define compile-command.S -$(CC) $(CPPFLAGS) -E $< \ +$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \ | sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@ endef + +else + +define compile-command.S +@-rm -f $@s +$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \ +| sed 's/(@@@Hash-Here@@@)/#/g' > $@s +$(AS) $(ASFLAGS) $@s -o $@ +-rm -f $@s +endef + +endif + +# The mpn functions need this. All existing 68k ports use MIT syntax. If +# a new port wants to use Motorola or Sony syntax, it can redefine this +# variable. +ifndef m68k-syntax-flag +m68k-syntax-flag = -DMIT_SYNTAX +endif diff -ruN glibc-1.06/sysdeps/m68k/__longjmp.c glibc-1.07/sysdeps/m68k/__longjmp.c --- glibc-1.06/sysdeps/m68k/__longjmp.c Wed Mar 11 18:09:57 1992 +++ glibc-1.07/sysdeps/m68k/__longjmp.c Sun Jun 27 23:46:02 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -47,8 +47,12 @@ asm volatile(/* Restore the data and address registers. */ "movem%.l %0, d1-d7/a0-a7\n" /* Return to setjmp's caller. */ - "jmp a0@" : - /* No outputs. */ : "g" (env[0].__dregs[0]) +#ifdef __motorola__ + "jmp (a0)" +#else + "jmp a0@" +#endif + : /* No outputs. */ : "g" (env[0].__dregs[0]) /* We don't bother with the clobbers, because this code always jumps out anyway. */ ); diff -ruN glibc-1.06/sysdeps/m68k/bytesex.h glibc-1.07/sysdeps/m68k/bytesex.h --- glibc-1.06/sysdeps/m68k/bytesex.h +++ glibc-1.07/sysdeps/m68k/bytesex.h Thu Jun 3 16:58:07 1993 @@ -0,0 +1,3 @@ +/* m68k is big-endian. */ + +#define __BYTE_ORDER __BIG_ENDIAN diff -ruN glibc-1.06/sysdeps/m68k/fpu/__math.h glibc-1.07/sysdeps/m68k/fpu/__math.h --- glibc-1.06/sysdeps/m68k/fpu/__math.h Mon Aug 10 17:27:25 1992 +++ glibc-1.07/sysdeps/m68k/fpu/__math.h Wed Nov 10 05:56:33 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -140,7 +140,7 @@ return __value - __modf_int; } -extern __inline int +extern __inline __CONSTVALUE int __m81_u(__isinf)(double __value) { /* There is no branch-condition for infinity, @@ -151,7 +151,7 @@ return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0; } -extern __inline int +extern __inline __CONSTVALUE int __m81_u(__isnan)(double __value) { char __result; diff -ruN glibc-1.06/sysdeps/m68k/fpu/printf_fp.c glibc-1.07/sysdeps/m68k/fpu/printf_fp.c --- glibc-1.06/sysdeps/m68k/fpu/printf_fp.c Fri May 1 14:37:04 1992 +++ glibc-1.07/sysdeps/m68k/fpu/printf_fp.c @@ -1,40 +0,0 @@ -/* Copyright (C) 1991 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 - -#ifdef __GNUC__ - -static __inline int -DEFUN(is_neg_68881, (num), register LONG_DOUBLE num) -{ - if (num == 0.0) - { - char negative_p; - asm("ftst%.x %1\n" - "fslt %0" : "=g" (negative_p) : "f" (num)); - return negative_p; - } - return num < 0.0; -} - -#define IS_NEGATIVE(num) is_neg_68881(num) - -#endif - -#include <../sysdeps/ieee754/printf_fp.c> diff -ruN glibc-1.06/sysdeps/m68k/m68020/add_n.S glibc-1.07/sysdeps/m68k/m68020/add_n.S --- glibc-1.06/sysdeps/m68k/m68020/add_n.S +++ glibc-1.07/sysdeps/m68k/m68020/add_n.S Sun Jan 16 00:15:42 1994 @@ -0,0 +1,80 @@ +/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store + sum in a third limb vector. + + Copyright (C) 1992 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 16) + size (sp + 12) +*/ + +#include "asm.h" + + TEXT + ALIGN + GLOBL ___mpn_add_n + +LAB(___mpn_add_n) +/* Save used registers on the stack. */ + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),a2) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,a2,MEM_DISP(sp,12)) + INSN2(move,l ,a0,MEM_DISP(sp,16)) + INSN2(move,l ,a1,MEM_DISP(sp,20)) + INSN2(move,l ,d2,MEM_DISP(sp,24)) + + INSN2(eor,w ,d2,#1) + INSN2(lsr,l ,d2,#1) + bcc L1 + INSN2(subq,l ,d2,#1) /* clears cy as side effect */ + +LAB(Loop) + INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(addx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) +LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(addx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) + + dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ + INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + INSN2(sub,l ,d2,#0x10000) + bcs L2 + INSN2(add,l ,d0,d0) /* restore cy */ + bra Loop + +LAB(L2) + INSN1(neg,l ,d0) + +/* Restore used registers from stack frame. */ + INSN2(move,l ,a2,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) + + rts diff -ruN glibc-1.06/sysdeps/m68k/m68020/addmul_1.S glibc-1.07/sysdeps/m68k/m68020/addmul_1.S --- glibc-1.06/sysdeps/m68k/m68020/addmul_1.S +++ glibc-1.07/sysdeps/m68k/m68020/addmul_1.S Sun Jan 16 00:15:44 1994 @@ -0,0 +1,84 @@ +/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add + the result to a second limb vector. + + Copyright (C) 1992 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm.h" + + TEXT + ALIGN + GLOBL ___mpn_addmul_1 + +LAB(___mpn_addmul_1) + +#define res_ptr a0 +#define s1_ptr a1 +#define size d2 +#define s2_limb d4 + +/* Save used registers on the stack. */ + INSN2(movem,l ,MEM_PREDEC(sp),d2-d5) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,res_ptr,MEM_DISP(sp,20)) + INSN2(move,l ,s1_ptr,MEM_DISP(sp,24)) + INSN2(move,l ,size,MEM_DISP(sp,28)) + INSN2(move,l ,s2_limb,MEM_DISP(sp,32)) + + INSN2(eor,w ,size,#1) + INSN1(clr,l ,d1) + INSN1(clr,l ,d5) + INSN2(lsr,l ,size,#1) + bcc L1 + INSN2(subq,l ,size,#1) + INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ + +LAB(Loop) + INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d1:d3,s2_limb) + INSN2(addx,l ,d3,d0) + INSN2(addx,l ,d1,d5) + INSN2(add,l ,MEM_POSTINC(res_ptr),d3) +LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d0:d3,s2_limb) + INSN2(addx,l ,d3,d1) + INSN2(addx,l ,d0,d5) + INSN2(add,l ,MEM_POSTINC(res_ptr),d3) + + dbf size,Loop + INSN2(addx,l ,d0,d5) + INSN2(sub,l ,size,#0x10000) + bcc Loop + +/* Restore used registers from stack frame. */ + INSN2(movem,l ,d2-d5,MEM_POSTINC(sp)) + + rts diff -ruN glibc-1.06/sysdeps/m68k/m68020/asm.h glibc-1.07/sysdeps/m68k/m68020/asm.h --- glibc-1.06/sysdeps/m68k/m68020/asm.h +++ glibc-1.07/sysdeps/m68k/m68020/asm.h Sun Jan 16 00:15:50 1994 @@ -0,0 +1,72 @@ +#ifdef MIT_SYNTAX +#define MEM(base)base##@ +#define MEM_DISP(base,displacement)base##@(displacement) +#define MEM_PREDEC(memory_base)memory_base##@- +#define MEM_POSTINC(memory_base)memory_base##@+ +#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src##,##dst +#define LAB(label) label##: +#define TEXT .text +#define ALIGN .even +#define GLOBL .globl +#endif + +#ifdef SONY_SYNTAX +#define MEM(base)(base) +#define MEM_DISP(base,displacement)(displacement,base) +#define MEM_PREDEC(memory_base)-(memory_base) +#define MEM_POSTINC(memory_base)(memory_base)+ +#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst +#define LAB(label) label: +#define TEXT .text +#define ALIGN .even +#define GLOBL .globl +#endif + +#ifdef MOTOROLA_SYNTAX +#define MEM(base)(base) +#define MEM_DISP(base,displacement)(displacement,base) +#define MEM_PREDEC(memory_base)-(memory_base) +#define MEM_POSTINC(memory_base)(memory_base)+ +#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst +#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst +#define LAB(label) label +#define TEXT +#define ALIGN +#define GLOBL XDEF +#define l L +#define w W +#define move MOVE +#define eor EOR +#define lsr LSR +#define add ADD +#define addx ADDX +#define addq ADDQ +#define sub SUB +#define subx SUBX +#define subq SUBQ +#define neg NEG +#define bcc BCC +#define bcs BCS +#define bra BRA +#define dbf DBF +#define rts RTS +#define d0 D0 +#define d1 D1 +#define d2 D2 +#define d3 D3 +#define d4 D4 +#define d5 D5 +#define d6 D6 +#define d7 D7 +#define a0 A0 +#define a1 A1 +#define a2 A2 +#define a3 A3 +#define a4 A4 +#define a5 A5 +#define a6 A6 +#define a7 A7 +#define sp SP +#endif diff -ruN glibc-1.06/sysdeps/m68k/m68020/mul_1.S glibc-1.07/sysdeps/m68k/m68020/mul_1.S --- glibc-1.06/sysdeps/m68k/m68020/mul_1.S +++ glibc-1.07/sysdeps/m68k/m68020/mul_1.S Sun Jan 16 00:15:45 1994 @@ -0,0 +1,91 @@ +/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store + the result in a second limb vector. + + Copyright (C) 1992 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm.h" + + TEXT + ALIGN + GLOBL ___mpn_mul_1 + +LAB(___mpn_mul_1) + +#define res_ptr a0 +#define s1_ptr a1 +#define size d2 +#define s2_limb d4 + +/* Save used registers on the stack. */ + INSN2(movem,l ,MEM_PREDEC(sp),d2-d4) +#if 0 + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),d3) + INSN2(move,l ,MEM_PREDEC(sp),d4) +#endif + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,res_ptr,MEM_DISP(sp,16)) + INSN2(move,l ,s1_ptr,MEM_DISP(sp,20)) + INSN2(move,l ,size,MEM_DISP(sp,24)) + INSN2(move,l ,s2_limb,MEM_DISP(sp,28)) + + INSN2(eor,w ,size,#1) + INSN1(clr,l ,d1) + INSN2(lsr,l ,size,#1) + bcc L1 + INSN2(subq,l ,size,#1) + INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ + +LAB(Loop) + INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d1:d3,s2_limb) + INSN2(addx,l ,d3,d0) + INSN2(move,l ,MEM_POSTINC(res_ptr),d3) +LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d0:d3,s2_limb) + INSN2(addx,l ,d3,d1) + INSN2(move,l ,MEM_POSTINC(res_ptr),d3) + + dbf size,Loop + INSN1(clr,l ,d3) + INSN2(addx,l ,d0,d3) + INSN2(sub,l ,size,#0x10000) + bcc Loop + +/* Restore used registers from stack frame. */ + INSN2(movem,l ,d2-d4,MEM_POSTINC(sp)) +#if 0 + INSN2(move,l ,d4,MEM_POSTINC(sp)) + INSN2(move,l ,d3,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) +#endif + rts diff -ruN glibc-1.06/sysdeps/m68k/m68020/sub_n.S glibc-1.07/sysdeps/m68k/m68020/sub_n.S --- glibc-1.06/sysdeps/m68k/m68020/sub_n.S +++ glibc-1.07/sysdeps/m68k/m68020/sub_n.S Sun Jan 16 00:15:47 1994 @@ -0,0 +1,80 @@ +/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and + store difference in a third limb vector. + + Copyright (C) 1992 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + s2_ptr (sp + 16) + size (sp + 12) +*/ + +#include "asm.h" + + TEXT + ALIGN + GLOBL ___mpn_sub_n + +LAB(___mpn_sub_n) +/* Save used registers on the stack. */ + INSN2(move,l ,MEM_PREDEC(sp),d2) + INSN2(move,l ,MEM_PREDEC(sp),a2) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,a2,MEM_DISP(sp,12)) + INSN2(move,l ,a0,MEM_DISP(sp,16)) + INSN2(move,l ,a1,MEM_DISP(sp,20)) + INSN2(move,l ,d2,MEM_DISP(sp,24)) + + INSN2(eor,w ,d2,#1) + INSN2(lsr,l ,d2,#1) + bcc L1 + INSN2(subq,l ,d2,#1) /* clears cy as side effect */ + +LAB(Loop) + INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(subx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) +LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0)) + INSN2(move,l ,d1,MEM_POSTINC(a1)) + INSN2(subx,l ,d0,d1) + INSN2(move,l ,MEM_POSTINC(a2),d0) + + dbf d2,Loop /* loop until 16 lsb of %4 == -1 */ + INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ + INSN2(sub,l ,d2,#0x10000) + bcs L2 + INSN2(add,l ,d0,d0) /* restore cy */ + bra Loop + +LAB(L2) + INSN1(neg,l ,d0) + +/* Restore used registers from stack frame. */ + INSN2(move,l ,a2,MEM_POSTINC(sp)) + INSN2(move,l ,d2,MEM_POSTINC(sp)) + + rts diff -ruN glibc-1.06/sysdeps/m68k/m68020/submul_1.S glibc-1.07/sysdeps/m68k/m68020/submul_1.S --- glibc-1.06/sysdeps/m68k/m68020/submul_1.S +++ glibc-1.07/sysdeps/m68k/m68020/submul_1.S Sun Jan 16 00:15:48 1994 @@ -0,0 +1,84 @@ +/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract + the result from a second limb vector. + + Copyright (C) 1992 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +/* + INPUT PARAMETERS + res_ptr (sp + 4) + s1_ptr (sp + 8) + size (sp + 12) + s2_limb (sp + 16) +*/ + +#include "asm.h" + + TEXT + ALIGN + GLOBL ___mpn_submul_1 + +LAB(___mpn_submul_1) + +#define res_ptr a0 +#define s1_ptr a1 +#define size d2 +#define s2_limb d4 + +/* Save used registers on the stack. */ + INSN2(movem,l ,MEM_PREDEC(sp),d2-d5) + +/* Copy the arguments to registers. Better use movem? */ + INSN2(move,l ,res_ptr,MEM_DISP(sp,20)) + INSN2(move,l ,s1_ptr,MEM_DISP(sp,24)) + INSN2(move,l ,size,MEM_DISP(sp,28)) + INSN2(move,l ,s2_limb,MEM_DISP(sp,32)) + + INSN2(eor,w ,size,#1) + INSN1(clr,l ,d1) + INSN1(clr,l ,d5) + INSN2(lsr,l ,size,#1) + bcc L1 + INSN2(subq,l ,size,#1) + INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */ + +LAB(Loop) + INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d1:d3,s2_limb) + INSN2(addx,l ,d3,d0) + INSN2(addx,l ,d1,d5) + INSN2(sub,l ,MEM_POSTINC(res_ptr),d3) +LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr)) + INSN2(mulu,l ,d0:d3,s2_limb) + INSN2(addx,l ,d3,d1) + INSN2(addx,l ,d0,d5) + INSN2(sub,l ,MEM_POSTINC(res_ptr),d3) + + dbf size,Loop + INSN2(addx,l ,d0,d5) + INSN2(sub,l ,size,#0x10000) + bcc Loop + +/* Restore used registers from stack frame. */ + INSN2(movem,l ,d2-d5,MEM_POSTINC(sp)) + + rts diff -ruN glibc-1.06/sysdeps/m88k/m88100/add_n.S glibc-1.07/sysdeps/m88k/m88100/add_n.S --- glibc-1.06/sysdeps/m88k/m88100/add_n.S +++ glibc-1.07/sysdeps/m88k/m88100/add_n.S Sun Jan 16 00:15:52 1994 @@ -0,0 +1,133 @@ +; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store +; sum in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector. + +#include "sysdep.h" + +ENTRY (__mpn_add_n) + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,4 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,4<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,64 + st r8,r2,60 + addu r4,r4,64 + ld r6,r3,0 + addu r2,r2,64 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; add 0 + 16r limbs (adjust loop counter) +Lbase: ld r8,r3,4 + addu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; add 15 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; add 14 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; add 13 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; add 12 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; add 11 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; add 10 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + ld r6,r3,32 ; add 9 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,32 + st r8,r2,28 + ld r8,r3,36 ; add 8 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,36 + st r6,r2,32 + ld r6,r3,40 ; add 7 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,40 + st r8,r2,36 + ld r8,r3,44 ; add 6 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,44 + st r6,r2,40 + ld r6,r3,48 ; add 5 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,48 + st r8,r2,44 + ld r8,r3,52 ; add 4 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,52 + st r6,r2,48 + ld r6,r3,56 ; add 3 + 16r limbs + addu.cio r8,r8,r9 + ld r7,r4,56 + st r8,r2,52 + ld r8,r3,60 ; add 2 + 16r limbs + addu.cio r6,r6,r7 + ld r9,r4,60 + st r6,r2,56 + bcnd.n ne0,r10,Loop ; add 1 + 16r limbs + addu.cio r8,r8,r9 + + st r8,r2,60 ; store most significant limb + + jmp.n r1 + addu.ci r2,r0,r0 ; return carry-out from most sign. limb diff -ruN glibc-1.06/sysdeps/m88k/m88100/mul_1.S glibc-1.07/sysdeps/m88k/m88100/mul_1.S --- glibc-1.06/sysdeps/m88k/m88100/mul_1.S +++ glibc-1.07/sysdeps/m88k/m88100/mul_1.S Sun Jan 16 00:15:54 1994 @@ -0,0 +1,127 @@ +; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + +; Common overhead is about 11 cycles/invocation. + +; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention.) + +; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The +; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.) + +; To enhance speed: +; 1. Unroll main loop 4-8 times. +; 2. Schedule code to avoid WB contention. It might be tempting to move the +; ld instruction in the loops down to save 2 cycles (less WB contention), +; but that looses because the ultimate value will be read from outside +; the allocated space. But if we handle the ultimate multiplication in +; the tail, we can do this. +; 3. Make the multiplication with less instructions. I think the code for +; (S2_LIMB >= 0x10000) is not minimal. +; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or +; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11 +; cycles/limb. (Assuming infinite unrolling.) + +#include "sysdep.h" + +ENTRY (__mpn_mul_1) + + ; Make S1_PTR and RES_PTR point at the end of their blocks + ; and negate SIZE. + lda r3,r3[r4] + lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval + subu r4,r0,r4 + + addu.co r2,r0,r0 ; r2 = cy = 0 + ld r9,r3[r4] + mask r7,r5,0xffff ; r7 = lo(S2_LIMB) + extu r8,r5,16 ; r8 = hi(S2_LIMB) + bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0) + subu r6,r6,4 + +; General code for any value of S2_LIMB. + + ; Make a stack frame and save r25 and r26 + subu r31,r31,16 + st.d r25,r31,8 + + ; Enter the loop in the middle + br.n L1 + addu r4,r4,1 + +Loop: + ld r9,r3[r4] + st r26,r6[r4] +; bcnd ne0,r0,0 ; bubble + addu r4,r4,1 +L1: mul r26,r9,r5 ; low word of product mul_1 WB ld + mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1 + mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1 + mul r10,r12,r8 ; r10 = prod_1a mul_3 + extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1 + mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1 + mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2 + extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3 + addu r10,r10,r11 ; addu_1 WB extu_2 +; bcnd ne0,r0,0 ; bubble WB addu_1 + addu.co r10,r10,r12 ; WB mul_4 + mask.u r10,r10,0xffff ; move the 16 most significant bits... + addu.ci r10,r10,r0 ; ...to the low half of the word... + rot r10,r10,16 ; ...and put carry in pos 16. + addu.co r26,r26,r2 ; add old carry limb + bcnd.n ne0,r4,Loop + addu.ci r2,r25,r10 ; compute new carry limb + + st r26,r6[r4] + ld.d r25,r31,8 + jmp.n r1 + addu r31,r31,16 + +; Fast code for S2_LIMB < 0x10000 +Lsmall: + ; Enter the loop in the middle + br.n SL1 + addu r4,r4,1 + +SLoop: + ld r9,r3[r4] ; + st r8,r6[r4] ; + addu r4,r4,1 ; +SL1: mul r8,r9,r5 ; low word of product + mask r12,r9,0xffff ; r12 = lo(s1_limb) + extu r13,r9,16 ; r13 = hi(s1_limb) + mul r11,r12,r7 ; r11 = prod_0 + mul r12,r13,r7 ; r12 = prod_1b + addu.cio r8,r8,r2 ; add old carry limb + extu r10,r11,16 ; r11 = hi(prod_0) + addu r10,r10,r12 ; + bcnd.n ne0,r4,SLoop + extu r2,r10,16 ; r2 = new carry limb + + jmp.n r1 + st r8,r6[r4] diff -ruN glibc-1.06/sysdeps/m88k/m88100/sub_n.S glibc-1.07/sysdeps/m88k/m88100/sub_n.S --- glibc-1.06/sysdeps/m88k/m88100/sub_n.S +++ glibc-1.07/sysdeps/m88k/m88100/sub_n.S Sun Jan 16 00:15:56 1994 @@ -0,0 +1,134 @@ +; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and +; store difference in a third limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; s2_ptr r4 +; size r5 + +; This code has been optimized to run one instruction per clock, avoiding +; load stalls and writeback contention. As a result, the instruction +; order is not always natural. + +; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector. + +#include "sysdep.h" + +ENTRY (__mpn_sub_n) + ld r6,r3,0 ; read first limb from s1_ptr + extu r10,r5,4 + ld r7,r4,0 ; read first limb from s2_ptr + + subu.co r5,r0,r5 ; (clear carry as side effect) + mak r5,r5,4<4> + bcnd eq0,r5,Lzero + + or r12,r0,lo16(Lbase) + or.u r12,r12,hi16(Lbase) + addu r12,r12,r5 ; r12 is address for entering in loop + + extu r5,r5,2 ; divide by 4 + subu r2,r2,r5 ; adjust res_ptr + subu r3,r3,r5 ; adjust s1_ptr + subu r4,r4,r5 ; adjust s2_ptr + + or r8,r6,r0 + + jmp.n r12 + or r9,r7,r0 + +Loop: addu r3,r3,64 + st r8,r2,60 + addu r4,r4,64 + ld r6,r3,0 + addu r2,r2,64 + ld r7,r4,0 +Lzero: subu r10,r10,1 ; subtract 0 + 16r limbs (adjust loop counter) +Lbase: ld r8,r3,4 + subu.cio r6,r6,r7 + ld r9,r4,4 + st r6,r2,0 + ld r6,r3,8 ; subtract 15 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,8 + st r8,r2,4 + ld r8,r3,12 ; subtract 14 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,12 + st r6,r2,8 + ld r6,r3,16 ; subtract 13 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,16 + st r8,r2,12 + ld r8,r3,20 ; subtract 12 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,20 + st r6,r2,16 + ld r6,r3,24 ; subtract 11 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,24 + st r8,r2,20 + ld r8,r3,28 ; subtract 10 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,28 + st r6,r2,24 + ld r6,r3,32 ; subtract 9 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,32 + st r8,r2,28 + ld r8,r3,36 ; subtract 8 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,36 + st r6,r2,32 + ld r6,r3,40 ; subtract 7 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,40 + st r8,r2,36 + ld r8,r3,44 ; subtract 6 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,44 + st r6,r2,40 + ld r6,r3,48 ; subtract 5 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,48 + st r8,r2,44 + ld r8,r3,52 ; subtract 4 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,52 + st r6,r2,48 + ld r6,r3,56 ; subtract 3 + 16r limbs + subu.cio r8,r8,r9 + ld r7,r4,56 + st r8,r2,52 + ld r8,r3,60 ; subtract 2 + 16r limbs + subu.cio r6,r6,r7 + ld r9,r4,60 + st r6,r2,56 + bcnd.n ne0,r10,Loop ; subtract 1 + 16r limbs + subu.cio r8,r8,r9 + + st r8,r2,60 ; store most significant limb + + addu.ci r2,r0,r0 ; return carry-out from most sign. limb + jmp.n r1 + xor r2,r2,1 diff -ruN glibc-1.06/sysdeps/m88k/m88110/mul_1.S glibc-1.07/sysdeps/m88k/m88110/mul_1.S --- glibc-1.06/sysdeps/m88k/m88110/mul_1.S +++ glibc-1.07/sysdeps/m88k/m88110/mul_1.S Sun Jan 16 00:15:59 1994 @@ -0,0 +1,80 @@ +; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and +; store the product in a second limb vector. + +; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +; This file is part of the GNU MP Library. + +; The GNU MP Library is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; either version 2, or (at your option) +; any later version. + +; The GNU MP 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 General Public License for more details. + +; You should have received a copy of the GNU General Public License +; along with the GNU MP Library; see the file COPYING. If not, write to +; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + +; INPUT PARAMETERS +; res_ptr r2 +; s1_ptr r3 +; size r4 +; s2_limb r5 + +#include "sysdep.h" + +ENTRY (__mpn_mul_1) + ld r6,r3,0 + sub r4,r0,r4 + sub r3,r3,r4 ; r3 is offset s1_ptr + sub r2,r2,r4 + sub r8,r2,8 ; r8 is offset res_ptr + mulu.d r10,r6,r5 + + addu r4,r4,1 + bcnd eq0,r4,Lend + addu.co r2,r0,0 ; clear cy_limb + +Loop: ld r6,r3[r4] + addu.cio r9,r11,r2 + or r2,r10,r0 ; could be avoided if unrolled + addu r4,r4,1 + mulu.d r10,r6,r5 + bcnd ne0,r4,Loop + st r9,r8[r4] + +Lend: addu.cio r9,r11,r2 + st r9,r8,4 + jmp.n r1 + addu.ci r2,r10,r0 + +; This is the Right Way to do this on '110. 4 cycles / 64-bit limb. +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d ,r11,r5 +; ld.d r12, +; mulu.d ,r10,r5 +; addu.cio +; addu.cio +; st.d +; mulu.d +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d +; ld.d r10, +; mulu.d +; addu.cio +; addu.cio +; st.d +; mulu.d diff -ruN glibc-1.06/sysdeps/mach/Makefile glibc-1.07/sysdeps/mach/Makefile --- glibc-1.06/sysdeps/mach/Makefile Mon Oct 26 16:11:39 1992 +++ glibc-1.07/sysdeps/mach/Makefile Thu Oct 21 16:39:14 1993 @@ -1,3 +1,75 @@ -# Find mach.h, mach/*.h, and device/*.h easily. +# Copyright (C) 1993 Free Software Foundation, Inc. +# This file is part of the GNU C Library. -+includes := $(+includes) -I$(..)mach +# 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 mach-srcdir-computed +mach-srcdir-computed := yes + +# If we were configured with `--with-mach=DIR', then config.make sets +# mach-srcdir to DIR. Otherwise guess we are in a big source tree. +ifndef mach-srcdir +mach-srcdir = ../mach +endif + +# mach-srcdir is now set to the logical directory name. This name might be +# relative to $(objdir), might be relative to the source directory $(..), or +# might be absolute. We choose among these possibilities by looking for a +# canonical file in each of those places (in that order). +f := mach/mach.defs # Random file that identifies the Mach source dir. +f := $(strip $f) +mach-srcdir := $(firstword $(patsubst %/$f,%,$(wildcard $(addsuffix /$f,\ + $(objpfx)$(mach-srcdir) $(..)$(mach-srcdir)))) $(mach-srcdir)) + +endif # ! mach-srcdir-computed + +ifdef in-Makerules + +# Look for header files in mach/ under the top-level library source directory. +includes += -I$(..)mach + +# When compiling, use the Mach header files directly from the kernel sources. +includes += -I$(mach-srcdir) + +# Find Mach header files in the kernel source. +vpath mach/%.h $(mach-srcdir) +vpath device/%.h $(mach-srcdir) + +ifneq (mach,$(subdir)) +# Subdirectories other than mach/ might use the generated Mach headers. +# So make sure we get a chance to run in mach/ to make them before all else. + +ifdef objpfx +mach-objpfx = $(objpfx) +else +objpfx = $(..)mach +endif + +# These are all the generated files that includes. +mach-before-compile := $(mach-objpfx)mach-shortcuts.h \ + $(patsubst %,$(mach-objpfx)mach/mach_%.h,\ + interface port host) + +# This patsubst generates patterns like `m%h-shortcuts.h', which are damn +# likely to match just the corresponding particular file we want. +$(patsubst mach%,m\%h%,$(mach-before-compile)): # Run only if doesn't exist. + @echo '+++ mach generation for $@: $^ ($?)' + $(MAKE) -C $(..)mach generated no_deps=t + +before-compile += $(mach-before-compile) +endif + +endif # in-Makerules diff -ruN glibc-1.06/sysdeps/mach/__adjtime.c glibc-1.07/sysdeps/mach/__adjtime.c --- glibc-1.06/sysdeps/mach/__adjtime.c +++ glibc-1.07/sysdeps/mach/__adjtime.c Wed Oct 30 11:14:08 1991 @@ -0,0 +1,44 @@ +/* Copyright (C) 1991 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 +#include +#include +#include + +/* Adjust the current time of day by the amount in DELTA. + If OLDDELTA is not NULL, it is filled in with the amount + of time adjustment remaining to be done from the last `__adjtime' call. + This call is restricted to the super-user. */ +int +DEFUN(__adjtime, (delta, olddelta), + CONST struct timeval *delta AND + struct timeval *olddelta) +{ + error_t err; + mach_port_t hostpriv; + + hostpriv = __pid2task (-1); + if (hostpriv == MACH_PORT_NULL) + return -1; + err = __host_adjust_time (hostpriv, delta, olddelta); + __mach_port_deallocate (__mach_task_self (), hostpriv); + if (err) + return __hurd_fail (err); + return 0; +} diff -ruN glibc-1.06/sysdeps/mach/_strerror.c glibc-1.07/sysdeps/mach/_strerror.c --- glibc-1.06/sysdeps/mach/_strerror.c +++ glibc-1.07/sysdeps/mach/_strerror.c Mon Nov 29 23:21:52 1993 @@ -0,0 +1,60 @@ +/* Copyright (C) 1993 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 +#include +#include +#include +#include + +/* Return a string describing the errno code in ERRNUM. */ +char * +DEFUN(_strerror_internal, (errnum, buf), int errnum AND char buf[1024]) +{ + int system; + int sub; + int code; + const struct error_system *es; + extern void __mach_error_map_compat (int *); + + __mach_error_map_compat (&errnum); + + system = err_get_system (errnum); + sub = err_get_sub (errnum); + code = err_get_code (errnum); + + if (system > err_max_system) + { + sprintf (buf, "Unknown error system %d", system); + return buf; + } + + es = &__mach_error_systems[system]; + + if (sub >= es->max_sub) + return (char *) es->bad_sub; + + if (code >= es->subsystem[sub].max_code) + { + sprintf (buf, "Unknown error %d in system %d subsystem %d", + code, system, sub); + return buf; + } + + return (char *) es->subsystem[sub].codes[code]; +} diff -ruN glibc-1.06/sysdeps/mach/configure glibc-1.07/sysdeps/mach/configure --- glibc-1.06/sysdeps/mach/configure +++ glibc-1.07/sysdeps/mach/configure Fri Jul 23 01:51:01 1993 @@ -0,0 +1,8 @@ +# If configure is passed `--with-mach=DIR', set `mach-srcdir' to DIR in +# config.make. + +case z"$with_mach" in +z | zyes) ;; # Not specified, or specified with no value. +z*) config_vars="$config_vars +mach-srcdir = $with_mach" ;; +esac diff -ruN glibc-1.06/sysdeps/mach/hurd/Makefile glibc-1.07/sysdeps/mach/hurd/Makefile --- glibc-1.06/sysdeps/mach/hurd/Makefile Mon Oct 26 16:09:32 1992 +++ glibc-1.07/sysdeps/mach/hurd/Makefile Tue Dec 14 17:59:56 1993 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1993 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,21 +16,76 @@ # not, write to the Free Software Foundation, Inc., 675 Mass Ave, # Cambridge, MA 02139, USA. +ifndef hurd-srcdir-computed +hurd-srcdir-computed := yes -# Find hurd.h and hurd/*.h easily. -+includes := $(+includes) -I$(..)hurd +# If we were configured with `--with-hurd=DIR', then config.make sets +# hurd-srcdir to DIR. Otherwise guess we are in a big source tree. +ifndef hurd-srcdir +hurd-srcdir = ../hurd +endif + +# hurd-srcdir is now set to the logical directory name. This name might be +# relative to $(objdir), might be relative to the source directory $(..), or +# might be absolute. We choose among these possibilities by looking for a +# canonical file in each of those places (in that order). +f := hurd/hurd_types.defs # Random file that identifies the Hurd source dir. +f := $(strip $f) +hurd-srcdir := $(firstword $(patsubst %/$f,%,$(wildcard $(addsuffix /$f,\ + $(objpfx)$(hurd-srcdir) $(..)$(hurd-srcdir)))) $(hurd-srcdir)) + +endif # ! hurd-srcdir-computed + +ifdef in-Makerules + +# For the time being, elide directories where nothing at all works. +subdirs := $(filter-out socket inet termios,$(subdirs)) # XXX + +# Look for header files in hurd/ under the top-level library source directory. +includes += -I$(..)hurd + +# When compiling, use the Hurd header files directly from the sources. +includes += -I$(hurd-srcdir) + +# Marks temporary work-arounds installed by mib. +defines += -DMIB_HACKS +mib_hacks=t + +# Find the Hurd header files in the Hurd source. +vpath hurd/%.h $(hurd-srcdir) + +# Do not use any assembly code from sysdeps/unix (and subdirectories). +# This bypasses all the system call stubs and uses any existing posix or +# generic C files instead. +inhibit-sysdep-asm += unix* + + +ifneq (hurd,$(subdir)) +ifneq (mach,$(subdir)) +# Subdirectories other than hurd/ might use the generated Hurd headers. +# So make sure we get a chance to run in hurd/ to make them before all else. +# (But we don't want to do this in mach/, because hurd/ needs some things +# there, and we know mach/ doesn't need anything from hurd/.) + +# These are all the generated headers that includes. +before-compile += $(patsubst %,$(common-objpfx)hurd/%.h,io fs process) +$(patsubst %,$(common-objpfx)hurd/%.%,io fs process): + $(MAKE) -C $(..)hurd generated no_deps=t +endif +endif # Generate errnos.h and sys_errlist.c from the section of the manual that # lists all the errno codes. -errno.texinfo = $(..)manual/errno.texinfo +errno.texinfo = $(..)manual/errno.texi + +hurd = $(..)sysdeps/mach/hurd -$(objpfx)errnos.h: $(errno.texinfo) $(..)sysdeps/mach/hurd/errnos.awk - awk -f $(word 2,$^) $< > $@-tmp +$(hurd)/errnos.h: $(hurd)/errnos.awk $(errno.texinfo) + gawk -f $^ > $@-tmp mv $@-tmp $@ -$(objpfx)sys_errlist.c: $(errno.texinfo) $(..)sysdeps/mach/hurd/errlist.awk - grep '^@comment.###errno:' $< | sort -n +3 | \ - awk -f $(word 2,$^) > $@-tmp +$(hurd)/errlist.c: $(hurd)/errlist.awk $(errno.texinfo) + gawk -f $^ > $@-tmp mv $@-tmp $@ -before-compile := $(before-compile) $(objpfx)errnos.h $(objpfx)sys_errlist.c +endif # in-Makerules diff -ruN glibc-1.06/sysdeps/mach/hurd/__access.c glibc-1.07/sysdeps/mach/hurd/__access.c --- glibc-1.06/sysdeps/mach/hurd/__access.c Sat Mar 21 21:03:31 1992 +++ glibc-1.07/sysdeps/mach/hurd/__access.c Tue Dec 21 02:08:07 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Test for access to FILE by our real user and group IDs. */ int @@ -29,59 +30,77 @@ int dealloc_crdir, dealloc_cwdir; int flags; - /* Set up _hurd_rid_auth. */ - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + __mutex_lock (&_hurd_id.lock); + if (err = _hurd_check_ids ()) { - if (_hurd_rid_auth != MACH_PORT_NULL) + __mutex_unlock (&_hurd_id.lock); + return __hurd_fail (err); + } + + /* Set up _hurd_id.rid_auth. */ + if (_hurd_id.rid_auth == MACH_PORT_NULL) + { + if (_hurd_id.aux.nuids < 1 || _hurd_id.aux.ngids < 1) { - __mach_port_deallocate (__mach_task_self (), _hurd_rid_auth); - _hurd_rid_auth = MACH_PORT_NULL; + /* We do not have a real UID and GID. Lose, lose, lose! */ + __mutex_unlock (&_hurd_id.lock); + return __hurd_fail (EGRATUITOUS); } - if (err = __auth_getids (_hurd_auth, &_hurd_id)) - goto lose; - } - if (_hurd_rid_auth == MACH_PORT_NULL) - { - idblock_t rid; - rid = _hurd_id; - /* XXX Should keep supplementary ids or not? */ - rid.uids[0] = rid.ruid; - rid.gids[0] = rid.rgid; - rid.ruid = _hurd_id.uids[0]; - rid.rgid = _hurd_id.gids[0]; - if (err = __auth_makeauth (_hurd_auth, &rid, &_hurd_rid_auth)) + /* Create a new auth port using our real UID and GID (the first + auxiliary UID and GID) as the only effective IDs. */ + if (err = __USEPORT (AUTH, + __auth_makeauth (port, + NULL, 0, MACH_MSG_TYPE_COPY_SEND, + _hurd_id.aux.uids, 1, + _hurd_id.aux.gids, 1, + _hurd_id.aux.uids, + _hurd_id.aux.nuids, + _hurd_id.aux.gids, + _hurd_id.aux.ngids, + &_hurd_id.rid_auth))) goto lose; } - crdir = _hurd_port_get (&_hurd_crdir, &dealloc_crdir); - err = __io_reauthenticate (crdir); + crdir = _hurd_port_get (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir); + err = __io_reauthenticate (crdir, _hurd_pid); if (!err) { - err = __auth_user_authenticate (_hurd_rid_auth, crdir, &rcrdir); + err = __auth_user_authenticate (_hurd_id.rid_auth, + crdir, _hurd_pid, &rcrdir); __mach_port_deallocate (__mach_task_self (), crdir); } - _hurd_port_free (crdir, &dealloc_crdir); - cwdir = _hurd_port_get (&_hurd_cwdir, &dealloc_cwdir); - err = __io_reauthenticate (cwdir); + _hurd_port_free (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir, crdir); + if (!err) { - err = __auth_user_authenticate (_hurd_rid_auth, cwdir, &rcwdir); - __mach_port_deallocate (__mach_task_self (), cwdir); + cwdir = _hurd_port_get (&_hurd_ports[INIT_PORT_CWDIR], &dealloc_cwdir); + err = __io_reauthenticate (cwdir, _hurd_pid); + if (!err) + { + err = __auth_user_authenticate (_hurd_id.rid_auth, + cwdir, _hurd_pid, &rcwdir); + __mach_port_deallocate (__mach_task_self (), cwdir); + } + _hurd_port_free (&_hurd_ports[INIT_PORT_CWDIR], &dealloc_cwdir, cwdir); } + + /* We are done with _hurd_rid_auth now. */ __mutex_unlock (&_hurd_idlock); - _hurd_port_free (cwdir, &dealloc_cwdir); + if (err) return __hurd_fail (err); + /* Now do a path lookup on FILE, using the crdir and cwdir + reauthenticated with _hurd_rid_auth. */ + flags = 0; if (type & R_OK) - flags |= FS_LOOKUP_READ; + flags |= O_READ; if (type & W_OK) - flags |= FS_LOOKUP_WRITE; + flags |= O_WRITE; if (type & X_OK) - flags |= FS_LOOKUP_EXECUTE; + flags |= O_EXEC; err = __hurd_path_lookup (rcrdir, rcwdir, file, flags, 0, &io); __mach_port_deallocate (__mach_task_self (), rcrdir); diff -ruN glibc-1.06/sysdeps/mach/hurd/__adjtime.c glibc-1.07/sysdeps/mach/hurd/__adjtime.c --- glibc-1.06/sysdeps/mach/hurd/__adjtime.c Wed Oct 30 11:14:08 1991 +++ glibc-1.07/sysdeps/mach/hurd/__adjtime.c Tue Oct 26 18:32:16 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -31,13 +31,20 @@ struct timeval *olddelta) { error_t err; - mach_port_t hostpriv; + mach_port_t hostpriv, devmaster; - hostpriv = __pid2task (-1); - if (hostpriv == MACH_PORT_NULL) - return -1; - err = __host_adjust_time (hostpriv, delta, olddelta); + if (err = __USEPORT (PROC, __proc_getprivports (port, + &hostpriv, &devmaster))) + return __hurd_fail (err); + __mach_port_deallocate (__mach_task_self (), devmaster); + + err = __host_adjust_time (hostpriv, + /* `time_value_t' and `struct timeval' are in + fact identical with the names changed. */ + *(time_value_t *) delta, + (time_value_t *) olddelta); __mach_port_deallocate (__mach_task_self (), hostpriv); + if (err) return __hurd_fail (err); return 0; diff -ruN glibc-1.06/sysdeps/mach/hurd/__brk.c glibc-1.07/sysdeps/mach/hurd/__brk.c --- glibc-1.06/sysdeps/mach/hurd/__brk.c Sat Feb 1 04:04:12 1992 +++ glibc-1.07/sysdeps/mach/hurd/__brk.c Tue Dec 21 01:04:32 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -35,7 +35,12 @@ Pages beyond the one containing this address allow no access. */ vm_address_t _hurd_brk; +/* The RLIM_DATA resource limit on bytes of data space. */ +long int _hurd_brk_limit; + +#ifdef noteven struct mutex _hurd_brk_lock; +#endif /* Set the end of the process's data space to INADDR. Return 0 if successful, -1 if not. */ @@ -91,9 +96,11 @@ extern char _end; vm_address_t pagend; +#ifdef noteven __mutex_init (&_hurd_brk_lock); +#endif - _hurd_brk = &_end; + _hurd_brk = (vm_address_t) &_end; pagend = round_page (&_end); @@ -109,13 +116,14 @@ _hurd_data_end = pagend; } } +#ifdef HAVE_GNU_LD text_set_element (__libc_subinit, init_brk); +#endif int _hurd_set_data_limit (const struct rlimit *lim) { - error_t err; vm_address_t end = round_page (lim->rlim_max); if (lim->rlim_cur > lim->rlim_max) diff -ruN glibc-1.06/sysdeps/mach/hurd/__chdir.c glibc-1.07/sysdeps/mach/hurd/__chdir.c --- glibc-1.06/sysdeps/mach/hurd/__chdir.c Sat Mar 21 18:01:17 1992 +++ glibc-1.07/sysdeps/mach/hurd/__chdir.c Fri Dec 17 18:10:25 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Change the current directory to PATH. */ int @@ -26,11 +27,13 @@ { file_t cwdir; - cwdir = __path_lookup (path, FS_LOOKUP_EXECUTE, 0); +/* XXX make sure it's a directory */ + + cwdir = __path_lookup (path, O_EXEC, 0); if (cwdir == MACH_PORT_NULL) return -1; - _hurd_port_set (&_hurd_cwdir, cwdir); + _hurd_port_set (&_hurd_ports[INIT_PORT_CWDIR], cwdir); return 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__close.c glibc-1.07/sysdeps/mach/hurd/__close.c --- glibc-1.06/sysdeps/mach/hurd/__close.c Sat Mar 21 20:18:03 1992 +++ glibc-1.07/sysdeps/mach/hurd/__close.c Tue Jun 29 01:02:49 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -25,34 +25,23 @@ int DEFUN(__close, (fd), int fd) { - struct _hurd_fd *d; + int dealloc; + struct _hurd_fd_user d = _hurd_fd (fd, &dealloc); io_t port, ctty; - __mutex_lock (&_hurd_dtable_lock); - if (fd < 0 || fd >= _hurd_dtable.size) - { - __mutex_unlock (&_hurd_dtable_lock); - errno = EBADF; - return -1; - } - - d = &_hurd_dtable.d[fd]; - __spin_lock (d->port); - port = d->port.port; - ctty = d->ctty.port; - d->port.port = d->ctty.port = MACH_PORT_NULL; - d->port.user_dealloc = d->ctty.user_dealloc = NULL; - d->flags = 0; - __spin_unlock (&d->port); - - __mutex_unlock (&_hurd_dtable_lock); - - if (port == MACH_PORT_NULL) - { - errno = EBADF; - return -1; - } + if (d.d == NULL) + return __hurd_fail (EBADF); + /* Extract the descriptor's ports and replace them with nil. */ + + ctty = d.d->ctty.port; + _hurd_port_set (&d.d->ctty, MACH_PORT_NULL); + port = d.d->port.port; + _hurd_port_locked_set (&d.d->port, MACH_PORT_NULL); + + _hurd_fd_done (d, &dealloc); + + /* Deallocate the ports. */ __mach_port_deallocate (__mach_task_self (), port); if (ctty != MACH_PORT_NULL) __mach_port_deallocate (__mach_task_self (), ctty); diff -ruN glibc-1.06/sysdeps/mach/hurd/__dup.c glibc-1.07/sysdeps/mach/hurd/__dup.c --- glibc-1.06/sysdeps/mach/hurd/__dup.c Sat Mar 21 22:35:22 1992 +++ glibc-1.07/sysdeps/mach/hurd/__dup.c Tue Jun 29 01:32:15 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -26,45 +26,5 @@ int DEFUN(__dup, (fd), int fd) { - int new; - int dealloc, dealloc_ctty; - io_t port, ctty; - int flags; - int dealloc_dt; - struct _hurd_fd_user d; - - /* Extract the ports and flags from FD. */ - d = _hurd_fd (fd, &dealloc_dt); - if (d.d == NULL) - { - badf: - errno = EBADF; - return -1; - } - flags = d.d->flags; - ctty = _hurd_port_get (&d.d->ctty, &dealloc_ctty); - port = _hurd_port_locked_get (&d.d->port, &dealloc); /* Unlocks D.d. */ - - if (port == MACH_PORT_NULL) - goto badf; - - /* Get a new descriptor. */ - new = _hurd_dalloc (port, ctty, flags); - if (new >= 0) - { - /* Give the ports each a user ref for the new descriptor. */ - __mach_port_mod_refs (__mach_task_self (), port, - MACH_PORT_RIGHT_SEND, 1); - if (ctty != MACH_PORT_NULL) - __mach_port_mod_refs (__mach_task_self (), ctty, - MACH_PORT_RIGHT_SEND, 1); - } - - _hurd_port_free (&d->port, port, &dealloc); - if (ctty != MACH_PORT_NULL) - _hurd_port_free (&d->ctty, ctty, &dealloc_ctty); - - _hurd_fd_done (d, &dealloc_dt); - - return new; + return __fcntl (fd, F_DUPFD, 0); } diff -ruN glibc-1.06/sysdeps/mach/hurd/__dup2.c glibc-1.07/sysdeps/mach/hurd/__dup2.c --- glibc-1.06/sysdeps/mach/hurd/__dup2.c Sat Mar 21 22:35:20 1992 +++ glibc-1.07/sysdeps/mach/hurd/__dup2.c Tue Dec 21 00:34:40 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -29,19 +29,20 @@ DEFUN(__dup2, (fd, fd2), int fd AND int fd2) { int dealloc_dt; - struct _hurd_fd_user d, d2; + struct _hurd_fd_user d; + struct _hurd_fd *d2; io_t port, ctty; int dealloc, dealloc_ctty; + int flags; /* Extract the ports and flags from FD. */ - d = _hurd_fd (fd, &dealloc_dt); + d = _hurd_fd (fd, &dealloc_dt); /* Locks D.d. */ if (d.d == NULL) { - badf: errno = EBADF; return -1; } - flags = d->flags; + flags = d.d->flags; ctty = _hurd_port_get (&d.d->ctty, &dealloc_ctty); port = _hurd_port_locked_get (&d.d->port, &dealloc); /* Unlocks D.d. */ @@ -53,16 +54,6 @@ } else { - d2 = &_hurd_dtable.d[fd2]; - __spin_lock (&d2->port.lock); - d2->flags = flags; - _hurd_port_set (&d2->ctty, ctty); - _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */ - } - __mutex_unlock (&_hurd_dtable_lock); - - if (fd2 >= 0) - { /* Give the ports each a user ref for the new descriptor. */ __mach_port_mod_refs (__mach_task_self (), port, MACH_PORT_RIGHT_SEND, 1); @@ -69,11 +60,19 @@ if (ctty != MACH_PORT_NULL) __mach_port_mod_refs (__mach_task_self (), ctty, MACH_PORT_RIGHT_SEND, 1); + + /* Install the ports and flags in the new descriptor slot. */ + d2 = &_hurd_dtable.d[fd2]; + __spin_lock (&d2->port.lock); + d2->flags = flags; + _hurd_port_set (&d2->ctty, ctty); + _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */ } + __mutex_unlock (&_hurd_dtable_lock); - _hurd_port_free (&d.d->port, port, &dealloc); + _hurd_port_free (&d.d->port, &dealloc, port); if (ctty != MACH_PORT_NULL) - _hurd_port_free (&d.d->ctty, ctty, &dealloc_ctty); + _hurd_port_free (&d.d->ctty, &dealloc_ctty, port); _hurd_fd_done (d, &dealloc_dt); diff -ruN glibc-1.06/sysdeps/mach/hurd/__execve.c glibc-1.07/sysdeps/mach/hurd/__execve.c --- glibc-1.06/sysdeps/mach/hurd/__execve.c Mon Apr 26 17:34:23 1993 +++ glibc-1.07/sysdeps/mach/hurd/__execve.c Thu Dec 30 23:07:56 1993 @@ -17,10 +17,9 @@ Cambridge, MA 02139, USA. */ #include -#include -#include #include #include +#include /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ @@ -29,194 +28,16 @@ CONST char *path AND char *CONST argv[] AND char *CONST envp[]) { error_t err; - file_t file; - char *args, *env, *ap; - size_t argslen, envlen; - int ints[INIT_INT_MAX]; - mach_port_t ports[INIT_PORT_MAX]; - int dealloc_ports[INIT_PORT_MAX]; - struct _hurd_port *port_cells[INIT_PORT_MAX]; - file_t *dtable; - int dtablesize; - struct _hurd_port *dtable_cells; - int *dealloc_dtable; - int i; - char *const *p; - task_t task; - int flags; - struct _hurd_sigstate *ss; + file_t file = __path_lookup (path, O_EXEC, 0); - /* Get a port to the file we want to execute. */ - file = __path_lookup (path, FS_LOOKUP_EXECUTE, 0); if (file == MACH_PORT_NULL) return -1; - /* Pack the arguments into an array with nulls separating the elements. */ - argslen = 0; - p = argv; - while (*p != NULL) - argslen += strlen (*p++) + 1; - args = __alloca (argslen); - ap = args; - for (p = argv; *p != NULL; ++p) - ap = __memccpy (ap, *p, '\0', ULONG_MAX); + /* Hopefully this will not return. */ + err = _hurd_exec (file, argv, envp); - /* Pack the environment into an array with nulls separating the elements. */ - envlen = 0; - p = envp; - while (*p != NULL) - envlen += strlen (*p++) + 1; - env = __alloca (envlen); - ap = env; - for (p = envp; *p != NULL; ++p) - ap = __memccpy (ap, *p, '\0', ULONG_MAX); + /* Oh well. Might as well be tidy. */ + __mach_port_deallocate (__mach_task_self (), file); - /* Load up the ports to give to the new program. */ -#define port(idx, cell) \ - case idx: \ - port_cells[i] = &cell; \ - ports[i] = _hurd_port_get (&cell, &dealloc_ports[i]); \ - break - for (i = 0; i < INIT_PORT_MAX; ++i) - switch (i) - { - port (INIT_PORT_CCDIR, _hurd_ccdir); - port (INIT_PORT_CWDIR, _hurd_cwdir); - port (INIT_PORT_CRDIR, _hurd_crdir); - port (INIT_PORT_AUTH, _hurd_auth); - port (INIT_PORT_PROC, _hurd_proc); - default: - port_cells[i] = NULL; - break; - } - - /* Load up the ints to give the new program. */ - for (i = 0; i < INIT_INT_MAX; ++i) - switch (i) - { - case INIT_UMASK: - ints[i] = _hurd_umask; - break; - case INIT_CTTY_FSTYPE: - ints[i] = _hurd_ctty_fstype; - break; - case INIT_CTTY_FSID1: - ints[i] = _hurd_ctty_fsid.val[0]; - break; - case INIT_CTTY_FSID2: - ints[i] = _hurd_ctty_fsid.val[1]; - break; - case INIT_CTTY_FILEID: - ints[i] = _hurd_ctty_fileid; - break; - - case INIT_SIGMASK: - case INIT_SIGIGN: - break; - - default: - ints[i] = 0; - } - - ss = _hurd_thread_sigstate (__mach_thread_self ()); - ints[INIT_SIGMASK] = ss->blocked; - ints[INIT_SIGPENDING] = ss->pending; - ints[INIT_SIGIGN] = 0; - for (i = 1; i < NSIG; ++i) - if (ss->actions[i].sa_handler == SIG_IGN) - ints[INIT_SIGIGN] |= __sigmask (i); - - /* We hold the sigstate lock until the exec has failed so that no signal - can arrive between when we pack the blocked and ignored signals, and - when the exec actually happens. A signal handler could change what - signals are blocked and ignored. Either the change will be reflected - in the exec, or the signal will never be delivered. */ - -#if 0 - if (ss->vforked) - { - /* This thread is vfork'd. */ - task = MACH_PORT_NULL; - flags = EXEC_NEWTASK; - } - else -#endif - { - task = __mach_task_self (); - flags = 0; - } - - /* Pack up the descriptor table to give the new program. */ - __mutex_lock (&_hurd_dtable_lock); - if (_hurd_dtable.d != NULL) - { - dtablesize = _hurd_dtable.size; - dtable = __alloca (dtablesize * sizeof (dtable[0])); - dealloc_dtable = __alloca (dtablesize * sizeof (dealloc_dtable[0])); - dtable_cells = __alloca (dtablesize * sizeof (dealloc_cells[0])); - for (i = 0; i < dtablesize; ++i) - { - struct _hurd_fd *const = &_hurd_dtable.d[i]; - __spin_lock (&d->port.lock); - if (d->flags & FD_CLOEXEC) - { - dtable[i] = MACH_PORT_NULL; - __spin_unlock (&d->port.lock); - } - else - { - /* If this is a descriptor to our controlling tty, - we want to give the normal port, not the foreground port. */ - dtable[i] = _hurd_port_get (&d->ctty, &dealloc_dtable[i]); - if (dtable[i] == MACH_PORT_NULL) - { - dtable[i] = _hurd_port_locked_get (&d->port, - &dealloc_dtable[i]); - dtable_cells[i] = &d->port; - } - else - { - __spin_unlock (&d->port.lock); - dtable_cells[i] = &d->ctty; - } - } - } - } - else - { - dtable = _hurd_init_dtable; - dtablesize = _hurd_init_dtablesize; - dealloc_dtable = NULL; - dealloc_cells = NULL; - } - - err = __file_exec (file, task, - args, argslen, env, envlen, - dtable, dtablesize, - ints, INIT_INT_MAX, - ports, INIT_PORT_MAX, - flags); - - /* Safe to let signals happen now. */ - __mutex_unlock (&ss->lock); - - for (i = 0; i < INIT_PORT_MAX; ++i) - if (port_cells[i] != NULL) - _hurd_port_free (ports_cells[i], ports[i], &dealloc_ports[i]); - - if (dealloc_dtable != NULL) - for (i = 0; i < dtablesize; ++i) - if (dtable[i] != MACH_PORT_NULL) - _hurd_port_free (dtable_cells[i], dtable[i], &dealloc_dtable[i]); - -#if 0 - if (ss->vforked) - longjmp (ss->vfork_saved.continuation, 1); -#endif - - if (err) - return __hurd_fail (err); - - /* That's interesting. */ - return 0; + return __hurd_fail (err); } diff -ruN glibc-1.06/sysdeps/mach/hurd/__fchown.c glibc-1.07/sysdeps/mach/hurd/__fchown.c --- glibc-1.06/sysdeps/mach/hurd/__fchown.c Sun May 3 15:53:50 1992 +++ glibc-1.07/sysdeps/mach/hurd/__fchown.c Fri Oct 29 22:00:16 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -20,6 +20,7 @@ #include #include #include +#include /* Change the owner and group of the file referred to by FD. */ int diff -ruN glibc-1.06/sysdeps/mach/hurd/__fcntl.c glibc-1.07/sysdeps/mach/hurd/__fcntl.c --- glibc-1.06/sysdeps/mach/hurd/__fcntl.c Sat Mar 21 22:39:15 1992 +++ glibc-1.07/sysdeps/mach/hurd/__fcntl.c Wed Dec 22 16:46:55 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -20,7 +20,9 @@ #include #include #include +#include + /* Perform file control operations on FD. */ int DEFUN(__fcntl, (fd, cmd), int fd AND int cmd DOTS) @@ -28,28 +30,15 @@ va_list ap; int dealloc_dt; struct _hurd_fd_user d = _hurd_fd (fd, &dealloc_dt); - io_t port, ctty; - int dealloc, dealloc_ctty; int result; if (d.d == NULL) - { - errno = EBADF; - return -1; - } + return __hurd_fail (EBADF); va_start (ap, cmd); switch (cmd) { - case F_GETLK: - case F_SETLK: - case F_SETLKW: - __spin_unlock (&d.d->lock); - errno = ENOSYS; - result = -1; - break; - default: __spin_unlock (&d.d->lock); errno = EINVAL; @@ -56,51 +45,25 @@ result = -1; break; + /* First the descriptor-based commands, which do no RPCs. */ + case F_DUPFD: { - int fd2 = va_arg (args, int); - int flags; + /* Duplicate the descriptor. */ - /* Extract the ports and flags from FD. */ - flags = d->flags; - ctty = _hurd_port_get (&d->ctty, &dealloc_ctty); - port = _hurd_port_locked_get (&d->port, &dealloc); /* Unlocks D. */ - - if (port == MACH_PORT_NULL) - goto badf; - - __mutex_lock (&_hurd_dtable_lock); - if (fd2 < 0 || fd2 >= _hurd_dtable.size) - { - errno = EBADF; - fd2 = -1; - } - else - { - while (fd2 < _hurd_dtable.size) - { - struct _hurd_fd *d2 = &_hurd_dtable.d[fd2]; - __spin_lock (&d2->port.lock); - if (d2->port.port == MACH_PORT_NULL) - { - d2->flags = flags; - _hurd_port_set (&d2->ctty, ctty); - _hurd_port_locked_set (&d2->port, port); /* Unlocks D2. */ - break; - } - else - __spin_unlock (&d2->port.lock); - } - if (fd2 == _hurd_dtable.size) - { - errno = EMFILE; - fd2 = -1; - } - } - __mutex_unlock (&_hurd_dtable_lock); - - if (fd2 >= 0) - { + struct _hurd_fd *new; + + /* Get a new descriptor. + It is unfortunate that D.d must remain locked during this call. */ + new = _hurd_alloc_fd (&result, 0); + if (new != NULL) + { + int dealloc, dealloc_ctty; + int flags = d.d->flags; + io_t ctty = _hurd_port_get (&d.d->ctty, &dealloc_ctty); + io_t port = _hurd_port_locked_get (&d.d->port, + &dealloc); /* Unlocks D.d. */ + /* Give the ports each a user ref for the new descriptor. */ __mach_port_mod_refs (__mach_task_self (), port, MACH_PORT_RIGHT_SEND, 1); @@ -107,13 +70,19 @@ if (ctty != MACH_PORT_NULL) __mach_port_mod_refs (__mach_task_self (), ctty, MACH_PORT_RIGHT_SEND, 1); + + /* Install the ports and flags in the new descriptor. */ + _hurd_port_set (&new->ctty, ctty); + _hurd_port_locked_set (&new->port, port); + new->flags = flags; + + if (ctty != MACH_PORT_NULL) + _hurd_port_free (&d.d->ctty, &dealloc_ctty, ctty); + _hurd_port_free (&d.d->port, &dealloc, port); } - - _hurd_port_free (port, &dealloc); - if (ctty != MACH_PORT_NULL) - _hurd_port_free (ctty, &dealloc_ctty); - - result = fd2; + else + result = -1; + break; } @@ -128,55 +97,61 @@ result = 0; break; + + /* Now the real io operations, done by RPCs to io servers. */ + + case F_GETLK: + case F_SETLK: + case F_SETLKW: + { + struct flock *fl = va_arg (ap, struct flock *); + __spin_unlock (&d.d->lock); + errno = fl?ENOSYS:EINVAL; /* XXX mib needs to implement io rpcs. */ + result = -1; + break; + } + case F_GETFL: { + int dealloc; + io_t port + = _hurd_port_locked_get (&d.d->port, &dealloc); /* Unlocks D.d. */ error_t err; - int nonblock, append; - port = _hurd_port_locked_get (d.d, &dealloc); /* Unlocks D.d. */ - err = __io_get_nonblock (port, &nonblock); - if (!err) - err = __io_get_append (port, &append); - _hurd_port_free (port, &dealloc); + + err = __io_get_openmodes (port, &result); + + _hurd_port_free (&d.d->port, &dealloc, port); + if (err) - { - errno = err; - result = -1; - } - else - result = ((nonblock ? O_NONBLOCK : 0) | - (append ? O_APPEND : 0)); + result = __hurd_fail (err); break; } case F_SETFL: { - int flags = va_arg (ap, int); + const int flags = va_arg (ap, int); + int dealloc; + io_t port + = _hurd_port_locked_get (&d.d->port, &dealloc); /* Unlocks D.d. */ error_t err; - port = _hurd_port_locked_get (d.d, &dealloc); /* Unlocks D.d. */ - err = __io_mod_nonblock (port, flags & O_NONBLOCK); - if (!err) - err = __io_mod_append (port, flags & O_APPEND); - _hurd_port_free (port, &dealloc); - if (err) - { - result = -1; - errno = err; - } - else - result = 0; + + err = __io_set_all_openmodes (port, flags); + + _hurd_port_free (&d.d->port, &dealloc, port); + + result = err ? __hurd_fail (err) : 0; break; } case F_GETOWN: { + int dealloc; error_t err; - port = _hurd_port_locked_get (d.d, &dealloc); /* Unlocks D.d. */ - if (err = __io_get_owner (port, &result)) - { - errno = err; - result = -1; - } - _hurd_port_free (port, &dealloc); + io_t port + = _hurd_port_locked_get (&d.d->port, &dealloc); /* Unlocks D.d. */ + err = __io_get_owner (port, &result); + _hurd_port_free (&d.d->port, &dealloc, port); + result = err ? __hurd_fail (err) : 0; break; } @@ -184,15 +159,12 @@ { pid_t owner = va_arg (ap, pid_t); error_t err; - port = _hurd_port_locked_get (d.d, &dealloc); /* Unlocks D.d. */ - if (err = __io_set_owner (port, owner)) - { - errno = err; - result = -1; - } - else - result = 0; - _hurd_port_free (port, &dealloc); + int dealloc; + io_t port + = _hurd_port_locked_get (&d.d->port, &dealloc); /* Unlocks D.d. */ + err = __io_mod_owner (port, owner); + _hurd_port_free (&d.d->port, &dealloc, port); + result = err ? __hurd_fail (err) : 0; break; } } diff -ruN glibc-1.06/sysdeps/mach/hurd/__fork.c glibc-1.07/sysdeps/mach/hurd/__fork.c --- glibc-1.06/sysdeps/mach/hurd/__fork.c Sun Mar 22 00:03:51 1992 +++ glibc-1.07/sysdeps/mach/hurd/__fork.c Thu Jan 6 01:35:25 1994 @@ -16,6 +16,8 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifdef notevenclose + #include #include #include @@ -66,7 +68,7 @@ jmp_buf env; pid_t pid; - if (!setjmp (env)) + if (! setjmp (env)) { error_t err; process_t newproc; @@ -290,3 +292,5 @@ return pid; } + +#endif diff -ruN glibc-1.06/sysdeps/mach/hurd/__fstat.c glibc-1.07/sysdeps/mach/hurd/__fstat.c --- glibc-1.06/sysdeps/mach/hurd/__fstat.c Sun May 3 16:08:00 1992 +++ glibc-1.07/sysdeps/mach/hurd/__fstat.c Fri Oct 29 22:00:10 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -20,6 +20,7 @@ #include #include #include +#include /* Get information about the file descriptor FD in BUF. */ int diff -ruN glibc-1.06/sysdeps/mach/hurd/__getdents.c glibc-1.07/sysdeps/mach/hurd/__getdents.c --- glibc-1.06/sysdeps/mach/hurd/__getdents.c Sun May 3 15:53:46 1992 +++ glibc-1.07/sysdeps/mach/hurd/__getdents.c Tue Oct 26 21:43:25 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -27,14 +27,15 @@ int fd AND PTR buf AND size_t nbytes AND off_t *basep) { error_t err; - int amount; + mach_msg_type_number_t amount; /* Fault before taking any locks. */ *(volatile off_t *) basep = *basep; + amount = nbytes; err = _HURD_DPORT_USE (fd, - __dir_readdir (port, buf, nbytes, *basep, - basep, &amount)); + __dir_readdir (port, buf, &amount, *basep, + basep, nbytes)); if (err) return __hurd_dfail (fd, err); diff -ruN glibc-1.06/sysdeps/mach/hurd/__getdtsz.c glibc-1.07/sysdeps/mach/hurd/__getdtsz.c --- glibc-1.06/sysdeps/mach/hurd/__getdtsz.c Tue Jun 16 23:29:46 1992 +++ glibc-1.07/sysdeps/mach/hurd/__getdtsz.c Tue Jun 29 01:49:27 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -28,7 +28,7 @@ { int size; __mutex_lock (&_hurd_dtable_lock); - size = _hurd_dtable_rlimit; + size = _hurd_dtable.size; __mutex_unlock (&_hurd_dtable_lock); return size; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__getegid.c glibc-1.07/sysdeps/mach/hurd/__getegid.c --- glibc-1.06/sysdeps/mach/hurd/__getegid.c Sun Mar 22 01:22:17 1992 +++ glibc-1.07/sysdeps/mach/hurd/__getegid.c Mon Dec 13 19:37:28 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -25,24 +25,28 @@ gid_t DEFUN_VOID(__getegid) { + error_t err; gid_t egid; - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + + __mutex_lock (&_hurd_id.lock); + + if (err = _hurd_check_ids ()) { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; + errno = err; + egid = -1; } - if (_hurd_id.ngroups == 0) + else if (_hurd_id.gen.ngids >= 1) + egid = _hurd_id.gen.gids[0]; + else if (_hurd_id.aux.ngids >= 1) /* We have no effective gids. Return the real gid. */ - egid = _hurd_id.rgid; + egid = _hurd_id.aux.gids[0]; else - egid = _hurd_id.gids[0]; - __mutex_unlock (&_hurd_idlock); + { + /* We do not even have a real gid. */ + errno = EGRATUITOUS; + egid = -1; + } + + __mutex_unlock (&_hurd_id.lock); return egid; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__geteuid.c glibc-1.07/sysdeps/mach/hurd/__geteuid.c --- glibc-1.06/sysdeps/mach/hurd/__geteuid.c Sun Mar 22 01:22:20 1992 +++ glibc-1.07/sysdeps/mach/hurd/__geteuid.c Mon Dec 13 19:37:26 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -25,24 +25,28 @@ uid_t DEFUN_VOID(__geteuid) { + error_t err; uid_t euid; - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + + __mutex_lock (&_hurd_id.lock); + + if (err = _hurd_check_ids ()) { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; + errno = err; + euid = -1; } - if (_hurd_id.nuids == 0) + else if (_hurd_id.gen.nuids >= 1) + euid = _hurd_id.gen.uids[0]; + else if (_hurd_id.aux.nuids >= 1) /* We have no effective uids. Return the real uid. */ - euid = _hurd_id.ruid; + euid = _hurd_id.aux.uids[0]; else - euid = _hurd_id.uids[0]; - __mutex_unlock (&_hurd_idlock); + { + /* We do not even have a real uid. */ + errno = EGRATUITOUS; + euid = -1; + } + + __mutex_unlock (&_hurd_id.lock); return euid; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__getgid.c glibc-1.07/sysdeps/mach/hurd/__getgid.c --- glibc-1.06/sysdeps/mach/hurd/__getgid.c Sun Mar 22 01:22:24 1992 +++ glibc-1.07/sysdeps/mach/hurd/__getgid.c Mon Dec 13 19:37:25 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -25,20 +25,25 @@ gid_t DEFUN_VOID(__getgid) { + error_t err; gid_t gid; - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + + __mutex_lock (&_hurd_id.lock); + + if (err = _hurd_check_ids ()) + { + errno = err; + gid = -1; + } + else if (_hurd_id.aux.ngids >= 1) + gid = _hurd_id.aux.gids[0]; + else { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; + /* We do not even have a real gid. */ + errno = EGRATUITOUS; + gid = -1; } - gid = _hurd_id.rgid; - __mutex_unlock (&_hurd_idlock); + + __mutex_unlock (&_hurd_id.lock); return gid; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__getgrps.c glibc-1.07/sysdeps/mach/hurd/__getgrps.c --- glibc-1.06/sysdeps/mach/hurd/__getgrps.c Sun Mar 22 01:22:26 1992 +++ glibc-1.07/sysdeps/mach/hurd/__getgrps.c Wed Oct 27 16:43:02 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -24,27 +24,31 @@ int __getgroups (int n, gid_t *gidset) { + error_t err; int ngids; - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + __mutex_lock (&_hurd_id.lock); + + if (err = _hurd_check_ids ()) { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; + __mutex_unlock (&_hurd_id.lock); + return __hurd_fail (err); } - ngids = _hurd_id.ngroups; - if (gidset != NULL) + + ngids = _hurd_id.gen.ngids; + + if (n != 0) { + /* Copy the gids onto stack storage and then release the idlock. */ gid_t gids[ngids]; - memcpy (gids, _hurd_id.groups, sizeof (gids)); - __mutex_unlock (&_hurd_idlock); - memcpy (gidset, gids, sizeof (gids)); + memcpy (gids, _hurd_id.gen.gids, sizeof (gids)); + __mutex_unlock (&_hurd_id.lock); + + /* Now that the lock is released, we can safely copy the + group set into the user's array, which might fault. */ + if (ngids > n) + ngids = n; + memcpy (gidset, gids, ngids * sizeof (gid_t)); } else __mutex_unlock (&_hurd_idlock); diff -ruN glibc-1.06/sysdeps/mach/hurd/__gethstnm.c glibc-1.07/sysdeps/mach/hurd/__gethstnm.c --- glibc-1.06/sysdeps/mach/hurd/__gethstnm.c Sun Mar 22 01:22:35 1992 +++ glibc-1.07/sysdeps/mach/hurd/__gethstnm.c Thu Dec 23 18:37:15 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -29,8 +29,14 @@ char *name AND size_t len) { error_t err; - if (err = _HURD_PORT_USE (&_hurd_proc, - __proc_gethostname (port, name, len))) + char *buf = name; + unsigned int buflen = len; + if (err = __USEPORT (PROC, __proc_gethostname (port, &buf, &buflen))) return __hurd_fail (err); + if (buf != name) + { + memcpy (name, buf, len < buflen ? len : buflen); + __vm_deallocate (__mach_task_self (), (vm_address_t) buf, buflen); + } return 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__getpgrp.c glibc-1.07/sysdeps/mach/hurd/__getpgrp.c --- glibc-1.06/sysdeps/mach/hurd/__getpgrp.c Sun Mar 22 01:22:29 1992 +++ glibc-1.07/sysdeps/mach/hurd/__getpgrp.c Wed Jun 23 17:37:25 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -28,12 +28,18 @@ error_t err; pid_t pgrp; + __mutex_lock (&_hurd_pid_lock); + if (pid == 0) - return _hurd_pgrp; + { + pgrp = _hurd_pgrp; + err = 0; + } + else + err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_getpgrp (port, pid, &pgrp)); - if (err = _HURD_PORT_USE (&_hurd_proc, - __proc_getpgrp (port, pid, &pgrp))) - return __hurd_fail (err); + __mutex_unlock (&_hurd_pid_lock); - return pgrp; + return err ? __hurd_fail (err) : pgrp; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__getpid.c glibc-1.07/sysdeps/mach/hurd/__getpid.c --- glibc-1.06/sysdeps/mach/hurd/__getpid.c Wed Oct 23 10:34:37 1991 +++ glibc-1.07/sysdeps/mach/hurd/__getpid.c Wed Jun 23 17:48:52 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,8 +22,9 @@ #include /* Get the process ID of the calling process. */ -int +pid_t DEFUN_VOID(__getpid) { + /* Assumes atomic word fetch and store, so doesn't lock _hurd_pid_lock. */ return _hurd_pid; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__getppid.c glibc-1.07/sysdeps/mach/hurd/__getppid.c --- glibc-1.06/sysdeps/mach/hurd/__getppid.c Wed Oct 23 10:35:00 1991 +++ glibc-1.07/sysdeps/mach/hurd/__getppid.c Wed Oct 27 16:43:37 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,11 +19,14 @@ #include #include #include +#include +#include /* Get the parent process ID of the calling process. */ -int +pid_t DEFUN_VOID(__getppid) { + /* Assumes atomic word fetch and store, so doesn't lock _hurd_pid_lock. */ return _hurd_ppid; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__getuid.c glibc-1.07/sysdeps/mach/hurd/__getuid.c --- glibc-1.06/sysdeps/mach/hurd/__getuid.c Sun Mar 22 01:22:14 1992 +++ glibc-1.07/sysdeps/mach/hurd/__getuid.c Mon Dec 13 19:37:24 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -25,20 +25,25 @@ uid_t DEFUN_VOID(__getuid) { + error_t err; uid_t uid; - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + + __mutex_lock (&_hurd_id.lock); + + if (err = _hurd_check_ids ()) + { + errno = err; + uid = -1; + } + else if (_hurd_id.aux.nuids >= 1) + uid = _hurd_id.aux.uids[0]; + else { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; + /* We do not even have a real uid. */ + errno = EGRATUITOUS; + uid = -1; } - uid = _hurd_id.ruid; - __mutex_unlock (&_hurd_idlock); + + __mutex_unlock (&_hurd_id.lock); return uid; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__ioctl.c glibc-1.07/sysdeps/mach/hurd/__ioctl.c --- glibc-1.06/sysdeps/mach/hurd/__ioctl.c Sat May 15 18:01:07 1993 +++ glibc-1.07/sysdeps/mach/hurd/__ioctl.c Sat Jan 8 10:56:47 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993, 1994 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 @@ -20,12 +20,24 @@ #include #include #include +#include +#include +/* Symbol set of ioctl handler lists. If there are user-registered + handlers, one of these lists will contain them. The other lists are + handlers built into the library. */ +const struct + { + size_t n; + struct ioctl_handler *v[0]; + } _hurd_ioctl_handler_lists; + + /* Perform the I/O control operation specified by REQUEST on FD. The actual type and use of ARG and the return value depend on REQUEST. */ int -DEFUN(__ioctl, (fd, request, arg), - int fd AND int request AND PTR arg) +DEFUN(__ioctl, (fd, request), + int fd AND unsigned long int request DOTS) { /* Map individual type fields to Mach IPC types. */ static const int mach_types[] = @@ -34,18 +46,19 @@ /* Message buffer. */ char msg[sizeof (mach_msg_header_t) + /* Header. */ - sizeof (mach_msg_type_t) + 4 /* Return code. */ + sizeof (mach_msg_type_t) + 4 + /* Return code. */ 3 * (sizeof (mach_msg_type_t) + (4 * 32))]; /* Argument data. */ mach_msg_header_t *m = (mach_msg_header_t *) msg; mach_msg_type_t *t = (mach_msg_type_t *) &m[1]; mach_msg_id_t msgid; + void *arg; + union __ioctl r; error_t err; #define io2mach_type(count, type) \ - ((mach_msg_type_t) - { mach_types[type], (type << 1) * 8, count, 1, 0, 0 }) + ((mach_msg_type_t) { mach_types[type], (type << 1) * 8, count, 1, 0, 0 }) /* Pack an argument into the message buffer. */ inline void in (unsigned int count, unsigned int type) @@ -81,27 +94,49 @@ return 0; } + va_list ap; + + va_start (ap, request); + arg = va_arg (ap, void *); + va_end (ap); + + { + /* Check for a registered handler for REQUEST. */ + + size_t i; + const struct ioctl_handler *h; + + for (i = 0; i < _hurd_ioctl_handler_lists.n; ++i) + for (h = _hurd_ioctl_handler_lists.v[i]; h != NULL; h = h->next) + if (request >= h->first_request && request <= h->last_request) + /* This handler groks REQUEST. Se lo puntamonos. */ + return (*h->handler) (fd, request, arg); + } + + /* Pack the argument data. */ - r.i = request; + r.__i = request; - msgid = 100000 + ((r.s.group << 2) * 1000) + r.s.command; + msgid = 100000 + ((r.__s.group << 2) * 1000) + r.__s.command; - in (r.s.count0, r.s.type0); - in (r.s.count1, r.s.type1); - in (r.s.count2, r.s.type2); + in (r.__t.count0, r.__t.type0); + in (r.__t.count1, r.__t.type1); + in (r.__t.count2, r.__t.type2); err = _HURD_DPORT_USE (fd, ({ m->msgh_size = (char *) t - msg; - m->msgh_request_port = port; - m->msgh_reply_port = __mig_reply_port (); + m->msgh_remote_port = port; + m->msgh_local_port = __mig_reply_port (); m->msgh_seqno = 0; m->msgh_id = msgid; +#if 0 m->msgh_bits = ?; /* XXX */ +#endif _HURD_EINTR_RPC (port, __mach_msg (m, MACH_SEND_MSG|MACH_RCV_MSG, m->msgh_size, sizeof (msg), - m->msgh_reply_port, + m->msgh_local_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL)); })); @@ -121,15 +156,15 @@ return __hurd_fail (m->msgh_id == MACH_NOTIFY_SEND_ONCE ? MIG_SERVER_DIED : MIG_REPLY_MISMATCH); - if ((m->msgh_bits & MACH_MSGH_BITS_COMPLEX) || + if ((m->msgh_bits & MACH_MSGH_BITS_COMPLEX) || /* XXX ? */ m->msgh_size != (char *) t - msg) return __hurd_fail (MIG_TYPE_ERROR); - t = (mach_msg_type_t) &m[1]; + t = (mach_msg_type_t *) &m[1]; if (out (1, _IOTS (sizeof (error_t)), &err, NULL) || - out (r.s.count0, r.s.type0, arg, &arg) || - out (r.s.count1, r.s.type2, arg, &arg) || - out (r.s.count2, r.s.type2, arg, &arg)) + out (r.__t.count0, r.__t.type0, arg, &arg) || + out (r.__t.count1, r.__t.type2, arg, &arg) || + out (r.__t.count2, r.__t.type2, arg, &arg)) return __hurd_fail (MIG_TYPE_ERROR); if (err) diff -ruN glibc-1.06/sysdeps/mach/hurd/__kill.c glibc-1.07/sysdeps/mach/hurd/__kill.c --- glibc-1.06/sysdeps/mach/hurd/__kill.c Sat Apr 4 12:15:33 1992 +++ glibc-1.07/sysdeps/mach/hurd/__kill.c Fri Dec 17 17:58:33 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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,8 +16,8 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include +#include #include #include @@ -25,17 +25,16 @@ send SIG to all processes in the current process's process group. If PID is < -1, send SIG to all processes in process group - PID. */ int -DEFUN(__kill, (pid, sig), int pid AND int sig) +__kill (pid_t pid, int sig) { error_t err; - mach_port_t portbuf[10]; - mach_port_t *ports = portbuf; - mach_port_t refport; /* XXX */ - size_t nports = 10, i; + mach_port_t oneport, *ports; + pid_t *pids; + mach_msg_type_number_t npids, nports, i; mach_port_t proc; int dealloc_proc; - proc = _hurd_port_get (&_hurd_proc, &dealloc_proc); + proc = _hurd_port_get (&_hurd_ports[INIT_PORT_PROC], &dealloc_proc); if (pid <= 0) { @@ -44,41 +43,90 @@ err = __proc_pgrp_pcoll (proc, - pid, &pcoll); if (!err) { - err = __proc_get_collports (proc, pcoll, &ports, &nports); + err = __proc_get_collports (proc, pcoll, + &pids, &npids, + &ports, &nports); __mach_port_deallocate (__mach_task_self (), pcoll); } } else { - err = __proc_getmsgport (proc, pid, &ports[0]); + if (sig == SIGKILL) + { + err = 0; + oneport = MACH_PORT_NULL; + } + else + err = __proc_getmsgport (proc, pid, &oneport); + npids = 1; + pids = &pid; + ports = &oneport; nports = 1; } - if (!err) + if (npids != nports) + err = EGRATUITOUS; + + if (sig == SIGKILL) { - err = __proc_pid2task (proc, pid, &refport); - if (err) - err = __proc_getsidport (proc, &refport); + /* SIGKILL is not delivered as a normal signal. + Sending SIGKILL to a process means to terminate its task. */ + for (i = 0; i < npids; ++i) + { + /* We don't care about the message port. Deallocate it. */ + if (ports[i]) + __mach_port_deallocate (__mach_task_self (), ports[i]); + if (!err) + /* XXX The above if makes kill fail as soon as it cannot kill + one process, returning that one's error and ignoring the + rest. Is that right? */ + + /* Fetch the process's task port and terminate the task. We + loop in case the process execs and changes its task port. + If the old task port dies after we fetch it but before we + send the RPC, we get MACH_SEND_INVALID_DEST; if it dies + after we send the RPC request but before it is serviced, we + get MIG_SERVER_DIED. */ + do + { + task_t refport; + err = __proc_pid2task (proc, pids[i], &refport); + if (!err) + { + err = __task_terminate (refport); + __mach_port_deallocate (__mach_task_self (), refport); + } + } while (err != MACH_SEND_INVALID_DEST && + err != MIG_SERVER_DIED); + } } - _hurd_port_free (&_hurd_proc, proc, &dealloc_proc); - for (i = 0; i < nports; ++i) { - if (!err && signo == SIGKILL) - err = __task_terminate (refport); /* XXX */ - if (!err) - err = __sig_post (ports[i], sig, refport); /* XXX */ - __mach_port_deallocate (__mach_task_self (), ports[i]); + int tried = 0; + if (err) + /* We have already lost. Just deallocate the port. */ + /* XXX The above if makes kill fail as soon as it cannot kill + one process, returning that one's error and ignoring the + rest. Is that right? */ + __mach_port_deallocate (__mach_task_self (), ports[i]); + else + err = _HURD_MSGPORT_RPC (tried ? + __proc_getmsgport (proc, pids[i], &msgport) : + (tried = 1, ports[i]), + ({ err = __proc_pid2task (proc, pids[i], + &refport); + if (err) + err = __proc_getsidport (proc, &refport); + err; }), + __sig_post (msgport, sig, refport)); } - if (refport != MACH_PORT_NULL) - __mach_port_deallocate (__mach_task_self (), refport); /* XXX */ + _hurd_port_free (&_hurd_ports[INIT_PORT_PROC], &dealloc_proc, proc); - if (ports != portbuf) - __vm_deallocate (__mach_task_self (), ports, nports * sizeof (ports[0])); + if (ports != &oneport) + __vm_deallocate (__mach_task_self (), + (vm_address_t) ports, nports * sizeof (ports[0])); - if (err) - return __hurd_fail (err); - return 0; + return err ? __hurd_fail (err) : 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__link.c glibc-1.07/sysdeps/mach/hurd/__link.c --- glibc-1.06/sysdeps/mach/hurd/__link.c Sun Mar 22 01:29:38 1992 +++ glibc-1.07/sysdeps/mach/hurd/__link.c Fri Oct 29 22:00:07 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -28,17 +28,17 @@ { error_t err; file_t oldfile, linknode, todir; - CONST char *toname; + char *toname; oldfile = __path_lookup (from, 0, 0); if (oldfile == MACH_PORT_NULL) return -1; + /* The file_getlinknode RPC returns the port that should be passed to + the receiving filesystem (the one containing TODIR) in dir_link. */ + err = __file_getlinknode (oldfile, &linknode); - if (err == EOPNOTSUPP) - linknode = oldfile; - else - __mach_port_deallocate (__mach_task_self (), oldfile); + __mach_port_deallocate (__mach_task_self (), oldfile); if (err) return __hurd_fail (err); diff -ruN glibc-1.06/sysdeps/mach/hurd/__lseek.c glibc-1.07/sysdeps/mach/hurd/__lseek.c --- glibc-1.06/sysdeps/mach/hurd/__lseek.c Sun May 3 15:53:44 1992 +++ glibc-1.07/sysdeps/mach/hurd/__lseek.c Sat Oct 30 15:31:25 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Seek to OFFSET on FD, starting from WHENCE. */ off_t @@ -25,8 +26,7 @@ DEFUN(__lseek, (fd, offset, whence), int fd AND off_t offset AND int whence) { error_t err; - if (err = _HURD_DPORT_USE (fd, - __file_seek (port, offset, whence, &offset))) + if (err = _HURD_DPORT_USE (fd, __io_seek (port, offset, whence, &offset))) return __hurd_dfail (fd, err); return offset; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__lstat.c glibc-1.07/sysdeps/mach/hurd/__lstat.c --- glibc-1.06/sysdeps/mach/hurd/__lstat.c Sun May 3 16:08:19 1992 +++ glibc-1.07/sysdeps/mach/hurd/__lstat.c Fri Dec 17 18:48:14 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -20,12 +20,14 @@ #include #include #include +#include +#include int DEFUN(__lstat, (file, buf), CONST char *file AND struct stat *buf) { error_t err; - file_t port = __path_lookup (file, FS_LOOKUP_NOTRANS, 0); + file_t port = __path_lookup (file, O_NOTRANS, 0); if (port == MACH_PORT_NULL) return -1; err = __io_stat (port, buf); diff -ruN glibc-1.06/sysdeps/mach/hurd/__mkdir.c glibc-1.07/sysdeps/mach/hurd/__mkdir.c --- glibc-1.06/sysdeps/mach/hurd/__mkdir.c Wed Oct 23 20:37:13 1991 +++ glibc-1.07/sysdeps/mach/hurd/__mkdir.c Thu Jan 6 01:37:36 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993, 1994 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 @@ -28,7 +28,7 @@ { error_t err; const char *name; - file_t parent = __path_split (path, &name); + file_t parent = __path_split (path, (char **) &name); if (parent == MACH_PORT_NULL) return -1; err = __dir_mkdir (parent, name, mode); diff -ruN glibc-1.06/sysdeps/mach/hurd/__mknod.c glibc-1.07/sysdeps/mach/hurd/__mknod.c --- glibc-1.06/sysdeps/mach/hurd/__mknod.c Sun Mar 22 01:36:25 1992 +++ glibc-1.07/sysdeps/mach/hurd/__mknod.c Thu Jan 6 12:48:14 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -20,6 +20,8 @@ #include #include #include +#include +#include /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor @@ -28,11 +30,10 @@ DEFUN(__mknod, (path, mode, dev), CONST char *path AND mode_t mode AND dev_t dev) { - const char *name; file_t node; error_t err; const char *translator; - size_t n; + unsigned int n; if (S_ISCHR (mode)) translator = _HURD_CHRDEV; @@ -46,20 +47,16 @@ return -1; } - node = __path_lookup (path, - FS_LOOKUP_CREATE|FS_LOOKUP_EXCL|FS_LOOKUP_WRITE, - mode & 0777, - &node); + node = __path_lookup (path, O_WRITE|O_CREAT|O_EXCL, mode & 0777); if (node == MACH_PORT_NULL) return -1; - err = __file_set_translator (node, - FS_GOAWAY_DONT, + err = __file_set_translator (node, FS_TRANS_EXCL, 0, translator, strlen (translator) + 1, MACH_PORT_NULL); if (!err) - err = __io_write (node, &dev, sizeof (dev), &n); + err = __io_write (node, (void *) &dev, sizeof (dev), -1, &n); if (!err && n != sizeof (dev)) err = EIO; diff -ruN glibc-1.06/sysdeps/mach/hurd/__open.c glibc-1.07/sysdeps/mach/hurd/__open.c --- glibc-1.06/sysdeps/mach/hurd/__open.c Sun Mar 22 01:58:47 1992 +++ glibc-1.07/sysdeps/mach/hurd/__open.c Tue Dec 14 17:37:53 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -27,27 +27,9 @@ int DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS) { - error_t err; mode_t mode; - int fl; - io_t port, ctty; + io_t port; - switch (oflag & O_ACCMODE) - { - case O_RDONLY: - fl = FS_LOOKUP_READ; - break; - case O_WRONLY: - fl = FS_LOOKUP_WRITE; - break; - case O_RDWR: - fl = FS_LOOKUP_READ | FS_LOOKUP_WRITE; - break; - default: - errno = EINVAL; - return -1; - } - if (oflag & O_CREAT) { va_list arg; @@ -54,77 +36,13 @@ va_start (arg, oflag); mode = va_arg (arg, mode_t); va_end (arg); - fl |= FS_LOOKUP_CREATE; } else mode = 0; - if (oflag & O_NDELAY) - fl |= FS_LOOKUP_NDELAY; - if (oflag & O_APPEND) - fl |= FS_LOOKUP_APPEND; - if (oflag & O_CREATE) - fl |= FS_LOOKUP_CREATE; - if (oflag & O_TRUNC) - fl |= FS_LOOKUP_TRUNC; - if (oflag & O_EXCL) - fl |= FS_LOOKUP_EXCL; - - port = __path_lookup (file, fl, mode); + port = __path_lookup (file, oflag, mode); if (port == MACH_PORT_NULL) return -1; - ctty = MACH_PORT_NULL; - if (!(oflag & O_NOCTTY)) - { - io_statbuf_t stb; - - err = __io_stat (port, &stb); - if (!err) - { - io_t fg_port = MACH_PORT_NULL; - - __mutex_lock (&_hurd_ctty_lock); - if (_hurd_ctty_fstype == 0) - { - /* We have no controlling tty. - Try to make this it. */ - mach_port_t cttyid; - err = __term_getctty (port, &cttyid); - if (!err) - { - err = __term_become_ctty (port, _hurd_pid, _hurd_pgrp, - _hurd_sigport, &fg_port); - if (err) - __mach_port_deallocate (__mach_task_self (), cttyid); - } - } - else if (stb.stb_fstype == _hurd_ctty_fstype && - stb.stb_fsid.val[0] == _hurd_ctty_fsid.val[0] && - stb.stb_fsid.val[1] == _hurd_ctty_fsid.val[1] && - stb.stb_fileno == _hurd_ctty_fileno) - /* This is our controlling tty. */ - err = __term_become_ctty (port, _hurd_pid, _hurd_pgrp, - _hurd_sigport, &fg_port); - - if (fg_port != MACH_PORT_NULL) - { - int fd = _hurd_dalloc (fg_port, port, 0); - if (fd >= 0 && _hurd_ctty_fstype == 0) - { - /* We have a new controlling tty. */ - _hurd_ctty_port = cttyid; - _hurd_ctty_fstype = stb.stb_fstype; - _hurd_ctty_fsid = stb.stb_fsid; - _hurd_ctty_fileno = stb.stb_fileno; - } - __mutex_unlock (&_hurd_ctty_lock); - return fd; - } - else - __mutex_unlock (&_hurd_ctty_lock); - } - } - - return _hurd_dalloc (port, MACH_PORT_NULL, 0); + return _hurd_intern_fd (port, oflag, 1); } diff -ruN glibc-1.06/sysdeps/mach/hurd/__pipe.c glibc-1.07/sysdeps/mach/hurd/__pipe.c --- glibc-1.06/sysdeps/mach/hurd/__pipe.c Sun Mar 22 02:01:25 1992 +++ glibc-1.07/sysdeps/mach/hurd/__pipe.c Sat Dec 25 02:51:36 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -21,6 +21,8 @@ #include #include #include +#include +#include /* Create a one-way communication channel (pipe). If successul, two file descriptors are stored in FDS; @@ -36,10 +38,13 @@ if (fds == NULL) return __hurd_fail (EINVAL); - server = _hurd_socket_server (AF_LOCAL); - if (server == NULL) + /* Find the file domain socket server. */ + server = _hurd_socket_server (AF_FILE); + if (server == MACH_PORT_NULL) return -1; + /* Create two file domain sockets and connect them together. */ + if (err = __socket_create (server, SOCK_STREAM, 0, &sock1)) return __hurd_fail (err); if (err = __socket_create (server, SOCK_STREAM, 0, &sock2)) @@ -53,20 +58,22 @@ __mach_port_deallocate (__mach_task_self (), sock2); return __hurd_fail (err); } + + /* Shut down the unused sides of the sockets. */ __socket_shutdown (sock1, 1); __socket_shutdown (sock2, 0); - d1 = _hurd_dalloc (sock1, MACH_PORT_NULL, 0); + /* Put the sockets into file descriptors. */ + + d1 = _hurd_intern_fd (sock1, 0, 1); if (d1 < 0) - { - __mach_port_deallocate (__mach_task_self (), sock2); - return -1; - } - d2 = _hurd_dalloc (sock2, MACH_PORT_NULL, 0); + return -1; + d2 = _hurd_intern_fd (sock2, 0, 1); if (d2 < 0) { + err = errno; (void) close (d1); - return __hurd_fail (EMFILE); + return __hurd_fail (err); } fds[0] = d1; diff -ruN glibc-1.06/sysdeps/mach/hurd/__read.c glibc-1.07/sysdeps/mach/hurd/__read.c --- glibc-1.06/sysdeps/mach/hurd/__read.c Mon Feb 22 16:29:45 1993 +++ glibc-1.07/sysdeps/mach/hurd/__read.c Sat Oct 30 15:34:31 1993 @@ -28,7 +28,7 @@ { error_t err; char *data; - size_t nread; + mach_msg_type_size_t nread; data = buf; _HURD_DPORT_USE @@ -38,6 +38,9 @@ err = __io_read (port, &data, &nread, -1, nbytes); if (ctty != MACH_PORT_NULL && err == EBACKGROUND) { +#if 1 + abort (); +#else struct _hurd_sigstate *ss = _hurd_thread_sigstate (__mach_thread_self ()); if (_hurd_orphaned || @@ -59,7 +62,9 @@ else err = EINTR; /* XXX Is this right? */ } +#endif } + 0; })); if (err) @@ -68,7 +73,7 @@ if (data != buf) { memcpy (buf, data, nread); - __vm_deallocate (__mach_task_self (), data, nread); + __vm_deallocate (__mach_task_self (), (vm_address_t) data, nread); } return nread; diff -ruN glibc-1.06/sysdeps/mach/hurd/__readlink.c glibc-1.07/sysdeps/mach/hurd/__readlink.c --- glibc-1.06/sysdeps/mach/hurd/__readlink.c Wed Mar 25 19:32:41 1992 +++ glibc-1.07/sysdeps/mach/hurd/__readlink.c Fri Dec 17 18:48:13 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -21,38 +21,47 @@ #include #include #include +#include +#include /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ -int +ssize_t DEFUN(__readlink, (path, buf, len), CONST char *path AND char *buf AND size_t len) { error_t err; file_t file; + struct stat st; + char *p; - file = __path_lookup (path, FS_LOOKUP_READ|FS_LOOKUP_NOTRANS, 0); + file = __path_lookup (path, O_READ|O_NOTRANS, 0); if (file == MACH_PORT_NULL) return -1; - p = buf; - while (len > 0) + err = __io_stat (file, &st); + if (! err && ! S_ISLNK (st.st_mode)) + err = EINVAL; + + if (! err) { - char *s = p; - size_t nread = len; - err = __io_read (file, &s, &nread); - if (err) - break; - if (nread == 0) - break; - if (s != p) + p = buf; + while (len > 0) { - memcpy (p, s, nread); - __vm_deallocate (__mach_task_self (), s, nread); + char *s = p; + mach_msg_type_number_t nread; + err = __io_read (file, &s, &nread, p - buf, len); + if (err || nread == 0) + break; + if (s != p) + { + memcpy (p, s, nread); + __vm_deallocate (__mach_task_self (), (vm_address_t) s, nread); + } + len -= nread; + p += nread; } - len -= nread; - p += nread; } __mach_port_deallocate (__mach_task_self (), file); diff -ruN glibc-1.06/sysdeps/mach/hurd/__rmdir.c glibc-1.07/sysdeps/mach/hurd/__rmdir.c --- glibc-1.06/sysdeps/mach/hurd/__rmdir.c Wed Mar 25 19:33:15 1992 +++ glibc-1.07/sysdeps/mach/hurd/__rmdir.c Thu Jan 6 01:37:59 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -28,7 +28,7 @@ { error_t err; const char *name; - file_t parent = __path_split (path, &name); + file_t parent = __path_split (path, (char **) &name); if (parent == MACH_PORT_NULL) return -1; err = __dir_rmdir (parent, name); diff -ruN glibc-1.06/sysdeps/mach/hurd/__select.c glibc-1.07/sysdeps/mach/hurd/__select.c --- glibc-1.06/sysdeps/mach/hurd/__select.c Tue Apr 21 01:35:11 1992 +++ glibc-1.07/sysdeps/mach/hurd/__select.c Thu Jan 6 12:46:58 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -19,8 +19,11 @@ #include #include #include +#include #include +#define SELECT_DONE_MSGID 23016 /* XXX */ + /* Check the first NFDS descriptors each in READFDS (if not NULL) for read readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out @@ -35,9 +38,9 @@ mach_port_t port; int got; struct _hurd_dtable dtable; - int dealloc_dtable; *dealloc, *types; + int dealloc_dtable, *dealloc, *types; mach_port_t *ports; - struct _hurd_fd *cells; + struct _hurd_fd **cells; error_t err; @@ -49,14 +52,12 @@ if (exceptfds != NULL) *(volatile fd_set *) exceptfds; - if (timeout != NULL && timeout->tv_sec == 0 && timeval->tv_usec == 0) + if (timeout != NULL && timeout->tv_sec == 0 && timeout->tv_usec == 0) + /* We just want to poll, so we don't need a receive right. */ port = MACH_PORT_NULL; else - { - /* Get a port to receive io_select_done messages on. */ - __mach_port_allocate (__mach_task_self (), - MACH_PORT_RIGHT_RECEIVE, &port); - } + /* Get a port to receive the io_select_done message on. */ + port = __mach_reply_port (); dtable = _hurd_dtable_use (&dealloc_dtable); @@ -84,8 +85,9 @@ ports[i] = _hurd_port_locked_get (&cells[i]->port, &dealloc[i]); if (ports[i] == MACH_PORT_NULL) { + /* If one descriptor is bogus, we fail completely. */ while (i-- > 0) - _hurd_port_free (&cells[i]->port, &dealloc[i]); + _hurd_port_free (&cells[i]->port, &dealloc[i], ports[i]); _hurd_dtable_done (dtable, &dealloc_dtable); errno = EBADF; return -1; @@ -105,11 +107,14 @@ if (types[i]) ++got; } - _hurd_port_free (&cells[i]->port, ports[i], &dealloc[i]); + _hurd_port_free (&cells[i]->port, &dealloc[i], ports[i]); } if (!err && got == 0 && port != MACH_PORT_NULL) { + /* Now wait for select_done messages on PORT, + timing out as appropriate. */ + struct { mach_msg_header_t head; @@ -118,14 +123,14 @@ mach_msg_type_t tag_type; int tag; } msg; - mach_msg_timeout_t timeout = (timeval != NULL ? - (timeval->tv_sec * 1000 + - timeval->tv_usec / 1000) : - 0); - mach_msg_option_t options = (timeval == NULL ? 0 : MACH_RCV_TIMEOUT); + const mach_msg_timeout_t to = (timeout != NULL ? + (timeout->tv_sec * 1000 + + timeout->tv_usec / 1000) : + 0); + mach_msg_option_t options = (timeout == NULL ? 0 : MACH_RCV_TIMEOUT); receive: switch (err = __mach_msg (&msg, MACH_RCV_MSG | options, 0, sizeof (msg), - port, timeout, MACH_PORT_NULL)) + port, to, MACH_PORT_NULL)) { case MACH_MSG_SUCCESS: { @@ -138,13 +143,14 @@ (msg.result & (SELECT_READ|SELECT_WRITE|SELECT_URG)) && msg.tag >= 0 && msg.tag < nfds) { - types[i] = msg.result; - ++got; - if (msg.msgh_remote_port != MACH_PORT_NULL) + if (types[msg.tag] == 0) + ++got; + types[msg.tag] |= msg.result; + if (msg.head.msgh_remote_port != MACH_PORT_NULL) { msg.head.msgh_id += 100; msg.result_type = inttype; - msg.result = POSIX_SUCCESS; + msg.result = 0; options = MACH_SEND_MSG | MACH_RCV_TIMEOUT; } } @@ -172,7 +178,7 @@ If the port were reused, that notification could confuse the next select call to use the port. The notification might be valid, but the descriptor may have changed to a different server. */ - __mach_port_destroy (port); + __mach_port_destroy (__mach_task_self (), port); if (err) return __hurd_fail (err); @@ -196,7 +202,6 @@ FD_SET (i, exceptfds); else FD_CLR (i, exceptfds); - ++got; } return got; diff -ruN glibc-1.06/sysdeps/mach/hurd/__setgid.c glibc-1.07/sysdeps/mach/hurd/__setgid.c --- glibc-1.06/sysdeps/mach/hurd/__setgid.c Tue May 5 23:23:17 1992 +++ glibc-1.07/sysdeps/mach/hurd/__setgid.c Fri Dec 17 18:05:20 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,9 +19,11 @@ #include #include #include +#include +#include /* Set the group ID of the calling process to UID. - If the calling process is the super-group, the real + If the calling process is the super-user, the real and effective group IDs, and the saved set-group-ID to UID; if not, the effective group ID is set to GID. */ int @@ -28,56 +30,40 @@ DEFUN(__setgid, (gid), gid_t gid) { auth_t newauth; - int i; + error_t err; - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) - { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; - } - - for (i = 0; i < _hurd_id.ngroups; ++i) - if (_hurd_id.gids[i] == gid) - { - /* We already have this gid. Swap it with gids[0] - so getegid will return it. */ - _hurd_id.gids[i] = _hurd_id.gids[0]; - break; - } + __mutex_lock (&_hurd_id.lock); + err = _hurd_check_ids (); - if (i == _hurd_id.ngroups) + if (!err) { - if (_hurd_id.ngroups == (sizeof (_hurd_id.gids) / - sizeof (_hurd_id.gids[0]))) - { - __mutex_unlock (&_hurd_idlock); - errno = ENOMEM; /* XXX ? */ - return -1; - } - else - { - _hurd_id.gids[_hurd_id.ngroups++] = _hurd_id.gids[0]; - _hurd_id.gids[0] = gid; - } - } - - _hurd_id.rgid = _hurd_id.gids[0]; + /* Make a new auth handle which has GID as the real gid, + and as the first element in the list of effective gids. */ - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); + gid_t newgen[_hurd_id.gen.ngids + 1]; + gid_t newaux[_hurd_id.aux.ngids]; + + newgen[0] = gid; + memcpy (&newgen[1], _hurd_id.gen.gids, + _hurd_id.gen.ngids * sizeof (gid_t)); + newaux[0] = gid; + memcpy (&newaux[1], _hurd_id.aux.gids, + (_hurd_id.aux.ngids - 1) * sizeof (gid_t)); + + err = __USEPORT (AUTH, __auth_makeauth + (port, NULL, 0, MACH_MSG_TYPE_COPY_SEND, + _hurd_id.gen.uids, _hurd_id.gen.nuids, + _hurd_id.aux.uids, _hurd_id.aux.nuids, + newgen, 1 + _hurd_id.gen.ngids, + newaux, _hurd_id.aux.ngids, + &newauth)); + } + __mutex_unlock (&_hurd_id.lock); if (err) return __hurd_fail (err); + /* Install the new handle and reauthenticate everything. */ err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); return err; diff -ruN glibc-1.06/sysdeps/mach/hurd/__setpgrp.c glibc-1.07/sysdeps/mach/hurd/__setpgrp.c --- glibc-1.06/sysdeps/mach/hurd/__setpgrp.c Wed Mar 25 19:57:59 1992 +++ glibc-1.07/sysdeps/mach/hurd/__setpgrp.c Wed Oct 27 18:56:28 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. @@ -26,9 +27,7 @@ int DEFUN(__setpgrp, (pid, pgid), pid_t pid AND pid_t pgid) { - error_t err = _HURD_PORT_USE (&_hurd_proc, + error_t err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], __proc_setpgrp (port, pid, pgid)); - if (err) - return __hurd_fail (err); - return 0; + return err ? __hurd_fail (err) : 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__setregid.c glibc-1.07/sysdeps/mach/hurd/__setregid.c --- glibc-1.06/sysdeps/mach/hurd/__setregid.c Thu Apr 2 00:43:39 1992 +++ glibc-1.07/sysdeps/mach/hurd/__setregid.c Fri Dec 17 18:40:42 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,62 +18,47 @@ #include #include +#include #include +#include int __setregid (gid_t rgid, gid_t egid) { auth_t newauth; - int i; + error_t err; __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) - { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; - } - - for (i = 0; i < _hurd_id.ngroups; ++i) - if (_hurd_id.gids[i] == egid) - { - /* We already have this egid. Swap it with gids[0] - so getgid will return it. */ - _hurd_id.gids[i] = _hurd_id.gids[0]; - break; - } + err = _hurd_check_ids (); - if (i == _hurd_id.ngroups) + if (!err) { - if (_hurd_id.ngroups == (sizeof (_hurd_id.gids) / - sizeof (_hurd_id.gids[0]))) - { - __mutex_unlock (&_hurd_idlock); - errno = ENOMEM; /* XXX ? */ - return -1; - } - else - { - _hurd_id.gids[_hurd_id.ngroups++] = _hurd_id.gids[0]; - _hurd_id.gids[0] = egid; - } - } - - _hurd_id.rgid = rgid; + /* Make a new auth handle which has RGID as the real gid, + and EGID as the first element in the list of effective gids. */ - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); + size_t ngen = _hurd_id.gen.ngids < 1 ? 1 : _hurd_id.gen.ngids; + size_t naux = _hurd_id.aux.ngids < 1 ? 1 : _hurd_id.aux.ngids; + gid_t newaux[naux], newgen[ngen]; + + newgen[0] = egid; + memcpy (&newgen[1], _hurd_id.gen.gids, (ngen - 1) * sizeof (gid_t)); + newaux[0] = rgid; + memcpy (&newaux[1], _hurd_id.aux.gids, (naux - 1) * sizeof (gid_t)); + + err = __USEPORT (AUTH, __auth_makeauth + (port, NULL, 0, MACH_MSG_TYPE_COPY_SEND, + _hurd_id.gen.gids, _hurd_id.gen.ngids, + _hurd_id.aux.gids, _hurd_id.aux.ngids, + newgen, ngen, + newaux, naux, + &newauth)); + } + __mutex_unlock (&_hurd_id.lock); if (err) return __hurd_fail (err); + /* Install the new handle and reauthenticate everything. */ err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); return err; diff -ruN glibc-1.06/sysdeps/mach/hurd/__setreuid.c glibc-1.07/sysdeps/mach/hurd/__setreuid.c --- glibc-1.06/sysdeps/mach/hurd/__setreuid.c Thu Apr 2 00:43:42 1992 +++ glibc-1.07/sysdeps/mach/hurd/__setreuid.c Fri Dec 17 18:40:14 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,61 +18,47 @@ #include #include +#include #include +#include int __setreuid (uid_t ruid, uid_t euid) { auth_t newauth; - int i; + error_t err; __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) - { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; - } - - for (i = 0; i < _hurd_id.nuids; ++i) - if (_hurd_id.uids[i] == euid) - { - /* We already have this euid. Swap it with uids[0] - so getuid will return it. */ - _hurd_id.uids[i] = _hurd_id.uids[0]; - break; - } + err = _hurd_check_ids (); - if (i == _hurd_id.nuids) + if (!err) { - if (_hurd_id.nuids == sizeof (_hurd_id.uids) / sizeof (_hurd_id.uids[0])) - { - __mutex_unlock (&_hurd_idlock); - errno = ENOMEM; /* XXX ? */ - return -1; - } - else - { - _hurd_id.uids[_hurd_id.nuids++] = _hurd_id.uids[0]; - _hurd_id.uids[0] = euid; - } - } - - _hurd_id.ruid = ruid; + /* Make a new auth handle which has RUID as the real uid, + and EUID as the first element in the list of effective uids. */ - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); + size_t ngen = _hurd_id.gen.nuids < 1 ? 1 : _hurd_id.gen.nuids; + size_t naux = _hurd_id.aux.nuids < 1 ? 1 : _hurd_id.aux.nuids; + uid_t newaux[naux], newgen[ngen]; + + newgen[0] = euid; + memcpy (&newgen[1], _hurd_id.gen.uids, (ngen - 1) * sizeof (uid_t)); + newaux[0] = ruid; + memcpy (&newaux[1], _hurd_id.aux.uids, (naux - 1) * sizeof (uid_t)); + + err = __USEPORT (AUTH, __auth_makeauth + (port, NULL, 0, MACH_MSG_TYPE_COPY_SEND, + newgen, ngen, + newaux, naux, + _hurd_id.gen.gids, _hurd_id.gen.ngids, + _hurd_id.aux.gids, _hurd_id.aux.ngids, + &newauth)); + } + __mutex_unlock (&_hurd_id.lock); if (err) return __hurd_fail (err); + /* Install the new handle and reauthenticate everything. */ err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); return err; diff -ruN glibc-1.06/sysdeps/mach/hurd/__setsid.c glibc-1.07/sysdeps/mach/hurd/__setsid.c --- glibc-1.06/sysdeps/mach/hurd/__setsid.c Wed Mar 25 20:00:08 1992 +++ glibc-1.07/sysdeps/mach/hurd/__setsid.c Wed Oct 27 18:56:09 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Create a new session with the calling process as its leader. @@ -27,8 +28,7 @@ int DEFUN_VOID(__setsid) { - error_t err = _HURD_PORT_USE (&_hurd_proc, __proc_setsid (port)); - if (err) - return __hurd_fail (err); - return 0; + error_t err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_setsid (port)); + return err ? __hurd_fail (err) : 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__settod.c glibc-1.07/sysdeps/mach/hurd/__settod.c --- glibc-1.06/sysdeps/mach/hurd/__settod.c Wed Mar 25 20:00:46 1992 +++ glibc-1.07/sysdeps/mach/hurd/__settod.c Tue Oct 26 18:32:15 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Set the current time of day and timezone information. This call is restricted to the super-user. */ @@ -27,7 +28,7 @@ CONST struct timeval *tv AND CONST struct timezone *tz) { error_t err; - mach_port_t hostpriv; + mach_port_t hostpriv, devmaster; if (tz != NULL) { @@ -35,11 +36,14 @@ return -1; } - hostpriv = __pid2task (-1); - if (hostpriv == MACH_PORT_NULL) - return -1; - - err = __host_set_time (hostpriv, tv); + if (err = __USEPORT (PROC, __proc_getprivports (port, + &hostpriv, &devmaster))) + return __hurd_fail (err); + __mach_port_deallocate (__mach_task_self (), devmaster); + + /* `time_value_t' and `struct timeval' are in fact identical with the + names changed. */ + err = __host_set_time (hostpriv, *(time_value_t *) tv); __mach_port_deallocate (__mach_task_self (), hostpriv); if (err) diff -ruN glibc-1.06/sysdeps/mach/hurd/__setuid.c glibc-1.07/sysdeps/mach/hurd/__setuid.c --- glibc-1.06/sysdeps/mach/hurd/__setuid.c Tue May 5 23:23:02 1992 +++ glibc-1.07/sysdeps/mach/hurd/__setuid.c Fri Dec 17 18:05:22 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,8 @@ #include #include #include +#include +#include /* Set the user ID of the calling process to UID. If the calling process is the super-user, the real @@ -28,55 +30,40 @@ DEFUN(__setuid, (uid), uid_t uid) { auth_t newauth; - int i; + error_t err; __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) - { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; - } - - for (i = 0; i < _hurd_id.nuids; ++i) - if (_hurd_id.uids[i] == uid) - { - /* We already have this uid. Swap it with uids[0] - so geteuid will return it. */ - _hurd_id.uids[i] = _hurd_id.uids[0]; - break; - } + err = _hurd_check_ids (); - if (i == _hurd_id.nuids) + if (!err) { - if (_hurd_id.nuids == sizeof (_hurd_id.uids) / sizeof (_hurd_id.uids[0])) - { - __mutex_unlock (&_hurd_idlock); - errno = ENOMEM; /* ? */ - return -1; - } - else - { - _hurd_id.uids[_hurd_id.nuids++] = _hurd_id.uids[0]; - _hurd_id.uids[0] = uid; - } - } - - _hurd_id.ruid = _hurd_id.uids[0]; + /* Make a new auth handle which has UID as the real uid, + and as the first element in the list of effective uids. */ - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); + uid_t newgen[_hurd_id.gen.nuids + 1]; + uid_t newaux[_hurd_id.aux.nuids]; + + newgen[0] = uid; + memcpy (&newgen[1], _hurd_id.gen.uids, + _hurd_id.gen.nuids * sizeof (uid_t)); + newaux[0] = uid; + memcpy (&newaux[1], _hurd_id.aux.uids, + (_hurd_id.aux.nuids - 1) * sizeof (uid_t)); + + err = __USEPORT (AUTH, __auth_makeauth + (port, NULL, 0, MACH_MSG_TYPE_COPY_SEND, + _hurd_id.gen.uids, _hurd_id.gen.nuids, + _hurd_id.aux.uids, _hurd_id.aux.nuids, + newgen, 1 + _hurd_id.gen.nuids, + newaux, _hurd_id.aux.nuids, + &newauth)); + } + __mutex_unlock (&_hurd_id.lock); if (err) return __hurd_fail (err); + /* Install the new handle and reauthenticate everything. */ err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); return err; diff -ruN glibc-1.06/sysdeps/mach/hurd/__sigact.c glibc-1.07/sysdeps/mach/hurd/__sigact.c --- glibc-1.06/sysdeps/mach/hurd/__sigact.c Wed Mar 25 20:03:40 1992 +++ glibc-1.07/sysdeps/mach/hurd/__sigact.c Tue Dec 21 03:14:53 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -32,7 +32,7 @@ if (sig <= 0 || sig >= NSIG || (act != NULL && act->sa_handler != SIG_DFL && - ((__sigmask (sig) & _SIG_CANT_IGNORE) || + ((__sigmask (sig) & _SIG_CANT_MASK) || act->sa_handler == SIG_ERR))) { errno = EINVAL; @@ -45,8 +45,12 @@ ss = _hurd_thread_sigstate (__mach_thread_self ()); - if (sig == SIGCHLD && act != NULL) - __proc_mark_nostopchild (_hurd_proc, a.sa_flags & SA_NOCLDSTOP); + if (act != NULL && sig == SIGCHLD) + /* Inform the proc server whether or not it should send us SIGCHLD for + stopped children. We do this with SS->lock held so that no SIGCHLD + can arrive in the middle and be of indeterminate status. */ + __USEPORT (PROC, + __proc_mod_stopchild (port, !(a.sa_flags & SA_NOCLDSTOP))); old = ss->actions[sig]; diff -ruN glibc-1.06/sysdeps/mach/hurd/__sigproc.c glibc-1.07/sysdeps/mach/hurd/__sigproc.c --- glibc-1.06/sysdeps/mach/hurd/__sigproc.c Wed Mar 25 20:06:35 1992 +++ glibc-1.07/sysdeps/mach/hurd/__sigproc.c Wed Nov 3 11:06:05 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* If SET is not NULL, modify the current set of blocked signals @@ -28,6 +29,7 @@ DEFUN(__sigprocmask, (how, set, oset), int how AND CONST sigset_t *set AND sigset_t *oset) { +#ifdef notyet struct _hurd_sigstate *ss; sigset_t old, new; @@ -62,7 +64,7 @@ return -1; } - ss->blocked &= ~_SIG_CANT_BLOCK; + ss->blocked &= ~_SIG_CANT_MASK; if (ss->pending & ~ss->blocked) /* XXX deliver pending signals */ @@ -74,5 +76,6 @@ if (oset != NULL) *oset = old; +#endif return 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__stat.c glibc-1.07/sysdeps/mach/hurd/__stat.c --- glibc-1.06/sysdeps/mach/hurd/__stat.c Sun May 3 16:07:23 1992 +++ glibc-1.07/sysdeps/mach/hurd/__stat.c Sat Oct 30 15:34:32 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -20,6 +20,7 @@ #include #include #include +#include /* Get file information about FILE in BUF. */ int diff -ruN glibc-1.06/sysdeps/mach/hurd/__symlink.c glibc-1.07/sysdeps/mach/hurd/__symlink.c --- glibc-1.06/sysdeps/mach/hurd/__symlink.c Wed Mar 25 20:11:05 1992 +++ glibc-1.07/sysdeps/mach/hurd/__symlink.c Tue Dec 21 00:44:33 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -21,6 +21,8 @@ #include #include #include +#include +#include /* Make a link to FROM called TO. */ int @@ -28,28 +30,28 @@ { error_t err; file_t node; + size_t to_write; - node = __path_lookup (to, FS_LOOKUP_CREATE|FS_LOOKUP_WRITE|FS_LOOKUP_EXCL, + node = __path_lookup (to, O_WRITE|O_CREAT|O_EXCL, 0777 & _hurd_umask); if (node == MACH_PORT_NULL) return -1; - if (!err) + to_write = strlen (from); + + while (to_write > 0) { - size_t to_write = strlen (from); - while (to_write > 0) - { - size_t wrote; - if (err = __io_write (node, from, to_write, -1, &wrote)) - break; - to_write -= wrote; - from += wrote; - } + mach_msg_type_number_t wrote; + if (err = __io_write (node, from, to_write, -1, &wrote)) + break; + to_write -= wrote; + from += wrote; } if (!err) err = __file_set_translator (node, FS_TRANS_EXCL, 0, - _HURD_SYMLINK, MACH_PORT_NULL); + _HURD_SYMLINK, sizeof (_HURD_SYMLINK), + MACH_PORT_NULL); /* XXX can leave half-finished file */ diff -ruN glibc-1.06/sysdeps/mach/hurd/__unlink.c glibc-1.07/sysdeps/mach/hurd/__unlink.c --- glibc-1.06/sysdeps/mach/hurd/__unlink.c Wed Mar 25 20:16:45 1992 +++ glibc-1.07/sysdeps/mach/hurd/__unlink.c Thu Jan 6 01:38:23 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -31,7 +31,7 @@ file_t dir; CONST char *file; - dir = __path_split (name, &file); + dir = __path_split (name, (char **) &file); if (dir == MACH_PORT_NULL) return -1; diff -ruN glibc-1.06/sysdeps/mach/hurd/__utimes.c glibc-1.07/sysdeps/mach/hurd/__utimes.c --- glibc-1.06/sysdeps/mach/hurd/__utimes.c Wed Mar 25 20:16:42 1992 +++ glibc-1.07/sysdeps/mach/hurd/__utimes.c Wed Dec 22 16:46:52 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -20,6 +20,7 @@ #include #include #include +#include /* Change the access time of FILE to TVP[0] and the modification time of FILE to TVP[1]. */ @@ -31,7 +32,8 @@ file_t f = __path_lookup (file, 0, 0); if (f == MACH_PORT_NULL) return -1; - err = __file_utimes (f, &tvp[0], &tvp[1]); + err = __file_utimes (f, + *(time_value_t *) &tvp[0], *(time_value_t *) &tvp[1]); __mach_port_deallocate (__mach_task_self (), f); if (err) return __hurd_fail (err); diff -ruN glibc-1.06/sysdeps/mach/hurd/__vfork.c glibc-1.07/sysdeps/mach/hurd/__vfork.c --- glibc-1.06/sysdeps/mach/hurd/__vfork.c Sat Nov 16 16:20:01 1991 +++ glibc-1.07/sysdeps/mach/hurd/__vfork.c Thu Jan 6 01:35:56 1994 @@ -16,6 +16,8 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifdef notbloodylikely + #include #include #include @@ -163,3 +165,5 @@ return 0; } + +#endif diff -ruN glibc-1.06/sysdeps/mach/hurd/__wait4.c glibc-1.07/sysdeps/mach/hurd/__wait4.c --- glibc-1.06/sysdeps/mach/hurd/__wait4.c Wed Mar 25 20:13:48 1992 +++ glibc-1.07/sysdeps/mach/hurd/__wait4.c Fri Oct 29 21:57:03 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -24,14 +24,14 @@ pid_t DEFUN(__wait4, (pid, stat_loc, options, usage), - pid_t pid AND union wait *stat_loc AND int options AND PTR usage) + pid_t pid AND int *stat_loc AND int options AND struct rusage *usage) { pid_t dead; error_t err; - err = _HURD_PORT_USE (&_hurd_proc, __proc_wait (port, pid, stat_loc, - options, usage, &dead)); - if (err) - return __hurd_fail (err); - return dead; + err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_wait (port, pid, options, stat_loc, + usage, &dead)); + + return err ? (pid_t) __hurd_fail (err) : dead; } diff -ruN glibc-1.06/sysdeps/mach/hurd/__write.c glibc-1.07/sysdeps/mach/hurd/__write.c --- glibc-1.06/sysdeps/mach/hurd/__write.c Sun May 3 15:53:41 1992 +++ glibc-1.07/sysdeps/mach/hurd/__write.c Tue Dec 14 17:55:10 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -26,37 +26,42 @@ int fd AND CONST PTR buf AND size_t nbytes) { error_t err; - size_t wrote; + mach_msg_type_number_t wrote; + int noctty; - data = buf; -!! _HURD_DPORT_USE +#ifdef notyet + struct _hurd_sigstate *ss + = _hurd_thread_sigstate (__mach_thread_self ()); + + /* Don't use the ctty io port if we are orphaned, or are blocking or + ignoring SIGTTOU. */ + noctty = (_hurd_orphaned || + __sigismember (SIGTTOU, &ss->blocked) || + ss->actions[SIGTTOU].sa_handler == SIG_IGN); + __mutex_unlock (&ss->lock); +#endif + + _HURD_DPORT_USE (fd, ({ call: - err = __io_write (port, buf, nbytes, -1, &wrote); - if (ctty != MACH_PORT_NULL && err == EBACKGROUND) + err = __io_write (noctty ? port : ctty, buf, nbytes, -1, &wrote); + if (!noctty && ctty != MACH_PORT_NULL && err == EBACKGROUND) { - struct _hurd_sigstate *ss - = _hurd_thread_sigstate (__mach_thread_self ()); - if (_hurd_orphaned || - __sigismember (SIGTTOU, &ss->blocked) || - ss->actions[SIGTTOU].sa_handler == SIG_IGN) - { - /* We are orphaned, or are blocking or ignoring SIGTTOU. - Return EIO instead of stopping. */ - __mutex_unlock (&ss->lock); - err = EIO; - } +#if 1 + abort (); +#else + int restart; + __mutex_lock (&ss->lock); + restart = ss->actions[SIGTTOU].sa_flags & SA_RESTART; + _hurd_raise_signal (ss, SIGTTOU, 0); /* Unlocks SS->lock. */ + if (restart) + goto call; else - { - const int restart = ss->actions[SIGTTOU].sa_flags & SA_RESTART; - _hurd_raise_signal (ss, SIGTTOU, 0); /* Unlocks SS->lock. */ - if (restart) - goto call; - else - err = EINTR; /* XXX Is this right? */ - } + err = EINTR; /* XXX Is this right? */ +#endif } + 0; })); if (err) diff -ruN glibc-1.06/sysdeps/mach/hurd/_exit.c glibc-1.07/sysdeps/mach/hurd/_exit.c --- glibc-1.06/sysdeps/mach/hurd/_exit.c Wed Sep 16 17:00:26 1992 +++ glibc-1.07/sysdeps/mach/hurd/_exit.c Mon Dec 13 19:35:49 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -19,12 +19,18 @@ #include #include #include +#include +#include -volatile void +__NORETURN void _hurd_exit (int status) { - _HURD_PORT_USE (&_hurd_proc, __proc_exit (port, status)); +#ifdef notyet + /* Give the proc server our exit status. */ + _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], __proc_exit (port, status)); +#endif + /* Commit suicide. */ __task_terminate (__mach_task_self ()); /* Perhaps the cached mach_task_self was bogus. */ @@ -33,12 +39,16 @@ /* This sucker really doesn't want to die. */ while (1) { +#ifdef LOSE + LOSE; +#else volatile const int zero = 0, one = 1; volatile int lossage = one / zero; +#endif } } -void +__NORETURN void DEFUN(_exit, (status), int status) { _hurd_exit (W_EXITCODE (status, 0)); diff -ruN glibc-1.06/sysdeps/mach/hurd/accept.c glibc-1.07/sysdeps/mach/hurd/accept.c --- glibc-1.06/sysdeps/mach/hurd/accept.c Sun May 3 15:53:40 1992 +++ glibc-1.07/sysdeps/mach/hurd/accept.c Wed Jun 23 18:35:43 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -45,5 +45,5 @@ return __hurd_dfail (fd, err); } - return _hurd_dalloc (new, MACH_PORT_NULL, 0); + return _hurd_intern_fd (new, 0, 1); } diff -ruN glibc-1.06/sysdeps/mach/hurd/chflags.c glibc-1.07/sysdeps/mach/hurd/chflags.c --- glibc-1.06/sysdeps/mach/hurd/chflags.c Thu Apr 2 00:28:43 1992 +++ glibc-1.07/sysdeps/mach/hurd/chflags.c Tue Dec 21 01:04:17 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -20,6 +20,7 @@ #include #include #include +#include /* Change the flags of FILE to FLAGS. */ int diff -ruN glibc-1.06/sysdeps/mach/hurd/chroot.c glibc-1.07/sysdeps/mach/hurd/chroot.c --- glibc-1.06/sysdeps/mach/hurd/chroot.c Thu Apr 2 00:28:40 1992 +++ glibc-1.07/sysdeps/mach/hurd/chroot.c Tue Dec 21 01:04:30 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -21,19 +21,21 @@ #include #include #include +#include /* Change the current root to PATH. */ int DEFUN(chroot, (path), CONST char *path) { - error_t err; - file_t old, crdir; + file_t crdir; - crdir = __path_lookup (path, FS_LOOKUP_EXECUTE, 0); + /* XXX check is dir */ + + crdir = __path_lookup (path, O_EXEC, 0); if (crdir == MACH_PORT_NULL) return -1; - _hurd_port_set (&_hurd_crdir, crdir); + _hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], crdir); return 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/closedir.c glibc-1.07/sysdeps/mach/hurd/closedir.c --- glibc-1.06/sysdeps/mach/hurd/closedir.c +++ glibc-1.07/sysdeps/mach/hurd/closedir.c Tue Dec 21 02:58:54 1993 @@ -0,0 +1,52 @@ +/* Copyright (C) 1993 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 +#include +#include +#include +#include +#include +#include + +/* Close the directory stream DIRP. + Return 0 if successful, -1 if not. */ +int +DEFUN(closedir, (dirp), DIR *dirp) +{ + error_t err; + + if (dirp == NULL) + { + errno = EINVAL; + return -1; + } + + if ((err = __vm_deallocate (__mach_task_self (), + (vm_address_t) dirp->__data, dirp->__allocation)) + || (err = __mach_port_deallocate (__mach_task_self (), dirp->__port))) + { + errno = err; + return -1; + } + + free (dirp); + + return 0; +} + diff -ruN glibc-1.06/sysdeps/mach/hurd/configure glibc-1.07/sysdeps/mach/hurd/configure --- glibc-1.06/sysdeps/mach/hurd/configure +++ glibc-1.07/sysdeps/mach/hurd/configure Tue Aug 3 03:28:22 1993 @@ -0,0 +1,8 @@ +# If configure is passed `--with-hurd=DIR', set `hurd-srcdir' to DIR in +# config.make. + +case z"$with_hurd" in +z | zyes) ;; # Not specified, or specified with no value. +z*) config_vars="$config_vars +hurd-srcdir = $with_hurd" ;; +esac diff -ruN glibc-1.06/sysdeps/mach/hurd/defs.c glibc-1.07/sysdeps/mach/hurd/defs.c --- glibc-1.06/sysdeps/mach/hurd/defs.c Thu Apr 2 00:28:37 1992 +++ glibc-1.07/sysdeps/mach/hurd/defs.c Mon Aug 9 17:02:37 1993 @@ -1,6 +1,9 @@ +#include +#if 0 + /* Definitions of global stdio data structures. -Copyright (C) 1991, 1992 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,9 +36,9 @@ static void init_stdio (void) { - stdin = fdopen (STDIN_FILENO); - stdout = fdopen (STDOUT_FILENO); - stderr = fdopen (STDERR_FILENO); + stdin = __fopenport (__getdport (STDIN_FILENO)); + stdout = __fopenport (__getdport (STDOUT_FILENO)); + stderr = __fopenport (__getdport (STDERR_FILENO)); } text_set_element (__libc_subinit, init_stdio); @@ -53,3 +56,4 @@ (void) fclose ((FILE *) NULL); } text_set_element (__libc_atexit, _cleanup); +#endif /* 0 */ diff -ruN glibc-1.06/sysdeps/mach/hurd/dirstream.h glibc-1.07/sysdeps/mach/hurd/dirstream.h --- glibc-1.06/sysdeps/mach/hurd/dirstream.h +++ glibc-1.07/sysdeps/mach/hurd/dirstream.h Thu Jan 6 01:34:11 1994 @@ -0,0 +1,42 @@ +/* Copyright (C) 1993, 1994 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. */ + +#ifndef _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + +#include + +/* Directory stream type. + + The Hurd directory format is the same as `struct dirent', so `readdir' + returns a pointer into the buffer we read directory data into. */ + +typedef struct + { + /* XXX we need a namespace-clean name for mach_port_t! */ + unsigned int __port; /* Port to the directory. */ + __off_t __filepos; /* Current file position. */ + __off_t __block_size; /* Size to read chunks in (st_blksize). */ + char *__data; /* Directory block. */ + unsigned int __allocation; /* Space allocated for the block. */ + unsigned int __size; /* Total valid data in the block. */ + __off_t __offset; /* Current offset into the block. */ + } DIR; + +#endif /* dirstream.h */ diff -ruN glibc-1.06/sysdeps/mach/hurd/errlist.awk glibc-1.07/sysdeps/mach/hurd/errlist.awk --- glibc-1.06/sysdeps/mach/hurd/errlist.awk Tue May 5 23:51:06 1992 +++ glibc-1.07/sysdeps/mach/hurd/errlist.awk Wed Dec 1 03:32:11 1993 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -22,12 +22,17 @@ # @deftypevr Macro int ENOSYS BEGIN { - print "/* This file is generated from errno.texinfo by sys_errlist.awk. */" + print "/* This file is generated from errno.texi by errlist.awk. */" print ""; + print "#ifndef HAVE_GNU_LD" + print "#define _sys_nerr sys_nerr" + print "#define _sys_errlist sys_errlist" + print "#endif" + print "" print "const char *_sys_errlist[] ="; print " {"; errno = 0; - print " \"Success,\"" + print " \"Success\"," } $1 == "@comment" && $2 == "errno.h" { errnoh=1; next } errnoh == 1 && $1 == "@comment" \ diff -ruN glibc-1.06/sysdeps/mach/hurd/errlist.c glibc-1.07/sysdeps/mach/hurd/errlist.c --- glibc-1.06/sysdeps/mach/hurd/errlist.c +++ glibc-1.07/sysdeps/mach/hurd/errlist.c Tue Jan 4 08:38:57 1994 @@ -0,0 +1,90 @@ +/* This file is generated from errno.texi by errlist.awk. */ + +#ifndef HAVE_GNU_LD +#define _sys_nerr sys_nerr +#define _sys_errlist sys_errlist +#endif + +const char *_sys_errlist[] = + { + "Success", + "Operation not permitted", /* 1 = EPERM */ + "No such file or directory", /* 2 = ENOENT */ + "No such process", /* 3 = ESRCH */ + "Interrupted system call", /* 4 = EINTR */ + "Input/output error", /* 5 = EIO */ + "Device not configured", /* 6 = ENXIO */ + "Argument list too long", /* 7 = E2BIG */ + "Exec format error", /* 8 = ENOEXEC */ + "Bad file descriptor", /* 9 = EBADF */ + "No child processes", /* 10 = ECHILD */ + "Resource deadlock avoided", /* 11 = EDEADLK */ + "Cannot allocate memory", /* 12 = ENOMEM */ + "Permission denied", /* 13 = EACCES */ + "Bad address", /* 14 = EFAULT */ + "Block device required", /* 15 = ENOTBLK */ + "Device busy", /* 16 = EBUSY */ + "File exists", /* 17 = EEXIST */ + "Invalid cross-device link", /* 18 = EXDEV */ + "Operation not supported by device",/* 19 = ENODEV */ + "Not a directory", /* 20 = ENOTDIR */ + "Is a directory", /* 21 = EISDIR */ + "Invalid argument", /* 22 = EINVAL */ + "Too many open files", /* 23 = EMFILE */ + "Too many open files in system", /* 24 = ENFILE */ + "Inappropriate ioctl for device", /* 25 = ENOTTY */ + "Text file busy", /* 26 = ETXTBSY */ + "File too large", /* 27 = EFBIG */ + "No space left on device", /* 28 = ENOSPC */ + "Illegal seek", /* 29 = ESPIPE */ + "Read-only file system", /* 30 = EROFS */ + "Too many links", /* 31 = EMLINK */ + "Broken pipe", /* 32 = EPIPE */ + "Numerical argument out of domain", /* 33 = EDOM */ + "Numerical result out of range", /* 34 = ERANGE */ + "Resource temporarily unavailable", /* 35 = EAGAIN */ + "Operation would block", /* 36 = EWOULDBLOCK */ + "Operation now in progress", /* 37 = EINPROGRESS */ + "Operation already in progress", /* 38 = EALREADY */ + "Socket operation on non-socket", /* 39 = ENOTSOCK */ + "Destination address required", /* 40 = EDESTADDRREQ */ + "Message too long", /* 41 = EMSGSIZE */ + "Protocol wrong type for socket", /* 42 = EPROTOTYPE */ + "Protocol not available", /* 43 = ENOPROTOOPT */ + "Protocol not supported", /* 44 = EPROTONOSUPPORT */ + "Socket type not supported", /* 45 = ESOCKTNOSUPPORT */ + "Operation not supported", /* 46 = EOPNOTSUPP */ + "Protocol family not supported", /* 47 = EPFNOSUPPORT */ + "Address family not supported by protocol family",/* 48 = EAFNOSUPPORT */ + "Address already in use", /* 49 = EADDRINUSE */ + "Can't assign requested address", /* 50 = EADDRNOTAVAIL */ + "Network is down", /* 51 = ENETDOWN */ + "Network is unreachable", /* 52 = ENETUNREACH */ + "Network dropped connection on reset",/* 53 = ENETRESET */ + "Software caused connection abort", /* 54 = ECONNABORTED */ + "Connection reset by peer", /* 55 = ECONNRESET */ + "No buffer space available", /* 56 = ENOBUFS */ + "Socket is already connected", /* 57 = EISCONN */ + "Socket is not connected", /* 58 = ENOTCONN */ + "Can't send after socket shutdown", /* 59 = ESHUTDOWN */ + "Connection timed out", /* 60 = ETIMEDOUT */ + "Connection refused", /* 61 = ECONNREFUSED */ + "Too many levels of symbolic links",/* 62 = ELOOP */ + "File name too long", /* 63 = ENAMETOOLONG */ + "Host is down", /* 64 = EHOSTDOWN */ + "No route to host", /* 65 = EHOSTUNREACH */ + "Directory not empty", /* 66 = ENOTEMPTY */ + "Too many users", /* 67 = EUSERS */ + "Disc quota exceeded", /* 68 = EDQUOT */ + "Stale NFS file handle", /* 69 = ESTALE */ + "Too many levels of remote in path",/* 70 = EREMOTE */ + "No locks available", /* 71 = ENOLCK */ + "Function not implemented", /* 72 = ENOSYS */ + "Inappropriate operation for background process",/* 73 = EBACKGROUND */ + "?", /* 74 = ED */ + "You really blew it this time", /* 75 = EGREGIOUS */ + "Computer bought the farm", /* 76 = EIEIO */ + "Gratuitous error", /* 77 = EGRATUITOUS */ + }; + +const int _sys_nerr = 77; diff -ruN glibc-1.06/sysdeps/mach/hurd/errnos.awk glibc-1.07/sysdeps/mach/hurd/errnos.awk --- glibc-1.06/sysdeps/mach/hurd/errnos.awk Tue May 5 23:48:56 1992 +++ glibc-1.07/sysdeps/mach/hurd/errnos.awk Fri Dec 17 01:27:36 1993 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993 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 @@ -24,7 +24,9 @@ BEGIN { print "/* This file is generated from errno.texinfo by errnos.awk. */"; print ""; - print "#ifdef _ERRNO_H"; + print "#ifdef _ERRNO_H\n"; + print "/* The Hurd uses Mach error system 0x10, currently only subsystem 0. */" + print "#define _HURD_ERRNO(n)\t((0x10 << 26) | ((n) & 0x3fff))"; errno = 0; errnoh = 0; } @@ -42,22 +44,23 @@ e = $4; if (e == "EDOM" || e == "ERANGE") { - print "#endif /* included. */"; - print "#if (!defined (__Emath_defined) && \\\n (defined (_ERRNO_H) || defined (__need_Emath)))"; + print "#endif /* included. */"; + print "#if (!defined (__Emath_defined) && (defined (_ERRNO_H) || defined (__need_Emath)))";\ } s = "#define\t" e; l = 24 - length (s); while (l-- > 0) s = s " "; - printf "%s%d\t/*%s */\n", s, ++errno, etext; + printf "%s_HURD_ERRNO (%d)\t/*%s */\n", s, ++errno, etext; if (e == "EDOM" || e == "ERANGE") { - print "#endif /* Emath not defined and included or need Emath. */"; - print "#ifdef _ERRNO_H" + print "#endif /* Emath not defined and included or need Emath. */"; + print "#ifdef _ERRNO_H"; } next; } { errnoh=0 } END { - print "#endif /* included. */" - } + printf "#define _HURD_ERRNOS %d\n", ++errno; + print "#endif /* included. */" +} diff -ruN glibc-1.06/sysdeps/mach/hurd/errnos.h glibc-1.07/sysdeps/mach/hurd/errnos.h --- glibc-1.06/sysdeps/mach/hurd/errnos.h +++ glibc-1.07/sysdeps/mach/hurd/errnos.h Tue Jan 4 02:31:12 1994 @@ -0,0 +1,93 @@ +/* This file is generated from errno.texinfo by errnos.awk. */ + +#ifdef _ERRNO_H + +/* The Hurd uses Mach error system 0x10, currently only subsystem 0. */ +#define _HURD_ERRNO(n) ((0x10 << 26) | ((n) & 0x3fff)) +#define EPERM _HURD_ERRNO (1) /* Operation not permitted */ +#define ENOENT _HURD_ERRNO (2) /* No such file or directory */ +#define ESRCH _HURD_ERRNO (3) /* No such process */ +#define EINTR _HURD_ERRNO (4) /* Interrupted system call */ +#define EIO _HURD_ERRNO (5) /* Input/output error */ +#define ENXIO _HURD_ERRNO (6) /* Device not configured */ +#define E2BIG _HURD_ERRNO (7) /* Argument list too long */ +#define ENOEXEC _HURD_ERRNO (8) /* Exec format error */ +#define EBADF _HURD_ERRNO (9) /* Bad file descriptor */ +#define ECHILD _HURD_ERRNO (10) /* No child processes */ +#define EDEADLK _HURD_ERRNO (11) /* Resource deadlock avoided */ +#define ENOMEM _HURD_ERRNO (12) /* Cannot allocate memory */ +#define EACCES _HURD_ERRNO (13) /* Permission denied */ +#define EFAULT _HURD_ERRNO (14) /* Bad address */ +#define ENOTBLK _HURD_ERRNO (15) /* Block device required */ +#define EBUSY _HURD_ERRNO (16) /* Device busy */ +#define EEXIST _HURD_ERRNO (17) /* File exists */ +#define EXDEV _HURD_ERRNO (18) /* Invalid cross-device link */ +#define ENODEV _HURD_ERRNO (19) /* Operation not supported by device */ +#define ENOTDIR _HURD_ERRNO (20) /* Not a directory */ +#define EISDIR _HURD_ERRNO (21) /* Is a directory */ +#define EINVAL _HURD_ERRNO (22) /* Invalid argument */ +#define EMFILE _HURD_ERRNO (23) /* Too many open files */ +#define ENFILE _HURD_ERRNO (24) /* Too many open files in system */ +#define ENOTTY _HURD_ERRNO (25) /* Inappropriate ioctl for device */ +#define ETXTBSY _HURD_ERRNO (26) /* Text file busy */ +#define EFBIG _HURD_ERRNO (27) /* File too large */ +#define ENOSPC _HURD_ERRNO (28) /* No space left on device */ +#define ESPIPE _HURD_ERRNO (29) /* Illegal seek */ +#define EROFS _HURD_ERRNO (30) /* Read-only file system */ +#define EMLINK _HURD_ERRNO (31) /* Too many links */ +#define EPIPE _HURD_ERRNO (32) /* Broken pipe */ +#endif /* included. */ +#if (!defined (__Emath_defined) && (defined (_ERRNO_H) || defined (__need_Emath))) +#define EDOM _HURD_ERRNO (33) /* Numerical argument out of domain */ +#endif /* Emath not defined and included or need Emath. */ +#ifdef _ERRNO_H +#endif /* included. */ +#if (!defined (__Emath_defined) && (defined (_ERRNO_H) || defined (__need_Emath))) +#define ERANGE _HURD_ERRNO (34) /* Numerical result out of range */ +#endif /* Emath not defined and included or need Emath. */ +#ifdef _ERRNO_H +#define EAGAIN _HURD_ERRNO (35) /* Resource temporarily unavailable */ +#define EWOULDBLOCK _HURD_ERRNO (36) /* Operation would block */ +#define EINPROGRESS _HURD_ERRNO (37) /* Operation now in progress */ +#define EALREADY _HURD_ERRNO (38) /* Operation already in progress */ +#define ENOTSOCK _HURD_ERRNO (39) /* Socket operation on non-socket */ +#define EDESTADDRREQ _HURD_ERRNO (40) /* Destination address required */ +#define EMSGSIZE _HURD_ERRNO (41) /* Message too long */ +#define EPROTOTYPE _HURD_ERRNO (42) /* Protocol wrong type for socket */ +#define ENOPROTOOPT _HURD_ERRNO (43) /* Protocol not available */ +#define EPROTONOSUPPORT _HURD_ERRNO (44) /* Protocol not supported */ +#define ESOCKTNOSUPPORT _HURD_ERRNO (45) /* Socket type not supported */ +#define EOPNOTSUPP _HURD_ERRNO (46) /* Operation not supported */ +#define EPFNOSUPPORT _HURD_ERRNO (47) /* Protocol family not supported */ +#define EAFNOSUPPORT _HURD_ERRNO (48) /* Address family not supported by protocol family */ +#define EADDRINUSE _HURD_ERRNO (49) /* Address already in use */ +#define EADDRNOTAVAIL _HURD_ERRNO (50) /* Can't assign requested address */ +#define ENETDOWN _HURD_ERRNO (51) /* Network is down */ +#define ENETUNREACH _HURD_ERRNO (52) /* Network is unreachable */ +#define ENETRESET _HURD_ERRNO (53) /* Network dropped connection on reset */ +#define ECONNABORTED _HURD_ERRNO (54) /* Software caused connection abort */ +#define ECONNRESET _HURD_ERRNO (55) /* Connection reset by peer */ +#define ENOBUFS _HURD_ERRNO (56) /* No buffer space available */ +#define EISCONN _HURD_ERRNO (57) /* Socket is already connected */ +#define ENOTCONN _HURD_ERRNO (58) /* Socket is not connected */ +#define ESHUTDOWN _HURD_ERRNO (59) /* Can't send after socket shutdown */ +#define ETIMEDOUT _HURD_ERRNO (60) /* Connection timed out */ +#define ECONNREFUSED _HURD_ERRNO (61) /* Connection refused */ +#define ELOOP _HURD_ERRNO (62) /* Too many levels of symbolic links */ +#define ENAMETOOLONG _HURD_ERRNO (63) /* File name too long */ +#define EHOSTDOWN _HURD_ERRNO (64) /* Host is down */ +#define EHOSTUNREACH _HURD_ERRNO (65) /* No route to host */ +#define ENOTEMPTY _HURD_ERRNO (66) /* Directory not empty */ +#define EUSERS _HURD_ERRNO (67) /* Too many users */ +#define EDQUOT _HURD_ERRNO (68) /* Disc quota exceeded */ +#define ESTALE _HURD_ERRNO (69) /* Stale NFS file handle */ +#define EREMOTE _HURD_ERRNO (70) /* Too many levels of remote in path */ +#define ENOLCK _HURD_ERRNO (71) /* No locks available */ +#define ENOSYS _HURD_ERRNO (72) /* Function not implemented */ +#define EBACKGROUND _HURD_ERRNO (73) /* Inappropriate operation for background process */ +#define ED _HURD_ERRNO (74) /* ? */ +#define EGREGIOUS _HURD_ERRNO (75) /* You really blew it this time */ +#define EIEIO _HURD_ERRNO (76) /* Computer bought the farm */ +#define EGRATUITOUS _HURD_ERRNO (77) /* Gratuitous error */ +#define _HURD_ERRNOS 78 +#endif /* included. */ diff -ruN glibc-1.06/sysdeps/mach/hurd/fchdir.c glibc-1.07/sysdeps/mach/hurd/fchdir.c --- glibc-1.06/sysdeps/mach/hurd/fchdir.c Sun May 3 15:53:35 1992 +++ glibc-1.07/sysdeps/mach/hurd/fchdir.c Tue Dec 14 17:54:46 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -29,13 +29,15 @@ error_t err; file_t cwdir; -!! if (err = _HURD_DPORT_USE (fd, +/* XXX verify that it's a directory */ + + if (err = _HURD_DPORT_USE (fd, __mach_port_mod_refs (__mach_task_self (), (cwdir = port), MACH_PORT_RIGHT_SEND, 1))) return err; - _hurd_port_set (&_hurd_cwdir, cwdir); + _hurd_port_set (&_hurd_ports[INIT_PORT_CWDIR], cwdir); return 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/fchflags.c glibc-1.07/sysdeps/mach/hurd/fchflags.c --- glibc-1.06/sysdeps/mach/hurd/fchflags.c Sun May 3 15:53:33 1992 +++ glibc-1.07/sysdeps/mach/hurd/fchflags.c Tue Dec 21 01:04:15 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -20,6 +20,7 @@ #include #include #include +#include /* Change the flags of the file FD refers to to FLAGS. */ int diff -ruN glibc-1.06/sysdeps/mach/hurd/fcntlbits.h glibc-1.07/sysdeps/mach/hurd/fcntlbits.h --- glibc-1.06/sysdeps/mach/hurd/fcntlbits.h +++ glibc-1.07/sysdeps/mach/hurd/fcntlbits.h Mon Dec 13 19:08:25 1993 @@ -0,0 +1,174 @@ +/* O_*, F_*, FD_* bit values for GNU. +Copyright (C) 1993 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. */ + +#ifndef _FCNTLBITS_H + +#define _FCNTLBITS_H 1 + + +/* File access modes. These are understood by io servers; they can be + passed in `dir_pathtrans', and are returned by `io_get_openmodes'. + Consequently they can be passed to `open', `hurd_path_lookup', and + `path_lookup'; and are returned by `fcntl' with the F_GETFL command. */ + +/* In GNU, read and write are bits (unlike BSD). */ +#ifdef __USE_GNU +#define O_READ O_RDONLY /* Open for reading. */ +#define O_WRITE O_WRONLY /* Open for writing. */ +#define O_EXEC 0x0004 /* Open for execution. */ +#endif +/* POSIX.1 standard names. */ +#define O_RDONLY 0x0001 /* Open read-only. */ +#define O_WRONLY 0x0002 /* Open write-only. */ +#define O_RDWR (O_RDONLY|O_WRONLY) /* Open for reading and writing. */ +#define O_ACCMODE O_RDWR /* Mask for file access modes. */ + + + +/* File name translation flags. These are understood by io servers; + they can be passed in `dir_pathtrans', and consequently to `open', + `hurd_path_lookup', and `path_lookup'. */ + +#define O_CREAT 0x0010 /* Create file if it doesn't exist. */ +#define O_EXCL 0x0020 /* Fail if file already exists. */ +#ifdef __USE_GNU +#define O_NOLINK 0x0040 /* No name mappings on final component. */ +#define O_NOTRANS 0x0080 /* No translator on final component. */ +#endif + + +/* File status flags. These are understood by io servers; they can be + passed in `dir_pathtrans' and set or fetched with `io_*_openmodes'. + Consequently they can be passed to `open', `hurd_path_lookup', + `path_lookup', and `fcntl' with the F_SETFL command; and are returned + by `fcntl' with the F_GETFL command. */ + +#define O_APPEND 0x0100 /* Writes always append to the file. */ +#define O_ASYNC 0x0200 /* Send SIGIO to owner when data is ready. */ +#define O_FSYNC 0x0400 /* Synchronous writes. */ +#define O_SYNC O_FSYNC +#ifdef __USE_GNU +#define O_NOATIME 0x0800 /* Don't set access time on read by owner. */ +#endif + + +/* The name O_NONBLOCK is unfortunately overloaded; it is both a file name + translation flag and a file status flag. O_NDELAY is the deprecated BSD + name for the same flag, overloaded in the same way. + + When used in `dir_pathtrans' (and consequently `open', `hurd_path_lookup', + or `path_lookup'), O_NONBLOCK says the open should fail with EAGAIN + instead of blocking for any significant length of time (e.g., to wait for + DTR on a serial line). + + When used in `io_*_openmodes' (and consequently `fcntl' with the F_SETFL + command), the O_NONBLOCK flag means to do nonblocking i/o: any i/o + operation that would block for any significant length of time will instead + fail with EAGAIN. */ + +#define O_NONBLOCK 0x0008 /* Non-blocking open or non-blocking I/O. */ +#ifdef __USE_BSD +#define O_NDELAY O_NONBLOCK +#endif + + +#ifdef __USE_GNU +/* Mask of bits which are understood by io servers. */ +#define O_HURD 0xffff /* XXX name? want this? */ +#endif + + +/* Open-time action flags. These are understood by `hurd_path_lookup' + and consequently by `open' and `path_lookup'. They are not preserved + once the file has been opened. */ + +#define O_TRUNC 0x00010000 /* Truncate file to zero length. */ +#ifdef __USE_MISC +#define O_SHLOCK 0x00020000 /* Open with shared file lock. */ +#define O_EXLOCK 0x00040000 /* Open with shared exclusive lock. */ +#endif + + +/* Controlling terminal flags. These are understood only by `open', + and are not preserved once the file has been opened. */ + +#ifdef __USE_GNU +#define O_IGNORE_CTTY 0x00080000 /* Don't do any ctty magic at all. */ +#endif +/* `open' never assigns a controlling terminal in GNU. */ +#define O_NOCTTY 0 /* Don't assign a controlling terminal. */ + + +#ifdef __USE_BSD +/* Bits in the file status flags returned by F_GETFL. */ +#define FREAD O_RDONLY +#define FWRITE O_WRONLY + +/* Traditional BSD names the O_* bits. */ +#define FASYNC O_ASYNC +#define FCREAT O_CREAT +#define FEXCL O_EXCL +#define FTRUNC O_TRUNC +#define FNOCTTY O_NOCTTY +#define FFSYNC O_FSYNC +#define FSYNC O_SYNC +#define FAPPEND O_APPEND +#define FNONBLOCK O_NONBLOCK +#define FNDELAY O_NDELAY +#endif + + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#ifdef __USE_BSD +#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ +#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ +#endif +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info (non-blocking). */ +#define F_SETLKW 9 /* Set record locking info (blocking). */ + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +struct flock + { + int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + + +#endif /* fcntlbits.h */ diff -ruN glibc-1.06/sysdeps/mach/hurd/fsync.c glibc-1.07/sysdeps/mach/hurd/fsync.c --- glibc-1.06/sysdeps/mach/hurd/fsync.c Sun May 3 15:53:31 1992 +++ glibc-1.07/sysdeps/mach/hurd/fsync.c Fri Dec 17 18:47:20 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -25,7 +25,7 @@ int DEFUN(fsync, (fd), int fd) { - error_t err = _HURD_DPORT_USE (fd, __file_sync (port)); + error_t err = _HURD_DPORT_USE (fd, __file_sync (port, 1)); if (err) return __hurd_dfail (fd, err); return 0; diff -ruN glibc-1.06/sysdeps/mach/hurd/ftruncate.c glibc-1.07/sysdeps/mach/hurd/ftruncate.c --- glibc-1.06/sysdeps/mach/hurd/ftruncate.c Sun May 3 15:53:28 1992 +++ glibc-1.07/sysdeps/mach/hurd/ftruncate.c Tue Dec 21 01:04:19 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Truncate the file FD refers to to LENGTH bytes. */ int diff -ruN glibc-1.06/sysdeps/mach/hurd/getcwd.c glibc-1.07/sysdeps/mach/hurd/getcwd.c --- glibc-1.06/sysdeps/mach/hurd/getcwd.c +++ glibc-1.07/sysdeps/mach/hurd/getcwd.c Wed Dec 22 16:46:54 1993 @@ -0,0 +1,222 @@ +/* Copyright (C) 1991, 1992, 1993 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Get the pathname of the current working directory, and put it in SIZE + bytes of BUF. Returns NULL if the directory couldn't be determined or + SIZE was too small. If successful, returns BUF. In GNU, if BUF is + NULL, an array is allocated with `malloc'; the array is SIZE bytes long, + unless SIZE <= 0, in which case it is as big as necessary. */ + +char * +getcwd (char *buf, size_t size) +{ + error_t err; + dev_t rootdev, thisdev; + ino_t rootino, thisino; + char *path; + register char *pathp; + struct stat st; + file_t parent; + char *dirbuf = NULL; + unsigned int dirbufsize = 0; + file_t crdir; + int dealloc_crdir; + + inline void cleanup (void) + { + _hurd_port_free (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir, crdir); + __mach_port_deallocate (__mach_task_self (), parent); + + if (dirbuf != NULL) + __vm_deallocate (__mach_task_self (), + (vm_address_t) dirbuf, dirbufsize); + } + + + if (size == 0) + { + if (buf != NULL) + { + errno = EINVAL; + return NULL; + } + + size = FILENAME_MAX + 1; /* Good starting guess. */ + } + + if (buf != NULL) + path = buf; + else + { + path = malloc (size); + if (path == NULL) + return NULL; + } + + pathp = path + size; + *--pathp = '\0'; + + crdir = _hurd_port_get (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir); + if (err = __io_stat (crdir, &st)) + { + _hurd_port_free (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir, crdir); + return __hurd_fail (err), NULL; + } + rootdev = st.st_dev; + rootino = st.st_ino; + + if (err = __USEPORT (CWDIR, __mach_port_mod_refs (__mach_task_self (), + (parent = port), + MACH_PORT_TYPE_SEND, + 1))) + { + _hurd_port_free (&_hurd_ports[INIT_PORT_CRDIR], &dealloc_crdir, crdir); + return __hurd_fail (err), NULL; + } + thisdev = st.st_dev; + thisino = st.st_ino; + + while (!(thisdev == rootdev && thisino == rootino)) + { + struct dirent *d; + dev_t dotdev; + ino_t dotino; + int mount_point; + file_t newp; + char *dirdata; + unsigned int dirdatasize; + off_t dirpos; + + /* Look at the parent directory. */ + if (err = __hurd_path_lookup (crdir, parent, "..", O_EXEC, 0, &newp)) + goto lose; + __mach_port_deallocate (__mach_task_self (), parent); + parent = newp; + + /* Figure out if this directory is a mount point. */ + if (err = __io_stat (parent, &st)) + goto lose; + dotdev = st.st_dev; + dotino = st.st_ino; + mount_point = dotdev != thisdev; + + /* Search for the last directory. */ + dirpos = 0; + dirdata = dirbuf; + dirdatasize = dirbufsize; + while (!(err = __dir_readdir (parent, &dirdata, &dirdatasize, + dirpos, &dirpos, st.st_blksize)) && + dirdatasize != 0) + { + unsigned int offset; + + if (dirdata != dirbuf) + { + /* The data was passed out of line, so our old buffer is no + longer useful. Deallocate the old buffer and reset our + information for the new buffer. */ + __vm_deallocate (__mach_task_self (), + (vm_address_t) dirbuf, dirbufsize); + dirbuf = dirdata; + dirbufsize = dirdatasize; + } + + offset = 0; + while (offset < dirdatasize) + { + d = (struct dirent *) &dirdata[offset]; + offset += d->d_reclen; + + /* Ignore `.' and `..'. */ + if (d->d_name[0] == '.' && + (d->d_namlen == 1 || + (d->d_namlen == 2 && d->d_name[1] == '.'))) + continue; + + if (mount_point || d->d_ino == thisino) + { + file_t try; + if (err = __hurd_path_lookup (crdir, parent, d->d_name, + O_NOLINK, 0, &try)) + goto lose; + err = __io_stat (try, &st); + __mach_port_deallocate (__mach_task_self (), try); + if (err) + goto lose; + if (st.st_dev == thisdev && st.st_ino == thisino) + break; + } + } + } + + if (err) + goto lose; + else + { + if (pathp - path < d->d_namlen + 1) + { + if (buf != NULL) + { + errno = ERANGE; + return NULL; + } + else + { + size *= 2; + buf = realloc (path, size); + if (buf == NULL) + { + free (path); + return NULL; + } + pathp = &buf[pathp - path]; + path = buf; + } + } + pathp -= d->d_namlen; + (void) memcpy (pathp, d->d_name, d->d_namlen); + *--pathp = '/'; + } + + thisdev = dotdev; + thisino = dotino; + } + + if (pathp == &path[size - 1]) + *--pathp = '/'; + + memmove (path, pathp, path + size - pathp); + cleanup (); + return path; + + lose: + cleanup (); + return NULL; +} diff -ruN glibc-1.06/sysdeps/mach/hurd/gethostid.c glibc-1.07/sysdeps/mach/hurd/gethostid.c --- glibc-1.06/sysdeps/mach/hurd/gethostid.c Thu Apr 2 00:28:24 1992 +++ glibc-1.07/sysdeps/mach/hurd/gethostid.c Tue Dec 21 00:58:21 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,14 +19,16 @@ #include #include #include +#include /* Return the current machine's Internet number. */ long int DEFUN_VOID(gethostid) { - long int hostid; + int hostid; error_t err; - if (err = _HURD_PORT_USE (&_hurd_proc, __proc_gethostid (port, &hostid))) + if (err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_gethostid (port, &hostid))) return __hurd_fail (err); return hostid; } diff -ruN glibc-1.06/sysdeps/mach/hurd/getlogin.c glibc-1.07/sysdeps/mach/hurd/getlogin.c --- glibc-1.06/sysdeps/mach/hurd/getlogin.c Thu Apr 2 00:28:20 1992 +++ glibc-1.07/sysdeps/mach/hurd/getlogin.c Wed Oct 27 19:06:54 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -27,10 +27,11 @@ char * DEFUN_VOID(getlogin) { - static char login[1024]; + static char login[1024]; /* XXX */ error_t err; - if (err = _HURD_PORT_USE (&_hurd_proc, __proc_getlogin (port, login))) + if (err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_getlogin (port, login))) { errno = err; return NULL; diff -ruN glibc-1.06/sysdeps/mach/hurd/getprio.c glibc-1.07/sysdeps/mach/hurd/getprio.c --- glibc-1.06/sysdeps/mach/hurd/getprio.c Thu Apr 2 00:35:14 1992 +++ glibc-1.07/sysdeps/mach/hurd/getprio.c Fri Dec 17 18:29:13 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -29,10 +29,5 @@ DEFUN(getpriority, (which, who), enum __priority_which which AND int who) { - int prio; - error_t err = _HURD_PORT_USE (&_hurd_proc, - __proc_getpriority (port, which, who, &prio)); - if (err) - return __hurd_fail (err); - return prio; + return ENOSYS; /* XXX */ } diff -ruN glibc-1.06/sysdeps/mach/hurd/getrlimit.c glibc-1.07/sysdeps/mach/hurd/getrlimit.c --- glibc-1.06/sysdeps/mach/hurd/getrlimit.c Fri Nov 1 22:39:38 1991 +++ glibc-1.07/sysdeps/mach/hurd/getrlimit.c Sat Dec 25 03:03:34 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -48,6 +48,17 @@ rlimits->rlim_cur = _hurd_data_end; rlimits->rlim_max = RLIM_INFINITY; break; + + case RLIMIT_OFILE: + { + int lim; + __mutex_lock (&_hurd_dtable_lock); + lim = _hurd_dtable_rlimit; + __mutex_unlock (&_hurd_dtable_lock); + rlimits->rlim_cur = lim; + rlimits->rlim_max = RLIM_INFINITY; + break; + } case RLIMIT_CPU: case RLIMIT_FSIZE: diff -ruN glibc-1.06/sysdeps/mach/hurd/i386/Implies glibc-1.07/sysdeps/mach/hurd/i386/Implies --- glibc-1.06/sysdeps/mach/hurd/i386/Implies Mon Oct 28 22:21:49 1991 +++ glibc-1.07/sysdeps/mach/hurd/i386/Implies @@ -1 +0,0 @@ -i386 diff -ruN glibc-1.06/sysdeps/mach/hurd/i386/startsig.c glibc-1.07/sysdeps/mach/hurd/i386/startsig.c --- glibc-1.06/sysdeps/mach/hurd/i386/startsig.c Wed Jul 1 00:25:23 1992 +++ glibc-1.07/sysdeps/mach/hurd/i386/startsig.c @@ -1,42 +0,0 @@ -/* Copyright (C) 1991, 1992 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 - -#define STACK_SIZE (4 * __vm_page_size) /* ? XXX */ - -error_t -_hurd_start_sigthread (thread_t sigthread, void (*function) (void)) -{ - error_t error; - struct i386_thread_state ts; - size_t tssize = i386_THREAD_STATE_COUNT; - vm_address_t stack; - - if (error = __vm_allocate (__mach_task_self (), &stack, STACK_SIZE, 1)) - return error; - - bzero (&ts, sizeof (ts)); - ts.eip = (int) function; - ts.esp = stack + STACK_SIZE; - - if (error = __thread_set_state (sigthread, i386_THREAD_STATE, &ts, tssize)) - return error; - - return __thread_resume (sigthread); -} diff -ruN glibc-1.06/sysdeps/mach/hurd/i386/sysdep.h glibc-1.07/sysdeps/mach/hurd/i386/sysdep.h --- glibc-1.06/sysdeps/mach/hurd/i386/sysdep.h Sun May 3 15:16:36 1992 +++ glibc-1.07/sysdeps/mach/hurd/i386/sysdep.h Thu Sep 16 20:13:02 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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,40 +16,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define SET_SP(sp) \ - asm volatile ("movl %0, %%esp" : : "g" (sp) : "%esp") -#define GET_STACK(low, high) \ - ({ \ - register vm_address_t ax asm ("%eax"); \ - high = ~0U; \ - low = ax; \ - }) -#define LOSE asm ("hlt") +#define GET_SP(p) ({ register vm_address_t sp asm ("%esp"); p = sp; }) -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - .text; \ - .globl syscall_error; \ - .align 4; \ - ENTRY (name) \ - lea SYS_##syscall_name, %eax; \ - /* lcall $7, $0; */ \ - /* Above loses; GAS bug. */ \ - .byte 0x9a, 0, 0, 0, 0, 7, 0 - jb syscall_error -#else -#define PSEUDO(name, syscall_name, args) \ - .text; \ - .globl syscall_error \ - .align 4 \ - ENTRY (name) \ - lea SYS_/**/syscall_name, %eax; \ - /* lcall $7, $0; */ \ - /* Above loses; GAS bug. */ \ - .byte 0x9a, 0, 0, 0, 0, 7, 0 - jb syscall_error -#endif - -#define r0 %eax -#define r1 %edx -#define MOVE(x,y) movl x , y +/* Get the mach/i386 file too. */ +#include_next diff -ruN glibc-1.06/sysdeps/mach/hurd/ioctls.h glibc-1.07/sysdeps/mach/hurd/ioctls.h --- glibc-1.06/sysdeps/mach/hurd/ioctls.h Thu Oct 8 17:40:15 1992 +++ glibc-1.07/sysdeps/mach/hurd/ioctls.h Tue Dec 21 00:42:13 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ enum { IOC_8, IOC_16, IOC_32 } type0:2, type1:2, type2:2; unsigned int count0:5, count1:5, count2:3; unsigned int group:4, command:7; - } t; + } __t; /* We use this structure to construct and insert type information. */ struct { @@ -46,20 +46,20 @@ enum __ioctl_dir inout:2; unsigned int type:19; unsigned int group:4, command:7; - } s; + } __s; /* We use the plain integer to pass around. */ - int i; + unsigned long int __i; }; /* Construct an ioctl from all the broken-out fields. */ #define _IOCT(inout, group, num, t0, c0, t1, c1, t2, c2) \ (((union __ioctl) \ - { t: { (inout), (t0), (t1), (t2), (c0), (c1), (c2), \ - ((group) - 'a') >> 2, (num) } }).__i) + { __t: { (inout), (t0), (t1), (t2), (c0), (c1), (c2), \ + ((group) - 'a') >> 2, (num) } }).__i) /* Construct an ioctl from constructed type plus other fields. */ #define _IOC(inout, group, num, type) \ - (((union __ioctl) { s: { (inout), (type), (group), (num) } }).__i) + (((union __ioctl) { __s: { (inout), (type), (group), (num) } }).__i) /* Standard flavors of ioctls. _IOT_foobar is defined either in this file, diff -ruN glibc-1.06/sysdeps/mach/hurd/killpg.c glibc-1.07/sysdeps/mach/hurd/killpg.c --- glibc-1.06/sysdeps/mach/hurd/killpg.c +++ glibc-1.07/sysdeps/mach/hurd/killpg.c Mon Oct 25 23:54:25 1993 @@ -0,0 +1,30 @@ +/* Copyright (C) 1993 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 +#include +#include + +/* Send SIG to all processes in process group PGRP. + If PGRP is zero, send SIG to all processes in + the current process's process group. */ +int +DEFUN(killpg, (pgrp, sig), pid_t pgrp AND int sig) +{ + return __kill (- pgrp, sig); +} diff -ruN glibc-1.06/sysdeps/mach/hurd/local_lim.h glibc-1.07/sysdeps/mach/hurd/local_lim.h --- glibc-1.06/sysdeps/mach/hurd/local_lim.h +++ glibc-1.07/sysdeps/mach/hurd/local_lim.h Mon Oct 18 08:53:53 1993 @@ -0,0 +1,40 @@ +/* Minimum guaranteed maximum values for system limits. Hurd version. + +Copyright (C) 1993 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. */ + +/* GNU has no arbitrary fixed limits on these things, so we don't + define the macros. Some things are unlimited. Some are in fact + limited but the limit is run-time dependent and fetched with + `sysconf' or `pathconf'. + + POSIX.1 requires that we define NGROUPS_MAX (though none of the others + is required). GNU allows any number of supplementary groups, + dynamically allocated. So we pick a number which seems vaguely + suitable, and `sysconf' will return a number at least as large. */ + +#define NGROUPS_MAX 256 + +/* The maximum number of symbolic links that are allowed in a single file + name resolution. When a further link is encountered, the call returns + ELOOP. This name is a GNU extension; POSIX.1 has no such limit, and BSD + calls it MAXSYMLINKS in . */ + +#ifdef __USE_BSD +#define SYMLINK_MAX 8 +#endif diff -ruN glibc-1.06/sysdeps/mach/hurd/opendir.c glibc-1.07/sysdeps/mach/hurd/opendir.c --- glibc-1.06/sysdeps/mach/hurd/opendir.c +++ glibc-1.07/sysdeps/mach/hurd/opendir.c Tue Dec 21 02:58:51 1993 @@ -0,0 +1,69 @@ +/* Copyright (C) 1993 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Open a directory stream on NAME. */ +DIR * +DEFUN(opendir, (name), CONST char *name) +{ + DIR *dirp; + struct stat statbuf; + file_t port; + error_t err; + + port = __path_lookup (name, O_RDONLY, 0); + if (port == MACH_PORT_NULL) + return NULL; + + /* XXX this port should be deallocated on exec */ + + if (err = __io_stat (port, &statbuf)) + { + errno = err; + lose: + __mach_port_deallocate (__mach_task_self (), port); + return NULL; + } + + dirp = (DIR *) malloc (sizeof (DIR)); + if (dirp == NULL) + goto lose; + + dirp->__port = port; + dirp->__filepos = 0; + dirp->__block_size = statbuf.st_blksize; + dirp->__data = NULL; + dirp->__allocation = 0; + dirp->__size = 0; + dirp->__offset = 0; + + return dirp; +} diff -ruN glibc-1.06/sysdeps/mach/hurd/readdir.c glibc-1.07/sysdeps/mach/hurd/readdir.c --- glibc-1.06/sysdeps/mach/hurd/readdir.c +++ glibc-1.07/sysdeps/mach/hurd/readdir.c Tue Dec 21 02:58:57 1993 @@ -0,0 +1,82 @@ +/* Copyright (C) 1993 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 +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Read a directory entry from DIRP. */ +struct dirent * +DEFUN(readdir, (dirp), DIR *dirp) +{ + struct dirent *dp; + + if (dirp == NULL) + { + errno = EINVAL; + return NULL; + } + + do + { + if (dirp->__offset >= dirp->__size) + { + /* We've emptied out our buffer. Refill it. */ + + char *data = dirp->__data; + error_t err = __dir_readdir (dirp->__port, + &data, &dirp->__size, + dirp->__filepos, &dirp->__filepos, + dirp->__block_size); + if (err) + { + errno = err; + return NULL; + } + + if (data != dirp->__data) + { + /* The data was passed out of line, so our old buffer is no + longer useful. Deallocate the old buffer and reset our + information for the new buffer. */ + __vm_deallocate (__mach_task_self (), + (vm_address_t) dirp->__data, + dirp->__allocation); + dirp->__data = data; + dirp->__allocation = dirp->__size; + } + + /* Reset the offset into the buffer. */ + dirp->__offset = 0; + } + + dp = (struct dirent *) &dirp->__data[dirp->__offset]; + dirp->__offset += dp->d_reclen; + + /* Loop to ignore deleted files. */ + } while (dp->d_fileno == 0); + + return dp; +} diff -ruN glibc-1.06/sysdeps/mach/hurd/reboot.c glibc-1.07/sysdeps/mach/hurd/reboot.c --- glibc-1.06/sysdeps/mach/hurd/reboot.c Sun May 3 16:17:33 1992 +++ glibc-1.07/sysdeps/mach/hurd/reboot.c Tue Dec 21 00:57:46 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -29,11 +29,19 @@ error_t err; mach_port_t init; - err = _HURD_PORT_USE (&_hurd_proc, __proc_getmsgport (1, &init)); + err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_getmsgport (port, 1, &init)); if (!err) { - err = __startup_reboot (init, howto); + task_t refport = __pid2task (1); + if (refport != MACH_PORT_NULL) + { + err = __startup_reboot (init, refport, howto); + __mach_port_deallocate (__mach_task_self (), refport); + } __mach_port_deallocate (__mach_task_self (), init); + if (refport == MACH_PORT_NULL) + return -1; } if (err) diff -ruN glibc-1.06/sysdeps/mach/hurd/rename.c glibc-1.07/sysdeps/mach/hurd/rename.c --- glibc-1.06/sysdeps/mach/hurd/rename.c Thu Apr 2 00:38:37 1992 +++ glibc-1.07/sysdeps/mach/hurd/rename.c Thu Jan 6 01:32:22 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -28,10 +28,10 @@ file_t olddir, newdir; const char *oldname, *newname; - olddir = __path_split (old, &oldname); + olddir = __path_split (old, (char **) &oldname); if (olddir == MACH_PORT_NULL) return -1; - newdir = __path_split (new, &newname); + newdir = __path_split (new, (char **) &newname); if (newdir == MACH_PORT_NULL) { __mach_port_deallocate (__mach_task_self (), olddir); diff -ruN glibc-1.06/sysdeps/mach/hurd/rewinddir.c glibc-1.07/sysdeps/mach/hurd/rewinddir.c --- glibc-1.06/sysdeps/mach/hurd/rewinddir.c +++ glibc-1.07/sysdeps/mach/hurd/rewinddir.c Thu Jan 6 10:31:07 1994 @@ -0,0 +1,31 @@ +/* Copyright (C) 1994 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 +#include +#include +#include +#include + + +/* Rewind DIRP to the beginning of the directory. */ +void +DEFUN(rewinddir, (dirp), DIR *dirp) +{ + seekdir (dirp, (off_t) 0L); +} diff -ruN glibc-1.06/sysdeps/mach/hurd/seekdir.c glibc-1.07/sysdeps/mach/hurd/seekdir.c --- glibc-1.06/sysdeps/mach/hurd/seekdir.c +++ glibc-1.07/sysdeps/mach/hurd/seekdir.c Thu Jan 6 10:30:13 1994 @@ -0,0 +1,37 @@ +/* Copyright (C) 1993, 1994 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 +#include +#include +#include +#include + +/* Seek to position POS in DIRP. */ +void +DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos) +{ + if (dirp->__offset != pos % dirp->__block_size) + { + dirp->__offset = pos % dirp->__block_size; + /* The block we have read is no longer appropriate; it corresponds to + a different position in the file that our offset now indicates. */ + dirp->__size = 0; + } + dirp->__filepos = pos - dirp->__offset; +} diff -ruN glibc-1.06/sysdeps/mach/hurd/setegid.c glibc-1.07/sysdeps/mach/hurd/setegid.c --- glibc-1.06/sysdeps/mach/hurd/setegid.c Tue May 5 23:21:36 1992 +++ glibc-1.07/sysdeps/mach/hurd/setegid.c Tue Dec 21 01:04:31 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -20,60 +20,43 @@ #include #include #include +#include -/* Set the effective group ID of the calling process to GID. */ +/* Set the effective user ID of the calling process to GID. */ int -DEFUN(setegid, (gid), int gid) +DEFUN(setegid, (gid), gid_t gid) { auth_t newauth; - int i; + error_t err; __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + err = _hurd_check_ids (); + + if (!err) { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; - } + /* Make a new auth handle which has EGID as the first element in the + list of effective gids. */ - for (i = 0; i < _hurd_id.ngroups; ++i) - if (_hurd_id.gids[i] == gid) - { - /* We already have this gid. Swap it with gids[0] - so getegid will return it. */ - _hurd_id.gids[i] = _hurd_id.gids[0]; - break; - } + size_t ngen = _hurd_id.gen.ngids < 1 ? 1 : _hurd_id.gen.ngids; + gid_t newgen[ngen]; - if (i == _hurd_id.ngroups) - { - if (_hurd_id.ngroups == (sizeof (_hurd_id.gids) / - sizeof (_hurd_id.gids[0]))) - { - __mutex_unlock (&_hurd_idlock); - errno = ENOMEM; /* XXX ? */ - return -1; - } - else - { - _hurd_id.gids[_hurd_id.ngroups++] = _hurd_id.gids[0]; - _hurd_id.gids[0] = gid; - } - } + newgen[0] = gid; + memcpy (&newgen[1], _hurd_id.gen.gids, (ngen - 1) * sizeof (gid_t)); - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); + err = __USEPORT (AUTH, __auth_makeauth + (port, NULL, 0, MACH_MSG_TYPE_COPY_SEND, + _hurd_id.gen.uids, _hurd_id.gen.nuids, + _hurd_id.aux.uids, _hurd_id.aux.nuids, + newgen, ngen, + _hurd_id.aux.gids, _hurd_id.aux.ngids, + &newauth)); + } + __mutex_unlock (&_hurd_id.lock); if (err) return __hurd_fail (err); + /* Install the new handle and reauthenticate everything. */ err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); return err; diff -ruN glibc-1.06/sysdeps/mach/hurd/seteuid.c glibc-1.07/sysdeps/mach/hurd/seteuid.c --- glibc-1.06/sysdeps/mach/hurd/seteuid.c Tue May 5 23:22:55 1992 +++ glibc-1.07/sysdeps/mach/hurd/seteuid.c Tue Dec 21 01:04:31 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -20,59 +20,43 @@ #include #include #include +#include /* Set the effective user ID of the calling process to UID. */ int -DEFUN(seteuid, (uid), int uid) +DEFUN(seteuid, (uid), uid_t uid) { auth_t newauth; - int i; + error_t err; __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) + err = _hurd_check_ids (); + + if (!err) { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; - } + /* Make a new auth handle which has EUID as the first element in the + list of effective uids. */ - for (i = 0; i < _hurd_id.nuids; ++i) - if (_hurd_id.uids[i] == uid) - { - /* We already have this uid. Swap it with uids[0] - so geteuid will return it. */ - _hurd_id.uids[i] = _hurd_id.uids[0]; - break; - } + size_t ngen = _hurd_id.gen.nuids < 1 ? 1 : _hurd_id.gen.nuids; + uid_t newgen[ngen]; - if (i == _hurd_id.nuids) - { - if (_hurd_id.nuids == sizeof (_hurd_id.uids) / sizeof (_hurd_id.uids[0])) - { - __mutex_unlock (&_hurd_idlock); - errno = ENOMEM; /* ? */ - return -1; - } - else - { - _hurd_id.uids[_hurd_id.nuids++] = _hurd_id.uids[0]; - _hurd_id.uids[0] = uid; - } - } + newgen[0] = uid; + memcpy (&newgen[1], _hurd_id.gen.uids, (ngen - 1) * sizeof (uid_t)); - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); + err = __USEPORT (AUTH, __auth_makeauth + (port, NULL, 0, MACH_MSG_TYPE_COPY_SEND, + newgen, ngen, + _hurd_id.aux.uids, _hurd_id.aux.nuids, + _hurd_id.gen.gids, _hurd_id.gen.ngids, + _hurd_id.aux.gids, _hurd_id.aux.ngids, + &newauth)); + } + __mutex_unlock (&_hurd_id.lock); if (err) return __hurd_fail (err); + /* Install the new handle and reauthenticate everything. */ err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); return err; diff -ruN glibc-1.06/sysdeps/mach/hurd/setgroups.c glibc-1.07/sysdeps/mach/hurd/setgroups.c --- glibc-1.06/sysdeps/mach/hurd/setgroups.c Thu Apr 2 00:44:04 1992 +++ glibc-1.07/sysdeps/mach/hurd/setgroups.c Tue Dec 14 16:23:03 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -28,42 +28,32 @@ { error_t err; auth_t newauth; - gid_t gids[sizeof (_hurd_id.groups) / sizeof (gid_t)]; + size_t i; + gid_t new[n]; - if (n > sizeof (gids) / sizeof (gids[0]) || groups == NULL) + /* Fault before taking locks. */ + for (i = 0; i < n; ++i) + new[i] = groups[i]; + + __mutex_lock (&_hurd_id.lock); + err = _hurd_check_ids (); + if (! err) { - errno = EINVAL; - return -1; + /* Get a new auth port using those IDs. */ + err = __USEPORT (AUTH, + __auth_makeauth (port, NULL, 0, 0, + _hurd_id.gen.uids, _hurd_id.gen.nuids, + _hurd_id.aux.uids, _hurd_id.aux.nuids, + new, n, + _hurd_id.aux.gids, _hurd_id.aux.ngids, + &newauth)); } + __mutex_unlock (&_hurd_id.lock); - memcpy (gids, groups, n * sizeof (gid_t)); - groups = gids; - - __mutex_lock (&_hurd_idlock); - if (!_hurd_id_valid) - { - error_t err = _HURD_PORT_USE (&_hurd_auth, - __auth_getids (port, &_hurd_id)); - if (err) - { - __mutex_unlock (&_hurd_idlock); - return __hurd_fail (err); - } - _hurd_id_valid = 1; - } - - _hurd_id.ngroups = n; - memcpy (_hurd_id.groups, groups, n * sizeof (gid_t)); - _hurd_id_valid = 0; - - err = _HURD_PORT_USE (&_hurd_auth, - __auth_makeauth (port, &_hurd_id, &newauth)); - _hurd_id_valid = 0; - __mutex_unlock (&_hurd_idlock); - if (err) return __hurd_fail (err); + /* Install the new auth port and reauthenticate everything. */ err = __setauth (newauth); __mach_port_deallocate (__mach_task_self (), newauth); return err; diff -ruN glibc-1.06/sysdeps/mach/hurd/sethostid.c glibc-1.07/sysdeps/mach/hurd/sethostid.c --- glibc-1.06/sysdeps/mach/hurd/sethostid.c Thu Apr 2 00:51:44 1992 +++ glibc-1.07/sysdeps/mach/hurd/sethostid.c Tue Dec 21 01:04:29 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ @@ -25,8 +26,6 @@ int DEFUN(sethostid, (id), long int id) { - error_t err = _HURD_PORT_USE (&_hurd_proc, __proc_sethostid (port, id)); - if (err) - return __hurd_fail (err); - return 0; + error_t err = __USEPORT (PROC, __proc_sethostid (port, id)); + return err ? __hurd_fail (err) : 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/sethostnam.c glibc-1.07/sysdeps/mach/hurd/sethostnam.c --- glibc-1.06/sysdeps/mach/hurd/sethostnam.c Thu Apr 2 00:51:41 1992 +++ glibc-1.07/sysdeps/mach/hurd/sethostnam.c Fri Dec 17 18:46:05 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ @@ -26,7 +27,7 @@ DEFUN(sethostname, (name, len), CONST char *name AND size_t len) { - error_t err = _HURD_PORT_USE (&_hurd_proc, + error_t err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], __proc_sethostname (port, name, len)); if (err) return __hurd_fail (err); diff -ruN glibc-1.06/sysdeps/mach/hurd/setlogin.c glibc-1.07/sysdeps/mach/hurd/setlogin.c --- glibc-1.06/sysdeps/mach/hurd/setlogin.c Thu Apr 2 00:51:38 1992 +++ glibc-1.07/sysdeps/mach/hurd/setlogin.c Wed Oct 27 19:06:57 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Set the login name returned by `getlogin'. */ int @@ -25,7 +26,8 @@ DEFUN(setlogin, (name), CONST char *name) { error_t err; - if (err = _HURD_PORT_USE (&_hurd_proc, __proc_setlogin (port, name))) + if (err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_setlogin (port, name))) return __hurd_fail (err); return 0; } diff -ruN glibc-1.06/sysdeps/mach/hurd/setrlimit.c glibc-1.07/sysdeps/mach/hurd/setrlimit.c --- glibc-1.06/sysdeps/mach/hurd/setrlimit.c Tue Jun 16 23:28:48 1992 +++ glibc-1.07/sysdeps/mach/hurd/setrlimit.c Sat Dec 25 03:04:27 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,8 +18,10 @@ #include #include +#include #include + /* Set the soft and hard limits for RESOURCE to *RLIMITS. Only the super-user can increase hard limits. Return 0 if successful, -1 if not (and sets errno). */ @@ -35,7 +37,14 @@ return -1; } - lim = *rlimits; + lim = *rlimits; /* Fault now if ever. */ + + if (lim.rlim_max != RLIM_INFINITY) + { + /* We have no enforceable resource limits. */ + errno = ENOSYS; + return -1; + } switch (resource) { diff -ruN glibc-1.06/sysdeps/mach/hurd/sigaltstack.c glibc-1.07/sysdeps/mach/hurd/sigaltstack.c --- glibc-1.06/sysdeps/mach/hurd/sigaltstack.c Sun May 3 16:41:23 1992 +++ glibc-1.07/sysdeps/mach/hurd/sigaltstack.c @@ -1,54 +0,0 @@ -/* Copyright (C) 1992 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 -#include -#include -#include - -/* Run signals handlers on the stack specified by SS (if not NULL). - If OSS is not NULL, it is filled in with the old signal stack status. */ -int -DEFUN(sigaltstack, (ss, oss), - CONST struct sigaltstack *ss AND struct sigstack *oss) -{ - struct _hurd_sigstate *s; - - if (ss != NULL) - *(volatile struct sigaltstack *) ss; - if (oss != NULL) - *(volatile struct sigaltstack *) oss = *oss; - - s = _hurd_thread_sigstate (__mach_thread_self ()); - - if ((ss->ss_flags & SA_DISABLE) && (s->sigaltstack.ss_flags & SA_ONSTACK)) - { - /* Can't disable a stack that is in use. */ - __mutex_unlock (&s->lock); - errno = EINVAL; - return -1; - } - - if (oss != NULL) - *oss = s->sigaltstack; - if (ss != NULL) - s->sigaltstack = *ss; - __mutex_unlock (&s->lock); - - return 0; -} diff -ruN glibc-1.06/sysdeps/mach/hurd/sigaltstk.c glibc-1.07/sysdeps/mach/hurd/sigaltstk.c --- glibc-1.06/sysdeps/mach/hurd/sigaltstk.c +++ glibc-1.07/sysdeps/mach/hurd/sigaltstk.c Tue Oct 26 21:39:16 1993 @@ -0,0 +1,57 @@ +/* Copyright (C) 1992, 1993 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 +#include +#include +#include + +/* Run signals handlers on the stack specified by SS (if not NULL). + If OSS is not NULL, it is filled in with the old signal stack status. */ +int +DEFUN(sigaltstack, (ss, oss), + CONST struct sigaltstack *argss AND struct sigaltstack *oss) +{ + struct _hurd_sigstate *s; + struct sigaltstack ss; + + /* Fault before taking any locks. */ + if (argss != NULL) + ss = *argss; + if (oss != NULL) + *(volatile struct sigaltstack *) oss = *oss; + + s = _hurd_thread_sigstate (__mach_thread_self ()); + + if (argss != NULL && + (ss.ss_flags & SA_DISABLE) && (s->sigaltstack.ss_flags & SA_ONSTACK)) + { + /* Can't disable a stack that is in use. */ + __mutex_unlock (&s->lock); + errno = EINVAL; + return -1; + } + + if (oss != NULL) + *oss = s->sigaltstack; + if (argss != NULL) + s->sigaltstack = ss; + __mutex_unlock (&s->lock); + + return 0; +} diff -ruN glibc-1.06/sysdeps/mach/hurd/sigpending.c glibc-1.07/sysdeps/mach/hurd/sigpending.c --- glibc-1.06/sysdeps/mach/hurd/sigpending.c Mon Nov 11 23:11:26 1991 +++ glibc-1.07/sysdeps/mach/hurd/sigpending.c Fri Dec 17 17:58:29 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include #include diff -ruN glibc-1.06/sysdeps/mach/hurd/sigsuspend.c glibc-1.07/sysdeps/mach/hurd/sigsuspend.c --- glibc-1.06/sysdeps/mach/hurd/sigsuspend.c Thu Apr 2 00:51:31 1992 +++ glibc-1.07/sysdeps/mach/hurd/sigsuspend.c Tue Dec 21 01:18:50 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Change the set of blocked signals to SET, @@ -28,7 +29,6 @@ { struct _hurd_sigstate *ss; sigset_t omask, pending; - int sig; if (set != NULL) /* Crash before locking. */ @@ -37,11 +37,13 @@ ss = _hurd_thread_sigstate (__mach_thread_self ()); omask = ss->blocked; if (set != NULL) - ss->blocked = *set & ~_SIG_CANT_BLOCK; + ss->blocked = *set & ~_SIG_CANT_MASK; ss->suspended = 1; while ((pending = ss->pending & ~ss->blocked) == 0) +#ifdef noteven __condition_wait (&ss->arrived, &ss->lock); +#endif ss->suspended = 0; __mutex_unlock (&ss->lock); diff -ruN glibc-1.06/sysdeps/mach/hurd/sleep.c glibc-1.07/sysdeps/mach/hurd/sleep.c --- glibc-1.06/sysdeps/mach/hurd/sleep.c Thu Apr 2 00:51:25 1992 +++ glibc-1.07/sysdeps/mach/hurd/sleep.c Fri Dec 17 18:09:58 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,12 +33,13 @@ time_t before, after; mach_port_t recv; - recv = _hurd_dead_recv (); + recv = __mach_reply_port (); before = time ((time_t *) NULL); - (void) __mach_msg (NULL, MACH_MSG_OPTION_TIMEOUT|MACH_MSG_RCV_INTERRUPT, - 0, 0, recv, seconds * 1000, MACH_PORT_NULL); + (void) __mach_msg (NULL, MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT, + 0, 0, recv, seconds * 1000000, MACH_PORT_NULL); after = time ((time_t *) NULL); + __mach_port_destroy (__mach_task_self (), recv); return (after - before); } diff -ruN glibc-1.06/sysdeps/mach/hurd/socket.c glibc-1.07/sysdeps/mach/hurd/socket.c --- glibc-1.06/sysdeps/mach/hurd/socket.c Thu Apr 2 01:09:55 1992 +++ glibc-1.07/sysdeps/mach/hurd/socket.c Wed Jun 23 18:28:38 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,5 +37,5 @@ if (err = __socket_create (server, type, protocol, &sock)) return __hurd_fail (err); - return _hurd_dalloc (sock, MACH_PORT_NULL, 0); + return _hurd_intern_fd (sock, 0, 1); } diff -ruN glibc-1.06/sysdeps/mach/hurd/start.c glibc-1.07/sysdeps/mach/hurd/start.c --- glibc-1.06/sysdeps/mach/hurd/start.c Tue Nov 3 17:31:44 1992 +++ glibc-1.07/sysdeps/mach/hurd/start.c Wed Dec 8 23:37:49 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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,135 +16,110 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include +#include +#include #include +#include #include /* The first piece of initialized data. */ int __data_start = 0; -struct _hurd_port _hurd_cwdir, _hurd_crdir; +struct _hurd_port *_hurd_ports; mode_t _hurd_umask; -int _hurd_ctty_fstype; -fsid_t _hurd_ctty_fsid; -ino_t _hurd_ctty_fileid; mach_port_t *_hurd_init_dtable; -size_t _hurd_init_dtablesize; +mach_msg_type_number_t _hurd_init_dtablesize; +vm_address_t _hurd_stack_base; +vm_size_t _hurd_stack_size; + volatile int errno; /* XXX wants to be per-thread */ char **__environ; -extern void EXFUN(__libc_init, (NOARGS)); -extern void EXFUN(__mach_init, (NOARGS)); -extern int EXFUN(main, (int argc, char **argv, char **envp)); +extern void __mach_init (void); +extern void __libc_init (int argc, char **argv, char **envp); +extern int main (int argc, char **argv, char **envp); -extern void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ -extern void (*_cthread_exit_routine) (int status); +void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ +__NORETURN void (*_cthread_exit_routine) (int status); -#ifndef SET_SP -#error "Machine-dependent cthread startup code needs to exist." -#endif +static int split_args (char *, size_t, char **); -#ifndef GET_STACK -#error "Machine-dependent stack startup code needs to exist." -#endif -#ifndef LOSE -#define LOSE __task_terminate (__mach_task_self ()) -#endif +/* These communicate values from _start to start1, + where we cannot use the stack for anything. */ +static char *args, *env; +static mach_port_t *portarray; +static int *intarray; +static mach_msg_type_number_t argslen, envlen, portarraysize, intarraysize; +static int flags; +static char **argv, **envp; +static int argc; -static int count (char *, size_t); -static void makevec (char *, size_t, char **); -/* Entry point. The exec server started the initial thread in our task with - this spot the PC, and a stack that is presumably big enough. - The stack base address (|sp - this| is the size of the stack) is - in the return-value register (%eax for i386, etc.). */ -void -_start (void) +static volatile void +start1 (void) { - error_t err; - mach_port_t in_bootstrap; - char *args, *env; - mach_port_t *portarray; - int *intarray; - size_t argslen, envlen, portarraysize, intarraysize; - int flags; - - int argc, envc; - char **argv; - - char *p; - - GET_STACK (_hurd_stack_low, _hurd_stack_high); - - /* Basic Mach initialization, must be done before RPCs can be done. */ - __mach_init (); + register int envc = 0; - if (_cthread_init_routine != NULL) - { /* XXXXXXXXXXXXXXXXXXXXXXXX */ - void *newsp = (*_cthread_init_routine) (); - SET_SP (newsp); - if (newsp < _hurd_stack_low || newsp > _hurd_stack_high) - __vm_deallocate (__mach_task_self (), - _hurd_stack_low, - _hurd_stack_high - _hurd_stack_low); - } + { + /* Check if the stack we are now on is different from + the one described by _hurd_stack_{base,size}. */ + + char dummy; + const vm_address_t newsp = (vm_address_t) &dummy; + + if (_hurd_stack_size != 0 && (newsp < _hurd_stack_base || + newsp - _hurd_stack_base > _hurd_stack_size)) + /* The new stack pointer does not intersect with the + stack the exec server set up for us, so free that stack. */ + __vm_deallocate (__mach_task_self (), + _hurd_stack_base, _hurd_stack_size); + } - if (err = __task_get_special_port (__mach_task_self (), TASK_BOOTSTRAP_PORT, - &in_bootstrap)) - LOSE; - if (in_bootstrap != MACH_PORT_NULL) + /* Turn the block of null-separated strings we were passed for the + arguments and environment into vectors of pointers to strings. */ + + if (! argv) { - err = __exec_startup (in_bootstrap, - &flags, - &args, &argslen, &env, &envlen, - &_hurd_init_dtable, &_hurd_init_dtablesize, - &portarray, &portarraysize, - &intarray, &intarraysize); - __mach_port_deallocate (__mach_task_self (), in_bootstrap); + if (! args) + { + /* No arguments passed; set argv to { NULL }. */ + argc = 0; + argv = (char **) &args; + } + else + argc = split_args (args, argslen, NULL); } - if (err || in_bootstrap == MACH_PORT_NULL) + if (! envp) { - static char *noargs = NULL, *noenv = NULL; - argc = 0; - argv = &noargs; - __environ = &noenv; - _hurd_init_dtable = NULL; - _hurd_init_dtablesize = 0; - portarray = NULL; - portarraysize = 0; - intarray = NULL; - intarraysize = 0; + if (! env) + /* No environment passed; set __environ to { NULL }. */ + envp = (char **) &env; + else + envc = split_args (env, envlen, NULL); } - else + + if (! argv && ! envp && argc + envc > 0) { - /* Turn the block of null-separated strings we were passed for the - arguments and environment into vectors of pointers to strings. */ - - argc = count (args, argslen); - envc = count (env, envlen); - - if (err = __vm_allocate (__mach_task_self (), - &argv, round_page ((argc + 1 + envc + 1) * - sizeof (char *)), - 1)) - __libc_fatal ("hurd: Can't allocate space for argv and environ\n"); - __environ = &argv[argc + 1]; + /* There were some arguments or environment. + Allocate space for the vectors of pointers and fill them in. */ + + argv = __alloca ((argc + 1) * sizeof (char *)); + envp = __alloca ((envc + 1) * sizeof (char *)); - makevec (args, argslen, argv); - makevec (env, envlen, __environ); + split_args (args, argslen, argv); + split_args (env, envlen, envp); } - /* Initialize library data structures, start signal processing, etc. */ - _hurd_init (argv, - portarray, portarraysize, - intarray, intarraysize); + if (portarray || intarray) + /* Initialize library data structures, start signal processing, etc. */ + _hurd_init (flags, argv, portarray, portarraysize, intarray, intarraysize); /* Random library initialization. */ @@ -154,18 +129,24 @@ /* Finally, run the user program. */ (_cthread_exit_routine != NULL ? *_cthread_exit_routine : exit) (main (argc, argv, __environ)); + + /* Should never get here. */ + LOSE; } static int -count (char *args, size_t argslen) +split_args (char *args, size_t argslen, char **argv) { char *p = args; size_t n = argslen; - int argc; + int argc = 0; + while (n > 0) { char *end = memchr (p, '\0', n); + if (argv) + argv[argc] = p; ++argc; if (end == NULL) @@ -175,92 +156,101 @@ n -= end + 1 - p; p = end + 1; } + + if (argv) + argv[argc] = NULL; return argc; } -static void -makevec (char *args, size_t argslen, char **argv) -{ - char *p = args; - size_t n = argslen; - int argc = 0; - while (n > 0) - { - char *end = memchr (p, '\0', n); +/* Entry point. The exec server started the initial thread in our task with + this spot the PC, and a stack that is presumably big enough. We do basic + Mach initialization so mig-generated stubs work, and then do an exec_startup + RPC on our bootstrap port, to which the exec server responds with the + information passed in the exec call, as well as our original bootstrap port, + and the base address and size of the preallocated stack. + + If using cthreads, we are given a new stack by cthreads initialization and + deallocate the stack set up by the exec server. On the new stack we call + `start1' (above) to do the rest of the startup work. Since the stack may + disappear out from under us in a machine-dependent way, we use a pile of + static variables to communicate the information from exec_startup to start1. + This is unfortunate but preferable to machine-dependent frobnication to copy + the state from the old stack to the new one. */ - argv[argc++] = p; +void +_start (void) +{ + error_t err; + mach_port_t in_bootstrap; + vm_address_t stack_pointer, stack_base; + vm_size_t stack_size; - if (end == NULL) - /* The last argument is unterminated. */ - break; + /* GET_SP (SP) should put the stack pointer in SP. */ - n -= end + 1 - p; - p = end + 1; - } +#ifndef GET_SP +#error GET_SP not defined by sysdeps/mach/hurd/MACHINE/sysdep.h +#endif + GET_SP (stack_pointer); - argv[argc] = NULL; -} - -/* Initialize the library data structures from the - ints and ports passed to us by the exec server. + /* Basic Mach initialization, must be done before RPCs can be done. */ + __mach_init (); - PORTARRAY and INTARRAY are vm_deallocate'd. */ + if (err = __task_get_special_port (__mach_task_self (), TASK_BOOTSTRAP_PORT, + &in_bootstrap)) + LOSE; -void -_hurd_init (char **argv, - mach_port_t *portarray, size_t portarraysize, - int *intarray, size_t intarraysize) -{ - int i; + if (in_bootstrap != MACH_PORT_NULL) + { + /* Call the exec server on our bootstrap port and + get all our standard information from it. */ - /* See what ports we were passed. */ - for (i = 0; i < portarraysize; ++i) - switch (i) - { -#define initport(upper, lower) \ - case INIT_PORT_##upper: \ - _hurd_port_init (&_hurd_##lower, portarray[i]); \ - break - - /* Install the standard ports in their cells. */ - initport (CWDIR, cwdir); - initport (CRDIR, crdir); - initport (AUTH, auth); - - case INIT_PORT_PROC: - /* Install the proc port and tell the proc server we exist. */ - _hurd_proc_init (portarray[i], argv); - break; + argslen = envlen = 0; + _hurd_init_dtablesize = portarraysize = intarraysize = 0; - case INIT_PORT_BOOTSTRAP: - /* When the user asks for the bootstrap port, - he will get the one the exec server passed us. */ - __task_set_special_port (__mach_task_self (), - TASK_BOOTSTRAP_PORT, portarray[i]); - /* FALLTHROUGH */ - - default: - /* Wonder what that could be. */ - __mach_port_deallocate (__mach_task_self (), portarray[i]); - break; - } + err = __exec_startup (in_bootstrap, + &stack_base, &stack_size, + &flags, + &args, &argslen, &env, &envlen, + &_hurd_init_dtable, &_hurd_init_dtablesize, + &portarray, &portarraysize, + &intarray, &intarraysize); + __mach_port_deallocate (__mach_task_self (), in_bootstrap); + } - if (intarraysize > INIT_UMASK) - _hurd_umask = intarray[INIT_UMASK] & 0777; - else - _hurd_umask = 0022; /* XXX */ - if (intarraysize > INIT_CTTY_FILEID) /* Knows that these are sequential. */ + if (err || in_bootstrap == MACH_PORT_NULL) { - _hurd_ctty_fstype = intarray[INIT_CTTY_FSTYPE]; - _hurd_ctty_fsid.val[0] = intarray[INIT_CTTY_FSID1]; - _hurd_ctty_fsid.val[1] = intarray[INIT_CTTY_FSID2]; - _hurd_ctty_fileid = intarray[INIT_CTTY_FILEID]; + /* Either we have no bootstrap port, or the RPC to the exec server + failed. Try to snarf the args in the canonical Mach way. + Hopefully either they will be on the stack as expected, or the + stack will be zeros so we don't crash. Set all our other + variables to have empty information. */ + + /* SNARF_ARGS (ARGC, ARGV, ENVP) snarfs the arguments and environment + from the stack, assuming they were put there by the microkernel. */ + SNARF_ARGS (argc, argv, envp); + + flags = 0; + args = env = NULL; + argslen = envlen = 0; + _hurd_init_dtable = NULL; + _hurd_init_dtablesize = 0; + portarray = NULL; + portarraysize = 0; + intarray = NULL; + intarraysize = 0; } + else + argv = envp = NULL; + + /* Do cthreads initialization and switch to the cthread stack. */ + + if (_cthread_init_routine != NULL) + CALL_WITH_SP (start1, (*_cthread_init_routine) ()); + else + start1 (); - /* All done with init ints and ports. */ - __vm_deallocate (__mach_task_self (), intarray, nints * sizeof (int)); - __vm_deallocate (__mach_task_self (), - portarray, nports * sizeof (mach_port_t)); + /* Should never get here. */ + LOSE; } diff -ruN glibc-1.06/sysdeps/mach/hurd/statbuf.h glibc-1.07/sysdeps/mach/hurd/statbuf.h --- glibc-1.06/sysdeps/mach/hurd/statbuf.h Tue Oct 20 19:06:44 1992 +++ glibc-1.07/sysdeps/mach/hurd/statbuf.h Tue Oct 26 14:51:15 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -27,14 +27,18 @@ int st_fstype; /* File system type. */ __fsid_t st_fsid; /* File system ID. */ #define st_dev st_fsid + __ino_t st_ino; /* File number. */ unsigned int st_gen; /* To detect reuse of file numbers. */ __dev_t st_rdev; /* Device if special file. */ __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Number of links. */ + __uid_t st_uid; /* Owner. */ __gid_t st_gid; /* Owning group. */ + __off_t st_size; /* Size in bytes. */ + __time_t st_atime; /* Access time, seconds */ unsigned long int st_atime_usec; /* and microseconds. */ __time_t st_mtime; /* Modification time, seconds */ @@ -41,10 +45,16 @@ unsigned long int st_mtime_usec; /* and microseconds. */ __time_t st_ctime; /* Status change time, seconds */ unsigned long int st_ctime_usec; /* and microseconds. */ + unsigned int st_blksize; /* Optimal size for I/O. */ + +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + unsigned int st_blocks; /* Number of 512-byte blocks allocated. - Not particular related to `st_blksize'. */ + Not related to `st_blksize'. */ + __uid_t st_author; /* File author. */ + int st_spare[8]; /* Reserved for future use. */ }; @@ -69,5 +79,12 @@ #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ + + +/* Default file creation mask (umask). */ +#ifdef __USE_BSD +#define CMASK 0022 +#endif + #endif /* statbuf.h */ diff -ruN glibc-1.06/sysdeps/mach/hurd/stdio_init.c glibc-1.07/sysdeps/mach/hurd/stdio_init.c --- glibc-1.06/sysdeps/mach/hurd/stdio_init.c Sat May 15 18:01:07 1993 +++ glibc-1.07/sysdeps/mach/hurd/stdio_init.c Mon Aug 9 17:02:50 1993 @@ -1,3 +1,6 @@ +#include +#if 0 + /* Copyright (C) 1991 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -483,3 +486,5 @@ __cookie(stream) = (PTR) m; __userbuf(stream) = 1; /* Tell stdio not to allocate a buffer. */ } + +#endif /* 0 */ diff -ruN glibc-1.06/sysdeps/mach/hurd/sync.c glibc-1.07/sysdeps/mach/hurd/sync.c --- glibc-1.06/sysdeps/mach/hurd/sync.c Thu Apr 2 01:09:48 1992 +++ glibc-1.07/sysdeps/mach/hurd/sync.c Fri Dec 17 18:47:46 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,12 +19,14 @@ #include #include #include +#include /* Make all changes done to all files actually appear on disk. */ int DEFUN_VOID(sync) { - error_t err = _HURD_PORT_USE (&_hurd_crdir, __file_syncfs (port, 1, 1)); + error_t err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_CRDIR], + __file_syncfs (port, 1, 1)); if (err) return __hurd_fail (err); return 0; diff -ruN glibc-1.06/sysdeps/mach/hurd/sysd-stdio.c glibc-1.07/sysdeps/mach/hurd/sysd-stdio.c --- glibc-1.06/sysdeps/mach/hurd/sysd-stdio.c Thu Apr 2 01:15:06 1992 +++ glibc-1.07/sysdeps/mach/hurd/sysd-stdio.c Wed Aug 11 14:34:35 1993 @@ -1,3 +1,6 @@ +#if 1 +#include +#else /* Copyright (C) 1991, 1992 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -192,3 +195,4 @@ return err; } } +#endif /* 1 */ diff -ruN glibc-1.06/sysdeps/mach/hurd/telldir.c glibc-1.07/sysdeps/mach/hurd/telldir.c --- glibc-1.06/sysdeps/mach/hurd/telldir.c +++ glibc-1.07/sysdeps/mach/hurd/telldir.c Tue Dec 21 01:41:25 1993 @@ -0,0 +1,37 @@ +/* Copyright (C) 1993 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 +#include +#include +#include +#include +#include + +/* Return the current position of DIRP. */ +off_t +DEFUN(telldir, (dirp), DIR *dirp) +{ + if (dirp == NULL) + { + errno = EINVAL; + return (off_t) -1; + } + + return dirp->__filepos + dirp->__offset; +} diff -ruN glibc-1.06/sysdeps/mach/hurd/truncate.c glibc-1.07/sysdeps/mach/hurd/truncate.c --- glibc-1.06/sysdeps/mach/hurd/truncate.c Thu Apr 2 01:15:22 1992 +++ glibc-1.07/sysdeps/mach/hurd/truncate.c Tue Dec 21 01:04:20 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -20,6 +20,7 @@ #include #include #include +#include /* Truncate PATH to LENGTH bytes. */ int @@ -27,7 +28,7 @@ CONST char *path AND off_t length) { error_t err; - file_t file = __path_lookup (path, FS_LOOKUP_WRITE, 0); + file_t file = __path_lookup (path, O_WRITE, 0); if (file == MACH_PORT_NULL) return -1; diff -ruN glibc-1.06/sysdeps/mach/hurd/ttyname.c glibc-1.07/sysdeps/mach/hurd/ttyname.c --- glibc-1.06/sysdeps/mach/hurd/ttyname.c +++ glibc-1.07/sysdeps/mach/hurd/ttyname.c Fri Jan 7 18:50:31 1994 @@ -0,0 +1,101 @@ +/* Copyright (C) 1994 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +char *__ttyname = NULL; + +/* Return the pathname of the terminal FD is open on, or NULL on errors. + The returned storage is good only until the next call to this function. */ +char * +ttyname (int fd) +{ + static const char dev[] = "/dev"; + DIR *dirstream; + struct dirent *d; + error_t err; + mach_port_t fd_cttyid; + static char nodename[1024] = ""; /* XXX */ + + /* Open FILENAME relative to DIR and see if its ctty ID port + is the same as FD_CTTYID. If so, deallocate that port and return 1. */ + int try (file_t dir, const char *filename) + { + mach_port_t file, cttyid; + if (__USEPORT (CRDIR, __hurd_path_lookup (port, dir, filename, 0, 0, + &file))) + return 0; /* Can't open it. */ + err = __term_getctty (file, &cttyid); + __mach_port_deallocate (__mach_task_self (), file); + if (err) + return 0; /* Not a terminal. */ + /* We only need to know if CTTYID is the same port as FD_CTTYID, + so deallocating the reference can never hurt. */ + __mach_port_deallocate (__mach_task_self (), cttyid); + return cttyid == fd_cttyid; + } + + /* Get the ctty ID port of the object we want to find. */ + if (err = _HURD_DPORT_USE (fd, + (__term_get_nodename (port, nodename), + __term_getctty (port, &fd_cttyid)))) + return __hurd_fail (err), NULL; + + if (nodename[0] != '\0' && __USEPORT (CWDIR, try (port, nodename))) + return nodename; + + dirstream = opendir (dev); + if (dirstream == NULL) + return NULL; + + while ((d = readdir (dirstream)) != NULL) + if (try (dirstream->__port, d->d_name)) + { + int save; + if (__ttyname) + free (__ttyname); + __ttyname = malloc (sizeof (dev) + 1 + d->d_namlen); + if (__ttyname != NULL) + { + memcpy (__ttyname, dev, sizeof (dev) - 1); + __ttyname[sizeof (dev)] = '/'; + memcpy (&__ttyname[sizeof (dev) + 1], d->d_name, d->d_namlen + 1); + } + save = errno; + (void) closedir (dirstream); + errno = save; + return __ttyname; + } + + { + int save = errno; + (void) closedir (dirstream); + errno = save; + return NULL; + } +} diff -ruN glibc-1.06/sysdeps/mach/hurd/uname.c glibc-1.07/sysdeps/mach/hurd/uname.c --- glibc-1.06/sysdeps/mach/hurd/uname.c Thu Sep 17 02:29:52 1992 +++ glibc-1.07/sysdeps/mach/hurd/uname.c Tue Jun 29 02:45:06 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -27,7 +27,8 @@ error_t err; /* init is the repository of system version information. */ - if (err = _HURD_PORT_USE (&_hurd_proc, __proc_getmsgport (port, 1, &init))) + if (err = _HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC], + __proc_getmsgport (port, 1, &init))) return __hurd_fail (err); err = __startup_uname (uname); /* Ask it. */ diff -ruN glibc-1.06/sysdeps/mach/hurd/usleep.c glibc-1.07/sysdeps/mach/hurd/usleep.c --- glibc-1.06/sysdeps/mach/hurd/usleep.c Thu Apr 2 01:12:21 1992 +++ glibc-1.07/sysdeps/mach/hurd/usleep.c Tue Dec 21 01:04:24 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 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 @@ -27,15 +27,15 @@ mach_port_t recv; struct timeval before, after; - recv = _hurd_dead_recv (); + recv = __mach_reply_port (); if (__gettimeofday (&before, NULL) < 0) return useconds; - (void) __mach_msg (NULL, MACH_MSG_OPTION_TIMEOUT|MACH_RCV_INTERRUPT, - 0, 0, recv, useconds, MACH_PORT_NULL); + (void) __mach_msg (NULL, MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT, + 0, 0, recv, (useconds + 999) / 1000, MACH_PORT_NULL); if (__gettimeofday (&after, NULL) < 0) return 0; - return (((after.tv_sec - before.tv_sec) * 1000) + + return (((after.tv_sec - before.tv_sec) * 1000000) + (after.tv_usec - before.tv_usec)); } diff -ruN glibc-1.06/sysdeps/mach/i386/start.c glibc-1.07/sysdeps/mach/i386/start.c --- glibc-1.06/sysdeps/mach/i386/start.c Wed Mar 17 12:22:16 1993 +++ glibc-1.07/sysdeps/mach/i386/start.c @@ -1,80 +0,0 @@ -/* Copyright (C) 1992, 1993 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 -#include -#include -#include -#include - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* The first piece of initialized data. */ -int __data_start = 0; - -volatile int errno; - -#ifndef HAVE_GNU_LD -#define __environ environ -#endif -char **__environ; - -extern void EXFUN(__mach_init, (NOARGS)); -extern void EXFUN(__libc_init, (int argc, char **argv, char **envp)); -extern int EXFUN(main, (int argc, char **argv, char **envp)); - -/* These are uninitialized common definitions so they will be zero - by default. If the user links in C threads, that will provide initialized - definitions that override these. */ -void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ -void (*_cthread_exit_routine) (int status); - -void -_start (void) -{ - int *entry_sp; - register int argc; - register char **argv, **p; - - asm ("leal 4(%%ebp), %0" : "=r" (entry_sp)); - - argc = *entry_sp; - argv = (char **) (entry_sp + 1); - p = argv; - while (*p++ != NULL) - ; - if (p >= (char **) argv[0]) - --p; - __environ = p; - - __mach_init (); - - if (_cthread_init_routine != NULL) - asm volatile ("movl %0, %%esp" : /* No outputs. */ : - "g" ((*_cthread_init_routine) ())); - - __libc_init (argc, argv, __environ); - - (_cthread_exit_routine != NULL ? *_cthread_exit_routine : exit) - (main (argc, argv, __environ)); - - /* Should never get here. */ - _exit (-1); -} diff -ruN glibc-1.06/sysdeps/mach/i386/syscall.S glibc-1.07/sysdeps/mach/i386/syscall.S --- glibc-1.06/sysdeps/mach/i386/syscall.S +++ glibc-1.07/sysdeps/mach/i386/syscall.S Wed Nov 10 05:39:12 1993 @@ -0,0 +1,26 @@ +/* Copyright (C) 1993 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 + +ENTRY (syscall) + popl %ecx /* Pop return address into %ecx. */ + popl %eax /* Pop syscall number into %eax. */ + pushl %ecx /* Push back return address. */ + .byte 0x9a, 0, 0, 0, 0, 7, 0 /* lcall $7, $0 -- gas bug */ + ret diff -ruN glibc-1.06/sysdeps/mach/i386/sysdep.h glibc-1.07/sysdeps/mach/i386/sysdep.h --- glibc-1.06/sysdeps/mach/i386/sysdep.h Sat Oct 24 23:58:28 1992 +++ glibc-1.07/sysdeps/mach/i386/sysdep.h Mon Sep 6 23:30:24 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -31,3 +31,31 @@ ret #define MOVE(x,y) movl x , y + +#define LOSE asm volatile ("hlt") + +#define SNARF_ARGS(argc, argv, envp) \ + do \ + { \ + int *entry_sp; \ + register char **p; \ + \ + asm ("leal 4(%%ebp), %0" : "=r" (entry_sp)); \ + \ + argc = *entry_sp; \ + argv = (char **) (entry_sp + 1); \ + p = argv; \ + while (*p++ != NULL) \ + ; \ + if (p >= (char **) argv[0]) \ + --p; \ + envp = p; \ + } while (0) + +#define SET_SP(sp) \ + +#define CALL_WITH_SP(fn, sp) \ + asm volatile ("movl %0, %%esp; jmp %1" : : \ + "g" (sp), "m" (*(long int *) (fn)) : "%esp") + +#include_next diff -ruN glibc-1.06/sysdeps/mach/start.c glibc-1.07/sysdeps/mach/start.c --- glibc-1.06/sysdeps/mach/start.c +++ glibc-1.07/sysdeps/mach/start.c Wed Aug 4 17:24:23 1993 @@ -0,0 +1,83 @@ +/* Copyright (C) 1992, 1993 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 +#include +#include +#include +#include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + +/* The first piece of initialized data. */ +int __data_start = 0; + +volatile int errno; + +#ifndef HAVE_GNU_LD +#define __environ environ +#endif +char **__environ; + +extern void __mach_init (void); +extern void __libc_init (int argc, char **argv, char **envp); +extern int main (int argc, char **argv, char **envp); + +/* These are uninitialized common definitions so they will be zero + by default. If the user links in C threads, that will provide initialized + definitions that override these. */ +void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ +void (*_cthread_exit_routine) (int status); + + +/* These are for communication from _start to start1, + where we cannot use the stack for anything. */ +static int start_argc; +static char **start_argv; + +/* _start calls this on the new stack. */ +static volatile void +start1 (void) +{ + __libc_init (start_argc, start_argv, __environ); + + (_cthread_exit_routine != NULL ? *_cthread_exit_routine : exit) + (main (start_argc, start_argv, __environ)); + + /* Should never get here. */ + LOSE; +} + + +void +_start (void) +{ + SNARF_ARGS (start_argc, start_argv, __environ); + + __mach_init (); + + if (_cthread_init_routine != NULL) + CALL_WITH_SP (start1, (*_cthread_init_routine) ()); + else + start1 (); + + /* Should never get here. */ + LOSE; +} diff -ruN glibc-1.06/sysdeps/mach/sys/reboot.h glibc-1.07/sysdeps/mach/sys/reboot.h --- glibc-1.06/sysdeps/mach/sys/reboot.h +++ glibc-1.07/sysdeps/mach/sys/reboot.h Tue Aug 3 18:25:15 1993 @@ -0,0 +1,147 @@ +/* + * Mach Operating System + * Copyright (c) 1993,1991,1990 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * HISTORY + * $Log: reboot.h,v $ + * Revision 2.8 93/03/11 13:46:40 danner + * u_long -> u_int. + * [93/03/09 danner] + * + * Revision 2.7 92/05/21 17:25:11 jfriedl + * Appended 'U' to constants that would otherwise be signed. + * [92/05/16 jfriedl] + * + * Revision 2.6 91/06/19 11:59:44 rvb + * Second byte of boothowto is flags for "startup" program. + * [91/06/18 rvb] + * Add ifndef ASSEMBLER so that vax_init.s can include it. + * [91/06/11 rvb] + * + * Revision 2.5 91/05/14 17:40:11 mrt + * Correcting copyright + * + * Revision 2.4 91/02/05 17:56:48 mrt + * Changed to new Mach copyright + * [91/02/01 17:49:12 mrt] + * + * Revision 2.3 90/08/27 22:12:56 dbg + * Added definitions used by Mach Kernel: RB_DEBUGGER, RB_UNIPROC, + * RB_NOBOOTRC, RB_ALTBOOT. Moved RB_KDB to 0x04 (Mach value). + * Removed RB_RDONLY, RB_DUMP, RB_NOSYNC. + * [90/08/14 dbg] + * + */ + +/* + * Copyright (c) 1982, 1986, 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)reboot.h 7.5 (Berkeley) 6/27/88 + */ + +#ifndef _SYS_REBOOT_H_ +#define _SYS_REBOOT_H_ + +/* + * Arguments to reboot system call. + * These are converted to switches, and passed to startup program, + * and on to init. + */ +#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */ + +#define RB_ASKNAME 0x01 /* -a: ask for file name to reboot from */ +#define RB_SINGLE 0x02 /* -s: reboot to single user only */ +#define RB_KDB 0x04 /* -d: kernel debugger symbols loaded */ +#define RB_HALT 0x08 /* -h: enter KDB at bootup */ + /* for host_reboot(): don't reboot, + just halt */ +#define RB_INITNAME 0x10 /* -i: name given for /etc/init (unused) */ +#define RB_DFLTROOT 0x20 /* use compiled-in rootdev */ +#define RB_NOBOOTRC 0x20 /* -b: don't run /etc/rc.boot */ +#define RB_ALTBOOT 0x40 /* use /boot.old vs /boot */ +#define RB_UNIPROC 0x80 /* -u: start only one processor */ + +#define RB_SHIFT 8 /* second byte is for ux */ + +#define RB_DEBUGGER 0x1000 /* for host_reboot(): enter kernel + debugger from user level */ + +/* + * Constants for converting boot-style device number to type, + * adaptor (uba, mba, etc), unit number and partition number. + * Type (== major device number) is in the low byte + * for backward compatibility. Except for that of the "magic + * number", each mask applies to the shifted value. + * Format: + * (4) (4) (4) (4) (8) (8) + * -------------------------------- + * |MA | AD| CT| UN| PART | TYPE | + * -------------------------------- + */ +#define B_ADAPTORSHIFT 24 +#define B_ADAPTORMASK 0x0f +#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK) +#define B_CONTROLLERSHIFT 20 +#define B_CONTROLLERMASK 0xf +#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK) +#define B_UNITSHIFT 16 +#define B_UNITMASK 0xf +#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK) +#define B_PARTITIONSHIFT 8 +#define B_PARTITIONMASK 0xff +#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK) +#define B_TYPESHIFT 0 +#define B_TYPEMASK 0xff +#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK) + +#define B_MAGICMASK ((u_int)0xf0000000U) +#define B_DEVMAGIC ((u_int)0xa0000000U) + +#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \ + (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \ + ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \ + ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC) + + +#ifdef KERNEL +#ifndef ASSEMBLER +extern int boothowto; +#endif ASSEMBLER +#endif + +#endif /* _SYS_REBOOT_H_ */ diff -ruN glibc-1.06/sysdeps/mach/sysdep.h glibc-1.07/sysdeps/mach/sysdep.h --- glibc-1.06/sysdeps/mach/sysdep.h +++ glibc-1.07/sysdeps/mach/sysdep.h Wed Aug 4 17:32:22 1993 @@ -0,0 +1,54 @@ +/* Copyright (C) 1993 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. */ + +/* sysdeps/mach/MACHINE/sysdep.h should define these macros. */ + +/* Produce a text assembler label for the C global symbol NAME. */ +#ifndef ENTRY +#define ENTRY(name) +#error ENTRY not defined by sysdeps/mach/MACHINE/sysdep.h +#endif + +/* Define a C function called NAME which does system call NUMBER. */ +#ifndef SYSCALL_TRAP +#define SYSCALL_TRAP(name, number) +#error SYSCALL_TRAP not defined by sysdeps/mach/MACHINE/sysdep.h +#endif + +/* Set variables ARGC, ARGV, and ENVP for the arguments + left on the stack by the microkernel. */ +#ifndef SNARF_ARGS +#define SNARF_ARGS(argc, argv, envp) +#error SNARF_ARGS not defined by sysdeps/mach/MACHINE/sysdep.h +#endif + +/* Call the C function FN with no arguments, + on a stack starting at SP (as returned by *_cthread_init_routine). + You don't need to deal with FN returning; it shouldn't. */ +#ifndef CALL_WITH_SP +#define CALL_WITH_SP(fn, sp) +#error CALL_WITH_SP not defined by sysdeps/mach/MACHINE/sysdep.h +#endif + +/* LOSE can be defined as the `halt' instruction or something + similar which will cause the process to die in a characteristic + way suggesting a bug. */ +#ifndef LOSE +#define LOSE __task_terminate (__mach_task_self ()) +#endif + diff -ruN glibc-1.06/sysdeps/mips/__longjmp.c glibc-1.07/sysdeps/mips/__longjmp.c --- glibc-1.06/sysdeps/mips/__longjmp.c Wed Apr 29 23:25:18 1992 +++ glibc-1.07/sysdeps/mips/__longjmp.c Thu Aug 26 19:29:29 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/mips/jmp_buf.h glibc-1.07/sysdeps/mips/jmp_buf.h --- glibc-1.06/sysdeps/mips/jmp_buf.h Mon Mar 8 17:28:58 1993 +++ glibc-1.07/sysdeps/mips/jmp_buf.h Thu Aug 26 19:29:37 1993 @@ -1,6 +1,6 @@ /* Define the machine-dependent type `jmp_buf'. Mips version. Copyright (C) 1992, 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/mips/r4000/gmp-mparam.h glibc-1.07/sysdeps/mips/r4000/gmp-mparam.h --- glibc-1.06/sysdeps/mips/r4000/gmp-mparam.h +++ glibc-1.07/sysdeps/mips/r4000/gmp-mparam.h Sun Jan 16 00:16:01 1994 @@ -0,0 +1,29 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. +Copyright (C) 1991 Free Software Foundation, Inc. + + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT 32 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff -ruN glibc-1.06/sysdeps/mips/setjmp_aux.c glibc-1.07/sysdeps/mips/setjmp_aux.c --- glibc-1.06/sysdeps/mips/setjmp_aux.c Wed Apr 29 23:25:17 1992 +++ glibc-1.07/sysdeps/mips/setjmp_aux.c Thu Aug 26 19:29:45 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/mips/sqrt.c glibc-1.07/sysdeps/mips/sqrt.c --- glibc-1.06/sysdeps/mips/sqrt.c Fri May 14 18:43:40 1993 +++ glibc-1.07/sysdeps/mips/sqrt.c @@ -1,39 +0,0 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef HAVE_GNU_AS -#include -#include -#include - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* Return the square root of X. */ -double -DEFUN(sqrt, (x), double x) -{ - register double result; - asm("sqrt.d %1, %0" : "=f" (result) : "f" (x)); - return result; -} -#else -/* GAS (2.0) can't handle the `sqrt.d' synthetic instruction. */ -#include -#endif diff -ruN glibc-1.06/sysdeps/posix/Makefile glibc-1.07/sysdeps/posix/Makefile --- glibc-1.06/sysdeps/posix/Makefile Wed May 19 14:03:05 1993 +++ glibc-1.07/sysdeps/posix/Makefile Wed Jul 21 17:03:51 1993 @@ -35,7 +35,6 @@ $$cwd/$< -o $(patsubst $(common-objpfx)%,%,$@) -ifeq ($(subdir),posix) -generated := $(generated) $(common-objpfx)stdio_lim.h +generated := $(generated) $(common-objpfx)stdio_lim.h \ + $(common-objpfx)mk-stdiolim before-compile := $(before-compile) $(common-objpfx)stdio_lim.h -endif diff -ruN glibc-1.06/sysdeps/posix/__dup2.c glibc-1.07/sysdeps/posix/__dup2.c --- glibc-1.06/sysdeps/posix/__dup2.c Wed Apr 1 01:39:55 1992 +++ glibc-1.07/sysdeps/posix/__dup2.c Thu Oct 21 17:34:17 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -29,7 +30,11 @@ { int save; - if (fd2 < 0) + if (fd2 < 0 +#ifdef OPEN_MAX + || fd2 >= OPEN_MAX +#endif +) { errno = EBADF; return -1; diff -ruN glibc-1.06/sysdeps/posix/__sysconf.c glibc-1.07/sysdeps/posix/__sysconf.c --- glibc-1.06/sysdeps/posix/__sysconf.c Thu May 20 14:02:19 1993 +++ glibc-1.07/sysdeps/posix/__sysconf.c Fri Jun 25 17:00:36 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -53,6 +53,7 @@ case _SC_CLK_TCK: return 60; + case _SC_NGROUPS_MAX: #ifdef NGROUPS_MAX return NGROUPS_MAX; diff -ruN glibc-1.06/sysdeps/posix/__wait.c glibc-1.07/sysdeps/posix/__wait.c --- glibc-1.06/sysdeps/posix/__wait.c Thu Jun 27 19:39:36 1991 +++ glibc-1.07/sysdeps/posix/__wait.c Thu Dec 2 19:03:08 1993 @@ -23,7 +23,7 @@ /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ __pid_t -DEFUN(__wait, (stat_loc), __WAIT_STATUS stat_loc) +DEFUN(__wait, (stat_loc), __WAIT_STATUS_DEFN stat_loc) { return __waitpid(WAIT_ANY, (int *) stat_loc, 0); } diff -ruN glibc-1.06/sysdeps/posix/__wait3.c glibc-1.07/sysdeps/posix/__wait3.c --- glibc-1.06/sysdeps/posix/__wait3.c Fri May 14 19:59:37 1993 +++ glibc-1.07/sysdeps/posix/__wait3.c Mon Dec 13 19:34:14 1993 @@ -29,7 +29,7 @@ children; otherwise don't. */ pid_t DEFUN(__wait3, (stat_loc, options, usage), - __WAIT_STATUS stat_loc AND int options AND struct rusage *usage) + __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage) { if (usage != NULL) { diff -ruN glibc-1.06/sysdeps/posix/defs.c glibc-1.07/sysdeps/posix/defs.c --- glibc-1.06/sysdeps/posix/defs.c Wed Apr 21 17:12:54 1993 +++ glibc-1.07/sysdeps/posix/defs.c Wed May 26 20:17:35 1993 @@ -34,9 +34,9 @@ { \ _IOMAGIC, \ NULL, NULL, NULL, NULL, 0, \ - &(name)->__fileno, fd, \ + (PTR) fd, \ { readwrite, /* ... */ }, \ - { NULL, NULL, NULL, NULL }, \ + { NULL, NULL, NULL, NULL, NULL }, \ { NULL, NULL }, \ -1, -1, \ (next), \ diff -ruN glibc-1.06/sysdeps/posix/fdopen.c glibc-1.07/sysdeps/posix/fdopen.c --- glibc-1.06/sysdeps/posix/fdopen.c Mon Oct 26 17:18:46 1992 +++ glibc-1.07/sysdeps/posix/fdopen.c Wed May 26 20:09:56 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -65,8 +65,7 @@ if (stream == NULL) return NULL; - stream->__fileno = fd; - stream->__cookie = (PTR) &stream->__fileno; + stream->__cookie = (PTR) fd; stream->__mode = m; return stream; diff -ruN glibc-1.06/sysdeps/posix/killpg.c glibc-1.07/sysdeps/posix/killpg.c --- glibc-1.06/sysdeps/posix/killpg.c Fri Oct 25 20:29:01 1991 +++ glibc-1.07/sysdeps/posix/killpg.c Thu Dec 2 18:35:21 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -25,7 +25,7 @@ If PGRP is zero, send SIG to all processes in the current process's process group. */ int -DEFUN(killpg, (pgrp, sig), int pgrp AND int sig) +DEFUN(killpg, (pgrp, sig), __pid_t pgrp AND int sig) { if (pgrp < 0) { diff -ruN glibc-1.06/sysdeps/posix/mk-stdiolim.c glibc-1.07/sysdeps/posix/mk-stdiolim.c --- glibc-1.06/sysdeps/posix/mk-stdiolim.c Tue Apr 21 00:26:57 1992 +++ glibc-1.07/sysdeps/posix/mk-stdiolim.c Tue Dec 14 18:56:56 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -21,14 +21,51 @@ int main() { + /* These values correspond to the code in sysdeps/posix/tempname.c. + Change the values here if you change that code. */ printf("#define L_tmpnam %u\n", sizeof("/usr/tmp/") + 8); printf("#define TMP_MAX %u\n", 62 * 62 * 62); + puts ("#ifdef __USE_POSIX"); printf("#define L_ctermid %u\n", sizeof("/dev/tty")); printf("#define L_cuserid 9\n"); puts ("#endif"); - printf("#define FOPEN_MAX %u\n", OPEN_MAX); - printf("#define FILENAME_MAX %u\n", PATH_MAX); + + /* POSIX does not require that OPEN_MAX and PATH_MAX be defined, so + will not define them if they are run-time variant (which + is the case in the Hurd). ANSI still requires that FOPEN_MAX and + FILENAME_MAX be defined, however. */ + + printf("#define FOPEN_MAX %u\n", +#ifdef OPEN_MAX + + OPEN_MAX +#else + /* This is the minimum number of files that the implementation + guarantees can be open simultaneously. OPEN_MAX not being + defined means the maximum is run-time variant; but POSIX.1 + requires that it never be less than _POSIX_OPEN_MAX, so that is + a good minimum to use. */ + _POSIX_OPEN_MAX +#endif + + ); + + printf("#define FILENAME_MAX %u\n", +#ifdef PATH_MAX + PATH_MAX +#else + /* This is supposed to be the size needed to hold the longest file + name string the implementation guarantees can be opened. + PATH_MAX not being defined means the actual limit on the length + of a file name is runtime-variant (or it is unlimited). ANSI + says in such a case FILENAME_MAX should be a good size to + allocate for a file name string. POSIX.1 guarantees that a + file name up to _POSIX_PATH_MAX chars long can be opened, so + this value must be at least that. */ + 1024 /* _POSIX_PATH_MAX is 255. */ +#endif + ); exit(0); } diff -ruN glibc-1.06/sysdeps/posix/mktemp.c glibc-1.07/sysdeps/posix/mktemp.c --- glibc-1.06/sysdeps/posix/mktemp.c Fri Nov 20 18:54:31 1992 +++ glibc-1.07/sysdeps/posix/mktemp.c Fri Jul 16 16:33:15 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -53,7 +53,8 @@ template[len - 6] = letters[i]; - if (stat (template, &ignored) == 0) + if (stat (template, &ignored) < 0 && errno == ENOENT) + /* The file does not exist. So return this name. */ return template; } diff -ruN glibc-1.06/sysdeps/posix/pipestream.c glibc-1.07/sysdeps/posix/pipestream.c --- glibc-1.06/sysdeps/posix/pipestream.c Tue Oct 27 20:11:15 1992 +++ glibc-1.07/sysdeps/posix/pipestream.c Fri Dec 17 01:55:21 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,13 +33,39 @@ /* Structure describing a popen child. */ struct child { - /* It is important that the first member of this structure be an `int' that - is the file descriptor. This is because the `fileno' function assumes - that __cookie(STREAM) points to the file descriptor. */ - int fd; - pid_t pid; + pid_t pid; /* PID of the child. */ + __ptr_t cookie; /* Original cookie from fdopen. */ + __io_functions funcs; /* Original functions from fdopen. */ }; +/* io_functions for pipe streams. + These all simply call the corresponding + original function with the original cookie. */ + +#define FUNC(type, name, args) \ + static type DEFUN(__CONCAT(child_,name), args, __CONCAT(name,decl)) \ + { \ + struct child *c = (struct child *) cookie; \ + { \ + __ptr_t cookie = c->cookie; \ + return (*c->funcs.__CONCAT(__,name)) args; \ + } \ + } + +#define readdecl PTR cookie AND register char *buf AND register size_t n +FUNC (int, read, (cookie, buf, n)) +#define writedecl PTR cookie AND register CONST char *buf AND register size_t n +FUNC (int, write, (cookie, buf, n)) +#define seekdecl PTR cookie AND fpos_t *pos AND int whence +FUNC (int, seek, (cookie, pos, whence)) +#define closedecl PTR cookie +FUNC (int, close, (cookie)) +#define filenodecl PTR cookie +FUNC (int, fileno, (cookie)) + +static const __io_functions child_funcs + = { child_read, child_write, child_seek, child_close, child_fileno }; + /* Open a new stream that is a one-way pipe to a child process running the given shell command. */ FILE * @@ -101,41 +127,51 @@ won't see it. */ if (*mode == 'r') { - (void) close(pipedes[STDOUT_FILENO]); + (void) close (pipedes[STDOUT_FILENO]); (void) fcntl (pipedes[STDIN_FILENO], F_SETFD, FD_CLOEXEC); - stream = fdopen(pipedes[STDIN_FILENO], mode); + stream = fdopen (pipedes[STDIN_FILENO], mode); } else { - (void) close(pipedes[STDIN_FILENO]); + (void) close (pipedes[STDIN_FILENO]); (void) fcntl (pipedes[STDOUT_FILENO], F_SETFD, FD_CLOEXEC); - stream = fdopen(pipedes[STDOUT_FILENO], mode); + stream = fdopen (pipedes[STDOUT_FILENO], mode); } if (stream == NULL) goto error; - child = (struct child *) malloc(sizeof(struct child)); + child = (struct child *) malloc (sizeof (struct child)); if (child == NULL) goto error; - child->fd = fileno(stream); + + { + /* Make sure STREAM has its functions set before + we try to squirrel them away in CHILD. */ + extern void __stdio_check_funcs __P ((FILE *)); + __stdio_check_funcs (stream); + } + child->pid = pid; + child->cookie = stream->__cookie; + child->funcs = stream->__io_funcs; stream->__cookie = (PTR) child; + stream->__io_funcs = child_funcs; stream->__ispipe = 1; return stream; - error:; + error: { /* The stream couldn't be opened or the child structure couldn't be allocated. Kill the child and close the other side of the pipe. */ int save = errno; - (void) kill(pid, SIGKILL); + (void) kill (pid, SIGKILL); if (stream == NULL) - (void) close(pipedes[*mode == 'r' ? STDOUT_FILENO : STDIN_FILENO]); + (void) close (pipedes[*mode == 'r' ? STDOUT_FILENO : STDIN_FILENO]); else - (void) fclose(stream); + (void) fclose (stream); #ifndef NO_WAITPID - (void) waitpid(pid, (int *) NULL, 0); + (void) waitpid (pid, (int *) NULL, 0); #else { pid_t dead; @@ -154,6 +190,7 @@ int DEFUN(pclose, (stream), register FILE *stream) { + struct child *c; pid_t pid, dead; int status; @@ -163,11 +200,13 @@ return -1; } - pid = ((struct child *) stream->__cookie)->pid; - free(stream->__cookie); - stream->__cookie = (PTR) &stream->__fileno; + c = (struct child *) stream->__cookie; + pid = c->pid; + stream->__cookie = c->cookie; + stream->__io_funcs = c->funcs; + free ((PTR) c); stream->__ispipe = 0; - if (fclose(stream)) + if (fclose (stream)) return -1; #ifndef NO_WAITPID diff -ruN glibc-1.06/sysdeps/posix/sleep.c glibc-1.07/sysdeps/posix/sleep.c --- glibc-1.06/sysdeps/posix/sleep.c Sun May 16 21:36:00 1993 +++ glibc-1.07/sysdeps/posix/sleep.c Mon May 31 20:18:46 1993 @@ -20,6 +20,7 @@ #include #include #include +#include /* SIGALRM signal handler for `sleep'. This does nothing but return, @@ -44,6 +45,7 @@ time_t before, after; sigset_t set, oset; struct sigaction act, oact; + int save = errno; if (seconds == 0) return 0; @@ -91,7 +93,14 @@ /* Restore the user's alarm if we have not already past it. If we have, be sure to turn off the alarm in case a signal other than SIGALRM was what woke us up. */ - alarm (remaining > slept ? remaining - slept : 0); + (void) alarm (remaining > slept ? remaining - slept : 0); + + /* Restore the original signal mask. */ + (void) sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL); + + /* Restore the `errno' value we started with. + Some of the calls we made might have failed, but we didn't care. */ + errno = save; return slept > seconds ? 0 : seconds - slept; } diff -ruN glibc-1.06/sysdeps/posix/stdio_init.c glibc-1.07/sysdeps/posix/stdio_init.c --- glibc-1.06/sysdeps/posix/stdio_init.c Wed Apr 21 16:25:06 1993 +++ glibc-1.07/sysdeps/posix/stdio_init.c Sun May 30 21:03:49 1993 @@ -29,7 +29,7 @@ void DEFUN(__stdio_init_stream, (stream), FILE *stream) { - register CONST int fd = *(int *) stream->__cookie; + register CONST int fd = (int) stream->__cookie; struct stat statb; if (stream->__buffer != NULL || stream->__userbuf) diff -ruN glibc-1.06/sysdeps/posix/sysd-stdio.c glibc-1.07/sysdeps/posix/sysd-stdio.c --- glibc-1.06/sysdeps/posix/sysd-stdio.c Mon Apr 19 19:36:05 1993 +++ glibc-1.07/sysdeps/posix/sysd-stdio.c Wed May 26 18:45:18 1993 @@ -32,14 +32,14 @@ DEFUN(__stdio_read, (cookie, buf, n), PTR cookie AND register char *buf AND register size_t n) { + CONST int fd = (int) cookie; #if defined (EINTR) && defined (EINTR_REPEAT) - CONST int fd = *(int *) cookie; int save = errno; int nread; try:; errno = 0; - nread = __read(fd, buf, (int) n); + nread = __read (fd, buf, (int) n); if (nread < 0) { if (errno == EINTR) @@ -50,7 +50,7 @@ return nread; #else /* No EINTR. */ - return __read(*(int *) cookie, buf, (int) n); + return __read (fd, buf, n); #endif } @@ -60,7 +60,7 @@ DEFUN(__stdio_write, (cookie, buf, n), PTR cookie AND register CONST char *buf AND register size_t n) { - CONST int fd = *(int *) cookie; + CONST int fd = (int) cookie; register size_t written = 0; while (n > 0) @@ -93,7 +93,7 @@ PTR cookie AND fpos_t *pos AND int whence) { off_t new; - new = __lseek(*(int *) cookie, (off_t) *pos, whence); + new = __lseek ((int) cookie, (off_t) *pos, whence); if (new < 0) return 1; *pos = (fpos_t) new; @@ -105,15 +105,25 @@ int DEFUN(__stdio_close, (cookie), PTR cookie) { - return __close(*(int *) cookie); + return __close ((int) cookie); } +/* Return the POSIX.1 file descriptor associated with COOKIE, + or -1 for errors. If COOKIE does not relate to any POSIX.1 file + descriptor, this should return -1 with errno set to EOPNOTSUPP. */ +int +DEFUN(__stdio_fileno, (cookie), PTR cookie) +{ + return (int) cookie; +} + /* Open the given file with the mode given in the __io_mode argument. */ -PTR -DEFUN(__stdio_open, (filename, m, fdptr), - CONST char *filename AND __io_mode m AND int *fdptr) +int +DEFUN(__stdio_open, (filename, m, cookieptr), + CONST char *filename AND __io_mode m AND PTR *cookieptr) { + int fd; int mode; if (m.__read && m.__write) @@ -129,11 +139,14 @@ mode |= O_TRUNC; if (m.__create) - *fdptr = __open(filename, mode | O_CREAT, - S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); + fd = __open (filename, mode | O_CREAT, + S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); else - *fdptr = __open(filename, mode); + fd = __open (filename, mode); - return NULL; + if (fd < 0) + return -1; + *cookieptr = (PTR) fd; + return 0; } diff -ruN glibc-1.06/sysdeps/posix/tempname.c glibc-1.07/sysdeps/posix/tempname.c --- glibc-1.06/sysdeps/posix/tempname.c Mon Apr 19 19:35:25 1993 +++ glibc-1.07/sysdeps/posix/tempname.c Thu Dec 16 15:40:12 1993 @@ -62,32 +62,30 @@ static CONST char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -/* Generate a temporary filename. - If DIR_SEARCH is nonzero, DIR and PFX are used as - described for tempnam. If not, a temporary filename - in P_tmpdir with no special prefix is generated. If LENPTR - is not NULL, *LENPTR is set the to length (including the - terminating '\0') of the resultant filename, which is returned. - This goes through a cyclic pattern of all possible filenames - consisting of five decimal digits of the current pid and three - of the characters in `letters'. Data for tempnam and tmpnam - is kept separate, but when tempnam is using P_tmpdir and no - prefix (i.e, it is identical to tmpnam), the same data is used. - Each potential filename is tested for an already-existing file of - the same name, and no name of an existing file will be returned. - When the cycle reaches its end (12345ZZZ), NULL is returned. */ +/* Generate a temporary filename and return it (in a static buffer). If + STREAMPTR is not NULL, open a stream "w+b" on the file and set + *STREAMPTR to it. If DIR_SEARCH is nonzero, DIR and PFX are used as + described for tempnam. If not, a temporary filename in P_tmpdir with no + special prefix is generated. If LENPTR is not NULL, *LENPTR is set the + to length (including the terminating '\0') of the resultant filename, + which is returned. This goes through a cyclic pattern of all possible + filenames consisting of five decimal digits of the current pid and three + of the characters in `letters'. Data for tempnam and tmpnam is kept + separate, but when tempnam is using P_tmpdir and no prefix (i.e, it is + identical to tmpnam), the same data is used. Each potential filename is + tested for an already-existing file of the same name, and no name of an + existing file will be returned. When the cycle reaches its end + (12345ZZZ), NULL is returned. */ char * -DEFUN(__stdio_gen_tempname, (dir, pfx, dir_search, lenptr), +DEFUN(__stdio_gen_tempname, (dir, pfx, dir_search, lenptr, streamptr), CONST char *dir AND CONST char *pfx AND - int dir_search AND size_t *lenptr) + int dir_search AND size_t *lenptr AND + FILE **streamptr) { + int saverrno = errno; static CONST char tmpdir[] = P_tmpdir; - static struct - { - char buf[3]; - char *s; - size_t i; - } infos[2], *info; + static size_t indices[2]; + size_t *idx; static char buf[FILENAME_MAX]; static pid_t oldpid = (pid_t) 0; pid_t pid = __getpid(); @@ -131,48 +129,80 @@ if (dir != tmpdir && !strcmp(dir, tmpdir)) dir = tmpdir; - info = &infos[(plen == 0 && dir == tmpdir) ? 1 : 0]; + idx = &indices[(plen == 0 && dir == tmpdir) ? 1 : 0]; if (pid != oldpid) { oldpid = pid; - infos[0].buf[0] = infos[0].buf[1] = infos[0].buf[2] = letters[0]; - infos[0].s = infos[0].buf; - infos[0].i = 0; - infos[1].buf[0] = infos[1].buf[1] = infos[1].buf[2] = letters[0]; - infos[1].s = infos[1].buf; - infos[1].i = 0; + indices[0] = indices[1] = 0; } len = dlen + 1 + plen + 5 + 3; - for (;;) + for (; *idx < ((sizeof (letters) - 1) * (sizeof (letters) - 1) * + (sizeof (letters) - 1)); + ++*idx) { - *info->s = letters[info->i]; + /* Construct a file name and see if it already exists. + + We use a single counter in *IDX to cycle each of three + character positions through each of 62 possible letters. */ + if (sizeof (buf) < len || - sprintf (buf, "%.*s/%.*s%.5d%.3s", + sprintf (buf, "%.*s/%.*s%.5d%c%c%c", (int) dlen, dir, (int) plen, - pfx, pid % 100000, info->buf) != (int) len) + pfx, pid % 100000, + letters[*idx + % (sizeof (letters) - 1)], + letters[(*idx / (sizeof (letters) - 1)) + % (sizeof (letters) - 1)], + letters[(*idx / ((sizeof (letters) - 1) * + (sizeof (letters) - 1))) + % (sizeof (letters) - 1)] + ) != (int) len) return NULL; - /* Always return a unique string. */ - ++info->i; - - if (!exists (buf)) - break; - - if (info->i > sizeof (letters) - 2) + if (streamptr != NULL) { - info->i = 0; - if (info->s == &info->buf[2]) + /* Try to create the file atomically. */ + int fd = __open (buf, O_RDWR|O_CREAT|O_EXCL, 0666); + if (fd >= 0) { - errno = EEXIST; - return NULL; + /* We got a new file that did not previously exist. + Create a stream for it. */ + *streamptr = __newstream (); + if (*streamptr == NULL) + { + /* We lost trying to create a stream (out of memory?). + Nothing to do but remove the file, close the descriptor, + and return failure. */ + const int save = errno; + (void) remove (buf); + (void) __close (fd); + errno = save; + return NULL; + } + (*streamptr)->__cookie = (PTR) fd; + (*streamptr)->__mode.__write = 1; + (*streamptr)->__mode.__read = 1; + (*streamptr)->__mode.__binary = 1; } - ++info->s; + else + continue; } + else if (exists (buf)) + continue; + + /* If the file already existed we have continued the loop above, + so we only get here when we have a winning name to return. */ + + errno = saverrno; + + if (lenptr != NULL) + *lenptr = len + 1; + return buf; } - if (lenptr != NULL) - *lenptr = len + 1; - return buf; + /* We got out of the loop because we ran out of combinations to try. */ + errno = EEXIST; /* ? */ + return NULL; } diff -ruN glibc-1.06/sysdeps/sparc/Dist glibc-1.07/sysdeps/sparc/Dist --- glibc-1.06/sysdeps/sparc/Dist Thu Jan 2 15:20:28 1992 +++ glibc-1.07/sysdeps/sparc/Dist Thu May 27 21:26:51 1993 @@ -1 +1,3 @@ -DEFS.h divrem.m4 mul.S umul.S +DEFS.h +mul.S umul.S +divrem.m4 sdiv.S udiv.S rem.S urem.S diff -ruN glibc-1.06/sysdeps/sparc/add_n.S glibc-1.07/sysdeps/sparc/add_n.S --- glibc-1.06/sysdeps/sparc/add_n.S +++ glibc-1.07/sysdeps/sparc/add_n.S Sun Jan 16 00:16:30 1994 @@ -0,0 +1,136 @@ +! sparc __mpn_add_n -- Add two limb vectors of the same length > 0 and store +! sum in a third limb vector. + +! Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr %o0 +! s1_ptr %o1 +! s2_ptr %o2 +! size %o3 + +#include "sysdep.h" + +ENTRY (__mpn_add_n) + ld [%o1+0],%o4 ! read first limb from s1_ptr + srl %o3,4,%g1 + ld [%o2+0],%o5 ! read first limb from s2_ptr + + sub %g0,%o3,%o3 + andcc %o3,(16-1),%o3 + be Lzero + nop + + sll %o3,2,%o3 ! multiply by 4 + sub %o0,%o3,%o0 ! adjust res_ptr + sub %o1,%o3,%o1 ! adjust s1_ptr + sub %o2,%o3,%o2 ! adjust s2_ptr + + mov %o4,%g2 + + sethi %hi(Lbase),%g3 + or %g3,%lo(Lbase),%g3 + sll %o3,2,%o3 ! multiply by 4 + jmp %g3+%o3 + mov %o5,%g3 + +Loop: addxcc %g2,%g3,%o3 + add %o1,64,%o1 + st %o3,[%o0+60] + add %o2,64,%o2 + ld [%o1+0],%o4 + add %o0,64,%o0 + ld [%o2+0],%o5 +Lzero: sub %g1,1,%g1 ! add 0 + 16r limbs (adjust loop counter) +Lbase: ld [%o1+4],%g2 + addxcc %o4,%o5,%o3 + ld [%o2+4],%g3 + st %o3,[%o0+0] + ld [%o1+8],%o4 ! add 15 + 16r limbs + addxcc %g2,%g3,%o3 + ld [%o2+8],%o5 + st %o3,[%o0+4] + ld [%o1+12],%g2 ! add 14 + 16r limbs + addxcc %o4,%o5,%o3 + ld [%o2+12],%g3 + st %o3,[%o0+8] + ld [%o1+16],%o4 ! add 13 + 16r limbs + addxcc %g2,%g3,%o3 + ld [%o2+16],%o5 + st %o3,[%o0+12] + ld [%o1+20],%g2 ! add 12 + 16r limbs + addxcc %o4,%o5,%o3 + ld [%o2+20],%g3 + st %o3,[%o0+16] + ld [%o1+24],%o4 ! add 11 + 16r limbs + addxcc %g2,%g3,%o3 + ld [%o2+24],%o5 + st %o3,[%o0+20] + ld [%o1+28],%g2 ! add 10 + 16r limbs + addxcc %o4,%o5,%o3 + ld [%o2+28],%g3 + st %o3,[%o0+24] + ld [%o1+32],%o4 ! add 9 + 16r limbs + addxcc %g2,%g3,%o3 + ld [%o2+32],%o5 + st %o3,[%o0+28] + ld [%o1+36],%g2 ! add 8 + 16r limbs + addxcc %o4,%o5,%o3 + ld [%o2+36],%g3 + st %o3,[%o0+32] + ld [%o1+40],%o4 ! add 7 + 16r limbs + addxcc %g2,%g3,%o3 + ld [%o2+40],%o5 + st %o3,[%o0+36] + ld [%o1+44],%g2 ! add 6 + 16r limbs + addxcc %o4,%o5,%o3 + ld [%o2+44],%g3 + st %o3,[%o0+40] + ld [%o1+48],%o4 ! add 5 + 16r limbs + addxcc %g2,%g3,%o3 + ld [%o2+48],%o5 + st %o3,[%o0+44] + ld [%o1+52],%g2 ! add 4 + 16r limbs + addxcc %o4,%o5,%o3 + ld [%o2+52],%g3 + st %o3,[%o0+48] + ld [%o1+56],%o4 ! add 3 + 16r limbs + addxcc %g2,%g3,%o3 + ld [%o2+56],%o5 + st %o3,[%o0+52] + ld [%o1+60],%g2 ! add 2 + 16r limbs + addxcc %o4,%o5,%o3 + ld [%o2+60],%g3 + st %o3,[%o0+56] + addx %g0,%g0,%o4 + tst %g1 + bne Loop + subcc %g0,%o4,%g0 ! restore cy (delay slot) + + addxcc %g2,%g3,%o3 + st %o3,[%o0+60] ! store most significant limb + + retl + addx %g0,%g0,%o0 ! return carry-out from most sign. limb diff -ruN glibc-1.06/sysdeps/sparc/addmul_1.S glibc-1.07/sysdeps/sparc/addmul_1.S --- glibc-1.06/sysdeps/sparc/addmul_1.S +++ glibc-1.07/sysdeps/sparc/addmul_1.S Sun Jan 16 00:16:33 1994 @@ -0,0 +1,148 @@ +! SPARC __mpn_addmul_1 -- Multiply a limb vector with a limb and add +! the result to a second limb vector. + +! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr o0 +! s1_ptr o1 +! size o2 +! s2_limb o3 + +#include "sysdep.h" + +ENTRY (__mpn_addmul_1) + ! Make S1_PTR and RES_PTR point at the end of their blocks + ! and put (- 4 x SIZE) in index/loop counter. + sll %o2,2,%o2 + add %o0,%o2,%o4 ! RES_PTR in r6 since r2 is retval + add %o1,%o2,%o1 + sub %g0,%o2,%o2 + + cmp %o3,0xfff + bgu Large + nop + + ld [%o1+%o2],%o5 + mov 0,%o0 + b L0 + add %o4,-4,%o4 +Loop0: + addcc %o5,%g1,%g1 + ld [%o1+%o2],%o5 + addx %o0,%g0,%o0 + st %g1,[%o4+%o2] +L0: wr %g0,%o3,%y + sra %o5,31,%g2 + and %o3,%g2,%g2 + andcc %g1,0,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,0,%g1 + sra %g1,20,%g4 + sll %g1,12,%g1 + rd %y,%g3 + srl %g3,20,%g3 + or %g1,%g3,%g1 + + addcc %g1,%o0,%g1 + addx %g2,%g4,%o0 ! add sign-compensation and cy to hi limb + addcc %o2,4,%o2 ! loop counter + bne Loop0 + ld [%o4+%o2],%o5 + + addcc %o5,%g1,%g1 + addx %o0,%g0,%o0 + retl + st %g1,[%o4+%o2] + + +Large: ld [%o1+%o2],%o5 + mov 0,%o0 + sra %o3,31,%g4 ! g4 = mask of ones iff S2_LIMB < 0 + b L1 + add %o4,-4,%o4 +Loop: + addcc %o5,%g3,%g3 + ld [%o1+%o2],%o5 + addx %o0,%g0,%o0 + st %g3,[%o4+%o2] +L1: wr %g0,%o5,%y + and %o5,%g4,%g2 + andcc %g0,%g0,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%g0,%g1 + rd %y,%g3 + addcc %g3,%o0,%g3 + addx %g2,%g1,%o0 + addcc %o2,4,%o2 + bne Loop + ld [%o4+%o2],%o5 + + addcc %o5,%g3,%g3 + addx %o0,%g0,%o0 + retl + st %g3,[%o4+%o2] diff -ruN glibc-1.06/sysdeps/sparc/mul_1.S glibc-1.07/sysdeps/sparc/mul_1.S --- glibc-1.06/sysdeps/sparc/mul_1.S +++ glibc-1.07/sysdeps/sparc/mul_1.S Sun Jan 16 00:16:47 1994 @@ -0,0 +1,201 @@ +! SPARC __mpn_mul_1 -- Multiply a limb vector with a limb and store +! the result in a second limb vector. + +! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr o0 +! s1_ptr o1 +! size o2 +! s2_limb o3 + +! ADD CODE FOR SMALL MULTIPLIERS! +!1: ld +! st +! +!2: ld ,a +! addxcc a,a,x +! st x, +! +!3_unrolled: +! ld ,a +! addxcc a,a,x1 ! 2a + cy +! addx %g0,%g0,x2 +! addcc a,x1,x ! 3a + c +! st x, +! +! ld ,a +! addxcc a,a,y1 +! addx %g0,%g0,y2 +! addcc a,y1,x +! st x, +! +!4_unrolled: +! ld ,a +! srl a,2,x1 ! 4a +! addxcc y2,x1,x +! sll a,30,x2 +! st x, +! +! ld ,a +! srl a,2,y1 +! addxcc x2,y1,y +! sll a,30,y2 +! st x, +! +!5_unrolled: +! ld ,a +! srl a,2,x1 ! 4a +! addxcc a,x1,x ! 5a + c +! sll a,30,x2 +! addx %g0,x2,x2 +! st x, +! +! ld ,a +! srl a,2,y1 +! addxcc a,y1,x +! sll a,30,y2 +! addx %g0,y2,y2 +! st x, +! +!8_unrolled: +! ld ,a +! srl a,3,x1 ! 8a +! addxcc y2,x1,x +! sll a,29,x2 +! st x, +! +! ld ,a +! srl a,3,y1 +! addxcc x2,y1,y +! sll a,29,y2 +! st x, + + +#include "sysdep.h" + +ENTRY (__mpn_mul_1) + ! Make S1_PTR and RES_PTR point at the end of their blocks + ! and put (- 4 x SIZE) in index/loop counter. + sll %o2,2,%o2 + add %o0,%o2,%o4 ! RES_PTR in o4 since o0 is retval + add %o1,%o2,%o1 + sub %g0,%o2,%o2 + + cmp %o3,0xfff + bgu Large + nop + + ld [%o1+%o2],%o5 + mov 0,%o0 + b L0 + add %o4,-4,%o4 +Loop0: + st %g1,[%o4+%o2] +L0: wr %g0,%o3,%y + sra %o5,31,%g2 + and %o3,%g2,%g2 + andcc %g1,0,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,0,%g1 + sra %g1,20,%g4 + sll %g1,12,%g1 + rd %y,%g3 + srl %g3,20,%g3 + or %g1,%g3,%g1 + + addcc %g1,%o0,%g1 + addx %g2,%g4,%o0 ! add sign-compensation and cy to hi limb + addcc %o2,4,%o2 ! loop counter + bne,a Loop0 + ld [%o1+%o2],%o5 + + retl + st %g1,[%o4+%o2] + + +Large: ld [%o1+%o2],%o5 + mov 0,%o0 + sra %o3,31,%g4 ! g4 = mask of ones iff S2_LIMB < 0 + b L1 + add %o4,-4,%o4 +Loop: + st %g3,[%o4+%o2] +L1: wr %g0,%o5,%y + and %o5,%g4,%g2 ! g2 = S1_LIMB iff S2_LIMB < 0, else 0 + andcc %g0,%g0,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%g0,%g1 + rd %y,%g3 + addcc %g3,%o0,%g3 + addx %g2,%g1,%o0 ! add sign-compensation and cy to hi limb + addcc %o2,4,%o2 ! loop counter + bne,a Loop + ld [%o1+%o2],%o5 + + retl + st %g3,[%o4+%o2] diff -ruN glibc-1.06/sysdeps/sparc/sparc8/addmul_1.S glibc-1.07/sysdeps/sparc/sparc8/addmul_1.S --- glibc-1.06/sysdeps/sparc/sparc8/addmul_1.S +++ glibc-1.07/sysdeps/sparc/sparc8/addmul_1.S Sun Jan 16 00:15:31 1994 @@ -0,0 +1,59 @@ +! SPARC v8 __mpn_addmul_1 -- Multiply a limb vector with a limb and +! add the result to a second limb vector. + +! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr o0 +! s1_ptr o1 +! size o2 +! s2_limb o3 + +#include "sysdep.h" + +ENTRY (__mpn_addmul_1) + sub %g0,%o2,%o2 ! negate ... + sll %o2,2,%o2 ! ... and scale size + sub %o1,%o2,%o1 ! o1 is offset s1_ptr + sub %o0,%o2,%g1 ! g1 is offset res_ptr + + mov 0,%o0 ! clear cy_limb + +Loop: ld [%o1+%o2],%o4 + ld [%g1+%o2],%g2 + umul %o4,%o3,%o5 + rd %y,%g3 + addcc %o5,%o0,%o5 + addx %g3,0,%o0 + addcc %o5,%g2,%g2 + addx %o0,0,%o0 + st %g2,[%g1+%o2] + + addcc %o2,4,%o2 + bne Loop + nop + + retl + nop diff -ruN glibc-1.06/sysdeps/sparc/sparc8/mul_1.S glibc-1.07/sysdeps/sparc/sparc8/mul_1.S --- glibc-1.06/sysdeps/sparc/sparc8/mul_1.S +++ glibc-1.07/sysdeps/sparc/sparc8/mul_1.S Sun Jan 16 00:15:39 1994 @@ -0,0 +1,62 @@ +! SPARC v8 __mpn_mul_1 -- Multiply a limb vector with a single limb and +! store the product in a second limb vector. + +! Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr o0 +! s1_ptr o1 +! size o2 +! s2_limb o3 + +#include "sysdep.h" + +ENTRY (__mpn_mul_1) + ld [%o1],%o4 + sub %g0,%o2,%o2 + sll %o2,2,%o2 + sub %o1,%o2,%o1 ! o1 is offset s1_ptr + sub %o0,%o2,%o0 ! o0 is offset res_ptr + sub %o0,8,%g1 + umul %o4,%o3,%o5 + + addcc %o2,4,%o2 + be Lend + mov 0,%o0 ! clear cy_limb + +Loop: ld [%o1+%o2],%o4 + rd %y,%g3 + addcc %o5,%o0,%g2 + umul %o4,%o3,%o5 + addx %g3,0,%o0 + addcc %o2,4,%o2 + bne Loop + st %g2,[%g1+%o2] + +Lend: rd %y,%g3 + addcc %o5,%o0,%g2 + st %g2,[%g1+4] + retl + addx %g3,0,%o0 diff -ruN glibc-1.06/sysdeps/sparc/sparc8/submul_1.S glibc-1.07/sysdeps/sparc/sparc8/submul_1.S --- glibc-1.06/sysdeps/sparc/sparc8/submul_1.S +++ glibc-1.07/sysdeps/sparc/sparc8/submul_1.S Sun Jan 16 00:15:41 1994 @@ -0,0 +1,59 @@ +! SPARC v8 __mpn_submul_1 -- Multiply a limb vector with a limb and +! subtract the result from a second limb vector. + +! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr o0 +! s1_ptr o1 +! size o2 +! s2_limb o3 + +#include "sysdep.h" + +ENTRY (__mpn_submul_1) + sub %g0,%o2,%o2 ! negate ... + sll %o2,2,%o2 ! ... and scale size + sub %o1,%o2,%o1 ! o1 is offset s1_ptr + sub %o0,%o2,%g1 ! g1 is offset res_ptr + + mov 0,%o0 ! clear cy_limb + +Loop: ld [%o1+%o2],%o4 + ld [%g1+%o2],%g2 + umul %o4,%o3,%o5 + rd %y,%g3 + addcc %o5,%o0,%o5 + addx %g3,0,%o0 + subcc %g2,%o5,%g2 + addx %o0,0,%o0 + st %g2,[%g1+%o2] + + addcc %o2,4,%o2 + bne Loop + nop + + retl + nop diff -ruN glibc-1.06/sysdeps/sparc/sparc8/udiv_qrnnd.S glibc-1.07/sysdeps/sparc/sparc8/udiv_qrnnd.S --- glibc-1.06/sysdeps/sparc/sparc8/udiv_qrnnd.S +++ glibc-1.07/sysdeps/sparc/sparc8/udiv_qrnnd.S Sun Jan 16 00:15:38 1994 @@ -0,0 +1,188 @@ +! SPARC __udiv_qrnnd division support, used from longlong.h. + +! Copyright (C) 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +! INPUT PARAMETERS +! rem_ptr o0 +! n1 o1 +! n0 o2 +! d o3 + +#include "sysdep.h" + +ENTRY (__udiv_qrnnd) + + tst %o3 + bneg Largedivisor + mov 8,%g1 + + b Lp1 + addxcc %o2,%o2,%o2 + +Lplop: bcc Ln1 + addxcc %o2,%o2,%o2 +Lp1: addx %o1,%o1,%o1 + subcc %o1,%o3,%o4 + bcc Ln2 + addxcc %o2,%o2,%o2 +Lp2: addx %o1,%o1,%o1 + subcc %o1,%o3,%o4 + bcc Ln3 + addxcc %o2,%o2,%o2 +Lp3: addx %o1,%o1,%o1 + subcc %o1,%o3,%o4 + bcc Ln4 + addxcc %o2,%o2,%o2 +Lp4: addx %o1,%o1,%o1 + addcc %g1,-1,%g1 + bne Lplop + subcc %o1,%o3,%o4 + bcc Ln5 + addxcc %o2,%o2,%o2 +Lp5: st %o1,[%o0] + retl + xnor %g0,%o2,%o0 + +Lnlop: bcc Lp1 + addxcc %o2,%o2,%o2 +Ln1: addx %o4,%o4,%o4 + subcc %o4,%o3,%o1 + bcc Lp2 + addxcc %o2,%o2,%o2 +Ln2: addx %o4,%o4,%o4 + subcc %o4,%o3,%o1 + bcc Lp3 + addxcc %o2,%o2,%o2 +Ln3: addx %o4,%o4,%o4 + subcc %o4,%o3,%o1 + bcc Lp4 + addxcc %o2,%o2,%o2 +Ln4: addx %o4,%o4,%o4 + addcc %g1,-1,%g1 + bne Lnlop + subcc %o4,%o3,%o1 + bcc Lp5 + addxcc %o2,%o2,%o2 +Ln5: st %o4,[%o0] + retl + xnor %g0,%o2,%o0 + +Largedivisor: + and %o2,1,%o5 ! %o5 = n0 & 1 + + srl %o2,1,%o2 + sll %o1,31,%g2 + or %g2,%o2,%o2 ! %o2 = lo(n1n0 >> 1) + srl %o1,1,%o1 ! %o1 = hi(n1n0 >> 1) + + and %o3,1,%g2 + srl %o3,1,%g3 ! %g3 = floor(d / 2) + add %g3,%g2,%g3 ! %g3 = ceil(d / 2) + + b LLp1 + addxcc %o2,%o2,%o2 + +LLplop: bcc LLn1 + addxcc %o2,%o2,%o2 +LLp1: addx %o1,%o1,%o1 + subcc %o1,%g3,%o4 + bcc LLn2 + addxcc %o2,%o2,%o2 +LLp2: addx %o1,%o1,%o1 + subcc %o1,%g3,%o4 + bcc LLn3 + addxcc %o2,%o2,%o2 +LLp3: addx %o1,%o1,%o1 + subcc %o1,%g3,%o4 + bcc LLn4 + addxcc %o2,%o2,%o2 +LLp4: addx %o1,%o1,%o1 + addcc %g1,-1,%g1 + bne LLplop + subcc %o1,%g3,%o4 + bcc LLn5 + addxcc %o2,%o2,%o2 +LLp5: add %o1,%o1,%o1 ! << 1 + tst %g2 + bne Oddp + add %o5,%o1,%o1 + st %o1,[%o0] + retl + xnor %g0,%o2,%o0 + +LLnlop: bcc LLp1 + addxcc %o2,%o2,%o2 +LLn1: addx %o4,%o4,%o4 + subcc %o4,%g3,%o1 + bcc LLp2 + addxcc %o2,%o2,%o2 +LLn2: addx %o4,%o4,%o4 + subcc %o4,%g3,%o1 + bcc LLp3 + addxcc %o2,%o2,%o2 +LLn3: addx %o4,%o4,%o4 + subcc %o4,%g3,%o1 + bcc LLp4 + addxcc %o2,%o2,%o2 +LLn4: addx %o4,%o4,%o4 + addcc %g1,-1,%g1 + bne LLnlop + subcc %o4,%g3,%o1 + bcc LLp5 + addxcc %o2,%o2,%o2 +LLn5: add %o4,%o4,%o4 ! << 1 + tst %g2 + bne Oddn + add %o5,%o4,%o4 + st %o4,[%o0] + retl + xnor %g0,%o2,%o0 + +Oddp: xnor %g0,%o2,%o2 + ! q' in %o2. r' in %o1 + addcc %o1,%o2,%o1 + bcc LLp6 + addx %o2,0,%o2 + sub %o1,%o3,%o1 +LLp6: subcc %o1,%o3,%g0 + bcs LLp7 + subx %o2,-1,%o2 + sub %o1,%o3,%o1 +LLp7: st %o1,[%o0] + retl + mov %o2,%o0 + +Oddn: xnor %g0,%o2,%o2 + ! q' in %o2. r' in %o4 + addcc %o4,%o2,%o4 + bcc LLn6 + addx %o2,0,%o2 + sub %o4,%o3,%o4 +LLn6: subcc %o4,%o3,%g0 + bcs LLn7 + subx %o2,-1,%o2 + sub %o4,%o3,%o4 +LLn7: st %o4,[%o0] + retl + mov %o2,%o0 diff -ruN glibc-1.06/sysdeps/sparc/sub_n.S glibc-1.07/sysdeps/sparc/sub_n.S --- glibc-1.06/sysdeps/sparc/sub_n.S +++ glibc-1.07/sysdeps/sparc/sub_n.S Sun Jan 16 00:16:50 1994 @@ -0,0 +1,136 @@ +! sparc __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and +! store difference in a third limb vector. + +! Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr %o0 +! s1_ptr %o1 +! s2_ptr %o2 +! size %o3 + +#include "sysdep.h" + +ENTRY (__mpn_sub_n) + ld [%o1+0],%o4 ! read first limb from s1_ptr + srl %o3,4,%g1 + ld [%o2+0],%o5 ! read first limb from s2_ptr + + sub %g0,%o3,%o3 + andcc %o3,(16-1),%o3 + be Lzero + nop + + sll %o3,2,%o3 ! multiply by 4 + sub %o0,%o3,%o0 ! adjust res_ptr + sub %o1,%o3,%o1 ! adjust s1_ptr + sub %o2,%o3,%o2 ! adjust s2_ptr + + mov %o4,%g2 + + sethi %hi(Lbase),%g3 + or %g3,%lo(Lbase),%g3 + sll %o3,2,%o3 ! multiply by 4 + jmp %g3+%o3 + mov %o5,%g3 + +Loop: subxcc %g2,%g3,%o3 + add %o1,64,%o1 + st %o3,[%o0+60] + add %o2,64,%o2 + ld [%o1+0],%o4 + add %o0,64,%o0 + ld [%o2+0],%o5 +Lzero: sub %g1,1,%g1 ! add 0 + 16r limbs (adjust loop counter) +Lbase: ld [%o1+4],%g2 + subxcc %o4,%o5,%o3 + ld [%o2+4],%g3 + st %o3,[%o0+0] + ld [%o1+8],%o4 ! add 15 + 16r limbs + subxcc %g2,%g3,%o3 + ld [%o2+8],%o5 + st %o3,[%o0+4] + ld [%o1+12],%g2 ! add 14 + 16r limbs + subxcc %o4,%o5,%o3 + ld [%o2+12],%g3 + st %o3,[%o0+8] + ld [%o1+16],%o4 ! add 13 + 16r limbs + subxcc %g2,%g3,%o3 + ld [%o2+16],%o5 + st %o3,[%o0+12] + ld [%o1+20],%g2 ! add 12 + 16r limbs + subxcc %o4,%o5,%o3 + ld [%o2+20],%g3 + st %o3,[%o0+16] + ld [%o1+24],%o4 ! add 11 + 16r limbs + subxcc %g2,%g3,%o3 + ld [%o2+24],%o5 + st %o3,[%o0+20] + ld [%o1+28],%g2 ! add 10 + 16r limbs + subxcc %o4,%o5,%o3 + ld [%o2+28],%g3 + st %o3,[%o0+24] + ld [%o1+32],%o4 ! add 9 + 16r limbs + subxcc %g2,%g3,%o3 + ld [%o2+32],%o5 + st %o3,[%o0+28] + ld [%o1+36],%g2 ! add 8 + 16r limbs + subxcc %o4,%o5,%o3 + ld [%o2+36],%g3 + st %o3,[%o0+32] + ld [%o1+40],%o4 ! add 7 + 16r limbs + subxcc %g2,%g3,%o3 + ld [%o2+40],%o5 + st %o3,[%o0+36] + ld [%o1+44],%g2 ! add 6 + 16r limbs + subxcc %o4,%o5,%o3 + ld [%o2+44],%g3 + st %o3,[%o0+40] + ld [%o1+48],%o4 ! add 5 + 16r limbs + subxcc %g2,%g3,%o3 + ld [%o2+48],%o5 + st %o3,[%o0+44] + ld [%o1+52],%g2 ! add 4 + 16r limbs + subxcc %o4,%o5,%o3 + ld [%o2+52],%g3 + st %o3,[%o0+48] + ld [%o1+56],%o4 ! add 3 + 16r limbs + subxcc %g2,%g3,%o3 + ld [%o2+56],%o5 + st %o3,[%o0+52] + ld [%o1+60],%g2 ! add 2 + 16r limbs + subxcc %o4,%o5,%o3 + ld [%o2+60],%g3 + st %o3,[%o0+56] + subx %g0,%g0,%o4 + tst %g1 + bne Loop + subcc %g0,%o4,%g0 ! restore cy (delay slot) + + subxcc %g2,%g3,%o3 + st %o3,[%o0+60] ! store most significant limb + + retl + addx %g0,%g0,%o0 ! return carry-out from most sign. limb diff -ruN glibc-1.06/sysdeps/sparc/submul_1.S glibc-1.07/sysdeps/sparc/submul_1.S --- glibc-1.06/sysdeps/sparc/submul_1.S +++ glibc-1.07/sysdeps/sparc/submul_1.S Sun Jan 16 00:16:53 1994 @@ -0,0 +1,148 @@ +! SPARC __mpn_submul_1 -- Multiply a limb vector with a limb and subtract +! the result from a second limb vector. + +! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + + +! INPUT PARAMETERS +! res_ptr o0 +! s1_ptr o1 +! size o2 +! s2_limb o3 + +#include "sysdep.h" + +ENTRY (__mpn_submul_1) + ! Make S1_PTR and RES_PTR point at the end of their blocks + ! and put (- 4 x SIZE) in index/loop counter. + sll %o2,2,%o2 + add %o0,%o2,%o4 ! RES_PTR in r6 since r2 is retval + add %o1,%o2,%o1 + sub %g0,%o2,%o2 + + cmp %o3,0xfff + bgu Large + nop + + ld [%o1+%o2],%o5 + mov 0,%o0 + b L0 + add %o4,-4,%o4 +Loop0: + subcc %o5,%g1,%g1 + ld [%o1+%o2],%o5 + addx %o0,%g0,%o0 + st %g1,[%o4+%o2] +L0: wr %g0,%o3,%y + sra %o5,31,%g2 + and %o3,%g2,%g2 + andcc %g1,0,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,%o5,%g1 + mulscc %g1,0,%g1 + sra %g1,20,%g4 + sll %g1,12,%g1 + rd %y,%g3 + srl %g3,20,%g3 + or %g1,%g3,%g1 + + addcc %g1,%o0,%g1 + addx %g2,%g4,%o0 ! add sign-compensation and cy to hi limb + addcc %o2,4,%o2 ! loop counter + bne Loop0 + ld [%o4+%o2],%o5 + + subcc %o5,%g1,%g1 + addx %o0,%g0,%o0 + retl + st %g1,[%o4+%o2] + + +Large: ld [%o1+%o2],%o5 + mov 0,%o0 + sra %o3,31,%g4 ! g4 = mask of ones iff S2_LIMB < 0 + b L1 + add %o4,-4,%o4 +Loop: + subcc %o5,%g3,%g3 + ld [%o1+%o2],%o5 + addx %o0,%g0,%o0 + st %g3,[%o4+%o2] +L1: wr %g0,%o5,%y + and %o5,%g4,%g2 + andcc %g0,%g0,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%o3,%g1 + mulscc %g1,%g0,%g1 + rd %y,%g3 + addcc %g3,%o0,%g3 + addx %g2,%g1,%o0 + addcc %o2,4,%o2 + bne Loop + ld [%o4+%o2],%o5 + + subcc %o5,%g3,%g3 + addx %o0,%g0,%o0 + retl + st %g3,[%o4+%o2] diff -ruN glibc-1.06/sysdeps/sparc/udiv_qrnnd.S glibc-1.07/sysdeps/sparc/udiv_qrnnd.S --- glibc-1.06/sysdeps/sparc/udiv_qrnnd.S +++ glibc-1.07/sysdeps/sparc/udiv_qrnnd.S Sun Jan 16 00:16:41 1994 @@ -0,0 +1,143 @@ +! SPARC __udiv_qrnnd division support, used from longlong.h. + +! Copyright (C) 1993 Free Software Foundation, Inc. + +! This file is part of the GNU MP Library. + +! This file is part of the GNU C Library. Its master source is NOT part of +! the C library, however. This file is in fact copied from the GNU MP +! Library and its source lives there. + +! 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. */ + +! INPUT PARAMETERS +! rem_ptr i0 +! n1 i1 +! n0 i2 +! d i3 + + .data + .align 8 +LC0: .double 0r4294967296 +LC1: .double 0r2147483648 +#include "sysdep.h" + +ENTRY (__udiv_qrnnd) + !#PROLOGUE# 0 + save %sp,-104,%sp + !#PROLOGUE# 1 + st %i1,[%fp-8] + ld [%fp-8],%f10 + sethi %hi(LC0),%o7 + fitod %f10,%f4 + ldd [%o7+%lo(LC0)],%f8 + cmp %i1,0 + bge L248 + mov %i0,%i5 + faddd %f4,%f8,%f4 +L248: + st %i2,[%fp-8] + ld [%fp-8],%f10 + fmuld %f4,%f8,%f6 + cmp %i2,0 + bge L249 + fitod %f10,%f2 + faddd %f2,%f8,%f2 +L249: + st %i3,[%fp-8] + faddd %f6,%f2,%f2 + ld [%fp-8],%f10 + cmp %i3,0 + bge L250 + fitod %f10,%f4 + faddd %f4,%f8,%f4 +L250: + fdivd %f2,%f4,%f2 + sethi %hi(LC1),%o7 + ldd [%o7+%lo(LC1)],%f4 + fcmped %f2,%f4 + nop + fbge,a L251 + fsubd %f2,%f4,%f2 + fdtoi %f2,%f2 + st %f2,[%fp-8] + b L252 + ld [%fp-8],%i4 +L251: + fdtoi %f2,%f2 + st %f2,[%fp-8] + ld [%fp-8],%i4 + sethi %hi(-2147483648),%g2 + xor %i4,%g2,%i4 +L252: + wr %g0,%i4,%y + sra %i3,31,%g2 + and %i4,%g2,%g2 + andcc %g0,0,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,%i3,%g1 + mulscc %g1,0,%g1 + add %g1,%g2,%i0 + rd %y,%g3 + subcc %i2,%g3,%o7 + subxcc %i1,%i0,%g0 + be L253 + cmp %o7,%i3 + + add %i4,-1,%i0 + add %o7,%i3,%o7 + st %o7,[%i5] + ret + restore +L253: + blu L246 + mov %i4,%i0 + add %i4,1,%i0 + sub %o7,%i3,%o7 +L246: + st %o7,[%i5] + ret + restore diff -ruN glibc-1.06/sysdeps/stub/__getgid.c glibc-1.07/sysdeps/stub/__getgid.c --- glibc-1.06/sysdeps/stub/__getgid.c Sun Mar 8 15:43:14 1992 +++ glibc-1.07/sysdeps/stub/__getgid.c Thu Jul 22 15:20:14 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,9 +19,10 @@ #include #include #include +#include /* Get the real group ID of the calling process. */ -int +gid_t DEFUN_VOID(__getgid) { errno = ENOSYS; diff -ruN glibc-1.06/sysdeps/stub/__getpgsz.c glibc-1.07/sysdeps/stub/__getpgsz.c --- glibc-1.06/sysdeps/stub/__getpgsz.c Sun Mar 8 15:43:20 1992 +++ glibc-1.07/sysdeps/stub/__getpgsz.c Thu Jul 22 15:20:07 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include #include +#include /* Return the system page size. */ size_t diff -ruN glibc-1.06/sysdeps/stub/__getuid.c glibc-1.07/sysdeps/stub/__getuid.c --- glibc-1.06/sysdeps/stub/__getuid.c Sun Mar 8 15:43:30 1992 +++ glibc-1.07/sysdeps/stub/__getuid.c Thu Jul 22 15:20:11 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,10 +19,10 @@ #include #include #include +#include - /* Get the real user ID of the calling process. */ -int +uid_t DEFUN_VOID(__getuid) { errno = ENOSYS; diff -ruN glibc-1.06/sysdeps/stub/__ioctl.c glibc-1.07/sysdeps/stub/__ioctl.c --- glibc-1.06/sysdeps/stub/__ioctl.c Thu May 6 20:43:44 1993 +++ glibc-1.07/sysdeps/stub/__ioctl.c Thu Jul 22 15:20:09 1993 @@ -24,7 +24,7 @@ The actual type and use of ARG and the return value depend on REQUEST. */ int DEFUN(__ioctl, (fd, request), - int fd AND int request DOTS + int fd AND int request DOTS) { errno = ENOSYS; return -1; diff -ruN glibc-1.06/sysdeps/stub/__mknod.c glibc-1.07/sysdeps/stub/__mknod.c --- glibc-1.06/sysdeps/stub/__mknod.c Sun Mar 8 15:45:52 1992 +++ glibc-1.07/sysdeps/stub/__mknod.c Thu Jul 22 15:20:05 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include #include +#include #include /* Create a device file named PATH, with permission and special bits MODE @@ -25,7 +26,7 @@ device numbers with the `makedev' macro above). */ int DEFUN(__mknod, (path, mode, dev), - CONST char *path AND int mode AND int dev) + CONST char *path AND mode_t mode AND dev_t dev) { errno = ENOSYS; return -1; diff -ruN glibc-1.06/sysdeps/stub/__setgid.c glibc-1.07/sysdeps/stub/__setgid.c --- glibc-1.06/sysdeps/stub/__setgid.c Sun Mar 8 15:43:53 1992 +++ glibc-1.07/sysdeps/stub/__setgid.c Thu Jul 22 15:20:03 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Set the group ID of the calling process to GID. If the calling process is the super-user, the real @@ -25,7 +26,7 @@ and effective group IDs, and the saved set-group-ID to GID; if not, the effective group ID is set to GID. */ int -DEFUN(__setgid, (gid), int gid) +DEFUN(__setgid, (gid), gid_t gid) { errno = ENOSYS; return -1; diff -ruN glibc-1.06/sysdeps/stub/__setuid.c glibc-1.07/sysdeps/stub/__setuid.c --- glibc-1.06/sysdeps/stub/__setuid.c Sun Mar 8 15:43:59 1992 +++ glibc-1.07/sysdeps/stub/__setuid.c Thu Jul 22 15:20:00 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,6 +19,7 @@ #include #include #include +#include /* Set the user ID of the calling process to UID. If the calling process is the super-user, the real @@ -25,7 +26,7 @@ and effective user IDs, and the saved set-user-ID to UID; if not, the effective user ID is set to UID. */ int -DEFUN(__setuid, (uid), int uid) +DEFUN(__setuid, (uid), uid_t uid) { errno = ENOSYS; return -1; diff -ruN glibc-1.06/sysdeps/stub/__sysconf.c glibc-1.07/sysdeps/stub/__sysconf.c --- glibc-1.06/sysdeps/stub/__sysconf.c Wed Jun 12 14:38:38 1991 +++ glibc-1.07/sysdeps/stub/__sysconf.c Fri Jun 25 17:00:33 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,6 +19,8 @@ #include #include #include +#include +#include /* Get the value of the system variable NAME. */ @@ -30,6 +32,9 @@ default: errno = EINVAL; return -1; + + case _SC_TZNAME_MAX: + return __tzname_max (); case _SC_ARG_MAX: case _SC_CHILD_MAX: diff -ruN glibc-1.06/sysdeps/stub/__wait.c glibc-1.07/sysdeps/stub/__wait.c --- glibc-1.06/sysdeps/stub/__wait.c Sun Mar 8 15:44:58 1992 +++ glibc-1.07/sysdeps/stub/__wait.c Thu Dec 2 19:03:02 1993 @@ -23,7 +23,7 @@ /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ __pid_t -DEFUN(__wait, (stat_loc), __WAIT_STATUS stat_loc) +DEFUN(__wait, (stat_loc), __WAIT_STATUS_DEFN stat_loc) { errno = ENOSYS; return -1; diff -ruN glibc-1.06/sysdeps/stub/__wait3.c glibc-1.07/sysdeps/stub/__wait3.c --- glibc-1.06/sysdeps/stub/__wait3.c Sun Mar 8 15:44:13 1992 +++ glibc-1.07/sysdeps/stub/__wait3.c Thu Dec 2 19:03:03 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -28,7 +28,7 @@ children; otherwise don't. */ pid_t DEFUN(__wait3, (stat_loc, options, usage), - union wait *stat_loc AND int options AND PTR usage) + __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage) { if ((options & ~(WNOHANG|WUNTRACED)) != 0) { diff -ruN glibc-1.06/sysdeps/stub/__wait4.c glibc-1.07/sysdeps/stub/__wait4.c --- glibc-1.06/sysdeps/stub/__wait4.c Wed Nov 18 16:19:18 1992 +++ glibc-1.07/sysdeps/stub/__wait4.c Thu Dec 2 19:03:04 1993 @@ -23,7 +23,7 @@ pid_t DEFUN(__wait4, (pid, stat_loc, options, usage), - pid_t pid AND __WAIT_STATUS stat_loc AND int options AND + pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage) { errno = ENOSYS; diff -ruN glibc-1.06/sysdeps/stub/asm.h glibc-1.07/sysdeps/stub/asm.h --- glibc-1.06/sysdeps/stub/asm.h +++ glibc-1.07/sysdeps/stub/asm.h Fri Dec 24 23:21:19 1993 @@ -0,0 +1,3 @@ +/* On some machines the mpn function from GNU MP use a file called "asm.h" + to define macros for assembly source code to use. */ + diff -ruN glibc-1.06/sysdeps/stub/dbl2mpn.c glibc-1.07/sysdeps/stub/dbl2mpn.c --- glibc-1.06/sysdeps/stub/dbl2mpn.c +++ glibc-1.07/sysdeps/stub/dbl2mpn.c Fri Dec 24 23:09:41 1993 @@ -0,0 +1,32 @@ +/* Copyright (C) 1993 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 "gmp.h" +#include "gmp-impl.h" + +/* Convert a `double' to a multi-precision integer representing the + significand scaled up by the highest possible number of significant bits + of fraction (DBL_MANT_DIG), and an integral power of two (MPN frexp). */ + +mp_size_t +__mpn_extract_double (mp_ptr res_ptr, mp_size_t size, + int *expt, int *is_neg, + double value) +{ +#error "__mpn_extract_double is not implemented for this floating point format" +} diff -ruN glibc-1.06/sysdeps/stub/dirstream.h glibc-1.07/sysdeps/stub/dirstream.h --- glibc-1.06/sysdeps/stub/dirstream.h +++ glibc-1.07/sysdeps/stub/dirstream.h Tue Dec 21 00:06:21 1993 @@ -0,0 +1,30 @@ +/* Copyright (C) 1993 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. */ + +#ifndef _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + + +/* This file should define a typedef `DIR', the data type of directory + stream objects returned by `opendir'. */ + +#error "No system-dependent definition of `DIR'." + + +#endif /* dirstream.h */ diff -ruN glibc-1.06/sysdeps/stub/errlist.c glibc-1.07/sysdeps/stub/errlist.c --- glibc-1.06/sysdeps/stub/errlist.c Wed Jun 12 15:46:58 1991 +++ glibc-1.07/sysdeps/stub/errlist.c Tue Jan 11 18:10:15 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,11 @@ #include #include + +#ifndef HAVE_GNU_LD +#define _sys_errlist sys_errlist +#define _sys_nerr sys_nerr +#endif CONST char *CONST _sys_errlist[] = { diff -ruN glibc-1.06/sysdeps/stub/killpg.c glibc-1.07/sysdeps/stub/killpg.c --- glibc-1.06/sysdeps/stub/killpg.c Fri Oct 25 20:29:16 1991 +++ glibc-1.07/sysdeps/stub/killpg.c Thu Dec 2 18:36:23 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -25,7 +25,7 @@ If PGRP is zero, send SIG to all processes in the current process's process group. */ int -DEFUN(killpg, (pgrp, sig), int pgrp AND int sig) +DEFUN(killpg, (pgrp, sig), __pid_t pgrp AND int sig) { errno = ENOSYS; return -1; diff -ruN glibc-1.06/sysdeps/stub/local_lim.h glibc-1.07/sysdeps/stub/local_lim.h --- glibc-1.06/sysdeps/stub/local_lim.h Mon Jun 24 19:32:43 1991 +++ glibc-1.07/sysdeps/stub/local_lim.h Wed Jun 30 17:43:26 1993 @@ -1,3 +1,3 @@ /* This file should define the implementaton-specific limits described - in posix[12]_limits.h. If there are no useful values to give a limit, + in posix[12]_lim.h. If there are no useful values to give a limit, don't define it. */ diff -ruN glibc-1.06/sysdeps/stub/pipestream.c glibc-1.07/sysdeps/stub/pipestream.c --- glibc-1.06/sysdeps/stub/pipestream.c Sun Mar 8 15:45:04 1992 +++ glibc-1.07/sysdeps/stub/pipestream.c Thu Jul 22 15:19:55 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -43,7 +43,7 @@ int DEFUN(pclose, (stream), register FILE *stream) { - if (!__validfp(stream) || !__ispipe(stream)) + if (!__validfp (stream) || !stream->__ispipe) { errno = EINVAL; return -1; diff -ruN glibc-1.06/sysdeps/stub/ptrace.c glibc-1.07/sysdeps/stub/ptrace.c --- glibc-1.06/sysdeps/stub/ptrace.c Thu Nov 12 20:36:06 1992 +++ glibc-1.07/sysdeps/stub/ptrace.c Tue Dec 21 01:04:23 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -55,7 +55,9 @@ case PTRACE_PEEKUSER: case PTRACE_GETREGS: case PTRACE_SETREGS: +#ifdef PTRACE_GETFPREGS case PTRACE_GETFPGEGS: +#endif case PTRACE_SETFPREGS: case PTRACE_GETFPAREGS: case PTRACE_SETFPAREGS: diff -ruN glibc-1.06/sysdeps/stub/sigaltstack.c glibc-1.07/sysdeps/stub/sigaltstack.c --- glibc-1.06/sysdeps/stub/sigaltstack.c Thu Sep 3 17:32:24 1992 +++ glibc-1.07/sysdeps/stub/sigaltstack.c @@ -1,31 +0,0 @@ -/* Copyright (C) 1992 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 -#include -#include - -/* Run signals handlers on the stack specified by SS (if not NULL). - If OSS is not NULL, it is filled in with the old signal stack status. */ -int -DEFUN(sigaltstack, (ss, oss), - CONST struct sigaltstack *ss AND struct sigaltstack *oss) -{ - errno = ENOSYS; - return -1; -} diff -ruN glibc-1.06/sysdeps/stub/sigaltstk.c glibc-1.07/sysdeps/stub/sigaltstk.c --- glibc-1.06/sysdeps/stub/sigaltstk.c +++ glibc-1.07/sysdeps/stub/sigaltstk.c Thu Sep 3 17:32:24 1992 @@ -0,0 +1,31 @@ +/* Copyright (C) 1992 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 +#include +#include + +/* Run signals handlers on the stack specified by SS (if not NULL). + If OSS is not NULL, it is filled in with the old signal stack status. */ +int +DEFUN(sigaltstack, (ss, oss), + CONST struct sigaltstack *ss AND struct sigaltstack *oss) +{ + errno = ENOSYS; + return -1; +} diff -ruN glibc-1.06/sysdeps/stub/signum.h glibc-1.07/sysdeps/stub/signum.h --- glibc-1.06/sysdeps/stub/signum.h Wed Jun 12 15:16:40 1991 +++ glibc-1.07/sysdeps/stub/signum.h Thu Jul 22 15:19:51 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -19,15 +19,12 @@ #ifdef _SIGNAL_H /* Fake signal functions. */ -extern void EXFUN(_sig_ign, (int sig)); -extern void EXFUN(_sig_dfl, (int sig)); +extern void _sig_ign __P ((int sig)); +extern void _sig_dfl __P ((int sig)); -#define SIG_ERR /* Error return. */ \ - ((void EXFUN((*), (int sig))) 0) -#define SIG_DFL /* Default action. */ \ - _sig_dfl -#define SIG_IGN /* Ignore signal. */ \ - _sig_ign +#define SIG_ERR ((__sighandler_t) 0) /* Error return. */ +#define SIG_DFL _sig_dfl /* Default action. */ +#define SIG_IGN _sig_ign /* Ignore signal. */ /* ANSI signals. */ diff -ruN glibc-1.06/sysdeps/stub/startsig.c glibc-1.07/sysdeps/stub/startsig.c --- glibc-1.06/sysdeps/stub/startsig.c Mon Oct 28 22:05:09 1991 +++ glibc-1.07/sysdeps/stub/startsig.c @@ -1,28 +0,0 @@ -/* Copyright (C) 1991 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 - -#define STACK_SIZE (4 * __vm_page_size) /* ? XXX */ - -/* Give SIGTHREAD a stack and start it running _hurd_sigport_receive. */ -error_t -_hurd_start_sigthread (thread_t sigthread) -{ - return POSIX_ENOSYS; -} diff -ruN glibc-1.06/sysdeps/stub/sys/reboot.h glibc-1.07/sysdeps/stub/sys/reboot.h --- glibc-1.06/sysdeps/stub/sys/reboot.h +++ glibc-1.07/sysdeps/stub/sys/reboot.h Tue Aug 3 18:21:41 1993 @@ -0,0 +1,9 @@ +/* This file should define RB_* macros to be used as flag + bits in the argument to the `reboot' system call. */ + +#ifndef _SYS_REBOOT_H +#define _SYS_REBOOT_H + +#define RB_AUTOBOOT 0 + +#endif /* */ diff -ruN glibc-1.06/sysdeps/stub/syscall.c glibc-1.07/sysdeps/stub/syscall.c --- glibc-1.06/sysdeps/stub/syscall.c +++ glibc-1.07/sysdeps/stub/syscall.c Tue Nov 9 06:48:25 1993 @@ -0,0 +1,30 @@ +/* Copyright (C) 1993 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 +#include + +/* Do system call CALLNO, passing it the remaining arguments. + This only makes sense in certain operating systems. */ + +int +DEFUN(syscall, (callno), callno DOTS) +{ + errno = ENOSYS; + return -1; +} diff -ruN glibc-1.06/sysdeps/stub/sysd-stdio.c glibc-1.07/sysdeps/stub/sysd-stdio.c --- glibc-1.06/sysdeps/stub/sysd-stdio.c Mon Apr 19 19:36:07 1993 +++ glibc-1.07/sysdeps/stub/sysd-stdio.c Wed May 26 18:40:28 1993 @@ -61,18 +61,26 @@ return -1; } +/* Return the POSIX.1 file descriptor associated with COOKIE, + or -1 for errors. If COOKIE does not relate to any POSIX.1 file + descriptor, this should return -1 with errno set to EOPNOTSUPP. */ +int +DEFUN(__stdio_fileno, (cookie), PTR cookie) +{ + errno = ENOSYS; + return -1; +} + /* Open FILENAME with the mode in M. - Return the magic cookie associated with the opened file - or NULL which specifies that an integral descriptor may be - found in *FDPTR. This descriptor is negative for errors. */ -PTR + Store the magic cookie associated with the opened file in *COOKIEPTR. + Return zero on success and nonzero on failure. */ +int DEFUN(__stdio_open, (filename, m, fdptr), - CONST char *filename AND __io_mode m AND int *fdptr) + CONST char *filename AND __io_mode m AND PTR *cookieptr) { errno = ENOSYS; - *fdptr = -1; - return NULL; + return -1; } @@ -84,6 +92,7 @@ stub_warning(__stdio_write); stub_warning(__stdio_seek); stub_warning(__stdio_close); +stub_warning(__stdio_fileno); stub_warning(__stdio_open); #endif /* GNU stabs. */ diff -ruN glibc-1.06/sysdeps/stub/tempname.c glibc-1.07/sysdeps/stub/tempname.c --- glibc-1.06/sysdeps/stub/tempname.c Mon Apr 19 19:34:37 1993 +++ glibc-1.07/sysdeps/stub/tempname.c Mon Oct 25 17:37:14 1993 @@ -29,7 +29,8 @@ char * DEFUN(__stdio_gen_tempname, (dir, pfx, dir_search, lenptr), CONST char *dir AND CONST char *pfx AND - int dir_search AND size_t *lenptr) + int dir_search AND size_t *lenptr AND + FILE **streamptr) { *lenptr = 0; errno = ENOSYS; diff -ruN glibc-1.06/sysdeps/stub/udiv_qrnnd.c glibc-1.07/sysdeps/stub/udiv_qrnnd.c --- glibc-1.06/sysdeps/stub/udiv_qrnnd.c +++ glibc-1.07/sysdeps/stub/udiv_qrnnd.c Tue Dec 28 07:47:42 1993 @@ -0,0 +1,10 @@ +/* For some machines GNU MP needs to define an auxiliary function: + + udiv_qrnnd (quotient, remainder, high_numerator, low_numerator, denominator) + + Divides a two-word unsigned integer, composed by the integers + HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient + in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less + than DENOMINATOR for correct operation. If, in addition, the most + significant bit of DENOMINATOR must be 1, then the pre-processor symbol + UDIV_NEEDS_NORMALIZATION is defined to 1. */ diff -ruN glibc-1.06/sysdeps/tahoe/Makefile glibc-1.07/sysdeps/tahoe/Makefile --- glibc-1.06/sysdeps/tahoe/Makefile Tue Mar 26 21:40:36 1991 +++ glibc-1.07/sysdeps/tahoe/Makefile @@ -1,14 +0,0 @@ -ifeq ($(subdir),math) -ifndef math-twiddled - -routines:= $(filter-out acos asin cos sin ceil rint hypot \ - __copysign __scalb __drem __logb __finite,$(routines)) -aux := $(aux) support exp__E log__L - -math-twiddled := t - -endif - -bsdmath_dirs := $(bsdmath_dirs) tahoe - -endif diff -ruN glibc-1.06/sysdeps/unix/Makefile glibc-1.07/sysdeps/unix/Makefile --- glibc-1.06/sysdeps/unix/Makefile Fri May 21 17:02:29 1993 +++ glibc-1.07/sysdeps/unix/Makefile Mon Dec 6 17:29:39 1993 @@ -16,6 +16,17 @@ # not, write to the Free Software Foundation, Inc., 675 Mass Ave, # Cambridge, MA 02139, USA. +# The unix-specific configure fragment writes `unix-generated' in config.make. +ifdef objdir +unix-generated-pfx = $(objpfx) +else +unix-generated-pfx = $(sysdep_dir)/unix/ +endif +generated := $(generated) $(addprefix $(unix-generated-pfx),$(unix-generated)) + +ifeq (,$(filter-out $(sysdep_dir)/stub/ $(common-objpfx),\ + $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/local_lim.h)))))) + ifneq (,$(wildcard $(sysincludedir)/sys/param.h)) local_lim-CFLAGS := $(local_lim-CFLAGS) -DHAVE_SYS_PARAM_H endif @@ -35,7 +46,12 @@ before-compile := $(before-compile) $(common-objpfx)local_lim.h generated := $(generated) \ $(common-objpfx)local_lim.h $(common-objpfx)mk-local_lim + +endif +ifeq (,$(filter-out $(sysdep_dir)/stub/ $(common-objpfx),\ + $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/sys/param.h)))))) + before-compile := $(before-compile) $(common-objpfx)sys/param.h $(common-objpfx)sys/param.h: $(sysincludedir)/sys/param.h @@ -109,6 +125,8 @@ sysdep_headers := $(sysdep_headers) sys/param.h $(sys/param.h-includes) endif # misc + +endif # No sysdep sys/param.h. ifeq (,$(filter-out $(sysdep_dir)/stub/ $(common-objpfx),\ $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/errnos.h)))))) @@ -172,16 +190,17 @@ # would define them. The system-specific file presumably # defines them with the same values as we find from the system's headers. # We also want to omit from ioctls the symbols defined in our own -# , to avoid multiple definition conflicts. -# We use snarf-ioctls on these files to find what symbols we want to omit. -# Then we turn this into a big alternation for egrep. +# , to avoid multiple definition conflicts. We use +# snarf-ioctls on these files to find what symbols we want to omit. fgrep +# -xv gives all lines which do not match in their entirety; without -x, +# CSTOP's presence elided TIOCSTOP. $(common-objpfx)ioctls: $(sysdep_dir)/unix/snarf-ioctls \ $(sysincludedir)/sys/ioctl.h $(sys/termios.h) $(dir $<)$(notdir $<) $(filter-out $<,$^) \ - | egrep -v "^(`$(dir $<)$(notdir $<) \ - $(termbits.h) $(..)termios/sys/ttydefaults.h \ - | tr '\012' '|'`nevermatch)$$" \ + | fgrep -xv "`$(dir $<)$(notdir $<) $(termbits.h) \ + $(..)termios/sys/ttydefaults.h \ + | sort | uniq`" \ | sort | uniq | tr '\012' ' ' > $@-tmp mv $@-tmp $@ @@ -190,11 +209,13 @@ endif ifeq ($(subdir),stdio) +ifeq (,$(filter-out $(sysdep_dir)/stub/ $(common-objpfx),\ + $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/errlist.c)))))) before-compile: $(objpfx)errlist.c $(objpfx)errlist.c: $(objpfx)make_errlist @rm -f $@ - $< > $@-tmp + $(dir $<)$(notdir $<) > $@-tmp mv $@-tmp $@ $(objpfx)make_errlist: $(sysdep_dir)/unix/make_errlist.c @@ -203,6 +224,7 @@ generated := $(generated) $(addprefix $(objpfx),make_errlist errlist.c) endif +endif # stdio ifeq (,$(filter-out $(sysdep_dir)/stub/ $(common-objpfx),\ $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/syscall.h)))))) @@ -226,6 +248,7 @@ sed -e 's/[ ]sys_/ /' \ -e 's/^#define[ ]*\([a-z0-9_]*\)[ ]*/#define SYS_\1 /' \ -e 's/[ ]sys_/ SYS_/' \ + -e 's/SYS_syscall_basenum/syscall_basenum/g' \ -e '/^#/!d' \ -e '/^#ident/d' \ -e 's-\(/\*[^*]*\)$$-\1\*/-' \ diff -ruN glibc-1.06/sysdeps/unix/bsd/bsd4.4/__setsid.S glibc-1.07/sysdeps/unix/bsd/bsd4.4/__setsid.S --- glibc-1.06/sysdeps/unix/bsd/bsd4.4/__setsid.S +++ glibc-1.07/sysdeps/unix/bsd/bsd4.4/__setsid.S Thu Sep 24 20:31:52 1992 @@ -0,0 +1,22 @@ +/* Copyright (C) 1991, 1992 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 + +SYSCALL__ (setsid, 0) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/bsd4.4/__wait.c glibc-1.07/sysdeps/unix/bsd/bsd4.4/__wait.c --- glibc-1.06/sysdeps/unix/bsd/bsd4.4/__wait.c Fri Jul 26 00:48:36 1991 +++ glibc-1.07/sysdeps/unix/bsd/bsd4.4/__wait.c Thu Dec 2 19:03:05 1993 @@ -25,7 +25,7 @@ /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ __pid_t -DEFUN(__wait, (stat_loc), __WAIT_STATUS stat_loc) +DEFUN(__wait, (stat_loc), __WAIT_STATUS_DEFN stat_loc) { return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL); } diff -ruN glibc-1.06/sysdeps/unix/bsd/bsd4.4/__wait3.c glibc-1.07/sysdeps/unix/bsd/bsd4.4/__wait3.c --- glibc-1.06/sysdeps/unix/bsd/bsd4.4/__wait3.c Thu Apr 22 20:41:51 1993 +++ glibc-1.07/sysdeps/unix/bsd/bsd4.4/__wait3.c Thu Dec 2 19:03:06 1993 @@ -28,7 +28,7 @@ children; otherwise don't. */ pid_t DEFUN(__wait3, (stat_loc, options, usage), - __WAIT_STATUS stat_loc AND int options AND struct rusage *usage) + __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage) { return __wait4 (WAIT_ANY, stat_loc, options, usage); } diff -ruN glibc-1.06/sysdeps/unix/bsd/bsd4.4/sigaltstack.S glibc-1.07/sysdeps/unix/bsd/bsd4.4/sigaltstack.S --- glibc-1.06/sysdeps/unix/bsd/bsd4.4/sigaltstack.S Sun May 3 16:21:58 1992 +++ glibc-1.07/sysdeps/unix/bsd/bsd4.4/sigaltstack.S @@ -1,22 +0,0 @@ -/* Copyright (C) 1991, 1992 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 - -SYSCALL (sigaltstack, 2) - ret diff -ruN glibc-1.06/sysdeps/unix/bsd/bsd4.4/sigaltstk.S glibc-1.07/sysdeps/unix/bsd/bsd4.4/sigaltstk.S --- glibc-1.06/sysdeps/unix/bsd/bsd4.4/sigaltstk.S +++ glibc-1.07/sysdeps/unix/bsd/bsd4.4/sigaltstk.S Sun May 3 16:21:58 1992 @@ -0,0 +1,22 @@ +/* Copyright (C) 1991, 1992 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 + +SYSCALL (sigaltstack, 2) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/dirstream.h glibc-1.07/sysdeps/unix/bsd/dirstream.h --- glibc-1.06/sysdeps/unix/bsd/dirstream.h +++ glibc-1.07/sysdeps/unix/bsd/dirstream.h Tue Dec 21 03:33:28 1993 @@ -0,0 +1,41 @@ +/* Copyright (C) 1993 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. */ + +#ifndef _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + +#define __need_size_t +#include + +/* Directory stream type. + + The BSD directory format is the same as `struct dirent', so `readdir' + returns a pointer into the buffer we read directory data into. */ + +typedef struct + { + int __fd; /* File descriptor. */ + + char *__data; /* Directory block. */ + size_t __allocation; /* Space allocated for the block. */ + size_t __offset; /* Current offset into the block. */ + size_t __size; /* Total valid data in the block. */ + } DIR; + +#endif /* dirstream.h */ diff -ruN glibc-1.06/sysdeps/unix/bsd/hp/m68k/__brk.S glibc-1.07/sysdeps/unix/bsd/hp/m68k/__brk.S --- glibc-1.06/sysdeps/unix/bsd/hp/m68k/__brk.S Tue Mar 10 21:28:38 1992 +++ glibc-1.07/sysdeps/unix/bsd/hp/m68k/__brk.S Tue Nov 9 07:19:26 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -37,11 +37,8 @@ cmpl sp@(4), d0 ble 0f movel d0, sp@(4) -0: movel POUND(SYS_brk), d0 - trap POUND(0) - bcs 1f +0: DO_CALL (#SYS_brk, 1) movel sp@(4), ___curbrk clrl d0 rts -1: - jmp syscall_error +error: jmp syscall_error diff -ruN glibc-1.06/sysdeps/unix/bsd/hp/m68k/sysdep.h glibc-1.07/sysdeps/unix/bsd/hp/m68k/sysdep.h --- glibc-1.06/sysdeps/unix/bsd/hp/m68k/sysdep.h Wed Apr 29 23:04:58 1992 +++ glibc-1.07/sysdeps/unix/bsd/hp/m68k/sysdep.h Tue Nov 9 07:19:23 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -34,25 +34,17 @@ _/**/name/**/: #endif -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - movel POUND(SYS_##syscall_name), d0; \ - trap POUND(0); \ - bcs error -#else #define PSEUDO(name, syscall_name, args) \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - movel POUND(SYS_/**/syscall_name), d0; \ + DO_CALL (POUND (SYS_ify (syscall_name), args) + +#define DO_CALL(syscall, args) \ + movel syscall, d0; \ trap POUND(0); \ bcs error -#endif #define ret rts #define r0 d0 diff -ruN glibc-1.06/sysdeps/unix/bsd/m68k/__pipe.S glibc-1.07/sysdeps/unix/bsd/m68k/__pipe.S --- glibc-1.06/sysdeps/unix/bsd/m68k/__pipe.S Tue Apr 21 02:37:58 1992 +++ glibc-1.07/sysdeps/unix/bsd/m68k/__pipe.S Sun Jun 27 23:56:39 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,7 +19,12 @@ #include SYSCALL__ (pipe, 1) - moveal sp@(4), a0 +#ifdef __motorola__ + move.l 4(sp), a0 + movem.l d0-d1, (a0) +#else + movel sp@(4), a0 moveml d0-d1, a0@ +#endif clrl d0 rts diff -ruN glibc-1.06/sysdeps/unix/bsd/m68k/__wait.S glibc-1.07/sysdeps/unix/bsd/m68k/__wait.S --- glibc-1.06/sysdeps/unix/bsd/m68k/__wait.S Tue Apr 21 02:38:06 1992 +++ glibc-1.07/sysdeps/unix/bsd/m68k/__wait.S Sun Jun 27 23:56:12 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -19,8 +19,15 @@ #include SYSCALL__ (wait, 1) +#ifdef __motorola__ + tst.l 4(sp) + beq 1f + movea.l 4(sp), a0 + move.l d1, (a0) +#else tstl sp@(4) beq 1f moveal sp@(4), a0 movel d1, a0@ +#endif 1: rts diff -ruN glibc-1.06/sysdeps/unix/bsd/m68k/syscall.S glibc-1.07/sysdeps/unix/bsd/m68k/syscall.S --- glibc-1.06/sysdeps/unix/bsd/m68k/syscall.S +++ glibc-1.07/sysdeps/unix/bsd/m68k/syscall.S Wed Nov 10 06:42:10 1993 @@ -0,0 +1,26 @@ +/* Copyright (C) 1993 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 + +ENTRY (syscall) + movel sp@+, a0 /* Pop return address into A0. */ + DO_CALL (sp@, 0) /* Do system call. */ + jmp a0@ /* Return to A0. */ +error: movel a0, sp@- /* Error; push return address */ + jmp syscall_error /* and jump to error handler. */ diff -ruN glibc-1.06/sysdeps/unix/bsd/m68k/sysdep.S glibc-1.07/sysdeps/unix/bsd/m68k/sysdep.S --- glibc-1.06/sysdeps/unix/bsd/m68k/sysdep.S Wed Mar 11 00:16:11 1992 +++ glibc-1.07/sysdeps/unix/bsd/m68k/sysdep.S Tue Nov 23 20:20:34 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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,8 +16,29 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define _ERRNO_H +#include + .globl syscall_error syscall_error: - movel d0, _errno + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ +#ifdef __motorola__ +#ifdef EWOULDBLOCK_sys + cmp.l d0, #EWOULDBLOCK_sys + bne store + moveq.l #EAGAIN, d0 +#endif +store: move.l d0, _errno + moveq.l #-1, d0 +#else +#ifdef EWOULDBLOCK_sys + cmpl d0, #EWOULDBLOCK_sys + bne 0f + moveq #EAGAIN, d0 +#endif +0: movel d0, _errno moveq #-1, d0 +#endif rts diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/Makefile glibc-1.07/sysdeps/unix/bsd/osf1/Makefile --- glibc-1.06/sysdeps/unix/bsd/osf1/Makefile +++ glibc-1.07/sysdeps/unix/bsd/osf1/Makefile Thu Dec 23 00:57:44 1993 @@ -0,0 +1,3 @@ +# Without -non_shared (via the compiler's -static flag), we'll end up +# with some unresolved symbols wrt exceptions. +LDFLAGS := $(LDFLAGS) -static diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__brk.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__brk.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__brk.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__brk.S Thu Dec 23 01:02:44 1993 @@ -0,0 +1,51 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +#ifndef HAVE_GNU_LD +#define __end end +#endif + +.data + .extern __end,8 + .globl __curbrk +__curbrk: + .quad __end + +.text +ENTRY(__brk) + ! FIXME We do not check for asking for less than a page yet. + ldiq v0, SYS_brk + call_pal PAL_callsys + bne a3, error + + /* Update __curbrk and exit cleanly. */ +! ldgp gp, 0(t12) + stl a0, __curbrk + + mov zero, v0 + ret + /* What a horrible way to die. */ +error: ldgp gp,0(gp) + jmp zero,syscall_error + .end __brk diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__fork.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__fork.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__fork.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__fork.S Thu Dec 23 01:02:45 1993 @@ -0,0 +1,23 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +SYSCALL__ (fork, 0) + cmovne a4, 0, v0 + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__getdents.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__getdents.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__getdents.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__getdents.S Thu Dec 23 01:02:52 1993 @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +SYSCALL__ (getdirentries, 4) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__pipe.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__pipe.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__pipe.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__pipe.S Thu Dec 23 01:02:46 1993 @@ -0,0 +1,28 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +SYSCALL__ (pipe, 1) + /* Plop in the two descriptors. */ + stl r0, 0(a0) + stl r1, 4(a0) + + /* Go out with a clean status. */ + mov zero, r0 + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__sigpause.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__sigpause.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__sigpause.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__sigpause.S Thu Dec 23 01:02:55 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +#include +#define SYS_sigpause SYS_ult_sigpause + +SYSCALL__ (sigpause, 1) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__sigstmsk.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__sigstmsk.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__sigstmsk.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__sigstmsk.S Thu Dec 23 01:02:56 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +#include +#define SYS_sigsetmask SYS_ult_sigsetmask + +SYSCALL__ (sigsetmask, 1) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__sigvec.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__sigvec.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__sigvec.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__sigvec.S Thu Dec 23 01:02:54 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +#include +#define SYS_sigvec SYS_ult_sigvec + +SYSCALL__ (sigvec, 3) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__wait4.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__wait4.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__wait4.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__wait4.S Thu Dec 23 01:02:51 1993 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__waitpid.c glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__waitpid.c --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/__waitpid.c +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/__waitpid.c Thu Dec 23 01:02:51 1993 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/killpg.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/killpg.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/killpg.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/killpg.S Thu Dec 23 01:02:54 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +#include +#define SYS_killpg SYS_ult_killpg + +SYSCALL (killpg, 2) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/recv.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/recv.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/recv.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/recv.S Thu Dec 23 01:02:56 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 + +#include +#define SYS_recv SYS_ult_recv + +SYSCALL (recv, 4) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/send.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/send.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/send.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/send.S Thu Dec 23 01:02:57 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 + +#include +#define SYS_send SYS_ult_send + +SYSCALL (send, 4) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/start.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/start.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/start.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/start.S Thu Dec 23 01:02:41 1993 @@ -0,0 +1,70 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +#ifndef HAVE_GNU_LD +#define __environ environ +#endif + +.comm __environ, 8 +.comm errno, 4 + +!.sdata +!.globl STARTFRM +!STARTFRM = 0 + +.text +ENTRY(__start) + lda sp, -16(sp) + stq zero, 8(sp) + + ! This branch puts the address of the current insn in t0. + br t0, 10f +10: + ! We set the GP register by using the address of the ldgp + ! (what we just put into t0). + ldgp gp, 0(t0) + + ! get argc + ldl a0, 16(sp) + + ! get argv + lda a1, 24(sp) + + ! move ahead to envp + s8addq a0, a1, a2 + addq a2, 0x8, a2 + + ! Store in environ. + stq a2, environ + + ! Clear out errno. +! ldgp gp, 0(t12) + stl zero, errno + + ! Call main. + jsr ra, main + ldgp gp, 0(ra) + + mov v0, a0 + + jsr ra, exit + ldgp gp, 0(ra) + + .end __start diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/statbuf.h glibc-1.07/sysdeps/unix/bsd/osf1/alpha/statbuf.h --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/statbuf.h +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/statbuf.h Thu Dec 23 01:02:52 1993 @@ -0,0 +1,75 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + int st_dev; /* Device. */ + unsigned int st_ino; /* File serial number. */ + unsigned int st_mode; /* File mode. */ + unsigned short st_nlink; /* Link count. */ + unsigned int st_uid; /* User ID of the file's owner. */ + unsigned int st_gid; /* Group ID of the file's group.*/ + int st_rdev; /* Device number, if device. */ + + long st_size; /* Size of file, in bytes. */ + + int st_atime; /* Time of last access. */ + int st_atime_usec; + int st_mtime; /* Time of last modification. */ + int st_mtime_usec; + int st_ctime; /* Time of last status change. */ + int st_ctime_usec; + + unsigned int st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + int st_blocks; /* Number of 512-byte blocks allocated. */ + unsigned int st_flags; + unsigned int st_gen; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/sysdep.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/sysdep.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/sysdep.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/sysdep.S Thu Dec 23 01:02:42 1993 @@ -0,0 +1,40 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +#define _ERRNO_H +#include + +ENTRY(syscall_error) +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + subq v0, EWOULDBLOCK_sys, t0 + cmoveq t0, EAGAIN, v0 +#endif + + /* Store it in errno... */ +! ldgp gp, 0(t12) + stl v0, errno + + /* And just kick back a -1. */ + ldil v0, -1 + ret + + .end syscall_error diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/sysdep.h glibc-1.07/sysdeps/unix/bsd/osf1/alpha/sysdep.h --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/sysdep.h +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/sysdep.h Thu Dec 23 01:02:41 1993 @@ -0,0 +1,68 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +#include /* get PAL_callsys */ +#include + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl name; \ + .ent name,0; \ + name##:; \ + .frame sp,0,ra +#else +#define ENTRY(name) \ + .globl name; \ + .ent name,0; \ + name/**/:; \ + .frame sp,0,ra +#endif + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name, args) \ + ENTRY(name); \ + ldiq v0, SYS_##syscall_name; \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + beq a3, 10f; \ + br gp, 20f; \ +20:; \ + ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ +10: +#else +#define PSEUDO(name, syscall_name, args) \ + ENTRY(name); \ + ldiq v0, SYS_/**/syscall_name; \ + .set noat; \ + call_pal PAL_callsys; \ + .set at; \ + beq a3, 10f; \ + br gp, 20f; \ +20:; \ + ldgp gp, 0(gp); \ + jmp zero, syscall_error; \ +10: +#endif + +#define ret ret zero,(ra),1 +#define r0 v0 +#define r1 a4 +#define MOVE(x,y) mov x, y diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/alpha/vhangup.S glibc-1.07/sysdeps/unix/bsd/osf1/alpha/vhangup.S --- glibc-1.06/sysdeps/unix/bsd/osf1/alpha/vhangup.S +++ glibc-1.07/sysdeps/unix/bsd/osf1/alpha/vhangup.S Thu Dec 23 01:02:53 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1991, 1992 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 + +#include +#define SYS_vhangup SYS_ult_vhangup + +SYSCALL (vhangup, 1) + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/direct.h glibc-1.07/sysdeps/unix/bsd/osf1/direct.h --- glibc-1.06/sysdeps/unix/bsd/osf1/direct.h +++ glibc-1.07/sysdeps/unix/bsd/osf1/direct.h Thu Dec 23 00:57:43 1993 @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 MAXNAMLEN +#define MAXNAMLEN 255 +#endif + +struct direct + { + unsigned int d_fileno; + unsigned short int d_reclen; + unsigned short int d_namlen; + char d_name[MAXNAMLEN + 1]; + }; + +#define D_NAMLEN(d) ((d)->d_namlen) diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/dirstream.h glibc-1.07/sysdeps/unix/bsd/osf1/dirstream.h --- glibc-1.06/sysdeps/unix/bsd/osf1/dirstream.h +++ glibc-1.07/sysdeps/unix/bsd/osf1/dirstream.h Thu Dec 23 00:57:37 1993 @@ -0,0 +1,44 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + +#define __need_size_t +#include + +/* Directory stream type. */ + +typedef struct + { + int __fd; /* File descriptor. */ + + size_t __offset; /* Current offset into the block. */ + size_t __size; /* Total valid data in the block. */ + char *__data; /* Directory block. */ + + size_t __allocation; /* Space allocated for the block. */ + + int __data_len; /* Size of __data. */ + long __dd_seek; /* OSF/1 magic cookie returned by getdents. */ + void *dd_lock; /* Used by OSF/1 for inter-thread locking. */ + + } DIR; + +#endif /* dirstream.h */ diff -ruN glibc-1.06/sysdeps/unix/bsd/osf1/sigaction.h glibc-1.07/sysdeps/unix/bsd/osf1/sigaction.h --- glibc-1.06/sysdeps/unix/bsd/osf1/sigaction.h +++ glibc-1.07/sysdeps/unix/bsd/osf1/sigaction.h Thu Dec 23 00:57:46 1993 @@ -0,0 +1,45 @@ +/* Structure and constand definitions for sigaction et al. OSF/1 version. + Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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, 1992 Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* Signal handler. */ + __sighandler_t sa_handler; + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + + /* Special flags. */ + int sa_flags; + }; + +/* Bits in `sa_flags'. */ +#ifdef __USE_BSD +#define SA_ONSTACK 0x1 /* Take signal on signal stack. */ +#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */ +#define SA_DISABLE 0x4 /* Disable alternate signal stack. */ +#endif +#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */ + + +/* Values for the HOW argument to `sigprocmask'. */ +#define SIG_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 3 /* Set the set of blocked signals. */ diff -ruN glibc-1.06/sysdeps/unix/bsd/readdir.c glibc-1.07/sysdeps/unix/bsd/readdir.c --- glibc-1.06/sysdeps/unix/bsd/readdir.c +++ glibc-1.07/sysdeps/unix/bsd/readdir.c Tue Dec 21 00:10:55 1993 @@ -0,0 +1,65 @@ +/* Copyright (C) 1991, 1992, 1993 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 +#include +#include +#include +#include +#include +#include +#include + + +/* Read a directory entry from DIRP. */ +struct dirent * +DEFUN(readdir, (dirp), DIR *dirp) +{ + struct dirent *dp; + + if (dirp == NULL || dirp->__data == NULL) + { + errno = EINVAL; + return NULL; + } + + do + { + if (dirp->__offset >= dirp->__size) + { + /* We've emptied out our buffer. Refill it. */ + + off_t base; + ssize_t bytes = __getdirentries (dirp->__fd, dirp->__data, + dirp->__allocation, &base); + if (bytes <= 0) + return NULL; + dirp->__size = (size_t) bytes; + + /* Reset the offset into the buffer. */ + dirp->__offset = 0; + } + + dp = (struct dirent *) &dirp->__data[dirp->__offset]; + dirp->__offset += dp->d_reclen; + + /* Loop to ignore deleted files. */ + } while (dp->d_fileno == 0); + + return dp; +} diff -ruN glibc-1.06/sysdeps/unix/bsd/sequent/i386/syscall.S glibc-1.07/sysdeps/unix/bsd/sequent/i386/syscall.S --- glibc-1.06/sysdeps/unix/bsd/sequent/i386/syscall.S +++ glibc-1.07/sysdeps/unix/bsd/sequent/i386/syscall.S Mon Jan 17 17:13:05 1994 @@ -0,0 +1,31 @@ +/* `syscall' function for Sequent Symmetry running Dynix version 3. +Copyright (C) 1994 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 + +.text +.globl syscall_error +.align 4 +ENTRY (syscall) + leal 8(%esp), %ecx /* Load address of second argument. */ + movl $SYS_HANDLER, %eax /* Use BSD system calls. */ + movw 4(%esp), %ax /* Load system call number into low word. */ + int $T_SVC6 /* Pretend it takes six args. */ + jb syscall_error + ret diff -ruN glibc-1.06/sysdeps/unix/bsd/signum.h glibc-1.07/sysdeps/unix/bsd/signum.h --- glibc-1.06/sysdeps/unix/bsd/signum.h Mon Mar 15 18:52:32 1993 +++ glibc-1.07/sysdeps/unix/bsd/signum.h Tue Aug 3 16:36:45 1993 @@ -59,6 +59,7 @@ #define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ #define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ #define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ +#define SIGINFO 29 /* Information request (4.4 BSD). */ #define SIGUSR1 30 /* User-defined signal 1 (POSIX). */ #define SIGUSR2 31 /* User-defined signal 2 (POSIX). */ diff -ruN glibc-1.06/sysdeps/unix/bsd/sony/m68k/Implies glibc-1.07/sysdeps/unix/bsd/sony/m68k/Implies --- glibc-1.06/sysdeps/unix/bsd/sony/m68k/Implies Mon Jan 11 18:35:56 1993 +++ glibc-1.07/sysdeps/unix/bsd/sony/m68k/Implies @@ -1,2 +0,0 @@ -# A news800 is almost exactly like an hp300 -unix/bsd/hp/m68k diff -ruN glibc-1.06/sysdeps/unix/bsd/sony/newsos/m68k/Implies glibc-1.07/sysdeps/unix/bsd/sony/newsos/m68k/Implies --- glibc-1.06/sysdeps/unix/bsd/sony/newsos/m68k/Implies +++ glibc-1.07/sysdeps/unix/bsd/sony/newsos/m68k/Implies Mon Jan 11 18:35:56 1993 @@ -0,0 +1,2 @@ +# A news800 is almost exactly like an hp300 +unix/bsd/hp/m68k diff -ruN glibc-1.06/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h glibc-1.07/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h --- glibc-1.06/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h +++ glibc-1.07/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h Tue Nov 9 07:19:28 1993 @@ -0,0 +1,54 @@ +/* Copyright (C) 1993 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 code wants to be run through m4. */ + +#include + +#define POUND(foo) (@@@Hash-Here@@@)foo + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl _##name; \ + .even; \ + _##name##: +#else +#define ENTRY(name) \ + .globl _/**/name; \ + .even; \ + _/**/name/**/: +#endif + +#define PSEUDO(name, syscall_name, args) \ + .even; \ + .globl syscall_error; \ + error: jmp syscall_error; \ + ENTRY (name) \ + DO_CALL (POUND (SYS_ify (syscall_name)), args) + +#define DO_CALL(syscall, args) \ + movel syscall, d0; \ + linkw fp, POUND(0); \ + trap POUND(0); \ + unlk fp; \ + bcs error + +#define ret rts +#define r0 d0 +#define r1 d1 +#define MOVE(x,y) movel x , y diff -ruN glibc-1.06/sysdeps/unix/bsd/sony/newsos4/m68k/sysdep.h glibc-1.07/sysdeps/unix/bsd/sony/newsos4/m68k/sysdep.h --- glibc-1.06/sysdeps/unix/bsd/sony/newsos4/m68k/sysdep.h Thu Apr 22 22:43:30 1993 +++ glibc-1.07/sysdeps/unix/bsd/sony/newsos4/m68k/sysdep.h @@ -1,67 +0,0 @@ -/* Copyright (C) 1993 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 code wants to be run through m4. */ - -#include - -#define POUND(foo) (@@@Hash-Here@@@)foo - -#ifdef __STDC__ -#define ENTRY(name) \ - .globl _##name; \ - .even; \ - _##name##: -#else -#define ENTRY(name) \ - .globl _/**/name; \ - .even; \ - _/**/name/**/: -#endif - -/* NewsOS 4 wants a stack frame around syscalls. */ - -#ifdef __STDC__ -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - linkw fp, POUND(0); \ - movel POUND(SYS_##syscall_name), d0; \ - trap POUND(0); \ - bcs error; \ - unlk fp - -#else -#define PSEUDO(name, syscall_name, args) \ - .even; \ - .globl syscall_error; \ - error: jmp syscall_error; \ - ENTRY (name) \ - linkw fp, POUND(0); \ - movel POUND(SYS_/**/syscall_name), d0; \ - trap POUND(0); \ - bcs error; \ - unlk fp -#endif - -#define ret rts -#define r0 d0 -#define r1 d1 -#define MOVE(x,y) movel x , y diff -ruN glibc-1.06/sysdeps/unix/bsd/sun/m68k/__vfork.S glibc-1.07/sysdeps/unix/bsd/sun/m68k/__vfork.S --- glibc-1.06/sysdeps/unix/bsd/sun/m68k/__vfork.S Fri Oct 2 18:57:30 1992 +++ glibc-1.07/sysdeps/unix/bsd/sun/m68k/__vfork.S Fri Jun 11 15:46:01 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -29,7 +29,7 @@ .globl ___vfork ___vfork: /* Pop the return PC value into A0. */ - moveal sp@+, a0 + movel sp@+, a0 /* Push the syscall number and trap into the kernel. */ movel #SYS_vfork, sp@- diff -ruN glibc-1.06/sysdeps/unix/bsd/sun/m68k/syscall.S glibc-1.07/sysdeps/unix/bsd/sun/m68k/syscall.S --- glibc-1.06/sysdeps/unix/bsd/sun/m68k/syscall.S +++ glibc-1.07/sysdeps/unix/bsd/sun/m68k/syscall.S Tue Nov 9 06:59:16 1993 @@ -0,0 +1,28 @@ +/* Copyright (C) 1993 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 + +ENTRY (syscall) + movel sp@, d0 /* Save return address in D0. */ + movel sp@(4), sp@ /* Put syscall number at top of stack. */ + movel d0, sp@(4) /* Put return address under it. */ + trap #0 /* Do syscall; pops number from stack. */ + jcs error + ret +error: jmp syscall_error diff -ruN glibc-1.06/sysdeps/unix/bsd/sun/sunos4/__setsid.S glibc-1.07/sysdeps/unix/bsd/sun/sunos4/__setsid.S --- glibc-1.06/sysdeps/unix/bsd/sun/sunos4/__setsid.S +++ glibc-1.07/sysdeps/unix/bsd/sun/sunos4/__setsid.S Tue Jun 22 02:43:48 1993 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.06/sysdeps/unix/bsd/sun/sunos4/__wait4.c glibc-1.07/sysdeps/unix/bsd/sun/sunos4/__wait4.c --- glibc-1.06/sysdeps/unix/bsd/sun/sunos4/__wait4.c Thu Apr 22 20:54:09 1993 +++ glibc-1.07/sysdeps/unix/bsd/sun/sunos4/__wait4.c Thu Dec 2 19:03:07 1993 @@ -25,12 +25,12 @@ #include #include -extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS stat_loc, +extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS_DEFN stat_loc, int options, struct rusage *usage)); pid_t DEFUN(__wait4, (pid, stat_loc, options, usage), - pid_t pid AND __WAIT_STATUS stat_loc AND + pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND int options AND struct rusage *usage) { switch (pid) diff -ruN glibc-1.06/sysdeps/unix/bsd/sys/reboot.h glibc-1.07/sysdeps/unix/bsd/sys/reboot.h --- glibc-1.06/sysdeps/unix/bsd/sys/reboot.h +++ glibc-1.07/sysdeps/unix/bsd/sys/reboot.h Tue Aug 3 18:23:06 1993 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1982, 1986, 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: @(#)reboot.h 7.6 (Berkeley) 6/28/90 + * $Id: reboot.h,v 1.3 1993/05/20 16:22:55 cgd Exp $ + */ + +#ifndef _SYS_REBOOT_H_ +#define _SYS_REBOOT_H_ + +/* + * Arguments to reboot system call. + * These are passed to boot program in r11, + * and on to init. + */ +#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */ + +#define RB_ASKNAME 0x01 /* ask for file name to reboot from */ +#define RB_SINGLE 0x02 /* reboot to single user only */ +#define RB_NOSYNC 0x04 /* dont sync before reboot */ +#define RB_HALT 0x08 /* don't reboot, just halt */ +#define RB_INITNAME 0x10 /* name given for /etc/init (unused) */ +#define RB_DFLTROOT 0x20 /* use compiled-in rootdev */ +#define RB_KDB 0x40 /* give control to kernel debugger */ +#define RB_RDONLY 0x80 /* mount root fs read-only */ +#define RB_DUMP 0x100 /* dump kernel memory before reboot */ + +/* + * Constants for converting boot-style device number to type, + * adaptor (uba, mba, etc), unit number and partition number. + * Type (== major device number) is in the low byte + * for backward compatibility. Except for that of the "magic + * number", each mask applies to the shifted value. + * Format: + * (4) (4) (4) (4) (8) (8) + * -------------------------------- + * |MA | AD| CT| UN| PART | TYPE | + * -------------------------------- + */ +#define B_ADAPTORSHIFT 24 +#define B_ADAPTORMASK 0x0f +#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK) +#define B_CONTROLLERSHIFT 20 +#define B_CONTROLLERMASK 0xf +#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK) +#define B_UNITSHIFT 16 +#define B_UNITMASK 0xf +#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK) +#define B_PARTITIONSHIFT 8 +#define B_PARTITIONMASK 0xff +#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK) +#define B_TYPESHIFT 0 +#define B_TYPEMASK 0xff +#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK) + +#define B_MAGICMASK ((u_long)0xf0000000) +#define B_DEVMAGIC ((u_long)0xa0000000) + +#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \ + (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \ + ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \ + ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC) + +#endif /* !_SYS_REBOOT_H_ */ diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/__setsid.S glibc-1.07/sysdeps/unix/bsd/ultrix4/__setsid.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/__setsid.S +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/__setsid.S Tue Jun 22 02:43:48 1993 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/__wait.S glibc-1.07/sysdeps/unix/bsd/ultrix4/__wait.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/__wait.S Wed Apr 29 23:11:01 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/__wait.S Thu Aug 26 19:30:14 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/__wait3.S glibc-1.07/sysdeps/unix/bsd/ultrix4/__wait3.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/__wait3.S Wed Apr 29 23:11:02 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/__wait3.S Thu Aug 26 19:30:19 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/__waitpid.S glibc-1.07/sysdeps/unix/bsd/ultrix4/__waitpid.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/__waitpid.S Wed Apr 29 23:11:02 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/__waitpid.S Thu Aug 26 19:30:23 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__brk.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__brk.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__brk.S Wed Apr 29 23:10:56 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__brk.S Thu Aug 26 19:30:39 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__fork.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__fork.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__fork.S Wed Apr 29 23:10:57 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__fork.S Thu Aug 26 19:30:43 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__handler.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__handler.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__handler.S Wed Apr 29 23:10:59 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__handler.S Thu Aug 26 19:30:47 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). Also hacked by Ian Lance Taylor (ian@airs.com). The GNU C Library is free software; you can redistribute it and/or @@ -51,8 +51,8 @@ sw t3, 56(a2) sw t4, 60(a2) sw t5, 64(a2) - sw t6, 48(a2) - sw t7, 52(a2) + sw t6, 68(a2) + sw t7, 72(a2) /* Save the callee saved registers in sc_regs[16..23]. */ sw s0, 76(a2) @@ -78,9 +78,13 @@ /* ... and also the return address in sc_regs[31]. */ sw ra, 136(a2) - /* Save the floating pointer and the stack pointer in - sc_regs[29] and sc_regs[30]. */ + /* Note: we don't save the stack pointer in sc_regs[29]; + instead, we use the one that was already there. */ +#if 0 sw sp, 128(a2) +#endif + + /* Save the floating pointer in sc_regs[30]. */ sw $fp, 132(a2) /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */ diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__pipe.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__pipe.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__pipe.S Wed Apr 29 23:10:59 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__pipe.S Thu Aug 26 19:30:51 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__sigret.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__sigret.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__sigret.S Wed Apr 29 23:11:00 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__sigret.S Thu Aug 26 19:30:55 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__vfork.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__vfork.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/__vfork.S Wed Apr 29 23:11:01 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/__vfork.S Thu Aug 26 19:30:59 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h Tue Sep 15 15:04:28 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h Thu Aug 26 19:31:03 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/start.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/start.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/start.S +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/start.S Sun Dec 5 01:54:56 1993 @@ -0,0 +1,78 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +#ifndef HAVE_GNU_LD +#define __environ environ +#endif + +.comm __environ, 4 +.comm errno, 4 + +ENTRY(__start) + .set noreorder + + /* The first thing on the stack is argc. */ + lw t0, 0(sp) + nop + + /* Set up the global pointer. */ + la gp, _gp + + /* Then set up argv. */ + addiu t1, sp, 4 + + /* To compute where envp is, first we have to jump ahead four + bytes from what argv was. This will bring us ahead, so we don't + need to compute the NULL at the end of argv later. */ + addiu v1, t1, 4 + + /* Now, compute the space to skip given the number of arguments + we've got. We do this by multiplying argc by 4. */ + sll v0, t0, 2 + + /* Now, add (argv+4) with the space to skip...that's envp. */ + addu v1, v1, v0 + move t2, v1 + + /* __environ = envp; */ + sw t2, __environ + + addiu sp, sp, -24 + + /* __libc_init (argc, argv, envp); */ + move a0, t0 + move a1, t1 + move a2, t2 + jal __libc_init + nop + + /* errno = 0; */ + sw zero, errno + + /* exit (main (argc, argv, envp)); */ + move a0, t0 + move a1, t1 + move a2, t2 + jal main + nop + + /* Make the value returned by main be the argument to exit. */ + jal exit + move a0, v0 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/start.c glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/start.c --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/start.c Thu Apr 30 03:13:58 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/start.c @@ -1,63 +0,0 @@ -/* Copyright (C) 1991, 1992 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 -#include -#include -#include - -#ifndef __GNUC__ - #error This file uses GNU C extensions; you must compile with GCC. -#endif - -/* The first piece of initialized data. */ -int __data_start = 0; - -VOLATILE int errno = 0; - -#ifndef HAVE_GNU_LD -#undef environ -#define __environ environ -#endif - -char **__environ; - -extern void EXFUN(__libc_init, (int argc, char **argv, char **envp)); -extern int EXFUN(main, (int argc, char **argv, char **envp)); - -/* Use the frame pointer to access the arguments. This assumes that - the function was not compiled with -fno-frame-pointer. */ -register long int fp asm("fp"); - -void -DEFUN_VOID(__start) -{ - int argc; - char **argv, **envp; - - /* Set up the global pointer. */ - asm volatile ("la $28,_gp"); - argc = ((int *) fp)[0]; - argv = (char **) &((int *) fp)[1]; - envp = &argv[argc + 1]; - __environ = envp; - - __libc_init (argc, argv, envp); - errno = 0; - exit (main (argc, argv, envp)); -} diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/sysdep.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/sysdep.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/sysdep.S Wed Apr 29 23:11:05 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/sysdep.S Thu Dec 2 19:05:42 1993 @@ -1,5 +1,5 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). 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 @@ -17,10 +17,21 @@ Cambridge, MA 02139, USA. */ #include +#define _ERRNO_H +#include /* .globl errno */ ENTRY(syscall_error) +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + bne v0, EWOULDBLOCK_sys, skip + nop + li v0, EAGAIN +skip: +#endif /* Store it in errno... */ sw v0, errno diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/sysdep.h glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/sysdep.h --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/sysdep.h Tue Sep 15 15:04:26 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/sysdep.h Thu Aug 26 19:31:15 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/vfork.S glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/vfork.S --- glibc-1.06/sysdeps/unix/bsd/ultrix4/mips/vfork.S Wed Apr 29 23:11:06 1992 +++ glibc-1.07/sysdeps/unix/bsd/ultrix4/mips/vfork.S Thu Aug 26 19:31:18 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cs.widener.edu). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/bsd/vax/sysdep.S glibc-1.07/sysdeps/unix/bsd/vax/sysdep.S --- glibc-1.06/sysdeps/unix/bsd/vax/sysdep.S Fri Oct 2 18:57:23 1992 +++ glibc-1.07/sysdeps/unix/bsd/vax/sysdep.S Tue Nov 23 20:20:41 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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,9 +16,20 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define _ERRNO_H +#include + .globl _errno .globl syscall_error syscall_error: - movl r0, _errno +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmpl r0, $EWOULDBLOCK_sys + bne 0f + movl $EAGAIN, r0 +#endif +0: movl r0, _errno mnegl $1, r0 ret diff -ruN glibc-1.06/sysdeps/unix/common/Dist glibc-1.07/sysdeps/unix/common/Dist --- glibc-1.06/sysdeps/unix/common/Dist Fri May 7 17:18:55 1993 +++ glibc-1.07/sysdeps/unix/common/Dist Thu May 27 21:27:09 1993 @@ -1 +1 @@ -bsd_getgrp.S glue-ctype.c make_siglist.c +bsd_getgrp.S glue-ctype.c diff -ruN glibc-1.06/sysdeps/unix/common/Makefile glibc-1.07/sysdeps/unix/common/Makefile --- glibc-1.06/sysdeps/unix/common/Makefile Fri May 7 17:19:04 1993 +++ glibc-1.07/sysdeps/unix/common/Makefile Tue Dec 14 16:26:29 1993 @@ -17,14 +17,17 @@ # Cambridge, MA 02139, USA. ifeq ($(subdir),posix) +ifeq ($(sysdep_dir)/unix/common/,\ + $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/__getgrps.[cSs]))))) sysdep_routines := $(sysdep_routines) bsd_getgrp endif +endif ifeq ($(subdir),ctype) sysdep_routines := $(sysdep_routines) ctype-glue -generated := $(generated) $(objpfx)glue-ctype $(objpfx)glue-ctype.c +generated := $(generated) $(objpfx)glue-ctype $(objpfx)ctype-glue.c $(objpfx)ctype-glue.c: $(objpfx)glue-ctype @rm -f $@ @@ -33,20 +36,5 @@ $(objpfx)glue-ctype: $(sysdep_dir)/unix/common/glue-ctype.c $(native-compile) - -endif - -ifeq ($(subdir),stdio) - -before-compile := $(before-compile) $(objpfx)siglist.c -$(objpfx)siglist.c: $(objpfx)make_siglist - @rm -f $@ - $< > $@-tmp - mv $@-tmp $@ - -$(objpfx)make_siglist: $(sysdep_dir)/unix/common/make_siglist.c - $(native-compile) - -generated := $(generated) $(objpfx)siglist.c $(objpfx)make_siglist endif diff -ruN glibc-1.06/sysdeps/unix/common/configure glibc-1.07/sysdeps/unix/common/configure --- glibc-1.06/sysdeps/unix/common/configure Wed May 5 16:35:07 1993 +++ glibc-1.07/sysdeps/unix/common/configure Sat Dec 25 03:01:32 1993 @@ -1,4 +1,4 @@ - +# This file is generated from configure.in by Autoconf. DO NOT EDIT! # Find out what this system calls `sys_siglist'. for func in sys_siglist _sys_siglist @@ -6,10 +6,14 @@ trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` echo checking for ${func} cat > conftest.c < -int main() { exit(0); } +#include "confdefs.h" +#include +int main() { exit(0); } int t() { -#ifdef __stub_${func} +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_${func}) || defined (__stub___${func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ @@ -18,12 +22,15 @@ } EOF if eval $compile; then + rm -rf conftest* { test -n "$verbose" && \ -echo ' defining' ${trfunc} +echo " defining ${trfunc}" +echo "#define ${trfunc} 1" >> confdefs.h DEFS="$DEFS -D${trfunc}=1" } + fi rm -f conftest* done @@ -31,15 +38,19 @@ # Find out the name of the table the system's uses for character # classification. This is used by sysdeps/unix/common/glue-ctype.c. -for func in _ctype_ __ctype_ __ctype _ctype__ +for func in _ctype_ __ctype_ __ctype _ctype__ _locp do trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` echo checking for ${func} cat > conftest.c < -int main() { exit(0); } +#include "confdefs.h" +#include +int main() { exit(0); } int t() { -#ifdef __stub_${func} +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_${func}) || defined (__stub___${func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ @@ -48,11 +59,14 @@ } EOF if eval $compile; then + rm -rf conftest* { test -n "$verbose" && \ -echo ' defining' ${trfunc} +echo " defining ${trfunc}" +echo "#define ${trfunc} 1" >> confdefs.h DEFS="$DEFS -D${trfunc}=1" } + fi rm -f conftest* diff -ruN glibc-1.06/sysdeps/unix/common/configure.in glibc-1.07/sysdeps/unix/common/configure.in --- glibc-1.06/sysdeps/unix/common/configure.in Wed May 5 15:59:35 1993 +++ glibc-1.07/sysdeps/unix/common/configure.in Thu Dec 23 00:57:46 1993 @@ -5,4 +5,4 @@ # Find out the name of the table the system's uses for character # classification. This is used by sysdeps/unix/common/glue-ctype.c. -AC_HAVE_FUNCS(_ctype_ __ctype_ __ctype _ctype__) +AC_HAVE_FUNCS(_ctype_ __ctype_ __ctype _ctype__ _locp) diff -ruN glibc-1.06/sysdeps/unix/common/glue-ctype.c glibc-1.07/sysdeps/unix/common/glue-ctype.c --- glibc-1.06/sysdeps/unix/common/glue-ctype.c Fri May 14 20:09:03 1993 +++ glibc-1.07/sysdeps/unix/common/glue-ctype.c Thu Dec 23 00:57:45 1993 @@ -32,6 +32,15 @@ #if !defined(TABLE) && defined(HAVE___CTYPE) #define TABLE __ctype #endif +#if !defined(TABLE) && defined(HAVE__LOCP) +/* OSF/1 has the name _ctype defined as a macro, which points down into + the _locp structure. Jesus. We'll hope this works. */ +#include +extern loc_t *_locp; +#define TABLE (_locp->lc_chrtbl)->lc_ctype +#undef _ctype +#define TABLE_NAME _ctype +#endif #if defined (__STDC__) && __STDC__ #define STRINGIFY(arg) #arg @@ -48,7 +57,11 @@ int i; puts ("#include "); +#ifdef TABLE_NAME + printf ("CONST unsigned char %s[] =\n {\n", EVALLED_STRINGIFY (TABLE_NAME)); +#else printf ("CONST unsigned char %s[] =\n {\n", EVALLED_STRINGIFY (TABLE)); +#endif for (i = -1; i < 256; ++i) printf (" %d,\n", (int) ((TABLE+1)[i])); diff -ruN glibc-1.06/sysdeps/unix/common/make_siglist.c glibc-1.07/sysdeps/unix/common/make_siglist.c --- glibc-1.06/sysdeps/unix/common/make_siglist.c Fri May 14 17:14:58 1993 +++ glibc-1.07/sysdeps/unix/common/make_siglist.c @@ -1,55 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993 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 General Public License as published by -the Free Software Foundation; either version 2, 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#include - -/* Some systems declare sys_siglist using const. - Rather than figuring out the right decl, just diffuse this lossage. */ -#define const -#include -#undef const - -#if !defined (HAVE_SYS_SIGLIST) && defined (HAVE__SYS_SIGLIST) -#define sys_siglist _sys_siglist -#endif - -/* Make a definition for sys_siglist. */ - -extern char *sys_siglist[]; - -int -main() -{ - register int i; - - puts ("#include \"ansidecl.h\"\n#include \n"); - - puts ("#ifndef HAVE_GNU_LD"); - puts ("#define _sys_siglist\tsys_siglist"); - puts ("#endif"); - - puts ("\n/* This is a list of all known signal numbers. */"); - - puts ("\nCONST char *CONST _sys_siglist[] =\n {"); - - for (i = 0; i < NSIG; ++i) - printf (" \"%s\",\n", sys_siglist[i]); - - puts (" NULL\n };\n"); - - exit (0); -} diff -ruN glibc-1.06/sysdeps/unix/configure glibc-1.07/sysdeps/unix/configure --- glibc-1.06/sysdeps/unix/configure Fri May 21 18:12:57 1993 +++ glibc-1.07/sysdeps/unix/configure Mon Jan 17 17:15:47 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1993 Free Software Foundation, Inc. +# Copyright (C) 1993, 1994 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 @@ -45,6 +45,9 @@ test -n "$unix_syscall_h" && { +# This variable will collect the names of the files we create. +unix_generated= + # These several functions are system calls on Unix systems which have them. # The details of these calls are universal enough that if a system's # defines the system call number, we know that the simple @@ -52,7 +55,8 @@ for unix_function in \ __dup2 __lstat __mkdir __rmdir __readlink __symlink rename swapon \ - __getpgrp __access __select __getgroups/__getgrps setgroups + __access __select __getgroups/__getgrps setgroups \ + __getitimer/__getitmr __setitimer/__setitmr do # $unix_function => $unix_syscall $unix_srcname @@ -92,6 +96,7 @@ echo "#include " \ > ${unix_srcname}.S test -n "$verbose" && echo " wrote ${unix_srcname}.S" + unix_generated="$unix_generated ${unix_srcname}.S" fi ;; *) ;; @@ -98,5 +103,9 @@ esac done + +# Store the list of files we created in config.make; Makefile uses it. +test -n "$unix_generated" && config_vars="$config_vars +unix-generated := ${unix_generated}" } diff -ruN glibc-1.06/sysdeps/unix/dirstream.h glibc-1.07/sysdeps/unix/dirstream.h --- glibc-1.06/sysdeps/unix/dirstream.h +++ glibc-1.07/sysdeps/unix/dirstream.h Tue Dec 21 03:31:56 1993 @@ -0,0 +1,43 @@ +/* Copyright (C) 1993 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. */ + +#ifndef _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + +#define __need_size_t +#include + +/* Directory stream type. + + The miscellaneous Unix `readdir' implementations read directory data + into a buffer and fill in a `struct dirent' copy in the `DIR' object. */ + +typedef struct + { + int __fd; /* File descriptor. */ + + char *__data; /* Directory block. */ + size_t __allocation; /* Space allocated for the block. */ + size_t __offset; /* Current offset into the block. */ + size_t __size; /* Total valid data in the block. */ + + struct dirent __entry; /* Returned by `readdir'. */ + } DIR; + +#endif /* dirstream.h */ diff -ruN glibc-1.06/sysdeps/unix/errnos-tmpl.c glibc-1.07/sysdeps/unix/errnos-tmpl.c --- glibc-1.06/sysdeps/unix/errnos-tmpl.c Wed Jun 12 15:50:27 1991 +++ glibc-1.07/sysdeps/unix/errnos-tmpl.c Thu Oct 28 17:21:59 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993 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 @@ -43,7 +43,13 @@ puts(ifEmath); } - printf("#define %s %d\n", name, value); + if (!strcmp (name, "EWOULDBLOCK")) + { + puts ("#define EWOULDBLOCK EAGAIN /* Translated in glibc. */"); + name = "EWOULDBLOCK_sys /* Value actually returned by kernel. */"; + } + + printf ("#define %s %d\n", name, value); if (is_Emath) { diff -ruN glibc-1.06/sysdeps/unix/i386/syscall.S glibc-1.07/sysdeps/unix/i386/syscall.S --- glibc-1.06/sysdeps/unix/i386/syscall.S +++ glibc-1.07/sysdeps/unix/i386/syscall.S Tue Nov 9 07:28:05 1993 @@ -0,0 +1,28 @@ +/* Copyright (C) 1993 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 + +.globl syscall_error +ENTRY (syscall) + popl %ecx /* Pop return address into %ecx. */ + popl %eax /* Pop syscall number into %eax. */ + pushl %ecx /* Push back return address. */ + .byte 0x9a, 0, 0, 0, 0, 7, 0 /* lcall $7, $0 -- gas bug */ + jb syscall_error + ret diff -ruN glibc-1.06/sysdeps/unix/i386/sysdep.S glibc-1.07/sysdeps/unix/i386/sysdep.S --- glibc-1.06/sysdeps/unix/i386/sysdep.S Sat May 22 21:53:02 1993 +++ glibc-1.07/sysdeps/unix/i386/sysdep.S Fri Jan 14 19:11:20 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,8 @@ Cambridge, MA 02139, USA. */ #include +#define _ERRNO_H +#include .globl C_SYMBOL_NAME(errno) .globl syscall_error @@ -27,6 +29,14 @@ #else syscall_error: #endif - movl %eax, C_SYMBOL_NAME(errno) +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmpl $EWOULDBLOCK_sys, %eax /* Is it the old EWOULDBLOCK? */ + jne notb /* Branch if not. */ + movl $EAGAIN, %eax /* Yes; translate it to EAGAIN. */ +#endif +notb: movl %eax, C_SYMBOL_NAME(errno) movl $-1, %eax ret diff -ruN glibc-1.06/sysdeps/unix/ioctls-tmpl.c glibc-1.07/sysdeps/unix/ioctls-tmpl.c --- glibc-1.06/sysdeps/unix/ioctls-tmpl.c Thu May 6 20:22:56 1993 +++ glibc-1.07/sysdeps/unix/ioctls-tmpl.c Thu Dec 23 00:57:44 1993 @@ -12,6 +12,11 @@ #include #endif +/* This causes to define some necessary data structure. */ +#ifdef sony_news +#define KANJI +#endif + #include #ifdef SIOCGIFCONF @@ -41,7 +46,7 @@ /* These exist under Ultrix, but I figured there may be others. */ #ifdef DIOCGETPT -#include /* for DIOC* */ +#include /* for DIOC* */ #endif #ifdef DEVGETGEOM #include @@ -76,6 +81,30 @@ /* struct mtop hasn't been in sys/mtio.h since 4.1 */ #undef MTIOCTOP #undef MTIOCGET +#endif + +#if defined(__osf__) && defined(__alpha__) +#include /* To get TIOCGETP, etc. */ +#include /* for DIOC* */ +#include /* for MTIOC* */ +/* The binlog_getstatus structure doesn't seem to be defined. */ +#undef BINLOG_GETSTATUS +/* Can't find `struct ifdata' anywhere. */ +#undef SIOCMANREQ +#undef SIOCGETEVENTS +/* OSF/1 smells an awful lot like Ultrix. */ +#undef TCGETA +#undef TCSETA +#undef TCSETAF +#undef TCSETAW +/* This macro looks screwed in sys/devio.h. */ +#undef DEV_DISKPART +/* This is in sys/dkio.h, but we don't need it. */ +#undef DKIOCACC +#undef DKIOCDOP +#undef DKIOCEXCL +#undef DKIOCGET +#undef DKIOCHDR #endif #define DEFINE(name, value) \ diff -ruN glibc-1.06/sysdeps/unix/mk-local_lim.c glibc-1.07/sysdeps/unix/mk-local_lim.c --- glibc-1.06/sysdeps/unix/mk-local_lim.c Wed May 5 20:45:47 1993 +++ glibc-1.07/sysdeps/unix/mk-local_lim.c Wed Jun 30 17:41:44 1993 @@ -16,6 +16,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #ifdef HAVE_SYS_PARAM_H diff -ruN glibc-1.06/sysdeps/unix/morecore.c glibc-1.07/sysdeps/unix/morecore.c --- glibc-1.06/sysdeps/unix/morecore.c Thu Jul 30 20:19:34 1992 +++ glibc-1.07/sysdeps/unix/morecore.c Wed Nov 10 20:49:29 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993 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 @@ -24,7 +24,11 @@ #define __sbrk sbrk #endif +#ifdef __GNU_LIBRARY__ +/* It is best not to declare this and cast its result on foreign operating + systems with potentially hostile include files. */ extern __ptr_t __sbrk __P ((int increment)); +#endif #ifndef NULL #define NULL 0 @@ -37,7 +41,7 @@ __default_morecore (increment) ptrdiff_t increment; { - __ptr_t result = __sbrk ((int) increment); + __ptr_t result = (__ptr_t) __sbrk ((int) increment); if (result == (__ptr_t) -1) return NULL; return result; diff -ruN glibc-1.06/sysdeps/unix/readdir.c glibc-1.07/sysdeps/unix/readdir.c --- glibc-1.06/sysdeps/unix/readdir.c Sat May 22 18:58:53 1993 +++ glibc-1.07/sysdeps/unix/readdir.c Fri Jun 4 14:11:48 1993 @@ -27,7 +27,12 @@ #include "direct.h" /* This file defines `struct direct'. */ +/* direct.h may have an alternate definition for this. */ +#ifndef D_RECLEN +#define D_RECLEN(dp) ((dp)->d_reclen) +#endif + /* Read a directory entry from DIRP. */ struct dirent * DEFUN(readdir, (dirp), DIR *dirp) @@ -58,7 +63,7 @@ } dp = (struct direct *) &dirp->__data[dirp->__offset]; - dirp->__offset += dp->d_reclen; + dirp->__offset += D_RECLEN (dp); if (dp->d_ino != 0) { diff -ruN glibc-1.06/sysdeps/unix/start.c glibc-1.07/sysdeps/unix/start.c --- glibc-1.06/sysdeps/unix/start.c Fri May 21 13:46:50 1993 +++ glibc-1.07/sysdeps/unix/start.c Mon Dec 20 23:28:59 1993 @@ -19,6 +19,7 @@ #include #include #include +#include /* In case it wants to define anything. */ /* The first piece of initialized data. */ int __data_start = 0; @@ -49,7 +50,7 @@ #ifndef HAVE__start -#ifdef __GNUC__ +#if !defined (NO_UNDERSCORES) && defined (__GNUC__) /* Declare _start with an explicit assembly symbol name of `start' (note no leading underscore). This is the name vendor crt0.o's tend to use, and thus the name most linkers expect. */ diff -ruN glibc-1.06/sysdeps/unix/syscall.S glibc-1.07/sysdeps/unix/syscall.S --- glibc-1.06/sysdeps/unix/syscall.S +++ glibc-1.07/sysdeps/unix/syscall.S Tue Nov 9 06:46:23 1993 @@ -0,0 +1,29 @@ +/* Copyright (C) 1993 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 + +#ifndef SYS_syscall +#define SYS_syscall 0 +#endif + +/* This works if the kernel does an "indirect system call" for system call 0, + taking the first argument word off the stack as the system call number. */ + +SYSCALL (syscall, 1) + ret diff -ruN glibc-1.06/sysdeps/unix/sysv/Dist glibc-1.07/sysdeps/unix/sysv/Dist --- glibc-1.06/sysdeps/unix/sysv/Dist Fri Apr 23 18:10:57 1993 +++ glibc-1.07/sysdeps/unix/sysv/Dist Tue Nov 9 06:31:52 1993 @@ -1,3 +1,3 @@ sysv_termio.h utmp.h -sys_getdents.S +s_getdents.S diff -ruN glibc-1.06/sysdeps/unix/sysv/Makefile glibc-1.07/sysdeps/unix/sysv/Makefile --- glibc-1.06/sysdeps/unix/sysv/Makefile Fri Apr 23 18:11:01 1993 +++ glibc-1.07/sysdeps/unix/sysv/Makefile Mon Oct 25 16:00:45 1993 @@ -19,7 +19,7 @@ ifeq ($(subdir), misc) sysdep_headers := $(sysdep_headers) termio.h -generated := $(generated) termio.h +generated := $(generated) $(objpfx)termio.h # termio.h is just like sysv_termio.h except it uses the same names for # everything that System V termio does. sysv_termio.h is necessary to @@ -37,6 +37,6 @@ ifeq ($(subdir),dirent) -sysdep_routines := $(sysdep_routines) sys_getdents +sysdep_routines := $(sysdep_routines) s_getdents endif diff -ruN glibc-1.06/sysdeps/unix/sysv/direct.h glibc-1.07/sysdeps/unix/sysv/direct.h --- glibc-1.06/sysdeps/unix/sysv/direct.h Mon May 3 19:34:07 1993 +++ glibc-1.07/sysdeps/unix/sysv/direct.h Fri Jun 4 14:10:59 1993 @@ -6,3 +6,5 @@ #define D_NAMLEN(d) \ ((d)->d_name[13] == '\0' ? strlen ((d)->d_name) : 14) + +#define D_RECLEN(d) (sizeof (*(d))) diff -ruN glibc-1.06/sysdeps/unix/sysv/i386/__sigret.S glibc-1.07/sysdeps/unix/sysv/i386/__sigret.S --- glibc-1.06/sysdeps/unix/sysv/i386/__sigret.S +++ glibc-1.07/sysdeps/unix/sysv/i386/__sigret.S Sat Jan 15 23:33:05 1994 @@ -0,0 +1,25 @@ +/* Copyright (C) 1994 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 + +.text +ENTRY (__sigreturn) + addl $4, %esp /* Pop the return PC. */ + lcall $0xf, $0 /* Do the magic sigreturn trap. */ + /* NOTREACHED */ diff -ruN glibc-1.06/sysdeps/unix/sysv/i386/linux/sysdep.S glibc-1.07/sysdeps/unix/sysv/i386/linux/sysdep.S --- glibc-1.06/sysdeps/unix/sysv/i386/linux/sysdep.S Tue Jul 14 19:11:56 1992 +++ glibc-1.07/sysdeps/unix/sysv/i386/linux/sysdep.S Tue Nov 23 20:20:32 1993 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1993 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,8 @@ Cambridge, MA 02139, USA. */ #include +#define _ERRNO_H +#include /* We jump here when a system call gets an error. The error number is negated in %eax. */ @@ -23,6 +25,14 @@ .globl syscall_error syscall_error: negl %eax /* Make it positive. */ - movl %eax, _errno /* Store it in `errno'. */ +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmpl %eax, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */ + jne 0f /* Branch if not. */ + move $EAGAIN, %eax /* Yes; translate it to EAGAIN. */ +#endif +0: movl %eax, _errno /* Store it in `errno'. */ move $-1, %eax /* Return -1. */ ret diff -ruN glibc-1.06/sysdeps/unix/sysv/linux/__setsid.S glibc-1.07/sysdeps/unix/sysv/linux/__setsid.S --- glibc-1.06/sysdeps/unix/sysv/linux/__setsid.S Thu Sep 24 20:31:52 1992 +++ glibc-1.07/sysdeps/unix/sysv/linux/__setsid.S Tue Jun 22 02:43:48 1993 @@ -1,22 +1 @@ -/* Copyright (C) 1991, 1992 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 - -SYSCALL__ (setsid, 0) - ret +#include diff -ruN glibc-1.06/sysdeps/unix/sysv/s_getdents.S glibc-1.07/sysdeps/unix/sysv/s_getdents.S --- glibc-1.06/sysdeps/unix/sysv/s_getdents.S +++ glibc-1.07/sysdeps/unix/sysv/s_getdents.S Fri Oct 2 18:34:57 1992 @@ -0,0 +1,22 @@ +/* Copyright (C) 1992 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 + +SYSCALL__ (getdents, 3) + ret diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/Dist glibc-1.07/sysdeps/unix/sysv/sco3.2.4/Dist --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/Dist Fri May 21 17:08:43 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/Dist Wed Jun 23 15:10:48 1993 @@ -1 +1 @@ -sco_pgrp.S +pgrpsys.S diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/Makefile glibc-1.07/sysdeps/unix/sysv/sco3.2.4/Makefile --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/Makefile Fri May 21 14:17:21 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/Makefile Tue Jun 22 02:55:24 1993 @@ -1,3 +1,3 @@ ifeq (posix,$(subdir)) -sysdep_routines := $(sysdep_routines) sco_pgrp.c +sysdep_routines := $(sysdep_routines) pgrpsys endif diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__getpgrp.c glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__getpgrp.c --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__getpgrp.c Fri May 21 14:17:28 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__getpgrp.c Tue Jun 22 02:54:40 1993 @@ -1,31 +1 @@ -/* Copyright (C) 1993 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 -#include -#include -#include - -extern int __sco_pgrp __P ((int type, ...)); - -/* Get the process group ID of process PID. */ -int -DEFUN(__getpgrp, (pid), pid_t pid) -{ - return __sco_pgrp (0, pid); -} +#include diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__setpgrp.c glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__setpgrp.c --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__setpgrp.c Fri May 21 14:17:26 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__setpgrp.c Tue Jun 22 02:54:40 1993 @@ -1,32 +1 @@ -/* Copyright (C) 1993 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 -#include -#include - -extern int __sco_pgrp __P ((int type, ...)); - -/* Set the process group ID of the process matching PID to PGID. - If PID is zero, the current process's process group ID is set. - If PGID is zero, the process ID of the process is used. */ -int -DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) -{ - return __sco_pgrp (1, pid, pgid); -} +#include diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__setsid.c glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__setsid.c --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__setsid.c Fri May 21 14:17:24 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__setsid.c Tue Jun 22 02:54:40 1993 @@ -1,32 +1 @@ -/* Copyright (C) 1993 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 -#include -#include - -extern int __sco_pgrp __P ((int type, ...)); - -/* Create a new session with the calling process as its leader. - The process group IDs of the session and the calling process - are set to the process ID of the calling process, which is returned. */ -int -DEFUN_VOID(__setsid) -{ - return __sco_pgrp (3); -} +#include diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__sysconf.S glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__sysconf.S --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/__sysconf.S Wed May 12 16:42:26 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/__sysconf.S Fri Jan 14 19:09:40 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,12 @@ Cambridge, MA 02139, USA. */ #include +#include -SYSCALL__ (sysconf, 1) +.globl __tzname_max +ENTRY (__sysconf) + cmpl $_SC_TZNAME_MAX, 4(%esp) /* Is the arg _SC_TZNAME_MAX? */ + je tzname + DO_CALL (sysconf, 1) /* No; use the SCO system call. */ ret +tzname: jmp C_SYMBOL_NAME(__tzname_max) /* Yes; bounce to __tzname_max (). */ diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/confname.h glibc-1.07/sysdeps/unix/sysv/sco3.2.4/confname.h --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/confname.h Wed May 12 16:42:29 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/confname.h Mon Jun 21 19:36:34 1993 @@ -39,6 +39,7 @@ #define _SC_VERSION 7 #define _SC_PASS_MAX 8 #define _SC_XOPEN_VERSION 9 +#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */ #ifdef __USE_POSIX2 /* Values for the NAME argument to `confstr'. */ diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S glibc-1.07/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S Wed Jun 23 15:10:39 1993 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/sco_pgrp.S glibc-1.07/sysdeps/unix/sysv/sco3.2.4/sco_pgrp.S --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/sco_pgrp.S Fri May 21 14:17:31 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/sco_pgrp.S @@ -1,22 +0,0 @@ -/* Copyright (C) 1993 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 - -PSEUDO (__sco_pgrp, setpgrp, 2) - ret diff -ruN glibc-1.06/sysdeps/unix/sysv/sco3.2.4/syscall.h glibc-1.07/sysdeps/unix/sysv/sco3.2.4/syscall.h --- glibc-1.06/sysdeps/unix/sysv/sco3.2.4/syscall.h Fri May 21 14:26:08 1993 +++ glibc-1.07/sysdeps/unix/sysv/sco3.2.4/syscall.h Mon Jan 17 17:22:31 1994 @@ -29,6 +29,7 @@ #define SYS_getdents 81 #define SYS_getgid 47 #define SYS_getgroups 0x2b28 +#define SYS_getitimer 0x3728 #define SYS_getmsg 85 #define SYS_getpid 20 #define SYS_getuid 24 @@ -48,6 +49,7 @@ #define SYS_open 5 #define SYS_pathconf 0x2e28 #define SYS_pause 29 +#define SYS_pgrpsys 39 #define SYS_pipe 42 #define SYS_plock 45 #define SYS_poll 87 @@ -69,6 +71,7 @@ #define SYS_semsys 53 #define SYS_setgid 46 #define SYS_setgroups 0x2c28 +#define SYS_setitimer 0x3828 #define SYS_setpgrp 39 #define SYS_setuid 23 #define SYS_shmsys 52 diff -ruN glibc-1.06/sysdeps/unix/sysv/sys_getdents.S glibc-1.07/sysdeps/unix/sysv/sys_getdents.S --- glibc-1.06/sysdeps/unix/sysv/sys_getdents.S Fri Oct 2 18:34:57 1992 +++ glibc-1.07/sysdeps/unix/sysv/sys_getdents.S @@ -1,22 +0,0 @@ -/* Copyright (C) 1992 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 - -SYSCALL__ (getdents, 3) - ret diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/Dist glibc-1.07/sysdeps/unix/sysv/sysv4/Dist --- glibc-1.06/sysdeps/unix/sysv/sysv4/Dist Thu May 20 14:02:31 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/Dist Wed Dec 22 18:00:17 1993 @@ -1 +1,6 @@ sysconfig.h +sysconfig.S +pgrpsys.S +__waitid.S +siginfo.h +__getpgid.c __setpgid.c diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/Makefile glibc-1.07/sysdeps/unix/sysv/sysv4/Makefile --- glibc-1.06/sysdeps/unix/sysv/sysv4/Makefile Thu May 20 14:02:30 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/Makefile Sat Dec 18 01:37:59 1993 @@ -18,6 +18,7 @@ ifeq ($(subdir),posix) -sysdep_routines := $(sysdep_routines) __sysconfig +sysdep_routines := $(sysdep_routines) sysconfig pgrpsys \ + __getpgid __setpgid __waitid endif diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__dup2.c glibc-1.07/sysdeps/unix/sysv/sysv4/__dup2.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__dup2.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__dup2.c Thu Sep 23 15:14:00 1993 @@ -0,0 +1,2 @@ +/* SVR4 uses the POSIX dup2. */ +#include diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__getpgid.c glibc-1.07/sysdeps/unix/sysv/sysv4/__getpgid.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__getpgid.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__getpgid.c Sat Dec 18 01:37:59 1993 @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +#include +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__getpgid, (pid), pid_t pid) +{ + return __pgrpsys (4, pid); +} diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__getpgrp.c glibc-1.07/sysdeps/unix/sysv/sysv4/__getpgrp.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__getpgrp.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__getpgrp.c Sat Dec 18 01:38:00 1993 @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 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 +#include +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__getpgrp, (pid), pid_t pid) +{ + return __pgrpsys (0, pid); +} diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__setpgid.c glibc-1.07/sysdeps/unix/sysv/sysv4/__setpgid.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__setpgid.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__setpgid.c Sat Dec 18 01:38:00 1993 @@ -0,0 +1,31 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +#include +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Get the process group ID of process PID. */ +int +DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid) +{ + return __pgrpsys (5, pid, pgid); +} diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__setpgrp.c glibc-1.07/sysdeps/unix/sysv/sysv4/__setpgrp.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__setpgrp.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__setpgrp.c Sat Dec 18 01:38:01 1993 @@ -0,0 +1,32 @@ +/* Copyright (C) 1993 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 +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Set the process group ID of the process matching PID to PGID. + If PID is zero, the current process's process group ID is set. + If PGID is zero, the process ID of the process is used. */ +int +DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid) +{ + return __pgrpsys (1, pid, pgid); +} diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__setsid.c glibc-1.07/sysdeps/unix/sysv/sysv4/__setsid.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__setsid.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__setsid.c Tue Jun 22 02:48:05 1993 @@ -0,0 +1,32 @@ +/* Copyright (C) 1993 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 +#include +#include + +extern int __pgrpsys __P ((int type, ...)); + +/* Create a new session with the calling process as its leader. + The process group IDs of the session and the calling process + are set to the process ID of the calling process, which is returned. */ +int +DEFUN_VOID(__setsid) +{ + return __pgrpsys (3); +} diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__sigproc.S glibc-1.07/sysdeps/unix/sysv/sysv4/__sigproc.S --- glibc-1.06/sysdeps/unix/sysv/sysv4/__sigproc.S Wed Feb 24 17:45:29 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__sigproc.S Wed Sep 22 20:07:54 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__sysconf.c glibc-1.07/sysdeps/unix/sysv/sysv4/__sysconf.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__sysconf.c Thu May 20 14:02:25 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__sysconf.c Wed Sep 22 20:08:00 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__waitid.S glibc-1.07/sysdeps/unix/sysv/sysv4/__waitid.S --- glibc-1.06/sysdeps/unix/sysv/sysv4/__waitid.S +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__waitid.S Sat Dec 18 01:37:57 1993 @@ -0,0 +1,25 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +/* XXX */ +#define SYS_waitid SYS_waitsys + +SYSCALL__ (waitid, 3) + ret diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/__waitpid.c glibc-1.07/sysdeps/unix/sysv/sysv4/__waitpid.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/__waitpid.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/__waitpid.c Sat Dec 18 01:37:56 1993 @@ -0,0 +1,99 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +#include +#include +#include +#include +#include "siginfo.h" + +typedef enum __idtype +{ + /* Look for processes based upon a given PID. */ + P_PID, + + /* Look for processes based upon a given process-group ID. */ + P_PGID = 2, + + /* Look for any process. */ + P_ALL = 7, +} __idtype_t; + +extern __pid_t __getpgid __P ((__pid_t pid)); +extern int __waitid __P ((__idtype_t idtype, __pid_t id, + __siginfo_t *infop, int options)); + +/* Wait for a child matching PID to die. + If PID is greater than 0, match any process whose process ID is PID. + If PID is (pid_t) -1, match any process. + If PID is (pid_t) 0, match any process with the + same process group as the current process. + If PID is less than -1, match any process whose + process group is the absolute value of PID. + If the WNOHANG bit is set in OPTIONS, and that child + is not already dead, return (pid_t) 0. If successful, + return PID and store the dead child's status in STAT_LOC. + Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, + return status for stopped children; otherwise don't. */ + +__pid_t +DEFUN(__waitpid, (__pid, __stat_loc, __options), + __pid_t __pid AND int *__stat_loc AND int __options) +{ + __idtype_t idtype; + __pid_t tmp_pid = __pid; + __siginfo_t infop; + + if (__pid <= WAIT_MYPGRP) + { + if (__pid == WAIT_ANY) + { + /* Request the status for any child. */ + idtype = P_ALL; + } + else if (__pid == WAIT_MYPGRP) + { + /* Request the status for any child process that has + a pgid that's equal to that of our parent. */ + tmp_pid = __getpgid (0); + idtype = P_PGID; + } + else /* __pid < -1 */ + { + /* Request the status for any child whose pgid is equal + to the absolute value of PID. */ + tmp_pid = __pid & ~0; /* XXX not pseudo-insn */ + idtype = P_PGID; + } + } + else + { + /* Request the status for the child whose pid is PID. */ + idtype = P_PID; + } + + if (__waitid (idtype, tmp_pid, &infop, __options | WEXITED | WTRAPPED) < 0) + { + *__stat_loc = infop.__status; + return -1; + } + + *__stat_loc = infop.__status; + return __pid; +} diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/i386/statbuf.h glibc-1.07/sysdeps/unix/sysv/sysv4/i386/statbuf.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/i386/statbuf.h +++ glibc-1.07/sysdeps/unix/sysv/sysv4/i386/statbuf.h Tue Dec 21 20:34:24 1993 @@ -0,0 +1,84 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + unsigned long st_dev; /* Device. */ + long st_filler1[3]; + unsigned long st_ino; /* File serial number. */ + unsigned long st_mode; /* File mode. */ + unsigned long st_nlink; /* Link count. */ + long st_uid; /* User ID of the file's owner. */ + long st_gid; /* Group ID of the file's group.*/ + unsigned long st_rdev; /* Device number, if device. */ + long st_filler2[2]; + + long st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long st_filler3; + + long st_atime; /* Time of last access. */ + unsigned long st_atime_usec; + long st_mtime; /* Time of last modification. */ + unsigned long st_mtime_usec; + long st_ctime; /* Time of last status change. */ + unsigned long st_ctime_usec; + + long st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + long st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; /* The type of this filesystem. */ + int st_aclcnt; + unsigned long st_level; + unsigned long st_flags; + unsigned long st_cmwlevel; + long st_filler4[4]; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/pgrpsys.S glibc-1.07/sysdeps/unix/sysv/sysv4/pgrpsys.S --- glibc-1.06/sysdeps/unix/sysv/sysv4/pgrpsys.S +++ glibc-1.07/sysdeps/unix/sysv/sysv4/pgrpsys.S Wed Jun 30 14:41:54 1993 @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 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 + +SYSCALL__ (pgrpsys, 3) + ret diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/pipestream.c glibc-1.07/sysdeps/unix/sysv/sysv4/pipestream.c --- glibc-1.06/sysdeps/unix/sysv/sysv4/pipestream.c +++ glibc-1.07/sysdeps/unix/sysv/sysv4/pipestream.c Sat Dec 18 01:37:57 1993 @@ -0,0 +1,2 @@ +/* We deliberately avoid having NO_WAITPID set. */ +#include diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/siginfo.h glibc-1.07/sysdeps/unix/sysv/sysv4/siginfo.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/siginfo.h +++ glibc-1.07/sysdeps/unix/sysv/sysv4/siginfo.h Sat Dec 18 01:38:02 1993 @@ -0,0 +1,44 @@ +/* Definitions of the siginfo structure. + Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 _SIGINFO_H +#define _SIGINFO_H 1 + +#ifdef __USE_SVID +/* SVR4 puts a ton of other stuff in this structure. For now, we'll just + define the two things we really need out of it, and hope for the best. */ + +typedef struct __siginfo +{ + int filler1[3]; + + /* The PID of the child. */ + __pid_t __pid; + + int filler2; + + /* The child's status. */ + int __status; + + int filler3[26]; + +} __siginfo_t; + +#endif /* __USE_SVID */ +#endif /* siginfo.h */ diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/signum.h glibc-1.07/sysdeps/unix/sysv/sysv4/signum.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/signum.h Wed Feb 24 17:44:00 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/signum.h Wed Sep 22 20:08:05 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1992, 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/direct.h glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/direct.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/direct.h +++ glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/direct.h Mon Dec 6 22:48:28 1993 @@ -0,0 +1,39 @@ +/* Copyright (C) 1992, 1993 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. */ + +#ifndef _BSDDIR_H +#define _BSDDIR_H 1 + +#include + +/* This is the Solaris direct; it's the same as that in + sysdeps/unix/sysv/sysv4/direct.h, but it uses the length given by d_namlen, + since we can't reliably use tyhe sysv4/direct.h method of computing + the length. */ + +struct direct + { + unsigned long int d_fileno; + long int d_off; + unsigned short int d_reclen; + char d_name[NAME_MAX + 1]; + }; + +#define D_NAMLEN(d) (strlen ((d)->d_name)) + +#endif diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/sigaltstack.S glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/sigaltstack.S --- glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/sigaltstack.S Wed May 12 21:25:52 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/sigaltstack.S @@ -1,2 +0,0 @@ -/* Solaris uses the BSD 4.4 sigaltstack syscall. */ -#include diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h +++ glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h Mon Dec 6 22:48:27 1993 @@ -0,0 +1,82 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 _STATBUF_H +#define _STATBUF_H + +#include + +/* Structure describing file characteristics. */ +struct stat + { + unsigned long int st_dev; + long st_filler1[3]; + __ino_t st_ino; /* File serial number. */ + unsigned long int st_mode; /* File mode. */ + /* This is unsigned long instead of __nlink_t, since SVR4 has + a long nlink_t, not a short one. */ + unsigned long int st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long st_filler2[2]; + + __off_t st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long st_filler3; + + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atime_usec; + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtime_usec; + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctime_usec; + + long st_blksize; /* Optimal block size for I/O. */ +#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */ + + long st_blocks; /* Number of 512-byte blocks allocated. */ + char st_fstype[16]; + long st_filler4[8]; + }; + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ + +/* These don't actually exist on System V, but having them doesn't hurt. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* statbuf.h */ diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/sysdep.S glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/sysdep.S --- glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/sysdep.S +++ glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/sysdep.S Tue Nov 23 20:20:30 1993 @@ -0,0 +1,46 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 +#define _ERRNO_H +#include + +ENTRY(syscall_error) + /* If it was a syscall that got interrupted, but can + be restarted, drop EINTR in. */ + cmp %o0, ERESTART + be,a notint + mov EINTR, %o0 + +notint: +#ifdef EWOULDBLOCK_sys + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmp %o0, EWOULDBLOCK_sys + be,a notblock + mov EAGAIN, %o0 +#endif + +notblock:/* Store it in errno... */ + sethi %hi(C_SYMBOL_NAME(errno)), %g1 + st %o0, [%g1 + %lo(C_SYMBOL_NAME(errno))] + + /* And just kick back a -1. */ + retl + mov -1, %o0 diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/sysdep.h glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/sysdep.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/solaris2/sysdep.h Fri May 14 21:24:13 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/solaris2/sysdep.h Mon Dec 6 23:52:10 1993 @@ -1,4 +1,42 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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. */ + /* Solaris 2 does not precede the asm names of C symbols with a `_'. */ #define NO_UNDERSCORES -#include +#include + +#define ENTRY(name) \ + .section ".text"; \ + .align 4; \ + .global C_SYMBOL_NAME(name); \ + .type C_SYMBOL_NAME(name), \#function; \ + C_LABEL(name) + +#define PSEUDO(name, syscall_name, args) \ + ENTRY (name) \ + mov SYS_ify(syscall_name), %g1; \ + ta 8; \ + bcs C_SYMBOL_NAME(syscall_error); \ + nop + +#define ret retl; nop +#define r0 %o0 +#define r1 %o1 +#define MOVE(x,y) mov x, y + diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/sysconfig.S glibc-1.07/sysdeps/unix/sysv/sysv4/sysconfig.S --- glibc-1.06/sysdeps/unix/sysv/sysv4/sysconfig.S +++ glibc-1.07/sysdeps/unix/sysv/sysv4/sysconfig.S Wed Sep 22 20:07:15 1993 @@ -0,0 +1,22 @@ +/* Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 + +SYSCALL__ (sysconfig, 1) + ret diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/sysconfig.h glibc-1.07/sysdeps/unix/sysv/sysv4/sysconfig.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/sysconfig.h Thu May 20 14:02:28 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/sysconfig.h Wed Sep 22 20:07:20 1993 @@ -1,6 +1,6 @@ /* `__sysconfig' NAME values. Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/time.S glibc-1.07/sysdeps/unix/sysv/sysv4/time.S --- glibc-1.06/sysdeps/unix/sysv/sysv4/time.S Wed Feb 24 17:40:44 1993 +++ glibc-1.07/sysdeps/unix/sysv/sysv4/time.S Wed Sep 22 20:08:14 1993 @@ -1,5 +1,5 @@ /* Copyright (C) 1993 Free Software Foundation, Inc. - Contributed by Brendan Kehoe (brendan@cygnus.com). + Contributed by Brendan Kehoe (brendan@zen.org). 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 diff -ruN glibc-1.06/sysdeps/unix/sysv/sysv4/waitflags.h glibc-1.07/sysdeps/unix/sysv/sysv4/waitflags.h --- glibc-1.06/sysdeps/unix/sysv/sysv4/waitflags.h +++ glibc-1.07/sysdeps/unix/sysv/sysv4/waitflags.h Sat Dec 18 01:37:56 1993 @@ -0,0 +1,34 @@ +/* Definitions of flag bits for `waitpid' et al. + Copyright (C) 1993 Free Software Foundation, Inc. + Contributed by Brendan Kehoe (brendan@zen.org). + +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 _WAITFLAGS_H + +#define _WAITFLAGS_H 1 + +/* Bits in the third argument to `waitpid'. */ +#define WNOHANG 64 /* Don't block waiting. */ +#define WUNTRACED 4 /* Report status of stopped children. */ + +#ifdef __USE_SVID +#define WEXITED 1 /* Look for children that have exited. */ +#define WTRAPPED 2 /* Look for processes that stopped + while tracing. */ +#endif + +#endif /* waitflags.h */ diff -ruN glibc-1.06/termios/TAGS glibc-1.07/termios/TAGS --- glibc-1.06/termios/TAGS Thu May 13 02:03:53 1993 +++ glibc-1.07/termios/TAGS Mon Aug 16 18:20:12 1993 @@ -143,6 +143,42 @@ #define _TERMIOS_H 25,935 #define tcgetattr(57,2080 +../sysdeps/generic/termbits.h,457 +typedef unsigned long int tcflag_t;27,1275 +typedef unsigned char cc_t;30,1347 +typedef long int speed_t;33,1413 +struct termios36,1475 +#define _IOT_termios 182,6819 +#define TCSANOW 186,7005 +#define TCSADRAIN 187,7051 +#define TCSAFLUSH 188,7117 +#define TCSASOFT 190,7198 +#define TCIFLUSH 194,7329 +#define TCOFLUSH 195,7395 +#define TCIOFLUSH 196,7460 +#define TCOOFF 199,7565 +#define TCOON 200,7606 +#define TCIOFF 201,7656 +#define TCION 202,7704 + +../sysdeps/unix/bsd/sun/sunos4/termbits.h,459 +typedef unsigned long int tcflag_t;21,923 +typedef unsigned char cc_t;24,995 +typedef unsigned int speed_t;27,1061 +struct termios30,1127 +#define _IOT_termios 191,6431 +#define TCSANOW 195,6617 +#define TCSADRAIN 196,6663 +#define TCSAFLUSH 197,6729 +#define TCSASOFT 199,6810 +#define TCIFLUSH 203,6941 +#define TCOFLUSH 204,7007 +#define TCIOFLUSH 205,7072 +#define TCOOFF 208,7177 +#define TCOON 209,7218 +#define TCIOFF 210,7268 +#define TCION 211,7316 + sys/ttydefaults.h,698 #define _TTYDEFAULTS_H_40,1953 #define TTYDEF_IFLAG 45,2014 diff -ruN glibc-1.06/time/Makefile glibc-1.07/time/Makefile --- glibc-1.06/time/Makefile Sat May 22 17:17:42 1993 +++ glibc-1.07/time/Makefile Mon Jan 10 15:03:06 1994 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994 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 @@ -23,7 +23,7 @@ headers := time.h sys/time.h distribute := tzfile.h private.h scheck.c ialloc.c emkdir.c yearistype -extra-objs = scheck.o ialloc.o emkdir.o zonenames $(tzfiles:%=zones-%) +extra-objs = scheck.o ialloc.o emkdir.o zonenames $(tzfiles:%=z.%) routines := offtime asctime clock ctime difftime gmtime \ localtime mktime strftime time __tzset tzfile \ @@ -34,10 +34,10 @@ aux := syms-time others := ap zdump zic -tests := test_time +tests := test_time clocktest tzfiles := africa antarctica asia australasia europe northamerica \ - southamerica etcetera factory systemv + southamerica etcetera factory systemv backward # pacificnew doesn't compile; if it is to be used, it should be included in # northamerica. distribute := $(distribute) $(tzfiles) leapseconds pacificnew @@ -53,14 +53,21 @@ endef include $(objpfx)zonenames -install-others = $(addprefix $(datadir)zoneinfo/,$(zonenames) \ - $(filter-out /%,$(localtime-file) \ - $(posixrules-file))) \ - $(filter /%,$(localtime-file) $(posixrules-file)) +# Make these absolute file names. +localtime-file := $(firstword $(filter /%,$(localtime-file)) \ + $(addprefix $(zonedir)/, \ + $(localtime-file))) +posixrules-file := $(firstword $(filter /%,$(posixrules-file)) \ + $(addprefix $(zonedir)/, \ + $(posixrules-file))) +install-others = $(addprefix $(zonedir)/,$(zonenames)) \ + $(localtime-file) $(posixrules-file) + include ../Rules -$(tzfiles:%=$(objpfx)zones-%): $(objpfx)zones-%: % Makefile + +$(tzfiles:%=$(objpfx)z.%): $(objpfx)z.%: % Makefile # Kludge alert: we use an implicit rule (in what we are generating here) # because that is the only way to tell Make that the one command builds all # the files. @@ -70,7 +77,7 @@ echo '$*-zones := $$(subst $$(nl), ,$$($*-zones))' ;\ echo 'ifdef $*-zones' ;\ echo '$$(addprefix $$(datadir)/zone%/,$$($*-zones)): \' ;\ - echo '$< $$(objpfx)zic leapseconds' ;\ + echo '$< $$(objpfx)zic leapseconds yearistype' ;\ echo ' $$(tzcompile)' ;\ echo 'endif' ;\ echo 'zonenames := $$(zonenames) $$($*-zones)' ;\ @@ -78,7 +85,7 @@ mv $@.new $@ $(objpfx)zonenames: Makefile (for file in $(tzfiles); do \ - echo "include \$$(objpfx)zones-$$file"; \ + echo "include \$$(objpfx)z.$$file"; \ done) > $@.new mv $@.new $@ @@ -87,18 +94,21 @@ @echo 'Known zones: $(zonenames)' -zic-cmd = $(dir $(word 2,$^))$(notdir $(word 2,$^)) +# Although $(zonedir) gets compiled into zic, it is useful to always +# specify it with -d on the command line so that it can be overridden on +# the command line of `make install' (e.g., "make install prefix=/foo"). +zic-cmd = $(dir $(word 2,$^))$(notdir $(word 2,$^)) -d $(zonedir) define tzcompile -$(zic-cmd) -d $(patsubst %/,%,$(word 4,$^)) -L $(word 3,$^) $< +$(zic-cmd) -L $(word 3,$^) -y $(dir $(word 4,$^))$(notdir $(word 4,$^)) $< endef ifdef localtime -$(datadir)/zoneinfo/localtime: $(datadir)/zoneinfo/$(localtime) $(objpfx)zic - $(zic-cmd) -d $(@D) -l $(change, saving YEAR in RULE->computed_for. @@ -385,7 +399,7 @@ register int i, d, m1, yy0, yy1, yy2, dow; /* First add SECSPERDAY for each day in months before M. */ - for (i = 0; i <= rule->m; ++i) + for (i = 0; i < rule->m - 1; ++i) t += __mon_lengths[__isleap (year)][i] * SECSPERDAY; /* Use Zeller's Congruence to get day-of-week of first day of month. */ @@ -443,13 +457,15 @@ __tzname[0] = (char *) tz_rules[0].name; __tzname[1] = (char *) tz_rules[1].name; - return 1; -} - + { + /* Keep __tzname_cur_max up to date. */ + size_t len0 = strlen (__tzname[0]); + size_t len1 = strlen (__tzname[1]); + if (len0 > __tzname_cur_max) + __tzname_cur_max = len0; + if (len1 > __tzname_cur_max) + __tzname_cur_max = len1; + } -long int -DEFUN_VOID (__tzname_max) -{ - size_t len0 = strlen (__tzname[0]), len1 = strlen (__tzname[1]); - return len0 > len1 ? len0 : len1; + return 1; } diff -ruN glibc-1.06/time/africa glibc-1.07/time/africa --- glibc-1.06/time/africa Tue Feb 2 14:53:32 1993 +++ glibc-1.07/time/africa Thu Dec 2 16:20:59 1993 @@ -1,5 +1,178 @@ -# @(#)africa 7.1 +# @(#)africa 7.4 +# 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 +# tz@elsie.nci.nih.gov for general use in the future). + +# From Paul Eggert (November 18, 1993): +# +# A good source for time zone historical data outside the U.S. is +# Thomas G. Shanks, The International Atlas (3rd edition), +# San Diego: ACS Publications, Inc. (1991). +# Except where otherwise noted, it is the source for the data below. +# +# I added so many Zone names that the old, mostly flat name space was unwieldy. +# So I renamed the Zones to have the form AREA/LOCATION, where +# AREA is the name of a continent or ocean, and +# LOCATION is the name of a specific location within that region. +# For example, the old zone name `Egypt' is now `Africa/Cairo'. +# +# Here are the general rules I used for choosing location names, +# in decreasing order of importance: +# +# Use only valid Posix file names. Use only Ascii letters, digits, `.', +# `-' and `_'. Do not exceed 14 characters or start with `-'. +# E.g. prefer `Brunei' to `Bandar_Seri_Begawan'. +# Include at least one location per time zone rule set per country. +# One such location is enough. +# If a name is ambiguous, use a less ambiguous alternative; +# e.g. many cities are named San Jose and Georgetown, so +# prefer `Costa_Rica' to `San_Jose' and `Guyana' to `Georgetown'. +# Keep locations compact. Use cities or small islands, not countries +# or regions, so that any future time zone changes do not split +# locations into different time zones. E.g. prefer `Paris' +# to `France', since France has had multiple time zones. +# Use traditional English spelling, e.g. prefer `Rome' to `Roma', and +# prefer `Athens' to the true name (which uses Greek letters). +# The Posix file name restrictions encourage this rule. +# Use the most populous among locations in a country's time zone, +# e.g. prefer `Shanghai' to `Beijing'. Among locations with +# similar populations, pick the best-known location, +# e.g. prefer `Rome' to `Milan'. +# Use the singular form, e.g. prefer `Canary' to `Canaries'. +# Omit common suffixes like `_Islands' and `_City', unless that +# would lead to ambiguity. E.g. prefer `Cayman' to +# `Cayman_Islands' and `Guatemala' to `Guatemala_City', +# but prefer `Mexico_City' to `Mexico' because the country +# of Mexico has several time zones. +# Use `_' to represent a space. +# Omit `.' from abbreviations in names, e.g. prefer `St_Helena' +# to `St._Helena'. +# +# I made up the following time zone abbreviations; corrections are welcome! +# LMT Local Mean Time +# -2:00 CVT Cape Verde Time (no longer used) +# -1:00 AAT Atlantic Africa Time +# 0:00 WAT West Africa Time +# 1:00 CAT Central Africa Time +# 2:00 SAT South Africa Time +# 3:00 EAT East Africa Time +# 4:00 SMT Seychelles and Mascarene Time +# The final `T' is replaced by `ST' for summer time, e.g. `SAST'. +# BEAT is British East Africa Time, which was 2:30 before 1948 and 2:45 after. + + +# Algeria +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Algeria 1911 only - Jan 1 0:00s 0 - +Rule Algeria 1916 only - Jun 14 23:00s 1:00 " DST" +Rule Algeria 1916 1919 - Oct Sun<=7 23:00s 0 - +Rule Algeria 1917 only - Mar 24 23:00s 1:00 " DST" +Rule Algeria 1918 only - Mar 9 23:00s 1:00 " DST" +Rule Algeria 1919 only - Mar 1 23:00s 1:00 " DST" +Rule Algeria 1920 only - Feb 14 23:00s 1:00 " DST" +Rule Algeria 1920 only - Oct 23 23:00s 0 - +Rule Algeria 1921 only - Mar 14 23:00s 1:00 " DST" +Rule Algeria 1921 only - Jun 21 23:00s 0 - +Rule Algeria 1939 only - Sep 11 23:00s 1:00 " DST" +Rule Algeria 1939 only - Nov 19 1:00 0 - +Rule Algeria 1944 1945 - Apr Mon<=7 2:00 1:00 " DST" +Rule Algeria 1944 only - Oct 8 2:00 0 - +Rule Algeria 1945 only - Sep 16 1:00 0 - +Rule Algeria 1971 only - Apr 25 23:00s 1:00 " DST" +Rule Algeria 1971 only - Sep 26 23:00s 0 - +Rule Algeria 1977 only - May 6 0:00 1:00 " DST" +Rule Algeria 1977 only - Oct 21 0:00 0 - +Rule Algeria 1978 only - Mar 24 1:00 1:00 " DST" +Rule Algeria 1978 only - Sep 22 3:00 0 - +Rule Algeria 1980 only - Apr 25 0:00 1:00 " DST" +Rule Algeria 1980 only - Oct 31 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01 + 0:09 - PMT 1911 Mar 11 # Paris Mean Time + 0:00 Algeria WET%s 1940 Feb 25 2:00 + 1:00 Algeria MET%s 1946 Oct 7 + 0:00 - WET 1956 Jan 29 + 1:00 - MET 1963 Apr 14 + 0:00 Algeria WET%s 1977 Oct 21 + 1:00 Algeria MET%s 1979 Oct 26 + 0:00 Algeria WET%s 1981 May + 1:00 - MET + +# Angola +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Luanda 0:52:56 - LMT 1892 + 0:52 - LMT 1911 May 26 # Luanda Mean Time + 1:00 - CAT + +# Benin +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Porto-Novo 0:10:28 - LMT 1912 + 0:00 - WAT 1934 Feb 26 + 1:00 - CAT + +# Botswana +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Gaborone 1:43:40 - LMT 1885 + 2:00 - SAT 1943 Sep 19 2:00 + 2:00 1:00 SAST 1944 Mar 19 2:00 + 2:00 - SAT + +# Burkina Faso +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Ouagadougou -0:06:04 - LMT 1912 + 0:00 - WAT + +# Burundi +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Bujumbura 1:57:28 - LMT 1890 + 2:00 - SAT + +# Cameroon +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Douala 0:38:48 - LMT 1912 + 1:00 - CAT + +# Cape Verde +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia + -2:00 - CVT 1942 Sep + -2:00 1:00 CVST 1945 Oct 15 + -2:00 - CVT 1975 Nov 25 2:00 + -1:00 - AAT + +# Central African Republic +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Bangui 1:14:20 - LMT 1912 + 1:00 - CAT + +# Chad +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Ndjamena 1:00:12 - LMT 1912 + 1:00 - CAT 1979 Oct 14 + 1:00 1:00 CAST 1980 Mar 8 + 1:00 - CAT + +# Comoros +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro + 3:00 - EAT + +# Congo +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Brazzaville 1:01:08 - LMT 1912 + 1:00 - CAT + +# Cote D'Ivoire +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Abidjan -0:16:08 - LMT 1912 + 0:00 - WAT + +# Djibouti +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Djibouti 2:52:36 - LMT 1911 Jul + 3:00 - EAT + ############################################################################### # Egypt @@ -15,14 +188,116 @@ # EGYPT 3 H AHEAD OF UTC MAY 17 - SEP 30 (AFTER # EGYPT RAMADAN) +# From Shanks (1991): # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Egypt 1960 max - May 1 2:00 1:00 " DST" -Rule Egypt 1960 max - Oct 1 2:00 0 - - -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Egypt 2:00 Egypt EET%s 1981 - 2:00 - EET 1983 - 2:00 Egypt EET%s +Rule Egypt 1900 only - Oct 1 0:00 0 - +Rule Egypt 1940 only - Jul 15 0:00 1:00 " DST" +Rule Egypt 1940 only - Oct 1 0:00 0 - +Rule Egypt 1941 only - Apr 15 0:00 1:00 " DST" +Rule Egypt 1941 only - Sep 16 0:00 0 - +Rule Egypt 1942 1944 - Apr 1 0:00 1:00 " DST" +Rule Egypt 1942 only - Oct 27 0:00 0 - +Rule Egypt 1943 1945 - Nov 1 0:00 0 - +Rule Egypt 1945 only - Apr 16 0:00 1:00 " DST" +Rule Egypt 1957 only - May 10 0:00 1:00 " DST" +Rule Egypt 1957 1958 - Oct 1 0:00 0 - +Rule Egypt 1958 only - May 1 0:00 1:00 " DST" +Rule Egypt 1959 1981 - May 1 1:00 1:00 " DST" +Rule Egypt 1959 1965 - Sep 30 3:00 0 - +Rule Egypt 1966 max - Oct 1 3:00 0 - +Rule Egypt 1982 only - Jul 25 1:00 1:00 " DST" +Rule Egypt 1983 only - Jul 12 1:00 1:00 " DST" +Rule Egypt 1984 1988 - May 1 1:00 1:00 " DST" +Rule Egypt 1989 only - May 6 1:00 1:00 " DST" +Rule Egypt 1990 max - May 1 1:00 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Cairo 2:05:00 - LMT 1900 Oct + 2:00 Egypt EET%s + +# Equatorial Guinea +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Malabo 0:35:08 - LMT 1912 + 0:00 - WAT 1963 Dec 15 + 1:00 - CAT + +# Eritrea +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Asmera 2:35:32 - LMT 1870 + 2:36 - AMT 1890 # Asmera Mean Time + 2:35 - AAMT 1936 May 5 # Addis Ababa MT + 3:00 - EAT + +# Ethiopia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Addis_Ababa 2:34:48 - LMT 1870 + 2:35 - AAMT 1936 May 5 # Addis Ababa MT + 3:00 - EAT + +# Gabon +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Libreville 0:37:48 - LMT 1912 + 1:00 - CAT + +# Gambia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Banjul -1:06:36 - LMT 1912 + -1:07 - BMT 1935 # Banjul Mean Time + -1:00 - AAT 1964 + 0:00 - WAT + +# Ghana +# From Paul Eggert (November 18, 1993): +# WATST is my invention for ``West Africa one-Third Daylight Time''. +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Ghana 1918 only - Jan 1 0:00 0 WAT +Rule Ghana 1936 1942 - Sep 1 0:00 0:20 WATDT +Rule Ghana 1936 1942 - Dec 31 0:00 0 WAT +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Accra -0:00:52 - LMT 1918 + 0:00 Ghana %s + +# Guinea +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Conakry -0:54:52 - LMT 1912 + 0:00 - WAT 1934 Feb 26 + 1:00 - CAT 1960 + 0:00 - WAT + +# Guinea-Bissau +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Bissau -1:02:20 - LMT 1911 May 26 + 1:00 - CAT 1975 + 0:00 - WAT + +# Kenya +# From Paul Eggert (November 18, 1993): +# Shanks says the transition to 2:45 was in 1940, but it must have been 1948. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul + 3:00 - EAT 1930 + 2:30 - BEAT 1948 + 2:45 - BEAT 1960 + 3:00 - EAT + +# Lesotho +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Maseru 1:50:00 - LMT 1903 Mar + 2:00 - SAT 1943 Sep 19 2:00 + 2:00 1:00 SAST 1944 Mar 19 2:00 + 2:00 - SAT + +# Liberia +# From Paul Eggert (November 18, 1993): +# In 1972 Liberia was the last country to switch +# from a GMT offset that was not a multiple of 15 minutes. +# Time magazine reported that it was in honor of their leader's birthday. +# From Shanks (1991): +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Monrovia -0:43:08 - LMT 1882 + -0:43:08 - MMT 1919 Mar # Monrovia Mean Time + -0:44 - MMT 1972 May + 0:00 - WAT ############################################################################### @@ -35,9 +310,275 @@ # LIBYAN ARAB 1 H AHEAD OF UTC JAMAHIRIYA/LIBYA # LIBYAN ARAB 2 H AHEAD OF UTC APR 1 - SEP 30 JAMAHIRIYA/LIBYA +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Libya 1920 only - Jan 1 0:00 0 - +Rule Libya 1951 only - Oct 14 2:00 1:00 " DST" +Rule Libya 1952 only - Jan 1 0:00 0 - +Rule Libya 1953 only - Oct 9 2:00 1:00 " DST" +Rule Libya 1954 only - Jan 1 0:00 0 - +Rule Libya 1955 only - Sep 30 0:00 1:00 " DST" +Rule Libya 1956 only - Jan 1 0:00 0 - +Rule Libya 1982 1984 - Apr 1 0:00 1:00 " DST" +Rule Libya 1982 1985 - Oct 1 0:00 0 - +Rule Libya 1985 only - Apr 6 0:00 1:00 " DST" +Rule Libya 1986 only - Apr 4 0:00 1:00 " DST" +Rule Libya 1986 only - Oct 3 0:00 0 - +Rule Libya 1987 1989 - Apr 1 0:00 1:00 " DST" +Rule Libya 1987 1990 - Oct 1 0:00 0 - +Rule Libya 1990 only - May 4 0:00 1:00 " DST" +# From Paul Eggert (November 18, 1993): +# Here's a guess for years starting with 1991. +Rule Libya 1991 max - Apr 1 0:00 1:00 " DST" +Rule Libya 1991 max - Oct 1 0:00 0 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Tripoli 0:52:44 - LMT 1920 + 1:00 Libya MET%s 1959 + 2:00 - EET 1982 + 1:00 Libya MET%s + +# Madagascar +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul + 3:00 - EAT 1954 Feb 27 23:00s + 3:00 1:00 EAST 1954 May 29 23:00s + 3:00 - EAT + +# Malawi +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Blantyre 2:20:00 - LMT 1903 Mar + 2:00 - SAT + +# Mali +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Bamako -0:32:00 - LMT 1912 + 0:00 - WAT 1934 Feb 26 + -1:00 - AAT 1960 Jun 20 + 0:00 - WAT +# no longer different from Bamako, but too famous to omit +Zone Africa/Timbuktu -0:12:04 - LMT 1912 + 0:00 - WAT + +# Mauritania +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Nouakchott -1:03:48 - LMT 1912 + 0:00 - WAT 1934 Feb 26 + -1:00 - AAT 1960 Jun 20 + 0:00 - WAT + +# Mauritius +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis + 4:00 - SMT +# Agalega Is, Rodriguez +# no information; probably like Indian/Mauritius + +# Mayotte +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Mayotte 3:01:08 - LMT 1911 Jul # Dzaoudzi + 3:00 - EAT + +# Morocco # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Libya 1982 max - Apr 1 2:00 1:00 " DST" -Rule Libya 1982 max - Sep 30 2:00 0 - +Rule Morocco 1913 only - Oct 26 0:00 0 - +Rule Morocco 1939 only - Sep 12 0:00 1:00 " DST" +Rule Morocco 1939 only - Nov 19 0:00 0 - +Rule Morocco 1940 only - Feb 25 0:00 1:00 " DST" +Rule Morocco 1945 only - Nov 18 0:00 0 - +Rule Morocco 1950 only - Jun 11 0:00 1:00 " DST" +Rule Morocco 1950 only - Oct 29 0:00 0 - +Rule Morocco 1967 only - Jun 3 12:00 1:00 " DST" +Rule Morocco 1967 only - Oct 1 0:00 0 - +Rule Morocco 1974 only - Jun 24 0:00 1:00 " DST" +Rule Morocco 1974 only - Sep 1 0:00 0 - +Rule Morocco 1976 1977 - May 1 0:00 1:00 " DST" +Rule Morocco 1976 only - Aug 1 0:00 0 - +Rule Morocco 1977 only - Sep 28 0:00 0 - +Rule Morocco 1978 only - Jun 1 0:00 1:00 " DST" +Rule Morocco 1978 only - Aug 4 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 + 0:00 Morocco WET%s 1984 Mar 16 + 1:00 - MET 1986 + 0:00 - WET +# The following are controlled by Spain, and are like Europe/Madrid: +# Alboran, Alhucemas Is, Ceuta, Chafarinas Is, Mellila. + +# Mozambique +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Maputo 2:10:20 - LMT 1903 Mar + 2:00 - SAT + +# Namibia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 + 1:30 - SWAT 1903 Mar # SW Africa Time + 2:00 - SAT 1942 Sep 20 2:00 + 2:00 1:00 SAST 1943 Mar 21 2:00 + 2:00 - SAT + +# Niger +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Niamey 0:08:28 - LMT 1912 + 1:00 - CAT 1934 Feb 26 + 0:00 - WAT 1960 + 1:00 - CAT + +# Nigeria +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Lagos 0:13:36 - LMT 1919 Sep + 1:00 - CAT + +# Reunion +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # St Denis + 4:00 - SMT + +# Rwanda +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Kigali 2:00:16 - LMT 1935 Jun + 2:00 - SAT + +# St Helena +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/St_Helena -0:22:48 - LMT 1890 # Jamestown + -0:06 - ?MT 1951 # a typo in Shanks? + 0:00 - GMT +# Ascension, Gough, Inaccessible, Nightingale, Tristan da Cunha +# no information; probably like Atlantic/St_Helena + +# Sao Tome and Principe +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Sao_Tome 0:26:56 - LMT 1884 + -0:37 - ?MT 1912 # a typo in Shanks? + 0:00 - WAT + +# Senegal +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Dakar -1:09:44 - LMT 1912 + -1:00 - AAT 1941 Jun + 0:00 - WAT + +# Seychelles +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria + 4:00 - SMT -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Libya 2:00 Libya EET%s +# Sierra Leone +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule SL 1913 only - Oct 26 0:00 0 - +Rule SL 1935 1942 - Jun 1 0:00 1:00 S +Rule SL 1935 1942 - Oct 1 0:00 0 - +Rule SL 1957 1962 - Jun 1 0:00 1:00 S +Rule SL 1957 1962 - Sep 1 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Freetown -0:53:00 - LMT 1882 + -0:53 - FMT 1913 Jun + -1:00 SL AA%sT 1957 + 0:00 SL WA%sT + +# Somalia +# From Paul Eggert (November 18, 1993): +# Shanks omits the 1948 transition to 2:45; this is probably a typo. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Mogadishu 3:01:28 - LMT 1893 Nov + 3:00 - EAT 1931 + 2:30 - BEAT 1948 + 2:45 - BEAT 1957 # not in Shanks + 3:00 - EAT + +# South Africa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule SA 1892 only - Feb 8 0:00 0 - +Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 S +Rule SA 1943 1944 - Mar Sun>=15 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 + 1:30 - SAT 1903 Mar + 2:00 SA SA%sT +# Prince Edward Is +# no information + +# Sudan +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Sudan 1931 only - Feb 8 0:00 0 - +Rule Sudan 1970 only - May 1 0:00 1:00 " DST" +Rule Sudan 1970 max - Oct 15 0:00 0 - +Rule Sudan 1971 only - Apr 30 0:00 1:00 " DST" +Rule Sudan 1972 max - Apr lastSun 0:00 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Khartoum 2:10:08 - LMT 1931 + 2:00 Sudan EET%s + +# Swaziland +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar + 2:00 - SAT + +# Tanzania +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 + 3:00 - EAT 1948 + 2:45 - BEAT 1961 + 3:00 - EAT + +# Togo +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Lome 0:04:52 - LMT 1893 + 0:00 - WAT + +# Tunisia +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Tunisia 1911 only - Mar 9 0:00 0 - +Rule Tunisia 1939 only - Apr 15 23:00s 1:00 " DST" +Rule Tunisia 1939 only - Nov 18 23:00s 0 - +Rule Tunisia 1940 only - Feb 25 23:00s 1:00 " DST" +Rule Tunisia 1941 only - Oct 6 0:00 0 - +Rule Tunisia 1942 only - Mar 9 0:00 1:00 " DST" +Rule Tunisia 1942 only - Nov 2 3:00 0 - +Rule Tunisia 1943 only - Mar 29 2:00 1:00 " DST" +Rule Tunisia 1943 only - Apr 17 2:00 0 - +Rule Tunisia 1943 only - Apr 25 2:00 1:00 " DST" +Rule Tunisia 1943 only - Oct 4 2:00 0 - +Rule Tunisia 1944 1945 - Apr Mon>=1 2:00 1:00 " DST" +Rule Tunisia 1944 only - Oct 8 0:00 0 - +Rule Tunisia 1945 only - Sep 16 0:00 0 - +Rule Tunisia 1977 only - Apr 30 0:00s 1:00 " DST" +Rule Tunisia 1977 only - Sep 24 0:00s 0 - +Rule Tunisia 1978 only - May 1 0:00s 1:00 " DST" +Rule Tunisia 1978 only - Oct 1 0:00s 0 - +Rule Tunisia 1988 only - Jun 1 0:00s 1:00 " DST" +Rule Tunisia 1988 max - Sep lastSun 0:00s 0 - +Rule Tunisia 1989 only - Mar 26 0:00s 1:00 " DST" +Rule Tunisia 1990 only - May 1 0:00s 1:00 " DST" +Rule Tunisia 1991 max - Mar lastSun 0:00s 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 + 0:09 - PMT 1911 Mar 9 # Paris Mean Time + 1:00 Tunisia MET%s + +# Uganda +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Kampala 2:09:40 - LMT 1928 Jul + 3:00 - EAT 1930 + 2:30 - BEAT 1948 + 2:45 - BEAT 1957 + 3:00 - EAT + +# Zaire +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Kinshasa 1:01:12 - LMT 1897 Nov 9 + 1:00 - CAT +Zone Africa/Lumumbashi 1:49:52 - LMT 1897 Nov 9 + 2:00 - SAT + +# Zambia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Lusaka 1:53:08 - LMT 1903 Mar + 2:00 - SAT + +# Zimbabwe +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Africa/Harare 2:04:12 - LMT 1903 Mar + 2:00 - SAT diff -ruN glibc-1.06/time/antarctica glibc-1.07/time/antarctica --- glibc-1.06/time/antarctica Tue Feb 2 14:53:33 1993 +++ glibc-1.07/time/antarctica Thu Dec 2 16:20:59 1993 @@ -1,4 +1,19 @@ -# @(#)antarctica 7.1 +# @(#)antarctica 7.2 # From Arthur David Olson (February 13, 1988): # No data available. + +# Balleny Is + +# British Antarctic Territories include +# South Orkney Is +# South Shetland Is + +# Amsterdam Island +# Bouvet +# Crozet Is +# Heard and McDonald Is +# Kerguelen Is +# St Paul Island +# Peter I Island +# Scott Island diff -ruN glibc-1.06/time/asia glibc-1.07/time/asia --- glibc-1.06/time/asia Tue Feb 2 14:53:58 1993 +++ glibc-1.07/time/asia Thu Dec 2 16:20:59 1993 @@ -1,5 +1,53 @@ -# @(#)asia 7.3 +# @(#)asia 7.8 +# 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 +# tz@elsie.nci.nih.gov for general use in the future). + +# From Paul Eggert (November 18, 1993): +# +# A good source for time zone historical data outside the U.S. is +# Thomas G. Shanks, The International Atlas (3rd edition), +# San Diego: ACS Publications, Inc. (1991). +# Except where otherwise noted, it is the source for the data below. +# +# I invented the abbreviations marked `*' in the following table; +# the rest are from earlier versions of this file, or from other sources. +# Corrections are welcome! +# std dst +# LMT Local Mean Time +# LST Local Star Time (Russian ``mestnoe zvezdnoe vremya'') +# 2:00 EET EET DST Eastern European Time +# 2:00 IST IDT Israel +# 3:00 AST ADT Arabia* +# 3:00 MSK MSD Moscow +# 3:30 IST IDT Iran +# 4:00 BSK BSD Baku* +# 4:00 GST GDT Gulf* +# 4:30 AFT Afghanistan* +# 5:00 TSK TSD Tashkent* +# 5:00 PKT Pakistan* +# 5:30 IST IST India +# 5:45 NPT Nepal* +# 6:00 BGT Bengal, Bangladesh* +# 6:30 BMT Burma* +# 7:00 ICT Indochina* +# 7:00 JVT Java* +# 8:00 BNT Borneo, Brunei* +# 8:00 CST CDT China +# 8:00 HKT HKST Hong Kong +# 8:00 PST PDT Phillippines* +# 8:00 SGT Singapore +# 8:00 UST UDT Ulan Bator* +# 9:00 JST Japan +# 9:00 KST KDT Korea +# 9:00 MLT Moluccas* +# 9:30 CST Australian Central Standard Time +# +# See the `europe' file for Russia in Asia. +# +# See the `africa' file for Zone naming conventions. + # From Guy Harris: # Incorporates data for Singapore from Robert Elz' asia 1.1, as well as # additional information from Tom Yap, Sun Microsystems Intercontinental @@ -8,6 +56,80 @@ ############################################################################### +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Russia 1981 1984 - Apr 1 0:00 1:00 D +Rule Russia 1981 1983 - Oct 1 0:00 0 K +Rule Russia 1984 1990 - Sep lastSun 3:00 0 K +Rule Russia 1985 1990 - Mar lastSun 2:00 1:00 D +Rule Russia 1992 max - Sep lastSun 2:00s 0 K +Rule Russia 1992 max - Mar lastSun 2:00s 1:00 D + +# Afghanistan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kabul 4:36:48 - LMT 1890 + 4:00 - GST 1945 + 4:30 - AFT + +# Armenia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 + 3:00 - MSK 1957 Mar + 4:00 Russia BS%s 1991 Sep 29 3:00 + 3:00 Russia MS%s + +# Azerbaijan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Baku 3:19:24 - LMT 1924 May 2 + 3:00 - MSK 1957 Mar + 4:00 Russia BS%s 1991 Sep 29 3:00 + 3:00 Russia MS%s + +# Bahrain +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Bahrain 3:22:20 - LMT 1920 # Al-Manamah + 4:00 - GST 1972 Jun + 3:00 - AST + +# Bangladesh +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Dacca 6:01:40 - LMT 1890 + 5:53 - CMT 1941 Oct # Calcutta Mean Time + 6:30 - BMT 1942 May 15 + 5:30 - IST 1942 Sep + 6:30 - BMT 1951 Sep 30 + 6:00 - BGT + +# Bhutan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Thimbu 5:58:36 - LMT 1947 Aug 15 + 5:30 - IST 1987 Oct + 6:00 - BGT + +# British Indian Ocean Territory (Chagos Archipelago, Diego Garcia) +# no information + +# Brunei +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan + 7:30 - BNT 1933 + 8:00 - BNT + +# Burma +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Rangoon 6:24:40 - LMT 1880 + 6:25 - RMT 1920 + 6:30 - BMT 1942 May + 9:00 - JST 1945 May 3 + 6:30 - BMT + +# Cambodia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jun 9 + 7:06 - SMT 1911 Mar 11 0:01 # Saigon MT + 7:00 - ICT 1912 May + 8:00 - ICT 1931 May + 7:00 - ICT + # People's Republic of China # From Guy Harris: @@ -27,39 +149,169 @@ # 1986 May 4 - Sept 14 # 1987 mid-April - ?? +# From Paul Eggert (November 18, 1993): +# According to Shanks, China started using DST in 1986, +# but it's still all one big happy time zone. + # From U. S. Naval Observatory (January 19, 1989): # CHINA 8 H AHEAD OF UTC ALL OF CHINA, INCL TAIWAN # CHINA 9 H AHEAD OF UTC APR 17 - SEP 10 -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule PRC 1970 max - Apr Sun<=14 2:00 1:00 D -Rule PRC 1970 max - Sep Sun<=14 3:00 0 S +# From Paul Eggert (November 18, 1993): +# Shanks writes that China switched from the Chinese calendar on 1912 Feb 12. +# He also writes that China has had a single time zone since 1980 May 1, +# and that they instituted DST on 1986 May 4; this contradicts Devine's +# note about Time magazine, though apparently _something_ happened in 1986. -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone PRC 8:00 PRC C%sT +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Shang 1928 only - Jan 1 0:00 0 S +Rule Shang 1940 only - Jun 3 0:00 1:00 D +Rule Shang 1940 1941 - Oct 1 0:00 0 S +Rule Shang 1941 only - Mar 16 0:00 1:00 D +Rule PRC 1949 only - Jan 1 0:00 0 S +Rule PRC 1986 only - May 4 0:00 1:00 D +Rule PRC 1986 max - Sep Sun>=11 0:00 0 S +Rule PRC 1987 max - Apr Sun>=10 0:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Shanghai 8:05:52 - LMT 1928 + 8:00 Shang C%sT 1949 + 8:00 PRC C%sT ############################################################################### # Republic of China -# From Guy Harris - -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone ROC 8:00 - CST +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Taiwan 1896 only - Jan 1 0:00 0 S +Rule Taiwan 1945 1951 - May 1 0:00 1:00 D +Rule Taiwan 1945 1951 - Oct 1 0:00 0 S +Rule Taiwan 1952 only - Mar 1 0:00 1:00 D +Rule Taiwan 1952 1954 - Nov 1 0:00 0 S +Rule Taiwan 1953 1959 - Apr 1 0:00 1:00 D +Rule Taiwan 1955 1961 - Oct 1 0:00 0 S +Rule Taiwan 1960 1961 - Jun 1 0:00 1:00 D +Rule Taiwan 1974 1975 - Apr 1 0:00 1:00 D +Rule Taiwan 1974 1975 - Oct 1 0:00 0 S +Rule Taiwan 1980 only - Jun 30 0:00 1:00 D +Rule Taiwan 1980 only - Sep 30 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Taipei 8:06:00 - LMT 1896 + 8:00 Taiwan C%sT ############################################################################### - -# Hongkong - -# From Guy Harris +# Hong Kong +# Presumably Hong Kong will have DST again when it merges with China, +# but it's too early to predict the details. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule HK 1904 only - Oct 30 0:00 0 - +Rule HK 1946 only - Apr 20 3:30 1:00 S +Rule HK 1946 only - Dec 1 3:30 0 - +Rule HK 1947 only - Apr 13 3:30 1:00 S +Rule HK 1947 only - Dec 30 3:30 0 - +Rule HK 1948 only - May 2 3:30 1:00 S +Rule HK 1948 1952 - Oct lastSun 3:30 0 - +Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S +Rule HK 1953 only - Nov 1 3:30 0 - +Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S +Rule HK 1954 only - Oct 31 3:30 0 - +Rule HK 1955 1964 - Nov Sun>=1 3:30 0 - +Rule HK 1965 1977 - Apr Sun>=16 3:30 1:00 S +Rule HK 1965 1977 - Oct Sun>=16 3:30 0 - +Rule HK 1979 1980 - May Sun>=8 3:30 1:00 S +Rule HK 1979 1980 - Oct Sun>=16 3:30 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Hong_Kong 7:36:36 - LMT 1904 Oct 30 + 8:00 HK HK%sT + +# Macao +# Presumably Macao will have DST again when it merges with China, +# but it's too early to predict the details. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Macao 1912 only - Jan 1 0:00 0 S +Rule Macao 1961 1962 - Mar Sun>=16 3:30 1:00 D +Rule Macao 1961 1964 - Nov Sun>=1 3:30 0 S +Rule Macao 1963 only - Mar Sun>=16 0:00 1:00 D +Rule Macao 1964 only - Mar Sun>=16 3:30 1:00 D +Rule Macao 1965 only - Mar Sun>=16 0:00 1:00 D +Rule Macao 1965 only - Oct 31 0:00 0 S +Rule Macao 1966 1971 - Apr Sun>=16 3:30 1:00 D +Rule Macao 1966 1971 - Oct Sun>=16 3:30 0 S +Rule Macao 1972 1974 - Apr Sun>=15 0:00 1:00 D +Rule Macao 1972 1973 - Oct Sun>=15 0:00 0 S +Rule Macao 1974 1977 - Oct Sun>=15 3:30 0 S +Rule Macao 1975 1977 - Apr Sun>=15 3:30 1:00 D +Rule Macao 1978 1980 - Apr Sun>=15 0:00 1:00 D +Rule Macao 1978 1980 - Oct Sun>=15 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Macao 7:34:20 - LMT 1912 + 8:00 Macao C%sT -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Hongkong 8:00 - HKT ############################################################################### +# Cyprus +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cyprus 1921 only - Nov 14 0:00 0 - +Rule Cyprus 1975 only - Apr 13 0:00 1:00 " DST" +Rule Cyprus 1975 only - Oct 12 0:00 0 - +Rule Cyprus 1976 only - May 15 0:00 1:00 " DST" +Rule Cyprus 1976 only - Oct 11 0:00 0 - +Rule Cyprus 1977 1980 - Apr Sun>=1 0:00 1:00 " DST" +Rule Cyprus 1977 only - Sep 25 0:00 0 - +Rule Cyprus 1978 only - Oct 2 0:00 0 - +Rule Cyprus 1979 max - Sep lastSun 0:00 0 - +Rule Cyprus 1981 max - Mar lastSun 0:00 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14 + 2:00 Cyprus EET%s + +# Georgia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tbilisi 2:59:16 - LMT 1880 + 2:59 - LST 1924 May 2 + 3:00 - MSK 1957 Mar + 4:00 Russia BS%s 1991 Sep 29 3:00 + 3:00 Russia MS%s + +# India +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Calcutta 5:53:28 - LMT 1880 + 5:53 - CMT 1941 Oct # Calcutta Mean Time + 6:30 - BMT 1942 May 15 + 5:30 - IST 1942 Sep + 5:30 1:00 IST 1945 Oct 15 + 5:30 - IST +# The following are like India/Calcutta: +# Andaman Is +# Lakshadweep (Laccadive, Minicoy and Amindivi Is) +# Nicobar Is + +# Indonesia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 + 7:07 - JMT 1924 Jan 1 0:13 + 7:20 - JVT 1932 Nov + 7:30 - JVT 1942 Mar 23 + 9:00 - JST 1945 Aug + 7:30 - JVT 1948 May + 8:00 - JVT 1950 May + 7:30 - JVT 1964 + 7:00 - JVT +Zone Asia/Ujung_Pandang 7:57:36 - LMT 1920 + 7:58 - MMT 1932 Nov # Macassar Mean Time + 8:00 - BNT 1942 Feb 9 + 9:00 - JST 1945 Aug + 8:00 - BNT +Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov + 9:00 - MLT 1944 + 9:30 - CST 1964 + 9:00 - MLT + # Iran +# Shanks has no record of DST after 1980. + # From Bob Devine (January 28, 1988): # Iran: Last Sunday in March to third (?) Sunday in # September. Since the revolution, the official calendar is Monarchic @@ -68,12 +320,36 @@ # From U. S. Naval Observatory (January 19, 1989): # IRAN 3.5H AHEAD OF UTC +# From Shanks (1991), with corrections from Devine: # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Iran 1977 only - Nov 1 0:00 0 S +Rule Iran 1978 1980 - Mar 21 0:00 1:00 D +Rule Iran 1978 only - Oct 21 0:00 0 S +Rule Iran 1979 only - Sep 19 0:00 0 S +Rule Iran 1980 only - Sep 23 0:00 0 S Rule Iran 1988 max - Mar lastSun 2:00 1:00 D Rule Iran 1988 max - Sep Sun>=15 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tehran 3:25:44 - LMT 1916 + 3:26 - TMT 1946 + 3:30 - IST 1977 Nov + 4:00 Iran G%sT 1979 + 3:30 Iran I%sT -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Iran 3:30 Iran I%sT +# Iraq +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Iraq 1982 only - May 1 0:00 1:00 D +Rule Iraq 1982 1984 - Oct 1 0:00 0 S +Rule Iraq 1983 only - Mar 31 0:00 1:00 D +Rule Iraq 1984 1985 - Apr 1 0:00 1:00 D +Rule Iraq 1985 max - Sep lastSun 1:00s 0 S +Rule Iraq 1986 max - Mar lastSun 1:00s 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Baghdad 2:57:40 - LMT 1890 + 2:58 - BMT 1918 # Baghdad Mean Time + 3:00 - AST 1982 May + 3:00 Iraq A%sT + ############################################################################### @@ -83,157 +359,164 @@ # ISRAEL 2 H AHEAD OF UTC # ISRAEL 3 H AHEAD OF UTC APR 10 - SEP 3 -# From Ephraim Silverberg (April 18, 1989): -# -# Prior to 1989, the rules concerning Daylight Savings Time changed every -# year; as information, regarding exact times and dates during this period, -# is not readily available at the present time, the rules commence starting -# with the year 1989. -# -# From 1989 onwards the rules are as follows: -# -# 1. Daylight Savings Time commences midnight of the first Saturday night -# following the seven-day festival of Pesach (Passover). The transition -# is from midnight Israel Standard Time to 1 a.m. Israel Daylight Savings -# time. As the Pesach festival is dependent on the Lunar calendar (the -# first day is always on the 15th day of the month of Nisan), the rule -# changes every year on the Gregorian calendar. +# From Paul Eggert (November 18, 1993): # -# 2. Standard Time is reinstated on the Saturday night whereupon Jews -# following the Ashkenazi (European) rite begin to recite the Selichot -# (forgiveness) prayers prior to the Jewish Lunar New Year. The transition -# is from midnight Israel Daylight Savings time to 11 p.m. Israel Standard -# Time. The law (according to the Ashkenazi custom) concerning the -# commencement of the Selichot prayers is described in chapter 128, section -# 5 of the "Code of Jewish Law," by Rabbi Shlomo Ganzfried (translated by -# Hyman E. Goldin): -# -# Beginning with the Sunday [**] before Rosh Hashanah [***], -# we rise early for the service of Selichot (supplications for -# forgiveness). If Rosh Hashanah occurs on Monday or Tuesday, we -# begin saying the Selichot from the Sunday of the preceding week. -# -# This, too, varies from year to year on the Gregorian calendar and, thus, -# two explicit timezone rules are required for each Gregorian year. -# -# [**] actually Saturday night as the Jewish day commences at nightfall. -# [***] the Jewish Lunar New Year. +# Shanks gives the following rules for Jerusalem from 1918 through 1991. +# After 1989 Shanks often disagrees with Silverberg; we go with Silverberg. +# From Shanks (1991): # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 1918 only - Jan 1 0:00 0 S +Rule Zion 1940 only - Jun 1 0:00 1:00 D +Rule Zion 1942 1944 - Nov 1 0:00 0 S +Rule Zion 1943 only - Apr 1 2:00 1:00 D +Rule Zion 1944 only - Apr 1 0:00 1:00 D +Rule Zion 1945 only - Apr 16 0:00 1:00 D +Rule Zion 1945 only - Nov 1 2:00 0 S +Rule Zion 1946 only - Apr 16 2:00 1:00 D +Rule Zion 1946 only - Nov 1 0:00 0 S +Rule Zion 1948 only - May 23 0:00 2:00 DD +Rule Zion 1948 only - Sep 1 0:00 1:00 D +Rule Zion 1948 1949 - Nov 1 2:00 0 S +Rule Zion 1949 only - May 1 0:00 1:00 D +Rule Zion 1950 only - Apr 16 0:00 1:00 D +Rule Zion 1950 only - Sep 15 3:00 0 S +Rule Zion 1951 only - Apr 1 0:00 1:00 D +Rule Zion 1951 only - Nov 11 3:00 0 S +Rule Zion 1952 only - Apr 20 2:00 1:00 D +Rule Zion 1952 only - Oct 19 3:00 0 S +Rule Zion 1953 only - Apr 12 2:00 1:00 D +Rule Zion 1953 only - Sep 13 3:00 0 S +Rule Zion 1954 only - Jun 13 0:00 1:00 D +Rule Zion 1954 only - Sep 12 0:00 0 S +Rule Zion 1955 only - Jun 11 2:00 1:00 D +Rule Zion 1955 only - Sep 11 0:00 0 S +Rule Zion 1956 only - Jun 3 0:00 1:00 D +Rule Zion 1956 only - Sep 30 3:00 0 S +Rule Zion 1957 only - Apr 29 2:00 1:00 D +Rule Zion 1957 only - Sep 22 0:00 0 S +Rule Zion 1974 only - Jul 7 0:00 1:00 D +Rule Zion 1974 only - Oct 13 0:00 0 S +Rule Zion 1975 only - Apr 20 0:00 1:00 D +Rule Zion 1975 only - Aug 31 0:00 0 S +Rule Zion 1985 only - Apr 14 0:00 1:00 D +Rule Zion 1985 only - Sep 15 0:00 0 S +Rule Zion 1986 only - May 18 0:00 1:00 D +Rule Zion 1986 only - Sep 7 0:00 0 S +Rule Zion 1987 only - Apr 15 0:00 1:00 D +Rule Zion 1987 only - Sep 13 0:00 0 S +Rule Zion 1988 only - Apr 9 0:00 1:00 D +Rule Zion 1988 only - Sep 3 0:00 0 S +#Rule Zion 1989 only - Apr 29 0:00 1:00 D +#Rule Zion 1989 only - Sep 2 0:00 0 S +#Rule Zion 1990 only - Mar 25 0:00 1:00 D +#Rule Zion 1990 only - Aug 26 0:00 0 S +#Rule Zion 1991 only - Mar 10 0:00 1:00 D +#Rule Zion 1991 only - Sep 1 0:00 0 S + +# From Ephraim Silverberg (September 5, 1993): +# +# According to the Office of the Secretary General of the Ministry of +# Interior, there is NO set rule for Daylight-Savings/Standard time changes. +# Each year they decide anew what havoc to wreak on the country. However, +# there is a "supposed" set of rules which is subject to change depending +# on the party the Minister of Interior, the size of the coalition +# government, the phase of the moon and the direction of the wind. Hence, +# changes may need to be made on a semi-annual basis. One thing is entrenched +# in law, however: that there must be at least 150 days on daylight savings +# time annually. + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Zion 1989 only - Apr 30 0:00 1:00 D -Rule Zion 1989 only - Sep 24 0:00 0:00 S -Rule Zion 1990 only - Apr 22 0:00 1:00 D -Rule Zion 1990 only - Sep 16 0:00 0:00 S -Rule Zion 1991 only - Apr 7 0:00 1:00 D +Rule Zion 1989 only - Sep 3 0:00 0:00 S +Rule Zion 1990 only - Mar 25 0:00 1:00 D +Rule Zion 1990 only - Aug 26 0:00 0:00 S +Rule Zion 1991 only - Mar 24 0:00 1:00 D Rule Zion 1991 only - Sep 1 0:00 0:00 S -Rule Zion 1992 only - Apr 26 0:00 1:00 D -Rule Zion 1992 only - Sep 20 0:00 0:00 S -Rule Zion 1993 only - Apr 18 0:00 1:00 D -Rule Zion 1993 only - Sep 12 0:00 0:00 S -Rule Zion 1994 only - Apr 3 0:00 1:00 D -Rule Zion 1994 only - Aug 28 0:00 0:00 S -Rule Zion 1995 only - Apr 23 0:00 1:00 D -Rule Zion 1995 only - Sep 17 0:00 0:00 S -Rule Zion 1996 only - Apr 14 0:00 1:00 D -Rule Zion 1996 only - Sep 8 0:00 0:00 S -Rule Zion 1997 only - May 4 0:00 1:00 D -Rule Zion 1997 only - Sep 28 0:00 0:00 S -Rule Zion 1998 only - Apr 19 0:00 1:00 D -Rule Zion 1998 only - Sep 13 0:00 0:00 S -Rule Zion 1999 only - Apr 11 0:00 1:00 D -Rule Zion 1999 only - Sep 5 0:00 0:00 S -Rule Zion 2000 only - Apr 30 0:00 1:00 D -Rule Zion 2000 only - Sep 24 0:00 0:00 S -Rule Zion 2001 only - Apr 15 0:00 1:00 D -Rule Zion 2001 only - Sep 9 0:00 0:00 S -Rule Zion 2002 only - Apr 7 0:00 1:00 D -Rule Zion 2002 only - Sep 1 0:00 0:00 S -Rule Zion 2003 only - Apr 27 0:00 1:00 D -Rule Zion 2003 only - Sep 21 0:00 0:00 S -Rule Zion 2004 only - Apr 18 0:00 1:00 D -Rule Zion 2004 only - Sep 12 0:00 0:00 S -Rule Zion 2005 only - May 1 0:00 1:00 D -Rule Zion 2005 only - Sep 25 0:00 0:00 S -Rule Zion 2006 only - Apr 23 0:00 1:00 D -Rule Zion 2006 only - Sep 17 0:00 0:00 S -Rule Zion 2007 only - Apr 15 0:00 1:00 D -Rule Zion 2007 only - Sep 9 0:00 0:00 S -Rule Zion 2008 only - Apr 27 0:00 1:00 D -Rule Zion 2008 only - Sep 21 0:00 0:00 S -Rule Zion 2009 only - Apr 19 0:00 1:00 D -Rule Zion 2009 only - Sep 13 0:00 0:00 S - -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Israel 2:00 Zion I%sT - -# The following is a chart of the day of the week and Gregorian date of -# the first day of Pesach and the first day of Rosh Hashanah for the years -# 1989 through 2009 inclusive. -# -# First Day of Passover -# --------------------- -# Gregorian Year Day of Week Month Day -# -------------- ----------- ----- --- -# 1989 Thursday April 20 -# 1990 Tuesday April 10 -# 1991 Saturday March 30 -# 1992 Saturday April 18 -# 1993 Tuesday April 6 -# 1994 Sunday March 27 -# 1995 Saturday April 15 -# 1996 Thursday April 4 -# 1997 Tuesday April 22 -# 1998 Saturday April 11 -# 1999 Thursday April 1 -# 2000 Thursday April 20 -# 2001 Sunday April 8 -# 2002 Thursday March 28 -# 2003 Thursday April 17 -# 2004 Tuesday April 6 -# 2005 Sunday April 24 -# 2006 Thursday April 13 -# 2007 Tuesday April 3 -# 2008 Sunday April 20 -# 2009 Thursday April 9 -# -# First Day of Rosh Hashanah -# -------------------------- -# Gregorian Year Day of Week Month Day -# -------------- ----------- ----- --- -# 1989 Saturday September 30 -# 1990 Thursday September 20 -# 1991 Monday September 9 -# 1992 Monday September 28 -# 1993 Thursday September 16 -# 1994 Tuesday September 6 -# 1995 Monday September 25 -# 1996 Saturday September 14 -# 1997 Thursday October 2 -# 1998 Monday September 21 -# 1999 Saturday September 11 -# 2000 Saturday September 30 -# 2001 Tuesday September 18 -# 2002 Saturday September 7 -# 2003 Saturday September 27 -# 2004 Thursday September 16 -# 2005 Tuesday October 4 -# 2006 Saturday September 23 -# 2007 Thursday September 13 -# 2008 Tuesday September 30 -# 2009 Saturday September 19 +Rule Zion 1992 only - Mar 29 0:00 1:00 D +Rule Zion 1992 only - Sep 6 0:00 0:00 S +Rule Zion 1993 only - Apr 2 0:00 1:00 D +Rule Zion 1993 only - Sep 5 0:00 0:00 S + +# The dates for 1994-1995 were obtained from Office of the Spokeswoman for +# the Ministry of Interior, Jerusalem. There are no dates yet for 1996 and +# beyond so your guess is as good as theirs (those who are interested can +# call 972-2-701411 and ask for the spokeswoman). + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 1994 only - Apr 1 0:00 1:00 D +Rule Zion 1994 only - Aug 28 0:00 0:00 S +Rule Zion 1995 only - Mar 31 0:00 1:00 D +Rule Zion 1995 only - Aug 27 0:00 0:00 S + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tel_Aviv 2:19:04 - LMT 1880 + 2:21 - JMT 1918 + 2:00 Zion I%sT + ############################################################################### # Japan -# From Guy Harris +# `9:00' and `JST' is from Guy Harris. + +# From Paul Eggert (November 18, 1993): +# Shanks says that the far southern Ryukyu Is (Nansei-Shoto) are 8:00, +# but we don't have a good location name for them; +# we don't even know the name of the principal town. +# There is no information for Marcus. +# Other Japanese possessions are probably like Asia/Tokyo. + +# From Shanks (1991): +# Japan switched from the Japanese calendar on 1893 Jan 1. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tokyo 9:19:04 - LMT 1896 + 9:00 - JST +#Zone Asia/South_Ryukyu 8:14:44 - LMT 1896 # Amitori +# 8:00 - CST + +# Jordan +# From Paul Eggert (November 18, 1993): +# Most likely Shanks is merely guessing dates from 1992 on. +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Jordan 1931 only - Jan 1 0:00 0 - +Rule Jordan 1973 only - Jun 6 0:00 1:00 " DST" +Rule Jordan 1973 1975 - Oct 1 0:00 0 - +Rule Jordan 1974 1977 - May 1 0:00 1:00 " DST" +Rule Jordan 1976 only - Nov 1 0:00 0 - +Rule Jordan 1977 only - Oct 1 0:00 0 - +Rule Jordan 1978 only - Apr 30 0:00 1:00 " DST" +Rule Jordan 1978 only - Sep 30 0:00 0 - +Rule Jordan 1985 only - Apr 1 0:00 1:00 " DST" +Rule Jordan 1985 only - Oct 1 0:00 0 - +Rule Jordan 1986 1988 - Apr Fri>=1 0:00 1:00 " DST" +Rule Jordan 1986 1990 - Oct Fri>=1 0:00 0 - +Rule Jordan 1989 only - May 8 0:00 1:00 " DST" +Rule Jordan 1990 only - Apr 27 0:00 1:00 " DST" +Rule Jordan 1991 only - Apr 19 0:00 1:00 " DST" +Rule Jordan 1991 only - Sep 27 0:00 0 - +Rule Jordan 1992 max - Apr Fri>=1 0:00 1:00 " DST" +Rule Jordan 1992 max - Oct Fri>=1 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Amman 2:23:44 - LMT 1931 + 2:00 Jordan EET%s + +# Kazakhstan +# From Paul Eggert (November 18, 1993): +# Before 1993, Almaty was known by its Russian name ``Alma-Ata''. +# From Shanks (1991): +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Almaty 5:07:48 - LMT 1924 May 2 + 5:00 - TSK 1957 Mar + 6:00 Russia TS%s 1991 Sep 29 3:00 + 5:00 Russia TS%s -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Japan 9:00 - JST ############################################################################### -# Republic of Korea +# Korea # From Guy Harris: # According to someone at the Korean Times in San Francisco, @@ -240,23 +523,273 @@ # Daylight Savings Time was not observed until 1987. He did not know # at what time of day DST starts or ends. +# From Shanks (1991): # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule ROK 1987 max - May Sun<=14 2:00 1:00 D -Rule ROK 1987 max - Oct Sun<=14 3:00 0 S - -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone ROK 9:00 ROK K%sT +Rule ROK 1960 only - May 15 0:00 1:00 D +Rule ROK 1960 only - Sep 13 0:00 0 S +Rule ROK 1987 1988 - May Sun<=14 0:00 1:00 D +Rule ROK 1987 1988 - Oct Sun<=14 0:00 0 S + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Seoul 8:27:52 - LMT 1890 + 8:30 - KST 1904 Dec + 9:00 - KST 1928 + 8:30 - KST 1932 + 9:00 - KST 1954 Mar 21 + 8:00 ROK K%sT 1961 Aug 10 + 8:30 - KST 1968 Oct + 9:00 ROK K%sT +Zone Asia/Pyongyang 8:23:00 - LMT 1890 + 8:30 - KST 1904 Dec + 9:00 - KST 1928 + 8:30 - KST 1932 + 9:00 - KST 1954 Mar 21 + 8:00 - KST 1961 Aug 10 + 9:00 - KST ############################################################################### + +# Kuwait +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kuwait 3:11:56 - LMT 1950 + 3:00 - AST + +# Kyrgyzstan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Frunze 4:58:24 - LMT 1924 May 2 + 5:00 - TSK 1957 Mar + 6:00 Russia TS%s 1991 Sep 29 3:00 + 5:00 Russia TS%s + +# Laos +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Vientiane 6:50:24 - LMT 1906 Jun 9 + 7:06 - SMT 1911 Mar 11 0:01 # Saigon MT + 7:00 - ICT 1912 May + 8:00 - ICT 1931 May + 7:00 - ICT + # Lebanon +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Lebanon 1880 only - Jan 1 0:00 0 - +Rule Lebanon 1920 only - Mar 28 0:00 1:00 " DST" +Rule Lebanon 1920 only - Oct 25 0:00 0 - +Rule Lebanon 1921 only - Apr 3 0:00 1:00 " DST" +Rule Lebanon 1921 only - Oct 3 0:00 0 - +Rule Lebanon 1922 only - Mar 26 0:00 1:00 " DST" +Rule Lebanon 1922 only - Oct 8 0:00 0 - +Rule Lebanon 1923 only - Apr 22 0:00 1:00 " DST" +Rule Lebanon 1923 only - Sep 16 0:00 0 - +Rule Lebanon 1957 1961 - May 1 0:00 1:00 " DST" +Rule Lebanon 1957 1961 - Oct 1 0:00 0 - +Rule Lebanon 1972 only - Jun 22 0:00 1:00 " DST" +Rule Lebanon 1972 1977 - Oct 1 0:00 0 - +Rule Lebanon 1973 1977 - May 1 0:00 1:00 " DST" +Rule Lebanon 1978 only - Apr 30 0:00 1:00 " DST" +Rule Lebanon 1978 only - Sep 30 0:00 0 - +Rule Lebanon 1984 1987 - May 1 0:00 1:00 " DST" +Rule Lebanon 1984 max - Oct 16 0:00 0 - +Rule Lebanon 1988 only - Jun 1 0:00 1:00 " DST" +Rule Lebanon 1989 only - May 10 0:00 1:00 " DST" +Rule Lebanon 1990 max - May 1 0:00 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Beirut 2:22:00 - LMT 1880 + 2:00 Lebanon EET%s + +# Malaysia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Kuala_Lumpur 6:46:48 - LMT 1880 + 6:55 - SMT 1905 Jun + 7:00 - SGT 1933 + 7:20 - SGT 1942 Feb 15 + 9:00 - JST 1945 Sep 2 + 7:20 - SGT 1950 + 7:30 - SGT 1982 May + 8:00 - SGT + +# Maldives +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Indian/Maldives 4:54:00 - LMT 1880 # Male + 4:54 - MMT 1960 + 5:00 - PKT + +# Mongolia +# Let's comment out the western and eastern Mongolian time zones +# till we know what their principal towns are. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Mongol 1978 only - Jan 1 0:00 0 S +Rule Mongol 1981 1984 - Apr 1 0:00 1:00 T +Rule Mongol 1981 1984 - Oct 1 0:00 0 S +Rule Mongol 1985 max - Mar lastSun 2:00 1:00 T +Rule Mongol 1985 max - Sep lastSun 3:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +#Zone Asia/Dariv 6:14:32 - LMT 1905 Aug +# 6:00 - DST 1978 +# 7:00 Mongol D%sT +Zone Asia/Ulan_Bator 7:07:32 - LMT 1905 Aug + 7:00 - UST 1978 + 8:00 Mongol U%sT +#Zone Asia/Baruun-Urt 7:33:00 - LMT 1905 Aug +# 8:00 - BST 1978 +# 9:00 Mongol B%sT + +# Nepal +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Katmandu 5:41:16 - LMT 1920 + 5:30 - IST 1986 + 5:45 - NPT + +# Oman +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Muscat 3:54:20 - LMT 1920 + 4:00 - GST + +# Pakistan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Karachi 4:28:12 - LMT 1907 + 5:30 - IST 1942 Sep + 5:30 1:00 IST 1945 Oct 15 + 5:30 - IST 1951 Sep 30 + 5:00 - PKT -# From Bob Devine (January 28, 1988): -# Lebanon: They do have DST but I don't know the dates. +# Palestine +# These rules for Egypt are stolen from the `africa' file. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Egypt 1957 only - May 10 0:00 1:00 " DST" +Rule Egypt 1957 1958 - Oct 1 0:00 0 - +Rule Egypt 1958 only - May 1 0:00 1:00 " DST" +Rule Egypt 1959 1981 - May 1 1:00 1:00 " DST" +Rule Egypt 1959 1965 - Sep 30 3:00 0 - +Rule Egypt 1966 max - Oct 1 3:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Gaza 2:17:52 - LMT 1900 Oct + 2:00 - EET 1957 May 10 + 2:00 Egypt EET%s 1967 Jun 30 + 2:00 Zion I%sT +# This will undoubtedly change soon. -############################################################################### +# Philippines +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Phil 1899 only - May 11 0:00 0 S +Rule Phil 1936 only - Nov 1 0:00 1:00 D +Rule Phil 1937 only - Feb 1 0:00 0 S +Rule Phil 1954 only - Apr 12 0:00 1:00 D +Rule Phil 1954 only - Jul 1 0:00 0 S +Rule Phil 1978 only - Mar 22 0:00 1:00 D +Rule Phil 1978 only - Sep 21 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Manila 8:04:00 - LMT 1899 May 11 + 8:00 Phil P%sT 1942 May + 9:00 - JST 1944 Nov + 8:00 Phil P%sT + +# Qatar +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah + 4:00 - GST 1972 Jun + 3:00 - AST + +# Saudi Arabia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Riyadh 3:06:52 - LMT 1950 + 3:00 - AST # Singapore +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Singapore 6:55:24 - LMT 1880 + 6:55 - SMT 1905 Jun + 7:00 - SGT 1933 + 7:20 - SGT 1942 Feb 15 + 9:00 - JST 1945 Sep 2 + 7:20 - SGT 1950 + 7:30 - SGT 1982 May + 8:00 - SGT + +# Sri Lanka +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Colombo 5:19:24 - LMT 1880 + 5:20 - JMT 1906 + 5:30 - IST 1942 Jan 5 + 5:30 0:30 IHST 1942 Sep + 5:30 1:00 IST 1945 Oct 16 2:00 + 5:30 - IST -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Singapore 8:00 - SST +# Syria +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Syria 1920 only - Jan 1 0:00 0 - +Rule Syria 1920 1923 - Apr Sun>=15 2:00 1:00 " DST" +Rule Syria 1920 1923 - Oct Sun>=1 2:00 0 - +Rule Syria 1962 only - Apr 29 2:00 1:00 " DST" +Rule Syria 1962 only - Oct 1 2:00 0 - +Rule Syria 1963 1965 - May 1 2:00 1:00 " DST" +Rule Syria 1963 only - Sep 30 2:00 0 - +Rule Syria 1964 only - Oct 1 2:00 0 - +Rule Syria 1965 only - Sep 30 2:00 0 - +Rule Syria 1966 only - Apr 24 2:00 1:00 " DST" +Rule Syria 1966 1976 - Oct 1 2:00 0 - +Rule Syria 1967 1978 - May 1 2:00 1:00 " DST" +Rule Syria 1977 1978 - Sep 1 2:00 0 - +Rule Syria 1983 1984 - Apr 9 2:00 1:00 " DST" +Rule Syria 1983 1984 - Oct 1 2:00 0 - +Rule Syria 1986 only - Feb 16 2:00 1:00 " DST" +Rule Syria 1986 only - Oct 9 2:00 0 - +Rule Syria 1987 only - Mar 1 2:00 1:00 " DST" +Rule Syria 1987 1988 - Oct 31 2:00 0 - +Rule Syria 1988 only - Mar 15 2:00 1:00 " DST" +Rule Syria 1989 only - Mar 31 2:00 1:00 " DST" +Rule Syria 1989 only - Oct 1 2:00 0 - +Rule Syria 1990 max - Apr 1 2:00 1:00 " DST" +Rule Syria 1990 max - Sep 30 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Damascus 2:25:12 - LMT 1920 + 2:00 Syria EET%s + +# Tajikistan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2 + 5:00 - TSK 1957 Mar + 6:00 Russia TS%s 1991 Sep 29 3:00 + 5:00 Russia TS%s + +# Thailand +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Bangkok 6:42:04 - LMT 1880 + 6:42 - BMT 1920 Apr + 7:00 - ICT + +# Turkmenistan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Ashkhabad 3:53:32 - LMT 1924 May 2 + 4:00 - BSK 1957 Mar + 5:00 Russia SS%s 1991 Sep 29 3:00 + 4:00 Russia BS%s + +# United Arab Emirates +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Dubai 3:41:12 - LMT 1920 + 4:00 - GST + +# Uzbekistan +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Tashkent 4:37:12 - LMT 1924 May 2 + 5:00 - TSK 1957 Mar + 6:00 Russia TS%s 1991 Sep 29 3:00 + 5:00 Russia TS%s + +# Vietnam +# From Paul Eggert (November 18, 1993): +# Saigon's official name is Thanh-Pho Ho Chi Minh, but it's too long. +# We'll stick with the traditional name for now. +# From Shanks (1991): +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Saigon 7:06:40 - LMT 1906 Jun 9 + 7:06 - SMT 1911 Mar 11 0:01 # Saigon MT + 7:00 - ICT 1912 May + 8:00 - ICT 1931 May + 7:00 - ICT + +# Yemen +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Asia/Aden 3:00:48 - LMT 1950 + 3:00 - AST diff -ruN glibc-1.06/time/australasia glibc-1.07/time/australasia --- glibc-1.06/time/australasia Tue Feb 2 14:53:56 1993 +++ glibc-1.07/time/australasia Thu Dec 2 16:21:00 1993 @@ -1,4 +1,5 @@ -# @(#)australasia 7.13 +# @(#)australasia 7.18 +# This file also includes Pacific islands. # Notes are at the end of this file @@ -6,37 +7,56 @@ # Australia -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Australia/North 9:30 - CST - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Australia/West 8:00 - WST 1974 Oct lastSun 2:00 - 8:00 1:00 WST 1975 Mar Sun>=1 3:00 - 8:00 - WST 1983 Oct lastSun 2:00 - 8:00 1:00 WST 1984 Mar Sun>=1 3:00 - 8:00 - WST 1991 Nov 17 2:00 - 8:00 1:00 WST 1992 Mar Sun>=1 3:00 - 8:00 - WST - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Australia/Queensland 10:00 - EST 1971 Oct lastSun 2:00 - 10:00 1:00 EST 1972 Feb lastSun 3:00 - 10:00 - EST 1989 Oct lastSun 2:00 - 10:00 1:00 EST 1990 Mar Sun>=1 3:00 - 10:00 - EST 1990 Oct lastSun 2:00 - 10:00 1:00 EST 1991 Mar Sun>=1 3:00 - 10:00 - EST 1991 Oct lastSun 2:00 - 10:00 1:00 EST 1992 Mar Sun>=1 3:00 - 10:00 - EST +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Aus 1895 only - Jan 1 0:00 0 - +Rule Aus 1917 only - Jan 1 0:01 1:00 - +Rule Aus 1917 only - Mar 25 2:00 0 - +Rule Aus 1942 only - Jan 1 2:00 1:00 - +Rule Aus 1942 only - Mar 20 2:00 0 - +Rule Aus 1942 only - Sep 27 2:00 1:00 - +Rule Aus 1943 1944 - Mar lastSun 2:00 0 - +Rule Aus 1943 only - Oct 3 2:00 1:00 - + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Darwin 8:43:20 - LMT 1895 Feb + 9:30 - CST 1917 Jan 1 0:01 + 9:30 Aus CST +Zone Australia/Perth 7:43:24 - LMT 1895 Dec + 8:00 - WST 1917 Jan 1 0:01 + 8:00 Aus WST 1974 Oct lastSun 2:00 + 8:00 1:00 WST 1975 Mar Sun>=1 3:00 + 8:00 - WST 1983 Oct lastSun 2:00 + 8:00 1:00 WST 1984 Mar Sun>=1 3:00 + 8:00 - WST 1991 Nov 17 2:00 + 8:00 1:00 WST 1992 Mar Sun>=1 3:00 + 8:00 - WST +Zone Australia/Brisbane 10:12:08 - LMT 1895 + 10:00 - EST 1917 Jan 1 0:01 + 10:00 Aus EST 1971 Oct lastSun 2:00 + 10:00 1:00 EST 1972 Feb lastSun 3:00 + 10:00 - EST 1989 Oct lastSun 2:00 + 10:00 1:00 EST 1990 Mar Sun>=1 3:00 + 10:00 - EST 1990 Oct lastSun 2:00 + 10:00 1:00 EST 1991 Mar Sun>=1 3:00 + 10:00 - EST 1991 Oct lastSun 2:00 + 10:00 1:00 EST 1992 Mar Sun>=1 3:00 + 10:00 - EST # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule AS 1971 max - Oct lastSun 2:00 1:00 - -Rule AS 1972 1985 - Mar Sun>=1 3:00 0 - +Rule AS 1971 1985 - Oct lastSun 2:00 1:00 - +Rule AS 1986 only - Oct 19 2:00 1:00 - +Rule AS 1987 max - Oct lastSun 2:00 1:00 - +Rule AS 1972 only - Feb 27 3:00 0 - +Rule AS 1973 1985 - Mar Sun>=1 3:00 0 - Rule AS 1986 1989 - Mar Sun>=15 3:00 0 - Rule AS 1990 max even Mar Sun>=22 3:00 0 - Rule AS 1990 max odd Mar Sun>=1 3:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Australia/South 9:30 AS CST +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Adelaide 9:14:20 - LMT 1895 Feb + 9:00 - CST 1899 May + 9:30 - CST 1917 Jan 1 0:01 + 9:30 Aus CST 1971 Oct lastSun 2:00 + 9:30 AS CST # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule AT 1967 only - Oct 1 2:00 1:00 - @@ -49,12 +69,14 @@ Rule AT 1984 1986 - Mar Sun>=1 3:00 0 - Rule AT 1986 only - Oct 19 2:00 1:00 - Rule AT 1987 1990 - Mar Sun>=15 3:00 0 - -Rule AT 1987 only - Oct 25 2:00 1:00 - -Rule AT 1988 1990 - Oct lastSun 2:00 1:00 - +Rule AT 1987 1990 - Oct lastSun 2:00 1:00 - Rule AT 1991 max - Oct Sun>=1 2:00 1:00 - Rule AT 1991 max - Mar lastSun 3:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Australia/Tasmania 10:00 AT EST +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Hobart 9:49:16 - LMT 1895 Sep + 10:00 - EST 1917 Jan 1 0:01 + 10:00 Aus EST 1967 Oct 1 2:00 + 10:00 AT EST # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule AV 1971 1985 - Oct lastSun 2:00 1:00 - @@ -61,11 +83,14 @@ Rule AV 1972 only - Feb 27 3:00 0 - Rule AV 1973 1985 - Mar Sun>=1 3:00 0 - Rule AV 1986 1990 - Mar Sun>=15 3:00 0 - -Rule AV 1986 1987 - Oct Sun>=15 2:00 1:00 - -Rule AV 1988 max - Oct lastSun 2:00 1:00 - +Rule AV 1986 only - Oct 19 2:00 1:00 - +Rule AV 1987 max - Oct lastSun 2:00 1:00 - Rule AV 1991 max - Mar Sun>=1 3:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Australia/Victoria 10:00 AV EST +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Melbourne 9:39:52 - LMT 1895 Feb + 10:00 - EST 1917 Jan 1 0:01 + 10:00 Aus EST 1971 Oct 31 2:00 + 10:00 AV EST # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule AN 1971 1985 - Oct lastSun 2:00 1:00 - @@ -73,20 +98,110 @@ Rule AN 1973 1981 - Mar Sun>=1 3:00 0 - Rule AN 1982 only - Apr 4 3:00 0 - Rule AN 1983 1985 - Mar Sun>=1 3:00 0 - -Rule AN 1986 only - Mar 16 3:00 0 - +Rule AN 1986 1989 - Mar Sun>=15 3:00 0 - Rule AN 1986 only - Oct 19 2:00 1:00 - -Rule AN 1987 only - Mar 15 3:00 0 - Rule AN 1987 max - Oct lastSun 2:00 1:00 - -# Rule AN 1988 only - Mar Sun>=1 3:00 0 - -# Rule AN 1989 only - Mar Sun>=15 3:00 0 - -Rule AN 1988 1989 - Mar Sun>=15 3:00 0 - # Rule AN 1990 max - Mar Sun>=1 3:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Australia/NSW 10:00 AN EST -Zone Australia/Yancowinna 9:30 AN CST -Zone Australia/LHI 10:30 AN ??? +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Australia/Sydney 10:04:52 - LMT 1895 Feb + 10:00 - EST 1917 Jan 1 0:01 + 10:00 Aus EST 1971 Oct 31 2:00 + 10:00 AN EST +Zone Australia/Broken_Hill 9:25:48 - LMT 1895 Feb + 10:00 - EST 1896 Aug 23 + 9:00 - CST 1899 May + 9:30 - CST 1917 Jan 1 0:01 + 9:30 Aus CST 1971 Oct 31 2:00 + 9:30 AN CST +Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb + 10:00 - EST 1981 Mar + 10:30 AN LHST +Zone Indian/Christmas 7:02:52 - LMT 1895 Feb + 7:00 - JT + +# +# Ashmore Is, Cartier +# no information; probably like Australia/Perth +# +# Macquarie, Manihiki, Penrhyn, Rakehanga +# no information + + +# Belau +Zone Pacific/Belau 8:58:00 - LMT 1901 + 9:00 - BLT -Link Australia/NSW Australia/ACT # Australian Capital Territory +# Cook Is +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cook 1978 only - Nov 12 0:00 0:30 HD +Rule Cook 1979 max - Mar Sun>=1 0:00 0 H +Rule Cook 1979 max - Oct lastSun 0:00 0:30 HD +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua + -10:30 - CIST 1978 Nov 12 # Cook Is ST + -10:00 Cook T%sT + +# Cocos +# From USNO (1989): +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Cocos 6:30 - CCT + +# Fiji +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva + 12:00 - NZST + +# French Polynesia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea + -9:00 - GBT +Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct + -9:30 - MQT +Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete + -10:00 - THT + +# Guam +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Guam 9:39:00 - LMT 1901 # Agana + 10:00 - GST + +# Howland, Baker +# no information; probably like Pacific/Samoa + +# Jarvis +# no information; probably like Pacific/Kiritimati + +# Johnston +# no information; probably like Pacific/Honolulu + +# Kiribati +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki + 12:00 - NZST +Zone Pacific/Enderbury -12:35:40 - LMT 1901 + -12:00 - KJT 1979 Oct + -11:00 - SST +Zone Pacific/Kiritimati -10:29:20 - LMT 1901 + -10:40 - LIT 1979 Oct # Line Is Time + -10:00 - THT + +# Nauru +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Nauru 11:07:40 - LMT 1921 Jan 15 # Uaobe + 11:30 - NST 1942 Mar 15 + 9:00 - JST 1944 Aug 15 + 11:30 - NST 1979 May + 12:00 - NZST + +# New Caledonia +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule NC 1912 only - Jan 13 0:00 0 S +Rule NC 1977 1978 - Dec Sun>=1 0:00 1:00 D +Rule NC 1978 1979 - Feb 27 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Noumea 11:05:48 - LMT 1912 Jan 13 + 11:00 NC NC%sT + ############################################################################### @@ -93,20 +208,165 @@ # New Zealand # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NZ 1974 1988 - Oct lastSun 2:00 1:00 D -# Rule NZ 1989 max - Oct Sun>=1 2:00 1:00 D -Rule NZ 1989 only - Oct 8 2:00 1:00 D # -Rule NZ 1990 max - Oct Sun>=1 2:00 1:00 D # -Rule NZ 1975 1989 - Mar Sun>=1 3:00 0 S +Rule NZ 1868 only - Jan 1 0:00 0 S +Rule NZ 1927 only - Nov 6 2:00 1:00 D +Rule NZ 1928 only - Mar 4 2:00 0 S +Rule NZ 1928 1933 - Oct Sun>=8 2:00 1:00 D +Rule NZ 1929 1933 - Mar Sun>=15 2:00 0 S +Rule NZ 1934 1940 - Apr lastSun 2:00 0 S +Rule NZ 1934 1939 - Sep lastSun 2:00 1:00 D +Rule NZ 1974 only - Nov 3 2:00 1:00 D +Rule NZ 1975 1988 - Oct lastSun 2:00 1:00 D +Rule NZ 1989 only - Oct 8 2:00 1:00 D +Rule NZ 1990 max - Oct Sun>=1 2:00 1:00 D +Rule NZ 1975 only - Feb 23 3:00 0 S +Rule NZ 1976 1989 - Mar Sun>=1 3:00 0 S Rule NZ 1990 max - Mar Sun>=15 3:00 0 S -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone NZ 12:00 NZ NZ%sT # New Zealand -Zone NZ-CHAT 12:45 - NZ-CHAT # Chatham Island +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Auckland 11:39:04 - LMT 1868 + 11:30 NZ NZ%sT 1940 Sep 29 2:00 + 12:00 NZ NZ%sT +Zone Pacific/Chatham 12:45 - NZ-CHAT + +# Antipodes Is, Kermadec Is +# no information; probably like Pacific/Auckland + +############################################################################### + + +# Niue +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi + -11:20 - NIT 1951 # Niue I Time + -11:30 - NIT 1978 Oct 1 + -11:00 - SST + +# Norfolk +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston + 11:12 - NMT 1951 + 11:30 - NST + +# Pacific Islands Trust Territories +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Majuro 11:24:48 - LMT 1901 + 11:00 - NCST 1969 Oct + 12:00 - NZST +Zone Pacific/Kwajalein 11:09:20 - LMT 1901 + 11:00 - NCST 1969 Oct + -12:00 - KJT 1993 Aug 20 + 12:00 - NZST +Zone Pacific/Truk 10:07:08 - LMT 1901 + 10:00 - GST 1978 Oct + 11:00 - NCST +Zone Pacific/Ponape 10:33:00 - LMT 1901 + 11:00 - NCST +Zone Pacific/Yap 9:12:24 - LMT 1901 + 9:00 - BLT 1969 Oct + 10:00 - GST + +# Palmyra +# no information; probably like Pacific/Kiritmati + +# Papua New Guinea +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 + 9:49 - PMMT 1895 + 10:00 - EST + +# Pitcairn +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown + -8:30 - PIT + +# Solomon Is +# excludes Bougainville, for which see Papua New Guinea +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara + 11:00 - NCST + +# Tokelau Is +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Fakaofo -11:24:56 - LMT 1901 + -10:00 - THT + +# Tonga +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Tongatapu 12:19:20 - LMT 1901 + 12:20 - TMT 1968 Oct + 13:00 - TGT + +# Tuvalu +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Funafuti 11:56:52 - LMT 1901 + 12:00 - NZST + +# Vanuatu +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Vanuatu 1912 only - Jan 13 0:00 0 S +Rule Vanuatu 1983 only - Sep 25 0:00 1:00 D +Rule Vanuatu 1984 max - Mar Sun>=23 0:00 0 S +Rule Vanuatu 1984 only - Oct 23 0:00 1:00 D +Rule Vanuatu 1985 max - Sep Sun>=23 0:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila + 11:00 - NCST + +# Wake +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Wake 11:06:28 - LMT 1901 + 12:00 - NZST + +# Wallis and Futuna +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Pacific/Wallis 11:44:40 - LMT 1901 + 12:00 - NZST + +# Western Samoa +# See Pacific/Samoa in the `northamerica' file, of all places. ############################################################################### # NOTES +# 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 +# tz@elsie.nci.nih.gov for general use in the future). + +# From Paul Eggert (November 18, 1993): +# A good source for time zone historical data outside the U.S. is +# Thomas G. Shanks, The International Atlas (3rd edition), +# San Diego: ACS Publications, Inc. (1991). +# Except where noted below, it is the source for the data above. +# +# I invented the abbreviations marked `*' in the following table; +# the rest are from earlier versions of this file, or from other sources. +# Corrections are welcome! +# std dst +# LMT Local Mean Time +# 6:30 CCT Cocos* +# 7:00 JVT Java* +# 8:00 WST WST Western Australia +# 9:00 BLT Belau* +# 9:00 JST Japan +# 9:30 CST CST Central Australia +# 10:00 EST EST Eastern Australia +# 10:00 GST Guam* +# 10:30 LHST LHST Lord Howe* +# 11:00 NCST NCDT New Caledonia* +# 11:30 NRT Norfolk* +# 12:00 NZST NZDT New Zealand +# 13:00 TGT Tongatapu* +# -12:00 KJT Kwajalein (no longer used)* +# -11:00 SST Samoa +# -10:40 LIT Line Is (no longer used)* +# -10:00 THT Tahiti* +# - 9:30 MQT Marquesas* +# - 9:00 GBT Gambier* +# - 8:30 PIT Pitcairn* +# +# See the `africa' file for Zone naming conventions. + ############################################################################### # Australia @@ -235,8 +495,8 @@ # Zone Australia/Tasmania 10:00 Oz EST # Zone Australia/South 9:30 Oz CST # Zone Australia/Victoria 10:00 Oz EST 1985 Oct lastSun 2:00 -# 10:00 1:00 EST 1986 Mar Sun<=21 3:00 -# 10:00 Oz EST +# 10:00 1:00 EST 1986 Mar Sun<=21 3:00 +# 10:00 Oz EST # From Robert Elz (March 6, 1991): # I believe that the current start date for DST is "lastSun" in Oct... @@ -431,3 +691,13 @@ # From Arthur David Olson (March 8, 1992): # The chosen rules use the Davies October 8 values for the start of DST in 1989 # rather than the October 1 value. + +############################################################################### + +# Kwajalein + +# In comp.risks 14.87 (26 August 1993), Peter Neumann writes: +# I wonder what happened in Kwajalein, where there was NO Friday, +# August 20, 1993. Thursday night at midnight Kwajalein switched sides with +# respect to the International Date Line, to rejoin its fellow islands, +# going from 11:59 p.m. Thursday to 12:00 m. Saturday in a blink. diff -ruN glibc-1.06/time/backward glibc-1.07/time/backward --- glibc-1.06/time/backward +++ glibc-1.07/time/backward Thu Dec 2 16:15:50 1993 @@ -0,0 +1,63 @@ +# @(#)backward 7.3 + +# This file provides links between late-1993-vintage names for time zones +# and their previous names. + +Link Australia/Sydney Australia/ACT +Link Australia/Lord_Howe Australia/LHI +Link Australia/Sydney Australia/NSW +Link Australia/Darwin Australia/North +Link Australia/Brisbane Australia/Queensland +Link Australia/Adelaide Australia/South +Link Australia/Hobart Australia/Tasmania +Link Australia/Melbourne Australia/Victoria +Link Australia/Perth Australia/West +Link Australia/Broken_Hill Australia/Yancowinna +Link America/Porto_Acre Brazil/Acre +Link America/Noronha Brazil/DeNoronha +Link America/Sao_Paulo Brazil/East +Link America/Manaus Brazil/West +Link America/Halifax Canada/Atlantic +Link America/Winnipeg Canada/Central +Link America/Regina Canada/East-Saskatchewan +Link America/Montreal Canada/Eastern +Link America/Edmonton Canada/Mountain +Link America/St_Johns Canada/Newfoundland +Link America/Vancouver Canada/Pacific +Link America/Regina Canada/Saskatchewan +Link America/Whitehorse Canada/Yukon +Link America/Santiago Chile/Continental +Link Pacific/Easter Chile/EasterIsland +Link America/Havana Cuba +Link Africa/Cairo Egypt +Link Europe/Dublin Eire +Link Europe/London GB +Link Asia/Hong_Kong Hongkong +Link Atlantic/Reykjavik Iceland +Link Asia/Tehran Iran +Link Asia/Tel_Aviv Israel +Link America/Jamaica Jamaica +Link Asia/Tokyo Japan +Link Pacific/Kwajalein Kwajalein +Link Africa/Tripoli Libya +Link America/Tijuana Mexico/BajaNorte +Link America/Mazatlan Mexico/BajaSur +Link America/Mexico_City Mexico/General +Link Pacific/Auckland NZ +Link Pacific/Chatham NZ-CHAT +Link Asia/Shanghai PRC +Link Asia/Taipei ROC +Link Asia/Seoul ROK +Link Asia/Singapore Singapore +Link America/Anchorage US/Alaska +Link America/Atka US/Aleutian +Link America/Phoenix US/Arizona +Link America/Chicago US/Central +Link America/Fort_Wayne US/East-Indiana +Link America/New_York US/Eastern +Link Pacific/Honolulu US/Hawaii +Link America/Knox_IN US/Indiana-Starke +Link America/Detroit US/Michigan +Link America/Denver US/Mountain +Link America/Los_Angeles US/Pacific +Link Pacific/Samoa US/Samoa diff -ruN glibc-1.06/time/clocktest.c glibc-1.07/time/clocktest.c --- glibc-1.06/time/clocktest.c +++ glibc-1.07/time/clocktest.c Mon Jul 26 18:17:43 1993 @@ -0,0 +1,16 @@ +#include +#include + +main () +{ + volatile int i; + double t1, t2, t; + + t1 = (double) clock (); + for (i = 0; i < 100000; ++i) ; + t2 = (double) clock (); + + t = (t2 - t1) / ((double) CLOCKS_PER_SEC); + printf ("%f - %f = %f\n",t2,t1,t); + return 0; +} diff -ruN glibc-1.06/time/emkdir.c glibc-1.07/time/emkdir.c --- glibc-1.06/time/emkdir.c Sat May 15 18:21:57 1993 +++ glibc-1.07/time/emkdir.c Thu Dec 2 16:21:00 1993 @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)emkdir.c 8.20"; +static char elsieid[] = "@(#)emkdir.c 8.21"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -37,7 +37,8 @@ *cp++ = c; } else *cp++ = c; *cp++ = '\''; -#else /* !defined unix */ +#endif /* defined unix */ +#ifndef unix while ((c = *name++) != '\0') if (c == '/') *cp++ = '\\'; @@ -61,7 +62,8 @@ return -1; #ifdef unix format = "mkdir 2>&- %s && chmod 2>&- %o %s"; -#else /* !defined unix */ +#endif /* defined unix */ +#ifndef unix format = "mkdir %s"; #endif /* !defined unix */ command = imalloc(strlen(format) + 2 * strlen(qname) + 20 + 1); diff -ruN glibc-1.06/time/europe glibc-1.07/time/europe --- glibc-1.06/time/europe Tue Feb 2 14:53:36 1993 +++ glibc-1.07/time/europe Thu Dec 2 16:21:01 1993 @@ -1,17 +1,83 @@ -# @(#)europe 7.3 +# @(#)europe 7.13 -# International country codes are used to identify countries' rules and -# zones -# -# 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 -# ado@ncifcrf.gov for general use in the future). +# 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 +# tz@elsie.nci.nih.gov for general use in the future). + +# From Paul Eggert (November 18, 1993): +# A good source for time zone historical data outside the U.S. is +# Thomas G. Shanks, The International Atlas (3rd edition), +# San Diego: ACS Publications, Inc. (1991). +# Except where otherwise noted, it is the source for the data below. +# +# I invented the abbreviations marked `*' in the following table; +# the rest are from earlier versions of this file, or from other sources. +# The starred Russian names are dubious. Corrections are welcome! +# std dst +# LMT Local Mean Time +# LST Local Star Time (Russian ``mestnoe zvezdnoe vremya'') +# -4:00 AST Atlantic +# -3:00 WGT+DST Western Greenland* +# -2:00 MGT+DST Middle Greenland* +# -1:00 EGT+DST Eastern Greenland* +# -1:00 ACT+DST Azores and Canaries* +# -1:00 IST IDT Iceland (no longer used)* +# 0:00 GMT BST Greenwich, British Summer +# 0:00 WET+DST Western Europe +# 1:00 MET+DST Middle Europe +# 2:00 EET+DST Eastern Europe +# 3:00 MSK MSD Moscow +# 3:00 TUR+DST Turkey (no longer used)* +# 4:00 SSK SSD Sverdlovsk* +# 5:00 OSK OSD Omsk* +# 6:00 NSK NSD Novosibirsk +# 7:00 ISK ISD Irkutsk* +# 8:00 YSK YSD Yakutsk* +# 9:00 VSK VSD Vladivostok* +# 10:00 GSK GSD Magadan* +# 11:00 PSK PSD Petropavlovsk-Kamchatski* +# 12:00 ASK ASD Anadyr* +# +# See the `africa' file for Zone naming conventions. +# +# A reliable and entertaining source about time zones, especially in Britain, +# is Derek Howse, Greenwich time and the discovery of the longitude, +# Oxford University Press (1980). + +# From Andrew A. Chernov (November 12, 1993): +# LST is Local Star Time (``mestnoe zvezdnoe vremya''). ############################################################################### # United Kingdom -# From Peter Ilieve (peter@memex.co.uk) (July 4, 1989) +# From Paul Eggert (November 18, 1993): +# +# Howse writes that Britain was the first country to use standard time. +# The railways cared most about the inconsistencies of local mean time, +# and it was they who forced a uniform time on the country. +# The original idea was credited to Dr. William Hyde Wollaston (1766-1828); +# it was popularized in 1840 by Capt. Basil Hall, RN (1788-1844), +# famed explorer and former Commissioner for Longitude. +# The first railway to adopt London time was the Great Western Railway +# in November 1840; other railways followed suit, and by 1847 most +# (though not all) railways used London time. On 1847 Sep 22 the +# Railway Clearing House, an industry standards body, recommended that GMT be +# adopted at all stations; the January 1848 Bradshaw's lists most major +# railways as using GMT. By 1855 the vast majority of public +# clocks in Britain were set to GMT (though some, like the Great Clock +# in Tom Tower at Christ Church, Oxford, were fitted with two minute hands, +# one for local time and one for GMT). The last major holdout was the legal +# system, which stubbornly stuck to local time for many years, leading +# to oddities like polls opening at 08:13 and closing at 16:13. +# The legal system finally switched to GMT when the Statutes (Definition +# of Time) Act took effect; it received the Royal Assent on 1880 Aug 2. +# +# In the tables below, we condense this complicated story into a single +# transition date for London, namely 1847 Sep 22. We don't know as much +# about Dublin, so we use 1880 Aug 2, the legal transition time. + +# From Peter Ilieve (July 4, 1989): # # From the UK Government paper "Summer Time: A Consultation Document" # (HMSO Cm722 June 1989), which is about the possibility of the UK moving @@ -38,7 +104,7 @@ # The intention is to have the new system, if any, start in 1993. # The dates are (copied exactly from the table in the paper): # -# Summer Time Double Summer Time +# Summer Time Double Summer Time # Year Start End Start End # 1916 21 May 1 October # 1917 8 April 17 September @@ -45,16 +111,16 @@ # 1918 24 March 30 September # 1919 30 March 29 September # 1920 28 March 25 October -# (extended from -# 27 Sep. because -# of coal strike) +# (extended from +# 27 Sep. because +# of coal strike) # # 1921 3 April 3 October # 1922 26 March 8 October # 1923 22 April 16 September -# 1924 30 April 21 September -# 1925 to 3rd Sunday 1st Sunday -# 1938 in April in October +# 1924 20 April 21 September [Some of the dates in these +# 1925 to 3rd Sunday 1st Sunday three lines are incorrect; +# 1938 in April in October -- see below.] # # 1939 16 April 19 November # 1940 25 February continued @@ -75,7 +141,7 @@ # 1953 19 April 4 October # 1954 11 April 3 October # 1955 17 April 2 October -# 1956 15 April 7 October +# 1956 15 April 7 October [`15 April' is disputed; see below.] # 1957 14 April 6 October # 1958 20 April 5 October # 1959 19 April 4 October @@ -120,141 +186,1504 @@ # # These dates agree with the ones from Whitaker's Almanac for 1960--87. . . +# From Peter Ilieve (peter@memex.co.uk) (October 18, 1993) +# +# I made a transcription error in my table for 1924. The government Green +# Paper I was copying from actually says 20 April, which I mangled into +# 30 April. +# +# This still differs from the 13 April printed in Shanks' book. I would +# side with Shanks here. Software that purports to calculate the date of +# Easter says that 20 April 1924 was Easter. The Summer Time Act 1922, +# which was the relevant law at the time, says that Summer Time starts +# after the 3rd Saturday in April, unless that is Easter, when it is the +# 2nd Saturday. I asked the Home Office about this discrepancy but they +# weren't interested in helping at all. +# +# If you continue to include my email with the table of dates in it in +# your europe file I would appreciate it saying the 20 April for 1924, as +# that is what the document I was quoting from said. Add a note somewhere +# to say that the date is almost certainly bogus. + # From Arthur David Olson (January 19, 1989): # # A source at the British Information Office in New York avers that it's # known as "British" Summer Time in all parts of the United Kingdom. -# From an Anonymous U. K. Donor (January 4, 1989): -# -# It is NOT possible to predict when [British Summer Time] will change -# in a future year. -# -# (The admiralty calculate when they think it should be (no more that a couple -# of years in advance) and advise the government who then decide whether or -# not they will take the admiralty's advice) -# -# ...the Gre[e]nwich...observatory...[was] very helpful. -# -# I was not able to track down the Admiralty formula (I tried hard but failed) - -# ... # Date: 4 Jan 89 08:57:25 GMT (Wed) # From: Jonathan Leffler -# ... # [British Summer Time] is fixed annually by Act of Parliament. # If you can predict what Parliament will do, you should be in # politics making a fortune, not computing. +# From Peter Ilieve (September 3, 1993): +# +# I have some more up to date info. +# +# Our Government...couldn't...make a decision after the 1989 consultation +# exercise about the UK changing its timezone so it just let things drift +# (different from deciding to keep the status quo). According to the +# Summer Time Order 1992 (SI 1992/1729) the dates of Summer Time for 1993 +# and 1994 are: +# Start End +# 1993 28 March 24 October +# 1994 27 March 23 October +# All start and end times are at 01:00 GMT. +# +# There [was] an error in your tables for the start and end times prior to 1981. +# The UK always used to change at 02:00 GMT. In 1981 it changed to 01:00 GMT +# as a part of EC harmonisation and has remained at that time since. +# +# I have found the default algorithm for UK Summer Time, it is in the +# Summer Time Act 1972. Section 1 states that in the absence of an Order +# in Council Summer Time starts at 02:00 GMT on the morning of the day +# after the third Saturday in March, unless that day is Easter Day, in +# which case it is the morning of the day after the second Saturday. +# It ends at 02:00 GMT on the morning of the day after the fourth Saturday +# in October. (All the redundant `morning of the day ...' is in the Act.) +# This is only of passing interest now as it will always be overridden by +# an Order in Council (a Statutary Instrument, the SI thing mentioned above) +# to specify the EC specified dates. + +# From Peter Ilieve (October 18, 1993): +# +# My contact in the Ministry of Defence Public Relations department +# accepted the challenge of looking into this and produced the following, +# from Hansard (the official record of the UK Parliament), Oral Answers, +# 1 March 1945, cols 1559--60: +# +# `58. Major Sir Goronwy Owen asked the Secretary of State for the Home +# Department if he is now able to state the Government's proposals +# regarding double summer time. +# +# [two other similar questions omitted] +# +# Mr. H. Morrison: The Government, in reviewing the matter, have +# considered, [...] the conclusion has been reached that the adoption of +# double summer time from the beginning of April is essential to the +# maintenance of the war effort. [...] As 1st April is Easter Sunday, +# when very early services are held in many churches, it is proposed that +# double summer time shall start not in the night preceding Easter +# Sunday, but in the night of Sunday- Monday so that it will operate from +# Monday, 2nd April.' + +# From Peter Ilieve (September 3, 1993): +# +# > # Current rules +# > Rule GB-Eire 1981 max - Mar lastSun 1:00s 1:00 BST +# > Rule GB-Eire 1981 max - Oct Sun>=23 1:00s 0 GMT +# +# The ending rule here doesn't match the EC rules, which specify the fourth +# Sunday in October for the UK and Eire. The `fourth Sunday' rule wasn't +# followed in 1989, but then the sixth EC directive wasn't in force then +# and I don't know what previous ones said. 1995 is the next year with +# the 4th Sun on 22 Oct, but that year isn't covered by the UK Summer Time +# Order or the sixth EC directive. Your Oct Sun>=23 rule matches history +# and with things only announced for 2 years or so in advance who knows +# what will happen. +# +# There are renewed rumours that the Government here will make another +# attempt at resolving this issue, which is what prompted me to start +# asking the Home Office and the EC about it again. The EC categorically +# state they are not asking anybody to change timezone, they only want +# common start/end dates. The UK Govt. seem to want to change our zone +# and blame the resulting fuss on the EC. Me, I think we should scrap +# summer time completely, noon is when the Sun is overhead, and that should +# be the end of it. + +# From Peter Ilieve (October 22, 1993): +# +# I now have the text of the Summer Time Act 1916, the granddaddy of them all. +# It is headed: `An Act to provide for the Time in Great Britain and Ireland +# being in advance of Greenwich and Dublin mean time respectively in the +# summer months'. +# +# It specifies 21 May and 1 October for 1916 (both at 02:00 GMT) and whatever +# dates an Order in Council may specify for subsequent years. +# +# Section 4 states: `This act shall apply to Ireland in like manner as it +# applies to Great Britain, with the substitution however of references +# to Dublin mean time for references to Greenwich mean time.' +# +# Lorna, my learned legal friend who supplied it, also offers this quote +# from Halsbury's Statutes on the extent of Acts: +# +# `An Act of the United Kingdom Parliament is to be construed prima facie +# to apply to the whole of the United Kingdom and not to any place outside. +# [...] The expression "United Kingdom" for this purpose includes (since +# 1922) Great Britain (ie. England, Wales and Scotland) and Northern Ireland, +# but it does not include the Channel Islands or the Isle of Man.' +# +# She goes on to say the seminal event of 1922 was the establishment of +# the Irish Free State, now called Eire. +# +# The Act doesn't say anything about Wales (or Scotland) so I would assert +# that Shanks is wrong here. I would like to know why he thinks Wales +# was different. +# +# It also confirms the fact that Ireland followed Dublin time back then, +# and 25 minutes behind Greenwich, as Shanks has it, would be correct. + +# From Peter Ilieve (October 28, 1993): +# +# I now have before me, thanks to my learned legal friend Lorna, the text of +# the Time (Ireland) Act 1916. +# +# It says that as from 2 AM Dublin Mean Time on 1 October 1916 the time +# for general purposes in Ireland shall be the same as the rest of Great +# Britain (ie. GMT with the Summer Time periods specified by the Summer Time +# Act 1916).... As Ireland was behind GMT/BST at 02:00 DMT on 1 Oct GB would +# have already put the clocks back. Using DST as Dublin Summer Time the +# sequence would have been: +# Dublin London +# 02:34 DST 02:59 BST +# 02:35 DST 02:00 GMT +# 02:59 DST 02:24 GMT +# 02:25 GMT 02:25 GMT +# with the transition 03:00 DST -> 02:00 DMT -> 02:25 GMT all at once. +# +# In a table of repeals in the Schedule to the Act it mentions the +# Statutes (Definition of Time) Act 1880. This is presumably the source +# of the 1880 date in Shanks. The little bit of it that is repealed +# also refers solely to Ireland and Dublin Mean Time. + +# From Peter Ilieve (October 29, 1993): +# +# My case is that, with the sole exception of Ireland in 1916 using Dublin +# Mean Time, Summer Time has been uniform throughout the United Kingdom +# ever since it first started in 1916. +# +# The United Kingdom is England, Wales and Scotland plus all of Ireland from +# 1916 up to and including 1921, or plus Northern Ireland from 1922 to date. +# +# The dates used are those specified in the table in Summer Time: A Consultation +# Document (Cm 722, 1989) that are now included in the europe file, with a +# change to a single date, the start in 1924. I made a typo in my 1989 mail +# and the table itself is also wrong. The correct date is 13 April. +# The times were 02:00 GMT up to and including 1980, 01:00 GMT from 1981 on, +# except for wartime double summer time. +# +# As evidence I would cite: +# +# - The Summer Time Act, 1916. +# +# This specifically states that it applies to Ireland, specifies dates of +# 21 May and 1 October and times of 02:00, and says that in Ireland the +# times relate to Dublin mean time. It specifies an offset of 1 hour. +# +# - The Time (Ireland) Act, 1916 +# +# This abolishes Dublin mean time on 02:00 DMT 1 October 1916. +# It repeals that section of the Statutes (Definition of Time) Act, 1880 +# that specifies DMT. It is therefore a safe bet that DMT existed at least +# from 1880 and was the only alternative standard time in the UK. +# +# - The Summer Time Act, 1922 +# +# This specifies an offset of 1 hour and dates of the day after the third +# Saturday in April, unless that be Easter, in which case it is the day after +# the second Saturday, and the day after the third Saturday in September. +# The time is 02:00 GMT. It applied in 1922 and 1923, and longer if Parliament +# so approved. +# +# It specifically states that it applies to Northern Ireland, the Channel +# Islands, and the Isle of Man. +# +# - The Summer Time Act, 1925 +# +# This makes the 1922 Act permanent, with a change to the end date to the +# day after the first Saturday in October. It says nothing about extent, +# so that part of the 1922 Act will still apply. +# +# - The Defence (Summer Time) Regulations, 1939, SR&O 1939 No. 1379 +# [SR&O == Statutary Regulation and Order] +# +# These were made under the Emergency Powers (Defence) Act, 1939. +# It changes the end date to be the day after the third Saturday in November. +# It makes consequential changes to some vehicle lighting legislation, +# which includes the Motor Vehicles and Road Traffic (Northern Ireland) Act, +# 1934, so it seems clear it applies in Northern Ireland. +# +# - An Order in Council amending the The Defence (Summer Time) Regulations, +# 1939, SR&O 1940 No. 1883 +# +# This continues summer time throughout the year after it starts in 1940. +# It says nothing about extent and has no consequential changes. +# +# - An Order in Council amending the The Defence (Summer Time) Regulations, +# 1939, SR&O 1941 No. 476 +# +# This introduces double summer time, starting at 01:00 GMT on the day after +# the first Saturday in May and ending at 01:00 GMT on the day after the +# second Saturday in August, offset another hour from normal summer time, +# which continues throughout the rest of the year. It goes on a lot about +# consequential changes to agricultural wages legislation, and says in part +# `... and in its application to Northern Ireland have effect as +# if for the references to the Agricultural Wages (Regulation) Acts, 1924 and +# 1940, there were substituted references to the Agricultural Wages (Regulation) +# Acts (Northern Ireland), 1939 and 1940, ...'. It also has a similar section +# for Scotland. Both sections substitute the local Agricultural Wages Board +# for the Agricultural Wages Board for England and Wales, showing that +# England and Wales were indivisible. +# +# - An Order in Council amending the The Defence (Summer Time) Regulations, +# 1939, SR&O 1942 No. 506 +# +# This changes the start date of double summer time to the day after the first +# Saturday in April. It says nothing about extent. +# +# - An Order in Council amending the The Defence (Summer Time) Regulations, +# 1939, SR&O 1944 No. 932 +# +# This changed the end date of double summer time to 17 September 1944. +# (I don't have the text of this, just a note of what it did, the text almost +# certainly had the `day after the nth Saturday' form.) +# +# (I am missing whatever regulations there were to change things in 1945 +# and the Summer Time Act, 1947.) +# +# - The British Standard Time Act, 1968 +# +# This came into force on 27 October 1968 and continued summer time throughout +# the year as an experiment until it expired on 31 October 1971. +# There was no double summer time so we didn't have to change the clocks at all. +# It specifically said it applied to Northern Ireland. It also said it +# applied to Jersey, Guernsey and the Isle of Man unless they passed +# measures saying it didn't. +# +# - The Manx Time Act, 1968 +# +# This is an Act of Tynwald (the Isle of Man Parliament) that said that +# henceforth Manx time would be the same as the time in Great Britain. +# +# - The Summer Time Act, 1972 +# +# This specified a reversion to normal summer time behaviour with a start +# date of the day after the third Saturday in March, unless that is Easter, +# when it is the day after the second Saturday, and an end date of the day +# after the fourth Saturday in October. Times are at 02:00 GMT, offset is +# 1 hour. +# +# It has the same wording about extent as the British Standard Time Act, 1968, +# applying to Northern Ireland unconditionally and to Jersey, Guernsey and the +# Isle of Man if they don't do something about it. +# +# (I am missing various Summer Time Orders that modified the 1972 Act to +# harmonise with the EC since 1981. The major change is that the time changes +# to 01:00 GMT.) +# +# - The Summer Time Order, 1992, SI 1992/1729 [SI == Statutary Instrument] +# +# This specifies dates of: +# Start End +# 1993 28 March 24 October +# 1994 27 March 23 October +# All start and end times are at 01:00 GMT. +# This is as far as it goes at present. A new EC directive is expected soon +# and this will lead to a new Summer Time Order implementing it in the UK. +# +# - Some text on the extent of Acts, from Halsbury's Statutes +# +# `An Act of the United Kingdom Parliament is to be construed prima facie +# to apply to the whole of the United Kingdom and not to any place outside. +# [...] The expression "United Kingdom" for this purpose includes (since +# 1922) Great Britain (ie. England, Wales and Scotland) and Northern Ireland, +# but it does not include the Channel Islands or the Isle of Man.' +# +# So, many of these measures specifically include Northern Ireland, +# the Channel Islands and the Isle of Man. None of them exclude any +# part of the UK. The default interpretation of Acts is that they apply +# throughout the UK. +# +# With that, I rest my case Milud :-) +# +# Thanks are due to my learned legal friend Lorna Montgomerie, who dug out +# the dusty old statutes, and to Melanie Allison of the Ministry of Defence, +# who provided the wartime regulations and a snippet of Hansard explaining +# why double summer time started on a Monday in 1945 (it was Easter). + +# From Paul Eggert (November 18, 1993): +# +# As Ilieve remarks, the date `20 April 1924' in the table of ``Summer Time: A +# Consultation Document'' (Cm 722, 1989) table is a transcription error; +# 20 April was an Easter Sunday. Shanks has 13 April, the correct date. +# Also, the table is not quite right for 1925 through 1938; the correct rules +# (which Shanks uses) are given in the Summer Time Acts of 1922 and 1925. +# Shanks and the UK Government paper disagree about the Apr 1956 transition; +# since we have no other data, and since Shanks was correct in the other +# points of disagreement about London, we'll believe Shanks for now. +# Also, for lack of other data, we'll follow Shanks for Eire in 1940-1948. +# +# Given Peter Ilieve's comments, the following claims by Shanks are incorrect: +# * Wales did not switch from GMT to daylight savings time until +# 1921 Apr 3, when they began to conform with the rest of Great Britain. +# Actually, Wales was identical after 1880. +# * Eire had two transitions on 1916 Oct 1. +# It actually just had one transition. +# * Northern Ireland used single daylight savings time throughout WW II. +# Actually, it conformed to Britain. +# +# The following claim by Shanks is possible though doubtful; +# we'll ignore it for now. +# * Jersey, Guernsey, and the Isle of Man did not switch from GMT +# to daylight savings time until 1921 Apr 3, when they began to +# conform with Great Britain. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule GB-Eire 1847 only - Sep 22 0:00 0 GMT # 1916 to 1925--irregular -Rule GB-Eire 1916 only - Mar 21 1:00s 1:00 BST -Rule GB-Eire 1916 only - Oct 1 1:00s 0 GMT -Rule GB-Eire 1917 only - Apr 8 1:00s 1:00 BST -Rule GB-Eire 1917 only - Sep 17 1:00s 0 GMT -Rule GB-Eire 1918 only - Mar 24 1:00s 1:00 BST -Rule GB-Eire 1918 only - Sep 30 1:00s 0 GMT -Rule GB-Eire 1919 only - Mar 30 1:00s 1:00 BST -Rule GB-Eire 1919 only - Sep 29 1:00s 0 GMT -Rule GB-Eire 1920 only - Mar 28 1:00s 1:00 BST -Rule GB-Eire 1920 only - Oct 25 1:00s 0 GMT -Rule GB-Eire 1921 only - Apr 3 1:00s 1:00 BST -Rule GB-Eire 1921 only - Oct 3 1:00s 0 GMT -Rule GB-Eire 1922 only - Mar 26 1:00s 1:00 BST -Rule GB-Eire 1922 only - Oct 8 1:00s 0 GMT -Rule GB-Eire 1923 only - Apr 22 1:00s 1:00 BST -Rule GB-Eire 1923 only - Oct 16 1:00s 0 GMT -Rule GB-Eire 1924 only - Apr 30 1:00s 1:00 BST -Rule GB-Eire 1924 only - Sep 21 1:00s 0 GMT -# 1925 to 1939 start--regular -Rule GB-Eire 1925 1939 - Apr Sun>=15 1:00s 1:00 BST -Rule GB-Eire 1925 1938 - Oct Sun>=1 1:00s 0 GMT +Rule GB-Eire 1916 only - May 21 2:00s 1:00 BST +Rule GB-Eire 1916 only - Oct 1 2:00s 0 GMT +Rule GB-Eire 1917 only - Apr 8 2:00s 1:00 BST +Rule GB-Eire 1917 only - Sep 17 2:00s 0 GMT +Rule GB-Eire 1918 only - Mar 24 2:00s 1:00 BST +Rule GB-Eire 1918 only - Sep 30 2:00s 0 GMT +Rule GB-Eire 1919 only - Mar 30 2:00s 1:00 BST +Rule GB-Eire 1919 only - Sep 29 2:00s 0 GMT +Rule GB-Eire 1920 only - Mar 28 2:00s 1:00 BST +Rule GB-Eire 1920 only - Oct 25 2:00s 0 GMT +Rule GB-Eire 1921 only - Apr 3 2:00s 1:00 BST +Rule GB-Eire 1921 only - Oct 3 2:00s 0 GMT +Rule GB-Eire 1922 only - Mar 26 2:00s 1:00 BST +Rule GB-Eire 1922 only - Oct 8 2:00s 0 GMT +Rule GB-Eire 1923 only - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1923 1924 - Sep Sun>=16 2:00s 0 GMT +Rule GB-Eire 1924 only - Apr 13 2:00s 1:00 BST +# 1925 to 1939 start--regular, except for avoiding Easter +Rule GB-Eire 1925 1926 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1925 1938 - Oct Sun>=2 2:00s 0 GMT +Rule GB-Eire 1927 only - Apr 10 2:00s 1:00 BST +Rule GB-Eire 1928 1929 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1930 only - Apr 13 2:00s 1:00 BST +Rule GB-Eire 1931 1932 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1933 only - Apr 9 2:00s 1:00 BST +Rule GB-Eire 1934 only - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1935 only - Apr 14 2:00s 1:00 BST +Rule GB-Eire 1936 1937 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1938 only - Apr 10 2:00s 1:00 BST +Rule GB-Eire 1939 only - Apr Sun>=16 2:00s 1:00 BST # 1939 end to 1947--irregular, and with double summer time -Rule GB-Eire 1939 only - Nov 19 1:00s 0 GMT -Rule GB-Eire 1940 only - Feb 25 1:00s 1:00 BST -Rule GB-Eire 1941 only - May 4 1:00s 2:00 DST -Rule GB-Eire 1941 only - Aug 10 1:00s 1:00 BST -Rule GB-Eire 1942 only - Apr 5 1:00s 2:00 DST -Rule GB-Eire 1942 only - Aug 9 1:00s 1:00 BST -Rule GB-Eire 1943 only - Apr 4 1:00s 2:00 DST -Rule GB-Eire 1943 only - Aug 15 1:00s 1:00 BST -Rule GB-Eire 1944 only - Apr 2 1:00s 2:00 DST -Rule GB-Eire 1944 only - Sep 17 1:00s 1:00 BST -# Double daylight starts on a Monday in 1945? +Rule GB-Eire 1939 only - Nov 19 2:00s 0 GMT +Rule GB-Eire 1940 only - Feb 25 2:00s 1:00 BST +Rule GB-Eire 1941 only - May Sun>=2 1:00s 2:00 DST +Rule GB-Eire 1941 1943 - Aug Sun>=9 1:00s 1:00 BST +Rule GB-Eire 1942 1944 - Apr Sun>=2 1:00s 2:00 DST +Rule GB-Eire 1944 only - Sep Sun>=16 1:00s 1:00 BST +# Double daylight starts on a Monday in 1945--see above. Rule GB-Eire 1945 only - Apr 2 1:00s 2:00 DST Rule GB-Eire 1945 only - Jul 15 1:00s 1:00 BST -Rule GB-Eire 1945 only - Oct 7 1:00s 0 GMT -Rule GB-Eire 1946 only - Apr 14 1:00s 1:00 BST -Rule GB-Eire 1946 only - Oct 6 1:00s 0 GMT -Rule GB-Eire 1947 only - Mar 16 1:00s 1:00 BST +Rule GB-Eire 1945 only - Oct 7 2:00s 0 GMT +Rule GB-Eire 1946 only - Apr 14 2:00s 1:00 BST +Rule GB-Eire 1946 only - Oct 6 2:00s 0 GMT +Rule GB-Eire 1947 only - Mar 16 2:00s 1:00 BST Rule GB-Eire 1947 only - Apr 13 1:00s 2:00 DST Rule GB-Eire 1947 only - Aug 10 1:00s 1:00 BST -Rule GB-Eire 1947 only - Nov 2 1:00s 0 GMT +Rule GB-Eire 1947 only - Nov 2 2:00s 0 GMT # So much for double saving time. 1948 and 1949, irregular. -Rule GB-Eire 1948 only - Mar 14 1:00s 1:00 BST -Rule GB-Eire 1948 only - Oct 31 1:00s 0 GMT -Rule GB-Eire 1949 only - Apr 3 1:00s 1:00 BST -Rule GB-Eire 1949 only - Oct 30 1:00s 0 GMT +Rule GB-Eire 1948 only - Mar 14 2:00s 1:00 BST +Rule GB-Eire 1948 1949 - Oct lastSun 2:00s 0 GMT +Rule GB-Eire 1949 only - Apr 3 2:00s 1:00 BST # 1950 through start of 1953, regular. -Rule GB-Eire 1950 1953 - Apr Sun>=14 1:00s 1:00 BST -Rule GB-Eire 1950 1952 - Oct Sun>=21 1:00s 0 GMT +Rule GB-Eire 1950 1953 - Apr Sun>=14 2:00s 1:00 BST +Rule GB-Eire 1950 1952 - Oct Sun>=21 2:00s 0 GMT # 1954 to 1980, starting rules -Rule GB-Eire 1954 only - Apr 11 1:00s 1:00 BST -Rule GB-Eire 1955 1959 - Apr Sun>=14 1:00s 1:00 BST -Rule GB-Eire 1960 only - Apr 10 1:00s 1:00 BST -Rule GB-Eire 1961 1963 - Mar lastSun 1:00s 1:00 BST -Rule GB-Eire 1964 1967 - Mar Sun>=19 1:00s 1:00 BST -Rule GB-Eire 1968 only - Feb 18 1:00s 1:00 BST -Rule GB-Eire 1972 1980 - Mar Sun>=16 1:00s 1:00 BST -# 1953 to 1971, ending rules -Rule GB-Eire 1953 1960 - Oct Sun>=1 1:00s 0 GMT -Rule GB-Eire 1961 1967 - Oct Sun>=23 1:00s 0 GMT -Rule GB-Eire 1971 only - Oct 31 1:00s 0 GMT +Rule GB-Eire 1954 only - Apr 11 2:00s 1:00 BST +Rule GB-Eire 1955 1956 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1957 only - Apr 14 2:00s 1:00 BST +Rule GB-Eire 1958 1959 - Apr Sun>=16 2:00s 1:00 BST +Rule GB-Eire 1960 only - Apr 10 2:00s 1:00 BST +Rule GB-Eire 1961 1963 - Mar lastSun 2:00s 1:00 BST +Rule GB-Eire 1964 1967 - Mar Sun>=19 2:00s 1:00 BST +Rule GB-Eire 1972 1980 - Mar Sun>=16 2:00s 1:00 BST +# 1953 to 1980, ending rules +Rule GB-Eire 1953 1960 - Oct Sun>=1 2:00s 0 GMT +Rule GB-Eire 1961 1967 - Oct Sun>=23 2:00s 0 GMT +Rule GB-Eire 1971 only - Oct 31 3:00 0 GMT +Rule GB-Eire 1972 1980 - Oct Sun>=23 2:00s 0 GMT # Current rules Rule GB-Eire 1981 max - Mar lastSun 1:00s 1:00 BST -Rule GB-Eire 1972 max - Oct Sun>=23 1:00s 0 GMT +Rule GB-Eire 1981 max - Oct Sun>=23 1:00s 0 GMT -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone GB-Eire 0:00 GB-Eire %s 1968 Oct 27 1:00s - 1:00 - BST 1971 Oct 31 1:00s - 0:00 GB-Eire %s +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/London -0:00:37 - LMT 1847 Sep 22 + 0:00 GB-Eire %s 1968 Feb 18 2:00 + 1:00 - BST 1971 Oct 31 2:00 + 0:00 GB-Eire %s +Zone Europe/Belfast -0:23:40 - LMT 1880 Aug 2 + -0:25 - DMT 1916 May 21 2:00 # Dublin MT + -0:25 1:00 DST 1916 Oct 1 3:00 + 0:00 GB-Eire %s 1968 Feb 18 2:00 + 1:00 - BST 1971 Oct 31 3:00 + 0:00 GB-Eire %s +Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 + -0:25 - DMT 1916 May 21 2:00 # Dublin MT + -0:25 1:00 DST 1916 Oct 1 3:00 + 0:00 GB-Eire %s 1940 Feb 25 2:00 + 0:00 1:00 BST 1946 Oct 6 2:00 + 0:00 - GMT 1947 Mar 16 2:00 + 0:00 1:00 BST 1947 Nov 2 2:00 + 0:00 - GMT 1948 Apr 18 2:00 + 0:00 GB-Eire %s 1968 Feb 18 2:00 + 1:00 - BST 1971 Oct 31 3:00 + 0:00 GB-Eire %s ############################################################################### # Continental Europe -# The use of 1986 as starting years below is conservative. - -Rule W-Eur 1986 max - Mar lastSun 1:00s 1:00 " DST" -Rule W-Eur 1986 max - Sep lastSun 1:00s 0 - +Rule W-Eur 1800 only - Jan 1 0:00 0 - +Rule W-Eur 1977 1980 - Apr Sun>=1 1:00s 1:00 " DST" +Rule W-Eur 1977 only - Sep lastSun 1:00s 0 - +Rule W-Eur 1978 only - Oct 1 1:00s 0 - +Rule W-Eur 1979 max - Sep lastSun 1:00s 0 - +Rule W-Eur 1981 max - Mar lastSun 1:00s 1:00 " DST" + +Rule M-Eur 1800 only - Jan 1 0:00 0 - +Rule M-Eur 1916 only - Apr 30 23:00 1:00 " DST" +Rule M-Eur 1916 only - Oct 1 1:00 0 - +Rule M-Eur 1917 1918 - Apr Mon>=15 2:00s 1:00 " DST" +Rule M-Eur 1917 1918 - Sep Mon>=15 2:00s 0 - +Rule M-Eur 1940 only - Apr 1 2:00s 1:00 " DST" +Rule M-Eur 1942 only - Nov 2 2:00s 0 - +Rule M-Eur 1943 only - Mar 29 2:00s 1:00 " DST" +Rule M-Eur 1943 only - Oct 4 2:00s 0 - +Rule M-Eur 1944 only - Apr 3 2:00s 1:00 " DST" +Rule M-Eur 1944 only - Oct 2 2:00s 0 - +Rule M-Eur 1977 1980 - Apr Sun>=1 2:00s 1:00 " DST" +Rule M-Eur 1977 only - Sep lastSun 2:00s 0 - +Rule M-Eur 1978 only - Oct 1 2:00s 0 - +Rule M-Eur 1979 max - Sep lastSun 2:00s 0 - +Rule M-Eur 1981 max - Mar lastSun 2:00s 1:00 " DST" -Rule M-Eur 1986 max - Mar lastSun 2:00s 1:00 " DST" -Rule M-Eur 1986 max - Sep lastSun 2:00s 0 - +Rule E-Eur 1981 max - Mar lastSun 3:00s 1:00 " DST" +Rule E-Eur 1981 max - Sep lastSun 3:00s 0 - -Rule E-Eur 1986 max - Mar lastSun 3:00s 1:00 " DST" -Rule E-Eur 1986 max - Sep lastSun 3:00s 0 - - -Rule Turkey 1986 max - Mar lastSun 1:00 1:00 " DST" -Rule Turkey 1986 max - Sep lastSun 1:00 0 - - -Rule W-SU 1986 max - Mar lastSun 2:00s 1:00 " DST" -Rule W-SU 1986 max - Sep lastSun 2:00s 0 - - -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone WET 0:00 W-Eur WET%s -Zone Iceland 0:00 - WET -Zone Portugal 0:00 W-Eur WET%s 1992 Sep 27 1:00s - 1:00 M-Eur MET%s -Zone MET 1:00 M-Eur MET%s -Zone Poland 1:00 W-Eur MET%s -Zone EET 2:00 E-Eur EET%s -Zone Turkey 3:00 Turkey EET%s -Zone W-SU 3:00 M-Eur ???? +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Russia 1880 only - Jan 1 0:00 0 - +Rule Russia 1917 only - Jul 1 23:00 1:00 " DST" +Rule Russia 1917 only - Dec 28 0:00 0 - +Rule Russia 1918 only - May 31 22:00 2:00 " DDST" +Rule Russia 1918 only - Sep 17 0:00 1:00 " DST" +Rule Russia 1919 only - May 31 23:00 2:00 " DDST" +Rule Russia 1919 only - Jul 1 2:00 1:00 D +Rule Russia 1919 only - Aug 16 0:00 0 K +Rule Russia 1921 only - Feb 14 23:00 1:00 D +# Shanks gives 1921 Mar 21 for the following transition. +# From Andrew A. Chernov (November 12, 1993): +# My sources says, that it is Mar 20, not 21. +Rule Russia 1921 only - Mar 20 23:00 2:00 DD +Rule Russia 1921 only - Sep 1 0:00 1:00 D +Rule Russia 1921 only - Oct 1 0:00 0 K +Rule Russia 1981 1984 - Apr 1 0:00 1:00 D +Rule Russia 1981 1983 - Oct 1 0:00 0 K +Rule Russia 1984 1990 - Sep lastSun 2:00s 0 K +Rule Russia 1985 1990 - Mar lastSun 2:00s 1:00 D +Rule Russia 1992 max - Sep lastSun 2:00s 0 K +Rule Russia 1992 max - Mar lastSun 2:00s 1:00 D + +# These are for backward compatibility with older versions. + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone WET 0:00 W-Eur WET%s +Zone MET 1:00 M-Eur MET%s +Zone EET 2:00 E-Eur EET%s +Zone W-SU 3:00 M-Eur ???? # Tom Hoffman says that MET is also known as Central European Time Link MET CET +# Albania +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Albania 1940 only - Jun 16 0:00 1:00 " DST" +Rule Albania 1942 only - Nov 2 3:00 0 - +Rule Albania 1943 only - Mar 29 2:00 1:00 " DST" +Rule Albania 1943 only - Apr 10 3:00 0 - +Rule Albania 1974 only - May 4 0:00 1:00 " DST" +Rule Albania 1974 only - Oct 2 0:00 0 - +Rule Albania 1975 only - May 1 0:00 1:00 " DST" +Rule Albania 1975 only - Oct 2 0:00 0 - +Rule Albania 1976 only - May 2 0:00 1:00 " DST" +Rule Albania 1976 only - Oct 3 0:00 0 - +Rule Albania 1977 only - May 8 0:00 1:00 " DST" +Rule Albania 1977 only - Oct 2 0:00 0 - +Rule Albania 1978 only - May 6 0:00 1:00 " DST" +Rule Albania 1978 only - Oct 1 0:00 0 - +Rule Albania 1979 only - May 5 0:00 1:00 " DST" +Rule Albania 1979 only - Sep 30 0:00 0 - +Rule Albania 1980 only - May 3 0:00 1:00 " DST" +Rule Albania 1980 only - Oct 4 0:00 0 - +Rule Albania 1981 only - Apr 26 0:00 1:00 " DST" +Rule Albania 1981 only - Sep 27 0:00 0 - +Rule Albania 1982 only - May 2 0:00 1:00 " DST" +Rule Albania 1982 only - Oct 3 0:00 0 - +Rule Albania 1983 only - Apr 18 0:00 1:00 " DST" +Rule Albania 1983 only - Oct 1 0:00 0 - +Rule Albania 1984 only - Apr 1 0:00 1:00 " DST" +Rule Albania 1984 only - Oct 1 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Tirane 1:19:20 - LMT 1914 + 1:00 - MET 1940 Jun 16 + 1:00 Albania MET%s 1985 Mar 31 1:00 + 1:00 W-Eur MET%s + +# Andorra +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Andorra 0:06:04 - LMT 1901 + 0:00 - WET 1946 Sep 30 + 1:00 - MET 1985 Mar 31 2:00 + 1:00 M-Eur MET%s + +# Austria +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Austria 1918 only - Jun 16 3:00 0 - +Rule Austria 1920 only - Apr 5 2:00s 1:00 " DST" +Rule Austria 1920 only - Sep 13 2:00s 0 - +Rule Austria 1945 only - Apr 2 2:00s 1:00 " DST" +Rule Austria 1945 only - Nov 18 2:00s 0 - +Rule Austria 1946 only - Apr 14 2:00s 1:00 " DST" +Rule Austria 1946 1948 - Oct Sun>=1 2:00s 0 - +Rule Austria 1947 only - Apr 6 2:00s 1:00 " DST" +Rule Austria 1948 only - Apr 18 2:00s 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Vienna 1:05:20 - LMT 1893 Apr + 1:00 M-Eur MET%s 1918 Jun 16 3:00 + 1:00 Austria MET%s 1940 Apr 1 2:00 + 1:00 M-Eur MET%s 1945 Apr 2 2:00 + 1:00 Austria MET%s 1981 Mar 29 2:00 + 1:00 M-Eur MET%s + +# Belarus +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Minsk 1:50:16 - LMT 1880 + 2:31 Russia LST%s 1919 Jul 1 2:00 + 3:00 Russia MS%s 1922 Oct + 2:00 - EET 1930 Jun 21 + 3:00 Russia MS%s 1991 Sep 29 3:00 + 2:00 Russia MS%s + +# Belgium +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Belgium 1919 only - Mar 1 23:00s 1:00 " DST" +Rule Belgium 1919 only - Oct 4 23:00s 0 - +Rule Belgium 1920 only - Feb 14 23:00s 1:00 " DST" +Rule Belgium 1920 only - Oct 23 23:00s 0 - +Rule Belgium 1921 only - Mar 14 23:00s 1:00 " DST" +Rule Belgium 1921 only - Oct 25 23:00s 0 - +Rule Belgium 1922 only - Mar 25 23:00s 1:00 " DST" +Rule Belgium 1922 1928 - Oct Sat>=1 23:00s 0 - +Rule Belgium 1923 only - Apr 21 23:00s 1:00 " DST" +Rule Belgium 1924 only - Mar 29 23:00s 1:00 " DST" +Rule Belgium 1925 only - Apr 5 23:00s 1:00 " DST" +Rule Belgium 1926 only - Apr 17 23:00s 1:00 " DST" +Rule Belgium 1927 only - Apr 9 23:00s 1:00 " DST" +Rule Belgium 1928 only - Apr 14 23:00s 1:00 " DST" +Rule Belgium 1929 1938 - Oct Sun>=2 2:00s 0 - +Rule Belgium 1929 only - Apr 21 2:00s 1:00 " DST" +Rule Belgium 1930 only - Apr 13 2:00s 1:00 " DST" +Rule Belgium 1931 only - Apr 19 2:00s 1:00 " DST" +Rule Belgium 1932 only - Apr 17 2:00s 1:00 " DST" +Rule Belgium 1933 only - Mar 26 2:00s 1:00 " DST" +Rule Belgium 1934 only - Apr 8 2:00s 1:00 " DST" +Rule Belgium 1935 only - Mar 31 2:00s 1:00 " DST" +Rule Belgium 1936 only - Apr 19 2:00s 1:00 " DST" +Rule Belgium 1937 only - Apr 4 2:00s 1:00 " DST" +Rule Belgium 1938 only - Mar 27 2:00s 1:00 " DST" +Rule Belgium 1939 only - Apr 16 2:00s 1:00 " DST" +Rule Belgium 1939 only - Nov 19 2:00s 0 - +Rule Belgium 1945 only - Apr 2 2:00s 1:00 " DST" +Rule Belgium 1945 only - Sep 16 2:00s 0 - +Rule Belgium 1946 only - May 19 2:00s 1:00 " DST" +Rule Belgium 1946 only - Oct 7 2:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Brussels 0:17:20 - LMT 1880 + 0:17 - BST 1892 May 1 12:00 + 0:00 - WET 1914 Aug 4 + 1:00 M-Eur MET%s 1919 Mar 1 23:00 + 0:00 Belgium WET%s 1940 Feb 24 23:00 + 1:00 M-Eur MET%s 1945 Apr 2 2:00 + 1:00 Belgium MET%s 1977 Apr 3 2:00 + 1:00 M-Eur MET%s + +# Bosnia and Herzegovina +# They switched from the Julian to the Gregorian calendar on 1918 Mar 18. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Sarajevo 1:13:40 - LMT 1884 + 1:00 - MET 1941 Apr 18 23:00 + 1:00 M-Eur MET%s 1945 May 8 2:00s + 1:00 1:00 "MET DST" 1945 Sep 16 2:00s + 1:00 - MET 1983 Mar 27 2:00s + 1:00 M-Eur MET%s + +# Bulgaria +# Part switched from the Julian to the Gregorian calendar on 1915 Nov 14; +# the rest switched on 1920 Sep 17. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Bulg 1979 only - Mar 31 23:00 1:00 " DST" +Rule Bulg 1979 only - Oct 1 1:00 0 - +Rule Bulg 1980 1982 - Apr Sat<=7 23:00 1:00 " DST" +Rule Bulg 1980 only - Sep 29 1:00 0 - +Rule Bulg 1981 only - Sep 27 2:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Sofia 1:33:16 - LMT 1880 + 1:57 - TST 1894 Nov 30 + 2:00 - EET 1942 Nov 2 3:00 + 1:00 M-Eur MET%s 1945 Apr 2 3:00 + 2:00 - EET 1979 Mar 31 23:00 + 2:00 Bulg EET%s 1982 Sep 26 2:00 + 2:00 M-Eur EET%s + +# Croatia +# They switched from the Julian to the Gregorian calendar on 1918 Mar 18. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Zagreb 1:03:52 - LMT 1884 + 1:00 - MET 1941 Apr 18 23:00 + 1:00 M-Eur MET%s 1945 May 8 2:00s + 1:00 1:00 "MET DST" 1945 Sep 16 2:00s + 1:00 - MET 1983 Mar 27 2:00s + 1:00 M-Eur MET%s + +# Czech Republic +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Czech 1944 only - Sep 17 2:00s 0 - +Rule Czech 1945 only - Apr 8 2:00s 1:00 " DST" +Rule Czech 1945 only - Nov 18 2:00s 0 - +Rule Czech 1946 only - May 6 2:00s 1:00 " DST" +Rule Czech 1946 1949 - Oct Sun>=1 2:00s 0 - +Rule Czech 1947 only - Apr 20 2:00s 1:00 " DST" +Rule Czech 1948 only - Apr 18 2:00s 1:00 " DST" +Rule Czech 1949 only - Apr 9 2:00s 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Prague 0:57:44 - LMT 1850 + 0:58 - PMT 1891 Oct # Prague Mean Time + 1:00 M-Eur MET%s 1944 Sep 17 2:00s + 1:00 Czech MET%s 1979 Apr 1 2:00 + 1:00 M-Eur MET%s + +# Denmark +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Denmark 1916 only - May 14 23:00 1:00 " DST" +Rule Denmark 1916 only - Sep 30 23:00 0 - +Rule Denmark 1940 only - May 15 0:00 1:00 " DST" +Rule Denmark 1945 only - Apr 2 2:00s 1:00 " DST" +Rule Denmark 1945 only - Aug 15 2:00s 0 - +Rule Denmark 1946 only - May 1 2:00s 1:00 " DST" +Rule Denmark 1946 only - Sep 1 2:00s 0 - +Rule Denmark 1947 only - May 4 2:00s 1:00 " DST" +Rule Denmark 1947 only - Aug 10 2:00s 0 - +Rule Denmark 1948 only - May 9 2:00s 1:00 " DST" +Rule Denmark 1948 only - Aug 8 2:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Copenhagen 0:50:20 - LMT 1890 + 0:50 - CMT 1894 # Copenhagen Mean Time + 1:00 Denmark MET%s 1942 Nov 2 2:00s + 1:00 M-Eur MET%s 1945 Apr 2 2:00 + 1:00 Denmark MET%s 1980 Apr 6 2:00 + 1:00 M-Eur MET%s +Zone Atlantic/Faeroe 0:27:04 - LMT 1908 Jan 11 # Torshavn + 0:00 - WET 1981 Mar 29 1:00 + 0:00 W-Eur WET%s +Zone America/Scoresbysund -1:29:00 - LMT 1916 Jul 28 + -2:00 - MGT 1980 Apr 6 2:00 + -2:00 M-Eur MGT%s 1981 Mar 29 + -1:00 M-Eur EGT%s +Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 + -3:00 - WGT 1980 Apr 6 2:00 + -3:00 M-Eur WGT%s +Zone America/Thule -4:35:08 - LMT 1916 Jul 28 + -4:00 - AST + +# Estonia +# They switched from the Julian to the Gregorian calendar on 1918 Feb 15. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Tallinn 1:39:00 - LMT 1880 + 1:39 - LST 1918 Feb + 1:00 M-Eur MET%s 1919 Jul + 1:39 - LST 1921 May + 2:00 - EET 1940 Aug 6 + 3:00 - MSK 1941 Sep 15 + 1:00 M-Eur MET%s 1944 Sep 22 + 3:00 Russia MS%s 1989 Mar 26 2:00 + 2:00 M-Eur MET%s + +# Finland +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Finland 1921 only - May 1 0:00 0 - +Rule Finland 1942 only - Apr 3 0:00 1:00 " DST" +Rule Finland 1942 only - Oct 3 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Helsinki 1:39:52 - LMT 1878 May 31 + 1:40 - HMT 1921 May # Helsinki Mean Time + 2:00 Finland EET%s 1981 Mar 29 2:00 + 2:00 M-Eur EET%s + +# France +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule France 1911 only - Mar 11 0:00 0 - +Rule France 1916 only - Jun 14 23:00s 1:00 " DST" +Rule France 1916 1919 - Oct Sun>=7 23:00s 0 - +Rule France 1917 only - Mar 24 23:00s 1:00 " DST" +Rule France 1918 only - Mar 9 23:00s 1:00 " DST" +Rule France 1919 only - Mar 1 23:00s 1:00 " DST" +Rule France 1920 only - Feb 14 23:00s 1:00 " DST" +Rule France 1920 only - Oct 23 23:00s 0 - +Rule France 1921 only - Mar 14 23:00s 1:00 " DST" +Rule France 1921 only - Oct 25 23:00s 0 - +Rule France 1922 only - Mar 25 23:00s 1:00 " DST" +Rule France 1922 1938 - Oct Sat>=1 23:00s 0 - +Rule France 1923 only - May 26 23:00s 1:00 " DST" +Rule France 1924 only - Mar 29 23:00s 1:00 " DST" +Rule France 1925 only - Apr 4 23:00s 1:00 " DST" +Rule France 1926 only - Apr 17 23:00s 1:00 " DST" +Rule France 1927 only - Apr 9 23:00s 1:00 " DST" +Rule France 1928 only - Apr 14 23:00s 1:00 " DST" +Rule France 1929 only - Apr 20 23:00s 1:00 " DST" +Rule France 1930 only - Apr 12 23:00s 1:00 " DST" +Rule France 1931 only - Apr 18 23:00s 1:00 " DST" +Rule France 1932 only - Apr 2 23:00s 1:00 " DST" +Rule France 1933 only - Mar 25 23:00s 1:00 " DST" +Rule France 1934 only - Apr 7 23:00s 1:00 " DST" +Rule France 1935 only - Mar 30 23:00s 1:00 " DST" +Rule France 1936 only - Apr 18 23:00s 1:00 " DST" +Rule France 1937 only - Apr 3 23:00s 1:00 " DST" +Rule France 1938 only - Mar 26 23:00s 1:00 " DST" +Rule France 1939 only - Apr 15 23:00s 1:00 " DST" +Rule France 1939 only - Nov 18 23:00s 0 - +Rule France 1940 only - Feb 25 2:00 1:00 " DST" +# The French rules for 1941-1944 were not used in Paris, +# but were used in other places (e.g. Monaco). +Rule France 1941 only - May 5 0:00 2:00 " DDST" +Rule France 1941 only - Oct 6 1:00 1:00 " DST" +Rule France 1942 only - Mar 8 0:00 2:00 " DDST" +Rule France 1942 only - Nov 2 3:00 1:00 " DST" +Rule France 1943 only - Mar 29 2:00 2:00 " DDST" +Rule France 1943 only - Nov 4 3:00 1:00 " DST" +Rule France 1944 only - Apr 3 2:00 2:00 " DDST" +Rule France 1944 only - Oct 8 1:00 1:00 " DST" +Rule France 1945 only - Apr 2 2:00 2:00 " DDST" +Rule France 1945 only - Sep 16 3:00 0 - +# From Paul Eggert =1 2:00 + 1:00 M-Eur MET%s + +# Germany +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Germany 1945 only - Apr 2 2:00s 1:00 " DST" +Rule Germany 1945 only - May 24 2:00 2:00 " DDST" +Rule Germany 1945 only - Sep 24 3:00 1:00 " DST" +Rule Germany 1945 only - Nov 18 2:00s 0 - +Rule Germany 1946 only - Apr 14 2:00s 1:00 " DST" +Rule Germany 1946 1949 - Oct Sun>=1 2:00s 0 - +Rule Germany 1947 only - Apr 6 2:00s 1:00 " DST" +Rule Germany 1947 only - May 11 2:00s 2:00 " DDST" +Rule Germany 1947 only - Jun 29 3:00 1:00 " DST" +Rule Germany 1948 only - Apr 18 2:00s 1:00 " DST" +Rule Germany 1949 only - Apr 10 2:00s 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Berlin 0:53:28 - LMT 1893 Apr + 1:00 M-Eur MET%s 1945 Apr 2 2:00 + 1:00 Germany MET%s 1980 Apr 6 2:00 + 1:00 M-Eur MET%s + +# Gibraltar +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Gibraltar -0:21:24 - LMT 1880 Aug 2 + 0:00 GB-Eire %s 1957 Apr 14 2:00 + 1:00 - MET 1982 Mar 28 2:00 + 1:00 M-Eur MET%s + +# Greece +# They adopted the Julian calendar in 1846. +# Part switched to the Gregorian calendar on 1916 Jul 28. +# The rest switched on 1920 Mar 18. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Greece 1916 only - July 28 0:01 0 - +Rule Greece 1932 only - Jul 7 0:00 1:00 " DST" +Rule Greece 1932 only - Sep 1 0:00 0 - +Rule Greece 1941 only - Apr 7 0:00 1:00 " DST" +Rule Greece 1942 only - Nov 2 3:00 0 - +Rule Greece 1943 only - Mar 30 0:00 1:00 " DST" +Rule Greece 1943 only - Oct 4 0:00 0 - +Rule Greece 1952 only - Jul 1 0:00 1:00 " DST" +Rule Greece 1952 only - Nov 2 0:00 0 - +Rule Greece 1975 only - Apr 12 0:00s 1:00 " DST" +Rule Greece 1975 only - Nov 26 0:00s 0 - +Rule Greece 1976 only - Apr 11 2:00s 1:00 " DST" +Rule Greece 1976 only - Oct 10 2:00s 0 - +Rule Greece 1977 1978 - Apr Sun>=1 2:00s 1:00 " DST" +Rule Greece 1977 only - Sep 26 2:00s 0 - +Rule Greece 1978 only - Sep 24 4:00 0 - +Rule Greece 1979 only - Apr 1 9:00 1:00 " DST" +Rule Greece 1979 only - Sep 29 2:00 0 - +Rule Greece 1980 only - Apr 1 0:00 1:00 " DST" +Rule Greece 1980 only - Sep 28 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14 + 1:35 - AMT 1916 Jul 28 0:01 # Athens MT + 2:00 Greece EET%s 1941 Apr 30 + 1:00 Greece MET%s 1944 Apr 4 + 2:00 Greece EET%s 1981 Mar 29 2:00 + 2:00 M-Eur EET%s + +# Hungary +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Hungary 1918 only - Sep 29 2:00s 0 - +Rule Hungary 1919 only - Apr 15 3:00 1:00 " DST" +Rule Hungary 1919 only - Sep 15 3:00 0 - +Rule Hungary 1920 only - Apr 5 3:00 1:00 " DST" +Rule Hungary 1920 only - Sep 30 3:00 0 - +Rule Hungary 1945 only - May 1 23:00 1:00 " DST" +Rule Hungary 1945 only - Nov 3 0:00 0 - +Rule Hungary 1946 only - Mar 31 2:00s 1:00 " DST" +Rule Hungary 1946 1949 - Oct Sun>=1 2:00s 0 - +Rule Hungary 1947 1949 - Apr Sun>=4 2:00s 1:00 " DST" +Rule Hungary 1950 only - Apr 17 2:00s 1:00 " DST" +Rule Hungary 1950 only - Oct 23 2:00s 0 - +Rule Hungary 1954 1955 - May 23 0:00 1:00 " DST" +Rule Hungary 1954 1955 - Oct 3 0:00 0 - +Rule Hungary 1956 only - Jun Sun>=1 0:00 1:00 " DST" +Rule Hungary 1956 only - Sep lastSun 0:00 0 - +Rule Hungary 1957 only - Jun Sun>=1 1:00 1:00 " DST" +Rule Hungary 1957 only - Sep lastSun 3:00 0 - +Rule Hungary 1980 only - Apr 6 1:00 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Budapest 1:16:20 - LMT 1890 Oct + 1:00 M-Eur MET%s 1918 Jul + 1:00 Hungary MET%s 1941 Apr 6 2:00 + 1:00 M-Eur MET%s 1945 May 1 23:00 + 1:00 Hungary MET%s 1980 Sep 28 2:00s + 1:00 M-Eur MET%s + +# Iceland +# +# From Adam David (November 6, 1993): +# The name of the timezone in Iceland for system / mail / news purposes is GMT. +# +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Iceland 1908 only - Jan 1 0:00 0 S +Rule Iceland 1917 1918 - Feb 20 2:00 1:00 D +Rule Iceland 1917 only - Oct 25 2:00 0 S +Rule Iceland 1918 1919 - Nov 15 2:00 0 S +Rule Iceland 1919 only - Feb 19 2:00 1:00 D +Rule Iceland 1921 only - Mar 19 2:00 1:00 D +Rule Iceland 1921 only - Jun 22 2:00 0 S +Rule Iceland 1941 1942 - Mar Sat>=1 2:00 1:00 D +Rule Iceland 1941 1942 - Jul 2 2:00 0 S +Rule Iceland 1943 1946 - Mar Sun>=1 2:00 1:00 D +Rule Iceland 1943 1948 - Oct Sun>=22 2:00 0 S +Rule Iceland 1947 1962 - Apr Sun>=1 2:00 1:00 D +Rule Iceland 1949 only - Oct 30 2:00 0 S +Rule Iceland 1950 only - Oct 22 2:00 0 S +# From Paul Eggert =23 1:00s 0 S +Rule Iceland 1963 1968 - Apr Sun>=1 1:00s 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 + -1:28 - RMT 1908 # Reykjavik Mean Time + -1:00 Iceland I%sT 1968 Oct 27 1:00s + 0:00 - GMT + +# Italy +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Italy 1893 only - Nov 1 0:00 0 S +Rule Italy 1916 only - Jun 4 0:00 1:00 " DST" +Rule Italy 1916 only - Oct 1 0:00 0 - +Rule Italy 1917 only - Apr 1 0:00 1:00 " DST" +Rule Italy 1917 only - Sep 30 0:00 0 - +Rule Italy 1918 only - Mar 10 0:00 1:00 " DST" +Rule Italy 1918 1919 - Oct Sun>=1 0:00 0 - +Rule Italy 1919 only - Mar 2 0:00 1:00 " DST" +Rule Italy 1920 only - Mar 21 0:00 1:00 " DST" +Rule Italy 1920 only - Sep 19 0:00 0 - +Rule Italy 1940 only - Jun 15 0:00 1:00 " DST" +Rule Italy 1945 only - Apr 2 2:00 1:00 " DST" +Rule Italy 1945 only - Sep 17 0:00 0 - +Rule Italy 1946 only - Mar 17 2:00s 1:00 " DST" +Rule Italy 1946 only - Oct 6 2:00s 0 - +Rule Italy 1947 only - Mar 16 0:00s 1:00 " DST" +Rule Italy 1947 only - Oct 5 0:00s 0 - +Rule Italy 1948 only - Feb 29 2:00s 1:00 " DST" +Rule Italy 1948 only - Oct 3 2:00s 0 - +Rule Italy 1966 1968 - May Sun>=22 0:00 1:00 " DST" +Rule Italy 1966 1969 - Sep Sun>=22 0:00 0 - +Rule Italy 1969 only - Jun 1 0:00 1:00 " DST" +Rule Italy 1970 only - May 31 0:00 1:00 " DST" +Rule Italy 1970 only - Sep lastSun 0:00 0 - +Rule Italy 1971 1972 - May Sun>=22 0:00 1:00 " DST" +Rule Italy 1971 only - Sep lastSun 1:00 0 - +Rule Italy 1972 only - Oct 1 0:00 0 - +Rule Italy 1973 only - Jun 3 0:00 1:00 " DST" +Rule Italy 1973 1974 - Sep lastSun 0:00 0 - +Rule Italy 1974 only - May 26 0:00 1:00 " DST" +Rule Italy 1975 only - Jun 1 0:00s 1:00 " DST" +Rule Italy 1975 1977 - Sep lastSun 0:00s 0 - +Rule Italy 1976 only - May 30 0:00s 1:00 " DST" +Rule Italy 1977 1979 - May Sun>=22 0:00s 1:00 " DST" +Rule Italy 1978 only - Oct 1 0:00s 0 - +Rule Italy 1979 only - Sep 30 0:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Rome 0:49:56 - LMT 1866 Sep 22 + 0:50 - RMT 1893 Nov # Rome Mean Time + 1:00 Italy MET%s 1942 Nov 2 2:00s + 1:00 M-Eur MET%s 1945 Apr 2 2:00s + 1:00 Italy MET%s 1980 Apr 6 2:00 + 1:00 M-Eur MET%s +# Vatican is identical to Europe/Rome; San Marino is like Europe/Rome. + +# Latvia +# They switched from the Julian to the Gregorian calendar on 1918 Feb 15. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Riga 1:36:24 - LMT 1880 + 1:36 - LST 1918 Apr 15 2:00 + 1:36 M-Eur LST%s 1919 Apr 1 2:00 + 1:36 1:00 "LST DST" 1919 May 22 3:00 + 1:36 - LST 1926 May 11 + 2:00 - EET 1940 Aug 5 + 3:00 - MSK 1941 Jul + 1:00 M-Eur MET%s 1944 Aug 8 + 3:00 Russia MS%s 1991 Sep 29 3:00 + 2:00 M-Eur MET%s + +# Liechtenstein +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Vaduz 0:30:04 - LMT 1894 Jun + 1:00 - MET 1981 Mar 29 2:00 + 1:00 M-Eur MET%s + +# Lithuania +# They switched from the Julian to the Gregorian calendar on 1918 Feb 15. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Vilnius 1:41:16 - LMT 1880 + 1:24 - LST 1917 # Kaunas + 1:36 - LST 1919 Oct 10 + 1:00 - MET 1920 Jul 12 + 2:00 - EET 1920 Oct 9 + 1:00 - MET 1940 Aug 3 + 3:00 - MSK 1941 Jun 24 + 1:00 M-Eur MET%s 1944 Aug + 3:00 Russia MS%s 1991 Sep 29 3:00 + 2:00 M-Eur MET%s + +# Luxembourg +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Lux 1904 only - Jun 1 0:00 0 - +Rule Lux 1916 only - May 14 23:00 1:00 " DST" +Rule Lux 1916 only - Oct 1 1:00 0 - +Rule Lux 1917 only - Apr 28 23:00 1:00 " DST" +Rule Lux 1917 only - Sep 17 1:00 0 - +Rule Lux 1918 only - Apr Mon>=15 2:00s 1:00 " DST" +Rule Lux 1918 only - Sep Mon>=15 2:00s 0 - +Rule Lux 1919 only - Mar 1 23:00 1:00 " DST" +Rule Lux 1919 only - Oct 5 3:00 0 - +Rule Lux 1920 only - Feb 14 23:00 1:00 " DST" +Rule Lux 1920 only - Oct 24 2:00 0 - +Rule Lux 1921 only - Mar 14 23:00 1:00 " DST" +Rule Lux 1921 only - Oct 26 2:00 0 - +Rule Lux 1922 only - Mar 25 23:00 1:00 " DST" +Rule Lux 1922 only - Oct Sun>=2 1:00 0 - +Rule Lux 1923 only - Apr 21 23:00 1:00 " DST" +Rule Lux 1923 only - Oct Sun>=2 2:00 0 - +Rule Lux 1924 only - Mar 29 23:00 1:00 " DST" +Rule Lux 1924 1928 - Oct Sun>=2 1:00 0 - +Rule Lux 1925 only - Apr 5 23:00 1:00 " DST" +Rule Lux 1926 only - Apr 17 23:00 1:00 " DST" +Rule Lux 1927 only - Apr 9 23:00 1:00 " DST" +Rule Lux 1928 only - Apr 14 23:00 1:00 " DST" +Rule Lux 1929 only - Apr 20 23:00 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun + 1:00 Lux MET%s 1918 Nov 25 + 0:00 Lux WET%s 1929 Oct 6 2:00s + 0:00 Belgium WET%s 1940 May 14 3:00 + 1:00 M-Eur WET%s 1944 Sep 18 3:00 + 1:00 Belgium MET%s 1979 Apr 1 2:00 + 1:00 M-Eur MET%s + +# The Former Yugoslav Republic of Macedonia +# They switched from the Julian to the Gregorian calendar on 1918 Mar 18. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Skopje 1:25:44 - LMT 1884 + 1:00 - MET 1941 Apr 18 23:00 + 1:00 M-Eur MET%s 1945 May 8 2:00s + 1:00 1:00 "MET DST" 1945 Sep 16 2:00s + 1:00 - MET 1983 Mar 27 2:00s + 1:00 M-Eur MET%s + +# Malta +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Malta 1973 only - Mar 31 0:00s 1:00 " DST" +Rule Malta 1973 only - Sep 29 0:00s 0 - +Rule Malta 1974 only - Apr 21 0:00s 1:00 " DST" +Rule Malta 1974 only - Sep 16 0:00s 0 - +Rule Malta 1975 1979 - Apr Sun>=15 2:00 1:00 " DST" +Rule Malta 1975 1980 - Sep Sun>=15 2:00 0 - +Rule Malta 1980 only - Mar 31 2:00 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 # Valletta + 1:00 Italy MET%s 1942 Nov 2 2:00s + 1:00 M-Eur MET%s 1945 Apr 2 2:00s + 1:00 Italy MET%s 1973 Mar 31 + 1:00 Malta MET%s 1981 Mar 29 2:00s + 1:00 M-Eur MET%s + +# Moldova +# They switched from the Julian to the Gregorian calendar on 1919 Mar 18. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Chisinau 1:55:20 - LMT 1924 May 2 + 2:00 - EET 1930 Jun 21 + 3:00 - MSK 1981 Apr + 3:00 Russia MS%s 1991 Sep 29 2:00s + 2:00 M-Eur EET%s + +# Monaco +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15 + 0:09 - PMT 1911 Mar 11 # Paris Mean Time + 0:00 France WET%s 1945 Sep 16 3:00 + 1:00 France MET%s 1977 Apr Sun>=1 2:00 + 1:00 M-Eur MET%s + +# Netherlands +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Neth 1892 only - May 1 0:00 0 AMT +Rule Neth 1916 only - May 1 0:00 1:00 NST +Rule Neth 1916 only - Oct 1 0:00 0 AMT +Rule Neth 1917 only - Apr 16 2:00s 1:00 NST +Rule Neth 1917 only - Sep 17 2:00s 0 AMT +Rule Neth 1918 1921 - Apr Mon>=1 2:00s 1:00 NST +Rule Neth 1918 1921 - Sep Mon>=24 2:00s 0 AMT +Rule Neth 1922 only - Mar 26 2:00s 1:00 NST +Rule Neth 1922 1939 - Oct Sun>=2 2:00s 0 AMT +Rule Neth 1923 only - Jun 1 2:00s 1:00 NST +Rule Neth 1924 only - Mar 30 2:00s 1:00 NST +Rule Neth 1925 only - Jun 5 2:00s 1:00 NST +Rule Neth 1926 1931 - May 15 2:00s 1:00 NST +Rule Neth 1932 only - May 22 2:00s 1:00 NST +Rule Neth 1933 1936 - May 15 2:00s 1:00 NST +Rule Neth 1937 only - May 22 2:00s 1:00 NST +Rule Neth 1938 1939 - May 15 2:00s 1:00 NST +Rule Neth 1945 only - Apr 2 2:00s 1:00 - +Rule Neth 1945 only - May 20 2:00s 0 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Amsterdam 0:19:36 - LMT 1892 May + 0:20 Neth %s 1937 Jul + 1:20 Neth %s 1940 May 16 2:00 + 1:00 M-Eur MET%s 1945 Apr 2 2:00 + 1:00 Neth MET%s 1977 Apr Sun>=1 2:00 + 1:00 M-Eur MET%s + +# Norway +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Norway 1892 only - May 1 0:00 0 - +Rule Norway 1916 only - May 22 1:00 1:00 " DST" +Rule Norway 1916 only - Sep 30 0:00 0 - +Rule Norway 1945 only - Apr 2 2:00s 1:00 " DST" +Rule Norway 1945 only - Oct 1 2:00s 0 - +Rule Norway 1959 1964 - Mar Sun>=15 2:00s 1:00 " DST" +Rule Norway 1959 1965 - Sep Sun>=15 2:00s 0 - +Rule Norway 1965 only - Apr 25 2:00s 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Oslo 0:43:00 - LMT 1895 + 1:00 Norway MET%s 1940 Aug 10 23:00 + 1:00 M-Eur MET%s 1945 Apr 2 2:00 + 1:00 Norway MET%s 1980 Apr 6 2:00 + 1:00 M-Eur MET%s +# Svalbard is like Europe/Oslo. +# +# Jan Mayen +# no information + +# Poland +# Austrian and German Poland switched from the Julian to the Gregorian calendar +# on 1582 Oct 15. Russian Poland switched on 1918 Jan 14. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Poland 1918 1919 - Sep 16 2:00s 0 - +Rule Poland 1919 only - Apr 15 2:00s 1:00 " DST" +Rule Poland 1944 only - Oct 4 2:00 0 - +Rule Poland 1945 only - Apr 29 0:00 1:00 " DST" +Rule Poland 1945 only - Nov 1 0:00 0 - +Rule Poland 1946 only - Apr 14 0:00 1:00 " DST" +Rule Poland 1946 only - Sep 7 0:00 0 - +Rule Poland 1947 only - May 4 0:00 1:00 " DST" +Rule Poland 1947 1948 - Oct Sun>=1 0:00 0 - +Rule Poland 1948 only - Apr 18 0:00 1:00 " DST" +Rule Poland 1957 only - Jun 2 1:00s 1:00 " DST" +Rule Poland 1957 1958 - Sep lastSun 1:00s 0 - +Rule Poland 1958 only - Mar 30 1:00s 1:00 " DST" +Rule Poland 1959 only - May 31 1:00s 1:00 " DST" +Rule Poland 1959 1961 - Oct Sun>=1 1:00s 0 - +Rule Poland 1960 only - Apr 3 1:00s 1:00 " DST" +Rule Poland 1961 1964 - May Sun>=25 1:00s 1:00 " DST" +Rule Poland 1962 1964 - Sep lastSun 1:00s 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Warsaw 1:24:00 - LMT 1880 + 1:24 - WMT 1915 Aug 5 # Warsaw Mean Time + 1:00 M-Eur MET%s 1918 Sep 16 3:00 + 2:00 Poland EET%s 1922 Jun + 1:00 Poland MET%s 1940 Jun 23 2:00 + 1:00 M-Eur MET%s 1944 Oct + 1:00 Poland MET%s 1977 Apr 3 1:00 + 1:00 W-Eur MET%s +# This link is for backward compatibility with the old naming convention. +Link Europe/Warsaw Poland + +# Portugal +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Port 1911 only - May 24 0:00 0 - +Rule Port 1916 only - Jun 17 23:00 1:00 " DST" +Rule Port 1916 only - Nov 1 1:00 0 - +Rule Port 1917 only - Feb 28 23:00s 1:00 " DST" +Rule Port 1917 1921 - Oct 14 23:00s 0 - +Rule Port 1918 only - Mar 1 23:00s 1:00 " DST" +Rule Port 1919 only - Feb 28 23:00s 1:00 " DST" +Rule Port 1920 only - Feb 29 23:00s 1:00 " DST" +Rule Port 1921 only - Feb 28 23:00s 1:00 " DST" +Rule Port 1924 only - Apr 16 23:00s 1:00 " DST" +Rule Port 1924 only - Oct 14 23:00s 0 - +Rule Port 1926 only - Apr 17 23:00s 1:00 " DST" +Rule Port 1926 1929 - Oct Sat>=1 23:00s 0 - +Rule Port 1927 only - Apr 9 23:00s 1:00 " DST" +Rule Port 1928 only - Apr 14 23:00s 1:00 " DST" +Rule Port 1929 only - Apr 20 23:00s 1:00 " DST" +Rule Port 1931 only - Apr 18 23:00s 1:00 " DST" +Rule Port 1931 1932 - Oct Sat>=1 23:00s 0 - +Rule Port 1932 only - Apr 2 23:00s 1:00 " DST" +Rule Port 1934 only - Apr 4 23:00s 1:00 " DST" +Rule Port 1934 1938 - Oct Sat>=1 23:00s 0 - +Rule Port 1935 only - Apr 30 23:00s 1:00 " DST" +Rule Port 1936 only - Apr 18 23:00s 1:00 " DST" +Rule Port 1937 only - Apr 3 23:00s 1:00 " DST" +Rule Port 1938 only - Mar 26 23:00s 1:00 " DST" +Rule Port 1939 only - Apr 15 23:00s 1:00 " DST" +Rule Port 1939 only - Nov 18 23:00s 0 - +Rule Port 1940 only - Feb 24 23:00s 1:00 " DST" +Rule Port 1940 only - Oct 7 23:00s 0 - +Rule Port 1941 only - Apr 5 23:00s 1:00 " DST" +Rule Port 1941 only - Oct 5 23:00s 0 - +Rule Port 1942 1945 - Mar Sat>=8 23:00s 1:00 " DST" +Rule Port 1942 only - Apr 25 22:00s 2:00 " DDST" +Rule Port 1942 only - Aug 15 22:00s 1:00 " DST" +Rule Port 1942 1945 - Oct Sat>=24 23:00s 0 - +Rule Port 1943 only - Apr 17 22:00s 2:00 " DDST" +Rule Port 1943 1945 - Aug Sat>=25 22:00s 1:00 " DST" +Rule Port 1944 1945 - Apr Sat>=21 22:00s 2:00 " DDST" +Rule Port 1946 only - Apr Sat>=1 23:00s 1:00 " DST" +Rule Port 1946 only - Oct Sat>=1 23:00s 0 - +Rule Port 1947 1965 - Apr Sun>=1 2:00s 1:00 " DST" +Rule Port 1947 1965 - Oct Sun>=1 2:00s 0 - +Rule Port 1977 only - Mar 27 0:00s 1:00 " DST" +Rule Port 1977 only - Sep 25 0:00s 0 - +Rule Port 1978 1979 - Apr Sun>=1 0:00s 1:00 " DST" +Rule Port 1978 only - Oct 1 0:00s 0 - +Rule Port 1979 1982 - Sep lastSun 1:00s 0 - +Rule Port 1980 only - Mar lastSun 0:00s 1:00 " DST" +Rule Port 1981 1982 - Mar lastSun 1:00s 1:00 " DST" +Rule Port 1983 only - Mar lastSun 2:00s 1:00 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Lisbon -0:36:32 - LMT 1884 + -0:37 - LMT 1911 May 24 # Lisbon Mean Time + 0:00 Port WET%s 1966 Apr 3 2:00 + 1:00 - MET 1976 Sep 26 1:00 + 0:00 Port WET%s 1983 Sep 25 1:00s + 0:00 W-Eur WET%s 1992 Sep 27 1:00s +# From Rui Pedro Salgueiro (November 12, 1992): +# Portugal has recently (September, 27) changed timezone +# (from WET to MET or CET) to harmonize with EEC. + 1:00 M-Eur MET%s +# We don't know what happened to Madeira or the Azores, +# so we'll just use Shanks for now. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada + -1:55 - HMT 1911 May 24 # Horta Mean Time + -2:00 Port ACT%s 1966 Apr 3 2:00 + -1:00 - ACT 1977 Mar 27 + -1:00 - ACT 1983 Sep 25 1:00s + -1:00 W-Eur ACT%s +Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal + -1:08 - FMT 1911 May 24 # Funchal Mean Time + -1:00 Port ACT%s 1966 Apr 3 2:00 + 0:00 - WET 1977 Mar 27 + 0:00 Port WET%s 1983 Sep 25 1:00s + 0:00 W-Eur WET%s +# This link is for backward compatibility with the old naming convention. +Link Europe/Lisbon Portugal + +# Slovakia +Link Europe/Prague Europe/Bratislava + +# Romania +# Catholic Romania switched from the Julian to the Gregorian calendar on +# on 1919 Mar 18. Greek Orthodox Romania switched on 1920 Mar 18. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Romania 1931 only - Jul 24 0:00 0 - +Rule Romania 1932 only - May 22 0:00s 1:00 " DST" +Rule Romania 1932 1939 - Oct Sun>=1 0:00s 0 - +Rule Romania 1933 1939 - Apr Sun>=2 0:00s 1:00 " DST" +Rule Romania 1979 only - May 27 0:00 1:00 " DST" +Rule Romania 1979 only - Sep lastSun 0:00 0 - +Rule Romania 1980 only - Apr 5 23:00 1:00 " DST" +Rule Romania 1980 only - Sep lastSun 1:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct + 1:44 - BMT 1931 Jul 24 # Bucharest MT + 2:00 Romania EET%s 1981 Mar 29 2:00s + 2:00 M-Eur EET%s + +# Russia +# From Paul Eggert (November 18, 1993): +# Moscow and Novosibirsk time zone names, and Moscow rules after 1991, +# are from Andrew A. Chernov . +# I invented the other time zone names. +# The rest is from Shanks; it's probably wrong after 1991. +# We're not sure whether St Petersburg switched in step with Moscow after 1991; +# it might be a useless name, so we'll comment it out for now. +# +# From Shanks (1991): +# Western Russia switched from the Julian to the Gregorian calendar +# on 1918 Jan 14. Eatern Russia switched on 1920 Mar 18. +# In 1929 the Soviet Union instituted a 5 day week; in 1932 it instituted +# a 6 day week; on 1940 Jun 27 it returned to the Gregorian week. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +#Zone Europe/St_Petersburg 2:30:20 - LMT 1880 +# 2:01 Russia LST%s 1919 Jul 1 2:00 +# 3:00 Russia MS%s 1922 Oct +# 2:00 - EET 1930 Jun 21 +# 3:00 Russia MS%s 1991 Sep 29 3:00 +# 2:00 Russia SPS%s +Zone Europe/Moscow 2:30:20 - LMT 1880 + 2:31 Russia LST%s 1919 Jul 1 2:00 + 3:00 Russia MS%s 1922 Oct + 2:00 - EET 1930 Jun 21 + 3:00 Russia MS%s 1991 Mar lastSun 2:00s + 2:00 1:00 "EET DST" 1991 Sep lastSun 2:00s + 2:00 - EET 1992 Jan 19 2:00s + 3:00 Russia MS%s +# This link is for backward compatibility with the old naming convention. +Link Europe/Moscow Moscow +Zone Asia/Sverdlovsk 4:02:34 - LMT 1924 May 2 + 4:00 - SSK 1957 Mar + 5:00 Russia SS%s 1991 Sep 29 3:00 + 4:00 Russia SS%s +Zone Asia/Omsk 4:53:36 - LMT 1924 May 2 + 5:00 - TSK 1957 Mar + 6:00 Russia TS%s 1991 Sep 29 3:00 + 5:00 Russia OS%s +Zone Asia/Novosibirsk 5:31:40 - LMT 1924 May 2 + 6:00 - NSK 1957 Mar + 7:00 Russia NS%s 1991 Sep 29 3:00 + 6:00 Russia NS%s +Zone Asia/Irkutsk 6:57:20 - LMT 1880 + 6:57 - LST 1924 May 2 + 7:00 - ISK 1957 Mar + 8:00 Russia IS%s 1991 Sep 29 3:00 + 7:00 Russia IS%s +Zone Asia/Yakutsk 8:38:40 - LMT 1924 May 2 + 8:00 - YSK 1957 Mar + 9:00 Russia YS%s 1991 Sep 29 3:00 + 8:00 Russia YS%s +Zone Asia/Vladivostok 8:47:44 - LMT 1880 + 8:48 - LST 1924 May 2 + 9:00 - VSK 1957 Mar + 10:00 Russia VS%s 1991 Sep 29 3:00 + 9:00 Russia VS%s +# MSK is taken; settle for GSK. +Zone Asia/Magadan 10:03:12 - LMT 1924 May 2 + 10:00 - GSK 1957 Mar + 11:00 Russia GS%s 1991 Sep 29 3:00 + 10:00 Russia GS%s +# This name should be Asia/Petropavlovsk-Kamchatski, but that's too long. +Zone Asia/Kamchatka 10:34:36 - LMT 1924 May 2 + 11:00 - PSK 1957 Mar + 12:00 Russia PS%s 1991 Sep 29 3:00 + 11:00 Russia PS%s +Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2 + 12:00 - ASK 1957 Mar + 13:00 Russia AS%s 1991 Sep 29 3:00 + 12:00 Russia AS%s + +# Serbia +# They switched from the Julian to the Gregorian calendar on 1918 Mar 18. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Belgrade 1:22:00 - LMT 1884 + 1:00 - MET 1941 Apr 18 23:00 + 1:00 M-Eur MET%s 1945 May 8 2:00s + 1:00 1:00 "MET DST" 1945 Sep 16 2:00s + 1:00 - MET 1983 Mar 27 2:00s + 1:00 M-Eur MET%s + +# Slovenia +# They switched from the Julian to the Gregorian calendar on 1918 Mar 18. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Ljubljana 0:58:04 - LMT 1884 + 1:00 - MET 1941 Apr 18 23:00 + 1:00 M-Eur MET%s 1945 May 8 2:00s + 1:00 1:00 "MET DST" 1945 Sep 16 2:00s + 1:00 - MET 1983 Mar 27 2:00s + 1:00 M-Eur MET%s + +# Spain +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Spain 1901 only - Jan 1 0:00 0 - +Rule Spain 1917 only - May 5 23:00s 1:00 " DST" +Rule Spain 1917 1919 - Oct 6 23:00s 0 - +Rule Spain 1918 only - Apr 15 23:00s 1:00 " DST" +Rule Spain 1919 only - Apr 5 23:00s 1:00 " DST" +Rule Spain 1924 only - Apr 16 23:00s 1:00 " DST" +Rule Spain 1924 only - Oct 4 23:00s 0 - +Rule Spain 1926 only - Apr 17 23:00s 1:00 " DST" +Rule Spain 1926 1929 - Oct Sat>=1 23:00s 0 - +Rule Spain 1927 only - Apr 9 23:00s 1:00 " DST" +Rule Spain 1928 only - Apr 14 23:00s 1:00 " DST" +Rule Spain 1929 only - Apr 20 23:00s 1:00 " DST" +Rule Spain 1937 only - May 22 23:00s 1:00 " DST" +Rule Spain 1937 1939 - Oct Sat>=1 23:00s 0 - +Rule Spain 1938 only - Mar 22 23:00s 1:00 " DST" +Rule Spain 1939 only - Apr 15 23:00s 1:00 " DST" +Rule Spain 1940 only - Mar 16 23:00s 1:00 " DST" +Rule Spain 1942 only - May 2 22:00s 2:00 " DDST" +Rule Spain 1942 only - Sep 1 22:00s 1:00 " DST" +Rule Spain 1943 1946 - Apr Sat>=13 22:00s 2:00 " DDST" +Rule Spain 1943 only - Oct 3 22:00s 1:00 " DST" +Rule Spain 1944 only - Oct 10 22:00s 1:00 " DST" +Rule Spain 1945 only - Sep 30 1:00 1:00 " DST" +Rule Spain 1949 only - Apr 30 23:00 1:00 " DST" +Rule Spain 1949 only - Sep 30 1:00 0 - +Rule Spain 1974 1975 - Apr Sat>=13 23:00 1:00 " DST" +Rule Spain 1974 1975 - Oct Sun>=1 1:00 0 - +Rule Spain 1976 only - Mar 27 23:00 1:00 " DST" +Rule Spain 1976 1977 - Sep lastSun 1:00 0 - +Rule Spain 1977 1978 - Apr 2 23:00 1:00 " DST" +Rule Spain 1978 only - Oct 1 1:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Madrid 0:14:44 - LMT 1901 + 0:00 Spain WET%s 1946 Sep 30 + 1:00 Spain MET%s 1979 Apr 1 2:00 + 1:00 M-Eur MET%s +Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C. + -1:00 - ACT 1946 Sep 30 1:00 + 0:00 - WET 1980 Apr 6 0:00s + 0:00 1:00 "WET DST" 1980 Sep 28 0:00s + 0:00 W-Eur WET%s + +# Sweden +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Stockholm 1:12:12 - LMT 1878 May 31 + 1:12 - SMT 1900 Jan 1 1:00 # Stockholm MT + 1:00 - MET 1916 Apr 14 23:00s + 1:00 1:00 "MET DST" 1916 Sep 30 23:00s + 1:00 - MET 1980 Apr 6 2:00 + 1:00 M-Eur MET%s + +# Switzerland +# From Howse (1988), p 82: +# By the end of the 18th century clocks and watches became commonplace +# and their performance improved enormously. Communities began to keep +# mean time in preference to apparent time -- Geneva from 1780 .... +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Swiss 1894 only - Jun 1 0:00 0 - +Rule Swiss 1941 1942 - May Sun>=1 2:00 1:00 " DST" +Rule Swiss 1941 1942 - Oct Sun>=1 0:00 0 " DST" +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12 + 0:30 - SST 1894 Jun # Swiss Standard Time + 1:00 Swiss MET%s 1981 Mar 29 2:00 + 1:00 M-Eur MET%s + +# Turkey +# European Turkey switched to the Gregorian calendar in 1908. +# Asian Turkey switched in 1914. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Turkey 1910 only - Oct 1 0:00 0 - +Rule Turkey 1916 only - May 1 0:00 1:00 " DST" +Rule Turkey 1916 only - Oct 1 0:00 0 - +Rule Turkey 1920 only - Mar 28 0:00 1:00 " DST" +Rule Turkey 1920 only - Oct 25 0:00 0 - +Rule Turkey 1921 only - Apr 3 0:00 1:00 " DST" +Rule Turkey 1921 only - Oct 3 0:00 0 - +Rule Turkey 1922 only - Mar 26 0:00 1:00 " DST" +Rule Turkey 1922 only - Oct 8 0:00 0 - +Rule Turkey 1924 only - May 13 0:00 1:00 " DST" +Rule Turkey 1924 1925 - Oct 1 0:00 0 - +Rule Turkey 1925 only - May 1 0:00 1:00 " DST" +Rule Turkey 1940 only - Dec 1 0:00 1:00 " DST" +Rule Turkey 1941 only - Sep 21 0:00 0 - +Rule Turkey 1942 only - Apr 1 0:00 1:00 " DST" +Rule Turkey 1942 only - Nov 1 0:00 0 - +Rule Turkey 1945 only - Apr 2 0:00 1:00 " DST" +Rule Turkey 1945 only - Oct 8 0:00 0 - +Rule Turkey 1946 only - Jun 1 0:00 1:00 " DST" +Rule Turkey 1946 only - Oct 1 0:00 0 - +Rule Turkey 1947 1948 - Apr Sun>=16 0:00 1:00 " DST" +Rule Turkey 1947 1950 - Oct Sun>=2 0:00 0 - +Rule Turkey 1949 only - Apr 10 0:00 1:00 " DST" +Rule Turkey 1950 only - Apr 19 0:00 1:00 " DST" +Rule Turkey 1951 only - Apr 22 0:00 1:00 " DST" +Rule Turkey 1951 only - Oct 8 0:00 0 - +Rule Turkey 1962 only - Jul 15 0:00 1:00 " DST" +Rule Turkey 1962 only - Oct 8 0:00 0 - +Rule Turkey 1964 only - May 15 0:00 1:00 " DST" +Rule Turkey 1964 only - Oct 1 0:00 0 - +Rule Turkey 1970 1972 - May Sun>=2 0:00 1:00 " DST" +Rule Turkey 1970 1972 - Oct Sun>=2 0:00 0 - +Rule Turkey 1973 only - Jun 3 1:00 1:00 " DST" +Rule Turkey 1973 only - Nov 4 3:00 0 - +Rule Turkey 1974 only - Mar 31 2:00 1:00 " DST" +Rule Turkey 1974 only - Nov 3 5:00 0 - +Rule Turkey 1975 only - Mar 30 0:00 1:00 " DST" +Rule Turkey 1975 1976 - Oct lastSun 0:00 0 - +Rule Turkey 1976 only - Jun 1 0:00 1:00 " DST" +Rule Turkey 1977 1978 - Apr Sun>=1 0:00 1:00 " DST" +Rule Turkey 1977 only - Oct 16 0:00 0 - +Rule Turkey 1979 1980 - Apr Sun>=1 3:00 1:00 " DST" +Rule Turkey 1979 1982 - Oct Mon>=11 0:00 0 - +Rule Turkey 1981 1982 - Mar lastSun 3:00 1:00 " DST" +Rule Turkey 1983 only - Jul 31 0:00 1:00 " DST" +Rule Turkey 1983 only - Oct 2 0:00 0 - +Rule Turkey 1985 only - Apr 20 0:00 1:00 " DST" +Rule Turkey 1985 only - Sep 28 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Istanbul 1:55:52 - LMT 1880 + 1:57 - OMT 1910 Oct # Ottoman Mean Time + 2:00 Turkey EET%s 1978 Oct 15 + 3:00 Turkey TUR%s 1985 Apr 20 + 2:00 Turkey EET%s 1986 + 2:00 M-Eur EET%s +Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents. +# This link is for backward compatibility with the old naming convention. +Link Europe/Istanbul Turkey + +# Ukraine +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Ukraine 1919 only - Jul 1 2:00 1:00 " DST" +Rule Ukraine 1919 only - Aug 16 0:00 0 - +Rule Ukraine 1921 only - Feb 14 23:00 1:00 " DST" +Rule Ukraine 1921 only - Mar 21 23:00 2:00 " DDST" +Rule Ukraine 1921 only - Sep 1 0:00 1:00 " DST" +Rule Ukraine 1921 only - Oct 1 0:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Europe/Kiev 2:02:04 - LMT 1880 + 2:02 Russia LST%s 1919 Jul 1 2:00 + 2:02 Ukraine LST%s 1924 May 2 + 2:00 - EET 1930 Jun 21 + 3:00 Russia MS%s 1990 Jul 17 + 2:00 M-Eur EET%s + ############################################################################### # One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from @@ -331,13 +1760,20 @@ # Monaco: has same DST as France. # ... -# Date: Thu, 12 Nov 92 16:57:37 +0100 -# From: rps@inescca.inescc.pt (Rui Pedro Salgueiro) # ... -# Portugal has recently (September, 27) changed timezone -# (from WET to MET or CET) to harmonize with EEC. -# I have made this description: -# -# Zone Portugal 0:00 W-Eur WET%s 1992 Sep 27 1:00s -# 1:00 M-Eur MET%s -# ... +# Date: Fri, 3 Sep 93 13:43:41 BST +# From: Peter Ilieve +# ... +# Turning to Europe, I now have a copy of the `Sixth Council Directive 92/20/EEC +# of 26 March 1992 on summertime arrangements'. This only covers 1993 and +# 1994, a seventh one is in the works but I doubt that the algorithm will +# change. This says summertime starts at 01:00 GMT on the last Sunday in March +# and ends at 01:00 GMT on the last Sunday in September, except for the UK +# and Eire where it ends at 01:00 GMT on the fourth Sunday in October. +# It says the arrangements for 1995 onwards will be decided by 1 January 1994, +# but as the sixth directive was supposed to appear by 1 Jan 92 and didn't +# arrive til March I wouldn't hold your breath. +# +# The first summertime directive was adopted in 1980, although the UK didn't +# seem to use it until 1981. I suspect it would be safe to move your start +# dates for the -Eur rules back to 1981. diff -ruN glibc-1.06/time/ialloc.c glibc-1.07/time/ialloc.c --- glibc-1.06/time/ialloc.c Sat May 15 18:21:57 1993 +++ glibc-1.07/time/ialloc.c Thu Dec 2 16:21:02 1993 @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)ialloc.c 8.20"; +static char elsieid[] = "@(#)ialloc.c 8.21"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -10,7 +10,8 @@ #ifdef MAL #define NULLMAL(x) ((x) == NULL || (x) == MAL) -#else /* !defined MAL */ +#endif /* defined MAL */ +#ifndef MAL #define NULLMAL(x) ((x) == NULL) #endif /* !defined MAL */ @@ -32,7 +33,8 @@ result = malloc((alloc_size_t) nonzero(n)); return NULLMAL(result) ? NULL : result; -#else /* !defined MAL */ +#endif /* defined MAL */ +#ifndef MAL return malloc((alloc_size_t) nonzero(n)); #endif /* !defined MAL */ } diff -ruN glibc-1.06/time/mktime.c glibc-1.07/time/mktime.c --- glibc-1.06/time/mktime.c Thu May 20 15:20:35 1993 +++ glibc-1.07/time/mktime.c Mon Nov 15 00:18:35 1993 @@ -18,9 +18,20 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* #define DEBUG */ /* Define this to have a standalone shell to test + * this implementation of mktime + */ + #ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ +#include +#else #include "config.h" #endif +#endif #include /* Some systems define `time_t' here. */ #include @@ -44,6 +55,10 @@ }; +static int times_through_search; /* This library routine should never + hang -- make sure we always return + when we're searching for a value */ + /* After testing this, the maximum number of iterations that I had on any number that I tried was 3! Not bad. @@ -54,9 +69,12 @@ #ifdef DEBUG +#include +#include + int debugging_enabled = 0; -/* Print the values in a `struct tm'. */ +/* Print the values in a `struct tm'. */ static void printtm (it) struct tm *it; @@ -75,6 +93,7 @@ } #endif + static time_t dist_tm (t1, t2) struct tm *t1; @@ -86,19 +105,19 @@ v1 = v2 = 0; -#define doit(x, secs) \ - v1 += t1->x * secs; \ - v2 += t2->x * secs; \ - if (!diff_flag) \ - { \ - if (t1->x < t2->x) \ - diff_flag = -1; \ - else if (t1->x > t2->x) \ - diff_flag = 1; \ +#define doit(x, secs) \ + v1 += t1->x * secs; \ + v2 += t2->x * secs; \ + if (!diff_flag) \ + { \ + if (t1->x < t2->x) \ + diff_flag = -1; \ + else if (t1->x > t2->x) \ + diff_flag = 1; \ } - doit (tm_year, 31536000); /* Okay, not all years have 365 days. */ - doit (tm_mon, 2592000); /* Okay, not all months have 30 days. */ + doit (tm_year, 31536000); /* Okay, not all years have 365 days. */ + doit (tm_mon, 2592000); /* Okay, not all months have 30 days. */ doit (tm_mday, 86400); doit (tm_hour, 3600); doit (tm_min, 60); @@ -105,15 +124,28 @@ doit (tm_sec, 1); #undef doit - - distance = v1 - v2; + + /* We should also make sure that the sign of DISTANCE is correct -- + * if DIFF_FLAG is positive, the distance should be positive and + * vice versa. */ + + distance = (v1 > v2) ? (v1 - v2) : (v2 - v1); + if (diff_flag < 0) + distance = -distance; + + if (times_through_search > 20) /* Arbitrary # of calls, but makes + sure we never hang if there's a + problem with this algorithm */ + { + distance = diff_flag; + } - /* We need this DIFF_FLAG business because it is forseeable that the - distance may be zero when, in actuality, the two structures are - different. This is usually the case when the dates are 366 days - apart and one of the years is a leap year. */ + /* We need this DIFF_FLAG business because it is forseeable that + * the distance may be zero when, in actuality, the two structures + * are different. This is usually the case when the dates are + * 366 days apart and one of the years is a leap year. */ - if (distance == 0 && diff_flag) + if ((distance == 0) && diff_flag) distance = 86400 * diff_flag; return distance; @@ -120,14 +152,15 @@ } -/* Modified binary search -- make intelligent guesses as to where the time - might lie along the timeline, assuming that our target time lies a - linear distance (w/o considering time jumps of a particular region). - - Assume that time does not fluctuate at all along the timeline -- e.g., - assume that a day will always take 86400 seconds, etc. -- and come up - with a hypothetical value for the time_t representation of the struct tm - TARGET, in relation to the guess variable -- it should be pretty close! */ +/* Modified b-search -- make intelligent guesses as to where the time + * might lie along the timeline, assuming that our target time lies a + * linear distance (w/o considering time jumps of a particular region). + * + * Assume that time does not fluctuate at all along the timeline -- + * e.g., assume that a day will always take 86400 seconds, etc. -- and + * come up with a hypothetical value for the time_t representation of + * the struct tm TARGET, in relation to the guess variable -- it should + * be pretty close! */ static time_t search (target) @@ -137,24 +170,28 @@ time_t guess = 0; time_t distance = 0; + times_through_search = 0; + do { guess += distance; + times_through_search++; + guess_tm = localtime (&guess); #ifdef DEBUG if (debugging_enabled) { - printf ("guess %d == ", guess); + printf ("guess %d == ", (int) guess); printtm (guess_tm); puts (""); } #endif - /* Are we on the money? */ + /* Are we on the money? */ distance = dist_tm (target, guess_tm); - + } while (distance != 0); return guess; @@ -161,17 +198,16 @@ } /* Since this function will call localtime many times (and the user might - be passing their `struct tm *' right from localtime, let's make a copy - for ourselves and run the search on the copy. - - Also, we have to normalize the timeptr because it's possible to call mktime - with values that are out of range for a specific item (like 30th Feb). */ - + * be passing their `struct tm *' right from localtime, let's make a copy + * for ourselves and run the search on the copy. + * + * Also, we have to normalize the timeptr because it's possible to call mktime + * with values that are out of range for a specific item (like 30th Feb). */ time_t mktime (timeptr) struct tm *timeptr; { - struct tm private_mktime_struct_tm; /* Yes, users can get a ptr to this. */ + struct tm private_mktime_struct_tm; /* Yes, users can get a ptr to this. */ struct tm *me; time_t result; @@ -195,16 +231,16 @@ normalize (tm_min, 0, 59, tm_hour); normalize (tm_hour, 0, 23, tm_mday); - /* Do the month first, so day range can be found. */ + /* Do the month first, so day range can be found. */ normalize (tm_mon, 0, 11, tm_year); normalize (tm_mday, 1, __mon_lengths[__isleap (me->tm_year)][me->tm_mon], tm_mon); - /* Do the month again, because the day may have pushed it out of range. */ + /* Do the month again, because the day may have pushed it out of range. */ normalize (tm_mon, 0, 11, tm_year); - /* Do day again, because month may have changed the range. */ + /* Do the day again, because the month may have changed the range. */ normalize (tm_mday, 1, __mon_lengths[__isleap (me->tm_year)][me->tm_mon], tm_mon); @@ -245,7 +281,7 @@ { struct tm *tm = localtime (&q); if ((q % 10000) == 0) { printf ("%ld\n", q); fflush (stdout); } - if (q != my_mktime (tm)) + if (q != mktime (tm)) { printf ("failed for %ld\n", q); fflush (stdout); } } @@ -260,18 +296,18 @@ exit (0); } - debugging_enabled = 1; /* we want to see the info */ + debugging_enabled = 1; /* We want to see the info */ ++argv; time = atoi (*argv); - printf ("Time: %d %s\n", time, ctime (&time)); + printf ("Time: %d %s\n", time, ctime ((time_t *) &time)); - tmptr = localtime (&time); + tmptr = localtime ((time_t *) &time); printf ("localtime returns: "); printtm (tmptr); printf ("\n"); - printf ("mktime: %d\n\n", mktime (tmptr)); + printf ("mktime: %d\n\n", (int) mktime (tmptr)); tmptr->tm_sec -= 20; tmptr->tm_min -= 20; @@ -279,8 +315,8 @@ tmptr->tm_mday -= 20; tmptr->tm_mon -= 20; tmptr->tm_year -= 20; - tmptr->tm_gmtoff -= 20000; /* this has no effect! */ - tmptr->tm_zone = NULL; /* nor does this! */ + tmptr->tm_gmtoff -= 20000; /* This has no effect! */ + tmptr->tm_zone = NULL; /* Nor does this! */ tmptr->tm_isdst = -1; printf ("changed ranges: "); @@ -288,6 +324,6 @@ printf ("\n\n"); result_time = mktime (tmptr); - printf ("\n mine: %d\n", result_time); + printf ("\nmktime: %d\n", result_time); } #endif /* DEBUG */ diff -ruN glibc-1.06/time/northamerica glibc-1.07/time/northamerica --- glibc-1.06/time/northamerica Tue Feb 2 14:53:42 1993 +++ glibc-1.07/time/northamerica Thu Dec 2 16:21:02 1993 @@ -1,5 +1,10 @@ -# @(#)northamerica 7.3 +# @(#)northamerica 7.8 +# also includes Central America and the Caribbean +# 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 +# tz@elsie.nci.nih.gov for general use in the future). + ############################################################################### # United States @@ -35,7 +40,7 @@ # From Bob Devine (January 28, 1988): # ...Alaska (and Hawaii) had the timezone names changed in 1967. -# old new +# old new # Pacific Standard Time(PST) -same- # Yukon Standard Time(YST) -same- # Central Alaska S.T. (CAT) Alaska-Hawaii St[an]dard Time (AHST) @@ -105,25 +110,26 @@ # can't tell if we should give Yukon time or Alaska-Hawaii time for "old" # times). -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone US/Eastern -5:00 US E%sT -Zone US/Central -6:00 US C%sT -Zone US/Mountain -7:00 US M%sT -Zone US/Pacific -8:00 US P%sT -Zone US/Alaska -9:00 US AK%sT # Abbreviation per USNO +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/New_York -5:00 US E%sT +Zone America/Chicago -6:00 US C%sT +Zone America/Denver -7:00 US M%sT +Zone America/Los_Angeles -8:00 US P%sT +Zone America/Anchorage -9:00 US AK%sT + # AK%sT is the abbreviation per USNO # Mainland US areas that are always Standard as of 1986. -Zone US/East-Indiana -5:00 US E%sT 1946 - -5:00 - EST # Always EST as of 1986 +Zone America/Fort_Wayne -5:00 US E%sT 1946 + -5:00 - EST # Always EST as of 1986 # From Arthur David Olson (October 28, 1991): # An article on page A3 of the Sunday, October 27, 1991 Washington Post # notes that Starke County switched from Central time to Eastern time as of # October 27, 1991. -Zone US/Indiana-Starke -6:00 US C%sT 1991 Oct 27 2:00 - -5:00 - EST # Always EST as of 1991 -Zone US/Arizona -7:00 US M%sT 1946 - -7:00 - MST # Always MST as of 1986 +Zone America/Knox_IN -6:00 US C%sT 1991 Oct 27 2:00 + -5:00 - EST # Always EST as of 1991 +Zone America/Phoenix -7:00 US M%sT 1946 + -7:00 - MST # Always MST as of 1986 # From Arthur David Olson (February 13, 1988): # However. . .a writer from the Inter Tribal Council of Arizona, Inc., @@ -132,25 +138,32 @@ # large size and location in three states." (The "only" means that other # tribal nations don't use DST.) -Link US/Mountain Navajo +Link America/Denver Navajo # From Bob Devine (January 28, 1988): # Michigan didn't observe DST from 1968 to 1973. -Zone US/Michigan -5:00 US E%sT 1968 - -5:00 - EST 1973 - -5:00 US E%sT +Zone America/Detroit -5:00 US E%sT 1968 + -5:00 - EST 1973 + -5:00 US E%sT # Samoa just changes names. No DST, per Naval Observatory. -Zone US/Samoa -11:00 - NST 1967 Apr 1 # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +Zone Pacific/Samoa -11:22:48 - LMT 1911 + -11:30 - SST 1950 + -11:00 - NST 1967 Apr # N=Nome + -11:00 - BST 1983 Nov 30 # B=Bering + -11:00 - SST # S=Samoa + +Zone Pacific/Midway -11:49:28 - LMT 1901 + -11:00 - NST 1967 Apr # N=Nome + -11:00 - BST 1983 Nov 30 # B=Bering + -11:00 - SST # S=Samoa # Aleutian has a name change. DST, per Naval Observatory. -Zone US/Aleutian -10:00 US AH%sT 1983 Nov 30 - -10:00 US HA%sT +Zone America/Atka -10:00 US AH%sT 1983 Nov 30 + -10:00 US HA%sT # From Arthur David Olson: # And then there's Hawaii. @@ -158,24 +171,42 @@ # Standard time was change by half an hour in 1947; # it's always standard as of 1986. -Zone US/Hawaii -10:30 US H%sT 1933 Apr 30 2:00 - -10:30 1:00 HDT 1933 May 1 2:00 - -10:30 US H%sT 1947 Jun 8 2:00 +Zone Pacific/Honolulu -10:30 US H%sT 1933 Apr 30 2:00 + -10:30 1:00 HDT 1933 May 1 2:00 + -10:30 US H%sT 1947 Jun 8 2:00 -10:00 - HST +# Navassa +# no information; probably like US/Eastern + + # Old names, for S5 users -# Link LINK-FROM LINK-TO -# Link US/Eastern EST5EDT -# Link US/Central CST6CDT -# Link US/Mountain MST7MDT -# Link US/Pacific PST8PDT -# Link US/East-Indiana EST -# Link US/Arizona MST -# Link US/Hawaii HST +# Link LINK-FROM LINK-TO +Link America/New_York EST5EDT +Link America/Chicago CST6CDT +Link America/Denver MST7MDT +Link America/Los_Angeles PST8PDT +Link America/Fort_Wayne EST +Link America/Phoenix MST +Link Pacific/Honolulu HST ################################################################################ + +# From Paul Eggert (November 18, 1993): +# A good source for time zone historical data outside the U.S. is +# Thomas G. Shanks, The International Atlas (3rd edition), +# San Diego: ACS Publications, Inc. (1991). +# Except where otherwise noted, it is the source for the data below. +# +# I invented the abbreviation SPST for St Pierre Standard Time; SPDT likewise. +# Corrections are welcome! +# +# See the `africa' file for Zone naming conventions. + + + # Canada # Canada is reportedly lots easier than the US--leastways since 1951. @@ -212,8 +243,7 @@ # From Arthur David Olson (January 21, 1989): # April 3 fell on a Sunday in 1988; October 29 fell on a Sunday in 1989. Ahem. # Note claim that there's double DST in Newfoundland and that Yukon should -# be same as Pacific. Stick with rules posted in 1988 until more authoritative -# information is available. +# be same as Pacific. # From W. Jones (jones@skdad.usask.ca) (November 6, 1992): # The. . .below is based on information I got from our law library, the @@ -220,12 +250,12 @@ # provincial archives, and the provincial Community Services department. # A precise history would require digging through newspaper archives, and # since you didn't say what you wanted, I didn't bother. -# +# # Saskatchewan is split by a time zone meridian (105W) and over the years # the boundary became pretty ragged as communities near it reevaluated # their affiliations in one direction or the other. In 1965 a provincial # referendum favoured legislating common time practices. -# +# # On 15 April 1966 the Time Act (c. T-14, Revised Statutes of # Saskatchewan 1978) was proclaimed, and established that the eastern # part of Saskatchewan would use CST year round, that districts in @@ -233,7 +263,7 @@ # follow Mountain Time rules (thus 1 hour difference in the winter and # zero in the summer), and that districts in southwest Saskatchewan would # by default follow MT but could opt to follow CST. -# +# # It took a few years for the dust to settle (I know one story of a town # on one time zone having its school in another, such that a mom had to # serve her family lunch in two shifts), but presently it seems that only @@ -240,7 +270,7 @@ # a few towns on the border with Alberta (e.g. Lloydminster) follow MT # rules any more; all other districts appear to have used CST year round # since sometime in the 1960s. -# +# # Here's how I would summarize things. Establish a "Saskatchewan" CST # time zone, and note that it officially exists as of 15 April 1966. Any # current exceptions can put themselves in the "Mountain" zone, since @@ -251,22 +281,217 @@ # East-Saskatchewan kept to avoid problems for folks using that zone by name; # plain Saskatchewan added. + +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule StJohns 1884 only - Jan 1 0:00 0 S +Rule StJohns 1917 1918 - Apr Sun>=8 2:00 1:00 D +Rule StJohns 1917 only - Sep 17 2:00 0 S +Rule StJohns 1918 only - Oct 31 2:00 0 S +Rule StJohns 1919 only - May 5 23:00 1:00 D +Rule StJohns 1919 only - Aug 12 23:00 0 S +Rule StJohns 1920 1935 - May Sun>=1 23:00 1:00 D +Rule StJohns 1920 1935 - Oct lastSun 23:00 0 S +Rule StJohns 1936 1942 - May Mon>=9 0:00 1:00 D +Rule StJohns 1936 1941 - Oct Mon>=1 0:00 0 S +Rule StJohns 1945 only - Sep 30 2:00 0 S +Rule StJohns 1946 1950 - May Sun>=8 2:00 1:00 D +Rule StJohns 1946 1950 - Oct Sun>=2 2:00 0 S +Rule StJohns 1951 1986 - Apr lastSun 2:00 1:00 D +Rule StJohns 1951 1959 - Sep lastSun 2:00 0 S +Rule StJohns 1960 max - Oct lastSun 2:00 0 S +Rule StJohns 1987 only - Apr Sun>=1 2:00 1:00 D +Rule StJohns 1988 only - Apr Sun>=1 2:00 2:00 D +Rule StJohns 1989 max - Apr Sun>=1 2:00 1:00 D +# St John's has an apostrophe, but Posix file names can't have apostrophes. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/St_Johns -3:30:52 - LMT 1884 + -3:31 StJohns N%sT 1935 Mar 30 + -3:30 StJohns N%sT + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Halifax 1902 only - Jun 15 0:00 0 S +Rule Halifax 1916 only - Apr 1 0:00 1:00 D +Rule Halifax 1916 only - Oct 1 0:00 0 S +Rule Halifax 1918 only - Apr 14 2:00 1:00 D +Rule Halifax 1918 only - Oct 31 2:00 0 S +Rule Halifax 1920 only - May 9 0:00 1:00 D +Rule Halifax 1920 only - Aug 29 0:00 0 S +Rule Halifax 1921 only - May 6 0:00 1:00 D +Rule Halifax 1921 1922 - Sep 5 0:00 0 S +Rule Halifax 1922 only - Apr 30 0:00 1:00 D +Rule Halifax 1923 1925 - May Sun>=1 0:00 1:00 D +Rule Halifax 1923 only - Sep 4 0:00 0 S +Rule Halifax 1924 only - Sep 15 0:00 0 S +Rule Halifax 1925 only - Sep 28 0:00 0 S +Rule Halifax 1926 only - May 16 0:00 1:00 D +Rule Halifax 1926 only - Sep 13 0:00 0 S +Rule Halifax 1927 only - May 1 0:00 1:00 D +Rule Halifax 1927 only - Sep 26 0:00 0 S +Rule Halifax 1928 1931 - May Sun>=8 0:00 1:00 D +Rule Halifax 1928 only - Sep 9 0:00 0 S +Rule Halifax 1929 only - Sep 3 0:00 0 S +Rule Halifax 1930 only - Sep 15 0:00 0 S +Rule Halifax 1931 1932 - Sep Mon>=24 0:00 0 S +Rule Halifax 1933 only - Apr 30 0:00 1:00 D +Rule Halifax 1933 only - Oct 2 0:00 0 S +Rule Halifax 1934 only - May 20 0:00 1:00 D +Rule Halifax 1934 only - Sep 16 0:00 0 S +Rule Halifax 1935 only - Jun 2 0:00 1:00 D +Rule Halifax 1935 only - Sep 30 0:00 0 S +Rule Halifax 1936 only - Jun 1 0:00 1:00 D +Rule Halifax 1936 only - Sep 14 0:00 0 S +Rule Halifax 1937 1938 - May Sun>=1 0:00 1:00 D +Rule Halifax 1937 1941 - Sep Mon>=24 0:00 0 S +Rule Halifax 1939 only - May 28 0:00 1:00 D +Rule Halifax 1940 1941 - May Sun>=1 0:00 1:00 D +Rule Halifax 1942 only - Feb 9 2:00 1:00 D +Rule Halifax 1945 1959 - Sep lastSun 2:00 0 S +Rule Halifax 1946 1959 - Apr lastSun 2:00 1:00 D +Rule Halifax 1962 1986 - Apr lastSun 2:00 1:00 D +Rule Halifax 1962 max - Oct lastSun 2:00 0 S +Rule Halifax 1987 max - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Halifax -4:14:24 - LMT 1902 Jun 15 + -4:00 Halifax A%sT + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Mont 1884 only - Jan 1 0:00 0 S +Rule Mont 1917 only - Mar 25 2:00 1:00 D +Rule Mont 1917 only - Apr 24 0:00 0 S +Rule Mont 1918 only - Apr 14 2:00 1:00 D +Rule Mont 1918 only - Oct 31 2:00 0 S +Rule Mont 1919 only - Mar 31 2:30 1:00 D +Rule Mont 1919 only - Oct 25 2:30 0 S +Rule Mont 1920 only - May 2 2:30 1:00 D +Rule Mont 1920 only - Oct 3 2:30 0 S +Rule Mont 1921 only - May 1 2:00 1:00 D +Rule Mont 1921 only - Oct 2 2:30 0 S +Rule Mont 1922 only - Apr 30 2:00 1:00 D +Rule Mont 1922 only - Oct 1 2:30 0 S +Rule Mont 1924 only - May 17 2:00 1:00 D +Rule Mont 1924 1926 - Sep lastSun 2:30 0 S +Rule Mont 1925 1926 - May Sun>=1 2:00 1:00 D +Rule Mont 1927 only - May 1 0:00 1:00 D +Rule Mont 1927 1932 - Sep Sun>=25 0:00 0 S +Rule Mont 1928 1931 - Apr Sun>=25 0:00 1:00 D +Rule Mont 1932 only - May 1 0:00 1:00 D +Rule Mont 1933 1940 - Apr Sun>=24 0:00 1:00 D +Rule Mont 1933 only - Oct 1 0:00 0 S +Rule Mont 1934 1939 - Sep Sun>=24 0:00 0 S +Rule Mont 1945 1948 - Sep lastSun 2:00 0 S +Rule Mont 1946 1986 - Apr lastSun 2:00 1:00 D +Rule Mont 1949 1950 - Oct lastSun 2:00 0 S +Rule Mont 1951 1956 - Sep lastSun 2:00 0 S +Rule Mont 1957 max - Oct lastSun 2:00 0 S +Rule Mont 1987 max - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Montreal -4:54:16 - LMT 1884 + -5:00 Mont E%sT + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Winn 1887 only - Jul 16 0:00 0 S +Rule Winn 1916 only - Apr 23 0:00 1:00 D +Rule Winn 1916 only - Sep 17 0:00 0 S +Rule Winn 1918 only - Apr 14 2:00 1:00 D +Rule Winn 1918 only - Oct 31 2:00 0 S +Rule Winn 1937 only - May 16 2:00 1:00 D +Rule Winn 1937 only - Sep 23 2:00 0 S +Rule Winn 1942 only - Feb 9 2:00 1:00 D +Rule Winn 1945 only - Sep lastSun 2:00 0 S +Rule Winn 1946 only - May 12 2:00 1:00 D +Rule Winn 1946 only - Oct 13 2:00 0 S +Rule Winn 1947 1949 - Apr lastSun 2:00 1:00 D +Rule Winn 1947 1958 - Sep lastSun 2:00 0 S +Rule Winn 1948 only - May 1 2:00 1:00 D +Rule Winn 1948 1960 - Apr lastSun 2:00 1:00 D +Rule Winn 1959 only - Oct lastSun 2:00 0 S +Rule Winn 1960 only - Sep lastSun 2:00 0 S +Rule Winn 1963 only - Apr lastSun 2:00 1:00 D +Rule Winn 1963 only - Sep lastSun 2:00 0 S +Rule Winn 1966 1986 - Apr lastSun 2:00 1:00 D +Rule Winn 1966 max - Sep lastSun 2:00 0 S +Rule Winn 1987 max - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16 + -6:00 Winn C%sT + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Regina 1905 only - Sep 1 0:00 0 S +Rule Regina 1918 only - Apr 14 2:00 1:00 D +Rule Regina 1918 only - Oct 31 2:00 0 S +Rule Regina 1930 1934 - May Sun>=1 0:00 1:00 D +Rule Regina 1930 1934 - Oct Sun>=1 0:00 0 S +Rule Regina 1937 1941 - Apr Sun>=8 0:00 1:00 D +Rule Regina 1937 only - Oct Sun>=8 0:00 0 S +Rule Regina 1938 only - Oct Sun>=1 0:00 0 S +Rule Regina 1939 1941 - Oct Sun>=8 0:00 0 S +Rule Regina 1942 only - Feb 9 2:00 1:00 D +Rule Regina 1945 only - Sep lastSun 2:00 0 S +Rule Regina 1946 only - Apr 14 2:00 1:00 D +Rule Regina 1946 only - Oct 13 2:00 0 S +Rule Regina 1947 1960 - Apr lastSun 2:00 1:00 D +Rule Regina 1947 1959 - Sep lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Regina -6:58:36 - LMT 1905 Sep + -7:00 Regina M%sT 1966 Apr 15 + -6:00 - CST + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Edm 1906 only - Sep 1 0:00 0 S +Rule Edm 1918 1919 - Apr Sun>=8 2:00 1:00 D +Rule Edm 1918 only - Oct 31 2:00 0 S +Rule Edm 1919 only - May 27 2:00 0 S +Rule Edm 1920 1923 - Apr lastSun 2:00 1:00 D +Rule Edm 1920 only - Oct lastSun 2:00 0 S +Rule Edm 1921 1923 - Sep lastSun 2:00 0 S +Rule Edm 1942 only - Feb 9 2:00 1:00 D +Rule Edm 1945 only - Sep lastSun 2:00 0 S +Rule Edm 1947 only - Apr lastSun 2:00 1:00 D +Rule Edm 1947 only - Sep lastSun 2:00 0 S +Rule Edm 1967 only - Apr lastSun 2:00 1:00 D +Rule Edm 1967 only - Oct lastSun 2:00 0 S +Rule Edm 1969 only - Apr lastSun 2:00 1:00 D +Rule Edm 1969 only - Oct lastSun 2:00 0 S +Rule Edm 1972 1986 - Apr lastSun 2:00 1:00 D +Rule Edm 1972 max - Oct lastSun 2:00 0 S +Rule Edm 1987 max - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Edmonton -7:33:52 - LMT 1906 Sep + -7:00 Edm M%sT + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Vanc 1884 only - Jan 1 0:00 0 S +Rule Vanc 1918 only - Apr 14 2:00 1:00 D +Rule Vanc 1918 only - Oct 31 2:00 0 S +Rule Vanc 1942 only - Feb 9 2:00 1:00 D +Rule Vanc 1945 only - Sep 30 2:00 0 S +Rule Vanc 1946 1986 - Apr lastSun 2:00 1:00 D +Rule Vanc 1946 only - Oct 13 2:00 0 S +Rule Vanc 1947 1961 - Sep lastSun 2:00 0 S +Rule Vanc 1962 max - Oct lastSun 2:00 0 S +Rule Vanc 1987 max - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Vancouver -8:12:28 - LMT 1884 + -8:00 Vanc P%sT + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Canada 1969 max - Oct lastSun 2:00 0 S -Rule Canada 1969 1986 - Apr lastSun 2:00 1:00 D -Rule Canada 1987 max - Apr Sun>=1 2:00 1:00 D - -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -# Bob Devine says that DST *is* observed in Newfoundland -Zone Canada/Newfoundland -3:30 Canada N%sT -Zone Canada/Atlantic -4:00 Canada A%sT -Zone Canada/Eastern -5:00 Canada E%sT -Zone Canada/Central -6:00 Canada C%sT -Zone Canada/East-Saskatchewan -6:00 - CST # see above -Zone Canada/Saskatchewan -6:00 - CST # see above -Zone Canada/Mountain -7:00 Canada M%sT -Zone Canada/Pacific -8:00 Canada P%sT -Zone Canada/Yukon -9:00 Canada Y%sT +Rule Yukon 1900 only - Jan 1 0:00 0 S +Rule Yukon 1918 only - Apr 14 2:00 1:00 D +Rule Yukon 1918 only - Oct 27 2:00 0 S +Rule Yukon 1919 only - May 25 2:00 1:00 D +Rule Yukon 1919 only - Nov 1 0:00 0 S +Rule Yukon 1942 only - Feb 9 2:00 1:00 D +Rule Yukon 1965 only - Apr 25 0:00 1:00 D +Rule Yukon 1965 only - Oct 31 2:00 0 S +Rule Yukon 1980 1986 - Apr lastSun 2:00 1:00 D +Rule Yukon 1980 max - Oct lastSun 2:00 0 S +Rule Yukon 1987 max - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 + -9:00 Yukon Y%sT 1966 Jul + -8:00 Yukon P%sT +# Parts of Yukon (e.g. Dawson) didn't switch to -8:00 until 1973 Oct 28. ############################################################################### @@ -318,30 +543,140 @@ # USNO claims there should be four Mexican zones rather than three: # a zone that's GMT-8 with DST; a zone that's always GMT-7; # a zone that's GMT-6 with DST; and a zone that's always GMT-6. -# Wait for more authoritative information before changing. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Mexico 1987 max - Oct lastSun 2:00 0 S -Rule Mexico 1987 max - Apr Sun>=1 2:00 1:00 D +# From Paul Eggert (November 18, 1993): +# Shanks also says there are four zones, but disagrees about the fourth. +# Instead of GMT-6 with DST, he says there's GMT-8 without DST. -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Mexico/BajaNorte -8:00 Mexico P%sT -Zone Mexico/BajaSur -7:00 - MST -Zone Mexico/General -6:00 - CST +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Mexico 1922 only - Jan 1 0:00 0 S +Rule Mexico 1939 only - Feb 5 0:00 1:00 D +Rule Mexico 1939 only - Jun 25 0:00 0 S +Rule Mexico 1940 only - Dec 9 0:00 1:00 D +Rule Mexico 1941 only - Apr 1 0:00 0 S +Rule Mexico 1943 only - Dec 16 0:00 1:00 D +Rule Mexico 1944 only - May 1 0:00 0 S +Rule Mexico 1950 only - Feb 12 0:00 1:00 D +Rule Mexico 1950 only - Jul 30 0:00 0 S +Rule BajaN 1950 1966 - Apr lastSun 2:00 1:00 D +Rule BajaN 1950 1961 - Sep lastSun 2:00 0 S +Rule BajaN 1961 1966 - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Mexico_City -6:36:36 - LMT 1922 Jan 1 0:23:24 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Mar 30 23:00 + -6:00 Mexico C%sT +Zone America/Mazatlan -7:05:40 - LMT 1921 Dec 31 23:54:20 + -7:00 - MST 1927 Jun 10 23:00 + -6:00 - CST 1930 Nov 15 + -7:00 - MST 1931 May 1 23:00 + -6:00 - CST 1931 Oct + -7:00 - MST 1932 Mar 30 23:00 + -6:00 - CST 1942 Apr + -7:00 - MST 1949 Jan 14 + -8:00 - PST 1970 + -7:00 - MST +Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 0:11:56 + -8:00 - PST 1927 Jun 10 23:00 + -7:00 - MST 1930 Nov 16 + -8:00 - PST 1942 Apr + -7:00 - MST 1949 Jan 14 + -8:00 BajaN P%sT 1967 Apr lastSun 2:00 + -8:00 US P%sT +Zone America/Ensenada -7:46:28 - LMT 1922 Jan 1 0:13:32 + -8:00 - PST 1927 Jun 10 23:00 + -7:00 - MST 1930 Nov 16 + -8:00 - PST 1942 Apr + -7:00 - MST 1949 Jan 14 + -8:00 - PST +# +# Revillagigedo Is +# no information ############################################################################### -# Jamaica - -# From Bob Devine (January 28, 1988): -# Follows US rules. +# Anguilla +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Anguilla -4:12:16 - LMT 1912 Mar 2 + -4:00 - AST + +# Antigua and Barbuda +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 + -5:00 - EST 1951 + -4:00 - AST -# From U. S. Naval Observatory (January 19, 1989): -# JAMAICA 5 H BEHIND UTC +# Bahamas +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Bahamas 1912 max - Mar 2 0:00 0 S +Rule Bahamas 1964 max - Oct lastSun 2:00 0 S +Rule Bahamas 1964 1986 - Apr lastSun 2:00 1:00 D +Rule Bahamas 1987 max - Apr Sun>=1 2:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Nassau -5:09:24 - LMT 1912 Mar 2 + -5:00 Bahamas E%sT -Link US/Eastern Jamaica +# Barbados +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Barb 1932 only - Jan 1 0:00 0 S +Rule Barb 1977 only - Jun 12 2:00 1:00 D +Rule Barb 1977 1978 - Oct Sun>=1 2:00 0 S +Rule Barb 1978 1980 - Apr Sun>=15 2:00 1:00 D +Rule Barb 1979 only - Sep 30 2:00 0 S +Rule Barb 1980 only - Sep 25 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Barbados -3:58:28 - LMT 1924 # Bridgetown + -3:58 - BMT 1932 # Bridgetown Mean Time + -4:00 Barb A%sT -############################################################################### +# Belize +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Belize 1912 only - Apr 1 0:00 0 S +Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 HD +Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 S +Rule Belize 1973 only - Dec 5 0:00 1:00 D +Rule Belize 1974 only - Feb 9 0:00 0 S +Rule Belize 1982 only - Dec 18 0:00 1:00 D +Rule Belize 1983 only - Feb 12 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Belize -5:52:48 - LMT 1912 Apr + -6:00 Belize C%sT + +# Bermuda +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Bermuda -4:19:04 - LMT 1930 Jan 1 2:00 # Hamilton + -4:00 - AST 1974 Apr 28 2:00 + -4:00 Bahamas A%sT + +# Cayman Is +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown + -5:07 - KMT 1912 Feb # Kingston Mean Time + -5:00 - EST + +# Clipperton +# no information + +# Costa Rica +# Shanks gives some very odd dates for 1991, and stops there. +# For now, we won't guess further. +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule CR 1921 only - Jan 15 0:00 0 S +Rule CR 1979 1980 - Feb lastSun 0:00 1:00 D +Rule CR 1979 1980 - Jun Sun>=1 0:00 0 S +Rule CR 1991 only - Jan 19 0:00 1:00 D +Rule CR 1991 only - Jul 1 0:00 0 S +# There are too many San Joses elsewhere, so we'll use `Costa Rica'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Costa_Rica -5:36:20 - LMT 1890 # San Jose + -5:36 - SJMT 1921 Jan 15 # San Jose Mean Time + -6:00 CR C%sT +# Coco +# no information; probably like America/Costa_Rica # Cuba @@ -354,11 +689,195 @@ # CUBA 5 H BEHIND UTC # CUBA 4 H BEHIND UTC MAR 20 - OCT 8 +# From Shanks (1991): # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Cuba 1925 only - Jul 19 12:00 0 S +Rule Cuba 1928 only - Jun 10 0:00 1:00 D +Rule Cuba 1928 only - Oct 10 0:00 0 S +Rule Cuba 1940 1942 - Jun Sun>=1 0:00 1:00 D +Rule Cuba 1940 1942 - Sep Sun>=1 0:00 0 S +Rule Cuba 1945 1946 - Jun Sun>=1 0:00 1:00 D +Rule Cuba 1945 1946 - Sep Sun>=1 0:00 0 S +Rule Cuba 1965 only - Jun 1 0:00 1:00 D +Rule Cuba 1965 only - Sep 30 0:00 0 S +Rule Cuba 1966 only - May 29 0:00 1:00 D +Rule Cuba 1966 only - Oct 2 0:00 0 S +Rule Cuba 1967 only - Apr 8 0:00 1:00 D +Rule Cuba 1967 1968 - Sep Sun>=8 0:00 0 S +Rule Cuba 1968 only - Apr 14 0:00 1:00 D +Rule Cuba 1969 1977 - Apr lastSun 0:00 1:00 D +Rule Cuba 1969 1971 - Oct lastSun 0:00 0 S +Rule Cuba 1972 1974 - Oct 8 0:00 0 S +Rule Cuba 1975 1977 - Oct lastSun 0:00 0 S +Rule Cuba 1978 only - May 7 0:00 1:00 D +Rule Cuba 1978 1980 - Oct Sun>=8 0:00 0 S Rule Cuba 1979 1980 - Mar Sun>=15 0:00 1:00 D -Rule Cuba 1979 1980 - Oct Sun>=8 0:00 0 S -Rule Cuba 1981 max - May Sun>=8 0:00 1:00 D +Rule Cuba 1981 1985 - May Sun>=5 0:00 1:00 D Rule Cuba 1981 max - Oct Sun>=8 0:00 0 S +Rule Cuba 1986 1989 - Mar Sun>=14 0:00 1:00 D +Rule Cuba 1990 only - Apr 1 0:00 1:00 D +Rule Cuba 1991 max - Mar Sun>=14 0:00 1:00 D + +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Havana -5:29:28 - LMT 1890 + -5:30 - HMT 1925 Jul 19 12:00 # Havana MT + -5:00 Cuba C%sT + +# Dominica +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Dominica -4:05:36 - LMT 1911 Jul 1 0:01 # Roseau + -4:00 - AST + +# Dominican Republic +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule DR 1933 only - Apr 1 12:00 0 S +Rule DR 1966 only - Oct 30 0:00 1:00 D +Rule DR 1967 only - Feb 28 0:00 0 S +Rule DR 1969 1973 - Oct lastSun 0:00 0:30 HD +Rule DR 1970 only - Feb 21 0:00 0 S +Rule DR 1971 only - Jan 20 0:00 0 S +Rule DR 1972 1974 - Jan 21 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Santo_Domingo -4:39:36 - LMT 1890 + -4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT + -5:00 DR E%sT 1974 Oct 27 + -4:00 - AST + +# El Salvador +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Salv 1921 only - Jan 1 0:00 0 S +Rule Salv 1987 1988 - May Sun>=1 0:00 1:00 D +Rule Salv 1987 1988 - Sep lastSun 0:00 0 S +# There are too many San Salvadors elsewhere, so we'll use `El Salvador'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador + -6:00 Salv C%sT + +# Grenada +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Grenada -4:07:00 - LMT 1911 Jul + -4:00 - AST + +# Guadeloupe +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Guadeloupe -4:06:08 - LMT 1911 Jun 8 # Pointe a Pitre + -4:00 - AST + +# Guatemala +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Guat 1918 only - Oct 5 0:00 0 S +Rule Guat 1973 only - Nov 25 0:00 1:00 D +Rule Guat 1974 only - Feb 24 0:00 0 S +Rule Guat 1983 only - May 21 0:00 1:00 D +Rule Guat 1983 only - Sep 22 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5 + -6:00 Guat C%sT + +# Haiti +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Haiti 1917 only - Jan 24 12:00 0 S +Rule Haiti 1983 only - May 8 0:00 1:00 D +Rule Haiti 1984 1987 - Apr lastSun 0:00 1:00 D +Rule Haiti 1983 1987 - Oct lastSun 0:00 0 S +Rule Haiti 1988 max - Apr Sun>=1 2:00 1:00 D +Rule Haiti 1988 max - Oct lastSun 2:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Port-au-Prince -4:49:20 - LMT 1890 + -4:49 - PPMT 1917 Jan 24 12:00 # P-a-P MT + -5:00 Haiti E%sT + +# Honduras +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Tegucigalpa -5:48:52 - LMT 1921 + -6:00 Salv C%sT + +# Jamaica + +# From Bob Devine (January 28, 1988): +# Follows US rules. + +# From U. S. Naval Observatory (January 19, 1989): +# JAMAICA 5 H BEHIND UTC + +# From Shanks (1991): +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Jamaica -5:07:12 - LMT 1890 # Kingston + -5:07 - KMT 1912 Feb # Kingston Mean Time + -5:00 - EST 1974 Jan 6 2:00 + -5:00 US E%sT + +# Martinique +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France + -4:04 - FFMT 1911 May # Fort-de-France MT + -4:00 - AST 1980 Apr 6 + -4:00 1:00 ADT 1980 Sep 28 + -4:00 - AST + +# Montserrat +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Montserrat -4:08:52 - LMT 1911 Jul 1 0:01 # Plymouth + -4:00 - AST -# Zone NAME GMTOFF RULES/SAVE FORMAT -Zone Cuba -5:00 Cuba C%sT +# Nicaragua +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Nic 1975 only - Feb 16 0:00 0 S +Rule Nic 1979 1980 - Mar Sun>=16 0:00 1:00 D +Rule Nic 1979 1980 - Jun Mon>=23 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Managua -5:45:08 - LMT 1890 + -5:45 - MMT 1934 Jun 23 # Managua Mean Time + -6:00 - CST 1973 May + -5:00 - EST 1975 Feb 16 + -6:00 Nic C%sT + +# Panama +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Panama -5:18:08 - LMT 1890 + -5:20 - PMT 1908 Apr 22 # Panama Mean Time + -5:00 - EST + +# Puerto Rico +# There are too many San Juans elsewhere, so we'll use `Puerto_Rico'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Puerto_Rico -4:24:28 - LMT 1899 Mar 28 12:00 # San Juan + -4:00 - AST 1942 May 3 + -4:00 1:00 ADT 1945 Sep 30 2:00 + -4:00 - AST + +# St Kitts-Nevis +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/St_Kitts -4:10:52 - LMT 1912 Mar 2 # Basseterre + -4:00 - AST + +# St Lucia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/St_Lucia -4:04:00 - LMT 1890 # Castries + -4:04 - CMT 1912 # Castries Mean Time + -4:00 - AST + +# St Pierre and Miquelon +# There are too many St Pierres elsewhere, so we'll use `Miquelon'. +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre + -4:00 - AST 1980 May + -3:00 Mont SP%sT + +# St Vincent and the Grenadines +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/St_Vincent -4:04:56 - LMT 1890 # Kingstown + -4:05 - KMT 1912 # Kingstown Mean Time + -4:00 - AST + +# Turks and Caicos +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Grand_Turk -4:44:32 - LMT 1890 + -5:07 - KMT 1912 Feb # Kingston Mean Time + -5:00 - EST 1979 Apr 29 2:00 + -5:00 US E%sT + +# Virgin Is (British and US) +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Virgin -4:19:44 - LMT 1911 Jul # Charlotte Amalie + -4:00 - AST diff -ruN glibc-1.06/time/pacificnew glibc-1.07/time/pacificnew --- glibc-1.06/time/pacificnew Tue Feb 2 14:53:48 1993 +++ glibc-1.07/time/pacificnew Thu Dec 2 16:21:03 1993 @@ -1,4 +1,4 @@ -# @(#)pacificnew 7.4 +# @(#)pacificnew 7.6 # From Arthur David Olson (April 5, 1989): # On April 5, 1989, the U. S. House of Representatives passed (238-154) a bill @@ -23,4 +23,4 @@ ## -8:00 Twilite P%sT # For now... -Link US/Pacific US/Pacific-New ## +Link America/Los_Angeles US/Pacific-New ## diff -ruN glibc-1.06/time/private.h glibc-1.07/time/private.h --- glibc-1.06/time/private.h Sun Mar 15 14:28:14 1992 +++ glibc-1.07/time/private.h Thu Dec 2 16:21:03 1993 @@ -16,7 +16,7 @@ #ifndef lint #ifndef NOID -static char privatehid[] = "@(#)private.h 7.1"; +static char privatehid[] = "@(#)private.h 7.5"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -51,7 +51,8 @@ #ifndef P #ifdef __STDC__ #define P(x) x -#else /* !defined __STDC__ */ +#endif /* defined __STDC__ */ +#ifndef __STDC__ #define ASTERISK * #define P(x) ( /ASTERISK x ASTERISK/ ) #endif /* !defined __STDC__ */ @@ -63,7 +64,8 @@ #ifdef __STDC__ typedef void * genericptr_t; -#else /* !defined __STDC__ */ +#endif /* defined __STDC__ */ +#ifndef __STDC__ typedef char * genericptr_t; #endif /* !defined __STDC__ */ @@ -72,6 +74,7 @@ #include "ctype.h" #include "errno.h" #include "string.h" +#include "limits.h" /* for CHAR_BIT */ #ifndef _TIME_ #include "time.h" #endif /* !defined _TIME_ */ @@ -91,7 +94,8 @@ #ifdef MAXPATHLEN #define FILENAME_MAX MAXPATHLEN -#else /* !defined MAXPATHLEN */ +#endif /* defined MAXPATHLEN */ +#ifndef MAXPATHLEN #define FILENAME_MAX 1024 /* Pure guesswork */ #endif /* !defined MAXPATHLEN */ @@ -111,7 +115,8 @@ #define qsort_size_t size_t #define fwrite_size_t size_t -#else /* !defined __STDC__ */ +#endif /* defined __STDC__ */ +#ifndef __STDC__ #ifndef alloc_size_t #define alloc_size_t unsigned @@ -120,7 +125,8 @@ #ifndef qsort_size_t #ifdef USG #define qsort_size_t unsigned -#else /* !defined USG */ +#endif /* defined USG */ +#ifndef USG #define qsort_size_t int #endif /* !defined USG */ #endif /* !defined qsort_size_t */ @@ -159,6 +165,17 @@ #ifndef FALSE #define FALSE 0 #endif /* !defined FALSE */ + +#ifndef INT_STRLEN_MAXIMUM +/* +** 302 / 1000 is log10(2.0) rounded up. +** Subtract one for the sign bit; +** add one for integer division truncation; +** add one more for a minus sign. +*/ +#define INT_STRLEN_MAXIMUM(type) \ + ((sizeof(type) * CHAR_BIT - 1) * 302 / 1000 + 2) +#endif /* !defined INT_STRLEN_MAXIMUM */ /* ** UNIX is a registered trademark of AT&T. diff -ruN glibc-1.06/time/southamerica glibc-1.07/time/southamerica --- glibc-1.06/time/southamerica Tue Feb 2 14:53:31 1993 +++ glibc-1.07/time/southamerica Thu Dec 2 16:21:04 1993 @@ -1,5 +1,33 @@ -# @(#)southamerica 7.1 +# @(#)southamerica 7.5 +# 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 +# tz@elsie.nci.nih.gov for general use in the future). + +# From Paul Eggert (November 18, 1993): +# A good source for time zone historical data outside the U.S. is +# Thomas G. Shanks, The International Atlas (3rd edition), +# San Diego: ACS Publications, Inc. (1991). +# Except where otherwise noted, it is the source for the data below. +# +# I invented the abbreviations marked `*' in the following table; +# the rest are from earlier versions of this file, or from other sources. +# Some of these are just plausible excuses for common English abbreviations. +# Corrections are welcome! +# std dst +# LMT Local Mean Time +# -2:00 FST FDT Fernando de Noronha +# -3:00 EST EDT Eastern South America (conflicts with -5:00) +# -4:00 AST ADT Andes*, Antilles*, Asuncion*, Atlantic +# -4:00 CST CDT Chile (conflicts with -6:00) +# -4:00 WST WDT Western Brazil +# -5:00 AST ADT Acre (conflicts with -4:00) +# -5:00 EST EDT Eastern, Ecuador* +# -6:00 CST CDT Archipelago of Columbus*, Central +# -7:00 MST MDT Mataveri*, Mountain +# +# See the `africa' file for Zone naming conventions. + # From Guy Harris: # From Official Airline Guide - Worldwide Edition (1987). Countries not # listed here do not observe DST, according to the OAG. Time zone names @@ -10,6 +38,64 @@ ############################################################################### +############################################################################### + +# Argentina + +# From Bob Devine (January 28, 1988): +# Argentina: first Sunday in October to first Sunday in April since 1976. +# Double Summer time from 1969 to 1974. Switches at midnight. + +# From U. S. Naval Observatory (January 19, 19889): +# ARGENTINA 3 H BEHIND UTC + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Arg 1930 only - Dec 1 0:00 1:00 D +Rule Arg 1931 only - Apr 1 0:00 0 S +Rule Arg 1931 only - Oct 15 0:00 1:00 D +Rule Arg 1932 1940 - Mar 1 0:00 0 S +Rule Arg 1932 1939 - Nov 1 0:00 1:00 D +Rule Arg 1940 only - Jul 1 0:00 1:00 D +Rule Arg 1941 only - Jun 15 0:00 0 S +Rule Arg 1941 only - Oct 15 0:00 1:00 D +Rule Arg 1943 only - Aug 1 0:00 0 S +Rule Arg 1943 only - Oct 15 0:00 1:00 D +Rule Arg 1946 only - Mar 1 0:00 0 S +Rule Arg 1946 only - Oct 1 0:00 1:00 D +Rule Arg 1963 only - Oct 1 0:00 0 S +Rule Arg 1963 only - Dec 15 0:00 1:00 D +Rule Arg 1964 1966 - Mar 1 0:00 0 S +Rule Arg 1964 1966 - Oct 15 0:00 1:00 D +Rule Arg 1967 only - Apr 1 0:00 0 S +Rule Arg 1967 1968 - Oct Sun<=7 0:00 1:00 D +Rule Arg 1968 1969 - Apr Sun<=7 0:00 0 S +Rule Arg 1974 only - Jan 23 0:00 1:00 D +Rule Arg 1974 only - May 1 0:00 0 S +Rule Arg 1974 1976 - Oct Sun<=7 0:00 1:00 D +Rule Arg 1975 1977 - Apr Sun<=7 0:00 0 S +Rule Arg 1985 only - Nov 2 0:00 1:00 D +Rule Arg 1986 only - Mar 14 0:00 0 S +Rule Arg 1986 1987 - Oct 25 0:00 1:00 D +Rule Arg 1987 only - Feb 13 0:00 0 S +Rule Arg 1988 only - Feb 7 0:00 0 S +Rule Arg 1988 only - Dec 1 0:00 1:00 D +Rule Arg 1989 only - Mar 16 0:00 0 S +Rule Arg 1989 only - Oct 15 0:00 1:00 D +Rule Arg 1990 only - Mar 4 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Buenos_Aires -3:53:48 - LMT 1894 Nov + -4:17 - CMT 1920 May # Cordoba Mean Time + -4:00 - AST 1930 Dec + -4:00 Arg A%sT 1969 Oct 5 + -3:00 Arg E%sT + +# Bolivia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/La_Paz -4:32:36 - LMT 1890 + -4:33 - LPMT 1931 Oct 15 # La Paz Mean Time + -4:33 1:00 LPDT 1932 Mar 21 + -4:00 - AST + # Brazil # From Guy Harris: @@ -43,17 +129,55 @@ # BRAZIL (ESTIMATED) # BRAZIL 3 H BEHIND UTC FOR MOST MAJOR AIRPORTS. -# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Brazil 1987 max - Feb Sat<=14 2:00 0 S -Rule Brazil 1987 max - Oct Sat<=28 2:00 1:00 D +# From Paul Eggert (November 18, 1993): +# The mayor of Rio recently attempted to change the time zone rules +# just in his city, in order to leave more summer time for the tourist trade. +# The rule change lasted only part of the day; +# the federal government refused to follow the city's rules, and business +# was in a chaos, so the mayor backed down that afternoon. +# Shanks claims Acre stopped observing DST after 1988 Feb 7, but it +# could just be that his table ran out of room. We're extrapolating +# about time zone changes after 1990 Feb 11. -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Brazil/East -3:00 Brazil E%sT -Zone Brazil/West -4:00 Brazil W%sT -Zone Brazil/Acre -5:00 Brazil A%sT -Zone Brazil/DeNoronha -2:00 Brazil F%sT +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Brazil 1914 only - Jan 1 0:00 0 S +Rule Brazil 1931 only - Oct 3 11:00 1 D +Rule Brazil 1932 1933 - Apr 1 0:00 0 S +Rule Brazil 1932 only - Oct 3 0:00 1 D +Rule Brazil 1949 1952 - Dec 1 0:00 1 D +Rule Brazil 1950 only - Apr 16 0:00 0 S +Rule Brazil 1951 1953 - Apr 1 0:00 0 S +Rule Brazil 1963 only - Dec 9 0:00 1 D +Rule Brazil 1964 only - Mar 1 0:00 0 S +Rule Brazil 1965 only - Jan 31 0:00 1 D +Rule Brazil 1965 only - Apr 1 0:00 0 S +Rule Brazil 1965 only - Dec 1 0:00 1 D +Rule Brazil 1966 1968 - Mar 1 0:00 0 S +Rule Brazil 1966 1967 - Nov 1 0:00 1 D +Rule Brazil 1985 only - Nov 2 0:00 1 D +Rule Brazil 1986 only - Mar 15 0:00 0 S +Rule Brazil 1986 1987 - Oct Sat<=28 0:00 1 D +Rule Brazil 1987 only - Feb 14 0:00 0 S +Rule Brazil 1988 only - Feb 7 0:00 0 S +Rule Brazil 1989 only - Jan 22 0:00 0 S +Rule Brazil 1988 max - Oct Sun>=15 0:00 1 D +Rule Brazil 1990 max - Feb Sun>=8 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Noronha -2:09:40 - LMT 1914 + -2:00 - FST 1963 Dec 9 + -2:00 Brazil F%sT +Zone America/Sao_Paulo -3:06:28 - LMT 1914 + -3:00 Brazil E%sT +Zone America/Manaus -4:00:04 - LMT 1914 + -4:00 - WST 1963 Dec 9 + -4:00 Brazil W%sT +# Rio_Branco is too ambiguous, since there's a Rio Branco in Uruguay too. +Zone America/Porto_Acre -4:31:12 - LMT 1914 + -5:00 - AST 1963 Dec 9 + -5:00 Brazil A%sT +# +# Martin Vaz and Trinidade are like America/Noronha. -############################################################################### # Chile @@ -66,14 +190,81 @@ # Switch is at midnight. OAG is right. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Chile 1977 max - Oct Sun>=8 0:00 1:00 D -Rule Chile 1978 max - Mar Sun>=8 0:00 0 S +Rule Chile 1918 only - Sep 1 0:00 1:00 D +Rule Chile 1919 only - Jul 2 0:00 0 S +Rule Chile 1927 1931 - Sep 1 0:00 1:00 D +Rule Chile 1928 1932 - Apr 1 0:00 0 S +Rule Chile 1969 max - Oct Sun>=8 0:00 1:00 D +Rule Chile 1970 max - Mar Sun>=8 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Santiago -4:42:40 - LMT 1890 + -4:43 - SMT 1910 # Santiago Mean Time + -5:00 Chile C%sT 1932 Sep + -4:00 Chile C%sT +Zone Pacific/Easter -7:17:28 - LMT 1890 # Mataveri + -7:17 - MMT 1932 Sep # Mataveri Mean Time + -7:00 Chile M%sT 1982 Mar 14 + -6:00 Chile C%sT +# +# Juan Fernandez Is, San Ambrosio, San Felix +# no information; probably like America/Santiago + + +# Colombia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Bogota -4:56:20 - LMT 1884 Mar 13 + -4:56 - BMT 1914 Nov 23 # Bogota Mean Time + -5:00 - EST +# Malpelo, Providencia, San Andres +# no information; probably like America/Bogota + +# Curacao +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Curacao -4:35:44 - LMT 1912 Feb 12 # Willemstad + -4:30 - NAST 1965 # Netherlands Antilles + -4:00 - AST + +# Ecuador +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Guayaquil -5:19:20 - LMT 1890 + -5:14 - QMT 1931 # Quito Mean Time + -5:00 - EST +Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno + -5:00 - EST 1986 + -6:00 - CST -# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] -Zone Chile/Continental -4:00 Chile C%sT -Zone Chile/EasterIsland -6:00 Chile E%sT +# Falklands +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Falk 1912 only - Mar 12 0:00 0 S +Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 D +Rule Falk 1938 1942 - Mar Sun>=19 0:00 0 S +Rule Falk 1939 only - Oct 1 0:00 1:00 D +Rule Falk 1940 1942 - Sep lastSun 0:00 1:00 D +Rule Falk 1943 only - Jan 1 0:00 0 S +Rule Falk 1983 only - Sep lastSun 0:00 1:00 D +Rule Falk 1984 1985 - Apr lastSun 0:00 0 S +Rule Falk 1984 only - Sep 16 0:00 1:00 D +Rule Falk 1985 max - Sep Sun>=9 0:00 1:00 D +Rule Falk 1986 max - Apr Sun>=16 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/Stanley -3:51:24 - LMT 1890 + -3:51 - SMT 1912 Mar 12 # Stanley Mean Time + -4:00 Falk A%sT 1983 May + -3:00 Falk E%sT 1985 Sep 15 + -4:00 Falk A%sT + +# French Guiana +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Cayenne -3:29:20 - LMT 1911 Jul + -4:00 - AST 1967 Oct + -3:00 - EST + +# Guyana +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown + -3:45 - BGST 1975 Jul 31 # British Guiana ST + -3:00 - EST -############################################################################### # Paraguay @@ -85,19 +276,112 @@ # PARAGUAY 4 H BEHIND UTC # PARAGUAY 3 H BEHIND UTC OCT 1, '88-MAR 31, '89 -# From Arthur David Olson (January 21, 1989): -# Still don't know time of day when switch occurs. Punt. - -############################################################################### - -# Argentina - -# From Bob Devine (January 28, 1988): -# Argentina: first Sunday in October to first Sunday in April since 1976. -# Double Summer time from 1969 to 1974. Switches at midnight. - -# From U. S. Naval Observatory (January 19, 19889): -# ARGENTINA 3 H BEHIND UTC +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Para 1974 only - Apr 1 0:00 0 S +Rule Para 1975 1978 - Oct 1 0:00 1:00 D +Rule Para 1975 1978 - Mar 1 0:00 0 S +# Shanks says 1979 was all DST. +Rule Para 1980 max - Apr 1 0:00 0 S +Rule Para 1980 1988 - Oct 1 0:00 1:00 D +Rule Para 1989 only - Oct 22 0:00 1:00 D +Rule Para 1990 max - Oct 1 0:00 1:00 D +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Asuncion -3:50:40 - LMT 1890 + -3:51 - AMT 1931 Oct 10 # Asuncion Mean Time + -4:00 - AST 1972 Oct + -3:00 - EST 1974 Apr + -4:00 Para A%sT -# From Arthur David Olson (January 21, 1989): -# OAG, USNO and Bob have different data. Punt. +# Peru +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Peru 1908 only - Jul 28 0:00 0 S +Rule Peru 1938 only - Jan 1 0:00 1:00 D +Rule Peru 1938 only - Apr 1 0:00 0 S +Rule Peru 1938 1939 - Sep lastSun 0:00 1:00 D +Rule Peru 1939 1940 - Mar Sun>=24 0:00 0 S +Rule Peru 1987 only - Jan 1 0:00 1:00 D +Rule Peru 1987 only - Apr 1 0:00 0 S +Rule Peru 1990 only - Jan 1 0:00 1:00 D +Rule Peru 1990 only - Apr 1 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Lima -5:08:12 - LMT 1890 + -5:09 - LMT 1908 Jul 28 + -5:00 Peru E%sT + +# South Georgia +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken + -2:00 - FST + +# South Sandwich Is +# no information + +# Suriname +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Paramaribo -3:40:40 - LMT 1911 + -3:40:52 - PMT 1935 # Paramaribo Mean Time + -3:40:36 - PMT 1945 Oct # The capital moved? + -3:30 - DGST 1984 Oct # Dutch Guiana Std Time + -3:00 - EST + +# Trinidad and Tobago +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2 + -4:00 - AST + +# Uruguay +# From Paul Eggert (November 18, 1993): +# Uruguay wins the prize for the strangest peacetime manipulation of the rules. +# Your guess is as good as mine for what happened after 1989. +# From Shanks (1991): +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Uruguay 1920 only - May 1 0:00 0 S +Rule Uruguay 1923 only - Oct 2 0:00 0:30 HD +Rule Uruguay 1924 1926 - Apr 1 0:00 0 S +Rule Uruguay 1924 1925 - Oct 1 0:00 0:30 HD +Rule Uruguay 1933 1935 - Oct lastSun 0:00 0:30 HD +Rule Uruguay 1934 1935 - Apr 1 0:00 0 S +Rule Uruguay 1936 1941 - Mar lastSun 0:00 0 S +Rule Uruguay 1936 only - Nov 1 0:00 0:30 HD +Rule Uruguay 1937 1940 - Oct lastSun 0:00 0:30 HD +Rule Uruguay 1941 only - Aug 1 0:00 0 S +Rule Uruguay 1942 only - Jan 1 0:00 0:30 HD +Rule Uruguay 1942 only - Dec 14 0:00 1:00 D +Rule Uruguay 1943 only - Mar 14 0:00 0 S +Rule Uruguay 1959 only - May 24 0:00 1:00 D +Rule Uruguay 1959 only - Nov 15 0:00 0 S +Rule Uruguay 1960 only - Jan 17 0:00 1:00 D +Rule Uruguay 1960 only - Mar 6 0:00 0 S +Rule Uruguay 1965 1967 - Apr Sun>=1 0:00 1:00 D +Rule Uruguay 1965 only - Sep 26 0:00 0 S +Rule Uruguay 1966 1967 - Oct 31 0:00 0 S +Rule Uruguay 1968 1970 - May 27 0:00 0:30 HD +Rule Uruguay 1968 1970 - Dec 2 0:00 0 S +Rule Uruguay 1972 only - Apr 24 0:00 1:00 D +Rule Uruguay 1972 only - Aug 15 0:00 0 S +Rule Uruguay 1974 only - Mar 10 0:00 0:30 HD +Rule Uruguay 1974 only - Dec 22 0:00 1:00 D +Rule Uruguay 1976 only - Oct 1 0:00 0 S +Rule Uruguay 1977 only - Dec 4 0:00 1:00 D +Rule Uruguay 1978 only - Apr 1 0:00 0 S +Rule Uruguay 1979 only - Oct 1 0:00 1:00 D +Rule Uruguay 1980 only - May 1 0:00 0 S +Rule Uruguay 1987 only - Dec 14 0:00 1:00 D +Rule Uruguay 1988 only - Mar 14 0:00 0 S +Rule Uruguay 1988 only - Dec 11 0:00 1:00 D +Rule Uruguay 1989 only - Mar 12 0:00 0 S +Rule Uruguay 1989 only - Oct 29 0:00 1:00 D +Rule Uruguay 1990 only - Mar 4 0:00 0 S +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 + -3:45 - MMT 1920 May 1 # Montevideo MT + -3:30 Uruguay U%sT 1942 Dec 14 # Uruguay ST + -3:00 Uruguay E%sT + +# Venezuela +# Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Caracas -4:27:44 - LMT 1890 + -4:28 - CMT 1912 Feb 12 # Caracas Mean Time + -4:30 - VZT 1965 # Venezuela Time + -4:00 - AST diff -ruN glibc-1.06/time/sys/time.h glibc-1.07/time/sys/time.h --- glibc-1.06/time/sys/time.h Wed Mar 24 16:13:50 1993 +++ glibc-1.07/time/sys/time.h Thu Dec 23 00:57:50 1993 @@ -29,8 +29,8 @@ microsecond but also has a range of years. */ struct timeval { - long int tv_sec; /* Seconds. */ - long int tv_usec; /* Microseconds. */ + int tv_sec; /* Seconds. */ + int tv_usec; /* Microseconds. */ }; /* Structure crudely representing a timezone. diff -ruN glibc-1.06/time/systemv glibc-1.07/time/systemv --- glibc-1.06/time/systemv Tue Feb 2 14:53:32 1993 +++ glibc-1.07/time/systemv Thu Dec 2 16:21:05 1993 @@ -1,4 +1,4 @@ -# @(#)systemv 7.1 +# @(#)systemv 7.2 # Old rules, should the need arise. # No attempt is made to handle Newfoundland, since it cannot be expressed diff -ruN glibc-1.06/time/time.h glibc-1.07/time/time.h --- glibc-1.06/time/time.h Sun May 16 20:13:25 1993 +++ glibc-1.07/time/time.h Fri Jun 25 17:01:01 1993 @@ -101,16 +101,6 @@ /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time __P ((time_t * __timer)); -#ifndef __CONSTVALUE -#ifdef __GNUC__ -/* The `const' keyword tells GCC that a function's return value is - based solely on its arguments, and there are no side-effects. */ -#define __CONSTVALUE __const -#else -#define __CONSTVALUE -#endif /* GCC. */ -#endif /* __CONSTVALUE not defined. */ - /* Return the difference between TIME1 and TIME0. */ extern __CONSTVALUE double difftime __P ((time_t __time1, time_t __time0)); @@ -159,6 +149,8 @@ /* Same as above. */ extern char *tzname[2]; +/* Return the maximum length of a timezone name. + This is what `sysconf (_SC_TZNAME_MAX)' does. */ extern long int __tzname_max __P ((void)); extern void tzset __P ((void)); diff -ruN glibc-1.06/time/tzfile.c glibc-1.07/time/tzfile.c --- glibc-1.06/time/tzfile.c Sun May 16 21:46:18 1993 +++ glibc-1.07/time/tzfile.c Fri Jun 25 17:00:42 1993 @@ -48,6 +48,8 @@ long int change; /* Seconds of correction to apply. */ }; +static void compute_tzname_max __P ((size_t)); + static size_t num_transitions; static time_t *transitions = NULL; static unsigned char *type_idxs = NULL; @@ -187,6 +189,9 @@ types[i++].isstd = 0; (void) fclose(f); + + compute_tzname_max (chars); + __use_tzfile = 1; return; @@ -237,6 +242,8 @@ if (dst[0] != '\0') types[i].offset = stdoff; } + + compute_tzname_max (stdlen + dstlen); } int @@ -304,4 +311,22 @@ } return 1; +} + +void +DEFUN(compute_tzname_max, (chars), size_t chars) +{ + extern long int __tzname_cur_max; /* Defined in __tzset.c. */ + + const char *p; + + p = zone_names; + do + { + const char *start = p; + while (*p != '\0') + ++p; + if (p - start > __tzname_cur_max) + __tzname_cur_max = p - start; + } while (++p < &zone_names[chars]); } diff -ruN glibc-1.06/time/tzfile.h glibc-1.07/time/tzfile.h --- glibc-1.06/time/tzfile.h Sat May 15 18:23:01 1993 +++ glibc-1.07/time/tzfile.h Thu Dec 2 16:21:05 1993 @@ -16,7 +16,7 @@ #ifndef lint #ifndef NOID -static char tzfilehid[] = "@(#)tzfile.h 7.2"; +static char tzfilehid[] = "@(#)tzfile.h 7.4"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -86,8 +86,9 @@ #ifndef TZ_MAX_TYPES #ifndef NOSOLAR -#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ -#else /* !defined NOSOLAR */ +#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ +#endif /* !defined NOSOLAR */ +#ifdef NOSOLAR #define TZ_MAX_TYPES 10 /* Maximum number of local time types */ #endif /* !defined NOSOLAR */ #endif /* !defined TZ_MAX_TYPES */ @@ -98,7 +99,7 @@ #endif /* !defined TZ_MAX_CHARS */ #ifndef TZ_MAX_LEAPS -#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ +#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ #endif /* !defined TZ_MAX_LEAPS */ #define SECSPERMIN 60 diff -ruN glibc-1.06/time/zdump.c glibc-1.07/time/zdump.c --- glibc-1.06/time/zdump.c Sat May 15 18:24:12 1993 +++ glibc-1.07/time/zdump.c Thu Dec 2 16:21:05 1993 @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)zdump.c 7.3"; +static char elsieid[] = "@(#)zdump.c 7.9"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -39,8 +39,12 @@ #define SECSPERMIN 60 #endif /* !defined SECSPERMIN */ +#ifndef MINSPERHOUR +#define MINSPERHOUR 60 +#endif /* !defined MINSPERHOUR */ + #ifndef SECSPERHOUR -#define SECSPERHOUR 3600 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) #endif /* !defined SECSPERHOUR */ #ifndef HOURSPERDAY @@ -51,10 +55,18 @@ #define EPOCH_YEAR 1970 #endif /* !defined EPOCH_YEAR */ +#ifndef TM_YEAR_BASE +#define TM_YEAR_BASE 1900 +#endif /* !defined TM_YEAR_BASE */ + #ifndef DAYSPERNYEAR #define DAYSPERNYEAR 365 #endif /* !defined DAYSPERNYEAR */ +#ifndef isleap +#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) +#endif /* !defined isleap */ + extern char ** environ; extern int getopt(); extern char * optarg; @@ -70,7 +82,7 @@ static char * abbr(); static long delta(); -static void hunt(); +static time_t hunt(); static int longest; static char * progname; static void show(); @@ -98,19 +110,21 @@ vflag = 1; else cutoff = optarg; if (c != EOF || - (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) { - (void) fprintf(stderr, - "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n", - argv[0], argv[0]); - (void) exit(EXIT_FAILURE); + (optind == argc - 1 && strcmp(argv[optind], "=") == 0)) { + (void) fprintf(stderr, +"%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n", + argv[0], argv[0]); + (void) exit(EXIT_FAILURE); } - if (cutoff != NULL) + if (cutoff != NULL) { + int y; + cutyear = atoi(cutoff); - /* - ** VERY approximate. - */ - cuttime = (long) (cutyear - EPOCH_YEAR) * - SECSPERHOUR * HOURSPERDAY * DAYSPERNYEAR; + cuttime = 0; + for (y = EPOCH_YEAR; y < cutyear; ++y) + cuttime += DAYSPERNYEAR + isleap(y); + cuttime *= SECSPERHOUR * HOURSPERDAY; + } (void) time(&now); longest = 0; for (i = optind; i < argc; ++i) @@ -163,7 +177,8 @@ if (delta(&newtm, &tm) != (newt - t) || newtm.tm_isdst != tm.tm_isdst || strcmp(abbr(&newtm), buf) != 0) { - hunt(argv[i], t, newt); + newt = hunt(argv[i], t, newt); + newtm = *localtime(&newt); (void) strncpy(buf, abbr(&newtm), (sizeof buf) - 1); } @@ -194,7 +209,7 @@ ; } -static void +static time_t hunt(name, lot, hit) char * name; time_t lot; @@ -223,8 +238,13 @@ } show(name, lot, TRUE); show(name, hit, TRUE); + return hit; } +/* +** Thanks to Paul Eggert (eggert@twinsun.com) for logic used in delta. +*/ + static long delta(newp, oldp) struct tm * newp; @@ -231,13 +251,21 @@ struct tm * oldp; { long result; + int tmy; - result = newp->tm_hour - oldp->tm_hour; - if (result < 0) - result += HOURSPERDAY; - result *= SECSPERHOUR; - result += (newp->tm_min - oldp->tm_min) * SECSPERMIN; - return result + newp->tm_sec - oldp->tm_sec; + if (newp->tm_year < oldp->tm_year) + return -delta(oldp, newp); + result = 0; + for (tmy = oldp->tm_year; tmy < newp->tm_year; ++tmy) + result += DAYSPERNYEAR + isleap(tmy + TM_YEAR_BASE); + result += newp->tm_yday - oldp->tm_yday; + result *= HOURSPERDAY; + result += newp->tm_hour - oldp->tm_hour; + result *= MINSPERHOUR; + result += newp->tm_min - oldp->tm_min; + result *= SECSPERMIN; + result += newp->tm_sec - oldp->tm_sec; + return result; } static void diff -ruN glibc-1.06/time/zic.c glibc-1.07/time/zic.c --- glibc-1.06/time/zic.c Sat May 22 16:31:51 1993 +++ glibc-1.07/time/zic.c Thu Jan 6 17:16:24 1994 @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)zic.c 7.7"; +static char elsieid[] = "@(#)zic.c 7.19"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -72,7 +72,7 @@ static void addtt P((time_t starttime, int type)); static int addtype P((long gmtoff, const char * abbr, int isdst, - int ttisstd)); + int ttisstd)); static void leapadd P((time_t t, int positive, int rolling, int count)); static void adjleap P((void)); static void associate P((void)); @@ -526,21 +526,19 @@ register char * toname; if (fromfile[0] == '/') - fromname = fromfile; - else - { - fromname = ecpyalloc(directory); - fromname = ecatalloc(fromname, "/"); - fromname = ecatalloc(fromname, fromfile); - } + fromname = fromfile; + else { + fromname = ecpyalloc(directory); + fromname = ecatalloc(fromname, "/"); + fromname = ecatalloc(fromname, fromfile); + } if (tofile[0] == '/') - toname = tofile; - else - { - toname = ecpyalloc(directory); - toname = ecatalloc(toname, "/"); - toname = ecatalloc(toname, tofile); - } + toname = tofile; + else { + toname = ecpyalloc(directory); + toname = ecatalloc(toname, "/"); + toname = ecatalloc(toname, tofile); + } /* ** We get to be careful here since ** there's a fair chance of root running us. @@ -548,15 +546,19 @@ if (!itsdir(toname)) (void) remove(toname); if (link(fromname, toname) != 0) { - (void) fprintf(stderr, "%s: Can't link from %s to ", - progname, fromname); - (void) perror(toname); - (void) exit(EXIT_FAILURE); + if (mkdirs(toname) != 0) + (void) exit(EXIT_FAILURE); + if (link(fromname, toname) != 0) { + (void) fprintf(stderr, "%s: Can't link from %s to ", + progname, fromname); + (void) perror(toname); + (void) exit(EXIT_FAILURE); + } } if (fromname != fromfile) - ifree(fromname); + ifree(fromname); if (toname != tofile) - ifree(toname); + ifree(toname); } static void @@ -844,7 +846,7 @@ if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) { buf = erealloc(buf, 132 + strlen(TZDEFAULT)); (void) sprintf(buf, - "\"Zone %s\" line and -l option are mutually exclusive", +"\"Zone %s\" line and -l option are mutually exclusive", TZDEFAULT); error(buf); return FALSE; @@ -852,7 +854,7 @@ if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) { buf = erealloc(buf, 132 + strlen(TZDEFRULES)); (void) sprintf(buf, - "\"Zone %s\" line and -p option are mutually exclusive", +"\"Zone %s\" line and -p option are mutually exclusive", TZDEFRULES); error(buf); return FALSE; @@ -937,15 +939,20 @@ fields[i_untilyear], "only", "", - (nfields > i_untilmonth) ? fields[i_untilmonth] : "Jan", + (nfields > i_untilmonth) ? + fields[i_untilmonth] : "Jan", (nfields > i_untilday) ? fields[i_untilday] : "1", (nfields > i_untiltime) ? fields[i_untiltime] : "0"); - z.z_untiltime = rpytime(&z.z_untilrule, z.z_untilrule.r_loyear); - if (iscont && nzones > 0 && z.z_untiltime < max_time && + z.z_untiltime = rpytime(&z.z_untilrule, + z.z_untilrule.r_loyear); + if (iscont && nzones > 0 && z.z_untiltime > min_time && + z.z_untiltime < max_time && + zones[nzones - 1].z_untiltime > min_time && + zones[nzones - 1].z_untiltime < max_time && zones[nzones - 1].z_untiltime >= z.z_untiltime) { error("Zone continuation line end time is not after end time of previous line"); - return FALSE; + return FALSE; } } zones = (struct zone *) erealloc((char *) zones, @@ -976,8 +983,7 @@ } dayoff = 0; cp = fields[LP_YEAR]; - if (sscanf(cp, scheck(cp, "%d"), &year) != 1 || - year < min_year || year > max_year) { + if (sscanf(cp, scheck(cp, "%d"), &year) != 1) { /* * Leapin' Lizards! */ @@ -1133,12 +1139,9 @@ "%s: panic: Invalid l_value %d\n", progname, lp->l_value); (void) exit(EXIT_FAILURE); - } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1 || - rp->r_loyear < min_year || rp->r_loyear > max_year) { - if (noise) - error("invalid starting year"); - if (rp->r_loyear > max_year) - return; + } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) { + error("invalid starting year"); + return; } cp = hiyearp; if ((lp = byword(cp, end_years)) != NULL) switch ((int) lp->l_value) { @@ -1156,19 +1159,10 @@ "%s: panic: Invalid l_value %d\n", progname, lp->l_value); (void) exit(EXIT_FAILURE); - } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1 || - rp->r_hiyear < min_year || rp->r_hiyear > max_year) { - if (noise) - error("invalid ending year"); - if (rp->r_hiyear < min_year) - return; + } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) { + error("invalid ending year"); + return; } - if (rp->r_hiyear < min_year) - return; - if (rp->r_loyear < min_year) - rp->r_loyear = min_year; - if (rp->r_hiyear > max_year) - rp->r_hiyear = max_year; if (rp->r_loyear > rp->r_hiyear) { error("starting year greater than ending year"); return; @@ -1354,9 +1348,8 @@ typecnt = 0; charcnt = 0; /* - ** Two guesses. . .the second may well be corrected later. + ** A guess that may well be corrected later. */ - gmtoff = zpfirst->z_gmtoff; stdoff = 0; /* ** Thanks to Earl Chew (earl@dnd.icp.nec.com.au) @@ -1367,19 +1360,23 @@ starttime = 0; #endif /* defined lint */ for (i = 0; i < zonecount; ++i) { - usestart = i > 0; - useuntil = i < (zonecount - 1); zp = &zpfirst[i]; + usestart = i > 0 && (zp - 1)->z_untiltime > min_time; + useuntil = i < (zonecount - 1); + if (useuntil && zp->z_untiltime <= min_time) + continue; + gmtoff = zp->z_gmtoff; eat(zp->z_filename, zp->z_linenum); startisdst = -1; if (zp->z_nrules == 0) { - type = addtype(oadd(zp->z_gmtoff, zp->z_stdoff), - zp->z_format, zp->z_stdoff != 0, - startttisstd); + stdoff = zp->z_stdoff; + (void) strcpy(startbuf, zp->z_format); + type = addtype(oadd(zp->z_gmtoff, stdoff), + startbuf, stdoff != 0, startttisstd); if (usestart) addtt(starttime, type); - gmtoff = zp->z_gmtoff; - stdoff = zp->z_stdoff; + else if (stdoff != 0) + addtt(min_time, type); } else for (year = min_year; year <= max_year; ++year) { if (useuntil && year > zp->z_untilrule.r_hiyear) break; @@ -1409,11 +1406,11 @@ ** assuming the current gmtoff and ** stdoff values. */ - offset = gmtoff; - if (!zp->z_untilrule.r_todisstd) - offset = oadd(offset, stdoff); untiltime = tadd(zp->z_untiltime, - -offset); + -gmtoff); + if (!zp->z_untilrule.r_todisstd) + untiltime = tadd(untiltime, + -stdoff); } /* ** Find the rule (of those to do, if any) @@ -1449,21 +1446,33 @@ if (useuntil && ktime >= untiltime) break; if (usestart) { - if (ktime < starttime) { - stdoff = rp->r_stdoff; - startoff = oadd(zp->z_gmtoff, - rp->r_stdoff); - (void) sprintf(startbuf, - zp->z_format, - rp->r_abbrvar); - startisdst = - rp->r_stdoff != 0; - continue; + if (ktime < starttime) { + stdoff = rp->r_stdoff; + startoff = oadd(zp->z_gmtoff, + rp->r_stdoff); + (void) sprintf(startbuf, zp->z_format, + rp->r_abbrvar); + startisdst = rp->r_stdoff != 0; + continue; + } + usestart = FALSE; + if (ktime != starttime) { + if (startisdst < 0 && + zp->z_gmtoff != + (zp - 1)->z_gmtoff) { + type = (timecnt == 0) ? 0 : + types[timecnt - 1]; + startoff = oadd(gmtoffs[type], + -(zp - 1)->z_gmtoff); + startisdst = startoff != 0; + startoff = oadd(startoff, + zp->z_gmtoff); + (void) strcpy(startbuf, + &chars[abbrinds[type]]); } - if (ktime != starttime && - startisdst >= 0) + if (startisdst >= 0) addtt(starttime, addtype(startoff, startbuf, startisdst, startttisstd)); - usestart = FALSE; + } } eats(zp->z_filename, zp->z_linenum, rp->r_filename, rp->r_linenum); @@ -1472,9 +1481,7 @@ offset = oadd(zp->z_gmtoff, rp->r_stdoff); type = addtype(offset, buf, rp->r_stdoff != 0, rp->r_todisstd); - if (timecnt != 0 || rp->r_stdoff != 0) - addtt(ktime, type); - gmtoff = zp->z_gmtoff; + addtt(ktime, type); stdoff = rp->r_stdoff; } } @@ -1482,9 +1489,10 @@ ** Now we may get to set starttime for the next zone line. */ if (useuntil) { - starttime = tadd(zp->z_untiltime, - -gmtoffs[types[timecnt - 1]]); + starttime = tadd(zp->z_untiltime, -gmtoff); startttisstd = zp->z_untilrule.r_todisstd; + if (!startttisstd) + starttime = tadd(starttime, -stdoff); } } writezone(zpfirst->z_name); @@ -1497,6 +1505,8 @@ { if (timecnt != 0 && type == types[timecnt - 1]) return; /* easy enough! */ + if (timecnt == 0 && type == 0 && isdsts[0] == 0) + return; /* handled by default rule */ if (timecnt >= TZ_MAX_TIMES) { error("too many transitions?!"); (void) exit(EXIT_FAILURE); @@ -1821,7 +1831,7 @@ } else { dayoff = oadd(dayoff, (long) -1); if (--wday < 0) - wday = LDAYSPERWEEK; + wday = LDAYSPERWEEK - 1; --i; } if (i < 0 || i >= len_months[isleap(y)][m]) { @@ -1829,24 +1839,14 @@ (void) exit(EXIT_FAILURE); } } - if (dayoff < 0 && !tt_signed) { - if (wantedy == rp->r_loyear) - return min_time; - error("time before zero"); - (void) exit(EXIT_FAILURE); - } + if (dayoff < 0 && !tt_signed) + return min_time; t = (time_t) dayoff * SECSPERDAY; /* ** Cheap overflow check. */ - if (t / SECSPERDAY != dayoff) { - if (wantedy == rp->r_hiyear) - return max_time; - if (wantedy == rp->r_loyear) - return min_time; - error("time overflow"); - (void) exit(EXIT_FAILURE); - } + if (t / SECSPERDAY != dayoff) + return (dayoff > 0) ? max_time : min_time; return tadd(t, rp->r_tod); } @@ -1857,7 +1857,7 @@ register int i; i = strlen(string) + 1; - if (charcnt + i >= TZ_MAX_CHARS) { + if (charcnt + i > TZ_MAX_CHARS) { error("too many, or too long, time zone abbreviations"); (void) exit(EXIT_FAILURE); } @@ -1866,13 +1866,18 @@ } static int -mkdirs(name) -char * const name; +mkdirs(argname) +char * const argname; { register char * cp; - - if ((cp = name) == NULL || *cp == '\0') - return 0; + /* We must make a copy in case the + passed pointer is a read-only string. */ + char *name = ecpyalloc (argname); + + if ((cp = name) == NULL || *cp == '\0') { + free (name); + return 0; + } while ((cp = strchr(cp + 1, '/')) != 0) { *cp = '\0'; #ifndef unix @@ -1894,11 +1899,13 @@ "%s: Can't create directory ", progname); (void) perror(name); + free (name); return -1; } } *cp = '/'; } + free (name); return 0; } @@ -1910,7 +1917,8 @@ l = i; if ((i < 0 && l >= 0) || (i == 0 && l != 0) || (i > 0 && l <= 0)) { - (void) fprintf(stderr, "%s: %d did not sign extend correctly\n", + (void) fprintf(stderr, + "%s: %d did not sign extend correctly\n", progname, i); (void) exit(EXIT_FAILURE); } diff -ruN glibc-1.06/va-i860.h glibc-1.07/va-i860.h --- glibc-1.06/va-i860.h Sat Feb 27 15:26:00 1993 +++ glibc-1.07/va-i860.h Mon Dec 20 19:30:54 1993 @@ -15,7 +15,7 @@ } __f_regs; typedef struct { -#if defined (__SVR4__) || defined (__svr4__) || defined (__alliant__) +#if defined (__SVR4__) || defined (__svr4__) || defined (__alliant__) || defined (__PARAGON__) __f_regs __float_regs; long __ireg[12]; #else /* pre-SVR4 */ long __ireg[12]; __f_regs __float_regs; @@ -23,7 +23,7 @@ } __va_saved_regs; typedef struct { -#if defined(__SVR4__) || defined(__svr4__) || defined(__alliant__) +#if defined(__SVR4__) || defined(__svr4__) || defined(__alliant__) || defined (__PARAGON__) unsigned __ireg_used; /* How many int regs consumed 'til now? */ unsigned __freg_used; /* How many flt regs consumed 'til now? */ long *__reg_base; /* Address of where we stored the regs. */ @@ -45,7 +45,11 @@ /* varargs support */ #define va_alist __builtin_va_alist +#if defined (__PARAGON__) +#define va_dcl int va_alist; +#else /* __PARAGON__ */ #define va_dcl +#endif /* __PARAGON__ */ #define va_start(pvar) ((pvar) = * (__gnuc_va_list *) __builtin_saveregs ()) #else /* STDARG.H */ diff -ruN glibc-1.06/va-m88k.h glibc-1.07/va-m88k.h --- glibc-1.06/va-m88k.h Tue Sep 15 01:03:39 1992 +++ glibc-1.07/va-m88k.h Mon Dec 20 19:30:57 1993 @@ -52,6 +52,7 @@ #undef __va_reg_p #define __gnuc_va_list va_list #define _VA_LIST +#define _VA_LIST_ #else /* Similarly, if this gets included first, do nothing in _int_varargs.h. */ #define __INT_VARARGS_H diff -ruN glibc-1.06/va-mips.h glibc-1.07/va-mips.h --- glibc-1.06/va-mips.h Sat May 15 17:15:19 1993 +++ glibc-1.07/va-mips.h Thu Jan 13 18:49:13 1994 @@ -29,16 +29,30 @@ #define __va_ellipsis #endif +#if __mips==3 #define __va_rounded_size(__TYPE) \ + (((sizeof (__TYPE) + 8 - 1) / 8) * 8) +#else +#define __va_rounded_size(__TYPE) \ (((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) +#endif #ifdef _STDARG_H +#if __mips==3 +#define va_start(__AP, __LASTARG) (__AP = __builtin_next_arg ()) +#else #define va_start(__AP, __LASTARG) \ (__AP = ((char *) &(__LASTARG) + __va_rounded_size (__LASTARG))) +#endif #else #define va_alist __builtin_va_alist +#if __mips==3 +/* This assumes that `long long int' is always a 64 bit type. */ +#define va_dcl long long int __builtin_va_alist; __va_ellipsis +#else #define va_dcl int __builtin_va_alist; __va_ellipsis +#endif #define va_start(__AP) __AP = (char *) &__builtin_va_alist #endif @@ -49,6 +63,11 @@ /* We cast to void * and then to TYPE * because this avoids a warning about increasing the alignment requirement. */ +#if __mips==3 +#define va_arg(__AP, __type) \ + ((__type *) (void *) (__AP = (char *) ((((int)__AP + 8 - 1) & -8) \ + + __va_rounded_size (__type))))[-1] +#else #ifdef __MIPSEB__ /* For big-endian machines. */ #define va_arg(__AP, __type) \ @@ -64,6 +83,7 @@ ? ((int)__AP + 8 - 1) & -8 \ : ((int)__AP + 4 - 1) & -4) \ + __va_rounded_size(__type))))[-1] +#endif #endif #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff -ruN glibc-1.06/version.c glibc-1.07/version.c --- glibc-1.06/version.c Sun May 23 00:13:14 1993 +++ glibc-1.07/version.c Mon Jan 17 22:55:44 1994 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1994 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 @@ -20,7 +20,7 @@ #include CONST char __libc_release[] = "beta"; -CONST char __libc_version[] = "1.06"; +CONST char __libc_version[] = "1.07"; void DEFUN_VOID(__libc_print_version) @@ -31,7 +31,7 @@ printf ("Compiled by GNU CC version %s.\n", __VERSION__); #endif puts ("\ -Copyright (C) 1992 Free Software Foundation, Inc.\n\ +Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE.");