Skip to content

Commit

Permalink
Reuse musl macros hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
gportay committed Mar 20, 2024
1 parent bbdd64e commit 6d81dd7
Show file tree
Hide file tree
Showing 132 changed files with 306 additions and 306 deletions.
2 changes: 1 addition & 1 deletion __fstat64_time64.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#if __TIMESIZE == 32
static int (*sym)(int, struct stat64 *);

__attribute__((visibility("hidden")))
hidden
int next___fstat64_time64(int fd, struct stat64 *statbuf)
{
if (!sym)
Expand Down
2 changes: 1 addition & 1 deletion __fstatat64_time64.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#if __TIMESIZE == 32
static int (*sym)(int, const char *, struct stat64 *, int);

__attribute__((visibility("hidden")))
hidden
int next___fstatat64_time64(int dfd, const char *path, struct stat64 *statbuf,
int atflags)
{
Expand Down
4 changes: 2 additions & 2 deletions __fxstatat.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -24,7 +24,7 @@

static int (*sym)(int, int, const char *, struct stat *, int);

__attribute__((visibility("hidden")))
hidden
int next___fxstatat(int ver, int dfd, const char *path, struct stat *statbuf,
int atflags)
{
Expand Down
4 changes: 2 additions & 2 deletions __fxstatat64.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -20,7 +20,7 @@
#ifdef _LARGEFILE64_SOURCE
static int (*sym)(int, int, const char *, struct stat64 *, int);

__attribute__((visibility("hidden")))
hidden
int next___fxstatat64(int ver, int dfd, const char *path,
struct stat64 *statbuf, int atflags)
{
Expand Down
4 changes: 2 additions & 2 deletions __libc_start_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct startup_info
static int (*sym)(int, char **, char **, ElfW(auxv_t) *, void (*)(),
struct startup_info *, char **);

__attribute__((visibility("hidden")))
hidden
int next___libc_start_main(int argc,
char **argv,
char **ev,
Expand All @@ -56,7 +56,7 @@ int next___libc_start_main(int argc,
static int (*sym)(int (*)(), int, char **, int (*)(int, char **, char **),
void (*)(), void(*)(), void(*)());

__attribute__((visibility("hidden")))
hidden
int next___libc_start_main(int (*main)(int, char **, char **), int argc,
char **argv, int (*init)(int, char **, char **),
void (*fini)(void), void (*rtld_fini)(void),
Expand Down
4 changes: 2 additions & 2 deletions __open_2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -18,7 +18,7 @@
#ifdef __GLIBC__
static int (*sym)(const char *, int);

__attribute__((visibility("hidden")))
hidden
int next___open_2(const char *path, int oflags)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions __openat_2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -16,7 +16,7 @@
#ifdef __GLIBC__
static int (*sym)(int, const char *, int);

__attribute__((visibility("hidden")))
hidden
int next___openat_2(int dfd, const char *path, int oflags)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions __opendir2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 Gaël PORTAY
* Copyright 2022-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -18,7 +18,7 @@

static DIR *(*sym)(const char *, int);

__attribute__((visibility("hidden")))
hidden
DIR *next___opendir2(const char *path, int oflags)
{
if (!sym)
Expand Down
2 changes: 1 addition & 1 deletion accept.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

static int (*sym)(int, struct sockaddr *, socklen_t *);

__attribute__((visibility("hidden")))
hidden
int next_accept(int socket, struct sockaddr *addr, socklen_t *addrlen)
{
if (!sym)
Expand Down
2 changes: 1 addition & 1 deletion accept4.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

static int (*sym)(int, struct sockaddr *, socklen_t *, int);

__attribute__((visibility("hidden")))
hidden
int next_accept4(int socket, struct sockaddr *addr, socklen_t *addrlen,
int oflags)
{
Expand Down
2 changes: 1 addition & 1 deletion bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

static int (*sym)(int, const struct sockaddr *, socklen_t);

__attribute__((visibility("hidden")))
hidden
int next_bind(int socket, const struct sockaddr *addr, socklen_t addrlen)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions canonicalize_file_name.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -16,7 +16,7 @@

static char *(*sym)(const char *);

__attribute__((visibility("hidden")))
hidden
char *next_canonicalize_file_name(const char *path)
{
if (!sym)
Expand Down
2 changes: 1 addition & 1 deletion catopen.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

static nl_catd (*sym)(const char *, int);

__attribute__((visibility("hidden")))
hidden
nl_catd next_catopen(const char *path, int flag)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions chdir.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -16,7 +16,7 @@

static int (*sym)(const char *);

__attribute__((visibility("hidden")))
hidden
int next_chdir(const char *path)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions chflags.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 Gaël PORTAY
* Copyright 2022-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -22,7 +22,7 @@ static int (*sym)(const char *, int long);
static int (*sym)(const char *, unsigned long);
#endif

__attribute__((visibility("hidden")))
hidden
#ifdef __OpenBSD__
int next_chflags(const char *path, unsigned int flags)
#else
Expand Down
4 changes: 2 additions & 2 deletions chflagsat.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 Gaël PORTAY
* Copyright 2022-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -22,7 +22,7 @@ static int (*sym)(int, const char *, unsigned int, int);
static int (*sym)(int, const char *, unsigned long, int);
#endif

__attribute__((visibility("hidden")))
hidden
#ifdef __OpenBSD__
int next_chflagsat(int dfd, const char *path, unsigned int flags, int atflag)
#else
Expand Down
4 changes: 2 additions & 2 deletions chmod.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -22,7 +22,7 @@

static int (*sym)(const char *, mode_t);

__attribute__((visibility("hidden")))
hidden
int next_chmod(const char *path, mode_t mode)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions chown.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -22,7 +22,7 @@

static int (*sym)(const char *, uid_t, gid_t);

__attribute__((visibility("hidden")))
hidden
int next_chown(const char *path, uid_t owner, gid_t group)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions close.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Gaël PORTAY
* Copyright 2023-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -15,7 +15,7 @@

static int (*sym)(int);

__attribute__((visibility("hidden")))
hidden
int next_close(int fd)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions close_range.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Gaël PORTAY
* Copyright 2023-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -17,7 +17,7 @@

static int (*sym)(unsigned int, unsigned int, int);

__attribute__((visibility("hidden")))
hidden
int next_close_range(unsigned int first, unsigned int last, int flags)
{
if (!sym)
Expand Down
6 changes: 3 additions & 3 deletions closefrom.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Gaël PORTAY
* Copyright 2023-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -18,7 +18,7 @@
#if defined(__OpenBSD__) || defined(__NetBSD__)
static int (*sym)(int);

__attribute__((visibility("hidden")))
hidden
int next_closefrom(int fd)
{
if (!sym)
Expand All @@ -32,7 +32,7 @@ int next_closefrom(int fd)
#else
static void (*sym)(int);

__attribute__((visibility("hidden")))
hidden
void next_closefrom(int fd)
{
if (!sym)
Expand Down
2 changes: 1 addition & 1 deletion connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

static int (*sym)(int, const struct sockaddr *, socklen_t);

__attribute__((visibility("hidden")))
hidden
int next_connect(int socket, const struct sockaddr *addr, socklen_t addrlen)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions creat.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -22,7 +22,7 @@

static int (*sym)(const char *, mode_t);

__attribute__((visibility("hidden")))
hidden
int next_creat(const char *path, mode_t mode)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions ctermid.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Gaël PORTAY
* Copyright 2023-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -14,7 +14,7 @@

static char *(*sym)(char *);

__attribute__((visibility("hidden")))
hidden
char *next_ctermid(char *s)
{
if (!sym)
Expand Down
4 changes: 2 additions & 2 deletions dl_iterate_phdr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 Gaël PORTAY
* Copyright 2022-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -17,7 +17,7 @@

static int (*sym)(int (*)(struct dl_phdr_info *, size_t, void *), void *);

__attribute__((visibility("hidden")))
hidden
int next_dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *),
void *data)
{
Expand Down
4 changes: 2 additions & 2 deletions dlmopen.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -18,7 +18,7 @@
#ifdef __GLIBC__
static void *(*sym)(Lmid_t, const char *, int);

__attribute__((visibility("hidden")))
hidden
void *next_dlmopen(Lmid_t lmid, const char *path, int flags)

{
Expand Down
4 changes: 2 additions & 2 deletions dlopen.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2023 Gaël PORTAY
* Copyright 2021-2024 Gaël PORTAY
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
Expand All @@ -18,7 +18,7 @@

static void *(*sym)(const char *, int);

__attribute__((visibility("hidden")))
hidden
void *next_dlopen(const char *path, int flags)
{
if (!sym)
Expand Down
Loading

0 comments on commit 6d81dd7

Please sign in to comment.