erlang/erlang.patch

Tue, 02 Jul 2013 18:20:50 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 02 Jul 2013 18:20:50 +0200
changeset 781
25504c2d46b1
parent 780
0a61f30eebd4
permissions
-rw-r--r--

Update to new vendor version and patch according to pcre problems.

     1 Index: erts/emulator/hipe/hipe_x86.c
     2 --- erts/emulator/hipe/hipe_x86.c.orig	2010-12-07 16:07:22.000000000 +0100
     3 +++ erts/emulator/hipe/hipe_x86.c	2010-12-09 17:23:16.000000000 +0100
     4 @@ -130,7 +130,7 @@
     5  	abort();
     6      map_start = mmap(map_hint, map_bytes,
     7  		     PROT_EXEC|PROT_READ|PROT_WRITE,
     8 -		     MAP_PRIVATE|MAP_ANONYMOUS
     9 +		     MAP_PRIVATE|MAP_ANON
    10  #ifdef __x86_64__
    11  		     |MAP_32BIT
    12  #endif
    13 Index: lib/erl_interface/src/connect/ei_resolve.c
    14 --- lib/erl_interface/src/connect/ei_resolve.c.orig	2010-12-07 16:07:22.000000000 +0100
    15 +++ lib/erl_interface/src/connect/ei_resolve.c	2010-12-09 17:23:16.000000000 +0100
    16 @@ -54,6 +54,10 @@
    17  #include "ei_resolve.h"
    18  #include "ei_locking.h"
    20 +#if defined(HAVE_GETHOSTBYNAME_R) && defined(__FreeBSD__)
    21 +#undef HAVE_GETHOSTBYNAME_R
    22 +#endif
    23 +
    24  #ifdef HAVE_GETHOSTBYNAME_R
    26  void ei_init_resolve(void)
    27 Index: lib/gs/src/tool_utils.erl
    28 --- lib/gs/src/tool_utils.erl.orig	2010-12-07 16:07:22.000000000 +0100
    29 +++ lib/gs/src/tool_utils.erl	2010-12-09 17:23:16.000000000 +0100
    30 @@ -45,6 +45,9 @@
    31  	       }).
    34 +%% Browser executable list (openURL command line protocol required)
    35 +-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]).
    36 +
    37  %%----------------------------------------------------------------------
    38  %% open_help(Parent, File)
    39  %%   Parent = gsobj()  (GS root object or parent window)
    40 @@ -85,7 +88,7 @@
    41  		      {unix,Type} ->
    42                            case Type of
    43                                 darwin -> "open " ++ File;
    44 -                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
    45 +                               _Else -> unix_url_command("file:" ++ File)
    46  			  end;
    47  		      {win32,_AnyType} ->
    48  			  "start " ++ filename:nativename(File);
    49 @@ -100,7 +103,7 @@
    50  		      {unix,Type} ->
    51                            case Type of
    52                                 darwin -> "open " ++ File;
    53 -                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
    54 +                               _Else -> unix_url_command("file:" ++ File)
    55  			  end;
    56  		      {win32,_AnyType} ->
    57  			  "netscape.exe -h " ++
    58 @@ -435,3 +438,53 @@
    59      [Last];
    60  insert_newlines(Other) ->
    61      Other.
    62 +
    63 +%% find_browser(BrowserList) => string() | false
    64 +%%   BrowserList - [string()]
    65 +%% Given a list of basenames, find the first available executable.
    66 +
    67 +find_browser([]) ->
    68 +    false;
    69 +
    70 +find_browser([H | T]) ->
    71 +    case os:find_executable(H) of
    72 +        false ->
    73 +          find_browser(T);
    74 +        Browser ->
    75 +          Browser
    76 +    end.
    77 +
    78 +%% unix_url_command(URL) => string()
    79 +%%   URL - string()
    80 +%% Open an URL, using a browser which supports the openURL command
    81 +%% line protocol. If no browser is found, the empty string will be
    82 +%% returned.
    83 +
    84 +unix_url_command(URL) ->
    85 +    Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&",
    86 +
    87 +    case os:getenv("BROWSER") of
    88 +	false ->
    89 +	    %% look for a compatible browser
    90 +	    case find_browser(?BROWSERS) of
    91 +		false ->
    92 +		    "";
    93 +		Browser ->
    94 +		    case regexp:gsub(Template, "BROWSER", Browser) of
    95 +			{ok, Command, 0} ->
    96 +			    %% Template does not contain "BROWSER" placeholder
    97 +			    "";
    98 +			{ok, Command, _} ->
    99 +			    Command
   100 +		    end
   101 +	    end;
   102 +
   103 +	Value ->
   104 +	    case regexp:gsub(Template, "BROWSER", Value) of
   105 +		{ok, Command2, 0} ->
   106 +		    %% no placeholder
   107 +		    "";
   108 +		{ok, Command2, _} ->
   109 +		    Command2
   110 +	    end
   111 +    end.
   112 Index: lib/hipe/regalloc/Makefile
   113 --- lib/hipe/regalloc/Makefile.orig	2010-12-07 16:07:22.000000000 +0100
   114 +++ lib/hipe/regalloc/Makefile	2010-12-09 17:23:16.000000000 +0100
   115 @@ -46,7 +46,6 @@
   116  	  hipe_node_sets hipe_spillcost hipe_reg_worklists \
   117  	  hipe_adj_list \
   118  	  hipe_temp_map \
   119 -	  hipe_optimistic_regalloc \
   120  	  hipe_coalescing_regalloc \
   121  	  hipe_graph_coloring_regalloc \
   122  	  hipe_regalloc_loop \
   123 Index: lib/stdlib/src/calendar.erl
   124 --- lib/stdlib/src/calendar.erl.orig	2010-12-07 16:07:22.000000000 +0100
   125 +++ lib/stdlib/src/calendar.erl	2010-12-09 17:23:16.000000000 +0100
   126 @@ -279,11 +279,19 @@
   127        DateTime1 :: datetime1970(),
   128        DateTime :: datetime1970().
   129  local_time_to_universal_time_dst(DateTime) ->
   130 -    UtDst = erlang:localtime_to_universaltime(DateTime, true),
   131 -    Ut    = erlang:localtime_to_universaltime(DateTime, false),
   132      %% Reverse check the universal times
   133 -    LtDst = erlang:universaltime_to_localtime(UtDst),
   134 -    Lt    = erlang:universaltime_to_localtime(Ut),
   135 +    {UtDst, LtDst} =
   136 +        try
   137 +            UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
   138 +            {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
   139 +        catch error:badarg -> {error, error}
   140 +        end,
   141 +    {Ut, Lt} =
   142 +        try
   143 +            Ut0 = erlang:localtime_to_universaltime(DateTime, false),
   144 +            {Ut0, erlang:universaltime_to_localtime(Ut0)}
   145 +        catch error:badarg -> {error, error}
   146 +        end,
   147      %% Return the valid universal times
   148      case {LtDst,Lt} of
   149  	{DateTime,DateTime} when UtDst =/= Ut ->
   150 Index: lib/wx/configure
   151 --- lib/wx/configure.orig	2010-12-07 16:07:22.000000000 +0100
   152 +++ lib/wx/configure	2010-12-09 17:23:16.000000000 +0100
   153 @@ -4065,7 +4065,7 @@
   154  	;;
   155      *)
   156  	DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS"
   157 -	CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
   158 +	CFLAGS="-Wall -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS %%CFLAGS%%"
   159  	;;
   160  esac

mercurial