summaryrefslogtreecommitdiff
path: root/sysdeps/stub
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/stub')
-rw-r--r--sysdeps/stub/fxstat.c (renamed from sysdeps/stub/fstat.c)15
-rw-r--r--sysdeps/stub/lxstat.c (renamed from sysdeps/stub/lstat.c)11
-rw-r--r--sysdeps/stub/xmknod.c (renamed from sysdeps/stub/mknod.c)16
-rw-r--r--sysdeps/stub/xstat.c (renamed from sysdeps/stub/stat.c)9
4 files changed, 29 insertions, 22 deletions
diff --git a/sysdeps/stub/fstat.c b/sysdeps/stub/fxstat.c
index 49981bbd52..7c1eeff2cb 100644
--- a/sysdeps/stub/fstat.c
+++ b/sysdeps/stub/fxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,15 +16,20 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
/* Get information about the file descriptor FD in BUF. */
int
-DEFUN(__fstat, (fd, buf), int fd AND struct stat *buf)
+__fxstat (int vers, int fd, struct stat *buf)
{
+ if (vers != _STAT_VER)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
if (fd < 0)
{
errno = EBADF;
@@ -39,6 +44,6 @@ DEFUN(__fstat, (fd, buf), int fd AND struct stat *buf)
errno = ENOSYS;
return -1;
}
-stub_warning (fstat)
+stub_warning (__fxstat)
-weak_alias (__fstat, fstat)
+weak_alias (__fxstat, _fxstat)
diff --git a/sysdeps/stub/lstat.c b/sysdeps/stub/lxstat.c
index 0e69a086e3..5729925ff3 100644
--- a/sysdeps/stub/lstat.c
+++ b/sysdeps/stub/lxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
@@ -24,9 +23,9 @@ Cambridge, MA 02139, USA. */
/* Get file information about FILE in BUF.
If FILE is a symbolic link, do not follow it. */
int
-DEFUN(__lstat, (file, buf), CONST char *file AND struct stat *buf)
+__lxstat (int vers, const char *file, struct stat *buf)
{
- if (file == NULL || buf == NULL)
+ if (vers != _STAT_VER || file == NULL || buf == NULL)
{
errno = EINVAL;
return -1;
@@ -35,6 +34,6 @@ DEFUN(__lstat, (file, buf), CONST char *file AND struct stat *buf)
errno = ENOSYS;
return -1;
}
-stub_warning (lstat)
+stub_warning (__lxstat)
-weak_alias (__lstat, lstat)
+weak_alias (__lxstat, _lxstat)
diff --git a/sysdeps/stub/mknod.c b/sysdeps/stub/xmknod.c
index 66f88aa36f..6d365cbe0c 100644
--- a/sysdeps/stub/mknod.c
+++ b/sysdeps/stub/xmknod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -25,12 +24,17 @@ Cambridge, MA 02139, USA. */
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
int
-DEFUN(__mknod, (path, mode, dev),
- CONST char *path AND mode_t mode AND dev_t dev)
+__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
{
+ if (vers != _MKNOD_VER)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
errno = ENOSYS;
return -1;
}
-stub_warning (mknod)
+stub_warning (__xmknod)
-weak_alias (__mknod, mknod)
+weak_alias (__xmknod, _xmknod)
diff --git a/sysdeps/stub/stat.c b/sysdeps/stub/xstat.c
index f24ce64e0c..ad67aa9fec 100644
--- a/sysdeps/stub/stat.c
+++ b/sysdeps/stub/xstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,16 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/stat.h>
#include <stddef.h>
/* Get file information about FILE in BUF. */
int
-DEFUN(__stat, (file, buf), CONST char *file AND struct stat *buf)
+__xstat (int vers, const char *file, struct stat *buf)
{
- if (file == NULL || buf == NULL)
+ if (vers != _STAT_VER || file == NULL || buf == NULL)
{
errno = EINVAL;
return -1;
@@ -36,4 +35,4 @@ DEFUN(__stat, (file, buf), CONST char *file AND struct stat *buf)
}
stub_warning (stat)
-weak_alias (__stat, stat)
+weak_alias (__xstat, _xstat)