Cygwin fixes...

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1666 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2001-10-29 21:59:15 +00:00
parent 38fdf727f7
commit a1944b77ab
7 changed files with 35 additions and 29 deletions

View File

@ -23,6 +23,7 @@ CHANGES IN FLTK 1.1.0b5
- The symbols demo didn't show the strings needed to
show the corresponding symbol (the label string was
not quoted...)
- FLTK should now compile with Cygwin cleanly.
CHANGES IN FLTK 1.1.0b4

View File

@ -1,5 +1,5 @@
//
// "$Id: fluid.cxx,v 1.15.2.13.2.8 2001/09/30 17:37:06 easysw Exp $"
// "$Id: fluid.cxx,v 1.15.2.13.2.9 2001/10/29 21:59:14 easysw Exp $"
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
@ -268,7 +268,7 @@ extern int pasteoffset;
static int ipasteoffset;
static char* cutfname() {
#ifdef WIN32
#if defined WIN32 && ! defined(__CYGWIN__)
# ifndef MAX_PATH
# define MAX_PATH 256
# endif // !MAX_PATH
@ -463,7 +463,7 @@ static int arg(int argc, char** argv, int& i) {
return 0;
}
#ifndef WIN32
#if ! (defined(WIN32) && !defined (__CYGWIN__))
#include <signal.h>
#ifdef _sigargs
@ -521,5 +521,5 @@ int main(int argc,char **argv) {
}
//
// End of "$Id: fluid.cxx,v 1.15.2.13.2.8 2001/09/30 17:37:06 easysw Exp $".
// End of "$Id: fluid.cxx,v 1.15.2.13.2.9 2001/10/29 21:59:14 easysw Exp $".
//

View File

@ -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 $".
//

View File

@ -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 $".
//

View File

@ -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 $".
//

View File

@ -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 $".
//

View File

@ -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 $".
//