syspath_once. NXP CodeWarrior Development Studio
Reklam
Reklam
syspath_once
Syntax
#pragma srcrelincludes on | off | reset
Remarks
When on
, the compiler looks for
#include
files relative to the previously included file (not just the source file). When off
, the compiler uses the CodeWarrior IDE's access paths or the access paths specified with the
-ir
option.
Use this pragma when multiple files use the same file name and are intended to be included by another header file in that directory. This is a common practice in UNIX programming.
This pragma corresponds to the Source-relative includes option in the Access Paths panel.By default, this pragma is off
.
32.20 syspath_once
Controls how included files are treated when
#pragmaonce
is enabled.
Syntax
#pragma syspath_once on | off | reset
Remarks
When this pragma and pragma once
are set to on
, the compiler distinguishes between identically-named header files referred to in
#include <file-name> and
#include "file-name"
When this pragma is off
and pragma once is on
, the compiler will ignore a file that uses a directive if it has previously encountered another directive of the form for an identicallynamed header file.
#include <file-name>
#include "file-name"
CodeWarrior Development Studio for Advanced Packet Processing Build Tools Reference Manual, Rev.
10.2, 01/2016
512 Freescale Semiconductor, Inc.
Chapter 32 Pragmas for Preprocessing
This pragma does not correspond to any panel setting. By default, this setting is on
.
Listing 32-3. Pragma syspath_once example
#pragma syspath_once off
#pragma once on /* Include all subsequent files only once. */
#include "sock.h"
#include <sock.h> /* Skipped because syspath_once is off. */
CodeWarrior Development Studio for Advanced Packet Processing Build Tools Reference Manual, Rev.
10.2, 01/2016
Freescale Semiconductor, Inc.
513
syspath_once
CodeWarrior Development Studio for Advanced Packet Processing Build Tools Reference Manual, Rev.
10.2, 01/2016
514 Freescale Semiconductor, Inc.
İndir
Reklam