summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2012-08-14 09:23:22 +0000
committerManolo Gouy <Manolo>2012-08-14 09:23:22 +0000
commitfdb8fdfb2a57549316bad94df96b628e8fbe0c84 (patch)
treeadef82b5f33f9e70211d782b13e743ed0df440e4
parent4c11d57da72469327ded0dc2c5a467ba492e04a4 (diff)
Mac OS X: don't use the HAVE_SCANDIR_POSIX preprocessor variable because it has an
OS version-dependent value. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/mac.H9
-rw-r--r--src/filename_list.cxx4
2 files changed, 2 insertions, 11 deletions
diff --git a/FL/mac.H b/FL/mac.H
index cd81302b5..5a2b78fc8 100644
--- a/FL/mac.H
+++ b/FL/mac.H
@@ -156,15 +156,6 @@ extern Window fl_window;
#define MAC_OS_X_VERSION_10_8 1080
#endif
-#if defined(FL_LIBRARY) || defined(FL_INTERNALS)
-#ifdef HAVE_SCANDIR_POSIX
-#undef HAVE_SCANDIR_POSIX
-#endif
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
-#define HAVE_SCANDIR_POSIX 1
-#endif
-#endif // FL_LIBRARY || FL_INTERNALS
-
typedef CGImageRef Fl_Bitmask;
extern CGContextRef fl_gc;
diff --git a/src/filename_list.cxx b/src/filename_list.cxx
index 690903d1b..4b811795f 100644
--- a/src/filename_list.cxx
+++ b/src/filename_list.cxx
@@ -97,7 +97,7 @@ int fl_filename_list(const char *d, dirent ***list,
#ifndef HAVE_SCANDIR
// This version is when we define our own scandir
int n = fl_scandir(dirloc, list, 0, sort);
-#elif defined(HAVE_SCANDIR_POSIX)
+#elif defined(HAVE_SCANDIR_POSIX) && !defined(__APPLE__)
// POSIX (2008) defines the comparison function like this:
int n = scandir(dirloc, list, 0, (int(*)(const dirent **, const dirent **))sort);
#elif defined(__osf__)
@@ -109,7 +109,7 @@ int fl_filename_list(const char *d, dirent ***list,
#elif defined(__sgi)
int n = scandir(dirloc, list, 0, sort);
#elif defined(__APPLE__)
-# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
int n = scandir(dirloc, list, 0, (int(*)(const struct dirent**,const struct dirent**))sort);
# else
int n = scandir(dirloc, list, 0, (int(*)(const void*,const void*))sort);