Skip to content

Commit

Permalink
BUG: Always return positive integers to the OS on error. Windows erro…
Browse files Browse the repository at this point in the history
…r encoding is confused by negative return values.
  • Loading branch information
bradking committed Nov 19, 2007
1 parent 9b0df0d commit ecf24b1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Source/cmakemain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,16 @@ int do_cmake(int ac, char** av)
}
}
}
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;
}
}

0 comments on commit ecf24b1

Please sign in to comment.