diff --git a/src/ChangeLog b/src/ChangeLog index 44800fe2..01f51542 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-03-21 Giuseppe Scrivano + + * iri.h: Declare `dummy_iri' as extern not static. + + * main.c [!ENABLE_IRI]: Define `dummy_iri'. + (main) [!ENABLE_IRI]: Initialize `dummy_iri'. + 2011-03-11 Giuseppe Scrivano * ftp.c (getftp): Fix some memory leaks. diff --git a/src/iri.h b/src/iri.h index 49b25d3b..ff97d449 100644 --- a/src/iri.h +++ b/src/iri.h @@ -54,7 +54,7 @@ void set_content_encoding (struct iri *i, char *charset); #else /* ENABLE_IRI */ -static struct iri dummy_iri; +extern struct iri dummy_iri; #define parse_charset(str) NULL #define find_locale() NULL diff --git a/src/main.c b/src/main.c index 5941fefa..80ecc3dd 100644 --- a/src/main.c +++ b/src/main.c @@ -68,6 +68,10 @@ as that of the covered work. */ # define PATH_SEPARATOR '/' #endif +#ifndef ENABLE_IRI +struct iri dummy_iri; +#endif + struct options opt; /* defined in version.c */ @@ -1181,6 +1185,7 @@ for details.\n\n")); opt.encoding_remote = NULL; } #else + memset (&dummy_iri, 0, sizeof (dummy_iri)); if (opt.enable_iri || opt.locale || opt.encoding_remote) { /* sXXXav : be more specific... */