From 6f8795b5ab5d586e55f577d701d02f53a152f72f Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 23 May 2013 18:07:01 +0000 Subject: Let iconv build on -HEAD properly. - Add NO_WMISSING_VARIABLE_DECLARATIONS where we use Yacc/Lex. - Add variable declarations where possible. - Add missing static keyword. --- lib/libc/iconv/citrus_iconv_local.h | 1 + lib/libc/iconv/citrus_mapper_local.h | 1 + lib/libc/iconv/citrus_stdenc_local.h | 1 + usr.bin/iconv/iconv.c | 3 +-- usr.bin/mkcsmapper/Makefile | 2 ++ usr.bin/mkesdb/Makefile | 2 ++ 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/libc/iconv/citrus_iconv_local.h b/lib/libc/iconv/citrus_iconv_local.h index db20363..081a708 100644 --- a/lib/libc/iconv/citrus_iconv_local.h +++ b/lib/libc/iconv/citrus_iconv_local.h @@ -57,6 +57,7 @@ static void _citrus_##_m_##_iconv_uninit_context \ #define _CITRUS_ICONV_DEF_OPS(_m_) \ +extern struct _citrus_iconv_ops _citrus_##_m_##_iconv_ops; \ struct _citrus_iconv_ops _citrus_##_m_##_iconv_ops = { \ /* io_init_shared */ &_citrus_##_m_##_iconv_init_shared, \ /* io_uninit_shared */ &_citrus_##_m_##_iconv_uninit_shared, \ diff --git a/lib/libc/iconv/citrus_mapper_local.h b/lib/libc/iconv/citrus_mapper_local.h index 887a35d..8d29e63 100644 --- a/lib/libc/iconv/citrus_mapper_local.h +++ b/lib/libc/iconv/citrus_mapper_local.h @@ -52,6 +52,7 @@ static void _citrus_##_m_##_mapper_init_state \ (void); #define _CITRUS_MAPPER_DEF_OPS(_m_) \ +extern struct _citrus_mapper_ops _citrus_##_m_##_mapper_ops; \ struct _citrus_mapper_ops _citrus_##_m_##_mapper_ops = { \ /* mo_init */ &_citrus_##_m_##_mapper_init, \ /* mo_uninit */ &_citrus_##_m_##_mapper_uninit, \ diff --git a/lib/libc/iconv/citrus_stdenc_local.h b/lib/libc/iconv/citrus_stdenc_local.h index c55387a..141abff 100644 --- a/lib/libc/iconv/citrus_stdenc_local.h +++ b/lib/libc/iconv/citrus_stdenc_local.h @@ -84,6 +84,7 @@ static int _citrus_##_e_##_stdenc_get_state_desc \ struct _citrus_stdenc_state_desc * __restrict) #define _CITRUS_STDENC_DEF_OPS(_e_) \ +extern struct _citrus_stdenc_ops _citrus_##_e_##_stdenc_ops; \ struct _citrus_stdenc_ops _citrus_##_e_##_stdenc_ops = { \ /* eo_init */ &_citrus_##_e_##_stdenc_init, \ /* eo_uninit */ &_citrus_##_e_##_stdenc_uninit, \ diff --git a/usr.bin/iconv/iconv.c b/usr.bin/iconv/iconv.c index 0da65a0..f7bd0a36 100644 --- a/usr.bin/iconv/iconv.c +++ b/usr.bin/iconv/iconv.c @@ -47,8 +47,7 @@ static void do_conv(FILE *, const char *, const char *, bool, bool); static int do_list(unsigned int, const char * const *, void *); static void usage(void); -struct option long_options[] = -{ +static struct option long_options[] = { {"from-code", required_argument, NULL, 'f'}, {"list", no_argument, NULL, 'l'}, {"silent", no_argument, NULL, 's'}, diff --git a/usr.bin/mkcsmapper/Makefile b/usr.bin/mkcsmapper/Makefile index 5d58a0c..6dbb0ec 100644 --- a/usr.bin/mkcsmapper/Makefile +++ b/usr.bin/mkcsmapper/Makefile @@ -5,5 +5,7 @@ PROG= mkcsmapper LDFLAGS+= -L${.CURDIR}/../../lib/libc +NO_WMISSING_VARIABLE_DECLARATIONS= + .include "${.CURDIR}/Makefile.inc" .include diff --git a/usr.bin/mkesdb/Makefile b/usr.bin/mkesdb/Makefile index d4bd03f..69aed65 100644 --- a/usr.bin/mkesdb/Makefile +++ b/usr.bin/mkesdb/Makefile @@ -5,5 +5,7 @@ PROG= mkesdb LDFLAGS+= -L${.OBJDIR}/../../lib/libc +NO_WMISSING_VARIABLE_DECLARATIONS= + .include "${.CURDIR}/Makefile.inc" .include -- cgit v1.1