glibc/stdlib
Siddhesh Poyarekar 9cd4747089 Add new macro IN_MODULE to identify module in which source is built
The current scheme to identify which module a translation unit is
built in depends on defining multiple macros IS_IN_* and also defining
NOT_IN_libc if we're building a non-libc module.  In addition, there
is an IN_LIB macro that does effectively the same thing, but for
different modules (notably the systemtap probes).  This macro scheme
unifies both ideas to use just one macro IN_MODULE and assign it a
value depending on the module it is being built into.  If the module
is not defined, it defaults to MODULE_libc.

Patches that follow will replace uses of IS_IN_* variables with the
IS_IN() macro.  libc-symbols.h has been converted already to give an
example of how such a transition will look.

Verified that there are no relevant binary changes.  One source change
that will crop up repeatedly is that of nscd_stat, since it uses the
build timestamp as a constant in its logic.

	* Makeconfig (in-module): Get value of libof set for the
	translation unit.
	(CPPFLAGS): Use $(in-module).
	* Makerules: Don't suffix routine names for nonlib.
	* include/libc-modules.h: New file.
	* include/libc-symbols.h: Include libc-modules.h
	(IS_IN): New macro to replace IS_IN_* macros.
	* elf/Makefile: Set libof-* for each routine.
	* elf/rtld-Rules: Likewise.
	* extra-modules.mk: Likewise.
	* iconv/Makefile: Likewise.
	* iconvdata/Makefile: Likewise.
	* locale/Makefile: Likewise.
	* malloc/Makefile: Likewise.
	* nss/Makefile: Likewise.
	* sysdeps/gnu/Makefile: Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile: Likewise.
	* sysdeps/unix/sysv/linux/Makefile: Likewise.
	* sysdeps/s390/s390-64/Makefile: Likewise.
	* nscd/Makefile: Set libof-* for each routine.  Set CFLAGS and
	CPPFLAGS for nscd instead of nonlib.
2014-11-19 12:13:54 +05:30
..
bits Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sys
a64l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
abort.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
abs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
add_n.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
addmul_1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
alloca.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
at_quick_exit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
atexit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
atof.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
atoi.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
atol.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
atoll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bsearch.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
bug-fmtmsg1.c
bug-getcontext.c
bug-strtod2.c
bug-strtod.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
canonicalize.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cmp.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cxa_at_quick_exit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cxa_atexit.c Don't use INTDEF/INTUSE with __cxa_atexit (bug 14132). 2014-10-09 11:22:33 +00:00
cxa_finalize.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
cxa_thread_atexit_impl.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
dbl2mpn.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Depend
div.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
divmod_1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
divrem.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
drand48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
drand48-iter.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
drand48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
erand48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
erand48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
errno.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
exit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
exit.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fmtmsg.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fmtmsg.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
fpioconst.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
fpioconst.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gen-fpioconst.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gen-tst-strtod-round.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getcontext.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getsubopt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gmp-impl.h stdlib/gmp-impl.h: Silence -Wundef warning for USE_STACK_ALLOC 2014-05-14 14:11:48 +01:00
gmp.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
grouping.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
grouping.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
groupingwc.c
inlines.c
isomac.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
jrand48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
jrand48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
l64a.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
labs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
lcong48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
lcong48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ldbl2mpn.c
ldiv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
llabs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
lldiv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
longlong.h stdlib/longlong.h: Add __udiv_w_sdiv prototype. 2014-09-19 11:26:31 +02:00
lrand48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
lrand48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
lshift.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
makecontext.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile Add new macro IN_MODULE to identify module in which source is built 2014-11-19 12:13:54 +05:30
mblen.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mbstowcs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mbtowc.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mod_1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
monetary.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mp_clz_tab.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mpn2dbl.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mpn2flt.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mpn2ldbl.c
mrand48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mrand48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
msort.c Fix qsort_r namespace (bug 17571). 2014-11-12 22:33:41 +00:00
mul_1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mul_n.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
nrand48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
nrand48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
old_atexit.c
on_exit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
putenv.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
qsort.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
quick_exit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rand_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rand.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
random_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
random.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rpmatch.c Don't use a nested function in rpmatch. 2014-09-12 14:58:55 -07:00
rshift.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
secure-getenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
seed48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
seed48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
setcontext.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
setenv.c Remove unused variable from stdlib/setenv.c 2014-02-11 12:43:49 +01:00
srand48_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
srand48.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stdlib.h Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
strfmon_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strfmon.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtod_l.c Fix strtold on 32-bit sparc (and probably others) (BZ #16965) 2014-05-20 18:44:28 +02:00
strtod.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtof_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtof.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoimax.c
strtol_l.c Clean up HAVE_CONFIG_H and STDC_HEADERS. 2014-06-20 20:04:47 -07:00
strtol.c Use prototype definition for __strtol. 2014-11-13 21:37:53 +00:00
strtold_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtold.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoll_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoll.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoul_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoul.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoull_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoull.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strtoumax.c
sub_n.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
submul_1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
swapcontext.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
system.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tens_in_limb.c
test-a64l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-canon2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test-canon.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
testdiv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
testdiv.input
testmb2.c
testmb.c
testrand.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
testsort.c
tst-atof1.c
tst-atof2.c
tst-bsearch.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-environ.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-fmtmsg.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-fmtmsg.sh Don't require test wrappers to preserve environment variables, use more consistent environment. 2014-06-06 22:19:27 +00:00
tst-limits.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-makecontext2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-makecontext3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-makecontext.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-putenv.c
tst-putenvmod.c
tst-qsort2.c stdlib/tst-qsort2.c: Fix off-by-one argc interpretation error 2014-06-20 21:29:33 +01:00
tst-qsort.c
tst-rand48-2.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-rand48.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-random2.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-random.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-secure-getenv.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-setcontext.c tst-setcontext: fix style 2014-08-03 08:55:20 -04:00
tst-strtod2.c
tst-strtod3.c
tst-strtod4.c
tst-strtod5.c
tst-strtod6.c
tst-strtod-overflow.c stdlib/tst-strtod-overflow: Bump timeout up yet 2014-07-03 08:07:55 +01:00
tst-strtod-round-data
tst-strtod-round.c stdlib/tst-strtod-round.c: Fix build on ARM 2014-09-30 15:03:50 +01:00
tst-strtod-underflow.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-strtod.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-strtol.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-strtoll.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-system.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-tininess.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-tls-atexit-lib.c Turn on -Werror=implicit-function-declaration 2014-09-10 08:13:06 +02:00
tst-tls-atexit.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-unsetenv1.c
tst-xpg-basename.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
ucontext.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
udiv_qrnnd.c
Versions
wcstoimax.c
wcstombs.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcstoumax.c
wctomb.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
xpg_basename.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00