summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authoragc <agc>2002-11-19 20:54:20 +0000
committeragc <agc>2002-11-19 20:54:20 +0000
commit95c692c4317325c9d4493a9dd6c58786632fd2c3 (patch)
tree3ea1197cd48b174686683ff1abaaa69915d4206a /emulators
parent031d20e37132d0b3a6c3b802ce0b2ffa39aead04 (diff)
downloadpkgsrc-95c692c4317325c9d4493a9dd6c58786632fd2c3.tar.gz
Fix from Christian Biere in PR 18811 to remove the -malign-double
configuration parameter which was causing problems with the stat(2) structure.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/generator/distinfo5
-rw-r--r--emulators/generator/patches/patch-ab74
-rw-r--r--emulators/generator/patches/patch-ac21
-rw-r--r--emulators/generator/patches/patch-ad20
4 files changed, 44 insertions, 76 deletions
diff --git a/emulators/generator/distinfo b/emulators/generator/distinfo
index f6db6a363bf..24b06086e4e 100644
--- a/emulators/generator/distinfo
+++ b/emulators/generator/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2002/05/09 22:16:52 agc Exp $
+$NetBSD: distinfo,v 1.3 2002/11/19 20:54:20 agc Exp $
SHA1 (generator-0.34.tar.gz) = abf57875c60f63c9ffb97894f4ce9c638f60054f
Size (generator-0.34.tar.gz) = 442852 bytes
SHA1 (patch-aa) = 0878709485d884c1e4956b5ac4659024e31ef3ac
-SHA1 (patch-ab) = 4c03632abd9a02cc2a616c2de7601223886334e4
+SHA1 (patch-ac) = 418547b9c791824822a8eac3b1964dccb5ba39ce
+SHA1 (patch-ad) = c6e79f872595a427a08c34d802f19495c6985022
diff --git a/emulators/generator/patches/patch-ab b/emulators/generator/patches/patch-ab
deleted file mode 100644
index 4ae874110d4..00000000000
--- a/emulators/generator/patches/patch-ab
+++ /dev/null
@@ -1,74 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2002/05/09 22:16:53 agc Exp $
-
---- main/generator.c 2002/05/09 21:34:29 1.1
-+++ main/generator.c 2002/05/09 21:34:34
-@@ -3,9 +3,9 @@
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
--#include <sys/stat.h>
- #include <unistd.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <fcntl.h>
- #include <ctype.h>
- #include <signal.h>
-@@ -147,7 +147,7 @@
- char *gen_loadimage(const char *filename)
- {
- int file, imagetype, bytes, bytesleft;
-- struct stat statbuf;
-+ off_t filesize;
- const char *extension;
- uint8 *buffer;
- unsigned int blocks, x, i;
-@@ -162,20 +162,6 @@
- }
-
- /* Load file */
-- if (stat(filename, &statbuf) != 0)
-- return ("Unable to stat file.");
-- cpu68k_romlen = statbuf.st_size;
-- if (cpu68k_romlen < 0x200)
-- return ("File is too small");
--
-- /* allocate enough memory plus 16 bytes for disassembler to cope
-- with the last instruction */
-- if ((cpu68k_rom = malloc(cpu68k_romlen + 16)) == NULL) {
-- cpu68k_romlen = 0;
-- return ("Out of memory!");
-- }
-- gen_freerom = 1;
-- memset(cpu68k_rom, 0, cpu68k_romlen + 16);
- #ifdef ALLEGRO
- if ((file = open(filename, O_RDONLY | O_BINARY, 0)) == -1) {
- #else
-@@ -186,6 +172,28 @@
- cpu68k_romlen = 0;
- return ("Unable to open file.");
- }
-+ if ( (filesize = lseek(file, 0, SEEK_END)) == -1 || // get size
-+ lseek(file, 0, SEEK_SET) == -1) // then seek to start
-+ {
-+ perror ("lseek failed");
-+ close (file);
-+ return ("Error accessing file");
-+ }
-+
-+ cpu68k_romlen = filesize;
-+ if (cpu68k_romlen < 0x200) {
-+ (void) close(file);
-+ return ("File is too small");
-+ }
-+
-+ /* allocate enough memory plus 16 bytes for disassembler to cope
-+ with the last instruction */
-+ if ((cpu68k_rom = malloc(cpu68k_romlen + 16)) == NULL) {
-+ cpu68k_romlen = 0;
-+ return ("Out of memory!");
-+ }
-+ gen_freerom = 1;
-+ memset(cpu68k_rom, 0, cpu68k_romlen + 16);
- buffer = cpu68k_rom;
- bytesleft = cpu68k_romlen;
- do {
diff --git a/emulators/generator/patches/patch-ac b/emulators/generator/patches/patch-ac
new file mode 100644
index 00000000000..da77458717f
--- /dev/null
+++ b/emulators/generator/patches/patch-ac
@@ -0,0 +1,21 @@
+$NetBSD: patch-ac,v 1.1 2002/11/19 20:54:21 agc Exp $
+
+Remove -malign-double from configuration options - causes problems in
+at least the stat structure - from Christian Biere
+
+--- configure 2002/11/19 20:37:03 1.1
++++ configure 2002/11/19 20:37:35
+@@ -1581,13 +1581,6 @@
+ echo "${ECHO_T}Turning on gcc 3 optimisations" >&6
+ CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno"
+ fi
+- case $target_cpu in
+- i?86) echo "$as_me:1585: result: Turning on pentium optimisations" >&5
+-echo "${ECHO_T}Turning on pentium optimisations" >&6
+- CFLAGS="$CFLAGS -march=pentium -malign-double -malign-loops=5"
+- CFLAGS="$CFLAGS -malign-jumps=5 -malign-functions=5"
+- ;;
+- esac
+ else
+ { echo "$as_me:1592: WARNING: You did not opt for gcc optimisations!" >&5
+ echo "$as_me: WARNING: You did not opt for gcc optimisations!" >&2;}
diff --git a/emulators/generator/patches/patch-ad b/emulators/generator/patches/patch-ad
new file mode 100644
index 00000000000..a653910472a
--- /dev/null
+++ b/emulators/generator/patches/patch-ad
@@ -0,0 +1,20 @@
+$NetBSD: patch-ad,v 1.1 2002/11/19 20:54:21 agc Exp $
+
+Remove -malign-double from configuration options - causes problems in
+at least the stat structure - from Christian Biere
+
+--- configure.in 2002/11/19 20:37:03 1.1
++++ configure.in 2002/11/19 20:37:57
+@@ -123,12 +123,6 @@
+ AC_MSG_RESULT(Turning on gcc 3 optimisations)
+ CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno"
+ fi
+- case $target_cpu in
+- i?86) AC_MSG_RESULT(Turning on pentium optimisations)
+- CFLAGS="$CFLAGS -march=pentium -malign-double -malign-loops=5"
+- CFLAGS="$CFLAGS -malign-jumps=5 -malign-functions=5"
+- ;;
+- esac
+ else
+ AC_MSG_WARN(You did not opt for gcc optimisations!)
+ optimum=no