[PATCH] Thread safe stdio
Thomas Pfaff
tpfaff@gmx.net
Wed Feb 11 10:09:00 GMT 2004
_flock_t is now defined in cygwin/_types.h. I will sent following patch
for newlib when this one is applied:
--- _types.h.org 2004-01-26 23:33:11.000000000 +0100
+++ _types.h 2004-02-10 12:28:44.359443200 +0100
@@ -9,6 +9,10 @@
#ifndef _SYS__TYPES_H
#define _SYS__TYPES_H
+#ifdef __CYGWIN__
+#include <cygwin/_types.h>
+#endif
+
typedef long _off_t;
__extension__ typedef long long _off64_t;
@@ -32,7 +36,9 @@ typedef struct
} __value; /* Value so far. */
} _mbstate_t;
+#ifndef __CYGWIN__
typedef int _flock_t;
+#endif
/* Iconv descriptor type */
typedef void *_iconv_t;
The __sinit call must be done after malloc is initialized, otherwise the
mutex creation will fail.
Thomas
2004-02-11 Thomas Pfaff <tpfaff@gmx.net>
* include/cygwin/_types.h: New file.
* include/sys/lock.h: Ditto.
* include/sys/stdio.h: Ditto.
* dcrt0.cc (dll_crt0_1): Add __sinit call after malloc
initialization.
(_dll_crt0): Remove __sinit call.
* thread.cc: Include sys/lock.h
(__cygwin_lock_init): New function.
(__cygwin_lock_init_recursive): Ditto.
(__cygwin_lock_fini): Ditto.
(__cygwin_lock_lock): Ditto.
(__cygwin_lock_unlock): Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stdio.patch
Type: plain/text
Size: 4813 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20040211/1b806bb3/attachment.bin>
More information about the Cygwin-patches
mailing list