Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] Patch to common/{log.c,log.h,speclist.h} (PR#314)
Home

[Freeciv-Dev] Patch to common/{log.c,log.h,speclist.h} (PR#314)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Patch to common/{log.c,log.h,speclist.h} (PR#314)
From: jrb3@xxxxxxxxx
Date: Sat, 18 Mar 2000 10:59:35 -0800 (PST)

The BeOS is a fun platform to program on -- all the high-level API's are C++.
Yum yum.  So, all the code gets compiled for C++, even *.c files, where the
symbols generated come out with C symbol binding.

This means that the structure member named 'this' in common/log.h and
common/log.c, and the parameters named 'this' in common/speclist.h, cause
compilation errors.

This patch, based off top-of-trunk, allows C++ compilation of common/* code.

                Joseph Beckenbach

Index: log.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/log.c,v
retrieving revision 1.16
diff -r1.16 log.c
175c175
<   ret.this = 1;
---
>   ret.tthis = 1;
181c181
<   ret.this = 0;
---
>   ret.tthis = 0;
184c184
<       ret.this = 1;
---
>       ret.tthis = 1;
Index: log.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/log.h,v
retrieving revision 1.7
diff -r1.7 log.h
31c31
<   int this;
---
>   int tthis;
73c73
<   return (logdebug_thisfile.this  && (logdebug_thisfile.max==0
---
>   return (logdebug_thisfile.tthis  && (logdebug_thisfile.max==0
Index: speclist.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/speclist.h,v
retrieving revision 1.1
diff -r1.1 speclist.h
77,83c77,83
< void SPECLIST_FOO(_list_init) (SPECLIST_LIST *this);
< int  SPECLIST_FOO(_list_size) (SPECLIST_LIST *this);
< SPECLIST_TYPE *SPECLIST_FOO(_list_get) (SPECLIST_LIST *this, int index);
< void SPECLIST_FOO(_list_insert) (SPECLIST_LIST *this, SPECLIST_TYPE *pfoo);
< void SPECLIST_FOO(_list_insert_back) (SPECLIST_LIST *this, SPECLIST_TYPE 
*pfoo);
< void SPECLIST_FOO(_list_unlink) (SPECLIST_LIST *this, SPECLIST_TYPE *pfoo);
< void SPECLIST_FOO(_list_unlink_all) (SPECLIST_LIST *this);
---
> void SPECLIST_FOO(_list_init) (SPECLIST_LIST *This);
> int  SPECLIST_FOO(_list_size) (SPECLIST_LIST *This);
> SPECLIST_TYPE *SPECLIST_FOO(_list_get) (SPECLIST_LIST *This, int index);
> void SPECLIST_FOO(_list_insert) (SPECLIST_LIST *This, SPECLIST_TYPE *pfoo);
> void SPECLIST_FOO(_list_insert_back) (SPECLIST_LIST *This, SPECLIST_TYPE *pfoo
);
> void SPECLIST_FOO(_list_unlink) (SPECLIST_LIST *This, SPECLIST_TYPE *pfoo);
> void SPECLIST_FOO(_list_unlink_all) (SPECLIST_LIST *This);




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Patch to common/{log.c,log.h,speclist.h} (PR#314), jrb3 <=