Fix some of the portability issues in lest_expect_abort #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Unconditionally include
cstdio
forfflush
and friends, andcstdlib
forabort
. When_WIN32
is not defined, includeunistd.h
instead ofio.h
fordup
anddup2
.This fixes some of the portability issues in
lest_expect_abort
contrib library, and I guess we can consider that it fixes #39, but it does not entirely fix buildinglest_expect_abort
:Here it looks like the design of
lest_expect_abort
expects to have the exact signature ofabort
, and it‘s attempting to satisfy that requirement with some preprocessor conditionals that are both dated and Windows-specific:lest/contrib/lest_expect_abort/lest_expect_abort.hpp
Lines 75 to 87 in 778597f
Well, that’s probably why this is in contrib and not in the main library. Still, this PR should be a step in the right direction for anyone who might be trying to make it work. This is probably the last PR I’ll submit related to the contrib libraries.