]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/log
thirdparty/rrdtool-1.x.git
6 years agonumeric version for perl 1.7.2 1006/head
Tobias Oetiker [Mon, 27 May 2019 19:12:03 +0000 (21:12 +0200)] 
numeric version for perl

6 years agoreleased 1.7.2
Tobias Oetiker [Mon, 27 May 2019 18:07:42 +0000 (20:07 +0200)] 
released 1.7.2

6 years agoDefine _POSIX_THREAD_SAFE_FUNCTIONS (MinGW-w64)
Wolfgang Stöggl [Sun, 19 May 2019 18:28:59 +0000 (20:28 +0200)] 
Define _POSIX_THREAD_SAFE_FUNCTIONS (MinGW-w64)

- time.h of MinGW-w64 requires _POSIX_THREAD_SAFE_FUNCTIONS to be
  defined in order to provide ctime_r, gmtime_r or localtime_r.
- In newer versions of winpthreads (e.g. git-7.0.0.5447.a2d94c81),
  _POSIX_THREAD_SAFE_FUNCTIONS is not defined any more in
  pthread_unistd.h. Hence define it here directly.
- This is a follow-up to commit:
  https://github.com/oetiker/rrdtool-1.x/commit/603de9a

6 years agoSilence unused variable and parameter warnings
Wolfgang Stöggl [Tue, 7 May 2019 14:41:17 +0000 (16:41 +0200)] 
Silence unused variable and parameter warnings

- Cast unused variables and parameters to void, do nothing
- Fixes the following compiler warnings on Windows:
rrd_open.c:
  757:9: warning: unused parameter 'writelock' [-Wunused-parameter]
    int writelock)
  810:24: warning: unused variable 'rrd_simple_file'
    [-Wunused-variable] rrd_simple_file_t *rrd_simple_file;
  807:17: warning: unused parameter 'rrd_file' [-Wunused-parameter]
    rrd_file_t *rrd_file,
  808:12: warning: unused parameter 'rrd' [-Wunused-parameter]
    rrd_t *rrd)
rrd_client.c:
  746:39: warning: unused parameter 'client' [-Wunused-parameter]
    static int connect_unix(rrd_client_t *client, const char *path)
    /* {{{ */
  746:59: warning: unused parameter 'path' [-Wunused-parameter]
    static int connect_unix(rrd_client_t *client, const char *path)
    /* {{{ */

6 years agoIndent src/rrd_client.c
Wolfgang Stöggl [Tue, 7 May 2019 14:17:19 +0000 (16:17 +0200)] 
Indent src/rrd_client.c

- indent src/rrd_client.c before any further changes using
  GNU indent 2.2.12

6 years agoFix compiler warning: label defined but not used
Wolfgang Stöggl [Tue, 30 Apr 2019 14:23:32 +0000 (16:23 +0200)] 
Fix compiler warning: label defined but not used

- The label 'no_lseek_necessary' is only relevant,
  if HAVE_POSIX_FALLOCATE is defined.
- Fixes the following compiler warning on systems, where
  HAVE_POSIX_FALLOCATE is not defined:
  rrd_open.c:387:3: warning: label 'no_lseek_necessary' defined but not
  used [-Wunused-label]

6 years agoIndent rrd_create.c
Wolfgang Stöggl [Sat, 13 Apr 2019 20:51:36 +0000 (22:51 +0200)] 
Indent rrd_create.c

- Add typename GList to .indent.pro
- indent rrd_create.c using GNU indent 2.2.12

6 years agoAvoid MinGW-w64 strndup compiler warning
Wolfgang Stöggl [Sat, 13 Apr 2019 20:34:48 +0000 (22:34 +0200)] 
Avoid MinGW-w64 strndup compiler warning

- Fixes the following MinGW-w64 GCC compiler warning:
  rrd_create.c:287:14: warning: declaration of 'strndup' shadows a
  built-in function [-Wshadow] static char *strndup(
- MinGW-w64: strndup is not detected by configure, therefore
  HAVE_STRNDUP is not defined.
  Use strndup_() here instead of strndup() to avoid any collisions.

6 years agoConsider flags for CreateFileA(), Windows
Wolfgang Stöggl [Wed, 24 Apr 2019 13:29:54 +0000 (15:29 +0200)] 
Consider flags for CreateFileA(), Windows

- Implement dwDesiredAccess and dwCreationDisposition based on
  the flags O_RDONLY, O_RDWR, O_CREAT | O_TRUNC and O_EXCL
- This updates how a file handle is created using CreateFileA()
  under Windows, considering the flags. Use e.g.
  DesiredAccess = GENERIC_READ | GENERIC_WRITE
  dwCreationDisposition = OPEN_EXISTING
- CreateFileA(): Check for INVALID_HANDLE_VALUE and add output of error
  messages using GetLastError() and FormatMessage()
- The error message provides correct output now, which error occurs.
  e.g.: rrdtool.exe info not_existing_file.rrd
    ERROR: opening 'not_existing_file.rrd':
    The system cannot find the file specified.
  Previously, the following error occurred later in the code:
    ERROR: short read while reading header rrd->stat_head
  And also empty files were left behind:
  e.g. rrdtool.exe resize not_existing_file.rrd 0 GROW 5200
- Use <CharacterSet>MultiByte</CharacterSet> consistently
  in .vcxproj files. There were 4 inadvertent occurrences of
  <CharacterSet>Unicode</CharacterSet> in librrd-4.vcxproj.
  Using MultiByte or NotSet instead of Unicode is required for
  printing "(LPTSTR) lpMsgBuf" from FormatMessage() using %s, to avoid
  unnecessary wide characters.
- This commit is an update to a9671a7

6 years agoAdd missing #define and indent rrd_open.c
Wolfgang Stöggl [Wed, 24 Apr 2019 12:42:01 +0000 (14:42 +0200)] 
Add missing #define and indent rrd_open.c

- Add missing "#define __rrd_read(dst, dst_t, cnt) { \" after
  #elif defined(HAVE_LIBRADOS) && !defined(HAVE_MMAP)
- This fixes:
    indent: src/rrd_open.c:77: Error:Unmatched 'else'
    indent: src/rrd_open.c:79: Error:Stmt nesting error.
    and errors in case of defined(HAVE_LIBRADOS) && !defined(HAVE_MMAP)
- indent src/rrd_open.c using GNU indent 2.2.12
- Replace all remaining tabs by four spaces

6 years agoFix GCC string truncation warnings
Wolfgang Stöggl [Fri, 12 Apr 2019 14:59:36 +0000 (16:59 +0200)] 
Fix GCC string truncation warnings

- Fixes the following GCC compiler warnings:
  rrd_fetch.c:338:9: warning: 'strncpy' output may be truncated copying
  19 bytes from a string of length 19 [-Wstringop-truncation]
    strncpy((*ds_namv)[i], rrd.ds_def[i].ds_nam, DS_NAM_SIZE - 1);
  rrd_tune.c:284:13: warning: 'strncpy' output may be truncated copying
  19 bytes from a string of length 19 [-Wstringop-truncation]
    strncpy(rrd.ds_def[ds].ds_nam, ds_new, DS_NAM_SIZE - 1);
  rrd_graph.c:2282:17: warning: 'strncpy' output may be truncated
    copying 204 bytes from a string of length 204
    [-Wstringop-truncation] strncpy(im->gdes[i].legend, saved_legend,
    sizeof im->gdes[0].legend - 1);

6 years agoAvoid pragma comment warning under MinGW
Wolfgang Stöggl [Wed, 10 Apr 2019 11:20:59 +0000 (13:20 +0200)] 
Avoid pragma comment warning under MinGW

- Removes the following MinGW compiler warning:
  rrd_client.c:32: warning: ignoring #pragma comment
  [-Wunknown-pragmas] #pragma comment(lib, "ws2_32.lib")
- This #pragma comment is only relevant for MSVC

6 years agoUpdate .gitignore files
Wolfgang Stöggl [Tue, 9 Apr 2019 15:17:39 +0000 (17:17 +0200)] 
Update .gitignore files

6 years agoCast lua_tostring return value to char *
Wolfgang Stöggl [Tue, 9 Apr 2019 11:35:53 +0000 (13:35 +0200)] 
Cast lua_tostring return value to char *

- Fixes the following gcc compiler warning:
  rrdlua.c:69:21: warning: assignment discards ‘const’ qualifier from
  pointer target type [-Wdiscarded-qualifiers]
  if (!(argv[i] = lua_tostring (L, i))) {

6 years agoUpdate test tune1
Wolfgang Stöggl [Tue, 9 Apr 2019 09:30:00 +0000 (11:30 +0200)] 
Update test tune1

- Compare dump of the updated rrd file with tune1-testorg.dump,
  which is available in tests

6 years agoCast unsigned long values to long for labs()
Wolfgang Stöggl [Thu, 4 Apr 2019 13:35:18 +0000 (15:35 +0200)] 
Cast unsigned long values to long for labs()

- Fixes the following clang compiler warning:
  rrd_fetch.c:391:29: warning: taking the absolute value of unsigned
  type 'unsigned long' has no effect [-Wabsolute-value]
    tmp_step_diff = labs(*step - (rrd.stat_head->pdp_step

6 years agoUse fabs() for floating point, labs() for long
Wolfgang Stöggl [Wed, 3 Apr 2019 16:13:33 +0000 (18:13 +0200)] 
Use fabs() for floating point, labs() for long

- Fixes the following clang compiler warnings:
  rrd_rpncalc.c:999:11: warning: using integer absolute value function
  'abs' when argument is of floating point type [-Wabsolute-value]
    if (abs(percentile) > 100) {
  rrd_rpncalc.c:1103:24: warning: using integer absolute value function
  'abs' when argument is of floating point type [-Wabsolute-value]
    int idx = round(abs(idxf));
  rrd_hw.c:519:36: warning: absolute value function 'abs' given an
  argument of type 'long' but has parameter of type 'int' which may
  cause truncation of value [-Wabsolute-value]
    new_val = ((unsigned long) abs(val)) % mod;

6 years agoUpdate strftime.c and use it under MinGW
Wolfgang Stöggl [Thu, 28 Mar 2019 14:10:05 +0000 (15:10 +0100)] 
Update strftime.c and use it under MinGW

- Add %F and %T to strftime.c
  These format codes are commonly used, part of C99 and used in the
  test vformatter1
- rrd_graph.c: Include local strftime.h and use strftime_ from
  strftime.c in case of MinGW or MinGW-w64 builds.
- This allows test vformatter1 to pass under MSYS2 (MinGW-w64)

6 years agoRemove strftime.c and strftime.h from MSVC builds
Wolfgang Stöggl [Wed, 27 Mar 2019 15:59:24 +0000 (16:59 +0100)] 
Remove strftime.c and strftime.h from MSVC builds

- Recent versions of MSVC (VS2015 and newer) properly support strftime
  including formatting codes like %F, %T or %V (ISO 8601)

6 years agofix segfault on non-existent RRD file when using rrdcached
themylogin [Wed, 27 Mar 2019 17:09:55 +0000 (18:09 +0100)] 
fix segfault on non-existent RRD file when using rrdcached

fix segfault on non-existent RRD file when using rrdcached + rrdtool xport
(like 814ca69a3329ccc88040ed184a413e4e5adf604c does for rrdtool graph)

6 years agoUpdate test list1
Wolfgang Stöggl [Tue, 26 Mar 2019 16:04:53 +0000 (17:04 +0100)] 
Update test list1

- Avoid double slashes at beginning of filename paths.
  Leave "/" in CACHED_DIR (only sed ^$BASEDIR), then it is not
  necessary to add "/" in function do_list_tests() several times
  again and "$1" can be used instead of "/$1" there.
- This allows passing of test list1 under MSYS2 (Windows), where paths
  starting (unnecessarily) with // are not working. Exit test list1
  under Windows (MSYS2) before "Starting rrdcached..."

6 years agoUpdate functions
Tobias Oetiker [Mon, 25 Mar 2019 12:14:39 +0000 (13:14 +0100)] 
Update functions

6 years agoUpdate further URLs from http to https
Wolfgang Stöggl [Mon, 25 Mar 2019 08:58:31 +0000 (09:58 +0100)] 
Update further URLs from http to https

- Command used to replace http with https:
  git grep -l 'http://tobi.oetiker.ch' -- './*' ':(exclude)CHANGES' | \
  xargs sed -i 's|http://tobi.oetiker.ch|https://tobi.oetiker.ch|g'
- This is an addition to commit: 267369f

6 years agoLet two more tests pass under MSYS2 (Windows)
Wolfgang Stöggl [Sat, 23 Mar 2019 14:12:16 +0000 (15:12 +0100)] 
Let two more tests pass under MSYS2 (Windows)

- Updates the following tests:
  create-with-source-4, xport1
- Avoid Windows drive letter in the path of DEF:vname=rrdfile
  under MSYS or MSYS2. Use only the filename of the rrd and not
  the full path if environmental variable MSYSTEM is set.

6 years agoUpdate URL from http to https
Wolfgang Stöggl [Thu, 21 Mar 2019 10:25:39 +0000 (11:25 +0100)] 
Update URL from http to https

- Command used to replace http with https:
  git grep -l 'http://oss.oetiker.ch' -- './*' ':(exclude)CHANGES' | \
  xargs sed -b -i 's|http://oss.oetiker.ch|https://oss.oetiker.ch|g'
- Fixes:
  https://github.com/oetiker/rrdtool-1.x/issues/934

6 years agoUpdate bugs address
Wolfgang Stöggl [Thu, 21 Mar 2019 09:34:07 +0000 (10:34 +0100)] 
Update bugs address

- Replace:
  http://oss.oetiker.ch/rrdtool-trac/newticket
  with
  https://github.com/oetiker/rrdtool-1.x/issues

6 years agoFix docs on rrdxport
Óscar Nájera [Mon, 18 Mar 2019 17:23:05 +0000 (18:23 +0100)] 
Fix docs on rrdxport

6 years agoUpdate xport tests
Óscar Nájera [Mon, 18 Mar 2019 17:12:24 +0000 (18:12 +0100)] 
Update xport tests

6 years agoFix bounds in rrd_xport
Óscar Nájera [Mon, 18 Mar 2019 15:22:31 +0000 (16:22 +0100)] 
Fix bounds in rrd_xport

rrdxport needs to provide enough data points in its output for the
receiving client to be able to reproduce the graphs generated by rrdgraph.

- The start time pointer needs to be at the start of the interval that
  contain the query start time. For the function that retrieves the data.
  On output the returned start timestamp is > than query timestamp.
- SV export was missing the end boundary

6 years agoFix %s/%S unit autoscaling in gprint for json/xml
Alexander Zangerl [Sat, 6 Oct 2018 02:31:08 +0000 (12:31 +1000)] 
Fix %s/%S unit autoscaling in gprint for json/xml

6 years agoAdd typenames to .indent.pro, add to EXTRA_DIST
Wolfgang Stöggl [Mon, 11 Mar 2019 00:03:34 +0000 (01:03 +0100)] 
Add typenames to .indent.pro, add to EXTRA_DIST

- Several typenames have been added in the meantime using typedef.
  Add them to .indent.pro
- Add .indent.pro file to EXTRA_DIST, so that it is available in the
  tarball
- re-indent src/rrd_xport.c with updated .indent.pro

6 years agoIndent src/rrd_xport.c, tests/Makefile.am
Wolfgang Stöggl [Sun, 10 Mar 2019 01:20:48 +0000 (02:20 +0100)] 
Indent src/rrd_xport.c, tests/Makefile.am

- Indent src/rrd_xport.c using GNU indent 2.2.12
- tests/Makefile.am:
  Use tab in lines 8 and 22, like in the other lines of Makefile.am

6 years agoAllow nan and -nan in test pdp-calc1
Wolfgang Stöggl [Wed, 6 Mar 2019 17:29:36 +0000 (18:29 +0100)] 
Allow nan and -nan in test pdp-calc1

6 years agoAdded PDP calculation tests
Jens Kammler [Tue, 5 Mar 2019 17:04:43 +0000 (18:04 +0100)] 
Added PDP calculation tests

6 years agoFixed bug in bug fix. Has to be tested now.
Jens Kammler [Sat, 16 Feb 2019 14:35:23 +0000 (15:35 +0100)] 
Fixed bug in bug fix. Has to be tested now.

Forgot to increase proc_pdp_cnt after finishing most left open PDP.
Added check for invalid values before calculation, just to be sure.

6 years agoOptimized PDP calculation when multiple PDPs are closed by an update and the previous...
Jens Kammler [Tue, 12 Feb 2019 16:14:11 +0000 (17:14 +0100)] 
Optimized PDP calculation when multiple PDPs are closed by an update and the previous one was open

6 years agoUpdate etc/Makefile.am
Wolfgang Stöggl [Mon, 18 Feb 2019 15:35:52 +0000 (16:35 +0100)] 
Update etc/Makefile.am

- Add rrdcached-init-lsb to EXTRA_DIST
- Trim trailing space after backslash. Fixes:
  etc/Makefile.am:1: warning: whitespace following trailing backslash

6 years agoUpdate snprintf.m4, add _HW_FUNC_XPRINTF_REPLACE
Wolfgang Stöggl [Mon, 18 Feb 2019 10:28:09 +0000 (11:28 +0100)] 
Update snprintf.m4, add _HW_FUNC_XPRINTF_REPLACE

- Add _HW_FUNC_XPRINTF_REPLACE again to snprintf.m4, in a modified way.
  Use AC_LIBOBJ([rrd_snprintf]) instead of original AC_LIBOBJ([snprintf])
- Fixes the following configure messages under MinGW-w64:
  ./configure: line 14694: _HW_FUNC_XPRINTF_REPLACE: command not found
  ./configure: line 14752: _HW_FUNC_XPRINTF_REPLACE: command not found

6 years agoDelete rrd_config.h.in
Wolfgang Stöggl [Thu, 14 Feb 2019 18:10:56 +0000 (19:10 +0100)] 
Delete rrd_config.h.in

Remove obsolete rrd_config.h.in file in the base directory.
The current file is src/rrd_config.h.in

6 years agoUpdate year in COPYRIGHT and win32/*.rc files
Wolfgang Stöggl [Thu, 14 Feb 2019 00:19:14 +0000 (01:19 +0100)] 
Update year in COPYRIGHT and win32/*.rc files

6 years agoDelete name.inc
Wolfgang Stöggl [Mon, 11 Feb 2019 14:31:17 +0000 (15:31 +0100)] 
Delete name.inc

Fixes: https://github.com/oetiker/rrdtool-1.x/issues/968
6 years agoadd notes on update
Tobias Oetiker [Fri, 8 Feb 2019 10:14:21 +0000 (11:14 +0100)] 
add notes on update

6 years agoDefine mkdir() macro for Windows builds
Wolfgang Stöggl [Sat, 9 Feb 2019 23:34:09 +0000 (00:34 +0100)] 
Define mkdir() macro for Windows builds

- Windows: #define mkdir(A, B) mkdir(A)
  mkdir() has only got one argument under Windows

6 years agoCall getuid() only if HAVE_GETUID is defined
Wolfgang Stöggl [Sat, 9 Feb 2019 23:27:47 +0000 (00:27 +0100)] 
Call getuid() only if HAVE_GETUID is defined

6 years agoUpdate FSF address and fix UTF8
Wolfgang Stöggl [Sun, 10 Feb 2019 01:46:21 +0000 (02:46 +0100)] 
Update FSF address and fix UTF8

- Update FSF address in COPYRIGHT
  old: 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  new: 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Update LICENSE file according to the current version from:
  https://www.gnu.org/licenses/gpl-2.0.txt
- Update bindings/python/COPYING according to the current version from:
  https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
- Change encoding of CONTRIBUTORS from ISO 8859-1 to UTF-8
- Fixes rpmlint warnings and errors:
  W: file-not-utf8 CONTRIBUTORS
  E: incorrect-fsf-address COPYRIGHT
  E: incorrect-fsf-address LICENSE
  E: incorrect-fsf-address bindings/python/COPYING

6 years agoadd missing testfile
Tobias Oetiker [Fri, 8 Feb 2019 07:38:39 +0000 (08:38 +0100)] 
add missing testfile

6 years agoTypo
nirgal [Thu, 7 Feb 2019 17:29:38 +0000 (17:29 +0000)] 
Typo

Thank lintian

6 years agoadd ghostscript to build env
Tobias Oetiker [Thu, 7 Feb 2019 12:15:31 +0000 (13:15 +0100)] 
add ghostscript to build env

6 years agoadd missing cd ..
Tobias Oetiker [Thu, 7 Feb 2019 10:21:51 +0000 (11:21 +0100)] 
add missing cd ..

6 years agoconsistant numbering for windows
Tobias Oetiker [Thu, 7 Feb 2019 08:15:48 +0000 (09:15 +0100)] 
consistant numbering for windows

6 years agogenerate NUMVERS from VERSION file
Tobias Oetiker [Thu, 7 Feb 2019 08:10:22 +0000 (09:10 +0100)] 
generate NUMVERS from VERSION file

6 years agobump version
Tobias Oetiker [Thu, 7 Feb 2019 08:01:40 +0000 (09:01 +0100)] 
bump version

6 years agoadd releasee tests to travis and bump version number for rerelease with fixed makefiles
Tobias Oetiker [Thu, 7 Feb 2019 07:50:40 +0000 (08:50 +0100)] 
add releasee tests to travis and bump version number for rerelease with fixed makefiles

6 years agoFixed 'No rule to make target 'etc/rrdcached.socket'
Jaroslav Škarvada [Tue, 5 Feb 2019 14:04:34 +0000 (15:04 +0100)] 
Fixed 'No rule to make target 'etc/rrdcached.socket'

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
6 years agoproperly add etc files via EXTRA_DIST - fixes #956 some more
Tobias Oetiker [Mon, 4 Feb 2019 16:17:25 +0000 (17:17 +0100)] 
properly add etc files via EXTRA_DIST - fixes #956 some more

6 years agoadd missing etc/rrdcached-default-lsb.in to tarball - fixes #956
Tobias Oetiker [Mon, 4 Feb 2019 15:25:06 +0000 (16:25 +0100)] 
add missing etc/rrdcached-default-lsb.in to tarball - fixes #956

6 years agosync 1.7.1 release updates
Tobias Oetiker [Mon, 4 Feb 2019 13:45:29 +0000 (14:45 +0100)] 
sync 1.7.1 release updates

6 years agoupdate library version since new features were added v1.7.1
Tobias Oetiker [Mon, 4 Feb 2019 12:59:37 +0000 (13:59 +0100)] 
update library version since new features were added

6 years agofix log
Tobias Oetiker [Mon, 4 Feb 2019 12:48:08 +0000 (13:48 +0100)] 
fix log

6 years agoUpdate version to 1.7.1 for MSVC builds
Wolfgang Stöggl [Mon, 4 Feb 2019 12:43:41 +0000 (13:43 +0100)] 
Update version to 1.7.1 for MSVC builds

6 years agoready for 1.7.1 release
Tobias Oetiker [Mon, 4 Feb 2019 11:18:30 +0000 (12:18 +0100)] 
ready for 1.7.1 release

6 years agoRemove librrd-4.vcxproj.user
Wolfgang Stöggl [Mon, 4 Feb 2019 10:07:13 +0000 (11:07 +0100)] 
Remove librrd-4.vcxproj.user

- Remove file from git source control, because
  .vcxproj.user files typically contain user-specific settings
  or overrides

6 years agoUpdate issue templates
Tobias Oetiker [Thu, 3 Jan 2019 12:03:48 +0000 (13:03 +0100)] 
Update issue templates

6 years agoFix warnings: different const qualifiers (MSVC)
Wolfgang Stöggl [Fri, 25 Jan 2019 14:22:23 +0000 (15:22 +0100)] 
Fix warnings: different const qualifiers (MSVC)

- Cast affected variables from 'const char **' to 'char **'
- Fixes the following warning:
  C4090: 'function': different 'const' qualifiers
  in: rrd_create.c(248), rrd_modify.c(1312),
  rrd_modify.c(1329), rrd_modify.c(1457), rrd_modify.c(1463)

6 years agoDefine PATH_MAX as _MAX_PATH for MSVC builds
Wolfgang Stöggl [Fri, 1 Feb 2019 23:30:52 +0000 (00:30 +0100)] 
Define PATH_MAX as _MAX_PATH for MSVC builds

- The max. length of full pathname is 260 under Windows.
  _MAX_PATH is defined in stdlib.h, use:
  #define PATH_MAX _MAX_PATH

6 years agoDefine HAVE_ASPRINTF and HAVE_VASPRINTF (MSVC)
Wolfgang Stöggl [Mon, 28 Jan 2019 20:15:05 +0000 (21:15 +0100)] 
Define HAVE_ASPRINTF and HAVE_VASPRINTF (MSVC)

- asprintf.c and vasprintf-msvc.c are compiled in MSVC builds, so
  define HAVE_ASPRINTF and HAVE_VASPRINTF in win32/rrd_config.h

6 years agoUse Unix line endings for win32-glob
Wolfgang Stöggl [Mon, 28 Jan 2019 20:00:08 +0000 (21:00 +0100)] 
Use Unix line endings for win32-glob

- Restore original line endings for win32-glob.c and win32-glob.h
- Furthermore, RRDtool source files use Unix line endings in general

6 years agoRemove win32/RCa02816, which is a temporary file
Wolfgang Stöggl [Mon, 28 Jan 2019 19:54:15 +0000 (20:54 +0100)] 
Remove win32/RCa02816, which is a temporary file

6 years agoFix _errno inconsistent dll linkage (Windows)
Wolfgang Stöggl [Sun, 27 Jan 2019 00:09:34 +0000 (01:09 +0100)] 
Fix _errno inconsistent dll linkage (Windows)

- Exclude in case of _WIN32 in rrd_snprintf.c:
  extern int errno;
- Fixes warnings:
  MSVC:
  rrd_snprintf.c(583): warning C4273:
  '_errno': inconsistent dll linkage
  errno.h(19): note: see previous definition of '_errno'
  MinGW-w64 (gcc):
  rrd_snprintf.c:583:12: warning: '_errno' redeclared without
  dllimport attribute: previous dllimport ignored [-Wattributes]

6 years agoFix rc compiler redefinition warnings (nmake)
Wolfgang Stöggl [Fri, 25 Jan 2019 10:08:18 +0000 (11:08 +0100)] 
Fix rc compiler redefinition warnings (nmake)

- Surround code in win32/rrd_config.h that causes warnings by rc with
  #ifndef RC_INVOKED and #endif. Remark: _MSC_VER is unknown to rc
- Fixes the following warnings for .rc files, e.g.:
  rc /nologo /I./src /fo./win32/rrdtool.res ./win32\rrdtool.rc
  ./win32\rrd_config.h(130) : warning RC4005: 'isinf' : redefinition
  ./win32\rrd_config.h(131) : warning RC4005: 'isnan' : redefinition
- This concerns: librrd-4.rc, rrdtool.rc, rrdupdate.rc, rrdcgi.rc,
  when using the resource compiler (rc) via nmake under Windows

6 years agoInitialize local variable junk
Wolfgang Stöggl [Thu, 24 Jan 2019 16:44:01 +0000 (17:44 +0100)] 
Initialize local variable junk

- Fixes the following compiler warnings (MSVC):
  rrd_modify.c(439) : warning C4700: uninitialized local variable
  'junk' used
  rrd_modify.c(1027) : warning C4700: uninitialized local variable
  'junk' used

6 years agoInclude winsdkver.h for _WIN32_MAXVER
Wolfgang Stöggl [Sun, 20 Jan 2019 21:11:34 +0000 (22:11 +0100)] 
Include winsdkver.h for _WIN32_MAXVER

- _WIN32_MAXVER is defined in winsdkver.h
  The include is required in case of MinGW-w64 builds
- Fixes rrd_open.c:11:5: warning:
  "_WIN32_MAXVER" is not defined, evaluates to 0 [-Wundef]
  #if _WIN32_MAXVER >= 0x0602 /* _WIN32_WINNT_WIN8 */

6 years agoUse _WIN32 instead of WIN32 preprocessor macro
Wolfgang Stöggl [Sat, 19 Jan 2019 22:41:02 +0000 (23:41 +0100)] 
Use _WIN32 instead of WIN32 preprocessor macro

- _WIN32 is the recommended preprocessor macro
- Substitute occurrences of WIN32 with _WIN32 using:
git grep -lw -e '#ifdef WIN32' -e '#ifndef WIN32' -e 'defined(WIN32)' \
-- '*.c' '*.h' '*.xs' | xargs \
sed -i -e 's/#ifdef WIN32/#ifdef _WIN32/g' \
-e 's/#ifndef WIN32/#ifndef _WIN32/g' \
-e 's/defined(WIN32)/defined(_WIN32)/g'

6 years agoFix: Cannot rename temporary file to final file
Wolfgang Stöggl [Fri, 18 Jan 2019 17:05:47 +0000 (18:05 +0100)] 
Fix: Cannot rename temporary file to final file

- Fixes the following failing tests under Windows:
  modify1, modify2, modify3, modify4, modify5
- Use CreateFileA() with FILE_SHARE_DELETE in rrd_open.c,
  so that the outfilename can later be replaced by tmpfilename using
  write_rrd() in rrd_create.c

6 years agoIndent rrd_create.c, rrd_open.c before changes
Wolfgang Stöggl [Fri, 18 Jan 2019 16:26:19 +0000 (17:26 +0100)] 
Indent rrd_create.c, rrd_open.c before changes

- Using GNU indent 2.2.12

6 years agoDefine realpath for MinGW builds
Wolfgang Stöggl [Tue, 15 Jan 2019 09:44:39 +0000 (10:44 +0100)] 
Define realpath for MinGW builds

- Define realpath the same way as in win32/rrd_config.h
- Fixes the following compiler warnings in rrd_client.c:
  115:11: warning: implicit declaration of function 'realpath';
  [-Wimplicit-function-declaration] ret = realpath(path, NULL);
  115:11: warning: nested extern declaration of 'realpath'
  [-Wnested-externs]
  115:9: warning: assignment to 'char *' from 'int' makes pointer from
  integer without a cast [-Wint-conversion] ret = realpath(path, NULL);
  132:22: warning: assignment to 'char *' from 'int' makes pointer from
  integer without a cast [-Wint-conversion]
  dir_path = realpath(dir, NULL);

6 years agoRemove LINKTYPE from perl-piped/Makefile.PL
Wolfgang Stöggl [Wed, 16 Jan 2019 08:17:43 +0000 (09:17 +0100)] 
Remove LINKTYPE from perl-piped/Makefile.PL

- Remove line:
  'linkext'   => {LINKTYPE => ''},
  Since version 5.00 of MakeMaker such a line can be deleted safely.
  MakeMaker recognizes when there's nothing to be linked.
  See: https://perldoc.perl.org/ExtUtils/MakeMaker.html
- Fixes Warning:
  LINKTYPE set to '', no longer necessary

6 years agoRe-enable 0-width lines
nirgal [Sun, 13 Jan 2019 10:02:24 +0000 (10:02 +0000)] 
Re-enable 0-width lines

Some people were using these as a base for stacks.

6 years agoUse g_list_free_full instead of g_list_foreach
Wolfgang Stöggl [Thu, 10 Jan 2019 16:06:21 +0000 (17:06 +0100)] 
Use g_list_free_full instead of g_list_foreach

- Fixes the following compiler warnings in rrd_create.c:
  236:34: warning: cast between incompatible function types from
  'void (*)(void *)' to 'void (*)(void *, void *)'
  [-Wcast-function-type] g_list_foreach( sources, (GFunc)free, NULL );

  1022:44: warning: cast between incompatible function types from
  'void (*)(rrd_file_t *)' {aka 'void (*)(struct rrd_file_t *)'} to
  'void (*)(void *, void *)' [-Wcast-function-type]
  g_list_foreach(sources_rrd_files, (GFunc) cleanup_source_file, NULL);

6 years agoRemove function substring from rrd_graph.c
Wolfgang Stöggl [Thu, 10 Jan 2019 13:39:37 +0000 (14:39 +0100)] 
Remove function substring from rrd_graph.c

- The function substring is not used any more. This was a leftover
  from https://github.com/oetiker/rrdtool-1.x/commit/cd4a728
- Fixes rrd_graph.c:6159:7: warning:
  no previous prototype for 'substring' [-Wmissing-prototypes]

6 years agoUpdate doc/Makefile.am
Wolfgang Stöggl [Wed, 9 Jan 2019 14:50:09 +0000 (15:50 +0100)] 
Update doc/Makefile.am

- Add -Wbreak, as in:
  https://github.com/oetiker/rrdtool-1.x/commit/564aed3

6 years agoInclude rrd_pdpcalc.pod in Makefile.am also
Peter Valdemar Mørch [Mon, 7 Jan 2019 22:36:37 +0000 (23:36 +0100)] 
Include rrd_pdpcalc.pod in Makefile.am also

Should really have been part of:

    commit 47e0f4391bccc0a3b12f75f567596425bd95b9ad
    Author: Peter Valdemar Mørch <peter@morch.com>
    Date:   Thu Jan 3 21:35:38 2019 +0100

        Added some documentation for the rrdxport output format

        See https://github.com/oetiker/rrdtool-1.x/issues/913 for a discussion

6 years agoRename PDP_calculation_explanation.pod -> rrd_pdpcalc.pod as pr. review comment in...
Peter Valdemar Mørch [Sun, 6 Jan 2019 11:23:39 +0000 (12:23 +0100)] 
Rename PDP_calculation_explanation.pod -> rrd_pdpcalc.pod as pr. review comment in #931

6 years agoChanged "[ timestamp - step ; timestamp [" as it was unclear as pr. review comment...
Peter Valdemar Mørch [Fri, 4 Jan 2019 07:23:13 +0000 (08:23 +0100)] 
Changed "[ timestamp - step ; timestamp [" as it was unclear as pr. review comment in #931

6 years agoSpell rrdtool as RRDtool as pr. review comment in #931
Peter Valdemar Mørch [Fri, 4 Jan 2019 07:18:57 +0000 (08:18 +0100)] 
Spell rrdtool as RRDtool as pr. review comment in #931

6 years agoAdded some documentation for the rrdxport output format
Peter Valdemar Mørch [Thu, 3 Jan 2019 20:35:38 +0000 (21:35 +0100)] 
Added some documentation for the rrdxport output format

See https://github.com/oetiker/rrdtool-1.x/issues/913 for a discussion

6 years agoFix two review comments from #932
Peter Valdemar Mørch [Fri, 4 Jan 2019 07:31:30 +0000 (08:31 +0100)] 
Fix two review comments from #932

6 years agoImprove links to AT-STYLE TIME SPECIFICATION section in rrdfetch
Peter Valdemar Mørch [Thu, 3 Jan 2019 22:42:14 +0000 (23:42 +0100)] 
Improve links to AT-STYLE TIME SPECIFICATION section in rrdfetch

Use pod links like L<rrdfetch/"AT-STYLE TIME SPECIFICATION">, which
creates e.g. HTML links like:

    <a href="./rrdfetch.html#AT-STYLE-TIME-SPECIFICATION">
        "AT-STYLE TIME SPECIFICATION" in rrdfetch
    </a>

6 years agoFixed some podchecker error/warnings
Peter Valdemar Mørch [Thu, 3 Jan 2019 22:01:22 +0000 (23:01 +0100)] 
Fixed some podchecker error/warnings

6 years agoRemoved trailing spaces from .pod documentation files
Peter Valdemar Mørch [Thu, 3 Jan 2019 22:02:12 +0000 (23:02 +0100)] 
Removed trailing spaces from .pod documentation files

This fixed warnings like:

*** WARNING: line containing nothing but whitespace in paragraph at line 145 in file rrdfetch.pod

from podchecker

6 years agoFixed POD in PDP_calculation_explanation.pod
Peter Valdemar Mørch [Thu, 3 Jan 2019 21:40:30 +0000 (22:40 +0100)] 
Fixed POD in PDP_calculation_explanation.pod

podchecker PDP_calculation_explanation.pod showed:

*** WARNING: line containing nothing but whitespace in paragraph at line 46 in file PDP_calculation_explanation.pod
*** ERROR: Apparent command =head1 not preceded by blank line at line 176 in file PDP_calculation_explanation.pod
*** WARNING: node 'https://gallery.technet.microsoft.com/scriptcenter/Sample-Script-to-Generate-59c80d4c =head1 AUTHOR' contains non-escaped | or / at line 175 in file PDP_calculation_explanation.pod
*** ERROR: unresolved internal link 'https://gallery.technet.microsoft.com/scriptcenter/Sample-Script-to-Generate-59c80d4c =head1 AUTHOR' at line 175 in file PDP_calculation_explanation.pod
PDP_calculation_explanation.pod has 2 pod syntax errors.

6 years agoRemoved "can't break line" warnings when making .txt files from .1 files
Peter Valdemar Mørch [Thu, 3 Jan 2019 21:41:23 +0000 (22:41 +0100)] 
Removed "can't break line" warnings when making .txt files from .1 files

Multiple warnings were removed e.g. this one (chosen at random):

rrdgraph_data.1:141: warning [p 1, 1.3i]: can't break line

6 years agoupdate tests including verification of timestamp alignement
Tobias Oetiker [Thu, 3 Jan 2019 12:02:14 +0000 (13:02 +0100)] 
update tests including verification of timestamp alignement

6 years agoupdate tests including verification of timestamp alignement
Tobias Oetiker [Thu, 3 Jan 2019 12:01:39 +0000 (13:01 +0100)] 
update tests including verification of timestamp alignement

6 years agofix off by one issue #913
Tobias Oetiker [Thu, 3 Jan 2019 11:02:08 +0000 (12:02 +0100)] 
fix off by one issue #913

6 years agoadd graph test
Tobias Oetiker [Thu, 3 Jan 2019 11:01:20 +0000 (12:01 +0100)] 
add graph test

6 years agoAdd -lws2_32 for MinGW builds by configure
Wolfgang Stöggl [Tue, 18 Dec 2018 16:23:06 +0000 (17:23 +0100)] 
Add -lws2_32 for MinGW builds by configure

- Add -lws2_32 to LIBS in case of MinGW or MinGW-w64 builds.
  This makes building Windows executables more straightforward using
  configure.
- Update README-MinGW-w64, remove LIBS='-lws2_32' from configure
  instructions.

6 years agoCheck for gobject-2.0 in configure
Wolfgang Stöggl [Tue, 18 Dec 2018 10:57:22 +0000 (11:57 +0100)] 
Check for gobject-2.0 in configure

- Since pango version 1.43.0, -lgobject-2.0 is not added automatically
  any more during configure. Remark: pango.pc uses Requires.private
  now for gobject-2.0 instead of formerly Requires: gobject-2.0
- Check for gobject-2.0 in configure to make sure, that -lgobject-2.0
  is added to ALL_LIBS
- Fixes the following linker errors:
  .libs/librrd_la-rrd_graph.o: In function `im_free':
    src/rrd_graph.c:465: undefined reference to `g_object_unref'
  .libs/librrd_la-rrd_graph.o: In function `rrd_graph_init':
    src/rrd_graph.c:4840: undefined reference to `g_object_unref'

6 years agoSync librrd-4.def with librrd.sym
Wolfgang Stöggl [Fri, 14 Dec 2018 15:02:11 +0000 (16:02 +0100)] 
Sync librrd-4.def with librrd.sym

- Export the same functions in the dll from MSVC builds under Windows
  as listed in librrd.sym

6 years agoFix warning strncpy bound equals destination size
Wolfgang Stöggl [Fri, 14 Dec 2018 11:11:05 +0000 (12:11 +0100)] 
Fix warning strncpy bound equals destination size

- Reduce num from 5 to 4 in strncpy and add null terminator.
  Remark: Version strings consist of 4 chars, e.g. RRD_VERSION5 "0005"

- Fixes the following GCC 8 warnings:
  rrd_create.c:960:9: warning:
    ‘strncpy’ specified bound 5 equals destination size
    [-Wstringop-truncation]
    strncpy(rrd.stat_head->version, require_version, 5);

  rrd_modify.c:1218:9: warning:
    ‘strncpy’ specified bound 5 equals destination size
    [-Wstringop-truncation]
    strncpy(out->stat_head->version, require_version, 5);