summaryrefslogtreecommitdiff
path: root/libiberty/functions.texi
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-25 04:41:41 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-25 04:41:41 +0000
commita2ef32b006a6f88ffde6c5c06e52d91c176f258d (patch)
tree69b832401346b668037c811e96ccd1486e1163a8 /libiberty/functions.texi
parent1cf8f41f58e597554a1f73d904c49bf12d71419e (diff)
downloadgcc-a2ef32b006a6f88ffde6c5c06e52d91c176f258d.tar.gz
include:
* libiberty.h (xstrndup): Declare. libiberty: * Makefile.in (CFILES): Add strndup.c and xstrndup.c. (REQUIRED_OFILES): Add xstrndup.o. (CONFIGURED_OFILES): Add strndup.o. Regenerate dependencies. * configure.ac (funcs, AC_CHECK_FUNCS): Add strndup. * strndup.c, xstrndup.c: New. * config.in, configure, functions.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97034 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/functions.texi')
-rw-r--r--libiberty/functions.texi36
1 files changed, 36 insertions, 0 deletions
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index b6e8e7acb81..79c8a35b3ca 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -339,6 +339,14 @@ between calls to @code{getpwd}.
@end deftypefn
+@c gettimeofday.c:12
+@deftypefn int gettimeofday (struct timeval *@var{tp}, void *@var{tz})
+
+Writes the current time to @var{tp}. This implementation requires
+that @var{tz} be NULL. Returns 0 on success, -1 on failure.
+
+@end deftypefn
+
@c hex.c:30
@deftypefn Extension void hex_init (void)
@@ -893,6 +901,15 @@ Compares the first @var{n} bytes of two strings, returning a value as
@end deftypefn
+@c strndup.c:23
+@deftypefn Extension char* strndup (const char *@var{s}, size_t @var{n})
+
+Returns a pointer to a copy of @var{s} with at most @var{n} characters
+in memory obtained from @code{malloc}, or @code{NULL} if insufficient
+memory was available. The result is always NUL terminated.
+
+@end deftypefn
+
@c strrchr.c:6
@deftypefn Supplemental char* strrchr (const char *@var{s}, int @var{c})
@@ -1008,6 +1025,16 @@ not be used in new projects. Use @code{mkstemp} instead.
@end deftypefn
+@c unlink-if-ordinary.c:27
+@deftypefn Supplemental int unlink_if_ordinary (const char*)
+
+Unlinks the named file, unless it is special (e.g. a device file).
+Returns 0 when the file was unlinked, a negative value (and errno set) when
+there was an error deleting the file, and a positive value if no attempt
+was made to unlink the file because it is special.
+
+@end deftypefn
+
@c vasprintf.c:51
@deftypefn Extension int vasprintf (char **@var{resptr}, const char *@var{format}, va_list @var{args})
@@ -1153,4 +1180,13 @@ will never return a @code{NULL} pointer.
@end deftypefn
+@c xstrndup.c:23
+@deftypefn Replacement char* xstrndup (const char *@var{s}, size_t @var{n})
+
+Returns a pointer to a copy of @var{s} with at most @var{n} characters
+without fail, using @code{xmalloc} to obtain memory. The result is
+always NUL terminated.
+
+@end deftypefn
+