Samba 1.9.18p10 for NEWS-OS Release 6.x/4.x

¹½ÃÛ´Ä¶­:
 1. NEWS-OS Release 6.x
  NWS-5000TF
  NEWS-OS Release 6.1.2
  NEWS-C 1.010
  GNU make 3.77
 2. NEWS-OS Release 4.x
  NWS-3870
  NEWS-OS Release 4.2.1a+
  GNU C 2.7.2.3
  GNU make 3.77

¥¤¥ó¥¹¥È¡¼¥ëÊýË¡:
  # gzip -dc samba-1.9.18p10.tar.gz | tar xf -
  # cd samba-1.9.18p10
  # patch -p1 < ThisPatchFile
  # cd source
  # vi Makefile
    ¥³¥ó¥Ñ¥¤¥ë¤¹¤ëOS¤ÎÊÑ¿ô¤òÍ­¸ú¤Ë¤¹¤ë¡£
  # make
  # make install


atexit()ÌäÂê:
 4.x¤Ë¤Ïatexit()¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢ÄÌ¾ïÄÌ¤ê(?)¥³¥á¥ó¥È¥¢¥¦¥È½èÍý¤ÇºÑ¤Þ¤»¤Æ¤¤¤Þ¤¹¡£


hiraga@meis.sony.co.jp


diff -urP samba-1.9.18p10/source/Makefile samba-1.9.18p10-newsos46/source/Makefile
--- samba-1.9.18p10/source/Makefile	Tue Jun 16 02:32:28 1998
+++ samba-1.9.18p10-newsos46/source/Makefile	Wed Oct 28 15:12:58 1998
@@ -591,14 +591,29 @@
 
 # This is for SONY NEWS, NEWS-OS 4.2.x
 # contributed by sky@sm.sony.co.jp (Katushi Sato)
+# CC = gcc
+# FLAGS1 = -O2
 # FLAGSM = -DNEWS42 -DKANJI=\"sjis\"
 # LIBSM =
+# MANDIR = /usr/local/man/C
+# SMBLOGFILE = /var/adm/samba/log.smb
+# NMBLOGFILE = /var/adm/samba/log.nmb
+# CONFIGFILE = /etc/samba/smb.conf
+# LMHOSTSFILE = /etc/samba/lmhosts
+# SMB_PASSWD_FILE = /etc/samba/private/smbpasswd
 
 
 # This is for SONY NEWS, NEWS-OS 6.1.x
 # contributed by kobo@sm.sony.co.jp (Yoichi Kobori)
-# FLAGSM = -Xa -DSVR4 -DNEWS61 -DSHADOW_PWD -DNETGROUP -DGETTIMEOFDAY1 -DKANJI=\"euc\"\ -D_SONYILS_H
-# LIBSM = -lsocket -lnsl
+FLAGS1 = -O2
+FLAGSM = -Xa -DSVR4 -DNEWS61 -DSHADOW_PWD -DNETGROUP -DGETTIMEOFDAY1 -DKANJI=\"euc\" -D_SONYILS_H
+LIBSM = -lsocket -lnsl
+MANDIR = /usr/local/man/C
+SMBLOGFILE = /var/adm/samba/log.smb
+NMBLOGFILE = /var/adm/samba/log.nmb
+CONFIGFILE = /etc/samba/smb.conf
+LMHOSTSFILE = /etc/samba/lmhosts
+SMB_PASSWD_FILE = /etc/samba/private/smbpasswd
 
 
 # This is for OS/2 using EMX 
diff -urP samba-1.9.18p10/source/getsmbpass.c samba-1.9.18p10-newsos46/source/getsmbpass.c
--- samba-1.9.18p10/source/getsmbpass.c	Sat Apr 11 09:42:29 1998
+++ samba-1.9.18p10-newsos46/source/getsmbpass.c	Wed Oct 28 14:20:30 1998
@@ -115,7 +115,11 @@
   else
     out = in;
 
+#if defined(NEWS42)
+  setbuffer(in, NULL, 0);
+#else
   setvbuf(in, NULL, _IONBF, 0);
+#endif
 
   /* Turn echoing off if it is on now.  */
 
diff -urP samba-1.9.18p10/source/includes.h samba-1.9.18p10-newsos46/source/includes.h
--- samba-1.9.18p10/source/includes.h	Thu Aug 20 08:41:46 1998
+++ samba-1.9.18p10-newsos46/source/includes.h	Wed Oct 28 14:42:49 1998
@@ -442,7 +442,11 @@
 #include <string.h>
 #include <sys/dir.h>
 #include <dirent.h>
+#ifdef NEWS61
+#define NO_STATFS
+#else
 #include <sys/statfs.h>
+#endif
 #include <sys/statvfs.h>
 #include <sys/vfs.h>
 #include <sys/filio.h>
@@ -993,6 +997,7 @@
 #include <sys/vfs.h>
 #include <sys/timeb.h>
 typedef int mode_t;
+typedef int pid_t;
 #endif
 
 #ifdef OS2
diff -urP samba-1.9.18p10/source/server.c samba-1.9.18p10-newsos46/source/server.c
--- samba-1.9.18p10/source/server.c	Thu Aug 20 08:41:53 1998
+++ samba-1.9.18p10-newsos46/source/server.c	Wed Oct 28 13:22:35 1998
@@ -2614,8 +2614,10 @@
     signal(SIGCLD, SIGNAL_CAST sig_cld);
 #endif
 
+#ifndef NEWS42
     if(atexit_set == 0)
       atexit(killkids);
+#endif
 
     FD_ZERO(&listen_set);
 
diff -urP samba-1.9.18p10/source/smbpass.c samba-1.9.18p10-newsos46/source/smbpass.c
--- samba-1.9.18p10/source/smbpass.c	Wed May 13 11:10:37 1998
+++ samba-1.9.18p10-newsos46/source/smbpass.c	Wed Oct 28 14:16:54 1998
@@ -150,7 +150,11 @@
 		return NULL;
 	}
 	/* Set a 16k buffer to do more efficient reads */
+#if defined(NEWS42)
+	setbuffer(fp, readbuf, sizeof(readbuf));
+#else
 	setvbuf(fp, readbuf, _IOFBF, sizeof(readbuf));
+#endif
 
 	if ((lockfd = pw_file_lock(pfile, F_RDLCK, 5)) < 0) {
 		DEBUG(0, ("get_smbpwd_entry: unable to lock file %s\n", pfile));
@@ -382,7 +386,11 @@
 		return False;
 	}
 	/* Set a 16k buffer to do more efficient reads */
+#if defined(NEWS42)
+	setbuffer(fp, readbuf, sizeof(readbuf));
+#else
 	setvbuf(fp, readbuf, _IOFBF, sizeof(readbuf));
+#endif
 
 	if ((lockfd = pw_file_lock(pfile, F_WRLCK, 5)) < 0)
 	{
@@ -603,7 +611,11 @@
 		return False;
 	}
 	/* Set a 16k buffer to do more efficient reads */
+#if defined(NEWS42)
+	setbuffer(fp, readbuf, sizeof(readbuf));
+#else
 	setvbuf(fp, readbuf, _IOFBF, sizeof(readbuf));
+#endif
 
 	if ((lockfd = pw_file_lock(pfile, F_WRLCK, 5)) < 0)
 	{
diff -urP samba-1.9.18p10/source/smbpasswd.c samba-1.9.18p10-newsos46/source/smbpasswd.c
--- samba-1.9.18p10/source/smbpasswd.c	Wed Jul 15 05:48:09 1998
+++ samba-1.9.18p10-newsos46/source/smbpasswd.c	Wed Oct 28 14:21:30 1998
@@ -577,7 +577,11 @@
   }
   
   /* Set read buffer to 16k for effiecient reads */
+#if defined(NEWS42)
+  setbuffer(fp, readbuf, sizeof(readbuf));
+#else
   setvbuf(fp, readbuf, _IOFBF, sizeof(readbuf));
+#endif
   
   /* make sure it is only rw by the owner */
   chmod(pfile, 0600);
