From e321cb37bfe0379f54010eb42a36573ca561e71f Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 27 Nov 2005 14:45:48 +0000 Subject: VC++ 2005 Support, drop old files, add icons for Sudoku git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Chooser2.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Fl_File_Chooser2.cxx') diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index a761e52f6..648d8a7ab 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -62,6 +62,10 @@ #if defined(WIN32) && ! defined (__CYGWIN__) # include # include +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define access _access +# define mkdir _mkdir // Apparently Borland C++ defines DIRECTORY in , which // interfers with the Fl_File_Icon enumeration of the same name. # ifdef DIRECTORY @@ -608,7 +612,7 @@ Fl_File_Chooser::fileNameCB() file = fileList->text(i); #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__) - if (strnicmp(filename, file, min_match) == 0) { + if (strncasecmp(filename, file, min_match) == 0) { #else if (strncmp(filename, file, min_match) == 0) { #endif // WIN32 || __EMX__ @@ -631,7 +635,7 @@ Fl_File_Chooser::fileNameCB() // Succeeding match; compare to find maximum string match... while (max_match > min_match) #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__) - if (strnicmp(file, matchname, max_match) == 0) + if (strncasecmp(file, matchname, max_match) == 0) #else if (strncmp(file, matchname, max_match) == 0) #endif // WIN32 || __EMX__ @@ -1187,7 +1191,7 @@ compare_dirnames(const char *a, const char *b) { // Do a comparison of the first N chars (alen == blen at this point)... #ifdef WIN32 - return strnicmp(a, b, alen); + return strncasecmp(a, b, alen); #else return strncmp(a, b, alen); #endif // WIN32 -- cgit v1.2.3