]> Dogcows Code - chaz/tar/commitdiff
Make xhdr_tab extern, not static.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 5 Nov 2003 01:33:35 +0000 (01:33 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 5 Nov 2003 01:33:35 +0000 (01:33 +0000)
ChangeLog
src/xheader.c

index cfc8890f7b94caf820e8cac1ad914c40f7d300bc..0f8a6d6499eb3e19e3a9d84132ee019517169d5a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
-2003-11-03  Paul Eggert  <eggert@twinsun.com>
+2003-11-04  Paul Eggert  <eggert@twinsun.com>
 
-       * src/xheader.c (xhdr_tab): Include bounds in forward declaration,
-       as C89 and C99 require this.
+       * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
+       C99 require this.
 
 2003-10-26  Paul Eggert  <eggert@twinsun.com>
 
index aa94c4bf2dfb1575d71565bcb7a9121a01c76500..1441eec8728b5e14f4d1f5bdcf74737fcea20586 100644 (file)
@@ -36,10 +36,13 @@ struct xhdr_tab
   void (*decoder) (struct tar_stat_info *, char const *);
 };
 
-/* 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];
+/* This declaration must be extern, because ISO C99 section 6.9.2
+   prohibits a tentative definition that has both internal linkage and
+   incomplete type.  If we made it static, we'd have to declare its
+   size which would be a maintenance pain; if we put its initializer
+   here, we'd need a boatload of forward declarations, which would be
+   even more of a pain.  */
+extern struct xhdr_tab const xhdr_tab[];
 
 static struct xhdr_tab const *
 locate_handler (char const *keyword)
@@ -409,7 +412,7 @@ uname_decoder (struct tar_stat_info *st, char const *arg)
   assign_string (&st->uname, arg);
 }
 
-static struct xhdr_tab const xhdr_tab[] = {
+struct xhdr_tab const xhdr_tab[] = {
   { "atime",   atime_coder,    atime_decoder   },
   { "comment", dummy_coder,    dummy_decoder   },
   { "charset", dummy_coder,    dummy_decoder   },
This page took 0.038646 seconds and 4 git commands to generate.