From 00272583b6091341a64d46a6eb8cbeae185a201d Mon Sep 17 00:00:00 2001 From: Ian MacArthur Date: Mon, 20 Dec 2010 13:35:43 +0000 Subject: Had to move the variant definition of fl_filename_relative() with 4 params inside the ifdef __cplusplus block because on WIN32 (at least with MSYS/mingw) this header is read by a plain-C version of scandir.c, that errors out when it encounters the multiple incompatible definitions. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/filename.H | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FL/filename.H b/FL/filename.H index 4d1ed9ecc..cddc4d29c 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -28,7 +28,7 @@ /* 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 +#ifdef fl_dirent_h_cyclic_include # include "/usr/include/dirent.h" #endif @@ -37,12 +37,12 @@ # include "Fl_Export.H" -/** \addtogroup filenames File names and URI utility functions +/** \addtogroup filenames File names and URI utility functions File names and URI functions defined in @{ */ # define FL_PATH_MAX 2048 /**< all path buffers should use this length */ -/** Gets the file name from a path. +/** Gets the file name from a path. Similar to basename(3), exceptions shown below. \code #include @@ -63,7 +63,6 @@ FL_EXPORT char *fl_filename_setext(char *to, int tolen, const char *ext); FL_EXPORT int fl_filename_expand(char *to, int tolen, const char *from); FL_EXPORT int fl_filename_absolute(char *to, int tolen, const char *from); FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from); -FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from, const char *cwd); FL_EXPORT int fl_filename_match(const char *name, const char *pattern); FL_EXPORT int fl_filename_isdir(const char *name); @@ -75,6 +74,7 @@ FL_EXPORT int fl_filename_isdir(const char *name); inline char *fl_filename_setext(char *to, const char *ext) { return fl_filename_setext(to, FL_PATH_MAX, ext); } inline int fl_filename_expand(char *to, const char *from) { return fl_filename_expand(to, FL_PATH_MAX, from); } inline int fl_filename_absolute(char *to, const char *from) { return fl_filename_absolute(to, FL_PATH_MAX, from); } +FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from, const char *cwd); inline int fl_filename_relative(char *to, const char *from) { return fl_filename_relative(to, FL_PATH_MAX, from); } # endif /* __cplusplus */ @@ -103,9 +103,9 @@ struct dirent {char d_name[1];}; * It would be best to create a file that does this... */ # include -# define fl_dirent_h_cyclic_include +# define fl_dirent_h_cyclic_include # include -# undef fl_dirent_h_cyclic_include +# undef fl_dirent_h_cyclic_include # endif # if defined (__cplusplus) -- cgit v1.2.3