mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Update.
1999-08-25 Ulrich Drepper <drepper@cygnus.com> * inet/Makefile (routines): Add getipnodebynm. * inet/getipnodebynm.c: New file. * nss/digits_dots.c: If HAVE_TYPE is define type contains the interface type. * nss/nss_files/files-XXX.c: Define EXTRA_ARGS, EXTRA_ARGS_DECL, and EXTRA_ARGS_VALUE is not already done. (internal_getent): Allow extra parameters and pass them to parse_line. (_nss_files_get,ENTNAME_r): Pass extra parameters to internal_getent. (_nss_files_get##name##_r): Likewise. * nss/nss_files/files-hosts.c: Define EXTRA_ARGS, EXTRA_ARGS_DECL, and EXTRA_ARGS_VALUE to pass flags and type to parser. Add getipnodebyname function. * nss/nss_files/files-parse.c: Define EXTRA_ARGS, EXTRA_ARGS_DECL, and EXTRA_ARGS_VALUE is not already done. (parse_line): Add EXTRA_ARGS_DECL to parameter list. * nss/nss_db/db-XXX.c (lookup): Allow extra parameters and pass them to parse_line. (_nss_db_get##name##_r): Pass extra parameters to lookup. (_nss_db_get,ENTNAME_r): Likewise. * sysdeps/generic/if_index.c (__protocol_available): New function. * sysdeps/unix/sysv/linux/if_index.c: Likewise.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Common code for file-based database parsers in nss_files module.
|
||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@@ -33,8 +33,18 @@
|
||||
|
||||
NEED_H_ERRNO - defined iff an arg `int *herrnop' is used.
|
||||
|
||||
EXTRA_ARGS -- defined iff extra parameters must be passed to the parser
|
||||
EXTRA_ARGS_DECL -- declaration for these extra parameters
|
||||
EXTRA_ARGS_VALUE -- values to be passed for these parameters
|
||||
|
||||
Also see files-XXX.c. */
|
||||
|
||||
#ifndef EXTRA_ARGS
|
||||
# define EXTRA_ARGS
|
||||
# define EXTRA_ARGS_DECL
|
||||
# define EXTRA_ARGS_VALUE
|
||||
#endif
|
||||
|
||||
#define CONCAT(a,b) CONCAT1(a,b)
|
||||
#define CONCAT1(a,b) a##b
|
||||
|
||||
@@ -69,7 +79,8 @@ struct parser_data
|
||||
|
||||
/* The parser is defined in a different module. */
|
||||
extern int parse_line (char *line, struct STRUCTURE *result,
|
||||
struct parser_data *data, size_t datalen, int *errnop);
|
||||
struct parser_data *data, size_t datalen, int *errnop
|
||||
EXTRA_ARGS_DECL);
|
||||
|
||||
# define LINE_PARSER(EOLSET, BODY) /* Do nothing */
|
||||
|
||||
@@ -80,7 +91,8 @@ extern int parse_line (char *line, struct STRUCTURE *result,
|
||||
# define LINE_PARSER(EOLSET, BODY) \
|
||||
parser_stclass int \
|
||||
parse_line (char *line, struct STRUCTURE *result, \
|
||||
struct parser_data *data, size_t datalen, int *errnop) \
|
||||
struct parser_data *data, size_t datalen, int *errnop \
|
||||
EXTRA_ARGS_DECL) \
|
||||
{ \
|
||||
ENTDATA_DECL (data) \
|
||||
char *p = strpbrk (line, EOLSET "\n"); \
|
||||
|
Reference in New Issue
Block a user