summaryrefslogtreecommitdiff
path: root/tests/Aio_Platform_Test.cpp
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-25 15:44:51 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-25 15:44:51 +0000
commite4a5fce608e37f129e11e8c8bf3f43892fe9b62b (patch)
treeadfd52eec159f88ce230ae6d0ba4ad531a88e173 /tests/Aio_Platform_Test.cpp
parenta397886cb986b5ea67cdf42682c1fb92129cb63b (diff)
downloadATCD-e4a5fce608e37f129e11e8c8bf3f43892fe9b62b.tar.gz
Fixed the SunCC errors about missing function prototypes. Also put the
various <sysconf> routines under "#if defined <SYMBOL>" statements.
Diffstat (limited to 'tests/Aio_Platform_Test.cpp')
-rw-r--r--tests/Aio_Platform_Test.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/Aio_Platform_Test.cpp b/tests/Aio_Platform_Test.cpp
index 3fa87bf012e..bca4d2e52c5 100644
--- a/tests/Aio_Platform_Test.cpp
+++ b/tests/Aio_Platform_Test.cpp
@@ -34,6 +34,13 @@ static ACE_Message_Block mb2 (BUFSIZ + 1);
static aiocb aiocb1;
static aiocb aiocb2;
static sigset_t completion_signal;
+
+// Function prototypes.
+static int have_asynchio (void);
+static int query_aio_completions (void);
+static int issue_aio_calls (void);
+static int setup_signal_delivery (void);
+static int test_aio_calls (void);
#endif /* ACE_HAS_AIO_CALLS */
static int
@@ -41,6 +48,7 @@ do_sysconf (void)
{
#if !defined (VXWORKS)
// Call sysconf to find out runtime values.
+
errno = 0;
#if defined (_SC_LISTIO_AIO_MAX)
ACE_DEBUG ((LM_DEBUG,
@@ -58,35 +66,62 @@ do_sysconf (void)
" do not exist on this platform\n"));
#endif /* _SC_LISTIO_AIO_MAX */
+#if defined (_SC_AIO_MAX)
errno = 0;
ACE_DEBUG ((LM_DEBUG,
"Runtime value of AIO_MAX is %d, errno = %d\n",
ACE_OS::sysconf (_SC_AIO_MAX),
errno));
+#else
+ ACE_ERROR ((LM_ERROR,
+ "_SC_AIO_MAX does not exist on this platform\n"));
+#endif /* _SC_AIO_MAX */
+#if defined (_SC_ASYNCHRONOUS_IO)
errno = 0;
ACE_DEBUG ((LM_DEBUG,
"Runtime value of _POSIX_ASYNCHRONOUS_IO is %d, errno = %d\n",
ACE_OS::sysconf (_SC_ASYNCHRONOUS_IO),
errno));
+#else /* Not _SC_ASYNCHRONOUS_IO */
+ ACE_ERROR ((LM_ERROR,
+ "_SC_ASYNCHRONOUS_IO does not exist on this platform\n"));
+#endif /* _SC_ASYNCHRONOUS_IO */
+#if defined (_SC_REALTIME_SIGNALS)
errno = 0;
ACE_DEBUG ((LM_DEBUG,
"Runtime value of _POSIX_REALTIME_SIGNALS is %d, errno = %d\n",
ACE_OS::sysconf (_SC_REALTIME_SIGNALS),
errno));
+#else /* Not _SC_REALTIME_SIGNALS */
+ ACE_ERROR ((LM_ERROR,
+ "_SC_REALTIME_SIGNALS does not exist on this platform\n"));
+#endif /* _SC_REALTIME_SIGNALS */
+
+#if defined (_SC_RTSIG_MAX)
errno = 0;
ACE_DEBUG ((LM_DEBUG,
"Runtime value of RTSIG_MAX %d, Errno = %d\n",
ACE_OS::sysconf (_SC_RTSIG_MAX),
errno));
+#else /* Not _SC_RTSIG_MAX */
+ ACE_ERROR ((LM_ERROR,
+ "_SC_RTSIG_MAX does not exist on this platform\n"));
+#endif /* _SC_RTSIG_MAX */
+#if defined (_SC_SIGQUEUE_MAX)
errno = 0;
ACE_DEBUG ((LM_DEBUG,
"Runtime value of SIGQUEUE_MAX %d, Errno = %d\n",
ACE_OS::sysconf (_SC_SIGQUEUE_MAX),
errno));
+#else /* Not _SC_SIGQUEUE_MAX */
+ ACE_ERROR ((LM_ERROR,
+ "_SC_SIGQUEUE_MAX does not exist on this platform\n"));
+#endif /* _SC_SIGQUEUE_MAX */
+
#endif /* ! VXWORKS */
return 0;
@@ -343,9 +378,11 @@ have_asynchio (void)
ACE_DEBUG ((LM_DEBUG,
"Before do_sysconf : Errno %d\n",
errno));
+
// Check and print the run time values.
do_sysconf ();
+ // @@ Debugging.
ACE_DEBUG ((LM_DEBUG,
"After do_sysconf: Errno : %d\n", errno));