Server Help

ASSS Custom Projects - PATCH: Datatype portability improvements (sizes.h)

Maucaub - Mon Aug 30, 2004 8:33 pm
Post subject: PATCH: Datatype portability improvements (sizes.h)
I've recently started nosing around in the ASSS code on Windows for various different reasons and have come across a number of fixes. I noticed while scanning through the forums, that a number of people have issues with compiling on Windows, particularly with pre-VC.NET compilers. This is in part because there are no good Windows distributions out there (which I'll address at some point in the future), but largely because the level of portability between platforms/compilers isn't all that thorough. The end result is that those windows distributions out there that attempt to correct this merely kludge together a non-portable, non-scalable custom fix.

As a first step toward improving this, I offer the following patch to the src/sizes.h header that defines the custom datatypes. This version first detects ANSI/ISO C99 Standard compliant compilers, and in the event of a non-C99 compliant compiler can fall back on various ad hoc methods. This patch is currently setup to handle MSVC (which is what I use), and from the comments provided should be easily extensible to other non-compliant (i.e. older) compilers as needed.

I've left the detection of __FreeBSD__ intact, however it is my belief that if the standards-compliant cases are trapped properly, this type of OS-specific condition should be unnecessary for the purposes of this header. I leave it up to Grel to decide what to do about it.

For those who want this update but don't have patch-ability on Windows, I've attached both the diff patch and the complete file. This patch is derived from the 1.2.0 source distribution.
Grelminar - Tue Aug 31, 2004 1:36 am
Post subject:
Thanks, I'll try to integrate this in some form. The __FreeBSD__ thing was sent to me by some guy who said it worked for him. As I don't compile on freebsd myself, I figured it was harmless. I think I'll remove it and see if anyone complains.

As for windows distributions, I'm finally getting around to handling that myself. Hopefully I'll have something within the week. I'd appreciate advice, though, as I don't have much windows development experience.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group