]> granicus.if.org Git - php/commitdiff
Fix compile warnings (mostly MFH from 5.0 branch)
authorIlia Alshanetsky <iliaa@php.net>
Thu, 5 Jun 2003 23:48:17 +0000 (23:48 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 5 Jun 2003 23:48:17 +0000 (23:48 +0000)
ext/hyperwave/hg_comm.c
ext/pcntl/pcntl.c
ext/pcntl/php_pcntl.h
ext/sockets/php_sockets.h
ext/sockets/sockets.c

index fb5517c14f82972f334c62b6bbc86224abc51ed1..5aaae3dcfd2612d9ced2165c64653ae11c91e11f 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h> 
 #include <sys/types.h>
 #ifdef PHP_WIN32
-# include <winsock.h>
+# include <winsock2.h>
 # define EWOULDBLOCK WSAEWOULDBLOCK
 # define ETIMEDOUT WSAETIMEDOUT
 # define bcopy memcpy
@@ -42,6 +42,7 @@
 # include <netdb.h>
 # include <unistd.h>
 # include <sys/param.h>
+# include <arpa/inet.h>
 #endif
 #include <fcntl.h>
 #include <errno.h>
@@ -5034,10 +5035,8 @@ int send_pipedocument(int sockfd, char *host, hw_objectID objectID, int mode, in
         
        switch(hostptr->h_addrtype) {
                struct in_addr *ptr1;
-               char *ptr;
                case AF_INET:
-                       ptr = hostptr->h_addr_list[0];
-                       ptr1 = (struct in_addr *) ptr;
+                       ptr1 = (struct in_addr *) hostptr->h_addr_list[0];
                        hostip = inet_ntoa(*ptr1);
                        break;
                default:
@@ -5221,10 +5220,8 @@ int send_pipecgi(int sockfd, char *host, hw_objectID objectID, char *cgi_env_str
         
        switch(hostptr->h_addrtype) {
                struct in_addr *ptr1;
-               char *ptr;
                case AF_INET:
-                       ptr = hostptr->h_addr_list[0];
-                       ptr1 = (struct in_addr *) ptr;
+                       ptr1 = (struct in_addr *) hostptr->h_addr_list[0];
                        hostip = inet_ntoa(*ptr1);
                        break;
                default:
@@ -5403,10 +5400,8 @@ int send_putdocument(int sockfd, char *host, hw_objectID parentID, char *objectR
         
        switch(hostptr->h_addrtype) {
                struct in_addr *ptr1;
-               char *ptr;
                case AF_INET:
-                       ptr = hostptr->h_addr_list[0];
-                       ptr1 = (struct in_addr *) ptr;
+                       ptr1 = (struct in_addr *) hostptr->h_addr_list[0];
                        hostip = inet_ntoa(*ptr1);
                        break;
                default:
index d9f5e6564eb802d7e2a7b0cedc25724350745832..62639987ebe3b4bf8622604a31893a88a8192418 100755 (executable)
@@ -69,6 +69,9 @@ zend_module_entry pcntl_module_entry = {
 #ifdef COMPILE_DL_PCNTL
 ZEND_GET_MODULE(pcntl)
 #endif
+
+static void pcntl_signal_handler(int);
+static void pcntl_tick_handler();
   
 void php_register_signal_constants(INIT_FUNC_ARGS)
 {
index ecbbd263d1160f51a7765ad2bd857a47ce849d31..941bebb855bbaff2d634711ae19fc0a514e312d4 100644 (file)
@@ -51,10 +51,6 @@ PHP_FUNCTION(pcntl_wstopsig);
 PHP_FUNCTION(pcntl_signal);
 PHP_FUNCTION(pcntl_exec);
 
-static void pcntl_signal_handler(int);
-static void pcntl_tick_handler();
-
-
 ZEND_BEGIN_MODULE_GLOBALS(pcntl)
        HashTable php_signal_table;
        zend_llist php_signal_queue;
index fed1dda9a6b3a6df2f564aacaaa8e6f268ad956d..a6ff5c11087e9729883963d4a8aeb7c4bfcfadf1 100644 (file)
@@ -101,12 +101,6 @@ typedef struct {
        zend_bool       use_system_read;
 } php_sockets_globals;
 
-/* Prototypes */
-static int php_open_listen_sock(php_socket **php_sock, int port, int backlog TSRMLS_DC);
-static int php_accept_connect(php_socket *in_sock, php_socket **new_sock, struct sockaddr *la TSRMLS_DC);
-static int php_read(int bsd_socket, void *buf, size_t maxlen, int flags);
-static char *php_strerror(int error TSRMLS_DC);
-
 ZEND_BEGIN_MODULE_GLOBALS(sockets)
        int last_error;
        char *strerror_buf;
index 26fec9780adfbec5f74d3ad24d3c8b3cbb9d61ca..e88fcb61c8be838b9834d0dc3c7c7066440604b5 100644 (file)
@@ -82,6 +82,7 @@ ZEND_DECLARE_MODULE_GLOBALS(sockets)
 #define PF_INET AF_INET
 #endif
 
+static char *php_strerror(int error TSRMLS_DC);
 
 #define PHP_NORMAL_READ 0x0001
 #define PHP_BINARY_READ 0x0002