bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] [1.13.90] compilation problems on IRIX


From: Paul Eggert
Subject: Re: [Bug-tar] [1.13.90] compilation problems on IRIX
Date: 03 Nov 2003 15:08:34 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Ayamura KIKUCHI <address@hidden> writes:

> cc-1070 cc: ERROR File = xheader.c, Line = 39
>   The indicated type is incomplete.

Thanks for that bug report.  The problem was that GNU Tar relied on a
common extension to C, and apparently the IRIX compiler does not
support this extension.  I installed the following patch.  (It's
incredible to me that Standard C has the limitation in question; live
and learn, I guess.)

2003-11-03  Paul Eggert  <address@hidden>

        * src/xheader.c (xhdr_tab): Include bounds in forward declaration,
        as C89 and C99 require this.

Index: src/xheader.c
===================================================================
RCS file: /cvsroot/tar/tar/src/xheader.c,v
retrieving revision 1.7
diff -p -u -r1.7 xheader.c
--- src/xheader.c       8 Oct 2003 11:17:52 -0000       1.7
+++ src/xheader.c       3 Nov 2003 23:02:56 -0000
@@ -36,7 +36,10 @@ struct xhdr_tab
   void (*decoder) (struct tar_stat_info *, char const *);
 };
 
-static struct xhdr_tab const xhdr_tab[];
+/* This declaration must specify the number of elements in xhdr_tab,
+   because ISO C99 section 6.9.2 prohibits a tentative definition that
+   has both internal linkage and incomplete type.  */
+static struct xhdr_tab const xhdr_tab[13];
 
 static struct xhdr_tab const *
 locate_handler (char const *keyword)
@@ -419,6 +422,9 @@ static struct xhdr_tab const xhdr_tab[] 
   { "size",    size_coder,     size_decoder    },
   { "uid",     uid_coder,      uid_decoder     },
   { "uname",   uname_coder,    uname_decoder   },
+
+  /* The number of entries in xhdr_tab must agree with the array
+     bounds in xhdr_tab's forward declaration.  */
 
 #if 0 /* GNU private keywords (not yet implemented) */
   /* Sparse file handling */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]