]> granicus.if.org Git - apache/commitdiff
Fix gcc "no previous prototype" warnings after reorganisation:
authorJoe Orton <jorton@apache.org>
Thu, 2 Dec 2004 13:28:04 +0000 (13:28 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 2 Dec 2004 13:28:04 +0000 (13:28 +0000)
* server/core_filters.c (ap_core_input_filter, ap_core_output_filter,
ap_net_time_filter): Renamed to add ap_ prefixes for global symbols.

* include/ap_listen.h: Don't export ap_listen_open at all, it's not
used outside server/listen.c any more.

* server/listen.c (open_listeners): Renamed from ap_listen_open.

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

include/ap_listen.h
include/http_core.h
server/core.c
server/core_filters.c
server/listen.c

index 21c52e78c1f842c647fc46fdcbf469684475b1d5..edac2a1fa9cd79136152c0557272a3c168fea1e6 100644 (file)
@@ -75,20 +75,6 @@ AP_DECLARE(void) ap_listen_pre_config(void);
  */ 
 AP_DECLARE(int) ap_setup_listeners(server_rec *s);
 #endif
-/* Split into two #if's to make the exports scripts easier.
- */
-#if defined(SPMT_OS2_MPM)
-/**
- * Create and open a socket on the specified port.  This includes listening
- * and binding the socket.
- * @param process The process record for the currently running server
- * @param port The port to open a socket on.
- * @return The number of open sockets
- * @warning This function is only available to Windows platforms, or the
- * Prefork or SPMT_OS2 MPMs.
- */
-AP_DECLARE(int) ap_listen_open(process_rec *process, apr_port_t port);
-#endif
 
 /* Although these functions are exported from libmain, they are not really
  * public functions.  These functions are actually called while parsing the
index d74a4cf5dda1b860492d014fe77a5b55f86f51fd..fbc2b8d25882003e7fcbf8e0fd45b790fb3e688c 100644 (file)
@@ -558,6 +558,15 @@ AP_CORE_DECLARE(void) ap_add_per_url_conf(server_rec *s, void *url_config);
 AP_CORE_DECLARE(void) ap_add_file_conf(core_dir_config *conf, void *url_config);
 AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg);
 
+/* Core filters; not exported. */
+int ap_net_time_filter(ap_filter_t *f, apr_bucket_brigade *b,
+                       ap_input_mode_t mode, apr_read_type_e block,
+                       apr_off_t readbytes);
+int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
+                         ap_input_mode_t mode, apr_read_type_e block,
+                         apr_off_t readbytes);
+apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b);
+
 #endif /* CORE_PRIVATE */
 
 
index 4f82ff8c0a0087b2dd607d3501e772f5968f2fb2..23f47a80864c52861d9c2fd92309f8f36eadc78e 100644 (file)
@@ -93,12 +93,6 @@ AP_DECLARE_DATA ap_filter_rec_t *ap_content_length_filter_handle;
 AP_DECLARE_DATA ap_filter_rec_t *ap_net_time_filter_handle;
 AP_DECLARE_DATA ap_filter_rec_t *ap_core_input_filter_handle;
 
-extern int core_input_filter(ap_filter_t *, apr_bucket_brigade *,
-                             ap_input_mode_t, apr_read_type_e, apr_off_t);
-extern int net_time_filter(ap_filter_t *, apr_bucket_brigade *,
-                           ap_input_mode_t, apr_read_type_e, apr_off_t);
-extern apr_status_t core_output_filter(ap_filter_t *, apr_bucket_brigade *);
-
 /* magic pointer for ErrorDocument xxx "default" */
 static char errordocument_default;
 
@@ -3782,16 +3776,16 @@ static void register_hooks(apr_pool_t *p)
     ap_hook_insert_filter(core_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
 
     ap_core_input_filter_handle =
-        ap_register_input_filter("CORE_IN", core_input_filter,
+        ap_register_input_filter("CORE_IN", ap_core_input_filter,
                                  NULL, AP_FTYPE_NETWORK);
     ap_net_time_filter_handle =
-        ap_register_input_filter("NET_TIME", net_time_filter,
+        ap_register_input_filter("NET_TIME", ap_net_time_filter,
                                  NULL, AP_FTYPE_PROTOCOL);
     ap_content_length_filter_handle =
         ap_register_output_filter("CONTENT_LENGTH", ap_content_length_filter,
                                   NULL, AP_FTYPE_PROTOCOL);
     ap_core_output_filter_handle =
-        ap_register_output_filter("CORE", core_output_filter,
+        ap_register_output_filter("CORE", ap_core_output_filter,
                                   NULL, AP_FTYPE_NETWORK);
     ap_subreq_core_filter_handle =
         ap_register_output_filter("SUBREQ_CORE", ap_sub_req_output_filter,
index dc7e29395340799897d268ab026710e02e8378c8..9140546f7f3081b675c3ff27b389c938211665b9 100644 (file)
@@ -61,9 +61,9 @@ typedef struct net_time_filter_ctx {
     int           first_line;
 } net_time_filter_ctx_t;
 
-int net_time_filter(ap_filter_t *f, apr_bucket_brigade *b,
-                           ap_input_mode_t mode, apr_read_type_e block,
-                           apr_off_t readbytes)
+int ap_net_time_filter(ap_filter_t *f, apr_bucket_brigade *b,
+                       ap_input_mode_t mode, apr_read_type_e block,
+                       apr_off_t readbytes)
 {
     net_time_filter_ctx_t *ctx = f->ctx;
     int keptalive = f->c->keepalive == AP_CONN_KEEPALIVE;
@@ -108,9 +108,9 @@ do { \
     } while (!APR_BRIGADE_EMPTY(b) && (e != APR_BRIGADE_SENTINEL(b))); \
 } while (0)
 
-int core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
-                             ap_input_mode_t mode, apr_read_type_e block,
-                             apr_off_t readbytes)
+int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
+                         ap_input_mode_t mode, apr_read_type_e block,
+                         apr_off_t readbytes)
 {
     apr_bucket *e;
     apr_status_t rv;
@@ -535,7 +535,7 @@ static apr_status_t emulate_sendfile(core_net_rec *c, apr_file_t *fd,
  */
 extern APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_out) *logio_add_bytes_out;
 
-apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
+apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
 {
     apr_status_t rv;
     apr_bucket_brigade *more;
index 1167e0b2fcd61c5c6fe177ca5a1bc998d4203b7e..461ebc4d5b501e6a1f8c91b3525d5c0a215632b4 100644 (file)
@@ -288,13 +288,20 @@ static const char *alloc_listener(process_rec *process, char *addr, apr_port_t p
     return NULL;
 }
 
-AP_DECLARE(int) ap_listen_open(apr_pool_t *pool, apr_port_t port)
+/**
+ * Create and open a socket on the specified port.  This includes listening
+ * and binding the socket.
+ * @param process The process record for the currently running server
+ * @param port The port to open a socket on.
+ * @return The number of open sockets
+ */
+static int open_listeners(apr_pool_t *pool, apr_port_t port)
 {
     ap_listen_rec *lr;
     ap_listen_rec *next;
     ap_listen_rec *previous;
     int num_open;
-    const char *userdata_key = "ap_listen_open";
+    const char *userdata_key = "ap_open_listeners";
     void *data;
 
     /* Don't allocate a default listener.  If we need to listen to a
@@ -396,7 +403,7 @@ AP_DECLARE(int) ap_listen_open(apr_pool_t *pool, apr_port_t port)
             status = apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, 1);
             if (status != APR_SUCCESS) {
                 ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, pool,
-                              "ap_listen_open: unable to make socket non-blocking");
+                              "unable to make listening socket non-blocking");
                 return -1;
             }
         }
@@ -423,7 +430,7 @@ AP_DECLARE(int) ap_setup_listeners(server_rec *s)
     ap_listen_rec *lr;
     int num_listeners = 0;
 
-    if (ap_listen_open(s->process->pool, s->port)) {
+    if (open_listeners(s->process->pool, s->port)) {
        return 0;
     }