]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
check if we have sigwaitinfo and use sigwait instead ...
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 12 Jan 2015 20:37:33 +0000 (21:37 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 12 Jan 2015 20:38:10 +0000 (21:38 +0100)
configure
configure.ac
doc/Makefile.in
src/rrd_config.h.in
src/rrd_daemon.c

index eea625e5042f2760ec77d6da75b1007e212b2d82..938b81d849e3eb9e2c69f01f9e15de9e0c8a6b18 100755 (executable)
--- a/configure
+++ b/configure
@@ -14726,7 +14726,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
 
 
-for ac_func in nl_langinfo tzset fsync mbstowcs opendir readdir chdir chroot getgid getuid setgid setuid strndup strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday getpwnam getgrnam
+for ac_func in sigwait sigwaitinfo nl_langinfo tzset fsync mbstowcs opendir readdir chdir chroot getgid getuid setgid setuid strndup strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday getpwnam getgrnam
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
index 9439b3ec80668d76b2cedbf969f76a8520d2dc8d..9db5f59d96e6dc7670343f1707a7279948ea6226 100644 (file)
@@ -251,7 +251,7 @@ AC_C_BIGENDIAN
 dnl for each function found we get a definition in config.h 
 dnl of the form HAVE_FUNCTION
 
-AC_CHECK_FUNCS(nl_langinfo tzset fsync mbstowcs opendir readdir chdir chroot getgid getuid setgid setuid strndup strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday getpwnam getgrnam)
+AC_CHECK_FUNCS(sigwait sigwaitinfo nl_langinfo tzset fsync mbstowcs opendir readdir chdir chroot getgid getuid setgid setuid strndup strerror snprintf vsnprintf vasprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday getpwnam getgrnam)
 
 AC_FUNC_STRERROR_R
 
index 5729e0c7dfb9e3b3bb3d91a9f5d32f31c3f66804..3c6acc6e3de1cd00325af7666f19731e15211039 100644 (file)
@@ -363,7 +363,7 @@ POD = bin_dec_hex.pod rrddump.pod rrdgraph_examples.pod rrdrestore.pod \
        rrdinfo.pod rrdtune.pod rrdbuild.pod rrdflushcached.pod \
        rrdcgi.pod rrdgraph.pod rrdlast.pod rrdlastupdate.pod \
        rrdcreate.pod rrdgraph_data.pod rrdresize.pod rrdtutorial.pod \
-       rrdmodify.pod $(am__append_1) $(am__append_2)
+       $(am__append_1) $(am__append_2)
 POD3 = librrd.pod
 PMP = RRDs.pod RRDp.pod
 MAN = $(POD:.pod=.1)
index 25fae14264360b8ab59ddb763c54f30be031bc2b..d02f76064751c4cc18e7528945ec70574af6a625 100644 (file)
 /* Define to 1 if you have the <signal.h> header file. */
 #undef HAVE_SIGNAL_H
 
+/* Define to 1 if you have the `sigwait' function. */
+#undef HAVE_SIGWAIT
+
+/* Define to 1 if you have the `sigwaitinfo' function. */
+#undef HAVE_SIGWAITINFO
+
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
index 5eb4c774a67bd8b147af27261a30ac716d480f25..94d9c890b18d723bf0c417a771913e26ab946bfb 100644 (file)
@@ -340,8 +340,14 @@ static void* signal_receiver (void UNUSED(*args))
 
   while (1)
   {
+#if HAVE_SIGWAITINFO    
     status = sigwaitinfo(&signal_set, &signal_info);
-
+#else
+    status = -1;
+    if (sigwait(set, &status) < 0 ){
+       status = -1;
+    }
+#endif
     switch(status)
     {
       case -1: