Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4305] macros

Date2004-03-13 10:34
Fromjpff@codemist.co.uk
Subject[CSOUND-DEV:4305] macros
Th list below is by belief of the macros actually used in the code,
excluding the (inconsistently named) macros to stop multiple includes
of header files.  I have marked a few oddities.  May include old and
experimental code...
==John ffitch
------------------------------------------------------------------------
_AIX
alloca
__alpha__
__APPLE__
APSTUDIO_INVOKED
APSTUDIO_READONLY_SYMBOLS
BCC
__BEOS__
BETA
__BIG_ENDIAN__
CLICKS
clipper                         Looks like some old code of mine
__cplusplus
c_plusplus                      ?? inconsistent
CSOUNDLIB
CSOUND_OSCILS_C
CSOUND_SPAT3D_C
CSOUND_WIDGETS_CPP
__CYGWIN__
DEBUG
_DEBUG
DOSGCC
DWORD
ECHO
EMBEDDED_PYTHON
__EMX__
EXTRA_DEBUG
FALSE
FAST_TRIG
_FCOMPLEX_DECLARE_T_
__FL_DEF
FLTK_GUI                        Mine and about to be abandoned
FLT_MAX
__FreeBSD__
GAB_RT
__GNUC__
GOOD_TRIG
_gotMIDIout
HAVE_ALSA
HAVE_BZERO
HAVE_CONFIG_H
HAVE_FCNTL_H
HAVE_FLTK
HAVE_GETTIMEOFDAY
HAVE_LIBDL
HAVE_LIBSNDFILE
HAVE_MALLOC_H
HAVE_OS_H
have_phase
HAVE_SGTTY_H
HAVE_STRING_H
HAVE_SYS_IOCTL_H
HAVE_SYS_TIME_H
HAVE_TERMIOS_H
HAVE_UNISTD_H
HAVE_VOLATILE
__hpux
__i386
INEXCLUSIVE
INGALLS
LATTICE
LINUX
LITTLE_ENDIAN
mac_classic
MACDEBUG
__MACH__
macintosh
MACOSX
MAIN
MALLOC_IS_VOIDSTAR
MAX
MAX_PATH
MEMDEBUG
mills_macintosh
mills_macintoshxx
MIN_SHORT
M_PI
_MSDOS
_MSDOS_                         Wonder why bith of these
MSVC
__MWERKS__
MYFLT
__ncc
__NetBSD__
never
NEVER
neverLINUX
NeXT
NeXTi
NOFAKEMALLOC
NOTDEF
NULL
O_BINARY
OLD_CODE
PARG
PHASE_INTERP
phase_offset
PI
PI_F
PIPES
__POWERPC__
profiling
PVFRAMSIZE
RAND_MAX
REALASSERT
REMOVE_WE_CAN_NOW_USE_PRINTF_CHAR_CODE_INSTEAD
RTAUDIO
_RTNETBSD_INCLUDED
SFIRCAM                         Shoudl not be necessary with LIBSNDFILE
SFSUN41
__sgi
SGI
SIGABRT                         These are to do with traps
SIGALRM
SIGBUS
SIGCHLD
SIGCONT
SIGFPE
SIGHUP
SIGILL
SIGINT
SIGIO
SIGPIPE
SIGPROF
SIGPWR
SIGQUIT
SIGSEGV
SIGSTKFLT
SIGSTOP
SIGTERM
SIGTRAP
SIGTSTP
SIGTTIN
SIGTTOU
SIGURG
SIGUSR1
SIGUSR2
SIGVTALRM
SIGWINCH
SIGXCPU
SIGXFSZ
sinf
SNDLIBFILE
sol
solarisAudio                    Shoudl not ne necessary
someday
sparc
__sparc
__sparc__                       Wow!  3 kinds of sparc!
SSOUND
__STDC__
STREAMING
sun
__sun                           and a binary sun
SWIG
SYMANTEC
SYMANTECS                       One of these is a typo
SYS5
TCLTK
TESTING
THINK_C
TRACE
TRACE_FILTER
TRACE_POLES
TRUE
__TURBOC__
TWOPI
TWOPI_F
ULAW
__unix
USE_DOUBLE
USE_FFTW
USING_CHAR
VCO2FT_USE_TABLE
__WATCOMC__
WG_VERBOSE
WIN32
_WIN32                          Again something odd here
WINDOWS
_WINDOWS
_WINDOWS_                       and here?
WORD
WORDS_BIGENDIAN
XALL
XMGDIR
ZEROTRAP
-------------------------------

E&EE

Date2004-03-21 20:10
FromAnthony Kozar
Subject[CSOUND-DEV:4383] Re: macros
Here are some comments that I had about the Mac-related macros.

Anthony Kozar
anthony.kozar@utoledo.edu

On 3/13/04 5:34 AM, jpff@codemist.co.uk etched in
stone:

> Th list below is by belief of the macros actually used in the code,
> excluding the (inconsistently named) macros to stop multiple includes
> of header files.  I have marked a few oddities.  May include old and
> experimental code...
> ==John ffitch
[...]
> __APPLE__
Not sure what this is.  Mac OS X or Apple's compiler?

> mac_classic
This is defined by Csound whenever "macintosh" is, perhaps to make the
semantics clearer.

> MACDEBUG
This means "macro debug"?  not "macintosh debug."

> __MACH__
Another indication of compiling on Mac OS X (does this indicate NeXT too?)

> macintosh
This is defined by the compiler (or perhaps system headers) whenever
compiling for the classic Macintosh platform.  While it is the best way to
test for this, the semantics are confusing since I do not believe that it is
defined under OS X.

> MACOSX
I thought this was defined by Csound, but I can't find the definition.  Is
it another compiler define for Mac OS X?

> mills_macintosh
Indicates compilation of the Mills Perf version.  Currently this is always
defined whenever "mac_classic" is but should be commented out if building a
different version for classic Mac (such as CsoundLib?).  Ideally this would
be defined "on the command line" but CodeWarrior has no good provision for
doing so.  Eventually, this will become (mostly) unnecessary as code is
migrated to a front-end that uses the API.

> mills_macintoshxx
Not sure what this is doing.

> __MWERKS__
This is defined whenever compiling with the Metrowerks CodeWarrior compiler.
Since CW is also available on Windows, this should not be used as a synonym
for "macintosh."

> __POWERPC__
Only saw this once in the code, along side of "mills_macintosh."  I suppose
that it also applies on Mac OS X though.  Is it defined when compiling on
Linux PPC?

> SYMANTEC
> SYMANTECS                       One of these is a typo
This indicates the OLD Mac version compiled on Symantec's compiler.  Almost
every occurrence of this macro is in parallel with a test for either
"mac_classic" or "mills_macintosh."  In these cases, only "mac_classic"
should be tested for (instead of "mills_macintosh" or "SYMANTEC").

In reality, I don't think anyone will ever be compiling on Symantec again
(the compiler is obsolete).  So references to just "SYMANTEC" could probably
be removed along with their code.

> THINK_C
Symantec's special C extension library.  References to this can be removed
if the same is done for "SYMANTEC".