Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
PATCH: Datatype portability improvements (sizes.h)

 
Post new topic   Reply to topic Printable version
 View previous topic  PATCH: TCP Billing on Windows Post :: Post PATCH: VIE-style billing support (bill...  View next topic  
Author Message
Maucaub
Newbie


Joined: Apr 15 2004
Posts: 12
Offline

PostPosted: Mon Aug 30, 2004 8:33 pm    Post subject: PATCH: Datatype portability improvements (sizes.h) Reply to topic Reply with quote

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 33 time(s)
Back to top
View users profile Send private message Add User to Ignore List Send email
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Tue Aug 31, 2004 1:36 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 686 page(s) served in previous 5 minutes.

phpBB Created this page in 0.554999 seconds : 29 queries executed (93.7%): GZIP compression disabled