summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:17:36 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:17:36 +0000
commit942357a798dd789d081616ce696f1221f7d27dd2 (patch)
treea09bd1888870becbf5b9a7ffd5dc0f4eb3d2bbb9 /libc
parent55829cec8a8bd99c1129e58e18222382a1e96823 (diff)
Implement __x versions
Diffstat (limited to 'libc')
-rw-r--r--libc/misc/dirent/closedir.c4
-rw-r--r--libc/misc/dirent/opendir.c3
-rw-r--r--libc/sysdeps/linux/common/ioctl.c5
-rw-r--r--libc/sysdeps/linux/common/unlink.c4
4 files changed, 10 insertions, 6 deletions
diff --git a/libc/misc/dirent/closedir.c b/libc/misc/dirent/closedir.c
index 25c424566..8066b5861 100644
--- a/libc/misc/dirent/closedir.c
+++ b/libc/misc/dirent/closedir.c
@@ -4,8 +4,7 @@
#include <unistd.h>
#include "dirstream.h"
-
-int closedir(DIR * dir)
+int attribute_hidden __closedir(DIR * dir)
{
int fd;
@@ -27,3 +26,4 @@ int closedir(DIR * dir)
free(dir);
return __close(fd);
}
+strong_alias(__closedir,closedir)
diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c
index fd14213a5..5c9762f85 100644
--- a/libc/misc/dirent/opendir.c
+++ b/libc/misc/dirent/opendir.c
@@ -11,7 +11,7 @@
/* opendir just makes an open() call - it return NULL if it fails
* (open sets errno), otherwise it returns a DIR * pointer.
*/
-DIR *opendir(const char *name)
+DIR attribute_hidden *__opendir(const char *name)
{
int fd;
struct stat statbuf;
@@ -54,3 +54,4 @@ DIR *opendir(const char *name)
__pthread_mutex_init(&(ptr->dd_lock), NULL);
return ptr;
}
+strong_alias(__opendir,opendir)
diff --git a/libc/sysdeps/linux/common/ioctl.c b/libc/sysdeps/linux/common/ioctl.c
index 9b2442d0a..29293f359 100644
--- a/libc/sysdeps/linux/common/ioctl.c
+++ b/libc/sysdeps/linux/common/ioctl.c
@@ -12,9 +12,10 @@
#include <sys/ioctl.h>
#define __NR___syscall_ioctl __NR_ioctl
+static inline
_syscall3(int, __syscall_ioctl, int, fd, unsigned long int, request, void *, arg);
-int ioctl(int fd, unsigned long int request, ...)
+int attribute_hidden __ioctl(int fd, unsigned long int request, ...)
{
void *arg;
va_list list;
@@ -25,4 +26,4 @@ int ioctl(int fd, unsigned long int request, ...)
va_end(list);
return __syscall_ioctl(fd, request, arg);
}
-
+strong_alias(__ioctl,ioctl)
diff --git a/libc/sysdeps/linux/common/unlink.c b/libc/sysdeps/linux/common/unlink.c
index 1c9aa17cf..4d9c3cda9 100644
--- a/libc/sysdeps/linux/common/unlink.c
+++ b/libc/sysdeps/linux/common/unlink.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, unlink, const char *, pathname);
+#define __NR___unlink __NR_unlink
+attribute_hidden _syscall1(int, __unlink, const char *, pathname);
+strong_alias(__unlink,unlink)