[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gethostname library function



|>I think it would be more unix-like to reverse the order of those 2
|>things, and make the file /etc/hostname rather than /local/hostname.
|>I suppose to maintain compatibility, it will have to do:

|>	o Look for a file /etc/hostname and use the contents
|>	o Check for a HOSTNAME environment variable
|>	o Look for a file /local/hostname and use the contents

Well, what about a global configuration-file in which all absolute
path-names and thing like this may be configured?
I think about a file c:\etc\host.cnf which may contain some of the
following lines:
HOSTNAME=myhost
PASSWDFILE=d:\etc\passwd

and so on...
This file would be examined by the library at run time. If it does not
exists, we use the old defaults. As we might want to have this file
not in c:\etc there should be a configuration program (like fixstk) to
change this location in a compiled program...?
If you agree, I would change the libs (if I have the time)...

Bjarne
--
Bjarne Pohlers                | Institut  fuer  Numerische  und  instrumentelle
<bjarne@math.uni-muenster.de> |        Mathematik (Informatik) der WWU Muenster
CREN: BJARNE@DMSWWU1A         | Einsteinstrasse 62 | D-48149 Muenster | Germany
MAUS: Bjarne Pohlers @ MS2    | Phone: (x49) 251 - 83 37 54