1 --- /Volumes/XDisk/tmp/Libc/stdio/FreeBSD/findfp.c.orig 2004-05-22 08:19:41.000000000 -0700
2 +++ /Volumes/XDisk/tmp/Libc/stdio/FreeBSD/findfp.c 2004-10-24 17:08:30.000000000 -0700
10 #include "libc_private.h"
13 /* p r w flags file _bf z cookie close read seek write */
15 +#define __sFXInit {0, PTHREAD_MUTEX_INITIALIZER}
16 /* the usual - (stdin + stdout + stderr) */
17 static FILE usual[FOPEN_MAX - 3];
18 static struct __sFILEX usual_extra[FOPEN_MAX - 3];
19 static struct glue uglue = { NULL, FOPEN_MAX - 3, usual };
21 -static struct __sFILEX __sFX[3];
22 +static struct __sFILEX __sFX[3] = {__sFXInit, __sFXInit, __sFXInit};
25 * We can't make this 'static' until 6.0-current due to binary
30 - static struct __sFILEX emptyx;
31 + static struct __sFILEX emptyx = __sFXInit;
36 fp->_lb._base = NULL; /* no line buffer */
38 /* fp->_lock = NULL; */ /* once set always set (reused) */
39 + fp->_extra->fl_mutex = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;
40 fp->_extra->orientation = 0;
41 memset(&fp->_extra->mbstate, 0, sizeof(mbstate_t));