diff options
Diffstat (limited to 'src/drivers/Posix')
| -rw-r--r-- | src/drivers/Posix/Fl_Posix_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Posix/Fl_Posix_System_Driver.cxx | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H index 55255b83f..3f4cf72c8 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.H +++ b/src/drivers/Posix/Fl_Posix_System_Driver.H @@ -38,6 +38,7 @@ - directory and file access - system time and system timer - multithreading + - string management */ class Fl_Posix_System_Driver : public Fl_System_Driver @@ -74,6 +75,7 @@ public: virtual const char *home_directory_name() { return ::getenv("HOME"); } virtual int dot_file_hidden() {return 1;} virtual void gettime(time_t *sec, int *usec); + virtual char* strdup(const char *s) {return ::strdup(s);} }; #endif // FL_POSIX_SYSTEM_DRIVER_H diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index d39ea6c82..9f255f3d0 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -20,6 +20,7 @@ #include <FL/Fl_File_Browser.H> #include <FL/Fl_File_Icon.H> #include <FL/filename.H> +#include <FL/fl_string.h> #include <FL/Fl.H> #include <locale.h> #include <stdio.h> @@ -65,7 +66,7 @@ void *Fl_Posix_System_Driver::dlopen(const char *filename) ptr = double_dlopen(filename); # ifdef __APPLE_CC__ // allows testing on Darwin + XQuartz + fink if (!ptr) { - char *f_dylib = strdup(filename); + char *f_dylib = fl_strdup(filename); strcpy(strrchr(f_dylib, '.'), ".dylib"); char path[FL_PATH_MAX]; sprintf(path, "/sw/lib/%s", f_dylib); |
