summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a80d0f7)
raw | patch | inline | side by side (parent: a80d0f7)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 15 Jan 2006 09:03:30 +0000 (09:03 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 15 Jan 2006 09:03:30 +0000 (09:03 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@744 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/Makefile.NetWare | patch | blob | history | |
src/Makefile.Win32 | patch | blob | history | |
src/rrd_tool.h | patch | blob | history |
diff --git a/src/Makefile.NetWare b/src/Makefile.NetWare
index c01e73d1ec8e17cf8c0b9945b183ed600e5b52ca..0b90973c7a7f8daca4780f170b58a92c6231a92b 100644 (file)
--- a/src/Makefile.NetWare
+++ b/src/Makefile.NetWare
-# Gnu Makefile for NetWare target * 04-Jan-2006
+# Gnu Makefile for NetWare target * 14-Jan-2006
# for use with gcc/nlmconv or Metrowerks CodeWarrior compiler
# use with: make -f Makefile.NetWare [all|clean|dist] [BINEXT=cgi]
# Comment the line below if you dont want to load protected automatically.
#LDRING = 3
+# Set the default font used in graphs.
+RRD_DEFAULT_FONT = "arial.ttf"
+
# Vertical label angle: 90.0 (default) or 270.0
RRDGRAPH_YLEGEND_ANGLE = 90.0
LIBBASE = ../..
endif
# All library code is statically linked to avoid problems with other lib NLMs.
-# Edit the path below to point to your libgd sources or set environment var.
-ifndef LIBGD
-LIBGD = $(LIBBASE)/gd-2.0.33
-endif
# Edit the path below to point to your libpng sources or set environment var.
ifndef LIBPNG
LIBPNG = $(LIBBASE)/libpng-1.2.8
LIBCGI = $(LIBBASE)/cgilib-0.5
endif
+# whatever...
+# NO_NULL_REALLOC = 1
+
# Edit the var below to point to your lib architecture.
ifndef LIBARCH
# LIBARCH = CLIB
SDK_CLIB = $(NDK_ROOT)/nwsdk
SDK_LIBC = $(NDK_ROOT)/libc
-INCLUDES = -I. -I$(LIBGD) -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK)
+INCLUDES = -I. -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK)
ifeq ($(BINEXT),cgi)
INCLUDES += -I$(LIBCGI)
endif
CFLAGS += $(INCLUDES)
-vpath %.c . $(LIBGD) $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK) $(LIBCGI)
+vpath %.c . $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK) $(LIBCGI)
RRDLIBOBJS = \
$(OBJDIR)/rrd_afm.o \
$(OBJDIR)/pngsize.o \
$(EOLIST)
-GD2LIBOBJS = \
- $(OBJDIR)/gd.o \
- $(OBJDIR)/gd_io.o \
- $(OBJDIR)/gd_io_dp.o \
- $(OBJDIR)/gd_io_file.o \
- $(OBJDIR)/gd_io_ss.o \
- $(OBJDIR)/gd_png.o \
- $(OBJDIR)/gd_ss.o \
- $(OBJDIR)/gdcache.o \
- $(OBJDIR)/gdfonts.o \
- $(OBJDIR)/gdhelpers.o \
- $(OBJDIR)/gdtables.o \
- $(EOLIST)
-
PNGLIBOBJS = \
$(OBJDIR)/png.o \
$(OBJDIR)/pngerror.o \
ARTLIBOBJS = \
$(patsubst $(LIBART)/libart_lgpl/%.c,$(OBJDIR)/%.o,$(wildcard $(LIBART)/libart_lgpl/art_*.c))
-OBJS = $(RRDLIBOBJS) $(XLIBOBJS) $(GD2LIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)
+OBJS = $(RRDLIBOBJS) $(XLIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)
ifeq ($(BINEXT),cgi)
OBJS += $(CGIOBJS) $(OBJDIR)/rrd_cgi.o
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
@echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
@echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
+ifdef NO_NULL_REALLOC
+ @echo $(DL)#define NO_NULL_REALLOC 1$(DL) >> $@
+ @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@
+else
@echo $(DL)#define rrd_realloc(a,b) realloc((a), (b))$(DL) >> $@
-# @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@
+endif
@echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@
- @echo $(DL)#define RRD_DEFAULT_FONT "arial.ttf"$(DL) >> $@
+ @echo $(DL)#define RRD_DEFAULT_FONT $(RRD_DEFAULT_FONT)$(DL) >> $@
+
+$(OBJDIR)/readme.txt: Makefile.NetWare
+ @echo Creating $@
+ @echo $(DL)This is a binary distribution for NetWare platform.$(DL) > $@
+ @echo $(DL)MRTG rrdtool version $(RRD_VERSION_STR)$(DL) >> $@
+ @echo $(DL)Please download the complete RRD package for$(DL) >> $@
+ @echo $(DL)any further documentation:$(DL) >> $@
+ @echo $(DL)http://www.rrdtool.org/$(DL) >> $@
diff --git a/src/Makefile.Win32 b/src/Makefile.Win32
index 04e40373d2a905ca70df2fbc0698d90e031c2f17..7d1908a1365ab1cd38f7062f3eeacaabb7a530ca 100644 (file)
--- a/src/Makefile.Win32
+++ b/src/Makefile.Win32
-# Gnu Makefile for Win32 target * 04-Jan-2006\r
+# Gnu Makefile for Win32 target * 14-Jan-2006\r
# for use with MingW32 gcc or Metrowerks CodeWarrior compiler\r
# use with: make -f Makefile.Win32 [all|clean|dist] [BINEXT=cgi]\r
\r
WWWURL = http://www.rrdtool.org/\r
ICON = ../favicon.ico\r
\r
+# Set the default font used in graphs.\r
+RRD_DEFAULT_FONT = "arial.ttf"\r
+\r
# Vertical label angle: 90.0 (default) or 270.0\r
RRDGRAPH_YLEGEND_ANGLE = 90.0\r
\r
ifndef LIBBASE\r
LIBBASE = ../..\r
endif\r
-# All library code is statically linked to avoid problems with other lib NLMs. \r
-# Edit the path below to point to your libgd sources or set environment var.\r
-ifndef LIBGD\r
-LIBGD = $(LIBBASE)/gd-2.0.15\r
-endif\r
+# All library code is statically linked to avoid problems with other lib DLLs. \r
# Edit the path below to point to your libpng sources or set environment var.\r
ifndef LIBPNG\r
LIBPNG = $(LIBBASE)/libpng-1.2.8\r
LIBCGI = $(LIBBASE)/cgilib-0.5\r
endif\r
\r
+# whatever...\r
+NO_NULL_REALLOC = 1\r
+\r
# The following line defines your compiler.\r
ifdef METROWERKS\r
CC = mwcc\r
LDLIBS += -lkernel32.lib -luser32.lib\r
LDLIBS += -lMSL_Runtime_x86.lib -lMSL_C_x86.lib -lMSL_Extras_x86.lib\r
RCFLAGS =\r
-CFLAGS += -gccinc -msgstyle gcc -inline off -opt nointrinsics -inst mmx -proc 586\r
+CFLAGS += -nostdinc -gccinc -msgstyle gcc -inline off -opt nointrinsics -proc 586\r
CFLAGS += -ir "$(METROWERKS)/MSL" -ir "$(METROWERKS)/Win32-x86 Support"\r
-#CFLAGS += -w on,nounused,nounusedexpr # -ansi strict\r
+CFLAGS += -w on,nounused,nounusedexpr # -ansi strict\r
else\r
LD = gcc\r
RC = windres\r
endif\r
DESCR += - $(CC) build\r
\r
-INCLUDES += -I. -I$(LIBGD) -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK)\r
+INCLUDES += -I. -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK)\r
ifeq ($(BINEXT),cgi)\r
INCLUDES += -I$(LIBCGI)\r
endif\r
\r
CFLAGS += $(INCLUDES)\r
\r
-vpath %.c . $(LIBGD) $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK) $(LIBCGI)\r
+vpath %.c . $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK) $(LIBCGI)\r
\r
RRDLIBOBJS = \\r
$(OBJDIR)/rrd_afm.o \\r
$(OBJDIR)/rrd_update.o \\r
$(OBJDIR)/rrd_version.o \\r
$(OBJDIR)/rrd_xport.o \\r
- $(OBJDIR)/rrd_not_thread_safe.o \\r
+ $(OBJDIR)/rrd_thread_safe_nt.o \\r
$(EOLIST)\r
\r
XLIBOBJS = \\r
$(OBJDIR)/strftime.o \\r
$(EOLIST)\r
\r
-GD2LIBOBJS = \\r
- $(OBJDIR)/gd.o \\r
- $(OBJDIR)/gd_io.o \\r
- $(OBJDIR)/gd_io_dp.o \\r
- $(OBJDIR)/gd_io_file.o \\r
- $(OBJDIR)/gd_io_ss.o \\r
- $(OBJDIR)/gd_png.o \\r
- $(OBJDIR)/gd_ss.o \\r
- $(OBJDIR)/gdcache.o \\r
- $(OBJDIR)/gdfonts.o \\r
- $(OBJDIR)/gdhelpers.o \\r
- $(OBJDIR)/gdtables.o \\r
- $(EOLIST)\r
-\r
PNGLIBOBJS = \\r
$(OBJDIR)/png.o \\r
$(OBJDIR)/pngerror.o \\r
ARTLIBOBJS = \\r
$(patsubst $(LIBART)/libart_lgpl/%.c,$(OBJDIR)/%.o,$(wildcard $(LIBART)/libart_lgpl/art_*.c))\r
\r
-OBJS = $(RRDLIBOBJS) $(XLIBOBJS) $(GD2LIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)\r
+OBJS = $(RRDLIBOBJS) $(XLIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)\r
\r
ifeq ($(BINEXT),cgi)\r
OBJS += $(CGIOBJS) $(OBJDIR)/rrd_cgi.o\r
@echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@\r
@echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@\r
@echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@\r
+# @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@\r
@echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@\r
@echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@\r
@echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@\r
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@\r
@echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@\r
@echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@\r
+ifdef NO_NULL_REALLOC\r
+ @echo $(DL)#define NO_NULL_REALLOC 1$(DL) >> $@\r
+ @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@\r
+else\r
@echo $(DL)#define rrd_realloc(a,b) realloc((a), (b))$(DL) >> $@\r
+endif\r
@echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@\r
- @echo $(DL)#define RRD_DEFAULT_FONT "arial.ttf"$(DL) >> $@\r
+ @echo $(DL)#define RRD_DEFAULT_FONT $(RRD_DEFAULT_FONT)$(DL) >> $@\r
+ @echo $(DL)#define strftime strftime_$(DL) >> $@\r
+\r
+$(OBJDIR)/readme.txt: Makefile.Win32\r
+ @echo Creating $@\r
+ @echo $(DL)This is a binary distribution for Win32 platform.$(DL) > $@\r
+ @echo $(DL)MRTG rrdtool version $(RRD_VERSION_STR)$(DL) >> $@\r
+ @echo $(DL)Please download the complete RRD package for$(DL) >> $@\r
+ @echo $(DL)any further documentation:$(DL) >> $@\r
+ @echo $(DL)http://www.rrdtool.org/$(DL) >> $@\r
\r
\r
diff --git a/src/rrd_tool.h b/src/rrd_tool.h
index 350183b07524d959a5f3eb776637c072a82ba1c6..01cf62157543d554f880031d7223bce855a7c7f5 100644 (file)
--- a/src/rrd_tool.h
+++ b/src/rrd_tool.h
#include <float.h> /* for _isnan */
#include <io.h> /* for chdir */
-#ifdef __MINGW32__
-#define localtime_r(a,b) localtime(a)
-#define ctime_r(a,b) ctime(a)
-#define gmtime_r(a,b) gmtime(a)
-#define strtok_r(a,b,c) strtok(a,b)
-#else
+
+#ifndef __MINGW32__
#define isnan _isnan
#define finite _finite
#define isinf(a) (_fpclass(a) == _FPCLASS_NINF || _fpclass(a) == _FPCLASS_PINF)
+#endif
struct tm* localtime_r(const time_t *timep, struct tm* result);
char* ctime_r(const time_t *timep, char* result);
struct tm* gmtime_r(const time_t *timep, struct tm* result);
char *strtok_r(char *str, const char *sep, char **last);
-#endif
#else