[ccan] [PATCH 0/9] configurator: Support for Windows and MSVC

Kevin Locke kevin at kevinlocke.name
Mon Sep 19 10:51:57 AEST 2016


Hi all,

This patch series adds support for building configurator with Microsoft
Visual C++ and running it on Windows.  The motivation is to add
sufficient support for Windows to allow using header-only modules
with minimal hassle.  For me, this patch series is sufficient, so I
don't have any further plans for changes to other files or the build
system at the moment.

The two patches that are particularly likely to raise objections are
patch 3 and 8:

Patch 3 adds a copy of the err.h functions used by configurator to work
around the lack of err.h on Windows.  If this is too much code to lump
into configurator.c, I can split it out (and copy err.{c,h} verbatim
from musl) or call fprintf+exit directly.

Patch 8 adds the output cflag (-o) to DEFAULT_CFLAGS and the expected
configurator cflags argument.  This changes both the configurator API
and the config.h API and will break existing code which depend on these.
If that is unacceptable, I'd be open to implementing a
backwards-compatible alternative.  One idea would be to add an
--output-cflag option to configurator, although it will require quite a
bit of argument parsing code.  I'm open to other alternatives as well.

Thanks for considering,
Kevin

Kevin Locke (9):
  configurator: Replace unlink with remove
  configurator: Reimplement run using popen
  configurator: Inline err.h functions from musl libc
  configurator: Use native directory separator
  configurator: Mark non-Windows tests MAY_NOT_COMPILE
  configurator: Print test source without cat
  configurator: Fix compiler warning with compare
  configurator: Pass output cflag to configurator
  configurator: DEFAULT_{COMPILER,FLAGS} for MSVC

 Makefile                          |   2 +-
 tools/configurator/configurator.c | 197 +++++++++++++++++++++++++-------------
 2 files changed, 131 insertions(+), 68 deletions(-)

-- 
2.9.3



More information about the ccan mailing list