perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tors...@apache.org
Subject svn commit: r987933 - in /perl/modperl/trunk: t/response/TestAPR/socket.pm xs/APR/Socket/APR__Socket.h xs/maps/apr_functions.map
Date Sun, 22 Aug 2010 17:51:03 GMT
Author: torsten
Date: Sun Aug 22 17:51:03 2010
New Revision: 987933

URL: http://svn.apache.org/viewvc?rev=987933&view=rev
Log:
make APR::Socket::fileno unimplemented on Windows

Modified:
    perl/modperl/trunk/t/response/TestAPR/socket.pm
    perl/modperl/trunk/xs/APR/Socket/APR__Socket.h
    perl/modperl/trunk/xs/maps/apr_functions.map

Modified: perl/modperl/trunk/t/response/TestAPR/socket.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestAPR/socket.pm?rev=987933&r1=987932&r2=987933&view=diff
==============================================================================
--- perl/modperl/trunk/t/response/TestAPR/socket.pm (original)
+++ perl/modperl/trunk/t/response/TestAPR/socket.pm Sun Aug 22 17:51:03 2010
@@ -40,14 +40,11 @@ sub handler {
     $socket->timeout_set($orig_val);
     ok t_cmp($socket->timeout_get(), $orig_val, "timeout_get()");
 
-    my $fd=$socket->fileno;
-    t_debug "client socket fd=$fd";
-    if ($^O eq 'MSWin32') {
-        ok $fd==-1;
-    }
-    else {
-        ok $fd>=0;
-    }
+    skip $^O=~/mswin/i ? 'APR::Socket->fileno is not implemented on MSWin' : '',
+        sub {
+            t_debug "client socket fd=".$socket->fileno;
+            $socket->fileno>0
+        };
 
     Apache2::Const::OK;
 }

Modified: perl/modperl/trunk/xs/APR/Socket/APR__Socket.h
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/APR/Socket/APR__Socket.h?rev=987933&r1=987932&r2=987933&view=diff
==============================================================================
--- perl/modperl/trunk/xs/APR/Socket/APR__Socket.h (original)
+++ perl/modperl/trunk/xs/APR/Socket/APR__Socket.h Sun Aug 22 17:51:03 2010
@@ -117,13 +117,11 @@ apr_status_t mpxs_APR__Socket_poll(apr_s
     return apr_poll(&fd, 1, &nsds, timeout);
 }
 
+#ifndef WIN32
 static MP_INLINE int mpxs_APR__Socket_fileno(pTHX_ apr_socket_t *sock)
 {
-#ifdef WIN32
-    return -1;			/* not implemented */
-#else
     apr_os_sock_t s;
     apr_os_sock_get(&s, sock);
     return s;
-#endif
 }
+#endif

Modified: perl/modperl/trunk/xs/maps/apr_functions.map
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/xs/maps/apr_functions.map?rev=987933&r1=987932&r2=987933&view=diff
==============================================================================
--- perl/modperl/trunk/xs/maps/apr_functions.map (original)
+++ perl/modperl/trunk/xs/maps/apr_functions.map Sun Aug 22 17:51:03 2010
@@ -55,7 +55,9 @@ MODULE=APR::Socket
 !apr_socket_shutdown
 -apr_socket_inherit_set
 -apr_socket_inherit_unset
+#_if_ $^O !~ /mswin/i
  mpxs_APR__Socket_fileno | | apr_socket_t *:socket
+#_end_
 
 MODULE=APR::Socket
  apr_socket_close
@@ -627,7 +629,11 @@ MODULE=APR::OS
 -apr_os_exp_time_get
 -apr_os_file_get
 -apr_os_imp_time_get
+#_if_ $^O !~ /mswin/i
 ~apr_os_sock_get
+#_else_
+-apr_os_sock_get
+#_end_
 -apr_os_thread_get
 -apr_os_threadkey_get
 -apr_os_sock_make



Mime
View raw message