diff options
| author | Ian MacArthur <imacarthur@gmail.com> | 2010-12-20 13:35:43 +0000 |
|---|---|---|
| committer | Ian MacArthur <imacarthur@gmail.com> | 2010-12-20 13:35:43 +0000 |
| commit | 00272583b6091341a64d46a6eb8cbeae185a201d (patch) | |
| tree | 9a3fa82704a7bf6af8fd021071fd668f3a9ce95d /FL/filename.H | |
| parent | 150fc6e7f79934e6732d0a55966c39e63ad2a9e4 (diff) | |
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
Diffstat (limited to 'FL/filename.H')
| -rw-r--r-- | FL/filename.H | 12 |
1 files 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 <FL/filename.H> @{ */ # 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 <FL/filename.H> @@ -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 <dirent.h> file that does this... */ # include <sys/types.h> -# define fl_dirent_h_cyclic_include +# define fl_dirent_h_cyclic_include # include <dirent.h> -# undef fl_dirent_h_cyclic_include +# undef fl_dirent_h_cyclic_include # endif # if defined (__cplusplus) |
