1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/erlang/erlang.patch Tue Jul 02 17:58:45 2013 +0200 1.3 @@ -0,0 +1,174 @@ 1.4 +Index: erts/emulator/Makefile.in 1.5 +--- erts/emulator/Makefile.in.orig 2010-12-07 16:07:22.000000000 +0100 1.6 ++++ erts/emulator/Makefile.in 2010-12-09 17:06:47.000000000 +0100 1.7 +@@ -617,7 +617,7 @@ 1.8 + 1.9 + 1.10 + $(OBJDIR)/%.o: beam/%.c 1.11 +- $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ 1.12 ++ $(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ 1.13 + 1.14 + $(OBJDIR)/%.o: $(TARGET)/%.c 1.15 + $(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ 1.16 +Index: erts/emulator/hipe/hipe_x86.c 1.17 +--- erts/emulator/hipe/hipe_x86.c.orig 2010-12-07 16:07:22.000000000 +0100 1.18 ++++ erts/emulator/hipe/hipe_x86.c 2010-12-09 17:23:16.000000000 +0100 1.19 +@@ -130,7 +130,7 @@ 1.20 + abort(); 1.21 + map_start = mmap(map_hint, map_bytes, 1.22 + PROT_EXEC|PROT_READ|PROT_WRITE, 1.23 +- MAP_PRIVATE|MAP_ANONYMOUS 1.24 ++ MAP_PRIVATE|MAP_ANON 1.25 + #ifdef __x86_64__ 1.26 + |MAP_32BIT 1.27 + #endif 1.28 +Index: lib/erl_interface/src/connect/ei_resolve.c 1.29 +--- lib/erl_interface/src/connect/ei_resolve.c.orig 2010-12-07 16:07:22.000000000 +0100 1.30 ++++ lib/erl_interface/src/connect/ei_resolve.c 2010-12-09 17:23:16.000000000 +0100 1.31 +@@ -54,6 +54,10 @@ 1.32 + #include "ei_resolve.h" 1.33 + #include "ei_locking.h" 1.34 + 1.35 ++#if defined(HAVE_GETHOSTBYNAME_R) && defined(__FreeBSD__) 1.36 ++#undef HAVE_GETHOSTBYNAME_R 1.37 ++#endif 1.38 ++ 1.39 + #ifdef HAVE_GETHOSTBYNAME_R 1.40 + 1.41 + void ei_init_resolve(void) 1.42 +Index: lib/gs/src/tool_utils.erl 1.43 +--- lib/gs/src/tool_utils.erl.orig 2010-12-07 16:07:22.000000000 +0100 1.44 ++++ lib/gs/src/tool_utils.erl 2010-12-09 17:23:16.000000000 +0100 1.45 +@@ -40,6 +40,9 @@ 1.46 + }). 1.47 + 1.48 + 1.49 ++%% Browser executable list (openURL command line protocol required) 1.50 ++-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]). 1.51 ++ 1.52 + %%---------------------------------------------------------------------- 1.53 + %% open_help(Parent, File) 1.54 + %% Parent = gsobj() (GS root object or parent window) 1.55 +@@ -80,7 +83,7 @@ 1.56 + {unix,Type} -> 1.57 + case Type of 1.58 + darwin -> "open " ++ File; 1.59 +- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" 1.60 ++ _Else -> unix_url_command("file:" ++ File) 1.61 + end; 1.62 + {win32,_AnyType} -> 1.63 + "start " ++ filename:nativename(File); 1.64 +@@ -95,7 +98,7 @@ 1.65 + {unix,Type} -> 1.66 + case Type of 1.67 + darwin -> "open " ++ File; 1.68 +- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" 1.69 ++ _Else -> unix_url_command("file:" ++ File) 1.70 + end; 1.71 + {win32,_AnyType} -> 1.72 + "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/"); 1.73 +@@ -429,3 +432,53 @@ 1.74 + [Last]; 1.75 + insert_newlines(Other) -> 1.76 + Other. 1.77 ++ 1.78 ++%% find_browser(BrowserList) => string() | false 1.79 ++%% BrowserList - [string()] 1.80 ++%% Given a list of basenames, find the first available executable. 1.81 ++ 1.82 ++find_browser([]) -> 1.83 ++ false; 1.84 ++ 1.85 ++find_browser([H | T]) -> 1.86 ++ case os:find_executable(H) of 1.87 ++ false -> 1.88 ++ find_browser(T); 1.89 ++ Browser -> 1.90 ++ Browser 1.91 ++ end. 1.92 ++ 1.93 ++%% unix_url_command(URL) => string() 1.94 ++%% URL - string() 1.95 ++%% Open an URL, using a browser which supports the openURL command 1.96 ++%% line protocol. If no browser is found, the empty string will be 1.97 ++%% returned. 1.98 ++ 1.99 ++unix_url_command(URL) -> 1.100 ++ Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&", 1.101 ++ 1.102 ++ case os:getenv("BROWSER") of 1.103 ++ false -> 1.104 ++ %% look for a compatible browser 1.105 ++ case find_browser(?BROWSERS) of 1.106 ++ false -> 1.107 ++ ""; 1.108 ++ Browser -> 1.109 ++ case regexp:gsub(Template, "BROWSER", Browser) of 1.110 ++ {ok, Command, 0} -> 1.111 ++ %% Template does not contain "BROWSER" placeholder 1.112 ++ ""; 1.113 ++ {ok, Command, _} -> 1.114 ++ Command 1.115 ++ end 1.116 ++ end; 1.117 ++ 1.118 ++ Value -> 1.119 ++ case regexp:gsub(Template, "BROWSER", Value) of 1.120 ++ {ok, Command2, 0} -> 1.121 ++ %% no placeholder 1.122 ++ ""; 1.123 ++ {ok, Command2, _} -> 1.124 ++ Command2 1.125 ++ end 1.126 ++ end. 1.127 +Index: lib/hipe/regalloc/Makefile 1.128 +--- lib/hipe/regalloc/Makefile.orig 2010-12-07 16:07:22.000000000 +0100 1.129 ++++ lib/hipe/regalloc/Makefile 2010-12-09 17:23:16.000000000 +0100 1.130 +@@ -46,7 +46,6 @@ 1.131 + hipe_node_sets hipe_spillcost hipe_reg_worklists \ 1.132 + hipe_adj_list \ 1.133 + hipe_temp_map \ 1.134 +- hipe_optimistic_regalloc \ 1.135 + hipe_coalescing_regalloc \ 1.136 + hipe_graph_coloring_regalloc \ 1.137 + hipe_regalloc_loop \ 1.138 +Index: lib/stdlib/src/calendar.erl 1.139 +--- lib/stdlib/src/calendar.erl.orig 2010-12-07 16:07:22.000000000 +0100 1.140 ++++ lib/stdlib/src/calendar.erl 2010-12-09 17:23:16.000000000 +0100 1.141 +@@ -216,11 +216,19 @@ 1.142 + 1.143 + -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()]. 1.144 + local_time_to_universal_time_dst(DateTime) -> 1.145 +- UtDst = erlang:localtime_to_universaltime(DateTime, true), 1.146 +- Ut = erlang:localtime_to_universaltime(DateTime, false), 1.147 + %% Reverse check the universal times 1.148 +- LtDst = erlang:universaltime_to_localtime(UtDst), 1.149 +- Lt = erlang:universaltime_to_localtime(Ut), 1.150 ++ {UtDst, LtDst} = 1.151 ++ try 1.152 ++ UtDst0 = erlang:localtime_to_universaltime(DateTime, true), 1.153 ++ {UtDst0, erlang:universaltime_to_localtime(UtDst0)} 1.154 ++ catch error:badarg -> {error, error} 1.155 ++ end, 1.156 ++ {Ut, Lt} = 1.157 ++ try 1.158 ++ Ut0 = erlang:localtime_to_universaltime(DateTime, false), 1.159 ++ {Ut0, erlang:universaltime_to_localtime(Ut0)} 1.160 ++ catch error:badarg -> {error, error} 1.161 ++ end, 1.162 + %% Return the valid universal times 1.163 + case {LtDst,Lt} of 1.164 + {DateTime,DateTime} when UtDst =/= Ut -> 1.165 +Index: lib/tools/emacs/test.erl 1.166 +Index: lib/wx/configure 1.167 +--- lib/wx/configure.orig 2010-12-07 16:07:22.000000000 +0100 1.168 ++++ lib/wx/configure 2010-12-09 17:23:16.000000000 +0100 1.169 +@@ -3910,7 +3910,7 @@ 1.170 + ;; 1.171 + *) 1.172 + DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS" 1.173 +- CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS" 1.174 ++ CFLAGS="-Wall -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS %%CFLAGS%%" 1.175 + ;; 1.176 + esac 1.177 +