octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #36688] tempname does not return a sufficientl


From: Rik
Subject: [Octave-bug-tracker] [bug #36688] tempname does not return a sufficiently unique file name on windows
Date: Thu, 21 Jun 2012 16:29:57 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0

Follow-up Comment #2, bug #36688 (project octave):

For reference, here is some simple code and the results on a Linux platform.


for i = 1:10
> tempname ()
> endfor
ans = /tmp/oct-7zvpQC
ans = /tmp/oct-mIWsuN
ans = /tmp/oct-PY8w8X
ans = /tmp/oct-lgZBM8
ans = /tmp/oct-y3CHqj
ans = /tmp/oct-VBUN4t
ans = /tmp/oct-c8YUIE
ans = /tmp/oct-dtH2mP
ans = /tmp/oct-oP7a1Z
ans = /tmp/oct-cgkkFa


So the results are quite good for Linux.

However, my C library has the tmpnam () function which Windows may not.  Check
what configure has found for your system by looking at the file config.h. 
Here is one way to do so.


grep -i tempnam config.h

which, for me, returns

/* Define to 1 if you have the `tempnam' function. */
#define HAVE_TEMPNAM 1


Note that the code in tempname.c is protected by a '#ifdnef TEMPNAM' which
means it is only used as a fallback when configure and Octave can't find
better alternatives.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36688>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]