Re: com php-src: improve and generalize the recognition of a cli sapi: win32/codepage.c
| From: | Kalle Sommer Nielsen | Date: | Mon, 09 Jan 2017 05:21:28 +0000 |
| Subject: | Re: com php-src: improve and generalize the recognition of a cli sapi: win32/codepage.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-96638@lists.php.net to get a copy of this message | ||
Hi Anatol
2017-01-08 23:54 GMT+01:00 Anatol Belski <ab@php.net>:
> Commit: d4547304074096a9163488e7504c5ae5728605a2
> Author: Anatol Belski <ab@php.net> Sun, 8 Jan 2017 23:54:58 +0100
> Parents: c846daef28bd1dfbf10cdf905aad40a5fd3be62f
> Branches: PHP-7.1 master
>
> Link:
> http://git.php.net/?p=php-src.git;a=commitdiff;h=d4547304074096a9163488e7504c5ae5728605a2
>
> Log:
> improve and generalize the recognition of a cli sapi
>
> Changed paths:
> M win32/codepage.c
>
>
> Diff:
> diff --git a/win32/codepage.c b/win32/codepage.c
> index 416fa28..aa57892 100644
> --- a/win32/codepage.c
> +++ b/win32/codepage.c
> @@ -252,6 +252,11 @@ __forceinline static char *php_win32_cp_get_enc(void)
> return enc;
> }/*}}}*/
>
> +__forceinline static BOOL php_win32_cp_is_cli_sapi()
> +{/*{{{*/
> + return strlen(sapi_module.name) >= sizeof("cli") - 1 &&
> !strncmp(sapi_module.name, "cli", sizeof("cli") - 1);
> +}/*}}}*/
Shouldn't this include phpdbg too? In that case we can use
sapi_module.phpinfo_as_text
--
regards,
Kalle Sommer Nielsen
kalle@php.net