> Date: 2011-11-29 05:56:42 +0100 (Tue, 29 Nov 2011)
> New Revision: 31089
> Log Message:
> FS#12414 : Fix directory functions in plugins on targets which HAVE_DIRCACHE. In rockbox_api, PREFIX( ) is removed around directory functions because that's now handled in directory header files. Thanks to Fred Bauer for reporting this.
> Modified: trunk/apps/plugin.c
> --- trunk/apps/plugin.c 2011-11-29 00:42:27 UTC (rev 31088)
> +++ trunk/apps/plugin.c 2011-11-29 04:56:42 UTC (rev 31089)
> @@ -98,16 +98,6 @@
> return filesize(fd);
> -static int app_closedir(DIR *dirp)
> - return closedir(dirp);
> -static struct dirent *app_readdir(DIR *dirp)
> - return readdir(dirp);
> #if defined(HAVE_PLUGIN_CHECK_OPEN_CLOSE)&& (MAX_OPEN_FILES>32)
> @@ -385,11 +375,11 @@
> /* dir */
> - (opendir_func)PREFIX(opendir),
> - (closedir_func)PREFIX(closedir),
> - (readdir_func)PREFIX(readdir),
> - PREFIX(mkdir),
> - PREFIX(rmdir),
> + (opendir_func)opendir,
> + (closedir_func)closedir,
> + (readdir_func)readdir,
> + mkdir,
> + rmdir,
Okay, I admit this fix seemed obvious. But this bug is actually known
for longer (see FS#12032) and I fear it's not that easy.
When I looked into it I found that the above is the culprit indeed.
However, one needs to look into svn history (revision r28929, and more
importantly r28927) to see that the PREFIX() have been introduced for a
reason (to fix FS#11844).
That said, I haven't looked any further, so I don't know what the
correct fix is or if the above is incorrect. But I wonder if the reason
it was introduced was considered, as it bascally reverts most of r28929.
I'm sorry if I missed something obvious. I'm not asking for reversal but
Received on 2011-11-29