summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fluid/fluid.cxx1
-rw-r--r--src/Fl_File_Icon.cxx11
-rw-r--r--src/Fl_win32.cxx2
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx4
-rw-r--r--src/flstring.h2
5 files changed, 14 insertions, 6 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 747135429..b3c942bc4 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -61,6 +61,7 @@
# define access _access
# define chdir _chdir
# define getcwd _getcwd
+# define unlink _unlink
# endif // !__WATCOMC__
#else
# include <unistd.h>
diff --git a/src/Fl_File_Icon.cxx b/src/Fl_File_Icon.cxx
index 02475bbdd..2d6448943 100644
--- a/src/Fl_File_Icon.cxx
+++ b/src/Fl_File_Icon.cxx
@@ -174,13 +174,21 @@ Fl_File_Icon::find(const char *filename,// I - Name of file */
int filetype) // I - Enumerated file type
{
Fl_File_Icon *current; // Current file in list
- struct stat fileinfo; // Information on file
const char *name; // Base name of filename
// Get file information if needed...
if (filetype == ANY)
{
+#ifdef _MSC_VER // was: WIN32
+ if (filename[strlen(filename) - 1] == '/')
+ filetype = DIRECTORY;
+ else if (fl_filename_isdir(filename))
+ filetype = DIRECTORY;
+ else
+ filetype = PLAIN;
+#else
+ struct stat fileinfo; // Information on file
if (!fl_stat(filename, &fileinfo))
{
if (S_ISDIR(fileinfo.st_mode))
@@ -202,6 +210,7 @@ Fl_File_Icon::find(const char *filename,// I - Name of file */
}
else
filetype = PLAIN;
+#endif // _MSC_VER // was: WIN32
}
// Look at the base name in the filename
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 02cf80637..9a2e8ffb0 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -20,7 +20,7 @@
// in. Search other files for "WIN32" or filenames ending in _win32.cxx
// for other system-specific code.
-#if defined(WIN32) and !defined(FL_DOXYGEN)
+#if defined(WIN32) && !defined(FL_DOXYGEN)
/* We require Windows 2000 features (e.g. VK definitions) */
# if !defined(WINVER) || (WINVER < 0x0500)
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
index 0e4d53f8b..ded681695 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
@@ -19,13 +19,11 @@
#ifdef WIN32
#include "../GDI/Fl_GDI_Graphics_Driver.H"
-
#include <FL/Fl_Printer.H>
-
-
#include <FL/fl_ask.H>
#include <FL/math.h>
#include <FL/fl_draw.H>
+#include <Commdlg.h>
extern HWND fl_window;
diff --git a/src/flstring.h b/src/flstring.h
index 7c5d2dea6..daeacf1cd 100644
--- a/src/flstring.h
+++ b/src/flstring.h
@@ -48,7 +48,7 @@
*/
# ifndef __WATCOMC__
# define strdup _strdup
-# define unlink _unlink
+# /* define unlink _unlink */
# endif /* !__WATCOMC__ */
# elif defined(__EMX__)
# define strcasecmp(s,t) stricmp((s), (t))