DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR Pending]
Link: http://www.fltk.org/str.php?L2227
Version: 1.1.9
Fix Version: 1.1.10 (r6832)
Fixed in Subversion repository.
This is fixed in svn for all current versions.
However, I'll leave this STR open intentionally so that users who
encounter the mentioned problems are able to find an open STR, at least
until FLTK 1.1.10 is out.
For more info please see [1] STR #2222 (FLTK 1.1 and FLTK 1.3) and [2] STR
#2205 (FLTK 2.0).
For those who want to use the current FLTK 1.1.9 sources, please apply the
attached patch for fltk 1.1.9 [3]
--------------------------------------------------------
[1] http://www.fltk.org/str.php?L2222
[2] http://www.fltk.org/str.php?L2205
[3] http://www.fltk.org/strfiles/2227/glibc_2-10.patch
Link: http://www.fltk.org/str.php?L2227
Version: 1.1.9
Fix Version: 1.1.10 (r6832)
Index: configh.in
===================================================================
--- configh.in (revision 6835)
+++ configh.in (working copy)
@@ -170,7 +170,8 @@
#undef U64
/*
- * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H, HAVE_SCANDIR:
+ * HAVE_DIRENT_H, HAVE_SYS_NDIR_H, HAVE_SYS_DIR_H, HAVE_NDIR_H,
+ * HAVE_SCANDIR, HAVE_SCANDIR_POSIX:
*
* Where is <dirent.h> (used only by fl_file_chooser and scandir).
*/
@@ -180,6 +181,7 @@
#undef HAVE_SYS_DIR_H
#undef HAVE_NDIR_H
#undef HAVE_SCANDIR
+#undef HAVE_SCANDIR_POSIX
/*
* Possibly missing sprintf-style functions:
Index: src/filename_list.cxx
===================================================================
--- src/filename_list.cxx (revision 6835)
+++ src/filename_list.cxx (working copy)
@@ -54,8 +54,8 @@
Fl_File_Sort_F *sort) {
#ifndef HAVE_SCANDIR
int n = scandir(d, list, 0, sort);
-#elif defined(__hpux) || defined(__CYGWIN__)
- // HP-UX, Cygwin define the comparison function like this:
+#elif defined(HAVE_SCANDIR_POSIX)
+ // POSIX (2008) defines the comparison function like this:
int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
#elif defined(__osf__)
// OSF, DU 4.0x
Index: src/fl_set_fonts_xft.cxx
===================================================================
--- src/fl_set_fonts_xft.cxx (revision 6835)
+++ src/fl_set_fonts_xft.cxx (working copy)
@@ -253,13 +253,13 @@
// So the bit we want is up to the first comma - BUT some strings have
// more than one name, separated by, guess what?, a comma...
stop = start = first = 0;
- stop = strchr((const char *)font, ',');
- start = strchr((const char *)font, ':');
+ stop = strchr((char *)font, ',');
+ start = strchr((char *)font, ':');
if ((stop) && (start) && (stop < start))
{
first = stop + 1; // discard first version of name
// find first comma *after* the end of the name
- stop = strchr((const char *)start, ',');
+ stop = strchr((char *)start, ',');
}
else
{
Index: configure.in
===================================================================
--- configure.in (revision 6835)
+++ configure.in (working copy)
@@ -365,6 +365,26 @@
else
AC_DEFINE(HAVE_SCANDIR)
fi)
+
+dnl Do we have the POSIX compatible scandir() prototype?
+AC_CACHE_CHECK([whether we have the POSIX compatible scandir() prototype],
+ ac_cv_cxx_scandir_posix,[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <dirent.h>
+ int func (const char *d, dirent ***list, void *sort) {
+ int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent
**))sort);
+ }
+ ],[
+ ], ac_cv_cxx_scandir_posix=yes, ac_cv_cxx_scandir_posix=no)
+ AC_LANG_RESTORE
+ ])
+
+if test "$ac_cv_cxx_scandir_posix" = yes; then
+ AC_DEFINE(HAVE_SCANDIR_POSIX)
+fi
+
AC_CHECK_FUNC(vsnprintf,[
case "$uname" in
HP-UX*)
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs