Fix platform specific compilation errors.

src/Fl_lock.cxx: remove static keyword (Cygwin).

FL/platform_types.h: __int64 is MS VC only, use int instead.

Todo: the latter fixes a compilation error on Windows 64-bit platforms
(MinGW and/or Cygwin). FL_SOCKET needs an update anyway (see comment).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11597 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser
2016-04-13 12:26:04 +00:00
parent 562d29bd7c
commit 737ae06381
2 changed files with 17 additions and 10 deletions
+10 -3
View File
@@ -17,9 +17,16 @@
#ifndef PLATFORM_TYPES_H
#define PLATFORM_TYPES_H
/* Platform-dependent types are defined here
/* Platform-dependent types are defined here.
These types must be defined by any platform:
Fl_Offscreen, Fl_Bitmask, Fl_Region, FL_SOCKET, struct dirent, struct stat
NOTE: *FIXME* AlbrechtS 13 Apr 2016 (concerning FL_SOCKET)
----------------------------------------------------------
The socket API is partially inconsistent because some of the methods
use int explicitly, but the callback typedefs use FL_SOCKET. With the
definition of FL_SOCKET below we can have different data sizes and
different signedness of socket numbers on *some* platforms.
*/
#ifdef __APPLE__
@@ -38,8 +45,8 @@ typedef struct HBITMAP__ *HBITMAP;
typedef HBITMAP Fl_Offscreen;
typedef HBITMAP Fl_Bitmask;
typedef struct HRGN__ *Fl_Region;
# if defined(_WIN64)
typedef unsigned __int64 FL_SOCKET;
# if defined(_WIN64) && defined(_MSC_VER)
typedef unsigned __int64 FL_SOCKET; /* *FIXME* - FL_SOCKET (see above) */
# else
typedef int FL_SOCKET;
# endif
+4 -4
View File
@@ -400,10 +400,10 @@ void lock_ring() {
#else
static void Fl_Posix_System_Driver::awake(void*) {}
static int Fl_Posix_System_Driver::lock() { return 1; }
static void Fl_Posix_System_Driver::unlock() {}
static void* Fl_Posix_System_Driver::thread_message() { return NULL; }
void Fl_Posix_System_Driver::awake(void*) {}
int Fl_Posix_System_Driver::lock() { return 1; }
void Fl_Posix_System_Driver::unlock() {}
void* Fl_Posix_System_Driver::thread_message() { return NULL; }
#endif // HAVE_PTHREAD