|
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
Maucaub Newbie
Joined: Apr 15 2004 Posts: 12 Offline
|
Posted: 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.
sizes_patch.zip - 1.42 KB
File downloaded or viewed 34 time(s)
|
|
Back to top |
|
|
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: 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.
|
|
Back to top |
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Software by php BB © php BB Group Server Load: 724 page(s) served in previous 5 minutes.
|