don't put the xxxcf_locnames[] into the global namespace
This commit is contained in:
parent
cd62ed2ea9
commit
fd816c4745
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: mkheaders.c,v 1.1 2005/06/05 18:19:53 thorpej Exp $ */
|
/* $NetBSD: mkheaders.c,v 1.2 2005/06/28 20:21:05 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -233,9 +233,6 @@ locators_print(const char *name, void *value, void *arg)
|
||||||
for (cp = locdup; *cp; cp++)
|
for (cp = locdup; *cp; cp++)
|
||||||
if (islower((unsigned char)*cp))
|
if (islower((unsigned char)*cp))
|
||||||
*cp = toupper((unsigned char)*cp);
|
*cp = toupper((unsigned char)*cp);
|
||||||
if (fprintf(fp, "extern const char *%scf_locnames[];\n",
|
|
||||||
name) < 0)
|
|
||||||
return 1;
|
|
||||||
for (i = 0, nv = a->a_locs; nv; nv = nv->nv_next, i++) {
|
for (i = 0, nv = a->a_locs; nv; nv = nv->nv_next, i++) {
|
||||||
if (strchr(nv->nv_name, ' ') != NULL ||
|
if (strchr(nv->nv_name, ' ') != NULL ||
|
||||||
strchr(nv->nv_name, '\t') != NULL)
|
strchr(nv->nv_name, '\t') != NULL)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: mkioconf.c,v 1.1 2005/06/05 18:19:53 thorpej Exp $ */
|
/* $NetBSD: mkioconf.c,v 1.2 2005/06/28 20:21:05 drochner Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1992, 1993
|
* Copyright (c) 1992, 1993
|
||||||
|
@ -299,7 +299,8 @@ cf_locnames_print(const char *name, void *value, void *arg)
|
||||||
|
|
||||||
a = value;
|
a = value;
|
||||||
if (a->a_locs) {
|
if (a->a_locs) {
|
||||||
if (fprintf(fp, "const char * const %scf_locnames[] = { ",
|
if (fprintf(fp,
|
||||||
|
"static const char * const %scf_locnames[] = { ",
|
||||||
name) < 0)
|
name) < 0)
|
||||||
return (1);
|
return (1);
|
||||||
for (nv = a->a_locs; nv; nv = nv->nv_next)
|
for (nv = a->a_locs; nv; nv = nv->nv_next)
|
||||||
|
@ -335,7 +336,7 @@ static int loc[1] = { -1 };\n") < 0)
|
||||||
|
|
||||||
if (*packed != NULL)
|
if (*packed != NULL)
|
||||||
if (fprintf(fp,
|
if (fprintf(fp,
|
||||||
"\nconst char * const nullcf_locnames[] = {NULL};\n") < 0)
|
"\nstatic const char * const nullcf_locnames[] = {NULL};\n") < 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
if (locators.used != 0)
|
if (locators.used != 0)
|
||||||
|
|
Loading…
Reference in New Issue