Index: erts/emulator/Makefile.in --- erts/emulator/Makefile.in.orig 2010-06-11 17:29:24.000000000 +0200 +++ erts/emulator/Makefile.in 2010-06-17 20:03:27.000000000 +0200 @@ -601,7 +601,7 @@ $(OBJDIR)/%.o: beam/%.c - $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ + $(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ $(OBJDIR)/%.o: $(TARGET)/%.c $(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ Index: erts/emulator/beam/erl_time_sup.c --- erts/emulator/beam/erl_time_sup.c.orig 2010-02-19 19:03:57.000000000 +0100 +++ erts/emulator/beam/erl_time_sup.c 2010-06-17 20:03:27.000000000 +0200 @@ -650,6 +650,9 @@ t.tm_sec = *second; t.tm_isdst = isdst; the_clock = mktime(&t); + if (the_clock == -1) { + return 0; + } #ifdef HAVE_GMTIME_R gmtime_r(&the_clock, (tm = &tmbuf)); #else Index: erts/emulator/drivers/common/inet_drv.c --- erts/emulator/drivers/common/inet_drv.c.orig 2010-06-11 17:29:55.000000000 +0200 +++ erts/emulator/drivers/common/inet_drv.c 2010-06-17 20:03:27.000000000 +0200 @@ -5261,12 +5261,15 @@ if (pmtud_enable) cflags |= SPP_PMTUD_ENABLE; if (pmtud_disable) cflags |= SPP_PMTUD_DISABLE; +# ifdef HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY + /* The followings are missing in FreeBSD 7.1 */ sackdelay_enable =eflags& SCTP_FLAG_SACDELAY_ENABLE; sackdelay_disable=eflags& SCTP_FLAG_SACDELAY_DISABLE; if (sackdelay_enable && sackdelay_disable) return -1; if (sackdelay_enable) cflags |= SPP_SACKDELAY_ENABLE; if (sackdelay_disable) cflags |= SPP_SACKDELAY_DISABLE; +# endif arg.pap.spp_flags = cflags; # endif @@ -6167,13 +6170,15 @@ if (ap.spp_flags & SPP_PMTUD_DISABLE) { i = LOAD_ATOM (spec, i, am_pmtud_disable); n++; } - +# ifdef HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY + /* SPP_SACKDELAY_* not in FreeBSD 7.1 */ if (ap.spp_flags & SPP_SACKDELAY_ENABLE) { i = LOAD_ATOM (spec, i, am_sackdelay_enable); n++; } if (ap.spp_flags & SPP_SACKDELAY_DISABLE) { i = LOAD_ATOM (spec, i, am_sackdelay_disable); n++; } # endif +# endif PLACE_FOR(spec, i, LOAD_NIL_CNT + LOAD_LIST_CNT + 2*LOAD_TUPLE_CNT); Index: erts/emulator/hipe/hipe_x86.c --- erts/emulator/hipe/hipe_x86.c.orig 2009-03-12 13:16:21.000000000 +0100 +++ erts/emulator/hipe/hipe_x86.c 2010-06-17 20:03:27.000000000 +0200 @@ -130,7 +130,7 @@ abort(); map_start = mmap(map_hint, map_bytes, PROT_EXEC|PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS + MAP_PRIVATE|MAP_ANON #ifdef __x86_64__ |MAP_32BIT #endif Index: lib/erl_interface/src/connect/ei_resolve.c --- lib/erl_interface/src/connect/ei_resolve.c.orig 2009-03-12 13:19:12.000000000 +0100 +++ lib/erl_interface/src/connect/ei_resolve.c 2010-06-17 20:03:31.000000000 +0200 @@ -54,6 +54,10 @@ #include "ei_resolve.h" #include "ei_locking.h" +#if defined(HAVE_GETHOSTBYNAME_R) && defined(__FreeBSD__) +#undef HAVE_GETHOSTBYNAME_R +#endif + #ifdef HAVE_GETHOSTBYNAME_R void ei_init_resolve(void) Index: lib/gs/src/tool_utils.erl --- lib/gs/src/tool_utils.erl.orig 2010-06-11 17:31:38.000000000 +0200 +++ lib/gs/src/tool_utils.erl 2010-06-17 20:03:32.000000000 +0200 @@ -40,6 +40,9 @@ }). +%% Browser executable list (openURL command line protocol required) +-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]). + %%---------------------------------------------------------------------- %% open_help(Parent, File) %% Parent = gsobj() (GS root object or parent window) @@ -80,7 +83,7 @@ {unix,Type} -> case Type of darwin -> "open " ++ File; - _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" + _Else -> unix_url_command("file:" ++ File) end; {win32,_AnyType} -> "start " ++ filename:nativename(File); @@ -95,7 +98,7 @@ {unix,Type} -> case Type of darwin -> "open " ++ File; - _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" + _Else -> unix_url_command("file:" ++ File) end; {win32,_AnyType} -> "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/"); @@ -429,3 +432,53 @@ [Last]; insert_newlines(Other) -> Other. + +%% find_browser(BrowserList) => string() | false +%% BrowserList - [string()] +%% Given a list of basenames, find the first available executable. + +find_browser([]) -> + false; + +find_browser([H | T]) -> + case os:find_executable(H) of + false -> + find_browser(T); + Browser -> + Browser + end. + +%% unix_url_command(URL) => string() +%% URL - string() +%% Open an URL, using a browser which supports the openURL command +%% line protocol. If no browser is found, the empty string will be +%% returned. + +unix_url_command(URL) -> + Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&", + + case os:getenv("BROWSER") of + false -> + %% look for a compatible browser + case find_browser(?BROWSERS) of + false -> + ""; + Browser -> + case regexp:gsub(Template, "BROWSER", Browser) of + {ok, Command, 0} -> + %% Template does not contain "BROWSER" placeholder + ""; + {ok, Command, _} -> + Command + end + end; + + Value -> + case regexp:gsub(Template, "BROWSER", Value) of + {ok, Command2, 0} -> + %% no placeholder + ""; + {ok, Command2, _} -> + Command2 + end + end. Index: lib/hipe/regalloc/Makefile --- lib/hipe/regalloc/Makefile.orig 2010-02-19 19:04:05.000000000 +0100 +++ lib/hipe/regalloc/Makefile 2010-06-17 20:03:32.000000000 +0200 @@ -46,7 +46,6 @@ hipe_node_sets hipe_spillcost hipe_reg_worklists \ hipe_adj_list \ hipe_temp_map \ - hipe_optimistic_regalloc \ hipe_coalescing_regalloc \ hipe_graph_coloring_regalloc \ hipe_regalloc_loop \ Index: lib/stdlib/src/calendar.erl --- lib/stdlib/src/calendar.erl.orig 2009-09-18 16:06:56.000000000 +0200 +++ lib/stdlib/src/calendar.erl 2010-06-17 20:03:34.000000000 +0200 @@ -216,11 +216,19 @@ -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()]. local_time_to_universal_time_dst(DateTime) -> - UtDst = erlang:localtime_to_universaltime(DateTime, true), - Ut = erlang:localtime_to_universaltime(DateTime, false), %% Reverse check the universal times - LtDst = erlang:universaltime_to_localtime(UtDst), - Lt = erlang:universaltime_to_localtime(Ut), + {UtDst, LtDst} = + try + UtDst0 = erlang:localtime_to_universaltime(DateTime, true), + {UtDst0, erlang:universaltime_to_localtime(UtDst0)} + catch error:badarg -> {error, error} + end, + {Ut, Lt} = + try + Ut0 = erlang:localtime_to_universaltime(DateTime, false), + {Ut0, erlang:universaltime_to_localtime(Ut0)} + catch error:badarg -> {error, error} + end, %% Return the valid universal times case {LtDst,Lt} of {DateTime,DateTime} when UtDst =/= Ut -> Index: lib/tools/emacs/test.erl Index: lib/wx/configure --- lib/wx/configure.orig 2010-06-15 18:21:43.000000000 +0200 +++ lib/wx/configure 2010-06-17 20:03:34.000000000 +0200 @@ -3906,7 +3906,7 @@ ;; *) DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS" - CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS" + CFLAGS="-Wall -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS %%CFLAGS%%" ;; esac