Update of /cvsroot/boost/boost/tools/jam/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21129/tools/jam/src

Modified Files:
        execnt.c 
Log Message:
Fix to compile in Borland C99: CLOCKS_PER_SEC, and clock_t, can be a float.

Index: execnt.c
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/execnt.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- execnt.c    16 Jun 2007 20:52:36 -0000      1.33
+++ execnt.c    19 Jun 2007 03:00:46 -0000      1.34
@@ -924,8 +924,10 @@
 static void close_alerts()
 {
     /* we only attempt this every 5 seconds, or so, because it's
-    not a cheap operation, and we'll catch the alerts eventually. */
-    if ( (clock() % (CLOCKS_PER_SEC*5)) < (CLOCKS_PER_SEC/2) )
+    not a cheap operation, and we'll catch the alerts eventually.
+    this check uses floats as some compilers define CLOCKS_PER_SEC
+    as a float or double. */
+    if ( ((float)clock() / (float)(CLOCKS_PER_SEC*5)) < (1.0/5.0) )
     {
         int i;
         for ( i = 0; i < globs.jobs; ++i )


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to