From: Tobias Oetiker Date: Mon, 29 Jun 2015 15:50:42 +0000 (+0200) Subject: sync build files with latest changes X-Git-Tag: v1.5.4~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=915098327ac878abcf9e693b28cc6001507d0288;p=thirdparty%2Frrdtool-1.x.git sync build files with latest changes --- diff --git a/CHANGES b/CHANGES index 0313e2aa..9e6d7251 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,8 @@ Bug Fixes * parse floating point numbers according to C locale in rrdtool create arguments, regardles of the systems locale setting. * include missing rrd_rados.h into distribution archive +* rrd_parsetime now uses a mutex lock to become threadsafe +* rrd_xport is now threadsafe RRDtool 1.5.3 - 2015-04-30 ========================== diff --git a/configure b/configure index d9671f8b..dd8b95d7 100755 --- a/configure +++ b/configure @@ -13207,6 +13207,99 @@ $as_echo "$ac_res" >&6; } fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if ${ac_cv_type_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* Test preprocessor. */ + #if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + error in preprocessor; + #endif + #if ! (18446744073709551615ULL <= -1ull) + error in preprocessor; + #endif + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if test "$cross_compiling" = yes; then : + ac_cv_type_long_long_int=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main () +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_type_long_long_int=yes +else + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +else + ac_cv_type_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +$as_echo "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + diff --git a/src/Makefile.in b/src/Makefile.in index 7a4ecdbc..188a3c53 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -90,6 +90,7 @@ target_triplet = @target@ @BUILD_RRDGRAPH_TRUE@am__append_1 = rrd_graph.c \ @BUILD_RRDGRAPH_TRUE@ rrd_graph_helper.c \ @BUILD_RRDGRAPH_TRUE@ rrd_xport.c \ +@BUILD_RRDGRAPH_TRUE@ optparse.c \ @BUILD_RRDGRAPH_TRUE@ rrd_gfx.c \ @BUILD_RRDGRAPH_TRUE@ pngsize.c @@ -160,10 +161,11 @@ am__DEPENDENCIES_1 = am__librrd_la_SOURCES_DIST = rrd_version.c rrd_last.c rrd_lastupdate.c \ rrd_first.c rrd_dump.c rrd_flushcached.c rrd_fetch.c \ rrd_fetch_cb.c rrd_resize.c rrd_tune.c rrd_graph.c \ - rrd_graph_helper.c rrd_xport.c rrd_gfx.c pngsize.c \ + rrd_graph_helper.c rrd_xport.c optparse.c rrd_gfx.c pngsize.c \ rrd_restore.c rrd_fetch_libdbi.c @BUILD_RRDGRAPH_TRUE@am__objects_1 = rrd_graph.lo rrd_graph_helper.lo \ -@BUILD_RRDGRAPH_TRUE@ rrd_xport.lo rrd_gfx.lo pngsize.lo +@BUILD_RRDGRAPH_TRUE@ rrd_xport.lo optparse.lo rrd_gfx.lo \ +@BUILD_RRDGRAPH_TRUE@ pngsize.lo @BUILD_RRDRESTORE_TRUE@am__objects_2 = rrd_restore.lo @BUILD_LIBDBI_TRUE@am__objects_3 = rrd_fetch_libdbi.lo am__objects_4 = rrd_version.lo rrd_last.lo rrd_lastupdate.lo \ @@ -188,7 +190,7 @@ am__librrd_th_la_SOURCES_DIST = mutex.c rrd_strtod.c rrd_create.c \ rrd_version.c rrd_last.c rrd_lastupdate.c rrd_first.c \ rrd_dump.c rrd_flushcached.c rrd_fetch.c rrd_fetch_cb.c \ rrd_resize.c rrd_tune.c rrd_graph.c rrd_graph_helper.c \ - rrd_xport.c rrd_gfx.c pngsize.c rrd_restore.c \ + rrd_xport.c optparse.c rrd_gfx.c pngsize.c rrd_restore.c \ rrd_fetch_libdbi.c rrd_thread_safe.c @BUILD_LIBRADOS_TRUE@am__objects_5 = librrd_th_la-rrd_rados.lo @BUILD_GETOPT_TRUE@am__objects_6 = librrd_th_la-rrd_getopt.lo \ @@ -207,6 +209,7 @@ am__objects_7 = librrd_th_la-mutex.lo librrd_th_la-rrd_strtod.lo \ @BUILD_RRDGRAPH_TRUE@am__objects_8 = librrd_th_la-rrd_graph.lo \ @BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_graph_helper.lo \ @BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_xport.lo \ +@BUILD_RRDGRAPH_TRUE@ librrd_th_la-optparse.lo \ @BUILD_RRDGRAPH_TRUE@ librrd_th_la-rrd_gfx.lo \ @BUILD_RRDGRAPH_TRUE@ librrd_th_la-pngsize.lo @BUILD_RRDRESTORE_TRUE@am__objects_9 = librrd_th_la-rrd_restore.lo @@ -305,10 +308,10 @@ DATA = $(pkgconfig_DATA) am__noinst_HEADERS_DIST = unused.h gettext.h mutex.h rrd_strtod.h \ rrd_snprintf.h rrd_getopt.h rrd_parsetime.h \ rrd_config_bottom.h rrd_i18n.h rrd_format.h rrd_tool.h \ - rrd_xport.h rrd.h rrd_rpncalc.h rrd_hw.h rrd_hw_math.h \ - rrd_hw_update.h rrd_restore.h rrd_create.h fnv.h rrd_graph.h \ - rrd_is_thread_safe.h rrd_modify.h rrd_update.h rrd_config.h \ - quicksort.h rrd_rados.h + rrd_xport.h optparse.h rrd.h rrd_rpncalc.h rrd_hw.h \ + rrd_hw_math.h rrd_hw_update.h rrd_restore.h rrd_create.h fnv.h \ + rrd_graph.h rrd_is_thread_safe.h rrd_modify.h rrd_update.h \ + rrd_config.h quicksort.h rrd_rados.h HEADERS = $(include_HEADERS) $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)rrd_config.h.in @@ -551,10 +554,10 @@ RRD_C_FILES = rrd_version.c rrd_last.c rrd_lastupdate.c rrd_first.c \ noinst_HEADERS = unused.h gettext.h mutex.h rrd_strtod.h \ rrd_snprintf.h rrd_getopt.h rrd_parsetime.h \ rrd_config_bottom.h rrd_i18n.h rrd_format.h rrd_tool.h \ - rrd_xport.h rrd.h rrd_rpncalc.h rrd_hw.h rrd_hw_math.h \ - rrd_hw_update.h rrd_restore.h rrd_create.h fnv.h rrd_graph.h \ - rrd_is_thread_safe.h rrd_modify.h rrd_update.h rrd_config.h \ - quicksort.h $(am__append_5) $(am__append_6) + rrd_xport.h optparse.h rrd.h rrd_rpncalc.h rrd_hw.h \ + rrd_hw_math.h rrd_hw_update.h rrd_restore.h rrd_create.h fnv.h \ + rrd_graph.h rrd_is_thread_safe.h rrd_modify.h rrd_update.h \ + rrd_config.h quicksort.h $(am__append_5) $(am__append_6) noinst_LTLIBRARIES = librrdupd.la lib_LTLIBRARIES = librrd.la $(am__append_8) librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c @@ -773,6 +776,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-hash_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-mutex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-optparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-pngsize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-quicksort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_client.Plo@am__quote@ @@ -814,6 +818,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librrd_th_la-rrd_xport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngsize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quicksort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrd_cgi.Po@am__quote@ @@ -1139,6 +1144,13 @@ librrd_th_la-rrd_xport.lo: rrd_xport.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-rrd_xport.lo `test -f 'rrd_xport.c' || echo '$(srcdir)/'`rrd_xport.c +librrd_th_la-optparse.lo: optparse.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-optparse.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-optparse.Tpo -c -o librrd_th_la-optparse.lo `test -f 'optparse.c' || echo '$(srcdir)/'`optparse.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-optparse.Tpo $(DEPDIR)/librrd_th_la-optparse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='optparse.c' object='librrd_th_la-optparse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -c -o librrd_th_la-optparse.lo `test -f 'optparse.c' || echo '$(srcdir)/'`optparse.c + librrd_th_la-rrd_gfx.lo: rrd_gfx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librrd_th_la_CFLAGS) $(CFLAGS) -MT librrd_th_la-rrd_gfx.lo -MD -MP -MF $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo -c -o librrd_th_la-rrd_gfx.lo `test -f 'rrd_gfx.c' || echo '$(srcdir)/'`rrd_gfx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librrd_th_la-rrd_gfx.Tpo $(DEPDIR)/librrd_th_la-rrd_gfx.Plo