Replace inappropriate usage of __WATCOM__ with _MSC_VER.
Note: this is in parts temporary since some of the functions redefined for Visual Studio will be replaced with fl_*() functions in later commits. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
1af23ab32f
commit
a8b58f6b79
@ -48,6 +48,15 @@
|
||||
#include "function_panel.h"
|
||||
#include "template_panel.h"
|
||||
|
||||
// Visual C++ 2005 incorrectly displays a warning about the use of
|
||||
// POSIX APIs on Windows, which is supposed to be POSIX compliant...
|
||||
// Some of these functions are also defined in ISO C99...
|
||||
#if defined(_MSC_VER)
|
||||
# define access _access
|
||||
# define chdir _chdir
|
||||
# define getcwd _getcwd
|
||||
#endif // _MSC_VER
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
# include <direct.h>
|
||||
# include <windows.h>
|
||||
@ -55,13 +64,6 @@
|
||||
# include <fcntl.h>
|
||||
# include <commdlg.h>
|
||||
# include <FL/x.H>
|
||||
# ifndef __WATCOMC__
|
||||
// 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 chdir _chdir
|
||||
# define getcwd _getcwd
|
||||
# endif // !__WATCOMC__
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
@ -39,18 +39,20 @@
|
||||
# undef index
|
||||
# endif /* index */
|
||||
|
||||
/*
|
||||
* Visual C++ 2005 incorrectly displays a warning about the use of
|
||||
* POSIX APIs on Windows, which is supposed to be POSIX compliant...
|
||||
* Some of these functions are also defined in ISO C99...
|
||||
*/
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
# define strdup _strdup
|
||||
# endif /* _MSC_VER */
|
||||
|
||||
# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define strcasecmp(s,t) _stricmp((s), (t))
|
||||
# define strncasecmp(s,t,n) _strnicmp((s), (t), (n))
|
||||
/*
|
||||
* Visual C++ 2005 incorrectly displays a warning about the use of
|
||||
* POSIX APIs on Windows, which is supposed to be POSIX compliant...
|
||||
* Some of these functions are also defined in ISO C99...
|
||||
*/
|
||||
# if defined(_MSC_VER) /* Visual C++ aka Visual Studio */
|
||||
# define strdup _strdup
|
||||
# endif /* _MSC_VER */
|
||||
# endif /* WIN32 */
|
||||
# endif /* WIN32 && ... */
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -82,8 +84,8 @@ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t);
|
||||
# endif /* !HAVE_STRLCPY */
|
||||
|
||||
/*
|
||||
* locale independent ascii compare, does not introduce locale
|
||||
* pbs as w/ case cmp
|
||||
* Locale independent ASCII string compare function,
|
||||
* does not introduce locale issues as with strcasecmp()
|
||||
*/
|
||||
FL_EXPORT extern int fl_ascii_strcasecmp(const char *s, const char *t);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
//
|
||||
// Main demo program for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 1998-2010 by Bill Spitzak and others.
|
||||
// Copyright 1998-2017 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@ -19,14 +19,20 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
# include <direct.h>
|
||||
# ifndef __WATCOMC__
|
||||
// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
|
||||
// on Windows, which is supposed to be POSIX compliant...
|
||||
|
||||
// *FIXME* Implement fl_chdir() and fl_putenv() !
|
||||
// *FIXME* Check whether directory related headers can be removed (i.e. not
|
||||
// *FIXME* included) if fl_chdir() is implemented and called in demo.cxx
|
||||
|
||||
// Visual C++ 2005 incorrectly displays a warning about the use of
|
||||
// POSIX APIs on Windows, which is supposed to be POSIX compliant...
|
||||
# if defined(_MSC_VER)
|
||||
# define chdir _chdir
|
||||
# define putenv _putenv
|
||||
# endif // !__WATCOMC__
|
||||
# endif // _MSC_VER
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
# include <direct.h>
|
||||
#elif defined __APPLE__
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include <unistd.h> // for chdir()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user