From ed3ee7c81e23fcd41693bc372470945576ae54d1 Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 15 Dec 2011 16:08:59 +0000 Subject: [PATCH] merged updated win32 port by Larry Adams and the cacti team git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@2236 a5681a0c-68f1-0310-ab6d-d61299d08faa --- bindings/perl-shared/MANIFEST | 1 - bindings/perl-shared/Makefile.PL | 90 +-- bindings/perl-shared/README | 20 +- bindings/perl-shared/RRDs.xs | 13 +- src/rrd.h | 2 + src/rrd_daemon.c | 2 +- src/rrd_format.c | 3 + src/rrd_getopt.c | 3 +- src/rrd_getopt1.c | 2 + src/rrd_graph.c | 3 +- src/rrd_graph.h | 6 +- src/rrd_tool.c | 2 +- src/rrd_tool.h | 6 +- win32/README | 11 + win32/config.h | 2 + win32/rrd.dsp | 247 -------- win32/rrd.sln | 91 +-- win32/rrd.vcproj | 648 --------------------- win32/rrd_config.h.msvc | 60 -- win32/rrdlib.vcproj | 1145 ++++++++++++++++++++------------------ win32/rrdtool.dsp | 92 --- win32/rrdtool.dsw | 44 -- win32/rrdtool.sln | 20 + win32/rrdtool.vcproj | 583 +++++++++---------- win32/rrdupdate.sln | 20 + win32/rrdupdate.vcproj | 292 ++++++++++ 26 files changed, 1397 insertions(+), 2011 deletions(-) create mode 100755 win32/README delete mode 100644 win32/rrd.dsp delete mode 100644 win32/rrd.vcproj delete mode 100644 win32/rrd_config.h.msvc delete mode 100644 win32/rrdtool.dsp delete mode 100644 win32/rrdtool.dsw create mode 100755 win32/rrdtool.sln create mode 100755 win32/rrdupdate.sln create mode 100755 win32/rrdupdate.vcproj diff --git a/bindings/perl-shared/MANIFEST b/bindings/perl-shared/MANIFEST index 0f30b7e..85ce945 100644 --- a/bindings/perl-shared/MANIFEST +++ b/bindings/perl-shared/MANIFEST @@ -1,4 +1,3 @@ -ntmake-build MANIFEST README Makefile.PL diff --git a/bindings/perl-shared/Makefile.PL b/bindings/perl-shared/Makefile.PL index 625dae5..781682c 100644 --- a/bindings/perl-shared/Makefile.PL +++ b/bindings/perl-shared/Makefile.PL @@ -3,45 +3,61 @@ use Config; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. -# if the last argument when calling Makefile.PL is RPATH=/... and ... is the -# path to librrd.so then the Makefile will be written such that RRDs.so knows -# where to find librrd.so later on ... -my $R=""; -if ($ARGV[-1] =~ /RPATH=(\S+)/){ - pop @ARGV; - my $rp = $1; - for ($^O){ - /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; - /hpux/ && do{ $R = "+b$rp"}; - /solaris/ && do{ $R = "-R$rp"}; - /bsd/ && do{ $R = "-R$rp"}; - /aix/ && do{ $R = "-blibpath:$rp"}; +if (($Config{'osname'} eq 'MSWin32' && $ENV{'OSTYPE'} eq '')) { + WriteMakefile( + 'NAME' => 'RRDs', + 'VERSION_FROM' => 'RRDs.pm', + 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL} -D_CRT_SECURE_NO_WARNINGS -DWIN32", + 'INC' => '-I../../src/ "-IC:/Perl/lib/CORE" -I"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" -I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include"', + 'LDDLFLAGS' => '-dll -nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', + 'LDFLAGS' => '-nologo -opt:ref,icf -ltcg -libpath:"C:\Perl\lib\CORE" -machine:X86', + 'OPTIMIZE' => '-O2 -MD', + 'LIBS' => '"..\..\win32\Release\rrdlib.lib" "..\..\win32\Release" "C:\Perl\lib\CORE\perl514.lib" -L../../contrib/lib -L"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" -L"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib" -L"C:\Perl\lib\CORE"', + 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, + ($] ge '5.005') ? ( + 'AUTHOR' => 'Tobias Oetiker (tobi@oetiker.ch)', + 'ABSTRACT' => 'Round Robin Database Tool', + ) : () + ); +}else{ + # if the last argument when calling Makefile.PL is RPATH=/... and ... is the + # path to librrd.so then the Makefile will be written such that RRDs.so knows + # where to find librrd.so later on ... + my $R=""; + if ($ARGV[-1] =~ /RPATH=(\S+)/){ + pop @ARGV; + my $rp = $1; + for ($^O){ + /linux/ && do{ $R = "-Wl,--rpath -Wl,$rp"}; + /hpux/ && do{ $R = "+b$rp"}; + /solaris/ && do{ $R = "-R$rp"}; + /bsd/ && do{ $R = "-R$rp"}; + /aix/ && do{ $R = "-blibpath:$rp"}; + } } -} - -# darwin works without this because librrd contains its -# install_name which will includes the final location of the -# library after it is installed. This install_name gets transfered -# to the perl shared object. -my $librrd; -if ($^O eq 'darwin'){ + # darwin works without this because librrd contains its + # install_name which will includes the final location of the + # library after it is installed. This install_name gets transfered + # to the perl shared object. + my $librrd; + if ($^O eq 'darwin'){ $librrd = '-lrrd'; -} -else { - $librrd = "-L../../src/.libs/ $R -lrrd"; -} + } else { + $librrd = "-L../../src/.libs/ $R -lrrd"; + } -WriteMakefile( - 'NAME' => 'RRDs', - 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION - 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", - 'INC' => '-I../../src', - # Perl will figure out which one is valid - #'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"}, - 'depend' => {'RRDs.c' => "../../src/librrd.la"}, - 'LDFROM' => '$(OBJECT) '.$librrd, - 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, - ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : () -); + WriteMakefile( + 'NAME' => 'RRDs', + 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION + 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}", + 'INC' => '-I../../src', + # Perl will figure out which one is valid + #'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"}, + 'depend' => {'RRDs.c' => "../../src/librrd.la"}, + 'LDFROM' => '$(OBJECT) '.$librrd, + 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }, + ($^O eq 'darwin') ? ( 'LDDLFLAGS' => "-L../../src/.libs/ $Config{lddlflags}" ) : () + ); +} diff --git a/bindings/perl-shared/README b/bindings/perl-shared/README index 0918ecf..c5d7fbf 100644 --- a/bindings/perl-shared/README +++ b/bindings/perl-shared/README @@ -4,9 +4,21 @@ the following: perl Makefile.PL make test -(win32 users try perl ntmake.pl) +For Windows Users, make sure you have the following requirements: -* if dynamic linking does not work, try +- ActiveState Perl (32bit version Only) +- Microsoft Visual C++ +- The following binaries in your path: mt.exe, nmake.exe, link.exe, perl.exe +- Make the project rrdlib.vcproj in Release mode to create rrdlib.lib -perl Makefile.PL LINKTYPE=static -make test +To build: + +perl Makefile.PL +nmake + +To Install: + +nmake install + +NOTE: If using anything other than Visual C++ 9, edit Makefile.PL and modify + your paths appropriately. diff --git a/bindings/perl-shared/RRDs.xs b/bindings/perl-shared/RRDs.xs index 029b3be..7c75f02 100644 --- a/bindings/perl-shared/RRDs.xs +++ b/bindings/perl-shared/RRDs.xs @@ -24,14 +24,16 @@ extern "C" { */ #define VERSION_SAVED VERSION #undef VERSION +#ifndef WIN32 #include "../../rrd_config.h" +#endif #include "../../src/rrd_tool.h" #undef VERSION #define VERSION VERSION_SAVED #undef VERSION_SAVED /* perl 5.004 compatibility */ -#if PERLPATCHLEVEL < 5 +#ifndef PL_sv_undef #define PL_sv_undef sv_undef #endif @@ -126,7 +128,6 @@ BOOT: #ifdef MUST_DISABLE_FPMASK fpsetmask(0); #endif - SV* rrd_error() @@ -136,7 +137,6 @@ rrd_error() OUTPUT: RETVAL - int rrd_last(...) PROTOTYPE: @ @@ -159,7 +159,6 @@ rrd_first(...) OUTPUT: RETVAL - int rrd_create(...) PROTOTYPE: @ @@ -172,7 +171,6 @@ rrd_create(...) OUTPUT: RETVAL - int rrd_update(...) PROTOTYPE: @ @@ -185,7 +183,6 @@ rrd_update(...) OUTPUT: RETVAL - int rrd_tune(...) PROTOTYPE: @ @@ -198,7 +195,6 @@ rrd_tune(...) OUTPUT: RETVAL - SV * rrd_graph(...) PROTOTYPE: @ @@ -444,6 +440,7 @@ rrd_restore(...) OUTPUT: RETVAL +#ifndef WIN32 int rrd_flushcached(...) PROTOTYPE: @ @@ -454,3 +451,5 @@ rrd_flushcached(...) rrdcode(rrd_flushcached); OUTPUT: RETVAL + +#endif diff --git a/src/rrd.h b/src/rrd.h index 53838c0..dc99669 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -58,7 +58,9 @@ extern "C" { #include /* for off_t */ #else #ifdef _MSC_VER +#ifndef PERLPATCHLEVEL typedef int mode_t; +#endif #define strtoll _strtoi64 #endif typedef size_t ssize_t; diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index 2737144..495a313 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -63,7 +63,7 @@ * Now for some includes.. */ /* {{{ */ -#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) #include "../win32/config.h" #else #ifdef HAVE_CONFIG_H diff --git a/src/rrd_format.c b/src/rrd_format.c index 5200b33..fba9eb0 100644 --- a/src/rrd_format.c +++ b/src/rrd_format.c @@ -48,6 +48,9 @@ * *****************************************************************************/ #include "rrd_tool.h" +#ifdef WIN32 +#include "stdlib.h" +#endif #define converter(VV,VVV) \ if (strcmp(#VV, string) == 0) return VVV; diff --git a/src/rrd_getopt.c b/src/rrd_getopt.c index 5f938f3..46f7313 100644 --- a/src/rrd_getopt.c +++ b/src/rrd_getopt.c @@ -39,10 +39,11 @@ #endif #endif - +#ifndef WIN32 #ifdef HAVE_CONFIG_H #include "../rrd_config.h" #endif +#endif #include "rrd_i18n.h" diff --git a/src/rrd_getopt1.c b/src/rrd_getopt1.c index 15bd2a9..ea9ed54 100644 --- a/src/rrd_getopt1.c +++ b/src/rrd_getopt1.c @@ -28,9 +28,11 @@ #endif #endif +#ifndef WIN32 #ifdef HAVE_CONFIG_H #include "../rrd_config.h" #endif +#endif #include "rrd_getopt.h" diff --git a/src/rrd_graph.c b/src/rrd_graph.c index aa561f6..50a640a 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -91,8 +91,7 @@ xlab_t xlab[] = { , {3600, 0, TMT_DAY, 1, TMT_WEEK, 1, TMT_WEEK, 1, 7 * 24 * 3600, week_fmt} , - {3 * 3600, 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_WEEK, 2, 7 * 24 * 3600, - week_fmt} + {3 * 3600, 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_WEEK, 2, 7 * 24 * 3600, week_fmt} , {6 * 3600, 0, TMT_MONTH, 1, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600, "%b"} diff --git a/src/rrd_graph.h b/src/rrd_graph.h index 5c97b80..75a9439 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -7,10 +7,12 @@ /* this may configure __EXTENSIONS__ without which pango will fail to compile so load this early */ +#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) +#include "../win32/config.h" +#else #ifdef HAVE_CONFIG_H #include "../rrd_config.h" -#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) -#include "../win32/config.h" +#endif #endif #include diff --git a/src/rrd_tool.c b/src/rrd_tool.c index d46d195..0772b88 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -4,7 +4,7 @@ * rrd_tool.c Startup wrapper *****************************************************************************/ -#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) && !defined(HAVE_CONFIG_H) #include "../win32/config.h" #include #include diff --git a/src/rrd_tool.h b/src/rrd_tool.h index de35e46..40a4846 100644 --- a/src/rrd_tool.h +++ b/src/rrd_tool.h @@ -10,10 +10,12 @@ extern "C" { #ifndef _RRD_TOOL_H #define _RRD_TOOL_H +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) +#include "../win32/config.h" +#else #ifdef HAVE_CONFIG_H #include "../rrd_config.h" -#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__) -#include "../win32/config.h" +#endif #endif #include "rrd.h" diff --git a/win32/README b/win32/README new file mode 100755 index 0000000..612c078 --- /dev/null +++ b/win32/README @@ -0,0 +1,11 @@ +Win32 Build Instructions: + +1) Make sure that the contrib file has all the required files for RRDtool +2) Open rrd.sln from Visual Studio +3) Select the 'Release' Build Type +4) Build the Solution +5) rrdtool.exe, and rrdupdate.exe will be located in the Release directory +6) To install, copy the two binaries, along with the host of DLL files to + their permanent location +7) To build the ActiveState perl module. Follow the instructions under + the README file under 'binding/perl-shared' diff --git a/win32/config.h b/win32/config.h index 1a9a9ed..587d02e 100644 --- a/win32/config.h +++ b/win32/config.h @@ -6,6 +6,7 @@ #include #include #include +#include /* realloc does not support NULL as argument */ @@ -25,6 +26,7 @@ #define HAVE_VSNPRINTF 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 +#define HAVE_RRD_GRAPH 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 diff --git a/win32/rrd.dsp b/win32/rrd.dsp deleted file mode 100644 index a5cd6c3..0000000 --- a/win32/rrd.dsp +++ /dev/null @@ -1,247 +0,0 @@ -# Microsoft Developer Studio Project File - Name="rrd" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=rrd - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "rrd.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "rrd.mak" CFG="rrd - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "rrd - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "rrd - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "rrd - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "rrd___Wi" -# PROP BASE Intermediate_Dir "rrd___Wi" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "release" -# PROP Intermediate_Dir "release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c -# SUBTRACT CPP /X /YX -# ADD BASE RSC /l 0x100c -# ADD RSC /l 0x409 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "rrd - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "rrd___W0" -# PROP BASE Intermediate_Dir "rrd___W0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "debug" -# PROP Intermediate_Dir "debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c -# SUBTRACT CPP /X /YX -# ADD BASE RSC /l 0x100c -# ADD RSC /l 0x409 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"rrd.bsc" -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "rrd - Win32 Release" -# Name "rrd - Win32 Debug" -# Begin Source File - -SOURCE="..\src\get_ver.awk" - -!IF "$(CFG)" == "rrd - Win32 Release" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Creating ..\rrd_config.h -InputPath="..\src\get_ver.awk" - -"..\rrd_config.h" : $(SOURCE) "..\configure.ac" "..\win32\rrd_config.h.msvc" - awk -f ..\src\get_ver.awk ..\configure.ac ..\win32\rrd_config.h.msvc > ..\rrd_config.h - -# End Custom Build - -!ELSEIF "$(CFG)" == "rrd - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Creating ..\rrd_config.h -InputPath="..\src\get_ver.awk" - -"..\rrd_config.h" : $(SOURCE) "..\configure.ac" "..\win32\rrd_config.h.msvc" - awk -f ..\src\get_ver.awk ..\configure.ac ..\win32\rrd_config.h.msvc > ..\rrd_config.h - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_afm.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_afm_data.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_create.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_diff.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_dump.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_error.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_fetch.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_first.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_format.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_gfx.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_graph.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_graph_helper.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_hw.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_info.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_last.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_lastupdate.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_nan_inf.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_open.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_resize.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_restore.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_rpncalc.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_thread_safe_nt.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_tune.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_update.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_version.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_xport.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_getopt.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_getopt1.c -# End Source File -# Begin Source File - -SOURCE=..\src\art_rgba_svp.c -# End Source File -# Begin Source File - -SOURCE=..\src\hash_32.c -# End Source File -# Begin Source File - -SOURCE=..\src\rrd_parsetime.c -# End Source File -# Begin Source File - -SOURCE=..\src\pngsize.c -# End Source File -# Begin Source File - -SOURCE=..\src\strftime.c -# End Source File -# End Target -# End Project diff --git a/win32/rrd.sln b/win32/rrd.sln index 16ff6c1..59660f7 100644 --- a/win32/rrd.sln +++ b/win32/rrd.sln @@ -1,39 +1,52 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdlib", "rrdlib.vcproj", "{CC158E1D-1364-43CA-9B2D-4AF54225C7CA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdtool", "rrdtool.vcproj", "{11CD05F8-E5E1-476E-A75F-A112655D4E94}" - ProjectSection(ProjectDependencies) = postProject - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA} = {CC158E1D-1364-43CA-9B2D-4AF54225C7CA} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - DebugDLL|Win32 = DebugDLL|Win32 - Release|Win32 = Release|Win32 - Static Debug|Win32 = Static Debug|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.Build.0 = Debug|Win32 - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.ActiveCfg = Release|Win32 - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.Build.0 = Release|Win32 - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 - {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.Build.0 = Static Debug|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.ActiveCfg = Debug|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.Build.0 = Debug|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.DebugDLL|Win32.ActiveCfg = Debug|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.DebugDLL|Win32.Build.0 = Debug|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.ActiveCfg = Release|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.Build.0 = Release|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 - {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.Build.0 = Static Debug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdlib", "rrdlib.vcproj", "{CC158E1D-1364-43CA-9B2D-4AF54225C7CA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdtool", "rrdtool.vcproj", "{11CD05F8-E5E1-476E-A75F-A112655D4E94}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdupdate", "rrdupdate.vcproj", "{3AAE1E07-78D7-420D-968B-D2087D732D3B}" + ProjectSection(ProjectDependencies) = postProject + {11CD05F8-E5E1-476E-A75F-A112655D4E94} = {11CD05F8-E5E1-476E-A75F-A112655D4E94} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + DebugDLL|Win32 = DebugDLL|Win32 + Release|Win32 = Release|Win32 + ReleaseDLL|Win32 = ReleaseDLL|Win32 + Static Debug|Win32 = Static Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Debug|Win32.Build.0 = Debug|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.ActiveCfg = Release|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Release|Win32.Build.0 = Release|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 + {CC158E1D-1364-43CA-9B2D-4AF54225C7CA}.Static Debug|Win32.Build.0 = Static Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.ActiveCfg = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.Build.0 = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.DebugDLL|Win32.ActiveCfg = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.ActiveCfg = Release|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.Build.0 = Release|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.ReleaseDLL|Win32.ActiveCfg = Release|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Static Debug|Win32.Build.0 = Static Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.Build.0 = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.DebugDLL|Win32.ActiveCfg = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.ActiveCfg = Release|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.Build.0 = Release|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.ReleaseDLL|Win32.ActiveCfg = Release|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Static Debug|Win32.Build.0 = Static Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/rrd.vcproj b/win32/rrd.vcproj deleted file mode 100644 index 8afaf81..0000000 --- a/win32/rrd.vcproj +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/rrd_config.h.msvc b/win32/rrd_config.h.msvc deleted file mode 100644 index 7855b2d..0000000 --- a/win32/rrd_config.h.msvc +++ /dev/null @@ -1,60 +0,0 @@ -/* config.h.msvc. Hand-tweaked config.h for MSVC compiler. */ -#ifndef CONFIG_H -#define CONFIG_H - -#include -#include -#include -#include - -/* realloc does not support NULL as argument */ - -#define HAVE_STRFTIME 1 -#define HAVE_TIME_H 1 -#define HAVE_LOCALE_H 1 -#define HAVE_TZSET 1 -#define HAVE_SETLOCALE 1 -#define HAVE_MATH_H 1 -#define HAVE_FLOAT_H 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MALLOC_H 1 -#define HAVE_MKTIME 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRING_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -#define NUMVERS 1.4030 -#define PACKAGE_NAME "rrdtool" -#define PACKAGE_VERSION "1.4.3" -#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION - -#define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF) -#define isnan _isnan -#define finite _finite -#define snprintf _snprintf -//#define vsnprintf _vsnprintf -//#define strftime strftime_ - -#define NO_NULL_REALLOC 1 -#if NO_NULL_REALLOC -# define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) )) -#else -# define rrd_realloc(a,b) realloc((a), (b)) -#endif - -/* Vertical label angle: 90.0 (default) or 270.0 */ -#define RRDGRAPH_YLEGEND_ANGLE 90.0 - -#define RRD_DEFAULT_FONT "Courier" - -/* #define DEBUG 1 */ - -__inline int round(double a){int x = (a + 0.5); return x;} - -#endif /* CONFIG_H */ diff --git a/win32/rrdlib.vcproj b/win32/rrdlib.vcproj index 0f334cf..bf53b39 100644 --- a/win32/rrdlib.vcproj +++ b/win32/rrdlib.vcproj @@ -1,532 +1,613 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/rrdtool.dsp b/win32/rrdtool.dsp deleted file mode 100644 index 1a192fe..0000000 --- a/win32/rrdtool.dsp +++ /dev/null @@ -1,92 +0,0 @@ -# Microsoft Developer Studio Project File - Name="rrdtool" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=rrdtool - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "rrdtool.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "rrdtool.mak" CFG="rrdtool - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "rrdtool - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "rrdtool - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "rrdtool - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "rrdtool_" -# PROP BASE Intermediate_Dir "rrdtool_" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "toolrelease" -# PROP Intermediate_Dir "toolrelease" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x100c /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 libpng.lib zlib.lib libart.lib freetype231MT.lib kernel32.lib user32.lib /nologo /subsystem:console /incremental:yes /debug /machine:I386 /libpath:"../../libpng-1.2.16/projects/visualc6/Win32_LIB_Release" /libpath:"../../zlib-1.2.3" /libpath:"../../libart_lgpl-2.3.17/win32/release" /libpath:"../../freetype-2.3.1/objs" - -!ELSEIF "$(CFG)" == "rrdtool - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "rrdtool0" -# PROP BASE Intermediate_Dir "rrdtool0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "tooldebug" -# PROP Intermediate_Dir "tooldebug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "../src" /I "../../zlib-1.2.3" /I "../../libpng-1.2.16" /I "../../libart_lgpl-2.3.17" /I "../../freetype-2.3.1/include" /D "HAVE_CONFIG_H" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x100c /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"rrdtool.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 libpng.lib zlib.lib libart.lib freetype231MT.lib kernel32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../libpng-1.2.16/projects/visualc6/Win32_LIB_Release" /libpath:"../../zlib-1.2.3" /libpath:"../../libart_lgpl-2.3.17/win32/release" /libpath:"../../freetype-2.3.1/objs" - -!ENDIF - -# Begin Target - -# Name "rrdtool - Win32 Release" -# Name "rrdtool - Win32 Debug" -# Begin Source File - -SOURCE=..\src\rrd_tool.c -# End Source File -# End Target -# End Project diff --git a/win32/rrdtool.dsw b/win32/rrdtool.dsw deleted file mode 100644 index 07103ba..0000000 --- a/win32/rrdtool.dsw +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "rrd"=".\rrd.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "rrdtool"=".\rrdtool.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name rrd - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/win32/rrdtool.sln b/win32/rrdtool.sln new file mode 100755 index 0000000..3212f22 --- /dev/null +++ b/win32/rrdtool.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdtool", "rrdtool.vcproj", "{11CD05F8-E5E1-476E-A75F-A112655D4E94}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.ActiveCfg = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Debug|Win32.Build.0 = Debug|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.ActiveCfg = Release|Win32 + {11CD05F8-E5E1-476E-A75F-A112655D4E94}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/rrdtool.vcproj b/win32/rrdtool.vcproj index 7139414..e434a4a 100644 --- a/win32/rrdtool.vcproj +++ b/win32/rrdtool.vcproj @@ -1,291 +1,292 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win32/rrdupdate.sln b/win32/rrdupdate.sln new file mode 100755 index 0000000..af71e46 --- /dev/null +++ b/win32/rrdupdate.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrdupdate", "rrdupdate.vcproj", "{3AAE1E07-78D7-420D-968B-D2087D732D3B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Debug|Win32.Build.0 = Debug|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.ActiveCfg = Release|Win32 + {3AAE1E07-78D7-420D-968B-D2087D732D3B}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win32/rrdupdate.vcproj b/win32/rrdupdate.vcproj new file mode 100755 index 0000000..1e505b6 --- /dev/null +++ b/win32/rrdupdate.vcproj @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.11.0