• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
C preprocessor macro
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C preprocessor macro


  • Subject: C preprocessor macro
  • From: Marc Poirier <email@hidden>
  • Date: Sat, 10 Sep 2005 16:46:39 -0400

This is a bit off-topic since it is not Xcode-specific, but I'm having trouble finding an answer so I thought I'd try here...

Is there a standard macro defined by C preprocessors that says, "Hello, I am a C preprocessor"? Kinda like there is __cplusplus for C ++ preprocessors, I'm wondering if there is something like that for plain C. I have a header file that is included by some C files, some C++ files, and resource files, so I need to block out C-specific code so that Rez doesn't choke on it. Currently what I've found (and what I'm checking for) is __STDC_HOSTED__ which is defined (albeit sometimes as 0) by all C preprocessors that I've tried, though from what I've read about it, may not be defined by some C preprocessors in lower-than-C99 mode? So I'm wondering if this is a good choice or if there's a better and fully reliable macro to check.

thanks,
Marc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: C preprocessor macro
      • From: Tom Saxton <email@hidden>
    • Re: C preprocessor macro
      • From: Brian Smith <email@hidden>
  • Prev by Date: Debugger doesn't know my types
  • Next by Date: Re: C preprocessor macro
  • Previous by thread: Re: Debugger doesn't know my types
  • Next by thread: Re: C preprocessor macro
  • Index(es):
    • Date
    • Thread