fix integer overflow in WIFSTOPPED macro
[musl] / src / stdio / ofl.c
1 #include "stdio_impl.h"
2 #include "lock.h"
3 #include "fork_impl.h"
4
5 static FILE *ofl_head;
6 static volatile int ofl_lock[1];
7 volatile int *const __stdio_ofl_lockptr = ofl_lock;
8
9 FILE **__ofl_lock()
10 {
11         LOCK(ofl_lock);
12         return &ofl_head;
13 }
14
15 void __ofl_unlock()
16 {
17         UNLOCK(ofl_lock);
18 }