From: oetiker Date: Wed, 18 May 2005 20:20:55 +0000 (+0000) Subject: make tcl compile again ... don't know if it will work though X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=632d5ceac4c3afb2bb906f4ae443aa2f761dec21;p=rrdtool-all.git make tcl compile again ... don't know if it will work though git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@581 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/bindings/tcl/Makefile.am b/program/bindings/tcl/Makefile.am index 872890ea..9606d6dd 100644 --- a/program/bindings/tcl/Makefile.am +++ b/program/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/program/bindings/tcl/tclrrd.c b/program/bindings/tcl/tclrrd.c index 3cc17115..92616de2 100644 --- a/program/bindings/tcl/tclrrd.c +++ b/program/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]);