Erlang Irix port

Shawn Pearce pearcs@REDACTED
Thu Dec 10 07:18:01 CET 1998


I already sent Klacke (<klacke@REDACTED>) a patch to make Erlang
compile and execute on Irix (4 lines to sys.h).  Today i tried to start playing
with distributed Erlang, but couldn't figure out why i kept getting the error
{error,enoent} or {error,nxdomain}.  3 hours later i was able to track through
the enough of Erlang to find out why:  Irix's resolv.conf file uses
"hostresorder" to name the order to search resource in.  (This is "lookup" on
other systems apparently, or "order" on Solaris.)  Irix also uses "local" to
mean the "hosts" file.

Attached are two patches that fix this, they patch inet_parse.erl and
inet_db.erl.  I'm assuming you guys can handle a new-style context diff. ;-)

BTW, I wonder if Ericsson would setup a CVS server for Erlang.  This way we can
keep a local copy, and diff against the server a little easier. Plus, as things
go in that aren't quite "release" ready, but that would be good for developers,
we can get them on our local copies.

I for one intend on helping out with the TODO list as much as I can -- Right
after i finish the Erlang book and get myself comfortable in the lang and
environment.

--
Shawn.

(The above are the rantings of a body without a mind.)
-------------- next part --------------
*** inet_parse.erl	Tue Dec  8 11:08:39 1998
--- /d2/users/spearce/tmp/erlang/erlang-47.4.0-spearce/libraries/kernel-2.1.4/src//inet_parse.erl	Thu Dec 10 00:59:32 1998
***************
*** 131,136 ****
--- 131,138 ----
  		 {search, List};
  	    (["lookup" | Types]) ->
  		 {lookup, Types};
+ 	    (["hostresorder" | Types]) ->	% Irix uses this in its resolv.conf
+ 		 {lookup, Types};
  	    (_) ->
  		 skip  %% there are too many local options, we MUST skip
  	 end,
*** inet_db.erl	Tue Dec  8 11:08:39 1998
--- /d2/users/spearce/tmp/erlang/erlang-47.4.0-spearce/libraries/kernel-2.1.4/src//inet_db.erl	Thu Dec 10 00:59:46 1998
***************
*** 304,309 ****
--- 304,310 ----
  translate_lookup(["bind" | Ls]) -> [dns | translate_lookup(Ls)];
  translate_lookup(["dns" | Ls]) -> [dns | translate_lookup(Ls)];
  translate_lookup(["hosts" | Ls]) -> [file | translate_lookup(Ls)];
+ translate_lookup(["local" | Ls]) -> [file | translate_lookup(Ls)];
  translate_lookup(["files" | Ls]) -> [file | translate_lookup(Ls)];
  translate_lookup(["file" | Ls]) -> [file | translate_lookup(Ls)];
  translate_lookup(["yp" | Ls]) -> [yp | translate_lookup(Ls)];


More information about the erlang-questions mailing list