From: Stewart Smith Date: June 12 2009 5:08am Subject: [PATCH] my_safe_process.cc warning fixes for SunStudio List-Archive: http://lists.mysql.com/internals/36892 Message-Id: <20090612050803.GK25102@flamingspork.com> MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT 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