Fwd: Deprecate and remove SYS_ system call numbers?
Zack Weinberg
zackw@panix.com
Mon Aug 8 20:11:00 GMT 2016
On Mon, Aug 8, 2016 at 3:36 PM, Florian Weimer <fweimer@redhat.com> wrote:
> Do you think it would be worthwhile to deprecate the SYS_ re-defines of the
> __NR_ system call numbers?
>
> The primary use of these macros is the syscall function, which allows you to
> do perform system calls without glibc wrappers. The __NR_ macros come from
> the kernel headers, the SYS_ macros are synthesized from the kernel headers
> at glibc build time. Programmers may not be aware of the difference and use
> the SYS_ macros for writing fallback code, unaware that older glibc releases
> may not have them.
The SYS_ names are the only names available from <sys/syscall.h> on,
as far as I know, *all other Unixes.* Only Linux has the __NR_ names.
Therefore, it is the __NR_ names that application programmers should
be discouraged from using, not the SYS_ names.
zw
More information about the Libc-alpha
mailing list