diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-01-01 23:09:33 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-01-01 23:09:33 +0000 |
commit | 223fc0d3425fcb745d7e828a3f24146b386152de (patch) | |
tree | ec98b7c5ce5b780456a7eff1adde0dd776f43ae0 | |
parent | 984eb9257e2f1f64046a8a1f8c9ae5a5a80e232b (diff) | |
download | netpbm-mirror-223fc0d3425fcb745d7e828a3f24146b386152de.tar.gz netpbm-mirror-223fc0d3425fcb745d7e828a3f24146b386152de.tar.xz netpbm-mirror-223fc0d3425fcb745d7e828a3f24146b386152de.zip |
Add missing include of <io.h> for Mingw32
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2368 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/other/cameratopam/cameratopam.c | 2 | ||||
-rw-r--r-- | converter/other/jpeg2000/libjasper/base/jas_stream.c | 2 | ||||
-rw-r--r-- | lib/pmfileio.c | 5 | ||||
-rw-r--r-- | pm_config.in.h | 6 |
4 files changed, 10 insertions, 5 deletions
diff --git a/converter/other/cameratopam/cameratopam.c b/converter/other/cameratopam/cameratopam.c index 40d8207f..ec33dd31 100644 --- a/converter/other/cameratopam/cameratopam.c +++ b/converter/other/cameratopam/cameratopam.c @@ -26,7 +26,7 @@ #include <stdlib.h> #include <string.h> -#ifdef __CYGWIN__ +#ifdef HAVE_IO_H #include <io.h> #endif #if !MSVCRT diff --git a/converter/other/jpeg2000/libjasper/base/jas_stream.c b/converter/other/jpeg2000/libjasper/base/jas_stream.c index 7c6050fb..16c948eb 100644 --- a/converter/other/jpeg2000/libjasper/base/jas_stream.c +++ b/converter/other/jpeg2000/libjasper/base/jas_stream.c @@ -127,7 +127,7 @@ #if defined(HAVE_UNISTD_H) #include <unistd.h> #endif -#if MSVCRT +#if HAVE_IO_H #include <io.h> #endif diff --git a/lib/pmfileio.c b/lib/pmfileio.c index dd2e3114..8176ae6a 100644 --- a/lib/pmfileio.c +++ b/lib/pmfileio.c @@ -29,6 +29,7 @@ #define _LARGE_FILE_API /* This makes the the x64() functions available on AIX */ +#include "netpbm/pm_config.h" #include <unistd.h> #include <assert.h> #include <stdio.h> @@ -36,8 +37,8 @@ #include <stdarg.h> #include <string.h> #include <errno.h> -#ifdef __DJGPP__ - #include <io.h> +#if HAVE_IO_H + #include <io.h> /* For mktemp */ #endif #include "netpbm/pm_c_util.h" diff --git a/pm_config.in.h b/pm_config.in.h index f88a7652..c64fc093 100644 --- a/pm_config.in.h +++ b/pm_config.in.h @@ -137,7 +137,11 @@ #define HAVE_SETMODE #endif -/* #define HAVE_SETMODE */ +#if MSVCRT || defined(__CYGWIN__) || defined(DJGPP) +#define HAVE_IO_H 1 +#else +#define HAVE_IO_H 0 +#endif #if (defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__APPLE__)) || defined(__NetBSD__) #define HAVE_VASPRINTF 1 |