ifdef foo

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

 



On Wed, 2017-03-15 at 20:00 +0100, Timothy Hobbs wrote:
> I noticed when looking through the source to pulseaudio 5.0 as aquired 
> from debain that in file:
> 
> src/module-simple-protocol-unix-symdef.h
> 
> There are the following ifdef foo lines:
> 
>      0 #ifndef foomodulesimpleprotocolunixsymdeffoo
>      1 #define foomodulesimpleprotocolunixsymdeffoo
> 
> Is this intentional or are these a leftover from some kind of test?

It's intentional. In case you're new to include guards, here's an
article about them: https://en.wikipedia.org/wiki/Include_guard

All headers in PulseAudio have an include guard with format
"foosomethingfoo". I find that convention a bit weird, but that's how
it has always been, and there's not much benefit in changing the
convention.

By the way, the symdef headers are autogenerated by
src/modules/module-defs.h.m4.

-- 
Tanu

https://www.patreon.com/tanuk


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux