Thanks. Charles
-----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Friday, February 14, 2014 4:05 PM To: [email protected] Subject: Re: Is there a C macro for "is z/OS" On Fri, 14 Feb 2014 15:14:44 -0800, Charles Mills wrote: >Is there a standard IBM z/OS XLC macro for "is compiling on z/OS"? I >looked for __ZOS and __MVS and so forth but did not find anything. > >I have code that runs Windows or z/OS and I have just been using #ifdef >WIN32 to differentiate the two cases, but now I need code that will run >Windows, z/OS or Linux so a Boolean check is no longer adequate. > All you need to do is to leave out Windows and a binary choice will work OK for you again. You'll be the better for it. >I don't need tremendous granularity - this release versus that release >or USS command versus batch - just "is z/OS rather than Windows or >Linux." And obviously I could kludge something, but I thought most >systems had a standard "this is who I am" macro. > See: http://pic.dhe.ibm.com/infocenter/zos/v2r1/topic/com.ibm.zos.v2r1.cbclx01/xlmacros.htm Macros indicating the z/OS XL C/C++ compiler product z/OS XL C/C++ Language Reference SC14-7308-00 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
