Home | History | Annotate | Download | only in net
History log of /src/lib/libc/net/nsdispatch.c
RevisionDateAuthorComments
 1.39  19-Apr-2022  rillig lib: remove CONSTCOND comment

Since 2021-01-31, lint doesn't need it anymore for the common pattern of
'do ... while (0)'.
 1.38  18-Sep-2014  christos make more descriptors that we open as close-on-exec
 1.37  13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.36  22-Feb-2011  joerg branches: 1.36.4;
Introduce __weakref_visible to handle the different required visibility
for weak references. GCC 4.2+ and Clang require static, older GCC wants
extern. Change __weak_reference to include sym. This requires changes
the existing users to not reuse the name of the symbol, but avoids
further differences between GCC 4.1 and GCC 4.2+/clang.
 1.35  18-Feb-2011  joerg Support the different weakref semantic in GCC 4.2 and clang.
 1.34  05-Feb-2009  lukem branches: 1.34.4;
sign-compare fix
 1.33  17-Aug-2008  gmcgarry branches: 1.33.6;
Changee __attribute(__weak__) to __weak_reference(). Produces same object code
and matches lib/csu/common_elf/common.h. Fixes linkage with PCC.
 1.32  28-Apr-2008  martin branches: 1.32.2;
Remove clause 3 and 4 from TNF licenses
 1.31  15-Oct-2006  christos branches: 1.31.16;
fix incomplete initializers
 1.30  29-Nov-2005  christos WARNS=4
 1.29  26-Jun-2005  thorpej _nsdispatching needs to count, not just be 1 or 0. Also shuffle around
its use a little to eliminate some duplication.
 1.28  10-Nov-2004  lukem branches: 1.28.2;
* Improve the comments in <nsswitch.h>
* Provide some more useful default ns_src arrays.
 1.27  04-Oct-2004  lukem * Re-number NS_FORCEALL from 1<<7 to 1<<8, moving it out of the "public"
bitrange for nsdispatch(3) return values.
* Tweak documentation comments in nsswitch.h
* Ensure the result from the back-end method is masked with
NS_STATUSMASK before nsdispatch(3) returns it.
 1.26  29-Sep-2004  lukem Implement NS_FORCEALL, which may be set in defaults[0].flags by a caller of
nsdispatch(3) to indicate that all available database methods for a source
will be invoked. This is useful for functions such as endgrent(3).
 1.25  28-Sep-2004  lukem also ensure defaults != NULL
 1.24  08-Sep-2004  simonb Fix non-ELF case in _nsloadmod().
 1.23  02-Aug-2004  thorpej Prevent a deadlock that could occur if we try to update the configuration
data structures during a recursive call to nsdispatch() by keeping a record
of which threads are inside nsdispatch() at any given time.
 1.22  24-Jul-2004  thorpej Add support for dynamically loading nsswitch modules on ELF platforms.
Adapted from FreeBSD. Maintains full backward API / ABI compatbility
with built-in-only nsdispatch().

While here, also make nsdispatch() itself thread-safe.
 1.21  16-Jul-2004  thorpej Use ANSI function decls.
 1.20  24-May-2004  christos remove stray NSUNLOCK(); pointed out by Brian Ginsbach.
 1.19  23-May-2004  christos make this thread-safe.
 1.18  26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.17  20-Dec-2000  christos branches: 1.17.2;
remove redundant declarations.
 1.16  22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.15  28-Nov-1999  lukem don't use err(); instead pass an error condition back to a higher
layer to warn() about.
 1.14  20-Sep-1999  lukem branches: 1.14.4;
back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.13  16-Sep-1999  lukem return NS_UNAVAIL if args are dodgy
 1.12  16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.11  03-May-1999  christos sprinkle argsused till lint smiles at you.
 1.10  18-Apr-1999  lukem specifically include stdarg/varargs.h
 1.9  25-Jan-1999  lukem add rcsids
 1.8  20-Jan-1999  lukem minor knf; don't exceed 80 columns ;)
 1.7  20-Jan-1999  christos - add ARGSUSED
- remove unnecessary casts
- const poisoning
 1.6  20-Jan-1999  lukem weak_alias nsdispatch
 1.5  19-Jan-1999  lukem * support extra two arguments to nsdispatch():
const char *method /* method name for dynamic linking */
const ns_src defaults[] /* list of defaults */
* document above, and expand other docco.
 1.4  17-Jan-1999  lukem fix thinko introduced in last rototilling of nsdispatch; _nsdbtget()
would always return the entry for the first entry looked up. noted by
andrew gillham (manifesting itself as ftp failing to lookup names).
 1.3  16-Jan-1999  lukem remove debugging override of _PATH_NS_CONF
 1.2  15-Jan-1999  lukem merge nsswitch into main branch
 1.1  06-Nov-1996  lukem branches: 1.1.2; 1.1.4;
file nsdispatch.c was initially added on branch nsswitch.
 1.1.4.5  15-Jan-1999  lukem display line number in yacc error messages (using yylineno). minor cleanup
 1.1.4.4  14-Jan-1999  lukem major rework to support arbitrary sources. rename all internal functions to
be consistent (e.g, __nsdbtget(), __nsdbtdump(), __nsdbtput())
 1.1.4.3  02-Nov-1998  lukem sync with current, assign my copyrights to TNF
 1.1.4.2  26-May-1997  lukem reduce # of elems to malloc at once from 17 to 10, due to increased size
of ns_DBT
 1.1.4.1  23-May-1997  lukem * Add nsdispatch(3) implementation
* Deprecate support for "lookup" in resolv.conf
 1.1.2.1  06-Nov-1996  lukem initial nsswitch implementation
 1.14.4.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.2.1  21-Jun-2002  nathanw Catch up to -current.
 1.28.2.1  02-Jul-2005  tron Pull up revision 1.29 (requested by thorpej in ticket #501):
_nsdispatching needs to count, not just be 1 or 0. Also shuffle
around
its use a little to eliminate some duplication.
 1.31.16.1  18-May-2008  yamt sync with head.
 1.32.2.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.33.6.2  17-Aug-2008  gmcgarry Changee __attribute(__weak__) to __weak_reference(). Produces same object code
and matches lib/csu/common_elf/common.h. Fixes linkage with PCC.
 1.33.6.1  17-Aug-2008  gmcgarry file nsdispatch.c was added on branch christos-time_t on 2008-08-17 10:51:20 +0000
 1.34.4.1  05-Mar-2011  bouyer Sync with HEAD
 1.36.4.1  17-Apr-2012  yamt sync with head

RSS XML Feed