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