add changes to get it to compile on WEGA
This commit is contained in:
parent
4fce7f2075
commit
7f7cd5e473
|
|
@ -11,10 +11,11 @@ SHELL = /bin/sh
|
|||
TAR = tar
|
||||
# Use gzip instead of compress if you and your correspondents have it
|
||||
ZIPPER = compress
|
||||
CC = lcc
|
||||
|
||||
# If you have shared libraries (usually /lib/libc_s.a) you can make
|
||||
# smaller executable with SHLIB defined:
|
||||
SHLIB=-lc_s
|
||||
#SHLIB=-lc_s
|
||||
# Otherwise, enable:
|
||||
#SHLIB=
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ SHLIB=-lc_s
|
|||
# The W5GFE video modification has been put in unixopt.h. This modifi-
|
||||
# cation cause inverse video on incoming telnet data.
|
||||
# Change unixopt.h, if necessary, and define your curses library.
|
||||
CURSES=-lcurses
|
||||
#CURSES=-lcurses
|
||||
# Or, if you don't have curses, forget the whole thing and enable:
|
||||
#CURSES=
|
||||
#
|
||||
|
|
@ -74,8 +75,8 @@ CURSES=-lcurses
|
|||
# Uncomment the next three lines for
|
||||
# Unix System V -- (AT&T 3B2 - K5JB)
|
||||
#
|
||||
CFLAGS = -O -DUNIX -DSYS5 -DSLOWCHECK -DMSPTICK=10
|
||||
LINTFLAGS = -O -DUNIX -DSYS5 -DSLOWCHECK -DMSPTICK=10
|
||||
CFLAGS = -DWEGA -DUNIX -DSYS5 -DSLOWCHECK
|
||||
LINTFLAGS = -DWEGA -DUNIX -DSYS5 -DSLOWCHECK
|
||||
LIBS =$(SHLIB) $(CURSES)
|
||||
########################################################################
|
||||
#
|
||||
|
|
@ -137,7 +138,11 @@ lint: $(SRCS)
|
|||
# lint $(LINTFLAGS) [i-z]*.ln > lint3.out 2>&1
|
||||
|
||||
depend:
|
||||
mkdep $(LINTFLAGS) $(SRCS) > depend.out
|
||||
rm -f depend.out
|
||||
touch depend.out
|
||||
for file in $(SRCS) ; do \
|
||||
mkdep $(LINTFLAGS) $$file > depend.out ; \
|
||||
done
|
||||
|
||||
clean:
|
||||
-rm *.o
|
||||
|
|
|
|||
|
|
@ -589,7 +589,11 @@ int16 len;
|
|||
sum += loword(ph->source);
|
||||
sum += hiword(ph->dest);
|
||||
sum += loword(ph->dest);
|
||||
#ifdef WEGA
|
||||
sum += (int)ph->protocol;
|
||||
#else
|
||||
sum += uchar(ph->protocol);
|
||||
#endif
|
||||
sum += ph->length;
|
||||
}
|
||||
/* Now do each mbuf on the chain */
|
||||
|
|
@ -601,9 +605,17 @@ int16 len;
|
|||
if(((long)up) & 1){
|
||||
/* Handle odd leading byte */
|
||||
if(swap)
|
||||
#ifdef WEGA
|
||||
csum = (int)(*up++);
|
||||
#else
|
||||
csum = uchar(*up++);
|
||||
#endif
|
||||
else
|
||||
#ifdef WEGA
|
||||
csum = (int16)((int)(*up++) << 8);
|
||||
#else
|
||||
csum = (int16)(uchar(*up++) << 8);
|
||||
#endif
|
||||
cnt--;
|
||||
swap = !swap;
|
||||
}
|
||||
|
|
@ -620,9 +632,24 @@ int16 len;
|
|||
/* Handle odd trailing byte */
|
||||
if(cnt & 1){
|
||||
if(swap)
|
||||
#ifdef WEGA
|
||||
{
|
||||
unsigned short tmp;
|
||||
|
||||
tmp = (unsigned short)up[--cnt];
|
||||
tmp <<= 8;
|
||||
tmp >>= 8;
|
||||
csum += tmp;
|
||||
}
|
||||
#else
|
||||
csum += uchar(up[--cnt]);
|
||||
#endif
|
||||
else
|
||||
#ifdef WEGA
|
||||
csum += (int16)((int)(up[--cnt]) << 8);
|
||||
#else
|
||||
csum += (int16)(uchar(up[--cnt]) << 8);
|
||||
#endif
|
||||
swap = !swap;
|
||||
}
|
||||
sum += csum;
|
||||
|
|
|
|||
|
|
@ -479,6 +479,9 @@ pull32(bpp)
|
|||
struct mbuf **bpp;
|
||||
{
|
||||
int32 rval;
|
||||
#ifdef WEGA
|
||||
int16 rval1, rval2;
|
||||
#endif
|
||||
char buf[4];
|
||||
register char *cp;
|
||||
|
||||
|
|
@ -489,6 +492,18 @@ struct mbuf **bpp;
|
|||
cp = buf;
|
||||
|
||||
/* Unwound for speed */
|
||||
#ifdef WEGA
|
||||
rval1 = uchar(*cp++);
|
||||
rval1 <<= 8;
|
||||
rval1 |= uchar(*cp++);
|
||||
rval2 = uchar(*cp++);
|
||||
rval2 <<= 8;
|
||||
rval2 |= uchar(*cp);
|
||||
|
||||
rval = rval1;
|
||||
rval <<= 16;
|
||||
rval |= rval2;
|
||||
#else
|
||||
rval = uchar(*cp++);
|
||||
rval <<= 8;
|
||||
rval |= uchar(*cp++);
|
||||
|
|
@ -496,6 +511,7 @@ struct mbuf **bpp;
|
|||
rval |= uchar(*cp++);
|
||||
rval <<= 8;
|
||||
rval |= uchar(*cp);
|
||||
#endif
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@
|
|||
#
|
||||
cpparg=
|
||||
linelen=60 # desired length of dependency line
|
||||
system=`uname -s`
|
||||
if [ "$system" = "P8000" ] ; then
|
||||
cpp_cmd=/z/LCC/lib/lcpp
|
||||
else
|
||||
cpp_cmd=/lib/cpp
|
||||
fi
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
case $arg in
|
||||
|
|
@ -15,7 +22,7 @@ do
|
|||
target=`expr "$source" : '\\(.*\\)\\.c$'`
|
||||
if [ -n "$target" ]; then
|
||||
target=`basename "$target"`
|
||||
/lib/cpp $cpparg "$source" |
|
||||
$cpp_cmd $cpparg "$source" |
|
||||
sed -n -e 's/^# 1 "\(.*\)"/\1/p' |
|
||||
awk '
|
||||
BEGIN { deplist = "'$target.o:'" }
|
||||
|
|
|
|||
|
|
@ -56,7 +56,9 @@
|
|||
#define MDKISSPORT /* Multidrop KISS, up to 16 pseudo ports, 1016 bytes */
|
||||
#define MULPORT /* Grapes Multiport code - adds 1398 bytes */
|
||||
#define AX25_HEARD /* Heard list - adds 3716 bytes */
|
||||
#ifndef WEGA
|
||||
#define CUTE_VIDEO /* Contrast video on incoming sessions. Adds 484 Bytes */
|
||||
#endif
|
||||
#undef TRACE_TIME /* Trace timestamping */
|
||||
#define SEG_CMD /* ax25 segment command */
|
||||
#define REWRITE /* rewrite.net file for smtp server */
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ struct session {
|
|||
char *rfile; /* Record file name */
|
||||
FILE *upload; /* Send file */
|
||||
char *ufile; /* Upload file name */
|
||||
#ifndef WEGA /* leads to problems because of conflicting function noecho() */
|
||||
char noecho; /* Echo flag */
|
||||
#endif
|
||||
};
|
||||
#define NULLSESSION (struct session *)0
|
||||
extern unsigned nsessions;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@
|
|||
#ifndef COH386
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
#ifdef WEGA
|
||||
#include <math.h> /* for errno declaration */
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
|
@ -56,8 +59,12 @@
|
|||
#endif
|
||||
|
||||
#ifndef B38400
|
||||
#ifdef WEGA
|
||||
#define B38400 EXTA
|
||||
#else
|
||||
#define B38400 EXTB
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct asy asy[ASY_MAX];
|
||||
struct interface *ifaces;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
#include "unix.h"
|
||||
#include "unixopt.h"
|
||||
#include "ndir.h"
|
||||
#include "timer.h"
|
||||
|
||||
#define MAXCMD 1024
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
#include "config.h"
|
||||
#ifdef _TELNET
|
||||
#include <string.h>
|
||||
#ifdef WEGA
|
||||
#include <memory.h> /* to get the return value of memchr() right */
|
||||
#endif
|
||||
#include "global.h"
|
||||
#include "mbuf.h"
|
||||
#include "timer.h"
|
||||
|
|
|
|||
|
|
@ -26,10 +26,14 @@ struct timer {
|
|||
#if ATARI_ST && (!MWC)
|
||||
#define MSPTICK 100 /* Milliseconds per tick */
|
||||
#else
|
||||
#ifdef WEGA
|
||||
#define MSPTICK 17
|
||||
#else
|
||||
/* for only a 10% error you can make all time reports pretty by using
|
||||
* 50 instead of 55 here
|
||||
*/
|
||||
#define MSPTICK 55 /* (approx) Milliseconds per tick */
|
||||
#endif /* WEGA */
|
||||
#endif /* ATARI, etc */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
#ifdef NETROM
|
||||
#include "nr4.h"
|
||||
#endif
|
||||
#ifndef WEGA
|
||||
#include "iface.h"
|
||||
#endif
|
||||
#include "tcp.h"
|
||||
#include "session.h"
|
||||
#include "cmdparse.h"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
*/
|
||||
|
||||
/* if you have the mkdir() function, define the following: */
|
||||
#ifndef WEGA
|
||||
#define HAVEMKDIR
|
||||
#endif
|
||||
|
||||
/* This is a wait value for the Coherent sleep2() function */
|
||||
#define COHWAIT 50 /* 50 ms */
|
||||
|
|
@ -20,19 +22,25 @@
|
|||
* Contact me for source code if you have same problem.
|
||||
*/
|
||||
|
||||
#ifndef WEGA
|
||||
#define TELUNIX
|
||||
#endif
|
||||
|
||||
/* On k5jb3b2 only, has to do with brain damaged pty on my machine.
|
||||
* Don't define this unless you have the file that I call telunix.c3
|
||||
* linked to telunix.c in your set.
|
||||
*/
|
||||
#ifndef WEGA
|
||||
#define PTY_PIPE
|
||||
#endif
|
||||
|
||||
/* a client stub with PORT 87. Uses IPC to transact with a server.
|
||||
* Contact me for a sample server if you want to try this.
|
||||
*/
|
||||
#ifndef WEGA
|
||||
#define TELSERV
|
||||
#define SERVNAME "telserv" /* suggest 7 max for screen formatting */
|
||||
#endif
|
||||
|
||||
#ifdef _OSK
|
||||
#undef TELUNIX
|
||||
|
|
|
|||
Loading…
Reference in New Issue