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]

Fwd: Deprecate and remove SYS_ system call numbers?


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


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