daily update
[deliverable/binutils-gdb.git] / libiberty / mkstemps.c
index 6ef526ece3dbcf30f8617dbd608f9948fd06762e..94edf78755b28ee446af08358075d664016913c0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1998, 2004 Free Software Foundation, Inc.
    This file is derived from mkstemp.c from the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
 #include "config.h"
 #endif
 
+#include <sys/types.h>
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
@@ -48,18 +49,27 @@ typedef unsigned long gcc_uint64_t;
 #define TMP_MAX 16384
 #endif
 
-/* Generate a unique temporary file name from TEMPLATE.
+/*
 
-   TEMPLATE has the form:
+@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len})
 
-   <path>/ccXXXXXX<suffix>
+Generate a unique temporary file name from @var{template}.
+@var{template} has the form:
 
-   SUFFIX_LEN tells us how long <suffix> is (it can be zero length).
+@example
+   @var{path}/ccXXXXXX@var{suffix}
+@end example
 
-   The last six characters of TEMPLATE before <suffix> must be "XXXXXX";
-   they are replaced with a string that makes the filename unique.
+@var{suffix_len} tells us how long @var{suffix} is (it can be zero
+length).  The last six characters of @var{template} before @var{suffix}
+must be @samp{XXXXXX}; they are replaced with a string that makes the
+filename unique.  Returns a file descriptor open on the file for
+reading and writing.
+
+@end deftypefn
+
+*/
 
-   Returns a file descriptor open on the file for reading and writing.  */
 int
 mkstemps (template, suffix_len)
      char *template;
This page took 0.024093 seconds and 4 git commands to generate.