List of known bugs (certainly very incomplete)
----------------------------------------------
-Time-stamp: <1997-10-31T16:49:39+0100 drepper>
+Time-stamp: <1997-11-02T15:10:48+0100 drepper>
This following list contains those bugs which I'm aware of. Please
make sure that bugs you report are not listed here. If you can fix one
checked for errors, but the whole file containing the same
category.
[PR libc/207]
-
-[ *] configuring with CFLAGS="-pipe" configure doesn't work
- with gcc. This seems to be a bug in gcc 2.7.2.x (egcs doesn't
- have this bug).
- [PR libc/245]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ulrich Drepper
drepper@cygnus.com
+1997-11-04 Ulrich Drepper <drepper@cygnus.com>
+
+ * manual/filesys.texi: Correct description of return value for
+ readdir_r.
+ * sysdeps/unix/readdir_r.c (__readdir_r): Return value of errno
+ not -1 in error case.
+ * sysdeps/generic/readdir_r.c (__readdir_r): Return ENOSYS not -1.
+ Reported by Jim Meyering <meyering@eng.ascend.com>.
+
+1997-11-02 Paul Eggert <eggert@twinsun.com>
+
+ * strftime.c: Use host's underlying strftime to access
+ locale-specific info. This is useful e.g. when building GNU
+ Emacs under Solaris 2.6.
+ (weekday_name, month_name): Omit if HAVE_STRFTIME.
+ (my_strftime): New macro, which names the strftime function that
+ this source file produces.
+ (strftime): #undef if emacs is defined; this works around Emacs 20.2's
+ method of compiling with -Dstrftime=emacs_strftime.
+ Also, declare as a function returning size_t, for similar reasons.
+ (my_strftime): If HAVE_STRFTIME, use underlying strftime to handle
+ locale-dependent formats like %a and %Ec.
+
+1997-11-02 Paul Eggert <eggert@twinsun.com>
+
+ * strftime.c (memcpy_lowcase, memcpy_uppcase, strftime):
+ Ensure that args to islower and isupper are valid unsigned
+ chars, even if char is signed.
+
+1997-11-04 Ulrich Drepper <drepper@cygnus.com>
+
+ * assert/Makefile (headers): Add assert.h, necessary after patch
+ to Makefiles.
+ * ctype/Makefile (headers): Likewise.
+ * pwd/Makefile (headers): Likewise.
+ * grp/Makefile (headers): Likewise.
+ Patch by NIIBE Yutaka <gniibe@mri.co.jp>.
+
+1997-11-04 03:08 Ulrich Drepper <drepper@cygnus.com>
+
+ * glibcbug.in: Add information about configured target.
+ Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
+
+ * elf/dl-lookup.c (_dl_lookup_versioned_symbol): Be prepared for
+ empty string as `reference_name' parameter.
+ * elf/rtld.c: Don't set real program name in l_name of main object.
+
+ * manual/creature.texi: Apply Paul Eggert's patch for better
+ _POSIX_C_SOURCE description.
+
+ * stdlib/strfmon.c: Fix numerous bugs in formatting.
+
+ * time/strptime.c [%Y]: Treat all years, not only those which fit
+ in time_t.
+ [%Oy]: Really store value.
+ Patches by Paul Eggert.
+
+ * wcsmbs/wchar.h: Fix documentation bugs. Declare wcsdup only
+ is __USE_GNU.
+
+1997-11-03 02:48 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/generic/bits/errno.h: Remove all error definitions. This
+ is only meant as a stub.
+
+1997-10-31 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * sysdeps/standalone/bits/errno.h: Copied from
+ sysdeps/generic/bits/errno.h and added all know error codes that
+ are used in glibc.
+
+1997-11-03 02:23 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/generic/make_siglist.c: Add comment to clarify use and
+ make sure the correct _NSIG value is used.
+ Patch by Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>.
+
+1997-11-03 00:20 Ulrich Drepper <drepper@cygnus.com>
+
+ * intl/localealias.c (read_alias_file): Correct handling of line
+ reader which sometimes skipped complete lines (PR 205).
+ Optimize a bit by using mempcpy.
+
+1997-11-02 16:59 Philipp Thomas <kthomas@gwdg.de>
+
+ * intl/localealias.c (read_alias_file): Correctly set map[].value
+ instead of overwriting map[].alias
+
+1997-11-02 15:32 Ulrich Drepper <drepper@cygnus.com>
+
+ * libc.map: Add _IO_flockfile and _IO_funlockfile.
+ Suggested by H.J. Lu <hjl@lucon.org>.
+
+1997-11-02 15:17 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf/dl-error.c (_dl_signal_error): Use _strerror_internal instead
+ of strerror.
+ * assert/assert-perr.c: Use _strerror_internal directly instead of
+ __strerror_r.
+ Suggested by Joe Keane <jgk@jgk.org>.
+
+1997-11-01 16:46 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * configure.in: Check for gcc-2.7.2 -pipe bug and hack around it
+ (PR 245).
+
+1997-11-01 Paul Eggert <eggert@twinsun.com>
+
+ * time/strptime.c (strptime_internal): Fix bug: %Oy forgot to
+ assign tm_year. Do not restrict %Y to years less than 2037 even
+ on 32-bit time_t hosts, as strptime returns an int tm_year, not a
+ time_t, and it's possible for programs to use the year without
+ having to use time_t.
+
1997-10-31 23:16 Ulrich Drepper <drepper@cygnus.com>
* posix/glob.c (glob): If calling glob_in_dir for a list which was
generated by a glob call disable GLOB_ERR since there might be
- non-directories in the list (PR203).
+ non-directories in the list (PR 203).
* posix/glob.h (GLOB_ONLYDIR): New flag.
(__GLOB_FLAGS): Add GLOB_ONLYDIR.
# Sub-makefile for assert portion of the library.
#
subdir := assert
+headers := assert.h
routines := assert assert-perr
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <sysdep.h>
+/* This is the internal function we use to generate the error string. */
+extern char *_strerror_internal __P ((int, char *, size_t));
+
+
extern const char *__assert_program_name; /* In assert.c. */
/* This function, when passed an error number, a filename, and a line
__assert_program_name ? ": " : "",
file, line,
function ? function : "", function ? ": " : "",
- __strerror_r (errnum, errbuf, sizeof errbuf));
+ _strerror_internal (errnum, errbuf, sizeof errbuf));
(void) fflush (stderr);
abort ();
#undef __need_Emath
#define __Emath_defined 1
-# define EDOM 1
-# define ERANGE 2
+# define EDOM XXX <--- fill in what is actually needed
+# define ERANGE XXX <--- fill in what is actually needed
#endif
#ifdef _ERRNO_H
-# define ENOSYS 3
-# define EINVAL 4
-# define ESPIPE 5
-# define EBADF 6
-# define ENOMEM 7
-# define EACCES 8
-# define ENFILE 9
-# define EMFILE 10
-# define ENOMSG 11
+# error "Define here all the missing error messages for the port. These"
+# error "must match the numbers of the kernel."
+# define Exxxx XXX
+...
#endif
#define __set_errno(val) errno = (val)
ac_n= ac_c='\c' ac_t=
fi
- if test -r /vmunix; then
- kernel_id=`strings /vmunix | grep UNIX`
- elif test -r /dynix; then
- kernel_id=`strings /dynix | grep DYNIX`
- else
- kernel_id=
- fi
-
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:764: checking host system type" >&5
+echo "configure:756: checking host system type" >&5
host_alias=$host
case "$host_alias" in
# This can take a while to compute.
sysdep_dir=$srcdir/sysdeps
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
-echo "configure:883: checking sysdep dirs" >&5
+echo "configure:875: checking sysdep dirs" >&5
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1084: checking for a BSD compatible install" >&5
+echo "configure:1076: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
INSTALL='\$(..)./install-sh -c'
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1138: checking whether ln -s works" >&5
+echo "configure:1130: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1163: checking for $ac_word" >&5
+echo "configure:1155: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1196: checking for $ac_word" >&5
+echo "configure:1188: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1225: checking for $ac_word" >&5
+echo "configure:1217: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1273: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1265: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1283 "configure"
+#line 1275 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
cross_linkable=yes
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1310: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1316: checking whether we are using GNU C" >&5
+echo "configure:1308: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
yes;
#endif
EOF
- if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if test -z "$CFLAGS"; then
CFLAGS="-g -O2"
fi
fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1354: checking build system type" >&5
+echo "configure:1346: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1377: checking for $ac_word" >&5
+echo "configure:1369: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1408: checking how to run the C preprocessor" >&5
+echo "configure:1400: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1423 "configure"
+#line 1415 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1440 "configure"
+#line 1432 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
# Determine whether we are using GNU binutils.
echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6
-echo "configure:1479: checking whether $AS is GNU as" >&5
+echo "configure:1471: checking whether $AS is GNU as" >&5
if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gnu_as=$libc_cv_prog_as_gnu
echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6
-echo "configure:1497: checking whether $LD is GNU ld" >&5
+echo "configure:1489: checking whether $LD is GNU ld" >&5
if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1521: checking for $ac_word" >&5
+echo "configure:1513: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1552: checking for $ac_word" >&5
+echo "configure:1544: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1583: checking for $ac_word" >&5
+echo "configure:1575: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1618: checking for $ac_word" >&5
+echo "configure:1610: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ksh", so it can be a program name with args.
set dummy ksh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1659: checking for $ac_word" >&5
+echo "configure:1651: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1705: checking for $ac_word" >&5
+echo "configure:1697: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
-echo "configure:1740: checking for signed size_t type" >&5
+echo "configure:1732: checking for signed size_t type" >&5
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
-echo "configure:1764: checking for libc-friendly stddef.h" >&5
+echo "configure:1756: checking for libc-friendly stddef.h" >&5
if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1769 "configure"
+#line 1761 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
-if { (eval echo configure:1784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
fi
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
-echo "configure:1803: checking whether we need to use -P to assemble .S files" >&5
+echo "configure:1795: checking whether we need to use -P to assemble .S files" >&5
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi
+# gcc 2.7.x has a bug where if -pipe is set, the assembler will always
+# be told to read stdin. This causes the compiler to hang when fed an
+# .s file.
+if test $ac_cv_prog_gcc = yes; then
+ case `${CC-cc} -v 2>&1` in
+ *2.7*)
+ # We must check this even if -pipe is not given here, because the user
+ # might do `make CFLAGS=-pipe'.
+ echo $ac_n "checking for gcc 2.7.x -pipe bug""... $ac_c" 1>&6
+echo "configure:1826: checking for gcc 2.7.x -pipe bug" >&5
+if eval "test \"`echo '$''{'libc_cv_gcc_pipe_bug'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat >conftest.s <<EOF
+foo:
+EOF
+ if ${CC-cc} -pipe -c conftest.s <conftest.s 2>/dev/null; then
+ libc_cv_gcc_pipe_bug=no
+ else
+ libc_cv_gcc_pipe_bug=yes
+ fi
+ rm -f conftest*
+fi
+
+echo "$ac_t""$libc_cv_gcc_pipe_bug" 1>&6
+ if test $libc_cv_gcc_pipe_bug = yes; then
+ makeCC="${CC-cc} -B\$(common-objpfx)"
+ makeCFLAGS=$CFLAGS
+ CFLAGS=`echo $CFLAGS |sed 's/-pipe//'`
+ fi;;
+ *) libc_cv_gcc_pipe_bug=no;;
+ esac
+else
+ libc_cv_gcc_pipe_bug=no
+fi
+
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
-echo "configure:1826: checking for assembler global-symbol directive" >&5
+echo "configure:1854: checking for assembler global-symbol directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
-echo "configure:1856: checking for .set assembler directive" >&5
+echo "configure:1884: checking for .set assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
-echo "configure:1890: checking for .symver assembler directive" >&5
+echo "configure:1918: checking for .symver assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
-echo "configure:1909: checking for ld --version-script" >&5
+echo "configure:1937: checking for ld --version-script" >&5
if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
-nostartfiles -nostdlib
-Wl,--version-script,conftest.map
- 1>&5'; { (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
+ 1>&5'; { (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_ld_version_script_option=yes
else
if test $elf = yes; then
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
-echo "configure:1959: checking for .previous assembler directive" >&5
+echo "configure:1987: 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
.section foo_section
.previous
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_previous_directive=yes
else
libc_cv_asm_previous_directive=no
else
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
-echo "configure:1983: checking for .popsection assembler directive" >&5
+echo "configure:2011: 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
.pushsection foo_section
.popsection
EOF
- if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_popsection_directive=yes
else
libc_cv_asm_popsection_directive=no
if test $elf != yes; then
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
-echo "configure:2011: checking for .init and .fini sections" >&5
+echo "configure:2039: 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 2016 "configure"
+#line 2044 "configure"
#include "confdefs.h"
int main() {
asm (".text");
; return 0; }
EOF
-if { (eval echo configure:2025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
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:2053: checking for _ prefix on C symbol names" >&5
+echo "configure:2081: 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 2058 "configure"
+#line 2086 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() {
glibc_foobar ();
; return 0; }
EOF
-if { (eval echo configure:2065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
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:2080: checking for _ prefix on C symbol names" >&5
+echo "configure:2108: 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 2085 "configure"
+#line 2113 "configure"
#include "confdefs.h"
void underscore_test(void) {
return; }
EOF
-if { (eval echo configure:2090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2118: \"$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
libc_cv_asm_weakext_directive=no
else
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
-echo "configure:2123: checking for assembler .weak directive" >&5
+echo "configure:2151: 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
if test $libc_cv_asm_weak_directive = no; then
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
-echo "configure:2146: checking for assembler .weakext directive" >&5
+echo "configure:2174: 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
fi
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
-echo "configure:2183: checking for ld --no-whole-archive" >&5
+echo "configure:2211: 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
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
- -o conftest conftest.c 1>&5'; { (eval echo configure:2194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2222: \"$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
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:2205: checking for gcc -fno-exceptions" >&5
+echo "configure:2233: 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
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions
- -o conftest conftest.c 1>&5'; { (eval echo configure:2216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c 1>&5'; { (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_no_exceptions=yes
else
libc_cv_gcc_no_exceptions=no
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:2227: checking for DWARF2 unwind info support" >&5
+echo "configure:2255: 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 2232 "configure"
+#line 2260 "configure"
static char __EH_FRAME_BEGIN__;
_start ()
{
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ -o conftest conftest.c -lgcc >&5'; { (eval echo configure:2281: \"$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
fi
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
-echo "configure:2311: checking OS release for uname" >&5
+echo "configure:2339: 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
uname_release="$libc_cv_uname_release"
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
-echo "configure:2333: checking OS version for uname" >&5
+echo "configure:2361: 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
fi
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
-echo "configure:2355: checking stdio selection" >&5
+echo "configure:2383: checking stdio selection" >&5
case $stdio in
libio) cat >> confdefs.h <<\EOF
echo "$ac_t""$stdio" 1>&6
echo $ac_n "checking ldap selection""... $ac_c" 1>&6
-echo "configure:2367: checking ldap selection" >&5
+echo "configure:2395: checking ldap selection" >&5
case $add_ons in
*ldap*)
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
+if test $libc_cv_gcc_pipe_bug = yes; then
+ realCC=$CC
+ CC=$makeCC
+ CFLAGS=$makeCFLAGS
+fi
+ if test -r /vmunix; then
+ kernel_id=`strings /vmunix | grep UNIX`
+ elif test -r /dynix; then
+ kernel_id=`strings /dynix | grep DYNIX`
+ else
+ kernel_id=
+ fi
+
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
done
EOF
cat >> $CONFIG_STATUS <<EOF
+realCC=$realCC
echo '$config_vars' >> config.make; test -d bits || mkdir bits
EOF
cat >> $CONFIG_STATUS <<\EOF
+if test "$realCC"; then
+ sed -e 's/%{pipe:-}/%|/g' `$realCC -print-file-name=specs` >specsT
+ mv specsT specs
+fi
+
exit 0
EOF
chmod +x $CONFIG_STATUS
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi
+# gcc 2.7.x has a bug where if -pipe is set, the assembler will always
+# be told to read stdin. This causes the compiler to hang when fed an
+# .s file.
+if test $ac_cv_prog_gcc = yes; then
+ case `${CC-cc} -v 2>&1` in
+ *2.7*)
+ # We must check this even if -pipe is not given here, because the user
+ # might do `make CFLAGS=-pipe'.
+ AC_CACHE_CHECK(for gcc 2.7.x -pipe bug, libc_cv_gcc_pipe_bug, [dnl
+ cat >conftest.s <<EOF
+foo:
+EOF
+ if ${CC-cc} -pipe -c conftest.s <conftest.s 2>/dev/null; then
+ libc_cv_gcc_pipe_bug=no
+ else
+ libc_cv_gcc_pipe_bug=yes
+ fi
+ rm -f conftest*])
+ if test $libc_cv_gcc_pipe_bug = yes; then
+ makeCC="${CC-cc} -B\$(common-objpfx)"
+ makeCFLAGS=$CFLAGS
+ CFLAGS=`echo $CFLAGS |sed 's/-pipe//'`
+ fi;;
+ *) libc_cv_gcc_pipe_bug=no;;
+ esac
+else
+ libc_cv_gcc_pipe_bug=no
+fi
+
AC_CACHE_CHECK(for assembler global-symbol directive,
libc_cv_asm_global_directive, [dnl
libc_cv_asm_global_directive=UNKNOWN
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
AC_SUBST(VERSION)
+if test $libc_cv_gcc_pipe_bug = yes; then
+ realCC=$CC
+ CC=$makeCC
+ CFLAGS=$makeCFLAGS
+fi
+AC_OUTPUT_COMMANDS([
+if test "$realCC"; then
+ sed -e 's/%{pipe:-}/%|/g' `$realCC -print-file-name=specs` >specsT
+ mv specsT specs
+fi], [realCC=$realCC])
+
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
[echo '$config_vars' >> config.make; test -d bits || mkdir bits])
# Sub-makefile for ctype portion of the library.
#
subdir := ctype
+headers := ctype.h
routines := ctype ctype-extn ctype_l
aux := ctype-info
#include <stdlib.h>
#include <string.h>
+/* This is the internal function we use to generate the error string. */
+extern char *_strerror_internal __P ((int, char *, size_t));
+
/* This structure communicates state between _dl_catch_error and
_dl_signal_error. */
struct catch
{
/* Lossage while resolving the program's own symbols is always fatal. */
extern char **_dl_argv; /* Set in rtld.c at startup. */
+ char buffer[1024];
_dl_sysdep_fatal (_dl_argv[0] ?: "<program name unknown>",
": error in loading shared libraries: ",
objname ?: "", objname ? ": " : "",
errstring, errcode ? ": " : "",
- errcode ? strerror (errcode) : "", "\n", NULL);
+ (errcode
+ ? _strerror_internal (errcode, buffer, sizeof buffer)
+ : ""), "\n", NULL);
}
}
/* We need not handle `receiver' since setting a `catch' is handled
before it. */
- /* Some systems (.e.g, SPARC) handle constructors to local variables
+ /* Some systems (e.g., SPARC) handle constructors to local variables
inefficient. So we initialize `c' by hand. */
c.errstring = NULL;
c.objname = NULL;
const struct r_found_version *version,
int reloc_type)
{
+ extern char **_dl_argv;
const unsigned long int hash = _dl_elf_hash (undef_name);
struct sym_val current_value = { 0, NULL };
struct link_map **scope;
if (res < 0)
/* Oh, oh. The file named in the relocation entry does not
contain the needed symbol. */
- _dl_signal_error (0, reference_name,
+ _dl_signal_error (0, (*reference_name
+ ? reference_name
+ : (_dl_argv[0] ?: "<main program>")),
make_string ("symbol ", undef_name, ", version ",
version->name,
" not defined in file ",
{
/* Create a link_map for the executable itself.
This will be what dlopen on "" returns. */
- main_map = _dl_new_object (_dl_argv[0] ?: (char *) "<main program>",
- "", lt_executable);
+ main_map = _dl_new_object ((char *) "", "", lt_executable);
if (main_map == NULL)
_dl_sysdep_fatal ("cannot allocate memory for link map\n", NULL);
main_map->l_phdr = phdr;
VERSION="@VERSION@"
BUGGLIBC="bugs@gnu.org"
ADDONS="@subdirs@"
+HOST="@host@"
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
export PATH
>Release: libc-${VERSION}
>Environment:
$ENVIRONMENT_C
+`[ -n "$HOST" ] && echo Host type: $HOST`
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
# Sub-makefile for grp portion of the library.
#
subdir := grp
+headers := grp.h
routines := fgetgrent initgroups setgroups \
getgrent getgrgid getgrnam \
# define strcasecmp __strcasecmp
# define strdup __strdup
+# define mempcpy __mempcpy
+# define HAVE_MEMPCPY 1
+
/* We need locking here since we can be called from different palces. */
# include <bits/libc-lock.h>
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
ADD_BLOCK (block_list, full_fname);
+#ifdef HAVE_MEMPCPY
+ mempcpy (mempcpy (full_fname, fname, fname_len),
+ aliasfile, sizeof aliasfile);
+#else
memcpy (full_fname, fname, fname_len);
memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
fp = fopen (full_fname, "r");
if (fp == NULL)
char *value;
char *cp;
- if (fgets (buf, BUFSIZ, fp) == NULL)
+ if (fgets (buf, sizeof buf, fp) == NULL)
/* EOF reached. */
break;
+ /* Possibly not the whole line fits into the buffer. Ignore
+ the rest of the line. */
+ if (strchr (buf, '\n') == NULL)
+ {
+ char altbuf[BUFSIZ];
+ do
+ if (fgets (altbuf, sizeof altbuf, fp) == NULL)
+ /* Make sure the inner loop will be left. The outer loop
+ will exit at the `feof' test. */
+ break;
+ while (strchr (altbuf, '\n') == NULL);
+ }
+
cp = buf;
/* Ignore leading white space. */
while (isspace (cp[0]))
alias, alias_len);
string_space_act += alias_len;
- map[nmap].alias = memcpy (&string_space[string_space_act],
+ map[nmap].value = memcpy (&string_space[string_space_act],
value, value_len);
string_space_act += value_len;
++added;
}
}
-
- /* Possibly not the whole line fits into the buffer. Ignore
- the rest of the line. */
- while (strchr (cp, '\n') == NULL)
- {
- cp = buf;
- if (fgets (buf, BUFSIZ, fp) == NULL)
- /* Make sure the inner loop will be left. The outer loop
- will exit at the `feof' test. */
- *cp = '\n';
- }
}
/* Should we test for ferror()? I think we have to silently ignore
_IO_seekmark; _IO_unsave_markers; _IO_str_overflow;
_IO_str_underflow; _IO_str_init_static; _IO_str_init_readonly;
_IO_str_seekoff; _IO_str_pbackfail; _IO_file_jumps;
- _IO_peekc_locked;
+ _IO_peekc_locked; _IO_flockfile; _IO_funlockfile;
__vsscanf; __vfscanf; __vsnprintf;
_rpc_dtablesize; _null_auth; _seterr_reply;
__res_randomid;
If you define this macro, then the functionality from the POSIX.1
standard (IEEE Standard 1003.1) is available, as well as all of the
@w{ISO C} facilities.
+
+The state of @code{_POSIX_SOURCE} is irrelevant if you define the
+macro @code{_POSIX_C_SOURCE} to a positive integer.
@end defvr
@comment (none)
@comment POSIX.2
-@defvr Macro _POSIX_C_SOURCE
-If you define this macro with a value of @code{1}, then the
-functionality from the POSIX.1 standard (IEEE Standard 1003.1) is made
-available. If you define this macro with a value of @code{2}, then both
-the functionality from the POSIX.1 standard and the functionality from
-the POSIX.2 standard (IEEE Standard 1003.2) are made available. This is
-in addition to the @w{ISO C} facilities.
+Define this macro to a positive integer to control which POSIX
+functionality is made available. The greater the value of this macro,
+the more functionality is made available.
+
+If you define this macro to a value greater than or equal to @code{1},
+then the functionality from the 1990 edition of the POSIX.1 standard
+(IEEE Standard 1003.1-1990) is made available.
+
+If you define this macro to a value greater than or equal to @code{2},
+then the functionality from the 1992 edition of the POSIX.2 standard
+(IEEE Standard 1003.2-1992) is made available.
+
+If you define this macro to a value greater than or equal to @code{199309L},
+then the functionality from the 1993 edition of the POSIX.1b standard
+(IEEE Standard 1003.1b-1993) is made available.
+
+Greater values for @code{_POSIX_C_SOURCE} will enable future extensions.
+The POSIX standards process will define these values as necessary, and
+the GNU C Library should support them some time after they become standardized.
+The 1996 edition of POSIX.1 (ISO/IEC 9945-1: 1996) states that
+if you define @code{_POSIX_C_SOURCE} to a value greater than
+or equal to @code{199506L}, then the functionality from the 1996
+edition is made available.
The Single Unix Specification specify that setting this macro to the
value @code{199506L} selects all the values specified by the POSIX
successfully. In this case a pointer to the result is returned in
*@var{result}. It is not required that *@var{result} is the same as
@var{entry}. If something goes wrong while executing @code{readdir_r}
-the function returns @code{-1}. The @code{errno} variable is set like
-described for @code{readdir}.
+the function returns a value indicating the error (as described for
+@code{readdir}).
@strong{Portability Note:} On some systems, @code{readdir_r} may not
return a terminated string as the file name even if no @code{d_reclen}
# Sub-makefile for pwd portion of the library.
#
subdir := pwd
+headers := pwd.h
routines := fgetpwent getpw putpwent \
getpwent getpwnam getpwuid \
va_end (ap);
return -1;
}
- n_sign_posn = 5; /* This is a else unused value. */
+ p_sign_posn = 0;
+ n_sign_posn = 0;
continue;
case '!': /* Don't print the currency symbol. */
print_curr_symbol = 0;
break;
}
+ /* If not specified by the format string now find the values for
+ the format specification. */
+ if (p_sign_posn == -1)
+ p_sign_posn = *_NL_CURRENT (LC_MONETARY, P_SIGN_POSN);
+ if (n_sign_posn == -1)
+ n_sign_posn = *_NL_CURRENT (LC_MONETARY, N_SIGN_POSN);
+
if (isdigit (*fmt))
{
/* Parse field width. */
sign_char = '-';
cs_precedes = *_NL_CURRENT (LC_MONETARY, N_CS_PRECEDES);
sep_by_space = *_NL_CURRENT (LC_MONETARY, N_SEP_BY_SPACE);
- /* If the '(' flag is not given use the sign position from
- the current locale. */
- if (n_sign_posn == -1)
- sign_posn = *_NL_CURRENT (LC_MONETARY, N_SIGN_POSN);
- else
- /* This means use parentheses. */
- sign_posn = 0;
+ sign_posn = n_sign_posn;
}
else
{
sign_char = ' ';
cs_precedes = *_NL_CURRENT (LC_MONETARY, P_CS_PRECEDES);
sep_by_space = *_NL_CURRENT (LC_MONETARY, P_SEP_BY_SPACE);
- if (n_sign_posn == -1)
- sign_posn = *_NL_CURRENT (LC_MONETARY, P_SIGN_POSN);
- else
- /* Here we don't set SIGN_POSN to 0 because we don'want to
- print <SP> instead of the braces and this is what the
- value 5 means. */
- sign_posn = 5;
+ sign_posn = p_sign_posn;
}
/* Set default values for unspecified information. */
startp = dest; /* Remember start so we can compute length. */
if (sign_posn == 0)
- out_char (left_paren);
- if (sign_posn == 5) /* This is for positive number and ( flag. */
- out_char (' ');
+ out_char (is_negative ? left_paren : ' ');
if (cs_precedes)
{
}
if (sign_posn == 0)
- out_char (right_paren);
- if (sign_posn == 5)
- out_char (' '); /* This is for positive number and ( flag. */
+ out_char (is_negative ? right_paren : ' ');
/* Now test whether the output width is filled. */
if (dest - startp < width)
#undef __need_Emath
#define __Emath_defined 1
-# define EDOM 1
-# define ERANGE 2
+# define EDOM XXX <--- fill in what is actually needed
+# define ERANGE XXX <--- fill in what is actually needed
#endif
#ifdef _ERRNO_H
-# define ENOSYS 3
-# define EINVAL 4
-# define ESPIPE 5
-# define EBADF 6
-# define ENOMEM 7
-# define EACCES 8
-# define ENFILE 9
-# define EMFILE 10
-# define ENOMSG 11
+# error "Define here all the missing error messages for the port. These"
+# error "must match the numbers of the kernel."
+# define Exxxx XXX
+...
#endif
#define __set_errno(val) errno = (val)
Boston, MA 02111-1307, USA. */
#include <stdio.h>
+
+/* Include signal.h now so that we can safely reinclude it again in
+ signame.c later on. We completely override the definitions, we
+ just have to be sure that the include guard in signal.h keeps it
+ from redefining the signal values. */
#include <signal.h>
/* Get this configuration's defns of the signal numbers. */
#define HAVE_PSIGNAL
#define sys_siglist my_siglist /* Avoid clash with signal.h. */
+#undef NSIG
+#define NSIG _NSIG /* make sure that the value from SIGNUM_H is used. */
+
#include "signame.c"
{
__set_errno (ENOSYS);
*result = NULL;
- return -1;
+ return ENOSYS;
}
weak_alias (__readdir_r, readdir_r)
--- /dev/null
+/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants. */
+
+#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
+#undef __need_Emath
+#define __Emath_defined 1
+
+# define EDOM 1
+# define ERANGE 2
+#endif
+
+#ifdef _ERRNO_H
+# define ENOSYS 3
+# define EINVAL 4
+# define ESPIPE 5
+# define EBADF 6
+# define ENOMEM 7
+# define EACCES 8
+# define ENFILE 9
+# define EMFILE 10
+# define ENOMSG 11
+# define ENAMETOOLONG 12
+# define ELOOP 13
+# define ENOMSG 14
+# define E2BIG 15
+# define EINTR 16
+# define EILSEQ 17
+# define ENOEXEC 18
+# define ENOENT 19
+# define EPROTOTYPE 20
+# define ESRCH 21
+# define EPERM 22
+# define EEXIST 23
+# define ENOTDIR 24
+# define ESTALE 25
+# define ENOTTY 26
+# define EISDIR 27
+# define EOPNOTSUPP 28
+# define EAGAIN 29
+# define EIO 30
+# define ENOSPC 31
+# define EBUSY 32
+#endif
+
+#define __set_errno(val) errno = (val)
__libc_lock_unlock (dirp->lock);
- return dp != NULL ? 0 : -1;
+ return dp != NULL ? 0 : errno;
}
weak_alias (__readdir_r, readdir_r)
sys/acct.h
sys/io.h
sys/procfs.h
-xstatconv.c
\ No newline at end of file
+xstatconv.c
size_t len;
{
while (len-- > 0)
- dest[len] = TOLOWER (src[len]);
+ dest[len] = TOLOWER ((unsigned char) src[len]);
return dest;
}
size_t len;
{
while (len-- > 0)
- dest[len] = TOUPPER (src[len]);
+ dest[len] = TOUPPER ((unsigned char) src[len]);
return dest;
}
}
-#ifndef _NL_CURRENT
+#if !(defined _NL_CURRENT || HAVE_STRFTIME)
static char const weekday_name[][10] =
{
"Sunday", "Monday", "Tuesday", "Wednesday",
#endif
+#ifdef emacs
+# define my_strftime emacs_strftime
+ /* Emacs 20.2 uses `-Dstrftime=emacs_strftime' when compiling,
+ because that's how strftime used to be configured.
+ Undo this, since it gets in the way of accessing the underlying strftime,
+ which is needed for things like %Ec in Solaris.
+ The following two lines can be removed once Emacs stops compiling with
+ `-Dstrftime=emacs_strftime'. */
+# undef strftime
+size_t strftime __P ((char *, size_t, const char *, const struct tm *));
+#else
+# define my_strftime strftime
+#endif
+
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
Work around this bug by copying *tp before it might be munged. */
size_t _strftime_copytm __P ((char *, size_t, const char *,
const struct tm *));
size_t
- strftime (s, maxsize, format, tp)
+ my_strftime (s, maxsize, format, tp)
char *s;
size_t maxsize;
const char *format;
tmcopy = *tp;
return _strftime_copytm (s, maxsize, format, &tmcopy);
}
-# ifdef strftime
-# undef strftime
-# endif
-# define strftime(S, Maxsize, Format, Tp) \
+# undef my_strftime
+# define my_strftime(S, Maxsize, Format, Tp) \
_strftime_copytm (S, Maxsize, Format, Tp)
#endif
anywhere, so to determine how many characters would be
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
size_t
-strftime (s, maxsize, format, tp)
+my_strftime (s, maxsize, format, tp)
char *s;
size_t maxsize;
const char *format;
size_t am_len = strlen (a_month);
size_t ap_len = strlen (ampm);
#else
+# if !HAVE_STRFTIME
const char *const f_wkday = weekday_name[tp->tm_wday];
const char *const f_month = month_name[tp->tm_mon];
const char *const a_wkday = f_wkday;
size_t aw_len = 3;
size_t am_len = 3;
size_t ap_len = 2;
+# endif
#endif
+#if defined _NL_CURRENT || !HAVE_STRFTIME
size_t wkday_len = strlen (f_wkday);
size_t month_len = strlen (f_month);
+#endif
const char *zone;
size_t zonelen;
size_t i = 0;
int to_lowcase = 0;
int to_uppcase = 0;
int change_case = 0;
+ int format_char;
#if DO_MULTIBYTE
}
/* Now do the specified format. */
- switch (*f)
+ format_char = *f;
+ switch (format_char)
{
#define DO_NUMBER(d, v) \
digits = width == -1 ? d : width; \
to_uppcase = 1;
to_lowcase = 0;
}
+#if defined _NL_CURRENT || !HAVE_STRFTIME
cpy (aw_len, a_wkday);
break;
+#else
+ goto underlying_strftime;
+#endif
case 'A':
if (modifier != 0)
to_uppcase = 1;
to_lowcase = 0;
}
+#if defined _NL_CURRENT || !HAVE_STRFTIME
cpy (wkday_len, f_wkday);
break;
+#else
+ goto underlying_strftime;
+#endif
case 'b':
case 'h': /* POSIX.2 extension. */
if (modifier != 0)
goto bad_format;
+#if defined _NL_CURRENT || !HAVE_STRFTIME
cpy (am_len, a_month);
break;
+#else
+ goto underlying_strftime;
+#endif
case 'B':
if (modifier != 0)
to_uppcase = 1;
to_lowcase = 0;
}
+#if defined _NL_CURRENT || !HAVE_STRFTIME
cpy (month_len, f_month);
break;
+#else
+ goto underlying_strftime;
+#endif
case 'c':
if (modifier == 'O')
&& *(subfmt = _NL_CURRENT (LC_TIME, ERA_D_T_FMT)) != '\0'))
subfmt = _NL_CURRENT (LC_TIME, D_T_FMT);
#else
+# if HAVE_STRFTIME
+ goto underlying_strftime;
+# else
subfmt = "%a %b %e %H:%M:%S %Y";
+# endif
#endif
subformat:
{
char *old_start = p;
- size_t len = strftime (NULL, maxsize - i, subfmt, tp);
+ size_t len = my_strftime (NULL, maxsize - i, subfmt, tp);
if (len == 0 && *subfmt)
return 0;
- add (len, strftime (p, maxsize - i, subfmt, tp));
+ add (len, my_strftime (p, maxsize - i, subfmt, tp));
if (to_uppcase)
while (old_start < p)
{
- *old_start = TOUPPER (*old_start);
+ *old_start = TOUPPER ((unsigned char) *old_start);
++old_start;
}
}
break;
+#if HAVE_STRFTIME && ! (defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY)
+ underlying_strftime:
+ {
+ /* The relevant information is available only via the
+ underlying strftime implementation, so use that. */
+ char ufmt[4];
+ char *u = ufmt;
+ char ubuf[1024]; /* enough for any single format in practice */
+ size_t len;
+ *u++ = '%';
+ if (modifier != 0)
+ *u++ = modifier;
+ *u++ = format_char;
+ *u = '\0';
+ len = strftime (ubuf, sizeof ubuf, ufmt, tp);
+ if (len == 0)
+ return 0;
+ cpy (len, ubuf);
+ }
+ break;
+#endif
+
case 'C': /* POSIX.2 extension. */
if (modifier == 'O')
goto bad_format;
-#if HAVE_STRUCT_ERA_ENTRY
if (modifier == 'E')
{
+#if HAVE_STRUCT_ERA_ENTRY
struct era_entry *era = _nl_get_era_entry (tp);
if (era)
{
cpy (len, era->name_fmt);
break;
}
- }
+#else
+# if HAVE_STRFTIME
+ goto underlying_strftime;
+# endif
#endif
+ }
+
{
int year = tp->tm_year + TM_YEAR_BASE;
DO_NUMBER (1, year / 100 - (year % 100 < 0));
&& *(subfmt = _NL_CURRENT (LC_TIME, ERA_D_FMT)) != '\0'))
subfmt = _NL_CURRENT (LC_TIME, D_FMT);
goto subformat;
-#endif
+#else
+# if HAVE_STRFTIME
+ goto underlying_strftime;
+# else
/* Fall through. */
+# endif
+#endif
case 'D': /* POSIX.2 extension. */
if (modifier != 0)
goto bad_format;
do_number:
/* Format the number according to the MODIFIER flag. */
-#ifdef _NL_CURRENT
if (modifier == 'O' && 0 <= number_value)
{
+#ifdef _NL_CURRENT
/* Get the locale specific alternate representation of
the number NUMBER_VALUE. If none exist NULL is returned. */
const char *cp = _nl_get_alt_digit (number_value);
break;
}
}
- }
+#else
+# if HAVE_STRFTIME
+ goto underlying_strftime;
+# endif
#endif
+ }
{
unsigned int u = number_value;
case 'P':
to_lowcase = 1;
+#if !defined _NL_CURRENT && HAVE_STRFTIME
+ format_char = 'p';
+#endif
/* FALLTHROUGH */
case 'p':
to_uppcase = 0;
to_lowcase = 1;
}
+#if defined _NL_CURRENT || !HAVE_STRFTIME
cpy (ap_len, ampm);
break;
+#else
+ goto underlying_strftime;
+#endif
case 'R': /* GNU extension. */
subfmt = "%H:%M";
&& *(subfmt = _NL_CURRENT (LC_TIME, ERA_T_FMT)) != '\0'))
subfmt = _NL_CURRENT (LC_TIME, T_FMT);
goto subformat;
-#endif
+#else
+# if HAVE_STRFTIME
+ goto underlying_strftime;
+# else
/* Fall through. */
+# endif
+#endif
case 'T': /* POSIX.2 extension. */
subfmt = "%H:%M:%S";
goto subformat;
DO_NUMBER (1, tp->tm_wday);
case 'Y':
-#if HAVE_STRUCT_ERA_ENTRY
if (modifier == 'E')
{
+#if HAVE_STRUCT_ERA_ENTRY
struct era_entry *era = _nl_get_era_entry (tp);
if (era)
{
subfmt = strchr (era->name_fmt, '\0') + 1;
goto subformat;
}
- }
+#else
+# if HAVE_STRFTIME
+ goto underlying_strftime;
+# endif
#endif
+ }
if (modifier == 'O')
goto bad_format;
else
DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
case 'y':
-#if HAVE_STRUCT_ERA_ENTRY
if (modifier == 'E')
{
+#if HAVE_STRUCT_ERA_ENTRY
struct era_entry *era = _nl_get_era_entry (tp);
if (era)
{
DO_NUMBER (1, (era->offset
+ (era->direction == '-' ? -delta : delta)));
}
- }
+#else
+# if HAVE_STRFTIME
+ goto underlying_strftime;
+# endif
#endif
+ }
DO_NUMBER (2, (tp->tm_year % 100 + 100) % 100);
case 'Z':
break;
case 'Y':
/* Match year including century number. */
- if (sizeof (time_t) > 4)
- get_number (0, 9999);
- else
- get_number (0, 2036);
+ get_number (0, 9999);
tm->tm_year = val - 1900;
break;
case 'Z':
case 'y':
/* Match year within century using alternate numeric symbols. */
get_alt_number (0, 99);
+ tm->tm_year = val >= 69 ? val : val + 100;
break;
default:
return NULL;
`wcscoll' to the original strings. */
extern size_t __wcsxfrm_l __P ((wchar_t *__s1, __const wchar_t *__s2,
size_t __n, __locale_t __loc));
-#endif
/* Duplicate S, returning an identical malloc'd string. */
extern wchar_t *wcsdup __P ((__const wchar_t *__s));
+#endif
/* Find the first occurrence of WC in WCS. */
extern wchar_t *wcschr __P ((__const wchar_t *__wcs, wchar_t __wc));
extern wchar_t *wcsrchr __P ((__const wchar_t *__wcs, wchar_t __wc));
/* Return the length of the initial segmet of WCS which
- consists entirely of wide-characters not in REJECT. */
+ consists entirely of wide characters not in REJECT. */
extern size_t wcscspn __P ((__const wchar_t *__wcs,
__const wchar_t *__reject));
/* Return the length of the initial segmet of WCS which
- consists entirely of wide-characters in ACCEPT. */
+ consists entirely of wide characters in ACCEPT. */
extern size_t wcsspn __P ((__const wchar_t *__wcs, __const wchar_t *__accept));
/* Find the first occurrence in WCS of any character in ACCEPT. */
extern wchar_t *wcspbrk __P ((__const wchar_t *__wcs,
__const wchar_t *__restrict __delim,
wchar_t **__restrict __ptr));
-/* Return the number of wide-characters in S. */
+/* Return the number of wide characters in S. */
extern size_t wcslen __P ((__const wchar_t *__s));
-/* Search N bytes of S for C. */
+/* Search N wide characters of S for C. */
extern wchar_t *wmemchr __P ((__const wchar_t *__s, wchar_t __c, size_t __n));
-/* Compare N bytes of S1 and S2. */
+/* Compare N wide characters of S1 and S2. */
extern int wmemcmp __P ((__const wchar_t *__restrict __s1,
__const wchar_t *__restrict __s2, size_t __n));
-/* Copy N bytes of SRC to DEST. */
+/* Copy N wide characters of SRC to DEST. */
extern wchar_t *wmemcpy __P ((wchar_t *__restrict __s1,
__const wchar_t *__restrict __s2, size_t __n));
-/* Copy N bytes of SRC to DEST, guaranteeing
+/* Copy N wide characters of SRC to DEST, guaranteeing
correct behavior for overlapping strings. */
extern wchar_t *wmemmove __P ((wchar_t *__s1, __const wchar_t *__s2,
size_t __n));
-/* Set N bytes of S to C. */
+/* Set N wide characters of S to C. */
extern wchar_t *wmemset __P ((wchar_t *__s, wchar_t __c, size_t __n));