2013-01-01 16:29:10 +00:00
|
|
|
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
1995-02-18 01:27:10 +00:00
|
|
|
# This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
# Lesser General Public License for more details.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
# License along with the GNU C Library; if not, see
|
|
|
|
# <http://www.gnu.org/licenses/>.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Sub-makefile for resolv portion of the library.
|
|
|
|
#
|
|
|
|
subdir := resolv
|
|
|
|
|
2000-04-03 17:13:51 +00:00
|
|
|
headers := resolv.h \
|
|
|
|
netdb.h bits/netdb.h \
|
|
|
|
arpa/nameser.h arpa/nameser_compat.h \
|
2000-03-03 20:04:58 +00:00
|
|
|
sys/bitypes.h
|
1995-02-18 01:27:10 +00:00
|
|
|
|
1999-12-04 18:05:55 +00:00
|
|
|
routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init \
|
2002-12-28 10:24:40 +00:00
|
|
|
res_hconf res_libc res-state
|
1996-06-25 10:52:53 +00:00
|
|
|
|
2007-04-30 22:30:14 +00:00
|
|
|
tests = tst-aton tst-leaks tst-inet_ntop
|
2004-07-21 18:30:11 +00:00
|
|
|
xtests = tst-leaks2
|
1998-04-29 17:14:29 +00:00
|
|
|
|
2004-07-21 18:30:11 +00:00
|
|
|
generate := mtrace-tst-leaks tst-leaks.mtrace tst-leaks2.mtrace
|
2003-05-05 17:36:15 +00:00
|
|
|
|
1998-04-07 16:19:36 +00:00
|
|
|
include ../Makeconfig
|
|
|
|
|
2001-03-07 07:41:33 +00:00
|
|
|
extra-libs := libresolv libnss_dns
|
|
|
|
ifeq ($(have-thread-library),yes)
|
|
|
|
extra-libs += libanl
|
2001-03-07 13:52:14 +00:00
|
|
|
routines += gai_sigqueue
|
2001-03-07 07:41:33 +00:00
|
|
|
endif
|
update from main archive 960911
Thu Sep 12 03:35:27 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/Dist: Remove init-first.h.
* sysdeps/unix/sysv/linux/m68k/Dist: Likewise.
* sysdeps/unix/sysv/linux/Dist: Add init-first.h.
1996-09-11 Paul Eggert <eggert@twinsun.com>
* strftime.c (strftime):
Handle E and O modifiers, required for POSIX.2 and XPG4.
Don't use sprintf to format numbers; this way, we can handle time_t
correctly regardless of whether it's signed.
Don't dump core if format ends in %.
In default %c format, use %e instead of %d, for POSIX.2 compatibility.
For %z:
Use tm_gmtoff if available.
Output nothing if tm_isdst is negative.
Output correct value even if arg is 1969-12-31 23:59:59 UTC.
Don't assume that UTC offset is less than 24 hours;
Posix requires support for 24 hours, and there's no point
limiting it at all.
(HAVE_TM_GMTOFF, TYPE_SIGNED, INT_STRLEN_BOUND): New macros.
(CHAR_BIT): Define if <limits.h> doesn't.
(tm_diff): New function.
(fmt, <stdio.h>): Remove; no longer used.
Thu Sep 12 02:21:44 1996 Ulrich Drepper <drepper@cygnus.com>
* db/Makefile: Add extra-libs-others variable so that shared
library is built in `others' pass.
* elf/Makefile: Likewise.
* math/Makefile: Likewise.
* resolv/Makefile: Likewise.
* Makefile (generated): Add version.info.h.
* time/checktab.awk: New file. From ADO 96k.
* time/iso3166.tab: Likewise.
* time/tzselect.ksh: Likewise.
* time/zone.tab: Likewise.
* stdio-common/vfprintf.c: Correct cleanup registration. We
cannot use a macro
1996-09-11 Paul Eggert <eggert@twinsun.com>
* time/time.h (tm_gmtoff, tm_zone): Prefix with `__' unless
__USE_BSD; this is required for ANSI C compatibility.
* manual/time.texi: Replace GMT by UTC, daylight savings by
daylight saving, timezone by time zone.
Rewrite description of %V to match ISO 8601.
Fix TZ Posix string example for US Eastern time.
Explain tzname[1] when DST isn't used.
Explain tzname when multiple abbreviations used (e.g. EST/EWT/EDT).
Explain that timezone's sign is opposite from tm_gmtoff, and that
timezone lacks DST adjustment whereas tm_gmtoff has it.
Deprecate tzname and timezone.
Tue Sep 10 14:46:16 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Implement Roland McGrath's idea of how to put an .interp into
shared libraries.
* interp.c: New file.
* Makerules (interp-obj): New object, linked into every shared
library.
(common-generated): Add interp.so.
(CFLAGS-interp.c): Pass name of interpreter.
Tue Sep 10 21:09:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* db/Makefile: Fix typo.
Tue Sep 10 19:29:53 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* nss/db-Makefile ($(VAR_DB)/passwd.db): Look for multiple
occurences of the same uid, and only generate a mapping for the
first one.
Tue Sep 10 03:14:59 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/system.c: New file, to override
sysdeps/unix/system.c.
Tue Sep 10 15:05:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (before-compile): Add version-info.h, needed to build
version.d.
Tue Sep 10 14:14:33 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Remove check for
EWOULDBLOCK, never true on Linux.
(__errno_location): New function.
[_LIBC_REENTRANT]: Set errno using __errno_location function.
* sysdeps/unix/sysv/linux/m68k/sysdep.h [PIC]: Add second
syscall_error handler for reentrant libc.
Tue Sep 10 13:27:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/Makefile (extra-objs): Add eval.so to get dependencies.
Wed Sep 11 04:40:57 1996 Ulrich Drepper <drepper@cygnus.com>
* time/tzset.c (__tzname_cur_max): Use type `size_t' to avoid
warning.
* time/tzfile.c (compute_tzname_max): Likewise.
1996-09-12 02:51:03 +00:00
|
|
|
extra-libs-others = $(extra-libs)
|
update from main archive 960921
Sun Sep 22 03:40:52 1996 Ulrich Drepper <drepper@cygnus.com>
* resolv/resolv.h: Update to bind-4.9.5-T4B.
* resolv/base64.c: Likewise.
* resolv/res_debug.c: Likewise.
* resolv/res_query.c: Likewise.
* resolv/gethnamaddr.c: Likewise.
* nss/nss_dns/dns-host.c: Likewise.
* resolv/res_comp.c: Likewise.
* resolv/res_send.c: Likewise.
* resolv/arpa/nameser.h: Likewise. Attention: MAXDNAME is much
higher now.
* resolv/Banner: New file.
* resolv/Makefile (distribute): Add Banner.
Sat Sep 21 19:15:24 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/stub/getsysstats.c: New file.
* sysdeps/unix/sysv/linux/getsysstats.c: New file.
* misc/Makefile (headers): Add sys/sysinfo.h.
(routines): Add getsysstats.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc]
(sysdep_headers): Remove sys/sysinfo.h.
* sysdeps/generic/sys/sysinfo.h: New file.
* sysdeps/unix/sysv/linux/sys/sysinfo.h: Add prototype for get_nprocs,
get_phys_pages, and get_avphys_pages.
* misc/Makefile (routines): Add mntent_r.
* misc/mntent_r.c: New file.
* misc/mntent.c: Remove all functions but getmntent and use
__getmntent_r.
* misc/mntent.h: Add prototype for __getmntent_r.
* misc/fstab.c: Use __getmntent_r function instead of getmntent.
This will not clobber the state in getmntent.
* sysdeps/generic/confname.h: Add _SC_PROCESSORS_CONF,
_SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES,
_SC_ATEXIT_MAX, and _SC_PASS_MAX.
* sysdeps/stub/sysconf.c: Add handling _SC_PROCESSORS_CONF and
_SC_NPROCESSORS_ONLN by calling __get_nprocs, _SC_PHYS_PAGES by
calling __get_phys_pages, _SY_AVPHYS_PAGES by calling
__get_avphys_pages, _SC_ATEXIT_MAX and _SC_PASS_MAX.
* sysdeps/posix/sysconf.c: Likewise.
* posix/getconf.c (vars): Add _NPROCESSORS_CONF, _NPROCESSORS_ONLN,
_PHYS_PAGES, _AVPHYS_PAGES, ATEXIT_MAX, and PASS_MAX entries.
Sat Sep 21 05:20:36 1996 Ulrich Drepper <drepper@cygnus.com>
* version.h (VERSION): Bump to 1.95.
* Make-dist (+tsrcs): Don't filter out files in subdirs which
match files in the sysdeps hierachy (welcome back,
sys/syscall.h!).
* resolv/Makefile (libresolv-routines): Remove getnetnamad.
Sat Sep 21 03:00:19 1996 Ulrich Drepper <drepper@cygnus.com>
* locale/loadlocale.c (_nl_free_locale): Remove function.
* locale/localeinfo.h: Remove prototype for _nl_free_locale.
* locale/setlocale.c (setlocale): Don't free locale data of
categories which succeeded to load after a wrong or missing data
file was observed.
* locale/setlocale (setlocale): Initialize NEWNAME correctly so
that it works even when the locale data is not used.
* stdlib/random_r.c: Fix typo in comment.
* stdlib/drand48-iter.c: Likewise.
* stdlib/drand48.c: Likewise.
* stdlib/erand48.c: Likewise.
* stdlib/jrand48.c: Likewise.
* stdlib/lcong48.c: Likewise.
* stdlib/lrand48.c: Likewise.
* stdlib/mrand48.c: Likewise.
* stdlib/nrand48.c: Likewise.
* stdlib/random.c: Likewise.
* stdlib/seed48.c: Likewise.
* stdlib/srand48.c: Likewise.
* misc/search.h: Likewise.
* misc/hsearch.c: Likewise.
* misc/hsearch_r.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep.S (__errno_location):
Thu Sep 19 23:36:19 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* hurd/hurdinit.c (__libc_argv): Provide common decl.
(_hurd_setproc): Don't declare __libc_argv here.
1996-09-22 03:06:42 +00:00
|
|
|
libresolv-routines := gethnamaddr res_comp res_debug \
|
1996-09-10 02:00:15 +00:00
|
|
|
res_data res_mkquery res_query res_send \
|
1999-12-04 18:05:55 +00:00
|
|
|
inet_net_ntop inet_net_pton inet_neta base64 \
|
|
|
|
ns_parse ns_name ns_netint ns_ttl ns_print \
|
2008-08-01 17:16:31 +00:00
|
|
|
ns_samedomain ns_date
|
1995-02-18 01:27:10 +00:00
|
|
|
|
2001-03-03 18:21:04 +00:00
|
|
|
libanl-routines := gai_cancel gai_error gai_misc gai_notify gai_suspend \
|
|
|
|
getaddrinfo_a
|
|
|
|
|
1997-01-21 06:10:42 +00:00
|
|
|
subdir-dirs = nss_dns
|
1996-12-15 02:15:29 +00:00
|
|
|
vpath %.c nss_dns
|
|
|
|
|
2004-08-15 20:23:40 +00:00
|
|
|
libnss_dns-routines := dns-host dns-network dns-canon
|
1997-08-20 03:53:21 +00:00
|
|
|
libnss_dns-inhibit-o = $(filter-out .os,$(object-suffixes))
|
2012-03-23 16:47:03 +00:00
|
|
|
ifeq ($(build-static-nss),yes)
|
|
|
|
routines += $(libnss_dns-routines) $(libresolv-routines)
|
|
|
|
static-only-routines += $(libnss_dns-routines) $(libresolv-routines)
|
1997-06-21 02:59:26 +00:00
|
|
|
endif
|
1996-12-15 02:15:29 +00:00
|
|
|
|
2001-03-07 07:41:33 +00:00
|
|
|
ifeq (yesyes,$(build-shared)$(have-thread-library))
|
2001-03-03 18:21:04 +00:00
|
|
|
tests: $(objpfx)ga_test
|
|
|
|
endif
|
|
|
|
|
2004-07-21 18:30:11 +00:00
|
|
|
generated := mtrace-tst-leaks tst-leaks.mtrace \
|
|
|
|
mtrace-tst-leaks2 tst-leaks2.mtrace
|
2004-01-01 11:54:51 +00:00
|
|
|
|
1995-02-18 01:27:10 +00:00
|
|
|
include ../Rules
|
Wed Jan 24 04:18:36 1996 Paul Eggert <eggert@twinsun.com>
* strftime.c (strftime):
When invoking self, check whether the subsidiary invocation failed.
Use "???" (not "") to denote unknown time zone information.
Make this source file portable to standalone contexts (e.g. GNU Emacs).
<config.h>: Include if HAVE_CONFIG_H is defined.
(HAVE_LIMITS_H, HAVE_MBLEN, HAVE_TM_ZONE, STDC_HEADERS): New symbols,
defined if _LIBC or if <config.h> defines them.
<ansidecl.h>, "../locale/localeinfo.h": Include only if _LIBC.
<sys/types.h>: New include; some hosts require it for `time_t'.
<ctype.h>: Include only if HAVE_MBLEN (since it's only needed then).
<limits.h>: Include only if HAVE_LIMITS_H.
<stddef.h, stdlib.h, string.h>: Include only if STDC_HEADERS.
(memcpy): Define in terms of bcopy if !STDC_HEADERS.
(__P, PTR): Define if not already defined.
(__tzname, __daylight, __timezone): Remove macros; no longer needed.
(add, strftime): Don't use NULL, for portability to some weird hosts.
(fmt): If !_LIBC, don't assume sprintf returns a count.
(week, strftime): Use old-style function declarations.
(weekday_name, month_name): New constants.
(strftime): Use traditional C values if locale support isn't available.
Use `const' instead of CONST. For time zones, use tm_zone if
possible, then fall back on tzname. Don't check for multibyte
characters unless mblen is supported. Use formats like %02d instead
of %.2d, for portability to older hosts.
Wed Jan 24 04:18:36 1996 Paul Eggert <eggert@twinsun.com>
* strftime.c (strftime):
When invoking self, check whether the subsidiary invocation failed.
Use "???" (not "") to denote unknown time zone information.
Make this source file portable to standalone contexts (e.g. GNU Emacs).
<config.h>: Include if HAVE_CONFIG_H is defined.
(HAVE_LIMITS_H, HAVE_MBLEN, HAVE_TM_ZONE, STDC_HEADERS): New symbols,
defined if _LIBC or if <config.h> defines them.
<ansidecl.h>, "../locale/localeinfo.h": Include only if _LIBC.
<sys/types.h>: New include; some hosts require it for `time_t'.
<ctype.h>: Include only if HAVE_MBLEN (since it's only needed then).
<limits.h>: Include only if HAVE_LIMITS_H.
<stddef.h, stdlib.h, string.h>: Include only if STDC_HEADERS.
(memcpy): Define in terms of bcopy if !STDC_HEADERS.
(__P, PTR): Define if not already defined.
(__tzname, __daylight, __timezone): Remove macros; no longer needed.
(add, strftime): Don't use NULL, for portability to some weird hosts.
(fmt): If !_LIBC, don't assume sprintf returns a count.
(week, strftime): Use old-style function declarations.
(weekday_name, month_name): New constants.
(strftime): Use traditional C values if locale support isn't available.
Use `const' instead of CONST. For time zones, use tm_zone if
possible, then fall back on tzname. Don't check for multibyte
characters unless mblen is supported. Use formats like %02d instead
of %.2d, for portability to older hosts.
Wed Jan 24 00:07:52 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* stdio-common/vfscanf.c (GROUP, MALLOC): New flag macros.
(__vfscanf): Eliminate flag vars that were redundant with FLAGS bits.
Fix bug in recognition of %ll flag for long long.
Fix overeager checks for conflicting type modifiers.
With ' flag, match thousands separators for decimal numbers.
Tue Jan 23 22:02:40 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* locale/Makefile (CFLAGS-locfile-lex.c): New variable.
* resolv/Makefile (CFLAGS): Disable some warnings.
* sysdeps/generic/Makefile (elided-routines): Removed hypot.
(+gccwarn): Set with override.
* stdio-common/Makefile (CFLAGS-tst-printf.c): New variable.
* posix/Makefile (CFLAGS-regex.c): New variable.
* malloc/Makefile (CFLAGS-obstack.c): New variable.
* io/Makefile (CFLAGS-fts.c): New variable.
* io/fts.c (fts_open): Use prototypes for COMPAR decl.
Tue Jan 23 21:35:32 1996 Miles Bader <miles@gnu.ai.mit.edu>
* sysdeps/mach/hurd/bind.c (bind): Ensure NAME for the AF_LOCAL
case is '\0'-terminated.
Tue Jan 23 19:49:54 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* elf/rtld.c (dl_main): Support additional args in --list mode for
debugging: look them up as symbol names and print values.
* misc/getttyent.c (skip, value): Declare with prototypes in file
scope.
* csu/initfini.c (_init): Explicitly set a variable that is
pointer to volatile with the address of __gmon_start__, to avoid
the test being optimized out.
1996-01-24 06:03:37 +00:00
|
|
|
|
1996-06-25 10:52:53 +00:00
|
|
|
CPPFLAGS += -Dgethostbyname=res_gethostbyname \
|
|
|
|
-Dgethostbyname2=res_gethostbyname2 \
|
|
|
|
-Dgethostbyaddr=res_gethostbyaddr \
|
|
|
|
-Dgetnetbyname=res_getnetbyname \
|
|
|
|
-Dgetnetbyaddr=res_getnetbyaddr
|
|
|
|
|
2011-08-18 01:36:23 +00:00
|
|
|
ifeq (yes,$(have-ssp))
|
|
|
|
CFLAGS-libresolv += -fstack-protector
|
|
|
|
endif
|
2003-08-30 18:51:25 +00:00
|
|
|
CFLAGS-res_hconf.c = -fexceptions
|
|
|
|
|
1996-06-25 10:52:53 +00:00
|
|
|
# The BIND code elicits some harmless warnings.
|
1999-12-30 08:09:32 +00:00
|
|
|
+cflags += -Wno-strict-prototypes -Wno-write-strings
|
1996-12-08 08:01:13 +00:00
|
|
|
|
|
|
|
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
|
|
|
# This ensures they will load libc.so for needed symbols if loaded by
|
|
|
|
# a statically-linked program that hasn't already loaded it.
|
2001-03-18 21:34:58 +00:00
|
|
|
$(objpfx)libresolv.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
|
2011-09-21 20:27:50 +00:00
|
|
|
# Some hosts need '__stack_chk_guard', so pull in the definition from
|
|
|
|
# ld.so if required.
|
2012-01-08 01:30:26 +00:00
|
|
|
ifeq (yes,$(have-ssp))
|
2011-09-21 20:27:50 +00:00
|
|
|
LDLIBS-resolv.so += $(as-needed) $(elfobjdir)/ld.so $(no-as-needed)
|
|
|
|
endif
|
1996-12-15 02:15:29 +00:00
|
|
|
|
|
|
|
# The DNS NSS modules needs the resolver.
|
2001-03-18 21:34:58 +00:00
|
|
|
$(objpfx)libnss_dns.so: $(objpfx)libresolv.so $(common-objpfx)libc.so \
|
|
|
|
$(common-objpfx)libc_nonshared.a
|
2001-03-03 18:21:04 +00:00
|
|
|
|
|
|
|
# The asynchronous name lookup code needs the thread library.
|
2001-03-18 21:34:58 +00:00
|
|
|
$(objpfx)libanl.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
|
|
|
|
$(shared-thread-library)
|
2001-03-03 18:21:04 +00:00
|
|
|
|
|
|
|
$(objpfx)ga_test: $(objpfx)libanl.so $(shared-thread-library)
|
2003-02-23 03:35:39 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-leaks: $(objpfx)libresolv.so
|
|
|
|
tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace
|
|
|
|
$(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
|
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
|
2012-10-24 00:08:46 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
2003-02-23 03:35:39 +00:00
|
|
|
ifneq (no,$(PERL))
|
|
|
|
tests: $(objpfx)mtrace-tst-leaks
|
|
|
|
endif
|
2003-03-01 22:15:00 +00:00
|
|
|
endif
|
2004-07-21 18:30:11 +00:00
|
|
|
|
|
|
|
tst-leaks2-ENV = MALLOC_TRACE=$(objpfx)tst-leaks2.mtrace
|
|
|
|
$(objpfx)mtrace-tst-leaks2: $(objpfx)tst-leaks2.out
|
|
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@
|
2012-10-24 00:08:46 +00:00
|
|
|
ifeq ($(run-built-tests),yes)
|
2004-07-21 18:30:11 +00:00
|
|
|
ifneq (no,$(PERL))
|
|
|
|
xtests: $(objpfx)mtrace-tst-leaks2
|
|
|
|
endif
|
|
|
|
endif
|