Check-in [273c2a2e9a]
Overview
Comment:Updated to use actual call to Tcl_InitStubs()
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:273c2a2e9a9c5c3f57b7a9f313dedab93720dbb4
User & Date: rkeene on 2014-06-21 18:06:47
Other Links: manifest | tags
Context
2014-06-21
18:10
Updated to remove warnings from cdefs.h (Mac OS X) check-in: f9d0cb87bf user: rkeene tags: trunk
18:06
Updated to use actual call to Tcl_InitStubs() check-in: 273c2a2e9a user: rkeene tags: trunk
17:38
Updated to use correct Tcl version when initializing stubs check-in: 0ca36ca558 user: rkeene tags: trunk
Changes

Modified Makefile.in from [bf12e46800] to [21664f4410].

    25     25   PACKAGE_INSTALL_DIR = $(tcllibdir)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
    26     26   TCC_CONFIGURE_OPTS = --cc='$(CC)' --extra-cflags='$(CPPFLAGS) $(CFLAGS) @TCC_EXTRA_CFLAGS@' --with-tcl=$(TCLCONFIGPATH) --sysincludepaths='{B}/include@HOST_PATH_SEPARATOR@{B}/include/1@HOST_PATH_SEPARATOR@{B}/include/2@HOST_PATH_SEPARATOR@{B}/include/3@HOST_PATH_SEPARATOR@{B}/include/4@HOST_PATH_SEPARATOR@{B}/include/5@HOST_PATH_SEPARATOR@{B}/include/6@HOST_PATH_SEPARATOR@{B}/include/7@HOST_PATH_SEPARATOR@{B}/include/8@HOST_PATH_SEPARATOR@{B}/include/9' --libpaths='{B}/lib' @TCC_CONFIGURE_OPTS@
    27     27   INSTALL_HEADERS = tcl.h assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h time.h wctype.h
    28     28   srcdir = @srcdir@
    29     29   host_os = @host_os@
    30     30   @SET_MAKE@
    31     31   
    32         -all: $(TARGET)
           32  +all: $(TARGET) tcc/libtcc1.a
    33     33   
    34     34   tcc/config.h:
    35     35   	if [ "$(srcdir)" = "." ]; then \
    36     36   		cd tcc && ./configure $(TCC_CONFIGURE_OPTS); \
    37     37   	else \
    38     38   		mkdir tcc >/dev/null 2>/dev/null; \
    39     39   		cd tcc && $(shell cd $(srcdir) && pwd)/tcc/configure $(TCC_CONFIGURE_OPTS); \
    40     40   	fi
    41     41   
    42     42   tcc/libtcc.a: tcc/config.h
    43     43   	$(MAKE) -C tcc libtcc.a
    44     44   
    45     45   tcc/libtcc1.a: tcc/config.h
    46         -	-$(MAKE) -C tcc tcc
           46  +	-if [ '@build@' = '@host@' ]; then $(MAKE) -C tcc tcc; fi
    47     47   	$(MAKE) -C tcc libtcc1.a
    48     48   
    49     49   tcc4tcl.o: $(srcdir)/tcc4tcl.c $(srcdir)/tcc/tcc.h $(srcdir)/tcc/libtcc.h tcc/config.h
    50     50   	$(CC) $(CPPFLAGS) $(CFLAGS) -o tcc4tcl.o -c $(srcdir)/tcc4tcl.c
    51     51   
    52     52   tcc4tcl.@SHOBJEXT@: tcc4tcl.o tcc/libtcc.a
    53     53   	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o tcc4tcl.@SHOBJEXT@ tcc4tcl.o tcc/libtcc.a $(LIBS)

Modified build/tcc-patches/0.9.26/tcc-0.9.26-tclio.diff from [996011b1b2] to [f43d5e63db].

    93     93   +    size = Tcl_Read(fd, (char *)&ehdr, sizeof(ehdr));
    94     94   +    Tcl_Seek(fd, 0, SEEK_SET);
    95     95        if (size <= 0) {
    96     96            tcc_error_noabort("could not read header");
    97     97            goto the_end;
    98     98   diff -uNr tcc-0.9.26.orig/tcc.c tcc-0.9.26-1tclio/tcc.c
    99     99   --- tcc-0.9.26.orig/tcc.c	2013-02-15 08:24:00.000000000 -0600
   100         -+++ tcc-0.9.26-1tclio/tcc.c	2014-06-21 12:37:45.060011999 -0500
   101         -@@ -18,6 +18,10 @@
          100  ++++ tcc-0.9.26-1tclio/tcc.c	2014-06-21 13:05:54.330011999 -0500
          101  +@@ -18,6 +18,7 @@
   102    102     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   103    103     */
   104    104    
   105         -+#ifdef USE_TCL_STUBS
   106         -+#define LIBTCC_USE_TCL_STUBS
   107         -+#undef USE_TCL_STUBS
   108    105   +#endif
   109    106    #ifdef ONE_SOURCE
   110    107    #include "libtcc.c"
   111    108    #else
   112         -@@ -248,7 +252,16 @@
          109  +@@ -248,7 +249,18 @@
   113    110        int64_t start_time = 0;
   114    111        const char *first_file = NULL;
   115    112    
   116    113   -    s = tcc_new();
   117         -+#ifdef LIBTCC_USE_TCL_STUBS
          114  ++#ifdef USE_TCL_STUBS
          115  ++#undef Tcl_CreateInterp
          116  ++#undef Tcl_InitStubs
   118    117   +    Tcl_Interp *interp;
   119    118   +
   120    119   +    interp = Tcl_CreateInterp();
   121    120   +    if (interp != NULL) {
   122    121   +        Tcl_InitStubs(interp, TCL_VERSION, 0);
   123    122   +    }
   124    123   +#endif