diff options
| author | mingodad <mingodad@gmail.com> | 2013-01-11 00:04:38 +0000 |
|---|---|---|
| committer | mingodad <mingodad@gmail.com> | 2013-01-11 00:04:38 +0000 |
| commit | 59e18aee0e509a3ca75dbe6f909e18c1d17893d1 (patch) | |
| tree | 1ee20b231505273a1b1ba678b67c6c9e5812a414 /tccpe.c | |
| parent | 0a8c7d143eb0dcae15db9b61feb7b93228645d5f (diff) | |
| download | tinycc-59e18aee0e509a3ca75dbe6f909e18c1d17893d1.tar.gz tinycc-59e18aee0e509a3ca75dbe6f909e18c1d17893d1.tar.bz2 | |
Added what I call virtual io to tinycc this way we can make a monolitic executable or library that contains all needed to compile programs, truly tinycc portable.
Tested under linux exec the "mk-it" shell script and you'll end up with a portable tinycc executable that doesn't depend on anything else.
Diffstat (limited to 'tccpe.c')
| -rw-r--r-- | tccpe.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1638,9 +1638,9 @@ static int pe_load_dll(TCCState *s1, const char *dllname, FILE *fp) } /* ------------------------------------------------------------- */ -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, vio_fd fd) { - FILE *fp = fdopen(dup(fd), "rb"); + FILE *fp = fdopen(dup(fd.fd), "rb"); int ret = -1; char buf[10]; if (fp) { |
