[xiph-cvs] cvs commit: log log.c log.h

Ed oddsock at xiph.org
Wed Feb 26 19:02:31 PST 2003



oddsock     03/02/26 22:02:31

  Modified:    .        log.c log.h
  Log:
  win32 doesn't support line buffering with setvbuf() properly, so for win32
  lets just set it to no-buffering for logs.

Revision  Changes    Path
1.10      +1 -1      log/log.c

Index: log.c
===================================================================
RCS file: /usr/local/cvsroot/log/log.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- log.c	10 Aug 2002 03:22:44 -0000	1.9
+++ log.c	27 Feb 2003 03:02:30 -0000	1.10
@@ -103,7 +103,7 @@
     ret = log_open_file(file);
 
         if(ret >= 0)
-        setvbuf(file, NULL, _IOLBF, 0);
+        setvbuf(file, NULL, IO_BUFFER_TYPE, 0);
 
     return ret;
 }

<p><p>1.5       +5 -0      log/log.h

Index: log.h
===================================================================
RCS file: /usr/local/cvsroot/log/log.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- log.h	3 Aug 2002 08:14:56 -0000	1.4
+++ log.h	27 Feb 2003 03:02:30 -0000	1.5
@@ -9,6 +9,11 @@
 #define LOG_ENOTOPEN -4
 #define LOG_ENOTIMPL -5
 
+#ifdef _WIN32
+#define IO_BUFFER_TYPE _IONBF
+#else
+#define IO_BUFFER_TYPE _IOLBF
+#endif
 
 void log_initialize();
 int log_open_file(FILE *file);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list