Visual Studio prints warning C4706 "assignment within conditional
expression" when there is an assignment without a comparison in a
conditional expression. Therefore, to silence the warning, add an
explicit comparison.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c
Although Windows provides unlink, using it adds complication due to the
lack of unistd.h which must be included to define the function on POSIX
systems. Instead, use remove, which C89 requires to be in stdio.h.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 4 ++--
1 file
Several of the EXECUTABLE tests depend on headers not available on
Windows. Mark these tests MAY_NOT_COMPILE to handle this.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/configurator
Windows does not provide cat. Instead, copy the test source to stdout
using the file stream to which it was written.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 28 +++-
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/tools
Rather than using fork+pipe+system+waitpid, most of which are only
available on POSIX-like systems, use popen which is also available on
Windows (under the name _popen).
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 77 +++
1 file changed
mand,
operable program or batch file.
Therefore, use "\\" when invoking tests on Windows.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/configurator/configurator.c
b/tools/configu
When compiling with Visual Studio, use default compiler name and flags
which are likely to work with the known-available compiler.
This is also a convenience for users who may not know what arguments
cl.exe may need to compile the tests.
Signed-off-by: Kevin Locke
---
tools/configurator
configurator.
This is a breaking change. Existing scripts which pass flags to the
compiler must be modified to add "-o" as the last flag. As noted in the
cover letter for this patch series, I'm open to considering alternatives
if this is unacceptable.
Signed-off-by: Kevin Locke
ll.
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
conf
Since we can't use HAVE_ERR_H in configurator, provide a definition for
the err.h functions used. The version provided is the one from musl
libc, since it is concise and shares the MIT License with configurator.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c
Hi David,
Thank you for taking the time to review these patches, especially for a
platform that you don't have a strong stake in. I really appreciate it.
On 09/19/2016 10:48 PM, David Gibson wrote:
On Sun, Sep 18, 2016 at 06:51:57PM -0600, Kevin Locke wrote:
This patch series adds su
On 09/19/2016 11:00 PM, David Gibson wrote:
> On Sun, Sep 18, 2016 at 06:51:59PM -0600, Kevin Locke wrote:
>> Rather than using fork+pipe+system+waitpid, most of which are only
>> available on POSIX-like systems, use popen which is also available on
>> Windows (under the name
On 09/19/2016 11:23 PM, David Gibson wrote:
On Sun, Sep 18, 2016 at 06:52:05PM -0600, Kevin Locke wrote:
Unfortunately, not all compilers support -o as a command-line option for
specifying the output file. Visual Studio cl.exe issues warning D9035
when -o is given, which is detected as a
mand,
operable program or batch file.
Therefore, use "\\" when invoking tests on Windows.
Signed-off-by: Kevin Locke
Reviewed-by: David Gibson
---
tools/configurator/configurator.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/configurator/configu
Since we can't use HAVE_ERR_H in configurator, provide a definition for
the err.h functions used. The version provided is the one from musl
libc, since it is concise and shares the MIT License with configurator.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c
. This can happen with non-conformant
libc or if EINTR occurs after reading some data.
- Define _POSIX_C_SOURCE for popen/pclose with strict implementations
which require it (e.g. gcc with -std=c11).
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 90
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
Although Windows provides unlink, using it adds complication due to the
lack of unistd.h which must be included to define the function on POSIX
systems. Instead, use remove, which C89 requires to be in stdio.h.
Signed-off-by: Kevin Locke
Reviewed-by: David Gibson
---
tools/configurator
uot;/option" to avoid issues running under msys.
- Disable C4200 warning for use of flexible array members, which MSVC
considers an extension (since it does not fully support C99).
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 12
1 file changed, 12 inserti
Visual Studio prints warning C4706 "assignment within conditional
expression" when there is an assignment without a comparison in a
conditional expression. Therefore, to silence the warning, add an
explicit comparison.
Signed-off-by: Kevin Locke
Reviewed-by: David Gibson
these, it seemed unwarranted if the compile errors may be fixed soon.
Signed-off-by: Kevin Locke
---
appveyor.yml | 25 +
1 file changed, 25 insertions(+)
create mode 100644 appveyor.yml
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 000..822c4bd
Visual C++ prints "warning C4702: unreachable code" due to the return
statement after the for loop which is never reached. Fix this by
setting a variable returned by a single return statement at the end.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 5 +++--
1 fi
Several of the EXECUTABLE tests depend on headers not available on
Windows. Mark these tests MAY_NOT_COMPILE to handle this.
Signed-off-by: Kevin Locke
Reviewed-by: David Gibson
---
tools/configurator/configurator.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff
in the future due to cl.exe requiring different
flags for different types of output[1] (e.g. object files are /Fo:).
1. https://msdn.microsoft.com/en-us/library/f1cb223a.aspx
Signed-off-by: Kevin Locke
---
tools/compile.c | 15
tools/configurator/configurator.c
This macro holds the C compiler flag(s) to force input files to be
recognized as C sources regardless of extension. It is defined to allow
overriding on the make command line.
Signed-off-by: Kevin Locke
---
Makefile | 2 +-
Makefile-ccan | 1 +
2 files changed, 2 insertions(+), 1 deletion
is by using the ptrdiff_t type
introduced by C99 for this purpose.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/configurator/configurator.c
b/tools/configurator/configurator.c
index a43061b..2acb0b2 1
EINTR occurs after reading some data.
- Handle short writes from fwrite. This can happen with non-conformant
libc or if EINTR occurs after writing some data.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 48 +++
1 file changed, 43
Hi all,
Building dgraph using Microsoft Visual C++ produces the following
error:
dgraph.h(25): error C2233: 'edge': arrays of objects containing
zero-size arrays are illegal
The issue is that MSVC supports flexible array members, but does not
support arrays of structs with flexible array members
On Tue, 2016-09-27 at 14:52 +1000, David Gibson wrote:
> On Thu, Sep 22, 2016 at 09:33:05PM -0600, Kevin Locke wrote:
>> - Create fread_noeintr to avoid EINTR in fread without reading any data.
>> - Handle short reads from fread. This can happen with non-conformant
>> li
le sources instead of musl libc sources to avoid
introducing another implementation of these functions.
- Prefix err.h functions with "c12r_" to avoid name conflicts and
"static declaration follows non-static" errors.
Signed-off-by: Kevin Locke
---
tools/configurator/configu
On Tue, 2016-09-27 at 15:06 +1000, David Gibson wrote:
> On Thu, Sep 22, 2016 at 09:33:09PM -0600, Kevin Locke wrote:
>> Windows does not provide cat. Instead, copy the test source to stdout
>> using the file stream to which it was written.
>>
>> Changes since v1:
&g
On Tue, 2016-09-27 at 15:20 +1000, David Gibson wrote:
> On Thu, Sep 22, 2016 at 09:33:16PM -0600, Kevin Locke wrote:
>> This file defines the AppVeyor CI (appveyor.com) settings.
>
> Nice, though I can't really test it until we've got the rest of the
> Windows /
On Tue, 2016-09-27 at 15:23 +1000, David Gibson wrote:
> On Thu, Sep 22, 2016 at 09:33:03PM -0600, Kevin Locke wrote:
>> 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
On Tue, 2016-09-27 at 15:50 +0930, Rusty Russell wrote:
> David Gibson writes:
>> On Thu, Sep 22, 2016 at 09:33:03PM -0600, Kevin Locke wrote:
>>> Hi all,
>>>
>>> This is the second revision of my patch series which adds support for
>>> building confi
CCAN err module sources instead of musl libc sources to avoid
introducing another implementation of these functions.
- Prefix err.h functions with "c12r_" to avoid name conflicts and
"static declaration follows non-static" errors.
Signed-off-by: Kevin Locke
---
tools/configu
EINTR occurs after reading some data.
- Handle short writes from fwrite. This can happen with non-conformant
libc or if EINTR occurs after writing some data.
Changes since v2:
- Revert fwrite_noeintr and short read/write changes.
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c
module one in hopes of reducing maintenance burden and code
proliferation.
* Additional documentation comments for AppVeyor.
Thanks again!
Kevin
Kevin Locke (7):
configurator: Reimplement run using popen
configurator: Inline err.h functions
configurator: Print test source without cat
con
-by: Kevin Locke
---
tools/configurator/configurator.c | 79 +++
1 file changed, 31 insertions(+), 48 deletions(-)
diff --git a/tools/configurator/configurator.c
b/tools/configurator/configurator.c
index c7577c0..2ad3fff 100644
--- a/tools/configurator
uot;/option" to avoid issues running under msys.
- Disable C4200 warning for use of flexible array members, which MSVC
considers an extension (since it does not fully support C99).
Signed-off-by: Kevin Locke
---
tools/configurator/configurator.c | 12
1 file changed, 12 inserti
in the future due to cl.exe requiring different
flags for different types of output[1] (e.g. object files are /Fo:).
1. https://msdn.microsoft.com/en-us/library/f1cb223a.aspx
Signed-off-by: Kevin Locke
---
tools/compile.c | 15
tools/configurator/configurator.c
these, it seemed unwarranted if the compile errors may be fixed soon.
Changes since v2:
- Add reference to AppVeyor results for canonical repo and basic
instructions to setup AppVeyor for forks.
Signed-off-by: Kevin Locke
---
appveyor.yml | 37 +
1 file changed
This macro holds the C compiler flag(s) to force input files to be
recognized as C sources regardless of extension. It is defined to allow
overriding on the make command line.
Signed-off-by: Kevin Locke
---
Makefile | 2 +-
Makefile-ccan | 1 +
2 files changed, 2 insertions(+), 1 deletion
On Sat, 2016-10-01 at 01:08 +1000, David Gibson wrote:
> On Wed, Sep 28, 2016 at 06:44:41PM -0600, Kevin Locke wrote:
>> Here is the third revision of the patch series which adds support for
>> building configurator with Microsoft Visual C++ and running it on
>> Windows.
>&
defining cost functions
as preprocessor macros when compiling this module. Distances over
other array types (e.g. wide strings, integers, structs) can be
accomplished by defining the element type and equality test macros.
Signed-off-by: Kevin Locke
---
I have tried to make the inline
On Wed, 2016-11-23 at 23:58 +1100, David Gibson wrote:
> On Fri, Nov 18, 2016 at 09:19:25PM -0700, Kevin Locke wrote:
>> This commit creates the edit_distance module for calculating various
>> edit distance measures.
>> [...]
>
> I've merged this module in, alo
On Sun, 2016-10-02 at 21:14 -0600, Kevin Locke wrote:
> On Sat, 2016-10-01 at 01:08 +1000, David Gibson wrote:
>> I set myself up an appveyor account and tweaked your comment to point
>> at that instead of the hypothetical one Rusty may or may not set up at
>> some point.
>
On Tue, 2017-08-01 at 15:22 +1000, David Gibson wrote:
> On Thu, Sep 22, 2016 at 10:31:16PM -0600, Kevin Locke wrote:
>> [...]
>>
>> The issue is that MSVC supports flexible array members, but does not
>> support arrays of structs with flexible array members. My
&g
47 matches
Mail list logo