DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2222 Version: 1.3-current Concerning the scandir() problem described in STR #2205 and in the above mentioned thread in fltk.general: I'm working on an autoconf test to check for the correct (new, POSIX compliant) header, and I'm thinking of calling the additional compiler macro HAVE_SCANDIR_POSIX. I hope that this will be more generic in case that other platforms will follow the standard later (IMHO better than testing for GLIBC). This would add a new case to src/filename_list.cxx (here from FLTK 1.3): --- src/filename_list.cxx (revision 6829) +++ src/filename_list.cxx (working copy) @@ -77,6 +77,9 @@ Fl_File_Sort_F *sort) { #ifndef HAVE_SCANDIR int n = scandir(d, list, 0, sort); +#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(__hpux) || defined(__CYGWIN__) // HP-UX, Cygwin define the comparison function like this: int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); Consequently we could then remove the case "HP-UX, Cygwin", because they are POSIX'ly correct anyway. Comments welcome. Would the macro name be okay? Better proposals? Link: http://www.fltk.org/str.php?L2222 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
