Thread (7 messages) flat view 7 messages, 5 authors, 2016-06-15

Re: obstack fails to compile on OS X 10.7

From: Ramsay Jones <hidden>
Date: 2016-06-15 22:51:57

Fredrik Kuivinen wrote:
On Sat, Aug 27, 2011 at 03:14:43AM -0700, David Aguilar wrote:
quoted
On Sat, Aug 27, 2011 at 02:21:40AM -0400, Brian Gernhardt wrote:
[snip]
quoted
I suspect that more exotic platforms may have problems
with obstack.h as well.  This probably needs some testing
on SunOS, AIX, IRIX, etc.
Just FYI, my cygwin and mingw builds failed in the same way as OS X ...
Something like this (tested on Linux and SunOS 5.10):

-- 8< --

Subject: [PATCH RFC] obstack: Fix portability issues

i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1, SunOS 5.10, and possibly
others do not have exit.h and exitfail.h. Remove the use of these in
obstack.c.

The __block variable was renamed to block to avoid a gcc error:

compat/obstack.h:190: error: __block attribute can be specified on variables only

Initial-patch-by: David Aguilar [off-list ref]
Reported-by: Brian Gernhardt <redacted>
Signed-off-by: Fredrik Kuivinen <redacted>
---
... and this fixes the build(s) just fine[1]. Thanks!

ATB,
Ramsay Jones

[1] Well the build is fine on cygwin, but the mingw build fails for
an unrelated reason; compat/obstack.c compiles just fine.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help