On Wednesday, July 23, 2003, at 03:18PM, Michael G Schwern <[EMAIL PROTECTED]> wrote:

>On Wed, Jul 23, 2003 at 08:16:42AM -0500, Craig A. Berry wrote:
>> Putting something
>> like the following in a header that will be seen everywhere is what
>> I'm talking about.
>> 
>> #ifdef __VMS
>> # define Foo foo1
>> # define foo foo2
>> #endif
>
>I'm not a C programmer nor a serious VMS user, so bear with me here.  When 
>you say "a header that will be seen everywhere" do you mean BitVector.h?  Or 
>something more global than that?

Again, the advice is general and does not refer specifically to Perl or Perl 
extensions.  "Everywhere" just means everywhere that the tokens in question will be 
seen by the compiler.  For a Perl extension, it might make perfect sense to put it at 
the top of your XS code as long as the tokens aren't used in any extra C modules that 
might be included.  Data declarations or function prototypes that are shared among C 
modules are generally placed in a header file, and the redefinition I'm suggesting 
should be placed wherever those declarations and prototypes are in the package in 
question.

Reply via email to