|
From: | Pawel Kot |
Subject: | Re: [PATCH 0/9] Refactor devices build |
Date: | Tue, 28 Jan 2020 01:50:08 +0300 |
Hi Pawel,
On Sun, Jan 26, 2020 at 11:59:47PM +0100, Pawel Kot wrote:
> Thanks. I will be looking into these over a couple of next days. Meanwhile
> I've pushed some changes required to (almost) compile successfully under
> Microsoft Visual Studio. Seems it doesn't break thinks under Linux and OS X.
Now looking at you changes... The snippet
#ifndef ssize_t
# include <basetsd.h>
# define ssize_t SSIZE_T
#endif
in snprintf.c does not look nice to me. I would:
1) put it into compat.h, to keep changes to upstream snprintf.c minimal.
2) use #if defined(_MSC_VER) to guard it (or combine with HAVE_SSIZE_T?)
3) or something like this:
--- a/include/compat.h
+++ b/include/compat.h
@@ -20,6 +20,8 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
+#elif defined(_MSC_VER)
+# include "msvc-config.h"
#else
# error "compat.h requires config.h"
#endif
and solve Microsoft Visual Studio in it's own config. It could be even
versioned. Also sorry for not finding time to look at win32 stuff yet.
[Prev in Thread] | Current Thread | [Next in Thread] |