win32 devs - be mindful of <string.h>

View: New views
1 Messages — Rating Filter:   Alert me  

win32 devs - be mindful of <string.h>

by Bob Jamison-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all.

I just wanted to remind win32 developers that when they use the
C lib string functions in <string.h>, they should take care to
#include <string.h>, even if their code will compile without it.
Apparently mingw's runtime .h files are configured a little
differently, and other includes (stdio? stdlib?) pick up the
string.h definitions.  Without that #include, your code that uses string
functions might compile, but when you commit, it will break the
build for everyone else.  I know, because I have been guilty of
this more than once myself! :)

IMHO, even if one feels confident that their
includes are handled by other includes, in situations like this
it is best to be explicit, safe, and portable.




bob




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel