[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbox
Subject:    Patch: fix a problem on 64 bit machines
From:       mfabian () suse ! de (Mike FABIAN)
Date:       2003-03-31 9:00:08
Message-ID: s3tk7ef7vxj.fsf_-_ () magellan ! suse ! de
[Download RAW message or body]

smoynes at nexus.carleton.ca ????????:

> Thank you. This has been applied to CVS.

Thank you.

I found another small problem which causes crashes on 64 bit machines
like AMD x86_64. Patch attached.

In Configuration.hh there is the code:

  inline bool getValue(const std::string &rname, int &value) const {
    return getValue(rname, (long&) value);
  }
  inline bool getValue(const std::string &rname, unsigned int &value) const {
    return getValue(rname, (unsigned long&) value);
  }

This looks suspicious to me, I think this casting of "int &" to "long
&" won't work on 64 bit platforms. My patch just avoids to call one of
the above two methods by using a "long" from the beginning, thus
avoiding the cast which makes it "work for me".

But something needs to be fixed in the above two methods if one
actually wants to use them on platforms where "int" and "long" are not
the same.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: openbox-2.2.3-64bit.diff
Type: text/x-patch
Size: 341 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20030331/596d6138/attachment.bin>
-------------- next part --------------

-- 
Mike Fabian   <mfabian at suse.de>   http://www.suse.de/~mfabian
?????????????

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic