On 21 September 2015 at 13:31, Gavin Wraith <gavin@wra1th.plus.com> wrote:
I have some code that uses OS_GPBP 12 to iterate
over objects in a directory, returning for each one
its name and filetype. It has been working for years
in RiscLua, when compiled with Norcroft and Objasm.
Now that I am using GCC the filetype is always
returned as zero, and I cannot see why.
OS_GPBP 12 uses a buffer to return its results,
with the object's name as a zero-terminated
string at buf+24, and the filetype in the word
at buf+20. I declare a buffer with
static const int rdir_buf[RDIR_BUFLEN/sizeof(int)];
^ shouldn't that be static int? Wouldn't the const imply that the buffer never changes and could be liable to some optimisation in the way members are accessed?
Nick
No comments:
Post a Comment