On Feb 2, 2006, at 5:48 AM, Eric Lyon wrote:
- In MSPd.h, use the _MSC_VER macro, which is defines by MS Visual C++,
so that only these defines are only used by that compiler. I.e. change: #define MSP (1) #define PD (!MSP)
To this: #ifdef _MSC_VER #define MSP (1) #define PD (!MSP) #endif /* _MSC_VER */
What is the advantage in doing this? Irrespective of platform, you are either compiling MSP code (in which case MSP is defined as 1 (true) or Pd code in which case MSP is defined as 0. The same header can be included in every Pd external without modification as is (though of course MSP should be defined as 0 for Pd).
From the way Pd does this, and the way the GNU autoconf tools work,
these kind of macros are never defined in the source file itself.
Instead they are defined outside of the source file, in Pd's case using
the -DPD option to the compiler, in the autoconf case, they are defined
in a separate, automatically generated "config.h" which is then
included in any source file that needs it.
I only know gcc, so I don't know how Microsoft Visual C/C++ handles
such things. That's what I left it in there for that compiler (i.e.
#ifdef _MSC_VER)
.hc
"Terrorism is not an enemy. It cannot be defeated. It's a tactic.
It's about as sensible to say we declare war on night attacks and
expect we're going to win that war. We're not going to win the war on
terrorism."
- retired U.S. Army general,
William Odom