*BSD News Article 55883


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!yarrina.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!newsfeed.internetmci.com!howland.reston.ans.net!newsserver.jvnc.net!news.Edu.TW!news.cc.nctu.edu.tw!news.csie.nctu.edu.tw!nematic.ieo.nctu.edu.tw
From: jou.chen@nematic.ieo.nctu.edu.tw ( 陳威州 Wei-Jou Chen )
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to compile CXterm in FreeBSD 2.1.0?
Date: 27 Nov 1995 01:34:02 GMT
Organization: CHEN 電腦資訊工作室
Lines: 85
Message-ID: <49b4ia$ikf@news.csie.nctu.edu.tw>
References: <492hok$a3q@news.ust.hk>
NNTP-Posting-Host: @a237119.nctu.edu.tw
X-Newsreader: TIN [version 1.2 PL2]

Mirage 最強幻像 (cscleung@ug.cs.ust.hk) wrote:

: I have get the cxterm for "ftp.cuhk.hk".  But I can't compile it in FreeBSD,
: anyone have suggestion.
	Applied the following patch for cxterm-5.0.p3 and compile it.
--Jou

diff -u -r cxterm-5.0/config.sh cxterm-5.0.freebsd/config.sh
--- cxterm-5.0/scripts/config.sh	Sat Mar 11 17:13:16 1995
+++ cxterm-5.0.freebsd/scripts/config.sh	Mon Nov  6 09:30:27 1995
@@ -63,7 +63,7 @@
 
 ## Main loop
 
-while /bin/true ; do
+while /usr/bin/true ; do
 
     # 1.0 Main menu
     cat << __MAIN_MENU__
diff -u -r cxterm-5.0/cxterm/main.c cxterm-5.0.freebsd/cxterm/main.c
--- cxterm-5.0/cxterm/main.c	Wed Aug  9 12:45:25 1995
+++ cxterm-5.0.freebsd/cxterm/main.c	Mon Nov  6 09:30:14 1995
@@ -292,25 +292,33 @@
 #ifdef UTMP_FILE
 #define UTMP_FILENAME UTMP_FILE
 #else
-#define UTMP_FILENAME "/etc/utmp"
+#define UTMP_FILENAME "/var/run/utmp"
 #endif
 #endif
 
 #ifndef LASTLOG_FILENAME
-#define LASTLOG_FILENAME "/usr/adm/lastlog"  /* only on BSD systems */
+#define LASTLOG_FILENAME "/var/log/lastlog"  /* only on BSD systems */
 #endif
 
+#define WTMP_FILE
+
 #ifndef WTMP_FILENAME
-#ifdef WTMP_FILE
-#define WTMP_FILENAME WTMP_FILE
+#ifdef WTMP_FILE 
+#define WTMP_FILENAME "/var/log/wtmp"
 #else
 #ifdef SYSV
-#define WTMP_FILENAME "/etc/wtmp"
+#define WTMP_FILENAME "/var/log/wtmp"
 #else
-#define WTMP_FILENAME "/usr/adm/wtmp"
+#define WTMP_FILENAME "/var/log/wtmp"
 #endif
 #endif
 #endif
+
+#define WTMP
+#define LASTLOG
+#define UTMP_FILENAME "/var/run/utmp"
+#define LASTLOG_FILENAME "/var/log/lastlog"  /* only on BSD systems */
+#define WTMP_FILENAME "/var/log/wtmp"
 
 #include <signal.h>
 
diff -u -r cxterm-5.0/cxterm/misc.c cxterm-5.0.freebsd/cxterm/misc.c
--- cxterm-5.0/cxterm/misc.c	Tue Jan 17 18:57:48 1995
+++ cxterm-5.0.freebsd/cxterm/misc.c	Mon Nov  6 09:30:22 1995
@@ -793,10 +793,10 @@
 #endif	/* DEBUG */
 }
 
-char *SysErrorMsg (n)
+const char *SysErrorMsg (n)
     int n;
 {
-    extern char *sys_errlist[];
+/*    extern char *sys_errlist[]; */
     extern int sys_nerr;
 
     return ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error");

--
==  Wei-Jou Chen ( 陳威州 ) at Chen Sweet Home                        ==
==  Email:jou.chen@nematic.ieo.nctu.edu.tw                            ==
==  Mail : No. 25, Lane 878, Nan-Ta Road, Hsinchu, Taiwan   __o       ==
==         新竹市南大路878巷25號                           _\<,_,     ==
==  Fax/Data: +886-35-613285  Tel: +886-35-266575   .  ..(*)/(*)      ==