[ccan] Testing ccanlint on Cygwin (gcc 4.3.4-3)

Joseph Adams joeyadams3.14159 at gmail.com
Thu Mar 3 20:31:29 EST 2011


For kicks, I decided to see if I could build CCAN on Windows via
Cygwin and gcc4.  I ran into a few issues.  Most (if not all) of them
are due to issues in the C library used by Cygwin (newlib).

 * ctype.h functions (islower, toupper, etc.) result in array
subscript warnings, treated as errors, when passed chars.  What else
would you pass them?
 * strtold (used by ccan_tokenizer) is missing.
 * ssize_t is not defined when <stdlib.h> is included.

The attached patches work around these issues.  The first adds
ccan_tokenizer to the EXCLUDE list in the Makefile so it won't
interfere with the build on Cygwin.  The second introduces a header
called compat.h which, if newlib is present, wraps ctype.h functions
and makes ssize_t available.  It then includes "compat.h" at the top
of several source and header files.

With that, I got ccan and tools to build, and as many modules that
were tested passed ccanlint, but failtest seemed to get stuck in an
infinite loop.  When I ran make -j2 check,
ccan/failtest/test/run-malloc.c and ccan/rbtree/test/run-many.c ended
up blocking with full CPU each.  These infinite loops did not appear
to consume increasing memory or create a flood of processes.

Other observations:

 * Generating inter-depends takes a really long time (about one or two
minutes), as does test-depends in some cases.  This is annoying
because these files are generated when `make clean` is run.  On Linux,
these build in about a second.
 * I got a dialog from Windows asking for permission to unblock the
firewall for a couple of tests to run.


- Joey Adams


PS: Did my email on February 24 with the subject "A couple patches to
make tools/ccan_depends --compile work." get through?  Both patches
from that email are still relevant in what they do, but one of them
will need to be tweaked due to recent commits.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-ccan_tokenizer-to-exclude-list.patch
Type: text/x-patch
Size: 778 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20110303/1529d027/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Added-compat.h-to-work-around-issues-in-newlib-C-lib.patch
Type: text/x-patch
Size: 4578 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20110303/1529d027/attachment-0001.bin>


More information about the ccan mailing list