#define sentinels with __FILE__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I've always assumed (before #pragma once), that sentinels were written like:

https://en.wikipedia.org/wiki/Include_guard#Use_of_.23include_guards

However grepping the linux source code I see:

$ cat sound/soc/samsung/pcm.h
#ifndef __S3C_PCM_H
#define __S3C_PCM_H __FILE__
<...>
#endif /* __S3C_PCM_H */

Why would any use:

#define __S3C_PCM_H __FILE__

instead of the simpler:

#define __S3C_PCM_H

This is not a copy/paste error, as I can find other references:

$ grep -r "#define" * | grep "_H " | grep __FILE|wc
     63     189    4996

Thanks,
-- 
Mathieu



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux