Go to file
Zack Weinberg 7c3018f9e4 Suppress internal declarations for most of the testsuite.
This patch adds a new build module called 'testsuite'.
IS_IN (testsuite) implies _ISOMAC, as do IS_IN_build and __cplusplus
(which means several ad-hoc tests for __cplusplus can go away).
libc-symbols.h now suppresses almost all of *itself* when _ISOMAC is
defined; in particular, _ISOMAC mode does not get config.h
automatically anymore.

There are still quite a few tests that need to see internal gunk of
one variety or another.  For them, we now have 'tests-internal' and
'test-internal-extras'; files in this category will still be compiled
with MODULE_NAME=nonlib, and everything proceeds as it always has.
The bulk of this patch is moving tests from 'tests' to
'tests-internal'.  There is also 'tests-static-internal', which has
the same effect on files in 'tests-static', and 'modules-names-tests',
which has the *inverse* effect on files in 'modules-names' (it's
inverted because most of the things in modules-names are *not* tests).
For both of these, the file must appear in *both* the new variable and
the old one.

There is also now a special case for when libc-symbols.h is included
without MODULE_NAME being defined at all.  (This happens during the
creation of libc-modules.h, and also when preprocessing Versions
files.)  When this happens, IS_IN is set to be always false and
_ISOMAC is *not* defined, which was the status quo, but now it's
explicit.

The remaining changes to C source files in this patch seemed likely to
cause problems in the absence of the main change.  They should be
relatively self-explanatory.  In a few cases I duplicated a definition
from an internal header rather than move the test to tests-internal;
this was a judgement call each time and I'm happy to change those
however reviewers feel is more appropriate.

	* Makerules: New subdir configuration variables 'tests-internal'
	and 'test-internal-extras'.  Test files in these categories will
	still be compiled with MODULE_NAME=nonlib.  Test files in the
	existing categories (tests, xtests, test-srcs, test-extras) are
	now compiled with MODULE_NAME=testsuite.
	New subdir configuration variable 'modules-names-tests'.  Files
	which are in both 'modules-names' and 'modules-names-tests' will
	be compiled with MODULE_NAME=testsuite instead of
	MODULE_NAME=extramodules.
	(gen-as-const-headers): Move to tests-internal.
	(do-tests-clean, common-mostlyclean): Support tests-internal.
	* Makeconfig (built-modules): Add testsuite.
	* Makefile: Change libof-check-installed-headers-c and
	libof-check-installed-headers-cxx to 'testsuite'.
	* Rules: Likewise.  Support tests-internal.
	* benchtests/strcoll-inputs/filelist#en_US.UTF-8:
	Remove extra-modules.mk.

	* config.h.in: Don't check for __OPTIMIZE__ or __FAST_MATH__ here.
	* include/libc-symbols.h: Move definitions of _GNU_SOURCE,
	PASTE_NAME, PASTE_NAME1, IN_MODULE, IS_IN, and IS_IN_LIB to the
	very top of the file and rationalize their order.
	If MODULE_NAME is not defined at all, define IS_IN to always be
	false, and don't define _ISOMAC.
	If any of IS_IN (testsuite), IS_IN_build, or __cplusplus are
	true, define _ISOMAC and suppress everything else in this file,
	starting with the inclusion of config.h.
	Do check for inappropriate definitions of __OPTIMIZE__ and
	__FAST_MATH__ here, but only if _ISOMAC is not defined.
        Correct some out-of-date commentary.

	* include/math.h: If _ISOMAC is defined, undefine NO_LONG_DOUBLE
	and _Mlong_double_ before including math.h.
	* include/string.h: If _ISOMAC is defined, don't expose
	_STRING_ARCH_unaligned. Move a comment to a more appropriate
	location.

	* include/errno.h, include/stdio.h, include/stdlib.h, include/string.h
	* include/time.h, include/unistd.h, include/wchar.h: No need to
	check __cplusplus nor use __BEGIN_DECLS/__END_DECLS.

	* misc/sys/cdefs.h (__NTHNL): New macro.
	* sysdeps/m68k/m680x0/fpu/bits/mathinline.h
	(__m81_defun): Use __NTHNL to avoid errors with GCC 6.

	* elf/tst-env-setuid-tunables.c: Include config.h with _LIBC
	defined, for HAVE_TUNABLES.
	* inet/tst-checks-posix.c: No need to define _ISOMAC.
	* intl/tst-gettext2.c: Provide own definition of N_.
	* math/test-signgam-finite-c99.c: No need to define _ISOMAC.
	* math/test-signgam-main.c: No need to define _ISOMAC.
	* stdlib/tst-strtod.c: Convert to test-driver. Split locale_test to...
	* stdlib/tst-strtod1i.c: ...this new file.
	* stdlib/tst-strtod5.c: Convert to test-driver and add copyright notice.
        Split tests of __strtod_internal to...
	* stdlib/tst-strtod5i.c: ...this new file.
	* string/test-string.h: Include stdint.h. Duplicate definition of
	inhibit_loop_to_libcall here (from libc-symbols.h).
	* string/test-strstr.c: Provide dummy definition of
	libc_hidden_builtin_def when including strstr.c.
	* sysdeps/ia64/fpu/libm-symbols.h: Suppress entire file in _ISOMAC
	mode; no need to test __STRICT_ANSI__ nor __cplusplus as well.
	* sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h.
	Don't include init-arch.h.
	* sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h.
	Don't include init-arch.h.

	* elf/Makefile: Move tst-ptrguard1-static, tst-stackguard1-static,
	tst-tls1-static, tst-tls2-static, tst-tls3-static, loadtest,
	unload, unload2, circleload1, neededtest, neededtest2,
	neededtest3, neededtest4, tst-tls1, tst-tls2, tst-tls3,
	tst-tls6, tst-tls7, tst-tls8, tst-dlmopen2, tst-ptrguard1,
	tst-stackguard1, tst-_dl_addr_inside_object, and all of the
	ifunc tests to tests-internal.
	Don't add $(modules-names) to test-extras.
	* inet/Makefile: Move tst-inet6_scopeid_pton to tests-internal.
	Add tst-deadline to tests-static-internal.
	* malloc/Makefile: Move tst-mallocstate and tst-scratch_buffer to
	tests-internal.
	* misc/Makefile: Move tst-atomic and tst-atomic-long to tests-internal.
	* nptl/Makefile: Move tst-typesizes, tst-rwlock19, tst-sem11,
	tst-sem12, tst-sem13, tst-barrier5, tst-signal7, tst-tls3,
	tst-tls3-malloc, tst-tls5, tst-stackguard1, tst-sem11-static,
	tst-sem12-static, and tst-stackguard1-static to tests-internal.
        Link tests-internal with libpthread also.
	Don't add $(modules-names) to test-extras.
	* nss/Makefile: Move tst-field to tests-internal.
	* posix/Makefile: Move bug-regex5, bug-regex20, bug-regex33,
	tst-rfc3484, tst-rfc3484-2, and tst-rfc3484-3 to tests-internal.
	* stdlib/Makefile: Move tst-strtod1i, tst-strtod3, tst-strtod4,
	tst-strtod5i, tst-tls-atexit, and tst-tls-atexit-nodelete to
	tests-internal.
        * sunrpc/Makefile: Move tst-svc_register to tests-internal.
	* sysdeps/powerpc/Makefile: Move test-get_hwcap and
	test-get_hwcap-static to tests-internal.
	* sysdeps/unix/sysv/linux/Makefile: Move tst-setgetname to
	tests-internal.
	* sysdeps/x86_64/fpu/Makefile: Add all libmvec test modules to
	modules-names-tests.
2017-05-11 19:27:59 -04:00
argp
assert
benchtests Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
bits Add support for testing __STDC_WANT_IEC_60559_TYPES_EXT__ 2017-05-09 11:40:28 -03:00
catgets Update copyright dates not handled by scripts/update-copyrights. 2017-01-01 00:26:24 +00:00
conform Fix network headers stdint.h namespace (bug 21455). 2017-05-04 20:36:42 +00:00
crypt Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
csu Assume that O_NOFOLLOW is always defined 2017-04-13 21:28:18 +02:00
ctype Remove C++ namespace handling from glibc headers. 2017-03-16 13:31:57 +00:00
debug Update string tests to use the support test driver. 2017-03-23 11:32:29 -03:00
dirent support: Prevent multiple deletion of temporary files 2017-05-08 16:20:40 +02:00
dlfcn Miscellaneous low-risk changes preparing for _ISOMAC testsuite. 2017-03-01 20:32:50 -05:00
elf Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
gmon Assume that O_NOFOLLOW is always defined 2017-04-13 21:28:18 +02:00
gnulib
grp
gshadow
hesiod
hurd As a minor cleanup remove the (r)index defines from include/string.h as 2017-02-06 18:15:18 +00:00
iconv Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
iconvdata Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
include Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
inet Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
intl Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
io Consolidate Linux write syscall 2017-05-11 17:27:30 -03:00
libidn
libio Remove _IO_MTSAFE_IO from public headers. 2017-05-11 19:14:11 -04:00
locale Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
localedata Bug 20686: Add el_GR@euro support. 2017-05-03 15:37:04 -04:00
login Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
mach
malloc Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
manual Add support for testing __STDC_WANT_IEC_60559_TYPES_EXT__ 2017-05-09 11:40:28 -03:00
math Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
mathvec
misc Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
nis Create more sockets with SOCK_CLOEXEC [BZ #15722] 2017-04-19 07:45:04 +02:00
nptl Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
nptl_db Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
nscd Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
nss Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
po Add target to incorporate translations from translations.org 2017-01-20 12:32:46 +05:30
posix Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
pwd
resolv inet_pton: Reformat in GNU style 2017-05-11 14:48:51 +02:00
resource
rt One more obvious missing #include in the testsuite. 2017-02-19 10:29:34 -05:00
scripts tunables: Make tunable_list relro 2017-05-11 20:15:56 +05:30
setjmp Remove C++ namespace handling from glibc headers. 2017-03-16 13:31:57 +00:00
shadow Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
signal Fix signal.h bsd_signal namespace (bug 21445). 2017-05-04 17:38:05 +00:00
socket Fix sys/socket.h namespace issues from sys/uio.h inclusion (bug 21426). 2017-04-25 17:52:47 +00:00
soft-fp Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
stdio-common vfprintf.c: Refactor magic number 32 into EXTSIZ. 2017-05-08 16:13:16 -04:00
stdlib Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
streams
string Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
sunrpc Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
support support_format_addrinfo: Fix flags and canonname formatting 2017-05-11 11:51:34 +02:00
sysdeps Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
sysvipc Fix test-sysvsem on some platforms 2017-01-02 18:53:50 -02:00
termios
time Remove C++ namespace handling from glibc headers. 2017-03-16 13:31:57 +00:00
timezone Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
wcsmbs Do not use wildcard symbol names for public versions in Versions files. 2017-04-20 20:35:21 +00:00
wctype Remove C++ namespace handling from glibc headers. 2017-03-16 13:31:57 +00:00
.gitattributes
.gitignore
abi-tags
aclocal.m4
BUGS
ChangeLog Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
ChangeLog.1
ChangeLog.2
ChangeLog.3
ChangeLog.4
ChangeLog.5
ChangeLog.6
ChangeLog.7 Revert "ChangeLogs: convert to utf-8" 2016-02-12 16:35:27 -05:00
ChangeLog.8
ChangeLog.9
ChangeLog.10
ChangeLog.11
ChangeLog.12
ChangeLog.13
ChangeLog.14
ChangeLog.15
ChangeLog.16
ChangeLog.17
ChangeLog.old-ports
ChangeLog.old-ports-aarch64
ChangeLog.old-ports-aix
ChangeLog.old-ports-alpha ChangeLog: fix BZ style to be consistent and match majority of existing code 2017-04-03 15:18:07 -04:00
ChangeLog.old-ports-am33
ChangeLog.old-ports-arm
ChangeLog.old-ports-cris
ChangeLog.old-ports-hppa ChangeLog: fix BZ style to be consistent and match majority of existing code 2017-04-03 15:18:07 -04:00
ChangeLog.old-ports-ia64
ChangeLog.old-ports-linux-generic
ChangeLog.old-ports-m68k
ChangeLog.old-ports-microblaze
ChangeLog.old-ports-mips ChangeLog: fix BZ style to be consistent and match majority of existing code 2017-04-03 15:18:07 -04:00
ChangeLog.old-ports-powerpc
ChangeLog.old-ports-tile
config.h.in Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
config.make.in Deprecate libnsl by default (only shared library will be 2017-03-21 15:14:27 +01:00
configure Deprecate libnsl by default (only shared library will be 2017-03-21 15:14:27 +01:00
configure.ac Deprecate libnsl by default (only shared library will be 2017-03-21 15:14:27 +01:00
CONFORMANCE
COPYING
COPYING.LIB
extra-lib.mk Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
gen-locales.mk
INSTALL Assume that accept4 is always available and works 2017-04-19 07:44:48 +02:00
libc-abis
libof-iterator.mk Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
LICENSES
MAINTAINERS Add MAINTAINERS 2017-05-11 13:38:30 -04:00
Makeconfig Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
Makefile Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
Makefile.in
Makerules Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
NAMESPACE
NEWS Remove <sys/ultrasound.h> 2017-05-08 14:59:21 +02:00
o-iterator.mk
README Require Linux kernel 3.2 or later on x86 / x86_64. 2017-05-08 10:45:20 +00:00
README.pretty-printers Fix mutex pretty printer test and pretty printer output. 2017-01-20 14:56:39 +01:00
README.tunables Update old tunables framework document/script. 2017-03-24 11:08:28 +05:30
Rules Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
shlib-versions
test-skeleton.c
version.h Open master for development 2017-02-05 21:27:52 +05:30
WUR-REPORT

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.  The current
GNU/Hurd support requires out-of-tree patches that will eventually be
incorporated into an official GNU C Library release.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arm-*-linux-gnueabi
	hppa-*-linux-gnu	Not currently functional without patches.
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu
	tilegx-*-linux-gnu
	tilepro-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see http://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at http://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.