summaryrefslogtreecommitdiff
path: root/FL/platform_types.h
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2016-04-13 12:26:04 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2016-04-13 12:26:04 +0000
commit737ae063816c9c5a554653f8ad9474e706b0f221 (patch)
tree5e1ffda08c3313ac018b302eb93cdf56676bc31a /FL/platform_types.h
parent562d29bd7cd57d657cdfa6ea9ed23c8948224c1f (diff)
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
Diffstat (limited to 'FL/platform_types.h')
-rw-r--r--FL/platform_types.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/FL/platform_types.h b/FL/platform_types.h
index 9db3e46c7..d2308be09 100644
--- a/FL/platform_types.h
+++ b/FL/platform_types.h
@@ -1,7 +1,7 @@
/*
* "$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
* the file "COPYING" which should have been included with this file. If this
@@ -17,9 +17,16 @@
#ifndef PLATFORM_TYPES_H
#define PLATFORM_TYPES_H
-/* 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
+/* 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