[ccan] [PATCH v2 00/13] configurator: Support for Windows and MSVC

Kevin Locke kevin at kevinlocke.name
Fri Sep 23 13:33:03 AEST 2016


Hi all,

This is the second revision of my patch series which 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.

The major change in this revision is the handling of the output cflag,
which can now be specified by a command-line option to configurator and
is set in a separate config.h macro.  This both fixes the ccanlint
breakage in the previous series and preserves backwards-compatibility
for any code calling configurator or using CCAN_CFLAGS.

Patches which need special attention:

As before, 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 or consider
modifying the ccan/err module for use by configurator.

Patch 8 changes the configurator API by adding a command-line option and
config.h macro.  The names are different than I had previously
suggested, as noted in the commit message.

Patch 13 adds appveyor.yml for AppVeyor CI.  This will require (free)
account setup on ci.appveyor.com once merged to enable automatic
building and GitHub integration (if desired).  You may also wish to
consider whether to add a README badge or email notification or other
mechanism to be notified of build status (beyond the default pull
request hooks).

Thanks for considering once again,
Kevin


Kevin Locke (13):
  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: Add output cflag option and macro
  configurator: DEFAULT_{COMPILER,FLAGS} for MSVC
  configurator: Fix warning in HAVE_FOR_LOOP_DECLARATION
  configurator: Return pointer difference as ptrdiff_t
  Makefile: Define CFLAGS_FORCE_C_SOURCE macro
  Add appveyor.yml

 Makefile                          |   2 +-
 Makefile-ccan                     |   1 +
 appveyor.yml                      |  25 ++++
 tools/compile.c                   |  15 +-
 tools/configurator/configurator.c | 288 +++++++++++++++++++++++++++-----------
 tools/tools.h                     |   6 +-
 6 files changed, 249 insertions(+), 88 deletions(-)
 create mode 100644 appveyor.yml

--
2.9.3



More information about the ccan mailing list