cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NSS and configure and pkg-config

From: Guenter <lists_at_gknw.net>
Date: Mon, 07 Sep 2009 00:26:41 +0200

Hi,
Guenter schrieb:
> not tested, but a friend suggested (...), will soon try if that works...
doesnt work.

> however if void is not acceptable then we should figure out what's the
> counterpart pragma for:
> #pragma GCC diagnostic ignored "-Wstrict-prototypes"
> if we find out about that we could just switch off the warnings before
> we include *bad* headers, and afterwards turn on again ...
http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
this works for me:
#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) ||
(__GNUC__ > 4))
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#endif
#include <nspr.h>
#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) ||
(__GNUC__ > 4))
#pragma GCC diagnostic warning "-Wstrict-prototypes"
#endif

the version hack is an assumption by now - I've no idea which version of
GCC starts to understand these pragmas ...

find attached a very simple sample which shows the prob - everyone who
has older GCC versions should give it a try and lower the version test,
or just comment out to see if older GCC understand these pragmas ...

Gün.

Received on 2009-09-07