assert or sqAssert? [was: Re: Source Forge Changes for 3.2.1]
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Dec 27 23:45:36 UTC 2001
>John M McIntosh wrote:
>>
>> >
>> >Not for the Linux version! *Where* happens this '#include <assert.h>'
>> >leading to this clash? There is no such include here.
>>
>> Looking deeper into this it seems that assert.h is included by
>> Apple's core foundation header. This header is gotten to by
>> sqConfig.h which on the mac under OS-X includes
>> "/Developer/Headers/FlatCarbon/MacTypes.h" which
>>
>> includes
>>
>>"/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h"
>> which includes
>>
>>"/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h"
>>
>> which at some point includes assert.h found at
>> "/usr/include/gcc/darwin/2.95.2/g++/../assert.h"
>
>What about just
> #undef assert
>(I think without braces) just after the
> #include "/Developer/Headers/FlatCarbon/MacTypes.h"
>in sqConfig.h?
>This should allow the inclusion of headers potentially using 'assert()'s,
>but removes its definition for the Squeak sources.
>Have you tried this approach?
Well we could but I think the question then is are we using assert as
we know a unix assert, or are we using some other specialized
sqAssert. I think overriding the unix assert could be confusing to
some people. Also you then get into interesting games here to ensure
our assert is used versus the unix assert. Right now you have an
assert in LargeIntegers.c but that's different than the one found in
other locations in the source code.
--
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
More information about the Squeak-dev
mailing list
|