Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/libiberty/mkstemps.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    5050#endif
    5151
    52 /* Generate a unique temporary file name from TEMPLATE.
     52/*
    5353
    54    TEMPLATE has the form:
     54@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len})
    5555
    56    <path>/ccXXXXXX<suffix>
     56Generate a unique temporary file name from @var{template}.
     57@var{template} has the form:
    5758
    58    SUFFIX_LEN tells us how long <suffix> is (it can be zero length).
     59@example
     60   @var{path}/ccXXXXXX@var{suffix}
     61@end example
    5962
    60    The last six characters of TEMPLATE before <suffix> must be "XXXXXX";
    61    they are replaced with a string that makes the filename unique.
     63@var{suffix_len} tells us how long @var{suffix} is (it can be zero
     64length).  The last six characters of @var{template} before @var{suffix}
     65must be @samp{XXXXXX}; they are replaced with a string that makes the
     66filename unique.  Returns a file descriptor open on the file for
     67reading and writing.
    6268
    63    Returns a file descriptor open on the file for reading and writing.  */
     69@end deftypefn
     70
     71*/
     72
    6473int
    6574mkstemps (template, suffix_len)
     
    113122      XXXXXX[5] = letters[v % 62];
    114123
     124#ifdef VMS
     125      fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd");
     126#else
    115127      fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
     128#endif
    116129      if (fd >= 0)
    117130        /* The file does not exist.  */
Note: See TracChangeset for help on using the changeset viewer.