[CF-Devel] bug in xcrossfire 1.2.0 server with MacOSX

Mark Wedel mwedel at sonic.net
Tue Jun 18 23:09:03 CDT 2002


Carroll Houk wrote:

>
     
      It seems that on OSX w/ the latest DevKit and patches the materials 
     
     >
     
      global (defined in materials.h ) does not get allocated. (i think it was 
     
     >
     
      expected to be allocated in attack.c) This was causing a SIGBUS when 
     
     >
     
      ever I tried to look at an item. I worked around the problem by just 
     
     >
     
      dropping the static def into a .c file from the .h. All seems to work 
     
     >
     
      fine now.
     
     >
     
     
     >
     
      OS & tool info
     
     >
     
      gcc --version 2.95.2
     
     >
     
     
     >
     
      I am running this on a 500Mhz iBook w/ OSX10.1.5 w/ the April DevKit.  I 
     
     >
     
      have downloaded and installed fink(Debian package mgr for OSX) (Which 
     
     >
     
      was how I found out about crossfire)
     
     

  I'll fix this in CVS.  The logic should work (on first include of material.h, 
define structure and some constants, on second, initialize the array).

  I personally think that is a bit confusing, and will likely cause other 
problems (if some other file were to add an include for material.h, it would
cause duplicates when it goes to resolve the symbols.)  I'm guessing the 
compiler may be doing some optimization if your case - figuring it already saw 
that file once, and no need to process it again.  IMO, that sounds like a broken 
compiler to me, but its easy enough to move the actual declation of types to the 
common/item.c file, so that is what I will do.



    
    


More information about the crossfire mailing list