This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Errors from cppcheck


On Mon, 26 Aug 2013, Ondrej Bilka wrote:

> > Needs evaluation: Relies on __ASSUME_UTIMES not being defined if
> > __NR_utimes is not defined.
> > 
> Here we could check if these conditions are neede. Minimal supported
> kernel version is  2.6.16 and there is following comment:
> 
>    Starting with 2.6.22 the Linux kernel has the utimensat syscall which
>    can be used to implement futimes.  Earlier kernels have no futimes()
>    syscall so we use the /proc filesystem.  */

Since this is utimes not utimensat, more relevant is:

/* The utimes syscall has been available for some architectures
   forever.  For x86 it was introduced after 2.5.75, for x86-64,
   ppc, and ppc64 it was introduced in 2.6.0-test3, for s390 it was
   introduced in 2.6.21-rc5.  */

But even if you increase the minimum kernel version, you have the issue 
that hppa at least does not have the utimes syscall at all - it went 
straight to utimensat.  In the event of increasing the minimum version 
sufficiently to assume both syscalls on all architectures that ever got 
them, this probably means hppa should start to use 
ports/sysdeps/unix/sysv/linux/generic/utimes.c so that 
sysdeps/unix/sysv/linux/utimes.c can then assume the utimes syscall is 
present (subject to determining status for other architectures).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]