From 45f9527518bf95027a0e2989df5b51fd9efa4df5 Mon Sep 17 00:00:00 2001
From: Rasmus Lerdorf <rasmus@php.net>
Date: Sun, 5 Dec 1999 14:37:38 +0000
Subject: [PATCH] More maintainer-mode cleanups

---
 main/php_content_types.h |  2 +-
 sapi/apache/mod_php4.c   | 35 ++++++++++++++++++++++++++---------
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/main/php_content_types.h b/main/php_content_types.h
index 59ccbf93f7..f348bedc8a 100644
--- a/main/php_content_types.h
+++ b/main/php_content_types.h
@@ -1,6 +1,6 @@
 #ifndef _PHP_CONTENT_TYPES_H
 #define _PHP_CONTENT_TYPES_H
 
-int php_startup_SAPI_content_types();
+int php_startup_SAPI_content_types(void);
 
 #endif /* _PHP_CONTENT_TYPES_H */
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index 3a2a0e2998..7eadee8d6d 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -58,6 +58,29 @@
 #endif
 
 PHPAPI int apache_php_module_main(request_rec *r, int fd, int display_source_mode SLS_DC);
+void php_save_umask(void);
+void php_restore_umask(void);
+int sapi_apache_read_post(char *buffer, uint count_bytes SLS_DC);
+char *sapi_apache_read_cookies(SLS_D);
+int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers SLS_DC);
+int sapi_apache_send_headers(sapi_headers_struct *sapi_headers SLS_DC);
+int send_php(request_rec *r, int display_source_mode, char *filename);
+int send_parsed_php(request_rec * r);
+int send_parsed_php_source(request_rec * r);
+int php_xbithack_handler(request_rec * r);
+void php_init_handler(server_rec *s, pool *p);
+
+#if MODULE_MAGIC_NUMBER > 19961007
+#define CONST_PREFIX const
+#else
+#define CONST_PREFIX
+#endif
+CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode);
+CONST_PREFIX char *php_apache_value_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2);
+CONST_PREFIX char *php_apache_admin_value_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2);
+CONST_PREFIX char *php_apache_flag_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2);
+CONST_PREFIX char *php_apache_flag_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode);
+CONST_PREFIX char *php_apache_admin_flag_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2);
 
 /* ### these should be defined in mod_php4.h or somewhere else */
 #define USE_PATH 1
@@ -94,7 +117,7 @@ php_apache_info_struct php_apache_info;		/* active config */
 
 /* some systems are missing these from their header files */
 
-void php_save_umask()
+void php_save_umask(void)
 {
 	saved_umask = umask(077);
 	umask(saved_umask);
@@ -208,7 +231,7 @@ sapi_module_struct sapi_module = {
 };
 
 
-void php_restore_umask()
+void php_restore_umask(void)
 {
 	umask(saved_umask);
 }
@@ -399,12 +422,6 @@ static void *php_merge_dir(pool *p, void *basev, void *addv)
 }
 
 
-#if MODULE_MAGIC_NUMBER > 19961007
-#define CONST_PREFIX const
-#else
-#define CONST_PREFIX
-#endif
-
 CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode)
 {
 	php_per_dir_entry per_dir_entry;
@@ -498,7 +515,7 @@ static void apache_php_module_shutdown_wrapper(void)
 
 void php_init_handler(server_rec *s, pool *p)
 {
-	register_cleanup(p, NULL, (void (*)(void *))apache_php_module_shutdown_wrapper, php_module_shutdown_for_exec);
+	register_cleanup(p, NULL, (void (*)(void *))apache_php_module_shutdown_wrapper, (void (*)(void *))php_module_shutdown_for_exec);
 	if (!apache_php_initialized) {
 		sapi_startup(&sapi_module);
 		php_module_startup(&sapi_module);
-- 
2.49.0