From: Guillem Jover Date: Sat, 28 Jun 2008 05:33:13 +0000 (+0300) Subject: libdpkg: Move onerr_abort definition from mlib.c to ehandle.c X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0a65e5f663e6f80bb36aa9c7e2949347bbc6e36;p=dpkg libdpkg: Move onerr_abort definition from mlib.c to ehandle.c --- diff --git a/ChangeLog b/ChangeLog index 8226ee06..18d13f33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-28 Guillem Jover + + * lib/dpkg.h (onerr_abort): Move declaration to the ehandle.c section. + * lib/mlib.c (onerr_abort): Move definition ... + * lib/ehandle.c: ... here. + 2008-06-28 Guillem Jover * lib/mlib.c (checksubprocerr): Move the PROCNOERR check before diff --git a/lib/dpkg.h b/lib/dpkg.h index ba6066c0..13dc9e0b 100644 --- a/lib/dpkg.h +++ b/lib/dpkg.h @@ -190,6 +190,8 @@ extern const char printforhelp[]; /*** from ehandle.c ***/ +extern volatile int onerr_abort; + typedef void error_printer(const char *emsg, const char *contextstring); void push_error_handler(jmp_buf *jbufp, error_printer *printerror, @@ -385,8 +387,6 @@ off_t buffer_write(buffer_data_t data, void *buf, off_t length, const char *desc off_t buffer_read(buffer_data_t data, void *buf, off_t length, const char *desc); off_t buffer_copy(buffer_data_t read_data, buffer_data_t write_data, off_t limit, const char *desc); -extern volatile int onerr_abort; - /*** from utils.c ***/ int cisdigit(int c); diff --git a/lib/ehandle.c b/lib/ehandle.c index 46a28bff..8f05d1dd 100644 --- a/lib/ehandle.c +++ b/lib/ehandle.c @@ -39,6 +39,12 @@ static char errmsgbuf[4096]; * same again just in case. */ +/* Incremented when we do some kind of generally necessary operation, + * so that loops &c know to quit if we take an error exit. Decremented + * again afterwards. + */ +volatile int onerr_abort = 0; + #define NCALLS 2 struct cleanupentry { diff --git a/lib/mlib.c b/lib/mlib.c index 5f9cee41..ec9fe1fb 100644 --- a/lib/mlib.c +++ b/lib/mlib.c @@ -35,11 +35,6 @@ #include #include -/* Incremented when we do some kind of generally necessary operation, so that - * loops &c know to quit if we take an error exit. Decremented again afterwards. - */ -volatile int onerr_abort= 0; - void *m_malloc(size_t amount) { #ifdef MDEBUG unsigned short *r2, x;