statfs64 and !LFS

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Oct 28 18:47:34 UTC 2009


On Wed, Oct 21, 2009 at 09:10:12PM +0400, Dmitry V. Levin wrote:
>On Wed, Oct 21, 2009 at 06:12:06PM +0200, Bernhard Reutner-Fischer wrote:
>[...]
>> 2009-10-14  Bernhard Reutner-Fischer  <rep.dot.nop at gmail.com>
>> 
>> 	* syscall.c (sys_truncate64, sys_ftruncate64, sys_getdents64,
>> 	sys_statfs64, sys_fstatfs64): Define to their !LFS counterparts
>> 	if largefilesupport is unavailable.
>
>Here is the hunk we are talking about:
>
>> --- a/syscall.c
>> +++ b/syscall.c
>> @@ -110,6 +110,18 @@
>>  #define TP TRACE_PROCESS
>>  #define TS TRACE_SIGNAL
>>  
>> +#ifndef HAVE_STAT64
>> +/*
>> + * Ugly hacks for systems that do not have LFS
>> + */
>> +
>> +#define sys_truncate64  sys_truncate
>> +#define sys_ftruncate64 sys_ftruncate
>> +#define sys_getdents64  sys_getdents
>> +#define sys_statfs64    sys_statfs
>> +#define sys_fstatfs64   sys_fstatfs
>> +#endif
>> +
>>  static const struct sysent sysent0[] = {
>>  #include "syscallent.h"
>>  };
>
>That is, you suggest to rename these *64 parsers to their counterparts
>when struct stat64 is not available.  But file.c defines these functions
>with different conditions: sys_truncate64, sys_ftruncate64 and
>sys_getdents64 symbols are defined iff _LFS64_LARGEFILE is true, and (with
>your 1st patch applied) sys_statfs64 and sys_fstatfs64 symbols are defined
>iff HAVE_STATFS64 is true.  With your patch applied, there would be an
>inconsistency between conditions in these two files: if there is a system
>where _LFS64_LARGEFILE or HAVE_STATFS64 is defined but HAVE_STAT64 is not
>defined, strace will fail to link there due to undefined symbols.

ok, so please drop the syscall.c hunk for now. We could revisit it later
on.

thanks,




More information about the Strace-devel mailing list