diff --unified --show-c-function source/Makefile Amiga-source/Makefile --- source/Makefile Sat Oct 26 00:02:34 1996 +++ Amiga-source/Makefile Sat Oct 26 00:13:08 1996 @@ -5,12 +5,12 @@ # The base manpages directory to put the man pages in # Note: $(MANDIR)/man1, $(MANDIR)/man5 and $(MANDIR)/man8 must exist. -MANDIR = /usr/local/man +MANDIR = /ade/man # The directories to put things in. If you use multiple # architectures or share the samba binaries across NFS then # you will probably want to change this layout. -BASEDIR = /usr/local/samba +BASEDIR = /AmiTCP/samba BINDIR = $(BASEDIR)/bin SBINDIR = $(BASEDIR)/bin LIBDIR = $(BASEDIR)/lib @@ -21,12 +21,12 @@ INSTALLPERMS = 0755 # Add any optimisation or debugging flags here # add -DSYSLOG for syslog support -FLAGS1 = -O +FLAGS1 = -O3 -fomit-frame-pointer -s -Wall LIBS1 = # You will need to use a ANSI C compiler. This means under SunOS 4 you can't # use cc, instead you will have to use gcc. -# CC = gcc +CC = gcc # This may help with some versions of make SHELL = /bin/sh @@ -87,7 +87,7 @@ SMBRUN = $(BINDIR)/smbrun # This is for SMB encrypted (lanman) passwords. # you may wish to add -DREPLACE_GETPASS if your getpass() is limited # to 8 chars -# DES_BASE=/usr/local/libdes +# DES_BASE=Bench:Samba/libdes # DES_FLAGS= -I$(DES_BASE) # DES_LIB= -L$(DES_BASE) -ldes # PASSWD_FLAGS=-DSMB_PASSWD=\"$(BINDIR)/smbpasswd\" -DSMB_PASSWD_FILE=\"$(BASEDIR)/private/smbpasswd\" @@ -507,15 +507,15 @@ AWK = awk # This for Amiga using GCC and ixemul.library 43.0 or later. -# contributed by Rask Ingemann Lambertsen +# contributed by Rask Ingemann Lambertsen # The binaries will support both AmiTCP and AS225R2 compatible # protocol stacks because of the use of ixnet.library. # Other protocol stacks will be supported automatically if # support for them is added to ixnet.library. # The binaries will have automatic stack extension :-) -# Doesn't work in stand-alone mode, must be run from inetd :-( -# FLAGSM = -DFreeBSD -mstackextend -# LIBSM = +# smbd must be run from inetd :-( +FLAGSM = -DAMIGA -Dfork=vfork -mstackextend +LIBSM = @@ -608,7 +608,7 @@ installbin: all @$(SHELL) $(srcdir)installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS) installscripts: - @$(SHELL) $(srcdir)installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS) + @(cd $(srcdir); $(SHELL) $(srcdir)installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)) # revert to the previously installed version revert: diff --unified --show-c-function source/client.c Amiga-source/client.c --- source/client.c Sat Oct 26 00:10:30 1996 +++ Amiga-source/client.c Sat Oct 26 00:13:17 1996 @@ -324,7 +324,11 @@ static void send_message(char *inbuf,cha grp_id = SVAL(inbuf,smb_vwv0); +#ifdef AMIGA + printf("Connected. Type your message, ending it with a Control-\\\n"); +#else printf("Connected. Type your message, ending it with a Control-D\n"); +#endif while (!feof(stdin) && total_len < 1600) { diff --unified --show-c-function source/includes.h Amiga-source/includes.h --- source/includes.h Wed Oct 23 21:42:25 1996 +++ Amiga-source/includes.h Sat Oct 26 00:13:19 1996 @@ -905,6 +905,40 @@ typedef int mode_t; #endif +#ifdef AMIGA +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SIGNAL_CAST (void (*)(int)) +#define USE_GETCWD +#define HAVE_BZERO +#define HAVE_MEMMOVE +#define USE_SIGPROCMASK +#define USE_WAITPID +#define USE_DIRECT +#define USE_F_FSIZE +#define HAVE_FCNTL_LOCK 0 +#define HAVE_GETTIMEOFDAY +#define HAVE_PATHCONF + +#define HAVE_NO_PROC +#define NO_FORK_DEBUG +#define HAVE_FORK 0 +#define HAVE_VFORK 1 +#endif + + /******************************************************************* end of the platform specific sections ********************************************************************/ diff --unified --show-c-function source/interface.c Amiga-source/interface.c --- source/interface.c Fri Aug 16 12:55:54 1996 +++ Amiga-source/interface.c Sat Oct 26 00:13:20 1996 @@ -154,7 +154,7 @@ static void get_broadcast(struct in_addr } } } -#elif defined(__FreeBSD__) || defined(NETBSD) +#elif defined(__FreeBSD__) || defined(NETBSD) || defined(AMIGA) ifc.ifc_len = sizeof(buff); ifc.ifc_buf = buff; if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) { diff --unified --show-c-function source/local.h Amiga-source/local.h --- source/local.h Sat Oct 26 00:10:45 1996 +++ Amiga-source/local.h Sat Oct 26 00:13:21 1996 @@ -147,7 +147,7 @@ /* shall we support browse requests via a FIFO to nmbd? */ #define ENABLE_FIFO 1 -/* keep the password server open, this uses up a aocket, but is needed +/* keep the password server open, this uses up a socket, but is needed by many apps */ #define KEEP_PASSWORD_SERVER_OPEN 1 diff --unified --show-c-function source/util.c Amiga-source/util.c --- source/util.c Sat Oct 26 00:11:15 1996 +++ Amiga-source/util.c Sat Oct 26 00:13:28 1996 @@ -3265,6 +3265,7 @@ BOOL process_exists(int pid) sprintf(s,"/proc/%d",pid); return(directory_exist(s,NULL)); #else +#ifndef HAS_NO_PROC { static BOOL tested=False; static BOOL ok=False; @@ -3279,6 +3280,7 @@ BOOL process_exists(int pid) return(file_exist(s,NULL)); } } +#endif /* CGH 8/16/96 - added ESRCH test */ return(pid == getpid() || kill(pid,0) == 0 || errno != ESRCH);