Next: Generic Macro Keywords
Up: The Macro Preprocessor
Previous: The Macro Preprocessor
Contents
Index
Predefined Macros
The macro preprocessor defines several macro names that are common to
all instances of the preprocessor and apply in all cases where the
preprocessor is in use. These names are the same in all cases, they
do not differ with different file types. The predefined macro names
can not be undefined or set to a different value, attempts to do so
will trigger an error. These are the following:
- RELEASE
First implemented: release 3.0.5
The macro name RELEASE is predefined to the release number code.
The release number code is a five digit integer xyzz0,
corresponding to release x.y.z. The x (always 3) and y are one digit fields, zz is a two-digit field, 0 padded. The
trailing 0 is a historical anachronism. For example, for release
3.2.5, the macro is predefined to ``32050''.
- OSTYPE
First implemented: release 3.2.19
This macro name is set to one of the following words, depending on the
operating system target of the running program. Note that this is
determined at compile time, so is static in the program binary, and
may not be the ``real'' operating system if running under an emulator.
For example, a linux binary running under FreeBSD would still indicate
``Linux''.
Distribution Target |
Keyword |
Any Linux |
``Linux'' |
Windows |
``Windows'' |
FreeBSD |
``UNIX'' |
Any Apple |
``OSX'' |
- OSBITS
First implemented: release 3.2.19
This macro is set to either ``32'' or ``64'', depending on
whether the program was compiled for 32- or 64-bit memory addresses.
This is determined at compile time, so that a 32-bit binary running on
a 64-bit operating system would indicate ``32''.
- XTROOT
First implemented: release 3.2.19
This macro is defined to be the system xictools installation location
path as assumed by the running program. It reflects the status of
environment variables or other means of defining this path, and will
revert to a default. This directory is typically ``/usr/local/share/xictools'' in non-Windows programs. The Windows
path is similar but may include a drive specifier and use back instead
of forward slash separators.
- product name
First implemented: release 3.0.5
Exactly one of the macro names ``Xic'', ``XicII'', or
``Xiv'' will be defined. The keyword is not defined to any
text, but one may test whether or not a given keyword name is defined.
- technology name
First implemented: release 3.2.18
If the technology file uses the Technology keyword to define a
name for the technology, that name will be predefined as a macro
name. The name is not defined to any text, but one may test whether
or not a given name is defined.
These macros are always available, and additional predefined macros
may be available in the various contexts, which are documented
elsewhere.
Next: Generic Macro Keywords
Up: The Macro Preprocessor
Previous: The Macro Preprocessor
Contents
Index
Stephen R. Whiteley
2012-04-01