cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [autobuild] those FreeBSD warnings

From: Joe Halpin <j.p.h_at_comcast.net>
Date: Tue, 02 Mar 2004 13:26:19 -0600

Daniel Stenberg wrote:
> On Mon, 1 Mar 2004, Joe Halpin wrote:
>
>>>All those warnings are the same ones, which gcc finds in a system header.
>>>Can you check if these warnings are caused by the -Wundef option?
>>
>>My first inclination is to fix the source rather than turning off compiler
>>warnings
>
> Well, in this case the problem is in your system headers, not in curl. More
> recent gcc versions have the ability to ignore warning in system headers since
> we only care about warnings in code we control!
>
> Can we be sure that defining _POSIX_C_SOURCE won't cause any problems when
> built on other FreeBSD versions or with other compilers?

Point taken. We'd have to try it, or rely on bug reports.

I just blew away my source tree and reloaded from scratch with cvs. Now
I'm not seeing those warnings, even though _POSIX_C_SOURCE isn't defined
anywhere I can find. I might have messed something up while I was making
modifications. I'll let it go another day and see if it's still a problem.

In the meantime I'll research how to turn off warnings. If you want
configure to not use -Wundef for FreeBSD will that mean changing the
autoconf macros? If so, it will take me a while to come up to speed on
m4/autoconf/etc. Maybe there's a pragma someplace that will let me turn
it off in setup.h with just an #ifdef.

Joe
Received on 2004-03-02