+2008-05-24 Jakub Jelinek <jakub@redhat.com>
+
+ * libio/stdio.h (vscanf): Fix -std=c99 redirect.
+ * stdio-common/Makefile (tests): Add scanf16 and scanf17.
+ (CFLAGS-scanf17.c): New.
+ * stdio-common/scanf14.c (main): Add fscanf and scanf tests.
+ * stdio-common/scanf15.c (main): Likewise.
+ * stdio-common/scanf16.c: New test.
+ * stdio-common/scanf17.c: New test.
+
+2008-05-24 Ulrich Drepper <drepper@redhat.com>
+
+ * resolv/res_send.c (send_dg): If we already have one of two
+ answers and the server reports SERVFAIL, NOTIMP, or REFUSED, then
+ use the one answer insted of failing.
+
+2008-02-20 Ryan S. Arnold <rsa@us.ibm.com>
+
+ * math/libm-test.inc (exp_test): Exclude expl(1000.0L) from
+ being executed on PowerPC as the expected result exceeds IBM
+ long double 128 __LDBL_MAX__.
+
+2008-05-21 Roland McGrath <roland@redhat.com>
+
+ * shlib-versions (sparc.*-.*-.*, sparc64.*-.*-.*): Add ABI lines.
+
+ * Makefile (check-data): Use $(abi-name) before other guesses.
+ Look in $(add-ons) dirs before scripts/data/.
+ * elf/Makefile (check-data): Likewise.
+
+ * scripts/soversions.awk: Grok ABI line.
+ * Makeconfig ($(common-objpfx)soversions.mk): Likewise.
+ Emit definition for abi-name variable.
+
+2008-05-21 Ulrich Drepper <drepper@redhat.com>
+
+ * string/endian.h: Define new fixed-size hto* and *toh macros only
+ if [__USE_BSD].
+
+ * iconvdata/Depend: Add localedata.
+
+2008-05-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * bits/termios.h (ONLCR): Define under [__USE_XOPEN] too.
+
+2008-05-08 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S: Use
+ HIDDEN_JUMPTARGET.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
+ (__SYSCALL_CLOBBERS): Remove %g* registers.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+ (__SYSCALL_CLOBBERS): Likewise.
+ * scripts/data/localplt-sparc-linux-gnu.data: New file.
+ * scripts/data/localplt-sparc64-linux-gnu.data: Likewise.
+
+2008-05-21 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
+ (CALL_ERRNO_LOCATION): Define.
+ (__SYSCALL_STRING, __CLONE_SYSCALL_STRING): Use it.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+ (CALL_ERRNO_LOCATION): Define.
+ (__SYSCALL_STRING, __CLONE_SYSCALL_STRING): Use it.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S (__brk): Use
+ HIDDEN_JUMPTARGET for __errno_location call in libc.so.
+
+2008-05-20 Ulrich Drepper <drepper@redhat.com>
+
+ * include/inline-hashtab.h (higher_prime_number): Fix type of mid
+ variable.
+
2008-05-20 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
(seen_DEFAULT=0; seen_WORDSIZE32=0; seen_WORDSIZE64=0; \
while read which lib number setname; do \
eval seen_$$which=1; \
+ test x"$$which" != xABI || echo abi-name = "$$lib"; \
test x"$$which" = xDEFAULT || continue; \
case $$number in \
[0-9]*) echo "$$lib.so-version=.$$number"; \
-# Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+# Copyright (C) 1991-2002,2003,2004,2005,2006,2008
+# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
tests: $(objpfx)c++-types-check.out $(objpfx)check-local-headers.out
ifneq ($(CXX),no)
check-data := $(firstword $(wildcard \
- $(foreach M,$(config-machine) $(base-machine),\
- scripts/data/c++-types-$M-$(config-os).data)))
+ $(foreach D,$(add-ons) scripts/data,\
+ $(patsubst %,$D/c++-types-%.data,\
+ $(abi-name) \
+ $(addsuffix -$(config-os),\
+ $(config-machine) \
+ $(base-machine))))))
ifneq (,$(check-data))
$(objpfx)c++-types-check.out: $(check-data) scripts/check-c++-types.sh
scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu99 -Wstrict-prototypes,$(CFLAGS)) $(CPPFLAGS) > $@
/* Output modes. */
tcflag_t c_oflag;
#define OPOST (1 << 0) /* Perform output processing. */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_XOPEN
# define ONLCR (1 << 1) /* Map NL to CR-NL on output. */
+#endif
+#ifdef __USE_BSD
# define OXTABS TAB3 /* Expand tabs to spaces. */
# define ONOEOT (1 << 3) /* Discard EOT (^D) on output. */
#endif
$(objpfx)tst-dlmodcount.out: $(test-modules)
check-data := $(firstword $(wildcard \
- $(patsubst %,../scripts/data/localplt-%.data,\
- $(addsuffix -$(config-os),\
- $(config-machine) $(base-machine))\
- generic)))
+ $(foreach D,$(add-ons) scripts/data,\
+ $(patsubst %,$(..)$D/localplt-%.data,\
+ $(abi-name) \
+ $(addsuffix -$(config-os),\
+ $(config-machine) \
+ $(base-machine)) \
+ generic))))
+
tests: $(objpfx)check-localplt.out
ifeq ($(have-thread-library),yes)
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-f8
-fedora-sync-date := 2008-05-20 19:24 UTC
-fedora-sync-tag := fedora-glibc-20080520T1924
+fedora-sync-date := 2008-05-24 22:18 UTC
+fedora-sync-tag := fedora-glibc-20080524T2218
Summary: The GNU libc libraries
Name: glibc
Version: @glibcversion@
-Release: 4
+Release: 5
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
%endif
%changelog
+* Sun May 25 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-5
+- update from trunk
+
* Tue May 20 2008 Jakub Jelinek <jakub@redhat.com> 2.8.90-4
- further getaddrinfo and nscd fixes
while (low != high)
{
- const unsigned long *mid = low + (high - low) / 2;
+ const uint32_t *mid = low + (high - low) / 2;
if (n > *mid)
low = mid + 1;
else
__isoc99_vfscanf)
__attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
extern int __REDIRECT (vscanf, (__const char *__restrict __format,
- _G_va_list __arg), __isoc99_vfscanf)
+ _G_va_list __arg), __isoc99_vscanf)
__attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
extern int __REDIRECT (vsscanf,
(__const char *__restrict __s,
+2008-05-21 Ulrich Drepper <drepper@redhat.com>
+
+ * locales/iso14651_t1_common: Remove U0C0D entry added for Telugu.
+ Reported by Pravin Satpute.
+
2008-05-16 Ulrich Drepper <drepper@redhat.com>
* locales/iso14651_t1_common: Remove duplicate U0C7B definition.
<U0C60> <tvw-vocalicrr>;<BAS>;<MIN>;IGNORE
<U0C0C> <tvw-vocalicl>;<BAS>;<MIN>;IGNORE
<U0C61> <tvw-vocalicll>;<BAS>;<MIN>;IGNORE
-<U0C0D> <tvw-candrae>;<BAS>;<MIN>;IGNORE
<U0C0E> <tvw-shorte>;<BAS>;<MIN>;IGNORE
<U0C0F> <tvw-e>;<BAS>;<MIN>;IGNORE
<U0C10> <tvw-ai>;<BAS>;<MIN>;IGNORE
<U0C15> <t-ka>;<BAS>;<MIN>;IGNORE
<U0C16> <t-kha>;<BAS>;<MIN>;IGNORE
<U0C17> <t-ga>;<BAS>;<MIN>;IGNORE
-#XXX This is wrong since there is already a definition for U0C7B.
-#<U0C7B> <t-gga>;<BAS>;<MIN>;IGNORE
<U0C18> <t-gha>;<BAS>;<MIN>;IGNORE
<U0C19> <t-nga>;<BAS>;<MIN>;IGNORE
<U0C1A> <t-ca>;<BAS>;<MIN>;IGNORE
TEST_f_f (exp, 0.75L, 2.11700001661267466854536981983709561L);
TEST_f_f (exp, 50.0L, 5184705528587072464087.45332293348538L);
TEST_f_f (exp, 88.72269439697265625L, 3.40233126623160774937554134772290447915e38L);
-#ifdef TEST_LDOUBLE
- /* The result can only be represented in long double. */
+#if defined TEST_LDOUBLE && __LDBL_MAX_EXP__ > 1024
+ /* The result can only be represented in sane long double. */
TEST_f_f (exp, 1000.0L, 0.197007111401704699388887935224332313e435L);
#endif
-2008-05-19 Jakub Jelinek <jakub@redhat.com>
+2008-05-20 Jakub Jelinek <jakub@redhat.com>
+ David S. Miller <davem@davemloft.net>
- * elf/soinit.c (__EH_FRAME_BEGIN__): Remove.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2008-05-10 Ulrich Drepper <drepper@redhat.com>
need_recompute = 1;
}
if (n == 0) {
- Dprint(statp->options & RES_DEBUG, (stdout,
- ";; timeout sending\n"));
- if (recvresp1)
- return resplen;
- if (buf2 != NULL && recvresp2)
- return 1;
+ Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
+ if (recvresp1 || (buf2 != NULL && recvresp2))
+ {
+ *resplen2 = 1;
+ return resplen;
+ }
*gotsomewhere = 1;
return (0);
thisansp,
(*thisresplen > *thisanssiz)
? *thisanssiz : *thisresplen);
+
+ if (recvresp1 || (buf2 != NULL && recvresp2))
+ {
+ *resplen2 = 1;
+ return resplen;
+ }
+ if (buf2 != NULL)
+ {
+ /* We are waiting for a possible second reply. */
+ resplen = 1;
+ if (hp->id == anhp->id)
+ recvresp1 = 1;
+ else
+ recvresp2 = 1;
+
+ goto wait;
+ }
+
next_ns:
__res_iclose(statp, false);
/* don't retry if called from dig */
--- /dev/null
+libc.so: _Q_add
+libc.so: _Q_div
+libc.so: _Q_feq
+libc.so: _Q_fge
+libc.so: _Q_fle
+libc.so: _Q_flt
+libc.so: _Q_fne
+libc.so: _Q_itoq
+libc.so: _Q_mul
+libc.so: _Q_sub
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: ffs
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
--- /dev/null
+libc.so: _Qp_add
+libc.so: _Qp_div
+libc.so: _Qp_feq
+libc.so: _Qp_fge
+libc.so: _Qp_fle
+libc.so: _Qp_flt
+libc.so: _Qp_fne
+libc.so: _Qp_itoq
+libc.so: _Qp_mul
+libc.so: _Qp_qtod
+libc.so: _Qp_sub
+libc.so: _Qp_xtoq
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: ffs
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
next;
}
+$2 == "ABI" {
+ if ((config ~ thiscf) && !abiname) {
+ abiname = $3;
+ sub(/@CPU@/, cpu, abiname);
+ sub(/@VENDOR@/, vendor, abiname);
+ sub(/@OS@/, os, abiname);
+ }
+ next;
+}
+
# Obey the first matching DEFAULT line.
$2 == "DEFAULT" {
$1 = $2 = "";
}
}
}
+ if (abiname) {
+ print "ABI", abiname
+ }
for (c in lines) {
print lines[c]
}
sparc64.*-.*-.* WORDSIZE32 sparc-@VENDOR@-@OS@
sparc.*-.*-.* WORDSIZE64 sparc64-@VENDOR@-@OS@
+# Configuration ABI Identifier for ABI data files
+# ------------- ---------- -----------------------------
+sparc64.*-.*-.* ABI sparc64-@OS@
+sparc.*-.*-.* ABI sparc-@OS@
+
# Configuration Library=version Earliest symbol set (optional)
# ------------- --------------- ------------------------------
tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15 \
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
- bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22
+ bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
+ scanf16 scanf17
test-srcs = tst-unbputc tst-printf
CFLAGS-errlist.c = $(fno-unit-at-a-time)
CFLAGS-siglist.c = $(fno-unit-at-a-time)
-# The following is a hack since we must compile scanf15.c without any
+# The following is a hack since we must compile scanf1{5,7}.c without any
# GNU extension. The latter are needed, though, when internal headers
# are used. So made sure we see the installed headers first.
CFLAGS-scanf15.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
-I../wctype
+CFLAGS-scanf17.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
+ -I../wctype
# We know the test has a format string problem.
CFLAGS-tst-sprintf.c = -Wno-format
else if (d != 5.25 || memcmp (c, " x", 2) != 0)
FAIL ();
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf14.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf14.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (fscanf (fp, "%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (scanf ("%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
return result;
}
else if (d != 5.25 || memcmp (c, " x", 2) != 0)
FAIL ();
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf15.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf15.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (fscanf (fp, "%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (scanf ("%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
return result;
}
--- /dev/null
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+#define FAIL() \
+ do { \
+ result = 1; \
+ printf ("test at line %d failed\n", __LINE__); \
+ } while (0)
+
+static int
+xsscanf (const char *str, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vsscanf (str, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xscanf (const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vscanf (fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xfscanf (FILE *f, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vfscanf (f, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+int
+main (void)
+{
+ wchar_t *lsp;
+ char *sp;
+ float f;
+ double d;
+ char c[8];
+ int result = 0;
+
+ if (xsscanf (" 0.25s x", "%e%3c", &f, c) != 2)
+ FAIL ();
+ else if (f != 0.25 || memcmp (c, "s x", 3) != 0)
+ FAIL ();
+ if (xsscanf (" 1.25s x", "%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+ if (xsscanf (" 2.25s x", "%las%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 2.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 3.25S x", "%4aS%3c", &lsp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (wcscmp (lsp, L"3.25") != 0 || memcmp (c, "S x", 3) != 0)
+ FAIL ();
+ memset (lsp, 'x', sizeof L"3.25");
+ free (lsp);
+ }
+ if (xsscanf ("4.25[0-9.] x", "%a[0-9.]%8c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "4.25") != 0 || memcmp (c, "[0-9.] x", 8) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "4.25");
+ free (sp);
+ }
+ if (xsscanf ("5.25[0-9.] x", "%la[0-9.]%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 5.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf16.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf16.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (xfscanf (fp, "%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (xscanf ("%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
+ return result;
+}
--- /dev/null
+#undef _GNU_SOURCE
+#define _XOPEN_SOURCE 600
+/* The following macro definitions are a hack. They word around disabling
+ the GNU extension while still using a few internal headers. */
+#define u_char unsigned char
+#define u_short unsigned short
+#define u_int unsigned int
+#define u_long unsigned long
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+#define FAIL() \
+ do { \
+ result = 1; \
+ printf ("test at line %d failed\n", __LINE__); \
+ } while (0)
+
+static int
+xsscanf (const char *str, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vsscanf (str, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xscanf (const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vscanf (fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xfscanf (FILE *f, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vfscanf (f, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+int
+main (void)
+{
+ float f;
+ double d;
+ char c[8];
+ int result = 0;
+
+ if (xsscanf (" 0.25s x", "%e%3c", &f, c) != 2)
+ FAIL ();
+ else if (f != 0.25 || memcmp (c, "s x", 3) != 0)
+ FAIL ();
+ if (xsscanf (" 1.25s x", "%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 2.25s x", "%las%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 2.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 3.25S x", "%4aS%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 3.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 4.25[0-9.] x", "%a[0-9.]%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 4.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 5.25[0-9.] x", "%la[0-9.]%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 5.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf17.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf17.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (xfscanf (fp, "%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (xscanf ("%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
+ return result;
+}
#endif
+#ifdef __USE_BSD
/* Conversion interfaces. */
-#include <bits/byteswap.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define htobe16(x) __bswap_16 (x)
-# define htole16(x) (x)
-# define be16toh(x) __bswap_16 (x)
-# define le16toh(x) (x)
-
-# define htobe32(x) __bswap_32 (x)
-# define htole32(x) (x)
-# define be32toh(x) __bswap_32 (x)
-# define le32toh(x) (x)
-
-# define htobe64(x) __bswap_64 (x)
-# define htole64(x) (x)
-# define be64toh(x) __bswap_64 (x)
-# define le64toh(x) (x)
-#else
-# define htobe16(x) (x)
-# define htole16(x) __bswap_16 (x)
-# define be16toh(x) (x)
-# define le16toh(x) __bswap_16 (x)
-
-# define htobe32(x) (x)
-# define htole32(x) __bswap_32 (x)
-# define be32toh(x) (x)
-# define le32toh(x) __bswap_32 (x)
-
-# define htobe64(x) (x)
-# define htole64(x) __bswap_64 (x)
-# define be64toh(x) (x)
-# define le64toh(x) __bswap_64 (x)
+# include <bits/byteswap.h>
+
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define htobe16(x) __bswap_16 (x)
+# define htole16(x) (x)
+# define be16toh(x) __bswap_16 (x)
+# define le16toh(x) (x)
+
+# define htobe32(x) __bswap_32 (x)
+# define htole32(x) (x)
+# define be32toh(x) __bswap_32 (x)
+# define le32toh(x) (x)
+
+# define htobe64(x) __bswap_64 (x)
+# define htole64(x) (x)
+# define be64toh(x) __bswap_64 (x)
+# define le64toh(x) (x)
+# else
+# define htobe16(x) (x)
+# define htole16(x) __bswap_16 (x)
+# define be16toh(x) (x)
+# define le16toh(x) __bswap_16 (x)
+
+# define htobe32(x) (x)
+# define htole32(x) __bswap_32 (x)
+# define be32toh(x) (x)
+# define le32toh(x) __bswap_32 (x)
+
+# define htobe64(x) (x)
+# define htole64(x) __bswap_64 (x)
+# define be64toh(x) (x)
+# define le64toh(x) __bswap_64 (x)
+# endif
#endif
#endif /* endian.h */
mov %g1, %o0
/* If this returns (which can happen if the syscall fails) we'll
exit the program with the return error value (-1). */
-1: call exit
+1: call HIDDEN_JUMPTARGET(exit)
nop
/* The 'exit' call should never return. In case it does cause
the process to terminate. */
-/* Copyright (C) 1997, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2002, 2003, 2004, 2006, 2008
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, January 1997.
#else /* __ASSEMBLER__ */
+#if defined SHARED && defined DO_VERSIONING && defined PIC \
+ && !defined NO_HIDDEN && !defined NOT_IN_libc
+# define CALL_ERRNO_LOCATION "call __GI___errno_location;"
+#else
+# define CALL_ERRNO_LOCATION "call __errno_location;"
+#endif
+
#define __SYSCALL_STRING \
"ta 0x10;" \
"bcs 2f;" \
".subsection 2;" \
"2:" \
"save %%sp, -192, %%sp;" \
- "call __errno_location;" \
+ CALL_ERRNO_LOCATION \
" nop;" \
"st %%i0,[%%o0];" \
"ba 1b;" \
".subsection 2;" \
"2:" \
"save %%sp, -192, %%sp;" \
- "call __errno_location;" \
+ CALL_ERRNO_LOCATION \
" nop;" \
"st %%i0, [%%o0];" \
"ba 1b;" \
" sub %%g0, %%o0, %%o0;" \
"1:"
-#define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \
+#define __SYSCALL_CLOBBERS \
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
ldx [%l7+%g1], %g1
#endif
st %o0, [%g1]
+#else
+#ifndef NOT_IN_libc
+ call HIDDEN_JUMPTARGET(__errno_location)
#else
call __errno_location
+#endif
mov %o0,%l1
st %l1, [%o0]
#endif
-/* Copyright (C) 1997, 2000, 2002, 2003, 2004, 2006
+/* Copyright (C) 1997, 2000, 2002, 2003, 2004, 2006, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997.
#else /* __ASSEMBLER__ */
+#if defined SHARED && defined DO_VERSIONING && defined PIC \
+ && !defined NO_HIDDEN && !defined NOT_IN_libc
+# define CALL_ERRNO_LOCATION "call __GI___errno_location;"
+#else
+# define CALL_ERRNO_LOCATION "call __errno_location;"
+#endif
+
#define __SYSCALL_STRING \
"ta 0x6d;" \
"bcc,pt %%xcc, 1f;" \
" nop;" \
"save %%sp, -192, %%sp;" \
- "call __errno_location;" \
+ CALL_ERRNO_LOCATION \
" nop;" \
"st %%i0,[%%o0];" \
"restore %%g0, -1, %%o0;" \
"bcc,pt %%xcc, 1f;" \
" sub %%o1, 1, %%o1;" \
"save %%sp, -192, %%sp;" \
- "call __errno_location;" \
+ CALL_ERRNO_LOCATION \
" mov -1, %%i1;" \
"st %%i0,[%%o0];" \
"restore %%g0, -1, %%o0;" \
" sub %%g0, %%o0, %%o0;" \
"1:"
-#define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \
+#define __SYSCALL_CLOBBERS \
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \