Skip to content

Commit be9b2a9

Browse files
committed
Fixed bug #69418 - more s->p fixes for filenames
1 parent 4605d53 commit be9b2a9

File tree

4 files changed

+85
-85
lines changed

4 files changed

+85
-85
lines changed

ext/pcntl/pcntl.c

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ ZEND_GET_MODULE(pcntl)
198198

199199
static void pcntl_signal_handler(int);
200200
static void pcntl_signal_dispatch();
201-
201+
202202
void php_register_signal_constants(INIT_FUNC_ARGS)
203203
{
204204

@@ -234,7 +234,7 @@ void php_register_signal_constants(INIT_FUNC_ARGS)
234234
REGISTER_LONG_CONSTANT("SIGTERM", (long) SIGTERM, CONST_CS | CONST_PERSISTENT);
235235
#ifdef SIGSTKFLT
236236
REGISTER_LONG_CONSTANT("SIGSTKFLT",(long) SIGSTKFLT, CONST_CS | CONST_PERSISTENT);
237-
#endif
237+
#endif
238238
#ifdef SIGCLD
239239
REGISTER_LONG_CONSTANT("SIGCLD", (long) SIGCLD, CONST_CS | CONST_PERSISTENT);
240240
#endif
@@ -484,7 +484,7 @@ static void php_pcntl_register_errno_constants(INIT_FUNC_ARGS)
484484
}
485485

486486
static PHP_GINIT_FUNCTION(pcntl)
487-
{
487+
{
488488
memset(pcntl_globals, 0, sizeof(*pcntl_globals));
489489
}
490490

@@ -547,7 +547,7 @@ PHP_FUNCTION(pcntl_fork)
547547
PCNTL_G(last_error) = errno;
548548
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error %d", errno);
549549
}
550-
550+
551551
RETURN_LONG((long) id);
552552
}
553553
/* }}} */
@@ -560,7 +560,7 @@ PHP_FUNCTION(pcntl_alarm)
560560

561561
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &seconds) == FAILURE)
562562
return;
563-
563+
564564
RETURN_LONG ((long) alarm(seconds));
565565
}
566566
/* }}} */
@@ -576,7 +576,7 @@ PHP_FUNCTION(pcntl_waitpid)
576576

577577
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz|l", &pid, &z_status, &options) == FAILURE)
578578
return;
579-
579+
580580
convert_to_long_ex(&z_status);
581581

582582
status = Z_LVAL_P(z_status);
@@ -604,7 +604,7 @@ PHP_FUNCTION(pcntl_wait)
604604

605605
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", &z_status, &options) == FAILURE)
606606
return;
607-
607+
608608
convert_to_long_ex(&z_status);
609609

610610
status = Z_LVAL_P(z_status);
@@ -628,7 +628,7 @@ PHP_FUNCTION(pcntl_wait)
628628
}
629629
/* }}} */
630630

631-
/* {{{ proto bool pcntl_wifexited(int status)
631+
/* {{{ proto bool pcntl_wifexited(int status)
632632
Returns true if the child status code represents a successful exit */
633633
PHP_FUNCTION(pcntl_wifexited)
634634
{
@@ -646,7 +646,7 @@ PHP_FUNCTION(pcntl_wifexited)
646646
}
647647
/* }}} */
648648

649-
/* {{{ proto bool pcntl_wifstopped(int status)
649+
/* {{{ proto bool pcntl_wifstopped(int status)
650650
Returns true if the child status code represents a stopped process (WUNTRACED must have been used with waitpid) */
651651
PHP_FUNCTION(pcntl_wifstopped)
652652
{
@@ -664,7 +664,7 @@ PHP_FUNCTION(pcntl_wifstopped)
664664
}
665665
/* }}} */
666666

667-
/* {{{ proto bool pcntl_wifsignaled(int status)
667+
/* {{{ proto bool pcntl_wifsignaled(int status)
668668
Returns true if the child status code represents a process that was terminated due to a signal */
669669
PHP_FUNCTION(pcntl_wifsignaled)
670670
{
@@ -682,7 +682,7 @@ PHP_FUNCTION(pcntl_wifsignaled)
682682
}
683683
/* }}} */
684684

685-
/* {{{ proto int pcntl_wexitstatus(int status)
685+
/* {{{ proto int pcntl_wexitstatus(int status)
686686
Returns the status code of a child's exit */
687687
PHP_FUNCTION(pcntl_wexitstatus)
688688
{
@@ -700,7 +700,7 @@ PHP_FUNCTION(pcntl_wexitstatus)
700700
}
701701
/* }}} */
702702

703-
/* {{{ proto int pcntl_wtermsig(int status)
703+
/* {{{ proto int pcntl_wtermsig(int status)
704704
Returns the number of the signal that terminated the process who's status code is passed */
705705
PHP_FUNCTION(pcntl_wtermsig)
706706
{
@@ -718,7 +718,7 @@ PHP_FUNCTION(pcntl_wtermsig)
718718
}
719719
/* }}} */
720720

721-
/* {{{ proto int pcntl_wstopsig(int status)
721+
/* {{{ proto int pcntl_wstopsig(int status)
722722
Returns the number of the signal that caused the process to stop who's status code is passed */
723723
PHP_FUNCTION(pcntl_wstopsig)
724724
{
@@ -754,19 +754,19 @@ PHP_FUNCTION(pcntl_exec)
754754
char *path;
755755
int path_len;
756756
ulong key_num;
757-
758-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|aa", &path, &path_len, &args, &envs) == FAILURE) {
757+
758+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|aa", &path, &path_len, &args, &envs) == FAILURE) {
759759
return;
760760
}
761-
761+
762762
if (ZEND_NUM_ARGS() > 1) {
763763
/* Build argument list */
764764
args_hash = HASH_OF(args);
765765
argc = zend_hash_num_elements(args_hash);
766-
766+
767767
argv = safe_emalloc((argc + 2), sizeof(char *), 0);
768768
*argv = path;
769-
for ( zend_hash_internal_pointer_reset(args_hash), current_arg = argv+1;
769+
for ( zend_hash_internal_pointer_reset(args_hash), current_arg = argv+1;
770770
(argi < argc && (zend_hash_get_current_data(args_hash, (void **) &element) == SUCCESS));
771771
(argi++, current_arg++, zend_hash_move_forward(args_hash)) ) {
772772

@@ -784,9 +784,9 @@ PHP_FUNCTION(pcntl_exec)
784784
/* Build environment pair list */
785785
envs_hash = HASH_OF(envs);
786786
envc = zend_hash_num_elements(envs_hash);
787-
787+
788788
envp = safe_emalloc((envc + 1), sizeof(char *), 0);
789-
for ( zend_hash_internal_pointer_reset(envs_hash), pair = envp;
789+
for ( zend_hash_internal_pointer_reset(envs_hash), pair = envp;
790790
(envi < envc && (zend_hash_get_current_data(envs_hash, (void **) &element) == SUCCESS));
791791
(envi++, pair++, zend_hash_move_forward(envs_hash)) ) {
792792
switch (return_val = zend_hash_get_current_key_ex(envs_hash, &key, &key_length, &key_num, 0, NULL)) {
@@ -802,13 +802,13 @@ PHP_FUNCTION(pcntl_exec)
802802

803803
convert_to_string_ex(element);
804804

805-
/* Length of element + equal sign + length of key + null */
805+
/* Length of element + equal sign + length of key + null */
806806
pair_length = Z_STRLEN_PP(element) + key_length + 2;
807807
*pair = emalloc(pair_length);
808-
strlcpy(*pair, key, key_length);
808+
strlcpy(*pair, key, key_length);
809809
strlcat(*pair, "=", pair_length);
810810
strlcat(*pair, Z_STRVAL_PP(element), pair_length);
811-
811+
812812
/* Cleanup */
813813
if (return_val == HASH_KEY_IS_LONG) efree(key);
814814
}
@@ -818,7 +818,7 @@ PHP_FUNCTION(pcntl_exec)
818818
PCNTL_G(last_error) = errno;
819819
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error has occurred: (errno %d) %s", errno, strerror(errno));
820820
}
821-
821+
822822
/* Cleanup */
823823
for (pair = envp; *pair != NULL; pair++) efree(*pair);
824824
efree(envp);
@@ -831,7 +831,7 @@ PHP_FUNCTION(pcntl_exec)
831831
}
832832

833833
efree(argv);
834-
834+
835835
RETURN_FALSE;
836836
}
837837
/* }}} */
@@ -880,19 +880,19 @@ PHP_FUNCTION(pcntl_signal)
880880
}
881881
RETURN_TRUE;
882882
}
883-
883+
884884
if (!zend_is_callable(handle, 0, &func_name TSRMLS_CC)) {
885885
PCNTL_G(last_error) = EINVAL;
886886
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not a callable function name error", func_name);
887887
efree(func_name);
888888
RETURN_FALSE;
889889
}
890890
efree(func_name);
891-
891+
892892
/* Add the function name to our signal table */
893893
zend_hash_index_update(&PCNTL_G(php_signal_table), signo, (void **) &handle, sizeof(zval *), (void **) &dest_handle);
894894
if (dest_handle) zval_add_ref(dest_handle);
895-
895+
896896
if (php_signal4(signo, pcntl_signal_handler, (int) restart_syscalls, 1) == SIG_ERR) {
897897
PCNTL_G(last_error) = errno;
898898
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error assigning signal");
@@ -1029,7 +1029,7 @@ static void pcntl_sigwaitinfo(INTERNAL_FUNCTION_PARAMETERS, int timedwait) /* {{
10291029
}
10301030

10311031
/*
1032-
* sigtimedwait and sigwaitinfo can return 0 on success on some
1032+
* sigtimedwait and sigwaitinfo can return 0 on success on some
10331033
* platforms, e.g. NetBSD
10341034
*/
10351035
if (!signo && siginfo.si_signo) {
@@ -1077,7 +1077,7 @@ static void pcntl_sigwaitinfo(INTERNAL_FUNCTION_PARAMETERS, int timedwait) /* {{
10771077
EMPTY_SWITCH_DEFAULT_CASE();
10781078
}
10791079
}
1080-
1080+
10811081
RETURN_LONG(signo);
10821082
}
10831083
/* }}} */
@@ -1107,12 +1107,12 @@ PHP_FUNCTION(pcntl_getpriority)
11071107
long who = PRIO_PROCESS;
11081108
long pid = getpid();
11091109
int pri;
1110-
1110+
11111111
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll", &pid, &who) == FAILURE) {
11121112
RETURN_FALSE;
11131113
}
11141114

1115-
/* needs to be cleared, since any returned value is valid */
1115+
/* needs to be cleared, since any returned value is valid */
11161116
errno = 0;
11171117

11181118
pri = getpriority(who, pid);
@@ -1172,7 +1172,7 @@ PHP_FUNCTION(pcntl_setpriority)
11721172
}
11731173
RETURN_FALSE;
11741174
}
1175-
1175+
11761176
RETURN_TRUE;
11771177
}
11781178
/* }}} */
@@ -1205,7 +1205,7 @@ static void pcntl_signal_handler(int signo)
12051205
{
12061206
struct php_pcntl_pending_signal *psig;
12071207
TSRMLS_FETCH();
1208-
1208+
12091209
psig = PCNTL_G(spares);
12101210
if (!psig) {
12111211
/* oops, too many signals for us to track, so we'll forget about this one */
@@ -1233,7 +1233,7 @@ void pcntl_signal_dispatch()
12331233
sigset_t mask;
12341234
sigset_t old_mask;
12351235
TSRMLS_FETCH();
1236-
1236+
12371237
/* Mask all signals */
12381238
sigfillset(&mask);
12391239
sigprocmask(SIG_BLOCK, &mask, &old_mask);
@@ -1249,7 +1249,7 @@ void pcntl_signal_dispatch()
12491249

12501250
queue = PCNTL_G(head);
12511251
PCNTL_G(head) = NULL; /* simple stores are atomic */
1252-
1252+
12531253
/* Allocate */
12541254

12551255
while (queue) {
@@ -1274,7 +1274,7 @@ void pcntl_signal_dispatch()
12741274

12751275
/* Re-enable queue */
12761276
PCNTL_G(processing_signal_queue) = 0;
1277-
1277+
12781278
/* return signal mask to previous state */
12791279
sigprocmask(SIG_SETMASK, &old_mask, NULL);
12801280
}

ext/standard/basic_functions.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0)
21132113
ZEND_ARG_INFO(0, fp)
21142114
ZEND_ARG_INFO(0, buffer)
21152115
ZEND_END_ARG_INFO()
2116-
2116+
21172117
ZEND_BEGIN_ARG_INFO(arginfo_stream_set_chunk_size, 0)
21182118
ZEND_ARG_INFO(0, fp)
21192119
ZEND_ARG_INFO(0, chunk_size)
@@ -2308,7 +2308,7 @@ ZEND_END_ARG_INFO()
23082308
ZEND_BEGIN_ARG_INFO(arginfo_lcfirst, 0)
23092309
ZEND_ARG_INFO(0, str)
23102310
ZEND_END_ARG_INFO()
2311-
2311+
23122312
ZEND_BEGIN_ARG_INFO_EX(arginfo_ucwords, 0, 0, 1)
23132313
ZEND_ARG_INFO(0, str)
23142314
ZEND_ARG_INFO(0, delimiters)
@@ -3452,7 +3452,7 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) /*
34523452
BG(user_tick_functions) = NULL;
34533453
BG(user_filter_map) = NULL;
34543454
BG(serialize_lock) = 0;
3455-
3455+
34563456
memset(&BG(serialize), 0, sizeof(BG(serialize)));
34573457
memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
34583458

@@ -3980,8 +3980,8 @@ PHP_FUNCTION(getenv)
39803980
int size;
39813981

39823982
SetLastError(0);
3983-
/*If the given bugger is not large enough to hold the data, the return value is
3984-
the buffer size, in characters, required to hold the string and its terminating
3983+
/*If the given bugger is not large enough to hold the data, the return value is
3984+
the buffer size, in characters, required to hold the string and its terminating
39853985
null character. We use this return value to alloc the final buffer. */
39863986
size = GetEnvironmentVariableA(str, &dummybuf, 0);
39873987
if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
@@ -4033,7 +4033,7 @@ PHP_FUNCTION(putenv)
40334033
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &setting, &setting_len) == FAILURE) {
40344034
return;
40354035
}
4036-
4036+
40374037
if(setting_len == 0 || setting[0] == '=') {
40384038
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter syntax");
40394039
RETURN_FALSE;
@@ -4088,7 +4088,7 @@ PHP_FUNCTION(putenv)
40884088
error_code = SetEnvironmentVariable(pe.key, value);
40894089
# if _MSC_VER < 1500
40904090
/* Yet another VC6 bug, unset may return env not found */
4091-
if (error_code != 0 ||
4091+
if (error_code != 0 ||
40924092
(error_code == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND)) {
40934093
# else
40944094
if (error_code != 0) { /* success */
@@ -4576,7 +4576,7 @@ PHP_FUNCTION(set_magic_quotes_runtime)
45764576
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &new_setting) == FAILURE) {
45774577
return;
45784578
}
4579-
4579+
45804580
if (new_setting) {
45814581
php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "magic_quotes_runtime is not supported anymore");
45824582
}
@@ -4864,7 +4864,7 @@ PHP_FUNCTION(forward_static_call)
48644864
instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) {
48654865
fci_cache.called_scope = EG(called_scope);
48664866
}
4867-
4867+
48684868
if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
48694869
COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
48704870
}
@@ -5437,7 +5437,7 @@ PHP_FUNCTION(set_include_path)
54375437
int new_value_len;
54385438
char *old_value;
54395439

5440-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &new_value, &new_value_len) == FAILURE) {
5440+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &new_value, &new_value_len) == FAILURE) {
54415441
return;
54425442
}
54435443

@@ -5565,7 +5565,7 @@ PHP_FUNCTION(getservbyname)
55655565
}
55665566

55675567

5568-
/* empty string behaves like NULL on windows implementation of
5568+
/* empty string behaves like NULL on windows implementation of
55695569
getservbyname. Let be portable instead. */
55705570
#ifdef PHP_WIN32
55715571
if (proto_len == 0) {
@@ -5993,7 +5993,7 @@ PHP_FUNCTION(parse_ini_string)
59935993
/* }}} */
59945994

59955995
#if ZEND_DEBUG
5996-
/* This function returns an array of ALL valid ini options with values and
5996+
/* This function returns an array of ALL valid ini options with values and
59975997
* is not the same as ini_get_all() which returns only registered ini options. Only useful for devs to debug php.ini scanner/parser! */
59985998
PHP_FUNCTION(config_get_hash) /* {{{ */
59995999
{

0 commit comments

Comments
 (0)