From 30a0b167d347dd80807d167ee85bf58264fb8b76 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 19 Oct 2020 09:35:58 -0300 Subject: Reinstate ftime and add deprecate message on ftime usage This patch revert "Move ftime to a compatibility symbol" (commit 14633d3e568eb9770a7e5046eff257113e0453fb). Checked on x86_64-linux-gnu and i686-linux-gnu. --- time/sys/timeb.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 time/sys/timeb.h (limited to 'time/sys/timeb.h') diff --git a/time/sys/timeb.h b/time/sys/timeb.h new file mode 100644 index 0000000000..d6cdf29111 --- /dev/null +++ b/time/sys/timeb.h @@ -0,0 +1,45 @@ +/* Copyright (C) 1994-2020 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 + . */ + +#ifndef _SYS_TIMEB_H +#define _SYS_TIMEB_H 1 + +#include + +#include + +__BEGIN_DECLS + +/* Structure returned by the `ftime' function. */ + +struct timeb + { + time_t time; /* Seconds since epoch, as from `time'. */ + unsigned short int millitm; /* Additional milliseconds. */ + short int timezone; /* Minutes west of GMT. */ + short int dstflag; /* Nonzero if Daylight Savings Time used. */ + }; + +/* Fill in TIMEBUF with information about the current time. */ + +extern int ftime (struct timeb *__timebuf) + __nonnull ((1)) + __attribute_deprecated_msg__ ("Use gettimeofday or clock_gettime instead"); + +__END_DECLS + +#endif /* sys/timeb.h */ -- cgit v1.2.3