Package: vic
Version: N/A; reported 2001-10-10

The following patch should allow the software to build on ia64.

I make no guarantees as to whether the software runs properly, because
there are over 1200(!) warnings in the build log even with this patch.

The package also requires a config.sub/guess update.

diff -Naur vic-2.8ucl1.1.3.orig/vic/codec/encoder-jpeg.cpp 
vic-2.8ucl1.1.3/vic/codec/encoder-jpeg.cpp
--- vic-2.8ucl1.1.3.orig/vic/codec/encoder-jpeg.cpp     Fri Nov  5 06:36:07 1999
+++ vic-2.8ucl1.1.3/vic/codec/encoder-jpeg.cpp  Wed Oct 10 14:23:18 2001
@@ -138,8 +138,8 @@
     int flush(pktbuf* pb, int nbit, pktbuf* npb);
     int encode(const VideoFrame*);
     void encode_blk(const short* blk, short* dcpred,
-                   struct JpegEncoder::huffentry* dcht,
-                   struct JpegEncoder::huffentry* acht);
+                   const struct JpegEncoder::huffentry* dcht,
+                   const struct JpegEncoder::huffentry* acht);
     void encode_mcu(u_int mcu, const u_char* frm);
     void fdct(const u_char* in, int stride, short* out, const float* qt);
 
@@ -162,6 +162,11 @@
     u_int nmcu_;
     u_char w_;                 /* divided by 8 */
     u_char h_;
+
+    static const struct JpegEncoder::huffentry JpegEncoder::ldht[];
+    static const struct JpegEncoder::huffentry JpegEncoder::cdht[];
+    static const struct JpegEncoder::huffentry JpegEncoder::laht[];
+    static const struct JpegEncoder::huffentry JpegEncoder::caht[];
 };
 
 static class JpegEncoderMatcher : public Matcher {
@@ -194,15 +199,33 @@
     99, 99, 99, 99, 99, 99, 99, 99,
     99, 99, 99, 99, 99, 99, 99, 99 };
 
-static struct JpegEncoder::huffentry ldht[] = {
+static const char ss[] = {
+    0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
+    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+    6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+    6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 };
+
+ const struct JpegEncoder::huffentry JpegEncoder::ldht[] = {
     {0x0, 2}, {0x2, 3}, {0x3, 3}, {0x4, 3}, {0x5, 3}, {0x6, 3},
     {0xe, 4}, {0x1e, 5}, {0x3e, 6}, {0x7e, 7}, {0xfe, 8}, {0x1fe, 9}};
 
-static struct JpegEncoder::huffentry cdht[] = {
+ const struct JpegEncoder::huffentry JpegEncoder::cdht[] = {
     {0x0, 2}, {0x1, 2}, {0x2, 2}, {0x6, 3}, {0xe, 4}, {0x1e, 5}, {0x3e, 6},
     {0x7e, 7}, {0xfe, 8}, {0x1fe, 9}, {0x3fe, 10}, {0x7fe, 11}};
 
-static struct JpegEncoder::huffentry laht[] = {
+ const struct JpegEncoder::huffentry JpegEncoder::laht[] = {
     {0x0a, 4}, {0x00, 2}, {0x01, 2}, {0x04, 3}, 
     {0x0b, 4}, {0x1a, 5}, {0x78, 7}, {0xf8, 8}, 
     {0x3f6, 10}, {0xff82, 16}, {0xff83, 16}, {0x00, 0}, 
@@ -268,7 +291,7 @@
     {0xfffc, 16}, {0xfffd, 16}, {0xfffe, 16}, {0x00, 0}, 
     {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0} };
 
-static struct JpegEncoder::huffentry caht[] = {
+ const struct JpegEncoder::huffentry JpegEncoder::caht[] = {
     {0x00, 2}, {0x01, 2}, {0x04, 3}, {0x0a, 4}, 
     {0x18, 5}, {0x19, 5}, {0x38, 6}, {0x78, 7}, 
     {0x1f4, 9}, {0x3f6, 10}, {0xff4, 12}, {0x00, 0}, 
@@ -334,23 +357,6 @@
     {0xfffc, 16}, {0xfffd, 16}, {0xfffe, 16}, {0x00, 0}, 
     {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0} };
 
-static const char ss[] = {
-    0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
-    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
-    6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-    6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-    7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
-    8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 };
 
 JpegEncoder::JpegEncoder() : TransmitterModule(FT_JPEG), 
     bb_(0), nbb_(0), bs_(0), bc_(0), offset_(0), quant_(0),
@@ -461,7 +467,8 @@
 
 void
 JpegEncoder::encode_blk(const short* blk, short* dcpred,
-                       struct huffentry* dcht, struct huffentry* acht)
+                       const struct huffentry* dcht,
+                        const struct huffentry* acht)
 {
     BB_INT bb = bb_;
     u_int nbb = nbb_;
diff -Naur vic-2.8ucl1.1.3.orig/vic/config.h vic-2.8ucl1.1.3/vic/config.h
--- vic-2.8ucl1.1.3.orig/vic/config.h   Fri Dec 10 11:25:31 1999
+++ vic-2.8ucl1.1.3/vic/config.h        Wed Oct 10 09:49:13 2001
@@ -126,13 +126,10 @@
 #endif
 #include <netinet/in.h>
 #include <arpa/inet.h>
-int            strcasecmp(const char *, const char *);
-clock_t clock(void);
+#include <time.h>
 #if !defined(sco) && !defined(sgi) && !defined(__bsdi__) && 
!defined(__FreeBSD__) && !defined(sun) && !defined(__linux__)
 int            gethostid(void);
 #endif
-time_t time(time_t *);
-char   *ctime(const time_t *);
 #if defined(__cplusplus)
 }
 #endif
diff -Naur vic-2.8ucl1.1.3.orig/vic/main.cpp vic-2.8ucl1.1.3/vic/main.cpp
--- vic-2.8ucl1.1.3.orig/vic/main.cpp   Thu Feb 17 07:59:09 2000
+++ vic-2.8ucl1.1.3/vic/main.cpp        Wed Oct 10 09:40:10 2001
@@ -168,11 +168,7 @@
 } cmd_usage;
 
 #ifndef SIGARGS
-#ifdef __SUNPRO_CC
 #define SIGARGS int arg
-#else
-#define SIGARGS ... 
-#endif
 #endif
 
 extern void adios();
diff -Naur vic-2.8ucl1.1.3.orig/vic/net/net-ipv6.cpp 
vic-2.8ucl1.1.3/vic/net/net-ipv6.cpp
--- vic-2.8ucl1.1.3.orig/vic/net/net-ipv6.cpp   Wed Oct 10 14:49:12 2001
+++ vic-2.8ucl1.1.3/vic/net/net-ipv6.cpp        Wed Oct 10 11:25:13 2001
@@ -278,7 +278,7 @@
   size_t len = sizeof(*p);
   int result = 0;
 
-  if ((result = getsockname(ssock_, (struct sockaddr *)p, &len)) < 0) {
+  if ((result = getsockname(ssock_, (struct sockaddr *)p, (socklen_t *)&len)) 
< 0) {
     perror("getsockname");
     p->sin6_addr = in6addr_any;
     p->sin6_port = 0;
@@ -523,7 +523,7 @@
        sockaddr_in6 sfrom;
        size_t fromlen = sizeof(sfrom);
        int cc = ::recvfrom(fd, (char*)buf, len, 0,
-                           (sockaddr*)&sfrom, &fromlen);
+                           (sockaddr*)&sfrom, (socklen_t *)&fromlen);
        if (cc < 0) {
                if (errno != EWOULDBLOCK)
                        perror("recvfrom");
diff -Naur vic-2.8ucl1.1.3.orig/vic/render/histtolut/histtolut.cpp 
vic-2.8ucl1.1.3/vic/render/histtolut/histtolut.cpp
--- vic-2.8ucl1.1.3.orig/vic/render/histtolut/histtolut.cpp     Tue Dec 14 
09:50:03 1999
+++ vic-2.8ucl1.1.3/vic/render/histtolut/histtolut.cpp  Wed Oct 10 14:23:46 2001
@@ -51,6 +51,7 @@
 #ifndef WIN32
 #include <unistd.h>
 #include <strings.h>
+#include <string.h>
 #endif
 #include <stdio.h>
 #include <sys/types.h>
diff -Naur vic-2.8ucl1.1.3.orig/vic/render/ppmtolut/ppmtolut.c 
vic-2.8ucl1.1.3/vic/render/ppmtolut/ppmtolut.c
--- vic-2.8ucl1.1.3.orig/vic/render/ppmtolut/ppmtolut.c Thu Sep  9 07:38:28 1999
+++ vic-2.8ucl1.1.3/vic/render/ppmtolut/ppmtolut.c      Wed Oct 10 12:53:15 2001
@@ -44,6 +44,8 @@
 #include <stdio.h>
 #include <sys/types.h> 
 #include <math.h>
+#include <stdlib.h>
+#include <unistd.h>
 #ifdef WIN32
 #include <winsock.h>
 #endif


-- System Information
Debian Release: testing/unstable
Architecture: ia64
Kernel: Linux butthead 2.4.9-itanium-smp #1 SMP Mon Sep 17 20:48:35 MDT 2001 
ia64
Locale: LANG=C, LC_CTYPE=


Reply via email to