mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-26 20:51:11 +00:00
d4e157aaae
glibc has lots of __libc_* function names that no longer serve any purpose (are not used for any calls or exported at a public symbol version). This patch removes __libc_creat. It has the effect of creat becoming a strong symbol instead of a weak symbol in various cases, but that's fine; in shared libraries it doesn't matter at all, while for static linking the only other symbol sometimes defined in the same object is creat64, and whenever creat64 is a reserved name so is creat. Other such cases of unnecessary __libc_* symbols are expected to be dealt with in separate patches over time. Tested for x86_64 (testsuite, and that the disassembly of installed shared libraries is unchanged by the patch). * include/fcntl.h (__libc_creat): Remove declaration. * io/creat.c (__libc_creat): Rename to creat. (creat): Do not define as alias. * sysdeps/unix/sysv/linux/alpha/creat.c (creat64): Define as alias of creat instead of __libc_creat. * sysdeps/unix/sysv/linux/generic/creat.c (__libc_creat): Rename to creat. (creat): Do not define as alias. [__WORDSIZE == 64] (creat64): Define as alias of creat instead of __libc_creat. * sysdeps/unix/sysv/linux/syscalls.list (creat): Do not define __libc_creat name. * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list (creat): Likewise.
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
#ifndef _FCNTL_H
|
|
#include <io/fcntl.h>
|
|
|
|
#ifndef _ISOMAC
|
|
/* Now define the internal interfaces. */
|
|
extern int __open64 (const char *__file, int __oflag, ...);
|
|
libc_hidden_proto (__open64)
|
|
extern int __libc_open64 (const char *file, int oflag, ...);
|
|
extern int __libc_open (const char *file, int oflag, ...);
|
|
libc_hidden_proto (__libc_open)
|
|
extern int __libc_fcntl (int fd, int cmd, ...);
|
|
#ifndef NO_CANCELLATION
|
|
extern int __fcntl_nocancel (int fd, int cmd, ...) attribute_hidden;
|
|
libc_hidden_proto (__libc_fcntl)
|
|
#endif
|
|
extern int __open (const char *__file, int __oflag, ...);
|
|
libc_hidden_proto (__open)
|
|
extern int __fcntl (int __fd, int __cmd, ...);
|
|
libc_hidden_proto (__fcntl)
|
|
extern int __openat (int __fd, const char *__file, int __oflag, ...)
|
|
__nonnull ((2));
|
|
libc_hidden_proto (__openat)
|
|
extern int __openat64 (int __fd, const char *__file, int __oflag, ...)
|
|
__nonnull ((2));
|
|
libc_hidden_proto (__openat64)
|
|
|
|
extern int __open_2 (const char *__path, int __oflag);
|
|
extern int __open64_2 (const char *__path, int __oflag);
|
|
extern int __openat_2 (int __fd, const char *__path, int __oflag);
|
|
extern int __openat64_2 (int __fd, const char *__path, int __oflag);
|
|
|
|
|
|
/* Flag determining whether the *at system calls are available. */
|
|
extern int __have_atfcts attribute_hidden;
|
|
|
|
#ifdef O_CLOEXEC
|
|
extern int __have_o_cloexec attribute_hidden;
|
|
#endif
|
|
#endif
|
|
|
|
#endif
|