linux.debian.devel
[Top] [All Lists]

Re: Handling macro change in an exported library header

Subject: Re: Handling macro change in an exported library header
From: Goswin von Brederlow <goswin-v-b@xxxxxx>
Date: Thu, 26 Jun 2008 14:40:19 +0200
Newsgroups: linux.debian.devel

Nikita Youshchenko <yoush@xxxxxxxxxx> writes:

> Hello.
>
> To fix #486693, I need to apply a patch that changes #define'd macro in an 
> exported library header.
>
> The pattern is:
>
> extern int foo(char *param1, int param2);
> #define bar(param) foo(param, expr(param))
>
> and changed thing is expr(param)
>
> Looks like binary interface of the shared library does not change, however 
> strictly saying any user of the library that uses bar() macro needs to 
> recompile his code.
>
> Any comments on how to handle this change in packaging properly?
>
> Nikita

Are you saying that old binaries will no longer work because param2
will be wrong? If so then the ABI changed.
You might want to use

extern int foo(char *param1, int param2);
extern int foo_new(char *param1, int param2_new);
#define bar(param) foo(param, expr(param))

or versioned symbols to keep the old and new binaries working. In that
case the ABI doesn't break so only shlibs/symbols file need to be
bumped.


If the expr had a bug and old binaries didn't work with the old
library then I would say that requires and shlibs bump, possibly a
versioned conflicts against all rdepends and binNMUs.

MfG
        Goswin


-- 
To UNSUBSCRIBE, email to debian-devel-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>