From: jake Date: Tue, 14 May 2002 21:52:58 +0000 (+0000) Subject: Fix Win32 Build compatibility. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ddfbc70ba3d4b06f5835924929cbac1861cd085f;p=rrdtool-all.git Fix Win32 Build compatibility. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@140 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/NT-BUILD-TIPS.txt b/program/NT-BUILD-TIPS.txt index d163d3f1..9c35d449 100644 --- a/program/NT-BUILD-TIPS.txt +++ b/program/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/program/confignt/config.h b/program/confignt/config.h index 261f0e61..4e4c37c7 100644 --- a/program/confignt/config.h +++ b/program/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/program/libraries/libart_lgpl-2.3.7/libart.dsp b/program/libraries/libart_lgpl-2.3.7/libart.dsp index 2ba7fb3f..14633f1b 100644 --- a/program/libraries/libart_lgpl-2.3.7/libart.dsp +++ b/program/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/program/src/rrd.dsp b/program/src/rrd.dsp index afb073d1..c0a8ab30 100644 --- a/program/src/rrd.dsp +++ b/program/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/program/src/rrd_tool.c b/program/src/rrd_tool.c index 72965260..c4243557 100644 --- a/program/src/rrd_tool.c +++ b/program/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/program/src/rrdtool.dsp b/program/src/rrdtool.dsp index d3bb3603..b64e04f6 100644 --- a/program/src/rrdtool.dsp +++ b/program/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