summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-10-29 21:59:15 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-10-29 21:59:15 +0000
commita1944b77ab98f7e56cb4c0cddc8bb1681eaacaaa (patch)
tree41055a6f53d6a86131feec9f6679f2ed84d2c429 /src
parent38fdf727f70cf11e595d69f073badcd93aaef14e (diff)
Cygwin fixes...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1666 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_File_Browser.cxx10
-rw-r--r--src/Fl_File_Chooser2.cxx24
-rw-r--r--src/Fl_File_Icon.cxx6
-rw-r--r--src/Fl_Help_View.cxx6
-rw-r--r--src/Fl_win32.cxx9
5 files changed, 30 insertions, 25 deletions
diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx
index 0fc8c54a0..882d10360 100644
--- a/src/Fl_File_Browser.cxx
+++ b/src/Fl_File_Browser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Browser.cxx,v 1.1.2.2 2001/10/29 03:44:32 easysw Exp $"
+// "$Id: Fl_File_Browser.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $"
//
// Fl_File_Browser routines.
//
@@ -45,7 +45,7 @@
#include <string.h>
#include <config.h>
-#if defined(WIN32)
+#if defined(WIN32) && ! defined(__CYGWIN__)
# include <windows.h>
# include <direct.h>
#endif /* WIN32 */
@@ -416,7 +416,7 @@ Fl_File_Browser::load(const char *directory)// I - Directory to load
if ((icon = Fl_File_Icon::find("any", Fl_File_Icon::DEVICE)) == NULL)
icon = Fl_File_Icon::find("any", Fl_File_Icon::DIRECTORY);
-#if defined(WIN32)
+#if defined(WIN32) && ! defined (__CYGWIN__)
DWORD drives; // Drive available bits
@@ -496,7 +496,7 @@ Fl_File_Browser::load(const char *directory)// I - Directory to load
// Build the file list...
//
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
strncpy(filename, directory_, sizeof(filename) - 1);
filename[sizeof(filename) - 1] = '\0';
i = strlen(filename) - 1;
@@ -566,5 +566,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string
//
-// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.2 2001/10/29 03:44:32 easysw Exp $".
+// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $".
//
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index d7585d862..3276db08b 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.2 2001/09/29 22:59:45 easysw Exp $"
+// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $"
//
// More Fl_File_Chooser routines.
//
@@ -53,7 +53,7 @@
#include <string.h>
#include <ctype.h>
-#if defined(WIN32)
+#if defined(WIN32) && ! defined (__CYGWIN__)
# include <direct.h>
# include <io.h>
#else
@@ -84,7 +84,7 @@ Fl_File_Chooser::directory(const char *d) // I - Directory to change to
if (d[0] != '\0')
{
// Make the directory absolute...
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__))|| defined(__EMX__)
if (d[0] != '/' && d[0] != '\\' && d[1] != ':')
#else
if (d[0] != '/' && d[0] != '\\')
@@ -108,7 +108,7 @@ Fl_File_Chooser::directory(const char *d) // I - Directory to change to
// Clear the directory menu and fill it as needed...
dirMenu->clear();
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
dirMenu->add("My Computer");
#else
dirMenu->add("File Systems");
@@ -353,7 +353,7 @@ Fl_File_Chooser::newdir()
return;
// Make it relative to the current directory as needed...
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined (__CYGWIN__)) || defined(__EMX__)
if (dir[0] != '/' && dir[0] != '\\' && dir[1] != ':')
#else
if (dir[0] != '/' && dir[0] != '\\')
@@ -366,7 +366,7 @@ Fl_File_Chooser::newdir()
}
// Create the directory; ignore EEXIST errors...
-#if defined(WIN32)
+#if defined(WIN32) && ! defined (__CYGWIN__)
if (mkdir(pathname))
#else
if (mkdir(pathname, 0777))
@@ -423,7 +423,7 @@ Fl_File_Chooser::fileListCB()
if (Fl::event_clicks())
{
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
if ((strlen(pathname) == 2 && pathname[1] == ':') ||
filename_isdir(pathname))
#else
@@ -480,7 +480,7 @@ Fl_File_Chooser::fileNameCB()
return;
}
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
if (directory_[0] != '\0' &&
filename[0] != '/' &&
filename[0] != '\\' &&
@@ -538,7 +538,7 @@ Fl_File_Chooser::fileNameCB()
{
// Enter pressed - select or change directory...
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
if ((strlen(pathname) == 2 && pathname[1] == ':') ||
filename_isdir(pathname))
#else
@@ -607,7 +607,7 @@ Fl_File_Chooser::fileNameCB()
{
file = fileList->text(i);
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
if (strnicmp(filename, file, min_match) == 0)
#else
if (strncmp(filename, file, min_match) == 0)
@@ -636,7 +636,7 @@ Fl_File_Chooser::fileNameCB()
{
// Succeeding match; compare to find maximum string match...
while (max_match > min_match)
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
if (strnicmp(file, pathname, max_match) == 0)
#else
if (strncmp(file, pathname, max_match) == 0)
@@ -687,5 +687,5 @@ Fl_File_Chooser::fileNameCB()
//
-// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.2 2001/09/29 22:59:45 easysw Exp $".
+// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $".
//
diff --git a/src/Fl_File_Icon.cxx b/src/Fl_File_Icon.cxx
index b8657acac..6c1c6eef5 100644
--- a/src/Fl_File_Icon.cxx
+++ b/src/Fl_File_Icon.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Icon.cxx,v 1.1.2.3 2001/10/29 15:40:49 easysw Exp $"
+// "$Id: Fl_File_Icon.cxx,v 1.1.2.4 2001/10/29 21:59:14 easysw Exp $"
//
// Fl_File_Icon routines.
//
@@ -54,7 +54,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
-#if defined(WIN32) || defined(__EMX__)
+#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
# include <io.h>
# define F_OK 0
# define strcasecmp stricmp
@@ -1234,5 +1234,5 @@ get_kde_val(char *str,
//
-// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.3 2001/10/29 15:40:49 easysw Exp $".
+// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.4 2001/10/29 21:59:14 easysw Exp $".
//
diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx
index 64d625d6a..c4adb5246 100644
--- a/src/Fl_Help_View.cxx
+++ b/src/Fl_Help_View.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Help_View.cxx,v 1.1.2.8 2001/10/27 03:29:25 easysw Exp $"
+// "$Id: Fl_Help_View.cxx,v 1.1.2.9 2001/10/29 21:59:15 easysw Exp $"
//
// Fl_Help_View widget routines.
//
@@ -77,7 +77,7 @@
#include <FL/Fl_Image.H>
#include <FL/Fl_Pixmap.H>
-#if defined(WIN32)
+#if defined(WIN32) && ! defined(__CYGWIN__)
# include <io.h>
# include <direct.h>
# define strcasecmp(s,t) stricmp((s), (t))
@@ -3584,5 +3584,5 @@ scrollbar_callback(Fl_Widget *s, void *)
//
-// End of "$Id: Fl_Help_View.cxx,v 1.1.2.8 2001/10/27 03:29:25 easysw Exp $".
+// End of "$Id: Fl_Help_View.cxx,v 1.1.2.9 2001/10/29 21:59:15 easysw Exp $".
//
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index f9724d7c4..a2f59b7b4 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx,v 1.33.2.37.2.5 2001/10/27 03:45:29 easysw Exp $"
+// "$Id: Fl_win32.cxx,v 1.33.2.37.2.6 2001/10/29 21:59:15 easysw Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -36,7 +36,12 @@
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>
+#if defined(__CYGWIN__)
+#include <sys/time.h>
+#include <unistd.h>
+#else
#include <winsock.h>
+#endif
#include <ctype.h>
//
@@ -1001,5 +1006,5 @@ void Fl_Window::make_current() {
}
//
-// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.5 2001/10/27 03:45:29 easysw Exp $".
+// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.6 2001/10/29 21:59:15 easysw Exp $".
//