OSDN Git Service

Implement __x versions
authorPeter S. Mazinger <ps.m@gmx.net>
Thu, 8 Dec 2005 14:17:36 +0000 (14:17 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Thu, 8 Dec 2005 14:17:36 +0000 (14:17 -0000)
libc/misc/dirent/closedir.c
libc/misc/dirent/opendir.c
libc/sysdeps/linux/common/ioctl.c
libc/sysdeps/linux/common/unlink.c

index 25c4245..8066b58 100644 (file)
@@ -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)
index fd14213..5c9762f 100644 (file)
@@ -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)
index 9b2442d..29293f3 100644 (file)
 #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)
index 1c9aa17..4d9c3cd 100644 (file)
@@ -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)