diff -ruN glibc-1.00/ChangeLog glibc-1.01/ChangeLog --- glibc-1.00/ChangeLog Tue Feb 18 19:57:36 1992 +++ glibc-1.01/ChangeLog Wed Mar 11 20:14:23 1992 @@ -1,3 +1,279 @@ +Wed Mar 11 00:16:18 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * Version 1.01. + + * Makefile (munch-init.c): Made $(objpfx)munch-init.c. + + * signal/sigvec.c, signal/sigaction.c, stdio/vsscanf.c: Fixed DEFUNs + in fn aliases. + + * sysdeps/m68k/68881/68881-switch/switch.c: Merged vars have_fpu and + test_fpu into one. + + * sysdeps/mach/i386/start.c, sysdeps/vax/setjmp.c, + sysdeps/vax/__longjmp.c, sysdeps/vax/__infnan.c, + sysdeps/unix/start.c, sysdeps/unix/bsd/sun/sun4/sigtramp.c, + sysdeps/unix/bsd/sun/sun4/start.c, + sysdeps/unix/bsd/hp9k3bsd/start.c, sysdeps/sparc/sqrt.c, + sysdeps/rs6000/ffs.c, sysdeps/m88k/ffs.c, sysdeps/m68k/setjmp.c, + sysdeps/m68k/__longjmp.c, sysdeps/m68k/68881/printf_fp.c, + sysdeps/m68k/68881/atan2.c, sysdeps/m68k/68881/__logb.c, + sysdeps/m68k/68881/68881-switch/switch.c, sysdeps/m68k/ffs.c, + sysdeps/i386/memset.c, sysdeps/i386/memchr.c, sysdeps/i386/ffs.c, + sysdeps/i386/bzero.c, sysdeps/i386/__longjmp.c, sysdeps/am29k/ffs.c + [! __GNUC__]: Either include the generic (or in some cases, ieee754) + version, or do a #error. + + * Rules: Null out `objects' at end to shrink environment some. + (+objs): Define with := from $(objects). + (clean): Use that instead of $(objects). + + * sysdeps/i386/strlen.c: Use `repnz' instead of `repne'. + + * sysdeps/i386/setjmp.c: Doubled % where it wanted to be literal. + + * posix/getgrps.c, io/flock.c, io/mkdir.c, io/read.c, io/write.c, + io/stat.c, misc/getdents.c, misc/mknod.c, misc/utimes.c: Fixed + DEFUNs in fn aliases. + + * sysdeps/unix/bsd/hp9k3bsd/sysdep.S: Use # instead of kludge cookie. + + * posix/getegid.c: Fixed type in DEFUN. + + * time/tzfile.c (__tzfile_compute): If TIMER is before any + transition in the file, use the first non-DST type, rather than the + type of the first transition in the file. + +Tue Mar 10 20:01:55 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * configure: Take optional -nfp arg. + (news, sun3, hp300): Prepend m68k/68881 unless -nfp is given. + * sysdeps/unix/bsd/hp9k3bsd/Implies: Don't specify 68881. + + * stdio/getdelim.c: When the buffer is empty, notice the effect of + __fillbf after calling it, avoiding a (costly) no-op iteration. + + * sysdeps/vax/__memccpy.c: Fixed comments. + + * stdio/fmemopen.c: Set all fns and seen bit before we might call + something that would care (fclose). + + * configure (sun3, sun-3): Mean sun3os4, not sun3os3. + (sun3os3): Use just unix/bsd/sun/sun3/os3. + * sysdeps/unix/bsd/sun/sun3/os3: New directory. + (sysdeps/unix/bsd/sun/sunos3/__wait.S): Moved to there. + * sysdeps/unix/bsd/sun/sun3/sysdep.h: Fixed; took hp9k3bsd/sysdep.h + and changed movel foo, d0 to pea foo for syscall no. + * sysdeps/unix/bsd/sun/sun3/__brk.S: Fixed pea addr mode. + * sysdeps/unix/bsd/sun/sun3/sethostid.S: errnos.h, not gnu/errno.h. + Use .stabs directly, not gnu-stabs.h (which uses `asm'). + * sysdeps/m68k/setjmp.c: Changed asm for first moveml, so it works + on sun3. + * sysdeps/unix/bsd/sun/sun3/start.c: Removed ../ from #include path. + +Sun Mar 8 16:33:33 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * misc/makefile (headers): Added stab.h, stab.def. + * Many files: Changed __GNU_STAB__ to HAVE_GNU_LD. + +Sat Mar 7 21:21:10 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * time/mktime.c: Normalize the struct values before checking for out + of range values. + +Fri Mar 6 11:43:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * sysdeps/ieee754/ldexp.c: New. + + * stdio/internals.c (flushbuf): When priming the stream for writing, + advance the target pos to account for chars gotten from the buffer. + + * sysdeps/generic/Makefile: For math routines, don't filter out + __finite. + + * sysdeps/posix/sysd-stdio.c (__stdio_gen_tempname): Fixed bugs. + + * misc/Makefile (routines): Remove flock. + + * stdlib/strtod.c: Fixed typo in checking for exponent overflow. + Do set *ENDPTR on overflow or underflow. + + * sysdeps/sparc/fl.h: Removed. Should use ieee754 version. + + * sysdeps/generic/Makefile: For math routines, don't filter out + __copysign, __scalb, __drem and __logb; and don't add support. + + * sysdeps/ieee754/__drem.c: New. + * sysdeps/ieee754/sqrt.c: New. + * sysdeps/stub/__drem.c: New. + * sysdeps/stub/sqrt.c: New. + * sysdeps/stub/__logb.c: New. + * sysdeps/ieee754/__logb.c: New. + + * sysdeps/ieee754/__infnan.c: Include and use NAN macro + rather than cooking one up by hand. + + * sysdeps/unix/bsd/getlogin.c: Open /dev/tty, rather than using stdin. + Make sure the name is always null-terminated. + +Thu Mar 5 17:11:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * sysdeps/m68k/68881/__scalb.c: Removed. + * sysdeps/m68k/68881/__math.h: Removed defn of __scalb. + * math/math.h [__OPTIMIZE__]: Define __scalb to be ldexp. + * math/__scalb.c: New; fn alias for ldexp. + + * stdio/Makefile (tests): Added bug4 and bug5. + * stdio/bug4.c, stdio/bug5.c: Test cases from reported bugs just fixed. + + * stdio/internals.c (flushbuf): If nothing was written by the user, + but there is previously gotten data, don't write anything out. + + * stdio/internals.c (seek_to_target): Call __stdio_check_offset first. + + * sysdeps/unix/sysv/sysv_termio.h: New file. + * sysdeps/unix/sysv/Dist: Include it. + * sysdeps/unix/sysv/tcsetattr.c, sysdeps/unix/sysv/tcsetpgrp.c, + sysdeps/unix/sysv/tcsendbrk.c, sysdeps/unix/sysv/tcgetpgrp.c, + sysdeps/unix/sysv/tcflush.c, sysdeps/unix/sysv/tcdrain.c, + sysdeps/unix/sysv/__tcgetatr.c: New files. + + * stdio/internals.c (fillbuf): Don't set the put_limit on writable + streams. Wait for first write attempt to prime them, so we don't + flush the unchanged data unnecessarily. + + * stdlib/exit.c: Look for NULL terminator on ld set, rather than + using length word. + + * Makefile (headers): Remove stdarg.h and varargs.h. + Users will get them from GCC. + * stdio/printf.h: Include to use va_list. + * stdio/stdio.h: Don't include with magic. + Use PTR in place of __va_list in prototypes. + * stdio/__vsscanf.c, stdio/vscanf.c, stdio/vfscanf.c, + stdio/__vfscanf.c, stdio/vdprintf.c, stdio/vasprintf.c, + stdio/vsprintf.c, stdio/vsnprintf.c, stdio/vprintf.c, + stdio/vfprintf.c: Fixed DEFUNs. + + * sysdeps/ieee754/ieee754.h: New file; declares union ieee754_double. + * sysdeps/ieee754/Dist: Add it. + * sysdeps/ieee754/__copysign.c, sysdeps/ieee754/__infnan.c, + sysdeps/ieee754/__isinf.c, sysdeps/ieee754/__isnan.c, + sysdeps/ieee754/__printf_fp.c: Use it. + + * sysdeps/unix/sysv/uname.c: New. + * sysdeps/unix/sysv/__utssys.S: New. + * sysdeps/unix/sysv/Makefile (routines): Add __utssys. + * sysdeps/unix/sysv/Dist: Add __utssys.S. + + * sysdeps/unix/sysv/__rmdir.c: New; runs `rmdir' shell command. + + * sysdeps/unix/sysv/__mkdir.c: New; runs `mkdir' shell command. + + * sysdeps/generic/__lstat.c: New; fn alias for __stat. + + * sysdeps/unix/sysv/__gethostname.c: New; uses uname. + + * sysdeps/unix/Makefile (sys/params.h): Protect with + _GNU_SYS_PARAM_H, in case the system's file uses _SYS_PARAM_H itself. + + * stdio/internals.c (__stdio_check_offset): Call init_stream to make + sure we have fns. + + * stdio/fread.c: Don't call __fillbf if the put_limit is past the + beginning of the buffer; only if !seen, no buffer, or pushed back. + + * stdio/fopen.c (__getmode): Set create bit for "a" mode. + + * io/mkdir.c: #undef mkdir before fn alias. + + * time/tzfile.c (__tzfile_compute): Don't decrement I if it's zero. + + * Makefile (crt0.o): Use ln -f. + + * math/Makefile (install): Install libm.a. + (libm.a): Make an empty archive. + +Wed Mar 4 19:54:50 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * README.template: Added note about long filenames in dist. + + * io/Makefile (routines): flock -> __flock + * flock.c: New file, fn alias. + * sysdeps/unix/bsd/flock.S: Renamed to sysdeps/unix/bsd/__flock.S; + made __flock. + * sysdeps/mach/hurd/flock.c: Renamed to sysdeps/mach/hurd/__flock.c; + made __flock. + * sysdeps/stub/flock.c: Renamed to sysdeps/stub/__flock.c; made + __flock. + + * time/time.h (__isleap): Fixed; every 400th year is not a leap + year, not every 1000th. + + * stdio/internals.c (flushbuf): Increment the target position the + amount the user wrote into the buffer, not the amount we wrote out + to the file (which is greater if we read a block and modified it + in the middle). + + * stdio/internals.c (flushbuf): Set get_limit to the beginning of + the buffer for all streams, except when we have just read in a block. + +Sat Feb 29 15:56:22 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * posix/Makefile (others): Removed logname, id. + * time/Makefile (others): Removed date. + + * sysdeps/unix/bsd/sun/sun4/start.c: Make an alias called `start' + (no leading underscore, so it can't conflict with C symbols) for + `_start'. + +Thu Feb 27 14:32:20 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * set-init.c: Look for NULL terminator on set. ld is broken and + doesn't set the length word correctly. + + * setjmp/_longjmp.c, signal/sigaction.c, signal/sigvec.c, + signal/ssignal.c, string/bcmp.c, time/setitmr.c, posix/execve.c, + posix/getegid.c, posix/geteuid.c, posix/getgid.c, posix/getuid.c, + posix/getgrps.c, posix/setuid.c, posix/wait3.c, posix/wait4.c, + posix/waitpid.c, io/lseek.c, io/open.c, io/read.c, io/write.c, + resource/getrusage.c, misc/getpgsz.c, misc/gethstnm.c, + misc/select.c: Fixed DEFUNs in fn aliases. + +Wed Feb 26 00:20:25 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * sysdeps/generic/Makefile (routines): Add asincos. + + * time/tzfile.c (__tzfile_compute): Set __tzname properly, so isdst + is the right index into it. + +Tue Feb 25 01:42:16 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * sysdeps/unix/bsd/sun/sun4/sysdep.h (ENTRY): .align 2, not .align 4. + This one is powers of two. + + * time/__tzset.c: If TZ is :FILE, try FILE and if __tzfile_read + fails, then use defaults. + + * sysdeps/generic/Makefile (routines): Add sincos. + + * sysdeps/posix/cuserid.c: Set the result to the empty string on + failure. + + * string/string.h, string/strings.h, sysdeps/i386/memchr.c: Fixed + spelling in comment. + + * string/makefile (tests): Include (uncomment) testcopy. We do have + papers for it from tege. + + * malloc/dist-README: Fixed mailing list addr. + + * resource/sys/vtimes.h (struct vtimes): Renamed vm_outblk to + vm_oublk; fixed comment. + * sysdeps/generic/vtimes.c: Renamed here too. + + * Make-dist (README): Depend on version.c. + Tue Feb 18 18:14:50 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) * Version 1.00. diff -ruN glibc-1.00/INSTALL glibc-1.01/INSTALL --- glibc-1.00/INSTALL Tue Feb 18 20:05:29 1992 +++ glibc-1.01/INSTALL Wed Mar 11 20:19:39 1992 @@ -1,4 +1,4 @@ -This is Info file INSTALL, produced by Makeinfo-1.43 from the input +This is Info file INSTALL, produced by Makeinfo-1.44 from the input file manual/maint.texinfo. @@ -52,7 +52,7 @@ library with GCC. (In fact, all of the existing complete ports require GCC.) If possible, you should use the GNU linker, GNU `ld', when linking programs with the GNU C library. If you are going to use -GNU `ld', be sure to specify `-D__GNU_STAB__' in `Makeconfig'. +GNU `ld', be sure to specify `-DHAVE_GNU_LD' in `Makeconfig'. To build the library and header files, type `make'. This will produce a lot of output, some of which looks like errors from `make' @@ -188,8 +188,8 @@ Tag Table: Node: Maintenance97 Node: How to Install the GNU C Library141 -Node: Reporting Bugs3132 -Node: Compatibility with Traditional C4715 -Node: Contributors to the GNU C Library5931 +Node: Reporting Bugs3131 +Node: Compatibility with Traditional C4714 +Node: Contributors to the GNU C Library5930  End Tag Table diff -ruN glibc-1.00/Make-dist glibc-1.01/Make-dist --- glibc-1.00/Make-dist Sun Feb 16 04:46:32 1992 +++ glibc-1.01/Make-dist Thu Mar 5 21:55:50 1992 @@ -144,8 +144,10 @@ tar cf $< -C /tmp $(tardir) -rm -fr /tmp/$(tardir) -README: README.template +README: README.template version.c sed -e 's/RELEASE/$(release)/' -e 's/VERSION/$(version)/' < $< > $@ +# Make it unwritable so I won't change it by mistake. + chmod a-w $@ INSTALL: manual/maint.texinfo makeinfo +no-validate +no-warn +no-headers $< diff -ruN glibc-1.00/Makeconfig glibc-1.01/Makeconfig --- glibc-1.00/Makeconfig Mon Feb 17 01:23:02 1992 +++ glibc-1.01/Makeconfig Sun Mar 8 15:44:09 1992 @@ -103,11 +103,11 @@ endif # These are preprocessor macros we want to predefine. -# Define __GNU_STAB__ if using GNU ld (which you should do if possible). +# Define HAVE_GNU_LD if using GNU ld (which you should do if possible). # If you do this, you may need the GNU assembler as well. # If you don't do this, your library won't work as well (and won't be strictly # compliant with the ANSI C standard). -+defines = $(defines) -D__GNU_STAB__ ++defines = $(defines) -DHAVE_GNU_LD # Default flags to pass the C compiler. ifndef default_cflags @@ -212,7 +212,7 @@ endif -ifneq "$(filter -D__GNU_STAB__,$(CPPFLAGS))" "" +ifneq "$(filter -DHAVE_GNU_LD,$(CPPFLAGS))" "" +gnu-stabs := yes endif diff -ruN glibc-1.00/Makefile glibc-1.01/Makefile --- glibc-1.00/Makefile Mon Feb 17 05:06:35 1992 +++ glibc-1.01/Makefile Wed Mar 11 19:05:35 1992 @@ -52,8 +52,8 @@ tests subdir_lint.out subdir_TAGS subdir_headers \ subdir_echo-headers subdir_echo-distinfo subdir_install -headers := features.h errno.h errnos.h limits.h stdarg.h stddef.h \ - float.h fl.h varargs.h +headers := features.h errno.h errnos.h limits.h stddef.h \ + float.h fl.h headers: subdir_headers @@ -66,7 +66,7 @@ # We're not using the GNU linker, so we use the munch init function. +init := munch-init -munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits) +$(objpfx)munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits) awk -f $< subdirs='$(+init_subdirs)' $(word 2,$^) > $@-tmp mv $@-tmp $@ endif @@ -86,7 +86,7 @@ # `crt0' is the traditional name for the startup code, # so that's what we install start.o as. $(objpfx)crt0.o: $(objpfx)start.o - ln $< $@ + ln -f $< $@ lib: subdir_lib diff -ruN glibc-1.00/README glibc-1.01/README --- glibc-1.00/README Mon Feb 17 05:52:05 1992 +++ glibc-1.01/README Wed Mar 11 20:19:36 1992 @@ -1,11 +1,11 @@ -This directory contains the version 0.6 test release of the GNU C Library. +This directory contains the version 1.01 test release of the GNU C Library. All known bugs have been fixed. Some bugs surely remain. -As of this release, the GNU C library has been ported to only two machines: -sparcs running SunOS 4.1, and HP 300s running 4.3 BSD. Porting the library -is not hard. If you are interested in doing a port, please contact -roland@prep.ai.mit.edu. +As of this release, the GNU C library has been ported to only three machines: +sparcs and Sun 3s running SunOS 4.1, and HP 300s running 4.3 BSD. Porting +the library is not hard. If you are interested in doing a port, please +get on the mailing list bug-glibc-request@prep.ai.mit.edu See the file INSTALL for how to configure, build, and install the GNU C library. @@ -18,7 +18,12 @@ the GNU C library, explaining how you can tell the library what facilities you want it to make available. -Send bug reports to bug-gnu-libc@prep.ai.mit.edu. +Send bug reports to bug-glibc@prep.ai.mit.edu. The GNU C Library is free software. See the file COPYING.LIB for copying conditions. + +Please note that there are some files in the distribution whose names +exceed 14 characters in length. None of these files are needed to build +the library on System V, where a 14 character limit on the length of file +names is imposed, so this is harmless. diff -ruN glibc-1.00/Rules glibc-1.01/Rules --- glibc-1.00/Rules Fri Feb 14 06:51:09 1992 +++ glibc-1.01/Rules Wed Mar 11 17:49:14 1992 @@ -1,4 +1,4 @@ -# Copyright (C) 1991 Free Software Foundation, Inc. +# 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 @@ -85,8 +85,9 @@ # This removes absolutely everything that can be regenerated. .PHONY: subdir_clean clean realclean subdir_clean realclean: clean ++objs := $(objects) clean: mostlyclean - rm -f $(objects) $(+depfiles) + rm -f $(+objs) $(+depfiles) .PHONY: subdir_echo-headers subdir_echo-headers: echo-headers @@ -130,3 +131,4 @@ # Keep these out of the environment so it doesn't get too big. override routines := override aux := +override objects := diff -ruN glibc-1.00/configure glibc-1.01/configure --- glibc-1.00/configure Mon Feb 17 01:23:07 1992 +++ glibc-1.01/configure Tue Mar 10 22:10:50 1992 @@ -2,7 +2,7 @@ # Configuration script for the GNU C Library. -# Copyright (C) 1991 Free Software Foundation, Inc. +# 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 @@ -30,40 +30,55 @@ if [ $# -eq 0 -a "${ARCH-${machine}}" != "" ]; then set "${ARCH-${machine}}" else - echo "Usage: $prog system [objdir]" >&2 + echo "Usage: $prog [-nfp] system [objdir]" >&2 exit 1 fi fi +nfp= + +case $1 in +-nfp | --nfp | --nf | --n) + nfp=yes + shift ;; +esac + case $1 in vax) - sysnames='unix/bsd/vax' ;; + sysnames='unix/bsd/vax' ;; tahoe) - sysnames='unix/bsd/tahoe' ;; + sysnames='unix/bsd/tahoe' ;; sequent-i386 | seq386) - sysnames='unix/bsd/seq386' ;; + sysnames='unix/bsd/seq386' ;; i386-sysv | i386v) - sysnames='unix/i386/sysv' ;; + sysnames='unix/i386/sysv' ;; i386-mach | i386-mach3 | i386_mach) - sysnames='mach/i386' ;; + sysnames='mach/i386' ;; sun4-os3 | sun-4-os3) - sysnames='unix/bsd/sun/sun4 unix/bsd/sun/sunos3' ;; -sun3 | sun-3 | sun3-os3 | sun-3-os3) - sysnames='unix/bsd/sun/sun3 unix/bsd/sun/sunos3' ;; + sysnames='unix/bsd/sun/sun4 unix/bsd/sun/sunos3' ;; +sun3-os3 | sun-3-os3) + sysnames='unix/bsd/sun/sun3/os3' ;; sun4 | sun-4 | sun4-os4 | sun-4-os4) - sysnames='unix/bsd/sun/sun4 unix/bsd/sun/sunos4' ;; -sun3-os4 | sun-3-os4) - sysnames='unix/bsd/sun/sun3 unix/bsd/sun/sunos4' ;; + sysnames='unix/bsd/sun/sun4 unix/bsd/sun/sunos4' ;; +sun3 | sun-3 | sun3-os4 | sun-3-os4) + fpu=m68k/68881 + sysnames='unix/bsd/sun/sun3 unix/bsd/sun/sunos4' ;; news | news800) - sysnames='unix/bsd/news' ;; + fpu=m68k/68881 + sysnames='unix/bsd/news' ;; hp300 | hp9k3bsd) - sysnames='unix/bsd/hp9k3bsd' ;; + fpu=m68k/68881 + sysnames='unix/bsd/hp9k3bsd' ;; hp800 | hp9k8) - sysnames='unix/bsd/hp9k8' ;; + sysnames='unix/bsd/hp9k8' ;; *) - echo ${prog}: System \`$1\' unrecognized. >&2 - exit 1 ;; + echo ${prog}: System \`$1\' unrecognized. >&2 + exit 1 ;; esac + +if [ ! "$nfp" ]; then + sysnames="$fpu $sysnames" +fi if [ $# -eq 2 ]; then objdir=$2 diff -ruN glibc-1.00/gnu-stabs.h glibc-1.01/gnu-stabs.h --- glibc-1.00/gnu-stabs.h Wed Jun 26 18:19:02 1991 +++ glibc-1.01/gnu-stabs.h Sun Mar 8 15:20:10 1992 @@ -20,7 +20,7 @@ #define __GNU_STABS_H 1 -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD /* Alias a function: function_alias(creat, _creat, int, (file, mode), diff -ruN glibc-1.00/hurd/hurd.h glibc-1.01/hurd/hurd.h --- glibc-1.00/hurd/hurd.h Sat Feb 8 03:51:13 1992 +++ glibc-1.01/hurd/hurd.h Tue Feb 25 21:17:12 1992 @@ -37,11 +37,10 @@ /* 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 held held, the user examines + PORT is no longer needed, with the lock held, the user examines USER_DEALLOC. If it is the same address that user stored there, it extracts *USER_DEALLOC, clears USER_DEALLOC to NULL, and releases the - lock. If USER_DEALLOC was set to the user's pointer, and *USER_DEALLOC - is set, the user deallocates the port he used. */ + lock. If *USER_DEALLOC is set, the user deallocates the port he used. */ struct _hurd_port { spin_lock_t lock; /* Locks rest. */ @@ -105,7 +104,7 @@ __mach_port_deallocate (__mach_task_self (), used_port); } -/* Set *PORT's port to NEWPORT. PORT is locked. */ +/* Set *PORT's port to NEWPORT. PORT is locked. */ static inline void _hurd_port_locked_set (struct _hurd_port *port, mach_port_t newport) { diff -ruN glibc-1.00/io/Makefile glibc-1.01/io/Makefile --- glibc-1.00/io/Makefile Mon Feb 17 04:34:57 1992 +++ glibc-1.01/io/Makefile Wed Mar 4 19:45:47 1992 @@ -28,7 +28,7 @@ mkfifo \ __stat __fstat __lstat \ __umask __chmod __fchmod __mkdir \ - __open __close __read __write __lseek __access __fcntl flock \ + __open __close __read __write __lseek __access __fcntl __flock \ __dup __dup2 __pipe \ creat \ __chdir getcwd getwd \ diff -ruN glibc-1.00/io/flock.c glibc-1.01/io/flock.c --- glibc-1.00/io/flock.c +++ glibc-1.01/io/flock.c Wed Mar 11 00:23:44 1992 @@ -0,0 +1,27 @@ +/* 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 + +#undef flock +function_alias(flock, __flock, int, (fd, operation), + DEFUN(flock, (fd, operation), + int fd AND int operation)) diff -ruN glibc-1.00/io/lseek.c glibc-1.01/io/lseek.c --- glibc-1.00/io/lseek.c Wed Jun 12 13:27:45 1991 +++ glibc-1.01/io/lseek.c Thu Feb 27 14:49:01 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,7 @@ #include #include #include +#include #undef lseek function_alias(lseek, __lseek, off_t, (fd, off, w), diff -ruN glibc-1.00/io/mkdir.c glibc-1.01/io/mkdir.c --- glibc-1.00/io/mkdir.c Wed Jun 12 13:27:54 1991 +++ glibc-1.01/io/mkdir.c Wed Mar 11 00:27:17 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -20,5 +20,6 @@ #include #include -function_alias(mkdir, __mkdir, (path, mode), int, +#undef mkdir +function_alias(mkdir, __mkdir, int, (path, mode), DEFUN(mkdir, (path, mode), CONST char *path AND int mode)) diff -ruN glibc-1.00/io/open.c glibc-1.01/io/open.c --- glibc-1.00/io/open.c Wed Jun 12 13:27:58 1991 +++ glibc-1.01/io/open.c Sun Mar 8 15:48:09 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -21,7 +21,7 @@ /* The `open' function might take three arguments. */ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include @@ -28,6 +28,8 @@ symbol_alias(__open, open); #else /* No GNU stabs. */ + +#include int DEFUN(open, (file, oflag), CONST char *file AND int oflag DOTS) diff -ruN glibc-1.00/io/read.c glibc-1.01/io/read.c --- glibc-1.00/io/read.c Wed Jun 12 13:28:28 1991 +++ glibc-1.01/io/read.c Wed Mar 11 00:27:15 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,8 +19,9 @@ #include #include #include +#include #undef read -function_alias(read, __read, int, (fd, buf, n), +function_alias(read, __read, __ssize_t, (fd, buf, n), DEFUN(read, (fd, buf, n), - int fd AND char *buf AND unsigned int n)) + int fd AND PTR buf AND size_t n)) diff -ruN glibc-1.00/io/stat.c glibc-1.01/io/stat.c --- glibc-1.00/io/stat.c Wed Jun 12 13:29:14 1991 +++ glibc-1.01/io/stat.c Wed Mar 11 00:27:13 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -23,4 +23,4 @@ #undef stat function_alias(stat, __stat, int, (file, buf), DEFUN(stat, (file, buf), - CONST char *file AND struct stat *buf)) + CONST char *file AND struct __stat *buf)) diff -ruN glibc-1.00/io/write.c glibc-1.01/io/write.c --- glibc-1.00/io/write.c Wed Jun 12 13:30:16 1991 +++ glibc-1.01/io/write.c Wed Mar 11 00:27:08 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,8 +19,9 @@ #include #include #include +#include #undef write -function_alias(write, __write, int, (d, b, n), +function_alias(write, __write, __ssize_t, (d, b, n), DEFUN(write, (d, b, n), - int d AND CONST char *b AND unsigned int n)) + int d AND CONST PTR b AND size_t n)) diff -ruN glibc-1.00/malloc/dist-README glibc-1.01/malloc/dist-README --- glibc-1.00/malloc/dist-README Fri Nov 8 22:04:05 1991 +++ glibc-1.01/malloc/dist-README Tue Feb 25 21:29:18 1992 @@ -1,7 +1,7 @@ This is the standalone distribution of GNU malloc. GNU malloc is part of the GNU C Library, but is also distributed separately. -If you find bugs in GNU malloc, send reports to bug-glibc@prep.ai.mit.edu. +If you find bugs in GNU malloc, send reports to bug-gnu-libc@prep.ai.mit.edu. GNU malloc is free software. See the file COPYING.LIB for copying conditions. diff -ruN glibc-1.00/malloc/mcheck-init.c glibc-1.01/malloc/mcheck-init.c --- glibc-1.00/malloc/mcheck-init.c Wed Jun 12 14:17:57 1991 +++ glibc-1.01/malloc/mcheck-init.c Sun Mar 8 16:35:10 1992 @@ -19,7 +19,7 @@ /* The object of this file should be installed as libmcheck.a, so one can do -lmcheck to turn on mcheck. */ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include #include diff -ruN glibc-1.00/math/Makefile glibc-1.01/math/Makefile --- glibc-1.00/math/Makefile Tue Feb 11 02:34:15 1992 +++ glibc-1.01/math/Makefile Fri Mar 6 12:47:04 1992 @@ -29,11 +29,15 @@ 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 +install := libm.a include ../Rules +$(objpfx)libm.a: + $(AR) c$(verbose) $@ + # Other dirs to look for source files (for dist). source_dirs = $(filter-out unused,$(shell find bsd -type d -print)) @@ -73,9 +77,11 @@ # Filter these out of the list of BSD files. +bsdfiles := $(filter-out $(addprefix %/,$(+sysdeps)),$(+bsdfiles)) +ifdef +bsdfiles # Assert that all the BSD C sources exist in the object directory, # so VPATH will find them there first. $(addprefix $(objpfx),$(notdir $(+bsdfiles))): +endif # See how easy this would be in make v4? ifneq (,) diff -ruN glibc-1.00/math/__scalb.c glibc-1.01/math/__scalb.c --- glibc-1.00/math/__scalb.c +++ glibc-1.01/math/__scalb.c Thu Mar 5 22:07:34 1992 @@ -0,0 +1,25 @@ +/* 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 + +#undef __scalb +function_alias(__scalb, ldexp, double, (x, n), + DEFUN(__scalb, (x, n), double x AND int n)) diff -ruN glibc-1.00/math/math.h glibc-1.01/math/math.h --- glibc-1.00/math/math.h Wed Jun 12 13:19:37 1991 +++ glibc-1.01/math/math.h Thu Mar 5 22:06:56 1992 @@ -167,6 +167,10 @@ /* Return X times (2 to the Nth power). */ extern __CONSTVALUE double EXFUN(__scalb, (double __x, int __n)); +#ifdef __OPTIMIZE__ +#define __scalb(x, n) ldexp ((x), (n)) +#endif + /* Return the remainder of X/Y. */ extern __CONSTVALUE double EXFUN(__drem, (double __x, double __y)); diff -ruN glibc-1.00/misc/Makefile glibc-1.01/misc/Makefile --- glibc-1.00/misc/Makefile Mon Feb 17 03:02:11 1992 +++ glibc-1.01/misc/Makefile Sun Mar 8 15:38:35 1992 @@ -23,7 +23,7 @@ subdir := misc headers := sys/uio.h sys/ioctl.h sys/ptrace.h ioctls.h sys/file.h \ - a.out.h nlist.h sgtty.h sys/dir.h + a.out.h nlist.h stab.h stab.def sgtty.h sys/dir.h routines := brk sbrk sstk ioctl \ __brk __sbrk __ioctl \ @@ -44,7 +44,7 @@ swapon vhangup mktemp \ ualarm usleep \ gtty stty \ - flock ptrace \ + ptrace \ nlist \ utimes \ __utimes \ diff -ruN glibc-1.00/misc/a.out.h glibc-1.01/misc/a.out.h --- glibc-1.00/misc/a.out.h Mon Feb 17 05:10:35 1992 +++ glibc-1.01/misc/a.out.h Tue Mar 10 21:26:11 1992 @@ -142,9 +142,9 @@ #ifdef sparc #define PAGE_SIZE 0x2000 #endif -#ifdef sony +#if defined (sony) || (defined (sun) && defined (mc68000)) #define SEGMENT_SIZE 0x2000 -#endif /* Sony. */ +#endif /* Sony or 68k Sun. */ #ifdef is68k #define SEGMENT_SIZE 0x20000 #endif diff -ruN glibc-1.00/misc/data_start.c glibc-1.01/misc/data_start.c --- glibc-1.00/misc/data_start.c Mon Apr 1 18:19:17 1991 +++ glibc-1.01/misc/data_start.c Sun Mar 8 15:40:13 1992 @@ -1,4 +1,4 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/misc/getdents.c glibc-1.01/misc/getdents.c --- glibc-1.00/misc/getdents.c Wed Jun 19 15:49:57 1991 +++ glibc-1.01/misc/getdents.c Wed Mar 11 00:41:41 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,5 +22,5 @@ #undef getdirentries function_alias(getdirentries, __getdirentries, int, (fd, buf, nbytes, basep), - DEFUN(__getdirentries, (fd, buf, nbytes, basep), + DEFUN(getdirentries, (fd, buf, nbytes, basep), int fd AND char *buf AND size_t nbytes AND off_t *basep)) diff -ruN glibc-1.00/misc/gethstnm.c glibc-1.01/misc/gethstnm.c --- glibc-1.00/misc/gethstnm.c Wed Jun 12 13:19:51 1991 +++ glibc-1.01/misc/gethstnm.c Thu Feb 27 14:48:49 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -12,6 +12,7 @@ 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. */ @@ -18,6 +19,7 @@ #include #include +#include #undef gethostname function_alias(gethostname, __gethostname, int, (name, len), diff -ruN glibc-1.00/misc/getpgsz.c glibc-1.01/misc/getpgsz.c --- glibc-1.00/misc/getpgsz.c Wed Jun 12 13:19:55 1991 +++ glibc-1.01/misc/getpgsz.c Thu Feb 27 14:48:46 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -18,6 +18,7 @@ #include #include +#include #undef getpagesize function_alias(getpagesize, __getpagesize, size_t, (), diff -ruN glibc-1.00/misc/mknod.c glibc-1.01/misc/mknod.c --- glibc-1.00/misc/mknod.c Thu Jul 18 03:44:46 1991 +++ glibc-1.01/misc/mknod.c Wed Mar 11 00:41:37 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -21,5 +21,5 @@ #undef mknod function_alias(mknod, __mknod, int, (path, mode, dev), - DEFUN(__mknod, (path, mode, dev), + DEFUN(mknod, (path, mode, dev), CONST char *path AND int mode AND int dev)) diff -ruN glibc-1.00/misc/progname.c glibc-1.01/misc/progname.c --- glibc-1.00/misc/progname.c Thu Jan 16 20:08:26 1992 +++ glibc-1.01/misc/progname.c Sun Mar 8 15:40:16 1992 @@ -16,7 +16,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include #include diff -ruN glibc-1.00/misc/select.c glibc-1.01/misc/select.c --- glibc-1.00/misc/select.c Wed Jun 12 13:20:12 1991 +++ glibc-1.01/misc/select.c Thu Feb 27 14:48:42 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,7 @@ #include #include #include +#include #undef select diff -ruN glibc-1.00/misc/stab.def glibc-1.01/misc/stab.def --- glibc-1.00/misc/stab.def +++ glibc-1.01/misc/stab.def Wed Jul 3 21:06:30 1991 @@ -0,0 +1,172 @@ +/* Table of DBX symbol codes for the GNU system. + Copyright (C) 1988 Free Software Foundation, Inc. + + This program 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. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* This contains contribution from Cygnus Support. */ + +/* Global variable. Only the name is significant. + To find the address, look in the corresponding external symbol. */ +__define_stab (N_GSYM, 0x20, "GSYM") + +/* Function name for BSD Fortran. Only the name is significant. + To find the address, look in the corresponding external symbol. */ +__define_stab (N_FNAME, 0x22, "FNAME") + +/* Function name or text-segment variable for C. Value is its address. + Desc is supposedly starting line number, but GCC doesn't set it + and DBX seems not to miss it. */ +__define_stab (N_FUN, 0x24, "FUN") + +/* Data-segment variable with internal linkage. Value is its address. */ +__define_stab (N_STSYM, 0x26, "STSYM") + +/* BSS-segment variable with internal linkage. Value is its address. */ +__define_stab (N_LCSYM, 0x28, "LCSYM") + +/* Name of main routine. Only the name is significant. + This is not used in C. */ +__define_stab (N_MAIN, 0x2a, "MAIN") + +/* Register variable. Value is number of register. */ +__define_stab (N_RSYM, 0x40, "RSYM") + +/* Structure or union element. Value is offset in the structure. */ +__define_stab (N_SSYM, 0x60, "SSYM") + +/* Parameter variable. Value is offset from argument pointer. + (On most machines the argument pointer is the same as the frame pointer. */ +__define_stab (N_PSYM, 0xa0, "PSYM") + +/* Automatic variable in the stack. Value is offset from frame pointer. + Also used for type descriptions. */ +__define_stab (N_LSYM, 0x80, "LSYM") + +/* Alternate entry point. Value is its address. */ +__define_stab (N_ENTRY, 0xa4, "ENTRY") + +/* Name of main source file. + Value is starting text address of the compilation. */ +__define_stab (N_SO, 0x64, "SO") + +/* Name of sub-source file. + Value is starting text address of the compilation. */ +__define_stab (N_SOL, 0x84, "SOL") + +/* Line number in text segment. Desc is the line number; + value is corresponding address. */ +__define_stab (N_SLINE, 0x44, "SLINE") +/* Similar, for data segment. */ +__define_stab (N_DSLINE, 0x46, "DSLINE") +/* Similar, for bss segment. */ +__define_stab (N_BSLINE, 0x48, "BSLINE") + +/* Beginning of an include file. Only Sun uses this. + In an object file, only the name is significant. + The Sun linker puts data into some of the other fields. */ +__define_stab (N_BINCL, 0x82, "BINCL") +/* End of an include file. No name. + These two act as brackets around the file's output. + In an object file, there is no significant data in this entry. + The Sun linker puts data into some of the fields. */ +__define_stab (N_EINCL, 0xa2, "EINCL") +/* Place holder for deleted include file. + This appears only in output from the Sun linker. */ +__define_stab (N_EXCL, 0xc2, "EXCL") + +/* Beginning of lexical block. + The desc is the nesting level in lexical blocks. + The value is the address of the start of the text for the block. + The variables declared inside the block *precede* the N_LBRAC symbol. */ +__define_stab (N_LBRAC, 0xc0, "LBRAC") +/* End of a lexical block. Desc matches the N_LBRAC's desc. + The value is the address of the end of the text for the block. */ +__define_stab (N_RBRAC, 0xe0, "RBRAC") + +/* Begin named common block. Only the name is significant. */ +__define_stab (N_BCOMM, 0xe2, "BCOMM") +/* Begin named common block. Only the name is significant + (and it should match the N_BCOMM). */ +__define_stab (N_ECOMM, 0xe4, "ECOMM") +/* End common (local name): value is address. + I'm not sure how this is used. */ +__define_stab (N_ECOML, 0xe8, "ECOML") +/* Second symbol entry containing a length-value for the preceding entry. + The value is the length. */ +__define_stab (N_LENG, 0xfe, "LENG") + +/* Global symbol in Pascal. + Supposedly the value is its line number; I'm skeptical. */ +__define_stab (N_PC, 0x30, "PC") + +/* Modula-2 compilation unit. Can someone say what info it contains? */ +__define_stab (N_M2C, 0x42, "M2C") +/* Modula-2 scope information. Can someone say what info it contains? */ +__define_stab (N_SCOPE, 0xc4, "SCOPE") + +/* Sun's source-code browser stabs. ?? Don't know what the fields are. + Supposedly the field is "path to associated .cb file". */ +/* This conflicts with the definition of N_BSLINE. */ +__define_stab (N_BROWS, 0x48, "BROWS") + +/* GNU C++ exception stabs. */ + +/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if + this entry is immediately followed by a CAUGHT stab saying what exception + was caught. Multiple CAUGHT stabs means that multiple exceptions + can be caught here. If Desc is 0, it means all exceptions are caught + here. */ +__define_stab (N_CATCH, 0x54, "CATCH") + +/* The above information, in matrix format. + + STAB MATRIX + _________________________________________________ + | 00 - 1F are not dbx stab symbols | + | Entries with bits 01 set are external symbols | + | N_UNDEF | N_ABS | N_TEXT | N_DATA | + | N_BSS | N_COMM | | N_FN | + |_______________________________________________| + | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | + | 28 LCSYM | 2A MAIN | 2C | 2E | + | 30 PC | 32 | 34 | 36 | + | 38 | 3A | 3C | 3E | + | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | + | 48 BROWS/BSLINE | 4A | 4C | 4E | + | 50 EHDECL | 52 | 54 CATCH | 56 | + | 58 | 5A | 5C | 5E | + | 60 SSYM | 62 | 64 SO | 66 | + | 68 | 6A | 6C | 6E | + | 70 | 72 | 74 | 76 | + | 78 | 7A | 7C | 7E | + | 80 LSYM | 82 BINCL | 84 SOL | 86 | + | 88 | 8A | 8C | 8E | + | 90 | 92 | 94 | 96 | + | 98 | 9A | 9C | 9E | + | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | + | A8 | AA | AC | AE | + | B0 | B2 | B4 | B6 | + | B8 | BA | BC | BE | + | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | + | C8 | CA | CC | CE | + | D0 | D2 | D4 | D6 | + | D8 | DA | DC | DE | + | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | + | E8 ECOML | EA | EC | EE | + | F0 | F2 | F4 | F6 | + | F8 | FA | FC | FE LENG | + +-----------------------------------------------+ + +*/ diff -ruN glibc-1.00/misc/stab.h glibc-1.01/misc/stab.h --- glibc-1.00/misc/stab.h +++ glibc-1.01/misc/stab.h Sun Aug 12 22:49:57 1990 @@ -0,0 +1,17 @@ +#ifndef __GNU_STAB__ + +/* Indicate the GNU stab.h is in use. */ + +#define __GNU_STAB__ + +#define __define_stab(NAME, CODE, STRING) NAME=CODE, + +enum __stab_debug_code +{ +#include "stab.def" +LAST_UNUSED_STAB_CODE +}; + +#undef __define_stab + +#endif /* __GNU_STAB_ */ diff -ruN glibc-1.00/misc/utimes.c glibc-1.01/misc/utimes.c --- glibc-1.00/misc/utimes.c Wed Jun 12 13:20:21 1991 +++ glibc-1.01/misc/utimes.c Wed Mar 11 00:41:33 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,5 +22,5 @@ #undef utimes function_alias(utimes, __utimes, int, (file, tvp), - DEFUN(__utimes, (file, tvp), + DEFUN(utimes, (file, tvp), CONST char *file AND struct timeval tvp[2])) diff -ruN glibc-1.00/posix/environ.c glibc-1.01/posix/environ.c --- glibc-1.00/posix/environ.c Wed Jun 12 13:25:25 1991 +++ glibc-1.01/posix/environ.c Sun Mar 8 15:40:20 1992 @@ -20,7 +20,7 @@ #undef environ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/posix/execve.c glibc-1.01/posix/execve.c --- glibc-1.00/posix/execve.c Wed Jun 12 13:25:41 1991 +++ glibc-1.01/posix/execve.c Thu Feb 27 14:49:23 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -23,4 +23,4 @@ #undef execve function_alias(execve, __execve, int, (p, a, e), DEFUN(execve, (p, a, e), - CONST char *p AND char **a AND char **e)) + CONST char *p AND char *CONST a[] AND char *CONST e[])) diff -ruN glibc-1.00/posix/getegid.c glibc-1.01/posix/getegid.c --- glibc-1.00/posix/getegid.c Wed Jun 12 13:26:35 1991 +++ glibc-1.01/posix/getegid.c Wed Mar 11 00:13:49 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,4 +22,4 @@ #undef getegid -function_alias(getegid, __getegid, int, (), DEFUN_VOID(getegid)) +function_alias(getegid, __getegid, __gid_t, (), DEFUN_VOID(getegid)) diff -ruN glibc-1.00/posix/geteuid.c glibc-1.01/posix/geteuid.c --- glibc-1.00/posix/geteuid.c Wed Jun 12 13:26:39 1991 +++ glibc-1.01/posix/geteuid.c Thu Feb 27 14:49:17 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,4 +22,4 @@ #undef geteuid -function_alias(geteuid, __geteuid, int, (), DEFUN_VOID(geteuid)) +function_alias(geteuid, __geteuid, __uid_t, (), DEFUN_VOID(geteuid)) diff -ruN glibc-1.00/posix/getgid.c glibc-1.01/posix/getgid.c --- glibc-1.00/posix/getgid.c Wed Jun 12 13:26:43 1991 +++ glibc-1.01/posix/getgid.c Thu Feb 27 14:49:15 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,4 +22,4 @@ #undef getgid -function_alias(getgid, __getgid, int, (), DEFUN_VOID(getgid)) +function_alias(getgid, __getgid, __gid_t, (), DEFUN_VOID(getgid)) diff -ruN glibc-1.00/posix/getgrps.c glibc-1.01/posix/getgrps.c --- glibc-1.00/posix/getgrps.c Wed Jun 12 13:26:47 1991 +++ glibc-1.01/posix/getgrps.c Wed Mar 11 00:22:14 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -20,5 +20,5 @@ #include #include -function_alias(getgroups, __getgroups, (size, list), int, - DEFUN(getgroups, (size, list), int size AND gid_t *list)) +function_alias(getgroups, __getgroups, int, (size, list), + DEFUN(getgroups, (size, list), int size AND __gid_t *list)) diff -ruN glibc-1.00/posix/getopt.c glibc-1.01/posix/getopt.c --- glibc-1.00/posix/getopt.c Mon Jan 27 23:23:35 1992 +++ glibc-1.01/posix/getopt.c Tue Feb 25 21:23:48 1992 @@ -46,6 +46,7 @@ #ifdef __GNU_LIBRARY__ #undef alloca #include +#include #else /* Not GNU C library. */ #define __alloca alloca #endif /* GNU C library. */ diff -ruN glibc-1.00/posix/getuid.c glibc-1.01/posix/getuid.c --- glibc-1.00/posix/getuid.c Wed Jun 12 13:27:07 1991 +++ glibc-1.01/posix/getuid.c Thu Feb 27 14:49:13 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,4 +22,4 @@ #undef getuid -function_alias(getuid, __getuid, int, (), DEFUN_VOID(getuid)) +function_alias(getuid, __getuid, __uid_t, (), DEFUN_VOID(getuid)) diff -ruN glibc-1.00/posix/setuid.c glibc-1.01/posix/setuid.c --- glibc-1.00/posix/setuid.c Wed Jun 12 13:29:05 1991 +++ glibc-1.01/posix/setuid.c Thu Feb 27 14:49:09 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -23,4 +23,4 @@ #undef setuid function_alias(setuid, __setuid, int, (uid), - DEFUN(setuid, (uid), int uid)) + DEFUN(setuid, (uid), __uid_t uid)) diff -ruN glibc-1.00/posix/wait3.c glibc-1.01/posix/wait3.c --- glibc-1.00/posix/wait3.c Wed Jun 12 13:30:01 1991 +++ glibc-1.01/posix/wait3.c Thu Feb 27 14:49:06 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,7 @@ #include #include #include +#include #undef wait3 function_alias(wait3, __wait3, pid_t, (s, o, u), diff -ruN glibc-1.00/posix/wait4.c glibc-1.01/posix/wait4.c --- glibc-1.00/posix/wait4.c Wed Jun 12 13:30:05 1991 +++ glibc-1.01/posix/wait4.c Thu Feb 27 14:49:04 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,7 @@ #include #include #include +#include #undef wait4 function_alias(wait4, __wait4, pid_t, (p, s, o, u), diff -ruN glibc-1.00/posix/waitpid.c glibc-1.01/posix/waitpid.c --- glibc-1.00/posix/waitpid.c Wed Jun 12 13:30:07 1991 +++ glibc-1.01/posix/waitpid.c Thu Feb 27 14:49:02 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,7 @@ #include #include #include +#include #undef waitpid function_alias(waitpid, __waitpid, pid_t, (pid, s, o), diff -ruN glibc-1.00/resource/getrusage.c glibc-1.01/resource/getrusage.c --- glibc-1.00/resource/getrusage.c Wed Jun 12 13:32:10 1991 +++ glibc-1.01/resource/getrusage.c Thu Feb 27 14:48:52 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -23,4 +23,4 @@ #undef getrusage function_alias(getrusage, __getrusage, int, (who, usage), DEFUN(getrusage, (who, usage), - enum __rusage_who AND struct rusage *usage)) + enum __rusage_who who AND struct rusage *usage)) diff -ruN glibc-1.00/resource/sys/vtimes.h glibc-1.01/resource/sys/vtimes.h --- glibc-1.00/resource/sys/vtimes.h Wed Jun 12 13:32:34 1991 +++ glibc-1.01/resource/sys/vtimes.h Tue Feb 25 21:28:00 1992 @@ -51,10 +51,10 @@ int vm_nswap; /* Number of input operations via the file system. Note: This - and `ru_outblock' do not include operations with the cache. */ + and `ru_oublock' do not include operations with the cache. */ int vm_inblk; /* Number of output operations via the file system. */ - int vm_outblk; + int vm_oublk; }; /* If CURRENT is not NULL, write statistics for the current process into diff -ruN glibc-1.00/set-init.c glibc-1.01/set-init.c --- glibc-1.00/set-init.c Fri Jan 10 23:09:01 1992 +++ glibc-1.01/set-init.c Thu Feb 27 16:13:31 1992 @@ -29,7 +29,9 @@ DEFUN(__libc_init, (argc, argv, envp), int argc AND char **argv AND char **envp) { - register size_t i; - for (i = 0; i < __libc_subinit.n; ++i) - (*__libc_subinit.fn[i]) (argc, argv, envp); + + void EXFUN((**fn), (int argc, char **argv, char **envp)); + + for (fn = __libc_subinit.fn; *fn != NULL; ++fn) + (**fn) (argc, argv, envp); } diff -ruN glibc-1.00/setjmp/_longjmp.c glibc-1.01/setjmp/_longjmp.c --- glibc-1.00/setjmp/_longjmp.c Wed Jun 12 13:32:38 1991 +++ glibc-1.01/setjmp/_longjmp.c Thu Feb 27 14:49:36 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -23,4 +23,4 @@ #undef _longjmp function_alias(_longjmp, __longjmp, void, (env, val), - DEFUN(_longjmp, (env, val), jmp_buf env AND int val)) + DEFUN(_longjmp, (env, val), CONST jmp_buf env AND int val)) diff -ruN glibc-1.00/signal/sigaction.c glibc-1.01/signal/sigaction.c --- glibc-1.00/signal/sigaction.c Wed Jun 12 13:55:38 1991 +++ glibc-1.01/signal/sigaction.c Wed Mar 11 19:04:49 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -24,5 +24,5 @@ function_alias(sigaction, __sigaction, int, (sig, act, oact), DEFUN(sigaction, (sig, act, oact), - int sig AND struct sigaction *act AND - struct sigaction *oact)) + int sig AND CONST struct __sigaction *act AND + struct __sigaction *oact)) diff -ruN glibc-1.00/signal/sigvec.c glibc-1.01/signal/sigvec.c --- glibc-1.00/signal/sigvec.c Wed Jun 12 13:56:20 1991 +++ glibc-1.01/signal/sigvec.c Wed Mar 11 18:40:46 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -24,5 +24,5 @@ function_alias(sigvec, __sigvec, int, (sig, vec, ovec), DEFUN(__sigvec, (sig, vec, ovec), - int sig AND CONST struct sigvec *vec AND - struct sigvec *ovec)) + int sig AND CONST struct __sigvec *vec AND + struct __sigvec *ovec)) diff -ruN glibc-1.00/signal/ssignal.c glibc-1.01/signal/ssignal.c --- glibc-1.00/signal/ssignal.c Wed Jun 12 13:56:23 1991 +++ glibc-1.01/signal/ssignal.c Thu Feb 27 14:49:29 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -23,4 +23,4 @@ #undef ssignal function_alias(ssignal, signal, __sighandler_t, (sig, func), - DEFUN(ssignal, (sig, handler), itn sig AND __sighandler_t func)) + DEFUN(ssignal, (sig, handler), int sig AND __sighandler_t func)) diff -ruN glibc-1.00/stab.def glibc-1.01/stab.def --- glibc-1.00/stab.def +++ glibc-1.01/stab.def Wed Mar 11 20:20:27 1992 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.00/stab.h glibc-1.01/stab.h --- glibc-1.00/stab.h +++ glibc-1.01/stab.h Wed Mar 11 20:20:24 1992 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.00/stdarg.h glibc-1.01/stdarg.h --- glibc-1.00/stdarg.h Wed Jun 12 17:59:24 1991 +++ glibc-1.01/stdarg.h @@ -1,91 +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. */ - -/* - * ANSI Standard: 4.8 VARIABLE ARGUMENTS - */ - -#ifndef _STDARG_H - -#ifndef __need___va_list -#define _STDARG_H 1 -#endif /* Don't need __va_list. */ - - -#ifndef __GNUC__ /* Not GCC. */ -/* These work for BSD CC on Vaxen and Sun CC on Sun-3s. */ - -#ifndef ____va_list_defined -typedef PTR __va_list; -#define ____va_list_defined 1 -#endif /* __va_list not defined. */ -#undef __need___va_list - -#ifdef _STDARG_H - -typedef __va_list va_list; - -#define __va_start(ap, parmN) ((ap) = (va_list) &(&(parmN))[1]) -#define va_start(ap, parmN) __va_start((ap), parmN) -#define va_arg(ap, type) (((type *) ((ap) += sizeof(type)))[-1]) -#define va_end(ap) - -#endif /* included. */ - -#else /* GCC only. */ - -#ifndef ____va_list_defined -typedef char *__va_list; -#define ____va_list_defined 1 -#endif /* __va_list not defined. */ -#undef __need___va_list - -#ifdef _STDARG_H - -typedef __va_list va_list; - -#define __va_rounded_size(type) \ - (((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) - -#ifdef __sparc__ -#define __va_start(ap, parmN) (__builtin_saveregs(), \ - (ap) = (__va_list) __builtin_next_arg()) -#else /* Not sparc. */ -#define __va_start(ap, parmN) ((ap) = (__va_list) __builtin_next_arg()) -#endif /* sparc. */ - -#define va_start(ap, parmN) __va_start((ap), (parmN)) - -#ifdef __mips__ -#define va_arg(ap, type) \ - (((type *) ((ap) = (__va_list) (sizeof(type) > 4 ? \ - (((int) (ap) + 2*8 - 1) & -8) : \ - (((int) (ap) + 2*4 - 1) & -4))))[-1]) -#else /* Not mips. */ -#define va_arg(ap, type) \ - (*(type *) (((ap) += __va_rounded_size(type)) - __va_rounded_size(type))) -#endif /* mips. */ - -#define va_end(ap) - -#endif /* included. */ - -#endif /* Not GCC. */ - - -#endif /* stdarg.h */ diff -ruN glibc-1.00/stdio/Makefile glibc-1.01/stdio/Makefile --- glibc-1.00/stdio/Makefile Sun Feb 16 01:58:32 1992 +++ glibc-1.01/stdio/Makefile Thu Mar 5 18:26:48 1992 @@ -49,7 +49,7 @@ routines := $(strip $(routines)) aux := errlist siglist defs syms-stdio glue -tests := bug1 tst-printf tstscanf test_rdwr test-popen +tests := bug1 bug2 bug3 bug4 bug5 tst-printf tstscanf test_rdwr test-popen include ../Rules diff -ruN glibc-1.00/stdio/__vfscanf.c glibc-1.01/stdio/__vfscanf.c --- glibc-1.00/stdio/__vfscanf.c Wed Jul 10 21:56:47 1991 +++ glibc-1.01/stdio/__vfscanf.c Thu Mar 5 19:13:05 1992 @@ -46,8 +46,10 @@ Return the number of assignments made, or -1 for an input error. */ int DEFUN(__vfscanf, (s, format, arg), - FILE *s AND CONST char *format AND va_list arg) + FILE *s AND CONST char *format AND PTR argptr) { + va_list arg = (va_list) argptr; + register CONST char *f = format; register char fc; /* Current character of the format. */ register size_t done = 0; /* Assignments done. */ diff -ruN glibc-1.00/stdio/__vsscanf.c glibc-1.01/stdio/__vsscanf.c --- glibc-1.00/stdio/__vsscanf.c Wed Jun 12 14:07:37 1991 +++ glibc-1.01/stdio/__vsscanf.c Thu Mar 5 18:51:24 1992 @@ -29,7 +29,7 @@ string FORMAT, using the argument list in ARG. */ int DEFUN(__vsscanf, (s, format, arg), - CONST char *s AND CONST char *format AND va_list arg) + CONST char *s AND CONST char *format AND PTR arg) { FILE f; diff -ruN glibc-1.00/stdio/bug2.c glibc-1.01/stdio/bug2.c --- glibc-1.00/stdio/bug2.c +++ glibc-1.01/stdio/bug2.c Tue Feb 25 21:40:02 1992 @@ -0,0 +1,11 @@ +#include +#include + +int +main (void) +{ + int i; + for (i = 0; i < 40; i++) + printf ("%s = %d\n", "wow", i); + return 0; +} diff -ruN glibc-1.00/stdio/bug3.c glibc-1.01/stdio/bug3.c --- glibc-1.00/stdio/bug3.c +++ glibc-1.01/stdio/bug3.c Fri Mar 6 18:51:35 1992 @@ -0,0 +1,18 @@ +#include +#include + +int +main () +{ + FILE *f; + int i; + + f = fopen("bugtest", "w+"); + for (i=0; i<9000; i++) { + putc('x', f); + } + fseek(f, 8180L, 0); + fwrite("Where does this text go?", 1, 24, f); + fclose(f); + return 0; +} diff -ruN glibc-1.00/stdio/bug4.c glibc-1.01/stdio/bug4.c --- glibc-1.00/stdio/bug4.c +++ glibc-1.01/stdio/bug4.c Thu Mar 5 21:24:11 1992 @@ -0,0 +1,39 @@ +#ifdef LIBC +#include +#endif +#include +#include + +int stdio_block_read = 1, stdio_block_write = 1; + +int +DEFUN(main, (argc, argv), + int argc AND char **argv) +{ + FILE *f; + int i; + char buffer[31]; + + while ((i = getopt (argc, argv, "rw")) != EOF) + switch (i) + { + case 'r': + stdio_block_read = 0; + break; + case 'w': + stdio_block_write = 0; + break; + } + + f = fopen("bugtest", "w+"); + for (i=0; i<9000; i++) { + putc('x', f); + } + fseek(f, 8180L, 0); + fwrite("Where does this text come from?", 1, 31, f); + fseek(f, 8180L, 0); + fread(buffer, 1, 31, f); + fwrite(buffer, 1, 31, stdout); + fclose(f); + return 0; +} diff -ruN glibc-1.00/stdio/bug5.c glibc-1.01/stdio/bug5.c --- glibc-1.00/stdio/bug5.c +++ glibc-1.01/stdio/bug5.c Fri Mar 6 18:51:21 1992 @@ -0,0 +1,41 @@ +/* If stdio is working correctly, after this is run infile and outfile + will have the same contents. If the bug (found in GNU C library 0.3) + exhibits itself, outfile will be missing the 2nd through 1023rd + characters. */ + +#include +#include +#include +#include + +static char buf[8192]; + +int +main (int argc, char **argv) +{ + FILE *in; + FILE *out; + static char inname[] = "infile"; + static char outname[] = "outfile"; + int i; + + /* Create a test file. */ + in = fopen (inname, "w+"); + if (in == NULL) perror (inname); + for (i = 0; i < 1000; ++i) + fprintf (in, "%d\n", i); + + out = fopen (outname, "w"); + if (out == NULL) perror (outname); + if (fseek (in, 0L, SEEK_SET) != 0) abort (); + putc (getc (in), out); + i = fread (buf, 1, sizeof (buf), in); + if (i == 0) perror (inname); + if (fwrite (buf, 1, i, out) != i) perror (outname); + fclose (in); + fclose (out); + + execlp ("cmp", "cmp", inname, outname, (char *) NULL); + perror ("execlp: cmp"); + exit (1); +} diff -ruN glibc-1.00/stdio/fmemopen.c glibc-1.01/stdio/fmemopen.c --- glibc-1.00/stdio/fmemopen.c Wed Aug 7 20:39:56 1991 +++ glibc-1.01/stdio/fmemopen.c Tue Mar 10 21:28:12 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -47,25 +47,35 @@ __io_mode m; register FILE *stream; - if (!__getmode(mode, &m)) + if (!__getmode (mode, &m)) return NULL; - stream = __newstream(); + stream = __newstream (); if (stream == NULL) return NULL; stream->__mode = m; - stream->__io_funcs.__seek = NULL; + + /* Input gets EOF. */ + stream->__room_funcs.__input = NULL; + /* Output gets error. */ + stream->__room_funcs.__output = NULL; + + /* Do nothing for close. */ stream->__io_funcs.__close = NULL; + /* Can't seek outside the buffer. */ + stream->__io_funcs.__seek = NULL; + + stream->__seen = 1; stream->__userbuf = s != NULL && len > 0; if (s == NULL) { - s = malloc(len); + s = malloc (len); if (s == NULL) { int save = errno; - (void) fclose(stream); + (void) fclose (stream); errno = save; return NULL; } @@ -87,19 +97,7 @@ *stream->__bufp != '\0') ++stream->__bufp; else if (stream->__mode.__truncate) - memset((PTR) stream->__buffer, 0, len); - - /* Input gets EOF. */ - stream->__room_funcs.__input = NULL; - /* Output gets error. */ - stream->__room_funcs.__output = NULL; - - /* Do nothing for close. */ - stream->__io_funcs.__close = NULL; - /* Can't seek outside the buffer. */ - stream->__io_funcs.__seek = NULL; - - stream->__seen = 1; + memset ((PTR) stream->__buffer, 0, len); return stream; } diff -ruN glibc-1.00/stdio/fopen.c glibc-1.01/stdio/fopen.c --- glibc-1.00/stdio/fopen.c Fri Oct 18 15:09:31 1991 +++ glibc-1.01/stdio/fopen.c Thu Mar 5 17:30:13 1992 @@ -40,7 +40,7 @@ switch (*mode) { case 'a': - mptr->__append = mptr->__write = 1; + mptr->__write = mptr->__create = mptr->__append = 1; case 'w': mptr->__write = mptr->__create = mptr->__truncate = 1; break; diff -ruN glibc-1.00/stdio/fread.c glibc-1.01/stdio/fread.c --- glibc-1.00/stdio/fread.c Sat Jan 11 16:29:49 1992 +++ glibc-1.01/stdio/fread.c Thu Mar 5 17:06:11 1992 @@ -43,12 +43,11 @@ if (p == NULL || to_read == 0) return 0; - if (!stream->__seen || stream->__get_limit == stream->__buffer || - stream->__put_limit > stream->__buffer || stream->__pushed_back) + if (!stream->__seen || stream->__buffer == NULL || stream->__pushed_back) { - /* This stream has never been seen before. - Calling __fillbf will give it a buffer - and I/O functions if it needs them. */ + /* This stream has never been seen before, or it has a character + pushed back. Call __fillbf to deal with those cases. Life will + be simpler after this call. */ int c = __fillbf(stream); if (c == EOF) return 0; diff -ruN glibc-1.00/stdio/getdelim.c glibc-1.01/stdio/getdelim.c --- glibc-1.00/stdio/getdelim.c Sun Feb 16 01:52:19 1992 +++ glibc-1.01/stdio/getdelim.c Tue Mar 10 21:31:54 1992 @@ -122,6 +122,7 @@ *p++ = c; if (c == terminator) goto win; + i = stream->__get_limit - stream->__bufp; } if (i > copy) diff -ruN glibc-1.00/stdio/gets.c glibc-1.01/stdio/gets.c --- glibc-1.00/stdio/gets.c Wed Jun 12 14:09:43 1991 +++ glibc-1.01/stdio/gets.c Sun Mar 8 15:40:56 1992 @@ -22,7 +22,7 @@ #include -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include warn_references(gets, "the `gets' function is unreliable and should not be used."); diff -ruN glibc-1.00/stdio/internals.c glibc-1.01/stdio/internals.c --- glibc-1.00/stdio/internals.c Mon Feb 17 03:49:37 1992 +++ glibc-1.01/stdio/internals.c Fri Mar 6 20:20:46 1992 @@ -90,6 +90,8 @@ int DEFUN(__stdio_check_offset, (stream), FILE *stream) { + init_stream (stream); + if (stream->__offset == (fpos_t) -1) { /* This stream's offset is unknown or unknowable. */ @@ -131,7 +133,9 @@ static void DEFUN(seek_to_target, (fp), FILE *fp) { - if (fp->__target != fp->__offset) + if (__stdio_check_offset (fp) == EOF) + fp->__error = 1; + else if (fp->__target != fp->__offset) { /* We are not at the target file position. Seek to that position. */ @@ -169,8 +173,11 @@ register FILE *fp AND int c) { int flush_only = c == EOF; + size_t buffer_written; size_t to_write; - int target_set = 0; + + /* Set if target and get_limit have already been twiddled appropriately. */ + int twiddled = 0; if (fp->__put_limit == fp->__buffer) { @@ -178,6 +185,10 @@ size_t buffer_offset = 0; + /* If the user has read some of the buffer, the target position + is incremented for each character he has read. */ + fp->__target += fp->__bufp - fp->__buffer; + if (fp->__mode.__read && fp->__room_funcs.__input != NULL) { int save = errno; @@ -206,9 +217,10 @@ buffer_offset = o; } - /* The target position is now set to where - the beginning of the buffer maps to. */ - target_set = 1; + /* The target position is now set to where the beginning of the + buffer maps to; and the get_limit was set by the input-room + function. */ + twiddled = 1; } if (fp->__buffer != NULL) @@ -229,9 +241,11 @@ /* If there is read data in the buffer past what was written, write all of that as well. Otherwise, just write what has been written into the buffer. */ - to_write = (fp->__get_limit > fp->__bufp ? + buffer_written = fp->__bufp - fp->__buffer; + to_write = (buffer_written == 0 ? 0 : + fp->__get_limit > fp->__bufp ? fp->__get_limit - fp->__buffer : - fp->__bufp - fp->__buffer); + buffer_written); if (fp->__io_funcs.__write == NULL || (to_write == 0 && flush_only)) { @@ -287,17 +301,18 @@ *fp->__bufp++ = (unsigned char) c; } - end:; + end: - if (!target_set) - /* The beginning of the buffer now maps to - just past the data we have just written. */ - fp->__target = fp->__offset; - - if (!fp->__mode.__write) - /* Set the reading limit to the beginning of the buffer, - so the next `getc' will call __fillbf. */ - fp->__get_limit = fp->__buffer; + if (!twiddled) + { + /* The new target position moves up as + much as the user wrote into the buffer. */ + fp->__target += buffer_written; + + /* Set the reading limit to the beginning of the buffer, + so the next `getc' will call __fillbf. */ + fp->__get_limit = fp->__buffer; + } if (feof(fp) || ferror(fp)) fp->__bufp = fp->__put_limit; @@ -394,12 +409,8 @@ /* Set the end pointer to one past the last character we read. */ fp->__get_limit = fp->__buffer + nread; - if (fp->__mode.__write) - /* Allow writing into the buffer. */ - fp->__put_limit = fp->__buffer + fp->__bufsize; - else - /* Make it so the next `putc' will call __flshfp. */ - fp->__put_limit = fp->__buffer; + /* Make it so the next `putc' will call __flshfp. */ + fp->__put_limit = fp->__buffer; /* Return the first character in the buffer. */ return (unsigned char) *fp->__bufp++; @@ -500,6 +511,7 @@ DEFUN(__fillbf, (fp), register FILE *fp) { register int c; + fpos_t new_target; if (!__validfp(fp) || !fp->__mode.__read) { @@ -530,6 +542,10 @@ (void) __flshfp(f, EOF); } + /* We want the beginning of the buffer to now + map to just past the last data we read. */ + new_target = fp->__target + (fp->__get_limit - fp->__buffer); + if (fp->__put_limit > fp->__buffer) { /* There is written data in the buffer. @@ -537,16 +553,10 @@ if (fp->__room_funcs.__output == NULL) fp->__error = 1; else - { - fpos_t target = fp->__target; - (*fp->__room_funcs.__output)(fp, EOF); - fp->__target = target; - } + (*fp->__room_funcs.__output)(fp, EOF); } - /* We want the beginning of the buffer to now - map to just past the last data we read. */ - fp->__target += fp->__get_limit - fp->__buffer; + fp->__target = new_target; if (ferror(fp)) c = EOF; diff -ruN glibc-1.00/stdio/printf.h glibc-1.01/stdio/printf.h --- glibc-1.00/stdio/printf.h Fri Jan 10 23:57:28 1992 +++ glibc-1.01/stdio/printf.h Thu Mar 5 18:01:50 1992 @@ -21,14 +21,14 @@ #define _PRINTF_H 1 #include - #define __need_FILE #include -#define __need___va_list -#include #define __need_size_t #include +#include /* Need va_list. */ + + struct printf_info { int prec; /* Precision. */ @@ -54,7 +54,7 @@ typedef int EXFUN(printf_function, (FILE *__stream, CONST struct printf_info *__info, - __va_list *__args)); + va_list *__args)); typedef int EXFUN(printf_arginfo_function, (CONST struct printf_info *__info, size_t __n, int *__argtypes)); diff -ruN glibc-1.00/stdio/stdio.h glibc-1.01/stdio/stdio.h --- glibc-1.00/stdio/stdio.h Sun Feb 16 02:00:27 1992 +++ glibc-1.01/stdio/stdio.h Thu Mar 5 18:02:55 1992 @@ -30,9 +30,6 @@ #define __need_NULL #include -#define __need___va_list -#include - #include #endif /* Don't need FILE. */ #undef __need_FILE @@ -322,11 +319,11 @@ extern int EXFUN(sprintf, (char *__s, CONST char *__format, ...)); /* Write formatted output to S from argument list ARG. */ -extern int EXFUN(vfprintf, (FILE *__s, CONST char *__format, __va_list __arg)); +extern int EXFUN(vfprintf, (FILE *__s, CONST char *__format, PTR __arg)); /* Write formatted output to stdout from argument list ARG. */ -extern int EXFUN(vprintf, (CONST char *__format, __va_list __arg)); +extern int EXFUN(vprintf, (CONST char *__format, PTR __arg)); /* Write formatted output to S from argument list ARG. */ -extern int EXFUN(vsprintf, (char *__s, CONST char *__format, __va_list __arg)); +extern int EXFUN(vsprintf, (char *__s, CONST char *__format, PTR __arg)); #ifdef __OPTIMIZE__ #define vprintf(fmt, arg) vfprintf(stdout, (fmt), (arg)) @@ -338,15 +335,15 @@ CONST char *__format, ...)); extern int EXFUN(vsnprintf, (char *__s, size_t __maxlen, - CONST char *__format, __va_list __arg)); + CONST char *__format, PTR __arg)); /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ -extern int EXFUN(vasprintf, (char **__ptr, CONST char *__f, __va_list __arg)); +extern int EXFUN(vasprintf, (char **__ptr, CONST char *__f, PTR __arg)); extern int EXFUN(asprintf, (char **__ptr, CONST char *__fmt, ...)); /* Write formatted output to a file descriptor. */ -extern int EXFUN(vdprintf, (int __fd, CONST char *__fmt, __va_list __arg)); +extern int EXFUN(vdprintf, (int __fd, CONST char *__fmt, PTR __arg)); extern int EXFUN(dprintf, (int __fd, CONST char *__fmt, ...)); #endif @@ -361,18 +358,18 @@ #ifdef __USE_GNU /* Read formatted input from S into argument list ARG. */ extern int EXFUN(__vfscanf, (FILE *__s, CONST char *__format, - __va_list __arg)); + PTR __arg)); extern int EXFUN(vfscanf, (FILE *__s, CONST char *__format, - __va_list __arg)); + PTR __arg)); /* Read formatted input from stdin into argument list ARG. */ -extern int EXFUN(vscanf, (CONST char *__format, __va_list __arg)); +extern int EXFUN(vscanf, (CONST char *__format, PTR __arg)); /* Read formatted input from S into argument list ARG. */ extern int EXFUN(__vsscanf, (CONST char *__s, CONST char *__format, - __va_list __arg)); + PTR __arg)); extern int EXFUN(vsscanf, (CONST char *__s, CONST char *__format, - __va_list __arg)); + PTR __arg)); #ifdef __OPTIMIZE__ diff -ruN glibc-1.00/stdio/syms-stdio.c glibc-1.01/stdio/syms-stdio.c --- glibc-1.00/stdio/syms-stdio.c Wed Jun 12 14:11:27 1991 +++ glibc-1.01/stdio/syms-stdio.c Sun Mar 8 15:41:04 1992 @@ -19,7 +19,7 @@ #include #include -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD symbol_alias(_sys_errlist, sys_errlist); symbol_alias(_sys_nerr, sys_nerr); diff -ruN glibc-1.00/stdio/vasprintf.c glibc-1.01/stdio/vasprintf.c --- glibc-1.00/stdio/vasprintf.c Fri Jul 26 18:17:55 1991 +++ glibc-1.01/stdio/vasprintf.c Thu Mar 5 18:51:39 1992 @@ -57,7 +57,7 @@ allocated with malloc and stored in *STRING_PTR. */ int DEFUN(vasprintf, (string_ptr, format, args), - char **string_ptr AND CONST char *format AND va_list args) + char **string_ptr AND CONST char *format AND PTR args) { FILE f; int done; diff -ruN glibc-1.00/stdio/vdprintf.c glibc-1.01/stdio/vdprintf.c --- glibc-1.00/stdio/vdprintf.c Sun Feb 9 23:46:56 1992 +++ glibc-1.01/stdio/vdprintf.c Thu Mar 5 18:51:36 1992 @@ -28,7 +28,7 @@ FORMAT, using the argument list in ARG. */ int DEFUN(vdprintf, (d, format, arg), - int d AND CONST char *format AND va_list arg) + int d AND CONST char *format AND PTR arg) { int done; FILE f; diff -ruN glibc-1.00/stdio/vfprintf.c glibc-1.01/stdio/vfprintf.c --- glibc-1.00/stdio/vfprintf.c Mon Aug 5 18:51:47 1991 +++ glibc-1.01/stdio/vfprintf.c Thu Mar 5 19:01:52 1992 @@ -69,8 +69,10 @@ int DEFUN(vfprintf, (s, format, args), - register FILE *s AND CONST char *format AND va_list args) + register FILE *s AND CONST char *format AND PTR argptr) { + va_list args = (va_list) argptr; + /* Lower-case digits. */ static CONST char lower_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; /* Upper-case digits. */ diff -ruN glibc-1.00/stdio/vfscanf.c glibc-1.01/stdio/vfscanf.c --- glibc-1.00/stdio/vfscanf.c Wed Jun 12 14:12:43 1991 +++ glibc-1.01/stdio/vfscanf.c Thu Mar 5 18:51:32 1992 @@ -25,7 +25,7 @@ int DEFUN(vfscanf, (s, format, arg), - FILE *s AND CONST char *format AND va_list arg) + FILE *s AND CONST char *format AND PTR arg) { return __vfscanf(s, format, arg); } diff -ruN glibc-1.00/stdio/vprintf.c glibc-1.01/stdio/vprintf.c --- glibc-1.00/stdio/vprintf.c Mon Aug 5 18:54:34 1991 +++ glibc-1.01/stdio/vprintf.c Thu Mar 5 18:51:45 1992 @@ -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 va_list arg) +DEFUN(vprintf, (format, arg), CONST char *format AND PTR arg) { return vfprintf (stdout, format, arg); } diff -ruN glibc-1.00/stdio/vscanf.c glibc-1.01/stdio/vscanf.c --- glibc-1.00/stdio/vscanf.c Thu Jul 18 04:24:43 1991 +++ glibc-1.01/stdio/vscanf.c Thu Mar 5 18:51:28 1992 @@ -26,7 +26,7 @@ /* Read formatted input from stdin according to the format string in FORMAT, using the argument list in ARG. */ int -DEFUN(vscanf, (format, arg), CONST char *format AND va_list arg) +DEFUN(vscanf, (format, arg), CONST char *format AND PTR arg) { return vfscanf (stdin, format, arg); } diff -ruN glibc-1.00/stdio/vsnprintf.c glibc-1.01/stdio/vsnprintf.c --- glibc-1.00/stdio/vsnprintf.c Thu Jul 25 20:06:22 1991 +++ glibc-1.01/stdio/vsnprintf.c Thu Mar 5 18:51:43 1992 @@ -29,7 +29,7 @@ */ int DEFUN(vsnprintf, (s, maxlen, format, arg), - char *s AND size_t maxlen AND CONST char *format AND va_list arg) + char *s AND size_t maxlen AND CONST char *format AND PTR arg) { int done; FILE f; diff -ruN glibc-1.00/stdio/vsprintf.c glibc-1.01/stdio/vsprintf.c --- glibc-1.00/stdio/vsprintf.c Wed Jun 12 14:14:27 1991 +++ glibc-1.01/stdio/vsprintf.c Thu Mar 5 18:51:41 1992 @@ -28,7 +28,7 @@ FORMAT, using the argument list in ARG. */ int DEFUN(vsprintf, (s, format, arg), - char *s AND CONST char *format AND va_list arg) + char *s AND CONST char *format AND PTR arg) { int done; FILE f; diff -ruN glibc-1.00/stdio/vsscanf.c glibc-1.01/stdio/vsscanf.c --- glibc-1.00/stdio/vsscanf.c Wed Jun 12 14:14:31 1991 +++ glibc-1.01/stdio/vsscanf.c Wed Mar 11 18:43:05 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -27,4 +27,4 @@ function_alias(vsscanf, __vsscanf, int, (s, format, arg), DEFUN(vsscanf, (s, format, arg), - CONST char *s AND CONST char *format AND va_list arg)) + CONST char *s AND CONST char *format AND PTR arg)) diff -ruN glibc-1.00/stdlib/abort.c glibc-1.01/stdlib/abort.c --- glibc-1.00/stdlib/abort.c Mon Jun 24 21:05:44 1991 +++ glibc-1.01/stdlib/abort.c Sun Mar 8 15:41:13 1992 @@ -38,7 +38,7 @@ if (!aborting) { aborting = 1; -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD { extern unsigned long int __libc_atexit[]; register unsigned long int i; diff -ruN glibc-1.00/stdlib/exit.c glibc-1.01/stdlib/exit.c --- glibc-1.00/stdlib/exit.c Wed Jul 31 00:52:18 1991 +++ glibc-1.01/stdlib/exit.c Sun Mar 8 15:41:18 1992 @@ -22,8 +22,12 @@ #include #include "exit.h" -#ifdef __GNU_STAB__ -CONST unsigned long int __libc_atexit[1]; +#ifdef HAVE_GNU_LD +CONST struct + { + size_t n; + void EXFUN((*fn[1]), (NOARGS)); + } __libc_atexit; #endif /* Call all functions registered with `atexit' and `on_exit', @@ -55,11 +59,11 @@ } } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD { - register unsigned long int i; - for (i = 1; i <= __libc_atexit[0]; ++i) - (*(void EXFUN((*), (NOARGS))) __libc_atexit[i])(); + void EXFUN((*CONST *fn), (NOARGS)); + for (fn = __libc_atexit.fn; *fn != NULL; ++fn) + (**fn) (); } #else { diff -ruN glibc-1.00/stdlib/strtod.c glibc-1.01/stdlib/strtod.c --- glibc-1.00/stdlib/strtod.c Wed Jun 12 14:18:59 1991 +++ glibc-1.01/stdlib/strtod.c Fri Mar 6 14:14:31 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -40,7 +40,6 @@ int got_dot; /* Found a decimal point. */ int got_digit; /* Seen any digits. */ - int nonzero; /* Seen any nonzero digits. */ /* The exponent of the number. */ long int exponent; @@ -69,7 +68,6 @@ num = 0.0; got_dot = 0; got_digit = 0; - nonzero = 0; exponent = 0; for (;; ++s) { @@ -77,9 +75,6 @@ { got_digit = 1; - if (*s != '0') - nonzero = 1; - /* Make sure that multiplication by 10 will not overflow. */ if (num > DBL_MAX * 0.1) /* The value of the digit doesn't matter, since we have already @@ -119,28 +114,30 @@ errno = 0; ++s; exp = strtol(s, &end, 10); - if (end == s) + if (errno == ERANGE) { - if (errno == ERANGE) - { - /* The exponent overflowed a `long int'. It is probably a safe - assumption that an exponent that cannot be represented by - a `long int' exceeds the limits of a `double'. */ - if (exp < 0) - goto underflow; - else - goto overflow; - } + /* The exponent overflowed a `long int'. It is probably a safe + assumption that an exponent that cannot be represented by + a `long int' exceeds the limits of a `double'. */ + if (endptr != NULL) + *endptr = end; + if (exp < 0) + goto underflow; else - /* There was no exponent. Reset END to point to - the 'e' or 'E', so *ENDPTR will be set there. */ - end = (char *) s - 1; + goto overflow; } + else if (end == s) + /* There was no exponent. Reset END to point to + the 'e' or 'E', so *ENDPTR will be set there. */ + end = (char *) s - 1; errno = save; s = end; exponent += exp; } + if (endptr != NULL) + *endptr = (char *) s; + if (num == 0.0) return 0.0; @@ -154,25 +151,20 @@ } else if (exponent > 0) { - if (num > DBL_MAX * pow(10.0, (double) exponent)) + if (num > DBL_MAX * pow(10.0, (double) -exponent)) goto overflow; } num *= pow(10.0, (double) exponent); - /* Set *ENDPTR and return the result. */ - if (endptr != NULL) - *endptr = (char *) s; return num * sign; -overflow:; + overflow: /* Return an overflow error. */ - if (endptr != NULL) - *endptr = (char *) nptr; errno = ERANGE; return HUGE_VAL * sign; -underflow:; + underflow: /* Return an underflow error. */ if (endptr != NULL) *endptr = (char *) nptr; @@ -179,7 +171,7 @@ errno = ERANGE; return 0.0; -noconv:; + noconv: /* There was no number. */ if (endptr != NULL) *endptr = (char *) nptr; diff -ruN glibc-1.00/string/Makefile glibc-1.01/string/Makefile --- glibc-1.00/string/Makefile Sun Feb 16 00:48:21 1992 +++ glibc-1.01/string/Makefile Tue Feb 25 21:34:23 1992 @@ -30,7 +30,7 @@ bcopy bzero ffs stpcpy strcasecmp \ rindex index bcmp memccpy memcpy wordcopy -tests := tester # testcopy -- waiting for papers +tests := tester testcopy distribute := memcopy.h diff -ruN glibc-1.00/string/bcmp.c glibc-1.01/string/bcmp.c --- glibc-1.00/string/bcmp.c Sat Feb 15 18:11:25 1992 +++ glibc-1.01/string/bcmp.c Thu Feb 27 14:49:27 1992 @@ -24,6 +24,6 @@ #include -function_alias(bcmp, memcmp, int, (s1, s2), +function_alias(bcmp, memcmp, int, (s1, s2, n), DEFUN(bcmp, (s1, s2, n), CONST PTR s1 AND CONST PTR s2 AND size_t n)) diff -ruN glibc-1.00/string/string.h glibc-1.01/string/string.h --- glibc-1.00/string/string.h Fri Nov 29 18:19:40 1991 +++ glibc-1.01/string/string.h Tue Feb 25 22:24:33 1992 @@ -86,9 +86,9 @@ extern char *EXFUN(strdup, (CONST char *__s)); #endif -/* Find the first occurence of C in S. */ +/* Find the first occurrence of C in S. */ extern char *EXFUN(strchr, (CONST char *__s, int __c)); -/* Find the last occurence of C in S. */ +/* Find the last occurrence of C in S. */ extern char *EXFUN(strrchr, (CONST char *__s, int __c)); /* Return the length of the initial segment of S which diff -ruN glibc-1.00/string/strings.h glibc-1.01/string/strings.h --- glibc-1.00/string/strings.h Wed Jun 12 14:20:17 1991 +++ glibc-1.01/string/strings.h Tue Feb 25 22:24:31 1992 @@ -30,9 +30,9 @@ /* These do not depend on __USE_BSD because is a BSD-only header. */ -/* Find the first occurence of C in S. */ +/* Find the first occurrence of C in S. */ extern char *EXFUN(index, (CONST char *__s, int __c)); -/* Find the last occurence of C in S. */ +/* Find the last occurrence of C in S. */ extern char *EXFUN(rindex, (CONST char *__s, int __c)); diff -ruN glibc-1.00/string/testcopy.c glibc-1.01/string/testcopy.c --- glibc-1.00/string/testcopy.c +++ glibc-1.01/string/testcopy.c Sat Feb 15 17:40:47 1992 @@ -0,0 +1,104 @@ +/* Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Torbjorn Granlund (tege@sics.se). + +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 + +int +DEFUN(main, (argc, argv), + int argc AND char **argv) +{ + if (argc > 1) + { + long int s[1025], d[1025]; + int i; + int a, b = 0; + + a = atoi(argv[1]); + if (argc > 2) + b = atoi(argv[2]); + + for (i = 10000; --i; ) + memmove (((char *) d) + b, ((char *) s) + a, 1024 * 4); + } + else + { +#define SIZE (3*0x200) + + unsigned char *p = valloc(SIZE + 40); + int src_align, dst_align; + int i; + int len; + + for (len = 0; len < 256; len++) + { + printf("phase %d\n", len); + for (src_align = 0; src_align < 32; src_align++) + { + unsigned char *src; + + src = p + 40 + SIZE/3 + src_align; + + for (dst_align = 0; dst_align < 32; dst_align++) + { + unsigned char *dst; + + memset (p, 0, SIZE + 40); + for (i = 0; i < len; i++) + src[i] = i; + + dst = p + 40 + dst_align; + memmove (dst, src, len); + + for (i = -32; i < 0; i++) + if (dst[i] != 0) + abort(); + for (i = 0; i < len; i++) + if (dst[i] != i) + abort(); + for (i = 32; i >= 0; i--) + if (dst[len + i] != 0) + abort(); + + memset (p, 0, SIZE + 40); + for (i = 0; i < len; i++) + src[i] = i; + + dst = p + 40 + SIZE/3*2 + dst_align; + memmove (dst, src, len); + + for (i = -32; i < 0; i++) + if (dst[i] != 0) + abort(); + for (i = 0; i < len; i++) + if (dst[i] != i) + abort(); + for (i = 32; i >= 0; i--) + if (dst[len + i] != 0) + abort(); + } + } + } + } + + exit (0); +} diff -ruN glibc-1.00/sysdeps/am29k/ffs.c glibc-1.01/sysdeps/am29k/ffs.c --- glibc-1.00/sysdeps/am29k/ffs.c Wed Jun 12 14:20:42 1991 +++ glibc-1.01/sysdeps/am29k/ffs.c Wed Mar 11 18:10:37 1992 @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Amd 290x0. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,8 @@ #undef ffs +#ifdef __GNUC__ + int DEFUN(ffs, (x), int x) { @@ -32,3 +34,7 @@ return 32 - cnt; } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/generic/Makefile glibc-1.01/sysdeps/generic/Makefile --- glibc-1.00/sysdeps/generic/Makefile Tue Feb 11 02:21:59 1992 +++ glibc-1.01/sysdeps/generic/Makefile Fri Mar 6 19:32:57 1992 @@ -1,9 +1,9 @@ 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 +routines:= $(filter-out acos asin cos sin ceil __rint hypot,$(routines)) \ + sincos asincos +aux := $(aux) exp__E log__L math-twiddled := t diff -ruN glibc-1.00/sysdeps/generic/__lstat.c glibc-1.01/sysdeps/generic/__lstat.c --- glibc-1.00/sysdeps/generic/__lstat.c +++ glibc-1.01/sysdeps/generic/__lstat.c Thu Mar 5 17:16:11 1992 @@ -0,0 +1,26 @@ +/* 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 + +function_alias (__lstat, __stat, int, (file, buf), + DEFUN(__lstat, (file, buf), + CONST char *file AND struct stat *buf)) diff -ruN glibc-1.00/sysdeps/generic/varargs.h glibc-1.01/sysdeps/generic/varargs.h --- glibc-1.00/sysdeps/generic/varargs.h Wed Jun 12 14:25:15 1991 +++ glibc-1.01/sysdeps/generic/varargs.h @@ -1,61 +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. */ - -#ifndef _VARARGS_H - -#define _VARARGS_H 1 -#include - -#ifdef __GNUC__ - -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist; -#define va_list char * - -#ifdef __sparc__ -#define va_start(AP) \ - (__builtin_saveregs (), \ - AP = ((void *) &__builtin_va_alist)) -#else -#define va_start(AP) AP=(char *) &__builtin_va_alist -#endif -#define va_end(AP) - -#define __va_rounded_size(TYPE) \ - (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) - -#define va_arg(AP, TYPE) \ - (*((TYPE *) (AP += __va_rounded_size (TYPE), \ - AP - __va_rounded_size (TYPE)))) - -#else /* Not GCC. */ - -/* Implement varargs on top of our stdarg implementation. */ - -#include - -#define va_alist __va_fakearg -#define va_dcl int __va_fakearg; - -#undef va_start -#define va_start(ap) (__va_start((ap), __va_fakearg), \ - (ap) -= sizeof(__va_fakearg)) - -#endif /* GCC. */ - -#endif /* varargs.h */ diff -ruN glibc-1.00/sysdeps/generic/vtimes.c glibc-1.01/sysdeps/generic/vtimes.c --- glibc-1.00/sysdeps/generic/vtimes.c Sat Jan 11 04:13:11 1992 +++ glibc-1.01/sysdeps/generic/vtimes.c Tue Feb 25 23:18:06 1992 @@ -47,7 +47,7 @@ vt->vm_minflt = usage.ru_minflt; vt->vm_nswap = usage.ru_nswap; vt->vm_inblk = usage.ru_inblock; - vt->vm_outblk = usage.ru_oublock; + vt->vm_oublk = usage.ru_oublock; } return 0; } diff -ruN glibc-1.00/sysdeps/i386/__longjmp.c glibc-1.01/sysdeps/i386/__longjmp.c --- glibc-1.00/sysdeps/i386/__longjmp.c Mon Dec 2 15:19:01 1991 +++ glibc-1.01/sysdeps/i386/__longjmp.c Wed Mar 11 18:10:35 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,11 @@ #include #include #include + + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif /* Jump to the position specified by ENV, causing the diff -ruN glibc-1.00/sysdeps/i386/bzero.c glibc-1.01/sysdeps/i386/bzero.c --- glibc-1.00/sysdeps/i386/bzero.c Wed Oct 30 01:17:30 1991 +++ glibc-1.01/sysdeps/i386/bzero.c Wed Mar 11 18:10:32 1992 @@ -1,6 +1,6 @@ /* bzero -- set a block of memory to zero. For Intel 80x86, x>=3. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -24,6 +24,8 @@ #undef bzero +#ifdef __GNUC__ + void DEFUN(bzero, (dstpp, len), PTR dstpp AND size_t len) @@ -71,3 +73,7 @@ "0" (dstp), "c" (len), "a" (x) : "cx"); } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/i386/ffs.c glibc-1.01/sysdeps/i386/ffs.c --- glibc-1.00/sysdeps/i386/ffs.c Wed Oct 30 01:19:56 1991 +++ glibc-1.01/sysdeps/i386/ffs.c Wed Mar 11 18:10:30 1992 @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Intel 80x86, x>=3. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,8 @@ #undef ffs +#ifdef __GNUC__ + int DEFUN(ffs, (x), int x) { @@ -37,3 +39,7 @@ return cnt; } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/i386/memchr.c glibc-1.01/sysdeps/i386/memchr.c --- glibc-1.00/sysdeps/i386/memchr.c Mon Dec 2 15:20:06 1991 +++ glibc-1.01/sysdeps/i386/memchr.c Wed Mar 11 18:10:26 1992 @@ -1,7 +1,7 @@ -/* memchr (str, ch, n) -- Return pointer to first occurence of CH in STR less +/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less than N. For Intel 80x86, x>=3. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -22,6 +22,8 @@ #include #include +#ifdef __GNUC__ + PTR DEFUN(memchr, (str, c, len), CONST PTR str AND int c AND size_t len) @@ -37,3 +39,7 @@ "2:" : "=a" (str), "=D" (str) : "c" (len), "1" (str), "a" (c)); return str; } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/i386/memset.c glibc-1.01/sysdeps/i386/memset.c --- glibc-1.00/sysdeps/i386/memset.c Tue Jan 14 21:36:21 1992 +++ glibc-1.01/sysdeps/i386/memset.c Wed Mar 11 18:10:15 1992 @@ -1,6 +1,6 @@ /* memset -- set a block of memory to some byte value. For Intel 80x86, x>=3. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -22,6 +22,8 @@ #include #include +#ifdef __GNUC__ + PTR DEFUN(memset, (dstpp, c, len), PTR dstpp AND int c AND size_t len) @@ -72,3 +74,7 @@ return dstpp; } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/i386/setjmp.c glibc-1.01/sysdeps/i386/setjmp.c --- glibc-1.00/sysdeps/i386/setjmp.c Mon Dec 2 15:22:33 1991 +++ glibc-1.01/sysdeps/i386/setjmp.c Wed Mar 11 17:30:01 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -33,7 +33,7 @@ "movl %%edx, %0\n" "movl %%esp, %1\n" "xorl %%eax, %%eax\n" - "jmp *%edx\n" : + "jmp *%%edx\n" : "=g" (env[0].__dx), "=g" (env[0].__sp)); /* NOTREACHED */ diff -ruN glibc-1.00/sysdeps/i386/strlen.c glibc-1.01/sysdeps/i386/strlen.c --- glibc-1.00/sysdeps/i386/strlen.c Mon Dec 2 15:23:41 1991 +++ glibc-1.01/sysdeps/i386/strlen.c Wed Mar 11 17:28:55 1992 @@ -1,6 +1,6 @@ /* strlen -- determine the length of a string. For Intel 80x86, x>=3. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 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,7 @@ int cnt; asm("cld\n" /* Search forward. */ - "repne\n" /* Look for a zero byte. */ + "repnz\n" /* Look for a zero byte. */ "scasb" /* %0, %1, %3 */ : "=c" (cnt) : "D" (str), "0" (-1), "a" (0)); diff -ruN glibc-1.00/sysdeps/i860/varargs.h glibc-1.01/sysdeps/i860/varargs.h --- glibc-1.00/sysdeps/i860/varargs.h Wed Jun 12 14:26:21 1991 +++ glibc-1.01/sysdeps/i860/varargs.h @@ -1,73 +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. */ - -#ifndef _VARARGS_H - -#define _VARARGS_H 1 -#include - -/* Implement varargs for the i860. */ - -typedef struct - { - struct - { - int __fixed[12]; - int __floating[8]; - } *__regs; - PTR __stack; - unsigned int __nfixed, __nfloating; - } va_list; - -#define va_alist -#define va_dcl - -extern PTR EXFUN(memcpy, (PTR __dest, CONST PTR __src, size_t __n)); -#define va_start(ap) \ - ((void) memcpy(&(ap), (va_list *) __builtin_saveregs(), 80)) - -#define __va_type __builtin_classify_type(__va_temp) -#define va_arg(ap, type) \ - (__extension__ \ - ({ type __va_temp; \ - type *__va_result_ptr; \ - if (__va_type < 8 && sizeof(__va_temp) < 8 && (ap).__nfixed < 12) \ - __va_result_ptr = (type *) &(ap).__regs->__fixed[(ap).__nfixed++]; \ - else if (__va_type < 9 && sizeof(__va_temp) >= 8 && \ - (ap).__nfloating < 8) \ - { \ - (ap).__nfloating = (((ap).__nfloating + \ - 2 * (sizeof(__va_temp) / 4) - 1) & \ - ~(sizeof(__va_temp) / 4 - 1)); \ - __va_result_ptr \ - = (type *) &(ap).__regs->__floating[(ap).__nfloating - \ - (sizeof(__va_temp) / 4)]; \ - } \ - else \ - { \ - int __temp = ((int) ((ap).__stack + __alignof__(type) - 1) & \ - ~(__alignof__(type) - 1)); \ - (ap).__stack = (PTR) (__temp + sizeof(type)); \ - __va_result_ptr = (type *) temp; \ - } \ - *__va_result_ptr; \ - })) - -#define va_end(ap) - -#endif /* varargs.h */ diff -ruN glibc-1.00/sysdeps/ieee754/Dist glibc-1.01/sysdeps/ieee754/Dist --- glibc-1.00/sysdeps/ieee754/Dist Fri Jan 31 18:25:06 1992 +++ glibc-1.01/sysdeps/ieee754/Dist Thu Mar 5 17:34:18 1992 @@ -1 +1,2 @@ ../../math/bsd/ieee/support.c +ieee754.h diff -ruN glibc-1.00/sysdeps/ieee754/__copysign.c glibc-1.01/sysdeps/ieee754/__copysign.c --- glibc-1.00/sysdeps/ieee754/__copysign.c Wed Jun 12 14:26:25 1991 +++ glibc-1.01/sysdeps/ieee754/__copysign.c Thu Mar 5 17:43:12 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -18,24 +18,13 @@ #include #include +#include "ieee754.h" /* Return X with its signed changed to Y's. */ double DEFUN(__copysign, (x, y), double x AND double y) { - union - { - double d; - /* This is the IEEE 754 double-precision format. */ - struct - { - unsigned int negative:1; - int exponent:11; - /* Together these comprise the signed mantissa. */ - int mantissa0:20; - unsigned int mantissa1:32; - } ieee; - } ux, uy; + union ieee754_double ux, uy; ux.d = x; uy.d = y; diff -ruN glibc-1.00/sysdeps/ieee754/__drem.c glibc-1.01/sysdeps/ieee754/__drem.c --- glibc-1.00/sysdeps/ieee754/__drem.c +++ glibc-1.01/sysdeps/ieee754/__drem.c Fri Mar 6 12:53:39 1992 @@ -0,0 +1,107 @@ +/* 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. */ + +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#include +#include +#include +#include "ieee754.h" + +/* Return the remainder of X/Y. */ +double +DEFUN(__drem, (x, y), + double x AND double y) +{ + union ieee754_double ux, uy; + + ux.d = x; + uy.d = y; +#define x ux.d +#define y ux.d + + uy.ieee.negative = 0; + + if (!__finite (x)) + return NAN; + else if (y == 0.0) + return 0.0 / 0.0; + else if (__isnan (y)) + return y; + else if (__isinf (y)) + return x; + else if (uy.ieee.exponent <= 1) + { + /* Subnormal (or almost subnormal) Y value. */ + double b = __scalb (1.0, 54); + y *= b; + x = __drem (x, y); + x *= b; + return __drem (x, y) / b; + } + else if (y >= 1.7e308 / 2) + { + y /= 2; + x /= 2; + return __drem (x, y) * 2; + } + else + { + union ieee754_double a; + double b; + unsigned int negative = ux.ieee.negative; + a.d = y + y; + b = y / 2; + ux.ieee.negative = 0; + while (x > a.d) + { + unsigned short int k = ux.ieee.exponent - a.ieee.exponent; + union ieee754_double tmp; + tmp.d = a.d; + tmp.ieee.exponent += k; + if (x < tmp.d) + --tmp.ieee.exponent; + x -= tmp.d; + } + if (x > b) + { + x -= y; + if (x >= b) + x -= y; + } + ux.ieee.negative = negative; + return x; + } +} diff -ruN glibc-1.00/sysdeps/ieee754/__infnan.c glibc-1.01/sysdeps/ieee754/__infnan.c --- glibc-1.00/sysdeps/ieee754/__infnan.c Wed Jun 12 14:26:29 1991 +++ glibc-1.01/sysdeps/ieee754/__infnan.c Fri Mar 6 11:32:56 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,8 @@ #include #include #include +#include +#include "ieee754.h" /* Deal with an infinite or NaN result. If ERROR is ERANGE, result is +Inf; @@ -41,26 +43,6 @@ default: errno = EDOM; - { - /* Construct an IEEE NaN. */ - union - { - double d; - /* This is the IEEE 754 double-precision format. */ - struct - { - unsigned int negative:1; - int exponent:11; - /* Together these comprise the signed mantissa. */ - int mantissa0:20; - unsigned int mantissa1:32; - } ieee; - } u; - - u.ieee.exponent = 0x7ff; - u.ieee.mantissa0 = 0xfffff; - u.ieee.mantissa1 = 0xffffffff; - return u.d; - } + return NAN; } } diff -ruN glibc-1.00/sysdeps/ieee754/__isinf.c glibc-1.01/sysdeps/ieee754/__isinf.c --- glibc-1.00/sysdeps/ieee754/__isinf.c Wed Jul 3 18:42:25 1991 +++ glibc-1.01/sysdeps/ieee754/__isinf.c Thu Mar 5 17:43:08 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -18,6 +18,7 @@ #include #include +#include "ieee754.h" /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ @@ -24,19 +25,7 @@ int DEFUN(__isinf, (value), double value) { - union - { - double d; - /* This is the IEEE 754 double-precision format. */ - struct - { - unsigned int negative:1; - int exponent:11; - /* Together these comprise the signed mantissa. */ - int mantissa0:20; - unsigned int mantissa1:32; - } ieee; - } u; + union ieee754_double u; u.d = value; /* An IEEE 754 infinity has an exponent with the diff -ruN glibc-1.00/sysdeps/ieee754/__isnan.c glibc-1.01/sysdeps/ieee754/__isnan.c --- glibc-1.00/sysdeps/ieee754/__isnan.c Wed Jun 12 14:26:37 1991 +++ glibc-1.01/sysdeps/ieee754/__isnan.c Thu Mar 5 17:36:23 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -18,24 +18,13 @@ #include #include +#include "ieee754.h" /* Return nonzero if VALUE is not a number. */ int DEFUN(__isnan, (value), double value) { - union - { - double d; - /* This is the IEEE 754 double-precision format. */ - struct - { - unsigned int negative:1; - int exponent:11; - /* Together these comprise the signed mantissa. */ - int mantissa0:20; - unsigned int mantissa1:32; - } ieee; - } u; + union ieee754_double u; u.d = value; diff -ruN glibc-1.00/sysdeps/ieee754/__logb.c glibc-1.01/sysdeps/ieee754/__logb.c --- glibc-1.00/sysdeps/ieee754/__logb.c +++ glibc-1.01/sysdeps/ieee754/__logb.c Fri Mar 6 12:28:32 1992 @@ -0,0 +1,38 @@ +/* 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 "ieee754.h" + +/* Return the base 2 signed integral exponent of X. */ +double +DEFUN(__logb, (x), double x) +{ + union ieee754_double u; + + if (__isnan (x)) + return x; + else if (__isinf (x)) + return HUGE_VAL; + else if (x == 0.0) + return - HUGE_VAL; + + u.d = x; + return u.ieee.exponent - 1023; +} diff -ruN glibc-1.00/sysdeps/ieee754/ieee754.h glibc-1.01/sysdeps/ieee754/ieee754.h --- glibc-1.00/sysdeps/ieee754/ieee754.h +++ glibc-1.01/sysdeps/ieee754/ieee754.h Thu Mar 5 18:47:26 1992 @@ -0,0 +1,43 @@ +/* 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 + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#ifdef __BIG_ENDIAN + unsigned int negative:1; + int exponent:11; + /* Together these comprise the signed mantissa. */ + int mantissa0:20; + unsigned int mantissa1:32; +#endif +#ifdef __LITTLE_ENDIAN + /* Together these comprise the signed mantissa. */ + unsigned int mantissa1:32; + int mantissa0:20; + int exponent:11; + unsigned int negative:1; +#endif + } ieee; + }; diff -ruN glibc-1.00/sysdeps/ieee754/ldexp.c glibc-1.01/sysdeps/ieee754/ldexp.c --- glibc-1.00/sysdeps/ieee754/ldexp.c +++ glibc-1.01/sysdeps/ieee754/ldexp.c Fri Mar 6 21:57:16 1992 @@ -0,0 +1,81 @@ +/* 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. */ + +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#include +#include +#include "ieee754.h" + +double +DEFUN(ldexp, (x, exp), + double x AND int exp) +{ + union ieee754_double u; + u.d = x; +#define x u.d + + if (__finite (x)) + { + unsigned int k; + + if (exp < -2100) + return 3e-39 * 3e-39; /* Cause underflow. */ + else if (exp > 2100) + return 1.7e308 + 1.7e308; /* Cause overflow. */ + + if (u.ieee.exponent == 0) + return ldexp (x * ldexp (1.0, 54), exp - 54); + + k = u.ieee.exponent + exp; + if (k > 0) + { + if (k < 2047) + u.ieee.exponent = k; + else + return 1.7e308 + 1.7e308; /* Cause overflow. */ + } + else if (k > -54) + { + /* Gradual underflow. */ + u.ieee.exponent = 1; + x *= ldexp (1.0, k - 1); + } + else + return 3e-39 * 3e-39; /* Cause underflow. */ + } + + return x; +} diff -ruN glibc-1.00/sysdeps/ieee754/printf_fp.c glibc-1.01/sysdeps/ieee754/printf_fp.c --- glibc-1.00/sysdeps/ieee754/printf_fp.c Wed Jun 12 14:26:48 1991 +++ glibc-1.01/sysdeps/ieee754/printf_fp.c Thu Mar 5 17:43:06 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -20,6 +20,7 @@ #include #include #include +#include "ieee754.h" #define outchar(x) \ do \ @@ -108,19 +109,7 @@ static int DEFUN(is_neg_ieee754, (num), register LONG_DOUBLE num) { - union - { - double d; - /* This is the IEEE 754 double-precision format. */ - struct - { - unsigned int negative:1; - int exponent:11; - /* Together these comprise the signed mantissa. */ - int mantissa0:20; - unsigned int mantissa1:32; - } ieee; - } u; + union ieee754_double u; u.d = (double) num; return u.ieee.negative; diff -ruN glibc-1.00/sysdeps/ieee754/sqrt.c glibc-1.01/sysdeps/ieee754/sqrt.c --- glibc-1.00/sysdeps/ieee754/sqrt.c +++ glibc-1.01/sysdeps/ieee754/sqrt.c Fri Mar 6 12:23:30 1992 @@ -0,0 +1,120 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#include +#include +#include + +/* Return the square root of X. */ +double +DEFUN (sqrt, (x), double x) +{ + double q, s, b, r, t; + CONST double zero = 0.0; + int m, n, i; + + /* sqrt (NaN) is NaN; sqrt (+-0) is +-0. */ + if (__isnan (x) || x == zero) + return x; + + if (x < zero) + return zero / zero; + + /* sqrt (Inf) is Inf. */ + if (__isinf (x)) + return x; + + /* Scale X to [1,4). */ + n = __logb (x); + x = __scalb (x, -n); + m = __logb (x); + if (m != 0) + /* Subnormal number. */ + x = __scalb (x, -m); + + m += n; + n = m / 2; + + if ((n + n) != m) + { + x *= 2; + --m; + n = m / 2; + } + + /* Generate sqrt (X) bit by bit (accumulating in Q). */ + q = 1.0; + s = 4.0; + x -= 1.0; + r = 1; + for (i = 1; i <= k; i++) + { + t = s + 1; + x *= 4; + r /= 2; + if (t <= x) + { + s = t + t + 2, x -= t; + q += r; + } + else + s *= 2; + } + + /* Generate the last bit and determine the final rounding. */ + r /= 2; + x *= 4; + if (x == zero) + goto end; + (void) (100 + r); /* Trigger inexact flag. */ + if (s < x) + { + q += r; + x -= s; + s += 2; + s *= 2; + x *= 4; + t = (x - s) - 5; + b = 1.0 + 3 * r / 4; + if (b == 1.0) + goto end; /* B == 1: Round to zero. */ + b = 1.0 + r / 4; + if (b > 1.0) + t = 1; /* B > 1: Round to +Inf. */ + if (t >= 0) + q += r; + } /* Else round to nearest. */ + else + { + s *= 2; + x *= 4; + t = (x - s) - 1; + b = 1.0 + 3 * r / 4; + if (b == 1.0) + goto end; + b = 1.0 + r / 4; + if (b > 1.0) + t = 1; + if (t >= 0) + q += r; + } + +end: + return __scalb (q, n); +} diff -ruN glibc-1.00/sysdeps/m68k/68881/68881-switch/Makefile glibc-1.01/sysdeps/m68k/68881/68881-switch/Makefile --- glibc-1.00/sysdeps/m68k/68881/68881-switch/Makefile Wed Feb 12 13:14:25 1992 +++ glibc-1.01/sysdeps/m68k/68881/68881-switch/Makefile Wed Mar 11 18:33:14 1992 @@ -33,7 +33,7 @@ # Directory containing 68881 sources. +68881-dir := $(filter %/68881,$(+sysdep_dirs)) -# For all the files that have 68881 versions and don't exist already +# For all the files that have 68881 versions and don't exist already in # the source directory (math), automatically make ones that switch between # 68881 and soft versions. $(addprefix $(objpfx), \ diff -ruN glibc-1.00/sysdeps/m68k/68881/68881-switch/switch.c glibc-1.01/sysdeps/m68k/68881/68881-switch/switch.c --- glibc-1.00/sysdeps/m68k/68881/68881-switch/switch.c Wed Jun 12 14:29:22 1991 +++ glibc-1.01/sysdeps/m68k/68881/68881-switch/switch.c Wed Mar 11 18:27:38 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -27,13 +27,10 @@ #define TRAPSIG SIGILL #endif -/* Nonzero if we have determined whether or not there is a 68881. */ -static int tested_fpu = 0; +/* Zero if no 68881, one if we have a 68881, or -1 if we don't know yet. */ +static int have_fpu = -1; -/* Nonzero if we have a 68881. */ -static int have_fpu; - /* Signal handler for the trap that happens if we don't have a 68881. */ static void DEFUN(trap, (sig), int sig) @@ -53,10 +50,10 @@ struct switch_caller *CONST caller = (struct switch_caller *) (((short int *) *return_address_location) - 1); - if (!tested_fpu) + if (have_fpu < 0) { /* Figure out whether or not we have a 68881. */ - __sighandler_t handler = signal(TRAPSIG, trap); + __sighandler_t handler = signal (TRAPSIG, trap); if (handler == SIG_ERR) /* We can't figure it out, so assume we don't have a 68881. This assumption will never cause us any problems other than @@ -70,14 +67,11 @@ If we don't have one, this will trap and the signal handler will clear `have_fpu'. */ have_fpu = 1; - asm("fnop"); + asm ("fnop"); /* Restore the old signal handler. */ - (void) signal(TRAPSIG, handler); + (void) signal (TRAPSIG, handler); } - - /* Say that we've tested for a 68881, so we only do it once. */ - tested_fpu = 1; } /* Modify the caller to be a jump to the appropriate address. */ diff -ruN glibc-1.00/sysdeps/m68k/68881/__infnan.c glibc-1.01/sysdeps/m68k/68881/__infnan.c --- glibc-1.00/sysdeps/m68k/68881/__infnan.c Wed Jun 12 14:27:23 1991 +++ glibc-1.01/sysdeps/m68k/68881/__infnan.c @@ -1,51 +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 - -/* Deal with an infinite or NaN result. - If ERROR is ERANGE, result is +Inf; - if ERROR is - ERANGE, result is -Inf; - otherwise result is NaN. - This will set `errno' to either ERANGE or EDOM, - and may return an infinity or NaN, or may do something else. */ -double -DEFUN(__infnan, (error), int error) -{ - switch (error) - { - case ERANGE: - errno = ERANGE; - return HUGE_VAL; - - case - ERANGE: - errno = ERANGE; - return - HUGE_VAL; - - default: - errno = EDOM; - { - /* Create an IEEE NaN. */ - register double result; - asm("fmove%.x #0x7fff00ffffffffffffffff, %0" : "=f" (result)); - return result; - } - } -} diff -ruN glibc-1.00/sysdeps/m68k/68881/__logb.c glibc-1.01/sysdeps/m68k/68881/__logb.c --- glibc-1.00/sysdeps/m68k/68881/__logb.c Wed Jun 12 14:27:32 1991 +++ glibc-1.01/sysdeps/m68k/68881/__logb.c Wed Mar 11 18:10:04 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,8 @@ #include #include +#ifdef __GNUC__ + /* Return the base 2 signed integral exponent of X. */ double DEFUN(__logb, (x), double x) @@ -35,3 +37,7 @@ return x; } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/m68k/68881/__math.h glibc-1.01/sysdeps/m68k/68881/__math.h --- glibc-1.00/sysdeps/m68k/68881/__math.h Wed Jun 12 14:27:36 1991 +++ glibc-1.01/sysdeps/m68k/68881/__math.h Thu Mar 5 22:07:46 1992 @@ -81,17 +81,6 @@ } extern __inline __const double -__m81_u(__scalb)(double __x, int __n) -{ - double __result; - if (__x == 0.0) - __result = __x; - else - __asm("fscale%.l %1, %0" : "=f" (__result) : "g" (__n), "0" (__x)); - return __result; -} - -extern __inline __const double __m81_u(ldexp)(double __x, int __e) { double __result; diff -ruN glibc-1.00/sysdeps/m68k/68881/__scalb.c glibc-1.01/sysdeps/m68k/68881/__scalb.c --- glibc-1.00/sysdeps/m68k/68881/__scalb.c Wed Jun 12 14:27:40 1991 +++ glibc-1.01/sysdeps/m68k/68881/__scalb.c @@ -1,29 +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 __NO_MATH_INLINES -#include - -#undef scalb - -double -DEFUN(scalb, (x, n), double x AND int n) -{ - return __scalb(x, n); -} diff -ruN glibc-1.00/sysdeps/m68k/68881/atan2.c glibc-1.01/sysdeps/m68k/68881/atan2.c --- glibc-1.00/sysdeps/m68k/68881/atan2.c Wed Jun 12 14:27:51 1991 +++ glibc-1.01/sysdeps/m68k/68881/atan2.c Wed Mar 11 18:10:01 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,8 @@ #include #include +#ifdef __GNUC__ + static CONST double PIo4 = 7.8539816339744827900E-1 , /*Hex 2^ -1 * 1.921FB54442D18 */ PIo2 = 1.5707963267948965580E0 , /*Hex 2^ 0 * 1.921FB54442D18 */ @@ -66,3 +68,7 @@ return __copysign(atan(y / x), signy); } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/m68k/__longjmp.c glibc-1.01/sysdeps/m68k/__longjmp.c --- glibc-1.00/sysdeps/m68k/__longjmp.c Fri Feb 7 18:50:07 1992 +++ glibc-1.01/sysdeps/m68k/__longjmp.c Wed Mar 11 18:09:57 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,10 @@ #include #include #include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ diff -ruN glibc-1.00/sysdeps/m68k/ffs.c glibc-1.01/sysdeps/m68k/ffs.c --- glibc-1.00/sysdeps/m68k/ffs.c Wed Jun 12 14:26:56 1991 +++ glibc-1.01/sysdeps/m68k/ffs.c Wed Mar 11 18:10:11 1992 @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For mc68020, mc68030, mc68040. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,7 +23,7 @@ #undef ffs -#if defined(__mc68020__) || defined(mc68020) +#if defined (__GNUC__) && defined (__mc68020__) int DEFUN(ffs, (x), int x) diff -ruN glibc-1.00/sysdeps/m68k/setjmp.c glibc-1.01/sysdeps/m68k/setjmp.c --- glibc-1.00/sysdeps/m68k/setjmp.c Wed Feb 12 14:09:12 1992 +++ glibc-1.01/sysdeps/m68k/setjmp.c Wed Mar 11 18:09:53 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -20,12 +20,17 @@ #include +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif + + /* Save the current program position in ENV and return 0. */ int DEFUN(__setjmp, (env), jmp_buf env) { /* Save data registers D1 through D7. */ - asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs)); + asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0])); /* Save return address in place of register A0. */ env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1]; diff -ruN glibc-1.00/sysdeps/m88k/ffs.c glibc-1.01/sysdeps/m88k/ffs.c --- glibc-1.00/sysdeps/m88k/ffs.c Wed Jun 12 14:29:29 1991 +++ glibc-1.01/sysdeps/m88k/ffs.c Wed Mar 11 18:09:51 1992 @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Motorola 88000. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,8 @@ #undef ffs +#ifdef __GNUC__ + int DEFUN(ffs, (x), int x) { @@ -34,3 +36,7 @@ asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x)); return cnt + 1; } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/mach/hurd/__execve.c glibc-1.01/sysdeps/mach/hurd/__execve.c --- glibc-1.00/sysdeps/mach/hurd/__execve.c Sat Feb 1 05:44:40 1992 +++ glibc-1.01/sysdeps/mach/hurd/__execve.c Sun Mar 8 16:06:06 1992 @@ -34,6 +34,8 @@ 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; int i; @@ -64,17 +66,49 @@ for (p = envp; *p != NULL; ++p) ap = __memccpy (ap, *p, '\0', UINT_MAX); - __mutex_lock (&_hurd_lock); - ports[INIT_PORT_CCDIR] = _hurd_ccdir; - ports[INIT_PORT_CWDIR] = _hurd_cwdir; - ports[INIT_PORT_CRDIR] = _hurd_crdir; - ports[INIT_PORT_AUTH] = _hurd_auth; - ports[INIT_PORT_PROC] = _hurd_proc; - ints[INIT_UMASK] = _hurd_umask; - ints[INIT_CTTY_FSTYPE] = _hurd_ctty_fstype; - ints[INIT_CTTY_FSID1] = _hurd_ctty_fsid.val[0]; - ints[INIT_CTTY_FSID2] = _hurd_ctty_fsid.val[1]; - ints[INIT_CTTY_FILEID] = _hurd_ctty_fileid; +#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; + } + for (i = 0; i < INIT_PORT_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; @@ -121,6 +155,11 @@ /* We must hold the dtable lock while doing the file_exec to avoid the dtable entries being deallocated before we send them. */ __mutex_unlock (&_hurd_dtable_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 (err) return __hurd_fail (err); diff -ruN glibc-1.00/sysdeps/mach/hurd/__flock.c glibc-1.01/sysdeps/mach/hurd/__flock.c --- glibc-1.00/sysdeps/mach/hurd/__flock.c +++ glibc-1.01/sysdeps/mach/hurd/__flock.c Wed Mar 4 19:45:30 1992 @@ -0,0 +1,37 @@ +/* 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 + +/* Apply or remove an advisory lock, according to OPERATION, + on the file FD refers to. */ +int +DEFUN(__flock, (fd, operation), + int fd AND int operation) +{ + error_t err; + file_t file = _hurd_dport (fd); + if (file == MACH_PORT_NULL) + return -1; + if (err = __file_lock (file, operation)) + return __hurd_fail (err); + return 0; +} diff -ruN glibc-1.00/sysdeps/mach/hurd/flock.c glibc-1.01/sysdeps/mach/hurd/flock.c --- glibc-1.00/sysdeps/mach/hurd/flock.c Wed Oct 30 12:11:48 1991 +++ glibc-1.01/sysdeps/mach/hurd/flock.c @@ -1,37 +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 - -/* Apply or remove an advisory lock, according to OPERATION, - on the file FD refers to. */ -int -DEFUN(flock, (fd, operation), - int fd AND int operation) -{ - error_t err; - file_t file = _hurd_dport (fd); - if (file == MACH_PORT_NULL) - return -1; - if (err = __file_lock (file, operation)) - return __hurd_fail (err); - return 0; -} diff -ruN glibc-1.00/sysdeps/mach/i386/start.c glibc-1.01/sysdeps/mach/i386/start.c --- glibc-1.00/sysdeps/mach/i386/start.c Fri Jan 10 23:09:03 1992 +++ glibc-1.01/sysdeps/mach/i386/start.c Wed Mar 11 18:09:12 1992 @@ -22,12 +22,16 @@ #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 __GNU_STAB__ +#ifndef HAVE_GNU_LD #define __environ environ #endif char **__environ; diff -ruN glibc-1.00/sysdeps/posix/__getdtsz.c glibc-1.01/sysdeps/posix/__getdtsz.c --- glibc-1.00/sysdeps/posix/__getdtsz.c Thu Jul 18 03:29:11 1991 +++ glibc-1.01/sysdeps/posix/__getdtsz.c Sun Mar 8 15:42:44 1992 @@ -36,7 +36,7 @@ #ifndef OPEN_MAX -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/posix/cuserid.c glibc-1.01/sysdeps/posix/cuserid.c --- glibc-1.00/sysdeps/posix/cuserid.c Wed Jun 12 14:30:37 1991 +++ glibc-1.01/sysdeps/posix/cuserid.c Tue Feb 25 22:39:52 1992 @@ -34,7 +34,11 @@ struct passwd *pwent = getpwuid(geteuid()); if (pwent == NULL) - return NULL; + { + if (s != NULL) + s[0] = '\0'; + return NULL; + } if (s == NULL) s = name; diff -ruN glibc-1.00/sysdeps/posix/defs.c glibc-1.01/sysdeps/posix/defs.c --- glibc-1.00/sysdeps/posix/defs.c Mon Dec 9 20:35:41 1991 +++ glibc-1.01/sysdeps/posix/defs.c Sun Mar 8 15:42:46 1992 @@ -73,7 +73,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include text_set_element(__libc_atexit, _cleanup); diff -ruN glibc-1.00/sysdeps/posix/sysd-stdio.c glibc-1.01/sysdeps/posix/sysd-stdio.c --- glibc-1.00/sysdeps/posix/sysd-stdio.c Wed Jun 12 14:32:32 1991 +++ glibc-1.01/sysdeps/posix/sysd-stdio.c Fri Mar 6 14:52:55 1992 @@ -217,7 +217,7 @@ static char buf[FILENAME_MAX]; static pid_t oldpid = (pid_t) 0; pid_t pid = __getpid(); - register size_t len, plen; + register size_t len, plen, dlen; if (dir_search) { @@ -235,10 +235,17 @@ errno = ENOENT; return NULL; } + dir = d; } else dir = tmpdir; + dlen = strlen (dir); + + /* Remove trailing slashes from the directory name. */ + while (dlen > 1 && dir[dlen - 1] == '/') + --dlen; + if (pfx != NULL && *pfx != '\0') { plen = strlen(pfx); @@ -255,22 +262,26 @@ if (pid != oldpid) { oldpid = pid; - info->buf[0] = info->buf[1] = info->buf[2] = '0'; - info->s = &info->buf[0]; - info->i = 0; + 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; } - len = strlen(dir) + 1 + plen + 8; + len = dlen + 1 + plen + 8; for (;;) { *info->s = letters[info->i]; - if (sprintf(buf, "%s/%.*s%.5d%.3s", dir, (int) plen, pfx, - pid % 100000, info->buf) != (int) len) + if (sprintf(buf, "%.*s/%.*s%.5d%.3s", (int) dlen, dir, (int) plen, + pfx, pid % 100000, info->buf) != (int) len) return NULL; if (!exists(buf)) break; ++info->i; - if (info->i > sizeof(letters) - 1) + + if (info->i > sizeof(letters) - 2) { info->i = 0; if (info->s == &info->buf[2]) diff -ruN glibc-1.00/sysdeps/rs6000/ffs.c glibc-1.01/sysdeps/rs6000/ffs.c --- glibc-1.00/sysdeps/rs6000/ffs.c Wed Jun 12 14:33:01 1991 +++ glibc-1.01/sysdeps/rs6000/ffs.c Wed Mar 11 18:09:47 1992 @@ -1,6 +1,6 @@ /* ffs -- find first set bit in a word, counted from least significant end. For IBM rs6000. - Copyright (C) 1991 Free Software Foundation, Inc. + Copyright (C) 1991, 1992 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). The GNU C Library is free software; you can redistribute it and/or @@ -23,6 +23,8 @@ #undef ffs +#ifdef __GNUC__ + int DEFUN(ffs, (x), int x) { @@ -31,3 +33,7 @@ asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x)); return 32 - cnt; } + +#else +#include +#endif diff -ruN glibc-1.00/sysdeps/sparc/fl.h glibc-1.01/sysdeps/sparc/fl.h --- glibc-1.00/sysdeps/sparc/fl.h Wed Jun 12 14:33:24 1991 +++ glibc-1.01/sysdeps/sparc/fl.h @@ -1,66 +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. */ - -#ifndef __need_HUGE_VAL - -#define FLT_RADIX 2 - -#define FLT_ROUNDS _FLT_ROUNDS_TONEAREST - -#define FLT_MANT_DIG 24 -#define DBL_MANT_DIG 53 -#define LDBL_MANT_DIG DBL_MANT_DIG - -#define FLT_DIG 6 -#define DBL_DIG 15 -#define LDBL_DIG DBL_DIG - -#define FLT_MIN_EXP (-125) -#define DBL_MIN_EXP (-1021) -#define LDBL_MIN_EXP DBL_MIN_EXP - -#define FLT_MIN_10_EXP (-37) -#define DBL_MIN_10_EXP (-307) -#define LDBL_MIN_10_EXP DBL_MIN_10_EXP - -#define FLT_MAX_EXP 128 -#define DBL_MAX_EXP 1024 -#define LDBL_MAX_EXP DBL_MAX_EXP - -#define FLT_MAX_10_EXP 38 -#define DBL_MAX_10_EXP 308 -#define LDBL_MAX_10_EXP DBL_MAX_10_EXP - -#define FLT_MAX 3.40282347e38 -#define DBL_MAX 1.7976931348623157e308 -#define LDBL_MAX DBL_MAX - -#define FLT_EPSILON 1.19209290e-7 -#define DBL_EPSILON 2.2204460492503131e-16 -#define LDBL_EPSILON DBL_EPSILON - -#define FLT_MIN 1.17549435e-38 -#define DBL_MIN 2.2250738585072014e-308 -#define LDBL_MIN DBL_MIN - -#else /* Need HUGE_VAL. */ - -/* Used by and functions for overflow. */ -#define HUGE_VAL 1.7976931348623157e308 - -#endif /* Don't need HUGE_VAL. */ diff -ruN glibc-1.00/sysdeps/sparc/sqrt.c glibc-1.01/sysdeps/sparc/sqrt.c --- glibc-1.00/sysdeps/sparc/sqrt.c Wed Jun 12 14:33:37 1991 +++ glibc-1.01/sysdeps/sparc/sqrt.c Wed Mar 11 18:09:42 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,6 +19,10 @@ #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 diff -ruN glibc-1.00/sysdeps/sparc/varargs.h glibc-1.01/sysdeps/sparc/varargs.h --- glibc-1.00/sysdeps/sparc/varargs.h Wed Jun 12 14:33:41 1991 +++ glibc-1.01/sysdeps/sparc/varargs.h @@ -1,58 +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. */ - -#ifndef _VARARGS_H - -#define _VARARGS_H 1 -#include - -/* varargs interface for SPARC. */ - -typedef struct - { - char *__stack; /* Current stack pointer for fetching arguments. */ - char *__beg; /* Pointer to position of first saved register arg. */ - } va_list; - -#define va_alist __builtin_va_alist -#define va_dcl int __builtin_va_alist; - -#define __va_rounded_size(type) \ - (((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) - -#define va_start(ap) \ - (__builtin_saveregs(), \ - (ap).__beg = (ap).__stack = ((char *) &__builtin_va_alist)) - -#define va_end(ap) - -#define va_arg(ap, type) \ - (__extension__ ({ type __va_temp; \ - if (__builtin_classify_type(__va_temp) < 12 || \ - __alignof__(__va_temp) >= 4) \ - (ap).__stack += __va_rounded_size(type); \ - else \ - { \ - if ((ap).__stack - (ap).__beg < 24) \ - (ap).__stack = (ap).__beg + 24; \ - (ap).__stack += __va_rounded_size(type); \ - } \ - }), \ - *(type *) ((ap).__stack - __va_rounded_size(type))) - -#endif /* varargs.h */ diff -ruN glibc-1.00/sysdeps/spur/varargs.h glibc-1.01/sysdeps/spur/varargs.h --- glibc-1.00/sysdeps/spur/varargs.h Wed Jun 12 14:33:45 1991 +++ glibc-1.01/sysdeps/spur/varargs.h @@ -1,72 +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. */ - -#ifndef _VARARGS_H - -#define _VARARGS_H 1 -#include - -/* varargs interface for SPUR. */ - -struct __va_struct { char __regs[20]; }; - -#define va_alist __va_regs, __va_stack - -#define va_dcl struct __va_struct __va_regs; int __va_stack; - -typedef struct - { - int __pnt; - char *__regs; - char *__stack; - } va_list; - -#define va_start(ap) \ - ((ap).__pnt = 0, (ap).__regs = __va_regs.__regs, \ - (ap).__stack = (char *) &__va_stack) - -#define va_end(ap) - -#define va_arg(ap, type) \ - ({ type __va_result; \ - if ((ap).__pnt >= 20) \ - { \ - __va_result = *(type *) ((ap).__stack + (ap).__pnt - 20); \ - (ap).__pnt += (sizeof(type) + 7) & ~7; \ - } \ - else if ((ap).__pnt + sizeof(type) > 20) \ - { \ - __va_result = *(type *) (ap).__stack; \ - (ap).__pnt = 20 + ((sizeof(type) + 7) & ~7); \ - } \ - else if (sizeof(type) == 8) \ - { \ - union { double __d; int __i[2]; } __u; \ - __u.__i[0] = *(int *) ((ap).__regs + (ap).__pnt); \ - __u.__i[1] = *(int *) ((ap).__regs + (ap).__pnt + 4); \ - __va_result = *(type *) &__u; \ - (ap).__pnt += 8; \ - } \ - else \ - { \ - __va_result = *(type *) ((ap).__regs + (ap).__pnt); \ - (ap).__pnt += (sizeof(type) + 3) & ~3; \ - } \ - __va_result; }) - -#endif /* varargs.h */ diff -ruN glibc-1.00/sysdeps/stub/__access.c glibc-1.01/sysdeps/stub/__access.c --- glibc-1.00/sysdeps/stub/__access.c Wed Jun 12 14:57:50 1991 +++ glibc-1.01/sysdeps/stub/__access.c Sun Mar 8 15:42:51 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__adjtime.c glibc-1.01/sysdeps/stub/__adjtime.c --- glibc-1.00/sysdeps/stub/__adjtime.c Wed Jun 12 14:57:53 1991 +++ glibc-1.01/sysdeps/stub/__adjtime.c Sun Mar 8 15:42:52 1992 @@ -34,7 +34,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__brk.c glibc-1.01/sysdeps/stub/__brk.c --- glibc-1.00/sysdeps/stub/__brk.c Wed Jun 12 14:57:58 1991 +++ glibc-1.01/sysdeps/stub/__brk.c Sun Mar 8 15:42:53 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__chdir.c glibc-1.01/sysdeps/stub/__chdir.c --- glibc-1.00/sysdeps/stub/__chdir.c Wed Jun 12 14:58:01 1991 +++ glibc-1.01/sysdeps/stub/__chdir.c Sun Mar 8 15:42:54 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__chmod.c glibc-1.01/sysdeps/stub/__chmod.c --- glibc-1.00/sysdeps/stub/__chmod.c Wed Oct 30 01:20:50 1991 +++ glibc-1.01/sysdeps/stub/__chmod.c Sun Mar 8 15:42:55 1992 @@ -40,7 +40,7 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__chown.c glibc-1.01/sysdeps/stub/__chown.c --- glibc-1.00/sysdeps/stub/__chown.c Wed Jun 12 14:58:07 1991 +++ glibc-1.01/sysdeps/stub/__chown.c Sun Mar 8 15:42:56 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__close.c glibc-1.01/sysdeps/stub/__close.c --- glibc-1.00/sysdeps/stub/__close.c Wed Jun 12 14:58:12 1991 +++ glibc-1.01/sysdeps/stub/__close.c Sun Mar 8 15:42:57 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__drem.c glibc-1.01/sysdeps/stub/__drem.c --- glibc-1.00/sysdeps/stub/__drem.c +++ glibc-1.01/sysdeps/stub/__drem.c Fri Mar 6 12:05:13 1992 @@ -0,0 +1,30 @@ +/* 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 + +/* Return the remainder of X/Y. */ +double +DEFUN(__drem, (x, y), + double x AND double y) +{ + errno = ENOSYS; + return 0.0; +} diff -ruN glibc-1.00/sysdeps/stub/__dup.c glibc-1.01/sysdeps/stub/__dup.c --- glibc-1.00/sysdeps/stub/__dup.c Wed Jun 12 14:58:20 1991 +++ glibc-1.01/sysdeps/stub/__dup.c Sun Mar 8 15:42:58 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__dup2.c glibc-1.01/sysdeps/stub/__dup2.c --- glibc-1.00/sysdeps/stub/__dup2.c Wed Jun 12 14:58:24 1991 +++ glibc-1.01/sysdeps/stub/__dup2.c Sun Mar 8 15:42:59 1992 @@ -42,7 +42,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__execve.c glibc-1.01/sysdeps/stub/__execve.c --- glibc-1.00/sysdeps/stub/__execve.c Wed Jun 12 14:58:28 1991 +++ glibc-1.01/sysdeps/stub/__execve.c Sun Mar 8 15:43:00 1992 @@ -40,7 +40,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__fchmod.c glibc-1.01/sysdeps/stub/__fchmod.c --- glibc-1.00/sysdeps/stub/__fchmod.c Wed Jun 12 14:58:33 1991 +++ glibc-1.01/sysdeps/stub/__fchmod.c Sun Mar 8 15:43:01 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__fchown.c glibc-1.01/sysdeps/stub/__fchown.c --- glibc-1.00/sysdeps/stub/__fchown.c Wed Jun 12 14:58:39 1991 +++ glibc-1.01/sysdeps/stub/__fchown.c Sun Mar 8 15:43:02 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__fcntl.c glibc-1.01/sysdeps/stub/__fcntl.c --- glibc-1.00/sysdeps/stub/__fcntl.c Wed Jun 12 14:58:45 1991 +++ glibc-1.01/sysdeps/stub/__fcntl.c Sun Mar 8 15:43:04 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__flock.c glibc-1.01/sysdeps/stub/__flock.c --- glibc-1.00/sysdeps/stub/__flock.c +++ glibc-1.01/sysdeps/stub/__flock.c Wed Mar 4 19:45:31 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 + +/* Apply or remove an advisory lock, according to OPERATION, + on the file FD refers to. */ +int +DEFUN(__flock, (fd, operation), + int fd AND int operation) +{ + errno = ENOSYS; + return -1; +} diff -ruN glibc-1.00/sysdeps/stub/__fork.c glibc-1.01/sysdeps/stub/__fork.c --- glibc-1.00/sysdeps/stub/__fork.c Wed Oct 30 00:44:14 1991 +++ glibc-1.01/sysdeps/stub/__fork.c Sun Mar 8 15:43:06 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__fstat.c glibc-1.01/sysdeps/stub/__fstat.c --- glibc-1.00/sysdeps/stub/__fstat.c Wed Oct 30 00:41:57 1991 +++ glibc-1.01/sysdeps/stub/__fstat.c Sun Mar 8 15:43:10 1992 @@ -41,7 +41,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getdents.c glibc-1.01/sysdeps/stub/__getdents.c --- glibc-1.00/sysdeps/stub/__getdents.c Wed Jun 19 15:48:46 1991 +++ glibc-1.01/sysdeps/stub/__getdents.c Sun Mar 8 15:43:08 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getdtsz.c glibc-1.01/sysdeps/stub/__getdtsz.c --- glibc-1.00/sysdeps/stub/__getdtsz.c Thu Jul 18 03:29:14 1991 +++ glibc-1.01/sysdeps/stub/__getdtsz.c Sun Mar 8 15:46:03 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getegid.c glibc-1.01/sysdeps/stub/__getegid.c --- glibc-1.00/sysdeps/stub/__getegid.c Wed Jun 12 14:59:07 1991 +++ glibc-1.01/sysdeps/stub/__getegid.c Sun Mar 8 15:43:11 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__geteuid.c glibc-1.01/sysdeps/stub/__geteuid.c --- glibc-1.00/sysdeps/stub/__geteuid.c Wed Jun 12 14:59:14 1991 +++ glibc-1.01/sysdeps/stub/__geteuid.c Sun Mar 8 15:43:13 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getgid.c glibc-1.01/sysdeps/stub/__getgid.c --- glibc-1.00/sysdeps/stub/__getgid.c Wed Jun 12 14:59:20 1991 +++ glibc-1.01/sysdeps/stub/__getgid.c Sun Mar 8 15:43:14 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getgrps.c glibc-1.01/sysdeps/stub/__getgrps.c --- glibc-1.00/sysdeps/stub/__getgrps.c Wed Jun 19 15:26:35 1991 +++ glibc-1.01/sysdeps/stub/__getgrps.c Sun Mar 8 15:46:04 1992 @@ -40,7 +40,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__gethstnm.c glibc-1.01/sysdeps/stub/__gethstnm.c --- glibc-1.00/sysdeps/stub/__gethstnm.c Wed Jun 12 14:59:31 1991 +++ glibc-1.01/sysdeps/stub/__gethstnm.c Sun Mar 8 15:43:16 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getitmr.c glibc-1.01/sysdeps/stub/__getitmr.c --- glibc-1.00/sysdeps/stub/__getitmr.c Wed Jun 12 14:59:34 1991 +++ glibc-1.01/sysdeps/stub/__getitmr.c Sun Mar 8 15:43:18 1992 @@ -38,7 +38,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getpgrp.c glibc-1.01/sysdeps/stub/__getpgrp.c --- glibc-1.00/sysdeps/stub/__getpgrp.c Wed Oct 30 00:42:22 1991 +++ glibc-1.01/sysdeps/stub/__getpgrp.c Sun Mar 8 15:43:25 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getpgsz.c glibc-1.01/sysdeps/stub/__getpgsz.c --- glibc-1.00/sysdeps/stub/__getpgsz.c Wed Jun 12 14:59:37 1991 +++ glibc-1.01/sysdeps/stub/__getpgsz.c Sun Mar 8 15:43:20 1992 @@ -28,7 +28,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getpid.c glibc-1.01/sysdeps/stub/__getpid.c --- glibc-1.00/sysdeps/stub/__getpid.c Wed Jun 12 14:59:44 1991 +++ glibc-1.01/sysdeps/stub/__getpid.c Sun Mar 8 15:43:25 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getppid.c glibc-1.01/sysdeps/stub/__getppid.c --- glibc-1.00/sysdeps/stub/__getppid.c Wed Jun 12 14:59:51 1991 +++ glibc-1.01/sysdeps/stub/__getppid.c Sun Mar 8 15:43:27 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getrusag.c glibc-1.01/sysdeps/stub/__getrusag.c --- glibc-1.00/sysdeps/stub/__getrusag.c Wed Oct 30 00:54:13 1991 +++ glibc-1.01/sysdeps/stub/__getrusag.c Sun Mar 8 15:43:23 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__gettod.c glibc-1.01/sysdeps/stub/__gettod.c --- glibc-1.00/sysdeps/stub/__gettod.c Wed Jun 12 15:00:17 1991 +++ glibc-1.01/sysdeps/stub/__gettod.c Sun Mar 8 15:43:28 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__getuid.c glibc-1.01/sysdeps/stub/__getuid.c --- glibc-1.00/sysdeps/stub/__getuid.c Wed Jun 12 14:36:05 1991 +++ glibc-1.01/sysdeps/stub/__getuid.c Sun Mar 8 15:43:30 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__ioctl.c glibc-1.01/sysdeps/stub/__ioctl.c --- glibc-1.00/sysdeps/stub/__ioctl.c Wed Oct 30 00:56:35 1991 +++ glibc-1.01/sysdeps/stub/__ioctl.c Sun Mar 8 15:43:32 1992 @@ -32,7 +32,7 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__isinf.c glibc-1.01/sysdeps/stub/__isinf.c --- glibc-1.00/sysdeps/stub/__isinf.c Wed Jun 12 14:36:14 1991 +++ glibc-1.01/sysdeps/stub/__isinf.c Sun Mar 8 15:43:33 1992 @@ -28,7 +28,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__kill.c glibc-1.01/sysdeps/stub/__kill.c --- glibc-1.00/sysdeps/stub/__kill.c Wed Jun 12 14:36:18 1991 +++ glibc-1.01/sysdeps/stub/__kill.c Sun Mar 8 15:43:34 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__link.c glibc-1.01/sysdeps/stub/__link.c --- glibc-1.00/sysdeps/stub/__link.c Wed Jun 12 14:36:24 1991 +++ glibc-1.01/sysdeps/stub/__link.c Sun Mar 8 15:43:35 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__logb.c glibc-1.01/sysdeps/stub/__logb.c --- glibc-1.00/sysdeps/stub/__logb.c +++ glibc-1.01/sysdeps/stub/__logb.c Fri Mar 6 12:25:36 1992 @@ -0,0 +1,29 @@ +/* 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 + +/* Return the base 2 signed integral exponent of X. */ +double +DEFUN(__logb, (x), double x) +{ + errno = ENOSYS; + return 0.0; +} diff -ruN glibc-1.00/sysdeps/stub/__longjmp.c glibc-1.01/sysdeps/stub/__longjmp.c --- glibc-1.00/sysdeps/stub/__longjmp.c Wed Jun 12 14:36:28 1991 +++ glibc-1.01/sysdeps/stub/__longjmp.c Sun Mar 8 15:43:37 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__lseek.c glibc-1.01/sysdeps/stub/__lseek.c --- glibc-1.00/sysdeps/stub/__lseek.c Wed Oct 30 00:42:47 1991 +++ glibc-1.01/sysdeps/stub/__lseek.c Sun Mar 8 15:43:38 1992 @@ -46,7 +46,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__lstat.c glibc-1.01/sysdeps/stub/__lstat.c --- glibc-1.00/sysdeps/stub/__lstat.c Wed Oct 30 00:43:36 1991 +++ glibc-1.01/sysdeps/stub/__lstat.c Sun Mar 8 15:43:39 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__mkdir.c glibc-1.01/sysdeps/stub/__mkdir.c --- glibc-1.00/sysdeps/stub/__mkdir.c Wed Oct 30 01:21:08 1991 +++ glibc-1.01/sysdeps/stub/__mkdir.c Sun Mar 8 15:43:41 1992 @@ -38,7 +38,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__mknod.c glibc-1.01/sysdeps/stub/__mknod.c --- glibc-1.00/sysdeps/stub/__mknod.c Wed Oct 30 00:59:10 1991 +++ glibc-1.01/sysdeps/stub/__mknod.c Sun Mar 8 15:45:52 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__open.c glibc-1.01/sysdeps/stub/__open.c --- glibc-1.00/sysdeps/stub/__open.c Mon Dec 2 15:35:11 1991 +++ glibc-1.01/sysdeps/stub/__open.c Sun Mar 8 15:43:42 1992 @@ -48,7 +48,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__pipe.c glibc-1.01/sysdeps/stub/__pipe.c --- glibc-1.00/sysdeps/stub/__pipe.c Wed Oct 30 00:45:04 1991 +++ glibc-1.01/sysdeps/stub/__pipe.c Sun Mar 8 15:43:45 1992 @@ -39,7 +39,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__read.c glibc-1.01/sysdeps/stub/__read.c --- glibc-1.00/sysdeps/stub/__read.c Wed Oct 30 00:45:52 1991 +++ glibc-1.01/sysdeps/stub/__read.c Sun Mar 8 15:43:47 1992 @@ -44,7 +44,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__readlink.c glibc-1.01/sysdeps/stub/__readlink.c --- glibc-1.00/sysdeps/stub/__readlink.c Wed Jun 12 14:37:02 1991 +++ glibc-1.01/sysdeps/stub/__readlink.c Sun Mar 8 15:43:48 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__rmdir.c glibc-1.01/sysdeps/stub/__rmdir.c --- glibc-1.00/sysdeps/stub/__rmdir.c Wed Jun 12 14:37:06 1991 +++ glibc-1.01/sysdeps/stub/__rmdir.c Sun Mar 8 15:43:50 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__sbrk.c glibc-1.01/sysdeps/stub/__sbrk.c --- glibc-1.00/sysdeps/stub/__sbrk.c Wed Jun 12 14:37:10 1991 +++ glibc-1.01/sysdeps/stub/__sbrk.c Sun Mar 8 15:43:51 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__setgid.c glibc-1.01/sysdeps/stub/__setgid.c --- glibc-1.00/sysdeps/stub/__setgid.c Wed Jun 12 14:37:21 1991 +++ glibc-1.01/sysdeps/stub/__setgid.c Sun Mar 8 15:43:53 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__setitmr.c glibc-1.01/sysdeps/stub/__setitmr.c --- glibc-1.00/sysdeps/stub/__setitmr.c Wed Jun 12 14:37:33 1991 +++ glibc-1.01/sysdeps/stub/__setitmr.c Sun Mar 8 15:43:29 1992 @@ -40,7 +40,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__setregid.c glibc-1.01/sysdeps/stub/__setregid.c --- glibc-1.00/sysdeps/stub/__setregid.c Wed Jun 12 15:16:18 1991 +++ glibc-1.01/sysdeps/stub/__setregid.c Sun Mar 8 15:46:03 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__setreuid.c glibc-1.01/sysdeps/stub/__setreuid.c --- glibc-1.00/sysdeps/stub/__setreuid.c Mon Feb 17 04:16:17 1992 +++ glibc-1.01/sysdeps/stub/__setreuid.c Sun Mar 8 15:46:00 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__setsid.c glibc-1.01/sysdeps/stub/__setsid.c --- glibc-1.00/sysdeps/stub/__setsid.c Wed Jun 12 14:37:43 1991 +++ glibc-1.01/sysdeps/stub/__setsid.c Sun Mar 8 15:43:56 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__settod.c glibc-1.01/sysdeps/stub/__settod.c --- glibc-1.00/sysdeps/stub/__settod.c Wed Jun 12 14:37:48 1991 +++ glibc-1.01/sysdeps/stub/__settod.c Sun Mar 8 15:43:55 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__setuid.c glibc-1.01/sysdeps/stub/__setuid.c --- glibc-1.00/sysdeps/stub/__setuid.c Wed Jun 12 14:37:53 1991 +++ glibc-1.01/sysdeps/stub/__setuid.c Sun Mar 8 15:43:59 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__sigact.c glibc-1.01/sysdeps/stub/__sigact.c --- glibc-1.00/sysdeps/stub/__sigact.c Wed Jun 12 14:37:59 1991 +++ glibc-1.01/sysdeps/stub/__sigact.c Sun Mar 8 15:43:58 1992 @@ -38,7 +38,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__sigblock.c glibc-1.01/sysdeps/stub/__sigblock.c --- glibc-1.00/sysdeps/stub/__sigblock.c Tue Oct 29 22:48:22 1991 +++ glibc-1.01/sysdeps/stub/__sigblock.c Sun Mar 8 15:46:12 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__sigpause.c glibc-1.01/sysdeps/stub/__sigpause.c --- glibc-1.00/sysdeps/stub/__sigpause.c Tue Oct 29 22:48:46 1991 +++ glibc-1.01/sysdeps/stub/__sigpause.c Sun Mar 8 15:46:13 1992 @@ -28,7 +28,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__sigstmsk.c glibc-1.01/sysdeps/stub/__sigstmsk.c --- glibc-1.00/sysdeps/stub/__sigstmsk.c Tue Oct 29 22:48:37 1991 +++ glibc-1.01/sysdeps/stub/__sigstmsk.c Sun Mar 8 15:44:00 1992 @@ -28,7 +28,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__sigvec.c glibc-1.01/sysdeps/stub/__sigvec.c --- glibc-1.00/sysdeps/stub/__sigvec.c Wed Jun 12 14:38:15 1991 +++ glibc-1.01/sysdeps/stub/__sigvec.c Sun Mar 8 15:44:01 1992 @@ -34,7 +34,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__stat.c glibc-1.01/sysdeps/stub/__stat.c --- glibc-1.00/sysdeps/stub/__stat.c Wed Oct 30 00:46:13 1991 +++ glibc-1.01/sysdeps/stub/__stat.c Sun Mar 8 15:44:02 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__symlink.c glibc-1.01/sysdeps/stub/__symlink.c --- glibc-1.00/sysdeps/stub/__symlink.c Wed Jun 12 14:38:34 1991 +++ glibc-1.01/sysdeps/stub/__symlink.c Sun Mar 8 15:44:02 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__tcgetatr.c glibc-1.01/sysdeps/stub/__tcgetatr.c --- glibc-1.00/sysdeps/stub/__tcgetatr.c Wed Jun 12 14:38:41 1991 +++ glibc-1.01/sysdeps/stub/__tcgetatr.c Sun Mar 8 15:46:11 1992 @@ -42,7 +42,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__times.c glibc-1.01/sysdeps/stub/__times.c --- glibc-1.00/sysdeps/stub/__times.c Wed Oct 30 00:47:11 1991 +++ glibc-1.01/sysdeps/stub/__times.c Sun Mar 8 15:44:06 1992 @@ -40,7 +40,7 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__umask.c glibc-1.01/sysdeps/stub/__umask.c --- glibc-1.00/sysdeps/stub/__umask.c Wed Oct 30 01:21:37 1991 +++ glibc-1.01/sysdeps/stub/__umask.c Sun Mar 8 15:44:08 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__unlink.c glibc-1.01/sysdeps/stub/__unlink.c --- glibc-1.00/sysdeps/stub/__unlink.c Wed Jun 12 14:39:00 1991 +++ glibc-1.01/sysdeps/stub/__unlink.c Sun Mar 8 15:44:10 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__vfork.c glibc-1.01/sysdeps/stub/__vfork.c --- glibc-1.00/sysdeps/stub/__vfork.c Wed Jun 12 14:39:14 1991 +++ glibc-1.01/sysdeps/stub/__vfork.c Sun Mar 8 15:44:12 1992 @@ -33,7 +33,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__wait.c glibc-1.01/sysdeps/stub/__wait.c --- glibc-1.00/sysdeps/stub/__wait.c Thu Jul 25 23:56:57 1991 +++ glibc-1.01/sysdeps/stub/__wait.c Sun Mar 8 15:44:58 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__wait3.c glibc-1.01/sysdeps/stub/__wait3.c --- glibc-1.00/sysdeps/stub/__wait3.c Wed Oct 30 00:49:08 1991 +++ glibc-1.01/sysdeps/stub/__wait3.c Sun Mar 8 15:44:13 1992 @@ -41,7 +41,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__wait4.c glibc-1.01/sysdeps/stub/__wait4.c --- glibc-1.00/sysdeps/stub/__wait4.c Wed Jun 12 14:39:22 1991 +++ glibc-1.01/sysdeps/stub/__wait4.c Sun Mar 8 15:45:58 1992 @@ -29,7 +29,7 @@ return (pid_t) -1; } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__waitpid.c glibc-1.01/sysdeps/stub/__waitpid.c --- glibc-1.00/sysdeps/stub/__waitpid.c Wed Jun 19 15:39:19 1991 +++ glibc-1.01/sysdeps/stub/__waitpid.c Sun Mar 8 15:44:15 1992 @@ -50,7 +50,7 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/__write.c glibc-1.01/sysdeps/stub/__write.c --- glibc-1.00/sysdeps/stub/__write.c Wed Oct 30 00:49:37 1991 +++ glibc-1.01/sysdeps/stub/__write.c Sun Mar 8 15:44:16 1992 @@ -45,7 +45,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/_exit.c glibc-1.01/sysdeps/stub/_exit.c --- glibc-1.00/sysdeps/stub/_exit.c Wed Oct 30 00:50:02 1991 +++ glibc-1.01/sysdeps/stub/_exit.c Sun Mar 8 15:43:46 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/accept.c glibc-1.01/sysdeps/stub/accept.c --- glibc-1.00/sysdeps/stub/accept.c Wed Jun 12 15:05:53 1991 +++ glibc-1.01/sysdeps/stub/accept.c Sun Mar 8 15:44:18 1992 @@ -34,7 +34,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/acct.c glibc-1.01/sysdeps/stub/acct.c --- glibc-1.00/sysdeps/stub/acct.c Wed Jun 12 15:05:57 1991 +++ glibc-1.01/sysdeps/stub/acct.c Sun Mar 8 15:44:19 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/acos.c glibc-1.01/sysdeps/stub/acos.c --- glibc-1.00/sysdeps/stub/acos.c Wed Jun 12 15:06:01 1991 +++ glibc-1.01/sysdeps/stub/acos.c Sun Mar 8 15:44:21 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/alarm.c glibc-1.01/sysdeps/stub/alarm.c --- glibc-1.00/sysdeps/stub/alarm.c Wed Jun 12 15:06:09 1991 +++ glibc-1.01/sysdeps/stub/alarm.c Sun Mar 8 15:44:22 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/asin.c glibc-1.01/sysdeps/stub/asin.c --- glibc-1.00/sysdeps/stub/asin.c Wed Jun 12 15:06:16 1991 +++ glibc-1.01/sysdeps/stub/asin.c Sun Mar 8 15:44:23 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/atan2.c glibc-1.01/sysdeps/stub/atan2.c --- glibc-1.00/sysdeps/stub/atan2.c Wed Jun 12 15:06:20 1991 +++ glibc-1.01/sysdeps/stub/atan2.c Sun Mar 8 15:44:26 1992 @@ -28,7 +28,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/bind.c glibc-1.01/sysdeps/stub/bind.c --- glibc-1.00/sysdeps/stub/bind.c Wed Jun 12 15:06:26 1991 +++ glibc-1.01/sysdeps/stub/bind.c Sun Mar 8 15:44:27 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/chflags.c glibc-1.01/sysdeps/stub/chflags.c --- glibc-1.00/sysdeps/stub/chflags.c Wed Oct 23 18:53:57 1991 +++ glibc-1.01/sysdeps/stub/chflags.c Sun Mar 8 15:45:53 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/chroot.c glibc-1.01/sysdeps/stub/chroot.c --- glibc-1.00/sysdeps/stub/chroot.c Wed Jun 12 15:06:35 1991 +++ glibc-1.01/sysdeps/stub/chroot.c Sun Mar 8 15:44:28 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/closedir.c glibc-1.01/sysdeps/stub/closedir.c --- glibc-1.00/sysdeps/stub/closedir.c Wed Jun 12 15:06:45 1991 +++ glibc-1.01/sysdeps/stub/closedir.c Sun Mar 8 15:44:29 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/connect.c glibc-1.01/sysdeps/stub/connect.c --- glibc-1.00/sysdeps/stub/connect.c Wed Jun 12 15:10:41 1991 +++ glibc-1.01/sysdeps/stub/connect.c Sun Mar 8 15:44:30 1992 @@ -33,7 +33,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/cos.c glibc-1.01/sysdeps/stub/cos.c --- glibc-1.00/sysdeps/stub/cos.c Wed Jun 12 15:10:45 1991 +++ glibc-1.01/sysdeps/stub/cos.c Sun Mar 8 15:44:31 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/cosh.c glibc-1.01/sysdeps/stub/cosh.c --- glibc-1.00/sysdeps/stub/cosh.c Wed Jun 12 15:10:48 1991 +++ glibc-1.01/sysdeps/stub/cosh.c Sun Mar 8 15:44:32 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/ctermid.c glibc-1.01/sysdeps/stub/ctermid.c --- glibc-1.00/sysdeps/stub/ctermid.c Wed Jun 12 15:10:52 1991 +++ glibc-1.01/sysdeps/stub/ctermid.c Sun Mar 8 15:44:33 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/cuserid.c glibc-1.01/sysdeps/stub/cuserid.c --- glibc-1.00/sysdeps/stub/cuserid.c Tue Oct 29 22:33:48 1991 +++ glibc-1.01/sysdeps/stub/cuserid.c Sun Mar 8 15:44:34 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/defs.c glibc-1.01/sysdeps/stub/defs.c --- glibc-1.00/sysdeps/stub/defs.c Wed Oct 30 11:12:09 1991 +++ glibc-1.01/sysdeps/stub/defs.c Sun Mar 8 15:46:05 1992 @@ -44,7 +44,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include text_set_element(__libc_atexit, _cleanup); diff -ruN glibc-1.00/sysdeps/stub/exp.c glibc-1.01/sysdeps/stub/exp.c --- glibc-1.00/sysdeps/stub/exp.c Wed Jun 12 15:11:06 1991 +++ glibc-1.01/sysdeps/stub/exp.c Sun Mar 8 15:44:35 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/fchflags.c glibc-1.01/sysdeps/stub/fchflags.c --- glibc-1.00/sysdeps/stub/fchflags.c Wed Oct 23 18:54:27 1991 +++ glibc-1.01/sysdeps/stub/fchflags.c Sun Mar 8 15:46:07 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/flock.c glibc-1.01/sysdeps/stub/flock.c --- glibc-1.00/sysdeps/stub/flock.c Wed Jun 12 15:11:25 1991 +++ glibc-1.01/sysdeps/stub/flock.c @@ -1,31 +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 - -/* Apply or remove an advisory lock, according to OPERATION, - on the file FD refers to. */ -int -DEFUN(flock, (fd, operation), - int fd AND int operation) -{ - errno = ENOSYS; - return -1; -} diff -ruN glibc-1.00/sysdeps/stub/fmod.c glibc-1.01/sysdeps/stub/fmod.c --- glibc-1.00/sysdeps/stub/fmod.c Wed Jun 12 15:11:34 1991 +++ glibc-1.01/sysdeps/stub/fmod.c Sun Mar 8 15:44:36 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/frexp.c glibc-1.01/sysdeps/stub/frexp.c --- glibc-1.00/sysdeps/stub/frexp.c Wed Jun 12 15:11:38 1991 +++ glibc-1.01/sysdeps/stub/frexp.c Sun Mar 8 15:44:37 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/fsync.c glibc-1.01/sysdeps/stub/fsync.c --- glibc-1.00/sysdeps/stub/fsync.c Wed Jun 12 15:11:42 1991 +++ glibc-1.01/sysdeps/stub/fsync.c Sun Mar 8 15:44:38 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getcwd.c glibc-1.01/sysdeps/stub/getcwd.c --- glibc-1.00/sysdeps/stub/getcwd.c Mon Jun 24 20:47:00 1991 +++ glibc-1.01/sysdeps/stub/getcwd.c Sun Mar 8 15:44:39 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getenv.c glibc-1.01/sysdeps/stub/getenv.c --- glibc-1.00/sysdeps/stub/getenv.c Wed Jun 12 15:12:14 1991 +++ glibc-1.01/sysdeps/stub/getenv.c Sun Mar 8 15:44:41 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/gethostid.c glibc-1.01/sysdeps/stub/gethostid.c --- glibc-1.00/sysdeps/stub/gethostid.c Wed Jun 12 15:12:18 1991 +++ glibc-1.01/sysdeps/stub/gethostid.c Sun Mar 8 15:44:42 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getlogin.c glibc-1.01/sysdeps/stub/getlogin.c --- glibc-1.00/sysdeps/stub/getlogin.c Wed Jun 12 15:12:23 1991 +++ glibc-1.01/sysdeps/stub/getlogin.c Sun Mar 8 15:44:43 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getpeernam.c glibc-1.01/sysdeps/stub/getpeernam.c --- glibc-1.00/sysdeps/stub/getpeernam.c Wed Jun 12 15:12:31 1991 +++ glibc-1.01/sysdeps/stub/getpeernam.c Sun Mar 8 15:44:04 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getpgrp.c glibc-1.01/sysdeps/stub/getpgrp.c --- glibc-1.00/sysdeps/stub/getpgrp.c Wed Jun 12 15:12:38 1991 +++ glibc-1.01/sysdeps/stub/getpgrp.c Sun Mar 8 15:44:46 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getprio.c glibc-1.01/sysdeps/stub/getprio.c --- glibc-1.00/sysdeps/stub/getprio.c Wed Jun 12 15:12:43 1991 +++ glibc-1.01/sysdeps/stub/getprio.c Sun Mar 8 15:44:45 1992 @@ -33,7 +33,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getrlimit.c glibc-1.01/sysdeps/stub/getrlimit.c --- glibc-1.00/sysdeps/stub/getrlimit.c Wed Jun 12 15:12:48 1991 +++ glibc-1.01/sysdeps/stub/getrlimit.c Sun Mar 8 15:44:49 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getsocknam.c glibc-1.01/sysdeps/stub/getsocknam.c --- glibc-1.00/sysdeps/stub/getsocknam.c Wed Oct 30 00:54:44 1991 +++ glibc-1.01/sysdeps/stub/getsocknam.c Sun Mar 8 15:44:48 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/getsockopt.c glibc-1.01/sysdeps/stub/getsockopt.c --- glibc-1.00/sysdeps/stub/getsockopt.c Wed Jun 12 15:12:56 1991 +++ glibc-1.01/sysdeps/stub/getsockopt.c Sun Mar 8 15:44:50 1992 @@ -33,7 +33,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/init-posix.c glibc-1.01/sysdeps/stub/init-posix.c --- glibc-1.00/sysdeps/stub/init-posix.c Wed Jun 12 15:13:05 1991 +++ glibc-1.01/sysdeps/stub/init-posix.c Sun Mar 8 15:44:52 1992 @@ -18,7 +18,7 @@ #include -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD void DEFUN_VOID(__init_posix) @@ -29,7 +29,7 @@ #endif -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/listen.c glibc-1.01/sysdeps/stub/listen.c --- glibc-1.00/sysdeps/stub/listen.c Wed Jun 12 15:13:11 1991 +++ glibc-1.01/sysdeps/stub/listen.c Sun Mar 8 15:44:53 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/log.c glibc-1.01/sysdeps/stub/log.c --- glibc-1.00/sysdeps/stub/log.c Wed Jun 12 15:13:16 1991 +++ glibc-1.01/sysdeps/stub/log.c Sun Mar 8 15:44:54 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/log10.c glibc-1.01/sysdeps/stub/log10.c --- glibc-1.00/sysdeps/stub/log10.c Wed Jun 12 15:13:20 1991 +++ glibc-1.01/sysdeps/stub/log10.c Sun Mar 8 15:44:56 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/mkfifo.c glibc-1.01/sysdeps/stub/mkfifo.c --- glibc-1.00/sysdeps/stub/mkfifo.c Wed Oct 30 01:22:03 1991 +++ glibc-1.01/sysdeps/stub/mkfifo.c Sun Mar 8 15:44:59 1992 @@ -38,7 +38,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/morecore.c glibc-1.01/sysdeps/stub/morecore.c --- glibc-1.00/sysdeps/stub/morecore.c Wed Jun 12 15:13:41 1991 +++ glibc-1.01/sysdeps/stub/morecore.c Sun Mar 8 15:45:00 1992 @@ -34,7 +34,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/nlist.c glibc-1.01/sysdeps/stub/nlist.c --- glibc-1.00/sysdeps/stub/nlist.c Tue Jan 14 22:04:44 1992 +++ glibc-1.01/sysdeps/stub/nlist.c Sun Mar 8 15:45:01 1992 @@ -39,7 +39,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/opendir.c glibc-1.01/sysdeps/stub/opendir.c --- glibc-1.00/sysdeps/stub/opendir.c Wed Jun 12 15:14:01 1991 +++ glibc-1.01/sysdeps/stub/opendir.c Sun Mar 8 15:45:02 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/pause.c glibc-1.01/sysdeps/stub/pause.c --- glibc-1.00/sysdeps/stub/pause.c Wed Jun 12 15:14:05 1991 +++ glibc-1.01/sysdeps/stub/pause.c Sun Mar 8 15:45:03 1992 @@ -33,7 +33,7 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/pipestream.c glibc-1.01/sysdeps/stub/pipestream.c --- glibc-1.00/sysdeps/stub/pipestream.c Wed Oct 30 00:27:01 1991 +++ glibc-1.01/sysdeps/stub/pipestream.c Sun Mar 8 15:45:04 1992 @@ -54,7 +54,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/ptrace.c glibc-1.01/sysdeps/stub/ptrace.c --- glibc-1.00/sysdeps/stub/ptrace.c Wed Oct 30 01:00:20 1991 +++ glibc-1.01/sysdeps/stub/ptrace.c Sun Mar 8 15:45:05 1992 @@ -94,7 +94,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/putenv.c glibc-1.01/sysdeps/stub/putenv.c --- glibc-1.00/sysdeps/stub/putenv.c Wed Jun 12 15:14:21 1991 +++ glibc-1.01/sysdeps/stub/putenv.c Sun Mar 8 15:45:06 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/readdir.c glibc-1.01/sysdeps/stub/readdir.c --- glibc-1.00/sysdeps/stub/readdir.c Wed Jun 12 15:14:47 1991 +++ glibc-1.01/sysdeps/stub/readdir.c Sun Mar 8 15:45:07 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/recv.c glibc-1.01/sysdeps/stub/recv.c --- glibc-1.00/sysdeps/stub/recv.c Wed Jun 12 15:14:51 1991 +++ glibc-1.01/sysdeps/stub/recv.c Sun Mar 8 15:45:08 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/recvfrom.c glibc-1.01/sysdeps/stub/recvfrom.c --- glibc-1.00/sysdeps/stub/recvfrom.c Wed Oct 30 00:55:13 1991 +++ glibc-1.01/sysdeps/stub/recvfrom.c Sun Mar 8 15:45:09 1992 @@ -33,7 +33,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/recvmsg.c glibc-1.01/sysdeps/stub/recvmsg.c --- glibc-1.00/sysdeps/stub/recvmsg.c Wed Jun 12 15:15:05 1991 +++ glibc-1.01/sysdeps/stub/recvmsg.c Sun Mar 8 15:45:10 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/rename.c glibc-1.01/sysdeps/stub/rename.c --- glibc-1.00/sysdeps/stub/rename.c Tue Oct 29 22:33:47 1991 +++ glibc-1.01/sysdeps/stub/rename.c Sun Mar 8 15:45:11 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/rewinddir.c glibc-1.01/sysdeps/stub/rewinddir.c --- glibc-1.00/sysdeps/stub/rewinddir.c Wed Jun 12 15:15:28 1991 +++ glibc-1.01/sysdeps/stub/rewinddir.c Sun Mar 8 15:45:12 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/seekdir.c glibc-1.01/sysdeps/stub/seekdir.c --- glibc-1.00/sysdeps/stub/seekdir.c Wed Oct 30 00:38:13 1991 +++ glibc-1.01/sysdeps/stub/seekdir.c Sun Mar 8 15:45:13 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/send.c glibc-1.01/sysdeps/stub/send.c --- glibc-1.00/sysdeps/stub/send.c Wed Oct 30 00:55:37 1991 +++ glibc-1.01/sysdeps/stub/send.c Sun Mar 8 15:45:14 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sendmsg.c glibc-1.01/sysdeps/stub/sendmsg.c --- glibc-1.00/sysdeps/stub/sendmsg.c Wed Jun 12 15:15:48 1991 +++ glibc-1.01/sysdeps/stub/sendmsg.c Sun Mar 8 15:45:15 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sendto.c glibc-1.01/sysdeps/stub/sendto.c --- glibc-1.00/sysdeps/stub/sendto.c Wed Jun 12 15:15:52 1991 +++ glibc-1.01/sysdeps/stub/sendto.c Sun Mar 8 15:45:15 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/setgroups.c glibc-1.01/sysdeps/stub/setgroups.c --- glibc-1.00/sysdeps/stub/setgroups.c Wed Jun 19 16:05:13 1991 +++ glibc-1.01/sysdeps/stub/setgroups.c Sun Mar 8 15:45:16 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sethostid.c glibc-1.01/sysdeps/stub/sethostid.c --- glibc-1.00/sysdeps/stub/sethostid.c Wed Jun 12 15:16:02 1991 +++ glibc-1.01/sysdeps/stub/sethostid.c Sun Mar 8 15:45:17 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sethostnam.c glibc-1.01/sysdeps/stub/sethostnam.c --- glibc-1.00/sysdeps/stub/sethostnam.c Wed Jun 12 15:16:06 1991 +++ glibc-1.01/sysdeps/stub/sethostnam.c Sun Mar 8 15:45:04 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/setjmp.c glibc-1.01/sysdeps/stub/setjmp.c --- glibc-1.00/sysdeps/stub/setjmp.c Wed Jun 12 15:16:10 1991 +++ glibc-1.01/sysdeps/stub/setjmp.c Sun Mar 8 15:45:19 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/setprio.c glibc-1.01/sysdeps/stub/setprio.c --- glibc-1.00/sysdeps/stub/setprio.c Wed Jun 12 15:16:14 1991 +++ glibc-1.01/sysdeps/stub/setprio.c Sun Mar 8 15:45:18 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/setrlimit.c glibc-1.01/sysdeps/stub/setrlimit.c --- glibc-1.00/sysdeps/stub/setrlimit.c Wed Jun 12 15:16:27 1991 +++ glibc-1.01/sysdeps/stub/setrlimit.c Sun Mar 8 15:45:22 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/setsockopt.c glibc-1.01/sysdeps/stub/setsockopt.c --- glibc-1.00/sysdeps/stub/setsockopt.c Wed Jun 12 15:16:31 1991 +++ glibc-1.01/sysdeps/stub/setsockopt.c Sun Mar 8 15:45:22 1992 @@ -33,7 +33,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/shutdown.c glibc-1.01/sysdeps/stub/shutdown.c --- glibc-1.00/sysdeps/stub/shutdown.c Wed Jun 12 15:16:35 1991 +++ glibc-1.01/sysdeps/stub/shutdown.c Sun Mar 8 15:45:23 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/signal.c glibc-1.01/sysdeps/stub/signal.c --- glibc-1.00/sysdeps/stub/signal.c Tue Oct 29 22:47:08 1991 +++ glibc-1.01/sysdeps/stub/signal.c Sun Mar 8 15:46:09 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sigpending.c glibc-1.01/sysdeps/stub/sigpending.c --- glibc-1.00/sysdeps/stub/sigpending.c Wed Jun 12 15:16:44 1991 +++ glibc-1.01/sysdeps/stub/sigpending.c Sun Mar 8 15:45:24 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sigsuspend.c glibc-1.01/sysdeps/stub/sigsuspend.c --- glibc-1.00/sysdeps/stub/sigsuspend.c Tue Oct 29 22:47:50 1991 +++ glibc-1.01/sysdeps/stub/sigsuspend.c Sun Mar 8 15:46:10 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sin.c glibc-1.01/sysdeps/stub/sin.c --- glibc-1.00/sysdeps/stub/sin.c Wed Jun 12 15:16:52 1991 +++ glibc-1.01/sysdeps/stub/sin.c Sun Mar 8 15:45:20 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sinh.c glibc-1.01/sysdeps/stub/sinh.c --- glibc-1.00/sysdeps/stub/sinh.c Wed Jun 12 15:16:56 1991 +++ glibc-1.01/sysdeps/stub/sinh.c Sun Mar 8 15:45:26 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/socket.c glibc-1.01/sysdeps/stub/socket.c --- glibc-1.00/sysdeps/stub/socket.c Wed Jun 12 15:17:02 1991 +++ glibc-1.01/sysdeps/stub/socket.c Sun Mar 8 15:45:26 1992 @@ -32,7 +32,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/socketpair.c glibc-1.01/sysdeps/stub/socketpair.c --- glibc-1.00/sysdeps/stub/socketpair.c Wed Jun 12 15:17:08 1991 +++ glibc-1.01/sysdeps/stub/socketpair.c Sun Mar 8 15:45:29 1992 @@ -33,7 +33,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sqrt.c glibc-1.01/sysdeps/stub/sqrt.c --- glibc-1.00/sysdeps/stub/sqrt.c Wed Jun 12 15:17:15 1991 +++ glibc-1.01/sysdeps/stub/sqrt.c Sun Mar 8 15:45:30 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/swapon.c glibc-1.01/sysdeps/stub/swapon.c --- glibc-1.00/sysdeps/stub/swapon.c Wed Jun 12 15:17:36 1991 +++ glibc-1.01/sysdeps/stub/swapon.c Sun Mar 8 15:45:32 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sync.c glibc-1.01/sysdeps/stub/sync.c --- glibc-1.00/sysdeps/stub/sync.c Wed Jun 12 15:17:41 1991 +++ glibc-1.01/sysdeps/stub/sync.c Sun Mar 8 15:45:33 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/sysd-stdio.c glibc-1.01/sysdeps/stub/sysd-stdio.c --- glibc-1.00/sysdeps/stub/sysd-stdio.c Wed Jun 12 15:47:14 1991 +++ glibc-1.01/sysdeps/stub/sysd-stdio.c Sun Mar 8 15:45:35 1992 @@ -101,7 +101,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/system.c glibc-1.01/sysdeps/stub/system.c --- glibc-1.00/sysdeps/stub/system.c Wed Jun 12 15:47:23 1991 +++ glibc-1.01/sysdeps/stub/system.c Sun Mar 8 15:45:37 1992 @@ -30,7 +30,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tan.c glibc-1.01/sysdeps/stub/tan.c --- glibc-1.00/sysdeps/stub/tan.c Wed Jun 12 15:47:27 1991 +++ glibc-1.01/sysdeps/stub/tan.c Sun Mar 8 15:45:38 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tanh.c glibc-1.01/sysdeps/stub/tanh.c --- glibc-1.00/sysdeps/stub/tanh.c Wed Jun 12 15:47:31 1991 +++ glibc-1.01/sysdeps/stub/tanh.c Sun Mar 8 15:45:39 1992 @@ -29,7 +29,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tcdrain.c glibc-1.01/sysdeps/stub/tcdrain.c --- glibc-1.00/sysdeps/stub/tcdrain.c Wed Jun 12 15:47:35 1991 +++ glibc-1.01/sysdeps/stub/tcdrain.c Sun Mar 8 15:45:40 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tcflow.c glibc-1.01/sysdeps/stub/tcflow.c --- glibc-1.00/sysdeps/stub/tcflow.c Wed Jun 12 15:47:39 1991 +++ glibc-1.01/sysdeps/stub/tcflow.c Sun Mar 8 15:45:41 1992 @@ -48,7 +48,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tcflush.c glibc-1.01/sysdeps/stub/tcflush.c --- glibc-1.00/sysdeps/stub/tcflush.c Wed Jun 12 15:47:43 1991 +++ glibc-1.01/sysdeps/stub/tcflush.c Sun Mar 8 15:45:42 1992 @@ -41,7 +41,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tcgetpgrp.c glibc-1.01/sysdeps/stub/tcgetpgrp.c --- glibc-1.00/sysdeps/stub/tcgetpgrp.c Wed Oct 30 00:52:41 1991 +++ glibc-1.01/sysdeps/stub/tcgetpgrp.c Sun Mar 8 15:45:45 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tcsendbrk.c glibc-1.01/sysdeps/stub/tcsendbrk.c --- glibc-1.00/sysdeps/stub/tcsendbrk.c Wed Oct 30 00:53:53 1991 +++ glibc-1.01/sysdeps/stub/tcsendbrk.c Sun Mar 8 15:45:36 1992 @@ -35,7 +35,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tcsetattr.c glibc-1.01/sysdeps/stub/tcsetattr.c --- glibc-1.00/sysdeps/stub/tcsetattr.c Wed Oct 30 01:22:44 1991 +++ glibc-1.01/sysdeps/stub/tcsetattr.c Sun Mar 8 15:45:46 1992 @@ -91,7 +91,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/tcsetpgrp.c glibc-1.01/sysdeps/stub/tcsetpgrp.c --- glibc-1.00/sysdeps/stub/tcsetpgrp.c Wed Oct 30 00:52:58 1991 +++ glibc-1.01/sysdeps/stub/tcsetpgrp.c Sun Mar 8 15:45:47 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/telldir.c glibc-1.01/sysdeps/stub/telldir.c --- glibc-1.00/sysdeps/stub/telldir.c Wed Oct 30 00:38:40 1991 +++ glibc-1.01/sysdeps/stub/telldir.c Sun Mar 8 15:45:48 1992 @@ -37,7 +37,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/time.c glibc-1.01/sysdeps/stub/time.c --- glibc-1.00/sysdeps/stub/time.c Wed Jun 12 15:48:15 1991 +++ glibc-1.01/sysdeps/stub/time.c Sun Mar 8 15:45:44 1992 @@ -34,7 +34,7 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/ttyname.c glibc-1.01/sysdeps/stub/ttyname.c --- glibc-1.00/sysdeps/stub/ttyname.c Wed Jun 12 15:48:39 1991 +++ glibc-1.01/sysdeps/stub/ttyname.c Sun Mar 8 15:45:49 1992 @@ -34,7 +34,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/ulimit.c glibc-1.01/sysdeps/stub/ulimit.c --- glibc-1.00/sysdeps/stub/ulimit.c Wed Jun 12 15:48:58 1991 +++ glibc-1.01/sysdeps/stub/ulimit.c Sun Mar 8 15:45:51 1992 @@ -36,7 +36,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/utime.c glibc-1.01/sysdeps/stub/utime.c --- glibc-1.00/sysdeps/stub/utime.c Wed Jun 12 15:49:28 1991 +++ glibc-1.01/sysdeps/stub/utime.c Sun Mar 8 15:45:55 1992 @@ -38,7 +38,7 @@ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/stub/vhangup.c glibc-1.01/sysdeps/stub/vhangup.c --- glibc-1.00/sysdeps/stub/vhangup.c Wed Jun 12 15:49:32 1991 +++ glibc-1.01/sysdeps/stub/vhangup.c Sun Mar 8 15:45:56 1992 @@ -31,7 +31,7 @@ } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/unix/Makefile glibc-1.01/sysdeps/unix/Makefile --- glibc-1.00/sysdeps/unix/Makefile Thu Feb 13 23:38:27 1992 +++ glibc-1.01/sysdeps/unix/Makefile Thu Mar 5 17:30:11 1992 @@ -44,8 +44,8 @@ endif $(objpfx)sys/param.h: /usr/include/sys/param.h $(objpfx)sys/ - (echo '#ifndef _SYS_PARAM_H'; \ - echo '#define _SYS_PARAM_H 1'; \ + (echo '#ifndef _GNU_SYS_PARAM_H'; \ + echo '#define _GNU_SYS_PARAM_H 1'; \ awk < $< \ '/^#define[ ]*NULL/ { print "#ifndef NULL"; \ print $$0; \ diff -ruN glibc-1.00/sysdeps/unix/bsd/__flock.S glibc-1.01/sysdeps/unix/bsd/__flock.S --- glibc-1.00/sysdeps/unix/bsd/__flock.S +++ glibc-1.01/sysdeps/unix/bsd/__flock.S Wed Mar 4 19:43:16 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__ (flock) + ret diff -ruN glibc-1.00/sysdeps/unix/bsd/flock.S glibc-1.01/sysdeps/unix/bsd/flock.S --- glibc-1.00/sysdeps/unix/bsd/flock.S Mon Jun 10 19:58:59 1991 +++ glibc-1.01/sysdeps/unix/bsd/flock.S @@ -1,22 +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 - -SYSCALL (flock) - ret diff -ruN glibc-1.00/sysdeps/unix/bsd/getlogin.c glibc-1.01/sysdeps/unix/bsd/getlogin.c --- glibc-1.00/sysdeps/unix/bsd/getlogin.c Wed Jun 12 17:33:35 1991 +++ glibc-1.01/sysdeps/unix/bsd/getlogin.c Fri Mar 6 10:43:32 1992 @@ -31,9 +31,8 @@ extern char *__ttyname; /* Return the login name of the user, or NULL if it can't be determined. - The returned pointer, if not NULL, is good only until the next call. + The returned pointer, if not NULL, is good only until the next call. */ - This does ttyname on standard input, that loses; but how else to do it? */ char * DEFUN_VOID(getlogin) { @@ -47,27 +46,44 @@ if (__ttyname == NULL) save_ttyname = NULL; else - save_ttyname = strcpy(save_tty_pathname, __ttyname); + save_ttyname = strcpy (save_tty_pathname, __ttyname); - real_tty_path = ttyname(STDIN_FILENO); - if (real_tty_path == NULL) - return NULL; - real_tty_path += 5; /* Remove "/dev/". */ + { + int err; + int d = __open ("/dev/tty", 0); + if (d < 0) + return NULL; - f = fopen("/etc/utmp", "r"); + real_tty_path = ttyname (d); + err = errno; + (void) close (d); + + if (real_tty_path == NULL) + { + errno = err; + return NULL; + } + } + + real_tty_path += 5; /* Remove "/dev/". */ + + f = fopen ("/etc/utmp", "r"); if (f != NULL) { - while (fread((PTR) &ut, sizeof(ut), 1, f) == 1) - if (!strncmp(ut.ut_line, real_tty_path, sizeof(ut.ut_line))) + while (fread ((PTR) &ut, sizeof(ut), 1, f) == 1) + if (!strncmp (ut.ut_line, real_tty_path, sizeof (ut.ut_line))) { result = ut.ut_name; + /* The name is not null-terminated if + it is as long as sizeof (ut.ut_name). */ + result[sizeof (ut.ut_name)] = '\0'; break; } - (void) fclose(f); + (void) fclose (f); } if (save_ttyname != NULL) - strcpy(__ttyname, save_ttyname); + strcpy (__ttyname, save_ttyname); if (result == NULL) errno = ENOENT; return result; diff -ruN glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/Implies glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/Implies --- glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/Implies Mon May 6 22:47:23 1991 +++ glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/Implies Tue Mar 10 22:09:36 1992 @@ -1,2 +1,2 @@ -# HP 9000 series 300 is 68k architecture with 68881 FPU. -m68k/68881 +# HP 9000 series 300 is 68k. +m68k diff -ruN glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/__brk.S glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/__brk.S --- glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/__brk.S Wed Jun 26 16:50:46 1991 +++ glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/__brk.S Tue Mar 10 21:28:38 1992 @@ -22,7 +22,7 @@ #define SYS_brk 17 #endif -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD #define __end _end #endif diff -ruN glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/start.c glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/start.c --- glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/start.c Thu Jan 16 19:59:04 1992 +++ glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/start.c Wed Mar 11 18:09:38 1992 @@ -1,7 +1,7 @@ /* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0. Go figure. */ -asm(".globl __start\n" - "__start: .long 0"); +asm(".globl __start"); +asm("__start: .long 0"); #define _start __start0 diff -ruN glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/sysdep.S glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/sysdep.S --- glibc-1.00/sysdeps/unix/bsd/hp9k3bsd/sysdep.S Tue Jul 30 18:57:41 1991 +++ glibc-1.01/sysdeps/unix/bsd/hp9k3bsd/sysdep.S Wed Mar 11 00:16:11 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -19,5 +19,5 @@ .globl syscall_error syscall_error: movel d0, _errno - moveq (@@@Hash-Here@@@)-1, d0 + moveq #-1, d0 rts diff -ruN glibc-1.00/sysdeps/unix/bsd/init-posix.c glibc-1.01/sysdeps/unix/bsd/init-posix.c --- glibc-1.00/sysdeps/unix/bsd/init-posix.c Wed Jun 12 17:33:46 1991 +++ glibc-1.01/sysdeps/unix/bsd/init-posix.c Sun Mar 8 15:46:32 1992 @@ -28,7 +28,7 @@ _posix_start_time = time((time_t *) NULL); } -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun3/__brk.S glibc-1.01/sysdeps/unix/bsd/sun/sun3/__brk.S --- glibc-1.00/sysdeps/unix/bsd/sun/sun3/__brk.S Wed Jun 26 16:51:19 1991 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun3/__brk.S Tue Mar 10 21:28:44 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,7 +22,7 @@ #define SYS_brk 17 #endif -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD #define __end _end #endif @@ -37,7 +37,7 @@ cmpl sp@(4), d0 ble 0f movel d0, sp@(4) -0: pea @POUND(SYS_brk) +0: pea SYS_brk trap POUND(0) bcs 1f movel sp@(4), ___curbrk diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun3/__wait.S glibc-1.01/sysdeps/unix/bsd/sun/sun3/__wait.S --- glibc-1.00/sysdeps/unix/bsd/sun/sun3/__wait.S Mon Jun 24 13:36:12 1991 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun3/__wait.S @@ -1 +0,0 @@ -#include diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun3/os3/Implies glibc-1.01/sysdeps/unix/bsd/sun/sun3/os3/Implies --- glibc-1.00/sysdeps/unix/bsd/sun/sun3/os3/Implies +++ glibc-1.01/sysdeps/unix/bsd/sun/sun3/os3/Implies Tue Mar 10 19:03:37 1992 @@ -0,0 +1 @@ +unix/bsd/sun/sunos3 diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun3/os3/__wait.S glibc-1.01/sysdeps/unix/bsd/sun/sun3/os3/__wait.S --- glibc-1.00/sysdeps/unix/bsd/sun/sun3/os3/__wait.S +++ glibc-1.01/sysdeps/unix/bsd/sun/sun3/os3/__wait.S Mon Jun 24 13:36:12 1991 @@ -0,0 +1 @@ +#include diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun3/sethostid.S glibc-1.01/sysdeps/unix/bsd/sun/sun3/sethostid.S --- glibc-1.00/sysdeps/unix/bsd/sun/sun3/sethostid.S Wed Jun 12 18:41:10 1991 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun3/sethostid.S Tue Mar 10 21:28:42 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -25,7 +25,7 @@ #else -#include +#include .globl _sethostid .even @@ -34,11 +34,10 @@ moveq #-1, d0 rts -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD -#include - -stub_warning(sethostid); +.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 +.stabs "_sethostid",1,0,0,0 #endif diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun3/start.c glibc-1.01/sysdeps/unix/bsd/sun/sun3/start.c --- glibc-1.00/sysdeps/unix/bsd/sun/sun3/start.c Tue May 14 11:33:32 1991 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun3/start.c Tue Mar 10 19:26:52 1992 @@ -1,3 +1,3 @@ #define DUMMIES ignore0 -#include <../sysdeps/unix/start.c> +#include diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun3/sysdep.h glibc-1.01/sysdeps/unix/bsd/sun/sun3/sysdep.h --- glibc-1.00/sysdeps/unix/bsd/sun/sun3/sysdep.h Mon Jun 24 19:16:30 1991 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun3/sysdep.h Tue Mar 10 21:10:11 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -16,8 +16,12 @@ 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; \ @@ -32,26 +36,22 @@ #ifdef __STDC__ #define PSEUDO(name, syscall_name) \ - .set sysno, SYS_##syscall_name; \ - .set zero, 0; \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - pea sysno; \ - trap zero; \ - bcs error \ + pea SYS_##syscall_name; \ + trap POUND(0); \ + bcs error #else #define PSEUDO(name, syscall_name) \ - .set sysno, SYS_/**/syscall_name; \ - .set zero, 0; \ .even; \ .globl syscall_error; \ error: jmp syscall_error; \ ENTRY (name) \ - pea sysno; \ - trap zero; \ - bcs error \ + pea SYS_/**/syscall_name; \ + trap POUND(0); \ + bcs error #endif #define ret rts diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun4/__brk.S glibc-1.01/sysdeps/unix/bsd/sun/sun4/__brk.S --- glibc-1.00/sysdeps/unix/bsd/sun/sun4/__brk.S Mon Feb 10 19:13:13 1992 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun4/__brk.S Tue Mar 10 21:28:50 1992 @@ -22,7 +22,7 @@ #define SYS_brk 17 #endif -#if/*ndef __GNU_STAB__*/1 +#if/*ndef HAVE_GNU_LD*/1 #define __end _end #endif diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun4/sethostid.S glibc-1.01/sysdeps/unix/bsd/sun/sun4/sethostid.S --- glibc-1.00/sysdeps/unix/bsd/sun/sun4/sethostid.S Fri Jul 26 23:00:13 1991 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun4/sethostid.S Tue Mar 10 21:28:48 1992 @@ -34,7 +34,7 @@ retl sub %g0, 1, %o0 -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD .stabs "warning: sethostid is not implemented and will always fail",30,0,0,0 .stabs "_sethostid",1,0,0,0 diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun4/sigtramp.c glibc-1.01/sysdeps/unix/bsd/sun/sun4/sigtramp.c --- glibc-1.00/sysdeps/unix/bsd/sun/sun4/sigtramp.c Fri Jan 17 00:59:40 1992 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun4/sigtramp.c Wed Mar 11 18:09:31 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -17,6 +17,10 @@ Cambridge, MA 02139, USA. */ #include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif /* Get the definition of `struct sigcontext'. */ #define KERNEL diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun4/start.c glibc-1.01/sysdeps/unix/bsd/sun/sun4/start.c --- glibc-1.00/sysdeps/unix/bsd/sun/sun4/start.c Fri Jan 10 23:09:06 1992 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun4/start.c Wed Mar 11 18:09:36 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -21,12 +21,16 @@ #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 __GNU_STAB__ +#ifndef HAVE_GNU_LD #undef environ #define __environ environ #endif diff -ruN glibc-1.00/sysdeps/unix/bsd/sun/sun4/sysdep.h glibc-1.01/sysdeps/unix/bsd/sun/sun4/sysdep.h --- glibc-1.00/sysdeps/unix/bsd/sun/sun4/sysdep.h Fri Jul 26 19:51:43 1991 +++ glibc-1.01/sysdeps/unix/bsd/sun/sun4/sysdep.h Tue Feb 25 23:56:09 1992 @@ -21,12 +21,12 @@ #ifdef __STDC__ #define ENTRY(name) \ .global _##name; \ - .align 4; \ + .align 2; \ _##name##: #else #define ENTRY(name) \ .global _/**/name; \ - .align 4; \ + .align 2; \ _/**/name/**/: #endif diff -ruN glibc-1.00/sysdeps/unix/bsd/usleep.c glibc-1.01/sysdeps/unix/bsd/usleep.c --- glibc-1.00/sysdeps/unix/bsd/usleep.c Wed Jun 12 17:39:00 1991 +++ glibc-1.01/sysdeps/unix/bsd/usleep.c Wed Feb 26 13:15:51 1992 @@ -19,7 +19,16 @@ #include #include #include +#include +/* SIGALRM signal handler for `sleep'. This does nothing but return, + but SIG_IGN isn't supposed to break `pause'. */ +static void +DEFUN(sleep_handler, (sig), int sig) +{ + return; +} + /* Sleep USECONDS microseconds, or until a previously set timer goes off. */ unsigned int DEFUN(usleep, (useconds), unsigned int useconds) @@ -26,10 +35,17 @@ { struct itimerval otimer; struct timeval before, after, delta; + __sighandler_t ohandler; + int omask; if (getitimer(ITIMER_REAL, &otimer) < 0) return -1; + ohandler = signal (SIGALRM, sleep_handler); + if (ohandler == SIG_ERR) + return -1; + omask = sigblock (SIGALRM); + if ((unsigned int) ((otimer.it_value.tv_sec * 1000) + otimer.it_value.tv_usec) < useconds) { @@ -42,14 +58,14 @@ /* Find the time beforehand so we can tell how much time elapsed. */ if (gettimeofday(&before, (struct timezone *) NULL) < 0) - return -1; + goto lose; if (setitimer(ITIMER_REAL, &timer, &otimer) < 0) - return -1; + goto lose; } /* Wait for the timer to expire. */ - (void) pause(); + (void) sigpause (omask); /* Find out what time it is now, and see how much time elapsed. */ if (gettimeofday(&after, (struct timezone *) NULL) < 0) @@ -75,4 +91,9 @@ (void) setitimer(ITIMER_REAL, &otimer, (struct itimerval *) NULL); return useconds - ((delta.tv_sec * 1000) + delta.tv_usec); + + lose: + signal (SIGALRM, ohandler); + sigsetmask (omask); + return -1; } diff -ruN glibc-1.00/sysdeps/unix/bsd/vax/__brk.S glibc-1.01/sysdeps/unix/bsd/vax/__brk.S --- glibc-1.00/sysdeps/unix/bsd/vax/__brk.S Wed Jun 26 16:44:24 1991 +++ glibc-1.01/sysdeps/unix/bsd/vax/__brk.S Tue Mar 10 21:28:54 1992 @@ -22,7 +22,7 @@ #define SYS_brk 17 #endif -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD #define __end _end #endif diff -ruN glibc-1.00/sysdeps/unix/bsd/vax/sysdep.S glibc-1.01/sysdeps/unix/bsd/vax/sysdep.S --- glibc-1.00/sysdeps/unix/bsd/vax/sysdep.S Mon Jun 10 21:26:17 1991 +++ glibc-1.01/sysdeps/unix/bsd/vax/sysdep.S Tue Mar 10 21:28:58 1992 @@ -16,7 +16,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #define ___errno _errno #endif diff -ruN glibc-1.00/sysdeps/unix/i386/__brk.S glibc-1.01/sysdeps/unix/i386/__brk.S --- glibc-1.00/sysdeps/unix/i386/__brk.S Tue Jan 14 22:04:35 1992 +++ glibc-1.01/sysdeps/unix/i386/__brk.S Tue Mar 10 21:29:47 1992 @@ -25,7 +25,7 @@ .data .globl ___curbrk ___curbrk: -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD .long __end #else .long _end diff -ruN glibc-1.00/sysdeps/unix/start.c glibc-1.01/sysdeps/unix/start.c --- glibc-1.00/sysdeps/unix/start.c Fri Jan 10 23:09:04 1992 +++ glibc-1.01/sysdeps/unix/start.c Sun Mar 8 15:46:52 1992 @@ -33,7 +33,7 @@ VOLATILE int errno; -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD #undef environ #define __environ environ #endif @@ -56,6 +56,13 @@ { start1(); } + +#ifdef HAVE_GNU_LD +/* Make an alias called `start' (no leading underscore, + so it can't conflict with C symbols) for `_start'. */ +asm(".stabs \"start\",11,0,0,0"); +asm(".stabs \"__start\",1,0,0,0"); +#endif #endif diff -ruN glibc-1.00/sysdeps/unix/sysv/Dist glibc-1.01/sysdeps/unix/sysv/Dist --- glibc-1.00/sysdeps/unix/sysv/Dist Mon Feb 17 04:16:05 1992 +++ glibc-1.01/sysdeps/unix/sysv/Dist Thu Mar 5 18:45:44 1992 @@ -1,2 +1,4 @@ sysv_stat.h sys_stat.S sys_fstat.S +__utssys.S +sysv_termio.h diff -ruN glibc-1.00/sysdeps/unix/sysv/Makefile glibc-1.01/sysdeps/unix/sysv/Makefile --- glibc-1.00/sysdeps/unix/sysv/Makefile Mon Feb 17 04:16:09 1992 +++ glibc-1.01/sysdeps/unix/sysv/Makefile Thu Mar 5 17:29:59 1992 @@ -18,6 +18,7 @@ ifeq ($(subdir), io) -sysdep-routines := $(sysdep-routines) sys_stat sys_fstat +sysdep-routines := $(sysdep-routines) sys_stat sys_fstat \ + __utssys endif diff -ruN glibc-1.00/sysdeps/unix/sysv/__mkdir.c glibc-1.01/sysdeps/unix/sysv/__mkdir.c --- glibc-1.00/sysdeps/unix/sysv/__mkdir.c +++ glibc-1.01/sysdeps/unix/sysv/__mkdir.c Thu Mar 5 17:18:49 1992 @@ -0,0 +1,95 @@ +/* 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 +#include +#include +#include + + +/* Create a directory named PATH with protections MODE. */ +int +DEFUN(__mkdir, (path, mode), CONST char *path AND mode_t mode) +{ + char *cmd = __alloca (80 + strlen (path)); + char *p; + int status; + mode_t mask; + int save; + struct stat statbuf; + + if (path == NULL) + { + errno = EINVAL; + return -1; + } + + /* Check for some errors. */ + if (__stat (path, &statbuf) < 0) + { + if (errno != ENOENT) + return -1; + /* There is no file by that name. Good. */ + } + else + { + errno = EEXIST; + return -1; + } + + /* Race condition, but how else to do it? */ + mask = __umask (0777); + (void) __umask (mask); + + p = cmd; + *p++ = 'm'; + *p++ = 'k'; + *p++ = 'd'; + *p++ = 'i'; + *p++ = 'r'; + *p++ = ' '; + + mode &= ~mask; + *p++ = '-'; + *p++ = 'm'; + *p++ = ' '; + *p++ = ((mode & 07000) >> 9) + '0'; + *p++ = ((mode & 0700) >> 6) + '0'; + *p++ = ((mode & 070) >> 3) + '0'; + *p++ = ((mode & 07)) + '0'; + *p++ = ' '; + + strcpy (p, path); + + save = errno; + /* If system doesn't set errno, but the mkdir fails, we really + have no idea what went wrong. EIO is the vaguest error I + can think of, so I'll use that. */ + errno = EIO; + status = system (cmd); + if (WIFEXITED (status) && WEXITSTATUS (status) == 0) + { + return 0; + errno = save; + } + else + return -1; +} diff -ruN glibc-1.00/sysdeps/unix/sysv/__rmdir.c glibc-1.01/sysdeps/unix/sysv/__rmdir.c --- glibc-1.00/sysdeps/unix/sysv/__rmdir.c +++ glibc-1.01/sysdeps/unix/sysv/__rmdir.c Thu Mar 5 17:30:03 1992 @@ -0,0 +1,76 @@ +/* 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 +#include +#include +#include + + +/* Create a directory named PATH with protections MODE. */ +int +DEFUN(__rmdir, (path), CONST char *path) +{ + char *cmd = __alloca (80 + strlen (path)); + char *p; + int status; + int save; + struct stat statbuf; + + if (path == NULL) + { + errno = EINVAL; + return -1; + } + + /* Check for some errors. */ + if (__stat (path, &statbuf) < 0) + return -1; + if (!S_ISDIR (statbuf.st_mode)) + { + errno = ENOTDIR; + return -1; + } + + p = cmd; + *p++ = 'r'; + *p++ = 'm'; + *p++ = 'd'; + *p++ = 'i'; + *p++ = 'r'; + *p++ = ' '; + + strcpy (p, path); + + save = errno; + /* If system doesn't set errno, but the rmdir fails, we really + have no idea what went wrong. EIO is the vaguest error I + can think of, so I'll use that. */ + errno = EIO; + status = system (cmd); + if (WIFEXITED (status) && WEXITSTATUS (status) == 0) + { + return 0; + errno = save; + } + else + return -1; +} diff -ruN glibc-1.00/sysdeps/unix/sysv/__tcgetatr.c glibc-1.01/sysdeps/unix/sysv/__tcgetatr.c --- glibc-1.00/sysdeps/unix/sysv/__tcgetatr.c +++ glibc-1.01/sysdeps/unix/sysv/__tcgetatr.c Thu Mar 5 18:45:31 1992 @@ -0,0 +1,168 @@ +/* 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 +#include + +/* Put the state of FD into *TERMIOS_P. */ +int +DEFUN(__tcgetattr, (fd, termios_p), + int fd AND struct termios *termios_p) +{ + struct __sysv_termio buf; + int termio_speed; + + if (termios_p == NULL) + { + errno = EINVAL; + return -1; + } + + if (__ioctl (fd, _TCGETA, &buf) < 0) + return -1; + + termio_speed = buf.c_cflag & _SYSV_CBAUD; + termios_p->__ospeed = + (termio_speed == _SYSV_B0 ? 0 : + termio_speed == _SYSV_B50 ? 50 : + termio_speed == _SYSV_B75 ? 75 : + termio_speed == _SYSV_B110 ? 110 : + termio_speed == _SYSV_B134 ? 134 : + termio_speed == _SYSV_B150 ? 150 : + termio_speed == _SYSV_B200 ? 200 : + termio_speed == _SYSV_B300 ? 300 : + termio_speed == _SYSV_B600 ? 600 : + termio_speed == _SYSV_B1200 ? 1200 : + termio_speed == _SYSV_B1800 ? 1800 : + termio_speed == _SYSV_B2400 ? 2400 : + termio_speed == _SYSV_B4800 ? 4800 : + termio_speed == _SYSV_B9600 ? 9600 : + termio_speed == _SYSV_B19200 ? 19200 : + termio_speed == _SYSV_B38400 ? 38400 : + -1); + termios_p->__ispeed = termios_p->__ospeed; + + termios_p->c_iflag = 0; + if (buf.c_iflag & _SYSV_IGNBRK) + termios_p->c_iflag |= IGNBRK; + if (buf.c_iflag & _SYSV_BRKINT) + termios_p->c_iflag |= BRKINT; + if (buf.c_iflag & _SYSV_IGNPAR) + termios_p->c_iflag |= IGNPAR; + if (buf.c_iflag & _SYSV_PARMRK) + termios_p->c_iflag |= PARMRK; + if (buf.c_iflag & _SYSV_INPCK) + termios_p->c_iflag |= INPCK; + if (buf.c_iflag & _SYSV_ISTRIP) + termios_p->c_iflag |= ISTRIP; + if (buf.c_iflag & _SYSV_INLCR) + termios_p->c_iflag |= INLCR; + if (buf.c_iflag & _SYSV_IGNCR) + termios_p->c_iflag |= IGNCR; + if (buf.c_iflag & _SYSV_ICRNL) + termios_p->c_iflag |= ICRNL; + if (buf.c_iflag & _SYSV_IXON) + termios_p->c_iflag |= IXON; + if (buf.c_iflag & _SYSV_IXOFF) + termios_p->c_iflag |= IXOFF; + if (buf.c_iflag & _SYSV_IXANY) + termios_p->c_iflag |= IXANY; + if (buf.c_iflag & _SYSV_IMAXBEL) + termios_p->c_iflag |= IMAXBEL; + + termios_p->c_oflag = 0; + if (buf.c_oflag & OPOST) + termios_p->c_oflag |= OPOST; + if (buf.c_oflag & ONLCR) + termios_p->c_oflag |= ONLCR; + termios_p->c_cflag = 0; + switch (buf.c_cflag & _SYSV_CSIZE) + { + case _SYSV_CS5: + termios_p->c_cflag |= CS5; + break; + case _SYSV_CS6: + termios_p->c_cflag |= CS6; + break; + case _SYSV_CS7: + termios_p->c_cflag |= CS7; + break; + case _SYSV_CS8: + termios_p->c_cflag |= CS8; + break; + } + if (buf.c_cflag & _SYSV_CSTOPB) + termios_p->c_cflag |= CSTOPB; + if (buf.c_cflag & _SYSV_CREAD) + termios_p->c_cflag |= CREAD; + if (buf.c_cflag & _SYSV_PARENB) + termios_p->c_cflag |= PARENB; + if (buf.c_cflag & _SYSV_PARODD) + termios_p->c_cflag |= PARODD; + if (buf.c_cflag & _SYSV_HUPCL) + termios_p->c_cflag |= HUPCL; + if (buf.c_cflag & _SYSV_CLOCAL) + termios_p->c_cflag |= CLOCAL; + termios_p->c_lflag = 0; + if (buf.c_lflag & _SYSV_ISIG) + termios_p->c_lflag |= _ISIG; + if (buf.c_lflag & _SYSV_ICANON) + termios_p->c_lflag |= _ICANON; + if (buf.c_lflag & _SYSV_ECHO) + termios_p->c_lflag |= _ECHO; + if (buf.c_lflag & _SYSV_ECHOE) + termios_p->c_lflag |= _ECHOE; + if (buf.c_lflag & _SYSV_ECHOK) + termios_p->c_lflag |= _ECHOK; + if (buf.c_lflag & _SYSV_ECHONL) + termios_p->c_lflag |= _ECHONL; + if (buf.c_lflag & _SYSV_NOFLSH) + termios_p->c_lflag |= _NOFLSH; + if (buf.c_lflag & _SYSV_TOSTOP) + termios_p->c_lflag |= _TOSTOP; + if (buf.c_lflag & _SYSV_ECHOKE) + termios_p->c_lflag |= ECHOKE; + if (buf.c_lflag & _SYSV_ECHOPRT) + termios_p->c_lflag |= ECHOPRT; + if (buf.c_lflag & _SYSV_ECHOCTL) + termios_p->c_lflag |= ECHOCTL; + if (buf.c_lflag & _SYSV_FLUSHO) + termios_p->c_lflag |= FLUSHO; + if (buf.c_lflag & _SYSV_PENDIN) + termios_p->c_lflag |= PENDIN; + if (buf.c_lflag & _SYSV_IEXTEN) + termios_p->c_lflag |= IEXTEN; + + termios_p->c_cc[VEOF] = buf.c_cc[_SYSV_VEOF]; + termios_p->c_cc[VEOL] = buf.c_cc[_SYSV_VEOL]; + termios_p->c_cc[VEOL2] = buf.c_cc[_SYSV_VEOL2]; + termios_p->c_cc[VERASE] = buf.c_cc[_SYSV_VERASE]; + termios_p->c_cc[VKILL] = buf.c_cc[_SYSV_VKILL]; + termios_p->c_cc[VINTR] = buf.c_cc[_SYSV_VINTR]; + termios_p->c_cc[VQUIT] = buf.c_cc[_SYSV_VQUIT]; + termios_p->c_cc[VSTART] = '\021'; /* XON (^Q). */ + termios_p->c_cc[VSTOP] = '\023'; /* XOFF (^S). */ + termios_p->c_cc[VSUSP] = '\0'; /* System V release 3 lacks job control. */ + termios_p->c_cc[VMIN] = -1; + termios_p->c_cc[VTIME] = -1; + + return 0; +} diff -ruN glibc-1.00/sysdeps/unix/sysv/__utssys.S glibc-1.01/sysdeps/unix/sysv/__utssys.S --- glibc-1.00/sysdeps/unix/sysv/__utssys.S +++ glibc-1.01/sysdeps/unix/sysv/__utssys.S Thu Mar 5 17:30:01 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__ (utssys) + ret diff -ruN glibc-1.00/sysdeps/unix/sysv/setrlimit.c glibc-1.01/sysdeps/unix/sysv/setrlimit.c --- glibc-1.00/sysdeps/unix/sysv/setrlimit.c Sat Feb 15 18:11:22 1992 +++ glibc-1.01/sysdeps/unix/sysv/setrlimit.c Sun Mar 8 15:46:46 1992 @@ -32,7 +32,7 @@ DEFUN(setrlimit, (resource, rlimits), enum __rlimit_resource resource AND struct rlimit *rlimits) { -#ifndef __GNU_STAB__ +#ifndef HAVE_GNU_LD #define __etext etext #endif extern char __etext; diff -ruN glibc-1.00/sysdeps/unix/sysv/sysv_termio.h glibc-1.01/sysdeps/unix/sysv/sysv_termio.h --- glibc-1.00/sysdeps/unix/sysv/sysv_termio.h +++ glibc-1.01/sysdeps/unix/sysv/sysv_termio.h Thu Mar 5 18:45:32 1992 @@ -0,0 +1,124 @@ +/* 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. */ + +/* In various parts of this file we define the System V values for + things as _SYSV_. Those are the values that System V + uses for termio, and also (SVR4) termios. Not necessarily the + same as the GNU termios that the library user sees. */ + +/* Number of elements of c_cc. termio only. */ +#define _SYSV_NCC 8 + +#define _SYSV_VINTR 0 +#define _SYSV_VQUIT 1 +#define _SYSV_VERASE 2 +#define _SYSV_VKILL 3 +#define _SYSV_VEOF 4 +#define _SYSV_VEOL 5 +#define _SYSV_VEOL2 6 + +/* Flags in c_iflag. */ +#define _SYSV_IGNBRK 1 +#define _SYSV_BRKINT 2 +#define _SYSV_IGNPAR 4 +#define _SYSV_PARMRK 8 +#define _SYSV_INPCK 0x10 +#define _SYSV_ISTRIP 0x20 +#define _SYSV_INLCR 0x40 +#define _SYSV_IGNCR 0x80 +#define _SYSV_ICRNL 0x100 +#define _SYSV_IXON 0x400 +#define _SYSV_IXANY 0x800 +#define _SYSV_IXOFF 0x1000 +#define _SYSV_IMAXBEL 0x2000 + +/* Flags in c_cflag. */ +#define _SYSV_CBAUD 0xf +#define _SYSV_CIBAUD 0xf0000 /* termios only. */ +#define _SYSV_IBSHIFT 16 +/* Values for CBAUD and CIBAUD. */ +#define _SYSV_B0 0 +#define _SYSV_B50 1 +#define _SYSV_B75 2 +#define _SYSV_B110 3 +#define _SYSV_B134 4 +#define _SYSV_B150 5 +#define _SYSV_B200 6 +#define _SYSV_B300 7 +#define _SYSV_B600 8 +#define _SYSV_B1200 9 +#define _SYSV_B1800 10 +#define _SYSV_B2400 11 +#define _SYSV_B4800 12 +#define _SYSV_B9600 13 +#define _SYSV_B19200 14 +#define _SYSV_B38400 15 + +#define _SYSV_CS5 0 +#define _SYSV_CS6 0x10 +#define _SYSV_CS7 0x20 +#define _SYSV_CS8 0x30 +#define _SYSV_CSIZE 0x30 +#define _SYSV_CSTOPB 0x40 +#define _SYSV_CREAD 0x80 +#define _SYSV_PARENB 0x100 +#define _SYSV_PARODD 0x200 +#define _SYSV_HUPCL 0x400 +#define _SYSV_CLOCAL 0x800 + +/* Flags in c_lflag. */ +#define _SYSV_ISIG 1 +#define _SYSV_ICANON 2 +#define _SYSV_ECHO 8 +#define _SYSV_ECHOE 0x10 +#define _SYSV_ECHOK 0x20 +#define _SYSV_ECHONL 0x40 +#define _SYSV_NOFLSH 0x80 +#define _SYSV_TOSTOP 0x100 +#define _SYSV_ECHOCTL 0x200 +#define _SYSV_ECHOPRT 0x400 +#define _SYSV_ECHOKE 0x800 +#define _SYSV_FLUSHO 0x2000 +#define _SYSV_PENDIN 0x4000 +#define _SYSV_IEXTEN 0x8000 + +/* Flags in c_oflag. */ +#define _SYSV_OPOST 1 +#define _SYSV_ONLCR 4 + +/* ioctl's. */ + +#define _TCGETA 0x5401 +#define _TCSETA 0x5402 +#define _TCSETAW 0x5403 +#define _TCSETAF 0x5404 +#define _TCSBRK 0x5405 +#define _TCXONC 0x5406 +#define _TCFLSH 0x5407 +#define _TIOCGPGRP 0x7414 +#define _TIOCSPGRP 0x7415 + +struct __sysv_termio + { + unsigned short c_iflag; + unsigned short c_oflag; + unsigned short c_cflag; + unsigned short c_lflag; + char c_line; + unsigned char c_cc[_SYSV_NCC]; + }; diff -ruN glibc-1.00/sysdeps/unix/sysv/tcdrain.c glibc-1.01/sysdeps/unix/sysv/tcdrain.c --- glibc-1.00/sysdeps/unix/sysv/tcdrain.c +++ glibc-1.01/sysdeps/unix/sysv/tcdrain.c Thu Mar 5 18:45:35 1992 @@ -0,0 +1,32 @@ +/* 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 +#include +#include + +/* Wait for pending output to be written on FD. */ +int +DEFUN(tcdrain, (fd), int fd) +{ + /* With an argument of 1, TCSBRK just waits for output to drain. */ + return __ioctl (fd, _TCSBRK, 1); +} diff -ruN glibc-1.00/sysdeps/unix/sysv/tcflush.c glibc-1.01/sysdeps/unix/sysv/tcflush.c --- glibc-1.00/sysdeps/unix/sysv/tcflush.c +++ glibc-1.01/sysdeps/unix/sysv/tcflush.c Thu Mar 5 18:45:36 1992 @@ -0,0 +1,43 @@ +/* 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 +#include + +#include + +/* Flush pending data on FD. */ +int +DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector) +{ + switch (queue_selector) + { + case TCIFLUSH: + return __ioctl (fd, _TCFLSH, 0); + case TCOFLUSH: + return __ioctl (fd, _TCFLSH, 1); + case TCIOFLUSH: + return __ioctl (fd, _TCFLSH, 2); + default: + errno = EINVAL; + return -1; + } +} diff -ruN glibc-1.00/sysdeps/unix/sysv/tcgetpgrp.c glibc-1.01/sysdeps/unix/sysv/tcgetpgrp.c --- glibc-1.00/sysdeps/unix/sysv/tcgetpgrp.c +++ glibc-1.01/sysdeps/unix/sysv/tcgetpgrp.c Thu Mar 5 18:45:37 1992 @@ -0,0 +1,34 @@ +/* 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 +#include +#include + +/* Return the foreground process group ID of FD. */ +pid_t +DEFUN(tcgetpgrp, (fd), int fd) +{ + int pgrp; + if (__ioctl(fd, _TIOCGPGRP, &pgrp) < 0) + return (pid_t) -1; + return (pid_t) pgrp; +} diff -ruN glibc-1.00/sysdeps/unix/sysv/tcsendbrk.c glibc-1.01/sysdeps/unix/sysv/tcsendbrk.c --- glibc-1.00/sysdeps/unix/sysv/tcsendbrk.c +++ glibc-1.01/sysdeps/unix/sysv/tcsendbrk.c Thu Mar 5 18:45:39 1992 @@ -0,0 +1,42 @@ +/* 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 +#include +#include +#include + +/* Send zero bits on FD. */ +int +DEFUN(tcsendbreak, (fd, duration), int fd AND int duration) +{ + /* The break lasts 0.25 to 0.5 seconds if DURATION is zero, + and an implementation-defined period if DURATION is nonzero. + We define a positive DURATION to be number of milliseconds to break. */ + if (duration <= 0) + return __ioctl (fd, _TCSBRK, 0); + + /* ioctl can't send a break of any other duration for us. + This could be changed to use trickery (e.g. lower speed and + send a '\0') to send the break, but for now just return an error. */ + errno = EINVAL; + return -1; +} diff -ruN glibc-1.00/sysdeps/unix/sysv/tcsetattr.c glibc-1.01/sysdeps/unix/sysv/tcsetattr.c --- glibc-1.00/sysdeps/unix/sysv/tcsetattr.c +++ glibc-1.01/sysdeps/unix/sysv/tcsetattr.c Thu Mar 5 18:45:40 1992 @@ -0,0 +1,199 @@ +/* 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 + +#include + + +CONST speed_t __unix_speeds[] = + { + 0, + 50, + 75, + 110, + 134, + 150, + 200, + 300, + 600, + 1200, + 1800, + 2400, + 4800, + 9600, + 19200, + 38400, + }; + + +/* Set the state of FD to *TERMIOS_P. */ +int +DEFUN(tcsetattr, (fd, optional_actions, termios_p), + int fd AND int optional_actions AND CONST struct termios *termios_p) +{ + struct __sysv_termio buf; + int ioctl_function; + size_t i; + + if (termios_p == NULL) + { + errno = EINVAL; + return -1; + } + switch (optional_actions) + { + case TCSANOW: + ioctl_function = _TCSETA; + break; + case TCSADRAIN: + ioctl_function = _TCSETAW; + break; + case TCSAFLUSH: + ioctl_function = _TCSETAF; + break; + default: + errno = EINVAL; + return -1; + } + + if (termios_p->__ispeed != termios_p->__ospeed) + { + errno = EINVAL; + return -1; + } + buf.c_cflag = -1; + for (i = 0; i <= sizeof (__unix_speeds) / sizeof (__unix_speeds[0]); ++i) + { + if (__unix_speeds[i] == termios_p->__ispeed) + buf.c_cflag = i; + } + if (buf.c_cflag == -1) + { + errno = EINVAL; + return -1; + } + + buf.c_iflag = 0; + if (termios_p->c_iflag & IGNBRK) + buf.c_iflag |= _SYSV_IGNBRK; + if (termios_p->c_iflag & BRKINT) + buf.c_iflag |= _SYSV_BRKINT; + if (termios_p->c_iflag & IGNPAR) + buf.c_iflag |= _SYSV_IGNPAR; + if (termios_p->c_iflag & PARMRK) + buf.c_iflag |= _SYSV_PARMRK; + if (termios_p->c_iflag & INPCK) + buf.c_iflag |= _SYSV_INPCK; + if (termios_p->c_iflag & ISTRIP) + buf.c_iflag |= _SYSV_ISTRIP; + if (termios_p->c_iflag & INLCR) + buf.c_iflag |= _SYSV_INLCR; + if (termios_p->c_iflag & IGNCR) + buf.c_iflag |= _SYSV_IGNCR; + if (termios_p->c_iflag & ICRNL) + buf.c_iflag |= _SYSV_ICRNL; + if (termios_p->c_iflag & IXON) + buf.c_iflag |= _SYSV_IXON; + if (termios_p->c_iflag & IXOFF) + buf.c_iflag |= _SYSV_IXOFF; + if (termios_p->c_iflag & IXANY) + buf.c_iflag |= _SYSV_IXANY; + if (termios_p->c_iflag & IMAXBEL) + buf.c_iflag |= _SYSV_IMAXBEL; + + buf.c_oflag = 0; + if (termios_p->c_oflag & OPOST) + buf.c_oflag = _SYSV_OPOST; + if (termios_p->c_oflag & ONLCR) + buf.c_oflag = _SYSV_ONLCR; + + /* So far, buf.c_cflag contains the speed in CBAUD. */ + if (termios_p->c_cflag & CSTOPB) + buf.c_cflag |= _SYSV_CSTOPB; + if (termios_p->c_cflag & CREAD) + buf.c_cflag |= _SYSV_CREAD; + if (termios_p->c_cflag & PARENB) + buf.c_cflag |= _SYSV_PARENB; + if (termios_p->c_cflag & PARODD) + buf.c_cflag |= _SYSV_PARODD; + if (termios_p->c_cflag & HUPCL) + buf.c_cflag |= _SYSV_HUPCL; + if (termios_p->c_cflag & CLOCAL) + buf.c_cflag |= _SYSV_CLOCAL; + switch (termios_p->c_cflag & CSIZE) + { + case CS5: + buf.c_cflag |= _SYSV_CS5; + break; + case CS6: + buf.c_cflag |= _SYSV_CS6; + break; + case CS7: + buf.c_cflag |= _SYSV_CS7; + break; + case CS8: + buf.c_cflag |= _SYSV_CS8; + break; + } + + buf.c_lflag = 0; + if (termios_p->c_lflag & ISIG) + buf.c_lflag |= _SYSV_ISIG; + if (termios_p->c_lflag & ICANON) + buf.c_lflag |= _SYSV_ICANON; + if (termios_p->c_lflag & ECHO) + buf.c_lflag |= _SYSV_ECHO; + if (termios_p->c_lflag & ECHOE) + buf.c_lflag |= _SYSV_ECHOE; + if (termios_p->c_lflag & ECHOK) + buf.c_lflag |= _SYSV_ECHOK; + if (termios_p->c_lflag & ECHONL) + buf.c_lflag |= _SYSV_ECHONL; + if (termios_p->c_lflag & NOFLSH) + buf.c_lflag |= _SYSV_NOFLSH; + if (termios_p->c_lflag & TOSTOP) + buf.c_lflag |= _SYSV_TOSTOP; + if (termios_p->c_lflag & ECHOCTL) + buf.c_lflag |= _SYSV_ECHOCTL; + if (termios_p->c_lflag & ECHOPRT) + buf.c_lflag |= _SYSV_ECHOPRT; + if (termios_p->c_lflag & ECHOKE) + buf.c_lflag |= _SYSV_ECHOKE; + if (termios_p->c_lflag & FLUSHO) + buf.c_lflag |= _SYSV_FLUSHO; + if (termios_p->c_lflag & PENDIN) + buf.c_lflag |= _SYSV_PENDIN; + if (termios_p->c_lflag & IEXTEN) + buf.c_lflag |= _SYSV_IEXTEN; + + buf.c_cc[_SYSV_VINTR] = termios_p->c_cc[VINTR]; + buf.c_cc[_SYSV_VQUIT] = termios_p->c_cc[VQUIT]; + buf.c_cc[_SYSV_VERASE] = termios_p->c_cc[VERASE]; + buf.c_cc[_SYSV_VKILL] = termios_p->c_cc[VKILL]; + buf.c_cc[_SYSV_VEOF] = termios_p->c_cc[VEOF]; + buf.c_cc[_SYSV_VEOL] = termios_p->c_cc[VEOL]; + buf.c_cc[_SYSV_VEOL2] = termios_p->c_cc[VEOL2]; + + if (__ioctl (fd, ioctl_function, &buf) < 0) + return -1; + return 0; +} diff -ruN glibc-1.00/sysdeps/unix/sysv/tcsetpgrp.c glibc-1.01/sysdeps/unix/sysv/tcsetpgrp.c --- glibc-1.00/sysdeps/unix/sysv/tcsetpgrp.c +++ glibc-1.01/sysdeps/unix/sysv/tcsetpgrp.c Thu Mar 5 18:45:42 1992 @@ -0,0 +1,30 @@ +/* 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 +#include + +/* Set the foreground process group ID of FD set PGRP_ID. */ +int +DEFUN(tcsetpgrp, (fd, pgrp_id), int fd AND pid_t pgrp_id) +{ + return __ioctl (fd, _TIOCSPGRP, &pgrp_id); +} diff -ruN glibc-1.00/sysdeps/unix/sysv/uname.c glibc-1.01/sysdeps/unix/sysv/uname.c --- glibc-1.00/sysdeps/unix/sysv/uname.c +++ glibc-1.01/sysdeps/unix/sysv/uname.c Thu Mar 5 17:29:57 1992 @@ -0,0 +1,49 @@ +/* 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 +#include + +struct sysv_utsname + { + char sysname[9]; + char nodename[9]; + char release[9]; + char version[9]; + char machine[9]; + }; + +extern int EXFUN (__utssys, (struct sysv_utsname *buf, int dummy, int opcode)); + +/* Put information about the system in NAME. */ +int +DEFUN(uname, (name), struct utsname *name) +{ + struct sysv_utsname buf; + if (__utssys (&buf, 0, 0) < 0) + return -1; + strcpy (name->sysname, buf.sysname); + strcpy (name->nodename, buf.nodename); + strcpy (name->release, buf.release); + strcpy (name->version, buf.version); + strcpy (name->machine, buf.machine); + return 0; +} diff -ruN glibc-1.00/sysdeps/vax/__longjmp.c glibc-1.01/sysdeps/vax/__longjmp.c --- glibc-1.00/sysdeps/vax/__longjmp.c Wed Jun 12 17:48:00 1991 +++ glibc-1.01/sysdeps/vax/__longjmp.c Wed Mar 11 18:09:26 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. @@ -19,6 +19,10 @@ #include #include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif #define REI 02 /* Vax `rei' opcode. */ diff -ruN glibc-1.00/sysdeps/vax/__memccpy.c glibc-1.01/sysdeps/vax/__memccpy.c --- glibc-1.00/sysdeps/vax/__memccpy.c Wed Jun 12 17:48:07 1991 +++ glibc-1.01/sysdeps/vax/__memccpy.c Tue Mar 10 21:34:24 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -22,22 +22,22 @@ /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, - or NULL if C was not found in the first NBYTES bytes of SRC. */ + or NULL if C was not found in the first N bytes of SRC. */ PTR DEFUN(__memccpy, (dest, src, c, n), PTR dest AND CONST PTR src AND int c AND size_t nbytes) { - /* Except when NBYTES > 65535, this is what a hand-coded version would + /* Except when N > 65535, this is what a hand-coded version would do anyway. */ - PTR found = memchr(src, c, n); + PTR found = memchr (src, c, n); if (found == NULL) { - (void) memcpy(dest, src, n); + (void) memcpy (dest, src, n); return NULL; } - (void) memcpy(dest, src, (char *) found + 1 - (char *) src); + (void) memcpy (dest, src, (char *) found + 1 - (char *) src); return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src)); } diff -ruN glibc-1.00/sysdeps/vax/setjmp.c glibc-1.01/sysdeps/vax/setjmp.c --- glibc-1.00/sysdeps/vax/setjmp.c Wed Jun 12 17:48:09 1991 +++ glibc-1.01/sysdeps/vax/setjmp.c Wed Mar 11 18:09:18 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88, Copyright (c) 1980 Regents of the University of California. @@ -19,6 +19,10 @@ #include #include + +#ifndef __GNUC__ + #error This file uses GNU C extensions; you must compile with GCC. +#endif /* Save the current program position in ENV and return 0. */ diff -ruN glibc-1.00/time/Makefile glibc-1.01/time/Makefile --- glibc-1.00/time/Makefile Wed Feb 12 14:49:31 1992 +++ glibc-1.01/time/Makefile Thu Mar 5 16:36:08 1992 @@ -31,7 +31,7 @@ __setitmr tzset gettod setitmr aux := syms-time -others := ap date +others := ap zdump tests := test_time diff -ruN glibc-1.00/time/__tzset.c glibc-1.01/time/__tzset.c --- glibc-1.00/time/__tzset.c Mon Jun 24 20:38:31 1991 +++ glibc-1.01/time/__tzset.c Tue Feb 25 23:26:04 1992 @@ -80,9 +80,22 @@ free((PTR) tz_rules[1].name); tz = getenv("TZ"); + + if (*tz == ':') + { + __tzfile_read(tz + 1); + if (__use_tzfile) + { + tzset_run = 1; + return; + } + else + tz = NULL; + } + if (tz == NULL || *tz == '\0') tz = _time_info->tz; - if (tz == NULL || *tz == '\0' || (tz[0] == ':' && tz[1] == '\0')) + if (tz == NULL || *tz == '\0') { __tzfile_read((char *) NULL); if (!__use_tzfile) @@ -106,16 +119,6 @@ } tzset_run = 1; return; - } - - if (*tz == ':') - { - __tzfile_read(tz + 1); - if (__use_tzfile) - { - tzset_run = 1; - return; - } } /* Get the standard timezone name. */ diff -ruN glibc-1.00/time/date.c glibc-1.01/time/date.c --- glibc-1.00/time/date.c Wed Jun 12 17:48:27 1991 +++ glibc-1.01/time/date.c @@ -1,49 +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 - - -/* Prints the date in the form "Day Mon dd hh:mm:ss ZZZ yyyy\n". - A simple test for localtime and strftime. */ -int -DEFUN(main, (argc, argv), int argc AND char **argv) -{ - time_t t = time(NULL); - register struct tm *tp = localtime(&t); - register char good = tp != NULL; - - if (good) - { - char buf[BUFSIZ]; - good = strftime(buf, sizeof(buf), "%a %b %d %X %Z %Y", tp); - if (good) - puts(buf); - else - perror("strftime"); - } - else - perror("localtime"); - - exit(good ? EXIT_SUCCESS : EXIT_FAILURE); - return(good ? EXIT_SUCCESS : EXIT_FAILURE); -} diff -ruN glibc-1.00/time/mktime.c glibc-1.01/time/mktime.c --- glibc-1.00/time/mktime.c Wed Jun 12 17:48:40 1991 +++ glibc-1.01/time/mktime.c Sat Mar 7 20:34:34 1992 @@ -71,16 +71,38 @@ max.tm_mday = max.tm_mon = max.tm_year = INT_MAX; } - while (tp->tm_mon < 0) - { - --tp->tm_year; - tp->tm_mon += 12; + /* Make all the elements of TP that we pay attention to + be within the ranges of reasonable values for those things. */ +#define normalize(elt, min, max, nextelt) \ + while (tp->elt < min) \ + { \ + --tp->nextelt; \ + tp->elt += max + 1; \ + } \ + while (tp->elt > max) \ + { \ + ++tp->nextelt; \ + tp->elt -= max + 1; \ } - while (tp->tm_mon > 11) - { - ++tp->tm_year; - tp->tm_mon -= 12; - } + + normalize (tm_sec, 0, 59, tm_min); + normalize (tm_min, 0, 59, tm_hour); + normalize (tm_hour, 0, 24, tm_mday); + + /* Normalize the month first so we can use + it to figure the range for the day. */ + normalize (tm_mon, 0, 11, tm_year); + normalize (tm_mday, 1, __mon_lengths[__isleap (tp->tm_year)][tp->tm_mon], + tm_mon); + + /* Normalize the month again, since normalizing + the day may have pushed it out of range. */ + normalize (tm_mon, 0, 11, tm_year); + + /* Normalize the day again, because normalizing + the month may have changed the range. */ + normalize (tm_mday, 1, __mon_lengths[__isleap (tp->tm_year)][tp->tm_mon], + tm_mon); /* Check for out-of-range values. */ #define lowhigh(field, minmax, cmp) (tp->field cmp minmax.field) diff -ruN glibc-1.00/time/setitmr.c glibc-1.01/time/setitmr.c --- glibc-1.00/time/setitmr.c Wed Jun 12 17:48:43 1991 +++ glibc-1.01/time/setitmr.c Thu Feb 27 14:49:26 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -26,5 +26,5 @@ function_alias(setitimer, __setitimer, int, (which, old, new), DEFUN(setitimer, (which, old, new), - enum __itimer_which __which AND + enum __itimer_which which AND struct itimerval *old AND struct itimerval *new)) diff -ruN glibc-1.00/time/syms-time.c glibc-1.01/time/syms-time.c --- glibc-1.00/time/syms-time.c Wed Jun 12 17:48:49 1991 +++ glibc-1.01/time/syms-time.c Sun Mar 8 15:47:51 1992 @@ -16,7 +16,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __GNU_STAB__ +#ifdef HAVE_GNU_LD #include #include diff -ruN glibc-1.00/time/time.h glibc-1.01/time/time.h --- glibc-1.00/time/time.h Wed Jun 26 17:28:59 1991 +++ glibc-1.01/time/time.h Sat Mar 7 20:10:15 1992 @@ -74,13 +74,13 @@ /* Used by other time functions. */ struct tm { - int tm_sec; /* Seconds. [0-60] */ - int tm_min; /* Minutes. [0-59] */ - int tm_hour; /* Hours. [0-23] */ - int tm_mday; /* Day. [1-31] */ - int tm_mon; /* Month. [0-11] */ - int tm_year; /* Year - 1900. */ - int tm_wday; /* Day of week. [0-6] */ + int tm_sec; /* Seconds. [0-61] (2 leap seconds) */ + int tm_min; /* Minutes. [0-59] */ + int tm_hour; /* Hours. [0-23] */ + int tm_mday; /* Day. [1-31] */ + int tm_mon; /* Month. [0-11] */ + int tm_year; /* Year - 1900. */ + int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ }; @@ -175,9 +175,9 @@ /* Nonzero if YEAR is a leap year (every 4 years, - except every 100th isn't, and every 1000th is). */ + except every 100th isn't, and every 400th is). */ #define __isleap(year) \ - ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 1000 == 0)) + ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #endif /* included. */ diff -ruN glibc-1.00/time/tzfile.c glibc-1.01/time/tzfile.c --- glibc-1.00/time/tzfile.c Tue Feb 18 19:39:43 1992 +++ glibc-1.01/time/tzfile.c Tue Mar 10 23:16:16 1992 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. +/* 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 @@ -191,17 +191,23 @@ i = 0; while (i < num_transitions && transitions[i] < timer) ++i; - if (i == num_transitions) - i = 0; + + if (i == 0) + { + /* TIMER is before any transition. + Choose the first non-DST type. */ + while (i < num_types && types[i].isdst) + ++i; + info = &types[i]; + } else - --i; + info = &types[type_idxs[i - 1]]; - info = &types[type_idxs[i]]; - __daylight = info->isdst != 0; + __daylight = info->isdst; __timezone = info->offset; - __tzname[0] = &zone_names[types[0].idx]; - if (num_types > 0) - __tzname[1] = &zone_names[types[1].idx]; + for (i = 0; i < num_types && i < sizeof (__tzname) / sizeof (__tzname[0]); + ++i) + __tzname[types[i].isdst] = &zone_names[types[i].idx]; i = num_leaps; do diff -ruN glibc-1.00/time/zdump.c glibc-1.01/time/zdump.c --- glibc-1.00/time/zdump.c +++ glibc-1.01/time/zdump.c Thu Mar 5 16:38:03 1992 @@ -0,0 +1,282 @@ +#ifdef LIBC +#include +#endif + +#ifndef lint +#ifndef NOID +static char elsieid[] = "@(#)zdump.c 7.2"; +#endif /* !defined NOID */ +#endif /* !defined lint */ + +/* +** This code has been made independent of the rest of the time +** conversion package to increase confidence in the verification it provides. +** You can use this code to help in verifying other implementations. +*/ + +#include /* for stdout, stderr */ +#include /* for strcpy */ +#include /* for time_t */ +#include /* for struct tm */ + +#ifndef MAX_STRING_LENGTH +#define MAX_STRING_LENGTH 1024 +#endif /* !defined MAX_STRING_LENGTH */ + +#ifndef TRUE +#define TRUE 1 +#endif /* !defined TRUE */ + +#ifndef FALSE +#define FALSE 0 +#endif /* !defined FALSE */ + +#ifndef EXIT_SUCCESS +#define EXIT_SUCCESS 0 +#endif /* !defined EXIT_SUCCESS */ + +#ifndef EXIT_FAILURE +#define EXIT_FAILURE 1 +#endif /* !defined EXIT_FAILURE */ + +#ifndef SECSPERMIN +#define SECSPERMIN 60 +#endif /* !defined SECSPERMIN */ + +#ifndef SECSPERHOUR +#define SECSPERHOUR 3600 +#endif /* !defined SECSPERHOUR */ + +#ifndef HOURSPERDAY +#define HOURSPERDAY 24 +#endif /* !defined HOURSPERDAY */ + +#ifndef EPOCH_YEAR +#define EPOCH_YEAR 1970 +#endif /* !defined EPOCH_YEAR */ + +#ifndef DAYSPERNYEAR +#define DAYSPERNYEAR 365 +#endif /* !defined DAYSPERNYEAR */ + +extern char ** environ; +extern int getopt(); +extern char * optarg; +extern int optind; +extern time_t time(); +extern char * tzname[2]; +extern void tzset(); + +#ifdef USG +extern void exit(); +extern void perror(); +#endif /* defined USG */ + +static char * abbr(); +static long delta(); +static void hunt(); +static int longest; +static char * progname; +static void show(); + +int +main(argc, argv) +int argc; +char * argv[]; +{ + register int i, c; + register int vflag; + register char * cutoff; + register int cutyear; + register long cuttime; + time_t now; + time_t t, newt; + time_t hibit; + struct tm tm, newtm; + + progname = argv[0]; + vflag = 0; + cutoff = NULL; + while ((c = getopt(argc, argv, "c:v")) == 'c' || c == 'v') + if (c == 'v') + 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); + } + if (cutoff != NULL) + cutyear = atoi(cutoff); + /* + ** VERY approximate. + */ + cuttime = (long) (cutyear - EPOCH_YEAR) * + SECSPERHOUR * HOURSPERDAY * DAYSPERNYEAR; + (void) time(&now); + longest = 0; + for (i = optind; i < argc; ++i) + if (strlen(argv[i]) > longest) + longest = strlen(argv[i]); + for (hibit = 1; (hibit << 1) != 0; hibit <<= 1) + ; + for (i = optind; i < argc; ++i) { + register char ** saveenv; + static char buf[MAX_STRING_LENGTH]; + char * fakeenv[2]; + + if (strlen(argv[i]) + 4 > sizeof buf) { + (void) fflush(stdout); + (void) fprintf(stderr, "%s: argument too long -- %s\n", + progname, argv[i]); + (void) exit(EXIT_FAILURE); + } + (void) strcpy(buf, "TZ="); + (void) strcat(buf, argv[i]); + fakeenv[0] = buf; + fakeenv[1] = NULL; + saveenv = environ; + environ = fakeenv; + (void) tzset(); + environ = saveenv; + show(argv[i], now, FALSE); + if (!vflag) + continue; + /* + ** Get lowest value of t. + */ + t = hibit; + if (t > 0) /* time_t is unsigned */ + t = 0; + show(argv[i], t, TRUE); + t += SECSPERHOUR * HOURSPERDAY; + show(argv[i], t, TRUE); + tm = *localtime(&t); + (void) strncpy(buf, abbr(&tm), (sizeof buf) - 1); + for ( ; ; ) { + if (cutoff != NULL && t >= cuttime) + break; + newt = t + SECSPERHOUR * 12; + if (cutoff != NULL && newt >= cuttime) + break; + if (newt <= t) + break; + newtm = *localtime(&newt); + if (delta(&newtm, &tm) != (newt - t) || + newtm.tm_isdst != tm.tm_isdst || + strcmp(abbr(&newtm), buf) != 0) { + hunt(argv[i], t, newt); + (void) strncpy(buf, abbr(&newtm), + (sizeof buf) - 1); + } + t = newt; + tm = newtm; + } + /* + ** Get highest value of t. + */ + t = ~((time_t) 0); + if (t < 0) /* time_t is signed */ + t &= ~hibit; + t -= SECSPERHOUR * HOURSPERDAY; + show(argv[i], t, TRUE); + t += SECSPERHOUR * HOURSPERDAY; + show(argv[i], t, TRUE); + } + if (fflush(stdout) || ferror(stdout)) { + (void) fprintf(stderr, "%s: Error writing standard output ", + argv[0]); + (void) perror("standard output"); + (void) exit(EXIT_FAILURE); + } + exit(EXIT_SUCCESS); + + /* gcc -Wall pacifier */ + for ( ; ; ) + ; +} + +static void +hunt(name, lot, hit) +char * name; +time_t lot; +time_t hit; +{ + time_t t; + struct tm lotm; + struct tm tm; + static char loab[MAX_STRING_LENGTH]; + + lotm = *localtime(&lot); + (void) strncpy(loab, abbr(&lotm), (sizeof loab) - 1); + while ((hit - lot) >= 2) { + t = lot / 2 + hit / 2; + if (t <= lot) + ++t; + else if (t >= hit) + --t; + tm = *localtime(&t); + if (delta(&tm, &lotm) == (t - lot) && + tm.tm_isdst == lotm.tm_isdst && + strcmp(abbr(&tm), loab) == 0) { + lot = t; + lotm = tm; + } else hit = t; + } + show(name, lot, TRUE); + show(name, hit, TRUE); +} + +static long +delta(newp, oldp) +struct tm * newp; +struct tm * oldp; +{ + long result; + + 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; +} + +static void +show(zone, t, v) +char * zone; +time_t t; +int v; +{ + struct tm * tmp; + extern struct tm * localtime(); + + (void) printf("%-*s ", longest, zone); + if (v) + (void) printf("%.24s GMT = ", asctime(gmtime(&t))); + tmp = localtime(&t); + (void) printf("%.24s", asctime(tmp)); + if (*abbr(tmp) != '\0') + (void) printf(" %s", abbr(tmp)); + if (v) { + (void) printf(" isdst=%d", tmp->tm_isdst); +#ifdef TM_GMTOFF + (void) printf(" gmtoff=%ld", tmp->TM_GMTOFF); +#endif /* defined TM_GMTOFF */ + } + (void) printf("\n"); +} + +static char * +abbr(tmp) +struct tm * tmp; +{ + register char * result; + + if (tmp->tm_isdst != 0 && tmp->tm_isdst != 1) + return ""; + result = tzname[tmp->tm_isdst]; + return (result == NULL) ? "" : result; +} diff -ruN glibc-1.00/version.c glibc-1.01/version.c --- glibc-1.00/version.c Tue Feb 18 19:59:31 1992 +++ glibc-1.01/version.c Wed Mar 11 20:14:14 1992 @@ -20,7 +20,7 @@ #include CONST char __libc_release[] = "beta"; -CONST char __libc_version[] = "1.00"; +CONST char __libc_version[] = "1.01"; void DEFUN_VOID(__libc_print_version)