update from main archive 960828

Thu Aug 29 00:28:08 1996  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/printf_fp.c (__printf_fp): Use default value `.` if
 	`decimal' char is 0.

	* C-numeric.c (not_available): New constant.
	(_nl_C_LC_NUMERIC): Use `not_available' for grouping value.

	* nss/nsswitch.conf: Example configuration file.
	* nss/db-Makefile: Example Makefile for generation of databases
	for nss_db.
	* nss/Makefile (distribute): Add nsswitch.conf and db-Makefile.

1996-08-28  Paul Eggert  <eggert@twinsun.com>

	* C-messages.c (_nl_C_LC_MESSAGES): Set yesexpr to "^[yY]" and
 	noexpr to "^[nN]"; this conforms to POSIX.2.

	* C-time.c (_nl_C_LC_TIME): Change %d to %e in d_t_format, to
 	conform to POSIX.2.

1996-08-28  Paul Eggert  <eggert@twinsun.com>

	* C-monetary.c (not_available): New constant.
	(_nl_C_LC_MONETARY): Set mon_decimal_point to "", and set
 	mon_grouping, int_frac_digits, frac_digits, p_cs_precedes,
 	p_sep_by_space, n_cs_precedes, n_sep_by_space, p_sign_posn, and
 	n_sign_posn to CHAR_MAX, as required by the POSIX Standard.

Wed Aug 28 23:12:28 1996  Ulrich Drepper  <drepper@cygnus.com>

	* nss/nss_db/db-XXX.c: Correct function names.  They must be
	`_nss_db_*' instead of `_nss_files_*'.
	(lookup): `parse_line' returns 1 if succesful.
	* nss/nss_files/files-service.c (servbyname): Key for database
	must also contain protocol names.
	(servbypt): Likewise.
	Test must also check for protocol.  Add `proto' argument.

Tue Aug 27 09:56:13 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* MakeTAGS ($P/subdirs.pot): Prefix all file names, not only the
	first one.

Fri Aug 16 16:11:25 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Treat
 	EPFNOSUPPORT and EAFNOSUPPORT as implying NSS_STATUS_UNAVAIL just
 	like ECONNREFUSED already does.
	(_nss_dns_gethostbyaddr_r): Likewise.
	* nss/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise.
	(_nss_dns_getnetbyaddr_r): Likewise.

	* sysdeps/mach/hurd/socket.c (socket): For message transmission
 	and RPC errors that indicate that the socket server is not really
 	present and able to do its job, turn the error into EPFNOSUPPORT.

	* sysdeps/generic/sbrk.c (__sbrk):  Get kernel brk address
	always only if in static libc or if statically linked program
	uses libc.so.
This commit is contained in:
Ulrich Drepper 1996-08-29 00:31:18 +00:00
parent b236e99d90
commit 14bab8de31
34 changed files with 495 additions and 298 deletions

View File

@ -1,3 +1,47 @@
Thu Aug 29 00:28:08 1996 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/printf_fp.c (__printf_fp): Use default value `.` if
`decimal' char is 0.
* C-numeric.c (not_available): New constant.
(_nl_C_LC_NUMERIC): Use `not_available' for grouping value.
* nss/nsswitch.conf: Example configuration file.
* nss/db-Makefile: Example Makefile for generation of databases
for nss_db.
* nss/Makefile (distribute): Add nsswitch.conf and db-Makefile.
1996-08-28 Paul Eggert <eggert@twinsun.com>
* C-messages.c (_nl_C_LC_MESSAGES): Set yesexpr to "^[yY]" and
noexpr to "^[nN]"; this conforms to POSIX.2.
* C-time.c (_nl_C_LC_TIME): Change %d to %e in d_t_format, to
conform to POSIX.2.
1996-08-28 Paul Eggert <eggert@twinsun.com>
* C-monetary.c (not_available): New constant.
(_nl_C_LC_MONETARY): Set mon_decimal_point to "", and set
mon_grouping, int_frac_digits, frac_digits, p_cs_precedes,
p_sep_by_space, n_cs_precedes, n_sep_by_space, p_sign_posn, and
n_sign_posn to CHAR_MAX, as required by the POSIX Standard.
Wed Aug 28 23:12:28 1996 Ulrich Drepper <drepper@cygnus.com>
* nss/nss_db/db-XXX.c: Correct function names. They must be
`_nss_db_*' instead of `_nss_files_*'.
(lookup): `parse_line' returns 1 if succesful.
* nss/nss_files/files-service.c (servbyname): Key for database
must also contain protocol names.
(servbypt): Likewise.
Test must also check for protocol. Add `proto' argument.
Tue Aug 27 09:56:13 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* MakeTAGS ($P/subdirs.pot): Prefix all file names, not only the
first one.
Tue Aug 27 17:45:21 1996 Ulrich Drepper <drepper@cygnus.com> Tue Aug 27 17:45:21 1996 Ulrich Drepper <drepper@cygnus.com>
* Makerules: Add some test for correct version of GNU Make. * Makerules: Add some test for correct version of GNU Make.
@ -207,6 +251,19 @@ Fri Aug 16 04:59:01 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Makefile [$(subdir) = csu]: Use * sysdeps/unix/sysv/linux/Makefile [$(subdir) = csu]: Use
-fkeep-inline-functions flag instead. -fkeep-inline-functions flag instead.
Fri Aug 16 16:11:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* nss/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Treat
EPFNOSUPPORT and EAFNOSUPPORT as implying NSS_STATUS_UNAVAIL just
like ECONNREFUSED already does.
(_nss_dns_gethostbyaddr_r): Likewise.
* nss/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise.
(_nss_dns_getnetbyaddr_r): Likewise.
* sysdeps/mach/hurd/socket.c (socket): For message transmission
and RPC errors that indicate that the socket server is not really
present and able to do its job, turn the error into EPFNOSUPPORT.
Fri Aug 16 01:24:33 1996 Ulrich Drepper <drepper@cygnus.com> Fri Aug 16 01:24:33 1996 Ulrich Drepper <drepper@cygnus.com>
* inet/ruserpass.c (userpass): Allocate buffer for .netrc file * inet/ruserpass.c (userpass): Allocate buffer for .netrc file
@ -437,6 +494,10 @@ Sun Aug 11 16:19:42 1996 Ulrich Drepper <drepper@cygnus.com>
always only if in static libc or if statically linked program always only if in static libc or if statically linked program
uses libc.so. uses libc.so.
* sysdeps/generic/sbrk.c (__sbrk): Get kernel brk address
always only if in static libc or if statically linked program
uses libc.so.
Sun Aug 11 01:12:38 1996 Richard Henderson <rth@tamu.edu> Sun Aug 11 01:12:38 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Optimize LD_BIND_NOW * sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Optimize LD_BIND_NOW

View File

@ -159,7 +159,7 @@ ifndef subdir
$P/subdirs.pot: $(subdirs:%=$P/%.pot) $P/subdirs.pot: $(subdirs:%=$P/%.pot)
@rm -f $@.new @rm -f $@.new
(for d in $(subdirs); \ (for d in $(subdirs); \
do sed "s%^#: %&$$d/%" $P/$$d.pot; done) > $@.new do sed "/^#:/s% % $$d/%g" $P/$$d.pot; done) > $@.new
mv -f $@.new $@ mv -f $@.new $@
# Get $(version) defined. # Get $(version) defined.

View File

@ -25,6 +25,13 @@ ifneq (,)
This makefile requires GNU Make. This makefile requires GNU Make.
endif endif
REQUIRED_MAKE_VERSION = 3.74
ifneq ($(REQUIRED_MAKE_VERSION), \
$(firstword $(sort $(MAKE_VERSION) $(REQUIRED_MAKE_VERSION))))
Wrong GNU Make version. See above for the version needed.
endif
ifdef subdir ifdef subdir
.. := ../ .. := ../

2
NEWS
View File

@ -104,7 +104,7 @@ Version 2.0
* The new header file <fts.h> and suite of functions simplify programs that * The new header file <fts.h> and suite of functions simplify programs that
operate on directory trees. This code comes from 4.4 BSD. operate on directory trees. This code comes from 4.4 BSD.
* The resolver code has been updated from the BIND 4.9.5-T1A release. * The resolver code has been updated from the BIND 4.9.5-T3A release.
* The new function `malloc_find_object_address' finds the starting address * The new function `malloc_find_object_address' finds the starting address
of a malloc'd block, given any address within the block; of a malloc'd block, given any address within the block;

View File

@ -1,6 +1,6 @@
Open jobs for finishing GNU libc: Open jobs for finishing GNU libc:
--------------------------------- ---------------------------------
Status: July 1996 Status: August 1996
If you have time and talent to take over any of the jobs below please If you have time and talent to take over any of the jobs below please
contact <bug-glibc@prep.ai.mit.edu> contact <bug-glibc@prep.ai.mit.edu>
@ -32,33 +32,7 @@ contact <bug-glibc@prep.ai.mit.edu>
Implementation idea: use some functions from bash. Implementation idea: use some functions from bash.
[ 5] Write reentrant versions of crypt() et.al. [ 5] Write `long double' versions of the math functions. This should be
Implementation idea: Define in <crypt.h>
struct crypt_data
{
<... all the needed data ...>
};
and define additional functions
char *crypt_r (__const char *__key, __const char *__salt,
struct crypt_data *__data);
void setkey_r (__const char *__key, struct crypt_data *__data);
void encrypt_r (char *__block, int __edflag,
struct crypt_data *__data);
If possible the non-reentrant functions should use the reentrant
ones.
Because of the US export restrictions it might be a good idea if
some non-american person does this job.
[ 6] Write `long double' versions of the math functions. This should be
done in collaboration with the NetBSD and FreeBSD people. done in collaboration with the NetBSD and FreeBSD people.
The libm is in fact fdlibm (not the same as in Linux libc). The libm is in fact fdlibm (not the same as in Linux libc).
@ -66,7 +40,7 @@ contact <bug-glibc@prep.ai.mit.edu>
**** Partly done. **** Partly done.
[ 7] If you enjoy assembler programming (as I do --drepper :-) you might [ 6] If you enjoy assembler programming (as I do --drepper :-) you might
be interested in writing optimized versions for some functions. be interested in writing optimized versions for some functions.
Especially the string handling functions can be optimized a lot. Especially the string handling functions can be optimized a lot.
@ -81,21 +55,21 @@ contact <bug-glibc@prep.ai.mit.edu>
on this. on this.
[ 8] Write nftw() function. Perhaps it might be good to reimplement the [ 7] Write nftw() function. Perhaps it might be good to reimplement the
ftw() function as well to share most of the code. ftw() function as well to share most of the code.
**** Almost done! **** Almost done!
[ 9] Write AVL-tree based tsearch() et.al. functions. Currently only [ 8] Write AVL-tree based tsearch() et.al. functions. Currently only
a very simple algorithm is used. a very simple algorithm is used.
There is a public domain version but using this would cause problems There is a public domain version but using this would cause problems
with the assignment. with the assignment.
[10] Extend regex and/or rx to work with wide characters. [ 9] Extend regex and/or rx to work with wide characters.
[11] Add mmap() support to malloc(). [10] Add mmap() support to malloc().
Doug Lea's malloc implementation might give some ideas. Perhaps Doug Lea's malloc implementation might give some ideas. Perhaps
switching completly to his implementation is an option if it switching completly to his implementation is an option if it
a) can work without mmap() support (not all system GNU libc a) can work without mmap() support (not all system GNU libc
@ -107,7 +81,7 @@ contact <bug-glibc@prep.ai.mit.edu>
Please contact bug-glibc@prep.ai.mit.edu before starting to avoid Please contact bug-glibc@prep.ai.mit.edu before starting to avoid
duplicated work. duplicated work.
[12] Write access function for netmasks, bootparams, netgroup, publickey, [11] Write access function for netmasks, bootparams, netgroup, publickey,
automount, aliases databases for nss_files and nss_db module. automount, aliases databases for nss_files and nss_db module.
The functions should be embedded in the nss scheme. This is not The functions should be embedded in the nss scheme. This is not
hard and not all services must be supported at once. hard and not all services must be supported at once.

View File

@ -25,6 +25,9 @@ distribute := compat.h \
hash/extern.h hash/hash.h hash/page.h \ hash/extern.h hash/hash.h hash/page.h \
recno/extern.h recno/recno.h recno/extern.h recno/recno.h
others := makedb
install-bin := makedb
include ../Rules include ../Rules
CPPFLAGS += -D__DBINTERFACE_PRIVATE CPPFLAGS += -D__DBINTERFACE_PRIVATE
@ -35,3 +38,5 @@ CFLAGS-hash_func.c := -Wno-unused
# The db code outsmarts the compiler frequently. # The db code outsmarts the compiler frequently.
override CFLAGS += -Wno-uninitialized override CFLAGS += -Wno-uninitialized
$(objpfx)makedb: -ldb

View File

@ -39,15 +39,16 @@ static const struct option long_options[] =
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
{ "fold-case", no_argument, NULL, 'f' }, { "fold-case", no_argument, NULL, 'f' },
{ "output", required_argument, NULL, 'o' }, { "output", required_argument, NULL, 'o' },
{ "quiet", no_argument, NULL, 'q' },
{ "undo", no_argument, NULL, 'u' }, { "undo", no_argument, NULL, 'u' },
{ "version", no_argument, NULL, 'V' }, { "version", no_argument, NULL, 'V' },
{ NULL, } { NULL, 0, NULL, 0}
}; };
/* Prototypes for local functions. */ /* Prototypes for local functions. */
static void usage __P ((int status)) __attribute__ ((noreturn)); static void usage __P ((int status)) __attribute__ ((noreturn));
static int process_input __P ((FILE *input, const char *inname, DB *output, static int process_input __P ((FILE *input, const char *inname, DB *output,
int to_lowercase)); int to_lowercase, int be_quiet));
static int print_database __P ((DB *db)); static int print_database __P ((DB *db));
@ -64,6 +65,7 @@ main (argc, argv)
int do_version; int do_version;
int to_lowercase; int to_lowercase;
int do_undo; int do_undo;
int be_quiet;
int status; int status;
int opt; int opt;
@ -78,6 +80,7 @@ main (argc, argv)
do_version = 0; do_version = 0;
to_lowercase = 0; to_lowercase = 0;
do_undo = 0; do_undo = 0;
be_quiet = 0;
output_name = NULL; output_name = NULL;
while ((opt = getopt_long (argc, argv, "fho:uV", long_options, NULL)) != EOF) while ((opt = getopt_long (argc, argv, "fho:uV", long_options, NULL)) != EOF)
@ -94,6 +97,9 @@ main (argc, argv)
case 'o': case 'o':
output_name = optarg; output_name = optarg;
break; break;
case 'q':
be_quiet = 1;
break;
case 'u': case 'u':
do_undo = 1; do_undo = 1;
break; break;
@ -170,7 +176,8 @@ main (argc, argv)
error (EXIT_FAILURE, errno, gettext ("cannot open output file `%s'")); error (EXIT_FAILURE, errno, gettext ("cannot open output file `%s'"));
/* Start the real work. */ /* Start the real work. */
status = process_input (input_file, input_name, db_file, to_lowercase); status = process_input (input_file, input_name, db_file, to_lowercase,
be_quiet);
/* Close files. */ /* Close files. */
if (input_file != stdin) if (input_file != stdin)
@ -197,6 +204,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-f, --fold-case convert key to lower case\n\ -f, --fold-case convert key to lower case\n\
-h, --help display this help and exit\n\ -h, --help display this help and exit\n\
-o, --output=NAME write output to file NAME\n\ -o, --output=NAME write output to file NAME\n\
--quiet don't print messages while building database\n\
-u, --undo print content of database file, one entry a line\n\ -u, --undo print content of database file, one entry a line\n\
-V, --version output version information and exit\n\ -V, --version output version information and exit\n\
If INPUT-FILE is -, input is read from standard input.\n"), If INPUT-FILE is -, input is read from standard input.\n"),
@ -208,11 +216,12 @@ If INPUT-FILE is -, input is read from standard input.\n"),
static int static int
process_input (input, inname, output, to_lowercase) process_input (input, inname, output, to_lowercase, be_quiet)
FILE *input; FILE *input;
const char *inname; const char *inname;
DB *output; DB *output;
int to_lowercase; int to_lowercase;
int be_quiet;
{ {
char *line; char *line;
size_t linelen; size_t linelen;
@ -278,11 +287,18 @@ process_input (input, inname, output, to_lowercase)
if (status != 0) if (status != 0)
{ {
if (status == 1) if (status == 1)
error_at_line (0, 0, inname, linenr, gettext ("duplicate key")); {
if (!be_quiet)
error_at_line (0, 0, inname, linenr,
gettext ("duplicate key"));
/* This is no real error. Just give a warning. */
status = 0;
}
else else
error (0, errno, gettext ("while writing data base file")); error (0, errno, gettext ("while writing data base file"));
status = EXIT_FAILURE; status = status ? EXIT_FAILURE : EXIT_SUCCESS;
clearerr (input); clearerr (input);
break; break;
} }

View File

@ -20,13 +20,15 @@ Cambridge, MA 02139, USA. */
#include <stddef.h> #include <stddef.h>
#include <link.h> #include <link.h>
#include <setjmp.h> #include <setjmp.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
/* This structure communicates state between _dl_catch_error and /* This structure communicates state between _dl_catch_error and
_dl_signal_error. */ _dl_signal_error. */
struct catch struct catch
{ {
const char *errstring, *objname; /* Error detail filled in here. */ char *errstring; /* Error detail filled in here. */
const char *objname;
jmp_buf env; /* longjmp here on error. */ jmp_buf env; /* longjmp here on error. */
}; };
@ -69,7 +71,7 @@ _dl_signal_error (int errcode,
} }
int int
_dl_catch_error (const char **errstring, _dl_catch_error (char **errstring,
const char **objname, const char **objname,
void (*operate) (void)) void (*operate) (void))
{ {
@ -82,7 +84,8 @@ _dl_catch_error (const char **errstring,
catch = &c; catch = &c;
(*operate) (); (*operate) ();
catch = NULL; catch = NULL;
*errstring = *objname = NULL; *errstring = NULL;
*objname = NULL;
return 0; return 0;
} }

View File

@ -481,6 +481,7 @@ _dl_map_object (struct link_map *loader, const char *name, int type)
{ {
int fd; int fd;
char *realname; char *realname;
char *name_copy;
struct link_map *l; struct link_map *l;
/* Look for this name among those already loaded. */ /* Look for this name among those already loaded. */
@ -572,8 +573,8 @@ _dl_map_object (struct link_map *loader, const char *name, int type)
if (fd != -1) if (fd != -1)
{ {
name = local_strdup (name); name_copy = local_strdup (name);
if (name == NULL) if (name_copy == NULL)
{ {
__close (fd); __close (fd);
fd = -1; fd = -1;
@ -583,5 +584,5 @@ _dl_map_object (struct link_map *loader, const char *name, int type)
if (fd == -1) if (fd == -1)
_dl_signal_error (errno, name, "cannot open shared object file"); _dl_signal_error (errno, name, "cannot open shared object file");
return _dl_map_object_from_fd (name, fd, realname, loader, type); return _dl_map_object_from_fd (name_copy, fd, realname, loader, type);
} }

View File

@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
#include <stdlib.h> #include <stdlib.h>
static int last_errcode; static int last_errcode;
static const char *last_errstring; static char *last_errstring;
static const char *last_object_name; static const char *last_object_name;
char * char *

View File

@ -178,8 +178,9 @@ extern void _dl_signal_error (int errcode,
/* Call OPERATE, catching errors from `dl_signal_error'. If there is no /* Call OPERATE, catching errors from `dl_signal_error'. If there is no
error, *ERRSTRING is set to null. If there is an error, *ERRSTRING and error, *ERRSTRING is set to null. If there is an error, *ERRSTRING and
*OBJECT are set to the strings passed to _dl_signal_error, and the error *OBJECT are set to the strings passed to _dl_signal_error, and the error
code passed is the return value. */ code passed is the return value. ERRSTRING if nonzero points to a
extern int _dl_catch_error (const char **errstring, malloc'ed string which the caller has to free after use. */
extern int _dl_catch_error (char **errstring,
const char **object, const char **object,
void (*operate) (void)); void (*operate) (void));

View File

@ -38,6 +38,12 @@ extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
ElfW(Addr) *user_entry)); ElfW(Addr) *user_entry));
extern void _dl_sysdep_start_cleanup (void); extern void _dl_sysdep_start_cleanup (void);
/* System-dependent function to read a file's whole contents
in the most convenient manner available. */
extern void *_dl_sysdep_read_whole_file (const char *filename,
size_t *filesize_ptr,
int mmap_prot);
int _dl_argc; int _dl_argc;
char **_dl_argv; char **_dl_argv;
const char *_dl_rpath; const char *_dl_rpath;
@ -138,6 +144,8 @@ dl_main (const ElfW(Phdr) *phdr,
enum { normal, list, verify, trace } mode; enum { normal, list, verify, trace } mode;
struct link_map **preloads; struct link_map **preloads;
unsigned int npreloads; unsigned int npreloads;
size_t file_size;
char *file;
mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal; mode = getenv ("LD_TRACE_LOADED_OBJECTS") != NULL ? trace : normal;
@ -296,8 +304,77 @@ of this helper program; chances are you did not intend to run this program.\n",
l->l_next = &_dl_rtld_map; l->l_next = &_dl_rtld_map;
_dl_rtld_map.l_prev = l; _dl_rtld_map.l_prev = l;
/* We have two ways to specify objects to preload: via environment
variable and via the file /etc/ld.so.preload. The later can also
be used when security is enabled. */
preloads = NULL; preloads = NULL;
npreloads = 0; npreloads = 0;
/* Read the contents of the file. */
file = _dl_sysdep_read_whole_file ("/etc/ld.so.preload", &file_size,
PROT_READ | PROT_WRITE);
if (file)
{
/* Parse the file. It contains names of libraries to be loaded,
separated by white spaces or `:'. It may also contain
comments introduced by `#'. */
char *problem;
char *runp;
size_t rest;
/* Eliminate comments. */
runp = file;
rest = file_size;
while (rest > 0)
{
char *comment = memchr (runp, '#', rest);
if (comment == NULL)
break;
rest -= comment - runp;
do
*comment = ' ';
while (--rest > 0 && *++comment != '\n');
}
/* We have one problematic case: if we have a name at the end of
the file without a trailing terminating characters, we cannot
place the \0. Handle the case separately. */
if (file[file_size - 1] != ' ' && file[file_size] != '\t'
&& file[file_size] != '\n')
{
problem = &file[file_size];
while (problem > file && problem[-1] != ' ' && problem[-1] != '\t'
&& problem[-1] != '\n')
--problem;
if (problem > file)
problem[-1] = '\0';
}
else
problem = NULL;
if (file != problem)
{
char *p;
runp = file;
while ((p = strsep (&runp, ": \t\n")) != NULL)
{
(void) _dl_map_object (NULL, p, lt_library);
++npreloads;
}
}
if (problem != NULL)
{
char *p = strndupa (problem, file_size - (problem - file));
(void) _dl_map_object (NULL, p, lt_library);
}
/* We don't need the file anymore. */
__munmap (file, file_size);
}
if (! __libc_enable_secure) if (! __libc_enable_secure)
{ {
const char *preloadlist = getenv ("LD_PRELOAD"); const char *preloadlist = getenv ("LD_PRELOAD");
@ -313,25 +390,25 @@ of this helper program; chances are you did not intend to run this program.\n",
(void) _dl_map_object (NULL, p, lt_library); (void) _dl_map_object (NULL, p, lt_library);
++npreloads; ++npreloads;
} }
if (npreloads != 0)
{
/* Set up PRELOADS with a vector of the preloaded libraries. */
struct link_map *l;
unsigned int i;
preloads = __alloca (npreloads * sizeof preloads[0]);
l = _dl_rtld_map.l_next; /* End of the chain before preloads. */
i = 0;
do
{
preloads[i++] = l;
l = l->l_next;
} while (l);
assert (i == npreloads);
}
} }
} }
if (npreloads != 0)
{
/* Set up PRELOADS with a vector of the preloaded libraries. */
struct link_map *l;
unsigned int i;
preloads = __alloca (npreloads * sizeof preloads[0]);
l = _dl_rtld_map.l_next; /* End of the chain before preloads. */
i = 0;
do
{
preloads[i++] = l;
l = l->l_next;
} while (l);
assert (i == npreloads);
}
/* Load all the libraries specified by DT_NEEDED entries. If LD_PRELOAD /* Load all the libraries specified by DT_NEEDED entries. If LD_PRELOAD
specified some libraries to load, these are inserted before the actual specified some libraries to load, these are inserted before the actual
dependencies in the executable's searchlist for symbol resolution. */ dependencies in the executable's searchlist for symbol resolution. */
@ -386,7 +463,7 @@ of this helper program; chances are you did not intend to run this program.\n",
char buf[20], *bp; char buf[20], *bp;
buf[sizeof buf - 1] = '\0'; buf[sizeof buf - 1] = '\0';
bp = _itoa (l->l_addr, &buf[sizeof buf - 1], 16, 0); bp = _itoa (l->l_addr, &buf[sizeof buf - 1], 16, 0);
while (&buf[sizeof buf - 1] - bp < sizeof l->l_addr * 2) while ((size_t) (&buf[sizeof buf - 1] - bp) < sizeof l->l_addr * 2)
*--bp = '0'; *--bp = '0';
_dl_sysdep_message ("\t", l->l_libname, " => ", l->l_name, _dl_sysdep_message ("\t", l->l_libname, " => ", l->l_name,
" (0x", bp, ")\n", NULL); " (0x", bp, ")\n", NULL);
@ -403,12 +480,12 @@ of this helper program; chances are you did not intend to run this program.\n",
char buf[20], *bp; char buf[20], *bp;
buf[sizeof buf - 1] = '\0'; buf[sizeof buf - 1] = '\0';
bp = _itoa (ref->st_value, &buf[sizeof buf - 1], 16, 0); bp = _itoa (ref->st_value, &buf[sizeof buf - 1], 16, 0);
while (&buf[sizeof buf - 1] - bp < sizeof loadbase * 2) while ((size_t) (&buf[sizeof buf - 1] - bp) < sizeof loadbase * 2)
*--bp = '0'; *--bp = '0';
_dl_sysdep_message (_dl_argv[i], " found at 0x", bp, NULL); _dl_sysdep_message (_dl_argv[i], " found at 0x", bp, NULL);
buf[sizeof buf - 1] = '\0'; buf[sizeof buf - 1] = '\0';
bp = _itoa (loadbase, &buf[sizeof buf - 1], 16, 0); bp = _itoa (loadbase, &buf[sizeof buf - 1], 16, 0);
while (&buf[sizeof buf - 1] - bp < sizeof loadbase * 2) while ((size_t) (&buf[sizeof buf - 1] - bp) < sizeof loadbase * 2)
*--bp = '0'; *--bp = '0';
_dl_sysdep_message (" in object at 0x", bp, "\n", NULL); _dl_sysdep_message (" in object at 0x", bp, "\n", NULL);
} }

View File

@ -43,16 +43,6 @@ __BEGIN_DECLS
#endif #endif
#endif /* Use misc. */ #endif /* Use misc. */
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
#define FAPPEND O_APPEND
#define FASYNC O_ASYNC
#define FFSYNC O_FSYNC
#define FNONBLOCK O_NONBLOCK
#define FNDELAY O_NDELAY
#endif /* Use BSD. */
/* Do the file control operation described by CMD on FD. /* Do the file control operation described by CMD on FD.
The remaining arguments are interpreted depending on CMD. */ The remaining arguments are interpreted depending on CMD. */
extern int __fcntl __P ((int __fd, int __cmd, ...)); extern int __fcntl __P ((int __fd, int __cmd, ...));

View File

@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA. */
#include <endian.h> #include <endian.h>
#include "localeinfo.h" #include "localeinfo.h"
/* These tables' entries contain values which make the function behave
accoriding to POSIX.2 Table 2-8 ``LC_COLLATE Category Definition in
the POSIX Locale''. */
const u_int32_t _nl_C_LC_COLLATE_symbol_hash[446] = const u_int32_t _nl_C_LC_COLLATE_symbol_hash[446] =
{ {

View File

@ -20,6 +20,14 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h" #include "localeinfo.h"
#include <endian.h> #include <endian.h>
/* This table's entries are taken from POSIX.2 Table 2-6
``LC_CTYPE Category Definitionin the POSIX Locale''.
The `_nl_C_LC_CTYPE_width' array is a GNU extension.
In the `_nl_C_LC_CTYPE_class' array the value for EOF (== -1)
is set to always return 0 and the conversion arrays return EOF. */
const char _nl_C_LC_CTYPE_class[768] = const char _nl_C_LC_CTYPE_class[768] =
/* 0x80 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" /* 0x80 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
/* 0x86 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" /* 0x86 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"

View File

@ -19,14 +19,19 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h" #include "localeinfo.h"
/* This table's entries are taken from POSIX.2 Table 2-12
``LC_MESSAGES Category Definition in the POSIX Locale''.
The last two fields are a GNU extension. */
const struct locale_data _nl_C_LC_MESSAGES = const struct locale_data _nl_C_LC_MESSAGES =
{ {
_nl_C_name, _nl_C_name,
NULL, 0, /* no file mapped */ NULL, 0, /* no file mapped */
4, 4,
{ {
{ string: "[yY][[:alpha:]]*" }, { string: "^[yY]" },
{ string: "[nN][[:alpha:]]*" }, { string: "^[nN]" },
{ string: "" }, { string: "" },
{ string: "" } { string: "" }
} }

View File

@ -19,6 +19,14 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h" #include "localeinfo.h"
/* This table's entries are taken from POSIX.2 Table 2-9
``LC_MONETARY Category Definition in the POSIX Locale''. */
#ifdef __CHAR_UNSIGNED__
static const char not_available[] = "\377";
#else
static const char not_available[] = "\177";
#endif
const struct locale_data _nl_C_LC_MONETARY = const struct locale_data _nl_C_LC_MONETARY =
{ {
_nl_C_name, _nl_C_name,
@ -27,18 +35,18 @@ const struct locale_data _nl_C_LC_MONETARY =
{ {
{ string: "" }, { string: "" },
{ string: "" }, { string: "" },
{ string: "." },
{ string: "" },
{ string: "\177" },
{ string: "" }, { string: "" },
{ string: "" }, { string: "" },
{ string: "\177" }, { string: not_available },
{ string: "\177" }, { string: "" },
{ string: "\177" }, { string: "" },
{ string: "\177" }, { string: not_available },
{ string: "\177" }, { string: not_available },
{ string: "\177" }, { string: not_available },
{ string: "\177" }, { string: not_available },
{ string: "\177" } { string: not_available },
{ string: not_available },
{ string: not_available },
{ string: not_available }
} }
}; };

View File

@ -19,6 +19,14 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h" #include "localeinfo.h"
/* This table's entries are taken from POSIX.2 Table 2-10
``LC_NUMERIC Category Definition in the POSIX Locale''. */
#ifdef __CHAR_UNSIGNED__
static const char not_available[] = "\377";
#else
static const char not_available[] = "\177";
#endif
const struct locale_data _nl_C_LC_NUMERIC = const struct locale_data _nl_C_LC_NUMERIC =
{ {
_nl_C_name, _nl_C_name,
@ -27,6 +35,6 @@ const struct locale_data _nl_C_LC_NUMERIC =
{ {
{ string: "." }, { string: "." },
{ string: "" }, { string: "" },
{ string: "\177" } { string: not_available }
} }
}; };

View File

@ -19,6 +19,9 @@ Boston, MA 02111-1307, USA. */
#include "localeinfo.h" #include "localeinfo.h"
/* This table's entries are taken from POSIX.2 Table 2-11
``LC_TIME Category Definition in the POSIX Locale''. */
const struct locale_data _nl_C_LC_TIME = const struct locale_data _nl_C_LC_TIME =
{ {
_nl_C_name, _nl_C_name,
@ -65,7 +68,7 @@ const struct locale_data _nl_C_LC_TIME =
{ string: "December" }, { string: "December" },
{ string: "AM" }, { string: "AM" },
{ string: "PM" }, { string: "PM" },
{ string: "%a %b %d %H:%M:%S %Y" }, { string: "%a %b %e %H:%M:%S %Y" },
{ string: "%m/%d/%y" }, { string: "%m/%d/%y" },
{ string: "%H:%M:%S" }, { string: "%H:%M:%S" },
{ string: "%I:%M:%S %p" }, { string: "%I:%M:%S %p" },

View File

@ -23,7 +23,8 @@ subdir := nss
headers := nss.h headers := nss.h
distribute := nsswitch.h XXX-lookup.c getXXbyYY.c getXXbyYY_r.c \ distribute := nsswitch.h XXX-lookup.c getXXbyYY.c getXXbyYY_r.c \
getXXent.c getXXent_r.c databases.def getXXent.c getXXent_r.c databases.def \
nsswitch.conf db-Makefile
# This is the trivial part which goes into libc itself. # This is the trivial part which goes into libc itself.
routines = nsswitch $(addsuffix -lookup,$(databases)) routines = nsswitch $(addsuffix -lookup,$(databases))

View File

@ -34,7 +34,7 @@ Cambridge, MA 02139, USA. */
#define ENTNAME_r CONCAT(ENTNAME,_r) #define ENTNAME_r CONCAT(ENTNAME,_r)
#include <paths.h> #include <paths.h>
#define DBFILE _PATH_VARDB DATABASE #define DBFILE _PATH_VARDB DATABASE ".db"
#ifdef NEED_H_ERRNO #ifdef NEED_H_ERRNO
#define H_ERRNO_PROTO , int *herrnop #define H_ERRNO_PROTO , int *herrnop
@ -79,7 +79,7 @@ internal_setent (int stayopen)
/* Thread-safe, exported version of that. */ /* Thread-safe, exported version of that. */
int int
CONCAT(_nss_files_set,ENTNAME) (int stayopen) CONCAT(_nss_db_set,ENTNAME) (int stayopen)
{ {
int status; int status;
@ -110,7 +110,7 @@ internal_endent (void)
/* Thread-safe, exported version of that. */ /* Thread-safe, exported version of that. */
int int
CONCAT(_nss_files_end,ENTNAME) (void) CONCAT(_nss_db_end,ENTNAME) (void)
{ {
__libc_lock_lock (lock); __libc_lock_lock (lock);
@ -133,11 +133,13 @@ lookup (const DBT *key, struct STRUCTURE *result,
DBT value; DBT value;
/* Open the database. */ /* Open the database. */
internal_setent (keep_db); status = internal_setent (keep_db);
if (status != NSS_STATUS_SUCCESS)
return status;
/* Succeed iff it matches a value that parses correctly. */ /* Succeed iff it matches a value that parses correctly. */
status = (((*db->get) (db, key, &value, 0) == 0 && status = (((*db->get) (db, key, &value, 0) == 0 &&
parse_line (value.data, result, buffer, buflen) == 0) parse_line (value.data, result, buffer, buflen))
? NSS_STATUS_SUCCESS : NSS_STATUS_NOTFOUND); ? NSS_STATUS_SUCCESS : NSS_STATUS_NOTFOUND);
if (! keep_db) if (! keep_db)
@ -164,9 +166,9 @@ lookup (const DBT *key, struct STRUCTURE *result,
#define DB_LOOKUP(name, keysize, keypattern, break_if_match, proto...) \ #define DB_LOOKUP(name, keysize, keypattern, break_if_match, proto...) \
enum nss_status \ enum nss_status \
_nss_files_get##name##_r (proto, \ _nss_db_get##name##_r (proto, \
struct STRUCTURE *result, \ struct STRUCTURE *result, \
char *buffer, int buflen H_ERRNO_PROTO) \ char *buffer, int buflen H_ERRNO_PROTO) \
{ \ { \
DBT key; \ DBT key; \
enum nss_status status; \ enum nss_status status; \
@ -186,8 +188,8 @@ _nss_files_get##name##_r (proto, \
/* Return the next entry from the database file, doing locking. */ /* Return the next entry from the database file, doing locking. */
enum nss_status enum nss_status
CONCAT(_nss_files_get,ENTNAME_r) (struct STRUCTURE *result, CONCAT(_nss_db_get,ENTNAME_r) (struct STRUCTURE *result,
char *buffer, int buflen H_ERRNO_PROTO) char *buffer, int buflen H_ERRNO_PROTO)
{ {
/* Return next entry in host file. */ /* Return next entry in host file. */
enum nss_status status; enum nss_status status;

View File

@ -39,7 +39,7 @@ LINE_PARSER
#include GENERIC #include GENERIC
DB_LOOKUP (servbyname, 1 + strlen (name), (".%s", name), DB_LOOKUP (servbyname, 1 + strlen (name), (".%s/%s", name, proto),
{ {
/* Must match both protocol and name. */ /* Must match both protocol and name. */
if (strcmp (result->s_proto, proto)) if (strcmp (result->s_proto, proto))
@ -48,8 +48,10 @@ DB_LOOKUP (servbyname, 1 + strlen (name), (".%s", name),
}, },
const char *name, const char *proto) const char *name, const char *proto)
DB_LOOKUP (servbyport, 20, ("=%d", port), DB_LOOKUP (servbyport, 20, ("=%d/%s", port, proto),
{ {
if (result->s_port == port) /* Must match both port and protocol. */
if (result->s_port == port
&& strcmp (result->s_proto, proto) == 0)
break; break;
}, int port) }, int port, const char *proto)

View File

@ -1,4 +1,4 @@
# SOME DESCRIPTIVE TITLE. # GNU libc message catalog of translations
# Copyright (C) YEAR Free Software Foundation, Inc. # Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libc 1.93\n" "Project-Id-Version: libc 1.93\n"
"POT-Creation-Date: 1996-08-14 18:02\n" "POT-Creation-Date: 1996-08-29 1:37\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+DIST\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+DIST\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -49,7 +49,7 @@ msgstr ""
msgid " (rule from \"%s\", line %d)" msgid " (rule from \"%s\", line %d)"
msgstr "" msgstr ""
#: locale/programs/ld-collate.c:360 programs/ld-ctype.c:1233 #: locale/programs/ld-collate.c:360 locale/programs/ld-ctype.c:1233
msgid " done\n" msgid " done\n"
msgstr "" msgstr ""
@ -183,7 +183,7 @@ msgstr ""
msgid "%s: command was '%s', result was %d\n" msgid "%s: command was '%s', result was %d\n"
msgstr "" msgstr ""
#: locale/programs/charmap.c:593 programs/locfile.c:878 #: locale/programs/charmap.c:593 locale/programs/locfile.c:878
#, c-format #, c-format
msgid "%s: error in state machine" msgid "%s: error in state machine"
msgstr "" msgstr ""
@ -228,7 +228,7 @@ msgstr ""
msgid "%s: output would overwrite %s\n" msgid "%s: output would overwrite %s\n"
msgstr "" msgstr ""
#: time/zic.c:838 zic.c:1249 zic.c:1269 #: time/zic.c:838 time/zic.c:1249 time/zic.c:1269
#, c-format #, c-format
msgid "%s: panic: Invalid l_value %d\n" msgid "%s: panic: Invalid l_value %d\n"
msgstr "" msgstr ""
@ -299,7 +299,7 @@ msgstr ""
msgid ".rhosts writeable by other than owner" msgid ".rhosts writeable by other than owner"
msgstr "" msgstr ""
#: clnt_perr.c:133 sunrpc/clnt_perr.c:112 #: sunrpc/clnt_perr.c:112 sunrpc/clnt_perr.c:133
#, c-format #, c-format
msgid "; low version = %lu, high version = %lu" msgid "; low version = %lu, high version = %lu"
msgstr "" msgstr ""
@ -554,6 +554,10 @@ msgstr ""
msgid "Error in unknown error system: " msgid "Error in unknown error system: "
msgstr "" msgstr ""
#: inet/ruserpass.c:156
msgid "Error: .netrc file is readable by others."
msgstr ""
#: stdio-common/../sysdeps/gnu/errlist.c:662 #: stdio-common/../sysdeps/gnu/errlist.c:662
msgid "Exchange full" msgid "Exchange full"
msgstr "" msgstr ""
@ -1191,6 +1195,10 @@ msgstr ""
msgid "Remote address changed" msgid "Remote address changed"
msgstr "" msgstr ""
#: inet/ruserpass.c:157
msgid "Remove password or make file unreadable by others."
msgstr ""
#: resolv/herror.c:73 #: resolv/herror.c:73
msgid "Resolver Error 0 (no error)" msgid "Resolver Error 0 (no error)"
msgstr "" msgstr ""
@ -1395,7 +1403,7 @@ msgstr ""
msgid "Transport endpoint is not connected" msgid "Transport endpoint is not connected"
msgstr "" msgstr ""
#: catgets/gencat.c:202 #: catgets/gencat.c:202 db/makedb.c:196
#, c-format #, c-format
msgid "Try `%s --help' for more information.\n" msgid "Try `%s --help' for more information.\n"
msgstr "" msgstr ""
@ -1405,7 +1413,13 @@ msgstr ""
msgid "Trying %s...\n" msgid "Trying %s...\n"
msgstr "" msgstr ""
#: ../sysdeps/mach/_strerror.c:58 string/../sysdeps/generic/_strerror.c:36 #: inet/ruserpass.c:241
#, c-format
msgid "Unknown .netrc keyword %s"
msgstr ""
#: string/../sysdeps/generic/_strerror.c:36
#: string/../sysdeps/mach/_strerror.c:58
msgid "Unknown error " msgid "Unknown error "
msgstr "" msgstr ""
@ -1469,6 +1483,22 @@ msgid ""
"is -, output is written to standard output.\n" "is -, output is written to standard output.\n"
msgstr "" msgstr ""
#: db/makedb.c:199
#, c-format
msgid ""
"Usage: %s [OPTION]... INPUT-FILE OUTPUT-FILE\n"
" %s [OPTION]... -o OUTPUT-FILE INPUT-FILE\n"
" %s [OPTION]... -u INPUT-FILE\n"
"Mandatory arguments to long options are mandatory for short options too.\n"
" -f, --fold-case convert key to lower case\n"
" -h, --help display this help and exit\n"
" -o, --output=NAME write output to file NAME\n"
" --quiet don't print messages while building database\n"
" -u, --undo print content of database file, one entry a line\n"
" -V, --version output version information and exit\n"
"If INPUT-FILE is -, input is read from standard input.\n"
msgstr ""
#: posix/getconf.c:131 #: posix/getconf.c:131
#, c-format #, c-format
msgid "Usage: %s variable_name [pathname]\n" msgid "Usage: %s variable_name [pathname]\n"
@ -1507,12 +1537,12 @@ msgstr ""
msgid "Zone continuation line end time is not after end time of previous line" msgid "Zone continuation line end time is not after end time of previous line"
msgstr "" msgstr ""
#: locale/programs/charmap.c:397 programs/locfile.c:341 #: locale/programs/charmap.c:397 locale/programs/locfile.c:341
#, c-format #, c-format
msgid "`%1$s' definition does not end with `END %1$s'" msgid "`%1$s' definition does not end with `END %1$s'"
msgstr "" msgstr ""
#: locale/programs/ld-monetary.c:358 programs/ld-numeric.c:190 #: locale/programs/ld-monetary.c:358 locale/programs/ld-numeric.c:190
#, c-format #, c-format
msgid "`-1' must be last entry in `%s' field in `%s' category" msgid "`-1' must be last entry in `%s' field in `%s' category"
msgstr "" msgstr ""
@ -1552,7 +1582,7 @@ msgstr ""
msgid "bad .rhosts owner" msgid "bad .rhosts owner"
msgstr "" msgstr ""
#: locale/programs/charmap.c:212 programs/locfile.c:209 #: locale/programs/charmap.c:212 locale/programs/locfile.c:209
msgid "bad argument" msgid "bad argument"
msgstr "" msgstr ""
@ -1598,21 +1628,26 @@ msgstr ""
msgid "cannot insert collation element `%.*s'" msgid "cannot insert collation element `%.*s'"
msgstr "" msgstr ""
#: locale/programs/ld-collate.c:1492 programs/ld-collate.c:1497 #: locale/programs/ld-collate.c:1492 locale/programs/ld-collate.c:1497
msgid "cannot insert into result table" msgid "cannot insert into result table"
msgstr "" msgstr ""
#: locale/programs/ld-collate.c:1165 programs/ld-collate.c:1207 #: locale/programs/ld-collate.c:1165 locale/programs/ld-collate.c:1207
#, c-format #, c-format
msgid "cannot insert new collating symbol definition: %s" msgid "cannot insert new collating symbol definition: %s"
msgstr "" msgstr ""
#: catgets/gencat.c:249 #: db/makedb.c:148
#, c-format
msgid "cannot open database file `%s': %s"
msgstr ""
#: catgets/gencat.c:249 db/makedb.c:167
#, c-format #, c-format
msgid "cannot open input file `%s'" msgid "cannot open input file `%s'"
msgstr "" msgstr ""
#: catgets/gencat.c:754 gencat.c:795 #: catgets/gencat.c:754 catgets/gencat.c:795 db/makedb.c:176
#, c-format #, c-format
msgid "cannot open output file `%s'" msgid "cannot open output file `%s'"
msgstr "" msgstr ""
@ -1645,11 +1680,12 @@ msgstr ""
msgid "character `%c' not defined while needed as default value" msgid "character `%c' not defined while needed as default value"
msgstr "" msgstr ""
#: locale/programs/ld-ctype.c:938 locale/programs/ld-ctype.c:1017 #: locale/programs/ld-ctype.c:938 locale/programs/ld-ctype.c:1001
#: locale/programs/ld-ctype.c:1041 locale/programs/ld-ctype.c:1113 #: locale/programs/ld-ctype.c:1009 locale/programs/ld-ctype.c:1017
#: programs/ld-ctype.c:1001 programs/ld-ctype.c:1009 programs/ld-ctype.c:1025 #: locale/programs/ld-ctype.c:1025 locale/programs/ld-ctype.c:1033
#: programs/ld-ctype.c:1033 programs/ld-ctype.c:1067 programs/ld-ctype.c:1075 #: locale/programs/ld-ctype.c:1041 locale/programs/ld-ctype.c:1067
#: programs/ld-ctype.c:1151 #: locale/programs/ld-ctype.c:1075 locale/programs/ld-ctype.c:1113
#: locale/programs/ld-ctype.c:1151
#, c-format #, c-format
msgid "character `%s' not defined while needed as default value" msgid "character `%s' not defined while needed as default value"
msgstr "" msgstr ""
@ -1722,7 +1758,7 @@ msgstr ""
msgid "definition keyword expected" msgid "definition keyword expected"
msgstr "" msgstr ""
#: locale/programs/charset.c:87 programs/charset.c:132 #: locale/programs/charset.c:87 locale/programs/charset.c:132
#, c-format #, c-format
msgid "duplicate character name `%s'" msgid "duplicate character name `%s'"
msgstr "" msgstr ""
@ -1736,6 +1772,10 @@ msgstr ""
msgid "duplicate definition for character `%.*s'" msgid "duplicate definition for character `%.*s'"
msgstr "" msgstr ""
#: db/makedb.c:293
msgid "duplicate key"
msgstr ""
#: catgets/gencat.c:368 #: catgets/gencat.c:368
msgid "duplicate set definition" msgid "duplicate set definition"
msgstr "" msgstr ""
@ -1817,12 +1857,12 @@ msgstr ""
msgid "failure while writing data for category `%s'" msgid "failure while writing data for category `%s'"
msgstr "" msgstr ""
#: locale/programs/ld-monetary.c:154 programs/ld-numeric.c:95 #: locale/programs/ld-monetary.c:154 locale/programs/ld-numeric.c:95
#, c-format #, c-format
msgid "field `%s' in category `%s' not defined" msgid "field `%s' in category `%s' not defined"
msgstr "" msgstr ""
#: locale/programs/ld-messages.c:81 programs/ld-messages.c:102 #: locale/programs/ld-messages.c:81 locale/programs/ld-messages.c:102
#, c-format #, c-format
msgid "field `%s' in category `%s' undefined" msgid "field `%s' in category `%s' undefined"
msgstr "" msgstr ""
@ -1883,7 +1923,7 @@ msgstr ""
msgid "illegal result type" msgid "illegal result type"
msgstr "" msgstr ""
#: catgets/gencat.c:341 gencat.c:418 #: catgets/gencat.c:341 catgets/gencat.c:418
msgid "illegal set number" msgid "illegal set number"
msgstr "" msgstr ""
@ -1897,6 +1937,10 @@ msgstr ""
msgid "implementation limit: no more than %d character maps allowed" msgid "implementation limit: no more than %d character maps allowed"
msgstr "" msgstr ""
#: db/makedb.c:150
msgid "incorrectly formatted file"
msgstr ""
#: time/zic.c:815 #: time/zic.c:815
msgid "input line of unknown type" msgid "input line of unknown type"
msgstr "" msgstr ""
@ -1926,7 +1970,7 @@ msgstr ""
msgid "invalid abbreviation format" msgid "invalid abbreviation format"
msgstr "" msgstr ""
#: time/zic.c:1115 zic.c:1314 zic.c:1328 #: time/zic.c:1115 time/zic.c:1314 time/zic.c:1328
msgid "invalid day of month" msgid "invalid day of month"
msgstr "" msgstr ""
@ -1938,7 +1982,7 @@ msgstr ""
msgid "invalid leaping year" msgid "invalid leaping year"
msgstr "" msgstr ""
#: time/zic.c:1102 zic.c:1205 #: time/zic.c:1102 time/zic.c:1205
msgid "invalid month name" msgid "invalid month name"
msgstr "" msgstr ""
@ -1950,7 +1994,7 @@ msgstr ""
msgid "invalid starting year" msgid "invalid starting year"
msgstr "" msgstr ""
#: time/zic.c:1131 zic.c:1233 #: time/zic.c:1131 time/zic.c:1233
msgid "invalid time of day" msgid "invalid time of day"
msgstr "" msgstr ""
@ -1982,10 +2026,10 @@ msgstr ""
msgid "memory clobbered past end of allocated block" msgid "memory clobbered past end of allocated block"
msgstr "" msgstr ""
#: locale/programs/ld-collate.c:167 locale/programs/ld-collate.c:177 #: locale/programs/ld-collate.c:167 locale/programs/ld-collate.c:173
#: locale/programs/ld-collate.c:1467 posix/getconf.c:174 #: locale/programs/ld-collate.c:177 locale/programs/ld-collate.c:1438
#: programs/ld-collate.c:173 programs/ld-collate.c:1438 programs/locfile.c:940 #: locale/programs/ld-collate.c:1467 locale/programs/locfile.c:940
#: programs/xmalloc.c:64 #: locale/programs/xmalloc.c:64 posix/getconf.c:174
msgid "memory exhausted" msgid "memory exhausted"
msgstr "" msgstr ""
@ -2002,11 +2046,11 @@ msgstr ""
msgid "never registered prog %d\n" msgid "never registered prog %d\n"
msgstr "" msgstr ""
#: rpc_parse.c:313 sunrpc/rpc_parse.c:305 #: sunrpc/rpc_parse.c:305 sunrpc/rpc_parse.c:313
msgid "no array-of-pointer declarations -- use typedef" msgid "no array-of-pointer declarations -- use typedef"
msgstr "" msgstr ""
#: locale/programs/ld-messages.c:95 programs/ld-messages.c:116 #: locale/programs/ld-messages.c:95 locale/programs/ld-messages.c:116
#, c-format #, c-format
msgid "no correct regular expression for field `%s' in category `%s': %s" msgid "no correct regular expression for field `%s' in category `%s': %s"
msgstr "" msgstr ""
@ -2023,11 +2067,13 @@ msgstr ""
msgid "no other keyword shall be specified when `copy' is used" msgid "no other keyword shall be specified when `copy' is used"
msgstr "" msgstr ""
#: locale/programs/charmap.c:315 programs/charmap.c:466 programs/charmap.c:545 #: locale/programs/charmap.c:315 locale/programs/charmap.c:466
#: locale/programs/charmap.c:545
msgid "no symbolic name given" msgid "no symbolic name given"
msgstr "" msgstr ""
#: locale/programs/charmap.c:380 programs/charmap.c:512 programs/charmap.c:578 #: locale/programs/charmap.c:380 locale/programs/charmap.c:512
#: locale/programs/charmap.c:578
msgid "no symbolic name given for end of range" msgid "no symbolic name given for end of range"
msgstr "" msgstr ""
@ -2044,25 +2090,30 @@ msgstr ""
msgid "portmap CALLIT: cannot fork.\n" msgid "portmap CALLIT: cannot fork.\n"
msgstr "" msgstr ""
#: portmap.c:116 sunrpc/portmap.c:94 #: sunrpc/portmap.c:94 sunrpc/portmap.c:116
msgid "portmap cannot bind" msgid "portmap cannot bind"
msgstr "" msgstr ""
#: portmap.c:112 sunrpc/portmap.c:86 #: sunrpc/portmap.c:86 sunrpc/portmap.c:112
msgid "portmap cannot create socket" msgid "portmap cannot create socket"
msgstr "" msgstr ""
#: rpc_scan.c:464 sunrpc/rpc_scan.c:456 #: sunrpc/rpc_scan.c:456 sunrpc/rpc_scan.c:464
msgid "preprocessor error" msgid "preprocessor error"
msgstr "" msgstr ""
#: rpcinfo.c:350 sunrpc/rpcinfo.c:222 #: db/makedb.c:309
#, c-format
msgid "problems while reading `%s'"
msgstr ""
#: sunrpc/rpcinfo.c:222 sunrpc/rpcinfo.c:350
#, c-format #, c-format
msgid "program %lu is not available\n" msgid "program %lu is not available\n"
msgstr "" msgstr ""
#: rpcinfo.c:282 rpcinfo.c:371 rpcinfo.c:408 rpcinfo.c:429 #: sunrpc/rpcinfo.c:245 sunrpc/rpcinfo.c:282 sunrpc/rpcinfo.c:371
#: sunrpc/rpcinfo.c:245 sunrpc/rpcinfo.c:462 #: sunrpc/rpcinfo.c:408 sunrpc/rpcinfo.c:429 sunrpc/rpcinfo.c:462
#, c-format #, c-format
msgid "program %lu version %lu is not available\n" msgid "program %lu version %lu is not available\n"
msgstr "" msgstr ""
@ -2126,7 +2177,7 @@ msgstr ""
msgid "run_svc returned unexpectedly\n" msgid "run_svc returned unexpectedly\n"
msgstr "" msgstr ""
#: time/zic.c:709 zic.c:711 #: time/zic.c:709 time/zic.c:711
msgid "same rule name in multiple files" msgid "same rule name in multiple files"
msgstr "" msgstr ""
@ -2142,7 +2193,7 @@ msgstr ""
msgid "sorting order `forward' and `backward' are mutually exclusive" msgid "sorting order `forward' and `backward' are mutually exclusive"
msgstr "" msgstr ""
#: locale/programs/ld-collate.c:1567 programs/ld-collate.c:1613 #: locale/programs/ld-collate.c:1567 locale/programs/ld-collate.c:1613
msgid "" msgid ""
"specification of sorting weight for collation symbol does not make sense" "specification of sorting weight for collation symbol does not make sense"
msgstr "" msgstr ""
@ -2159,7 +2210,7 @@ msgstr ""
msgid "starting year greater than ending year" msgid "starting year greater than ending year"
msgstr "" msgstr ""
#: sunrpc/svc_tcp.c:199 svc_tcp.c:204 #: sunrpc/svc_tcp.c:199 sunrpc/svc_tcp.c:204
msgid "svc_tcp: makefd_xprt: out of memory\n" msgid "svc_tcp: makefd_xprt: out of memory\n"
msgstr "" msgstr ""
@ -2171,7 +2222,7 @@ msgstr ""
msgid "svctcp_.c - udp socket creation problem" msgid "svctcp_.c - udp socket creation problem"
msgstr "" msgstr ""
#: sunrpc/svc_tcp.c:154 svc_tcp.c:161 #: sunrpc/svc_tcp.c:154 sunrpc/svc_tcp.c:161
msgid "svctcp_create: out of memory\n" msgid "svctcp_create: out of memory\n"
msgstr "" msgstr ""
@ -2211,16 +2262,17 @@ msgid ""
"definition" "definition"
msgstr "" msgstr ""
#: locale/programs/ld-collate.c:1054 programs/ld-collate.c:1181 #: locale/programs/ld-collate.c:1054 locale/programs/ld-collate.c:1181
#, c-format #, c-format
msgid "" msgid ""
"symbol for multicharacter collating element `%.*s' duplicates symbolic name " "symbol for multicharacter collating element `%.*s' duplicates symbolic name "
"in charset" "in charset"
msgstr "" msgstr ""
#: locale/programs/charmap.c:314 locale/programs/charmap.c:465 #: locale/programs/charmap.c:314 locale/programs/charmap.c:348
#: locale/programs/charmap.c:576 programs/charmap.c:348 programs/charmap.c:378 #: locale/programs/charmap.c:378 locale/programs/charmap.c:465
#: programs/charmap.c:511 programs/charmap.c:544 #: locale/programs/charmap.c:511 locale/programs/charmap.c:544
#: locale/programs/charmap.c:576
#, c-format #, c-format
msgid "syntax error in %s definition: %s" msgid "syntax error in %s definition: %s"
msgstr "" msgstr ""
@ -2273,7 +2325,7 @@ msgstr ""
msgid "syntax error in order specification" msgid "syntax error in order specification"
msgstr "" msgstr ""
#: locale/programs/charmap.c:195 programs/charmap.c:211 #: locale/programs/charmap.c:195 locale/programs/charmap.c:211
#, c-format #, c-format
msgid "syntax error in prolog: %s" msgid "syntax error in prolog: %s"
msgstr "" msgstr ""
@ -2286,7 +2338,7 @@ msgstr ""
msgid "syntax error: not inside a locale definition section" msgid "syntax error: not inside a locale definition section"
msgstr "" msgstr ""
#: catgets/gencat.c:370 gencat.c:506 gencat.c:533 #: catgets/gencat.c:370 catgets/gencat.c:506 catgets/gencat.c:533
msgid "this is the first definition" msgid "this is the first definition"
msgstr "" msgstr ""
@ -2294,7 +2346,7 @@ msgstr ""
msgid "time before zero" msgid "time before zero"
msgstr "" msgstr ""
#: time/zic.c:1128 zic.c:1960 zic.c:1979 #: time/zic.c:1128 time/zic.c:1960 time/zic.c:1979
msgid "time overflow" msgid "time overflow"
msgstr "" msgstr ""
@ -2351,13 +2403,13 @@ msgstr ""
msgid "typed single year" msgid "typed single year"
msgstr "" msgstr ""
#: locale/programs/charmap.c:617 programs/charmap.c:628 #: locale/programs/charmap.c:617 locale/programs/charmap.c:628
#, c-format #, c-format
msgid "unknown character `%s'" msgid "unknown character `%s'"
msgstr "" msgstr ""
#: locale/programs/ld-messages.c:193 locale/programs/ld-messages.c:215 #: locale/programs/ld-messages.c:193 locale/programs/ld-messages.c:204
#: programs/ld-messages.c:204 programs/ld-messages.c:226 #: locale/programs/ld-messages.c:215 locale/programs/ld-messages.c:226
#, c-format #, c-format
msgid "unknown character in field `%s' of category `%s'" msgid "unknown character in field `%s' of category `%s'"
msgstr "" msgstr ""
@ -2379,8 +2431,8 @@ msgstr ""
msgid "unknown signal" msgid "unknown signal"
msgstr "" msgstr ""
#: locale/programs/ld-collate.c:1366 locale/programs/ld-collate.c:1731 #: locale/programs/ld-collate.c:1366 locale/programs/ld-collate.c:1557
#: programs/ld-collate.c:1557 #: locale/programs/ld-collate.c:1731
#, c-format #, c-format
msgid "unknown symbol `%.*s': line ignored" msgid "unknown symbol `%.*s': line ignored"
msgstr "" msgstr ""
@ -2393,7 +2445,7 @@ msgstr ""
msgid "unterminated message" msgid "unterminated message"
msgstr "" msgstr ""
#: locale/programs/linereader.c:515 programs/linereader.c:550 #: locale/programs/linereader.c:515 locale/programs/linereader.c:550
msgid "unterminated string" msgid "unterminated string"
msgstr "" msgstr ""
@ -2422,7 +2474,7 @@ msgstr ""
msgid "use of 2/29 in non leap-year" msgid "use of 2/29 in non leap-year"
msgstr "" msgstr ""
#: locale/programs/charmap.c:438 programs/charmap.c:492 #: locale/programs/charmap.c:438 locale/programs/charmap.c:492
#, c-format #, c-format
msgid "value for %s must be an integer" msgid "value for %s must be an integer"
msgstr "" msgstr ""
@ -2432,7 +2484,7 @@ msgstr ""
msgid "value for <%s> must lie between 1 and 4" msgid "value for <%s> must lie between 1 and 4"
msgstr "" msgstr ""
#: locale/programs/ld-monetary.c:148 programs/ld-numeric.c:89 #: locale/programs/ld-monetary.c:148 locale/programs/ld-numeric.c:89
#, c-format #, c-format
msgid "value for field `%s' in category `%s' must not be the empty string" msgid "value for field `%s' in category `%s' must not be the empty string"
msgstr "" msgstr ""
@ -2452,7 +2504,7 @@ msgid ""
"value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length" "value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length"
msgstr "" msgstr ""
#: locale/programs/ld-monetary.c:370 programs/ld-numeric.c:199 #: locale/programs/ld-monetary.c:370 locale/programs/ld-numeric.c:199
#, c-format #, c-format
msgid "values for field `%s' in category `%s' must be smaller than 127" msgid "values for field `%s' in category `%s' must be smaller than 127"
msgstr "" msgstr ""
@ -2478,6 +2530,18 @@ msgstr ""
msgid "while opening old catalog file" msgid "while opening old catalog file"
msgstr "" msgstr ""
#: db/makedb.c:336
msgid "while reading database"
msgstr ""
#: db/makedb.c:298
msgid "while writing data base file"
msgstr ""
#: db/makedb.c:129
msgid "wrong number of arguments"
msgstr ""
#: time/zic.c:1078 #: time/zic.c:1078
msgid "wrong number of fields on Leap line" msgid "wrong number of fields on Leap line"
msgstr "" msgstr ""

View File

@ -45,6 +45,7 @@ __BEGIN_DECLS
#define mode_t __mode_t #define mode_t __mode_t
#define nlink_t __nlink_t #define nlink_t __nlink_t
#define off_t __off_t #define off_t __off_t
#define loff_t __loff_t
#define pid_t __pid_t #define pid_t __pid_t
#define uid_t __uid_t #define uid_t __uid_t
#ifndef ssize_t #ifndef ssize_t

View File

@ -135,17 +135,6 @@
#define STATUS 0x2 /* nameserver status query */ #define STATUS 0x2 /* nameserver status query */
/*#define xxx 0x3*/ /* 0x3 reserved */ /*#define xxx 0x3*/ /* 0x3 reserved */
#define NS_NOTIFY_OP 0x4 /* notify secondary of SOA change */ #define NS_NOTIFY_OP 0x4 /* notify secondary of SOA change */
#ifdef ALLOW_UPDATES
/* non standard - supports ALLOW_UPDATES stuff from Mike Schwartz */
# define UPDATEA 0x9 /* add resource record */
# define UPDATED 0xa /* delete a specific resource record */
# define UPDATEDA 0xb /* delete all named resource record */
# define UPDATEM 0xc /* modify a specific resource record */
# define UPDATEMA 0xd /* modify all named resource record */
# define ZONEINIT 0xe /* initial zone transfer */
# define ZONEREF 0xf /* incremental zone referesh */
#endif
/* /*
* Currently defined response codes * Currently defined response codes
*/ */
@ -155,10 +144,6 @@
#define NXDOMAIN 3 /* non existent domain */ #define NXDOMAIN 3 /* non existent domain */
#define NOTIMP 4 /* not implemented */ #define NOTIMP 4 /* not implemented */
#define REFUSED 5 /* query refused */ #define REFUSED 5 /* query refused */
#ifdef ALLOW_UPDATES
/* non standard */
# define NOCHANGE 0xf /* update failed to change db */
#endif
/* /*
* Type values for resources and queries * Type values for resources and queries
@ -193,12 +178,17 @@
#define T_AAAA 28 /* IP6 Address */ #define T_AAAA 28 /* IP6 Address */
#define T_LOC 29 /* Location Information */ #define T_LOC 29 /* Location Information */
#define T_NXT 30 /* Next Valid Name in Zone */ #define T_NXT 30 /* Next Valid Name in Zone */
#define T_EID 31 /* Endpoint identifier */
#define T_NIMLOC 32 /* Nimrod locator */
#define T_SRV 33 /* Server selection */
#define T_ATMA 34 /* ATM Address */
/* non standard */ /* non standard */
#define T_UINFO 100 /* user (finger) information */ #define T_UINFO 100 /* user (finger) information */
#define T_UID 101 /* user ID */ #define T_UID 101 /* user ID */
#define T_GID 102 /* group ID */ #define T_GID 102 /* group ID */
#define T_UNSPEC 103 /* Unspecified format (binary data) */ #define T_UNSPEC 103 /* Unspecified format (binary data) */
/* Query type values which do not appear in resource records */ /* Query type values which do not appear in resource records */
#define T_IXFR 251 /* incremental zone transfer */
#define T_AXFR 252 /* transfer zone of authority */ #define T_AXFR 252 /* transfer zone of authority */
#define T_MAILB 253 /* transfer mailbox records */ #define T_MAILB 253 /* transfer mailbox records */
#define T_MAILA 254 /* transfer mail agent records */ #define T_MAILA 254 /* transfer mail agent records */
@ -355,18 +345,6 @@ typedef struct {
*/ */
#define INDIR_MASK 0xc0 #define INDIR_MASK 0xc0
/*
* Structure for passing resource records around.
*/
struct rrec {
int16_t r_zone; /* zone number */
int16_t r_class; /* class number */
int16_t r_type; /* type number */
u_int32_t r_ttl; /* time to live */
int r_size; /* size of data area */
char *r_data; /* pointer to data */
};
extern u_int16_t _getshort __P((const u_char *)); extern u_int16_t _getshort __P((const u_char *));
extern u_int32_t _getlong __P((const u_char *)); extern u_int32_t _getlong __P((const u_char *));

View File

@ -667,7 +667,7 @@ __p_rr(cp, msg, file)
case T_AAAA: { case T_AAAA: {
char t[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"]; char t[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
fprintf(file, "\t%s\n", inet_ntop(AF_INET6, cp, t, sizeof t)); fprintf(file, "\t%s", inet_ntop(AF_INET6, cp, t, sizeof t));
cp += dlen; cp += dlen;
break; break;
} }
@ -675,11 +675,23 @@ __p_rr(cp, msg, file)
case T_LOC: { case T_LOC: {
char t[255]; char t[255];
(void) fprintf(file, "\t%s\n", loc_ntoa(cp, t)); (void) fprintf(file, "\t%s", loc_ntoa(cp, t));
cp += dlen; cp += dlen;
break; break;
} }
case T_SRV: {
u_int priority, weight, port;
priority = _getshort(cp); cp += INT16SZ;
weight = _getshort(cp); cp += INT16SZ;
port = _getshort(cp); cp += INT16SZ;
fprintf(file, "\t%u %u %u ", priority, weight, port);
if ((cp = p_fqname(cp, msg, file)) == NULL)
return (NULL);
break;
}
case T_MINFO: case T_MINFO:
case T_RP: case T_RP:
putc('\t', file); putc('\t', file);
@ -856,13 +868,15 @@ const struct res_sym __p_class_syms[] = {
const struct res_sym __p_type_syms[] = { const struct res_sym __p_type_syms[] = {
{T_A, "A", "address"}, {T_A, "A", "address"},
{T_NS, "NS", "name server"}, {T_NS, "NS", "name server"},
{T_MD, "MD", "mail destination (deprecated)"},
{T_MF, "MF", "mail forwarder (deprecated)"},
{T_CNAME, "CNAME", "canonical name"}, {T_CNAME, "CNAME", "canonical name"},
{T_SOA, "SOA", "start of authority"}, {T_SOA, "SOA", "start of authority"},
{T_MB, "MB", "mailbox"}, {T_MB, "MB", "mailbox"},
{T_MG, "MG", "mail group member"}, {T_MG, "MG", "mail group member"},
{T_MR, "MR", "mail rename"}, {T_MR, "MR", "mail rename"},
{T_NULL, "NULL", "null"}, {T_NULL, "NULL", "null"},
{T_WKS, "WKS", "well-known service"}, {T_WKS, "WKS", "well-known service (deprecated)"},
{T_PTR, "PTR", "domain name pointer"}, {T_PTR, "PTR", "domain name pointer"},
{T_HINFO, "HINFO", "host information"}, {T_HINFO, "HINFO", "host information"},
{T_MINFO, "MINFO", "mailbox information"}, {T_MINFO, "MINFO", "mailbox information"},
@ -877,22 +891,27 @@ const struct res_sym __p_type_syms[] = {
{T_NSAP_PTR, "NSAP_PTR", "domain name pointer"}, {T_NSAP_PTR, "NSAP_PTR", "domain name pointer"},
{T_SIG, "SIG", "signature"}, {T_SIG, "SIG", "signature"},
{T_KEY, "KEY", "key"}, {T_KEY, "KEY", "key"},
{T_NXT, "NXT", "next valid name"},
{T_PX, "PX", "mapping information"}, {T_PX, "PX", "mapping information"},
{T_GPOS, "GPOS", "geographical position"}, {T_GPOS, "GPOS", "geographical position (withdrawn)"},
{T_AAAA, "AAAA", "IPv6 address"}, {T_AAAA, "AAAA", "IPv6 address"},
{T_LOC, "LOC", "location"}, {T_LOC, "LOC", "location"},
{T_NXT, "NXT", "next valid name (unimplemented)"},
{T_EID, "EID", "endpoint identifier (unimplemented)"},
{T_NIMLOC, "NIMLOC", "NIMROD locator (unimplemented)"},
{T_SRV, "SRV", "server selection"},
{T_ATMA, "ATMA", "ATM address (unimplemented)"},
{T_IXFR, "IXFR", "incremental zone transfer"},
{T_AXFR, "AXFR", "zone transfer"}, {T_AXFR, "AXFR", "zone transfer"},
{T_MAILB, "MAILB", "mailbox-related data"}, {T_MAILB, "MAILB", "mailbox-related data (deprecated)"},
{T_MAILA, "MAILA", "mail agent"}, {T_MAILA, "MAILA", "mail agent (deprecated)"},
{T_UINFO, "UINFO", "user information"}, {T_UINFO, "UINFO", "user information (nonstandard)"},
{T_UID, "UID", "user ID"}, {T_UID, "UID", "user ID (nonstandard)"},
{T_GID, "GID", "group ID"}, {T_GID, "GID", "group ID (nonstandard)"},
#ifdef ALLOW_T_UNSPEC #ifdef ALLOW_T_UNSPEC
{T_UNSPEC, "UNSPEC", "unspecified data"}, {T_UNSPEC, "UNSPEC", "unspecified data (nonstandard)"},
#endif /* ALLOW_T_UNSPEC */ #endif /* ALLOW_T_UNSPEC */
{T_ANY, "ANY", "\"any\""}, {T_ANY, "ANY", "\"any\""},
{0, (char *)0, (char *)0} {0, NULL, NULL}
}; };
int int

View File

@ -126,7 +126,11 @@ static u_int32_t net_mask __P((struct in_addr));
* Resolver state default settings. * Resolver state default settings.
*/ */
struct __res_state _res; struct __res_state _res
# if defined(__BIND_RES_TEXT)
= { RES_TIMEOUT, } /* Motorola, et al. */
# endif
;
/* /*
* Set up default settings. If the configuration file exist, the values * Set up default settings. If the configuration file exist, the values

View File

@ -94,9 +94,6 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
register HEADER *hp; register HEADER *hp;
register u_char *cp; register u_char *cp;
register int n; register int n;
#ifdef ALLOW_UPDATES
struct rrec *newrr = (struct rrec *) newrr_in;
#endif
u_char *dnptrs[20], **dpp, **lastdnptr; u_char *dnptrs[20], **dpp, **lastdnptr;
if ((_res.options & RES_INIT) == 0 && res_init() == -1) { if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
@ -186,63 +183,6 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
hp->ancount = htons(1); hp->ancount = htons(1);
break; break;
#ifdef ALLOW_UPDATES
/*
* For UPDATEM/UPDATEMA, do UPDATED/UPDATEDA followed by UPDATEA
* (Record to be modified is followed by its replacement in msg.)
*/
case UPDATEM:
case UPDATEMA:
case UPDATED:
/*
* The res code for UPDATED and UPDATEDA is the same; user
* calls them differently: specifies data for UPDATED; server
* ignores data if specified for UPDATEDA.
*/
case UPDATEDA:
buflen -= RRFIXEDSZ + datalen;
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
return (-1);
cp += n;
__putshort(type, cp);
cp += INT16SZ;
__putshort(class, cp);
cp += INT16SZ;
__putlong(0, cp);
cp += INT32SZ;
__putshort(datalen, cp);
cp += INT16SZ;
if (datalen) {
bcopy(data, cp, datalen);
cp += datalen;
}
if ( (op == UPDATED) || (op == UPDATEDA) ) {
hp->ancount = htons(0);
break;
}
/* Else UPDATEM/UPDATEMA, so drop into code for UPDATEA */
case UPDATEA: /* Add new resource record */
buflen -= RRFIXEDSZ + datalen;
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
return (-1);
cp += n;
__putshort(newrr->r_type, cp);
cp += INT16SZ;
__putshort(newrr->r_class, cp);
cp += INT16SZ;
__putlong(0, cp);
cp += INT32SZ;
__putshort(newrr->r_size, cp);
cp += INT16SZ;
if (newrr->r_size) {
bcopy(newrr->r_data, cp, newrr->r_size);
cp += newrr->r_size;
}
hp->ancount = htons(0);
break;
#endif /* ALLOW_UPDATES */
default: default:
return (-1); return (-1);
} }

View File

@ -71,9 +71,9 @@
#include <stdio.h> #include <stdio.h>
/* /*
* revision information. this is the release date in YYYYMMDD format. * Revision information. This is the release date in YYYYMMDD format.
* it can change every day so the right thing to do with it is use it * It can change every day so the right thing to do with it is use it
* in preprocessor commands such as "#if (__RES > 19931104)". do not * in preprocessor commands such as "#if (__RES > 19931104)". Do not
* compare for equality; rather, use it to determine whether your resolver * compare for equality; rather, use it to determine whether your resolver
* is new enough to contain a certain feature. * is new enough to contain a certain feature.
*/ */
@ -121,7 +121,7 @@ struct __res_state {
struct in_addr addr; struct in_addr addr;
u_int32_t mask; u_int32_t mask;
} sort_list[MAXRESOLVSORT]; } sort_list[MAXRESOLVSORT];
char pad[72]; /* On an i38this means 512b total. */ char pad[72]; /* on an i386 this means 512b total */
}; };
/* /*

View File

@ -241,6 +241,9 @@ __printf_fp (FILE *fp,
strlen (_NL_CURRENT (LC_MONETARY, MON_DECIMAL_POINT))) <= 0) strlen (_NL_CURRENT (LC_MONETARY, MON_DECIMAL_POINT))) <= 0)
decimal = (wchar_t) *_NL_CURRENT (LC_MONETARY, MON_DECIMAL_POINT); decimal = (wchar_t) *_NL_CURRENT (LC_MONETARY, MON_DECIMAL_POINT);
} }
/* Give default value. */
if (decimal == L'\0')
decimal = L'.';
if (info->group) if (info->group)
@ -249,7 +252,7 @@ __printf_fp (FILE *fp,
grouping = _NL_CURRENT (LC_NUMERIC, GROUPING); grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
else else
grouping = _NL_CURRENT (LC_MONETARY, MON_GROUPING); grouping = _NL_CURRENT (LC_MONETARY, MON_GROUPING);
if (*grouping <= 0 || *grouping == CHAR_MAX) if (*grouping <= 0 || *grouping == CHAR_MAX)
grouping = NULL; grouping = NULL;
else else
@ -273,7 +276,7 @@ __printf_fp (FILE *fp,
thousands_sep = (wchar_t) *_NL_CURRENT (LC_MONETARY, thousands_sep = (wchar_t) *_NL_CURRENT (LC_MONETARY,
MON_THOUSANDS_SEP); MON_THOUSANDS_SEP);
} }
if (thousands_sep == L'\0') if (thousands_sep == L'\0')
grouping = NULL; grouping = NULL;
} }

View File

@ -31,21 +31,26 @@ Cambridge, MA 02139, USA. */
extern int _dl_argc; extern int _dl_argc;
extern char **_dl_argv; extern char **_dl_argv;
extern char **_environ; extern char **_environ;
extern void _end;
extern void _start (void); extern void _start (void);
int __libc_enable_secure; int __libc_enable_secure;
int __libc_multiple_libcs; /* Defining this here avoids the inclusion
of init-first. */
ElfW(Addr) ElfW(Addr)
_dl_sysdep_start (void **start_argptr, _dl_sysdep_start (void **start_argptr,
void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phnum, void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
ElfW(Addr) *user_entry)) ElfW(Addr) *user_entry))
{ {
const ElfW(Phdr) *phdr; const ElfW(Phdr) *phdr = NULL;
ElfW(Word) phnum; ElfW(Word) phnum = 0;
ElfW(Addr) user_entry; ElfW(Addr) user_entry;
ElfW(auxv_t) *av; ElfW(auxv_t) *av;
uid_t uid, euid; uid_t uid = 0;
gid_t gid, egid; uid_t euid = 0;
gid_t gid = 0;
gid_t egid = 0;
unsigned int seen; unsigned int seen;
user_entry = (ElfW(Addr)) &_start; user_entry = (ElfW(Addr)) &_start;
@ -103,6 +108,18 @@ _dl_sysdep_start (void **start_argptr,
DL_SYSDEP_INIT; DL_SYSDEP_INIT;
#endif #endif
if (__sbrk (0) == &_end)
{
/* The dynamic linker was run as a program, and so the initial break
starts just after our bss, at &_end. The malloc in dl-minimal.c
will consume the rest of this page, so tell the kernel to move the
break up that far. When the user program examines its break, it
will see this new value and not clobber our data. */
size_t pg = __getpagesize ();
__sbrk (pg - ((&_end - (void *) 0) & (pg - 1)));
}
(*dl_main) (phdr, phnum, &user_entry); (*dl_main) (phdr, phnum, &user_entry);
return user_entry; return user_entry;
} }

View File

@ -38,22 +38,8 @@ __sbrk (ptrdiff_t increment)
instances of __brk and __sbrk can share the heap, returning instances of __brk and __sbrk can share the heap, returning
interleaved pieces of it. */ interleaved pieces of it. */
if (__curbrk == NULL || __libc_multiple_libcs) if (__curbrk == NULL || __libc_multiple_libcs)
{ if (__brk (0) < 0) /* Initialize the break. */
extern void _end; return (void *) -1;
if (__brk (0) < 0) /* Initialize the break. */
return (void *) -1;
/* Align break address to page boundary if not happened before. */
if (!__libc_multiple_libcs && __curbrk == &_end)
{
size_t pg = __getpagesize ();
ptrdiff_t rest = pg - ((&_end - (void *) 0) & (pg - 1));
if (__brk (__curbrk + rest) < 0)
return (void *) -1;
}
}
if (increment == 0) if (increment == 0)
return __curbrk; return __curbrk;

View File

@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux. /* O_*, F_*, FD_* bit values for Linux.
Copyright (C) 1995 Free Software Foundation, Inc. Copyright (C) 1995, 1996 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
@ -23,4 +23,13 @@ Boston, MA 02111-1307, USA. */
#include <sys/types.h> #include <sys/types.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
#define FAPPEND O_APPEND
#define FFSYNC O_FSYNC
#define FNONBLOCK O_NONBLOCK
#define FNDELAY O_NDELAY
#endif /* Use BSD. */
#endif /* fcntlbits.h */ #endif /* fcntlbits.h */

View File

@ -51,6 +51,7 @@ typedef __kernel_ino_t __ino_t; /* Type of file serial numbers. */
typedef __kernel_mode_t __mode_t; /* Type of file attribute bitmasks. */ typedef __kernel_mode_t __mode_t; /* Type of file attribute bitmasks. */
typedef __kernel_nlink_t __nlink_t; /* Type of file link counts. */ typedef __kernel_nlink_t __nlink_t; /* Type of file link counts. */
typedef __kernel_off_t __off_t; /* Type of file sizes and offsets. */ typedef __kernel_off_t __off_t; /* Type of file sizes and offsets. */
typedef __kernel_loff_t __loff_t; /* Type of file sizes and offsets. */
typedef __kernel_pid_t __pid_t; /* Type of process identifications. */ typedef __kernel_pid_t __pid_t; /* Type of process identifications. */
typedef __kernel_ssize_t __ssize_t; /* Type of a byte count, or error. */ typedef __kernel_ssize_t __ssize_t; /* Type of a byte count, or error. */
typedef __kernel_fsid_t __fsid_t; /* Type of file system IDs. */ typedef __kernel_fsid_t __fsid_t; /* Type of file system IDs. */