Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Bruce Cran <bruce@cran.org.uk>
To: Jens Axboe <axboe@kernel.dk>,
	Jeff Furlong <jeff.furlong@hgst.com>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: Windows Make Broken
Date: Fri, 22 Jan 2016 11:16:15 -0700	[thread overview]
Message-ID: <56A271EF.6040401@cran.org.uk> (raw)
In-Reply-To: <56A1AD7C.3060802@kernel.dk>

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

On 1/21/16 9:18 PM, Jens Axboe wrote:
> On 01/21/2016 02:53 PM, Bruce Cran wrote:
>> Yeah, there's also a problem with strcasestr.c. I'm working on fixing
>> both problems just now.
>
> We'll just spin a 2.6 once that's fixed.

I've attached a patch that should fix it.  The removal of strcasestr.o 
is because I was getting a error saying strcasestr had already been defined.

-- 
Bruce

[-- Attachment #2: 0001-Fix-Windows-build-define-MSG_DONTWAIT-and-avoid-dupl.patch --]
[-- Type: text/plain, Size: 1372 bytes --]

From 6ab23ee572ee4ad9562318d9168293df177a5c59 Mon Sep 17 00:00:00 2001
From: Bruce Cran <bruce.cran@gmail.com>
Date: Fri, 22 Jan 2016 10:54:47 -0700
Subject: [PATCH] Fix Windows build: define MSG_DONTWAIT and avoid duplicate
 strcasestr definition

---
 Makefile        | 2 +-
 os/os-windows.h | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b6ebf2f..febc8f8 100644
--- a/Makefile
+++ b/Makefile
@@ -200,7 +200,7 @@ T_IEEE_PROGS = t/ieee754
 
 T_ZIPF_OBS = t/genzipf.o
 T_ZIPF_OBJS += t/log.o lib/ieee754.o lib/rand.o lib/pattern.o lib/zipf.o \
-		lib/strntol.o lib/gauss.o t/genzipf.o oslib/strcasestr.o
+		lib/strntol.o lib/gauss.o t/genzipf.o
 T_ZIPF_PROGS = t/fio-genzipf
 
 T_AXMAP_OBJS = t/axmap.o
diff --git a/os/os-windows.h b/os/os-windows.h
index 159c086..7305dd0 100644
--- a/os/os-windows.h
+++ b/os/os-windows.h
@@ -20,6 +20,11 @@
 
 #include "windows/posix.h"
 
+/* Cygwin doesn't define rand_r if C99 or newer is being used */
+#if defined(WIN32) && !defined(rand_r)
+int rand_r(unsigned *);
+#endif
+
 #ifndef PTHREAD_STACK_MIN
 #define PTHREAD_STACK_MIN 65535
 #endif
@@ -69,7 +74,7 @@ typedef DWORD_PTR os_cpu_mask_t;
 #define O_NONBLOCK		FIONBIO
 
 /* Winsock doesn't support MSG_WAIT */
-#define OS_MSG_DONTWAIT	0
+#define MSG_DONTWAIT 0
 
 #define POLLOUT	1
 #define POLLIN	2
-- 
2.5.2.windows.2


  parent reply	other threads:[~2016-01-22 18:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 21:43 Windows Make Broken Jeff Furlong
2016-01-21 21:53 ` Bruce Cran
2016-01-22  4:18   ` Jens Axboe
2016-01-22 13:30     ` Bruce Cran
2016-01-22 18:16     ` Bruce Cran [this message]
2016-01-22 18:50       ` Jens Axboe
2016-01-22 22:02         ` Bruce Cran
2016-01-22 22:12           ` Jens Axboe
2016-01-22 22:18             ` Bruce Cran
2016-01-22 22:21             ` Bruce Cran
2016-01-22 22:25               ` Jens Axboe
2016-01-22 22:37                 ` Bruce Cran
2016-01-22 22:40                   ` Jens Axboe
2016-01-22 22:58                   ` Jeff Furlong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A271EF.6040401@cran.org.uk \
    --to=bruce@cran.org.uk \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=jeff.furlong@hgst.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox