]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2/gettimeofday.2: Declare functions with [[deprecated]]
authorCollin Funk <collin.funk1@gmail.com>
Thu, 19 Jun 2025 22:43:49 +0000 (15:43 -0700)
committerAlejandro Colomar <alx@kernel.org>
Sun, 27 Jul 2025 11:12:07 +0000 (13:12 +0200)
As documented in the STANDARDS section, gettimeofday(2) was deprecated
in POSIX.1-2008 and removed in POSIX.1-2024.  Mark it and
settimeofday(2) with [[deprecated]], and mention clock_settime(2) as a
modern and standardized alternative to settimeofday(2).

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Message-ID: <2d37d5a9251af3c1d25cf8e73e3585a9955d5772.1750373011.git.collin.funk1@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/gettimeofday.2

index d954a253facef013a0861ed55c95155ad2a5ae17..b36b5a1783a29e9a927567f3efc7e7a0392ade96 100644 (file)
@@ -12,8 +12,10 @@ Standard C library
 .nf
 .B #include <sys/time.h>
 .P
+.B [[deprecated]]
 .BI "int gettimeofday(struct timeval *restrict " tv ,
 .BI "                 struct timezone *_Nullable restrict " tz );
+.B [[deprecated]]
 .BI "int settimeofday(const struct timeval *" tv ,
 .BI "                 const struct timezone *_Nullable " tz );
 .fi
@@ -184,6 +186,10 @@ POSIX.1-2008 marked
 as obsolete, recommending the use of
 .BR clock_gettime (2)
 instead.
+Likewise,
+.BR clock_settime (2)
+should be used instead of
+.BR settimeofday ().
 POSIX.1-2024 removed
 .BR gettimeofday ().
 .P