|Re: [AD] Fwd: Re: Allegro 220.127.116.11 + latest MinGW = off_t undefined|
[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
- To: allegro-developers@xxxxxxxxxx
- Subject: Re: [AD] Fwd: Re: Allegro 18.104.22.168 + latest MinGW = off_t undefined
- From: SiegeLord <siegelordex@xxxxxxxxxx>
- Date: Mon, 17 Oct 2016 18:22:14 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=0ln/CEMLAy3BtV/M8DAsUp8p3QtQ1LgV2aSJY3XOoyc=; b=pjezvQbfsDON9X4gfQ/gv1l2EUDsazOSosJXg6B+Vob/nPNd8BBA1880jYlMw+wZh1 ylQUZEVAlRhCBny5l55FaPcV3g1Fu23SkK2QV3z2aUmWBttzqMI94NWf2xk5OsyzxwiV CN0bI4U5RAuGsyHMaPb8h9k3154NKP6x9E5t8YGA6x3TJITsK4aybug2OoEH5a1+i77N eBwHUfMtE6Lxb5aqYrU4OcGAC9SQzAxknFw1AL405ijyxUpOubY0ZgEiPhJ3P1QJJXzX jaauK9KuCwPyKnOapzJ9wePhQLofuyuC2FUXlkdEsQs91Vi8EPSMwW2iylDT/XPKfUh4 cibQ==
It seems like a bug. _FILE_OFFSET_BITS is defined in the source files
(making off_t 64 bit) but not in the headers. Not sure how this stuff
ever worked, but I guess just making it 64 bit at all times makes sense.
On 10/17/2016 04:21 PM, Elias Pschernig wrote:
4GB is not very large in general - I could easily see a game's data pack
be larger than that. Also videos are often more than 4GB. But chances
are when compiling for 32-bit there could be some other limit so you
would not be able to work with such sizes anyway - however I just don't
understand why the Allegro API does have to expose that with a weird
type like off_t which changes size depending on the platform. Maybe I'll
do a sed -i -e 's/off_t/int64_t/g' and create a pull request if nobody
disagrees - but I don't know the original reason for off_t so maybe
there is a good reason for it.
On Mon, Oct 17, 2016 at 6:37 PM, Edgar Reynaldo
Meant to send this to the mailing list. Sorry bout that.
-------- Forwarded Message --------
Subject: Re: [AD] Allegro 22.214.171.124 + latest MinGW = off_t undefined
Date: Mon, 17 Oct 2016 17:32:25 -0500
From: Edgar Reynaldo <EdgarReynaldo@xxxxxxxxxx>
To: Elias Pschernig <elias@xxxxxxxxxx> <mailto:elias@xxxxxxxxxx>
On 10/9/2016 10:01 AM, Elias Pschernig wrote:
Or maybe replace off_t with int64_t - the uses I can see seem very
suspicious, and most likely currently Allegro 5 will break if it
is ever compiled on a system where off_t is only 32 bit.
On Sat, Oct 8, 2016 at 9:59 PM, SiegeLord <siegelordex@xxxxxxxxxx
Sounds like the proper solution is to define _POSIX_C_SOURCE
then, perhaps guarded by a check for ALLEGRO_GCC.
All of these errors have been fixed by patches issued by Keith
Marshall of MinGW, as detailed here :
So as far as I can see, Allegro 5 programs now properly compile with
the C++11 standard in use.
Do we really need to replace off_t with int64_t though? I mean
better safe than sorry, but are we really ever going to deal with
file system entries larger than 4GB? Where does the issue with using
off_t on 64 bit systems come in? If we needed file system offsets I
would agree that int64_t would be better, but I don't see any of
that in use at the moment.
Allegro-developers mailing list
Allegro-developers mailing list