Tcl Source Code

View Ticket
Login
Ticket UUID: 2986105
Title: conditionally defining strcasecmp/strncasecmp
Type: Patch Version: None
Submitter: brlcad Created on: 2010-04-12 20:33:20
Subsystem: 52. Portability Support Assigned To: nijtmans
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2010-04-13 22:55:03
Resolution: Fixed Closed By: brlcad
    Closed on: 2010-04-13 15:55:03
Description:
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.
User Comments: brlcad added on 2010-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.

nijtmans added on 2010-04-13 20:47:00:
Fixed in HEAD

nijtmans added on 2010-04-13 19:40:37:
Other projects should not include internal header files, but unfortunately sometimes it is necessary. It doesn't hurt.

brlcad added on 2010-04-13 03:33:21:

File Added - 370350: strncasecmp.diff

Attachments: