__va_list);
extern size_t __fread(void * __restrict buf, size_t size, size_t count,
FILE * __restrict fp);
-extern int __sdidinit;
+extern pthread_once_t __sdidinit;
/* hold a buncha junk that would grow the ABI */
struct __sFILEX {
unsigned char *up; /* saved _p when _p is doing ungetc data */
pthread_mutex_t fl_mutex; /* used for MT-safety */
- pthread_t fl_owner; /* current owner */
- int fl_count; /* recursive lock count */
int orientation:2; /* orientation for fwide() */
int counted:1; /* stream counted against STREAM_MAX */
mbstate_t mbstate; /* multibyte conversion state */
#define _up _extra->up
#define _fl_mutex _extra->fl_mutex
-#define _fl_owner _extra->fl_owner
-#define _fl_count _extra->fl_count
#define _orientation _extra->orientation
#define _mbstate _extra->mbstate
#define _counted _extra->counted
+
+
#define INITEXTRA(fp) do { \
(fp)->_extra->up = NULL; \
- (fp)->_extra->fl_mutex = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER; \
- (fp)->_extra->fl_owner = NULL; \
- (fp)->_extra->fl_count = 0; \
+ (fp)->_extra->fl_mutex = (pthread_mutex_t)PTHREAD_RECURSIVE_MUTEX_INITIALIZER; \
(fp)->_extra->orientation = 0; \
memset(&(fp)->_extra->mbstate, 0, sizeof(mbstate_t)); \
(fp)->_extra->counted = 0; \