Check-in [9ad4b6efea]
Overview
Comment:Fixed Tcl I/O to be binary
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9ad4b6efea8c04827d1a6e4ad179a4bb59864598
User & Date: rkeene on 2014-05-22 16:59:26
Other Links: manifest | tags
Context
2014-05-22
16:59
Corrected path seperator on Windows check-in: a6d7a98041 user: rkeene tags: trunk
16:59
Fixed Tcl I/O to be binary check-in: 9ad4b6efea user: rkeene tags: trunk
05:12
tcc4tcl 0.13 check-in: bdab5f40e3 user: rkeene tags: trunk, 0.13
Changes

Modified build/tcc-patches/0.9.26/tcc-0.9.26-tclio.diff from [8fe78dd24b] to [3b7b96df23].

     1      1   diff -uNr tcc-0.9.26.orig/libtcc.c tcc-0.9.26-1tclio/libtcc.c
     2      2   --- tcc-0.9.26.orig/libtcc.c	2013-02-15 08:24:00.000000000 -0600
     3         -+++ tcc-0.9.26-1tclio/libtcc.c	2014-05-02 01:30:08.967140003 -0500
            3  ++++ tcc-0.9.26-1tclio/libtcc.c	2014-05-22 11:58:28.746517000 -0500
     4      4   @@ -669,7 +669,7 @@
     5      5        bf->line_num = 1;
     6      6        bf->ifndef_macro = 0;
     7      7        bf->ifdef_stack_ptr = s1->ifdef_stack_ptr;
     8      8   -    bf->fd = -1;
     9      9   +    bf->fd = NULL;
    10     10        bf->prev = file;
................................................................................
    39     39   +
    40     40   +    if (strcmp(filename, "-") == 0) {
    41     41   +        fd = Tcl_GetStdChannel(TCL_STDIN);
    42     42   +        filename = "stdin";
    43     43   +    } else {
    44     44   +        path = Tcl_NewStringObj(filename,-1);
    45     45   +        Tcl_IncrRefCount(path);
    46         -+        fd = Tcl_FSOpenFileChannel(NULL,path, "r", 0);
           46  ++        fd = Tcl_FSOpenFileChannel(NULL,path, "RDONLY BINARY", 0);
    47     47   +        Tcl_DecrRefCount(path);
    48     48   +    }
    49     49   +
    50     50   +    if ((s1->verbose == 2 && fd != NULL) || s1->verbose == 3)
    51     51   +        printf("%s %*s%s\n", fd == NULL ? "nf":"->",
    52     52                   (int)(s1->include_stack_ptr - s1->include_stack), "", filename);
    53     53   -    if (fd < 0)