diff options
author | ed <ed@FreeBSD.org> | 2012-10-20 10:33:15 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-10-20 10:33:15 +0000 |
commit | c23d2a42d74060bd07f9ee272b392868da7abea2 (patch) | |
tree | 27b346e0c9d07492d198e14e7d63aab1892e4ff2 /usr.sbin/services_mkdb | |
parent | e65c2d3d073186914cbb3ad3494d5da8b3bde8d5 (diff) | |
download | FreeBSD-src-c23d2a42d74060bd07f9ee272b392868da7abea2.zip FreeBSD-src-c23d2a42d74060bd07f9ee272b392868da7abea2.tar.gz |
More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
Diffstat (limited to 'usr.sbin/services_mkdb')
-rw-r--r-- | usr.sbin/services_mkdb/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/services_mkdb/extern.h | 32 | ||||
-rw-r--r-- | usr.sbin/services_mkdb/services_mkdb.c | 2 | ||||
-rw-r--r-- | usr.sbin/services_mkdb/uniq.c | 2 |
4 files changed, 36 insertions, 2 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/extern.h b/usr.sbin/services_mkdb/extern.h new file mode 100644 index 0000000..f0976ef --- /dev/null +++ b/usr.sbin/services_mkdb/extern.h @@ -0,0 +1,32 @@ +/*- + * 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; diff --git a/usr.sbin/services_mkdb/services_mkdb.c b/usr.sbin/services_mkdb/services_mkdb.c index f4cf62a..d81488c 100644 --- a/usr.sbin/services_mkdb/services_mkdb.c +++ b/usr.sbin/services_mkdb/services_mkdb.c @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <stringlist.h> +#include "extern.h" + static char tname[MAXPATHLEN]; #define PMASK 0xffff diff --git a/usr.sbin/services_mkdb/uniq.c b/usr.sbin/services_mkdb/uniq.c index 0674b4b..b6d06d4 100644 --- a/usr.sbin/services_mkdb/uniq.c +++ b/usr.sbin/services_mkdb/uniq.c @@ -40,7 +40,7 @@ __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 *); |