r20381 - gnucash/trunk/src/libqof/qof - Add comments to warn about lack of Windows support in the guid_init

Geert Janssens gjanssens at code.gnucash.org
Mon Mar 7 14:23:26 EST 2011


Author: gjanssens
Date: 2011-03-07 14:23:26 -0500 (Mon, 07 Mar 2011)
New Revision: 20381
Trac: http://svn.gnucash.org/trac/changeset/20381

Modified:
   gnucash/trunk/src/libqof/qof/guid.c
Log:
Add comments to warn about lack of Windows support in the guid_init
function.

Modified: gnucash/trunk/src/libqof/qof/guid.c
===================================================================
--- gnucash/trunk/src/libqof/qof/guid.c	2011-03-07 18:42:16 UTC (rev 20380)
+++ gnucash/trunk/src/libqof/qof/guid.c	2011-03-07 19:23:26 UTC (rev 20381)
@@ -370,10 +370,17 @@
 
     md5_init_ctx(&guid_context);
 
-    /* entropy pool */
+    /* entropy pool
+     * FIXME /dev/urandom doesn't exist on Windows. We should
+     *       use the Windows native CryptGenRandom or RtlGenRandom
+     *       functions. See
+     *       http://en.wikipedia.org/wiki/CryptGenRandom */
     bytes += init_from_file ("/dev/urandom", 512);
 
-    /* files */
+    /* files
+     * FIXME none of these directories make sense on
+     *       Windows. We should figure out some proper
+     *       alternatives there. */
     {
         const char * files[] =
         {
@@ -394,7 +401,13 @@
             bytes += init_from_file(files[i], BLOCKSIZE);
     }
 
-    /* directories */
+    /* directories
+     * Note: P_tmpdir is set to "\" by mingw (Windows) This seems to
+     * trigger unwanted network access attempts (see bug #521817).
+     * So on Windows we explicitly set the temporary directory.
+     * FIXME other than "c:/temp" none of these directories make sense on
+     *       Windows. We should figure out some proper
+     *       alternatives there. */
     {
         const char * dirname;
         const char * dirs[] =



More information about the gnucash-changes mailing list