From 198537b70f9592245b609bbb5a33c9231e25dcf8 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Fri, 5 May 2000 07:18:50 +0000 Subject: [PATCH] - Make Windows compile again. --- ext/rpc/com/COM.c | 9 +++++---- sapi/cgi/cgi_main.c | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ext/rpc/com/COM.c b/ext/rpc/com/COM.c index 37c045ef3a..f9fe7b6e79 100644 --- a/ext/rpc/com/COM.c +++ b/ext/rpc/com/COM.c @@ -33,7 +33,7 @@ * Zeev */ -#if WIN32|WINNT +#ifdef PHP_WIN32 #define _WIN32_DCOM @@ -41,6 +41,7 @@ #include "php_COM.h" #include "zend_compile.h" #include "php_ini.h" +#include "php_reentrancy.h" #include "objbase.h" #include "olestd.h" @@ -182,9 +183,9 @@ static PHP_INI_MH(OnTypelibFileChange) if (typelib_name_buffer[0]==';') { continue; } - typelib_name = strtok_r(typelib_name_buffer, "\r\n", &strtok_buf); /* get rid of newlines */ - typelib_name = strtok_r(typelib_name, "#", &strtok_buf); - modifier = strtok_r(NULL, "#", &strtok_buf); + typelib_name = php_strtok_r(typelib_name_buffer, "\r\n", &strtok_buf); /* get rid of newlines */ + typelib_name = php_strtok_r(typelib_name, "#", &strtok_buf); + modifier = php_strtok_r(NULL, "#", &strtok_buf); if (modifier) { if (!strcmp(modifier, "cis") || !strcmp(modifier, "case_insensitive")) { mode &= ~CONST_CS; diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index aed8252594..96d844a1a0 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -47,6 +47,7 @@ #include #endif #include "zend.h" +#include "zend_extensions.h" #include "php_ini.h" #include "php_globals.h" #include "main.h" @@ -317,13 +318,15 @@ static void define_command_line_ini_entry(char *arg) void php_register_command_line_global_vars(char **arg) { char *var, *val; + ELS_FETCH(); + PLS_FETCH(); var = *arg; val = strchr(var, '='); if (!val) { printf("No value specified for variable '%s'\n", var); } else { - *val++ = NULL; + *val++ = '\0'; php_register_variable(var, val, NULL ELS_CC PLS_CC); } efree(*arg); -- 2.40.0