<div dir="ltr"><div dir="ltr"><div><span class="gmail-im">Iznogoud writes:<br>> I looked in both the Linux and the OpenBSD syslog.h file. The OpenBSD <br></span></div><div><span class="gmail-im">> does not
list inclusion of the stdarg, so, as the manual page says, you <br></span></div><div><span class="gmail-im">> will need to include both, and I do not know why you would not, regardless <br></span></div><div><span class="gmail-im">> of what call yuo
need to make.<br>
><br>> The linux one looks like this near the top:<br>
><br>
> #include <features.h><br>
> #define __need___va_list<br>
> #include <stdarg.h><br>
><br>
> Given that it defines the "need" thing for what I assume is "variable<br>
> argument" functions, two things I can infer: (a) you, obviously, cannot<br>
> do without including the stdarg unless you copy the syslog.h to a new<br>
> location (maybe for testing), and (b) Linux wants to take care of some<br>
> things for you in case you need va functions, <br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">Thanks for your reply. I hadn't looked at that, but had</span></div><div><span class="gmail-im">wondered if that's what was happening on Linux.<br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">> probably for your own good.</span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">I consider this to be a strong point for FreeBSD. I don't</span></div><div><span class="gmail-im">want to include stdarg.h if I don't have to. (It will happen <br></span></div><div><span class="gmail-im">regardless on Linux, but at least on FreeBSD it won't.)<br></span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">I got another reply on another list as follows:<br></span></div><div><span class="gmail-im">>> On Linux there's</span></div><div><span class="gmail-im"></span></div><span class="gmail-im">>> no mention of stdarg.h. I was wondering if stdarg.h<br>
>> is only needed on FreeBSD if you call vsyslog() and<br>
><br></span>> That's correct, nothing about syslog needs you to include stdarg,<br><div>> but you'll need the macros in there if you want to call vsyslog.</div><div><br></div><div>The bottom line is I was able to safely remove the include</div><div>of stdarg from my code. It's a minor thing, but at least it</div><div>will help a little with build times, especially on FreeBSD.</div><div><br></div><div>Speaking of build times, I've noticed my executables are about <br></div><div>2% smaller on FreeBSD 11.2 than on Linux 4.19 (Manjaro). <br></div><div>Another thing to like about FreeBSD, but I will say that Manjaro is <br></div><div>an OK Linux distro. I used to have to change Linux distros about <br></div><div>every six months because something failed on the one I was <br></div><div>using. Manjaro hasn't been like that.</div><div><br></div><div><br></div><div>Brian</div><div>Ebenezer Enterprises - In G-d we trust.</div><div><a href="https://github.com/Ebenezer-group/onwards">https://github.com/Ebenezer-group/onwards</a></div><div><br></div></div></div>