1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-21 14:53:53 +03:00

Remove IN_LIB

Replace with IS_IN and IS_IN_LIB macros instead.  This change results
in a change in generated code, because it fixes a subtle bug.  The bug
was introduced when systemtap probes were added to lowlevellock.h,
which resulted in stap-probe.h being included in a number of places.
stap-probe.h always defines IN_LIB, which breaks a check in errno.h
and netdb.h since they rely on that macro to decide whether to
implement an internal version of a declaration or an external one.

The components that see a code change due to this are:

iconv_prog
libmemusage.so
libpcprofile.so
libSegFault.so
libutil.so.1
locale
localedef
nscd

All other built components (i.e. libc, libpthread, etc.) remain
unchanged by this on x86_64.

	* elf/Makefile (CPPFLAGS-.os): Remove IN_LIB.
	* elf/rtld-Rules (rtld-CPPFLAGS): Likewise.
	* extra-lib.mk (CPPFLAGS-$(lib)): Likewise.
	* include/libc-symbols.h (IS_IN_LIB): New macro.
	* include/errno.h: Use IS_IN_LIB instead of IN_LIB.
	* include/netdb.h: Likewise.
	* include/stap-probe.h: Remove all uses of IN_LIB.
This commit is contained in:
Siddhesh Poyarekar
2014-11-20 12:03:11 +05:30
parent 279bc5b3c3
commit a10178bda1
8 changed files with 20 additions and 19 deletions

View File

@@ -23,6 +23,11 @@
#define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
/* Returns true if the current module is a versioned library. Versioned
library names culled from shlib-versions files are assigned a MODULE_*
value lower than MODULE_LIBS_BEGIN. */
#define IS_IN_LIB (IN_MODULE > MODULE_LIBS_BEGIN)
#define PASTE_NAME(a,b) PASTE_NAME1 (a,b)
#define PASTE_NAME1(a,b) a##b