Author: manolo
Date: 2012-08-01 01:43:20 -0700 (Wed, 01 Aug 2012)
New Revision: 9649
Log:
Fixed compilation under Mac OS X 10.8 "Mountain Lion".

Modified:
   branches/branch-1.3/FL/mac.H
   branches/branch-1.3/src/filename_list.cxx

Modified: branches/branch-1.3/FL/mac.H
===================================================================
--- branches/branch-1.3/FL/mac.H        2012-07-28 13:38:18 UTC (rev 9648)
+++ branches/branch-1.3/FL/mac.H        2012-08-01 08:43:20 UTC (rev 9649)
@@ -149,7 +149,22 @@
 #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;
 
 extern CGContextRef fl_gc;

Modified: branches/branch-1.3/src/filename_list.cxx
===================================================================
--- branches/branch-1.3/src/filename_list.cxx   2012-07-28 13:38:18 UTC (rev 
9648)
+++ branches/branch-1.3/src/filename_list.cxx   2012-08-01 08:43:20 UTC (rev 
9649)
@@ -22,8 +22,10 @@
 #include <FL/fl_utf8.h>
 #include "flstring.h"
 #include <stdlib.h>
+#ifdef __APPLE__
+#include <FL/x.H>
+#endif
 
-
 extern "C" {
 #ifndef HAVE_SCANDIR
   int fl_scandir (const char *dir, dirent ***namelist,
@@ -95,7 +97,7 @@
 #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__)

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to