Re: What's cooking in git.git (Oct 2013, #07; Mon, 28)
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Oct 30, 2013, 17:14 UTC
- Message-ID
- <52713E67.3000202@web.de>
- In-Reply-To
- <CAFFjANT=-mQoKUU2KsPHo3Hcq7RAuyM1t4kvJu4OfiNeHrA+Ng@mail.gmail.com>
On 2013-10-30 18.01, Vicent Martí wrote:
Show 7 quoted lines
> On Wed, Oct 30, 2013 at 5:51 PM, Torsten Bögershausen <tboegi@web.de> wrote: >> There is a name clash under cygwin 1.7 (1.5 is OK) >> The following "first aid hot fix" works for me: >> /Torsten > > If Cygwin declares its own bswap_64, wouldn't it be better to use it > instead of overwriting it with our own?
Yes, this will be part of a longer patch. I found that some systems have something like this:
#define htobe64(x) bswap_64(x) And bswap_64 is a function, so we can not detect it by "asking" #ifdef bswap_64 .. #endif
But we can use #ifdef htobe64 ... #endif and this will be part of a bigger patch.
And, in general, we should avoid to introduce functions which may have a name clash. Using the git_ prefix for function names is a good practice. So in order to unbrake the compilation error under cygwin 17, the "hotfix" can be used. /Torsten