Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbreak IO extensions on BSDs (1.68 regression) #119

Merged
merged 1 commit into from
Jul 24, 2018
Merged

Unbreak IO extensions on BSDs (1.68 regression) #119

merged 1 commit into from
Jul 24, 2018

Conversation

jbeich
Copy link
Contributor

@jbeich jbeich commented Jul 20, 2018

alloca is defined in <stdlib.h> even on Linux (see Notes on the GNU version). FreeBSD, DragonFly, OpenBSD don't support <malloc.h> while GNU libc uses <malloc.h> for non-standard extensions: malloc_usable_size, mallinfo, memalign, pvalloc, etc. FreeBSD (but not other BSDs) also supports non-standard extensions: malloc_usable_size, mallctl*, *allocx, etc.

$ echo '#include <boost/gil/extension/io/png/read.hpp>' | c++ -xc++ - -isystem/usr/local/include
In file included from <stdin>:1:
In file included from /usr/local/include/boost/gil/extension/io/png/read.hpp:29:
In file included from /usr/local/include/boost/gil/io/get_reader.hpp:22:
In file included from /usr/local/include/boost/gil/io/get_read_device.hpp:26:
In file included from /usr/local/include/boost/gil/io/path_spec.hpp:23:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
#error "<malloc.h> has been replaced by <stdlib.h>"
 ^
1 error generated.

In file included from /usr/local/include/boost/gil/extension/io/png/read.hpp:29:
In file included from /usr/local/include/boost/gil/io/get_reader.hpp:22:
In file included from /usr/local/include/boost/gil/io/get_read_device.hpp:26:
In file included from /usr/local/include/boost/gil/io/path_spec.hpp:23:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
@jbeich
Copy link
Contributor Author

jbeich commented Jul 20, 2018

Windows appears to have _alloca in <malloc.h>. I wonder if alloca is a compiler builtin instead.

Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stefanseefeld stefanseefeld self-requested a review July 23, 2018 21:38
@mloskot mloskot merged commit ea9fb15 into boostorg:develop Jul 24, 2018
@mloskot
Copy link
Member

mloskot commented Jul 24, 2018

@jbeich Thanks!

Next, we shall watch the regression tests if this does not cause any issues
www.boost.org/development/tests/develop/developer/gil.html

Once that's confirmed, we may still have time to merge it into master for release with Boost 1.68 (/cc @stefanseefeld )

@jbeich
Copy link
Contributor Author

jbeich commented Jul 24, 2018

http://www.boost.org/development/tests/develop/developer/gil.html

How to filter out expected (i.e., pre-existing) fallout? Some cerr links even go nowhere: "Error extracting file: Error code 11 - No matching files were found." And it doesn't look like develop can be replaced with arbitrary commit in order to track when the fallout was introduced.

@jbeich
Copy link
Contributor Author

jbeich commented Jul 24, 2018

Ah, this is hilarious. https://www.boost.org/development/tests/develop/developer/gil-io.html has been showing bustage on FreeBSD but no one payed an attention.

@stefanseefeld
Copy link
Member

or to be a little less harsh: no-one with either FreeBSD experience or a suitable system to test locally is available. Read: your contributions would be very much appreciated ! :-)

@mloskot
Copy link
Member

mloskot commented Jul 24, 2018

Indeed, in a team of three, there is never enough man power!

@jbeich I confess, proposing to watch the regression tests, I failed to check them myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants