fix signal return for sh/fdpic
[musl] / src / internal / stdio_impl.h
index 2083b2f..0dd7fb5 100644 (file)
@@ -17,6 +17,7 @@
 #define F_EOF 16
 #define F_ERR 32
 #define F_SVB 64
+#define F_APP 128
 
 struct _IO_FILE {
        unsigned flags;
@@ -37,14 +38,16 @@ struct _IO_FILE {
        short dummy3;
        signed char mode;
        signed char lbf;
-       int lock;
-       int waiters;
+       volatile int lock;
+       volatile int waiters;
        void *cookie;
        off_t off;
        char *getln_buf;
        void *mustbezero_2;
        unsigned char *shend;
        off_t shlim, shcnt;
+       FILE *prev_locked, *next_locked;
+       struct __locale_struct *locale;
 };
 
 size_t __stdio_read(FILE *, unsigned char *, size_t);
@@ -73,8 +76,9 @@ int __putc_unlocked(int, FILE *);
 FILE *__fdopen(int, const char *);
 int __fmodeflags(const char *);
 
-#define OFLLOCK() LOCK(libc.ofl_lock)
-#define OFLUNLOCK() UNLOCK(libc.ofl_lock)
+FILE *__ofl_add(FILE *f);
+FILE **__ofl_lock(void);
+void __ofl_unlock(void);
 
 #define feof(f) ((f)->flags & F_EOF)
 #define ferror(f) ((f)->flags & F_ERR)