Re: [AD] Fwd: Re: Allegro 5.2.1.1 + latest MinGW = off_t undefined

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


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 <edgarreynaldo@xxxxxxxxxx> wrote:

Meant to send this to the mailing list. Sorry bout that.



-------- Forwarded Message --------
Subject: Re: [AD] Allegro 5.2.1.1 + latest MinGW = off_t undefined
Date: Mon, 17 Oct 2016 17:32:25 -0500
From: Edgar Reynaldo <EdgarReynaldo@xxxxxxxxxx.allegro.cc>
To: Elias Pschernig <elias@xxxxxxxxxxxx>




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> wrote:
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 :

https://www.allegro.cc/forums/thread/616526/1025585#target

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.

Edgar



_______________________________________________
Allegro-developers mailing list
Allegro-developers@xxxxxxxxxx
https://mail.gna.org/listinfo/allegro-developers




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/