home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TCPIP / NETKIT-M.01 / NETKIT-M~ / NetKit-M-0.01 / elm-2.4.23.dif next >
Encoding:
Text File  |  1994-07-17  |  8.2 KB  |  353 lines

  1. --- Configure
  2. +++ Configure    1994/06/17 12:16:58
  3. @@ -56,7 +56,7 @@
  4.  ranlib=''
  5.  package=''
  6.  pager=''
  7. -prefshell=''
  8. +prefshell='/bin/bash'
  9.  startsh=''
  10.  d_eunice=''
  11.  define=''
  12. @@ -124,31 +124,29 @@
  13.  c_date=''
  14.  d_ascii=''
  15.  d_broke_ctype=''
  16. -d_calendar=''
  17. +d_calendar='undef'
  18.  calendar=''
  19.  d_chown_neg1=''
  20. -d_content=''
  21. +d_content='define'
  22.  d_crypt=''
  23.  cryptlib=''
  24.  d_cuserid=''
  25. -d_disphost=''
  26. -d_domname=''
  27. -d_usegetdom=''
  28. -d_errlst=''
  29. -d_flock=''
  30. -d_dotlock=''
  31. -d_fcntlock=''
  32. +d_disphost='define'
  33. +d_errlst='define'
  34. +d_flock='define'
  35. +d_dotlock='undef'
  36. +d_fcntlock='undef'
  37.  lock_dir=''
  38.  has_flock=''
  39.  has_fcntl=''
  40.  d_ftruncate=''
  41. -d_gethname=''
  42. +d_gethname='define'
  43.  d_douname=''
  44.  d_host_comp=''
  45.  ign_hname=''
  46.  d_havetlib=''
  47.  termlib=''
  48. -d_index=''
  49. +d_index='undef'
  50.  d_internet=''
  51.  d_ispell=''
  52.  ispell_path=''
  53. @@ -158,11 +156,11 @@
  54.  d_msgcat=''
  55.  d_usenls=''
  56.  d_mallocvoid=''
  57. -d_mboxedit=''
  58. -d_mime=''
  59. -defencoding=''
  60. +d_mboxedit='define'
  61. +d_mime='define'
  62. +defencoding='7bit'
  63.  defcharset=''
  64. -defdispcharset=''
  65. +defdispcharset='ISO-8859-1'
  66.  d_mmdf=''
  67.  d_newauto=''
  68.  d_noaddfrom=''
  69. @@ -208,7 +206,6 @@
  70.  editoropts=''
  71.  hostname=''
  72.  phostname=''
  73. -mydomain=''
  74.  autohostname=''
  75.  i_memory=''
  76.  i_stdarg=''
  77. @@ -222,11 +219,11 @@
  78.  lib=''
  79.  libc=''
  80.  linepr=''
  81. -maildir=''
  82. +maildir='/var/mail'
  83.  mailer=''
  84.  mailgrp=''
  85. -mansrc=''
  86. -catmansrc=''
  87. +mansrc='/usr/man/man1'
  88. +catmansrc='none'
  89.  manext=''
  90.  manext_choice=''
  91.  catmanext=''
  92. @@ -242,15 +239,15 @@
  93.  medium=''
  94.  large=''
  95.  huge=''
  96. -optimize=''
  97. +optimize='-O6 -fomit-frame-pointer -m486'
  98.  ccflags=''
  99.  cppflags=''
  100. -ldflags=''
  101. +ldflags='-s -v'
  102.  cc=''
  103.  libs=''
  104.  nametype=''
  105.  d_passnames=''
  106. -d_berknames=''
  107. +d_berknames='define'
  108.  d_usgnames=''
  109.  passcat=''
  110.  rmttape=''
  111. @@ -2384,6 +2381,9 @@
  112.      elif $contains EWOULDBLOCK /usr/include/sys/errno.h > /dev/null 2>&1; then
  113.          has_flock="$define"
  114.          echo 'flock locking available.'
  115. +    elif $contains EWOULDBLOCK /usr/include/linux/errno.h > /dev/null 2>&1; then
  116. +    has_flock="$define"
  117. +    echo 'flock locking available.'
  118.      else
  119.      has_flock="$undef"
  120.          echo 'flock locking not available.'
  121. @@ -2406,6 +2406,9 @@
  122.  elif $contains F_SETLK /usr/include/fcntl.h >/dev/null 2>&1; then
  123.      echo 'F_SETLK found, fcntl locking available'
  124.      has_fcntl="$define"
  125. +elif $contains F_SETLK /usr/include/linux/fcntl.h >/dev/null 2>&1; then
  126. +    echo 'F_SETLK found, fcntl locking available'
  127. +    has_fcntl="$define"
  128.  else
  129.      echo 'F_SETLK not found, fcntl locking not available'
  130.      has_fcntl="$undef"
  131. @@ -2624,34 +2627,11 @@
  132.      autohostname="$undef"
  133.  done
  134.  
  135. -echo " "
  136. -case "$hostname" in
  137. -*.*)
  138. -    dflt=`$expr "X$hostname" : "X[^.]*\(\..*\)"`
  139. -    hostname=`$expr "X$hostname" : "X\([^.]*\)\."`
  140. -    echo "(Trimming domain name from host name--host name is now $hostname)"
  141. -    ;;
  142. -*)  case "$mydomain" in
  143. -    '') dflt='.UUCP';;
  144. -    *) dflt="$mydomain";;
  145. -    esac
  146. -    ;;
  147. -esac
  148. -rp="What is your domain name? [$dflt]"
  149. -$echo $n "$rp $c"
  150. -. myread
  151. -case "$ans" in
  152. -'') ;;
  153. -.*) ;;
  154. -*) ans=".$ans";;
  155. -esac
  156. -mydomain="$ans"
  157. -
  158.  : a little sanity check here
  159.  case "$phostname" in
  160.  '') ;;
  161.  *)  case `$phostname` in
  162. -    $hostname$mydomain|$hostname) ;;
  163. +    $hostname) ;;
  164.      *)
  165.      case "$phostname" in
  166.      sed*)
  167. @@ -3885,47 +3865,6 @@
  168.  *)  d_useembed="$undef";;
  169.  esac
  170.  
  171. -: see if getdomainname exists
  172. -if $contains "^getdomainname\$" libc.list > /dev/null 2>&1; then
  173. -    echo "getdomainname() found"
  174. -    d_domname=$define;
  175. -elif $contains "^getdomnm\$" libc.list > /dev/null 2>&1; then
  176. -    echo "getdomainname() found"
  177. -    d_domname=$define;
  178. -else
  179. -    echo "getdomainname() not found"
  180. -    d_domname=$undef
  181. -fi
  182. -
  183. -case "$d_domname" in
  184. -"$define")    cat <<EOM
  185. -
  186. -The getdomainname system call was found.  When running NIS, this usually
  187. -returns the NIS domain and not the mail domain.  If this is the case,
  188. -it should not be used to obtain the domain name, and the domain name
  189. -should be compiled into the code, and the global elm.rc file should
  190. -be used to override the compiled in value.
  191. -
  192. -If the getdomainname call does return the correct mail domain, it can
  193. -be used.
  194. -
  195. -EOM
  196. -        case "$d_usegetdom" in
  197. -        "$define")    dflt=y;;
  198. -        "$undef")    dflt=n;;
  199. -        *)        dflt=y;;
  200. -        esac
  201. -        echo " "
  202. -        rp="Should getdomainname() be used to obtain the mail domain? [$dflt]"
  203. -        $echo $n "$rp $c"
  204. -        . myread
  205. -        case "$ans" in
  206. -        y*) d_usegetdom="$define";;
  207. -        *)  d_usegetdom="$undef";;
  208. -        esac
  209. -        ;;
  210. -*)        d_usegetdom="$undef";;
  211. -esac;
  212.  : see if we should include time.h, sys/time.h, or both
  213.  cat <<'EOM'
  214.    
  215. @@ -4853,8 +4792,6 @@
  216.  cryptlib='$cryptlib'
  217.  d_cuserid='$d_cuserid'
  218.  d_disphost='$d_disphost'
  219. -d_domname='$d_domname'
  220. -d_usegetdom='$d_usegetdom'
  221.  d_errlst='$d_errlst'
  222.  d_flock='$d_flock'
  223.  d_dotlock='$d_dotlock'
  224. @@ -4929,7 +4866,6 @@
  225.  editoropts='$editoropts'
  226.  hostname='$hostname'
  227.  phostname='$phostname'
  228. -mydomain='$mydomain'
  229.  autohostname='$autohostname'
  230.  i_memory='$i_memory'
  231.  i_stdarg='$i_stdarg'
  232. --- Makefile.Linux
  233. +++ Makefile.Linux    1994/06/17 12:16:58
  234. @@ -0,0 +1,11 @@
  235. +Makefile:
  236. +    sh Configure
  237. +
  238. +compile: Makefile
  239. +    make documentation
  240. +    make
  241. +
  242. +install: compile
  243. +    make install
  244. +
  245. +
  246. --- config.h.SH
  247. +++ config.h.SH    1994/06/17 12:16:58
  248. @@ -154,22 +154,6 @@
  249.   */
  250.  #$d_disphost    DISP_HOST /**/
  251.  
  252. -/* GETDOMAINNAME
  253. - *    This symbol, if defined, indicates that the getdomainname system call
  254. - *    is available to obtain the domain name.  Note that the $LIB/domain
  255. - *    file overrides the value of getdomainname().  If getdomainname() exists,
  256. - *    MYDOMAIN will be ignored.
  257. - */
  258. -/* USEGETDOMAINNAME
  259. - *    This symbol, if defined, indicates that the getdomainname system call
  260. - *    should be used to obtain the domain name.  Note that the $LIB/domain
  261. - *    file overrides the value of getdomainname().  If this variable is set
  262. - *    MYDOMAIN (and therefore DEFAULT_DOMAIN) will be ignored.
  263. - */
  264. -#$d_domname    GETDOMAINNAME        /**/
  265. -
  266. -#$d_usegetdom    USEGETDOMAINNAME        /**/
  267. -
  268.  /* ERRLST:
  269.   *    This symbol, if defined, indicates that the sys_errlist and sys_nerr
  270.   *    symbols exist.
  271. @@ -501,15 +485,7 @@
  272.   *    The dot comes with MYDOMAIN, and need not be supplied by the program.
  273.   *    If gethostname() or uname() exist, HOSTNAME may be ignored.
  274.   */
  275. -/* MYDOMAIN:
  276. - *    This symbol contains the domain of the host the program is going to
  277. - *    run on.  The domain must be appended to HOSTNAME to form a complete
  278. - *    host name.  The dot comes with MYDOMAIN, and need not be supplied by
  279. - *    the program.  If the host name is derived from PHOSTNAME, the domain
  280. - *    may or may not already be there, and the program should check.
  281. - */
  282.  #define HOSTNAME "$hostname"        /**/
  283. -#define MYDOMAIN "$mydomain"        /**/
  284.  
  285.  /* I_MEMORY:
  286.   *    This symbol, if defined, indicates that the file memory.h
  287. --- hdrs/sysdefs.SH
  288. +++ hdrs/sysdefs.SH    1994/06/17 12:16:58
  289. @@ -64,8 +64,6 @@
  290.  
  291.  #define DEFAULT_BATCH_SUBJECT  "$defbatsub"
  292.  
  293. -#define DEFAULT_DOMAIN  "$mydomain"  /* if mydomain file is missing */
  294. -
  295.  /** If you want to implement 'site hiding' in the mail, then you'll need to
  296.      uncomment the following lines and set them to reasonable values.  See 
  297.      the configuration guide for more details....(actually these are undoc-
  298. --- lib/Makefile.SH
  299. +++ lib/Makefile.SH    1994/06/17 12:17:21
  300. @@ -292,6 +292,7 @@
  301.  libutil.a:        $(LIB_OBJ)
  302.              $(AR) r $@ $?
  303.              $(RANLIB) $@
  304. +            ranlib libutil.a
  305.  
  306.  lint:        
  307.          $(LINT) $(LINTFLAGS) $(LIB_SRC) > LINT.OUT
  308. --- lib/opt_utils.c
  309. +++ lib/opt_utils.c    1994/06/17 12:22:17
  310. @@ -85,7 +85,9 @@
  311.  # endif
  312.  #endif
  313.  
  314. -#ifndef GETHOSTNAME
  315. +#include <netdb.h>
  316. +
  317. +#if ! defined( GETHOSTNAME) && ! defined(__linux__)
  318.  
  319.  gethostname(cur_hostname,size) /* get name of current host */
  320.  char *cur_hostname;
  321. @@ -136,7 +138,7 @@
  322.  char *hostdom;
  323.  int size;
  324.  {
  325. -    char    buf[64];
  326. +    char    buf[128];
  327.      FILE    *fp;
  328.      char    *p;
  329.  
  330. @@ -152,10 +154,18 @@
  331.          *p = '\0';
  332.      }
  333.      else {
  334. -#ifdef USEGETDOMAINNAME
  335. -      if (getdomainname(buf, sizeof(buf)) != 0)
  336. -#endif
  337. -        strfcpy(buf, DEFAULT_DOMAIN, sizeof(buf));
  338. +      if (gethostname(buf, sizeof(buf)) != 0)
  339. +        strfcpy(buf, ".no.domain.at.all", sizeof(buf));
  340. +      else {
  341. +        struct hostent * hp;
  342. +        char *tmp;
  343. +        if ((hp = gethostbyname(buf))) {
  344. +          tmp = strchr(hp->h_name, '.');
  345. +          /* We should do something better in case of 'tmp == NULL'.
  346. +         But this will happen only on misconfigured hosts. */
  347. +          strfcpy(buf, tmp? tmp : ".no.domain.at.all", sizeof(buf));
  348. +        } else strfcpy(buf, ".no.domain.at.all", sizeof(buf));
  349. +      }
  350.      }
  351.      if (buf[0] != '\0' && buf[0] != '.') {
  352.        *hostdom++ = '.';
  353.