Check-in [cd9acf4116]
Overview
Comment:Updated to initialize stubs in Tcl if they are in use
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cd9acf4116094f45ba2cc4c13fa6748f2d3ba87d
User & Date: rkeene on 2014-06-21 05:20:28
Other Links: manifest | tags
Context
2014-06-21
05:23
Updated to use fully qualified path names for headers to be included check-in: 34edc27785 user: rkeene tags: trunk
05:20
Updated to initialize stubs in Tcl if they are in use check-in: cd9acf4116 user: rkeene tags: trunk
05:06
Updated to do a "distclean" in TCC upon clean check-in: ed19d6d085 user: rkeene tags: trunk
Changes

Modified build/tcc-patches/0.9.26/tcc-0.9.26-tclio.diff from [714434e0ff] to [9fa4659f91].

93
94
95
96
97
98
99
100











101
102
103
104
105









106
107
108
109
110
111
112
+    size = Tcl_Read(fd, (char *)&ehdr, sizeof(ehdr));
+    Tcl_Seek(fd, 0, SEEK_SET);
     if (size <= 0) {
         tcc_error_noabort("could not read header");
         goto the_end;
diff -uNr tcc-0.9.26.orig/tcc.c tcc-0.9.26-1tclio/tcc.c
--- tcc-0.9.26.orig/tcc.c	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1tclio/tcc.c	2014-06-21 00:04:24.170011999 -0500











@@ -248,7 +248,7 @@
     int64_t start_time = 0;
     const char *first_file = NULL;
 
-    s = tcc_new();









+    s = tcc_new(NULL);
     s->output_type = TCC_OUTPUT_EXE;
 
     optind = tcc_parse_args(s, argc - 1, argv + 1);
diff -uNr tcc-0.9.26.orig/tcc.h tcc-0.9.26-1tclio/tcc.h
--- tcc-0.9.26.orig/tcc.h	2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1tclio/tcc.h	2014-05-02 01:30:08.967140003 -0500







|
>
>
>
>
>
>
>
>
>
>
>
|




>
>
>
>
>
>
>
>
>







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