diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 2003-06-25 21:51:57 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 2003-06-25 21:51:57 +0000 |
commit | 32374a66958e8b58792173b4382711c86d8c1c5e (patch) | |
tree | fc867405752df1a06eedf022d7283e4542300faa /lib/libc | |
parent | cead827526651fefa3448de93a872c32fd0691ca (diff) |
Move static funcion and variable declarations from header to the
.c file where they are used. Gets rid of YPMATCHCACHE define.
Sure deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/yp/ypinternal.h | 17 | ||||
-rw-r--r-- | lib/libc/yp/ypmatch_cache.c | 14 |
2 files changed, 13 insertions, 18 deletions
diff --git a/lib/libc/yp/ypinternal.h b/lib/libc/yp/ypinternal.h index f4730740125..e581cf2708e 100644 --- a/lib/libc/yp/ypinternal.h +++ b/lib/libc/yp/ypinternal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ypinternal.h,v 1.6 2003/06/02 03:48:42 deraadt Exp $ */ +/* $OpenBSD: ypinternal.h,v 1.7 2003/06/25 21:51:56 marc Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com> @@ -54,18 +54,3 @@ extern int _yplib_timeout; void _yp_unbind(struct dom_binding *); int _yp_check(char **); -#ifdef YPMATCHCACHE - -static bool_t ypmatch_add(const char *, const char *, u_int, char *, u_int); -static bool_t ypmatch_find(const char *, const char *, u_int, char **, u_int *); - -static struct ypmatch_ent { - struct ypmatch_ent *next; - char *map, *key; - char *val; - int keylen, vallen; - time_t expire_t; -} *ypmc; -extern int _yplib_cache; - -#endif diff --git a/lib/libc/yp/ypmatch_cache.c b/lib/libc/yp/ypmatch_cache.c index 9cc062d00eb..6b2f1482686 100644 --- a/lib/libc/yp/ypmatch_cache.c +++ b/lib/libc/yp/ypmatch_cache.c @@ -25,7 +25,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.10 2003/06/02 03:48:42 deraadt Exp $"; +static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.11 2003/06/25 21:51:56 marc Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -42,9 +42,19 @@ static char *rcsid = "$OpenBSD: ypmatch_cache.c,v 1.10 2003/06/02 03:48:42 deraa #include <rpc/xdr.h> #include <rpcsvc/yp.h> #include <rpcsvc/ypclnt.h> -#define YPMATCHCACHE #include "ypinternal.h" +static bool_t ypmatch_add(const char *, const char *, u_int, char *, u_int); +static bool_t ypmatch_find(const char *, const char *, u_int, char **, u_int *); + +static struct ypmatch_ent { + struct ypmatch_ent *next; + char *map, *key; + char *val; + int keylen, vallen; + time_t expire_t; +} *ypmc; + int _yplib_cache = 5; static bool_t |