extern __mode_t __umask (__mode_t __mask);
extern int __mkdir (const char *__path, __mode_t __mode);
libc_hidden_proto (__mkdir)
+
+extern int __mknodat (int fd, const char *path, mode_t mode, dev_t dev);
+libc_hidden_proto (__mknodat);
extern int __mknod (const char *__path,
__mode_t __mode, __dev_t __dev);
+libc_hidden_proto (__mknod);
+
+extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
+ __dev_t *__dev);
libc_hidden_proto (__xmknod)
-extern __inline__ int __mknod (const char *__path, __mode_t __mode,
- __dev_t __dev)
-{
- return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
-}
+extern int __xmknodat (int __ver, int __fd, const char *__path,
+ __mode_t __mode, __dev_t *__dev);
libc_hidden_proto (__xmknodat)
int __fxstat (int __ver, int __fildes, struct stat *__stat_buf);
sendfile sendfile64 copy_file_range \
utimensat futimens file_change_detection
-# These routines will be omitted from the libc shared object.
-# Instead the static object files will be included in a special archive
-# linked against when the shared library will be used.
-static-only-routines = mknod mknodat
-
others := pwd
test-srcs := ftwtest
tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
}
GLIBC_2.33 {
stat; stat64; fstat; fstat64; lstat; lstat64; fstatat; fstatat64;
+ mknod; mknodat;
}
GLIBC_PRIVATE {
__libc_fcntl64;
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
- In addition to the permissions in the GNU Lesser General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The GNU Lesser General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- Note that people who make modified versions of this file are not
- obligated to grant this special exception for their modified
- versions; it is their choice whether to do so. The GNU Lesser
- General Public License gives permission to release a modified
- version without this exception; this exception also makes it
- possible to release a modified version which carries forward this
- exception.
-
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
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-
#include <sys/types.h>
#include <sys/stat.h>
-/* This definition is only used if inlining fails for this function; see
- the last page of <sys/stat.h>. The real work is done by the `x'
- function which is passed a version number argument. We arrange in the
- makefile that when not inlined this function is always statically
- linked; that way a dynamically-linked executable always encodes the
- version number corresponding to the data structures it uses, so the `x'
- functions in the shared library can adapt without needing to recompile
- all callers. */
-
int
-attribute_hidden
__mknod (const char *path, mode_t mode, dev_t dev)
{
return __xmknod (_MKNOD_VER, path, mode, &dev);
}
-
-weak_hidden_alias (__mknod, mknod)
+libc_hidden_def (__mknod)
+weak_alias (__mknod, mknod)
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
- In addition to the permissions in the GNU Lesser General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The GNU Lesser General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- Note that people who make modified versions of this file are not
- obligated to grant this special exception for their modified
- versions; it is their choice whether to do so. The GNU Lesser
- General Public License gives permission to release a modified
- version without this exception; this exception also makes it
- possible to release a modified version which carries forward this
- exception.
-
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
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-
#include <sys/types.h>
#include <sys/stat.h>
-/* This definition is only used if inlining fails for this function; see
- the last page of <sys/stat.h>. The real work is done by the `x'
- function which is passed a version number argument. We arrange in the
- makefile that when not inlined this function is always statically
- linked; that way a dynamically-linked executable always encodes the
- version number corresponding to the data structures it uses, so the `x'
- functions in the shared library can adapt without needing to recompile
- all callers. */
-
int
-attribute_hidden
-mknodat (int fd, const char *path, mode_t mode, dev_t dev)
+__mknodat (int fd, const char *path, mode_t mode, dev_t dev)
{
return __xmknodat (_MKNOD_VER, fd, path, mode, &dev);
}
+libc_hidden_def (__mknodat)
+weak_alias (__mknodat, mknodat)
/* Set file access and modification times of the file associated with FD. */
extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
#endif
-\f
-#ifndef _MKNOD_VER
-# define _MKNOD_VER 0
-#endif
-
-extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
- __dev_t *__dev) __THROW __nonnull ((2, 4));
-
-extern int __xmknodat (int __ver, int __fd, const char *__path,
- __mode_t __mode, __dev_t *__dev)
- __THROW __nonnull ((3, 5));
#ifdef __USE_GNU
# include <bits/statx.h>
#endif
-#ifdef __USE_EXTERN_INLINES
-# ifdef __USE_MISC
-__extern_inline int
-__NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev))
-{
- return __xmknod (_MKNOD_VER, __path, __mode, &__dev);
-}
-# endif
-
-# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-# ifdef __USE_ATFILE
-__extern_inline int
-__NTH (mknodat (int __fd, const char *__path, __mode_t __mode,
- __dev_t __dev))
-{
- return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev);
-}
-# endif
-# endif
-#endif
-
__END_DECLS
/* Versions of the 'struct stat' data structure used in compatibility xstat
functions. */
#define _STAT_VER 0
+#define _MKNOD_VER 0
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
int
mkfifo (const char *path, mode_t mode)
{
- dev_t dev = 0;
- return __xmknod (_MKNOD_VER, path, mode | S_IFIFO, &dev);
+ return __mknod (path, mode | S_IFIFO, 0);
}
int
mkfifoat (int fd, const char *file, mode_t mode)
{
- dev_t dev = 0;
- return __xmknodat (_MKNOD_VER, fd, file, mode | S_IFIFO, &dev);
+ return __mknodat (fd, file, mode | S_IFIFO, 0);
}
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 0
-
-
/* Nanosecond resolution timestamps are stored in a format equivalent to
'struct timespec'. This is the type used whenever possible but the
Unix namespace rules do not allow the identifier 'timespec' to appear
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 _IO_fprintf F
#define _STAT_VER_GLIBC2_3_4 3
#define _STAT_VER_LINUX 3
#define _STAT_VER _STAT_VER_LINUX
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 0
+#define _MKNOD_VER _MKNOD_VER_LINUX
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 _Exit F
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
-/* Versions of the `struct stat' data structure. */
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 1
-#define _MKNOD_VER_SVR4 2
-#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-
-
struct stat
{
__dev_t st_dev; /* Device. */
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
#include <bits/endian.h>
#include <bits/wordsize.h>
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 0
-
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
#elif __WORDSIZE == 64 || defined __INO_T_MATCHES_INO64_T
#define _STAT_VER_KERNEL 0
#define _STAT_VER_LINUX 0
#define _STAT_VER _STAT_VER_KERNEL
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 0
+#define _MKNOD_VER _MKNOD_VER_LINUX
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 0
-
struct stat
{
__dev_t st_dev; /* Device. */
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
#define _STAT_VER_KERNEL 0
#define _STAT_VER_LINUX 1
#define _STAT_VER _STAT_VER_LINUX
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 0
+#define _MKNOD_VER _MKNOD_VER_LINUX
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 1
-#define _MKNOD_VER_SVR4 2
-#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-
-
struct stat
{
__dev_t st_dev; /* Device. */
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
#define _STAT_VER_SVR4 2
#define _STAT_VER_LINUX 3
#define _STAT_VER _STAT_VER_LINUX
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 1
-#define _MKNOD_VER_SVR4 2
-#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-
#ifndef __USE_FILE_OFFSET64
struct stat
{
#define _STAT_VER_SVR4 2
#define _STAT_VER_LINUX 3
#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX
#include <sgidefs.h>
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 1
-#define _MKNOD_VER_SVR4 2
-#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-
#if _MIPS_SIM == _ABIO32
/* Structure describing file characteristics. */
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
#define _STAT_VER_SVR4 2
#define _STAT_VER_LINUX 3
#define _STAT_VER _STAT_VER_LINUX
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
#include <bits/wordsize.h>
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 1
-#define _MKNOD_VER_SVR4 2
-#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-
#if __WORDSIZE == 32
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
#else
# define _STAT_VER _STAT_VER_KERNEL
#endif
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX
GLIBC_2.33 mkdtemp F
GLIBC_2.33 mkfifo F
GLIBC_2.33 mkfifoat F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 mkostemp F
GLIBC_2.33 mkostemp64 F
GLIBC_2.33 mkostemps F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
#include <bits/wordsize.h>
#if __WORDSIZE == 64
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 0
-#else
-/* Versions of the `xmknod' interface. */
-# define _MKNOD_VER_LINUX 1
-# define _MKNOD_VER_SVR4 2
-# define _MKNOD_VER _MKNOD_VER_LINUX
-#endif
-
-#if __WORDSIZE == 64
struct stat
{
__dev_t st_dev; /* Device. */
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 _IO_fprintf F
#if __WORDSIZE == 64
# define _STAT_VER_KERNEL 0
# define _STAT_VER_LINUX 1
-# define _STAT_VER _STAT_VER_LINUX
+# define _MKNOD_VER_LINUX 0
#else
# define _STAT_VER_LINUX_OLD 1
# define _STAT_VER_KERNEL 1
# define _STAT_VER_SVR4 2
# define _STAT_VER_LINUX 3
-# define _STAT_VER _STAT_VER_LINUX
+# define _MKNOD_VER_LINUX 1
+# define _MKNOD_VER_SVR4 2
#endif
+#define _STAT_VER _STAT_VER_LINUX
+#define _MKNOD_VER _MKNOD_VER_LINUX
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 1
-#define _MKNOD_VER_SVR4 2
-#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-
-
struct stat
{
__dev_t st_dev; /* Device. */
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
#define _STAT_VER_SVR4 2
#define _STAT_VER_LINUX 3
#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX
#ifndef _BITS_STAT_H
#define _BITS_STAT_H 1
-/* Versions of the `struct stat' data structure. */
-#ifndef __x86_64__
-/* i386 versions of the `xmknod' interface. */
-# define _MKNOD_VER_LINUX 1
-# define _MKNOD_VER_SVR4 2
-# define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-#else
-/* x86-64 versions of the `xmknod' interface. */
-# define _MKNOD_VER_LINUX 0
-#endif
-
struct stat
{
__dev_t st_dev; /* Device. */
# define _STAT_VER_KERNEL 1
# define _STAT_VER_SVR4 2
# define _STAT_VER_LINUX 3
+# define _MKNOD_VER_LINUX 1
+# define _MKNOD_VER_SVR4 2
#else
# define _STAT_VER_KERNEL 0
# define _STAT_VER_LINUX 1
+# define _MKNOD_VER_LINUX 0
#endif
#define _STAT_VER _STAT_VER_LINUX
+#define _MKNOD_VER _MKNOD_VER_LINUX
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
GLIBC_2.4 __confstr_chk F
GLIBC_2.33 lstat F
GLIBC_2.33 lstat64 F
GLIBC_2.33 mallinfo2 F
+GLIBC_2.33 mknod F
+GLIBC_2.33 mknodat F
GLIBC_2.33 stat F
GLIBC_2.33 stat64 F
#define _STAT_VER_SVR4 2
#define _STAT_VER_LINUX 3
#define _STAT_VER _STAT_VER_LINUX
+
+/* Versions of the 'xmknod' interface used in compatibility xmknod
+ functions. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX