summaryrefslogtreecommitdiff
path: root/libiberty/functions.texi
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2005-03-25 04:41:41 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2005-03-25 04:41:41 +0000
commit17998b22b59b393fe28c766e3bd72a0419f70041 (patch)
tree69b832401346b668037c811e96ccd1486e1163a8 /libiberty/functions.texi
parentbb99744fd4346bc283e19ecc2236f320a6901242 (diff)
libiberty.h (xstrndup): Declare.
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. From-SVN: r97034
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
+