Skip to content

Commit dfd0f88

Browse files
committed
More maintainer-mode cleanups
1 parent ca36244 commit dfd0f88

File tree

10 files changed

+46
-45
lines changed

10 files changed

+46
-45
lines changed

ext/standard/basic_functions.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020

2121
#include "php.h"
22+
#include "main.h"
2223
#include "php_ini.h"
2324
#include "internal_functions_registry.h"
2425
#include "php_standard.h"
@@ -77,6 +78,9 @@ typedef struct _php_shutdown_function_entry {
7778

7879
/* some prototypes for local functions */
7980
static int user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry);
81+
pval test_class_get_property(zend_property_reference *property_reference);
82+
int test_class_set_property(zend_property_reference *property_reference, pval *value);
83+
void test_class_call_function(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
8084

8185
function_entry basic_functions[] = {
8286
PHP_FE(intval, NULL)
@@ -357,7 +361,7 @@ static int _php3_putenv_destructor(putenv_entry *pe)
357361
#define M_PI 3.14159265358979323846
358362
#endif
359363

360-
void test_class_startup();
364+
void test_class_startup(void);
361365

362366
PHP_MINIT_FUNCTION(basic)
363367
{
@@ -1034,7 +1038,7 @@ int user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_e
10341038
}
10351039

10361040

1037-
void php3_call_shutdown_functions(void)
1041+
void php_call_shutdown_functions(void)
10381042
{
10391043
BLS_FETCH();
10401044

ext/standard/lcg.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ double php_combined_lcg(void)
5959
return z * 4.656613e-10;
6060
}
6161

62-
static void lcg_init_globals(LCGLS_D);
63-
6462
static void lcg_init_globals(LCGLS_D)
6563
{
6664
LCG(s1) = 1;

ext/standard/output.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ static int php_ub_body_write_no_header(const char *str, uint str_length);
3030
static int php_b_body_write(const char *str, uint str_length);
3131

3232
static void php_ob_init(uint initial_size, uint block_size);
33-
static void php_ob_destroy();
33+
static void php_ob_destroy(void);
3434
static void php_ob_append(const char *text, uint text_length);
35+
#if 0
3536
static void php_ob_prepend(const char *text, uint text_length);
36-
static inline void php_ob_send();
37+
#endif
38+
static inline void php_ob_send(void);
3739

38-
void php_start_ob_buffering();
40+
void php_start_ob_buffering(void);
3941
void php_end_ob_buffering(int send_buffer);
4042
int php_ob_get_buffer(pval *p);
4143

@@ -58,7 +60,7 @@ typedef struct {
5860
#define OLS_FETCH() php_output_globals *output_globals = ts_resource(output_globals_id)
5961
int output_globals_id;
6062
#else
61-
#define OLS_D
63+
#define OLS_D void
6264
#define OLS_C
6365
#define OG(v) (output_globals.v)
6466
#define OLS_FETCH()
@@ -188,7 +190,7 @@ PHPAPI void php_end_ob_buffering(int send_buffer)
188190
* Output buffering - implementation
189191
*/
190192

191-
static inline void php_ob_allocate()
193+
static inline void php_ob_allocate(void)
192194
{
193195
OLS_FETCH();
194196

@@ -241,7 +243,7 @@ static void php_ob_append(const char *text, uint text_length)
241243
target[text_length]=0;
242244
}
243245

244-
246+
#if 0
245247
static void php_ob_prepend(const char *text, uint text_length)
246248
{
247249
char *p, *start;
@@ -260,7 +262,7 @@ static void php_ob_prepend(const char *text, uint text_length)
260262
memcpy(OG(ob_buffer), text, text_length);
261263
OG(ob_buffer)[OG(ob_text_length)]=0;
262264
}
263-
265+
#endif
264266

265267
static inline void php_ob_send()
266268
{

ext/standard/parsedate.y

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ extern time_t timezone;
7070
#define yytable date_yytable
7171
#define yycheck date_yycheck
7272
#define yyparse date_parse
73+
#define yyparse date_parse
7374
#define yylex date_lex
7475
#define yyerror date_error
7576

@@ -102,6 +103,8 @@ typedef struct _TIMEINFO {
102103
long tzone;
103104
} TIMEINFO;
104105

106+
int GetTimeInfo(TIMEINFO *Now);
107+
105108
typedef char const *STRING;
106109
typedef char * const CSTRING;
107110

@@ -151,9 +154,9 @@ static time_t yyRelMonth;
151154
static time_t yyRelSeconds;
152155

153156

154-
extern struct tm *localtime();
157+
extern struct tm *localtime(const time_t *timep);
155158

156-
static void date_error();
159+
static void date_error(char *s);
157160
%}
158161

159162
%expect 6
@@ -526,8 +529,7 @@ static TABLE TimezoneTable[] = {
526529

527530
/* ARGSUSED */
528531
static void
529-
date_error(s)
530-
char *s;
532+
date_error(char *s)
531533
{
532534
/* NOTREACHED */
533535
}
@@ -594,11 +596,7 @@ int GetTimeInfo(TIMEINFO *Now)
594596

595597

596598
static time_t
597-
ToSeconds(Hours, Minutes, Seconds, Meridian)
598-
time_t Hours;
599-
time_t Minutes;
600-
time_t Seconds;
601-
MERIDIAN Meridian;
599+
ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian)
602600
{
603601
if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 61)
604602
return -1;
@@ -619,15 +617,7 @@ ToSeconds(Hours, Minutes, Seconds, Meridian)
619617

620618

621619
static time_t
622-
Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, dst)
623-
time_t Month;
624-
time_t Day;
625-
time_t Year;
626-
time_t Hours;
627-
time_t Minutes;
628-
time_t Seconds;
629-
MERIDIAN Meridian;
630-
DSTMODE dst;
620+
Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian, DSTMODE dst)
631621
{
632622
static int DaysNormal[13] = {
633623
0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
@@ -683,9 +673,7 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, dst)
683673

684674

685675
static time_t
686-
DSTcorrect(Start, Future)
687-
time_t Start;
688-
time_t Future;
676+
DSTcorrect(time_t Start, time_t Future)
689677
{
690678
time_t StartDay;
691679
time_t FutureDay;
@@ -697,9 +685,7 @@ DSTcorrect(Start, Future)
697685

698686

699687
static time_t
700-
RelativeMonth(Start, RelMonth)
701-
time_t Start;
702-
time_t RelMonth;
688+
RelativeMonth(time_t Start, time_t RelMonth)
703689
{
704690
struct tm *tm, tmbuf;
705691
time_t Month;
@@ -870,7 +856,11 @@ static int date_lex(void)
870856

871857
time_t parsedate(char *p, TIMEINFO *now)
872858
{
873-
extern int date_parse();
859+
#ifdef YYPARSE_PARAM
860+
extern int date_parse (void *);
861+
#else
862+
extern int date_parse (void);
863+
#endif
874864
struct tm *tm, tmbuf;
875865
TIMEINFO ti;
876866
time_t Start;

ext/standard/php_filestat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ PHP_FUNCTION(is_link);
5454
PHP_FUNCTION(file_exists);
5555
PHP_FUNCTION(stat);
5656
PHP_FUNCTION(lstat);
57+
PHP_FUNCTION(diskfreespace);
5758
PHP_FUNCTION(chown);
5859
PHP_FUNCTION(chgrp);
5960
PHP_FUNCTION(chmod);

ext/standard/string.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#include "zend_execute.h"
3434
#include "php_globals.h"
3535

36+
int php_tag_find(char *tag, int len, char *set);
37+
3638
/* this is read-only, so it's ok */
3739
static char hexconvtab[] = "0123456789abcdef";
3840

ext/xml/php_xml.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ PHP_FUNCTION(utf8_encode);
127127
PHP_FUNCTION(utf8_decode);
128128
PHP_FUNCTION(xml_parse_into_struct);
129129

130+
PHPAPI char *_xml_zval_strdup(zval *val);
131+
130132
#else /* !HAVE_LIBEXPAT */
131133

132134
# define xml_module_ptr NULL

main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals);
3838

3939
PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC);
4040

41-
extern void php3_call_shutdown_functions(void);
41+
extern void php_call_shutdown_functions(void);
4242

4343

4444
/* configuration module */

main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ void php_request_shutdown(void *dummy)
793793
sapi_send_headers();
794794
php_end_ob_buffering(SG(request_info).headers_only?0:1);
795795

796-
php3_call_shutdown_functions();
796+
php_call_shutdown_functions();
797797

798798
php_ini_rshutdown();
799799

main/output.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ static int php_ub_body_write_no_header(const char *str, uint str_length);
3030
static int php_b_body_write(const char *str, uint str_length);
3131

3232
static void php_ob_init(uint initial_size, uint block_size);
33-
static void php_ob_destroy();
33+
static void php_ob_destroy(void);
3434
static void php_ob_append(const char *text, uint text_length);
35+
#if 0
3536
static void php_ob_prepend(const char *text, uint text_length);
36-
static inline void php_ob_send();
37+
#endif
38+
static inline void php_ob_send(void);
3739

38-
void php_start_ob_buffering();
40+
void php_start_ob_buffering(void);
3941
void php_end_ob_buffering(int send_buffer);
4042
int php_ob_get_buffer(pval *p);
4143

@@ -58,7 +60,7 @@ typedef struct {
5860
#define OLS_FETCH() php_output_globals *output_globals = ts_resource(output_globals_id)
5961
int output_globals_id;
6062
#else
61-
#define OLS_D
63+
#define OLS_D void
6264
#define OLS_C
6365
#define OG(v) (output_globals.v)
6466
#define OLS_FETCH()
@@ -188,7 +190,7 @@ PHPAPI void php_end_ob_buffering(int send_buffer)
188190
* Output buffering - implementation
189191
*/
190192

191-
static inline void php_ob_allocate()
193+
static inline void php_ob_allocate(void)
192194
{
193195
OLS_FETCH();
194196

@@ -241,7 +243,7 @@ static void php_ob_append(const char *text, uint text_length)
241243
target[text_length]=0;
242244
}
243245

244-
246+
#if 0
245247
static void php_ob_prepend(const char *text, uint text_length)
246248
{
247249
char *p, *start;
@@ -260,7 +262,7 @@ static void php_ob_prepend(const char *text, uint text_length)
260262
memcpy(OG(ob_buffer), text, text_length);
261263
OG(ob_buffer)[OG(ob_text_length)]=0;
262264
}
263-
265+
#endif
264266

265267
static inline void php_ob_send()
266268
{

0 commit comments

Comments
 (0)