Tcl Source Code

View Ticket
Login
Ticket UUID: 741967
Title: UNICOS doesn't have mkstemp()
Type: Bug Created on: 2003-05-22 20:26:13
Submitter: wendypalm Assigned to: dkf
Subsystem: 37. File System Severity:
Priority: 8 Last modified: 2009-01-02 23:46:30
Status: Closed Closed by: dkf
Resolution: Fixed Closed on: 2009-01-02 16:46:30
Version: obsolete: 8.4.3
Description:
The decision to change the tmpnam() calls to mkstemp()
in unix/tclUnixPipe.c has had repercussions for our OS.

UNICOS (and UNICOS/mk) do not have the mkstemp()
function and due to their current maintenance state,
probably never will.
(fyi our future OSs do have it, but that's only for the
new architectures).

is it possible to either put in a configuration test in
to determine whether mkstemp() exists and an #ifdef and
add the tmpnam() code back in? 

i don't think UNICOS is the only OS that doesn't have
this function.

i'm a new user to this forum, so i hope i did this
correctly.  i'd be happy to write the patch(s), but
even though i searched the archives, i thought maybe a
solaris person may have already submitted something.

wendy palm
Cray Open Software Development, Cray Inc.
User Comments:
vincentdarley added on 2003-05-27 22:43:21:
Logged In: YES 
user_id=32170

Please do submit a patch which resolves this problem 
on your platform.  I re-assigning the bug to Jeff who 
has more experience with x-platform unix issues.

jenglish added on 2003-06-05 05:35:26:
Logged In: YES 
user_id=68433

A better solution would be to provide an implementation of
mkstemp in compat/  (it's not that hard to implement.)

The tmpnam() routine is Broken As Designed and should never
be used.  Plus, it's best to avoid introducing too many
#ifdef blocks.

dkf added on 2009-01-02 23:46:30:
Fixed for 8.6 release by writing our own mkstemp() for compat/