1 |
/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc. |
/* Copyright (C) 1991, 1992, 1996, 1998, 2004 Free Software Foundation, Inc. |
2 |
This file is derived from mkstemp.c from the GNU C Library. |
This file is derived from mkstemp.c from the GNU C Library. |
3 |
|
|
4 |
The GNU C Library is free software; you can redistribute it and/or |
The GNU C Library is free software; you can redistribute it and/or |
121 |
v /= 62; |
v /= 62; |
122 |
XXXXXX[5] = letters[v % 62]; |
XXXXXX[5] = letters[v % 62]; |
123 |
|
|
|
#ifdef VMS |
|
|
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd"); |
|
|
#else |
|
124 |
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600); |
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600); |
|
#endif |
|
125 |
if (fd >= 0) |
if (fd >= 0) |
126 |
/* The file does not exist. */ |
/* The file does not exist. */ |
127 |
return fd; |
return fd; |