On Fri, 24 Aug 2007, Bruce Korb wrote:
> Martin Koeppe wrote:
>> I have a system without the type uintptr_t.
>> There the build of autogen 5.9.2 fails, caused by double handling of
>> missing uintptr_t.
>>
>> First, if configure:26097ff detects that uintptr_t is missing, it puts a
>> #define uintptr_t unsigned long
>> into config.h, and second in compat/compat.h:303ff a
>> typedef unsigned long uintptr_t;
>> gets issued as well when uintptr_t is missing. Because of the macro, the
>> typedef becomes a syntax error.
>
> Thank you, Martin. I'll change compat.h to read as follows:
>
> #if ! defined(HAVE_UINTPTR_T) && ! defined(uintptr_t)
> typedef unsigned long uintptr_t;
> #endif
>
This would work. However, I think you could equally well remove those
3 lines, as configure ensures that if HAVE_UINTPTR_T is not defined
then always uintptr_t gets defined. And if the system should already
#define uintptr_t as a macro, then HAVE_UINTPTR_T would be set, too,
so the #if above is always false.
But I think the typedef is nicer than a macro, so IMO you should
change config/libopts.{defs,m4} to not provide the macro alternative
for missing uintptr_t. Or, if you are more comfortable with the macro,
then you should also provide the alternative for intptr_t in
config/libopts.* and remove both the typedefs in compat/compat.h.
Similar typedefs should be written to compat/compat.h and removed from
the end of config-h.in for mode_t, pid_t, scm_primitive_eval_x,
scm_t_port, size_t, uid_t, wchar_t, wint_t.
Or if you prefer replacement macros, the HAVE_* macros aren't really
needed, are they?, and should not be generated then at all.
I think, however, that it is better to have the replacement types in
compat.h, not in libopts.*. configure should only detect what is
there and what isn't, and compat.h decides what to do.
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Autogen-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/autogen-users