1 --- findfp.c.orig Wed Dec 10 13:02:27 2003
2 +++ findfp.c Wed Dec 10 13:04:25 2003
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;
42 /* Stateful encoding/decoding is not yet supported. */