diff options
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/dirent.h | 1 | ||||
| -rw-r--r-- | FL/filename.H | 8 | ||||
| -rw-r--r-- | FL/math.h | 13 |
3 files changed, 17 insertions, 5 deletions
diff --git a/FL/dirent.h b/FL/dirent.h index 6eda14751..fbc54a628 100644 --- a/FL/dirent.h +++ b/FL/dirent.h @@ -25,6 +25,7 @@ // http://www.fltk.org/str.php // + // this file is for back-compatability only #include "filename.H" diff --git a/FL/filename.H b/FL/filename.H index 06041155a..29d0bcf91 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -25,6 +25,12 @@ * http://www.fltk.org/str.php */ +// Xcode on OS X includes files by recursing down into directories. +// This code catches the cycle and directly includes the required file. +#ifdef fl_dirent_h_cyclic_include +# include "/usr/include/dirent.h" +#endif + #ifndef FL_FILENAME_H # define FL_FILENAME_H @@ -94,7 +100,9 @@ struct dirent {char d_name[1];}; * It would be best to create a <dirent.h> file that does this... */ # include <sys/types.h> +# define fl_dirent_h_cyclic_include # include <dirent.h> +# undef fl_dirent_h_cyclic_include # endif # if defined (__cplusplus) @@ -25,15 +25,18 @@ // http://www.fltk.org/str.php // +// Xcode on OS X includes files by recursing down into directories. +// This code catches the cycle and directly includes the required file. +#ifdef fl_math_h_cyclic_include +# include "/usr/include/math.h" +#endif + #ifndef fl_math_h # define fl_math_h -// Apple's ProjectBuilder has the nasty habit of including recursively -// down the file tree. To avoid re-including <FL/math.h> we must -// directly include the systems math file. (Plus, I could not find a -// predefined macro for ProjectBuilder builds, so we have to define it -// in the project) +# define fl_math_h_cyclic_include # include <math.h> +# undef fl_math_h_cyclic_include # ifdef __EMX__ # include <float.h> |
