HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

c
cpp(1) cpp(1)
#ifdef name The lines following appear in the output if and only if name has been the subject of a pre-
vious
#define without being the subject of an intervening
#undef.
#ifndef name The lines following do not appear in the output if and only if name has been the subject of
a previous
#define without being the subject of an intervening
#undef.
#include "filename"
#include <filename>
Include at this point the contents of filename (which are then run through
cpp). See the
-I option above for more detail.
#line integer-constant "filename"
Causes
cpp to generate line-control information for the next pass of the C compiler.
integer-constant is the line number of the next line and filename is the file where it comes
from. If filename and the quotation marks are omitted, the current file name is
unchanged.
#undef name Cause the definition of name (if any) to be forgotten from now on.
The test directives and the possible
#else directives can be nested.
cpp supports names up to 255 char-
acters in length.
Notes
The macro substitution scheme has been changed. Previous versions of
cpp saved macros in a macro
definition table whose table size is 128000 bytes by default. The current version of
cpp replaces this
macro definition table with several small buffers. The default size of the small buffers is 8 188 bytes.
EXTERNAL INFLUENCES
Environment Variables
LC_CTYPE determines the interpretation of comments and string literals as single- or multibyte charac-
ters.
LANG determines the language in which messages are displayed.
If
LC_CTYPE is not specified in the environment or is set to the empty string, the value of
LANG is used
as a default for each unspecified or empty variable. If
LANG is not specified or is set to the empty string,
it defaults to "C" (see lang(5)). If any internationalization variable contains an invalid setting,
cpp
behaves as if all internationalization variables are set to "C". See environ (5).
International Code Set Support
Single- and multibyte character code sets are supported.
DIAGNOSTICS
Error messages produced by
cpp are intended to be self-explanatory. The line number and filename
where the error occurred are printed along with the diagnostic.
WARNINGS
When newline characters were found in argument lists for macros to be expanded, previous versions of
cpp put out the newlines as they were found and expanded. The current version of cpp replaces these
newlines with blanks to alleviate problems that the previous versions had when this occurred.
DEPENDENCIES
Workstation
The symbols
hp9000s700 and _ _hp9000s700 are not reserved symbols recognized by the -U option.
They are supplied to cpp either automatically by the compiler, or by the use of a compiler option. For
example, on a Series 700 system, the command:
cc -v t.c
produces:
/usr/ccs/lbin/cpp t.c /var/tmp/ctmAAAa29220 -D__hp9000s700
-D__hp9000s800 ...
(Also see the
-D option of the cc command.)
Section 1142 Hewlett-Packard Company 3 HP-UX 11i Version 2: September 2004