diff options
author | nathanw <nathanw@pkgsrc.org> | 1999-02-05 07:38:14 +0000 |
---|---|---|
committer | nathanw <nathanw@pkgsrc.org> | 1999-02-05 07:38:14 +0000 |
commit | d230a89bd3ecc0f2c0b91976013a58d161d35393 (patch) | |
tree | 70593a0eebc365a7884f67d8bd435dbc4c5c5f4d /emulators/xcopilot/patches | |
parent | 2f728b6fc4725310ad965c75b48c0177d68adc70 (diff) | |
download | pkgsrc-d230a89bd3ecc0f2c0b91976013a58d161d35393.tar.gz |
Initial import of XCopilot package, a PalmPilot (tm) emulator.
Diffstat (limited to 'emulators/xcopilot/patches')
-rw-r--r-- | emulators/xcopilot/patches/patch-aa | 13 | ||||
-rw-r--r-- | emulators/xcopilot/patches/patch-ab | 13 | ||||
-rw-r--r-- | emulators/xcopilot/patches/patch-ac | 74 |
3 files changed, 100 insertions, 0 deletions
diff --git a/emulators/xcopilot/patches/patch-aa b/emulators/xcopilot/patches/patch-aa new file mode 100644 index 00000000000..2462dd36084 --- /dev/null +++ b/emulators/xcopilot/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD: patch-aa,v 1.1.1.1 1999/02/05 07:38:15 nathanw Exp $ + +--- Makefile.in.orig Wed Feb 3 11:22:56 1999 ++++ Makefile.in Wed Feb 3 11:27:24 1999 +@@ -93,7 +93,7 @@ + xcopilot_DEPENDENCIES = mc68k/libmc68k.a mx/libmx.a + xcopilot_LDFLAGS = + CFLAGS = @CFLAGS@ +-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) ++COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(X_CFLAGS) $(CFLAGS) + LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + man1dir = $(mandir)/man1 + MANS = $(man_MANS) diff --git a/emulators/xcopilot/patches/patch-ab b/emulators/xcopilot/patches/patch-ab new file mode 100644 index 00000000000..623bc455bd4 --- /dev/null +++ b/emulators/xcopilot/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1.1.1 1999/02/05 07:38:15 nathanw Exp $ + +--- mx/Makefile.in.orig Wed Feb 3 11:27:46 1999 ++++ mx/Makefile.in Wed Feb 3 11:27:07 1999 +@@ -102,7 +102,7 @@ + test_filesel_DEPENDENCIES = libmx.a + test_filesel_LDFLAGS = + CFLAGS = @CFLAGS@ +-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) ++COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(X_CFLAGS) $(CFLAGS) + LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + DIST_COMMON = Makefile.am Makefile.in + diff --git a/emulators/xcopilot/patches/patch-ac b/emulators/xcopilot/patches/patch-ac new file mode 100644 index 00000000000..ac3f560abe4 --- /dev/null +++ b/emulators/xcopilot/patches/patch-ac @@ -0,0 +1,74 @@ +$NetBSD: patch-ac,v 1.1.1.1 1999/02/05 07:38:15 nathanw Exp $ + +--- mc68k/memory.c.orig Wed Feb 3 14:11:09 1999 ++++ mc68k/memory.c Fri Feb 5 01:28:39 1999 +@@ -377,6 +377,7 @@ + int i; + char *rombuf; + char *resetv; ++ void *tmpmemory; + int f; + struct stat st; + +@@ -405,12 +406,24 @@ + rom_size = pow_of_2; + } + +- rommemory = (UWORD*)mmap(0, rom_size, PROT_READ|PROT_WRITE, +- MAP_FILE|MAP_PRIVATE, f, 0); +- if (rommemory == (UWORD *)-1) { ++ /* mmap'ing a larger region than the underlying object does not work. ++ * Instead, mmap the actual object and copy into a power-of-two sized ++ * buffer. ++ */ ++ tmpmemory = mmap(0, st.st_size, PROT_READ|PROT_WRITE, ++ MAP_FILE|MAP_PRIVATE, f, 0); ++ if (tmpmemory == (void *)-1) { + return PILOTCPU_ERROR_LOADING_ROM; + } +- ++ ++ /* We want the end of the buffer to be zero-filled */ ++ rommemory = (UWORD *) calloc(1, rom_size); ++ if (rommemory == 0) { ++ return PILOTCPU_ERROR_LOADING_ROM; ++ } ++ memcpy(rommemory, tmpmemory, st.st_size); ++ munmap(tmpmemory, st.st_size); ++ + if (!nocheck) { + /* Check if the reset vector looks plausible */ + resetv = (char *)rommemory + +@@ -430,23 +443,15 @@ + offset = resetv - find_entrypoint((char *)rommemory); + } + +- /* Did we find it? If not, lets go with the original. */ +- if ((char *)offset != resetv) { +- /* It may not always be page aligned... */ +- pageoffset = ((offset-1) & ~(getpagesize() - 1)) + getpagesize(); +- +- if ((st.st_size + offset) > rom_size) +- rom_size <<= 1; +- +- rommemory = (UWORD *)mmap((void*)(rommemory + pageoffset), +- rom_size - pageoffset, +- PROT_READ | PROT_WRITE, +- MAP_FILE | MAP_PRIVATE | MAP_FIXED, f, 0); +- if (rommemory == (UWORD *)-1) +- return PILOTCPU_ERROR_LOADING_ROM; +- +- memcpy(((char *)rommemory) - offset, rommemory, 256); +- ((char *)rommemory) -= offset; ++ if (offset != 0) { ++ if ((st.st_size + offset) > rom_size) { ++ rom_size <<= 1; ++ rommemory = realloc(rommemory, rom_size); ++ if (rommemory == 0) ++ return PILOTCPU_ERROR_LOADING_ROM; ++ } ++ ++ memmove((char *)rommemory + offset, rommemory, st.st_size); + } + } + } |