2 * tmpfile.c - create and open a temporary file
6 #if defined(_POSIX_SOURCE)
17 static char name_buffer
[L_tmpnam
] = "/tmp/tmp." ;
18 static char *name
= NULL
;
22 name
= name_buffer
+ strlen(name_buffer
);
23 name
= _i_compute(_getpid(), 10, name
, 5);
27 file
= fopen(name_buffer
,"wb+");
28 if (!file
) return (FILE *)NULL
;
29 (void) remove(name_buffer
);