From 6b0eca060f4e4885b4484ef9b16abf984da245d4 Mon Sep 17 00:00:00 2001 From: Chris Tankersley Date: Thu, 2 Oct 2014 11:05:31 -0700 Subject: Various fixes to allow support for new VS2014 features - Added some typeof checks to handle JS errors introduced in VS2014 - Added VS2014 to the list of compilers - Changed to use stdint.h if we are using VS2014 or higher - Skip defining timespec if we're using VS2014 or higher - Moved u_char typedef out to always be defined regardless of VS version --- win32/build/confutils.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'win32/build/confutils.js') diff --git a/win32/build/confutils.js b/win32/build/confutils.js index ae668fee26..c54ff68f84 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -49,6 +49,7 @@ VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)'; VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)'; VC_VERSIONS[1700] = 'MSVC11 (Visual C++ 2012)'; VC_VERSIONS[1800] = 'MSVC12 (Visual C++ 2013)'; +VC_VERSIONS[1900] = 'MSVC14 (Visual C++ 2014)'; var VC_VERSIONS_SHORT = new Array(); VC_VERSIONS_SHORT[1200] = 'VC6'; @@ -59,6 +60,7 @@ VC_VERSIONS_SHORT[1500] = 'VC9'; VC_VERSIONS_SHORT[1600] = 'VC10'; VC_VERSIONS_SHORT[1700] = 'VC11'; VC_VERSIONS_SHORT[1800] = 'VC12'; +VC_VERSIONS_SHORT[1900] = 'VC14'; if (PROGRAM_FILES == null) { PROGRAM_FILES = "C:\\Program Files"; @@ -1531,9 +1533,11 @@ function output_as_table(header, ar_out) tmin = 0; tmax = 0; for (k = 0; k < ar_out.length; k++) { - var t = ar_out[k][j].length; - if (t > tmax) tmax = t; - else if (t < tmin) tmin = t; + if(typeof ar_out[k][j] != 'undefined') { + var t = ar_out[k][j].length; + if (t > tmax) tmax = t; + else if (t < tmin) tmin = t; + } } if (tmax > header[j].length) { max[j] = tmax; @@ -1574,8 +1578,10 @@ function output_as_table(header, ar_out) line = ar_out[i]; for (j=0; j < l; j++) { out += " " + line[j]; - for (var k = 0; k < (max[j] - line[j].length); k++){ - out += " "; + if(typeof line[j] != 'undefined') { + for (var k = 0; k < (max[j] - line[j].length); k++){ + out += " "; + } } out += " |"; } @@ -2052,7 +2058,7 @@ function AC_DEFINE(name, value, comment, quote) } if (quote && typeof(value) == "string") { value = '"' + value.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"'; - } else if (value.length == 0) { + } else if (typeof(value) != "undefined" && value.length == 0) { value = '""'; } var item = new Array(value, comment); -- cgit v1.2.1