build: check for RETSIGTYPE
authorAndrew Tridgell <tridge@samba.org>
Sun, 7 Mar 2010 12:41:29 +0000 (23:41 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:45 +0000 (20:26 +1000)
lib/replace/wscript

index 05bf1ea06b4df2477dc3473e560c13d34a586b9a..9312db4ac0596b1abc39289610393eaf5a692e84 100644 (file)
@@ -126,6 +126,11 @@ def configure(conf):
                        ''',
                     define='HAVE_IPV6')
 
+    # check if signal() takes a void function
+    if conf.CHECK_CODE('return *(signal (0, 0)) (0) == 1', define='RETSIGTYPE_INT', msg='Checking return type of signal handlers'):
+        conf.DEFINE('RETSIGTYPE', 'int')
+    else:
+        conf.DEFINE('RETSIGTYPE', 'void')
 
     conf.CHECK_FUNCS('shl_load shl_unload shl_findsym')
     conf.CHECK_FUNCS('pipe strftime srandom random srand rand usleep setbuffer')