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