Ethereal-dev: Re: [ethereal-dev] Small patches for C++ compatability

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Fri, 26 May 2000 13:25:48 -0700 (PDT)
> These patches make sure that a C++ compiler won't complain about:
> - typedef struct GNode where GNOde is already a struct
> - redefining a GLib struct
> 
> I put a couple of #ifdefs around them, so C compilers shouldn't complain.

At least for

	- typedef struct GNode where GNOde is already a struct

GCC doesn't complain if the "struct" is removed from the typedef (i.e.,
if I just drop in your change without the #ifdef), so I suspect the
#ifdef isn't necessary:

Index: proto.h
===================================================================
RCS file: /usr/local/cvsroot/ethereal/proto.h,v
retrieving revision 1.30
diff -c -r1.30 proto.h
*** proto.h	2000/05/11 08:15:59	1.30
--- proto.h	2000/05/26 20:25:12
***************
*** 46,53 ****
  #endif
  
  /* needs glib.h */
! typedef struct GNode proto_tree;
! typedef struct GNode proto_item;
  struct value_string;
  
  #define ITEM_LABEL_LENGTH	240
--- 46,53 ----
  #endif
  
  /* needs glib.h */
! typedef GNode proto_tree;
! typedef GNode proto_item;
  struct value_string;
  
  #define ITEM_LABEL_LENGTH	240