Patch for popt to compile on IRIX-6.5 with native compiler



Just a little niggle with IRIX compilation.
--- orig/popt/test2.c        Thu Oct 28 12:18:11 1999
+++ popt/test2.c     Thu Feb 24 05:34:34 2000
@@ -109,15 +109,19 @@
     };

     struct poptOption optionsTable[] = {
-       { NULL, '\0', POPT_ARG_INCLUDE_TABLE,  transactOptionsTable, 0,
+       { NULL, '\0', POPT_ARG_INCLUDE_TABLE,  NULL, 0,
             "Transact Options (not all will apply)", NULL },
-       { NULL, '\0', POPT_ARG_INCLUDE_TABLE,  databaseOptionsTable, 0,
+       { NULL, '\0', POPT_ARG_INCLUDE_TABLE,  NULL, 0,
             "Transact Database Names", NULL },
-       { NULL, '\0', POPT_ARG_INCLUDE_TABLE,  userOptionsTable, 0,
+       { NULL, '\0', POPT_ARG_INCLUDE_TABLE,  NULL, 0,
             "User Fields", NULL },
         POPT_AUTOHELP
         { NULL, 0, 0, NULL, 0, NULL, NULL }
     };
+
+    /* optionsTable must be populated this way because including these
tables
+       directly fails in some C compilers */
+    optionsTable[0].arg = transactOptionsTable;
+    optionsTable[1].arg = databaseOptionsTable;
+    optionsTable[2].arg = userOptionsTable;

 #if HAVE_MCHECK_H && HAVE_MTRACE
     mtrace();   /* Trace malloc only if
MALLOC_TRACE=mtrace-output-file. */







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