> The macro _XSHM_H_ looks like an "include guard"
No. (I was careless on my previous comment.)
The purpose of "include guard" is to prevent the system (preprocessor) from including same code multiple times into translation unit. Typical header looks like:
1 2 3 4 5 6
|
#ifndef MY_H
#define MY_H
// actual code
#endif
| |
The first pragma is
ifndef
--
if macro is not defined
The actual code is included, and
#define MY_H
evaluated only on first time.
The
#ifdef _XSHM_H_
is not like that; something elsewhere defines (or does not) the _XSHM_H_, so someone else decides whether to have declarations, or not.
Does the pair
1 2
|
#ifdef _XSHM_H_
#endif
| |
contain all the declaration within the header, or just some subset? If subset, which declarations?
Like before, I would check where the macro is mentioned (other than this header):
grep -r _XSHM_H_ /xorg