Revision: 14575
Author: adrian.chadd
Date: Sat Apr 10 19:41:00 2010
Log: Issue #94 - bring over a setbuffer() routine for win32.


http://code.google.com/p/lusca-cache/source/detail?r=14575

Modified:
 /branches/LUSCA_HEAD/include/util.h
 /branches/LUSCA_HEAD/lib/win32lib.c

=======================================
--- /branches/LUSCA_HEAD/include/util.h Mon Apr  5 05:15:45 2010
+++ /branches/LUSCA_HEAD/include/util.h Sat Apr 10 19:41:00 2010
@@ -164,6 +164,7 @@
 extern void WIN32_maperror(unsigned long);
 extern int WIN32_Close_FD_Socket(int);
 extern int WIN32_getrusage(int, struct rusage *);
+extern void setbuffer(FILE *, char *, size_t);
 #endif

 #endif /* SQUID_UTIL_H */
=======================================
--- /branches/LUSCA_HEAD/lib/win32lib.c Sat Apr 10 17:46:50 2010
+++ /branches/LUSCA_HEAD/lib/win32lib.c Sat Apr 10 19:41:00 2010
@@ -55,6 +55,7 @@
 #endif

 #include "win32_compat.h"
+#include "win32_version.h"

 THREADLOCAL int ws32_result;
 THREADLOCAL int _so_err;
@@ -493,6 +494,12 @@
 #endif

 #if defined(_SQUID_MSWIN_)
+
+void
+setbuffer(FILE *stream, char *buf, size_t size)
+{
+       (void) setvbuf(stream, buf, buf ? _IOFBF : _IONBF, size);
+}

 int
 WIN32_getrusage(int who, struct rusage *usage)

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to