summaryrefslogtreecommitdiff
path: root/graphics/s10sh
diff options
context:
space:
mode:
authorjoerg <joerg>2015-02-23 18:24:00 +0000
committerjoerg <joerg>2015-02-23 18:24:00 +0000
commit82b441308d24c7613a980dd06aa68f4ef10aad13 (patch)
treecd5d3c3889371e5dc235013e8a12c6fc15390d29 /graphics/s10sh
parentc747dd7fafb88f9c211b64b33887a1ecbd3336b3 (diff)
downloadpkgsrc-82b441308d24c7613a980dd06aa68f4ef10aad13.tar.gz
Don't hard code endian lists. Fix format strings.
Diffstat (limited to 'graphics/s10sh')
-rw-r--r--graphics/s10sh/distinfo6
-rw-r--r--graphics/s10sh/patches/patch-ac34
-rw-r--r--graphics/s10sh/patches/patch-common.c37
-rw-r--r--graphics/s10sh/patches/patch-main.c13
4 files changed, 75 insertions, 15 deletions
diff --git a/graphics/s10sh/distinfo b/graphics/s10sh/distinfo
index 0326812fc97..408226146e0 100644
--- a/graphics/s10sh/distinfo
+++ b/graphics/s10sh/distinfo
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.8 2005/02/24 08:45:13 agc Exp $
+$NetBSD: distinfo,v 1.9 2015/02/23 18:24:00 joerg Exp $
SHA1 (s10sh-0.2.0.tar.gz) = a8ada7c84ff64be98a1195612d48e2042f293eba
RMD160 (s10sh-0.2.0.tar.gz) = 2b0ef13958bde03b2e9056bc023e3dd0c84747b4
Size (s10sh-0.2.0.tar.gz) = 172203 bytes
SHA1 (patch-aa) = 1708337ee44567e66e227903e0ae15101670ed31
SHA1 (patch-ab) = 83e20d2bbda9de83a3db5a5990f6cc7f1fb1a18c
-SHA1 (patch-ac) = ad1b07a2062c53807df905edb14416f0ed701134
+SHA1 (patch-ac) = eb83c59a8d3c80048e23cc5b631f62dd8ca482ee
SHA1 (patch-ad) = 6e4164e2040508253075d5f482a527de9ff33d61
SHA1 (patch-ae) = f22ee8feef8a8d99c91ecbdfc5dfd7e1751788b9
+SHA1 (patch-common.c) = ba22cf896aa9826c925c56829485a77d5df453c3
+SHA1 (patch-main.c) = 668f78b4528a4ad37d3c9780709f97c4688480d0
diff --git a/graphics/s10sh/patches/patch-ac b/graphics/s10sh/patches/patch-ac
index 9a37f0be7e1..d1a5544d737 100644
--- a/graphics/s10sh/patches/patch-ac
+++ b/graphics/s10sh/patches/patch-ac
@@ -1,21 +1,29 @@
-$NetBSD: patch-ac,v 1.2 2004/02/25 20:29:50 drochner Exp $
+$NetBSD: patch-ac,v 1.3 2015/02/23 18:24:00 joerg Exp $
---- bytesex.h.orig 2001-03-13 14:46:18.000000000 +0100
-+++ bytesex.h 2004-02-25 21:18:34.000000000 +0100
-@@ -3,7 +3,7 @@
+--- bytesex.h.orig 2001-03-13 13:46:18.000000000 +0000
++++ bytesex.h
+@@ -3,18 +3,15 @@
#ifndef S10SH_BYTESEX_H
#define S10SH_BYTESEX_H
-#if defined(__i386__) \
-+#if defined(__i386__) || defined(__amd64__) \
- || defined(__alpha__) \
- || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+- || defined(__alpha__) \
+- || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
++#include <sys/endian.h>
++
++#if defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN)
#define BYTE_ORDER_LITTLE_ENDIAN
-@@ -11,6 +11,7 @@
- || defined (__sparc__) \
- || defined (__sparc) \
- || defined (__PPC__) \
-+ || defined (__powerpc__) \
- || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
+-#elif defined(__mc68000__) \
+- || defined (__sparc__) \
+- || defined (__sparc) \
+- || defined (__PPC__) \
+- || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
++#elif defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == _LITTLE_ENDIAN)
++#elif defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && (__BYTE_ORDER == _BIG_ENDIAN)
#define BYTE_ORDER_BIG_ENDIAN
#else
+-# error can not find the byte order for this architecture, fix bytesex.h
++#error can not find the byte order for this architecture, fix bytesex.h
+ #endif
+
+ #endif /* S10SH_BYTESEX_H */
diff --git a/graphics/s10sh/patches/patch-common.c b/graphics/s10sh/patches/patch-common.c
new file mode 100644
index 00000000000..5fd3eb30236
--- /dev/null
+++ b/graphics/s10sh/patches/patch-common.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-common.c,v 1.1 2015/02/23 18:24:00 joerg Exp $
+
+--- common.c.orig 2015-02-23 13:32:08.000000000 +0000
++++ common.c
+@@ -57,7 +57,7 @@ void dump_hex(const char *msg, const uns
+ fprintf(stderr,"%s: (%d bytes)\n", msg, len);
+ while (len > 0)
+ {
+- sprintf(line, "%08x: ", buf - start);
++ sprintf(line, "%08zx: ", (size_t)(buf - start));
+ out = line + 10;
+
+ for (i = 0, pc = buf, nlocal = len; i < 16; i++, pc++)
+@@ -423,8 +423,8 @@ int camera_get_image(char *pathname, cha
+ timestamp = time(NULL) - timestamp;
+ if (!timestamp)
+ timestamp = 1;
+- printf("\nDownloaded in %ld seconds, %ld bytes/s\n",
+- timestamp, len/timestamp);
++ printf("\nDownloaded in %lld seconds, %lld bytes/s\n",
++ (long long)timestamp, (long long)(len/timestamp));
+
+ imagedate = get_date_for_image (orig_pathname);
+
+@@ -530,9 +530,9 @@ int camera_get_thumb(char *pathname, cha
+ timestamp = time(NULL) - timestamp;
+ if (!timestamp)
+ timestamp = 1;
+- printf("Downloaded in %ld seconds,"
+- " %ld bytes/s\n",
+- timestamp, len/timestamp);
++ printf("Downloaded in %lld seconds,"
++ " %lld bytes/s\n",
++ (long long)timestamp, (long long)(len/timestamp));
+ free(image);
+ }
+ return 0;
diff --git a/graphics/s10sh/patches/patch-main.c b/graphics/s10sh/patches/patch-main.c
new file mode 100644
index 00000000000..015fe3149f5
--- /dev/null
+++ b/graphics/s10sh/patches/patch-main.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-main.c,v 1.1 2015/02/23 18:24:00 joerg Exp $
+
+--- main.c.orig 2015-02-23 13:30:37.000000000 +0000
++++ main.c
+@@ -150,7 +150,7 @@ int main(int argc, char **argv)
+ strncpy(command, p, 1024);
+ free(p);
+ #else
+- printf(prompt);
++ printf("%s", prompt);
+ if (fgets(command, 1024, stdin) == NULL)
+ continue;
+ command[1023] = '\0';