[concordance-devel] -ansi and strdup prototype

2008-03-29 Thread Stephen Warren
Under Fedora 8 at least (and I'm sure others), compiling concordance.c
gives this warning:

concordance.c: In function ‘parse_options’:
concordance.c:589: warning: implicit declaration of function 'strdup'

Theoretically, strdup is prototyped by the include of string.h.
However, since concordance is built with -ansi, this prevents string.h
prototyping strdup, since it isn't actually an ANSI standard function.

It looks like one can define things like _SVID_SOURCE to request SVID
extensions, (or other macros for other extensions that also define
strdup), to request a prototype of the function. Or, perhaps switch
-ansi to something else.

The warning isn't a big deal, but I think gcc 4.3 will error in this
situation instead of warning, which will fail concordance builds for
Fedora 9...

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] -ansi and strdup prototype

2008-03-29 Thread Phil Dibowitz
Stephen Warren wrote:
 Under Fedora 8 at least (and I'm sure others), compiling concordance.c
 gives this warning:
 
 concordance.c: In function ‘parse_options’:
 concordance.c:589: warning: implicit declaration of function 'strdup'

I've seen this - didn't really bother to deal with it since it's superfluous.

 The warning isn't a big deal, but I think gcc 4.3 will error in this
 situation instead of warning, which will fail concordance builds for
 Fedora 9...

No, not unless you do -pedantic-error or something similar, as far as I know.

If you can find an easy way to squash the error, by all means - I just
haven't had time to do it yet.

-- 
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible -- Taylor's Laws of Programming




signature.asc
Description: OpenPGP digital signature
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel