diff options
| author | Ulf Hermann <[email protected]> | 2017-05-04 11:15:55 +0200 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-05-04 12:14:59 +0000 |
| commit | 04c4853ab9cedc5d14bf7f08936ee4e26878f395 (patch) | |
| tree | 91707c57e8595d6f9c734fdf7c765d61099c4ba6 /lib | |
| parent | bc44466ccd2045eea2352f0569399fb0515b46ba (diff) | |
Define unlocked io functions to locked ones if they are unavailable
The locked IO functions will still do the job, albeit a bit slower.
Change-Id: I65c2b6aaa00374302aff3bcf4852a252e1eefd17
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ChangeLog | 5 | ||||
| -rw-r--r-- | lib/eu-config.h | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index ecc61795..321513ca 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2017-05-04 Ulf Hermann <[email protected]> + + * eu-config.h: Define unlocked I/O functions to locked ones if they + are unavailable. + 2017-04-27 Ulf Hermann <[email protected]> * eu-config.h: Define attribute_hidden to be empty if the compiler diff --git a/lib/eu-config.h b/lib/eu-config.h index e69b213d..65300442 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -206,4 +206,32 @@ asm (".section predict_data, \"aw\"; .previous\n" # define funlockfile(fp) /* nop */ #endif +#if !HAVE_DECL_FEOF_UNLOCKED +#define feof_unlocked(x) feof (x) +#endif + +#if !HAVE_DECL_FERROR_UNLOCKED +#define ferror_unlocked(x) ferror (x) +#endif + +#if !HAVE_DECL_FPUTC_UNLOCKED +#define fputc_unlocked(x,y) fputc (x,y) +#endif + +#if !HAVE_DECL_FPUTS_UNLOCKED +#define fputs_unlocked(x,y) fputs (x,y) +#endif + +#if !HAVE_DECL_FWRITE_UNLOCKED +#define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z) +#endif + +#if !HAVE_DECL_PUTC_UNLOCKED +#define putc_unlocked(x,y) putc (x,y) +#endif + +#if !HAVE_DECL_PUTCHAR_UNLOCKED +#define putchar_unlocked(x) putchar (x) +#endif + #endif /* eu-config.h */ |
