Revision: 69125 http://sourceforge.net/p/brlcad/code/69125 Author: starseeker Date: 2016-10-19 00:41:17 +0000 (Wed, 19 Oct 2016) Log Message: ----------- Add a refinement from Sean to avoid the temp file routine from generating identical names when called within a one second window. This was (one of) the issues we were encountering on Windows with the bn_vlist tests.
Modified Paths: -------------- brlcad/trunk/src/libbu/temp.c Modified: brlcad/trunk/src/libbu/temp.c =================================================================== --- brlcad/trunk/src/libbu/temp.c 2016-10-18 22:14:28 UTC (rev 69124) +++ brlcad/trunk/src/libbu/temp.c 2016-10-19 00:41:17 UTC (rev 69125) @@ -161,7 +161,7 @@ do { /* replace the template with random chars */ - srand((unsigned)time(NULL)); + srand((unsigned)(bu_gettime() % UINT_MAX)); for (i=start; i>=end; i--) { file_template[i] = replace[(int)(replacelen * ((double)rand() / (double)RAND_MAX))]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits