[erlang-patches] Fix build on OS X 10.8
Björn Gustavsson
bgustavsson@REDACTED
Thu Aug 23 14:50:07 CEST 2012
On Tue, Aug 21, 2012 at 3:24 PM, Aaron Harnly <aharnly@REDACTED> wrote:
> (Apologies if this is a dupe)
> Hi good people, I'm proposing a small change to the 'make_preload' script to fix builds on OS X 10.8.
>
> I have *not* tested this on a Linux or Windows machine, and would appreciate help confirming that it has no effect on those platforms.
>
There could be an issue running on an older version of Perl that
doesn't have the 'bytes' pragma. Now I am not sure that we support
such old version of Perl anyway, so that could be a moot issue.
However, the man page for 'bytes' discourages its use except
for debugging.
I think that a safer and more portable change is this:
diff --git a/erts/emulator/utils/make_preload b/erts/emulator/utils/make_preload
index 13019d4..4e329b2 100755
--- a/erts/emulator/utils/make_preload
+++ b/erts/emulator/utils/make_preload
@@ -87,6 +87,7 @@ foreach $file (@ARGV) {
my $comment = '';
open(FILE, $file) or error("failed to read $file: $!");
+ binmode(FILE);
$_ = <FILE>;
$_ = beam_strip($_);
close(FILE);
We will test it in our daily builds, and if we find no
problems we will include it in R15B02.
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-patches
mailing list