summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-29 14:34:20 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-29 14:34:20 +0000
commit445fe17aede3c6d2e09d038d47e4529b1d46151a (patch)
tree3c54ab5ca4e73c78ce00ed03c0d8fdb588b4ae56
parent04c41883f4b25782636dc4681546c6617a1e9d35 (diff)
downloadATCD-445fe17aede3c6d2e09d038d47e4529b1d46151a.tar.gz
ChangeLogTag: Sat Jul 29 09:31:59 2000 David L. Levine <levine@cs.wustl.edu>
-rw-r--r--PACE/ChangeLog6
-rw-r--r--PACE/tests/mqueue_test.c35
2 files changed, 26 insertions, 15 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog
index 3e60ef5a9fc..2cc4a907c82 100644
--- a/PACE/ChangeLog
+++ b/PACE/ChangeLog
@@ -1,3 +1,9 @@
+Sat Jul 29 09:31:59 2000 David L. Levine <levine@cs.wustl.edu>
+
+ * tests/mqueue_test.c: got it to compile cleanly on OSF1,
+ by adding an unused arg to msg_handler, and commenting
+ the characters after an #endif.
+
Sat Jul 29 09:19:01 2000 David L. Levine <levine@cs.wustl.edu>
* include/makeinclude/rules.common.h (CFLAGS): on OSF1, added
diff --git a/PACE/tests/mqueue_test.c b/PACE/tests/mqueue_test.c
index 1a198c61524..3802dbef171 100644
--- a/PACE/tests/mqueue_test.c
+++ b/PACE/tests/mqueue_test.c
@@ -9,11 +9,15 @@
pace_mqd_t mqdes;
-void msg_handler()
+void
+msg_handler (int handler_arg)
{
char buf[1024];
unsigned int priority;
int len = pace_mq_receive(mqdes, buf, sizeof buf, &priority);
+
+ PACE_UNUSED_ARG (handler_arg);
+
if (len < 0)
{
perror("mq_receive");
@@ -23,9 +27,15 @@ void msg_handler()
#define QUEUE_NAME "/testmsg1"
-int main (int argc, char** argv)
+int
+main (int argc, char** argv)
{
-# if !(PACE_LYNXOS)
+#if PACE_LYNXOS
+ pace_printf ("No errors, have occurred. On the other hand no operations have been performed either. Take what you can get I guess.\n");
+ PACE_UNUSED_ARG (argc);
+ PACE_UNUSED_ARG (argv);
+ return EXIT_SUCCESS;
+#else /* ! PACE_LYNXOS */
char buf[1024];
int choice, len;
unsigned int priority;
@@ -37,7 +47,7 @@ int main (int argc, char** argv)
if (mqdes == (pace_mqd_t)-1)
{
perror("mq_open");
- return 1;
+ return EXIT_FAILURE;
}
notification.sigev_notify = SIGEV_SIGNAL;
@@ -57,7 +67,7 @@ int main (int argc, char** argv)
"> ");
if (!pace_fgets(buf, sizeof buf, stdin))
{
- return 1;
+ return EXIT_FAILURE;
}
if (pace_sscanf(buf, "%d", &choice) != 1)
{
@@ -77,7 +87,7 @@ int main (int argc, char** argv)
if (pace_mq_send(mqdes, buf, pace_strlen(buf)+1, priority) == -1)
{
perror("mq_send");
- return 1;
+ return EXIT_FAILURE;
}
break;
case 2:
@@ -94,22 +104,17 @@ int main (int argc, char** argv)
break;
case 4:
pace_mq_close(mqdes);
- return 0;
+ return EXIT_SUCCESS;
case 5:
pace_mq_close(mqdes);
pace_mq_unlink(QUEUE_NAME);
- return 0;
+ return EXIT_SUCCESS;
default:
pace_printf("Please select 1..5\n");
}
}
PACE_UNUSED_ARG (argc);
PACE_UNUSED_ARG (argv);
- return (EXIT_SUCCESS);
-#else
- pace_printf ("No errors, have occurred. On the other hand no operations have been performed either. Take what you can get I guess.\n");
- PACE_UNUSED_ARG (argc);
- PACE_UNUSED_ARG (argv);
- return (EXIT_SUCCESS);
-#endif LYNXOS
+ return EXIT_SUCCESS;
+#endif /* ! PACE_LYNXOS */
}