[svn:parrot] r39778 - in branches/io_cleanups: examples/io src/io

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Thu Jun 25 21:24:48 UTC 2009


Author: whiteknight
Date: Thu Jun 25 21:24:47 2009
New Revision: 39778
URL: https://trac.parrot.org/parrot/changeset/39778

Log:
[io_cleanups] rename PARROT_NET_DEVEL to PARROT_NETWORKING_SUPPORT as per TT #534. Remove some unnecessary instances of it, preparing a major overhaul in how it is used

Modified:
   branches/io_cleanups/examples/io/http.pir
   branches/io_cleanups/examples/io/httpd.pir
   branches/io_cleanups/src/io/io_private.h
   branches/io_cleanups/src/io/socket_unix.c
   branches/io_cleanups/src/io/socket_win32.c
   branches/io_cleanups/src/io/win32.c

Modified: branches/io_cleanups/examples/io/http.pir
==============================================================================
--- branches/io_cleanups/examples/io/http.pir	Thu Jun 25 20:35:42 2009	(r39777)
+++ branches/io_cleanups/examples/io/http.pir	Thu Jun 25 21:24:47 2009	(r39778)
@@ -14,8 +14,8 @@
 HTTP client, connects to WWW port and grabs a page (L<http://www.ibm.com>).
 
 You should be running the echo service on your box (port 7). Be sure to
-set C<PARROT_NET_DEVEL> to 1 in F<io/io_private.h> and rebuld Parrot or
-the network layer won't exist.
+set C<PARROT_NETWORKING_SUPPORT> to 1 in F<io/io_private.h> and rebuild Parrot
+or else Parrot will not have any networking support.
 
 =cut
 

Modified: branches/io_cleanups/examples/io/httpd.pir
==============================================================================
--- branches/io_cleanups/examples/io/httpd.pir	Thu Jun 25 20:35:42 2009	(r39777)
+++ branches/io_cleanups/examples/io/httpd.pir	Thu Jun 25 21:24:47 2009	(r39778)
@@ -267,7 +267,7 @@
 
 ERR_NO_SOCKET:
     print "Could not open socket.\n"
-    print "Did you enable PARROT_NET_DEVEL in include/io_private.h?\n"
+    print "Did you enable PARROT_NETWORKING_SUPPORT in include/io_private.h?\n"
     end
 ERR_bind:
     print "bind failed\n"

Modified: branches/io_cleanups/src/io/io_private.h
==============================================================================
--- branches/io_cleanups/src/io/io_private.h	Thu Jun 25 20:35:42 2009	(r39777)
+++ branches/io_cleanups/src/io/io_private.h	Thu Jun 25 21:24:47 2009	(r39778)
@@ -27,11 +27,11 @@
 
 #define PARROT_IN_IO 1
 #define PARROT_ASYNC_DEVEL 0
-#define PARROT_NET_DEVEL 1
+#define PARROT_NETWORKING_SUPPORT 1
 
 #include <parrot/io.h>
 
-#if PARROT_NET_DEVEL
+#if PARROT_NETWORKING_SUPPORT
 /* XXX: Parrot config is currently not probing for all headers so
  * I'm sticking here rather than parrot.h
  */
@@ -43,7 +43,7 @@
 #    include <winsock.h>
 #  endif
 
-#endif /* PARROT_NET_DEVEL */
+#endif /* PARROT_NETWORKING_SUPPORT */
 
 /* IO object flags */
 #define PIO_F_READ      00000001

Modified: branches/io_cleanups/src/io/socket_unix.c
==============================================================================
--- branches/io_cleanups/src/io/socket_unix.c	Thu Jun 25 20:35:42 2009	(r39777)
+++ branches/io_cleanups/src/io/socket_unix.c	Thu Jun 25 21:24:47 2009	(r39778)
@@ -67,7 +67,7 @@
 
 =head2 Networking
 
-Define C<PARROT_NET_DEVEL> to enable networking.
+Define C<PARROT_NETWORKING_SUPPORT> to enable networking.
 
 These could be native extensions but they probably should be here if we
 wish to make them integrated with the async IO system.
@@ -110,9 +110,6 @@
     return sockaddr;
 }
 
-
-#  if PARROT_NET_DEVEL
-
 /*
 
 =item C<INTVAL Parrot_io_socket_unix(PARROT_INTERP, PMC *s, int fam, int type,
@@ -484,7 +481,6 @@
     sa->sin_family = family;
     sa->sin_port = htons(port);
 }
-#  endif
 
 
 #endif /* PIO_OS_UNIX */

Modified: branches/io_cleanups/src/io/socket_win32.c
==============================================================================
--- branches/io_cleanups/src/io/socket_win32.c	Thu Jun 25 20:35:42 2009	(r39777)
+++ branches/io_cleanups/src/io/socket_win32.c	Thu Jun 25 21:24:47 2009	(r39778)
@@ -51,8 +51,6 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: static */
 
-#  if PARROT_NET_DEVEL
-
 /* Helper macros to get sockaddr_in */
 #    define SOCKADDR_LOCAL(p) ((struct sockaddr_in*)VTABLE_get_pointer(interp, \
                 PARROT_SOCKET((p))->local))
@@ -453,8 +451,6 @@
     return sockaddr;
 }
 
-#  endif /* PARROT_NET_DEVEL */
-
 #endif /* PIO_OS_WIN32 */
 
 /*

Modified: branches/io_cleanups/src/io/win32.c
==============================================================================
--- branches/io_cleanups/src/io/win32.c	Thu Jun 25 20:35:42 2009	(r39777)
+++ branches/io_cleanups/src/io/win32.c	Thu Jun 25 21:24:47 2009	(r39778)
@@ -133,7 +133,7 @@
 {
     ASSERT_ARGS(Parrot_io_init_win32)
     HANDLE h;
-#  if PARROT_NET_DEVEL
+#  if PARROT_NETWORKING_SUPPORT
     struct WSAData sockinfo;
     int ret;
 #  endif
@@ -156,7 +156,7 @@
     else {
         _PIO_STDERR(interp) = PMCNULL;
     }
-#  if PARROT_NET_DEVEL
+#  if PARROT_NETWORKING_SUPPORT
     /* Start Winsock
      * no idea where or whether destroy it
      */


More information about the parrot-commits mailing list