All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Cran <bruce@cran.org.uk>
To: Jens Axboe <axboe@kernel.dk>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: [PATCH] Add Windows ctime_r implementation and empty ioctl.h header
Date: Thu, 07 May 2015 15:04:56 -0600	[thread overview]
Message-ID: <554BD378.70209@cran.org.uk> (raw)
In-Reply-To: <554B99DD.2000902@kernel.dk>

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

On 5/7/2015 10:59 AM, Jens Axboe wrote:
> Added. Side note - your email consistently ends up in my gmail spam, 
> for some reason...

Ugh, it's because DMARC doesn't work through mailing lists without 
jumping through hoops. I'll see if I can disable it for specified 
destinations.

>
> What are the linker errors? I'm guessing you need to check and add 
> your OS dependencies to T_OBJS in the Makefile, when targetos is Windows.

Got it - I'd forgotten that the Makefile is still checked in and it's 
not generated by the configure script!
I've attached a patch which should make the build work a lot better on 
Windows.

--
Bruce

[-- Attachment #2: 0001-Fix-compiler-warning-and-test-progs-linker-errors-on.patch --]
[-- Type: text/plain, Size: 1540 bytes --]

From 4a6ef95b40558b215c113a0260b891b36f376f83 Mon Sep 17 00:00:00 2001
From: Bruce Cran <bruce.cran@gmail.com>
Date: Thu, 7 May 2015 14:56:58 -0600
Subject: [PATCH] Fix compiler warning and test progs linker errors on Windows

Add prototype for ctime_r to os-windows.h to avoid compiler warning.
Link in os/windows/posix.o and lib/hweight.o to allow test progs to
build on Windows.
---
 Makefile        | 6 ++++++
 os/os-windows.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/Makefile b/Makefile
index 1b312cb..d9aedf5 100644
--- a/Makefile
+++ b/Makefile
@@ -218,6 +218,12 @@ T_OBJS += $(T_LFSR_TEST_OBJS)
 T_OBJS += $(T_BTRACE_FIO_OBJS)
 T_OBJS += $(T_DEDUPE_OBJS)
 
+ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS)))
+    T_DEDUPE_OBJS += os/windows/posix.o lib/hweight.o
+    T_SMALLOC_OBJS += os/windows/posix.o lib/hweight.o
+    T_LFSR_TEST_OBJS += os/windows/posix.o lib/hweight.o
+endif
+
 T_TEST_PROGS = $(T_SMALLOC_PROGS)
 T_TEST_PROGS += $(T_IEEE_PROGS)
 T_PROGS += $(T_ZIPF_PROGS)
diff --git a/os/os-windows.h b/os/os-windows.h
index 6603635..9e931c9 100644
--- a/os/os-windows.h
+++ b/os/os-windows.h
@@ -105,6 +105,7 @@ int fcntl(int fildes, int cmd, ...);
 int fdatasync(int fildes);
 int lstat(const char * path, struct stat * buf);
 uid_t geteuid(void);
+char* ctime_r(const time_t *t, char *buf);
 int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
 ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset);
 ssize_t pwrite(int fildes, const void *buf, size_t nbyte,
-- 
1.9.5.msysgit.1


  reply	other threads:[~2015-05-07 21:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07  3:31 [PATCH] Add Windows ctime_r implementation and empty ioctl.h header Bruce Cran
2015-05-07 16:59 ` Jens Axboe
2015-05-07 21:04   ` Bruce Cran [this message]
2015-05-07 21:06     ` Jens Axboe
2015-05-07 21:27       ` Bruce Cran
2015-05-07 21:32         ` Jens Axboe
2015-05-07 22:56           ` Bruce Cran
2015-05-08  0:20             ` Jens Axboe

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=554BD378.70209@cran.org.uk \
    --to=bruce@cran.org.uk \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.