corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [08/33] incubator-corinthia git commit: Don't include <io.h> on non-Windows platforms
Date Fri, 13 Feb 2015 08:21:37 GMT
Don't include <io.h> on non-Windows platforms

The <io.h> system header is only avilable on windows. It was
unconditionally included in DFFilesystem.c, which broke the build on
Linux and OS X. It used to be wrapped in an #ifdef WIN32 but with the
removal of this, it was already included.

I have now moved the #include <io.h> to DFPlatform.h, where there is an
ifdef in place to distinguish between WIN32 and other platforms, so that
we don't get a compile error when this is built on Linux and OS X.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/3f11aefa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/3f11aefa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/3f11aefa

Branch: refs/heads/experiment64
Commit: 3f11aefa27314b66eee44b14561cf3514a061537
Parents: f058c02
Author: Peter Kelly <peter@uxproductivity.com>
Authored: Sun Jan 11 00:10:00 2015 +0700
Committer: Peter Kelly <peter@uxproductivity.com>
Committed: Sun Jan 11 00:10:00 2015 +0700

----------------------------------------------------------------------
 DocFormats/core/src/lib/DFFilesystem.c | 1 -
 DocFormats/headers/DFPlatform.h        | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/3f11aefa/DocFormats/core/src/lib/DFFilesystem.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFFilesystem.c b/DocFormats/core/src/lib/DFFilesystem.c
index 41a9f28..972941b 100644
--- a/DocFormats/core/src/lib/DFFilesystem.c
+++ b/DocFormats/core/src/lib/DFFilesystem.c
@@ -27,7 +27,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
-#include <io.h>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/3f11aefa/DocFormats/headers/DFPlatform.h
----------------------------------------------------------------------
diff --git a/DocFormats/headers/DFPlatform.h b/DocFormats/headers/DFPlatform.h
index ea517e7..3d4ae0b 100755
--- a/DocFormats/headers/DFPlatform.h
+++ b/DocFormats/headers/DFPlatform.h
@@ -17,6 +17,7 @@
 
 #ifdef WIN32
 #include <direct.h>
+#include <io.h>
 
 #define _CRT_SECURE_NO_WARNINGS
 #define snprintf _snprintf


Mime
View raw message