From: Anatol Belski Date: Tue, 11 Nov 2014 14:33:38 +0000 (+0100) Subject: eliminate duplicated identical function definitions X-Git-Tag: PRE_NATIVE_TLS_MERGE~130^2~20^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=524f854193ef1f169fb649feb6010439379aba5c;p=php eliminate duplicated identical function definitions --- diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 6c6626773e..65c273a5bc 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -114,46 +114,6 @@ var php_usual_lib_suspects = PHP_PHP_BUILD+"\\lib"; ADD_FLAG("CFLAGS", '/I "' + php_usual_include_suspects + '" '); ADD_FLAG("LDFLAGS", '/libpath:"' + php_usual_lib_suspects + '" '); -// Poke around for some headers -function probe_basic_headers() -{ - var p; - - if (PHP_PHP_BUILD != "no") { - php_usual_include_suspects += ";" + PHP_PHP_BUILD + "\\include"; - php_usual_lib_suspects += ";" + PHP_PHP_BUILD + "\\lib"; - } -} - -function add_extra_dirs() -{ - var path, i, f; - - if (PHP_EXTRA_INCLUDES.length) { - path = PHP_EXTRA_INCLUDES.split(';'); - for (i = 0; i < path.length; i++) { - f = FSO.GetAbsolutePathName(path[i]); - if (FSO.FolderExists(f)) { - ADD_FLAG("CFLAGS", '/I "' + f + '" '); - } - } - } - if (PHP_EXTRA_LIBS.length) { - path = PHP_EXTRA_LIBS.split(';'); - for (i = 0; i < path.length; i++) { - f = FSO.GetAbsolutePathName(path[i]); - if (FSO.FolderExists(f)) { - if (VS_TOOLSET && VCVERS <= 1200 && f.indexOf(" ") >= 0) { - ADD_FLAG("LDFLAGS", '/libpath:"\\"' + f + '\\"" '); - } else { - ADD_FLAG("LDFLAGS", '/libpath:"' + f + '" '); - } - } - } - } - -} - probe_basic_headers(); add_extra_dirs(); diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index 91b3552412..8b831f0b10 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -98,46 +98,6 @@ var php_usual_lib_suspects = PHP_PHP_BUILD+"\\lib"; ADD_FLAG("CFLAGS", '/I "' + php_usual_include_suspects + '" '); ADD_FLAG("LDFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" '); -// Poke around for some headers -function probe_basic_headers() -{ - var p; - - if (PHP_PHP_BUILD != "no") { - php_usual_include_suspects += ";" + PHP_PHP_BUILD + "\\include"; - php_usual_lib_suspects += ";" + PHP_PHP_BUILD + "\\lib"; - } -} - -function add_extra_dirs() -{ - var path, i, f; - - if (PHP_EXTRA_INCLUDES.length) { - path = PHP_EXTRA_INCLUDES.split(';'); - for (i = 0; i < path.length; i++) { - f = FSO.GetAbsolutePathName(path[i]); - if (FSO.FolderExists(f)) { - ADD_FLAG("CFLAGS", '/I "' + f + '" '); - } - } - } - if (PHP_EXTRA_LIBS.length) { - path = PHP_EXTRA_LIBS.split(';'); - for (i = 0; i < path.length; i++) { - f = FSO.GetAbsolutePathName(path[i]); - if (FSO.FolderExists(f)) { - if (VCVERS <= 1200 && f.indexOf(" ") >= 0) { - ADD_FLAG("LDFLAGS", '/libpath:"\\"' + f + '\\"" '); - } else { - ADD_FLAG("LDFLAGS", '/libpath:"' + f + '" '); - } - } - } - } - -} - probe_basic_headers(); add_extra_dirs(); @@ -147,7 +107,6 @@ STDOUT.WriteBlankLines(1); STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR')); STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB')); - /* XXX inspect this for other toolsets */ if (VS_TOOLSET && VCVERS == 1200) { AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1); diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 1c47ace175..1aac59ea5f 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2708,3 +2708,43 @@ function php_build_option_handle() DEFINE("PHP_BUILD", PHP_PHP_BUILD); } +// Poke around for some headers +function probe_basic_headers() +{ + var p; + + if (PHP_PHP_BUILD != "no") { + php_usual_include_suspects += ";" + PHP_PHP_BUILD + "\\include"; + php_usual_lib_suspects += ";" + PHP_PHP_BUILD + "\\lib"; + } +} + +function add_extra_dirs() +{ + var path, i, f; + + if (PHP_EXTRA_INCLUDES.length) { + path = PHP_EXTRA_INCLUDES.split(';'); + for (i = 0; i < path.length; i++) { + f = FSO.GetAbsolutePathName(path[i]); + if (FSO.FolderExists(f)) { + ADD_FLAG("CFLAGS", '/I "' + f + '" '); + } + } + } + if (PHP_EXTRA_LIBS.length) { + path = PHP_EXTRA_LIBS.split(';'); + for (i = 0; i < path.length; i++) { + f = FSO.GetAbsolutePathName(path[i]); + if (FSO.FolderExists(f)) { + if (VS_TOOLSET && VCVERS <= 1200 && f.indexOf(" ") >= 0) { + ADD_FLAG("LDFLAGS", '/libpath:"\\"' + f + '\\"" '); + } else { + ADD_FLAG("LDFLAGS", '/libpath:"' + f + '" '); + } + } + } + } + +} +