[ace-users] Minor fixes for Proactor example

Craig Rodrigues rodrigc at crodrigues.org
Sun Jul 15 12:34:33 CDT 2007


Hi,

I was recently playing with the Proactor test
in examples/Reactor/Proactor and needed
these minor fixes to get it to compile on FreeBSD.

-- 
Craig Rodrigues        
rodrigc at crodrigues.org
-------------- next part --------------
Index: test_aiosig.cpp
===================================================================
--- test_aiosig.cpp	(revision 78902)
+++ test_aiosig.cpp	(working copy)
@@ -20,6 +20,7 @@
 //
 // =====================================================================
 
+#include <ace/OS_main.h>
 
 #include <unistd.h>
 #include <fcntl.h>
@@ -31,7 +32,7 @@
 #include <stdio.h>
 
 #include <limits.h>
-
+#include <pthread.h>
 #include <aio.h>
 
 int file_handle = -1;
@@ -118,7 +119,6 @@
 int
 query_aio_completions (void)
 {
-  int result = 0;
   size_t number_of_compleions = 0;
   for (number_of_compleions = 0;
        number_of_compleions < 2;
@@ -250,6 +250,13 @@
   return 0;
 }
 
+void
+null_handler (int         /* signal_number */,
+              siginfo_t * /* info */,
+              void *      /* context */)
+{
+}
+
 int
 setup_signal_handler (int signal_number)
 {
@@ -274,13 +281,6 @@
   return 0;
 }
 
-void
-null_handler (int         /* signal_number */,
-              siginfo_t * /* info */,
-              void *      /* context */)
-{
-}
-
 int
 ACE_TMAIN (int, ACE_TCHAR *[])
 {
Index: test_proactor3.cpp
===================================================================
--- test_proactor3.cpp	(revision 78902)
+++ test_proactor3.cpp	(working copy)
@@ -27,6 +27,7 @@
 #include "ace/Asynch_IO_Impl.h"
 #include "ace/Asynch_Acceptor.h"
 #include "ace/INET_Addr.h"
+#include "ace/Manual_Event.h"
 #include "ace/SOCK_Connector.h"
 #include "ace/SOCK_Acceptor.h"
 #include "ace/SOCK_Stream.h"
Index: Aio_Platform_Test_C.cpp
===================================================================
--- Aio_Platform_Test_C.cpp	(revision 78902)
+++ Aio_Platform_Test_C.cpp	(working copy)
@@ -15,7 +15,7 @@
 //
 // =====================================================================
 
-
+#include <ace/OS_main.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/types.h>


More information about the Ace-users mailing list