kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Include guard macro query
@ 2012-04-19  6:54 Pritam Bankar
  2012-04-19  7:10 ` Philipp Ittershagen
  0 siblings, 1 reply; 2+ messages in thread
From: Pritam Bankar @ 2012-04-19  6:54 UTC (permalink / raw)
  To: kernelnewbies

Hi,

In Linux code we add a guard macro to avoid multiple declarations of
identifiers.
But I see some macros defined with trailing underscores.
e.g. In arch/x86/include/asm/

Normally it is defined like,

 #ifndef _ASM_X86_ALTERNATIVE_H
 #define _ASM_X86_ALTERNATIVE_H

But in some files I see trailing underscore after H ,

e.g. arch/x86/include/asm/intel_scu_ipc.h


#ifndef _ASM_X86_INTEL_SCU_IPC_H_
#define  _ASM_X86_INTEL_SCU_IPC_H_

There are others files also
arch/x86/include/asm/irqflags.h
http://lxr.linux.no/#linux+v3.3.2/arch/x86/include/asm/probe_roms.h


DOES THIS TRAILING UNDERSCORE HAS SPECIAL MEANING ???

Thanks
-- 

Pritam Bankar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120419/868b57cc/attachment.html 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Include guard macro query
  2012-04-19  6:54 Include guard macro query Pritam Bankar
@ 2012-04-19  7:10 ` Philipp Ittershagen
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Ittershagen @ 2012-04-19  7:10 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Apr 19, 2012 at 12:24:42PM +0530, Pritam Bankar wrote:
> Hi,
> 
> In Linux code we add a guard macro to avoid multiple declarations of
> identifiers.
> But I see some macros defined with trailing underscores.
> e.g. In arch/x86/include/asm/
> 
> Normally it is defined like,
> 
>  #ifndef _ASM_X86_ALTERNATIVE_H
>  #define _ASM_X86_ALTERNATIVE_H
> 
> But in some files I see trailing underscore after H ,
> 
> e.g. arch/x86/include/asm/intel_scu_ipc.h
> 
> 
> #ifndef _ASM_X86_INTEL_SCU_IPC_H_
> #define  _ASM_X86_INTEL_SCU_IPC_H_
> 
> There are others files also
> arch/x86/include/asm/irqflags.h
> http://lxr.linux.no/#linux+v3.3.2/arch/x86/include/asm/probe_roms.h
> 
> 
> DOES THIS TRAILING UNDERSCORE HAS SPECIAL MEANING ???

My guess: No.

Greetings,

  Philipp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-19  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-19  6:54 Include guard macro query Pritam Bankar
2012-04-19  7:10 ` Philipp Ittershagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).