tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \
tst-preadvwritev2 tst-preadvwritev64v2 tst-warn-wide \
tst-ldbl-warn tst-ldbl-error tst-dbl-efgcvt tst-ldbl-efgcvt \
- tst-mntent-autofs tst-syscalls tst-mntent-escape tst-select
+ tst-mntent-autofs tst-syscalls tst-mntent-escape tst-select \
+ tst-ioctl
tests-time64 := \
tst-select-time64 \
- tst-pselect-time64
+ tst-pselect-time64 \
+ tst-ioctl-time64 \
+ # tests-time64
# Tests which need libdl.
ifeq (yes,$(build-shared))
/* Perform the I/O control operation specified by REQUEST on FD.
One argument may follow; its presence and type depend on REQUEST.
Return value depends on REQUEST. Usually -1 indicates error. */
+#ifndef __USE_TIME_BITS64
extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...),
+ __ioctl_time64) __THROW;
+# else
+extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
+# define ioctl __ioctl_time64
+# endif
+#endif
__END_DECLS
--- /dev/null
+#include "tst-ioctl.c"
--- /dev/null
+/* Smoke test for ioctl.
+ Copyright (C) 2021 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, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <support/check.h>
+#include <support/xunistd.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+
+static int
+do_test (void)
+{
+ int pair[2];
+ TEST_COMPARE (socketpair (AF_UNIX, SOCK_STREAM, 0, pair), 0);
+ TEST_COMPARE (write (pair[0], "buffer", sizeof ("buffer")),
+ sizeof ("buffer"));
+ int value;
+ TEST_COMPARE (ioctl (pair[1], FIONREAD, &value), 0);
+ TEST_COMPARE (value, sizeof ("buffer"));
+ TEST_COMPARE (ioctl (pair[0], FIONREAD, &value), 0);
+ TEST_COMPARE (value, 0);
+ xclose (pair[0]);
+ xclose (pair[1]);
+ return 0;
+}
+
+#include <support/test-driver.c>
getsockname - getsockname i:ibN __getsockname getsockname
getsockopt - getsockopt i:iiiBN getsockopt
getuid - getuid Ei: __getuid getuid
-ioctl - ioctl i:iiI __ioctl ioctl
+ioctl - ioctl i:iiI __ioctl ioctl __ioctl_time64
kill - kill i:ii __kill kill
link - link i:ss __link link
listen - listen i:ii __listen listen
__globfree64_time64;
__gmtime64;
__gmtime64_r;
+ __ioctl_time64;
__localtime64;
__localtime64_r;
__lstat64_time64;
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __isnanf128 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
}
libc_hidden_def (__ioctl)
weak_alias (__ioctl, ioctl)
+#if __TIMESIZE != 64
+weak_alias (__ioctl, __ioctl_time64)
+#endif
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F
GLIBC_2.34 __globfree64_time64 F
GLIBC_2.34 __gmtime64 F
GLIBC_2.34 __gmtime64_r F
+GLIBC_2.34 __ioctl_time64 F
GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __localtime64 F
GLIBC_2.34 __localtime64_r F