]> granicus.if.org Git - apache/commitdiff
Use the new command-handler initializer macros in prefork;
authorJeff Trawick <trawick@apache.org>
Mon, 19 Jun 2000 00:24:24 +0000 (00:24 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 19 Jun 2000 00:24:24 +0000 (00:24 +0000)
clean up the resulting warnings.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85612 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/prefork/prefork.c

index d04eacdee2f324b83700a33b423176eed4ddd0fb..c2ea7715882c2643522167b37e0c2b07ebc4425c 100644 (file)
 /* config globals */
 
 static int ap_max_requests_per_child=0;
-static char *ap_pid_fname=NULL;
+static const char *ap_pid_fname=NULL;
 static ap_lock_t *accept_lock;
-static char *ap_scoreboard_fname=NULL;
-static char *ap_lock_fname;
+static const char *ap_scoreboard_fname=NULL;
+static const char *ap_lock_fname;
 static int ap_daemons_to_start=0;
 static int ap_daemons_min_free=0;
 static int ap_daemons_max_free=0;
@@ -1633,7 +1633,7 @@ static void prefork_hooks(void)
     ap_hook_pre_config(prefork_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
 }
 
-static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg) 
+static const char *set_pidfile(cmd_parms *cmd, void *dummy, const char *arg) 
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1647,7 +1647,7 @@ static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_scoreboard(cmd_parms *cmd, void *dummy, char *arg) 
+static const char *set_scoreboard(cmd_parms *cmd, void *dummy, const char *arg) 
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1658,7 +1658,7 @@ static const char *set_scoreboard(cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_lockfile(cmd_parms *cmd, void *dummy, char *arg) 
+static const char *set_lockfile(cmd_parms *cmd, void *dummy, const char *arg) 
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1669,7 +1669,7 @@ static const char *set_lockfile(cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_daemons_to_start(cmd_parms *cmd, void *dummy, char *arg) 
+static const char *set_daemons_to_start(cmd_parms *cmd, void *dummy, const char *arg) 
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1680,7 +1680,7 @@ static const char *set_daemons_to_start(cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_min_free_servers(cmd_parms *cmd, void *dummy, char *arg)
+static const char *set_min_free_servers(cmd_parms *cmd, void *dummy, const char *arg)
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1701,7 +1701,7 @@ static const char *set_min_free_servers(cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_max_free_servers(cmd_parms *cmd, void *dummy, char *arg)
+static const char *set_max_free_servers(cmd_parms *cmd, void *dummy, const char *arg)
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1712,7 +1712,7 @@ static const char *set_max_free_servers(cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_server_limit (cmd_parms *cmd, void *dummy, char *arg) 
+static const char *set_server_limit (cmd_parms *cmd, void *dummy, const char *arg) 
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1739,7 +1739,7 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_max_requests(cmd_parms *cmd, void *dummy, char *arg) 
+static const char *set_max_requests(cmd_parms *cmd, void *dummy, const char *arg) 
 {
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
     if (err != NULL) {
@@ -1751,7 +1751,7 @@ static const char *set_max_requests(cmd_parms *cmd, void *dummy, char *arg)
     return NULL;
 }
 
-static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) 
+static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, const char *arg) 
 {
     ap_finfo_t finfo;
     const char *fname;
@@ -1898,24 +1898,24 @@ ap_array_header_t *ap_get_status_table(ap_pool_t *p)
 static const command_rec prefork_cmds[] = {
 UNIX_DAEMON_COMMANDS
 LISTEN_COMMANDS
-{ "PidFile", set_pidfile, NULL, RSRC_CONF, TAKE1,
-    "A file for logging the server process ID"},
-{ "ScoreBoardFile", set_scoreboard, NULL, RSRC_CONF, TAKE1,
-    "A file for Apache to maintain runtime process management information"},
-{ "LockFile", set_lockfile, NULL, RSRC_CONF, TAKE1,
-    "The lockfile used when Apache needs to lock the accept() call"},
-{ "StartServers", set_daemons_to_start, NULL, RSRC_CONF, TAKE1,
-  "Number of child processes launched at server startup" },
-{ "MinSpareServers", set_min_free_servers, NULL, RSRC_CONF, TAKE1,
-  "Minimum number of idle children, to handle request spikes" },
-{ "MaxSpareServers", set_max_free_servers, NULL, RSRC_CONF, TAKE1,
-  "Maximum number of idle children" },
-{ "MaxClients", set_server_limit, NULL, RSRC_CONF, TAKE1,
-  "Maximum number of children alive at the same time" },
-{ "MaxRequestsPerChild", set_max_requests, NULL, RSRC_CONF, TAKE1,
-  "Maximum number of requests a particular child serves before dying." },
-{ "CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, TAKE1,
-  "The location of the directory Apache changes to before dumping core" },
+AP_INIT_TAKE1("PidFile", set_pidfile, NULL, RSRC_CONF,
+              "A file for logging the server process ID"),
+AP_INIT_TAKE1("ScoreBoardFile", set_scoreboard, NULL, RSRC_CONF,
+              "A file for Apache to maintain runtime process management information"),
+AP_INIT_TAKE1("LockFile", set_lockfile, NULL, RSRC_CONF,
+              "The lockfile used when Apache needs to lock the accept() call"),
+AP_INIT_TAKE1("StartServers", set_daemons_to_start, NULL, RSRC_CONF,
+              "Number of child processes launched at server startup"),
+AP_INIT_TAKE1("MinSpareServers", set_min_free_servers, NULL, RSRC_CONF,
+              "Minimum number of idle children, to handle request spikes"),
+AP_INIT_TAKE1("MaxSpareServers", set_max_free_servers, NULL, RSRC_CONF,
+              "Maximum number of idle children"),
+AP_INIT_TAKE1("MaxClients", set_server_limit, NULL, RSRC_CONF,
+              "Maximum number of children alive at the same time"),
+AP_INIT_TAKE1("MaxRequestsPerChild", set_max_requests, NULL, RSRC_CONF,
+              "Maximum number of requests a particular child serves before dying."),
+AP_INIT_TAKE1("CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF,
+              "The location of the directory Apache changes to before dumping core"),
 { NULL }
 };