[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#677861: lftp: FTBFS[kfreebsd-i386]: error: conflicting declaration 'typedef __int32_t gl_intptr_t'



Hello Robert Millan!

On Thu, Jun 21, 2012 at 07:44:48PM +0200, Robert Millan wrote:
> 2012/6/17 Christoph Egger <christoph@debian.org>:
> > ../lib/stdint.h:295:18: error: 'gl_intptr_t' has a previous declaration as 'typedef long int gl_intptr_t'
> 
> The problem is that lib/stdint.h is hijacking system headers with
> definitions such as:
> 
> #define intptr_t gl_intptr_t
> #define uintptr_t gl_uintptr_t

It also does "undef" prior to that. So if system headers got
included first, it should work.... but it seems it gets included
after (and that's why it looks like the system header is defining
gl_intptr_t when it's really typedefing intptr_t).

Looks like lib/stdint.in.h tries to include the system header first,
if it has been detected as existing (and configure output seems to
indicate that it did find it).

I guess someone needs to untangle all the preprocessor and configure
macros in lib/stdint.in.h.
If someone from the kfreebsd camp could post the generated lib/stdint.h
that would be helpful to be able to see things a bit more clearly.

> 
> causing them to missbehave. These defines need to be removed. If you
> want intptr_t, etc, you can get them from <stdint.h> as usual.

Just removing this part of stdint.in.h could be used as a hack to get things
to build on kfreebsd (since it's not used on linux), sure. That's not
suitable for upstream though....
Another possibility to hack around the problem could be to add
"#define __intptr_t_defined" to stdint.in.h. Still ugly, but would
hopefully avoid breaking (upstream target) platforms that do need
the (re)defines.

Begs to be asked why kfreebsd headers aren't C99 compatible though... or
are the configure tests invalid? Or wait, I don't want to know.

-- 
Andreas Henriksson


Reply to: