aboutsummaryrefslogtreecommitdiff
path: root/tcccoff.c
diff options
context:
space:
mode:
authormingodad <mingodad@gmail.com>2013-01-11 00:04:38 +0000
committermingodad <mingodad@gmail.com>2013-01-11 00:04:38 +0000
commit59e18aee0e509a3ca75dbe6f909e18c1d17893d1 (patch)
tree1ee20b231505273a1b1ba678b67c6c9e5812a414 /tcccoff.c
parent0a8c7d143eb0dcae15db9b61feb7b93228645d5f (diff)
downloadtinycc-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 'tcccoff.c')
-rw-r--r--tcccoff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcccoff.c b/tcccoff.c
index 2f52562..76262a1 100644
--- a/tcccoff.c
+++ b/tcccoff.c
@@ -858,7 +858,7 @@ Section *FindSection(TCCState * s1, const char *sname)
return 0;
}
-ST_FUNC int tcc_load_coff(TCCState * s1, int fd)
+ST_FUNC int tcc_load_coff(TCCState * s1, vio_fd fd)
{
// tktk TokenSym *ts;
@@ -870,7 +870,7 @@ ST_FUNC int tcc_load_coff(TCCState * s1, int fd)
char name2[9];
FILHDR file_hdr; /* FILE HEADER STRUCTURE */
- f = fdopen(fd, "rb");
+ f = fdopen(fd.fd, "rb");
if (!f) {
tcc_error("Unable to open .out file for input");
}