[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] strstr redefinition fix
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] strstr redefinition fix |
Date: |
Thu, 15 Sep 2005 22:26:57 +0200 |
User-agent: |
KMail/1.5 |
Derek Price wrote:
> Bruno Haible wrote:
> >Thanks. I applied the appended patch, very similar to yours. (But move
> >the #include outside the extern "C" { ... }.)
>
> Any reason why you left this inside?
>
> + #undef strstr
> + #define strstr rpl_strstr
>
>
> Just because it didn't matter?
Yes, because it didn't matter, and because I'm following the same pattern
as I would use if there were several functions, not just one.
================================
#include ...
#undef func1
#define func1 rpl_func1
#undef func2
#define func2 rpl_func2
extern "C" {
extern foo func1();
extern foo func2();
}
================================
looks somewhat weirder than
================================
#include ...
extern "C" {
#undef func1
#define func1 rpl_func1
extern foo func1();
#undef func2
#define func2 rpl_func2
extern foo func2();
}
================================
Bruno