mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 15:32:12 +08:00
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:
+13
-6
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* "$Id: platform_types.h 11467 2016-03-29 19:41:14Z manolo $"
|
* "$Id: platform_types.h 11467 2016-03-29 19:41:14Z manolo $"
|
||||||
*
|
*
|
||||||
* Copyright 2016 by Bill Spitzak and others.
|
* Copyright 2016 by Bill Spitzak and others.
|
||||||
*
|
*
|
||||||
* This library is free software. Distribution and use rights are outlined in
|
* 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
|
* the file "COPYING" which should have been included with this file. If this
|
||||||
@@ -17,9 +17,16 @@
|
|||||||
#ifndef PLATFORM_TYPES_H
|
#ifndef PLATFORM_TYPES_H
|
||||||
#define 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:
|
These types must be defined by any platform:
|
||||||
Fl_Offscreen, Fl_Bitmask, Fl_Region, FL_SOCKET, struct dirent, struct stat
|
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__
|
#ifdef __APPLE__
|
||||||
@@ -38,8 +45,8 @@ typedef struct HBITMAP__ *HBITMAP;
|
|||||||
typedef HBITMAP Fl_Offscreen;
|
typedef HBITMAP Fl_Offscreen;
|
||||||
typedef HBITMAP Fl_Bitmask;
|
typedef HBITMAP Fl_Bitmask;
|
||||||
typedef struct HRGN__ *Fl_Region;
|
typedef struct HRGN__ *Fl_Region;
|
||||||
# if defined(_WIN64)
|
# if defined(_WIN64) && defined(_MSC_VER)
|
||||||
typedef unsigned __int64 FL_SOCKET;
|
typedef unsigned __int64 FL_SOCKET; /* *FIXME* - FL_SOCKET (see above) */
|
||||||
# else
|
# else
|
||||||
typedef int FL_SOCKET;
|
typedef int FL_SOCKET;
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
+4
-4
@@ -400,10 +400,10 @@ void lock_ring() {
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static void Fl_Posix_System_Driver::awake(void*) {}
|
void Fl_Posix_System_Driver::awake(void*) {}
|
||||||
static int Fl_Posix_System_Driver::lock() { return 1; }
|
int Fl_Posix_System_Driver::lock() { return 1; }
|
||||||
static void Fl_Posix_System_Driver::unlock() {}
|
void Fl_Posix_System_Driver::unlock() {}
|
||||||
static void* Fl_Posix_System_Driver::thread_message() { return NULL; }
|
void* Fl_Posix_System_Driver::thread_message() { return NULL; }
|
||||||
|
|
||||||
#endif // HAVE_PTHREAD
|
#endif // HAVE_PTHREAD
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user