1 #ifndef STDIO_EXT_H_INCLUDED
2 #define STDIO_EXT_H_INCLUDED
6 /* http://linux.die.net/man/3/__fsetlocking */
7 #define FSETLOCKING_INTERNAL 1
8 #define FSETLOCKING_BYCALLER 2
9 #define FSETLOCKING_QUERY 3
10 static inline int __fsetlocking(FILE *stream
, int type
)
14 return FSETLOCKING_INTERNAL
;
17 static inline int feof_unlocked(FILE *stream
)
22 static inline int ferror_unlocked(FILE *stream
)
24 return ferror(stream
);
27 static inline int fputs_unlocked(const char *s
, FILE *stream
)
29 return fputs(s
, stream
);
32 static inline int fputc_unlocked(int c
, FILE *stream
)
34 return fputc(c
, stream
);
37 static inline size_t fread_unlocked(void *data
, size_t size
, size_t count
, FILE *stream
)
39 return fread(data
, size
, count
, stream
);
42 static inline size_t fwrite_unlocked(const void *data
, size_t size
, size_t count
, FILE *stream
)
44 return fwrite(data
, size
, count
, stream
);