Heya Ludo, On Tue 26 May 2009 19:10, l...@gnu.org (Ludovic Courtès) writes:
> "Andy Wingo" <wi...@wingomac.bcn.oblong.net> writes: > >> +#if BUILDING_LIBGUILE && HAVE_VISIBILITY >> +# define SCM_API extern __attribute__((__visibility__("default"))) >> +#elif BUILDING_LIBGUILE && defined _MSC_VER > > This should be: > > #if defined BUILDING_LIBGUILE && BUILDING_LIBGUILE && HAVE_VISIBILITY I believe that this is strictly equivalent. Quoth the CPP manual: #if expression controlled text #endif /* expression */ expression is a C expression of integer type, subject to stringent restrictions. It may contain * Integer constants. * Character constants ... * Arithmetic operators ... * Macros ... * Uses of the defined operator ... * Identifiers that are not macros, which are all considered to be the number zero. This allows you to write #if MACRO instead of #ifdef MACRO, if you know that MACRO, when defined, will always have a nonzero value. Function-like macros used without their function call parentheses are also treated as zero. In some contexts this shortcut is undesirable. The -Wundef option causes GCC to warn whenever it encounters an identifier which is not a macro in an `#if'. But I guess that we want to support -Wundef or something, and this is in a public header, so I suppose you are right :) > Also, I'd have preferred `_GUILE_WITHIN_GUILE', which is clearly in > Guile's name space, and is similar to GMP's `__GMP_WITHIN_GMP' ("rule of > least surprise"). What do you think? I don't care :) I thought I recalled that Neil wanted something else, and Bruno had this in the gnulib docs, so I just used that. Please tell me to change it if you want it changed :-) Cheers, Andy -- http://wingolog.org/