Package: oleo
Severity: normal
Tags: patch

When building 'oleo' on amd64 with gcc-4.0,
I get the following error:

In file included from regions.c:42:
io-term.h:47: error: array type has incomplete element type
make[3]: *** [regions.o] Error 1
make[3]: Leaving directory `/oleo-1.99.16/src'

With the attached patch 'oleo' can be compiled
on amd64 using gcc-4.0.

The patch contains fixes which were already necessary for earlier
gcc versions.

Regards
Andreas Jochens

diff -urN ../tmp-orig/oleo-1.99.16/src/basic.h ./src/basic.h
--- ../tmp-orig/oleo-1.99.16/src/basic.h        2000-08-10 23:02:49.000000000 
+0200
+++ ./src/basic.h       2005-03-18 20:42:30.963398869 +0100
@@ -36,9 +36,6 @@
 
 extern const int colmagic[9];
 extern  const int rowmagic[9];
-extern char * motion_name[9];
-extern enum motion_magic complementary_motion[9];
-extern enum motion_magic opposite_motion[9];
 
 extern int run_load_hooks;
 
diff -urN ../tmp-orig/oleo-1.99.16/src/global.h ./src/global.h
--- ../tmp-orig/oleo-1.99.16/src/global.h       2005-03-18 20:45:06.300809009 
+0100
+++ ./src/global.h      2005-03-18 20:42:30.963398869 +0100
@@ -231,7 +231,7 @@
 
 extern unsigned short current_cycle;
 extern int ioerror;
-extern int errno;
+#include <errno.h>
 extern const char oleo_version_string[];
 
 extern double astof (char **);
diff -urN ../tmp-orig/oleo-1.99.16/src/io-term.c ./src/io-term.c
--- ../tmp-orig/oleo-1.99.16/src/io-term.c      2001-02-14 00:38:06.000000000 
+0100
+++ ./src/io-term.c     2005-03-18 20:43:36.991391876 +0100
@@ -234,7 +234,7 @@
 
                if (Preferences[i].copynext) {
                        ptr += strlen(Preferences[i].name) + 1;
-                       ((char *)Preferences[i].var) = strdup(ptr);
+                       Preferences[i].var = strdup(ptr);
                } else if (Preferences[i].var)
                        *((int *)Preferences[i].var) = Preferences[i].value;
 
@@ -770,6 +770,8 @@
     }
 }
 
+extern struct cmd_func cmd_funcs[];
+
 static void
 init_maps (void)
 {
diff -urN ../tmp-orig/oleo-1.99.16/src/io-term.h ./src/io-term.h
--- ../tmp-orig/oleo-1.99.16/src/io-term.h      2001-02-10 09:27:04.000000000 
+0100
+++ ./src/io-term.h     2005-03-18 20:43:06.794338687 +0100
@@ -44,8 +44,6 @@
 extern int default_lock;
 
 
-extern struct cmd_func cmd_funcs[];
-
 /* When printing ascii output, this controls page width. */
 extern int modified;
 
diff -urN ../tmp-orig/oleo-1.99.16/src/plotter.c ./src/plotter.c
--- ../tmp-orig/oleo-1.99.16/src/plotter.c      2000-11-22 20:33:01.000000000 
+0100
+++ ./src/plotter.c     2005-03-18 20:42:30.965398475 +0100
@@ -2639,8 +2639,6 @@
        case SP_PLOT_PIE:
                sp_pie_plot_point(mg, point);
                break;
-       default:
-               /* ?? */
        }
 }
 
@@ -2770,8 +2768,6 @@
        case SP_PLOT_PIE:
                sp_pie_begin_graph(mg, scale, trans_x, trans_y);
                break;
-       default:
-               /* ??? */
        }
 
        sp_first_dataset(mg);
@@ -2790,8 +2786,6 @@
        case SP_PLOT_PIE:
                sp_pie_end_graph(mg);
                break;
-       default:
-               /* ??? */
        }
 }
 
diff -urN ../tmp-orig/oleo-1.99.16/src/xrdb.c ./src/xrdb.c
--- ../tmp-orig/oleo-1.99.16/src/xrdb.c 2000-08-10 23:02:51.000000000 +0200
+++ ./src/xrdb.c        2005-03-18 20:42:30.966398277 +0100
@@ -450,6 +450,7 @@
 
 #ifdef TESTRM
 #include <stdio.h>
+#include <errno.h>
 #include "arg-list.h"
 
 static void
@@ -457,7 +458,6 @@
     char *msg, *prog;
     int x1, x2, x3, x4, x5;
 {
-    extern int errno;
 
     if (errno)
       perror (prog);


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to