summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2013-10-03 14:30:17 +0000
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2013-10-03 14:30:17 +0000
commit560c40712b644bcec740e219edd2018c2b2f0625 (patch)
tree9e46cab8500dd40390902a0fa04df8ac097b2c56
parent4c6ad205ea9898eba7b55ea968abc1f12187a54c (diff)
downloadlibapr-560c40712b644bcec740e219edd2018c2b2f0625.tar.gz
fix compile failure with MinGW toolchain
PR: 46175 (this is but a small part of the patch) Submitted by: Carlo Bramini Reviewed by: trawick Backport of r1083038 from trunk. fix a bit of 'if FOO'/'ifdef FOO' confusion Backport of r1086695 from trunk. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1528889 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--configure.in2
-rw-r--r--file_io/unix/pipe.c8
-rw-r--r--file_io/unix/readwrite.c2
-rw-r--r--include/arch/unix/apr_arch_threadproc.h2
-rw-r--r--support/unix/waitio.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 1c767cb12..6c4f105df 100644
--- a/configure.in
+++ b/configure.in
@@ -35,7 +35,7 @@ AH_TOP([
dnl Hard-coded inclusion at the tail end of apr_private.h:
AH_BOTTOM([
/* switch this on if we have a BeOS version below BONE */
-#if BEOS && !HAVE_BONE_VERSION
+#if defined(BEOS) && !defined(HAVE_BONE_VERSION)
#define BEOS_R5 1
#else
#define BEOS_BONE 1
diff --git a/file_io/unix/pipe.c b/file_io/unix/pipe.c
index 7b8f01fb9..571d9bcb8 100644
--- a/file_io/unix/pipe.c
+++ b/file_io/unix/pipe.c
@@ -25,8 +25,8 @@
* but now fcntl does, hence we need to do this extra checking.
* The joys of beta programs. :-)
*/
-#if BEOS
-#if !BONE7
+#if defined(BEOS)
+#if !defined(BONE7)
# define BEOS_BLOCKING 1
#else
# define BEOS_BLOCKING 0
@@ -35,7 +35,7 @@
static apr_status_t pipeblock(apr_file_t *thepipe)
{
-#if !BEOS_BLOCKING
+#if !defined(BEOS) || !BEOS_BLOCKING
int fd_flags;
fd_flags = fcntl(thepipe->filedes, F_GETFL, 0);
@@ -71,7 +71,7 @@ static apr_status_t pipeblock(apr_file_t *thepipe)
static apr_status_t pipenonblock(apr_file_t *thepipe)
{
-#if !BEOS_BLOCKING
+#if !defined(BEOS) || !BEOS_BLOCKING
int fd_flags = fcntl(thepipe->filedes, F_GETFL, 0);
# if defined(O_NONBLOCK)
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index 4b3e7368c..7044300c1 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -21,7 +21,7 @@
/* The only case where we don't use wait_for_io_or_timeout is on
* pre-BONE BeOS, so this check should be sufficient and simpler */
-#if !BEOS_R5
+#if !defined(BEOS_R5)
#define USE_WAIT_FOR_IO
#endif
diff --git a/include/arch/unix/apr_arch_threadproc.h b/include/arch/unix/apr_arch_threadproc.h
index b76dc9be1..a61830f6e 100644
--- a/include/arch/unix/apr_arch_threadproc.h
+++ b/include/arch/unix/apr_arch_threadproc.h
@@ -39,7 +39,7 @@
#if APR_HAVE_STRING_H
#include <string.h>
#endif
-#if HAVE_SCHED_H
+#ifdef HAVE_SCHED_H
#include <sched.h>
#endif
/* End System Headers */
diff --git a/support/unix/waitio.c b/support/unix/waitio.c
index 7232cdd9c..0d762ea6d 100644
--- a/support/unix/waitio.c
+++ b/support/unix/waitio.c
@@ -22,7 +22,7 @@
/* The only case where we don't use wait_for_io_or_timeout is on
* pre-BONE BeOS, so this check should be sufficient and simpler */
-#if !BEOS_R5
+#if !defined(BEOS_R5) && !defined(OS2) && APR_FILES_AS_SOCKETS
#define USE_WAIT_FOR_IO
#endif