mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 06:10:06 +00:00
Cleanup of configuration options
Make several tool features mandatory and simplify the code.
This commit is contained in:
parent
1248c1c415
commit
3ce1f29594
80
ChangeLog
80
ChangeLog
@ -1,3 +1,83 @@
|
||||
2011-09-10 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* configure.in: Remove --with-__thread option. Make tests for
|
||||
--no-whole-archive, __builtin_expect, symbol redirection, __thread,
|
||||
tls_model attribute fail if no support is available. Remove
|
||||
USE_IN_LIBIO.
|
||||
* Makeconfig: Adjust for dropped configure option. All features are
|
||||
now mandatory.
|
||||
* Makerules: Likewise.
|
||||
* Versions.def: Likewise.
|
||||
* argp/argp-fmtstream.c: Likewise.
|
||||
* argp/argp-fmtstream.h: Likewise.
|
||||
* argp/argp-help.c: Likewise.
|
||||
* assert/assert.c: Likewise.
|
||||
* config.h.in: Likewise.
|
||||
* config.make.in: Likewise.
|
||||
* configure: Likewise.
|
||||
* configure.in: Likewise.
|
||||
* csu/Versions: Likewise.
|
||||
* csu/init.c: Likewise.
|
||||
* elf/tst-audit2.c: Likewise.
|
||||
* elf/tst-tls10.c: Likewise.
|
||||
* elf/tst-tls10.h: Likewise.
|
||||
* elf/tst-tls11.c: Likewise.
|
||||
* elf/tst-tls12.c: Likewise.
|
||||
* elf/tst-tls14.c: Likewise.
|
||||
* elf/tst-tlsmod11.c: Likewise.
|
||||
* elf/tst-tlsmod12.c: Likewise.
|
||||
* elf/tst-tlsmod13.c: Likewise.
|
||||
* elf/tst-tlsmod13a.c: Likewise.
|
||||
* elf/tst-tlsmod14a.c: Likewise.
|
||||
* elf/tst-tlsmod15b.c: Likewise.
|
||||
* elf/tst-tlsmod16a.c: Likewise.
|
||||
* elf/tst-tlsmod16b.c: Likewise.
|
||||
* elf/tst-tlsmod7.c: Likewise.
|
||||
* elf/tst-tlsmod8.c: Likewise.
|
||||
* elf/tst-tlsmod9.c: Likewise.
|
||||
* gmon/gmon.c: Likewise.
|
||||
* grp/fgetgrent_r.c: Likewise.
|
||||
* grp/putgrent.c: Likewise.
|
||||
* hurd/fopenport.c: Likewise.
|
||||
* include/libc-symbols.h: Likewise.
|
||||
* include/tls.h: Likewise.
|
||||
* intl/gettextP.h: Likewise.
|
||||
* intl/loadinfo.h: Likewise.
|
||||
* locale/global-locale.c: Likewise.
|
||||
* locale/localeinfo.h: Likewise.
|
||||
* mach/devstream.c: Likewise.
|
||||
* malloc/arena.c: Likewise.
|
||||
* malloc/set-freeres.c: Likewise.
|
||||
* misc/err.c: Likewise.
|
||||
* misc/getttyent.c: Likewise.
|
||||
* misc/mntent_r.c: Likewise.
|
||||
* posix/getopt.c: Likewise.
|
||||
* posix/wordexp.c: Likewise.
|
||||
* pwd/fgetpwent_r.c: Likewise.
|
||||
* resolv/Versions: Likewise.
|
||||
* resolv/res_hconf.c: Likewise.
|
||||
* shadow/fgetspent_r.c: Likewise.
|
||||
* shadow/putspent.c: Likewise.
|
||||
* stdio-common/printf_fphex.c: Likewise.
|
||||
* stdio-common/tmpfile.c: Likewise.
|
||||
* stdlib/abort.c: Likewise.
|
||||
* stdlib/fmtmsg.c: Likewise.
|
||||
* sunrpc/auth_unix.c: Likewise.
|
||||
* sunrpc/clnt_perr.c: Likewise.
|
||||
* sunrpc/clnt_tcp.c: Likewise.
|
||||
* sunrpc/clnt_udp.c: Likewise.
|
||||
* sunrpc/clnt_unix.c: Likewise.
|
||||
* sunrpc/openchild.c: Likewise.
|
||||
* sunrpc/svc_simple.c: Likewise.
|
||||
* sunrpc/svc_tcp.c: Likewise.
|
||||
* sunrpc/svc_udp.c: Likewise.
|
||||
* sunrpc/svc_unix.c: Likewise.
|
||||
* sunrpc/xdr.c: Likewise.
|
||||
* sunrpc/xdr_array.c: Likewise.
|
||||
* sunrpc/xdr_rec.c: Likewise.
|
||||
* sunrpc/xdr_ref.c: Likewise.
|
||||
* sunrpc/xdr_stdio.c: Likewise.
|
||||
|
||||
2011-09-09 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/i386/fpu/libm-test-ulps: Adjust ULPs for jn tests.
|
||||
|
@ -407,6 +407,10 @@ as-needed :=
|
||||
no-as-needed :=
|
||||
endif
|
||||
|
||||
# Must be supported by the linker.
|
||||
no-whole-archive = -Wl,--no-whole-archive
|
||||
whole-archive = -Wl,--whole-archive
|
||||
|
||||
# Installed name of the startup code.
|
||||
ifneq ($(have-initfini),yes)
|
||||
# When not having init/fini, there is just one startfile, called crt0.o.
|
||||
|
@ -595,7 +595,6 @@ endif
|
||||
build-module-helper-objlist = \
|
||||
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
|
||||
$(filter-out %.lds $(map-file) $(+preinit) $(+postinit),$^))
|
||||
whole-archive := -Wl,--whole-archive
|
||||
|
||||
build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
|
||||
build-shlib-objlist = $(build-module-helper-objlist) \
|
||||
@ -621,7 +620,7 @@ endif
|
||||
ifeq ($(elf),yes)
|
||||
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
|
||||
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
|
||||
$(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^ -o $@
|
||||
$(LDFLAGS-c_pic.os) -Wl,-d $(whole-archive) $^ -o $@
|
||||
|
||||
ifeq (,$(strip $(shlib-lds-flags)))
|
||||
# Generate a list of -R options to excise .gnu.glibc-stub.* sections.
|
||||
|
@ -32,9 +32,7 @@ libc {
|
||||
GLIBC_2.13
|
||||
GLIBC_2.14
|
||||
GLIBC_2.15
|
||||
%ifdef USE_IN_LIBIO
|
||||
HURD_CTHREADS_0.3
|
||||
%endif
|
||||
%ifdef EXPORT_UNWIND_FIND_FDE
|
||||
GCC_3.0
|
||||
%endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Word-wrapping and line-truncating streams
|
||||
Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-1999,2001-2003,2005,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
#define isblank(ch) ((ch)==' ' || (ch)=='\t')
|
||||
#endif
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#ifdef _LIBC
|
||||
# include <wchar.h>
|
||||
# include <libio/libioP.h>
|
||||
# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
|
||||
@ -101,11 +101,7 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
|
||||
__argp_fmtstream_update (fs);
|
||||
if (fs->p > fs->buf)
|
||||
{
|
||||
#ifdef USE_IN_LIBIO
|
||||
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
|
||||
#else
|
||||
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
|
||||
#endif
|
||||
}
|
||||
free (fs->buf);
|
||||
free (fs);
|
||||
@ -150,11 +146,9 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
size_t i;
|
||||
for (i = 0; i < pad; i++)
|
||||
{
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (fs->stream, 0) > 0)
|
||||
putwc_unlocked (L' ', fs->stream);
|
||||
else
|
||||
#endif
|
||||
putc_unlocked (' ', fs->stream);
|
||||
}
|
||||
}
|
||||
@ -315,11 +309,9 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
|
||||
*nl++ = ' ';
|
||||
else
|
||||
for (i = 0; i < fs->wmargin; ++i)
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (fs->stream, 0) > 0)
|
||||
putwc_unlocked (L' ', fs->stream);
|
||||
else
|
||||
#endif
|
||||
putc_unlocked (' ', fs->stream);
|
||||
|
||||
/* Copy the tail of the original buffer into the current buffer
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Word-wrapping and line-truncating streams.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@ -43,8 +43,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
|
||||
|| (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
|
||||
#if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)
|
||||
/* line_wrap_stream is available, so use that. */
|
||||
#define ARGP_FMTSTREAM_USE_LINEWRAP
|
||||
#endif
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Hierarchial argument parsing help output
|
||||
Copyright (C) 1995-2003, 2004, 2005, 2006, 2007
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2007, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Miles Bader <miles@gnu.ai.mit.edu>.
|
||||
|
||||
@ -312,13 +311,13 @@ fill_in_uparams (const struct argp_state *state)
|
||||
{"no-parent", 'P', 0, 0, "Include processes without parents"},
|
||||
{0, 'x', 0, OPTION_ALIAS},
|
||||
{"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally"
|
||||
" if there's some reason ps can't"
|
||||
" if there's some reason ps can't"
|
||||
" print a field for any process, it's"
|
||||
" removed from the output entirely)" },
|
||||
" removed from the output entirely)" },
|
||||
{"reverse", 'r', 0, 0, "Reverse the order of any sort"},
|
||||
{"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
|
||||
{"session", OPT_SESS, "SID", OPTION_ARG_OPTIONAL,
|
||||
"Add the processes from the session"
|
||||
"Add the processes from the session"
|
||||
" SID (which defaults to the sid of"
|
||||
" the current process)" },
|
||||
|
||||
@ -1874,11 +1873,9 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stream, 0) > 0)
|
||||
putwc_unlocked (L'\n', stream);
|
||||
else
|
||||
#endif
|
||||
putc_unlocked ('\n', stream);
|
||||
|
||||
#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
|
||||
|
@ -30,11 +30,9 @@
|
||||
|
||||
extern const char *__progname;
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
# define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <libio/iolibio.h>
|
||||
#define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
|
||||
/* This function, when passed a string containing an asserted
|
||||
expression, a filename, and a line number, prints a message
|
||||
|
17
config.h.in
17
config.h.in
@ -74,10 +74,6 @@
|
||||
/* Define if _Unwind_Find_FDE should be exported from glibc. */
|
||||
#undef EXPORT_UNWIND_FIND_FDE
|
||||
|
||||
/* Define to use GNU libio instead of GNU stdio.
|
||||
This is defined by configure under --enable-libio. */
|
||||
#undef USE_IN_LIBIO
|
||||
|
||||
/* Define if using ELF and the assembler supports the `.previous'
|
||||
directive. */
|
||||
#undef HAVE_ASM_PREVIOUS_DIRECTIVE
|
||||
@ -95,22 +91,9 @@
|
||||
/* Define if static NSS modules are wanted. */
|
||||
#undef DO_STATIC_NSS
|
||||
|
||||
/* Define if the compiler supports __builtin_expect. */
|
||||
#undef HAVE_BUILTIN_EXPECT
|
||||
|
||||
/* Define if the compiler supports __builtin_memset. */
|
||||
#undef HAVE_BUILTIN_MEMSET
|
||||
|
||||
/* Define if __asm () on built-in function's prototype causes redirection of
|
||||
the builtin. */
|
||||
#undef HAVE_BUILTIN_REDIRECTION
|
||||
|
||||
/* Define if the __thread keyword is supported. */
|
||||
#undef HAVE___THREAD
|
||||
|
||||
/* Define if the compiler supports __attribute__((tls_model(""))). */
|
||||
#undef HAVE_TLS_MODEL_ATTRIBUTE
|
||||
|
||||
/* Define if the regparm attribute shall be used for local functions
|
||||
(gcc on ix86 only). */
|
||||
#undef USE_REGPARMS
|
||||
|
@ -75,7 +75,6 @@ static-libgcc = @libc_cv_gcc_static_libgcc@
|
||||
|
||||
versioning = @VERSIONING@
|
||||
oldest-abi = @oldest_abi@
|
||||
no-whole-archive = @no_whole_archive@
|
||||
exceptions = @exceptions@
|
||||
multi-arch = @multi_arch@
|
||||
|
||||
|
66
configure.in
66
configure.in
@ -194,12 +194,6 @@ AC_ARG_WITH([tls],
|
||||
[usetls=$withval],
|
||||
[usetls=yes])
|
||||
|
||||
AC_ARG_WITH([__thread],
|
||||
AC_HELP_STRING([--without-__thread],
|
||||
[do not use TLS features even when supporting them]),
|
||||
[use__thread=$withval],
|
||||
[use__thread=yes])
|
||||
|
||||
AC_ARG_ENABLE([hidden-plt],
|
||||
AC_HELP_STRING([--disable-hidden-plt],
|
||||
[do not hide internal function calls to avoid PLT]),
|
||||
@ -2078,10 +2072,9 @@ else
|
||||
libc_cv_ld_no_whole_archive=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $libc_cv_ld_no_whole_archive = yes; then
|
||||
no_whole_archive=-Wl,--no-whole-archive
|
||||
if test $libc_cv_ld_no_whole_archive = no; then
|
||||
AC_MSG_ERROR([support for --no-whole-archive is needed])
|
||||
fi
|
||||
AC_SUBST(no_whole_archive)dnl
|
||||
|
||||
AC_CACHE_CHECK(for gcc -fexceptions, libc_cv_gcc_exceptions, [dnl
|
||||
cat > conftest.c <<\EOF
|
||||
@ -2133,8 +2126,8 @@ else
|
||||
libc_cv_gcc_builtin_expect=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test "$libc_cv_gcc_builtin_expect" = yes; then
|
||||
AC_DEFINE(HAVE_BUILTIN_EXPECT)
|
||||
if test "$libc_cv_gcc_builtin_expect" = no; then
|
||||
AC_MSG_ERROR([support for __builtin_expect needed])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl
|
||||
@ -2172,44 +2165,38 @@ else
|
||||
libc_cv_gcc_builtin_redirection=no
|
||||
fi
|
||||
rm -f conftest* ])
|
||||
if test "$libc_cv_gcc_builtin_redirection" = yes ; then
|
||||
AC_DEFINE(HAVE_BUILTIN_REDIRECTION)
|
||||
if test "$libc_cv_gcc_builtin_redirection" = no; then
|
||||
AC_MSG_ERROR([support for the symbol redirection needed])
|
||||
fi
|
||||
|
||||
dnl Check whether the compiler supports the __thread keyword.
|
||||
if test "x$use__thread" != xno; then
|
||||
AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
|
||||
[cat > conftest.c <<\EOF
|
||||
AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
|
||||
[cat > conftest.c <<\EOF
|
||||
__thread int a = 42;
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
|
||||
libc_cv_gcc___thread=yes
|
||||
else
|
||||
libc_cv_gcc___thread=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test "$libc_cv_gcc___thread" = yes; then
|
||||
AC_DEFINE(HAVE___THREAD)
|
||||
fi
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
|
||||
libc_cv_gcc___thread=yes
|
||||
else
|
||||
libc_cv_gcc___thread=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test "$libc_cv_gcc___thread" = no; then
|
||||
AC_MSG_ERROR([support for the __thread keyword is required])
|
||||
fi
|
||||
|
||||
if test "$libc_cv_gcc___thread" = yes; then
|
||||
dnl Check whether the compiler supports the tls_model attribute.
|
||||
AC_CACHE_CHECK([for tls_model attribute], libc_cv_gcc_tls_model_attr, [dnl
|
||||
cat > conftest.c <<\EOF
|
||||
dnl Check whether the compiler supports the tls_model attribute.
|
||||
AC_CACHE_CHECK([for tls_model attribute], libc_cv_gcc_tls_model_attr, [dnl
|
||||
cat > conftest.c <<\EOF
|
||||
extern __thread int a __attribute__((tls_model ("initial-exec")));
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&AS_MESSAGE_LOG_FD]); then
|
||||
libc_cv_gcc_tls_model_attr=yes
|
||||
else
|
||||
libc_cv_gcc_tls_model_attr=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test "$libc_cv_gcc_tls_model_attr" = yes; then
|
||||
AC_DEFINE(HAVE_TLS_MODEL_ATTRIBUTE)
|
||||
fi
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&AS_MESSAGE_LOG_FD]); then
|
||||
libc_cv_gcc_tls_model_attr=yes
|
||||
else
|
||||
libc_cv_gcc_tls_model_attr=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test "$libc_cv_gcc_tls_model_attr" = no; then
|
||||
AC_MSG_ERROR([support for the tls_model attribute is required])
|
||||
fi
|
||||
|
||||
if test -n "$submachine"; then
|
||||
@ -2327,9 +2314,6 @@ if test x$libc_cv_gcc_unwind_find_fde = xyes; then
|
||||
fi
|
||||
AC_SUBST(libc_cv_gcc_unwind_find_fde)
|
||||
|
||||
dnl This is tested by existing code and it's simpler to avoid changing it.
|
||||
AC_DEFINE(USE_IN_LIBIO)
|
||||
|
||||
# Test for old glibc 2.0.x headers so that they can be removed properly
|
||||
# Search only in includedir.
|
||||
AC_MSG_CHECKING(for old glibc 2.0.x headers)
|
||||
|
11
csu/Versions
11
csu/Versions
@ -4,23 +4,12 @@ libc {
|
||||
GLIBC_2.0 {
|
||||
# helper functions
|
||||
__libc_init_first; __libc_start_main;
|
||||
|
||||
%if !HAVE___THREAD
|
||||
# global variables
|
||||
_errno;
|
||||
|
||||
# variables in normal name space
|
||||
errno;
|
||||
%endif
|
||||
}
|
||||
GLIBC_2.1 {
|
||||
# New special glibc functions.
|
||||
gnu_get_libc_release; gnu_get_libc_version;
|
||||
}
|
||||
GLIBC_PRIVATE {
|
||||
%if HAVE___THREAD
|
||||
# This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
|
||||
errno;
|
||||
%endif
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Special startup support.
|
||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -17,7 +17,7 @@
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#if defined USE_IN_LIBIO && defined __GNUC__ && __GNUC__ >= 2
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
|
||||
#include <_G_config.h>
|
||||
|
||||
|
@ -4,11 +4,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if HAVE___THREAD
|
||||
# define MAGIC1 0xabcdef72
|
||||
# define MAGIC2 0xd8675309
|
||||
#define MAGIC1 0xabcdef72
|
||||
#define MAGIC2 0xd8675309
|
||||
static __thread unsigned int magic[] = { MAGIC1, MAGIC2 };
|
||||
#endif
|
||||
|
||||
#undef calloc
|
||||
|
||||
@ -18,7 +16,6 @@ static __thread unsigned int magic[] = { MAGIC1, MAGIC2 };
|
||||
void *
|
||||
calloc (size_t n, size_t m)
|
||||
{
|
||||
#if HAVE___THREAD
|
||||
if (magic[0] != MAGIC1 || magic[1] != MAGIC2)
|
||||
{
|
||||
printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC1, MAGIC2);
|
||||
@ -26,7 +23,6 @@ calloc (size_t n, size_t m)
|
||||
}
|
||||
magic[0] = MAGIC2;
|
||||
magic[1] = MAGIC1;
|
||||
#endif
|
||||
|
||||
n *= m;
|
||||
void *ptr = malloc (n);
|
||||
@ -38,13 +34,11 @@ calloc (size_t n, size_t m)
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
#if HAVE___THREAD
|
||||
if (magic[1] != MAGIC1 || magic[0] != MAGIC2)
|
||||
{
|
||||
printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC2, MAGIC1);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include "tst-tls10.h"
|
||||
|
||||
#ifdef USE_TLS__THREAD
|
||||
__thread int dummy __attribute__((visibility ("hidden"))) = 12;
|
||||
__thread struct A local = { 1, 2, 3 };
|
||||
#endif
|
||||
|
||||
#define CHECK(N, S) \
|
||||
p = f##N##a (); \
|
||||
@ -13,7 +11,6 @@ __thread struct A local = { 1, 2, 3 };
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
#ifdef USE_TLS__THREAD
|
||||
struct A *p;
|
||||
if (local.a != 1 || local.b != 2 || local.c != 3)
|
||||
abort ();
|
||||
@ -35,6 +32,6 @@ main (void)
|
||||
abort ();
|
||||
CHECK (9, 28);
|
||||
CHECK (10, 31);
|
||||
#endif
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include <tls.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
# define USE_TLS__THREAD
|
||||
|
||||
struct A
|
||||
{
|
||||
char a;
|
||||
@ -34,4 +31,3 @@ extern int f9b (void);
|
||||
extern int f10b (void);
|
||||
extern void check1 (void);
|
||||
extern void check2 (void);
|
||||
#endif
|
||||
|
@ -8,7 +8,6 @@
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
#ifdef USE_TLS__THREAD
|
||||
struct A *p;
|
||||
check1 ();
|
||||
check2 ();
|
||||
@ -22,6 +21,6 @@ main (void)
|
||||
CHECK (8, 25);
|
||||
CHECK (9, 28);
|
||||
CHECK (10, 31);
|
||||
#endif
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
@ -8,11 +8,10 @@
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
#ifdef USE_TLS__THREAD
|
||||
struct A *p;
|
||||
check1 ();
|
||||
CHECK (1, 4);
|
||||
CHECK (2, 7);
|
||||
#endif
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
@ -6,9 +6,7 @@
|
||||
|
||||
#include <tls.h>
|
||||
|
||||
#if HAVE___THREAD
|
||||
|
||||
# define AL 4096
|
||||
#define AL 4096
|
||||
struct foo
|
||||
{
|
||||
int i;
|
||||
@ -55,12 +53,5 @@ do_test (void)
|
||||
return result;
|
||||
}
|
||||
|
||||
# define TEST_FUNCTION do_test ()
|
||||
|
||||
#else
|
||||
|
||||
# define TEST_FUNCTION 0
|
||||
|
||||
#endif
|
||||
|
||||
#define TEST_FUNCTION do_test ()
|
||||
#include "../test-skeleton.c"
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "tst-tls10.h"
|
||||
|
||||
#ifdef USE_TLS__THREAD
|
||||
__thread struct A a1 = { 4, 5, 6 };
|
||||
__thread struct A a2 = { 7, 8, 9 };
|
||||
#endif
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "tst-tls10.h"
|
||||
|
||||
#ifdef USE_TLS__THREAD
|
||||
extern __thread struct A a2 __attribute__((tls_model("initial-exec")));
|
||||
|
||||
void
|
||||
@ -11,4 +10,3 @@ check1 (void)
|
||||
if (a2.a != 7 || a2.b != 8 || a2.c != 9)
|
||||
abort ();
|
||||
}
|
||||
#endif
|
||||
|
@ -1,10 +1,6 @@
|
||||
#include <tls.h>
|
||||
|
||||
#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
__thread int a[2] __attribute__ ((tls_model ("initial-exec")));
|
||||
#else
|
||||
int a[2];
|
||||
#endif
|
||||
|
||||
int
|
||||
foo (void)
|
||||
|
@ -1,10 +1,6 @@
|
||||
#include <tls.h>
|
||||
|
||||
#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
__thread int b[2] __attribute__ ((tls_model ("initial-exec")));
|
||||
#else
|
||||
int b[2];
|
||||
#endif
|
||||
|
||||
extern int foo (void);
|
||||
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#include <tls.h>
|
||||
|
||||
#if HAVE___THREAD
|
||||
|
||||
# define AL 4096
|
||||
#define AL 4096
|
||||
struct foo
|
||||
{
|
||||
int i;
|
||||
@ -15,9 +13,9 @@ static __thread struct foo f;
|
||||
static struct foo g;
|
||||
|
||||
|
||||
# ifndef FCT
|
||||
# define FCT in_dso1
|
||||
# endif
|
||||
#ifndef FCT
|
||||
# define FCT in_dso1
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
@ -37,5 +35,3 @@ FCT (void)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "tst-tls10.h"
|
||||
|
||||
#ifdef USE_TLS__THREAD
|
||||
__thread int mod15b_var __attribute__((tls_model("initial-exec")));
|
||||
|
||||
int
|
||||
@ -8,10 +7,3 @@ in_dso (void)
|
||||
{
|
||||
return mod15b_var;
|
||||
}
|
||||
#else
|
||||
int
|
||||
in_dso (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,3 @@
|
||||
#include <tls.h>
|
||||
|
||||
#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
int __thread tlsvar;
|
||||
#else
|
||||
int tlsvar;
|
||||
#endif
|
||||
|
@ -1,10 +1,6 @@
|
||||
#include <tls.h>
|
||||
|
||||
#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
extern __thread int tlsvar __attribute__((tls_model("initial-exec")));
|
||||
#else
|
||||
extern int tlsvar;
|
||||
#endif
|
||||
|
||||
void *
|
||||
in_dso (void)
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "tst-tls10.h"
|
||||
|
||||
#ifdef USE_TLS__THREAD
|
||||
__thread int dummy __attribute__((visibility ("hidden"))) = 12;
|
||||
__thread struct A a1 = { 4, 5, 6 };
|
||||
__thread struct A a2 = { 7, 8, 9 };
|
||||
@ -100,4 +99,3 @@ f6b (void)
|
||||
{
|
||||
return local2.c;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "tst-tls10.h"
|
||||
|
||||
#ifdef USE_TLS__THREAD
|
||||
__thread long long dummy __attribute__((visibility ("hidden"))) = 12;
|
||||
__thread struct A a2 = { 22, 23, 24 };
|
||||
__thread struct A a4 __attribute__((tls_model("initial-exec")))
|
||||
@ -69,4 +68,3 @@ f10b (void)
|
||||
{
|
||||
return local2.c;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "tst-tls10.h"
|
||||
|
||||
#ifdef USE_TLS__THREAD
|
||||
__thread int dummy __attribute__((visibility ("hidden"))) = 12;
|
||||
__thread struct A a1 = { 4, 5, 6 };
|
||||
__thread struct A a3 __attribute__((tls_model("initial-exec")))
|
||||
@ -98,4 +97,3 @@ f6b (void)
|
||||
{
|
||||
return local2.c;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 1983, 1992, 1993
|
||||
* Copyright (c) 1983, 1992, 1993, 2011
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -36,6 +36,7 @@
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -45,9 +46,6 @@
|
||||
#include <libc-internal.h>
|
||||
#include <not-cancel.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
/* Head of basic-block list or NULL. */
|
||||
struct __bb *__bb_head attribute_hidden;
|
||||
@ -194,7 +192,7 @@ write_hist (fd)
|
||||
char dimen_abbrev;
|
||||
} thdr;
|
||||
struct iovec iov[3] =
|
||||
{
|
||||
{
|
||||
{ &tag, sizeof (tag) },
|
||||
{ &thdr, sizeof (struct gmon_hist_hdr) },
|
||||
{ _gmonparam.kcount, _gmonparam.kcountsize }
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1996-1999, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1996-1999, 2000, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,11 +21,9 @@
|
||||
#include <grp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#include <libio/iolibio.h>
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
/* Define a line parsing function using the common code
|
||||
used in the nss_files module. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,92,96,98,99,2000,2005 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,92,96,98,99,2000,2005,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -20,10 +20,8 @@
|
||||
#include <stdio.h>
|
||||
#include <grp.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
#define _S(x) x ? x : ""
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1994,95,97,2000,01,02 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994,1995,1997,2000-2002,2011 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
|
||||
@ -63,11 +63,7 @@ writeio (void *cookie, const char *buf, size_t n)
|
||||
Returns zero if successful, nonzero if not. */
|
||||
static int
|
||||
seekio (void *cookie,
|
||||
#ifdef USE_IN_LIBIO
|
||||
_IO_off64_t *pos,
|
||||
#else
|
||||
fpos_t *pos,
|
||||
#endif
|
||||
int whence)
|
||||
{
|
||||
error_t err = __io_seek ((file_t) cookie, *pos, whence, pos);
|
||||
@ -86,12 +82,8 @@ closeio (void *cookie)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
#include "../libio/libioP.h"
|
||||
#define fopencookie _IO_fopencookie
|
||||
#else
|
||||
#define cookie_io_functions_t __io_functions
|
||||
#endif
|
||||
static const cookie_io_functions_t funcsio =
|
||||
{ readio, writeio, seekio, closeio };
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991,94,97,2000,01 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,94,97,2000,01,11 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,9 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <hurd.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libioP.h>
|
||||
#endif
|
||||
#include <libioP.h>
|
||||
|
||||
static ssize_t
|
||||
do_write (void *cookie, const char *buf, size_t n)
|
||||
@ -42,8 +40,6 @@ vpprintf (io_t port, const char *format, va_list arg)
|
||||
{
|
||||
int done;
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
|
||||
struct locked_FILE
|
||||
{
|
||||
struct _IO_cookie_file cfile;
|
||||
@ -60,24 +56,5 @@ vpprintf (io_t port, const char *format, va_list arg)
|
||||
|
||||
done = _IO_vfprintf (&temp_f.cfile.__fp.file, format, arg);
|
||||
|
||||
#else
|
||||
|
||||
FILE f;
|
||||
|
||||
/* Create an unbuffered stream talking to PORT on the stack. */
|
||||
memset ((void *) &f, 0, sizeof (f));
|
||||
f.__magic = _IOMAGIC;
|
||||
f.__mode.__write = 1;
|
||||
f.__cookie = (void *) port;
|
||||
f.__room_funcs = __default_room_functions;
|
||||
f.__io_funcs.__write = do_write;
|
||||
f.__seen = 1;
|
||||
f.__userbuf = 1;
|
||||
|
||||
/* vfprintf will use a buffer on the stack for the life of the call. */
|
||||
done = vfprintf (&f, format, arg);
|
||||
|
||||
#endif
|
||||
|
||||
return done;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Handle configuration data.
|
||||
Copyright (C) 1997-2003, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2003, 2005, 2006, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||
|
||||
@ -90,10 +90,8 @@ static const char builtin_aliases[] =
|
||||
#undef BUILTIN_ALIAS
|
||||
};
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/libioP.h>
|
||||
# define __getdelim(line, len, c, fp) _IO_getdelim (line, len, c, fp)
|
||||
#endif
|
||||
#include <libio/libioP.h>
|
||||
#define __getdelim(line, len, c, fp) _IO_getdelim (line, len, c, fp)
|
||||
|
||||
|
||||
/* Value of the GCONV_PATH environment variable. */
|
||||
|
@ -216,11 +216,6 @@
|
||||
# define internal_function /* empty */
|
||||
#endif
|
||||
|
||||
/* Prepare for the case that `__builtin_expect' is not available. */
|
||||
#ifndef HAVE_BUILTIN_EXPECT
|
||||
# define __builtin_expect(expr, val) (expr)
|
||||
#endif
|
||||
|
||||
/* Determine the return address. */
|
||||
#define RETURN_ADDRESS(nr) \
|
||||
__builtin_extract_return_addr (__builtin_return_address (nr))
|
||||
@ -460,11 +455,7 @@ for linking")
|
||||
# define attribute_hidden
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TLS_MODEL_ATTRIBUTE
|
||||
# define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
|
||||
#else
|
||||
# define attribute_tls_model_ie
|
||||
#endif
|
||||
#define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
|
||||
|
||||
#define attribute_relro __attribute__ ((section (".data.rel.ro")))
|
||||
|
||||
@ -794,22 +785,12 @@ for linking")
|
||||
# define libnss_nisplus_hidden_data_ver(local, name)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BUILTIN_REDIRECTION
|
||||
# define libc_hidden_builtin_proto(name, attrs...) libc_hidden_proto (name, ##attrs)
|
||||
# define libc_hidden_builtin_def(name) libc_hidden_def (name)
|
||||
# define libc_hidden_builtin_weak(name) libc_hidden_weak (name)
|
||||
# define libc_hidden_builtin_ver(local, name) libc_hidden_ver (local, name)
|
||||
# ifdef __ASSEMBLER__
|
||||
# define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name)
|
||||
# endif
|
||||
#else
|
||||
# define libc_hidden_builtin_proto(name, attrs...)
|
||||
# define libc_hidden_builtin_def(name)
|
||||
# define libc_hidden_builtin_weak(name)
|
||||
# define libc_hidden_builtin_ver(local, name)
|
||||
# ifdef __ASSEMBLER__
|
||||
# define HIDDEN_BUILTIN_JUMPTARGET(name) JUMPTARGET(name)
|
||||
# endif
|
||||
#define libc_hidden_builtin_proto(name, attrs...) libc_hidden_proto (name, ##attrs)
|
||||
#define libc_hidden_builtin_def(name) libc_hidden_def (name)
|
||||
#define libc_hidden_builtin_weak(name) libc_hidden_weak (name)
|
||||
#define libc_hidden_builtin_ver(local, name) libc_hidden_ver (local, name)
|
||||
#ifdef __ASSEMBLER__
|
||||
# define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name)
|
||||
#endif
|
||||
|
||||
#if defined NOT_IN_libc && defined IS_IN_libutil
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include_next <tls.h>
|
||||
|
||||
#if HAVE___THREAD && (!defined NOT_IN_libc || defined IS_IN_libpthread)
|
||||
#if !defined NOT_IN_libc || defined IS_IN_libpthread
|
||||
|
||||
# define USE___THREAD 1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Header describing internals of libintl library.
|
||||
Copyright (C) 1995-1999, 2000, 2001, 2004-2005, 2007
|
||||
Copyright (C) 1995-1999, 2000, 2001, 2004-2005, 2007, 2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
@ -54,12 +54,6 @@
|
||||
# define attribute_hidden
|
||||
#endif
|
||||
|
||||
/* Tell the compiler when a conditional or integer expression is
|
||||
almost always true or almost always false. */
|
||||
#ifndef HAVE_BUILTIN_EXPECT
|
||||
# define __builtin_expect(expr, val) (expr)
|
||||
#endif
|
||||
|
||||
#ifndef W
|
||||
# define W(flag, data) ((flag) ? SWAP (data) : (data))
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996-2000, 2002-2004, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
@ -44,12 +44,6 @@
|
||||
# define internal_function
|
||||
#endif
|
||||
|
||||
/* Tell the compiler when a conditional or integer expression is
|
||||
almost always true or almost always false. */
|
||||
#ifndef HAVE_BUILTIN_EXPECT
|
||||
# define __builtin_expect(expr, val) (expr)
|
||||
#endif
|
||||
|
||||
/* Encoding of locale name parts. */
|
||||
#define XPG_NORM_CODESET 1
|
||||
#define XPG_CODESET 2
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Locale object representing the global locale controlled by setlocale.
|
||||
Copyright (C) 2002, 2006, 2008, 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2006, 2008, 2010, 2011 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
|
||||
@ -60,16 +60,6 @@ struct __locale_struct _nl_global_locale attribute_hidden =
|
||||
};
|
||||
|
||||
#include <tls.h>
|
||||
#if HAVE___THREAD
|
||||
|
||||
/* The tsd macros don't permit an initializer. */
|
||||
__thread __locale_t __libc_tsd_LOCALE = &_nl_global_locale;
|
||||
#else
|
||||
__libc_tsd_define (, __locale_t, LOCALE)
|
||||
/* This is a bad kludge presuming the variable name used by the macros.
|
||||
Using typeof makes sure to barf if we do not match the macro definition.
|
||||
This ifndef is a further bad kludge for Hurd, where there is an explicit
|
||||
initialization. */
|
||||
# ifndef _HURD_THREADVAR_H
|
||||
__typeof (__libc_tsd_LOCALE_data) __libc_tsd_LOCALE_data = &_nl_global_locale;
|
||||
# endif
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Declarations for internal libc locale interfaces
|
||||
Copyright (C) 1995-2003, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
Copyright (C) 1995-2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -216,7 +216,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
|
||||
unused. We can manage this playing some tricks with weak references.
|
||||
But with thread-local locale settings, it becomes quite ungainly unless
|
||||
we can use __thread variables. So only in that case do we attempt this. */
|
||||
#if !defined SHARED && defined HAVE___THREAD && defined HAVE_WEAK_SYMBOLS
|
||||
#if !defined SHARED && defined HAVE_WEAK_SYMBOLS
|
||||
# include <tls.h>
|
||||
# define NL_CURRENT_INDIRECT 1
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* stdio on a Mach device port.
|
||||
Translates \n to \r\n on output, echos and translates \r to \n on input.
|
||||
Copyright (C) 1992,93,94,96,97,2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992,93,94,96,97,2000,2011 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
|
||||
@ -120,12 +120,10 @@ dealloc_ref (void *cookie)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef USE_IN_LIBIO
|
||||
#define cookie_io_functions_t __io_functions
|
||||
#define write __write
|
||||
#define read __read
|
||||
#define close __close
|
||||
#endif
|
||||
|
||||
FILE *
|
||||
mach_open_devstream (mach_port_t dev, const char *mode)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Malloc implementation for multiple threads without lock contention.
|
||||
Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009,2010
|
||||
Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009,2010,2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
|
||||
@ -484,29 +484,6 @@ ptmalloc_init (void)
|
||||
#endif
|
||||
ptmalloc_init_minimal();
|
||||
|
||||
#ifndef NO_THREADS
|
||||
# if defined _LIBC
|
||||
/* We know __pthread_initialize_minimal has already been called,
|
||||
and that is enough. */
|
||||
# define NO_STARTER
|
||||
# endif
|
||||
# ifndef NO_STARTER
|
||||
/* With some threads implementations, creating thread-specific data
|
||||
or initializing a mutex may call malloc() itself. Provide a
|
||||
simple starter version (realloc() won't work). */
|
||||
save_malloc_hook = __malloc_hook;
|
||||
save_memalign_hook = __memalign_hook;
|
||||
save_free_hook = __free_hook;
|
||||
__malloc_hook = malloc_starter;
|
||||
__memalign_hook = memalign_starter;
|
||||
__free_hook = free_starter;
|
||||
# ifdef _LIBC
|
||||
/* Initialize the pthreads interface. */
|
||||
if (__pthread_initialize != NULL)
|
||||
__pthread_initialize();
|
||||
# endif /* !defined _LIBC */
|
||||
# endif /* !defined NO_STARTER */
|
||||
#endif /* !defined NO_THREADS */
|
||||
mutex_init(&main_arena.mutex);
|
||||
main_arena.next = &main_arena;
|
||||
|
||||
@ -526,15 +503,6 @@ ptmalloc_init (void)
|
||||
tsd_key_create(&arena_key, NULL);
|
||||
tsd_setspecific(arena_key, (Void_t *)&main_arena);
|
||||
thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_unlock_all2);
|
||||
#ifndef NO_THREADS
|
||||
# ifndef NO_STARTER
|
||||
__malloc_hook = save_malloc_hook;
|
||||
__memalign_hook = save_memalign_hook;
|
||||
__free_hook = save_free_hook;
|
||||
# else
|
||||
# undef NO_STARTER
|
||||
# endif
|
||||
#endif
|
||||
#ifdef _LIBC
|
||||
secure = __libc_enable_secure;
|
||||
s = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997,1999-2003,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,9 +21,7 @@
|
||||
#include <set-hooks.h>
|
||||
#include <libc-internal.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include "../libio/libioP.h"
|
||||
#endif
|
||||
#include "../libio/libioP.h"
|
||||
|
||||
DEFINE_HOOK (__libc_subfreeres, (void));
|
||||
|
||||
@ -40,9 +38,7 @@ __libc_freeres (void)
|
||||
{
|
||||
void * const *p;
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
_IO_cleanup ();
|
||||
#endif
|
||||
|
||||
RUN_HOOK (__libc_subfreeres, ());
|
||||
|
||||
|
18
misc/err.c
18
misc/err.c
@ -1,5 +1,5 @@
|
||||
/* 4.4BSD utility functions for error messages.
|
||||
Copyright (C) 1995,96,98,2001,02 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995,1996,1998,2001,2002,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -24,11 +24,9 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
extern char *__progname;
|
||||
|
||||
@ -40,11 +38,10 @@ extern char *__progname;
|
||||
va_end (ap); \
|
||||
}
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
static void
|
||||
convert_and_print (const char *format, __gnuc_va_list ap)
|
||||
{
|
||||
# define ALLOCA_LIMIT 2000
|
||||
#define ALLOCA_LIMIT 2000
|
||||
size_t len;
|
||||
wchar_t *wformat = NULL;
|
||||
mbstate_t st;
|
||||
@ -85,13 +82,11 @@ convert_and_print (const char *format, __gnuc_va_list ap)
|
||||
|
||||
__vfwprintf (stderr, wformat, ap);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
vwarnx (const char *format, __gnuc_va_list ap)
|
||||
{
|
||||
flockfile (stderr);
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
__fwprintf (stderr, L"%s: ", __progname);
|
||||
@ -99,7 +94,6 @@ vwarnx (const char *format, __gnuc_va_list ap)
|
||||
putwc_unlocked (L'\n', stderr);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
fprintf (stderr, "%s: ", __progname);
|
||||
if (format)
|
||||
@ -116,7 +110,6 @@ vwarn (const char *format, __gnuc_va_list ap)
|
||||
int error = errno;
|
||||
|
||||
flockfile (stderr);
|
||||
#ifdef USE_IN_LIBIO
|
||||
if (_IO_fwide (stderr, 0) > 0)
|
||||
{
|
||||
__fwprintf (stderr, L"%s: ", __progname);
|
||||
@ -129,7 +122,6 @@ vwarn (const char *format, __gnuc_va_list ap)
|
||||
__fwprintf (stderr, L"%m\n");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
fprintf (stderr, "%s: ", __progname);
|
||||
if (format)
|
||||
|
@ -37,10 +37,8 @@ static char sccsid[] = "@(#)getttyent.c 8.1 (Berkeley) 6/4/93";
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
static char zapchar;
|
||||
static FILE *tf;
|
||||
|
@ -25,10 +25,8 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
#undef __setmntent
|
||||
#undef __endmntent
|
||||
|
@ -1,3 +1,14 @@
|
||||
2011-09-10 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* tst-tls1.c: Support for __thread is now mandatory.
|
||||
* tst-tls2.c: Likewise.
|
||||
* tst-tls3.c: Likewise.
|
||||
* tst-tls3mod.c: Likewise.
|
||||
* tst-tls4.c: Likewise.
|
||||
* tst-tls4moda.c: Likewise.
|
||||
* tst-tls4modb.c: Likewise.
|
||||
* tst-tls5.h: Likewise.
|
||||
|
||||
2011-09-08 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
[BZ #12403]
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#if HAVE___THREAD
|
||||
struct test_s
|
||||
{
|
||||
int a;
|
||||
@ -52,19 +51,11 @@ tf (void *arg)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
do_test (void)
|
||||
{
|
||||
#if !HAVE___THREAD
|
||||
|
||||
puts ("No __thread support in compiler, test skipped.");
|
||||
|
||||
return 0;
|
||||
#else
|
||||
|
||||
if (s.a != INIT_A || s.b != INIT_B)
|
||||
{
|
||||
puts ("initial value of s in main thread wrong");
|
||||
@ -114,7 +105,6 @@ do_test (void)
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if HAVE___THREAD
|
||||
|
||||
#define N 10
|
||||
static pthread_t th[N];
|
||||
@ -106,18 +105,11 @@ tf (void *arg)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
do_test (void)
|
||||
{
|
||||
#if !HAVE___THREAD
|
||||
|
||||
puts ("No __thread support in compiler, test skipped.");
|
||||
|
||||
return 0;
|
||||
#else
|
||||
|
||||
if (pthread_barrier_init (&b, NULL, N + 1) != 0)
|
||||
{
|
||||
puts ("barrier_init failed");
|
||||
@ -207,7 +199,6 @@ do_test (void)
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2004, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
||||
|
||||
@ -73,13 +73,6 @@ int nsigs;
|
||||
int
|
||||
do_test (void)
|
||||
{
|
||||
#if !HAVE___THREAD
|
||||
|
||||
puts ("No __thread support in compiler, test skipped.");
|
||||
|
||||
return 0;
|
||||
#else
|
||||
|
||||
if ((uintptr_t) pthread_self () & (TCB_ALIGNMENT - 1))
|
||||
{
|
||||
puts ("initial thread's struct pthread not aligned enough");
|
||||
@ -206,7 +199,6 @@ do_test (void)
|
||||
}
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
#include <unistd.h>
|
||||
#include <pthreaddef.h>
|
||||
|
||||
#if HAVE___THREAD
|
||||
|
||||
extern pthread_barrier_t b;
|
||||
|
||||
@ -88,5 +87,3 @@ tf (void *arg)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
#include <unistd.h>
|
||||
#include <tls.h>
|
||||
|
||||
#if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
|
||||
#define N 3
|
||||
|
||||
@ -181,11 +180,4 @@ do_test (void)
|
||||
|
||||
#define TIMEOUT 5
|
||||
#define TEST_FUNCTION do_test ()
|
||||
|
||||
#else
|
||||
|
||||
#define TEST_FUNCTION 0
|
||||
|
||||
#endif
|
||||
|
||||
#include "../test-skeleton.c"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
#include <unistd.h>
|
||||
#include <tls.h>
|
||||
|
||||
#if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
|
||||
static __thread unsigned char foo [32]
|
||||
__attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *))));
|
||||
@ -35,7 +34,7 @@ test1 (void)
|
||||
for (s = 0; s < sizeof (foo); ++s)
|
||||
{
|
||||
if (foo [s])
|
||||
abort ();
|
||||
abort ();
|
||||
foo [s] = s;
|
||||
}
|
||||
}
|
||||
@ -48,9 +47,7 @@ test2 (void)
|
||||
for (s = 0; s < sizeof (foo); ++s)
|
||||
{
|
||||
if (foo [s] != s)
|
||||
abort ();
|
||||
abort ();
|
||||
foo [s] = sizeof (foo) - s;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
#include <unistd.h>
|
||||
#include <tls.h>
|
||||
|
||||
#if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
|
||||
|
||||
static int i;
|
||||
int bar;
|
||||
@ -44,7 +43,7 @@ test1 (void)
|
||||
for (s = 0; s < sizeof (foo) / sizeof (void *); ++s)
|
||||
{
|
||||
if (foo [s])
|
||||
abort ();
|
||||
abort ();
|
||||
foo [s] = &foo[s];
|
||||
}
|
||||
}
|
||||
@ -57,9 +56,7 @@ test2 (void)
|
||||
for (s = 0; s < sizeof (foo) / sizeof (void *); ++s)
|
||||
{
|
||||
if (foo [s] != &foo [s])
|
||||
abort ();
|
||||
abort ();
|
||||
foo [s] = &foo [s ^ 1];
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <tls.h>
|
||||
|
||||
#if HAVE___THREAD
|
||||
|
||||
struct tls_obj
|
||||
{
|
||||
@ -24,5 +23,3 @@ tls_register_##x (void) \
|
||||
tls_registry[i].size = sizeof (x); \
|
||||
tls_registry[i].align = __alignof__ (x); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -74,7 +74,7 @@
|
||||
# define _(msgid) gettext (msgid)
|
||||
#endif
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
@ -583,7 +583,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
first.next = ambig_list;
|
||||
ambig_list = &first;
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf = NULL;
|
||||
size_t buflen = 0;
|
||||
|
||||
@ -652,7 +652,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
int n;
|
||||
#endif
|
||||
@ -660,7 +660,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
if (argv[d->optind - 1][1] == '-')
|
||||
{
|
||||
/* --option */
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
n = __asprintf (&buf, _("\
|
||||
%s: option '--%s' doesn't allow an argument\n"),
|
||||
argv[0], pfound->name);
|
||||
@ -673,7 +673,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
else
|
||||
{
|
||||
/* +option or -option */
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
n = __asprintf (&buf, _("\
|
||||
%s: option '%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[d->optind - 1][0],
|
||||
@ -686,7 +686,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
if (n >= 0)
|
||||
{
|
||||
_IO_flockfile (stderr);
|
||||
@ -719,7 +719,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf, _("\
|
||||
@ -770,7 +770,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
int n;
|
||||
#endif
|
||||
@ -778,7 +778,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
if (argv[d->optind][1] == '-')
|
||||
{
|
||||
/* --option */
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
|
||||
argv[0], d->__nextchar);
|
||||
#else
|
||||
@ -789,7 +789,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
else
|
||||
{
|
||||
/* +option or -option */
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
|
||||
argv[0], argv[d->optind][0], d->__nextchar);
|
||||
#else
|
||||
@ -798,7 +798,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
if (n >= 0)
|
||||
{
|
||||
_IO_flockfile (stderr);
|
||||
@ -836,19 +836,19 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
int n;
|
||||
#endif
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
|
||||
argv[0], c);
|
||||
#else
|
||||
fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
|
||||
#endif
|
||||
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
if (n >= 0)
|
||||
{
|
||||
_IO_flockfile (stderr);
|
||||
@ -894,7 +894,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf,
|
||||
@ -968,7 +968,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
|
||||
@ -1008,7 +1008,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf, _("\
|
||||
@ -1047,7 +1047,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf, _("\
|
||||
@ -1122,7 +1122,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
|
||||
{
|
||||
if (print_errors)
|
||||
{
|
||||
#if defined _LIBC && defined USE_IN_LIBIO
|
||||
#if defined _LIBC
|
||||
char *buf;
|
||||
|
||||
if (__asprintf (&buf, _("\
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* POSIX.2 wordexp implementation.
|
||||
Copyright (C) 1997-2003, 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2003,2005,2006,2008,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Tim Waugh <tim@cyberelk.demon.co.uk>.
|
||||
|
||||
@ -38,9 +38,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <wordexp.h>
|
||||
#include <kernel-features.h>
|
||||
|
||||
@ -854,7 +852,7 @@ exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
|
||||
__close (fd);
|
||||
}
|
||||
/* Be paranoid. Check that we actually opened the /dev/null
|
||||
device. */
|
||||
device. */
|
||||
if (__builtin_expect (__fxstat64 (_STAT_VER, STDERR_FILENO, &st), 0) != 0
|
||||
|| __builtin_expect (S_ISCHR (st.st_mode), 1) == 0
|
||||
#if defined DEV_NULL_MAJOR && defined DEV_NULL_MINOR
|
||||
@ -862,8 +860,8 @@ exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
|
||||
#endif
|
||||
)
|
||||
/* It's not the /dev/null device. Stop right here. The
|
||||
problem is: how do we stop? We use _exit() with an
|
||||
hopefully unusual exit code. */
|
||||
problem is: how do we stop? We use _exit() with an
|
||||
hopefully unusual exit code. */
|
||||
_exit (90);
|
||||
}
|
||||
|
||||
@ -1062,7 +1060,7 @@ exec_comm (char *comm, char **word, size_t *word_length, size_t *max_length,
|
||||
if (copying == 3)
|
||||
{
|
||||
/* Nothing but (IFS) newlines since the last field,
|
||||
so delimit it here before starting new word */
|
||||
so delimit it here before starting new word */
|
||||
if (w_addword (pwordexp, *word) == WRDE_NOSPACE)
|
||||
goto no_space;
|
||||
|
||||
@ -1089,7 +1087,7 @@ exec_comm (char *comm, char **word, size_t *word_length, size_t *max_length,
|
||||
/* Ensure we don't go back further than the beginning of the
|
||||
substitution (i.e. remove maxnewlines bytes at most) */
|
||||
while (maxnewlines-- != 0 &&
|
||||
*word_length > 0 && (*word)[*word_length - 1] == '\n')
|
||||
*word_length > 0 && (*word)[*word_length - 1] == '\n')
|
||||
{
|
||||
(*word)[--*word_length] = '\0';
|
||||
|
||||
@ -1577,7 +1575,7 @@ envsubst:
|
||||
if (expand_pattern)
|
||||
{
|
||||
/* We need to perform tilde expansion, parameter expansion,
|
||||
command substitution, and arithmetic expansion. We also
|
||||
command substitution, and arithmetic expansion. We also
|
||||
have to be a bit careful with wildcard characters, as
|
||||
pattern might be given to fnmatch soon. To do this, we
|
||||
convert quotes to escapes. */
|
||||
@ -1982,7 +1980,7 @@ envsubst:
|
||||
field_end = field_begin + strcspn (field_begin, ifs);
|
||||
|
||||
/* Set up pointer to the character after end of field and
|
||||
skip whitespace IFS after it. */
|
||||
skip whitespace IFS after it. */
|
||||
next_field = field_end + strspn (field_end, ifs_white);
|
||||
|
||||
/* Skip at most one non-whitespace IFS character after the field */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1996-1999, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,10 +21,8 @@
|
||||
#include <stdio.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
/* Define a line parsing function using the common code
|
||||
used in the nss_files module. */
|
||||
|
@ -2,11 +2,6 @@
|
||||
|
||||
libc {
|
||||
GLIBC_2.0 {
|
||||
%if !HAVE___THREAD
|
||||
# global variables
|
||||
_h_errno;
|
||||
%endif
|
||||
|
||||
_res;
|
||||
|
||||
# helper functions
|
||||
@ -17,9 +12,6 @@ libc {
|
||||
|
||||
# variables in normal name space
|
||||
h_errlist; h_nerr;
|
||||
%if !HAVE___THREAD
|
||||
h_errno;
|
||||
%endif
|
||||
|
||||
# h*
|
||||
herror; hstrerror;
|
||||
@ -34,10 +26,7 @@ libc {
|
||||
GLIBC_PRIVATE {
|
||||
__gai_sigqueue;
|
||||
|
||||
%if HAVE___THREAD
|
||||
# This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
|
||||
h_errno; __resp;
|
||||
%endif
|
||||
|
||||
__res_maybe_init; __res_iclose;
|
||||
}
|
||||
|
@ -46,9 +46,7 @@
|
||||
#include <bits/libc-lock.h>
|
||||
#include "ifreq.h"
|
||||
#include "res_hconf.h"
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
#define _PATH_HOSTCONF "/etc/host.conf"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996, 1997, 1998, 1999, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -21,10 +21,8 @@
|
||||
#include <shadow.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
/* Define a line parsing function using the common code
|
||||
used in the nss_files module. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1996-1998, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -19,10 +19,8 @@
|
||||
#include <stdio.h>
|
||||
#include <shadow.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# define flockfile(s) _IO_flockfile (s)
|
||||
# define funlockfile(s) _IO_funlockfile (s)
|
||||
#endif
|
||||
#define flockfile(s) _IO_flockfile (s)
|
||||
#define funlockfile(s) _IO_funlockfile (s)
|
||||
|
||||
#define _S(x) x ? x : ""
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Print floating point number in hexadecimal notation according to ISO C99.
|
||||
Copyright (C) 1997-2002,2004,2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2002,2004,2006,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||
|
||||
@ -35,22 +35,16 @@
|
||||
|
||||
/* This defines make it possible to use the same code for GNU C library and
|
||||
the GNU I/O library. */
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libioP.h>
|
||||
# define PUT(f, s, n) _IO_sputn (f, s, n)
|
||||
# define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : INTUSE(_IO_padn) (f, c, n))
|
||||
#include <libioP.h>
|
||||
#define PUT(f, s, n) _IO_sputn (f, s, n)
|
||||
#define PAD(f, c, n) (wide ? _IO_wpadn (f, c, n) : INTUSE(_IO_padn) (f, c, n))
|
||||
/* We use this file GNU C library and GNU I/O library. So make
|
||||
names equal. */
|
||||
# undef putc
|
||||
# define putc(c, f) (wide \
|
||||
#undef putc
|
||||
#define putc(c, f) (wide \
|
||||
? (int)_IO_putwc_unlocked (c, f) : _IO_putc_unlocked (c, f))
|
||||
# define size_t _IO_size_t
|
||||
# define FILE _IO_FILE
|
||||
#else /* ! USE_IN_LIBIO */
|
||||
# define PUT(f, s, n) fwrite (s, 1, n, f)
|
||||
# define PAD(f, c, n) __printf_pad (f, c, n)
|
||||
ssize_t __printf_pad (FILE *, char pad, int n) __THROW; /* In vfprintf.c. */
|
||||
#endif /* USE_IN_LIBIO */
|
||||
#define size_t _IO_size_t
|
||||
#define FILE _IO_FILE
|
||||
|
||||
/* Macros for doing the actual output. */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Open a stdio stream on an anonymous temporary file. Generic/POSIX version.
|
||||
Copyright (C) 1991,1993,1996-2000,2002,2003,2007,2009
|
||||
Copyright (C) 1991,1993,1996-2000,2002,2003,2007,2009,2011
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -22,12 +22,10 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <iolibio.h>
|
||||
# define __fdopen INTUSE(_IO_fdopen)
|
||||
# ifndef tmpfile
|
||||
# define tmpfile __new_tmpfile
|
||||
# endif
|
||||
#include <iolibio.h>
|
||||
#define __fdopen INTUSE(_IO_fdopen)
|
||||
#ifndef tmpfile
|
||||
# define tmpfile __new_tmpfile
|
||||
#endif
|
||||
|
||||
|
||||
@ -62,7 +60,7 @@ tmpfile (void)
|
||||
return f;
|
||||
}
|
||||
|
||||
#if defined USE_IN_LIBIO && !defined FLAGS /* Not for tmpfile64. */
|
||||
#ifndef FLAGS /* Not for tmpfile64. */
|
||||
# undef tmpfile
|
||||
# include <shlib-compat.h>
|
||||
versioned_symbol (libc, __new_tmpfile, tmpfile, GLIBC_2_1);
|
||||
|
@ -32,10 +32,8 @@
|
||||
# define ABORT_INSTRUCTION
|
||||
#endif
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/libioP.h>
|
||||
# define fflush(s) _IO_flush_all_lockp (0)
|
||||
#endif
|
||||
#include <libio/libioP.h>
|
||||
#define fflush(s) _IO_flush_all_lockp (0)
|
||||
|
||||
/* Exported variable to locate abort message in core files etc. */
|
||||
struct abort_msg_s *__abort_msg __attribute__ ((nocommon));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997,1999,2000-2003,2005, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997,1999-2003,2005,2006,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/syslog.h>
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
/* We have global data, protect the modification. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle America, Inc.
|
||||
* Copyright (c) 2010, 2011, Oracle America, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
@ -45,15 +45,13 @@
|
||||
#include <unistd.h>
|
||||
#include <libintl.h>
|
||||
#include <sys/param.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <rpc/types.h>
|
||||
#include <rpc/xdr.h>
|
||||
#include <rpc/auth.h>
|
||||
#include <rpc/auth_unix.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unix authenticator operations vector
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* clnt_perror.c
|
||||
*
|
||||
* Copyright (c) 2010, Oracle America, Inc.
|
||||
* Copyright (c) 2010, 2011, Oracle America, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
@ -34,11 +34,8 @@
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <libio/iolibio.h>
|
||||
|
||||
static char *auth_errmsg (enum auth_stat stat) internal_function;
|
||||
|
||||
|
@ -53,9 +53,7 @@
|
||||
#include <sys/poll.h>
|
||||
#include <sys/socket.h>
|
||||
#include <rpc/pmap_clnt.h>
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
extern u_long _create_xid (void);
|
||||
|
||||
|
@ -45,9 +45,7 @@
|
||||
#include <rpc/pmap_clnt.h>
|
||||
#include <net/if.h>
|
||||
#include <ifaddrs.h>
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef IP_RECVERR
|
||||
|
@ -54,9 +54,7 @@
|
||||
#include <sys/poll.h>
|
||||
#include <sys/socket.h>
|
||||
#include <rpc/pmap_clnt.h>
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
extern u_long _create_xid (void);
|
||||
|
||||
|
@ -41,11 +41,9 @@
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpc/clnt.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
# define __fdopen(fd,m) INTUSE(_IO_fdopen) (fd,m)
|
||||
#endif
|
||||
#include <libio/iolibio.h>
|
||||
#define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
#define __fdopen(fd,m) INTUSE(_IO_fdopen) (fd,m)
|
||||
|
||||
/*
|
||||
* returns pid, or -1 for failure
|
||||
|
@ -41,10 +41,8 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <libio/iolibio.h>
|
||||
|
||||
struct proglst_
|
||||
{
|
||||
|
@ -45,10 +45,8 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <libio/iolibio.h>
|
||||
|
||||
/*
|
||||
* Ops vector for TCP/IP based rpc service handle
|
||||
|
@ -45,10 +45,8 @@
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <libio/iolibio.h>
|
||||
|
||||
#define rpc_buffer(xprt) ((xprt)->xp_p1)
|
||||
#ifndef MAX
|
||||
|
@ -46,10 +46,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
/*
|
||||
* Ops vector for AF_UNIX based rpc service handle
|
||||
|
@ -39,13 +39,11 @@
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <rpc/types.h>
|
||||
#include <rpc/xdr.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* constants specific to the xdr "protocol"
|
||||
|
@ -40,10 +40,7 @@
|
||||
#include <rpc/xdr.h>
|
||||
#include <libintl.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
|
||||
#define LASTUNSIGNED ((u_int)0-1)
|
||||
|
||||
|
@ -47,11 +47,8 @@
|
||||
#include <unistd.h>
|
||||
#include <rpc/rpc.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <libio/iolibio.h>
|
||||
|
||||
static bool_t xdrrec_getlong (XDR *, long *);
|
||||
static bool_t xdrrec_putlong (XDR *, const long *);
|
||||
|
@ -39,11 +39,8 @@
|
||||
#include <rpc/types.h>
|
||||
#include <rpc/xdr.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <wchar.h>
|
||||
# include <libio/iolibio.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include <libio/iolibio.h>
|
||||
|
||||
#define LASTUNSIGNED ((u_int)0-1)
|
||||
|
||||
|
@ -39,13 +39,11 @@
|
||||
#include <stdio.h>
|
||||
#include <rpc/xdr.h>
|
||||
|
||||
#ifdef USE_IN_LIBIO
|
||||
# include <libio/iolibio.h>
|
||||
# define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s)
|
||||
# define ftell(s) INTUSE(_IO_ftell) (s)
|
||||
# define fwrite(p, m, n, s) INTUSE(_IO_fwrite) (p, m, n, s)
|
||||
#endif
|
||||
#include <libio/iolibio.h>
|
||||
#define fflush(s) INTUSE(_IO_fflush) (s)
|
||||
#define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s)
|
||||
#define ftell(s) INTUSE(_IO_ftell) (s)
|
||||
#define fwrite(p, m, n, s) INTUSE(_IO_fwrite) (p, m, n, s)
|
||||
|
||||
static bool_t xdrstdio_getlong (XDR *, long *);
|
||||
static bool_t xdrstdio_putlong (XDR *, const long *);
|
||||
|
Loading…
Reference in New Issue
Block a user