[cmake-commits] king committed cmakemain.cxx 1.73 1.74

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Nov 19 13:42:56 EST 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv14812/Source

Modified Files:
	cmakemain.cxx 
Log Message:
BUG: Always return positive integers to the OS on error.  Windows error encoding is confused by negative return values.


Index: cmakemain.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakemain.cxx,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- cmakemain.cxx	24 Oct 2007 15:36:47 -0000	1.73
+++ cmakemain.cxx	19 Nov 2007 18:42:54 -0000	1.74
@@ -487,6 +487,16 @@
         }
       }
     }
-  return res;
+
+  // Always return a non-negative value.  Windows tools do not always
+  // interpret negative return values as errors.
+  if(res != 0)
+    {
+    return 1;
+    }
+  else
+    {
+    return 0;
+    }
 }
 



More information about the Cmake-commits mailing list