michael@780: Index: erts/emulator/Makefile.in michael@780: --- erts/emulator/Makefile.in.orig 2010-12-07 16:07:22.000000000 +0100 michael@780: +++ erts/emulator/Makefile.in 2010-12-09 17:06:47.000000000 +0100 michael@780: @@ -617,7 +617,7 @@ michael@780: michael@780: michael@780: $(OBJDIR)/%.o: beam/%.c michael@780: - $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ michael@780: + $(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ michael@780: michael@780: $(OBJDIR)/%.o: $(TARGET)/%.c michael@780: $(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ michael@780: Index: erts/emulator/hipe/hipe_x86.c michael@780: --- erts/emulator/hipe/hipe_x86.c.orig 2010-12-07 16:07:22.000000000 +0100 michael@780: +++ erts/emulator/hipe/hipe_x86.c 2010-12-09 17:23:16.000000000 +0100 michael@780: @@ -130,7 +130,7 @@ michael@780: abort(); michael@780: map_start = mmap(map_hint, map_bytes, michael@780: PROT_EXEC|PROT_READ|PROT_WRITE, michael@780: - MAP_PRIVATE|MAP_ANONYMOUS michael@780: + MAP_PRIVATE|MAP_ANON michael@780: #ifdef __x86_64__ michael@780: |MAP_32BIT michael@780: #endif michael@780: Index: lib/erl_interface/src/connect/ei_resolve.c michael@780: --- lib/erl_interface/src/connect/ei_resolve.c.orig 2010-12-07 16:07:22.000000000 +0100 michael@780: +++ lib/erl_interface/src/connect/ei_resolve.c 2010-12-09 17:23:16.000000000 +0100 michael@780: @@ -54,6 +54,10 @@ michael@780: #include "ei_resolve.h" michael@780: #include "ei_locking.h" michael@780: michael@780: +#if defined(HAVE_GETHOSTBYNAME_R) && defined(__FreeBSD__) michael@780: +#undef HAVE_GETHOSTBYNAME_R michael@780: +#endif michael@780: + michael@780: #ifdef HAVE_GETHOSTBYNAME_R michael@780: michael@780: void ei_init_resolve(void) michael@780: Index: lib/gs/src/tool_utils.erl michael@780: --- lib/gs/src/tool_utils.erl.orig 2010-12-07 16:07:22.000000000 +0100 michael@780: +++ lib/gs/src/tool_utils.erl 2010-12-09 17:23:16.000000000 +0100 michael@780: @@ -40,6 +40,9 @@ michael@780: }). michael@780: michael@780: michael@780: +%% Browser executable list (openURL command line protocol required) michael@780: +-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]). michael@780: + michael@780: %%---------------------------------------------------------------------- michael@780: %% open_help(Parent, File) michael@780: %% Parent = gsobj() (GS root object or parent window) michael@780: @@ -80,7 +83,7 @@ michael@780: {unix,Type} -> michael@780: case Type of michael@780: darwin -> "open " ++ File; michael@780: - _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" michael@780: + _Else -> unix_url_command("file:" ++ File) michael@780: end; michael@780: {win32,_AnyType} -> michael@780: "start " ++ filename:nativename(File); michael@780: @@ -95,7 +98,7 @@ michael@780: {unix,Type} -> michael@780: case Type of michael@780: darwin -> "open " ++ File; michael@780: - _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" michael@780: + _Else -> unix_url_command("file:" ++ File) michael@780: end; michael@780: {win32,_AnyType} -> michael@780: "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/"); michael@780: @@ -429,3 +432,53 @@ michael@780: [Last]; michael@780: insert_newlines(Other) -> michael@780: Other. michael@780: + michael@780: +%% find_browser(BrowserList) => string() | false michael@780: +%% BrowserList - [string()] michael@780: +%% Given a list of basenames, find the first available executable. michael@780: + michael@780: +find_browser([]) -> michael@780: + false; michael@780: + michael@780: +find_browser([H | T]) -> michael@780: + case os:find_executable(H) of michael@780: + false -> michael@780: + find_browser(T); michael@780: + Browser -> michael@780: + Browser michael@780: + end. michael@780: + michael@780: +%% unix_url_command(URL) => string() michael@780: +%% URL - string() michael@780: +%% Open an URL, using a browser which supports the openURL command michael@780: +%% line protocol. If no browser is found, the empty string will be michael@780: +%% returned. michael@780: + michael@780: +unix_url_command(URL) -> michael@780: + Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&", michael@780: + michael@780: + case os:getenv("BROWSER") of michael@780: + false -> michael@780: + %% look for a compatible browser michael@780: + case find_browser(?BROWSERS) of michael@780: + false -> michael@780: + ""; michael@780: + Browser -> michael@780: + case regexp:gsub(Template, "BROWSER", Browser) of michael@780: + {ok, Command, 0} -> michael@780: + %% Template does not contain "BROWSER" placeholder michael@780: + ""; michael@780: + {ok, Command, _} -> michael@780: + Command michael@780: + end michael@780: + end; michael@780: + michael@780: + Value -> michael@780: + case regexp:gsub(Template, "BROWSER", Value) of michael@780: + {ok, Command2, 0} -> michael@780: + %% no placeholder michael@780: + ""; michael@780: + {ok, Command2, _} -> michael@780: + Command2 michael@780: + end michael@780: + end. michael@780: Index: lib/hipe/regalloc/Makefile michael@780: --- lib/hipe/regalloc/Makefile.orig 2010-12-07 16:07:22.000000000 +0100 michael@780: +++ lib/hipe/regalloc/Makefile 2010-12-09 17:23:16.000000000 +0100 michael@780: @@ -46,7 +46,6 @@ michael@780: hipe_node_sets hipe_spillcost hipe_reg_worklists \ michael@780: hipe_adj_list \ michael@780: hipe_temp_map \ michael@780: - hipe_optimistic_regalloc \ michael@780: hipe_coalescing_regalloc \ michael@780: hipe_graph_coloring_regalloc \ michael@780: hipe_regalloc_loop \ michael@780: Index: lib/stdlib/src/calendar.erl michael@780: --- lib/stdlib/src/calendar.erl.orig 2010-12-07 16:07:22.000000000 +0100 michael@780: +++ lib/stdlib/src/calendar.erl 2010-12-09 17:23:16.000000000 +0100 michael@780: @@ -216,11 +216,19 @@ michael@780: michael@780: -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()]. michael@780: local_time_to_universal_time_dst(DateTime) -> michael@780: - UtDst = erlang:localtime_to_universaltime(DateTime, true), michael@780: - Ut = erlang:localtime_to_universaltime(DateTime, false), michael@780: %% Reverse check the universal times michael@780: - LtDst = erlang:universaltime_to_localtime(UtDst), michael@780: - Lt = erlang:universaltime_to_localtime(Ut), michael@780: + {UtDst, LtDst} = michael@780: + try michael@780: + UtDst0 = erlang:localtime_to_universaltime(DateTime, true), michael@780: + {UtDst0, erlang:universaltime_to_localtime(UtDst0)} michael@780: + catch error:badarg -> {error, error} michael@780: + end, michael@780: + {Ut, Lt} = michael@780: + try michael@780: + Ut0 = erlang:localtime_to_universaltime(DateTime, false), michael@780: + {Ut0, erlang:universaltime_to_localtime(Ut0)} michael@780: + catch error:badarg -> {error, error} michael@780: + end, michael@780: %% Return the valid universal times michael@780: case {LtDst,Lt} of michael@780: {DateTime,DateTime} when UtDst =/= Ut -> michael@780: Index: lib/tools/emacs/test.erl michael@780: Index: lib/wx/configure michael@780: --- lib/wx/configure.orig 2010-12-07 16:07:22.000000000 +0100 michael@780: +++ lib/wx/configure 2010-12-09 17:23:16.000000000 +0100 michael@780: @@ -3910,7 +3910,7 @@ michael@780: ;; michael@780: *) michael@780: DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS" michael@780: - CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS" michael@780: + CFLAGS="-Wall -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS %%CFLAGS%%" michael@780: ;; michael@780: esac michael@780: