Overview
| Comment: | Windows fixups |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
b25d0baadecd89974ebae7cd26dc3418 |
| User & Date: | rkeene on 2014-05-02 06:41:22.498 |
| Other Links: | manifest | tags |
Context
|
2014-05-02
| ||
| 07:08 | Experimenting with compiling libtcc1.a with gcc check-in: 8a389f5b8d user: rkeene tags: trunk | |
| 06:41 | Windows fixups check-in: b25d0baade user: rkeene tags: trunk | |
| 06:29 | Added more cross-compiling support check-in: ea645d2a50 user: rkeene tags: trunk | |
Changes
Modified build/tcc-patches/0.9.26/tcc-0.9.26-tclio.diff
from [e6c607249f]
to [8fe78dd24b].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | diff -uNr tcc-0.9.26.orig/libtcc.c tcc-0.9.26-1tclio/libtcc.c --- tcc-0.9.26.orig/libtcc.c 2013-02-15 08:24:00.000000000 -0600 |
| ︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + |
+ 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.h tcc-0.9.26-1tclio/tcc.h
--- tcc-0.9.26.orig/tcc.h 2013-02-15 08:24:00.000000000 -0600
|
| ︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + | -ST_FUNC int pe_load_file(struct TCCState *s1, const char *filename, int fd); +ST_FUNC int pe_load_file(struct TCCState *s1, const char *filename, Tcl_Channel fd); ST_FUNC int pe_output_file(TCCState * s1, const char *filename); ST_FUNC int pe_putimport(TCCState *s1, int dllindex, const char *name, addr_t value); ST_FUNC SValue *pe_getimport(SValue *sv, SValue *v2); diff -uNr tcc-0.9.26.orig/tcccoff.c tcc-0.9.26-1tclio/tcccoff.c --- tcc-0.9.26.orig/tcccoff.c 2013-02-15 08:24:00.000000000 -0600 |
| ︙ | |||
184 185 186 187 188 189 190 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | - + |
+
+ f = fdopen(native_fd, "rb");
if (!f) {
tcc_error("Unable to open .out file for input");
}
diff -uNr tcc-0.9.26.orig/tccelf.c tcc-0.9.26-1tclio/tccelf.c
--- tcc-0.9.26.orig/tccelf.c 2013-02-15 08:24:00.000000000 -0600
|
| ︙ | |||
319 320 321 322 323 324 325 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - + |
- read(fd, &ehdr, sizeof(ehdr));
+ Tcl_Read(fd, (char *) &ehdr, sizeof(ehdr));
/* test CPU specific stuff */
if (ehdr.e_ident[5] != ELFDATA2LSB ||
diff -uNr tcc-0.9.26.orig/tccpe.c tcc-0.9.26-1tclio/tccpe.c
--- tcc-0.9.26.orig/tccpe.c 2013-02-15 08:24:00.000000000 -0600
|
| ︙ | |||
386 387 388 389 390 391 392 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - + |
-ST_FUNC int pe_load_file(struct TCCState *s1, const char *filename, int fd)
+ST_FUNC int pe_load_file(struct TCCState *s1, const char *filename, Tcl_Channel fd)
{
int ret = -1;
char buf[10];
diff -uNr tcc-0.9.26.orig/tccpp.c tcc-0.9.26-1tclio/tccpp.c
--- tcc-0.9.26.orig/tccpp.c 2013-02-15 08:24:00.000000000 -0600
|
| ︙ | |||
412 413 414 415 416 417 418 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | + + + + + + + + + + + + |
}
- if (tcc_open(s1, buf1) < 0)
+ if (tcc_open(s1, buf1) == NULL)
include_trynext:
continue;
diff -uNr tcc-0.9.26.orig/win32/tools/tiny_impdef.c tcc-0.9.26-1tclio/win32/tools/tiny_impdef.c
--- tcc-0.9.26.orig/win32/tools/tiny_impdef.c 2013-02-15 08:24:00.000000000 -0600
+++ tcc-0.9.26-1tclio/win32/tools/tiny_impdef.c 2014-05-02 01:31:28.497140003 -0500
@@ -161,7 +161,7 @@
/* -------------------------------------------------------------- */
#endif
-char *get_export_names(int fd)
+char *get_export_names(Tcl_Channel fd)
{
int l, i, n, n0;
char *p;
|
Modified tcltcc.c
from [bdb10e54ff]
to [373fc5958a].
| ︙ | |||
206 207 208 209 210 211 212 | 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - - - - |
Tcl_AppendResult(interp, "code already relocated, cannot output to file", NULL);
return TCL_ERROR;
}
if (s->output_type == TCC_OUTPUT_MEMORY) {
Tcl_AppendResult(interp, "output_type memory not valid for output to file", NULL);
return TCL_ERROR;
}
|
| ︙ |