conditionally defining strcasecmp/strncasecmp
Closed / Fixed2986105fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-04-12 20:33:20
tcl/win/tclWinPort.h and tk/win/tkWinPort.h both unconditionally define strcasecmp/strncasecmp which can cause problems when including the headers in a project that already defines then. The attached patch makes sure they're not already defined to something beforehand. Minor indentation cleanup was also included to make the file self-consistent. Patch is based off 8.5.6 sources.
brlcadplain2010-04-13 03:33:21
File Added - 370350: strncasecmp.diff
nijtmansplain2010-04-13 19:40:37
Other projects should not include internal header files, but unfortunately sometimes it is necessary. It doesn't hurt.
nijtmansplain2010-04-13 20:47:00
Fixed in HEAD
brlcadplain2010-04-13 22:55:02
Fantastic, thanks for taking the time to apply it. I completely agree regarding not including internal header files, though. Your comment made me double-back to see how this issue came up in the first place as there shouldn't be private headers getting included, but obviously are (seems to be specific to our Windows builds). Either way, thanks again.
brlcad Closed ticket [2986105fff].
[History diff]2010-04-13 22:55:03
Log in (anonymous is fine) to add a comment.
Attachments:
- strncasecmp.diff [download] added by brlcad on 2010-04-13 03:33:21. [details]