diff options
Diffstat (limited to 'usr.sbin/services_mkdb')
-rw-r--r-- | usr.sbin/services_mkdb/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/services_mkdb/Makefile.depend | 20 | ||||
-rw-r--r-- | usr.sbin/services_mkdb/extern.h | 34 | ||||
-rw-r--r-- | usr.sbin/services_mkdb/services_mkdb.c | 4 | ||||
-rw-r--r-- | usr.sbin/services_mkdb/uniq.c | 3 |
5 files changed, 58 insertions, 5 deletions
diff --git a/usr.sbin/services_mkdb/Makefile b/usr.sbin/services_mkdb/Makefile index 659cdb8..e61c6df 100644 --- a/usr.sbin/services_mkdb/Makefile +++ b/usr.sbin/services_mkdb/Makefile @@ -2,7 +2,7 @@ PROG= services_mkdb MAN= services_mkdb.8 -SRCS= services_mkdb.c uniq.c +SRCS= services_mkdb.c uniq.c extern.h DPADD+= ${LIBUTIL} LDADD+= -lutil diff --git a/usr.sbin/services_mkdb/Makefile.depend b/usr.sbin/services_mkdb/Makefile.depend new file mode 100644 index 0000000..2dd29af --- /dev/null +++ b/usr.sbin/services_mkdb/Makefile.depend @@ -0,0 +1,20 @@ +# Autogenerated - do NOT edit! + +DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,} + +DEP_MACHINE := ${.PARSEFILE:E} + +DIRDEPS = \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libutil \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/services_mkdb/extern.h b/usr.sbin/services_mkdb/extern.h new file mode 100644 index 0000000..94e31d3 --- /dev/null +++ b/usr.sbin/services_mkdb/extern.h @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2007 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +extern const HASHINFO hinfo; + +void uniq(const char *); diff --git a/usr.sbin/services_mkdb/services_mkdb.c b/usr.sbin/services_mkdb/services_mkdb.c index f4cf62a..7f5316c 100644 --- a/usr.sbin/services_mkdb/services_mkdb.c +++ b/usr.sbin/services_mkdb/services_mkdb.c @@ -49,13 +49,13 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <stringlist.h> +#include "extern.h" + static char tname[MAXPATHLEN]; #define PMASK 0xffff #define PROTOMAX 5 -extern void uniq(const char *); - static void add(DB *, StringList *, size_t, const char *, size_t *, int); static StringList ***parseservices(const char *, StringList *); static void cleanup(void); diff --git a/usr.sbin/services_mkdb/uniq.c b/usr.sbin/services_mkdb/uniq.c index 0674b4b..e1bac38 100644 --- a/usr.sbin/services_mkdb/uniq.c +++ b/usr.sbin/services_mkdb/uniq.c @@ -40,9 +40,8 @@ __FBSDID("$FreeBSD$"); #include <ctype.h> #include <fcntl.h> -extern const HASHINFO hinfo; +#include "extern.h" -void uniq(const char *); static int comp(const char *, char **, size_t *); /* |