diff -urN unzip-5.51/eota.c unzip-5.51-eota/eota.c --- unzip-5.51/eota.c 1970-01-01 00:00:00.000000000 +0000 +++ unzip-5.51-eota/eota.c 2004-07-14 22:58:35.000000000 +0000 @@ -0,0 +1,7 @@ +int lstat(const char *file_name, struct stat *buf) +{ + return stat(file_name, buf); +} + +int symlink() { return -1; } +void tzset(void) {} diff -urN unzip-5.51/fileio.c unzip-5.51-eota/fileio.c --- unzip-5.51/fileio.c 2004-05-23 01:01:20.000000000 +0000 +++ unzip-5.51-eota/fileio.c 2004-07-14 22:59:34.000000000 +0000 @@ -1755,7 +1755,9 @@ /* tzset was already called at start of process_zipfiles() */ /* tzset(); */ /* set `timezone' variable */ #ifndef __BEOS__ /* BeOS DR8 has no timezones... */ +#ifndef EOTA m_time += timezone; /* seconds WEST of GMT: add */ +#endif /* not EOTA */ #endif #endif /* ?(BSD || MTS || __GO32__) */ #endif /* ?WIN32 */ diff -urN unzip-5.51/ttyio.c unzip-5.51-eota/ttyio.c --- unzip-5.51/ttyio.c 2001-02-12 23:18:22.000000000 +0000 +++ unzip-5.51-eota/ttyio.c 2004-07-14 23:05:09.000000000 +0000 @@ -111,6 +111,11 @@ /* int ioctl OF((int, int, zvoid *)); GRR: may need for some systems */ #endif +#ifdef EOTA +#undef HAVE_TERMIO_H +#undef HAVE_SYS_TERMIO_H +#endif /* not EOTA */ + #ifndef HAVE_WORKING_GETCH /* include system support for switching of console echo */ # ifdef VMS @@ -302,12 +307,14 @@ __GDEF int f; /* file descriptor for which to turn echo off */ { +#ifndef EOTA struct sgttyb sg; /* tty device structure */ GLOBAL(echofd) = f; GTTY(f, &sg); /* get settings */ sg.sg_flags &= ~ECHO; /* turn echo off */ STTY(f, &sg); +#endif /* not EOTA */ } /* @@ -316,6 +323,7 @@ void Echon(__G) __GDEF { +#ifndef EOTA struct sgttyb sg; /* tty device structure */ if (GLOBAL(echofd) != -1) { @@ -324,6 +332,7 @@ STTY(GLOBAL(echofd), &sg); GLOBAL(echofd) = -1; } +#endif /* not EOTA */ } #endif /* !CMS_MVS */ @@ -343,6 +352,24 @@ * line-wrapping. */ +int screensize(tt_rows, tt_cols) + int *tt_rows; + int *tt_cols; +{ + struct winsize { + unsigned short int ws_row; + unsigned short int ws_col; + unsigned short int ws_xpixel; + unsigned short int ws_ypixel; + } ws; + + get_winsz(1, &ws); + *tt_rows = ws.ws_row; + *tt_cols = ws.ws_col; + return 0; +} + +#ifndef EOTA #if (defined(TIOCGWINSZ) && !defined(M_UNIX)) int screensize(tt_rows, tt_cols) @@ -426,7 +453,7 @@ #endif /* ?(TIOCGWINSZ && !M_UNIX) */ #endif /* MORE */ - +#endif /* not EOTA */ /* * Get a character from the given file descriptor without echo or newline. @@ -435,6 +462,7 @@ __GDEF int f; /* file descriptor from which to read */ { +#ifndef EOTA #if (defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS)) char oldmin, oldtim; #endif @@ -469,6 +497,9 @@ GLOBAL(echofd) = -1; return (int)(uch)c; +#endif /* not EOTA */ + return 0; + } diff -urN unzip-5.51/unix/Makefile unzip-5.51-eota/unix/Makefile --- unzip-5.51/unix/Makefile 2004-03-01 17:37:24.000000000 +0000 +++ unzip-5.51-eota/unix/Makefile 2004-07-14 23:32:33.000000000 +0000 @@ -42,21 +42,32 @@ # such as -DDOSWILD). # UnZip flags + +ROOT = $(HOME)/EOTA/eota/kernel +NEWLIB = $(HOME)/EOTA/libc/newlib-1.8.1/eota/newlib +LIBS = $(NEWLIB)/crt0.o $(NEWLIB)/libc.a +KERNLIBS = $(ROOT)/POSIX/libc/libgt.a $(ROOT)/POSIX/libc/libnative.a +STARTADDR = 0x00001000 +ENTRY = _start +CFLAGS = -I$(NEWLIB)/targ-include -I$(NEWLIB)/libc/include -DEOTA +LDFLAGS = -Bstatic -e ${ENTRY} -Ttext=$(STARTADDR) + CC = cc# try using "gcc" target rather than changing this (CC and LD -LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) +## LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) +LD = ld AS = as LOC = $(LOCAL_UNZIP) AF = $(LOC) -CF = -O -I. -DUNIX $(LOC) -LF = -o unzip +CF = -O -I. -DUNIX $(LOC) $(CFLAGS) +LF = -o unzip $(LDFLAGS) LF2 = -s # UnZipSFX flags -SL = -o unzipsfx +SL = -o unzipsfx $(LDFLAGS) SL2 = $(LF2) # fUnZip flags -FL = -o funzip +FL = -o funzip $(LDFLAGS) FL2 = $(LF2) # general-purpose stuff @@ -84,13 +95,13 @@ OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O -OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O eota$O LOBJS = $(OBJS) OBJSDLL = $(OBJS:.o=.pic.o) api.pic.o OBJX = unzipsfx$O $(CRC32)$O crctab_$O crypt_$O extract_$O fileio_$O \ - globals_$O inflate_$O match_$O process_$O ttyio_$O $M_$O + globals_$O inflate_$O match_$O process_$O ttyio_$O $M_$O eota$O LOBJX = $(OBJX) -OBJF = funzip$O $(CRC32)$O cryptf$O globalsf$O inflatef$O ttyiof$O +OBJF = funzip$O $(CRC32)$O cryptf$O globalsf$O inflatef$O ttyiof$O eota$O #OBJS_OS2 = $(OBJS1:.o=.obj) $(OBJS2:.o=.obj) os2.obj #OBJF_OS2 = $(OBJF:.o=.obj) UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H) @@ -265,13 +276,13 @@ # make utilities if default: change "unzip$E:" to "unzip$E:&" unzip$E: $(OBJS) # add `&' for parallel makes - $(LD) $(LF) $(LOBJS) $(LF2) + $(LD) $(LF) $(LOBJS) $(LF2) $(LIBS) $(KERNLIBS) unzipsfx$E: $(OBJX) # add `&' for parallel makes - $(LD) $(SL) $(LOBJX) $(SL2) + $(LD) $(SL) $(LOBJX) $(SL2) $(LIBS) $(KERNLIBS) funzip$E: $(OBJF) # add `&' for parallel makes - $(LD) $(FL) $(OBJF) $(FL2) + $(LD) $(FL) $(OBJF) $(FL2) $(LIBS) $(KERNLIBS) zipinfo$E: unzip$E # `&' is pointless here... @echo\