aboutsummaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/euidaccess.c40
-rw-r--r--io/fchdir.c33
-rw-r--r--io/fchmod.c42
-rw-r--r--io/fchown.c43
-rw-r--r--io/fchownat.c51
-rw-r--r--io/fcntl.c41
-rw-r--r--io/flock.c36
-rw-r--r--io/fstatfs.c34
-rw-r--r--io/fstatfs64.c32
-rw-r--r--io/fstatvfs.c33
-rw-r--r--io/fstatvfs64.c32
-rw-r--r--io/fxstat.c50
-rw-r--r--io/fxstat64.c49
-rw-r--r--io/fxstatat.c49
-rw-r--r--io/fxstatat64.c50
-rw-r--r--io/getcwd.c40
-rw-r--r--io/isatty.c34
-rw-r--r--io/lchmod.c33
-rw-r--r--io/lchown.c43
-rw-r--r--io/link.c42
-rw-r--r--io/lockf.c74
-rw-r--r--io/lockf64.c79
-rw-r--r--io/lseek64.c49
-rw-r--r--io/lxstat.c27
-rw-r--r--io/lxstat64.c39
-rw-r--r--io/mkdir.c43
-rw-r--r--io/mkdirat.c58
-rw-r--r--io/mkfifo.c43
-rw-r--r--io/mkfifoat.c60
-rw-r--r--io/mknod.c62
-rw-r--r--io/mknodat.c60
-rw-r--r--io/open.c54
-rw-r--r--io/open64.c57
-rw-r--r--io/openat.c69
-rw-r--r--io/openat64.c69
-rw-r--r--io/pipe.c44
-rw-r--r--io/poll.c39
-rw-r--r--io/posix_fadvise.c31
-rw-r--r--io/posix_fadvise64.c31
-rw-r--r--io/posix_fallocate.c31
-rw-r--r--io/posix_fallocate64.c31
-rw-r--r--io/read.c49
-rw-r--r--io/readlink.c37
-rw-r--r--io/rmdir.c41
-rw-r--r--io/sendfile.c33
-rw-r--r--io/sendfile64.c33
-rw-r--r--io/statfs.c35
-rw-r--r--io/statfs64.c32
-rw-r--r--io/statvfs.c34
-rw-r--r--io/statvfs64.c32
-rw-r--r--io/symlink.c42
-rw-r--r--io/ttyname.c38
-rw-r--r--io/ttyname_r.c37
-rw-r--r--io/umask.c34
-rw-r--r--io/unlink.c41
-rw-r--r--io/unlinkat.c49
-rw-r--r--io/utime.c43
-rw-r--r--io/write.c50
-rw-r--r--io/xmknod.c48
-rw-r--r--io/xmknodat.c63
-rw-r--r--io/xstat.c39
-rw-r--r--io/xstat64.c38
62 files changed, 2705 insertions, 0 deletions
diff --git a/io/euidaccess.c b/io/euidaccess.c
new file mode 100644
index 0000000000..028fe9085c
--- /dev/null
+++ b/io/euidaccess.c
@@ -0,0 +1,40 @@
+/* Test for access to FILE using effective UID and GID. Stub version.
+ Copyright (C) 1991, 1995, 1996, 1997 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+
+int
+__euidaccess (file, type)
+ const char *file;
+ int type;
+{
+ if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+weak_alias (__euidaccess, euidaccess)
+stub_warning (euidaccess)
+#include <stub-tag.h>
diff --git a/io/fchdir.c b/io/fchdir.c
new file mode 100644
index 0000000000..db1e4f8f35
--- /dev/null
+++ b/io/fchdir.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991, 1995, 1996, 1997 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+
+/* Change the current directory to FD. */
+int
+fchdir (fd)
+ int fd;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (fchdir)
+#include <stub-tag.h>
diff --git a/io/fchmod.c b/io/fchmod.c
new file mode 100644
index 0000000000..4b5eacb3eb
--- /dev/null
+++ b/io/fchmod.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+/* Change the protections of the file FD refers to to MODE. */
+int
+__fchmod (fd, mode)
+ int fd;
+ mode_t mode;
+{
+ if (fd < 0)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (fchmod)
+
+weak_alias (__fchmod, fchmod)
+#include <stub-tag.h>
diff --git a/io/fchown.c b/io/fchown.c
new file mode 100644
index 0000000000..e0d42dd293
--- /dev/null
+++ b/io/fchown.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* Change the owner and group of the file referred to by FD. */
+int
+__fchown (fd, owner, group)
+ int fd;
+ uid_t owner;
+ gid_t group;
+{
+ if (fd < 0)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (fchown)
+
+weak_alias (__fchown, fchown)
+#include <stub-tag.h>
diff --git a/io/fchownat.c b/io/fchownat.c
new file mode 100644
index 0000000000..f6921c9012
--- /dev/null
+++ b/io/fchownat.c
@@ -0,0 +1,51 @@
+/* Copyright (C) 2005 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* Change the owner and group of FILE. */
+int
+fchownat (fd, file, owner, group, flag)
+ int fd;
+ const char *file;
+ uid_t owner;
+ gid_t group;
+ int flag;
+{
+ if (file == NULL || (flag & ~AT_SYMLINK_NOFOLLOW) != 0)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ if (fd < 0 && fd != AT_FDCWD)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (fchownat)
+
+#include <stub-tag.h>
diff --git a/io/fcntl.c b/io/fcntl.c
new file mode 100644
index 0000000000..db6fbc399c
--- /dev/null
+++ b/io/fcntl.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+
+/* Perform file control operations on FD. */
+int
+__fcntl (fd, cmd)
+ int fd;
+ int cmd;
+{
+ if (fd < 0)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+libc_hidden_def (__fcntl)
+stub_warning (fcntl)
+
+weak_alias (__fcntl, fcntl)
+#include <stub-tag.h>
diff --git a/io/flock.c b/io/flock.c
new file mode 100644
index 0000000000..db3bfcfcbe
--- /dev/null
+++ b/io/flock.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1992, 1995, 1996, 1997 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/file.h>
+
+/* Apply or remove an advisory lock, according to OPERATION,
+ on the file FD refers to. */
+int
+__flock (fd, operation)
+ int fd;
+ int operation;