Re: [AD] Low-level file hooks - implemented and tested |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
I don't know about anyone else, but I was thinking about Allegro 4.2. But it doesn't mean your patch is rejected already: it depends whether the other idea gets implemented, or even if it *can* get implemented whilst maintaining compatibility with the current interface.
OK. As long as you don't _wait_ for someone to implement it, because we all know what'll happen ;)
If you like we can add something like this to the docs: "We don't guarantee compatibility with future versions; if you use these functions, you may need to rewrite your code later. No functionality will be removed from the library; it may just be provided in a different place." I suppose it's a _little_ redundant with Allegro 5 on its way though... :)
> OK, I've fixed the MSVC and MinGW headers. MSVC defines all S_IW* to > S_IWRITE and all S_IR* to S_IREAD; MinGW defines all do S_I?USR. I hope > this is OK, but if not it should be an easy matter to change it. I went with #define'ing S_I?GRP and S_I?OTH to 0. This also needs to be done for other Windows compilers (I didn't do). (brain kicks in) Wait, since those constants only get used in file.c, I'm just going to move the dummies straight in there.
See Vincent Penquerc'h's post. MSVC's header already had S_IWUSR and S_IRUSR defined as S_IREAD and S_IWRITE (damn, Microsoft are dumb...) so why not do the same for the other S_I* flags? And make the other flags work on MinGW? Someone may want to use those flags on Unix, and it would be convenient if Allegro defined them on other platforms :)
As for the question of whether they should be 0 or S_I?USR - I figured that if anyone might want permission to write to the file, Windows should arrange for everyone to have permission. Or am I being dumb and confusing files on disk with open files... Oh well, it's not important.
Peter: either something's wrong with your e-mail signature, or you have an inherent hatred for other character sets than your own ;D
Ben _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |