aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2005-04-11 17:49:47 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2005-04-11 17:49:47 +0000
commit78a7dc9032e96f6a507d96bc7f3999ff3c9b4c42 (patch)
tree8e8edab22bf94fe76378e62b5c438e2c2d1f8b93 /include
parentf5f7d171c3f8dfff5d7751d8b9b4718f7c1dbd66 (diff)
downloadgcc-78a7dc9032e96f6a507d96bc7f3999ff3c9b4c42.zip
gcc-78a7dc9032e96f6a507d96bc7f3999ff3c9b4c42.tar.gz
gcc-78a7dc9032e96f6a507d96bc7f3999ff3c9b4c42.tar.bz2
libiberty.h (fopen_unlocked, [...]): Provide prototypes for new functions.
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. From-SVN: r97977
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/libiberty.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index a4ebee0..8a77179 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
+ Provide prototypes for new functions.
+
2005-03-29 Ian Lance Taylor <ian@airs.com>
* libiberty.h: Fix indentation.
diff --git a/include/libiberty.h b/include/libiberty.h
index eb5633b..80aee8b 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. */