FLTK logo

STR #2864

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #2864

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:MacOS
Summary:FLTK 1.3.0 does not compile under Mac OSX Mountain Lion
Version:1.3.0
Created By:bkolb
Assigned To:manolo
Fix Version:1.3-current (SVN: v9649)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 manolo
05:17 Aug 01, 2012
filename_list.cxx
6k
 
 
#2 manolo
05:17 Aug 01, 2012
mac.H
8k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 bkolb
05:16 Jul 26, 2012
the file filename_list.cxx does not compile under Mountain Lion

In line 104 the !(__APPLE__) needs to be removed
 
 
#2 mike
08:46 Jul 26, 2012
P3  
 
#3 manolo
01:53 Aug 01, 2012
Should be fixed with r.9649.
Need confirmation from someone with 10.8 "mountain lion".
 
 
#4 bkolb
02:12 Aug 01, 2012
If you provide me with a download I can test that. Unfortunately I cannot clone the repository as this always times out on my machine  
 
#5 manolo
05:19 Aug 01, 2012
If you replace your files src/filename_list.cxx and FL/mac.H by
those attached here, you can test the fix.
 
 
#6 phillicl
15:08 Aug 02, 2012
Worked for me.  Thanks for being speedy.  
 
#7 bkolb
04:15 Aug 03, 2012
Same here. Thx!  
 
#8 matt
04:32 Aug 03, 2012
In 3.0.0, I did this for listing files:


#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__)
  // POSIX (2008) defines the comparison function like this:
  int n = scandir(dirloc, list, 0, (int(*)(const dirent **, const dirent **))sort);
#elif defined(__osf__)
  // OSF, DU 4.0x
  int n = scandir(dirloc, list, 0, (int(*)(dirent **, dirent **))sort);
#elif defined(_AIX)
  // AIX is almost standard...
  int n = scandir(dirloc, list, 0, (int(*)(void*, void*))sort);
#elif defined(__sgi)
  int n = scandir(dirloc, list, 0, sort);
#elif defined(__APPLE__)
# 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);
# endif
#else
  // The vast majority of UNIX systems want the sort function to have this
  // prototype, most likely so that it can be passed to qsort without any
  // changes:
  int n = scandir(dirloc, list, 0, (int(*)(const void*,const void*))sort);
#endif

#ifndef __APPLE__
  free(dirloc);
#endif
 
 
#9 matt
05:26 Aug 03, 2012
Ah, no, my soution does not work for Lion and earlier anymore. Manolo to the rescue?  
 
#10 manolo
23:52 Aug 05, 2012
@Matt: this solution doesn't work because MAC_OS_X_VERSION_10_8
isn't defined until ... 10.8
I'll take care of that.
 
 
#11 manolo
02:29 Aug 08, 2012
Fixed in Subversion repository.  
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.