DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2297 Version: 1.3-current In words: We must test, whether a code with the new scandir() prototype compiles. If it does without error, we "#define HAVE_SCANDIR_POSIX 1" in config.h, otherwise we undefine HAVE_SCANDIR_POSIX. This is the c++ code used for testing: #include <dirent.h> int func (const char *d, dirent ***list, void *sort) { int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); } The complete autoconf test can be found in configure.in, lines 468-485: --- begin of autoconf test --- 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 --- end of autoconf test --- It would be great if you could provide the CMake modifications to achieve this test. TIA Albrecht Link: http://www.fltk.org/str.php?L2297 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
