bug-cvs
[Top][All Lists]
Advanced

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

Re: Questions: ./config.h.in & ./windows-NT/config.h.in


From: Derek Robert Price
Subject: Re: Questions: ./config.h.in & ./windows-NT/config.h.in
Date: Sat, 15 May 2004 21:13:50 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Conrad T. Pino wrote:

>Hi Derek,
>
>>From: Derek Robert Price
>>
>>Actually, if should be pretty straightforward, not in depth at all.
>>Mostly, config.h.in undefines things that might later be defined, for
>>reference and to get defines near their comments later.  The current
>>windows-NT/config.h.in could even be used to create the template.  The
>>algorithm, assuming the contents of the current windows-NT/config.h.in
>>were in windows-NT/config.h.in.in would be something like:
>>
>>copy config.h.in to windows-NT/config.h.in
>>foreach #define in windows-NT/config.h.in.in
>>    find corresponding #undef in windows-NT/config.h.in
>>       (if not present, print warning)
>>    replace line with current #define
>>end foreach
>>foreach #undef in config.h.in
>>    find corresponding #define or #undef in windows-NT/config.h.in.in
>>       (if not present, print warning)
>>end foreach
>>
>>The second loop, of course, could be sped up by caching the contents
>>of windows-NT/config.h.in.in during the first loop.
>
>========================================
>OK, the concept looks sound but there are problems in "./config.h.in"
>that IMO can be worked out.
>--------------------
>This is a good example that needs elaboration:
>
>    /* ... */
>    #undef FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
>
>    #if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
>    # define FILESYSTEM_PREFIX_LEN(Filename) \
>      ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
>    #else
>    # define FILESYSTEM_PREFIX_LEN(Filename) 0
>    #endif
>
>IMO conditional #define warrants special attention along the lines of
>"windows-NT/config.h.in.in" saying something about


No it doesn't.  Reread my pseudo-code.  I was very specific where I
mentioned #undef and #define.

   1. Again, the entire config.h.in is copied to
      windows-NT/config.h.in, including your conditional constructs.
   2. #defines in windows-NT/config.h.in.in are search/replaced over
      #undefs in the new windows-NT/config.h.in with a warning if
      there is no #undef to replace.
   3. #undefs in config.h.in without corresponding #defines or #undefs
      in windows-NT/config.h.in.in cause warnings.  (Note that #undefs
      in windows-NT/config.h.in.in are ignored until this step.  They
      are intended to be used to suppress warnings if config.h.in
      happens to ever contain a conditional with an #undef inside.)


The rule I know that you might not is that if the configure script is
going to set a #define (or not) at configure time, it will always be
#undefined in config.h.in.

Derek

- --
                *8^)

Email: derek@ximbiot.com

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFApsBNLD1OTBfyMaQRAnk/AKDpcUuhZVR361wGU5wR2ZhzP8qUegCfWYvT
hhb7G40D1mMpeITCPMUPnTY=
=OxNx
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]