[comp.unix.xenix] pcomm 1.1 on SCO Xenix

root@libove.UUCP (Jay M. Libove) (09/28/88)

I am trying to build pcomm 1.1 on SCO Xenix 286 v2.2.1 with Development
System v2.2.1, and when I start compiling as follows:

	cc -g -O -Ml2e -c chg_dir.c
chg_dir.c
chg_dir.c(10) : error 54: expected `(' to follow `chtype'
chg_dir.c(12) : error 59: syntax error : `{'
[ all the rest deleted ]


Now, the first occurrence I can find of chtype is in the header file
misc.h where there are defines: (I _do_ define OLDCURSES; SCO Xenix
terminfo has incompletenesses and conflicts...)

#ifdef OLDCURSES
typedef char chtype
#endif /* OLDCURSES */

#ifdef ACS_HLINE
#define VERT		(chtype)0
#define HORZ		(chtype)0
#else /* ACS_HLINE */
#define VERT		(chtype)'|'
#define HORZ		(chtype)'-'
#define ACS_VLINE	(chtype)'|'
#define ACS_HLINE	(chtype)'-'
#endif /* ACS_HLINE */

So. Perhaps someone can offer why this is failing?

Thanks

-- 
Jay Libove		ARPA:	jl42@andrew.cmu.edu or libove@cs.cmu.edu
5731 Centre Ave, Apt 3	BITnet:	jl42@andrew or jl42@drycas
Pittsburgh, PA 15206	UUCP:	uunet!nfsun!libove!libove or
(412) 362-8983		UUCP:	psuvax1!pitt!darth!libove!libove

jbayer@ispi.UUCP (id for use with uunet/usenet) (10/04/88)

In article <157@libove.UUCP>, root@libove.UUCP (Jay M. Libove) writes:
> 
> I am trying to build pcomm 1.1 on SCO Xenix 286 v2.2.1 with Development
> System v2.2.1, and when I start compiling as follows:
> 
> 	cc -g -O -Ml2e -c chg_dir.c
> chg_dir.c
> chg_dir.c(10) : error 54: expected `(' to follow `chtype'
> chg_dir.c(12) : error 59: syntax error : `{'
> [ all the rest deleted ]
> 
> 
> Now, the first occurrence I can find of chtype is in the header file
> misc.h where there are defines: (I _do_ define OLDCURSES; SCO Xenix
> terminfo has incompletenesses and conflicts...)

	The SCO Xenix terminfo is complete.  You DO have to declare a
manifest define in the compile line:
	-DM_TERMINFO as well as include the correct library:
	-ltinfo.   Using these options I have had no problems compiling
	and executing pcomm.

I have seen a number of messages from people trying to get pcomm to compile
under SCO Xenix.  I have therefore included below a shar file which
contains a makefile and a config.h for pcomm, patch level 3.  Unpack
this file after unpacking the pcomm files.  Then compile it.  

Jonathan Bayer
Intelligent Software Products, Inc.

- - - - - - - - - - - - - cut here - - - - - - - - - - - - -

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Makefile config.h
# Wrapped by news@ on Fri Sep 16 22:38:24 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(3727 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X#				PCOMM
X#			for generic System V Unix
X#
X# for systems without getcwd(3) or getopt(3)
X#
X#GETCWD = getcwd.o
X#GETOPT = getopt.o
X
XCFLAGS = -Ox -DM_TERMINFO 
X#CURSES = -ltermlib -lcurses
XCURSES = -lcurses
XLDFLAGS = -s -ltinfo -lx
XSHAR = shar -a
XBIN = /usr/local/bin
XCC = mcc
X
XPCOMM = $(GETCWD) $(GETOPT) admin.o chg_dir.o curses.o d_delete.o \
X	d_lib.o d_manual.o d_menu.o d_print.o d_prompt.o d_revise.o \
X	data_log.o di_delay.o di_win.o dial.o expand.o help.o info.o \
X	init.o line_set.o list_dir.o ls_menu.o m_lib.o macro.o main.o \
X	n_shell.o p_lib.o passthru.o pexit.o port.o redial.o s_axfer.o \
X	s_gen.o s_menu.o s_modem.o s_prompt.o s_term.o s_tty.o screen.o \
X	st_line.o strings.o terminal.o x_ascii.o x_batch.o x_extrnl.o \
X	x_menu.o x_rcv.o x_send.o x_win.o xmodem.o
X
XINPUT =	input.o vcs.o
X
Xall:	pcomm pcomm_input install
X
Xpcomm:	$(PCOMM)
X	$(CC) $(LDFLAGS) $(PCOMM) -o pcomm $(CURSES)
X
Xpcomm_input:	$(INPUT)
X	$(CC) $(LDFLAGS) $(INPUT) -o pcomm_input $(CURSES)
X	
Xinstall:
X	cp pcomm $(BIN)
X#	rm pcomm
X	cp pcomm_input $(BIN)
X#	rm pcomm_input
X
Xlint:
X	lint -p -Dlint *.c
X
Xshar:
X	cat Doc > pcomm_sh.1
X	$(SHAR) Readme Release.notes Makefile Pcomm.1 Pcomm.dial_dir \
X	Pcomm.modem Pcomm.param Unixpc.shar config.h dial_dir.h misc.h \
X	modem.h param.h status.h vcs.h xmodem.h > pcomm_sh.2
X	$(SHAR) admin.c chg_dir.c curses.c d_delete.c d_lib.c d_manual.c \
X	d_menu.c d_print.c d_prompt.c d_revise.c data_log.c di_delay.c \
X	> pcomm_sh.3
X	$(SHAR) di_win.c dial.c expand.c getcwd.c getopt.c help.c info.c \
X	init.c input.c line_set.c list_dir.c ls_menu.c > pcomm_sh.4
X	$(SHAR) m_lib.c macro.c main.c n_shell.c p_lib.c passthru.c \
X	pexit.c port.c redial.c > pcomm_sh.5
X	$(SHAR) s_axfer.c s_gen.c s_menu.c s_modem.c s_prompt.c s_term.c \
X	s_tty.c screen.c st_line.c strings.c terminal.c > pcomm_sh.6
X	$(SHAR) vcs.c x_ascii.c x_batch.c x_extrnl.c x_menu.c x_rcv.c \
X	> pcomm_sh.7
X	$(SHAR) x_send.c x_win.c xmodem.c > pcomm_sh.8
X
Xadmin.o:	config.h dial_dir.h param.h
Xchg_dir.o:	config.h misc.h
Xcurses.o:	config.h misc.h
Xd_delete.o:	config.h dial_dir.h misc.h param.h
Xd_lib.o:	dial_dir.h param.h
Xd_manual.o:	config.h misc.h dial_dir.h
Xd_menu.o:	config.h dial_dir.h misc.h param.h
Xd_print.o:	config.h dial_dir.h misc.h
Xd_prompt.o:	config.h dial_dir.h misc.h
Xd_revise.o:	config.h dial_dir.h misc.h param.h
Xdata_log.o:	config.h misc.h param.h status.h
Xdi_delay.o:	config.h misc.h param.h
Xdi_win.o:	config.h dial_dir.h misc.h modem.h param.h
Xdial.o:		config.h dial_dir.h misc.h modem.h param.h
Xexpand.o:	config.h
Xhelp.o:		config.h misc.h
Xinit.o:		config.h misc.h status.h
Xinput.o:	config.h misc.h status.h vcs.h
Xline_set.o:	dial_dir.h param.h
Xlist_dir.o:	config.h misc.h
Xls_menu.o:	config.h dial_dir.h misc.h param.h
Xm_lib.o:	modem.h
Xmacro.o:	config.h misc.h param.h
Xmain.o:		config.h dial_dir.h modem.h param.h status.h
Xn_shell.o:	config.h
Xp_lib.o:	param.h
Xpassthru.o:	config.h misc.h
Xpexit.o:	config.h dial_dir.h misc.h param.h status.h
Xport.o:		config.h dial_dir.h modem.h
Xredial.o:	config.h dial_dir.h misc.h
Xs_axfer.o:	config.h misc.h param.h
Xs_gen.o:	config.h misc.h param.h
Xs_menu.o:	config.h misc.h
Xs_modem.o:	config.h misc.h modem.h
Xs_prompt.o:	config.h misc.h
Xs_term.o:	config.h misc.h param.h status.h
Xs_tty.o:	config.h misc.h modem.h
Xscreen.o:	config.h param.h status.h
Xst_line.o:	config.h dial_dir.h misc.h modem.h param.h status.h
Xterminal.o:	config.h dial_dir.h misc.h modem.h param.h status.h
Xvcs.o:		config.h vcs.h
Xx_ascii.o:	config.h misc.h param.h
Xx_batch.o:	config.h misc.h xmodem.h
Xx_extrnl.o:	config.h
Xx_menu.o:	config.h misc.h xmodem.h
Xx_rcv.o:	config.h dial_dir.h misc.h xmodem.h
Xx_send.o:	config.h dial_dir.h misc.h xmodem.h
Xx_win.o:	config.h dial_dir.h misc.h xmodem.h
Xxmodem.o:	config.h misc.h param.h xmodem.h
END_OF_FILE
if test 3727 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'config.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'config.h'\"
else
echo shar: Extracting \"'config.h'\" \(1634 characters\)
sed "s/^X//" >'config.h' <<'END_OF_FILE'
X/*
X * Various tunable parameters.  This should appear before any other local
X * header file.
X */
X
X/* Use the dialing routines specific to the AT&T Unix PC 7300/3b1 */
X#undef	UNIXPC
X
X/* Older versions of curses(3) use termcap in lieu of terminfo */
X#undef	OLDCURSES
X
X/* Use shared memory in lieu of a file for the virtual screen */
X#define	SHAREDMEM
X
X/* Should a missing video attribute be promoted to standout? */
X#undef  NOPROMOTE
X
X/* Use extra precautions if Pcomm is set-user-id or set-group-id */
X/* #undef	SETUGID */
X#define	SETUGID
X
X/* Should Pcomm make a log of all phone calls? */
X#undef	LOG_CALLS
X/* #define	LOG_CALLS */
X
X/* The name of the log file (if used).  */
X#define	LOGFILE		"/usr/adm/phone.calls"
X
X/* Should long distance (toll) calls be limited to a specific group? */
X#undef	LIMIT_LD
X
X/* The name of the privileged group for limiting long distance calls */
X#define	GROUP_NAME	"uucp"
X
X/* The path to the line printer program */
X#define	LPR		"/usr/bin/lp"
X
X/* The path to the "pretty" printer program (if none, use same as LPR) */
X#define	LPRINT		"/usr/bin/lp"
X
X/* The path to the default directory containing the Pcomm support files */
X#define	DEFAULT_DIR	"/usr/local/lib/pcomm"
X
X/* The path to the directory where UUCP locks are found */
X#define	LOCK_DIR	"/usr/spool/uucp"
X
X/* Do the lock files use ASCII encoded PID's? */
X#undef	ASCII_PID
X
X/* Should Pcomm optimize redialing by keeping the TTY port open */
X/* #define	KEEP_PORT */
X
X/* Does the status line scroll up on "magic cookie" terminals? */
X#undef	XMC_BROKE
X
X/* Does the alarm() system call work correctly with the wgetch() function? */
X#undef	WGETCH_BROKE
END_OF_FILE
if test 1634 -ne `wc -c <'config.h'`; then
    echo shar: \"'config.h'\" unpacked with wrong size!
fi
# end of 'config.h'
fi
echo shar: End of shell archive.
exit 0

det@hawkmoon.MN.ORG (Derek E. Terveer) (10/07/88)

In article <157@libove.UUCP>, root@libove.UUCP (Jay M. Libove) writes:
> I am trying to build pcomm 1.1 on SCO Xenix 286 v2.2.1 with Development
> System v2.2.1, and when I start compiling as follows:
> 
> 	cc -g -O -Ml2e -c chg_dir.c
> chg_dir.c
> chg_dir.c(10) : error 54: expected `(' to follow `chtype'
> chg_dir.c(12) : error 59: syntax error : `{'
> [ all the rest deleted ]

I have (unfortunately) had quite a bit of experience in getting things to
compile under xenix (please, no flames, this is *MY* opinion!).

During my sometimes futile attempts at actually generating an absolute load
module, i have had many oppurtunitites of fiddle with the various flags.  For
some reason, which i can't really fathom, using the -M2 flag sometimes
generates (apparently) spurious errors.  Usually of the type that you see
above.  I suspect that use of -M2 turns on some sort of different inclusion
mechanism for include files.  For example, i frequently find param.h (i think
it was param.h) to generate errors just like the above.  Much as i hated to do
it (cause i want to squeeze out as much speed as i can on my labouring system
(;-(), i have turned off -M2 and the errors went away.  So try that and see if
helps....

Now, a question.  Just how much difference is there between running a -M2
program and a plain old 8086 (or whatever the default code generation is -M0?)
program in SCO xenix (i have 2.1.3).

Anyone have stats on this?

derek
-- 
Derek Terveer		det@hawkmoon.MN.ORG
			w(612)681-6986	h(612)688-0667

"A proper king is crowned" -- Thomas B. Costain

edp@pyr.gatech.EDU (Warren Tucker) (10/09/88)

In article <402@hawkmoon.MN.ORG> det@hawkmoon.MN.ORG (Derek E. Terveer) writes:
>above.  I suspect that use of -M2 turns on some sort of different inclusion
>mechanism for include files.  For example, i frequently find param.h (i think
>it was param.h) to generate errors just like the above.  Much as i hated to do
> [stuff deleted]
>Now, a question.  Just how much difference is there between running a -M2
>program and a plain old 8086 (or whatever the default code generation is -M0?)
>program in SCO xenix (i have 2.1.3).
>
-M2 causes the compiler to do the equivalent of a -DM_I80286
(#define M_I80286). -M0 does -DM_I8086; param.h and other standard
include files have conditional compilation depending on this switch.
(please no flames on the exactness of the identifiers; I'm doing this
from memory).  Also, -M1 or -M2 causes the compiler to use the 80186
and beyond ENTER and LEAVE instructions, which speeds up subroutine
linkage quite a bit.  So -M2 does improve execution speed.

-- 
Warren Tucker
...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!edp

erik@mpx1.UUCP (Erik Murrey) (10/09/88)

I had the 2.1.4 developement system with my 2.1.3 runtime.  There
was a problem with the automatically defined manifests.  It seems that
under -M2, /bin/cc defines both M_I86 AND M_I286.  The caused files
like types.h and param.h to blow up when compiled.  The fix was to USE -M2
and also undefine M_I86  (-UM_I86) on the cc command line.

I have since upgraded to 2.2.1, and whatever developement system
comes with that.  My /bin/cc now only defines M_I286 (or, my
include files are smart enough to cope with both M_I86/M_I286
defined).

If you don't want to upgrade, and you don't feel like passing
the -UM_I86 switch to cc, then edit your include files so that
lines like
#ifdef	M_I86
read
#if	M_I86 && ! M_I286

I think the only files that need changing are types.h and param.h.

-- 
Erik Murrey                            /|   //  /~~~~/  |  /
MPX Data Systems, Inc.                / | / /  /____/   |/
erik@mpx1.UUCP                       /  /  /  /        /|  Data Systems, Inc. 
{spl1,vu-vlsi,bpa}!mpx1!erik        /     /  /       /  |====================