Daimonin
Members login
Sign Up!      problems?
N F
* Daimonin Forum
Home Help Search Calendar

Welcome Guest, you have to register to post here.
Search

News

Stats
74116 Posts in 6716 Topics by 8115 Members
Latest Member: salvafrench
Daimonin Forum  |  Development  |  Daimonin project  |  Topic: Writing 64-bit portable code « previous next »
Pages: [1] Go Down Print
Topic: Writing 64-bit portable code  (Read 937 times)
Gecko
Administrator
*
*
*


Karma: +4/-0
Posts: 817



View Profile
« on: October 02, 2005, 01:05:40 pm »

As more and more 64-bit systems are coming, we developers have to take more care to write portable code.

This is a short overview of portability problems with 64-bit architectures: http://www.google.com/url?sa=U&start=9&q=http://gcc.fyxm.net/summit/2003/Porting%2520to%252064%2520bit.pdf&e=10342

The problems we found and identified in the client and server so far are:
1. storing pointers in ints (on the assumption that both ints and pointers are 32 bit).
2. mixing uses of ints and longs (on the assumption that they are both 32 bit)
3. intricate differences in the handling of varargs

Both 1 and 2 normally generate warnings, but that can (and have) be silenced with explicit casts. This makes it extremely hard to track down those errors.

Programmers: please be more careful when silencing warnings, often a cast is not the right solution!

(I know I'm guilty on some accounts, too ... Embarrassed)
Logged

Daimonin developer, admin and moderator.
michtoen
Administrator
*
*
*


Karma: +30/-5
Posts: 1204



View Profile
« Reply #1 on: October 02, 2005, 03:03:59 pm »

yes, i know - one reason i changed to VC7.x as dev base and removed the VC6 ones.
VC7 has at last some basic checks for 64bit stuff.

I think everyone has forget here and there to write compatible stuff.
Thats normal - you need a compiler warning you about the biggest
problem so you don't forget it.

I really wait for the VC8 stuff where you can select different dev packages
for different systems. And the settings will enable the right warnings and
suggestions. Good thing: The VC8 stuff will be partly free avaible and/or
extremly cheap to buy for interested ($49 euro or so).

The server will need some work, for sure. That code was nearly 14 years now
developed as 32bit code - it will be challenging as my windows port i would say.
So, 1-2 week work to have a more or less bug free code.
Logged

kk
polyveg
Administrator
*
*
*


Karma: +6/-1
Posts: 164



View Profile
« Reply #2 on: November 18, 2005, 08:42:13 pm »

I will have a look at the server in the beginning of december.
should be 64bit ready before beta4.
Logged
Pages: [1] Go Up Print 
Daimonin Forum  |  Development  |  Daimonin project  |  Topic: Writing 64-bit portable code « previous next »
Jump to:  

Page created in 0.069 seconds with 19 queries.
Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Copyright 2008 Daimonin MMORPG  •  Terms of Service  •  XHTML  •  Daimonin sourceforge open source project