From a756c959d69b3a5973b5c054df953f15b92f1df6 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Sun, 12 Feb 2012 20:51:56 +0100 Subject: [PATCH 1/2] Ugly hack to detect the presence of fl_filename_free_list without relying on cmake magic --- utils/fgadmin/src/fgadmin_funcs.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/fgadmin/src/fgadmin_funcs.cxx b/utils/fgadmin/src/fgadmin_funcs.cxx index 496806e24..0b67adc2c 100644 --- a/utils/fgadmin/src/fgadmin_funcs.cxx +++ b/utils/fgadmin/src/fgadmin_funcs.cxx @@ -48,7 +48,9 @@ extern string def_scenery_dest; static const float min_progress = 0.0; static const float max_progress = 5000.0; -#if (FL_MAJOR_VERSION > 1)||((FL_MAJOR_VERSION == 1)&&(FL_MINOR_VERSION >= 3)) +// FIXME: Ugly hack to detect the situation below +#ifdef FL_Volume_Down +//#if (FL_MAJOR_VERSION > 1)||((FL_MAJOR_VERSION == 1)&&(FL_MINOR_VERSION >= 3)) // Fltk 1.3 or newer, need to use "fl_filename_free_list" #define FL_FREE_DIR_ENTRY(e) // do nothing, since "fl_filename_free_list" frees entire list #define FL_FREE_DIR_LIST(list,count) fl_filename_free_list(&list, count) From 338d5cc9b2b447ceeddd8bc55ffd48cdf1a231a5 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Sun, 12 Feb 2012 21:20:53 +0100 Subject: [PATCH 2/2] Fix FL_STAT macro --- utils/fgadmin/src/fgadmin_funcs.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/fgadmin/src/fgadmin_funcs.cxx b/utils/fgadmin/src/fgadmin_funcs.cxx index 0b67adc2c..7b251ea0d 100644 --- a/utils/fgadmin/src/fgadmin_funcs.cxx +++ b/utils/fgadmin/src/fgadmin_funcs.cxx @@ -59,7 +59,7 @@ static const float max_progress = 5000.0; // Fltk < 1.3, "fl_filename_free_list", "fl_stat" not available #define FL_FREE_DIR_ENTRY(e) free(e) #define FL_FREE_DIR_LIST(list,count) free(list) - #define FL_STAT() stat( file.str().c_str(), info ); + #define FL_STAT(file,info) stat( file.str().c_str(), info ); #endif /** Strip a single trailing '/' or '\\' */