| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #3006
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 4 - High, e.g. key functionality not working |
Scope: | 2 - Specific to an operating system |
Subsystem: | FLUID |
Summary: | fltk 1.3.x does not build withh latest mingw |
Version: | 1.3-current |
Created By: | rokan2 |
Assigned To: | AlbrechtS |
Fix Version: | 1.3.3 (SVN: v10336) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | rokan2 07:30 Nov 18, 2013 |
| due to the conflict of strcasecmp() in fuid/factory.cxx with build-in function of mingw.
The macro name HAVE_STRCASECMP is wrong (as it is used only in factory.cxx, it is not configure.in thus not set in config.h by configure script)
Replacement of that by macro HAVE_STRINGS_H in factory.cxx solves the problem but probably the definition of strcasecmp() function should not be present in factory.cxx at all as the src/flstrings.h always defines some strcasecmp - even as macro pointing too some other function with different symbol name... | |
|
#2 | AlbrechtS 10:57 Jan 03, 2014 |
| I checked in a temporary fix for this MinGW problem in svn r10044, see also STR #2994. http://www.fltk.org/str.php?L2994
I'm leaving this STR open anyway, since we should look for a better fix. Your comments are looking interesting... | |
|
#3 | ianmacarthur 15:39 Mar 11, 2014 |
| Gents,
What's the thinking on this now?
The "fix" that Albrecht applied seems to be working "well enough" or...? | |
|
#4 | trentg 20:57 Mar 20, 2014 |
| I guess this could break older versions of MinGW but I fixed this today with this patch.
--- fltk-1.3.2\src\flstring.h 2012-06-05 21:38:02 -0600 +++ fltk\src\flstring.h 2014-03-20 21:46:59 -0600 @@ -39,7 +39,7 @@ # undef index # endif /* index */ -# if defined(WIN32) && !defined(__CYGWIN__) +# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__) # define strcasecmp(s,t) _stricmp((s), (t)) # define strncasecmp(s,t,n) _strnicmp((s), (t), (n)) /* Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs | |
|
#5 | greg.ercolano 22:08 Mar 20, 2014 |
| How about the attached patch: use_fl_ascii_strcasecmp.patch that simply replaces all strcasecmp() with fl_ascii_strcasecmp() and rip out the HAVE_STRCASECMP and static strcasecmp() defined in r1336 and problem solved?
Pretty sure /all/ those strcasecmp()s we're doing end up being ascii. And the #include for ../src/flstring.h is already in factory.cxx (added r2239), so we might as well make use of it. | |
|
#6 | greg.ercolano 22:42 Mar 21, 2014 |
| Tempted to check in the patch and close.. | |
|
#7 | AlbrechtS 08:26 May 26, 2014 |
| Please go ahead. That's much better than my temporary fix (which you would remove in the patch including all comments - that's good). | |
|
#8 | ianmacarthur 16:28 Sep 04, 2014 |
| Do we want to do the changes, or are we happy with the current fix that is in place and working "ok" for now? | |
|
#9 | AlbrechtS 12:59 Sep 18, 2014 |
| I'm not happy with the current fix, I'm afraid that we could get more problems in the future. We should fix it properly, because we can't rely on MinGW and autoconf to the The Right Thing.
I'd appreciate if 'use_fl_ascii_strcasecmp.patch' could be applied soon.
Greg, or anybody? | |
|
#10 | AlbrechtS 16:29 Sep 18, 2014 |
| See also STR #3050: same or similar problem using CMake and clang on FreeBSD. | |
|
#11 | AlbrechtS 03:30 Sep 25, 2014 |
| Taking this STR, going to install the given patch... | |
|
#12 | AlbrechtS 03:38 Sep 25, 2014 |
| Fixed in Subversion repository. | |
[ Return to Bugs & Features ]
|
| |