1998-04-21 18:00  Ulrich Drepper  <drepper@cygnus.com>

	* iconv/gconv.c (__gconv): Remove bogus input buffer size computation.

	* iconv/gconv_open.c (__gconv_open): Initialize outbufend element.

	* iconv/gconv_simple.c (__gconv_transform_internal_ascii): Don't use
	character in comparison with uint32_t.
	(__gconv_transform_internal_utf8): Specify MAX_NEEDED_TO.
	(__gconv_transform_utf8_internal): Specify MAX_NEEDED_FROM.
	Optimize BODY a bit.

	* iconv/loop.c: Require MIN_NEEDED_INPUT and MIN_NEEDED_OUTPUT to
	be defined.

	* iconv/skeleton.c: Also reset converted counter in case of an error.
	Call reset function using correct value for output buffer start.

	* iconvdata/Makefile: Re-enable tests.

	* iconvdata/iso8859-1.c: Swap MIN_NEEDED_INPUT and MIN_NEEDED_OUTPUT
	value for to-conversion.

	* iconvdata/TESTS: Add new third column.
	* iconvdata/run-iconv-test.sh: Add support for charsets which are
	not ASCII based.
	* iconvdata/testdata/suntzus: New file.

	* elf/dl-minimal.c (__strtol_internal): Increment pointer to string
	while reading.  Correctly used base.  Little optimization.
	(__strtoul_internal): Likewise.

	* elf/rtld.c (dl_main): Test to avoid duplicate call of _dl_init_paths
	was wrong.  Use explicit variable.

1998-04-20 23:49  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* configure.in: Check for awk.
	* config.make.in: Add AWK to be substituted.

	* manual/xtract-typefun.awk: Rewrite to eliminate gawk extensions.
	* manual/users.texi: Fix typo exposed by above rewrite.

	* Makefile: Invoke awk using AWK variable.
	* csu/Makefile: Likewise.
	* elf/Makefile: Likewise.
	* mach/Makefile: Likewise.
	* manual/Makefile: Likewise.
	* sysdeps/gnu/Makefile: Likewise.
	* sysdeps/mach/hurd/Makefile: Likewise.
	* sysdeps/unix/Makefile: Likewise.
	* timezone/Makefile: Likewise.

1998-04-10  Gordon Matzigkeit  <gord@profitpress.com>

	* sysdeps/gnu/errlist.awk (ERR_REMAP): Implement error code to
	array index translation.
	(SYS_ERRLIST_ALIAS, SYS_NERR_ALIAS): Make weak aliases only if
	these are defined.

	* sysdeps/mach/hurd/Dist: Add errlist.c to distribution.

	* sysdeps/mach/hurd/errlist.c: New file.
	(ERR_TRANSLATE): Map Hurd error codes into errlist indices.
	(_hurd_errlist): The Hurd error list doesn't have Unix sys_errlist
	semantics, so rename it.

1998-04-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* iconvdata/run-iconv-test.sh: Make portable.  Always test all
	conversions.

1998-04-21 12:30  H.J. Lu  <hjl@gnu.org>

	* wcsmbs/wcsrtombs.c (__wcsrtombs): Initialize result to 0.
	* wcsmbs/wcsnrtombs.c: Likewise.

1998-04-21  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/dl-sysdep.c: Handle _dl_hwcap correctly.

	* wcsmbs/btowc.c (__btowc): Declare inptr as const char *.

	* time/strftime.c (my_strftime): Initialize pad variable in
	declaration.

	* iconvdata/big5.c: Don't use character constants in comparisons
	with unsigned value.

	* sysdeps/generic/setutxent.c: New file.
	* sysdeps/generic/getutxent.c: New file.
	* sysdeps/generic/endutxent.c: New file.
	* sysdeps/generic/getutxid.c: New file.
	* sysdeps/generic/getutxline.c: New file.
	* sysdeps/generic/pututxline.c: New file.
	* sysdeps/generic/utmpxname.c: New file.
	* sysdeps/generic/updwtmpx.c: New file.
This commit is contained in:
Ulrich Drepper 1998-04-21 18:15:51 +00:00
parent 26e119f15e
commit 5aa8ff620e
36 changed files with 2101 additions and 218 deletions

105
ChangeLog
View File

@ -1,3 +1,92 @@
1998-04-21 18:00 Ulrich Drepper <drepper@cygnus.com>
* iconv/gconv.c (__gconv): Remove bogus input buffer size computation.
* iconv/gconv_open.c (__gconv_open): Initialize outbufend element.
* iconv/gconv_simple.c (__gconv_transform_internal_ascii): Don't use
character in comparison with uint32_t.
(__gconv_transform_internal_utf8): Specify MAX_NEEDED_TO.
(__gconv_transform_utf8_internal): Specify MAX_NEEDED_FROM.
Optimize BODY a bit.
* iconv/loop.c: Require MIN_NEEDED_INPUT and MIN_NEEDED_OUTPUT to
be defined.
* iconv/skeleton.c: Also reset converted counter in case of an error.
Call reset function using correct value for output buffer start.
* iconvdata/Makefile: Re-enable tests.
* iconvdata/iso8859-1.c: Swap MIN_NEEDED_INPUT and MIN_NEEDED_OUTPUT
value for to-conversion.
* iconvdata/TESTS: Add new third column.
* iconvdata/run-iconv-test.sh: Add support for charsets which are
not ASCII based.
* iconvdata/testdata/suntzus: New file.
* elf/dl-minimal.c (__strtol_internal): Increment pointer to string
while reading. Correctly used base. Little optimization.
(__strtoul_internal): Likewise.
* elf/rtld.c (dl_main): Test to avoid duplicate call of _dl_init_paths
was wrong. Use explicit variable.
1998-04-20 23:49 Zack Weinberg <zack@rabi.phys.columbia.edu>
* configure.in: Check for awk.
* config.make.in: Add AWK to be substituted.
* manual/xtract-typefun.awk: Rewrite to eliminate gawk extensions.
* manual/users.texi: Fix typo exposed by above rewrite.
* Makefile: Invoke awk using AWK variable.
* csu/Makefile: Likewise.
* elf/Makefile: Likewise.
* mach/Makefile: Likewise.
* manual/Makefile: Likewise.
* sysdeps/gnu/Makefile: Likewise.
* sysdeps/mach/hurd/Makefile: Likewise.
* sysdeps/unix/Makefile: Likewise.
* timezone/Makefile: Likewise.
1998-04-10 Gordon Matzigkeit <gord@profitpress.com>
* sysdeps/gnu/errlist.awk (ERR_REMAP): Implement error code to
array index translation.
(SYS_ERRLIST_ALIAS, SYS_NERR_ALIAS): Make weak aliases only if
these are defined.
* sysdeps/mach/hurd/Dist: Add errlist.c to distribution.
* sysdeps/mach/hurd/errlist.c: New file.
(ERR_TRANSLATE): Map Hurd error codes into errlist indices.
(_hurd_errlist): The Hurd error list doesn't have Unix sys_errlist
semantics, so rename it.
1998-04-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* iconvdata/run-iconv-test.sh: Make portable. Always test all
conversions.
1998-04-21 12:30 H.J. Lu <hjl@gnu.org>
* wcsmbs/wcsrtombs.c (__wcsrtombs): Initialize result to 0.
* wcsmbs/wcsnrtombs.c: Likewise.
1998-04-21 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/dl-sysdep.c: Handle _dl_hwcap correctly.
* wcsmbs/btowc.c (__btowc): Declare inptr as const char *.
* time/strftime.c (my_strftime): Initialize pad variable in
declaration.
* iconvdata/big5.c: Don't use character constants in comparisons
with unsigned value.
1998-04-20 18:00 Ulrich Drepper <drepper@cygnus.com>
* libc.map: Add __dgettext to GLIBC_2.0 and __libc_longjmp, and
@ -194,14 +283,14 @@
(_PATH_UTMPX): Define to _PATH_UTMP. (_PATH_WTMPX): Define to
_PATH_WTMPX. (RUN_LVL): Define only if __USE_GNU. (ACCOUNTING):
Define if __USE_GNU.
* sysdeps/gnu/setutxent.c: New file.
* sysdeps/gnu/getutxent.c: New file.
* sysdeps/gnu/endutxent.c: New file.
* sysdeps/gnu/getutxid.c: New file.
* sysdeps/gnu/getutxline.c: New file.
* sysdeps/gnu/pututxline.c: New file.
* sysdeps/gnu/utmpxname.c: New file.
* sysdeps/gnu/updwtmpx.c: New file.
* sysdeps/generic/setutxent.c: New file.
* sysdeps/generic/getutxent.c: New file.
* sysdeps/generic/endutxent.c: New file.
* sysdeps/generic/getutxid.c: New file.
* sysdeps/generic/getutxline.c: New file.
* sysdeps/generic/pututxline.c: New file.
* sysdeps/generic/utmpxname.c: New file.
* sysdeps/generic/updwtmpx.c: New file.
* sysdeps/unix/sysv/linux/paths.h (_PATH_UTMP_DB): Remove.
* sysdeps/generic/bits/utmpx.h: Remove.

View File

@ -116,7 +116,7 @@ libc-init = set-init
else
libc-init = munch-init
$(objpfx)munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits)
awk -f $< subdirs='$(+init_subdirs)' $(word 2,$^) > $@-t
$(AWK) -f $< subdirs='$(+init_subdirs)' $(word 2,$^) > $@-t
mv -f $@-t $@
generated := $(generated) munch-init.c
endif

View File

@ -78,6 +78,7 @@ MSGFMT = @MSGFMT@
# Script execution tools.
BASH = @BASH@
KSH = @KSH@
AWK = @AWK@
PERL = @PERL@
# More variables may be inserted below by configure.

116
configure vendored
View File

@ -1968,12 +1968,45 @@ else
fi
for ac_prog in perl
for ac_prog in mawk gawk nawk awk
do
# 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:1977: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AWK="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
echo "$ac_t""$AWK" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$AWK" && break
done
for ac_prog in perl
do
# 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:2010: 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
@ -2008,7 +2041,7 @@ test -n "$PERL" || PERL="no"
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
echo "configure:2012: checking for signed size_t type" >&5
echo "configure:2045: 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
@ -2032,12 +2065,12 @@ EOF
fi
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
echo "configure:2036: checking for libc-friendly stddef.h" >&5
echo "configure:2069: 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 2041 "configure"
#line 2074 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
@ -2052,7 +2085,7 @@ size_t size; wchar_t wchar;
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
@ -2071,7 +2104,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
fi
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
echo "configure:2075: checking whether we need to use -P to assemble .S files" >&5
echo "configure:2108: 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
@ -2094,7 +2127,7 @@ asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
echo "configure:2098: checking for assembler global-symbol directive" >&5
echo "configure:2131: 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
@ -2124,7 +2157,7 @@ EOF
fi
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
echo "configure:2128: checking for .set assembler directive" >&5
echo "configure:2161: 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
@ -2158,7 +2191,7 @@ EOF
fi
echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6
echo "configure:2162: checking for .symver assembler directive" >&5
echo "configure:2195: 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
@ -2177,7 +2210,7 @@ fi
echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6
echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6
echo "configure:2181: checking for ld --version-script" >&5
echo "configure:2214: 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
@ -2200,7 +2233,7 @@ EOF
if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
-nostartfiles -nostdlib
-Wl,--version-script,conftest.map
1>&5'; { (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
1>&5'; { (eval echo configure:2237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_ld_version_script_option=yes
else
@ -2238,7 +2271,7 @@ if test $VERSIONING = no; then
fi
if test $elf = yes; then
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
echo "configure:2242: checking for .previous assembler directive" >&5
echo "configure:2275: 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
@ -2246,7 +2279,7 @@ else
.section foo_section
.previous
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_previous_directive=yes
else
libc_cv_asm_previous_directive=no
@ -2262,7 +2295,7 @@ EOF
else
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
echo "configure:2266: checking for .popsection assembler directive" >&5
echo "configure:2299: 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
@ -2270,7 +2303,7 @@ else
.pushsection foo_section
.popsection
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_popsection_directive=yes
else
libc_cv_asm_popsection_directive=no
@ -2290,12 +2323,12 @@ fi
if test $elf != yes; then
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
echo "configure:2294: checking for .init and .fini sections" >&5
echo "configure:2327: 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 2299 "configure"
#line 2332 "configure"
#include "confdefs.h"
int main() {
@ -2304,7 +2337,7 @@ asm (".section .init");
asm (".text");
; return 0; }
EOF
if { (eval echo configure:2308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
@ -2332,19 +2365,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:2336: checking for _ prefix on C symbol names" >&5
echo "configure:2369: 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 2341 "configure"
#line 2374 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() {
glibc_foobar ();
; return 0; }
EOF
if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
@ -2359,17 +2392,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:2363: checking for _ prefix on C symbol names" >&5
echo "configure:2396: 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 2368 "configure"
#line 2401 "configure"
#include "confdefs.h"
void underscore_test(void) {
return; }
EOF
if { (eval echo configure:2373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2406: \"$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
@ -2401,7 +2434,7 @@ if test $elf = yes; then
fi
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
echo "configure:2405: checking for assembler .weak directive" >&5
echo "configure:2438: 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
@ -2424,7 +2457,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:2428: checking for assembler .weakext directive" >&5
echo "configure:2461: 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
@ -2462,7 +2495,7 @@ EOF
fi
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
echo "configure:2466: checking for ld --no-whole-archive" >&5
echo "configure:2499: 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
@ -2473,7 +2506,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
-o conftest conftest.c 1>&5'; { (eval echo configure:2477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c 1>&5'; { (eval echo configure:2510: \"$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
@ -2484,7 +2517,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:2488: checking for gcc -fno-exceptions" >&5
echo "configure:2521: 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
@ -2495,7 +2528,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions
-o conftest conftest.c 1>&5'; { (eval echo configure:2499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c 1>&5'; { (eval echo configure:2532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_no_exceptions=yes
else
libc_cv_gcc_no_exceptions=no
@ -2507,14 +2540,14 @@ echo "$ac_t""$libc_cv_gcc_no_exceptions" 1>&6
if test "$base_machine" = alpha ; then
echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6
echo "configure:2511: checking for function ..ng prefix" >&5
echo "configure:2544: checking for function ..ng prefix" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
foo () { }
EOF
if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_gcc_alpha_ng_prefix=yes
else
@ -2538,12 +2571,12 @@ fi
fi
echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6
echo "configure:2542: checking for DWARF2 unwind info support" >&5
echo "configure:2575: 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 2547 "configure"
#line 2580 "configure"
static char __EH_FRAME_BEGIN__;
_start ()
{
@ -2570,7 +2603,7 @@ __bzero () {}
EOF
if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame_info
-nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&5'; { (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c -lgcc >&5'; { (eval echo configure:2607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_dwarf2_unwind_info=static
else
libc_cv_gcc_dwarf2_unwind_info=no
@ -2578,7 +2611,7 @@ fi
if test $libc_cv_gcc_dwarf2_unwind_info = no; then
if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame
-nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&5'; { (eval echo configure:2582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c -lgcc >&5'; { (eval echo configure:2615: \"$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
@ -2652,7 +2685,7 @@ if test "$uname" = "sysdeps/generic"; then
fi
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
echo "configure:2656: checking OS release for uname" >&5
echo "configure:2689: 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
@ -2674,7 +2707,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:2678: checking OS version for uname" >&5
echo "configure:2711: 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
@ -2696,7 +2729,7 @@ else
fi
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
echo "configure:2700: checking stdio selection" >&5
echo "configure:2733: checking stdio selection" >&5
case $stdio in
libio) cat >> confdefs.h <<\EOF
@ -2708,7 +2741,7 @@ esac
echo "$ac_t""$stdio" 1>&6
echo $ac_n "checking ldap selection""... $ac_c" 1>&6
echo "configure:2712: checking ldap selection" >&5
echo "configure:2745: checking ldap selection" >&5
case $add_ons in
*ldap*)
@ -2759,7 +2792,7 @@ if test $shared = default; then
fi
echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6
echo "configure:2763: checking whether -fPIC is default" >&5
echo "configure:2796: checking whether -fPIC is default" >&5
if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2961,6 +2994,7 @@ s%@BASH@%$BASH%g
s%@libc_cv_have_bash2@%$libc_cv_have_bash2%g
s%@KSH@%$KSH%g
s%@libc_cv_have_ksh@%$libc_cv_have_ksh%g
s%@AWK@%$AWK%g
s%@PERL@%$PERL%g
s%@VERSIONING@%$VERSIONING%g
s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g

View File

@ -557,6 +557,7 @@ else
fi
AC_SUBST(libc_cv_have_ksh)
AC_PROG_AWK
AC_PATH_PROGS(PERL, perl, no)
AC_SUBST(PERL)

View File

@ -85,7 +85,7 @@ $(objpfx)crtn.S: $(objpfx)initfini.s
$(objpfx)defs.h: $(objpfx)initfini.s
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
awk -f defs.awk > $@
$(AWK) -f defs.awk > $@
endif

View File

@ -146,7 +146,7 @@ $(objpfx)trusted-dirs.h: Makefile $(..)Makeconfig
mv -f $@T $@
$(objpfx)rtldtbl.h: Makefile $(..)Makeconfig genrtldtbl.awk
$(make-target-directory)
echo "$(default-rpath)" | awk -f genrtldtbl.awk > $@T
echo "$(default-rpath)" | $(AWK) -f genrtldtbl.awk > $@T
mv -f $@T $@
CPPFLAGS-dl-load.c = -I$(objpfx).
CFLAGS-dl-load.c += -Wno-uninitialized

View File

@ -233,6 +233,7 @@ __strtol_internal (const char *nptr, char **endptr, int base, int group)
}
assert (base == 0);
base = 10;
if (*nptr == '0')
{
if (nptr[1] == 'x' || nptr[1] == 'X')
@ -243,8 +244,6 @@ __strtol_internal (const char *nptr, char **endptr, int base, int group)
else
base = 8;
}
else
base = 10;
while (*nptr >= '0' && *nptr <= '9')
{
@ -257,8 +256,9 @@ __strtol_internal (const char *nptr, char **endptr, int base, int group)
errno = ERANGE;
return sign > 0 ? LONG_MAX : LONG_MIN;
}
result *= 10;
result *= base;
result += digval;
++nptr;
}
return (long int) result * sign;
@ -295,6 +295,7 @@ __strtoul_internal (const char *nptr, char **endptr, int base, int group)
}
assert (base == 0);
base = 10;
if (*nptr == '0')
{
if (nptr[1] == 'x' || nptr[1] == 'X')
@ -305,8 +306,6 @@ __strtoul_internal (const char *nptr, char **endptr, int base, int group)
else
base = 8;
}
else
base = 10;
while (*nptr >= '0' && *nptr <= '9')
{
@ -317,8 +316,9 @@ __strtoul_internal (const char *nptr, char **endptr, int base, int group)
errno = ERANGE;
return ULONG_MAX;
}
result *= 10;
result *= base;
result += digval;
++nptr;
}
return result * sign;

View File

@ -287,6 +287,7 @@ dl_main (const ElfW(Phdr) *phdr,
char *file;
int has_interp = 0;
unsigned int i;
int paths_initialized = 0;
/* Process the environment variable which control the behaviour. */
process_envvars (&mode, &lazy);
@ -376,6 +377,7 @@ of this helper program; chances are you did not intend to run this program.\n\
/* Initialize the data structures for the search paths for shared
objects. */
_dl_init_paths (library_path);
paths_initialized = 1;
if (mode == verify)
{
@ -493,7 +495,7 @@ of this helper program; chances are you did not intend to run this program.\n\
_exit (0);
}
if (*user_entry != (ElfW(Addr)) &ENTRY_POINT)
if (! paths_initialized)
/* Initialize the data structures for the search paths for shared
objects. */
_dl_init_paths (library_path);

View File

@ -51,19 +51,9 @@ __gconv (gconv_t cd, const char **inbuf, const char *inbufend, char **outbuf,
do
{
/* See whether the input size is reasoable for the output
size. If not adjust it. */
size_t inlen = ((inbufend - *inbuf) / cd->steps->max_needed_from
* cd->steps->max_needed_from);
if (cd->nsteps > 1)
inlen = MIN (inlen, (((outbufend - cd->data[last_step].outbuf)
/ cd->steps[last_step].max_needed_to)
* cd->steps[last_step].max_needed_to));
last_start = *inbuf;
result = (*cd->steps->fct) (cd->steps, cd->data, inbuf,
*inbuf + inlen, converted, 0);
result = (*cd->steps->fct) (cd->steps, cd->data, inbuf, inbufend,
converted, 0);
}
while (result == GCONV_EMPTY_INPUT && last_start != *inbuf
&& *inbuf + cd->steps->min_needed_from <= inbufend);

View File

@ -71,14 +71,16 @@ __gconv_open (const char *toset, const char *fromset, gconv_t *handle)
/* Allocate the buffer. */
if (!data[cnt].is_last)
{
data[cnt].outbuf =
(char *) malloc (GCONV_NCHAR_GOAL
size_t size = (GCONV_NCHAR_GOAL
* steps[cnt].max_needed_to);
data[cnt].outbuf = (char *) malloc (size);
if (data[cnt].outbuf == NULL)
{
res = GCONV_NOMEM;
break;
}
data[cnt].outbufend = data[cnt].outbuf + size;
}
}
}

View File

@ -181,7 +181,7 @@ internal_ucs4_loop (const unsigned char **inptrp, const unsigned char *inend,
#define LOOPFCT FROM_LOOP
#define BODY \
{ \
if (*((uint32_t *) inptr) > '\x7f') \
if (*((uint32_t *) inptr) > 0x7f) \
{ \
/* This is no correct ANSI_X3.4-1968 character. */ \
result = GCONV_ILLEGAL_INPUT; \
@ -208,6 +208,7 @@ internal_ucs4_loop (const unsigned char **inptrp, const unsigned char *inend,
#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
#define MAX_NEEDED_OUTPUT MAX_NEEDED_TO
#define LOOPFCT FROM_LOOP
#define BODY \
{ \
@ -266,6 +267,7 @@ internal_ucs4_loop (const unsigned char **inptrp, const unsigned char *inend,
#define FUNCTION_NAME __gconv_transform_utf8_internal
#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
#define LOOPFCT FROM_LOOP
#define BODY \
@ -278,9 +280,14 @@ internal_ucs4_loop (const unsigned char **inptrp, const unsigned char *inend,
ch = *inptr; \
\
if (ch < 0x80) \
{ \
/* One byte sequence. */ \
cnt = 1; \
else if ((ch & 0xe0) == 0xc0) \
++inptr; \
} \
else \
{ \
if ((ch & 0xe0) == 0xc0) \
{ \
cnt = 2; \
ch &= 0x1f; \
@ -316,7 +323,7 @@ internal_ucs4_loop (const unsigned char **inptrp, const unsigned char *inend,
break; \
} \
\
if (NEED_LENGTH_TEST && inptr + cnt >= inend) \
if (NEED_LENGTH_TEST && inptr + cnt > inend) \
{ \
/* We don't have enough input. */ \
result = GCONV_INCOMPLETE_INPUT; \
@ -337,10 +344,11 @@ internal_ucs4_loop (const unsigned char **inptrp, const unsigned char *inend,
\
ch <<= 6; \
ch |= byte & 0x3f; \
} \
inptr += cnt; \
} \
\
/* Now adjust the pointers and store the result. */ \
inptr += cnt; \
*((uint32_t *) outptr)++ = ch; \
}
#include <iconv/loop.c>

View File

@ -32,8 +32,6 @@
bytes needed. It defaults to MIN_NEEDED_INPUT
MAX_NEEDED_OUTPUT likewise for output bytes.
Both values have a default of 1.
LOOPFCT name of the function created. If not specified
the name is `loop' but this prevents the use
of multiple functions in the same file.
@ -55,7 +53,7 @@
/* We need at least one byte for the next round. */
#ifndef MIN_NEEDED_INPUT
# define MIN_NEEDED_INPUT 1
# error "MIN_NEEDED_INPUT definition missing"
#endif
/* Let's see how many bytes we produce. */
@ -65,7 +63,7 @@
/* We produce at least one byte in the next round. */
#ifndef MIN_NEEDED_OUTPUT
# define MIN_NEEDED_OUTPUT 1
# error "MIN_NEEDED_OUTPUT definition missing"
#endif
/* Let's see how many bytes we produce. */

View File

@ -196,6 +196,7 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data,
/* This variable is used to count the number of characters we
actually converted. */
size_t converted = 0;
size_t last_converted;
/* We preserve the initial values of the pointer variables. */
const char *inptr = *inbuf;
@ -211,6 +212,7 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data,
outptr = outbuf;
/* Save the state. */
last_converted = converted;
#ifdef SAVE_RESET_STATE
SAVE_RESET_STATE (1);
#endif
@ -242,7 +244,7 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data,
/* Write out all output which was produced. */
if (outbuf > outptr)
{
const char *outerr = outbuf;
const char *outerr = data->outbuf;
int result;
result = (*fct) (next_step, next_data, &outerr, outbuf,
@ -264,6 +266,7 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data,
outbuf = outptr;
/* Reset the state. */
converted = last_converted;
# ifdef SAVE_RESET_STATE
SAVE_RESET_STATE (0);
# endif
@ -287,8 +290,8 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data,
/* We must run out of output buffer space in this
rerun. */
assert (nstatus == GCONV_FULL_OUTPUT
&& outbuf == outerr);
assert (outbuf == outerr);
assert (nstatus == GCONV_FULL_OUTPUT);
#endif /* reset input buffer */
}

View File

@ -211,7 +211,7 @@ endif
include ../Rules
.PHONY: do-iconv-test
#tests: do-iconv-test
tests: do-iconv-test
do-iconv-test: run-iconv-test.sh $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so)) \

View File

@ -18,22 +18,24 @@
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# Each line consists of at least three entries:
# Each line consists of at least four entries:
# 1. input file name.
# 2. output file name; this is different from the input file name only for
# conversions which do not produce the same output when the transformation
# is applied back and forth.
# 3.
# 3. Y or N depending of whether the character set contains ASCII as a
# subset or not.
# 4.
# ...
# N. target coded character set.
ISO-8859-1 ISO-8859-1 UTF8
ISO-8859-2 ISO-8859-2 UCS4 UTF8
ISO-8859-3 ISO-8859-3 UTF8
ISO-8859-4 ISO-8859-4 UTF8
ISO-8859-5 ISO-8859-5 UTF8
ISO-8859-6 ISO-8859-6 UTF8
ISO-8859-7 ISO-8859-7 UTF8
ISO-8859-8 ISO-8859-8 UTF8
ISO-8859-9 ISO-8859-9 UTF8
ISO-8859-10 ISO-8859-10 UCS2 UTF8
ISO-8859-1 ISO-8859-1 Y UTF8
ISO-8859-2 ISO-8859-2 Y UCS4 UTF8
ISO-8859-3 ISO-8859-3 Y UTF8
ISO-8859-4 ISO-8859-4 Y UTF8
ISO-8859-5 ISO-8859-5 Y UTF8
ISO-8859-6 ISO-8859-6 Y UTF8
ISO-8859-7 ISO-8859-7 Y UTF8
ISO-8859-8 ISO-8859-8 Y UTF8
ISO-8859-9 ISO-8859-9 Y UTF8
ISO-8859-10 ISO-8859-10 Y UCS2 UTF8

View File

@ -8431,7 +8431,7 @@ static const char from_ucs4_tab13[][2] =
{ \
uint32_t ch = *inptr; \
\
if (ch >= '\xa1' && ch <= '\xff') \
if (ch >= 0xa1 && ch <= 0xff) \
{ \
/* Two-byte character. First test whether the next character \
is also available. */ \
@ -8448,9 +8448,9 @@ static const char from_ucs4_tab13[][2] =
idx = (ch - 0xa1) * 157; \
ch2 = inptr[1]; \
/* See whether the second byte is in the correct range. */ \
if (ch2 >= '\x40' && ch2 <= '\x7e') \
if (ch2 >= 0x40 && ch2 <= 0x7e) \
idx += ch2 - 0x40; \
else if (ch2 >= '\xa1' && ch2 <= '\xfe') \
else if (ch2 >= 0xa1 && ch2 <= 0xfe) \
idx += 0x3f + (ch2 - 0xa1); \
else \
{ \
@ -8463,7 +8463,7 @@ static const char from_ucs4_tab13[][2] =
ch = big5_to_ucs[idx]; \
\
/* Is this character defined? */ \
if (ch == L'\0' && *inptr != '\0') \
if (ch == 0 && *inptr != '\0') \
{ \
/* This is an illegal character. */ \
result = GCONV_ILLEGAL_INPUT; \

View File

@ -39,8 +39,8 @@
/* Next, define the other direction. */
#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
#define MIN_NEEDED_INPUT MIN_NEEDED_TO
#define MIN_NEEDED_OUTPUT MIN_NEEDED_FROM
#define LOOPFCT TO_LOOP
#define BODY \
{ \

View File

@ -37,37 +37,50 @@ ICONV="$codir/elf/ld.so --library-path $codir $codir/iconv/iconv_prog"
# We read the file named TESTS. All non-empty lines not starting with
# `#' are interpreted as commands.
while read from to targets; do
failed=0
while read from to subset targets; do
# Ignore empty and comment lines.
if test -z "$targets" || test "$from" = '#'; then continue; fi
for t in $targets; do
$ICONV -f $from -t $t testdata/$from > $temp1 ||
{ echo "*** conversion from $from to $t failed"; exit 1; }
{ echo "*** conversion from $from to $t failed"; failed=1; }
if test -s testdata/$from..$t; then
cmp $temp1 testdata/$from..$t >& /dev/null ||
{ echo "*** $from -> $t conversion failed"; exit 1; }
{ echo "*** $from -> $t conversion failed"; failed=1; }
fi
$ICONV -f $t -t $to -o $temp2 $temp1 ||
{ echo "*** conversion from $t to $to failed"; exit 1; }
{ echo "*** conversion from $t to $to failed"; failed=1; }
test -s $temp1 && cmp testdata/$from $temp2 >& /dev/null ||
{ echo "*** $from -> t -> $to conversion failed"; exit 1; }
{ echo "*** $from -> t -> $to conversion failed"; failed=1; }
rm -f $temp1 $temp2
# Now test some bigger text, entirely in ASCII.
# Now test some bigger text, entirely in ASCII. If ASCII is no subset
# of the coded character set we test we convert the test to this
# coded character set. Otherwise we convert to all the TARGETS.
if test $subset = Y; then
$ICONV -f $from -t $t testdata/suntzus |
$ICONV -f $t -t $to > $temp1 ||
{ echo "*** conversion $from->$t->$to of suntzus failed"; exit 1; }
cmp testdata/suntzus.txt $temp1 ||
{ echo "*** conversion $from->$t->$to of suntzus incorrect"; exit 1; }
{ echo "*** conversion $from->$t->$to of suntzus failed"; failed=1; }
cmp testdata/suntzus $temp1 ||
{ echo "*** conversion $from->$t->$to of suntzus incorrect";
failed=1; }
else
$ICONV -f ASCII -t $to testdata/suntzus |
$ICONV -f $to -f ASCII > $temp1 ||
{ echo "*** conversion ASCII->$to->ASCII of suntzus failed";
failed=1; }
cmp testdata/suntzus $temp1 ||
{ echo "*** conversion ASCII->$to->ASCII of suntzus incorrect";
failed=1; }
fi
rm -f $temp1
# All tests ok.
echo "$from -> $t -> $to ok"
done
done < TESTS
exit $?
exit $failed
# Local Variables:
# mode:shell-script
# End:

1693
iconvdata/testdata/suntzus vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ $(objpfx)mach-syscalls.mk: syscalls.awk Makefile
$(CC) $(CPPFLAGS) -E -x c-header - \
-D_MACH_`echo $(base-machine) | tr a-z A-Z`_SYSCALL_SW_H_=1 | \
sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$$/\1 \2 \3/p'\
| awk -f $< > $@-new
| $(AWK) -f $< > $@-new
cat $@-dep >> $@-new; rm -f $@-dep
mv $@-new $@
generated += mach-syscalls.mk
@ -117,8 +117,8 @@ mach/mach_interface.uh mach/mach_host.uh mach/mach_port.uh: $(objpfx)mach-syscal
ifdef mach-shortcuts
$(mach-shortcuts:%=$(objpfx)%.c): $(objpfx)%.c: shortcut.awk \
$(objpfx)RPC_%_rpc.c
gawk -v alias=$* -v call=__$* -v rpc=__$*_rpc -v syscall=__syscall_$* \
-f $^ > $@-new
$(AWK) -v alias=$* -v call=__$* -v rpc=__$*_rpc \
-v syscall=__syscall_$* -f $^ > $@-new
mv $@-new $@
generated += $(mach-shortcuts:%=%.c)
endif # mach-shortcuts
@ -148,5 +148,5 @@ include ../Rules
generated += errsystems.c
$(objpfx)errsystems.c: errsystems.awk err_*.sub \
$(wildcard $(addsuffix /err_*.sub,$(+sysdep_dirs)))
gawk -v subsys='$(filter-out $<,$^)' -f $^ > $@.n
$(AWK) -v subsys='$(filter-out $<,$^)' -f $^ > $@.n
mv $@.n $@

View File

@ -21,8 +21,6 @@
subdir := manual
export subdir := $(subdir)
# We need GNU awk for the xtract-typefun script.
GAWK = gawk
# Allow override
INSTALL_INFO = install-info
@ -62,7 +60,7 @@ chapters-incl := $(chapters-incl1) $(chapters-incl2)
define find-includes
(echo '$(@F) :=' \\ ;\
awk '$$1 == "@include" { print $$2 " \\" }' $^) > $@.new
$(AWK) '$$1 == "@include" { print $$2 " \\" }' $^) > $@.new
mv -f $@.new $@
endef
@ -78,7 +76,7 @@ libc.dvi: texinfo.tex
# Generate the summary from the Texinfo source files for each chapter.
summary.texi: stamp-summary ;
stamp-summary: summary.awk $(chapters) $(chapters-incl)
awk -f $^ \
$(AWK) -f $^ \
| sort -df +1 -2 | tr '\014' '\012' > summary-tmp
./move-if-change summary-tmp summary.texi
# touch is broken on our machines. Sigh.
@ -88,10 +86,10 @@ stamp-summary: summary.awk $(chapters) $(chapters-incl)
# access to the documentation of the function, variables, and other
# definitions.
dir-add.texinfo: xtract-typefun.awk $(chapters) $(chapters-incl)
(echo "@dircategory GNU C library functions"; \
$(SHELL) -c '(echo "@dircategory GNU C library functions"; \
echo "@direntry"; \
$(GAWK) -f $^ | sort; \
echo "@end direntry";) > $@.new
$(AWK) -f $^; \
echo "@end direntry";)' > $@.new
mv -f $@.new $@
# Generate Texinfo files from the C source for the example programs.

View File

@ -289,7 +289,7 @@ include the header files @file{sys/types.h} and @file{unistd.h}.
@comment unistd.h
@comment POSIX.1
@deftypefun int seteuid(uid_t @var{neweuid})
@deftypefun int seteuid (uid_t @var{neweuid})
This function sets the effective user ID of a process to @var{newuid},
provided that the process is allowed to change its effective user ID. A
privileged process (effective user ID zero) can change its effective

View File

@ -4,23 +4,38 @@ BEGIN {
}
/^@node/ {
last_node = gensub (/@node +([^@,]+).*/, "\\1", 1);
name = $0;
sub(/^@node +/, "", name);
sub(/[@,].*$/, "", name);
last_node = name;
}
/^@deftype(fn|vr)/ {
# The string we want is $4, except that if there were brace blocks
# before that point then it gets shifted to the right, since awk
# doesn't know from brace blocks.
id = 4; check = 2; squig = 0;
while(check < id)
{
if($check ~ /{/) squig++;
if($check ~ /}/) squig--;
if(squig) id++;
check++;
}
printf ("* %s: (libc)%s.\n", $id, last_node);
}
/^@deftypefun/ {
printf ("* %s: (libc)%s.\n",
gensub (/@deftypefunx? +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\2", 1),
last_node);
}
# Likewise, except it's $3 theoretically.
id = 3; check = 2; squig = 0;
while(check < id)
{
if($check ~ /{/) squig++;
if($check ~ /}/) squig--;
if(squig) id++;
check++;
}
/^@deftypevr/ {
printf ("* %s: (libc)%s.\n",
gensub (/@deftypevrx? +([^{ ]+|\{[^}]+\}) +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
last_node);
}
/^@deftypefn/ {
printf ("* %s: (libc)%s.\n",
gensub (/@deftypefnx? +([^{ ]+|\{[^}]+\}) +[^{ ]*(\{[^}]+\})? +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
last_node);
printf ("* %s: (libc)%s.\n", $id, last_node);
}

View File

@ -38,7 +38,7 @@ extern char **_dl_argv;
extern char **_environ;
extern size_t _dl_pagesize;
extern const char *_dl_platform;
extern unsigned long _dl_hwcap;
extern unsigned long int _dl_hwcap;
extern size_t _dl_platformlen;
extern void _end;
extern void ENTRY_POINT (void);
@ -48,7 +48,6 @@ int __libc_enable_secure;
int __libc_multiple_libcs; /* Defining this here avoids the inclusion
of init-first. */
static ElfW(auxv_t) *_dl_auxv;
static unsigned long int hwcap;
unsigned long int _dl_hwcap_mask = HWCAP_IMPORTANT;
@ -241,10 +240,11 @@ _dl_show_auxv (void)
_dl_sysdep_message ("AT_PLATFORM: ", av->a_un.a_ptr, "\n", NULL);
break;
case AT_HWCAP:
hwcap = av->a_un.a_val;
if (_dl_procinfo (hwcap) < 0)
_dl_hwcap = av->a_un.a_val;
if (_dl_procinfo (_dl_hwcap) < 0)
_dl_sysdep_message ("AT_HWCAP: ",
_itoa_word (hwcap, buf + sizeof buf - 1, 16, 0),
_itoa_word (_dl_hwcap, buf + sizeof buf - 1,
16, 0),
"\n", NULL);
break;
}
@ -284,7 +284,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
size_t *max_capstrlen)
{
/* Determine how many important bits are set. */
unsigned long int mask = _dl_hwcap_mask;
unsigned long int masked = _dl_hwcap & _dl_hwcap_mask;
size_t cnt = platform != NULL;
size_t n, m;
size_t total;
@ -293,8 +293,9 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
struct r_strlenpair *rp;
char *cp;
for (n = 0; (~((1UL << n) - 1) & mask) != 0; ++n)
if ((mask & (1UL << n)) != 0)
/* Count the number of bits set in the masked value. */
for (n = 0; (~((1UL << n) - 1) & masked) != 0; ++n)
if ((masked & (1UL << n)) != 0)
++cnt;
if (cnt == 0)
@ -318,12 +319,12 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
/* Create temporary data structure to generate result table. */
temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
m = 0;
for (n = 0; mask != 0; ++n)
if ((mask & (1UL << n)) != 0)
for (n = 0; masked != 0; ++n)
if ((masked & (1UL << n)) != 0)
{
temp[m].str = _dl_hwcap_string (n);
temp[m].len = strlen (temp[m].str);
mask ^= 1UL << n;
masked ^= 1UL << n;
++m;
}
if (platform != NULL)

View File

@ -21,7 +21,7 @@
$(..)sysdeps/gnu/errlist.c: $(..)sysdeps/gnu/errlist.awk \
$(..)manual/errno.texi
awk -f $^ > $@-tmp
$(AWK) -f $^ > $@-tmp
# Make it unwritable so noone will edit it by mistake.
-chmod a-w $@-tmp
mv -f $@-tmp $@

View File

@ -34,9 +34,14 @@ BEGIN {
print "";
print "#ifndef SYS_ERRLIST";
print "# define SYS_ERRLIST _sys_errlist";
print "# define SYS_ERRLIST_ALIAS sys_errlist";
print "#endif";
print "#ifndef SYS_NERR";
print "# define SYS_NERR _sys_nerr";
print "# define SYS_NERR_ALIAS sys_nerr";
print "#endif";
print "#ifndef ERR_REMAP";
print "# define ERR_REMAP(n) n";
print "#endif";
print "";
print "const char *const SYS_ERRLIST[] =";
@ -70,7 +75,7 @@ errnoh == 3 && $1 == "@comment" && $2 == "errno" \
errnoh == 4 && $1 == "@end" && $2 == "deftypevr" \
{
printf "/*%s */\n", desc;
printf " [%s] = N_(\"%s\"),\n", e, etext;
printf " [ERR_REMAP (%s)] = N_(\"%s\"),\n", e, etext;
print "#endif";
errnoh = 0;
next;
@ -85,8 +90,10 @@ END {
print " };";
print "";
print "const int SYS_NERR = sizeof SYS_ERRLIST / sizeof SYS_ERRLIST [0];";
print "#if !defined HAVE_ELF || !defined PIC || !defined DO_VERSIONING";
print "weak_alias (_sys_errlist, sys_errlist)";
print "weak_alias (_sys_nerr, sys_nerr)";
print "#ifdef SYS_ERRLIST_ALIAS";
print "weak_alias (_sys_errlist, SYS_ERRLIST_ALIAS)";
print "#endif";
print "#ifdef SYS_NERR_ALIAS";
print "weak_alias (_sys_nerr, SYS_NERR_ALIAS)";
print "#endif";
}

View File

@ -1,3 +1,4 @@
errlist.c
errnos.awk
err_hurd.sub
libc-ldscript

View File

@ -87,7 +87,7 @@ $(common-objpfx)errnos.d: $(mach-errnos-deps)
$(hurd)/errnos.h: $(common-objpfx)stamp-errnos ;
$(common-objpfx)stamp-errnos: $(hurd)/errnos.awk $(errno.texinfo) \
$(mach-errnos-deps)
gawk -f $^ > $(hurd)/errnos.h-tmp
$(AWK) -f $^ > $(hurd)/errnos.h-tmp
# Make it unwritable so noone will edit it by mistake.
-chmod a-w $(hurd)/errnos.h-tmp
./$(..)move-if-change $(hurd)/errnos.h-tmp $(hurd)/errnos.h

View File

@ -0,0 +1,26 @@
/* Copyright (C) 1998 Free Software 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. */
/* SYS_ERRLIST cannot have Unix semantics on the Hurd, so it is easier
just to rename it. We also need to remap error codes to array
indices by taking their subcode. */
#define SYS_ERRLIST _hurd_errlist
#define SYS_NERR _hurd_nerr
#define ERR_REMAP(n) (n & 0x3fff)
#include <sysdeps/gnu/errlist.c>

View File

@ -54,7 +54,7 @@ $(common-objpfx)sys/param.h: $(sysincludedir)/sys/param.h
(echo '#ifndef _SYS_PARAM_H'; \
echo '#define _SYS_PARAM_H 1'; \
echo '#include <endian.h>'; \
awk < $< \
$(AWK) < $< \
'/^#define[ ]*NULL/ { print "#ifndef NULL"; \
print $$0; \
print "#endif"; \
@ -142,7 +142,7 @@ $(common-objpfx)make-errnos: $(common-objpfx)make-errnos.c
$(common-objpfx)make-errnos.c: $(sysdep_dir)/unix/errnos-tmpl.c \
$(sysdep_dir)/unix/errnos.awk $(common-objpfx)errnos
awk -f $(word 2,$^) errnos="`tr '\012' ' ' < $(word 3,$^)`" $< > $@T
$(AWK) -f $(word 2,$^) errnos="`tr '\012' ' ' < $(word 3,$^)`" $< > $@T
mv $@T $@
$(common-objpfx)errnos: $(wildcard $(sysincludedir)/errno.h \
@ -176,7 +176,7 @@ $(common-objpfx)make-ioctls: $(common-objpfx)make-ioctls.c
$(common-objpfx)make-ioctls.c: $(sysdep_dir)/unix/ioctls-tmpl.c \
$(sysdep_dir)/unix/ioctls.awk \
$(common-objpfx)ioctls
awk -f $(word 2,$^) requests="`cat $(word 3,$^)`" $< > $@T
$(AWK) -f $(word 2,$^) requests="`cat $(word 3,$^)`" $< > $@T
mv $@T $@

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -480,7 +480,7 @@ my_strftime (s, maxsize, format, tp)
for (f = format; *f != '\0'; ++f)
{
int pad; /* Padding for number ('-', '_', or 0). */
int pad = 0; /* Padding for number ('-', '_', or 0). */
int modifier; /* Field modifier ('E', 'O', or 0). */
int digits; /* Max digits for numeric format. */
int number_value; /* Numeric value to be printed. */
@ -570,7 +570,6 @@ my_strftime (s, maxsize, format, tp)
#endif /* ! DO_MULTIBYTE */
/* Check for flags that can modify a format. */
pad = 0;
while (1)
{
switch (*++f)

View File

@ -89,7 +89,7 @@ $(tzfiles:%=$(objpfx)z.%): $(objpfx)z.%: % Makefile
# The extra kludge for the $(tzlinks) files is necessary since running zic
# this file requires all other files to exist. Blech!
(echo 'define $*-zones' ;\
awk '$$1 == "Zone" { print $$2 } $$1 == "Link" { print $$3 }' $^ ;\
$(AWK) '$$1 == "Zone" { print $$2 } $$1 == "Link" { print $$3 }' $^ ;\
echo 'endef' ;\
echo '$*-zones := $$(subst $$(nl), ,$$($*-zones))' ;\
echo 'ifdef $*-zones' ;\

View File

@ -31,7 +31,7 @@ __btowc (c)
char buf[sizeof (wchar_t)];
struct gconv_step_data data;
char inbuf[1];
char *inptr = inbuf;
const char *inptr = inbuf;
size_t converted;
int status;

View File

@ -46,7 +46,7 @@ __wcsnrtombs (dst, src, nwc, len, ps)
struct gconv_step_data data;
const wchar_t *srcend;
int status;
size_t result;
size_t result = 0;
/* Tell where we want the result. */
data.is_last = 1;

View File

@ -42,7 +42,7 @@ __wcsrtombs (dst, src, len, ps)
{
struct gconv_step_data data;
int status;
size_t result;
size_t result = 0;
/* Tell where we want the result. */
data.is_last = 1;