unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: [Guile-commits] GNU Guile branch, master, updated. 442f3f20ddd33b43743ea181d95024c10622df52
Date: Tue, 26 May 2009 22:31:17 +0200	[thread overview]
Message-ID: <m3bppf7giy.fsf@pobox.com> (raw)
In-Reply-To: <871vqbkcx1.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 26 May 2009 19:10:50 +0200")

Heya Ludo,

On Tue 26 May 2009 19:10, ludo@gnu.org (Ludovic Courtès) writes:

> "Andy Wingo" <wingo@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/




  reply	other threads:[~2009-05-26 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1M8z4v-0004Ka-Hk@cvs.savannah.gnu.org>
2009-05-26 17:10 ` [Guile-commits] GNU Guile branch, master, updated. 442f3f20ddd33b43743ea181d95024c10622df52 Ludovic Courtès
2009-05-26 20:31   ` Andy Wingo [this message]
2009-05-26 21:04     ` Ludovic Courtès
2009-05-27  7:14       ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bppf7giy.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).