From c43b8c4bea7980e6830d5ecfbc301fb5cd89dec5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 18 Jan 1996 00:35:55 +0000 Subject: Wed Jan 17 11:04:58 1996 Roland McGrath * io/sys/stat.h (_STAT_VER, _MKNOD_VER): New macros. (__xstat, __fxstat, __lxstat, __xmknod): Declare new functions. [__GNUC__] (stat, fstat, lstat, mknod): Define these (and __ names) as `extern inline's calling the `x' functions. * io/fstat.c: New file. * io/lstat.c: New file. * io/stat.c: New file. * sysdeps/generic/lstat.c: File removed. * sysdeps/generic/lxstat.c: New file. * sysdeps/mach/hurd/fstat.c: File removed. * sysdeps/mach/hurd/fxstat.c: New file. * sysdeps/mach/hurd/lstat.c: File removed. * sysdeps/mach/hurd/lxstat.c: New file. * sysdeps/mach/hurd/mknod.c: File removed. * sysdeps/mach/hurd/stat.c: File removed. * sysdeps/mach/hurd/xmknod.c: New file. * sysdeps/mach/hurd/xstat.c: New file. * sysdeps/stub/fstat.c: File removed. * sysdeps/stub/fxstat.c: New file. * sysdeps/stub/lstat.c: File removed. * sysdeps/stub/lxstat.c: New file. * sysdeps/stub/mknod.c: File removed. * sysdeps/stub/stat.c: File removed. * sysdeps/stub/xmknod.c: New file. * sysdeps/stub/xstat.c: New file. * sysdeps/unix/common/lstat.S: File removed. * sysdeps/unix/common/lxstat.c: New file. * sysdeps/unix/fstat.S: File removed. * sysdeps/unix/fxstat.c: New file. * sysdeps/unix/mknod.S: File removed. * sysdeps/unix/stat.S: File removed. * sysdeps/unix/sysv/linux/fstat.c: File removed. * sysdeps/unix/sysv/linux/i386/fxstat.S: File removed. * sysdeps/unix/sysv/linux/i386/lxstat.S: File removed. * sysdeps/unix/sysv/linux/i386/xmknod.S: File removed. * sysdeps/unix/sysv/linux/i386/xstat.S: File removed. * sysdeps/unix/sysv/linux/lstat.c: File removed. * sysdeps/unix/sysv/linux/mknod.c: File removed. * sysdeps/unix/sysv/linux/stat.c: File removed. * sysdeps/unix/sysv/sysv4/i386/fstat.S: File removed. * sysdeps/unix/sysv/sysv4/i386/lstat.S: File removed. * sysdeps/unix/sysv/sysv4/i386/mknod.S: File removed. * sysdeps/unix/sysv/sysv4/i386/stat.S: File removed. * sysdeps/unix/xmknod.c: New file. * sysdeps/unix/xstat.c: New file. * sysdeps/unix/mkfifo.c: Use __xmknod instead of __mknod. * misc/Makefile (routines): Remove mknod. * io/sys/stat.h (_STAT_VER, _MKNOD_VER): New macros. (__xstat, __fxstat, __lxstat, __xmknod): Declare new functions. [__GNUC__] (stat, fstat, lstat, mknod): Define these (and __ names) as `extern inline's calling the `x' functions. * io/fstat.c: New file. * io/lstat.c: New file. * io/stat.c: New file. * sysdeps/generic/lstat.c: File removed. * sysdeps/generic/lxstat.c: New file. * sysdeps/mach/hurd/fstat.c: File removed. * sysdeps/mach/hurd/fxstat.c: New file. * sysdeps/mach/hurd/lstat.c: File removed. * sysdeps/mach/hurd/lxstat.c: New file. * sysdeps/mach/hurd/mknod.c: File removed. * sysdeps/mach/hurd/stat.c: File removed. * sysdeps/mach/hurd/xmknod.c: New file. * sysdeps/mach/hurd/xstat.c: New file. * sysdeps/stub/fstat.c: File removed. * sysdeps/stub/fxstat.c: New file. * sysdeps/stub/lstat.c: File removed. * sysdeps/stub/lxstat.c: New file. * sysdeps/stub/mknod.c: File removed. * sysdeps/stub/stat.c: File removed. * sysdeps/stub/xmknod.c: New file. * sysdeps/stub/xstat.c: New file. * sysdeps/unix/common/lstat.S: File removed. * sysdeps/unix/common/lxstat.c: New file. * sysdeps/unix/fstat.S: File removed. * sysdeps/unix/fxstat.c: New file. * sysdeps/unix/mknod.S: File removed. * sysdeps/unix/stat.S: File removed. * sysdeps/unix/sysv/linux/fstat.c: File removed. * sysdeps/unix/sysv/linux/i386/fxstat.S: File removed. * sysdeps/unix/sysv/linux/i386/lxstat.S: File removed. * sysdeps/unix/sysv/linux/i386/xmknod.S: File removed. * sysdeps/unix/sysv/linux/i386/xstat.S: File removed. * sysdeps/unix/sysv/linux/lstat.c: File removed. * sysdeps/unix/sysv/linux/mknod.c: File removed. * sysdeps/unix/sysv/linux/stat.c: File removed. * sysdeps/unix/sysv/sysv4/i386/fstat.S: File removed. * sysdeps/unix/sysv/sysv4/i386/lstat.S: File removed. * sysdeps/unix/sysv/sysv4/i386/mknod.S: File removed. * sysdeps/unix/sysv/sysv4/i386/stat.S: File removed. * sysdeps/unix/xmknod.c: New file. * sysdeps/unix/xstat.c: New file. * sysdeps/unix/mkfifo.c: Use __xmknod instead of __mknod. * misc/Makefile (routines): Remove mknod. * sysdeps/ieee754/ieee754.h (union ieee854_long_double.ieee_nan): Add missing ; in little-endian case. --- sysdeps/stub/fstat.c | 44 -------------------------------------------- sysdeps/stub/fxstat.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ sysdeps/stub/lstat.c | 40 ---------------------------------------- sysdeps/stub/lxstat.c | 39 +++++++++++++++++++++++++++++++++++++++ sysdeps/stub/mknod.c | 36 ------------------------------------ sysdeps/stub/stat.c | 39 --------------------------------------- sysdeps/stub/xmknod.c | 40 ++++++++++++++++++++++++++++++++++++++++ sysdeps/stub/xstat.c | 38 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 166 insertions(+), 159 deletions(-) delete mode 100644 sysdeps/stub/fstat.c create mode 100644 sysdeps/stub/fxstat.c delete mode 100644 sysdeps/stub/lstat.c create mode 100644 sysdeps/stub/lxstat.c delete mode 100644 sysdeps/stub/mknod.c delete mode 100644 sysdeps/stub/stat.c create mode 100644 sysdeps/stub/xmknod.c create mode 100644 sysdeps/stub/xstat.c (limited to 'sysdeps/stub') diff --git a/sysdeps/stub/fstat.c b/sysdeps/stub/fstat.c deleted file mode 100644 index 49981bbd52..0000000000 --- a/sysdeps/stub/fstat.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (C) 1991, 1995 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -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 -#include -#include -#include - -/* Get information about the file descriptor FD in BUF. */ -int -DEFUN(__fstat, (fd, buf), int fd AND struct stat *buf) -{ - if (fd < 0) - { - errno = EBADF; - return -1; - } - else if (buf == NULL) - { - errno = EINVAL; - return -1; - } - - errno = ENOSYS; - return -1; -} -stub_warning (fstat) - -weak_alias (__fstat, fstat) diff --git a/sysdeps/stub/fxstat.c b/sysdeps/stub/fxstat.c new file mode 100644 index 0000000000..7c1eeff2cb --- /dev/null +++ b/sysdeps/stub/fxstat.c @@ -0,0 +1,49 @@ +/* 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 +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +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 +#include +#include + +/* Get information about the file descriptor FD in BUF. */ +int +__fxstat (int vers, int fd, struct stat *buf) +{ + if (vers != _STAT_VER) + { + errno = EINVAL; + return -1; + } + + if (fd < 0) + { + errno = EBADF; + return -1; + } + else if (buf == NULL) + { + errno = EINVAL; + return -1; + } + + errno = ENOSYS; + return -1; +} +stub_warning (__fxstat) + +weak_alias (__fxstat, _fxstat) diff --git a/sysdeps/stub/lstat.c b/sysdeps/stub/lstat.c deleted file mode 100644 index 0e69a086e3..0000000000 --- a/sysdeps/stub/lstat.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 1991, 1995 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -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 -#include -#include -#include - -/* 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) -{ - if (file == NULL || buf == NULL) - { - errno = EINVAL; - return -1; - } - - errno = ENOSYS; - return -1; -} -stub_warning (lstat) - -weak_alias (__lstat, lstat) diff --git a/sysdeps/stub/lxstat.c b/sysdeps/stub/lxstat.c new file mode 100644 index 0000000000..5729925ff3 --- /dev/null +++ b/sysdeps/stub/lxstat.c @@ -0,0 +1,39 @@ +/* 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 +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +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 +#include +#include + +/* Get file information about FILE in BUF. + If FILE is a symbolic link, do not follow it. */ +int +__lxstat (int vers, const char *file, struct stat *buf) +{ + if (vers != _STAT_VER || file == NULL || buf == NULL) + { + errno = EINVAL; + return -1; + } + + errno = ENOSYS; + return -1; +} +stub_warning (__lxstat) + +weak_alias (__lxstat, _lxstat) diff --git a/sysdeps/stub/mknod.c b/sysdeps/stub/mknod.c deleted file mode 100644 index 66f88aa36f..0000000000 --- a/sysdeps/stub/mknod.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1991, 1993, 1995 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -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 -#include -#include -#include - -/* Create a device file named PATH, with permission and special bits MODE - 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) -{ - errno = ENOSYS; - return -1; -} -stub_warning (mknod) - -weak_alias (__mknod, mknod) diff --git a/sysdeps/stub/stat.c b/sysdeps/stub/stat.c deleted file mode 100644 index f24ce64e0c..0000000000 --- a/sysdeps/stub/stat.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1991, 1995 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -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 -#include -#include -#include - -/* Get file information about FILE in BUF. */ -int -DEFUN(__stat, (file, buf), CONST char *file AND struct stat *buf) -{ - if (file == NULL || buf == NULL) - { - errno = EINVAL; - return -1; - } - - errno = ENOSYS; - return -1; -} -stub_warning (stat) - -weak_alias (__stat, stat) diff --git a/sysdeps/stub/xmknod.c b/sysdeps/stub/xmknod.c new file mode 100644 index 0000000000..6d365cbe0c --- /dev/null +++ b/sysdeps/stub/xmknod.c @@ -0,0 +1,40 @@ +/* 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 +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +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 +#include +#include + +/* Create a device file named PATH, with permission and special bits MODE + and device number DEV (which can be constructed from major and minor + device numbers with the `makedev' macro above). */ +int +__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 (__xmknod) + +weak_alias (__xmknod, _xmknod) diff --git a/sysdeps/stub/xstat.c b/sysdeps/stub/xstat.c new file mode 100644 index 0000000000..ad67aa9fec --- /dev/null +++ b/sysdeps/stub/xstat.c @@ -0,0 +1,38 @@ +/* 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 +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +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 +#include +#include + +/* Get file information about FILE in BUF. */ +int +__xstat (int vers, const char *file, struct stat *buf) +{ + if (vers != _STAT_VER || file == NULL || buf == NULL) + { + errno = EINVAL; + return -1; + } + + errno = ENOSYS; + return -1; +} +stub_warning (stat) + +weak_alias (__xstat, _xstat) -- cgit v1.2.3