stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r664184 - in /stdcxx/branches/4.3.x: bin/duration bin/genxviews bin/xbuildgen bin/xcomp.awk etc/config/src/INFINITY.cpp include/ansi/cwchar src/num_put.cpp util/exec.cpp
Date Fri, 06 Jun 2008 23:06:19 GMT
Author: vitek
Date: Fri Jun  6 16:06:18 2008
New Revision: 664184

URL: http://svn.apache.org/viewvc?rev=664184&view=rev
Log:
2008-06-06  Travis Vitek  <vitek@roguewave.com>

	Merged revisions 660486, 660489, 660492, 661050, 661053, 661075, 
	and 661152 from branches/4.2.x


	2008-05-27  Farid Zaripov  <farid_zaripov@epam.com>

	* etc/config/src/INFINITY.cpp (flt_qnan): Clear sign bit to obtain
	value of positive qnan.
	(dbl_qnan): Ditto.
	(ldbl_qnan): Ditto.

	2008-05-27  Farid Zaripov  <farid_zaripov@epam.com>

	* include/ansi/cwchar (wcsrchr): Removed const modifier since
	function returns non-const wchar_t*.

	2008-05-27  Farid Zaripov  <farid_zaripov@epam.com>

	STDCXX-51
	* src/num_put.cpp (__rw_fmat_infinite): Enabled processing the
	sign of the NaN's. Put 'q' or 's' prefix at the beginning of
	the "{q|s}nan" word.

	2008-05-28  Martin Sebor  <sebor@roguewave.com>

	STDCXX-946
	* util/exec.cpp (rw_charcasecmp): Folded into...
	(rw_strcasecmp): ...here. Rewrote a for loop as a do/while loop
	to silence HP aCC 6 remark #4315-D: for loop without body, did
	you insert an extra ';'?
	(get_signo): Corrected the interpretation of exit status of 126
	and 127 used to indicate a "cannot execute" and "executable does
	not exist" errors, respectively.
	(exec_file): Exit with status of 126 on execv() failure.

	* util/exec.cpp (calculate_usage, exec_file): Cast literal to
	the correct type to silence HP aCC 6 warning #2068-D: integer
	conversion resulted in a change of sign.

	2008-05-28  Martin Sebor  <sebor@roguewave.com>

	* util/exec.cpp (ENOENT): Defined macro if not defined in <errno.h>.
	(exec_file): Exited with status of 127 on ENOENT and 126 otherwise,
	as per POISIX. Removed unnecessary diagnostic output (handled by
	the parent instance of the same program).

	2008-05-28  Martin Sebor  <sebor@roguewave.com>

	* bin/genxviews (tmpout): New name of a temporary file to replace
	the final output file with at the end of execution.
	(output): Used tmpout instead of outfile.
	Replaced the final output file only at the end of execution of
	the script.

	2008-05-28  Martin Sebor  <sebor@roguewave.com>

	* bin/genxviews (date): Defined at the top of the script to make
	it accessible throughout.
	(process_results): Computed and formatted the age of each batch
	of log files in addition to the timestamp of the oldest one.
	* bin/xbuildgen (myrev, myurl, myname): Computed constants from
	the $HeadURL$ Subversion keyword same as in genxviews.
	(print_help): Added -V option.
	(resultstyle.css): Added EXEC entry.
	Passed the version argument to xcomp.awk.
	* bin/duration (convert_windows_date): New function to convert
	date in Windows "Day MM/DD/YYYY" format to the POSIX %c format.
	(convert_ls_date): New function to convert ls-style timestamps
	to the POSIX %c format.
	(seconds_from_epoch): Called convert_windows_date or
	convert_ls_date to convert Windows or ls-style timestamps to
	the expected POSIX %c format.
	* bin/xcomp.awk (version): Added a new variable to make it
	possible to select branches in addition to trunk.


Modified:
    stdcxx/branches/4.3.x/bin/duration
    stdcxx/branches/4.3.x/bin/genxviews
    stdcxx/branches/4.3.x/bin/xbuildgen
    stdcxx/branches/4.3.x/bin/xcomp.awk
    stdcxx/branches/4.3.x/etc/config/src/INFINITY.cpp
    stdcxx/branches/4.3.x/include/ansi/cwchar
    stdcxx/branches/4.3.x/src/num_put.cpp
    stdcxx/branches/4.3.x/util/exec.cpp

Modified: stdcxx/branches/4.3.x/bin/duration
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/bin/duration?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/bin/duration (original)
+++ stdcxx/branches/4.3.x/bin/duration Fri Jun  6 16:06:18 2008
@@ -194,11 +194,84 @@
 }
 
 
+# converts date in the Windows "Day MM/DD/YYYY" format
+# to POSIX %c
+convert_windows_date()
+{
+    date=$1
+
+    wday=${date%% *}
+    date=${date#* }
+
+    mon=${date%%/*}
+    date=${date#*/}
+
+    mday=${date%%/*}
+    year=${date#*/}
+
+    case $mon in
+        01) mon="Jan";;
+        02) mon="Feb";;
+        03) mon="Mar";;
+        04) mon="Apr";;
+        05) mon="May";;
+        06) mon="Jun";;
+        07) mon="Jul";;
+        08) mon="Aug";;
+        09) mon="Sep";;
+        10) mon="Oct";;
+        11) mon="Nov";;
+        12) mon="Dec";;
+    esac
+
+    func_return_value="$wday $mon $mday 00:00:00 UTC $year"
+}
+
+
+# converts date in the ls -l format to POSIX %c
+convert_ls_date()
+{
+    date=$1
+
+    mon=${date%% *}
+    date=${date#* }
+
+    mday=${date%% *}
+    time=${date#* }
+
+    if [ ${#time} -eq 4 ]; then
+        year=$time
+        time="00:00:00"
+    else
+        year=`date "+%Y"`
+        time="$time:00"
+    fi
+
+    func_return_value="Mon $mon $mday $time UTC $year"
+}
+
+
 # computes the number of seconds from the Epoch (1/1/1970)
 seconds_from_epoch()
 {
     date=$1
 
+    # remove all leading and trailing whitespace
+    date=${date## }
+    date=${date%% }
+
+    datelen=${#date}
+
+    # check the length to see if the date is in the POSIX %c format
+    if [ $datelen -eq 11 -o $datelen -eq 12 ]; then
+        # assume ls -l format (i.e., "+%b %e %H:%M" or "+%b %e %Y"
+        # POSIX date format)
+        convert_ls_date "$date"; date=$func_return_value
+    elif [ $datelen -eq 14 ]; then
+        # assume Day MM/DD/YYYY
+        convert_windows_date "$date"; date=$func_return_value
+    fi
+
     # extract the year, the 1-based month and day of month, hours,
     # minutes, and seconds (normalized to the GMT time zone) from
     # the date

Modified: stdcxx/branches/4.3.x/bin/genxviews
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/bin/genxviews?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/bin/genxviews (original)
+++ stdcxx/branches/4.3.x/bin/genxviews Fri Jun  6 16:06:18 2008
@@ -32,6 +32,9 @@
 
 readonly www_stdcxx_dir="/www/stdcxx.apache.org/builds"
 
+# current date and time to compute log ages
+readonly now=`date`
+
 XBUILDGEN=`which xbuildgen 2>/dev/null`
 
 if [ "$XBUILDGEN" = "" ]; then
@@ -73,6 +76,9 @@
 
         o)  # argument is the name of output file (stdout by default)
             outfile=$OPTARG
+
+            # temporary output file (will replace outfile when done)
+            tmpout=$outfile.$$
             ;;
 
         V)  # specify stdcxx branch/version to generate cross-build
@@ -152,16 +158,16 @@
 output ()
 {
     if [ $# -eq 0 ]; then
-        # no arguments provided, copy its own stdin to outfile
-        if [ -z $outfile ]; then
+        # no arguments provided, copy its own stdin to tmpout
+        if [ -z $tmpout ]; then
             cat
         else
-            cat >>$outfile
+            cat >>$tmpout
         fi
-    elif [ -z $outfile ]; then
+    elif [ -z $tmpout ]; then
         echo "$*"
     else
-        echo "$*" >>$outfile
+        echo "$*" >>$tmpout
     fi
 }
 
@@ -249,7 +255,8 @@
     suffixes="a A d D s S"
 
     unset buildlogs
-    unset oldest
+    unset oldest_age
+    unset oldest_time
 
     count=0
 
@@ -289,8 +296,8 @@
     else
         output "          <td><a href=\"$xfile\">$xfile</a></td>"
 
-        oldest=`  cd $logdir && ls -lrt $buildlogs | head -n 1 \
-                | awk '{ print $6 " " $7 " " $8 }'`
+        oldest_time=`  cd $logdir && LANG=C ls -lrt $buildlogs | head -n 1 \
+                    | awk '{ print $6 " " $7 " " $8 }'`
 
         if [ $newlogs -gt 0 ]; then
 
@@ -316,12 +323,18 @@
         end=`expr $end + 60`
     fi
 
+    # compute the amount of time it took to process this batch
     duration=`expr $end - $duration`
 
+    # compute the age of the oldest log
+    if [ "$oldest_time" != "" ]; then
+        oldest_age=`duration "$oldest_time" "$now"`
+    fi
+
     cat<<EOF | output
           <td>$count</td>
           <td>$newlogs</td>
-          <td>$oldest</td>
+          <td title="$oldest_time">$oldest_age</td>
           <td>$duration</td>
         </tr>
 EOF
@@ -634,7 +647,6 @@
 
 
 # compute the number of seconds it took to process all logs
-readonly now=`date`
 processing_time=`duration "$start_time" "$now"`
 
 cat<<EOF | output
@@ -644,3 +656,9 @@
   </body>
 </html>
 EOF
+
+# rerame the temporary output file to $outfile, possibly replacing
+# the original $outfile if it exists
+if [ -f "$tmpout" ]; then
+    mv $tmpout $outfile
+fi

Modified: stdcxx/branches/4.3.x/bin/xbuildgen
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/bin/xbuildgen?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/bin/xbuildgen (original)
+++ stdcxx/branches/4.3.x/bin/xbuildgen Fri Jun  6 16:06:18 2008
@@ -83,9 +83,6 @@
 ######################################################################
 # global constants
 
-# set program name (used in diagnostic messages)
-readonly myname=`basename $0`
-
 # the directory where the script is located to get a hold of other
 # files at locations relative to this one (assumes the script resides
 # within the stdcxx source tree)
@@ -121,14 +118,24 @@
 # default page title (unless overridden on the command line)
 title="Multi-platform Test Result View"
 
-# script's revision number
+# extract the script's revision number
 myrev='$Revision$'
-myrev=${myrev#'$Revision: '}
-myrev=${myrev%' $'}
+myrev=${myrev#'$Revision: '}   # strip leading text
+myrev=${myrev%' $'}            # strip trailing text
+
+# form the URL to this version of the script in the repository
+myurl='$HeadURL$'
+myurl=${myurl#'$HeadURL: '}   # strip leading text
+myurl=${myurl##*asf/}         # strip svn prefix
+myurl=${myurl%' $'}           # strip trailing text
 
-# URL to this version of the script in the repository
-readonly myurl="$svnpath/bin/xbuildgen?view=markup&rev=$myrev"
+# prepend ViewVC prefix
+myurl="http://svn.apache.org/viewvc/$myurl"
 
+# extract program name from the url (used in diagnostic messages)
+readonly myname=${myurl##*/}
+
+myurl="$myurl?view=markup&rev=$myrev"
 
 ######################################################################
 
@@ -175,6 +182,10 @@
     echo "     -t <list-of-tests>"
     echo "          Generate a report for the specified list of tests with"
     echo "          tests listed in columns and builds in rows."
+    echo
+    echo "     -V <version>"
+    echo "          Stdcxx version (branch) to generate results for."
+    echo "          When omitted, trunk is assumed."
 }
 
 ######################################################################
@@ -839,6 +850,12 @@
     font-weight:bold;
     text-align:center;
 }
+td.EXEC {
+    color:white;
+    background:mediumslateblue;
+    font-weight:bold;
+    text-align:center;
+}
 td.xdep {
     color:yellow;
     background:gray;
@@ -947,7 +964,7 @@
     xfails=""
 fi
 
-$xcomp bodyonly=1 logdir=$logdir $xfails $textlogs | output
+$xcomp bodyonly=1 logdir=$logdir version=$version $xfails $textlogs | output
 
 ######################################################################
 # output the rest of the HTML file
@@ -1040,6 +1057,15 @@
           </td>
         </tr>
         <tr>
+          <td class="EXEC">EXEC</td>
+          <td class="na">Failure</td>
+          <td colspan=2 class="na"><center>Not Applicable</center></td>
+          <td class="na">
+             Component compiled and linked successfully but failed
+             to execute (possibly due to a linker error).
+          </td>
+        </tr>
+        <tr>
           <td class="WARN">WARN</td>
           <td class="na">Success</td>
           <td class="XWARN">XWARN</td>

Modified: stdcxx/branches/4.3.x/bin/xcomp.awk
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/bin/xcomp.awk?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/bin/xcomp.awk (original)
+++ stdcxx/branches/4.3.x/bin/xcomp.awk Fri Jun  6 16:06:18 2008
@@ -23,10 +23,12 @@
 ########################################################################
 #
 # SYNOPSIS
-#     myname [bodyonly=0|1 logdir=<logdir>] logs...
+#     myname [bodyonly=0|1 logdir=<logdir> version=<version>] logs...
 #
 # VARIABLES:
 #   bodyonly     when non-zero, suppresses the <html> tags
+#   logdir
+#   version      stdcxx version (branch) to generate results for.
 #
 ########################################################################
 
@@ -132,8 +134,6 @@
     buildmodes ["15s"] = "archive, debug, reentrant"
     buildmodes ["15S"] = "archive, debug, reentrant, wide"
 
-    svnpath="http://svn.apache.org/viewvc/stdcxx/trunk"
-
     # regular expression to match a name (e.g., compiler or OS)
     re_name    = "[A-Za-z][A-Za-z_0-9]*"
 
@@ -165,6 +165,18 @@
 
 # detect the type of file
 1 == FNR {
+
+    if (svnpath == "") {
+
+        # initialize svnpath using version (assume trunk by default)
+        svnpath = "http://svn.apache.org/viewvc/stdcxx"
+
+        if (version == "" || version == "trunk")
+            svnpath = svnpath "/trunk"
+        else
+            svnpath = svnpath "/branches/" version
+    }
+
     section = 0
 
     if (0 == match(FILENAME, re_logname)) {

Modified: stdcxx/branches/4.3.x/etc/config/src/INFINITY.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/INFINITY.cpp?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/src/INFINITY.cpp (original)
+++ stdcxx/branches/4.3.x/etc/config/src/INFINITY.cpp Fri Jun  6 16:06:18 2008
@@ -165,6 +165,15 @@
 
     val.val /= flt_zero ();
 
+    // val.val can be +qnan or -qnan
+    // clear sign bit
+    if (e == big_endian) {
+        val.bits [0] &= '\x7f';
+    }
+    else {
+        val.bits [sizeof (val.val) - 1] &= '\x7f';
+    }
+
 #else   // if !defined (_RWSTD_NO_DBL_TRAPS)
 
     // floating point arithmetic traps
@@ -172,7 +181,7 @@
     // assume IEEE 754 floating point format
 
     if (e == big_endian) {
-        val.bits [0] = '\xff';
+        val.bits [0] = '\x7f';
         val.bits [1] = '\xc0';
         val.bits [2] = '\0';
         val.bits [3] = '\0';
@@ -181,7 +190,7 @@
         val.bits [0] = '\0';
         val.bits [1] = '\0';
         val.bits [2] = '\xc0';
-        val.bits [3] = '\xff';
+        val.bits [3] = '\x7f';
     }
 
 #endif   // _RWSTD_NO_DBL_TRAPS
@@ -355,6 +364,15 @@
 
     val.val /= dbl_zero ();
 
+    // val.val can be +qnan or -qnan
+    // clear sign bit
+    if (e == big_endian) {
+        val.bits [0] &= '\x7f';
+    }
+    else {
+        val.bits [sizeof (val.val) - 1] &= '\x7f';
+    }
+
 #else   // if !defined (_RWSTD_NO_DBL_TRAPS)
 
     // floating point arithmetic traps
@@ -362,7 +380,7 @@
     // assume IEEE 754 floating point format
 
     if (e == big_endian) {
-        val.bits [0] = '\xff';
+        val.bits [0] = '\x7f';
         val.bits [1] = '\xf8';
         val.bits [2] = '\0';
         val.bits [3] = '\0';
@@ -379,7 +397,7 @@
         val.bits [4] = '\0';
         val.bits [5] = '\0';
         val.bits [6] = '\xf8';
-        val.bits [7] = '\xff';
+        val.bits [7] = '\x7f';
     }
 
 #endif   // _RWSTD_NO_DBL_TRAPS
@@ -587,6 +605,18 @@
 
     val.val /= ldbl_zero ();
 
+    // val.val can be +qnan or -qnan
+    // clear sign bit
+    if (e == big_endian) {
+        val.bits [0] &= '\x7f';
+    }
+    else {
+        unsigned inx = sizeof (val.val) - 1;
+        // skip the trailing zero's
+        while (!val.bits [inx]) --inx;
+        val.bits [inx] &= '\x7f';
+    }
+
 #else   // if !defined (_RWSTD_NO_DBL_TRAPS)
 
     // floating point arithmetic traps
@@ -594,7 +624,7 @@
     // assume IEEE 754 floating point format
 
     if (e == big_endian) {
-        val.bits [ 0] = '\xff';
+        val.bits [ 0] = '\x7f';
         val.bits [ 1] = '\xff';
         val.bits [ 2] = '\x80';
         val.bits [ 3] = '\0';
@@ -627,7 +657,7 @@
         val.bits [12] = '\0';
         val.bits [13] = '\x80';
         val.bits [14] = '\xff';
-        val.bits [15] = '\xff';
+        val.bits [15] = '\x7f';
     }
 
 #endif   // _RWSTD_NO_DBL_TRAPS

Modified: stdcxx/branches/4.3.x/include/ansi/cwchar
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/ansi/cwchar?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/ansi/cwchar (original)
+++ stdcxx/branches/4.3.x/include/ansi/cwchar Fri Jun  6 16:06:18 2008
@@ -722,7 +722,7 @@
 
 namespace std {
 
-using wcscspn;
+using ::wcscspn;
 
 #  undef _RWSTD_NO_WCSCSPN
 #endif   // _RWSTD_NO_WCSCSPN
@@ -940,7 +940,7 @@
 
 inline wchar_t* wcsrchr (wchar_t *__s, wchar_t __c)
 {
-    const wchar_t *__ss = __s;
+    wchar_t *__ss = __s;
     while (*__ss++);
     while (--__ss != __s && *__ss != __c);
     return *__ss == __c ? __ss : 0;

Modified: stdcxx/branches/4.3.x/src/num_put.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/src/num_put.cpp?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/src/num_put.cpp (original)
+++ stdcxx/branches/4.3.x/src/num_put.cpp Fri Jun  6 16:06:18 2008
@@ -100,28 +100,24 @@
     }
     else {
         _RWSTD_ASSERT (__rw_isnan (val));
-#if 0
-        // disabled since not all platforms correctly handling sign of NaN's
+
         if (__rw_signbit (val)) {
             *end++ = '-';
         }
         else if (flags & _RWSTD_IOS_SHOWPOS) {
             *end++ = '+';
         }
-#endif
 
         const char str [] = "nNaAqQsS";
-        *end++ = str [cap + 0];
-        *end++ = str [cap + 2];
-        *end++ = str [cap + 0];
-#if 0
-        // disabled since not all platforms supporting 
-        // the quiet and signaling NaN's
+
         if (__rw_isqnan (val))
             *end++ = str [cap + 4];
         else if (__rw_issnan (val))
             *end++ = str [cap + 6];
-#endif
+
+        *end++ = str [cap + 0];
+        *end++ = str [cap + 2];
+        *end++ = str [cap + 0];
     }
 
     return int (end - buf);

Modified: stdcxx/branches/4.3.x/util/exec.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/util/exec.cpp?rev=664184&r1=664183&r2=664184&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/util/exec.cpp (original)
+++ stdcxx/branches/4.3.x/util/exec.cpp Fri Jun  6 16:06:18 2008
@@ -89,6 +89,9 @@
 #endif
 
 
+#ifndef ENOENT
+#  define ENOENT     1   /* Linux value */
+#endif
 #ifndef ESRCH
 #  define ESRCH      3   /* Linux value */
 #endif
@@ -329,22 +332,6 @@
 };
 
 /**
-   Compare two characters in a case-insensitive manner
-
-   @param c1 first character to compare
-   @param c2 second character to compare
-   @return an integer less than, equal to, or greater than 0, coresponding
-   to whether c1 is less than, equal to, or greater than c2 when compared
-   in a case insensitive manner.
-*/
-static int
-rw_charcasecmp (char c1, char c2)
-{
-    typedef unsigned char UChar; 
-    return tolower ((UChar)c1) - tolower ((UChar)c2);
-}
-
-/**
    Reimplementation of the POSIX strcasecmp function.
 
    This is a simplistic (re)implementation of the strcasecmp function
@@ -361,15 +348,19 @@
 {
     int delta;
 
+    typedef unsigned char UChar;
+
     assert (0 != s1);
     assert (0 != s2);
 
-    for (delta = rw_charcasecmp (*s1, *s2); 
-         *s1 && *s2 && 0 == delta; 
-         delta = rw_charcasecmp (*(++s1), *(++s2)));
+    do {
+        delta = tolower ((UChar)*s1) - tolower ((UChar)*s2);
+    } while (*s1++ && *s2++ && 0 == delta);
+
     return delta;
 }
 
+
 int
 get_signo (const char* signame)
 {
@@ -529,12 +520,21 @@
         if (child_pid == wait_pid) {
             if (WIFEXITED (status)) {
                 result->exit = WEXITSTATUS (status);
+
+                /* from POSIX, 2.8.2 Exit Status for Commands:
+                 *
+                 * If a command is not found, the exit status shall be 127.
+                 * If the command name is found, but it is not an executable
+                 * utility, the exit status shall be 126. Applications that
+                 * invoke utilities without using the shell should use these
+                 * exit status values to report similar errors.
+                 */
                 switch (result->exit) {
                 case 126:
-                    result->status = ST_EXIST;
+                    result->status = ST_EXECUTE;
                     break;
                 case 127:
-                    result->status = ST_EXECUTE;
+                    result->status = ST_EXIST;
                     break;
                 }
                 break; /*we've got an exit state, so let's bail*/
@@ -791,7 +791,7 @@
 
     c_clk = times (&c_tms);
 
-    if (-1 == c_clk) {
+    if ((clock_t)-1 == c_clk) {
         warn ("Failed to retrieve ending times: %s", strerror (errno));
         return;
     }
@@ -869,10 +869,13 @@
 
         execv (options->argv [0], options->argv);
 
-        fprintf (error_file, "%s (%s): execv (\"%s\", ...) error: %s\n",
-                 exe_name, target_name, options->argv [0], strerror (errno));
+        /* POSIX specifies status of 127 when the executable doesn't
+         * exist and 126 for all other exec failures
+         */
+        if (ENOENT == errno)
+            exit (127);
 
-        exit (1);
+        exit (126);
     }
 
     if (-1 == child_pid) {
@@ -885,7 +888,7 @@
         struct tms h_tms;
         clock_t h_clk = times (&h_tms);
         wait_for_child (child_pid, options->timeout, result);
-        if (-1 != h_clk)
+        if ((clock_t)-1 != h_clk)
             calculate_usage (result, h_clk, &h_tms);
         else
             warn ("Failed to retrieve start times: %s", strerror (errno));



Mime
View raw message