diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-11 17:49:47 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-11 17:49:47 +0000 |
commit | 35f4c9560509abdc1bc1710dfe10bf8cf4f0cdbe (patch) | |
tree | 8e8edab22bf94fe76378e62b5c438e2c2d1f8b93 /include/libiberty.h | |
parent | b86b0e16403881949dedf1f47bf325dfe508dce9 (diff) | |
download | gcc-35f4c9560509abdc1bc1710dfe10bf8cf4f0cdbe.tar.gz |
include:
* libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
Provide prototypes for new functions.
libiberty:
* Makefile.in (CFILES): Add fopen_unlocked.c.
(REQUIRED_OFILES): Add ./fopen_unlocked.o.
Regenerate dependencies.
* configure.ac: Check for stdio_ext.h and __fsetlocking.
* fopen_unlocked.c: New file.
* functions.texi, configure, config.in: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97977 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/libiberty.h')
-rw-r--r-- | include/libiberty.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h index eb5633b26ec..80aee8b9460 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -48,6 +48,14 @@ extern "C" { #include <stdio.h> +/* Open and return a FILE pointer. If the OS supports it, ensure that + the stream is setup to avoid any multi-threaded locking. Otherwise + return the FILE pointer unchanged. */ + +extern FILE *fopen_unlocked (const char *path, const char *mode); +extern FILE *fdopen_unlocked (int fildes, const char *mode); +extern FILE *freopen_unlocked (const char *path, const char *mode, FILE *stream); + /* Build an argument vector from a string. Allocates memory using malloc. Use freeargv to free the vector. */ |