Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Porting Crafty

Author: Robert Hyatt

Date: 22:10:32 01/15/98

Go up one level in this thread


On January 15, 1998 at 20:47:57, Peter W. Gillgasch wrote:

>On January 15, 1998 at 18:33:13, Carsten Kossendey wrote:
>
>>On January 15, 1998 at 16:41:34, William Bryant wrote:
>>
>>>Because Metrowerks PPC Compilers now support a long long data type
>>
>>Where have you been for the last year or so? This is pretty old news.
>>
>>>(64 bit integer type), shouldn't most of the port of Crafty simply
>>>be recompiling the program and making the integers all 64 bits.
>>
>>Integers in Crafty are 32 bits. BITBOARDs are 64 bits.
>>
>>>As I understand it, isn't crafty written in ANSI C.
>
>It is not. "long long" and "__int64" are *far* from ANSI... Probably no
>single module of Crafty is ANSI C...
>

actually, the new ANSI standard does have long long.  It just doesn't
specify
how many bits.  Just like "int".. is it 32 or 64?  Depends on the
machine..



>>Mostly, but Metrowerks violates all kinds of standards,
>
>FAME ON... It implements ANSI C *perfectly*.
>You don't know what you are talking about.

I know of one thing where it fails.  The way I do globals in Crafty
is most definitely ansi, but that compiler doesn't like it.  IE I
include a .h file with global definitions in every .c file, and that
compiler goes ape-snot and tries to allocate each copy of the globals
separately.  This is convered explicitly in the ansi standard and is
referred to as "the unix method of declaring global variables."  This
caused massive problems the last time someone tried to port to the Mac..



>
>and it's pretty
>>buggy too.
>
>It is rock solid. In fact the most solid compiler I have ever seen.
>
>>You can get the whole thing to compile and link within a few
>>hours, but it still won't run correctly.
>
>I guess that this is not the problem of the compiler ;) I once found a
>bug in CW8 (I think) and John McEnerny emailed me a fixed version 4
>hours after sending him a note with the offending source and the
>disassembled output...
>
>It is the most amazing C dev system I ever saw, damn it.
>
>-- Peter



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.