This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fwd: Deprecate and remove SYS_ system call numbers?
- From: Zack Weinberg <zackw at panix dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 8 Aug 2016 16:11:05 -0400
- Subject: Fwd: Deprecate and remove SYS_ system call numbers?
- Authentication-results: sourceware.org; auth=none
- References: <30b2d5f8-6148-be3f-cda0-8b0dd7d39e2e@redhat.com> <CAKCAbMiM5oynwTvbhhU_H6sPJHxBzD0vytVjZZdaod9OV8damg@mail.gmail.com>
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