From: Guillem Jover Date: Thu, 29 Nov 2007 03:52:24 +0000 (+0200) Subject: Move extern declarations to header files and stop defining them as extern X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e8106c9a017dda7805c30b4f53657d6eab62dd5;p=dpkg Move extern declarations to header files and stop defining them as extern --- diff --git a/ChangeLog b/ChangeLog index e0f3c53d..74142581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-11-29 Guillem Jover + + * src/main.c (log_file): Move definition to ... + * lib/dpkg-db.h: ... here. + * src/configure.c (status_pipes): Remove extern definition. + * src/errors.c (status_pipes): Likewise. + * lib/tarfn.c (TarExtractor): Do not declare as extern. + 2007-11-29 Guillem Jover * dpkg-deb/build.c (arbitrary_fields): Define as static. diff --git a/debian/changelog b/debian/changelog index 89e97d15..4a96d021 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ dpkg (1.14.12) UNRELEASED; urgency=low [ Guillem Jover ] * Define several private functions and variables as static. + * Move extern declarations to header files and stop defining them as extern. -- Guillem Jover Sat, 24 Nov 2007 07:38:13 +0200 diff --git a/lib/dpkg-db.h b/lib/dpkg-db.h index 3c0e5ffe..b6f43afb 100644 --- a/lib/dpkg-db.h +++ b/lib/dpkg-db.h @@ -174,6 +174,7 @@ void modstatdb_shutdown(void); extern char *statusfile, *availablefile; /* initialised by modstatdb_init */ +extern const char *log_file; void log_message(const char *fmt, ...); /*** from database.c ***/ diff --git a/lib/tarfn.c b/lib/tarfn.c index 68901d88..e498da7d 100644 --- a/lib/tarfn.c +++ b/lib/tarfn.c @@ -119,7 +119,7 @@ typedef struct symlinkList { struct symlinkList *next; } symlinkList; -extern int +int TarExtractor( void * userData ,const TarFunctions * functions) diff --git a/src/configure.c b/src/configure.c index 23f92803..2b21dafb 100644 --- a/src/configure.c +++ b/src/configure.c @@ -55,8 +55,6 @@ static enum conffopt promptconfaction(const char* cfgfile, const char* realold, const char* realnew, int useredited, int distedited, enum conffopt what); -extern struct pipef *status_pipes; - void deferred_configure(struct pkginfo *pkg) { /* The algorithm for deciding what to configure first is as follows: diff --git a/src/errors.c b/src/errors.c index a830c2d1..b87d850d 100644 --- a/src/errors.c +++ b/src/errors.c @@ -50,8 +50,6 @@ static struct error_report *reports=0; static struct error_report **lastreport= &reports; static struct error_report emergency; -extern struct pipef *status_pipes; - void print_error_perpackage(const char *emsg, const char *arg) { struct error_report *nr; diff --git a/src/main.c b/src/main.c index 28c4d5ae..7fadab9f 100644 --- a/src/main.c +++ b/src/main.c @@ -374,8 +374,6 @@ static void setforce(const struct cmdinfo *cip, const char *value) { } } -extern const char *log_file; - static const char okpassshortopts[]= "D"; void execbackend(const char *const *argv) NONRETURNING;