Re: tidy binaries

Terry Teague <[email protected]> Sun, 29 May 2005 01:05:19 -0700
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <l03130302bebf2634b7bc@[17.219.130.237]>
At 9:43 AM -0400 5/27/05, Charlie wrote:
>At 06:51 AM 5/26/2005 -0700, Cory Nelson wrote:
>>Yup, Win64.  A ptr_type would be the easiest way out.  FYI, VC++
>>defines intptr_t and uintptr_t in stddef.h.
>
>Good to know.  I.e. are these ISO C standard?  I'll check out what Solaris
>supports at work today.  Anyone have access to other *nix boxes to verify
>the local equivalents?


Don't forget that TidyLib is supported on platforms other than Un*x.



>However, there is nothing platform-specific about how the TidyLib configs
>work.  Nor is anything wired to a particular size.  Currently, the only
>assumption is that sizeof(long) == sizeof(char*).  A safer way to express
>this in the source might be sizeof(uintptr_t) == sizeof(char*) and
>sizeof(uintptr_t) >= size(ulong).
>
>Perhaps the old standby void* would be best of all.


Actually there is one dependency on size - perhaps if we are fixing this
64-bit stuff, we should fix that as well. The opaque data structures,
specifically TidyIterator, rely on the size of enums being 'int', which I
believe is the default behavior for ISO C standard compilers. However I
found out the hard way that some compilers can implement enums differently
(usually as the result of a compiler setting - gcc has a -fshort-enum
option), where the enums may be stored as chars, unsigned or signed
quantities etc - changing the size of enums does break TidyLib (when I last
tried) - see the warning in "platform.h".


>take it easy,
>Charlie


Regards, Terry




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005