Extremely bad idea: Since the inline stat() is not static, we get a endless recursion, if the server is not running. Fascinatingly this doesn't happen on R5, but at least on BONE (with the same executable) -- correctly, I would think. Apparently a bug in the R5 loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9726 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -101,8 +101,6 @@ struct ar_hdr /* archive file member header - printable ascii */
|
|||||||
|
|
||||||
# ifdef OPT_STAT_CACHE_SERVER_EXT
|
# ifdef OPT_STAT_CACHE_SERVER_EXT
|
||||||
# include "beos_stat_cache.h"
|
# include "beos_stat_cache.h"
|
||||||
inline int stat(const char *filename, struct stat *st)
|
|
||||||
{ return beos_stat_cache_stat(filename, st); }
|
|
||||||
# define opendir beos_stat_cache_opendir
|
# define opendir beos_stat_cache_opendir
|
||||||
# define readdir beos_stat_cache_readdir
|
# define readdir beos_stat_cache_readdir
|
||||||
# define closedir beos_stat_cache_closedir
|
# define closedir beos_stat_cache_closedir
|
||||||
@@ -174,8 +172,13 @@ file_time(
|
|||||||
{
|
{
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|
||||||
|
# ifdef OPT_STAT_CACHE_SERVER_EXT
|
||||||
|
if( beos_stat_cache_stat( filename, &statbuf ) < 0 )
|
||||||
|
return -1;
|
||||||
|
# else
|
||||||
if( stat( filename, &statbuf ) < 0 )
|
if( stat( filename, &statbuf ) < 0 )
|
||||||
return -1;
|
return -1;
|
||||||
|
# endif
|
||||||
|
|
||||||
*time = statbuf.st_mtime;
|
*time = statbuf.st_mtime;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user