From c47bbeca17b665a5f60a1c328be0590a148ea5e8 Mon Sep 17 00:00:00 2001 From: jake Date: Tue, 14 May 2002 21:52:58 +0000 Subject: [PATCH] Fix Win32 Build compatibility. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@140 a5681a0c-68f1-0310-ab6d-d61299d08faa --- NT-BUILD-TIPS.txt | 6 +++++- confignt/config.h | 3 +++ libraries/libart_lgpl-2.3.7/libart.dsp | 32 +++++++++++++++++++++++++++++++- src/rrd.dsp | 14 +++++++++++++- src/rrd_tool.c | 4 ++++ src/rrdtool.dsp | 2 +- 6 files changed, 57 insertions(+), 4 deletions(-) diff --git a/NT-BUILD-TIPS.txt b/NT-BUILD-TIPS.txt index d163d3f..9c35d44 100644 --- a/NT-BUILD-TIPS.txt +++ b/NT-BUILD-TIPS.txt @@ -1,6 +1,6 @@ Compiling RRDtool 1.1.x on Win32 (WinXP/Win2K with Visual C++): --------------------------------------------------------------- -4/1/02 Jake Brutlag (jakeb@corp.webtv.net) +5/14/02 Jake Brutlag (jakeb@corp.webtv.net) These notes share some insight I gained compiling 1.1.x with MS Visual C++ 6.0 (using project files). This information may or @@ -19,6 +19,10 @@ configure script-- but of course not on Win32 platforms). ..\..\confignt the include path. (4) Fonts are located in the %windir%\fonts, so the default font is c:\winnt\fonts\cour.ttf. +(5) libart requires a custom build step to generate art_config.h; this +is done manually via the commands: +cl -I..\..\confignt gen_art_config.c +gen_art_config.exe > art_config.h Currently, to compile rrd.lib and rrdtool.exe using the MSVC++ project files, first start MSVC++ 6.0. Open the rrdtool diff --git a/confignt/config.h b/confignt/config.h index 261f0e6..4e4c37c 100644 --- a/confignt/config.h +++ b/confignt/config.h @@ -8,6 +8,9 @@ /* Define if you have the header file. */ #define HAVE_MATH_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 + #define rrd_realloc(a,b) realloc((a), (b)) #define snprintf _snprintf diff --git a/libraries/libart_lgpl-2.3.7/libart.dsp b/libraries/libart_lgpl-2.3.7/libart.dsp index 2ba7fb3..14633f1 100644 --- a/libraries/libart_lgpl-2.3.7/libart.dsp +++ b/libraries/libart_lgpl-2.3.7/libart.dsp @@ -42,7 +42,6 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c # ADD CPP /nologo /W3 /GX /I "..\..\confignt" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "LIBART_COMPILATION" /YX /FD /c -# SUBTRACT CPP /O # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -238,6 +237,37 @@ SOURCE=.\art_vpath_svp.c # End Source File # Begin Source File +SOURCE=.\gen_art_config.c + +!IF "$(CFG)" == "libart - Win32 Release" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build +InputPath=.\gen_art_config.c + +"art_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + cl -I..\..\confignt gen_art_config.c + gen_art_config.exe > art_config.h + +# End Custom Build + +!ELSEIF "$(CFG)" == "libart - Win32 Debug" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build +InputPath=.\gen_art_config.c + +"art_config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + cl -I..\..\confignt gen_art_config.c + gen_art_config.exe > art_config.h + +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + SOURCE=".\libart-features.c" # End Source File # End Group diff --git a/src/rrd.dsp b/src/rrd.dsp index afb073d..c0a8ab3 100644 --- a/src/rrd.dsp +++ b/src/rrd.dsp @@ -42,7 +42,7 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /W3 /GX /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c -# SUBTRACT CPP /O /X /YX +# SUBTRACT CPP /X /YX # ADD BASE RSC /l 0x100c # ADD RSC /l 0x100c BSC32=bscmake.exe @@ -104,6 +104,14 @@ SOURCE=.\pngsize.c # End Source File # Begin Source File +SOURCE=.\rrd_afm.c +# End Source File +# Begin Source File + +SOURCE=.\rrd_afm_data.c +# End Source File +# Begin Source File + SOURCE=.\rrd_create.c # End Source File # Begin Source File @@ -174,5 +182,9 @@ SOURCE=.\rrd_tune.c SOURCE=.\rrd_update.c # End Source File +# Begin Source File + +SOURCE=.\rrd_xport.c +# End Source File # End Target # End Project diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 7296526..c424355 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -362,9 +362,13 @@ int main(int argc, char *argv[]) int HandleInputLine(int argc, char **argv, FILE* out) { +#if defined(HAVE_OPENDIR) && defined (HAVE_READDIR) DIR *curdir; /* to read current dir with ls */ struct dirent *dent; +#endif +#if defined(HAVE_SYS_STAT_H) struct stat st; +#endif optind=0; /* reset gnu getopt */ opterr=0; /* no error messages */ diff --git a/src/rrdtool.dsp b/src/rrdtool.dsp index d3bb360..b64e04f 100644 --- a/src/rrdtool.dsp +++ b/src/rrdtool.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c -# SUBTRACT CPP /O /YX +# SUBTRACT CPP /YX # ADD BASE RSC /l 0x100c /d "NDEBUG" # ADD RSC /l 0x100c /d "NDEBUG" BSC32=bscmake.exe -- 2.11.0