httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r109498 - /httpd/httpd/trunk/include/ap_listen.h /httpd/httpd/trunk/include/http_core.h /httpd/httpd/trunk/server/core.c /httpd/httpd/trunk/server/core_filters.c /httpd/httpd/trunk/server/listen.c
Date Thu, 02 Dec 2004 13:28:05 GMT
Author: jorton
Date: Thu Dec  2 05:28:04 2004
New Revision: 109498

URL: http://svn.apache.org/viewcvs?view=rev&rev=109498
Log:
Fix gcc "no previous prototype" warnings after reorganisation:

* 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.

Modified:
   httpd/httpd/trunk/include/ap_listen.h
   httpd/httpd/trunk/include/http_core.h
   httpd/httpd/trunk/server/core.c
   httpd/httpd/trunk/server/core_filters.c
   httpd/httpd/trunk/server/listen.c

Modified: httpd/httpd/trunk/include/ap_listen.h
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/ap_listen.h?view=diff&rev=109498&p1=httpd/httpd/trunk/include/ap_listen.h&r1=109497&p2=httpd/httpd/trunk/include/ap_listen.h&r2=109498
==============================================================================
--- httpd/httpd/trunk/include/ap_listen.h	(original)
+++ httpd/httpd/trunk/include/ap_listen.h	Thu Dec  2 05:28:04 2004
@@ -75,20 +75,6 @@
  */ 
 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

Modified: httpd/httpd/trunk/include/http_core.h
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/http_core.h?view=diff&rev=109498&p1=httpd/httpd/trunk/include/http_core.h&r1=109497&p2=httpd/httpd/trunk/include/http_core.h&r2=109498
==============================================================================
--- httpd/httpd/trunk/include/http_core.h	(original)
+++ httpd/httpd/trunk/include/http_core.h	Thu Dec  2 05:28:04 2004
@@ -558,6 +558,15 @@
 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 */
 
 

Modified: httpd/httpd/trunk/server/core.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/core.c?view=diff&rev=109498&p1=httpd/httpd/trunk/server/core.c&r1=109497&p2=httpd/httpd/trunk/server/core.c&r2=109498
==============================================================================
--- httpd/httpd/trunk/server/core.c	(original)
+++ httpd/httpd/trunk/server/core.c	Thu Dec  2 05:28:04 2004
@@ -93,12 +93,6 @@
 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 @@
     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,

Modified: httpd/httpd/trunk/server/core_filters.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/core_filters.c?view=diff&rev=109498&p1=httpd/httpd/trunk/server/core_filters.c&r1=109497&p2=httpd/httpd/trunk/server/core_filters.c&r2=109498
==============================================================================
--- httpd/httpd/trunk/server/core_filters.c	(original)
+++ httpd/httpd/trunk/server/core_filters.c	Thu Dec  2 05:28:04 2004
@@ -61,9 +61,9 @@
     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 @@
     } 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 @@
  */
 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;

Modified: httpd/httpd/trunk/server/listen.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/listen.c?view=diff&rev=109498&p1=httpd/httpd/trunk/server/listen.c&r1=109497&p2=httpd/httpd/trunk/server/listen.c&r2=109498
==============================================================================
--- httpd/httpd/trunk/server/listen.c	(original)
+++ httpd/httpd/trunk/server/listen.c	Thu Dec  2 05:28:04 2004
@@ -288,13 +288,20 @@
     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 @@
             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_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;
     }
 

Mime
View raw message