Changeset 609 for branches/GNU/src/binutils/libiberty/mkstemps.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/libiberty/mkstemps.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 50 50 #endif 51 51 52 /* Generate a unique temporary file name from TEMPLATE.52 /* 53 53 54 TEMPLATE has the form: 54 @deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len}) 55 55 56 <path>/ccXXXXXX<suffix> 56 Generate a unique temporary file name from @var{template}. 57 @var{template} has the form: 57 58 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 59 62 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 64 length). The last six characters of @var{template} before @var{suffix} 65 must be @samp{XXXXXX}; they are replaced with a string that makes the 66 filename unique. Returns a file descriptor open on the file for 67 reading and writing. 62 68 63 Returns a file descriptor open on the file for reading and writing. */ 69 @end deftypefn 70 71 */ 72 64 73 int 65 74 mkstemps (template, suffix_len) … … 113 122 XXXXXX[5] = letters[v % 62]; 114 123 124 #ifdef VMS 125 fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd"); 126 #else 115 127 fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600); 128 #endif 116 129 if (fd >= 0) 117 130 /* The file does not exist. */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.