From 8cb9661bb4befb4bcd4fc8a23ed0e2c3821126e7 Mon Sep 17 00:00:00 2001 From: oetiker Date: Wed, 18 May 2005 20:20:55 +0000 Subject: [PATCH] make tcl compile again ... don't know if it will work though git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@581 a5681a0c-68f1-0310-ab6d-d61299d08faa --- bindings/tcl/Makefile.am | 6 +++--- bindings/tcl/tclrrd.c | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bindings/tcl/Makefile.am b/bindings/tcl/Makefile.am index 872890e..9606d6d 100644 --- a/bindings/tcl/Makefile.am +++ b/bindings/tcl/Makefile.am @@ -15,16 +15,16 @@ GD_LIB_DIR = $(top_srcdir)/@GD_LIB_DIR@ SRC_DIR = $(top_srcdir)/src AM_CPPFLAGS = -I$(TCL_PREFIX)/include -I$(SRC_DIR) -I$(GD_LIB_DIR) -LIBDIRS = -L$(libdir) -L$(SRC_DIR) -L../src/.libs +LIBDIRS = -L$(libdir) -L$(SRC_DIR) -L../../src/.libs LIB_RUNTIME_DIR = $(libdir) if BUILD_TCL tclrrd$(TCL_SHLIB_SUFFIX): tclrrd.o - $(TCL_SHLIB_LD) $(LIBDIRS) $< -o $@ -lrrd_private -lm + $(TCL_SHLIB_LD) $(LIBDIRS) $< -o $@ -lrrd tclrrd.o: tclrrd.c - $(CC) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(INCLUDES) -c $< -DVERSION=\"$(VERSION)\" + $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(INCLUDES) -c $< -DVERSION=\"$(VERSION)\" all-local: tclrrd$(TCL_SHLIB_SUFFIX) diff --git a/bindings/tcl/tclrrd.c b/bindings/tcl/tclrrd.c index 3cc1711..92616de 100644 --- a/bindings/tcl/tclrrd.c +++ b/bindings/tcl/tclrrd.c @@ -23,8 +23,7 @@ extern int __getopt_initialized; /* * some rrd_XXX() functions might modify the argv strings passed to it. - * Furthermore, they use getopt() without initializing getopt's optind - * variable themselves. Hence, we need to do some preparation before + * Hence, we need to do some preparation before * calling the rrd library functions. */ static char ** getopt_init(argc, argv) @@ -34,8 +33,6 @@ static char ** getopt_init(argc, argv) char **argv2; int i; - optind = 0; - argv2 = calloc(argc, sizeof(char *)); for (i = 0; i < argc; i++) { argv2[i] = strdup(argv[i]); -- 2.30.2