From tpatro@REDACTED Thu Mar 3 09:18:35 2005 From: tpatro@REDACTED (Tamas Patrovics) Date: Thu, 3 Mar 2005 09:18:35 +0100 Subject: Support for compressed man lookup from Emacs Message-ID: On Debian the Erlang manpages are installed in a compressed format and are put into a separate "erl" section like this /usr/share/man/man3/snmp.3erl.gz From tpatro@REDACTED Thu Mar 3 09:22:32 2005 From: tpatro@REDACTED (Tamas Patrovics) Date: Thu, 3 Mar 2005 09:22:32 +0100 Subject: Support for compressed manpages when looking up documentation from Emacs Message-ID: On Debian the Erlang manpages are compressed and are put into a separate "erl" section like this /usr/share/man/man3/snmp.3erl.gz Here's a simple patch which modifies the regexps used for looking up manpages, so that documentation lookup works with these kind of man pages too. I'm not a member of the list, so please CC me if you have a question. regards, Tamas --- /usr/share/emacs/site-lisp/erlang/erlang.el 2004-11-25 05:48:48.000000000 +0100 +++ erlang.el 2005-03-03 09:07:44.000000000 +0100 @@ -2529,7 +2529,7 @@ (defun erlang-man-get-files (dir) "Return files in directory DIR." - (directory-files dir t ".*\\.[0-9]\\'")) + (directory-files dir t ".*\\.[0-9]\\([a-z]+\\)?\\(\\.gz\\)?\\'")) (defun erlang-man-module (&optional module) @@ -2549,7 +2549,7 @@ (if (or (null module) (string= module "")) (error "No Erlang module name given")) (let ((dir-list erlang-man-dirs) - (pat (concat "\\b" (regexp-quote module) "\\.[^.]$")) + (pat (concat "\\b" (regexp-quote module) "\\.[^.]\\([a-z]+\\)?\\(\\.gz\\)?$")) (file nil) file-list) (while (and dir-list (null file)) @@ -2690,7 +2690,7 @@ (error nil)) (if file (let ((process-environment (copy-sequence process-environment))) - (if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[^.]$" file) + (if (string-match "\\(.*\\)/man[^/]*/\\([^.]+\\)\\.[^.]\\([a-z]+\\)?\\(\\.gz\\)?$" file) (let ((dir (substring file (match-beginning 1) (match-end 1))) (page (substring file (match-beginning 2) (match-end 2)))) (if (fboundp 'setenv) From alexey@REDACTED Sat Mar 5 00:44:33 2005 From: alexey@REDACTED (Alexey Shchepin) Date: Sat, 05 Mar 2005 01:44:33 +0200 Subject: Bug in inet_db.erl Message-ID: <87vf872cym.fsf@alex.sevcom.net> Hi! There exists such domain at this moment: % host -t srv _xmpp-server._tcp.centova.net _xmpp-server._tcp.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net cluster.centova.net CNAME cluster.centova.net Possible CNAME loop Now try to run % erl -name test > inet_res:getbyname("_xmpp-server._tcp.centova.net", srv). Erlang VM will eat a lot of memory and then produce erl_crash.dump. Quick fix: --- inet_db.erl.orig Sat Mar 5 01:31:50 2005 +++ inet_db.erl Sat Mar 5 01:47:49 2005 @@ -546,7 +546,12 @@ case res_lookup_type(Domain,?S_CNAME,RRs) of [] -> {error, nxdomain}; [CName | _] -> - res_hostent_by_domain(CName, [Domain | Aliases], Type, RRs) + case lists:member(CName, [Domain | Aliases]) of + true -> {error, nxdomain}; + false -> + res_hostent_by_domain(CName, [Domain | Aliases], + Type, RRs) + end end; Addrs -> {ok, make_hostent(Domain, Addrs, Aliases,Type)} From sean.hinde@REDACTED Mon Mar 7 22:55:36 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 7 Mar 2005 21:55:36 +0000 Subject: OS X os_mon broken Message-ID: <9908d4ab376d89325ec0723084e51708@mac.com> Hi, os_mon-1.6.2 is still broken under OS X darwin. The following patch restores what was in my original patch. This makes the solution much less susceptible to changes in the output of uptime. Regards, Sean --- cpu_sup.erl.orig Fri Jun 25 14:25:58 2004 +++ cpu_sup.erl Mon Mar 7 21:50:04 2005 @@ -274,11 +274,11 @@ end; get_int_measurement(Request, #state{os_type = {unix, darwin}}) -> D = os:cmd("uptime") -- "\n", - {ok, [L1, L5, L15], _} = io_lib:fread("~*s~*s~*s~*s~*s~*s~*s~f,~f,~f", D), + [L15, L5, L1|_] = lists:reverse(string:tokens(D, ", ")), case Request of - ?avg1 -> sunify(L1); - ?avg5 -> sunify(L5); - ?avg15 -> sunify(L15); + ?avg1 -> sunify(list_to_float(L1)); + ?avg5 -> sunify(list_to_float(L5)); + ?avg15 -> sunify(list_to_float(L15)); ?ping -> 4711; ?nprocs -> Ps = os:cmd("/bin/ps -ax | /usr/bin/wc -l"), From alexey@REDACTED Tue Mar 15 09:10:07 2005 From: alexey@REDACTED (Alexey Shchepin) Date: Tue, 15 Mar 2005 10:10:07 +0200 Subject: Bug in inet_db.erl In-Reply-To: <87vf872cym.fsf@alex.sevcom.net> (Alexey Shchepin's message of "Sat, 05 Mar 2005 01:44:33 +0200") References: <87vf872cym.fsf@alex.sevcom.net> Message-ID: <878y4p49eo.fsf@alex.sevcom.net> Hi! On Sat, 05 Mar 2005 01:44:33 +0200, I said: AS> Now try to run AS> % erl -name test AS> > inet_res:getbyname("_xmpp-server._tcp.centova.net", srv). AS> Erlang VM will eat a lot of memory and then produce erl_crash.dump. AS> Quick fix: Sorry, it was incomplete fix. Corrected patch: --- inet_db.erl.orig Sat Mar 5 01:31:50 2005 +++ inet_db.erl Tue Mar 15 10:58:50 2005 @@ -511,7 +511,12 @@ case lookup_cname(Domain) of [] -> {error, nxdomain}; [CName | _] -> - hostent_by_domain(CName, [Domain | Aliases], Type) + case lists:member(CName, [Domain | Aliases]) of + true -> {error, nxdomain}; + false -> + hostent_by_domain(CName, [Domain | Aliases], + Type) + end end; Addrs -> {ok, make_hostent(Domain, Addrs, Aliases,Type)} @@ -546,7 +551,12 @@ case res_lookup_type(Domain,?S_CNAME,RRs) of [] -> {error, nxdomain}; [CName | _] -> - res_hostent_by_domain(CName, [Domain | Aliases], Type, RRs) + case lists:member(CName, [Domain | Aliases]) of + true -> {error, nxdomain}; + false -> + res_hostent_by_domain(CName, [Domain | Aliases], + Type, RRs) + end end; Addrs -> {ok, make_hostent(Domain, Addrs, Aliases,Type)} From geoffw@REDACTED Wed Mar 23 17:27:13 2005 From: geoffw@REDACTED (Geoff White) Date: Wed, 23 Mar 2005 08:27:13 -0800 Subject: Patches to R10B-3 to facilitate builds on OpenBSD 3.7 Message-ID: <424198E1.3050800@cybertribe.com> The following patches are needed to get Erlang R10B-3 to build and install on OpenBSD 3.7-current. I hope that the Erlang developers can vet these patches and get them into the next release, especially the memsup.c patch. I've created a "port" for OpenBSd but this patch has been outstanding for a couple of patch releases against R10B. If you don't like this patch, fine but at least do something to fix it. Essential patch to memsup.c to allow the build to complete... ---------------------------------------------------------------------------- --- lib/os_mon/c_src/memsup.c.orig Wed Oct 2 14:16:37 2002 +++ lib/os_mon/c_src/memsup.c Sun Mar 13 01:44:20 2005 @@ -95,7 +95,11 @@ #ifdef BSD4_4 #include #include -#include +#ifdef __OpenBSD__ +#include +#else +#include +#endif #ifdef __FreeBSD__ #include #endif ------------------------------------------------------------------------ (Essential) Allows the man pages to be properly built and installed under openBSD... ---------------------------------------------------------------------------- --- erts/etc/unix/format_man_pages.orig Mon Sep 20 14:09:14 1999 +++ erts/etc/unix/format_man_pages Sun Mar 13 01:54:41 2005 @@ -29,6 +29,8 @@ case $SYS:$REL in TARGET=sunos5 ;; Linux:*) TARGET=linux ;; + OpenBSD:3.*) + TARGET=openbsd ;; *) TARGET="" ;; esac @@ -106,6 +108,8 @@ then else if [ -f "/vmunix" ]; then CATMAN=/usr/etc/catman + elif [ "$TARGET" = "openbsd" ]; then + CATMAN=/usr/sbin/catman else CATMAN=/usr/bin/catman fi --------------------------------------------------------------------------------- (optional) this prevents blow up if the path to perl involves "/" when a "fake" install is happening. ---------------------------------------------------------------------------------- --- lib/snmp/mibs/Makefile.in.orig Fri Oct 1 04:54:31 2004 +++ lib/snmp/mibs/Makefile.in Sun Mar 13 22:07:36 2005 @@ -121,7 +121,7 @@ OTP_MIBDIR = $(shell if test -d ../../ot debug opt: $(TARGET_FILES) $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1: $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1.src - $(PERL) -p -e 's/%PERL%/$(PERL)/ ' < $< > $@ + $(PERL) -p -e 's?%PERL%?$(PERL)? ' < $< > $@ chmod 755 $@ $(SNMP_BIN_TARGET_DIR)/OTP-REG.bin: $(ERL_TOP)/lib/$(OTP_MIBDIR)/mibs/OTP-RE G.mib ----------------------------------------------------------- From bjorn@REDACTED Thu Mar 24 06:52:19 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 24 Mar 2005 06:52:19 +0100 Subject: Patches to R10B-3 to facilitate builds on OpenBSD 3.7 In-Reply-To: <424198E1.3050800@cybertribe.com> References: <424198E1.3050800@cybertribe.com> Message-ID: The memsup patch is already included in OTP R10B-4. We'll try to include the other patches in R10B-5. /Bjorn Geoff White writes: > The following patches are needed to get Erlang R10B-3 to build and > install on OpenBSD 3.7-current. > I hope that the Erlang developers can vet these patches and get them > into the next release, especially the memsup.c patch. I've created a > "port" for OpenBSd but this patch has been outstanding for a couple of > patch releases against R10B. If you don't like this patch, fine but at > least do something to fix it. > > > > Essential patch to memsup.c to allow the build to complete... > ---------------------------------------------------------------------------- > --- lib/os_mon/c_src/memsup.c.orig Wed Oct 2 14:16:37 2002 > +++ lib/os_mon/c_src/memsup.c Sun Mar 13 01:44:20 2005 > @@ -95,7 +95,11 @@ > #ifdef BSD4_4 > #include > #include > -#include > +#ifdef __OpenBSD__ > +#include > +#else > +#include > +#endif > #ifdef __FreeBSD__ > #include > #endif > > ------------------------------------------------------------------------ > > > (Essential) Allows the man pages to be properly built and installed > under openBSD... > ---------------------------------------------------------------------------- > --- erts/etc/unix/format_man_pages.orig Mon Sep 20 14:09:14 1999 > +++ erts/etc/unix/format_man_pages Sun Mar 13 01:54:41 2005 > @@ -29,6 +29,8 @@ case $SYS:$REL in > TARGET=sunos5 ;; > Linux:*) > TARGET=linux ;; > + OpenBSD:3.*) > + TARGET=openbsd ;; > *) > TARGET="" ;; > esac > @@ -106,6 +108,8 @@ then > else > if [ -f "/vmunix" ]; then > CATMAN=/usr/etc/catman > + elif [ "$TARGET" = "openbsd" ]; then > + CATMAN=/usr/sbin/catman > else > CATMAN=/usr/bin/catman > fi > --------------------------------------------------------------------------------- > (optional) this prevents blow up if the path to perl involves "/" when > a "fake" install is happening. > ---------------------------------------------------------------------------------- > --- lib/snmp/mibs/Makefile.in.orig Fri Oct 1 04:54:31 2004 > +++ lib/snmp/mibs/Makefile.in Sun Mar 13 22:07:36 2005 > @@ -121,7 +121,7 @@ OTP_MIBDIR = $(shell if test -d ../../ot > debug opt: $(TARGET_FILES) > $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1: > $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1.src > - $(PERL) -p -e 's/%PERL%/$(PERL)/ ' < $< > $@ > + $(PERL) -p -e 's?%PERL%?$(PERL)? ' < $< > $@ > chmod 755 $@ > $(SNMP_BIN_TARGET_DIR)/OTP-REG.bin: > $(ERL_TOP)/lib/$(OTP_MIBDIR)/mibs/OTP-RE > G.mib > ----------------------------------------------------------- > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB