Discussion:
[erlang-patches] R17.0-rc1 patch for gzio.c compile breakage.
unknown
2014-02-03 17:35:36 UTC
Permalink
A dependency on zlib.h was recently removed (commit 8a147a7365). This also
removes the definition of the macro "OF" which is required by gzio.c. Now
"OF" is evidently defined by other headers on some systems, but on at least
Gentoo Linux this is not the case.

OF was needed to support compilation on now ancient C compilers. I assume
R17 and newer doesn't need to support ancient C compilers. See details at
http://stackoverflow.com/questions/7299310/of-macro-in-iowin32-h

The attached patch removes usage of OF in gzio.c

Regards,
Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140203/992858b4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gzio_OF.patch
Type: text/x-patch
Size: 1104 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140203/992858b4/attachment.bin>
unknown
2014-02-04 14:27:42 UTC
Permalink
On Mon, Feb 3, 2014 at 6:35 PM, Daniel Goertzen
Post by unknown
A dependency on zlib.h was recently removed (commit 8a147a7365). This also
removes the definition of the macro "OF" which is required by gzio.c. Now
"OF" is evidently defined by other headers on some systems, but on at least
Gentoo Linux this is not the case.
The OF() macro is defined in zconf.h, which is included by zlib.h, so
I don't understand why the build should break on Gentoo Linux.

But since the use of OF() is completely unnecessary and is an
unnecessary dependency I have written a commit message for your
patch and included it in our daily builds.

git fetch git:bjorng/otp.git bjorn/erts/zlib-1.2.8/OTP-11669

/Bjorn
--
Bj?rn Gustavsson, Erlang/OTP, Ericsson AB
unknown
2014-02-04 15:16:54 UTC
Permalink
Thank you for the merge. And you piqued my curiosity as to the why.

My gentoo zconf.h defines the macro as _Z_OF instead of OF. Digging
deeper, they made the change on the premise that OF is a stupid, polluting
name for an internal macro. There was disagreement as to the value of the
change (https://bugs.gentoo.org/show_bug.cgi?id=383179)


Dan.
Post by unknown
On Mon, Feb 3, 2014 at 6:35 PM, Daniel Goertzen
Post by unknown
A dependency on zlib.h was recently removed (commit 8a147a7365). This
also
Post by unknown
removes the definition of the macro "OF" which is required by gzio.c.
Now
Post by unknown
"OF" is evidently defined by other headers on some systems, but on at
least
Post by unknown
Gentoo Linux this is not the case.
The OF() macro is defined in zconf.h, which is included by zlib.h, so
I don't understand why the build should break on Gentoo Linux.
But since the use of OF() is completely unnecessary and is an
unnecessary dependency I have written a commit message for your
patch and included it in our daily builds.
git fetch git:bjorng/otp.git bjorn/erts/zlib-1.2.8/OTP-11669
/Bjorn
--
Bj?rn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140204/abdfc5c0/attachment.html>
unknown
2014-02-04 16:14:18 UTC
Permalink
On Tue, Feb 4, 2014 at 4:16 PM, Daniel Goertzen
Post by unknown
Thank you for the merge. And you piqued my curiosity as to the why.
My gentoo zconf.h defines the macro as _Z_OF instead of OF. Digging deeper,
they made the change on the premise that OF is a stupid, polluting name for
an internal macro. There was disagreement as to the value of the change
(https://bugs.gentoo.org/show_bug.cgi?id=383179)
Thanks for the additional information. I have updated the commit message.

/Bjorn
--
Bj?rn Gustavsson, Erlang/OTP, Ericsson AB
Loading...