To get safe_process.cc to build for Drizzle, I needed to fix the
warnings generated by SunStudio in a rather strict mode. This is the
patch that makes it happen:
=== modified file 'tests/lib/My/SafeProcess/safe_process.cc'
--- tests/lib/My/SafeProcess/safe_process.cc 2009-06-12 03:31:52 +0000
+++ tests/lib/My/SafeProcess/safe_process.cc 2009-06-12 04:45:56 +0000
@@ -122,7 +122,7 @@
}
-static void handle_abort (int sig)
+extern "C" static void handle_abort (int sig)
{
message("Got signal %d, child_pid: %d, sending ABRT", sig, child_pid);
@@ -132,7 +132,7 @@
}
-static void handle_signal (int sig)
+extern "C" static void handle_signal (int sig)
{
message("Got signal %d, child_pid: %d", sig, child_pid);
terminated= 1;
@@ -275,7 +275,7 @@
if (WIFEXITED(status))
{
// Process has exited, collect return status
- int ret_code= WEXITSTATUS(status);
+ ret_code= WEXITSTATUS(status);
message("Child exit: %d", ret_code);
// Exit with exit status of the child
exit(ret_code);
@@ -290,6 +290,6 @@
}
kill_child();
- exit(1);
+ return(1);
}
--
Stewart Smith