]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update. cvs/libc-ud-971122
authorUlrich Drepper <drepper@redhat.com>
Sat, 22 Nov 1997 18:49:27 +0000 (18:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 22 Nov 1997 18:49:27 +0000 (18:49 +0000)
1997-11-22 19:28  Ulrich Drepper  <drepper@cygnus.com>

* iconv/gconv_simple.c: Fix lots of bugs.
* iconv/iconv_open.c: Normalize names before passing them to
__gconv_open.

* libio/iolibio.h: Add prototypes for _IO_{new,old}_fclose.

* libio/iopopen.c: Check for correct mode argument and punt otherwise.
* stdio-common/test-popen.c: Add test for above change.

* math/libm-test.c: Print test results also using %a format,
specified in PRINTF_XEXPR macro.
* math/test-double.c: Define PRINTF_XEXPR.
* math/test-float.c: Likewise.
* math/test-ldouble.c: Likewise.
* math/test-idouble.c: Likewise.
* math/test-ifloat.c: Likewise.
* math/test-ildoubl.c: Likewise.

* stdio-common/vfscanf.c: Recognize a in format specifier only as
modifier if used before s, S, or [.  Otherwise it's the hexadecimal
FP number format.

* stdlib/strtod.c: Little code cleanup.

* sysdeps/i386/Makefile: Define __LIBC_INTERNAL_MATH_INLINES for
compiling in math subdir.

* sysdeps/m68k/fpu/e_acos.c: Define __LIBC_INTERNAL_MATH_INLINES
instead of __LIBC_M81_MATH_INLINES.
* sysdeps/m68k/fpu/e_atan2.c: Likewise.
* sysdeps/m68k/fpu/e_fmod.c: Likewise.
* sysdeps/m68k/fpu/e_pow.c: Likewise.
* sysdeps/m68k/fpu/e_scalb.c: Likewise.
* sysdeps/m68k/fpu/k_cos.c: Likewise.
* sysdeps/m68k/fpu/k_sin.c: Likewise.
* sysdeps/m68k/fpu/k_tan.c: Likewise.
* sysdeps/m68k/fpu/s_atan.c: Likewise.
* sysdeps/m68k/fpu/s_ccos.c: Likewise.
* sysdeps/m68k/fpu/s_ccosh.c: Likewise.
* sysdeps/m68k/fpu/s_cexp.c: Likewise.
* sysdeps/m68k/fpu/s_csin.c: Likewise.
* sysdeps/m68k/fpu/s_csinh.c: Likewise.
* sysdeps/m68k/fpu/s_frexp.c: Likewise.
* sysdeps/m68k/fpu/s_ilogb.c: Likewise.
* sysdeps/m68k/fpu/s_isinf.c: Likewise.
* sysdeps/m68k/fpu/s_llrint.c: Likewise.
* sysdeps/m68k/fpu/s_llrintf.c: Likewise.
* sysdeps/m68k/fpu/s_llrintl.c: Likewise.
* sysdeps/m68k/fpu/s_lrint.c: Likewise.
* sysdeps/m68k/fpu/s_modf.c: Likewise.
* sysdeps/m68k/fpu/s_remquo.c: Likewise.
* sysdeps/m68k/fpu/s_scalbn.c: Likewise.
* sysdeps/m68k/fpu/s_sincos.c: Likewise.
* sysdeps/m68k/fpu/bits/mathinline.h: Define optimizations if
__LIBC_INTERNAL_MATH_INLINES is defined.

* sysdeps/i386/fpu/bits/mathinline.h: Define special i686 versions
of compare macros from ISO C 9X.  Optimize generic versions a bit.
Define __signbit inline functions and __ieee754_sqrt which can be
used if the ompiler is fixed.

* sysdeps/posix/sysv_signal.c: Define sysv_signal as weak alias.

1997-11-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* Makerules ($(common-objpfx)stub-$(subdir)): Look for
sysdeps/generic in the whole dep file, not only in the first line.

1997-11-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* sysdeps/ieee754/bits/nan.h (__nan) [!__GNUC__]: Fix type.

1997-11-19  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* manual/arith.texi (Imaginary Unit): Move @end deftypevr to right
place.

1997-11-19  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* elf/dl-error.c (_dl_signal_error): Only print colon if OBJNAME
is non-empty.

1997-11-20 16:51  Ulrich Drepper  <drepper@cygnus.com>

* malloc/malloc.c (malloc_update_mallinfo): Initialize struct for
return value.

1997-11-19 21:36  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/unix/sysv/linux/getcwd.c: Free allocated buffer if
readlink succeeds but the return value is too long.

* stdio-common/printf_fphex.c: Determine sign of number correctly.

1997-11-19 02:45  Ulrich Drepper  <drepper@cygnus.com>

* libc.map: Export __divl, __reml, __divq, __remq, __divqu and
__remqu for Alpha.

1997-11-18 23:08  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/generic/sys/ucontext.h: Stub context file.

* libio/iofprintf.c: Removed.  We use the stdio-common version.

* manual/Makefile (distribute): Add stdio-fp.c.

* sysdeps/powerpc/Dist: Add ppc-mcount.S.

* db2/Makefile (distribute): Add include/os_func.h, README and
mutex/tsl_parisc.s.

* hesiod/Makefile (distribute): Add README.hesiod.

1997-11-18 22:14  Ulrich Drepper  <drepper@cygnus.com>

* iconv/gconv.c: Correctly call transformation function.

* manual/maint.texi: Document need of binutils 2.8.1.0.17.

1997-11-13  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* sysdeps/libm-ieee754/s_remquo.c (__remquo): Fix function (gave
wrong results for e.g. remquo (3,2, &x)).
* sysdeps/libm-ieee754/s_remquof.c (__remquof): Likewise.
* sysdeps/libm-ieee754/s_remquol.c (__remquol): Likewise.

1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* configure.in (ld --version-script): Test if the same symbol
maybe defined in all versions (needed by recent changes to
libc.map and supported with binutils 2.8.1.0.17) and issue warning
if versioning is not supported/enabled.
(bash test): Correct test case.

* math/libm-test.c: Added counting/reporting of number of test cases.

* elf/Makefile ($(objpfx)rtldtbl.h): gawk is not longer required,
use awk instead.

* sysdeps/unix/sysv/linux/net/if.h: Add __BEGIN_DECLS/__END_DECLS.

1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* elf/dl-load.c (_dl_init_paths): Correct __mempcpy logic.

1997-11-18 18:04  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/generic/pty.c: Define REVOKE to use revoke function.
Replace revoke call by use of REVOKE.
* sysdeps/unix/sysv/linux/pty.c: New file.  Define REVOKE as
empty and #include generic version.
Suggested by Zack Weinberg <zack@rabi.phys.columbia.edu>.

1997-11-18 16:02  Ulrich Drepper  <drepper@cygnus.com>

* libc.map: Add socket functions with __libc_* names.
Reported by Andreas Jaeger.

1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* libc.map: Tidy up (remove duplicates, sort entries).

1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* iconv/gconv.h: Add __BEGIN_DECLS/__END_DECLS.

1997-11-18 06:45  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/generic/pty.c: Make thread safe.  Fix bug when calling
again after successful call.
Patch by Marc Lehmann <pcg@goof.com>.

1997-11-17  Paul Eggert  <eggert@twinsun.com>

* time/mktime.c, time/strftime.c (_REENTRANT): #define,
as some hosts need this to declare localtime_r properly.

1997-11-18 06:08  Ulrich Drepper  <drepper@cygnus.com>

* libc.map: Add iconv_open, iconv, and iconv_close.

75 files changed:
ChangeLog
Makerules
README
config.sub
configure
configure.in
db2/Makefile
elf/Makefile
elf/dl-error.c
elf/dl-load.c
hesiod/Makefile
iconv/gconv.c
iconv/gconv.h
iconv/gconv_simple.c
iconv/iconv_open.c
libc.map
libio/iofprintf.c [deleted file]
libio/iolibio.h
libio/iopopen.c
malloc/malloc.c
manual/Makefile
manual/arith.texi
manual/maint.texi
math/libm-test.c
math/test-double.c
math/test-float.c
math/test-idouble.c
math/test-ifloat.c
math/test-ildoubl.c
math/test-ldouble.c
stdio-common/printf_fphex.c
stdio-common/test-popen.c
stdio-common/vfscanf.c
stdlib/strtod.c
sysdeps/generic/pty.c
sysdeps/generic/sys/ucontext.h [new file with mode: 0644]
sysdeps/i386/Makefile
sysdeps/i386/fpu/bits/mathinline.h
sysdeps/ieee754/bits/nan.h
sysdeps/libm-ieee754/s_remquo.c
sysdeps/libm-ieee754/s_remquof.c
sysdeps/libm-ieee754/s_remquol.c
sysdeps/m68k/fpu/bits/mathinline.h
sysdeps/m68k/fpu/e_acos.c
sysdeps/m68k/fpu/e_atan2.c
sysdeps/m68k/fpu/e_fmod.c
sysdeps/m68k/fpu/e_pow.c
sysdeps/m68k/fpu/e_scalb.c
sysdeps/m68k/fpu/k_cos.c
sysdeps/m68k/fpu/k_sin.c
sysdeps/m68k/fpu/k_tan.c
sysdeps/m68k/fpu/s_atan.c
sysdeps/m68k/fpu/s_ccos.c
sysdeps/m68k/fpu/s_ccosh.c
sysdeps/m68k/fpu/s_cexp.c
sysdeps/m68k/fpu/s_csin.c
sysdeps/m68k/fpu/s_csinh.c
sysdeps/m68k/fpu/s_frexp.c
sysdeps/m68k/fpu/s_ilogb.c
sysdeps/m68k/fpu/s_isinf.c
sysdeps/m68k/fpu/s_llrint.c
sysdeps/m68k/fpu/s_llrintf.c
sysdeps/m68k/fpu/s_llrintl.c
sysdeps/m68k/fpu/s_lrint.c
sysdeps/m68k/fpu/s_modf.c
sysdeps/m68k/fpu/s_remquo.c
sysdeps/m68k/fpu/s_scalbn.c
sysdeps/m68k/fpu/s_sincos.c
sysdeps/posix/sysv_signal.c
sysdeps/powerpc/Dist
sysdeps/unix/sysv/linux/getcwd.c
sysdeps/unix/sysv/linux/net/if.h
sysdeps/unix/sysv/linux/pty.c [new file with mode: 0644]
time/mktime.c
time/strftime.c

index f373576dc738b222126ea93a37c4a34e666bdaf4..d18f75fa3904dad084a6fa76fd9cc5dbb13e4a08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,187 @@
+1997-11-22 19:28  Ulrich Drepper  <drepper@cygnus.com>
+
+       * iconv/gconv_simple.c: Fix lots of bugs.
+       * iconv/iconv_open.c: Normalize names before passing them to
+       __gconv_open.
+
+       * libio/iolibio.h: Add prototypes for _IO_{new,old}_fclose.
+
+       * libio/iopopen.c: Check for correct mode argument and punt otherwise.
+       * stdio-common/test-popen.c: Add test for above change.
+
+       * math/libm-test.c: Print test results also using %a format,
+       specified in PRINTF_XEXPR macro.
+       * math/test-double.c: Define PRINTF_XEXPR.
+       * math/test-float.c: Likewise.
+       * math/test-ldouble.c: Likewise.
+       * math/test-idouble.c: Likewise.
+       * math/test-ifloat.c: Likewise.
+       * math/test-ildoubl.c: Likewise.
+
+       * stdio-common/vfscanf.c: Recognize a in format specifier only as
+       modifier if used before s, S, or [.  Otherwise it's the hexadecimal
+       FP number format.
+
+       * stdlib/strtod.c: Little code cleanup.
+
+       * sysdeps/i386/Makefile: Define __LIBC_INTERNAL_MATH_INLINES for
+       compiling in math subdir.
+
+       * sysdeps/m68k/fpu/e_acos.c: Define __LIBC_INTERNAL_MATH_INLINES
+       instead of __LIBC_M81_MATH_INLINES.
+       * sysdeps/m68k/fpu/e_atan2.c: Likewise.
+       * sysdeps/m68k/fpu/e_fmod.c: Likewise.
+       * sysdeps/m68k/fpu/e_pow.c: Likewise.
+       * sysdeps/m68k/fpu/e_scalb.c: Likewise.
+       * sysdeps/m68k/fpu/k_cos.c: Likewise.
+       * sysdeps/m68k/fpu/k_sin.c: Likewise.
+       * sysdeps/m68k/fpu/k_tan.c: Likewise.
+       * sysdeps/m68k/fpu/s_atan.c: Likewise.
+       * sysdeps/m68k/fpu/s_ccos.c: Likewise.
+       * sysdeps/m68k/fpu/s_ccosh.c: Likewise.
+       * sysdeps/m68k/fpu/s_cexp.c: Likewise.
+       * sysdeps/m68k/fpu/s_csin.c: Likewise.
+       * sysdeps/m68k/fpu/s_csinh.c: Likewise.
+       * sysdeps/m68k/fpu/s_frexp.c: Likewise.
+       * sysdeps/m68k/fpu/s_ilogb.c: Likewise.
+       * sysdeps/m68k/fpu/s_isinf.c: Likewise.
+       * sysdeps/m68k/fpu/s_llrint.c: Likewise.
+       * sysdeps/m68k/fpu/s_llrintf.c: Likewise.
+       * sysdeps/m68k/fpu/s_llrintl.c: Likewise.
+       * sysdeps/m68k/fpu/s_lrint.c: Likewise.
+       * sysdeps/m68k/fpu/s_modf.c: Likewise.
+       * sysdeps/m68k/fpu/s_remquo.c: Likewise.
+       * sysdeps/m68k/fpu/s_scalbn.c: Likewise.
+       * sysdeps/m68k/fpu/s_sincos.c: Likewise.
+       * sysdeps/m68k/fpu/bits/mathinline.h: Define optimizations if
+       __LIBC_INTERNAL_MATH_INLINES is defined.
+
+       * sysdeps/i386/fpu/bits/mathinline.h: Define special i686 versions
+       of compare macros from ISO C 9X.  Optimize generic versions a bit.
+       Define __signbit inline functions and __ieee754_sqrt which can be
+       used if the ompiler is fixed.
+
+       * sysdeps/posix/sysv_signal.c: Define sysv_signal as weak alias.
+
+1997-11-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * Makerules ($(common-objpfx)stub-$(subdir)): Look for
+       sysdeps/generic in the whole dep file, not only in the first line.
+
+1997-11-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * sysdeps/ieee754/bits/nan.h (__nan) [!__GNUC__]: Fix type.
+
+1997-11-19  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * manual/arith.texi (Imaginary Unit): Move @end deftypevr to right
+       place.
+
+1997-11-19  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elf/dl-error.c (_dl_signal_error): Only print colon if OBJNAME
+       is non-empty.
+
+1997-11-20 16:51  Ulrich Drepper  <drepper@cygnus.com>
+
+       * malloc/malloc.c (malloc_update_mallinfo): Initialize struct for
+       return value.
+
+1997-11-19 21:36  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/unix/sysv/linux/getcwd.c: Free allocated buffer if
+       readlink succeeds but the return value is too long.
+
+       * stdio-common/printf_fphex.c: Determine sign of number correctly.
+
+1997-11-19 02:45  Ulrich Drepper  <drepper@cygnus.com>
+
+       * libc.map: Export __divl, __reml, __divq, __remq, __divqu and
+       __remqu for Alpha.
+
+1997-11-18 23:08  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/generic/sys/ucontext.h: Stub context file.
+
+       * libio/iofprintf.c: Removed.  We use the stdio-common version.
+
+       * manual/Makefile (distribute): Add stdio-fp.c.
+
+       * sysdeps/powerpc/Dist: Add ppc-mcount.S.
+
+       * db2/Makefile (distribute): Add include/os_func.h, README and
+       mutex/tsl_parisc.s.
+
+       * hesiod/Makefile (distribute): Add README.hesiod.
+
+1997-11-18 22:14  Ulrich Drepper  <drepper@cygnus.com>
+
+       * iconv/gconv.c: Correctly call transformation function.
+
+       * manual/maint.texi: Document need of binutils 2.8.1.0.17.
+
+1997-11-13  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * sysdeps/libm-ieee754/s_remquo.c (__remquo): Fix function (gave
+       wrong results for e.g. remquo (3,2, &x)).
+       * sysdeps/libm-ieee754/s_remquof.c (__remquof): Likewise.
+       * sysdeps/libm-ieee754/s_remquol.c (__remquol): Likewise.
+
+1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * configure.in (ld --version-script): Test if the same symbol
+       maybe defined in all versions (needed by recent changes to
+       libc.map and supported with binutils 2.8.1.0.17) and issue warning
+       if versioning is not supported/enabled.
+       (bash test): Correct test case.
+
+       * math/libm-test.c: Added counting/reporting of number of test cases.
+
+       * elf/Makefile ($(objpfx)rtldtbl.h): gawk is not longer required,
+       use awk instead.
+
+       * sysdeps/unix/sysv/linux/net/if.h: Add __BEGIN_DECLS/__END_DECLS.
+
+1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * elf/dl-load.c (_dl_init_paths): Correct __mempcpy logic.
+
+1997-11-18 18:04  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/generic/pty.c: Define REVOKE to use revoke function.
+       Replace revoke call by use of REVOKE.
+       * sysdeps/unix/sysv/linux/pty.c: New file.  Define REVOKE as
+       empty and #include generic version.
+       Suggested by Zack Weinberg <zack@rabi.phys.columbia.edu>.
+
+1997-11-18 16:02  Ulrich Drepper  <drepper@cygnus.com>
+
+       * libc.map: Add socket functions with __libc_* names.
+       Reported by Andreas Jaeger.
+
+1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * libc.map: Tidy up (remove duplicates, sort entries).
+
+1997-11-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * iconv/gconv.h: Add __BEGIN_DECLS/__END_DECLS.
+
+1997-11-18 06:45  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/generic/pty.c: Make thread safe.  Fix bug when calling
+       again after successful call.
+       Patch by Marc Lehmann <pcg@goof.com>.
+
+1997-11-17  Paul Eggert  <eggert@twinsun.com>
+
+       * time/mktime.c, time/strftime.c (_REENTRANT): #define,
+       as some hosts need this to declare localtime_r properly.
+
+1997-11-18 06:08  Ulrich Drepper  <drepper@cygnus.com>
+
+       * libc.map: Add iconv_open, iconv, and iconv_close.
+
 1997-11-18 02:31  Ulrich Drepper  <drepper@cygnus.com>
 
        * iconv/Makefile: New file.
index b9c89a5a3e217110bb6ed94448f50b2ad48b2434..53fa726aec2dba5939a17276028d2597fe22e9d0 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -910,7 +910,7 @@ $(common-objpfx)stub-$(subdir): $(+depfiles)
        (s=`cd $s; /bin/pwd`; \
         $(patsubst %/,cd %;,$(objpfx)) \
         sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
-         `sed -n -e '\@: $s@{; s@^.*: $s/\([a-z0-9_./-]*\.c\).*$$@'"$$s"'/\1@; h; }' \
+         `sed -n -e '\@ $s/[^ ]*\.c@{; s@^.* $s/\([^ ]*\.c\).*$$@'"$$s"'/\1@; h; }' \
                -e '/stub-tag\.h/{; g; p; }' \
                  $(patsubst $(objpfx)%,%,$^) /dev/null` \
             /dev/null) > $@T
diff --git a/README b/README
index d3439ed84bd624889f8e1523e1bbfd3aeac70cec..755d4ec667433584bd95063ee139ec8297898cd6 100644 (file)
--- a/README
+++ b/README
@@ -80,7 +80,7 @@ in the GNU C library, explaining how you can tell the library what
 facilities you want it to make available.
 
 We prefer to get bug reports sent using the `glibcbug' shell script which
-is install together with the rest of the GNU libc to <bugs@gnu.ai.mit.edu>.
+is install together with the rest of the GNU libc to <bugs@gnu.org>.
 Simply run this shell script and fill in the information.  Nevertheless
 you can still send bug reports to <bug-glibc@prep.ai.mit.edu> as normal
 electronic mails.
index dacb4bde689cc362c5d306aadb803011878da98f..213a6d47d67831d733d74e11867cd473c7cfb635 100755 (executable)
@@ -171,7 +171,7 @@ case $basic_machine in
                exit 1
                ;;
        # Recognize the basic CPU types with company name.
-       vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
+       vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
              | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
index 31e30b073921d86009691a568fecc177b372c6f2..0fffa4b7fbae14c4fa121320ac7ed59042867dda 100755 (executable)
--- a/configure
+++ b/configure
@@ -1636,7 +1636,7 @@ else
 fi
 
 if test "$BASH" != no &&
-   $BASH -c 'test "$BASH_VERSINFO"
+   $BASH -c 'test "$BASH_VERSINFO" \
             && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then
   libc_cv_have_bash2=yes
 else
@@ -1946,15 +1946,19 @@ _sym:
 .symver _sym,sym@VERS
 EOF
   cat > conftest.map <<EOF
-VERS {
+VERS_1 {
        global: sym;
 };
+
+VERS_2 {
+        global: sym;
+} VERS_1;
 EOF
   if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&5 2>&5; then
     if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
                                        -nostartfiles -nostdlib
                                        -Wl,--version-script,conftest.map
-                      1>&5'; { (eval echo configure:1958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
+                      1>&5'; { (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
     then
       libc_cv_ld_version_script_option=yes
     else
@@ -1983,9 +1987,16 @@ else
 fi
 
 
+if test $VERSIONING = no; then
+  echo "\
+*** WARNING: You should not compile GNU libc without versioning. Not using 
+*** versioning will introduce incompatibilities so that old binaries
+*** will not run anymore.
+*** For versioning you need recent binutils (binutils-2.8.1.0.17 or newer)."
+fi
 if test $elf = yes; then
   echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
-echo "configure:1989: checking for .previous assembler directive" >&5
+echo "configure:2000: checking for .previous assembler directive" >&5
 if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1993,7 +2004,7 @@ else
 .section foo_section
 .previous
 EOF
-  if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+  if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
     libc_cv_asm_previous_directive=yes
   else
     libc_cv_asm_previous_directive=no
@@ -2009,7 +2020,7 @@ EOF
 
   else
     echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
-echo "configure:2013: checking for .popsection assembler directive" >&5
+echo "configure:2024: checking for .popsection assembler directive" >&5
 if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2017,7 +2028,7 @@ else
 .pushsection foo_section
 .popsection
 EOF
-    if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+    if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
       libc_cv_asm_popsection_directive=yes
     else
       libc_cv_asm_popsection_directive=no
@@ -2037,12 +2048,12 @@ fi
 
 if test $elf != yes; then
   echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
-echo "configure:2041: checking for .init and .fini sections" >&5
+echo "configure:2052: checking for .init and .fini sections" >&5
 if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2046 "configure"
+#line 2057 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2051,7 +2062,7 @@ asm (".section .init");
                                    asm (".text");
 ; return 0; }
 EOF
-if { (eval echo configure:2055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   libc_cv_have_initfini=yes
 else
@@ -2079,19 +2090,19 @@ if test $elf = yes; then
 else
   if test $ac_cv_prog_cc_works = yes; then
     echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
-echo "configure:2083: checking for _ prefix on C symbol names" >&5
+echo "configure:2094: checking for _ prefix on C symbol names" >&5
 if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2088 "configure"
+#line 2099 "configure"
 #include "confdefs.h"
 asm ("_glibc_foobar:");
 int main() {
 glibc_foobar ();
 ; return 0; }
 EOF
-if { (eval echo configure:2095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   libc_cv_asm_underscores=yes
 else
@@ -2106,17 +2117,17 @@ fi
 echo "$ac_t""$libc_cv_asm_underscores" 1>&6
   else
     echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
-echo "configure:2110: checking for _ prefix on C symbol names" >&5
+echo "configure:2121: checking for _ prefix on C symbol names" >&5
 if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2115 "configure"
+#line 2126 "configure"
 #include "confdefs.h"
 void underscore_test(void) {
 return; }
 EOF
-if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   if grep _underscore_test conftest* >/dev/null; then
     rm -f conftest*
     libc_cv_asm_underscores=yes
@@ -2149,7 +2160,7 @@ if test $elf = yes; then
   libc_cv_asm_weakext_directive=no
 else
   echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
-echo "configure:2153: checking for assembler .weak directive" >&5
+echo "configure:2164: checking for assembler .weak directive" >&5
 if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2172,7 +2183,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
 
 if test $libc_cv_asm_weak_directive = no; then
   echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
-echo "configure:2176: checking for assembler .weakext directive" >&5
+echo "configure:2187: checking for assembler .weakext directive" >&5
 if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2209,7 +2220,7 @@ EOF
 fi
 
 echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
-echo "configure:2213: checking for ld --no-whole-archive" >&5
+echo "configure:2224: checking for ld --no-whole-archive" >&5
 if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2220,7 +2231,7 @@ __throw () {}
 EOF
 if { ac_try='${CC-cc} $CFLAGS
                            -nostdlib -nostartfiles -Wl,--no-whole-archive
-                           -o conftest conftest.c 1>&5'; { (eval echo configure:2224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+                           -o conftest conftest.c 1>&5'; { (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
   libc_cv_ld_no_whole_archive=yes
 else
   libc_cv_ld_no_whole_archive=no
@@ -2231,7 +2242,7 @@ fi
 echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
 
 echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
-echo "configure:2235: checking for gcc -fno-exceptions" >&5
+echo "configure:2246: checking for gcc -fno-exceptions" >&5
 if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2242,7 +2253,7 @@ __throw () {}
 EOF
 if { ac_try='${CC-cc} $CFLAGS
                            -nostdlib -nostartfiles -fno-exceptions
-                           -o conftest conftest.c 1>&5'; { (eval echo configure:2246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+                           -o conftest conftest.c 1>&5'; { (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
   libc_cv_gcc_no_exceptions=yes
 else
   libc_cv_gcc_no_exceptions=no
@@ -2253,12 +2264,12 @@ fi
 echo "$ac_t""$libc_cv_gcc_no_exceptions" 1>&6
 
 echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6
-echo "configure:2257: checking for DWARF2 unwind info support" >&5
+echo "configure:2268: checking for DWARF2 unwind info support" >&5
 if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.c <<EOF
-#line 2262 "configure"
+#line 2273 "configure"
 static char __EH_FRAME_BEGIN__;
 _start ()
 {
@@ -2279,7 +2290,7 @@ __bzero () {}
 EOF
 if { ac_try='${CC-cc} $CFLAGS
                            -nostdlib -nostartfiles
-                           -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+                           -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
   libc_cv_gcc_dwarf2_unwind_info=yes
 else
   libc_cv_gcc_dwarf2_unwind_info=no
@@ -2337,7 +2348,7 @@ if test "$uname" = "sysdeps/generic"; then
   fi
 
   echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
-echo "configure:2341: checking OS release for uname" >&5
+echo "configure:2352: checking OS release for uname" >&5
 if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2359,7 +2370,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
   uname_release="$libc_cv_uname_release"
 
   echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
-echo "configure:2363: checking OS version for uname" >&5
+echo "configure:2374: checking OS version for uname" >&5
 if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2381,7 +2392,7 @@ else
 fi
 
 echo $ac_n "checking stdio selection""... $ac_c" 1>&6
-echo "configure:2385: checking stdio selection" >&5
+echo "configure:2396: checking stdio selection" >&5
 
 case $stdio in
 libio) cat >> confdefs.h <<\EOF
@@ -2393,7 +2404,7 @@ esac
 echo "$ac_t""$stdio" 1>&6
 
 echo $ac_n "checking ldap selection""... $ac_c" 1>&6
-echo "configure:2397: checking ldap selection" >&5
+echo "configure:2408: checking ldap selection" >&5
 
 case $add_ons in
 *ldap*)
@@ -2443,7 +2454,7 @@ if test $shared = default; then
 fi
 
 echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6
-echo "configure:2447: checking whether -fPIC is default" >&5
+echo "configure:2458: checking whether -fPIC is default" >&5
 if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
index 0a8b2d47577cdbbfebb10f778ca26bfdb6c3dd48..ead9e630da555b4e4f3c4d5f077d7ef211c35430 100644 (file)
@@ -422,7 +422,7 @@ AC_CHECK_TOOL(RANLIB, ranlib, :)
 
 AC_PATH_PROG(BASH, bash, no)
 if test "$BASH" != no &&
-   $BASH -c 'test "$BASH_VERSINFO"
+   $BASH -c 'test "$BASH_VERSINFO" \
             && test "$BASH_VERSINFO" -ge 2 >&/dev/null'; then
   libc_cv_have_bash2=yes
 else
@@ -596,9 +596,13 @@ _sym:
 .symver _sym,sym@VERS
 EOF
   cat > conftest.map <<EOF
-VERS {
+VERS_1 {
        global: sym;
 };
+
+VERS_2 {
+        global: sym;
+} VERS_1;
 EOF
   if ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.s 1>&AC_FD_CC 2>&AC_FD_CC; then
     if AC_TRY_COMMAND([${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
@@ -627,6 +631,13 @@ else
 fi
 AC_SUBST(VERSIONING)
 
+if test $VERSIONING = no; then
+  echo "\
+*** WARNING: You should not compile GNU libc without versioning. Not using 
+*** versioning will introduce incompatibilities so that old binaries
+*** will not run anymore.
+*** For versioning you need recent binutils (binutils-2.8.1.0.17 or newer)."
+fi
 if test $elf = yes; then
   AC_CACHE_CHECK(for .previous assembler directive,
                 libc_cv_asm_previous_directive, [dnl
index 379d51f325da845c7ba5fb1bde0802a323e5d969..8083ee3117aaeefe268e0e05ac0be365c9d70e3d 100644 (file)
@@ -19,7 +19,7 @@
 #
 #      Sub-makefile for libdb.
 #
-#      The code is lifted straight from the db 2.3.10 distribution
+#      The code is lifted straight from the db 2.3.12 distribution
 #      with minimal changes.
 #
 
@@ -34,7 +34,7 @@ headers = db.h db_185.h
 
 distribute = db_int.h config.h compat.h clib/getlong.c btree/btree.src \
             db/db.src db185/db185_int.h hash/hash.src log/log.src \
-            txn/txn.src \
+            txn/txn.src README \
             $(addprefix include/,btree.h btree_auto.h btree_ext.h \
                                  clib_ext.h common_ext.h cxx_int.h \
                                  db.h.src db_185.h.src db_am.h db_auto.h \
@@ -43,10 +43,11 @@ distribute = db_int.h config.h compat.h clib/getlong.c btree/btree.src \
                                  hash.h hash_auto.h hash_ext.h lock.h \
                                  lock_ext.h log.h log_auto.h log_ext.h \
                                  mp.h mp_ext.h mutex_ext.h os_ext.h queue.h \
-                                 shqueue.h txn.h txn_auto.h txn_ext.h) \
+                                 shqueue.h txn.h txn_auto.h txn_ext.h \
+                                 os_func.h) \
             $(addprefix mutex/,x86.gcc uts4.cc.s sparc.gcc parisc.hp \
                                parisc.gcc alpha.gcc alpha.dec README \
-                               68020.gcc)
+                               68020.gcc tsl_parisc.s)
 
 vpath %.c $(subdir-dirs)
 
index e608acf4167e3955977b7b1feb93af72a6be70ff..685a0278349c53febcb638b1483c3314453c67d2 100644 (file)
@@ -46,8 +46,6 @@ libdl-map     := libdl.map
 
 before-compile = $(objpfx)trusted-dirs.h $(objpfx)rtldtbl.h
 
-# We need GNU awk for the genrtldtbl.awk script.
-GAWK = gawk
 
 all: # Make this the default target; it will be defined in Rules.
 
@@ -149,7 +147,7 @@ $(objpfx)trusted-dirs.h: Makefile
        mv -f $@T $@
 $(objpfx)rtldtbl.h: Makefile
        $(make-target-directory)
-       echo "$(default-rpath)" | $(GAWK) -f genrtldtbl.awk > $@T
+       echo "$(default-rpath)" | awk -f genrtldtbl.awk > $@T
        mv -f $@T $@
 CPPFLAGS-dl-load.c = -I$(objdir)/$(subdir)
 CFLAGS-dl-load.c += -Wno-uninitialized
index 5e76d7d7d81c816272ff53e70df6358ac10fedab..3cfe48f5c63a0f2e7e67ad6379fe39aa16c53e08 100644 (file)
@@ -80,7 +80,7 @@ _dl_signal_error (int errcode,
       char buffer[1024];
       _dl_sysdep_fatal (_dl_argv[0] ?: "<program name unknown>",
                        ": error in loading shared libraries: ",
-                       objname ?: "", objname ? ": " : "",
+                       objname ?: "", objname && *objname ? ": " : "",
                        errstring, errcode ? ": " : "",
                        (errcode
                         ? _strerror_internal (errcode, buffer, sizeof buffer)
index 0b752676b714bbd480b1c0caa2a4f146face6257..91b8c2a48de905441684e100ed9150ea6669f0e6 100644 (file)
@@ -420,7 +420,7 @@ _dl_init_paths (void)
 
       if (_dl_platform != NULL)
        {
-         char *tmp;
+         char *tmp, *orig;
 
          relem->machdirnamelen = relem->dirnamelen + _dl_platformlen + 1;
          tmp = (char *) malloc (relem->machdirnamelen + 1);
@@ -428,11 +428,12 @@ _dl_init_paths (void)
            _dl_signal_error (ENOMEM, NULL,
                              "cannot create cache for search path");
 
-         relem->dirname = tmp;
+         orig = tmp;
          tmp = __mempcpy (tmp, relem->dirname, relem->dirnamelen);
          tmp = __mempcpy (tmp, _dl_platform, _dl_platformlen);
          *tmp++ = '/';
          *tmp = '\0';
+         relem->dirname = orig;
 
          relem->machdirstatus = unknown;
 
index 8d0363b50db803683b120e7ae242e675618a549b..a7e039b22453a019d39b433556405c83f4d9d482 100644 (file)
@@ -21,7 +21,7 @@
 #
 subdir := hesiod
 
-distribute := hesiod.h hesiod_p.h
+distribute := hesiod.h hesiod_p.h README.hesiod
 
 extra-libs := libnss_hesiod
 extra-libs-others = $(extra-libs)
index 537d0dc3e79892a82a4091100c32ec20d7be25a5..0cbb052a6d393c6ba4f8d864e646e37195d77442 100644 (file)
@@ -27,6 +27,7 @@ __gconv (gconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf,
         size_t *outbytesleft, size_t *converted)
 {
   size_t last_step = cd->nsteps - 1;
+  size_t oldinbytes = *inbytesleft;
   int result;
 
   cd->data[last_step].outbuf = *outbuf;
@@ -36,9 +37,10 @@ __gconv (gconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf,
   if (converted != NULL)
     *converted = 0;
 
-  result = (*cd->steps->fct) (cd->steps, cd->data, inbuf, inbytesleft,
+  result = (*cd->steps->fct) (cd->steps, cd->data, *inbuf, inbytesleft,
                              converted, inbuf == NULL || *inbuf == NULL);
 
+  *inbuf += oldinbytes - *inbytesleft;
   *outbuf += cd->data[last_step].outbufavail;
   *outbytesleft -= cd->data[last_step].outbufavail;
 
index 45f3a6cf8ac0c5478a45418e94d6d30d10f5644e..2c42f99ace35076fc0a52747b67705d332a12ba6 100644 (file)
@@ -24,6 +24,8 @@
 #include <sys/types.h>
 #include <regex.h>
 
+__BEGIN_DECLS
+
 /* Error codes for gconv functions.  */
 enum
 {
@@ -202,4 +204,6 @@ extern void __gconv_transform_end_rstate __P ((struct gconv_step_data *__data));
 
 #endif
 
+__END_DECLS
+
 #endif /* gconv.h */
index 91a347b058a4a849160c96f6732886ff6e6465a3..582c6f5a276e9f462537ced4cfab3b8293a24087 100644 (file)
@@ -123,14 +123,23 @@ __gconv_transform_ucs4_utf8 (struct gconv_step *step,
                                          data->outbufsize - data->outbufavail,
                                          (mbstate_t *) data->data);
 
-         /* Status so far.  */
-         result = GCONV_EMPTY_INPUT;
-
          /* Remember how much we converted.  */
          do_write += newinbuf - inbuf;
          *inlen -= (newinbuf - inbuf) * sizeof (wchar_t);
 
          data->outbufavail += actually;
+
+         if (data->is_last)
+           {
+             /* This is the last step.  */
+             result = (*inlen < sizeof (wchar_t)
+                       ? GCONV_EMPTY_INPUT : GCONV_FULL_OUTPUT);
+             break;
+           }
+
+         /* Status so far.  */
+         result = GCONV_EMPTY_INPUT;
+
          if (data->outbufavail > 0)
            {
              /* Call the functions below in the chain.  */
@@ -140,7 +149,7 @@ __gconv_transform_ucs4_utf8 (struct gconv_step *step,
                               written, 0);
 
              /* Correct the output buffer.  */
-             if (newavail != data->outbufavail)
+             if (newavail != data->outbufavail && newavail > 0)
                {
                  memmove (data->outbuf,
                           &data->outbuf[data->outbufavail - newavail],
@@ -204,14 +213,23 @@ __gconv_transform_utf8_ucs4 (struct gconv_step *step,
                                           / sizeof (wchar_t)),
                                          (mbstate_t *) data->data);
 
-         /* Status so far.  */
-         result = GCONV_EMPTY_INPUT;
-
          /* Remember how much we converted.  */
          do_write += actually;
          *inlen -= newinbuf - inbuf;
 
          data->outbufavail += actually * sizeof (wchar_t);
+
+         if (data->is_last)
+           {
+             /* This is the last step.  */
+             result = (data->outbufavail + sizeof (wchar_t) > data->outbufsize
+                       ? GCONV_FULL_OUTPUT : GCONV_EMPTY_INPUT);
+             break;
+           }
+
+         /* Status so far.  */
+         result = GCONV_EMPTY_INPUT;
+
          if (data->outbufavail > 0)
            {
              /* Call the functions below in the chain.  */
@@ -221,7 +239,7 @@ __gconv_transform_utf8_ucs4 (struct gconv_step *step,
                               written, 0);
 
              /* Correct the output buffer.  */
-             if (newavail != data->outbufavail)
+             if (newavail != data->outbufavail && newavail > 0)
                {
                  memmove (data->outbuf,
                           &data->outbuf[data->outbufavail - newavail],
@@ -236,5 +254,5 @@ __gconv_transform_utf8_ucs4 (struct gconv_step *step,
   if (written != NULL && data->is_last)
     *written = do_write;
 
-  return GCONV_OK;
+  return result;
 }
index dadf3d9dbbe879bb1675645c68c8ef39db179c64..82802b7451809df53003616d8d4327e6bfc6fc39 100644 (file)
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <ctype.h>
 #include <errno.h>
 #include <iconv.h>
+#include <string.h>
 
 #include <gconv.h>
 
 
+static inline void
+strip (char *s)
+{
+  int slash_count = 0;
+  char *wp;
+  wp = s;
+
+  while (*s != '\0')
+    {
+      if (isalnum (*s) || *s == '_' || *s == '-' || *s == '.')
+       *wp++ = *s;
+      else if (*s == '/')
+       {
+         if (++slash_count == 2)
+           break;
+         *wp++ = '/';
+       }
+      ++s;
+    }
+
+  while (slash_count++ < 2)
+    *wp++ = '/';
+
+  *wp = '\0';
+}
+
+
 iconv_t
 iconv_open (const char *tocode, const char *fromcode)
 {
+  char *tocode_conv;
+  char *fromcode_conv;
+  size_t tocode_len;
+  size_t fromcode_len;
   gconv_t cd;
   int res;
 
-  res = __gconv_open (tocode, fromcode, &cd);
+  /* Normalize the name.  We remove all characters beside alpha-numeric,
+     '_', '-', '/', and '.'.  */
+  tocode_len = strlen (tocode);
+  tocode_conv = alloca (tocode_len + 3);
+  strip (memcpy (tocode_conv, tocode, tocode_len + 1));
+
+  fromcode_len = strlen (fromcode);
+  fromcode_conv = alloca (fromcode_len + 3);
+  strip (memcpy (fromcode_conv, fromcode, fromcode_len + 1));
+
+  res = __gconv_open (tocode_conv[2] == '\0' ? tocode : tocode_conv,
+                     fromcode_conv[2] == '\0' ? fromcode, fromcode_conv, &cd);
 
   if (res != GCONV_OK)
     {
index 3e6b7097f1676e1dba9e53a76870a7a46b9dd505..81954cbb4981807c2aa9308e9e1174dccbb89f09 100644 (file)
--- a/libc.map
+++ b/libc.map
@@ -13,6 +13,8 @@ GLIBC_2.0 {
     _obstack;
     __progname_full; __progname;
 
+    _IO_list_all; _IO_stderr_; _IO_stdin_; _IO_stdout_;
+
     # This is for ix86 only.
     _fp_hw;
 
@@ -23,14 +25,15 @@ GLIBC_2.0 {
     __sigsetjmp; _setjmp; __sigaddset; __sigdelset; __sigismember;
     __sysv_signal; __bsd_getpgrp; _longjmp; _mcount;
     __divqu; __remqu; __divqs; __remqs; __divlu; __remlu; __divls;
-    __remls;
+    __remls; __divl; __reml; __divq; __remq; __divqu; __remqu;
 
     # functions which have an additional interface since they are
     # are cancelable.
     __libc_wait; __libc_waitpid; __libc_pause; __libc_nanosleep;
     __libc_open; __libc_close; __libc_read; __libc_write;
     __libc_lseek; __libc_fcntl; __libc_tcdrain; __libc_fsync;
-    __libc_msync; __libc_system;
+    __libc_msync; __libc_system; __libc_accept; __libc_send; __libc_recvfrom;
+    __libc_recvmsg; __libc_sendmsg; __libc_recv; __libc_sendto; __libc_connect;
 
     # interface of malloc functions
     __libc_calloc; __libc_free; __libc_mallinfo; __libc_malloc;
@@ -87,6 +90,7 @@ GLIBC_2.0 {
     _IO_str_underflow; _IO_str_init_static; _IO_str_init_readonly;
     _IO_str_seekoff; _IO_str_pbackfail; _IO_file_jumps;
     _IO_peekc_locked; _IO_flockfile; _IO_funlockfile;
+    _IO_fopen; _IO_fclose;
     __vsscanf; __vfscanf; __vsnprintf;
     _rpc_dtablesize; _null_auth; _seterr_reply;
     __res_randomid;
@@ -177,9 +181,9 @@ GLIBC_2.0 {
     ferror_unlocked; fexecve; fflush; fflush_unlocked; ffs; fgetc;
     fgetgrent; fgetgrent_r; fgetpos; fgetpos64; fgetpwent; fgetpwent_r; fgets;
     fgetspent; fgetspent_r; fileno; fileno_unlocked; finite; finitef;
-    finitel; flock; flockfile; fmtmsg; fnmatch; fopen64; fopencookie;
+    finitel; flock; flockfile; fmtmsg; fnmatch; fopen; fopen64; fopencookie;
     fork; fpathconf; fprintf; fputc; fputc_unlocked; fputs; fread; free;
-    freeaddrinfo; freopen64; frexp; frexpf; frexpl; fscanf; fseek;
+    freeaddrinfo; freopen; freopen64; frexp; frexpf; frexpl; fscanf; fseek;
     fseeko; fseeko64; fsetpos; fsetpos64; fstatfs; fstatfs64; fsync; ftell;
     ftello; ftello64; ftime; ftok; ftruncate; ftruncate64; ftrylockfile;
     fts_children; fts_close; fts_open; fts_read; fts_set; ftw; ftw64;
@@ -226,7 +230,8 @@ GLIBC_2.0 {
     inet6_isipv4mapped; inet_addr; inet_aton; inet_lnaof; inet_makeaddr;
     inet_netof; inet_network; inet_nsap_addr; inet_nsap_ntoa; inet_ntoa;
     inet_ntop; inet_pton; init_module; initgroups; initstate; initstate_r;
-    innetgr; insque; ioctl; ioperm; iopl; iruserok;
+    innetgr; insque; ioctl; ioperm; iopl; iruserok; iconv_open; iconv;
+    iconv_close;
 
     isalnum; isalpha; isascii; isatty; isblank; iscntrl; isdigit;
     isfdtype; isgraph; isinf; isinff; isinfl; islower; isnan; isnanf;
@@ -413,17 +418,19 @@ GLIBC_2.0 {
     xdrrec_endofrecord; xdrrec_eof; xdrrec_skiprecord; xdrstdio_create;
     xencrypt; xprt_register; xprt_unregister;
 
-    _IO_list_all;
-
-    _IO_stdin_; _IO_stdout_; _IO_stderr_;
-    _IO_fopen; fopen; freopen; _IO_fclose; fclose;
-
   local:
     *;
 };
 
 GLIBC_2.1 {
   global:
-    _IO_fopen; fopen; _IO_fclose; fclose;
+    # global variables
     _IO_2_1_stdin_; _IO_2_1_stdout_; _IO_2_1_stderr_;
+
+    # functions used in other libraries
+    _IO_fclose; _IO_fopen;
+
+    # functions in normal name space
+    fopen; fclose;
+
 } GLIBC_2.0;
diff --git a/libio/iofprintf.c b/libio/iofprintf.c
deleted file mode 100644 (file)
index 4dc9d3f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU IO Library.
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This library is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this library; see the file COPYING.  If not, write to
-   the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
-
-   As a special exception, if you link this library with files
-   compiled with a GNU compiler to produce an executable, this does
-   not cause the resulting executable to be covered by the GNU General
-   Public License.  This exception does not however invalidate any
-   other reasons why the executable file might be covered by the GNU
-   General Public License.  */
-
-#include "libioP.h"
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-int
-#ifdef __STDC__
-_IO_fprintf (_IO_FILE *fp, const char* format, ...)
-#else
-_IO_fprintf (fp, format, va_alist)
-     _IO_FILE *fp;
-     char *format;
-     va_dcl
-#endif
-{
-  int ret;
-  va_list args;
-  CHECK_FILE (fp, -1);
-  _IO_va_start (args, format);
-  ret = _IO_vfprintf (fp, format, args);
-  va_end (args);
-  return ret;
-}
index c1a918430560c3e4c7ef9b2124932aec8df2bc87..1eef384fa8aebbcf32822cb193945f71b0d23064 100644 (file)
@@ -8,6 +8,8 @@ extern "C" {
 #endif
 
 extern int _IO_fclose __P((_IO_FILE*));
+extern int _IO_new_fclose __P((_IO_FILE*));
+extern int _IO_old_fclose __P((_IO_FILE*));
 extern _IO_FILE *_IO_fdopen __P((int, const char*));
 extern int _IO_fflush __P((_IO_FILE*));
 extern int _IO_fgetpos __P((_IO_FILE*, _IO_fpos_t*));
index 65337f8f28abecf0d62364a9a916ae1e0954ae47..a03cf636b29246269dedfd6292d39a3b38c0889c 100644 (file)
@@ -98,18 +98,23 @@ _IO_proc_open (fp, command, mode)
     return NULL;
   if (_IO_pipe (pipe_fds) < 0)
     return NULL;
-  if (mode[0] == 'r')
+  if (mode[0] == 'r' && mode[1] == '\0')
     {
       parent_end = pipe_fds[0];
       child_end = pipe_fds[1];
       read_or_write = _IO_NO_WRITES;
     }
-  else
+  else if (mode[0] == 'w' && mode[1] == '\0')
     {
       parent_end = pipe_fds[1];
       child_end = pipe_fds[0];
       read_or_write = _IO_NO_READS;
     }
+  else
+    {
+      __set_errno (EINVAL);
+      return NULL;
+    }
   ((_IO_proc_file *) fp)->pid = child_pid = _IO_fork ();
   if (child_pid == 0)
     {
index e5c3c64b15617882d3df4f06c902cb474c16e6c7..7f80b9ad60a20ff271600504810fdb63d21004b8 100644 (file)
@@ -3761,6 +3761,9 @@ malloc_update_mallinfo(ar_ptr, mi) arena *ar_ptr; struct mallinfo *mi;
 #endif
   INTERNAL_SIZE_T avail;
 
+  /* Initialize the memory.  */
+  memset (mi, '\0', sizeof (struct mallinfo));
+
   (void)mutex_lock(&ar_ptr->mutex);
   avail = chunksize(top(ar_ptr));
   navail = ((long)(avail) >= (long)MINSIZE)? 1 : 0;
index cda84f7becdb95064a432dc84e34d6e3d163155a..354684111875cfc5c74e5a6392aa2472a2dea871 100644 (file)
@@ -103,7 +103,8 @@ distribute = $(minimal-dist)                                                \
                        $(minimal-dist)))                               \
             libc.info* libc.?? libc.??s texinfo.tex summary.texi       \
             stamp-summary chapters chapters-incl1 chapters-incl2       \
-            xtract-typefun.awk dir-add.texi dir-add.info dir
+            xtract-typefun.awk dir-add.texi dir-add.info dir           \
+            stdio-fp.c
 export distribute := $(distribute)
 
 tar-it = tar chovf $@ $^
index 07833931fd9943250a5e4bbbf1e3f67bbc199e88..3e153fcfa7eeb5cd352a575114814805058a0b41 100644 (file)
@@ -151,7 +151,6 @@ problem.
 @deftypevr Macro {const float imaginary} _Imaginary_I
 This macro is a representation of the value ``@math{1i}''.  I.e., it is
 the value for which
-@end deftypevr
 
 @smallexample
 _Imaginary_I * _Imaginary_I = -1
@@ -164,6 +163,7 @@ One can use it to easily construct complex number like in
 @smallexample
 3.0 - _Imaginary_I * 4.0
 @end smallexample
+@end deftypevr
 
 @noindent
 which results in the complex number with a real part of 3.0 and a
index e2a6b34ae200d8c58a0182c587c3144b4f5f2e4c..7cb735534d1055b79e7aa4536a6f895d777caf04 100644 (file)
@@ -189,7 +189,7 @@ build the GNU C library:
 
 @itemize @bullet
 @item
-@code{make} 3.75
+GNU @code{make} 3.75
 
 You need the latest version of GNU @code{make}.  Modifying the GNU C
 Library to work with other @code{make} programs would be so hard that we
@@ -209,7 +209,7 @@ On PowerPC, GCC versions dated earlier than 970904 are known not to work
 (they crash), including 2.7.2.
 
 @item
-@code{binutils} 2.8.1
+GNU @code{binutils} 2.8.1.0.17
 
 Using the GNU @code{binutils} (assembler, linker, and related tools) is
 preferable when possible, and they are required to build an ELF shared C
@@ -217,7 +217,7 @@ library.  We recommend @code{binutils} version 2.8.1 or later; earlier
 versions are known to have problems or to not support all architectures.
 
 @item
-@code{texinfo} 3.11
+GNU @code{texinfo} 3.11
 
 To correctly translate and install the Texinfo documentation you need
 this version of the @code{texinfo} package.  Former versions did not
@@ -236,7 +236,7 @@ If you change any configuration file you will need also
 
 @itemize @bullet
 @item
-@code{autoconf} 2.12
+GNU @code{autoconf} 2.12
 @end itemize
 
 @noindent
@@ -247,6 +247,13 @@ and if you change any of the message translation files you will also need
 @code{GNU gettext} 0.10 or later
 @end itemize
 
+If any of the manual files changed you will need this
+
+@itemize @bullet
+@item
+GNU @code{awk} 3.0
+@end itemize
+
 @noindent
 If you upgrade your source tree using the patches made available you probably
 will need those package above in any case.
index 0486718b8a85d7e88c8a7f2713de72d59acbee32..b7f265c0386baeb05bd059b0ba4cfc47a1afaf1d 100644 (file)
    PRINTF_EXPR     Floating point conversion specification to print a variable
    of type MATHTYPE with printf. PRINTF_EXPR just contains
    the specifier, not the percent and width arguments,
-   e.g. "f"
+   e.g. "f".
+   PRINTF_XEXPR    Like PRINTF_EXPR, but print in hexadecimal format.
  */
 
 /* This program isn't finished yet.
    It has tests for:
    acos, acosh, asin, asinh, atan, atan2, atanh,
    cbrt, ceil, copysign, cos, cosh, erf, erfc, exp, exp2, expm1,
-   fabs, fdim, floor, fmin, fmax, fmod, fpclassify,
+   fabs, fdim, floor, fma, fmax, fmin, fmod, fpclassify,
    frexp, gamma, hypot,
    ilogb, isfinite, isinf, isnan, isnormal,
    ldexp, lgamma, log, log10, log1p, log2, logb,
 /* Various constants (we must supply them precalculated for accuracy).  */
 #define M_PI_6  .52359877559829887308L
 
-static int noErrors;
+static int noErrors;   /* number of errors */
+static int noTests;    /* number of tests (without testing exceptions) */
+static int noExcTests; /* number of tests for exception flags */
 
 static int verbose = 3;
 static MATHTYPE minus_zero, plus_zero;
@@ -302,6 +305,7 @@ test_single_exception (const char *test_name,
 static void
 test_not_exception (const char *test_name, short int exception)
 {
+  ++noExcTests;
 #ifdef FE_DIVBYZERO
   if ((exception & DIVIDE_BY_ZERO_EXCEPTION) == 0)
     test_single_exception (test_name, exception,
@@ -321,6 +325,7 @@ test_not_exception (const char *test_name, short int exception)
 static void
 test_exceptions (const char *test_name, short int exception)
 {
+  ++noExcTests;
 #ifdef FE_DIVBYZERO
   test_single_exception (test_name, exception,
                          DIVIDE_BY_ZERO_EXCEPTION, FE_DIVBYZERO,
@@ -364,6 +369,7 @@ check_equal (MATHTYPE computed, MATHTYPE supplied, MATHTYPE eps, MATHTYPE * diff
 static void
 output_result_bool (const char *test_name, int result)
 {
+  ++noTests;
   if (result)
     {
       output_pass_value ();
@@ -384,6 +390,7 @@ static void
 output_isvalue (const char *test_name, int result,
                MATHTYPE value)
 {
+  ++noTests;
   if (result)
     {
       output_pass_value ();
@@ -392,8 +399,9 @@ output_isvalue (const char *test_name, int result,
     {
       output_fail_value (test_name);
       if (verbose > 1)
-       printf (" Value: %.20" PRINTF_EXPR "\n", value);
-      noErrors++;
+       printf (" Value: % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+               value, value);
+      ++noErrors;
     }
 
   fpstack_test (test_name);
@@ -404,6 +412,7 @@ static void
 output_isvalue_ext (const char *test_name, int result,
                    MATHTYPE value, MATHTYPE parameter)
 {
+  ++noTests;
   if (result)
     {
       output_pass_value ();
@@ -413,8 +422,10 @@ output_isvalue_ext (const char *test_name, int result,
       output_fail_value (test_name);
       if (verbose > 1)
        {
-         printf (" Value:     %.20" PRINTF_EXPR "\n", value);
-         printf (" Parameter: %.20" PRINTF_EXPR "\n", parameter);
+         printf (" Value:     % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+                 value, value);
+         printf (" Parameter: % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+                 parameter, parameter);
        }
       noErrors++;
     }
@@ -429,6 +440,7 @@ output_result (const char *test_name, int result,
               MATHTYPE difference,
               int print_values, int print_diff)
 {
+  ++noTests;
   if (result)
     {
       output_pass_value ();
@@ -439,12 +451,15 @@ output_result (const char *test_name, int result,
       if (verbose > 1 && print_values)
        {
          printf ("Result:\n");
-         printf (" is:         %.20" PRINTF_EXPR "\n", computed);
-         printf (" should be:  %.20" PRINTF_EXPR "\n", expected);
+         printf (" is:         % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+                 computed, computed);
+         printf (" should be:  % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+                 expected, expected);
          if (print_diff)
-           printf (" difference: %.20" PRINTF_EXPR "\n", difference);
+           printf (" difference: % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR
+                   "\n", difference, difference);
        }
-      noErrors++;
+      ++noErrors;
     }
 
   fpstack_test (test_name);
@@ -458,6 +473,7 @@ output_result_ext (const char *test_name, int result,
                   MATHTYPE parameter,
                   int print_values, int print_diff)
 {
+  ++noTests;
   if (result)
     {
       output_pass_value ();
@@ -468,13 +484,17 @@ output_result_ext (const char *test_name, int result,
       if (verbose > 1 && print_values)
        {
          printf ("Result:\n");
-         printf (" is:         %.20" PRINTF_EXPR "\n", computed);
-         printf (" should be:  %.20" PRINTF_EXPR "\n", expected);
+         printf (" is:         % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+                 computed, computed);
+         printf (" should be:  % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+                 expected, expected);
          if (print_diff)
-           printf (" difference: %.20" PRINTF_EXPR "\n", difference);
-         printf ("Parameter:   %.20" PRINTF_EXPR "\n", parameter);
+           printf (" difference: % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR
+                   "\n", difference, difference);
+         printf ("Parameter:   % .20" PRINTF_EXPR "  % .20" PRINTF_XEXPR "\n",
+                 parameter, parameter);
        }
-      noErrors++;
+      ++noErrors;
     }
 
   fpstack_test (test_name);
@@ -605,6 +625,7 @@ check_long (const char *test_name, long int computed, long int expected)
   long int diff = computed - expected;
   int result = diff == 0;
 
+  ++noTests;
   output_new_test (test_name);
   test_exceptions (test_name, NO_EXCEPTION);
 
@@ -637,6 +658,7 @@ check_longlong (const char *test_name, long long int computed,
   long long int diff = computed - expected;
   int result = diff == 0;
 
+  ++noTests;
   output_new_test (test_name);
   test_exceptions (test_name, NO_EXCEPTION);
 
@@ -1165,9 +1187,14 @@ check_frexp (const char *test_name, MATHTYPE computed, MATHTYPE expected,
       if (verbose > 1)
        {
          printf ("Result:\n");
-         printf (" is:         %.20" PRINTF_EXPR " *2^%d\n", computed, comp_int);
-         printf (" should be:  %.20" PRINTF_EXPR " *2^%d\n", expected, exp_int);
-         printf (" difference: %.20" PRINTF_EXPR "\n", diff);
+         printf (" is:         %.20" PRINTF_EXPR " *2^%d  %.20"
+                 PRINTF_XEXPR "*2^%d\n",
+                 computed, comp_int, computed, comp_int);
+         printf (" should be:  %.20" PRINTF_EXPR " *2^%d  %.20"
+                 PRINTF_XEXPR "*2^%d\n",
+                 expected, exp_int, expected, exp_int);
+         printf (" difference: %.20" PRINTF_EXPR "  %.20" PRINTF_XEXPR "\n",
+                 diff, diff);
        }
       noErrors++;
     }
@@ -5261,11 +5288,14 @@ main (int argc, char *argv[])
   identities ();
   inverse_functions ();
 
+  printf ("\nTest suite completed:\n");
+  printf ("  %d test cases plus %d tests for exception flags executed.\n",
+         noTests, noExcTests);
   if (noErrors)
     {
-      printf ("\n%d errors occured.\n", noErrors);
+      printf ("  %d errors occured.\n", noErrors);
       exit (1);
     }
-  printf ("\n All tests passed successfully.\n");
+  printf ("  All tests passed successfully.\n");
   exit (0);
 }
index c2e7dc92b3e0384fb4800ec408797f67e98cb480..4769f4e754888e2d50ad099341e517c143930b1e 100644 (file)
@@ -23,6 +23,7 @@
 #define MATHCONST(x) x
 #define CHOOSE(Clongdouble,Cdouble,Cfloat) Cdouble
 #define PRINTF_EXPR "e"
+#define PRINTF_XEXPR "a"
 #define TEST_DOUBLE 1
 
 #ifndef __NO_MATH_INLINES
index 849067c8da701c89c6dbfbb6e846d4ffade3e2f0..04027738a9a7b53db5f35c50b2a484e1327d4498 100644 (file)
@@ -23,6 +23,7 @@
 #define MATHCONST(x) x
 #define CHOOSE(Clongdouble,Cdouble,Cfloat) Cfloat
 #define PRINTF_EXPR "e"
+#define PRINTF_XEXPR "a"
 #define TEST_FLOAT 1
 
 #ifndef __NO_MATH_INLINES
index 3039ccf5b47661cc69612e6de3356be3a6655fa9..14bfb9241e4d3e5ad5641249ac713bf59de2b089 100644 (file)
@@ -24,6 +24,7 @@
 #define MATHCONST(x) x
 #define CHOOSE(Clongdouble,Cdouble,Cfloat) Cdouble
 #define PRINTF_EXPR "e"
+#define PRINTF_XEXPR "a"
 #define TEST_DOUBLE 1
 #define TEST_INLINE
 
index d6f96f8622cb4e1b242428685f66c4f305b9f209..a45a54d33568d124db3a5e78f176f1c98e86d622 100644 (file)
@@ -23,6 +23,7 @@
 #define MATHCONST(x) x
 #define CHOOSE(Clongdouble,Cdouble,Cfloat) Cfloat
 #define PRINTF_EXPR "e"
+#define PRINTF_XEXPR "a"
 #define TEST_FLOAT 1
 #define TEST_INLINE 1
 
index 791cb95cf3a387d2110da35c63d91e0ce9afb569..3947cf14cfd18e61bbac25762901333544be886d 100644 (file)
@@ -24,6 +24,7 @@
 #define MATHCONST(x) x##L
 #define CHOOSE(Clongdouble,Cdouble,Cfloat) Clongdouble
 #define PRINTF_EXPR "Le"
+#define PRINTF_XEXPR "La"
 #define TEST_INLINE
 
 #ifdef __NO_MATH_INLINES
index eb9b57ae9603d2e4d7e0fbcbfc79deee3fc43954..c516c973baefc02e9d1179ffd3e6c6b1b885c5ff 100644 (file)
@@ -23,6 +23,7 @@
 #define MATHCONST(x) x##L
 #define CHOOSE(Clongdouble,Cdouble,Cfloat) Clongdouble
 #define PRINTF_EXPR "Le"
+#define PRINTF_XEXPR "La"
 
 #ifndef __NO_MATH_INLINES
 # define __NO_MATH_INLINES
index c57396f98b0f9f65351dfe7c7fede91b0fdf5a11..eaae77a8d52d949e9865db285a637b8fa80f8651 100644 (file)
@@ -166,7 +166,7 @@ __printf_fphex (FILE *fp,
          if (__isinfl (fpnum.ldbl.d))
            special = isupper (info->spec) ? "INF" : "inf";
 
-         negative = fpnum.ldbl.d < 0;
+         negative = signbit (fpnum.ldbl.d);
        }
     }
   else
@@ -184,7 +184,7 @@ __printf_fphex (FILE *fp,
          if (__isinf (fpnum.dbl.d))
            special = isupper (info->spec) ? "INF" : "inf";
 
-         negative = fpnum.dbl.d < 0;
+         negative = signbit (fpnum.dbl.d);
        }
     }
 
index 426da4a24c9596637053ec5ba6ef1b5594a9baae..b13a1c254216e4ce22c5c67cd8a47bb91bf16365 100644 (file)
@@ -82,6 +82,21 @@ main (void)
 
   remove ("/tmp/tstpopen.tmp");
 
+  errno = 0;
+  output = popen ("/bin/cat", "m");
+  if (output != NULL)
+    {
+      puts ("popen called with illegal mode does not return NULL");
+      puts ("Test FAILED!");
+      exit (1);
+    }
+  if (errno != EINVAL)
+    {
+      puts ("popen called with illegal mode does not set errno to EINVAL");
+      puts ("Test FAILED!");
+      exit (1);
+    }
+
   puts (wstatus | rstatus  ? "Test FAILED!" : "Test succeeded.");
   exit (wstatus | rstatus);
 }
index b9fc87679be3dfa2625e98f3d31b088e52b9dcb9..9f8eba9c4cbcd35ca22276b01655c636d2d6ebaf 100644 (file)
@@ -434,6 +434,13 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
            flags |= LONGDBL;
            break;
          case 'a':
+           /* The `a' is used as a flag only if followed by `s', `S' or
+              `['.  */
+           if (*f != 's' && *f != 'S' && *f != '[')
+             {
+               --f;
+               break;
+             }
            if (flags & TYPEMOD)
              /* Signal illegal format element.  */
              conv_error ();
@@ -917,6 +924,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
        case 'f':
        case 'g':
        case 'G':
+       case 'a':
        case 'A':
          c = inchar ();
          if (c == EOF)
index cd78ef0df406db4f02aa8d0c03a8a42ca70b72b3..e93ec9add27ffc4e278eb8e75c5fcb3ddbcd8a86 100644 (file)
@@ -793,26 +793,20 @@ INTERNAL (STRTOF) (nptr, endptr, group LOCALE_PARAM)
        val = 10 + TOLOWER (*startp++) - L_('a');
       bits = nbits[val];
 
-      if (pos + 1 >= 4)
+      if (pos + 1 >= 4 || pos + 1 >= bits)
        {
          /* We don't have to care for wrapping.  This is the normal
-            case so we add this optimization.  */
+            case so we add the first clause in the `if' expression as
+            an optimization.  It is a compile-time constant and so does
+            not cost anything.  */
          retval[idx] = val << (pos - bits + 1);
          pos -= bits;
        }
       else
        {
-         if (pos + 1 >= bits)
-           {
-             retval[idx] = val << (pos - bits + 1);
-             pos -= bits;
-           }
-         else
-           {
-             retval[idx--] = val >> (bits - pos - 1);
-             retval[idx] = val << (BITS_PER_MP_LIMB - (bits - pos - 1));
-             pos = BITS_PER_MP_LIMB - 1 - (bits - pos - 1);
-           }
+         retval[idx--] = val >> (bits - pos - 1);
+         retval[idx] = val << (BITS_PER_MP_LIMB - (bits - pos - 1));
+         pos = BITS_PER_MP_LIMB - 1 - (bits - pos - 1);
        }
 
       while (--dig_no > 0 && idx >= 0)
index 660602b25a29e3a2f0303a319da020a2ab0e2f83..75c7857f47d9b1362d9e4e79c5c1e8495baffe97 100644 (file)
@@ -49,6 +49,10 @@ static char sccsid[] = "@(#)pty.c    8.1 (Berkeley) 6/4/93";
 #include <pty.h>
 #include <utmp.h>
 
+#ifndef REVOKE
+# define REVOKE(Line) revoke (Line)
+#endif
+
 int
 openpty(amaster, aslave, name, termp, winp)
        int *amaster, *aslave;
@@ -56,7 +60,7 @@ openpty(amaster, aslave, name, termp, winp)
        struct termios *termp;
        struct winsize *winp;
 {
-       static char line[] = "/dev/ptyXX";
+       char line[11];
        register const char *cp1, *cp2;
        register int master, slave, ttygid;
        size_t buflen = sysconf (_SC_GETGR_R_SIZE_MAX);
@@ -64,6 +68,8 @@ openpty(amaster, aslave, name, termp, winp)
        struct group grbuffer;
        struct group *gr;
 
+       strcpy (line, "/dev/ptyXX");
+
        if (getgrnam_r("tty", &grbuffer, buffer, buflen, &gr) >= 0)
                ttygid = gr->gr_gid;
        else
@@ -80,7 +86,7 @@ openpty(amaster, aslave, name, termp, winp)
                                line[5] = 't';
                                (void) chown(line, getuid(), ttygid);
                                (void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP);
-                               (void) revoke(line);
+                               REVOKE(line);
                                if ((slave = open(line, O_RDWR, 0)) != -1) {
                                        *amaster = master;
                                        *aslave = slave;
diff --git a/sysdeps/generic/sys/ucontext.h b/sysdeps/generic/sys/ucontext.h
new file mode 100644 (file)
index 0000000..cdfeb2c
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H        1
+
+#error "No system dependent context structure definitions"
+
+#endif /* sys/ucontext.h */
index bb2d8f7b41254bb5da3a6c52de963d172bea6c81..b97f95f6a83683a1fb1fc38ec599944272c5fe6a 100644 (file)
@@ -1,6 +1,6 @@
 # The mpn functions need a #define for asm syntax flavor.
 # Every i386 port in use uses gas syntax (I think).
-asm-CPPFLAGS := $(asm-CPPFLAGS) -DGAS_SYNTAX
+asm-CPPFLAGS += -DGAS_SYNTAX
 
 # The i386 `long double' is a distinct type we support.
 long-double-fcts = yes
@@ -18,3 +18,7 @@ CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
 CFLAGS-dl-load.c += -Wno-unused
 CFLAGS-dl-reloc.c += -Wno-unused
 endif
+
+ifeq ($(subdir),math)
+CPPFLAGS += -D__LIBC_INTERNAL_MATH_INLINES
+endif
index 482b47e3b37c0bff9d7cef7d6dcb76aa33c12865..5823055c30ebcb6a7edd0befd3c9d4c0a5c37939 100644 (file)
 # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
 #endif
 
+#ifdef __cplusplus
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE extern __inline
+#endif
+
 
 #if defined __USE_ISOC9X && defined __GNUC__ && __GNUC__ >= 2
 /* ISO C 9X defines some macros to perform unordered comparisons.  The
    ix87 FPU supports this with special opcodes and we should use them.
    These must not be inline functions since we have to be able to handle
    all floating-point types.  */
-# define isgreater(x, y) \
+# ifdef __i686__
+/* For the PentiumPro and more recent processors we can provide
+   better code.  */
+#  define isgreater(x, y) \
+     ({ register char __result;                                                      \
+       __asm__ ("fucomip; seta %%al"                                         \
+                : "=a" (__result) : "u" (y), "t" (x) : "cc", "st");          \
+       __result; })
+#  define isgreaterequal(x, y) \
+     ({ register char __result;                                                      \
+       __asm__ ("fucomip; setae %%al"                                        \
+                : "=a" (__result) : "u" (y), "t" (x) : "cc", "st");          \
+       __result; })
+
+#  define isless(x, y) \
+     ({ register char __result;                                                      \
+       __asm__ ("fucomip; setb %%al"                                         \
+                : "=a" (__result) : "u" (y), "t" (x) : "cc", "st");          \
+       __result; })
+
+#  define islessequal(x, y) \
+     ({ register char __result;                                                      \
+       __asm__ ("fucomip; setbe %%al"                                        \
+                : "=a" (__result) : "u" (y), "t" (x) : "cc", "st");          \
+       __result; })
+
+#  define islessgreater(x, y) \
+     ({ register char __result;                                                      \
+       __asm__ ("fucomip; setne %%al"                                        \
+                : "=a" (__result) : "u" (y), "t" (x) : "cc", "st");          \
+       __result; })
+
+#  define isunordered(x, y) \
+     ({ register char __result;                                                      \
+       __asm__ ("fucomip; setp %%al"                                         \
+                : "=a" (__result) : "u" (y), "t" (x) : "cc", "st");          \
+       __result; })
+# else
+/* This is the dumb, portable code for i386 and above.  */
+#  define isgreater(x, y) \
      ({ register char __result;                                                      \
-       __asm__ ("fucompp; fnstsw; testb $0x45, %%ah; setz %%al;"             \
+       __asm__ ("fucompp; fnstsw; testb $0x45, %%ah; setz %%al             \
                 : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
        __result; })
 
-# define isgreaterequal(x, y) \
+#  define isgreaterequal(x, y) \
      ({ register char __result;                                                      \
-       __asm__ ("fucompp; fnstsw; testb $0x05, %%ah; setz %%al;"             \
+       __asm__ ("fucompp; fnstsw; testb $0x05, %%ah; setz %%al             \
                 : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
        __result; })
 
-# define isless(x, y) \
+#  define isless(x, y) \
      ({ register char __result;                                                      \
-       __asm__ ("fucompp; fnstsw; xorb $0x01, %%ah; testb $0x45, %%ah;"      \
-                "setz %%al"                                                  \
+       __asm__ ("fucompp; fnstsw; sahf; setb %%al"                           \
                 : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
        __result; })
 
-# define islessequal(x, y) \
+#  define islessequal(x, y) \
      ({ register char __result;                                                      \
-       __asm__ ("fucompp; fnstsw; xorb $0x01, %%ah; testb $0x05, %%ah;"      \
-                "setz %%al"                                                  \
+       __asm__ ("fucompp; fnstsw; sahf; setbe %%al"                          \
                 : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
        __result; })
 
-# define islessgreater(x, y) \
+#  define islessgreater(x, y) \
      ({ register char __result;                                                      \
-       __asm__ ("fucompp; fnstsw; testb $0x44, %%ah; setz %%al;"             \
+       __asm__ ("fucompp; fnstsw; testb $0x44, %%ah; setz %%al             \
                 : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
        __result; })
 
-# define isunordered(x, y) \
+#  define isunordered(x, y) \
      ({ register char __result;                                                      \
        __asm__ ("fucompp; fnstsw; sahf; setp %%al"                           \
                 : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
        __result; })
-#endif
+# endif        /* __i686__ */
 
+/* XXX Argh!!!  More compiler errors.  */
+#if 0
+/* Test for negative number.  Used in the signbit() macro.  */
+__MATH_INLINE int
+__signbitf (float __x)
+{
+  union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0;
+}
+__MATH_INLINE int
+__signbit (double __x)
+{
+  union { double __d; int __i[2]; } __u = { __d: __x }; return __u.__i[1] < 0;
+}
+__MATH_INLINE int
+__signbitl (long double __x)
+{
+  union { long double __l; int __i[3]; } __u = { __l: __x };
+  return (__u.__i[2] & 0x8000) != 0;
+}
+#endif
+#endif
 
-#ifdef __GNUC__
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
 
 /* The gcc, version 2.7 or below, has problems with all this inlining
    code.  So disable it for this version of the compiler.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7)
+#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7))
 
-#ifdef __cplusplus
-# define __MATH_INLINE __inline
-#else
-# define __MATH_INLINE extern __inline
-#endif
+#if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
+     && defined __OPTIMIZE__)
 
 /* A macro to define float, double, and long double versions of various
    math functions for the ix87 FPU.  FUNC is the function name (which will
   {                                                                          \
     code;                                                                    \
   }
+#endif
 
 
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
 /* Miscellaneous functions */
 
 __inline_mathcode (__sgn, __x, \
@@ -550,6 +611,16 @@ __inline_mathcode (__acosh1p, __x, \
 #undef __atan2_code
 #undef __sincos_code
 
-#endif /* Not gcc <= 2.7.  */
 #endif /* __NO_MATH_INLINES  */
+
+
+/* This code is used internally in the GNU libc.  */
+#if 0
+/* XXX I hate compiler bugs.  The current version produces wrong code
+   if this optimization is used.  */
+#ifdef __LIBC_INTERNAL_MATH_INLINES
+__inline_mathop (__ieee754_sqrt, "fsqrt")
+#endif
+#endif
+
 #endif /* __GNUC__  */
index 05a9d6af2a2471844dcef9a53f341b82d870e229..1f385ffc0002e27c7213c402e18e73a75c121c1b 100644 (file)
@@ -42,7 +42,7 @@
 #  define __nan_bytes          { 0, 0, 0xc0, 0x7f }
 # endif
 
-static union { unsigned char __c[4]; double __d; } __nan = { __nan_bytes };
+static union { unsigned char __c[4]; float __d; } __nan = { __nan_bytes };
 # define NAN   (__nan.__d)
 
 #endif /* GCC.  */
index 39f6ceab2ea9803e68602a7b20a5d543e8d73659..6e32efbba2bd614098c4836f7ea2ef66dd6c7531 100644 (file)
@@ -71,11 +71,6 @@ __remquo (double x, double y, int *quo)
       x -= 2 * y;
       cquo += 2;
     }
-  if (x >= y)
-    {
-      x -= y;
-      ++cquo;
-    }
 
   if (hy < 0x00200000)
     {
index b3870f4b020b21d9a621e304c2638558b767e816..2ffd16c90329161b6e7fbfcca370cd3f150ca8f0 100644 (file)
@@ -70,11 +70,6 @@ __remquof (float x, float y, int *quo)
       x -= 2 * y;
       cquo += 2;
     }
-  if (x >= y)
-    {
-      x -= y;
-      ++cquo;
-    }
 
   if (hy < 0x01000000)
     {
index b7835e6dc75f32b6665798813ecdd9d82f6e88f0..88ff298eb6387dc1f91051751e20d2530232cad1 100644 (file)
@@ -71,11 +71,6 @@ __remquol (long double x, long double p, int *quo)
       x -= 2 * p;
       cquo += 2;
     }
-  if (x >= p)
-    {
-      x -= p;
-      ++cquo;
-    }
 
   if (ep < 0x0002)
     {
index c3ed76c0de7656fa8ae4e1437f38e215579d5466..827a8d603d23f97bb2136c85acde898251cd41a5 100644 (file)
 
 
 #if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \
-    || defined __LIBC_M81_MATH_INLINES
+    || defined __LIBC_INTERNAL_MATH_INLINES
 
-#ifdef __LIBC_M81_MATH_INLINES
+#ifdef __LIBC_INTERNAL_MATH_INLINES
 /* This is used when defining the functions themselves.  Define them with
    __ names, and with `static inline' instead of `extern inline' so the
    bodies will always be used, never an external function call.  */
-#define __m81_u(x)             __CONCAT(__,x)
-#define __m81_inline           static __inline
+# define __m81_u(x)            __CONCAT(__,x)
+# define __m81_inline          static __inline
 #else
-#define __m81_u(x)             x
-#ifdef __cplusplus
-#define __m81_inline           __inline
-#else
-#define __m81_inline           extern __inline
-#endif
-#define __M81_MATH_INLINES     1
+# define __m81_u(x)            x
+# ifdef __cplusplus
+#  define __m81_inline         __inline
+# else
+#  define __m81_inline         extern __inline
+# endif
+# define __M81_MATH_INLINES    1
 #endif
 
 /* Define a const math function.  */
    is the name of the fpu operation (without leading f).  */
 
 #if defined __USE_MISC || defined __USE_ISOC9X
-#define __inline_mathop(func, op)                      \
+# define __inline_mathop(func, op)                     \
   __inline_mathop1(double, func, op)                   \
   __inline_mathop1(float, __CONCAT(func,f), op)                \
   __inline_mathop1(long double, __CONCAT(func,l), op)
 #else
-#define __inline_mathop(func, op)                      \
+# define __inline_mathop(func, op)                     \
   __inline_mathop1(double, func, op)
 #endif
 
     return __result;                                                         \
   }
 
-#ifdef __LIBC_M81_MATH_INLINES
+#ifdef __LIBC_INTERNAL_MATH_INLINES
 /* ieee style elementary functions */
 /* These are internal to the implementation of libm.  */
 __inline_mathop(__ieee754_acos, acos)
@@ -154,21 +154,21 @@ __inline_mathop(sin, sin)
 __inline_mathop(tan, tan)
 __inline_mathop(tanh, tanh)
 
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
 __inline_mathop(rint, int)
 __inline_mathop(expm1, etoxm1)
 __inline_mathop(log1p, lognp1)
-#endif
+# endif
 
-#ifdef __USE_MISC
+# ifdef __USE_MISC
 __inline_mathop(significand, getman)
-#endif
+# endif
 
-#ifdef __USE_ISOC9X
+# ifdef __USE_ISOC9X
 __inline_mathop(log2, log2)
 __inline_mathop(exp2, twotox)
 __inline_mathop(trunc, intrz)
-#endif
+# endif
 
 #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
 
@@ -176,9 +176,9 @@ __inline_mathop(trunc, intrz)
    functions, using __FLOAT_TYPE as the domain type and __S as the suffix
    for the function names.  */
 
-#ifdef __LIBC_M81_MATH_INLINES
+#ifdef __LIBC_INTERNAL_MATH_INLINES
 /* Internally used functions.  */
-#define __internal_inline_functions(float_type, s)                          \
+# define __internal_inline_functions(float_type, s)                         \
 __m81_defun (float_type, __CONCAT(__ieee754_remainder,s),                   \
             (float_type __x, float_type __y))                               \
 {                                                                           \
@@ -198,7 +198,7 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s),                             \
 __internal_inline_functions (double,)
 __internal_inline_functions (float,f)
 __internal_inline_functions (long double,l)
-#undef __internal_inline_functions
+# undef __internal_inline_functions
 
 /* Get the m68881 condition codes, to quickly check multiple conditions.  */
 static __inline__ unsigned long
@@ -210,12 +210,12 @@ __m81_test (long double __val)
 }
 
 /* Bit values returned by __m81_test.  */
-#define __M81_COND_NAN (1 << 24)
-#define __M81_COND_INF (2 << 24)
-#define __M81_COND_ZERO (4 << 24)
-#define __M81_COND_NEG (8 << 24)
+# define __M81_COND_NAN (1 << 24)
+# define __M81_COND_INF (2 << 24)
+# define __M81_COND_ZERO (4 << 24)
+# define __M81_COND_NEG (8 << 24)
 
-#endif /* __LIBC_M81_MATH_INLINES */
+#endif /* __LIBC_INTENRAL_MATH_INLINES */
 
 /* The rest of the functions are available to the user.  */
 
@@ -374,14 +374,14 @@ __inline_functions (long double,l)
 
 /* Note that there must be no whitespace before the argument passed for
    NAME, to make token pasting work correctly with -traditional.  */
-#define __inline_forward_c(rettype, name, args1, args2)        \
+# define __inline_forward_c(rettype, name, args1, args2)       \
 extern __inline rettype __attribute__((__const__))     \
 name args1                                             \
 {                                                      \
   return __CONCAT(__,name) args2;                      \
 }
 
-#define __inline_forward(rettype, name, args1, args2)  \
+# define __inline_forward(rettype, name, args1, args2) \
 extern __inline rettype name args1                     \
 {                                                      \
   return __CONCAT(__,name) args2;                      \
@@ -391,76 +391,76 @@ __inline_forward(double,frexp, (double __value, int *__expptr),
                 (__value, __expptr))
 __inline_forward_c(double,floor, (double __x), (__x))
 __inline_forward_c(double,ceil, (double __x), (__x))
-#ifdef __USE_MISC
+# ifdef __USE_MISC
 __inline_forward_c(int,isinf, (double __value), (__value))
 __inline_forward_c(int,finite, (double __value), (__value))
 __inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
 __inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
-#endif
-#if defined __USE_MISC || defined __USE_XOPEN
-#ifndef __USE_ISOC9X /* Conflict with macro of same name.  */
+# endif
+# if defined __USE_MISC || defined __USE_XOPEN
+#  ifndef __USE_ISOC9X /* Conflict with macro of same name.  */
 __inline_forward_c(int,isnan, (double __value), (__value))
-#endif
-#endif
-#ifdef __USE_ISOC9X
+#  endif
+# endif
+# ifdef __USE_ISOC9X
 __inline_forward_c(double,nearbyint, (double __value), (__value))
 __inline_forward_c(long int,lrint, (double __value), (__value))
 __inline_forward_c(double,fma, (double __x, double __y, double __z),
                   (__x, __y, __z))
-#endif
-#ifdef __USE_GNU
+# endif
+# ifdef __USE_GNU
 __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
                 (__x, __sinx, __cosx))
-#endif
+# endif
 
-#if defined __USE_MISC || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_ISOC9X
 
 __inline_forward(float,frexpf, (float __value, int *__expptr),
                 (__value, __expptr))
 __inline_forward_c(float,floorf, (float __x), (__x))
 __inline_forward_c(float,ceilf, (float __x), (__x))
-#ifdef __USE_MISC
+#  ifdef __USE_MISC
 __inline_forward_c(int,isinff, (float __value), (__value))
 __inline_forward_c(int,finitef, (float __value), (__value))
 __inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
 __inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
 __inline_forward_c(int,isnanf, (float __value), (__value))
-#endif
-#ifdef __USE_ISOC9X
+#  endif
+# ifdef __USE_ISOC9X
 __inline_forward_c(float,nearbyintf, (float __value), (__value))
 __inline_forward_c(long int,lrintf, (float __value), (__value))
 __inline_forward_c(float,fmaf, (float __x, float __y, float __z),
                   (__x, __y, __z))
-#endif
-#ifdef __USE_GNU
+# endif
+# ifdef __USE_GNU
 __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
                 (__x, __sinx, __cosx))
-#endif
+# endif
 
 __inline_forward(long double,frexpl, (long double __value, int *__expptr),
                 (__value, __expptr))
 __inline_forward_c(long double,floorl, (long double __x), (__x))
 __inline_forward_c(long double,ceill, (long double __x), (__x))
-#ifdef __USE_MISC
+# ifdef __USE_MISC
 __inline_forward_c(int,isinfl, (long double __value), (__value))
 __inline_forward_c(int,finitel, (long double __value), (__value))
 __inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n))
 __inline_forward_c(long double,scalblnl, (long double __x, long int __n),
                   (__x, __n))
 __inline_forward_c(int,isnanl, (long double __value), (__value))
-#endif
-#ifdef __USE_ISOC9X
+# endif
+# ifdef __USE_ISOC9X
 __inline_forward_c(long double,nearbyintl, (long double __value), (__value))
 __inline_forward_c(long int,lrintl, (long double __value), (__value))
 __inline_forward_c(long double,fmal,
                   (long double __x, long double __y, long double __z),
                   (__x, __y, __z))
-#endif
-#ifdef __USE_GNU
+# endif
+# ifdef __USE_GNU
 __inline_forward(void,sincosl,
                 (long double __x, long double *__sinx, long double *__cosx),
                 (__x, __sinx, __cosx))
-#endif
+# endif
 
 #endif /* Use misc or ISO C9X */
 
index 7ea9fb014bfbb4b187c02a8eeb5940c8a0593c67..9c2d91f27144682039d9b1f7cdae1d2bc662d3e0 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index 59bc990f5b3321ae6089bd3bf016f132964b2956..d23d4f90d1d53175552c012f02db50b831fb0def 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index 1daa453618d90195aad56a52d31e1206e9ff5eef..505650a531400c2a84d6d8ef0510bc7f845e5fae 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index b3d151fadcabb3bf0f7d37a26eab2bc9f9dfe378..c36b64316ed516ffc2d975d8c912932e96e3eeca 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index a5923ab45007cdbcfc8559a4b8373838c44a0fde..93b44ff1309dd2c899090444b53d9e8952335a2a 100644 (file)
@@ -17,7 +17,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef SUFF
index 516d45904e0f5528be8f2bfb14d285e7d835a4de..5b263ec6ae80a36d228eb3418efd64526f33cfae 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index 348bc8fd9d8bce7603ea6dd1768e7c70e5e5d2b3..41de73fde7068087b77040a20c102ff708735e6c 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index c38327e5711463bbf276b3735e3280a4bdf57d2e..7f87e09e002036724fd36f77736b648478d47982 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index f3d6960dc1cbd37005591fb42e9230256d05bf1b..e6b676ba58491815753f1457a92b17ecd96da86e 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
index 53f8286b1429e7fc9382747afddfb1e894931273..095aa9803fd4943c5778d06b09d81b327f035a45 100644 (file)
@@ -18,7 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <complex.h>
 #include <math.h>
 
index 85e73b87e3b59663bc836aeb6bbcfa0a4932e5dd..3d560b30936ad975f3e3256c8e9b108ce404f9e3 100644 (file)
@@ -18,7 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <complex.h>
 #include <math.h>
 
index 86cc894a7eaa5e1b77fb4afa46d7e2fdf0ffc850..da28ebb4d3335b0725682919bf4408892dfc8ba0 100644 (file)
@@ -18,7 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <complex.h>
 #include <math.h>
 
index 8eecd961a6ed2756247474343c2bd09c82a2479c..ae456d3b912c4caf1b5b8c0529c47ba3009444a5 100644 (file)
@@ -18,7 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <complex.h>
 #include <math.h>
 
index 643a221b57d27e4778cec60399ab1982f2f01bf7..c95f9dc523c7085855e45636cfd831d797ab65e3 100644 (file)
@@ -18,7 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <complex.h>
 #include <math.h>
 
index 84a9a0b45defdcd143fc27ac33ccd3d5b5e0096f..4280fcc50bfbdd45103e20cbd4e78c8bd12741c0 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
index 2d8f7d5082a9a9bfa469bc46634ad95b67867ae1..aebcaa16ba0c6609017b9a350410d467e4107050 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef SUFF
index fa0d1d56db231ac03a31551362ced1dbd774c9eb..d8cafdbb0ce819efbb2b2288a7edfe200f13962f 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
index 9dfee644ed8d4034da2625246b0d602990a67757..37b6f63278e16c2084ba27f953e6dc14b79c05c6 100644 (file)
@@ -19,7 +19,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index 3c8528c4e837dfcd27e3c7fd37fd0d26e2859df9..4d06ae2651621c02cc4203671a59ed3fa50ac3d9 100644 (file)
@@ -19,7 +19,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index 55190b9eb368063d969e3cd07c1af287a484ac7c..14a815fd1a8a33ae844e02ed0f9e9faefcc42c6c 100644 (file)
@@ -19,7 +19,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 #include "math_private.h"
 
index 511d28880ca1bfd8f9eb47d3917daaf6c5e5c14b..7747057f1a3a80c0603f9f0e50b335d45f648b14 100644 (file)
@@ -19,7 +19,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef suffix
index ad0334faaa8141fc2e1e95e745a9167831dddc25..b9867df47547ceb200ae1d11ae606abf16e3ff04 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef SUFF
index 0332eccfd0cf4e209ce0f55088b52b9536a8ad27..7607fee78225782ffcea3e71bdec189d6ae16f22 100644 (file)
@@ -18,7 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef SUFF
index 1b219ec108fdfbb1a08aa5ee109f401d8cdbf1fe..12b737a5e9f2a0e1a041186e276ae10fda473e33 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #define scalbln __no_scalbln_decl
 #define scalblnf __no_scalblnf_decl
 #define scalblnl __no_scalblnl_decl
index ada21d0fb1f0d420c179ee7db983317afd7eb7ba..dda42e277563d5f2f21f69dd60a963c23168e24d 100644 (file)
@@ -16,7 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
 #include <math.h>
 
 #ifndef FUNC
index 2b6d5f9d56ec406d8a985f1d18e2e2fc642b81b8..c52d4af94db464251f70fb6a668d8426c9aa0d40 100644 (file)
@@ -56,3 +56,5 @@ __sysv_signal (sig, handler)
 
   return oact.sa_handler;
 }
+
+weak_alias (__sysv_signal, sysv_signal)
index a3de7b3c96277eee0dbb85c009f4137122e8fbac..9cd0a69fe34328a9f72d93d55860e52414930e64 100644 (file)
@@ -1,5 +1,6 @@
 fenv_const.c
 fenv_libc.h
+ppc-mcount.S
 quad_float.h
 fe_nomask.c
 t_sqrt.c
index 2af3b78da5c41a318dfd915369a748d653343d59..f3406d79162fb2e3516856616e13a16596354e38 100644 (file)
@@ -69,19 +69,20 @@ __getcwd (char *buf, size_t size)
   n = __readlink ("/proc/self/cwd", path, alloc_size - 1);
   if (n != -1)
     {
-      if (n >= alloc_size - 1)
+      if (path[0] == '/')
        {
-         if (size > 0)
-           return NULL;
+         if (n >= alloc_size - 1)
+           {
+             if (buf == NULL)
+               free (path);
+             return NULL;
+           }
+
+         path[n] = '\0';
+         return buf ?: (char *) realloc (path, (size_t) n + 1);
        }
       else
-       if (path[0] == '/')
-         {
-           path[n] = '\0';
-           return buf ?: (char *) realloc (path, (size_t) n + 1);
-         }
-       else
-         no_new_dcache = 1;
+       no_new_dcache = 1;
     }
 
   /* Set to no_new_dcache only if error indicates that proc doesn't exist.  */
index 861ca261de2c3290ad136c10461d747f1ddd18b4..468fed23e6ce617c23ce07ffa5925641daf68be8 100644 (file)
@@ -147,6 +147,7 @@ struct ifconf
 #define        ifc_buf ifc_ifcu.ifcu_buf       /* Buffer address.  */
 #define        ifc_req ifc_ifcu.ifcu_req       /* Array of structures.  */
 
+__BEGIN_DECLS
 
 /* Convert an interface name to an index, and vice versa.  */
 
@@ -167,4 +168,6 @@ extern struct if_nameindex *if_nameindex __P ((void));
 
 extern void if_freenameindex __P ((struct if_nameindex *__ptr));
 
+__END_DECLS
+
 #endif /* net/if.h */
diff --git a/sysdeps/unix/sysv/linux/pty.c b/sysdeps/unix/sysv/linux/pty.c
new file mode 100644 (file)
index 0000000..e64261c
--- /dev/null
@@ -0,0 +1,3 @@
+/* Linux does not has the `revoke' function.  */
+#define REVOKE(Line)
+#include <sysdeps/generic/pty.c>
index 406f55e170a99e208d0a3b34725e49b162c915be..fcb3cc8f95f1a198c8c62cb6085a243e620e3d39 100644 (file)
 # include <config.h>
 #endif
 
+/* Some hosts need this in order to declare localtime_r properly.  */
+#ifndef _REENTRANT
+# define _REENTRANT 1
+#endif
+
 #ifdef _LIBC
 # define HAVE_LIMITS_H 1
 # define HAVE_LOCALTIME_R 1
index 0ebc9130907688449e02e910e2710f9ce2813537..e09d0fd26f16c2125e91766e5953424c9c43597e 100644 (file)
 # include <config.h>
 #endif
 
+/* Some hosts need this in order to declare localtime_r properly.  */
+#ifndef _REENTRANT
+# define _REENTRANT 1
+#endif
+
 #ifdef _LIBC
 # define HAVE_LIMITS_H 1
 # define HAVE_MBLEN 1