]> granicus.if.org Git - php/commitdiff
Declare vars first. Fix Windows build.
authorJohannes Schlüter <johannes@php.net>
Tue, 22 Feb 2011 12:51:43 +0000 (12:51 +0000)
committerJohannes Schlüter <johannes@php.net>
Tue, 22 Feb 2011 12:51:43 +0000 (12:51 +0000)
sapi/cli/php_cli.c

index 45fa019b8ab99cc42f2ddeaff1e758fa55fa84e8..68267c45c553bdc1f94bf370c0bbc5359544fbb2 100644 (file)
@@ -253,6 +253,8 @@ PHP_CLI_API size_t sapi_cli_single_write(const char *str, uint str_length TSRMLS
 {
 #ifdef PHP_WRITE_STDOUT
        long ret;
+#else
+       size_t ret;
 #endif
 
        if (cli_shell_callbacks.cli_shell_write) {
@@ -274,8 +276,6 @@ PHP_CLI_API size_t sapi_cli_single_write(const char *str, uint str_length TSRMLS
 
        return ret;
 #else
-       size_t ret;
-
        ret = fwrite(str, 1, MIN(str_length, 16384), stdout);
        return ret;
 #endif