ifdef foo

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

 



I thought that was what it was. I was just confused by the use of "foo", 
which is usually used when prototyping something... Is it convention 
just for PA or is it a wider C convention?


On 03/15/2017 10:34 PM, Tanu Kaskinen wrote:
> 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.
>



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

  Powered by Linux