diff options
| author | Manolo Gouy <Manolo> | 2012-08-01 08:43:20 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2012-08-01 08:43:20 +0000 |
| commit | bf6024175d1deff3406fe56b22600b4a593efd74 (patch) | |
| tree | 315b494146402f8d464b82b206af920b5480c850 | |
| parent | 71a2e6dd329c3fb56a0b9889fb44d958e11b2e20 (diff) | |
Fixed compilation under Mac OS X 10.8 "Mountain Lion".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9649 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/mac.H | 15 | ||||
| -rw-r--r-- | src/filename_list.cxx | 6 |
2 files changed, 19 insertions, 2 deletions
@@ -149,6 +149,21 @@ extern Window fl_window; #ifndef MAC_OS_X_VERSION_10_6 #define MAC_OS_X_VERSION_10_6 1060 #endif +#ifndef MAC_OS_X_VERSION_10_7 +#define MAC_OS_X_VERSION_10_7 1070 +#endif +#ifndef MAC_OS_X_VERSION_10_8 +#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; diff --git a/src/filename_list.cxx b/src/filename_list.cxx index 259355e1b..c86edc4e6 100644 --- a/src/filename_list.cxx +++ b/src/filename_list.cxx @@ -22,7 +22,9 @@ #include <FL/fl_utf8.h> #include "flstring.h" #include <stdlib.h> - +#ifdef __APPLE__ +#include <FL/x.H> +#endif extern "C" { #ifndef HAVE_SCANDIR @@ -95,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) && !defined(__APPLE__) +#elif defined(HAVE_SCANDIR_POSIX) // POSIX (2008) defines the comparison function like this: int n = scandir(dirloc, list, 0, (int(*)(const dirent **, const dirent **))sort); #elif defined(__osf__) |
