summaryrefslogtreecommitdiff
path: root/time/tst-ftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/tst-ftime.c')
-rw-r--r--time/tst-ftime.c38
1 files changed, 13 insertions, 25 deletions
diff --git a/time/tst-ftime.c b/time/tst-ftime.c
index 6978feb0f1..44d82620af 100644
--- a/time/tst-ftime.c
+++ b/time/tst-ftime.c
@@ -16,24 +16,12 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <features.h>
+#include <sys/timeb.h>
+#include <libc-diag.h>
-#include <shlib-compat.h>
-#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_33)
-#include <time.h>
#include <support/check.h>
-compat_symbol_reference (libc, ftime, ftime, GLIBC_2_0);
-
-struct timeb
- {
- time_t time;
- unsigned short int millitm;
- short int timezone;
- short int dstflag;
- };
-
-extern int ftime (struct timeb *__timebuf);
-
static int
do_test (void)
{
@@ -44,23 +32,23 @@ do_test (void)
{
prev = curr;
- /* ftime was deprecated on 2.31 and removed on 2.33. */
+ /* ftime was deprecated on 2.31. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
+
TEST_COMPARE (ftime (&curr), 0);
- TEST_VERIFY_EXIT (curr.time >= prev.time);
+
+ DIAG_POP_NEEDS_COMMENT;
+
+ TEST_VERIFY (curr.time >= prev.time);
+
if (curr.time == prev.time)
- TEST_VERIFY_EXIT (curr.millitm >= prev.millitm);
+ TEST_VERIFY (curr.millitm >= prev.millitm);
if (curr.time > prev.time)
sec ++;
}
return 0;
}
-#else
-static int
-do_test (void)
-{
- return EXIT_UNSUPPORTED;
-}
-#endif
#include <support/test-driver.c>