Path: galaxy.trc.rwcp.or.jp!news.trc!imnet3!news.imnet.ad.jp!news.join.ad.jp!Q.T.Honey!news.ksi.ne.jp!news.daionet.gr.jp!itakura-news!aist-nara!odins-alpha!odins-toyonaka!news-nuie!news!nfeed.gw.nagoya-u.ac.jp!nfeed.gw.nagoya-u.ac.jp!server.tut.ac.jp!news.tut.ac.jp!not-for-mail
From: nakaji@tutrp.tut.ac.jp
 (=?ISO-2022-JP?B?GyRCQ2Y8IxsoQiAbJEI5MDlUGyhC?=)
Newsgroups: fj.sys.news,japan.comp.sony-news
Subject: Re: setvbuf()
Date: 18 Nov 1999 11:11:55 +0900
Organization: =?ISO-2022-JP?B?GyRCSy02NjU7PVEySjNYQmczWDd6QF85KTNYN08bKEI=?=
Lines: 173
Message-ID: <87n1scczv8.fsf@nakaji.tutrp.tut.ac.jp>
References: <87903zylnv.fsf@nakaji.tutrp.tut.ac.jp> <80vj63$svk$2@belldandy.vsp.cpg.sony.co.jp>
NNTP-Posting-Host: nakaji.tutrp.tut.ac.jp
Mime-Version: 1.0 (generated by EMIKO 1.13.7 - "Euglena caudata")
Content-Type: multipart/mixed;
 boundary="Multipart_Thu_Nov_18_11:11:55_1999-1"
X-Trace: news.tut.ac.jp 942891117 16863 133.15.188.118 (18 Nov 1999 02:11:57 GMT)
X-Complaints-To: usenet@news.tut.ac.jp
NNTP-Posting-Date: 18 Nov 1999 02:11:57 GMT
User-Agent: T-gnus/6.13.3 (based on Pterodactyl Gnus v0.98) EMIKO/1.13.7 (Euglena caudata) FLIM/1.13.2 (Kasanui) Emacs/20.4 (i386--freebsd) MULE/4.0 (HANANOEN)
Xref: galaxy.trc.rwcp.or.jp fj.sys.news:3970 japan.comp.sony-news:3
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.sys.news&nb=3970&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

--Multipart_Thu_Nov_18_11:11:55_1999-1
Content-Type: text/plain; charset=ISO-2022-JP

>>>>> In <80vj63$svk$2@belldandy.vsp.cpg.sony.co.jp> 
>>>>>ugai@vsp.cpg.sony.co.jp (Takeo Ugai/$B1-;t(B $B7r@8(B) wrote:

$B1-;t$5$s(B> 2.0.3 $B$^$G$7$+$d$C$F$$$^$;$s$,!"(Bsetvbuf() $B$O(B

$B1-;t$5$s(B> #definesetvbuf(fp,buf,type,size)setbuffer((fp),(buf),(size))

$B1-;t$5$s(B> $B$GF($2$F$$$^$9!#(B

$B$"$j$,$H$&$4$6$$$^$9!#(B

$BF1MM$N$3$H$r!"$^$D$7$?$5$s$+$i$b65$($F$$$?$@$-!"7k6I!"B>$K0z$C3]$+$kIt(B
$BJ,$b4^$a$F!"$3$N$h$&$K$7$^$7$?!#0l%+=j(B setlinebuffer() $B$K$7$F$$$k$@$1(B
$B$G$9!#(B

--Multipart_Thu_Nov_18_11:11:55_1999-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="samba-news4.diff"
Content-Transfer-Encoding: 7bit

Index: include/includes.h
===================================================================
RCS file: /home/nakaji/ncvs/samba-news4/source/include/includes.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 includes.h
--- includes.h1999/11/08 05:14:001.1.1.1
+++ includes.h1999/11/17 01:06:06
@@ -144,6 +144,10 @@
 #endif
 #endif
 
+#ifndef O_NONBLOCK
+#include <stream/xti.h>
+#endif
+
 #include <sys/stat.h>
 
 #ifdef HAVE_LIMITS_H
@@ -182,6 +186,13 @@
 
 #ifdef HAVE_UTIME_H
 #include <utime.h>
+#endif
+
+#ifndef HAVE_UTIMBUF
+struct utimbuf {
+time_t actime;/* Access time */
+time_t modtime;/* Modification time */
+};
 #endif
 
 #ifdef HAVE_SYS_SELECT_H
Index: lib/getsmbpass.c
===================================================================
RCS file: /home/nakaji/ncvs/samba-news4/source/lib/getsmbpass.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 getsmbpass.c
--- getsmbpass.c1999/11/08 05:13:421.1.1.1
+++ getsmbpass.c1999/11/17 00:34:32
@@ -106,7 +106,11 @@
   else
     out = in;
 
+#if defined(sony_news) && defined(SYSTYPE_BSD)
+  setbuffer(in, NULL, 0);
+#else
   setvbuf(in, NULL, _IONBF, 0);
+#endif
 
   /* Turn echoing off if it is on now.  */
 
Index: lib/signal.c
===================================================================
RCS file: /home/nakaji/ncvs/samba-news4/source/lib/signal.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 signal.c
--- signal.c1999/11/08 05:13:431.1.1.1
+++ signal.c1999/11/08 07:14:54
@@ -21,6 +21,9 @@
 */
 
 #include "includes.h"
+#ifndef WNOHANG
+#define WNOHANG 1
+#endif
 
 /****************************************************************************
  Catch child exits and reap the child zombie status.
Index: lib/util_file.c
===================================================================
RCS file: /home/nakaji/ncvs/samba-news4/source/lib/util_file.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 util_file.c
--- util_file.c1999/11/08 05:13:441.1.1.1
+++ util_file.c1999/11/17 00:36:35
@@ -133,7 +133,11 @@
   }
 
   /* Set a buffer to do more efficient reads */
+#if defined(sony_news) && defined(SYSTYPE_BSD)
+  setbuffer(fp, s_readbuf, (int)bufsize);
+#else
   setvbuf(fp, s_readbuf, _IOFBF, bufsize);
+#endif
 
   if (!file_lock(fileno(fp), (update ? F_WRLCK : F_RDLCK), 5, file_lock_depth))
   {
Index: passdb/smbpass.c
===================================================================
RCS file: /home/nakaji/ncvs/samba-news4/source/passdb/smbpass.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 smbpass.c
--- smbpass.c1999/11/08 05:13:541.1.1.1
+++ smbpass.c1999/11/17 00:38:10
@@ -52,7 +52,11 @@
   }
 
   /* Set a buffer to do more efficient reads */
+#if defined(sony_news) && defined(SYSTYPE_BSD)
+  setbuffer(fp, s_readbuf, (int)sizeof(s_readbuf));
+#else
   setvbuf(fp, s_readbuf, _IOFBF, sizeof(s_readbuf));
+#endif
 
   if (!pw_file_lock(fileno(fp), (update ? F_WRLCK : F_RDLCK), 5, &pw_file_lock_depth))
   {
@@ -605,7 +609,11 @@
     return False;
   }
   /* Set a buffer to do more efficient reads */
+#if defined(sony_news) && defined(SYSTYPE_BSD)
+  setbuffer(fp, readbuf, (int)sizeof(readbuf));
+#else
   setvbuf(fp, readbuf, _IOFBF, sizeof(readbuf));
+#endif
 
   lockfd = fileno(fp);
 
Index: utils/smbpasswd.c
===================================================================
RCS file: /home/nakaji/ncvs/samba-news4/source/utils/smbpasswd.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 smbpasswd.c
--- smbpasswd.c1999/11/08 05:14:061.1.1.1
+++ smbpasswd.c1999/11/17 00:39:08
@@ -147,7 +147,11 @@
 
 static void set_line_buffering(FILE *f)
 {
+#if defined(sony_news) && defined(SYSTYPE_BSD)
+setlinebuf(f);
+#else
 setvbuf(f, NULL, _IOLBF, 0);
+#endif
 }
 
 /*************************************************************

--Multipart_Thu_Nov_18_11:11:55_1999-1
Content-Type: text/plain; charset=ISO-2022-JP

$B$-$C$H!"(Bconfigure $B$G(B setvbuf $B$NM-L5$r3NG'$7$F!"$J$1$l$P(B(#ifndef
HAVE_SETVBUF)$B!"$=$N$h$&$K$9$k!"$H$$$&$N$,%Y%?!<$J$N$G$7$g$&$,!"$3$l$G(B
$B$b%3%s%Q%$%k$ODL$k$7!">/$J$/$H$b!V%M%C%H%o!<%/%3%s%T%e!<%?!W$N0lMw$K$O(B
$B8=$l$k$7!"JL$N(B samba server $B$r(B passwd server $B$K;XDj$9$l$P!"6&M-$b$G$-(B
$B$=$&$@$7!"!V$^$!!"$($($+!W$H$7$F$$$^$9!#(B
-- 
NAKAJI Hiroyuki ($BCf<#(B $B909T(B)

--Multipart_Thu_Nov_18_11:11:55_1999-1--
