Ethereal-dev: [Ethereal-dev] 0.10.12 portability patch for Solaris, IRIX

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Thu, 4 Aug 2005 14:24:30 -0500
Building 0.10.12 on Solaris 8/SPARC with the Sun C compiler:
 cc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../.. -I./.. -DINET6
-DSOLARIS8_INET6 -I/opt/TWWfsw/zlib11/include
-I/opt/TWWfsw/libpcap08/include -I/opt/TWWfsw/zlib11/include
-I/opt/TWWfsw/libpcre50/include -D_U_= -mr -Qn -xstrconst -xO2
-xtarget=generic -xarch=v8 -mt -I/opt/TWWfsw/libglib26/include
-I/opt/TWWfsw/libglib26/lib/include -I/opt/TWWfsw/libgtk+26/include
-I/opt/TWWfsw/libgtk+26/lib/include -I/opt/TWWfsw/libpango18/include
-I/usr/openwin/include -I/opt/TWWfsw/libatk19/include
-I/opt/TWWfsw/fcpackage22/include
-I/opt/TWWfsw/libttf21/include/freetype2
-I/opt/TWWfsw/gettext014/include -I/opt/TWWfsw/zlib11/include
-I/opt/TWWfsw/libiconv19/include -I/opt/TWWfsw/libpcap08/include
-I/opt/TWWfsw/libpcre50/include -c ftype-string.c  -KPIC -DPIC -o
.libs/ftype-string.o
"ftype-string.c", line 56: operands have incompatible types:
         int ":" void
"ftype-string.c", line 187: warning: statement not reached
cc: acomp failed for ftype-string.c
gmake[3]: *** [ftype-string.lo] Error 1

...

 cc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../.. -I./.. -DINET6
-DSOLARIS8_INET6 -I/opt/TWWfsw/zlib11/include
-I/opt/TWWfsw/libpcap08/include -I/opt/TWWfsw/zlib11/include
-I/opt/TWWfsw/libpcre50/include -D_U_= -mr -Qn -xstrconst -xO2
-xtarget=generic -xarch=v8 -mt -I/opt/TWWfsw/libglib26/include
-I/opt/TWWfsw/libglib26/lib/include -I/opt/TWWfsw/libgtk+26/include
-I/opt/TWWfsw/libgtk+26/lib/include -I/opt/TWWfsw/libpango18/include
-I/usr/openwin/include -I/opt/TWWfsw/libatk19/include
-I/opt/TWWfsw/fcpackage22/include
-I/opt/TWWfsw/libttf21/include/freetype2
-I/opt/TWWfsw/gettext014/include -I/opt/TWWfsw/zlib11/include
-I/opt/TWWfsw/libiconv19/include -I/opt/TWWfsw/libpcap08/include
-I/opt/TWWfsw/libpcre50/include -c ftype-tvbuff.c  -KPIC -DPIC -o
.libs/ftype-tvbuff.o
"../../epan/gdebug.h", line 52: syntax error before or at: (
"../../epan/gdebug.h", line 52: warning: identifier redeclared: g_log
        current : function() returning void
        previous: function(pointer to const char, enum
{G_LOG_LEVEL_MASK(-4), G_LOG_LEVEL_DEBUG(128), G_LOG_LEVEL_INFO(64),
G_LOG_LEVEL_MESSAGE(32), G_LOG_LEVEL_WARNING(16),
G_LOG_LEVEL_CRITICAL(8), G_LOG_LEVEL_ERROR(4), G_LOG_FLAG_FATAL(2),
G_LOG_FLAG_RECURSION(1)}, pointer to const char, ...) returning void :
"/opt/TWWfsw/libglib26/include/glib/gmessages.h", line 93
"../../epan/gdebug.h", line 52: warning: old-style declaration or
incorrect type for: G_LOG_LEVEL_DEBUG
"../../epan/gdebug.h", line 52: identifier redeclared:
G_LOG_LEVEL_DEBUG
        current : int
        previous: enum  {G_LOG_LEVEL_MASK(-4), G_LOG_LEVEL_DEBUG(128),
G_LOG_LEVEL_INFO(64), G_LOG_LEVEL_MESSAGE(32),
G_LOG_LEVEL_WARNING(16), G_LOG_LEVEL_CRITICAL(8),
G_LOG_LEVEL_ERROR(4), G_LOG_FLAG_FATAL(2), G_LOG_FLAG_RECURSION(1)} :
"/opt/TWWfsw/libglib26/include/glib/gmessages.h", line 66
"../../epan/gdebug.h", line 52: syntax error before or at: ...
"ftype-tvbuff.c", line 45: cannot recover from previous errors
cc: acomp failed for ftype-tvbuff.c

...

 cc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../.. -I./..
-I./../../tools/lemon -DINET6 -DSOLARIS8_INET6
-I/opt/TWWfsw/zlib11/include -I/opt/TWWfsw/libpcap08/include
-I/opt/TWWfsw/zlib11/include -I/opt/TWWfsw/libpcre50/include -D_U_=
-mr -Qn -xstrconst -xO2 -xtarget=generic -xarch=v8 -mt
-I/opt/TWWfsw/libglib26/include -I/opt/TWWfsw/libglib26/lib/include
-I/opt/TWWfsw/libgtk+26/include -I/opt/TWWfsw/libgtk+26/lib/include
-I/opt/TWWfsw/libpango18/include -I/usr/openwin/include
-I/opt/TWWfsw/libatk19/include -I/opt/TWWfsw/fcpackage22/include
-I/opt/TWWfsw/libttf21/include/freetype2
-I/opt/TWWfsw/gettext014/include -I/opt/TWWfsw/zlib11/include
-I/opt/TWWfsw/libiconv19/include -I/opt/TWWfsw/libpcap08/include
-I/opt/TWWfsw/libpcre50/include -c gencode.c  -KPIC -DPIC -o
.libs/gencode.o
"../../epan/gdebug.h", line 52: syntax error before or at: (
"../../epan/gdebug.h", line 52: warning: identifier redeclared: g_log
        current : function() returning void
        previous: function(pointer to const char, enum
{G_LOG_LEVEL_MASK(-4), G_LOG_LEVEL_DEBUG(128), G_LOG_LEVEL_INFO(64),
G_LOG_LEVEL_MESSAGE(32), G_LOG_LEVEL_WARNING(16),
G_LOG_LEVEL_CRITICAL(8), G_LOG_LEVEL_ERROR(4), G_LOG_FLAG_FATAL(2),
G_LOG_FLAG_RECURSION(1)}, pointer to const char, ...) returning void :
"/opt/TWWfsw/libglib26/include/glib/gmessages.h", line 93
"../../epan/gdebug.h", line 52: warning: old-style declaration or
incorrect type for: G_LOG_LEVEL_DEBUG
"../../epan/gdebug.h", line 52: identifier redeclared:
G_LOG_LEVEL_DEBUG
        current : int
        previous: enum  {G_LOG_LEVEL_MASK(-4), G_LOG_LEVEL_DEBUG(128),
G_LOG_LEVEL_INFO(64), G_LOG_LEVEL_MESSAGE(32),
G_LOG_LEVEL_WARNING(16), G_LOG_LEVEL_CRITICAL(8),
G_LOG_LEVEL_ERROR(4), G_LOG_FLAG_FATAL(2), G_LOG_FLAG_RECURSION(1)} :
"/opt/TWWfsw/libglib26/include/glib/gmessages.h", line 66
"../../epan/gdebug.h", line 52: syntax error before or at: ...
"gencode.c", line 45: cannot recover from previous errors
cc: acomp failed for gencode.c

The attached patch fixes this.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)
--- epan/ftypes/ftype-tvbuff.c.orig	Tue Jul 26 14:26:02 2005
+++ epan/ftypes/ftype-tvbuff.c	Thu Aug  4 12:24:08 2005
@@ -26,7 +26,6 @@
 
 #include <ftypes-int.h>
 #include <string.h>
-#include <epan/gdebug.h>
 
 #ifdef HAVE_LIBPCRE
 #include <pcre.h>
No differences encountered
--- epan/dfilter/gencode.c.orig	Tue Jul 26 14:26:02 2005
+++ epan/dfilter/gencode.c	Thu Aug  4 12:24:08 2005
@@ -31,7 +31,6 @@
 #include "sttype-range.h"
 #include "sttype-test.h"
 #include "ftypes/ftypes.h"
-#include <epan/gdebug.h>
 
 static void
 gencode(dfwork_t *dfw, stnode_t *st_node);
--- epan/proto.h.orig	Tue Jul 26 14:26:46 2005
+++ epan/proto.h	Thu Aug  4 12:24:08 2005
@@ -98,8 +98,8 @@
  * @param expression expression to test in the assertion
  */
 #define DISSECTOR_ASSERT(expression)  \
-  ((void) ((expression) ? 0 : \
-   __DISSECTOR_ASSERT (expression, __FILE__, __LINE__)))
+  ((expression) ? (void) 0 : \
+   __DISSECTOR_ASSERT (expression, __FILE__, __LINE__))
 
 /** Same as DISSECTOR_ASSERT(), but will throw DissectorError exception
  * unconditionally, much like GLIB's g_assert_not_reached works.