Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142546449
D39994.id121641.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D39994.id121641.diff
View Options
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -92,6 +92,7 @@
.include "${LIBC_SRCTOP}/${LIBC_ARCH}/Makefile.inc"
.include "${LIBC_SRCTOP}/csu/Makefile.inc"
.include "${LIBC_SRCTOP}/db/Makefile.inc"
+.include "${LIBC_SRCTOP}/compat-41/Makefile.inc"
.include "${LIBC_SRCTOP}/compat-43/Makefile.inc"
.include "${LIBC_SRCTOP}/gdtoa/Makefile.inc"
.include "${LIBC_SRCTOP}/gen/Makefile.inc"
diff --git a/lib/libc/compat-41/Makefile.inc b/lib/libc/compat-41/Makefile.inc
new file mode 100644
--- /dev/null
+++ b/lib/libc/compat-41/Makefile.inc
@@ -0,0 +1,11 @@
+# @(#)Makefile.inc 8.1 (Berkeley) 6/2/93
+# $FreeBSD$
+
+# compat-41 sources
+.PATH: ${LIBC_SRCTOP}/compat-41
+
+SRCS+= ftime.c
+
+SYM_MAPS+=${LIBC_SRCTOP}/compat-41/Symbol.map
+
+MAN+= ftime.3
diff --git a/lib/libc/compat-41/Symbol.map b/lib/libc/compat-41/Symbol.map
new file mode 100644
--- /dev/null
+++ b/lib/libc/compat-41/Symbol.map
@@ -0,0 +1,10 @@
+/*
+ * $FreeBSD$
+ */
+
+FBSD_1.7 {
+ ftime;
+};
+
+FBSDprivate_1.0 {
+};
diff --git a/lib/libcompat/4.1/ftime.3 b/lib/libc/compat-41/ftime.3
rename from lib/libcompat/4.1/ftime.3
rename to lib/libc/compat-41/ftime.3
--- a/lib/libcompat/4.1/ftime.3
+++ b/lib/libc/compat-41/ftime.3
@@ -28,14 +28,14 @@
.\" @(#)ftime.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd August 4, 2018
+.Dd May 6, 2023
.Dt FTIME 3
.Os
.Sh NAME
.Nm ftime
.Nd get date and time
.Sh LIBRARY
-.Lb libcompat
+.Lb libc
.Sh SYNOPSIS
.In sys/types.h
.In sys/timeb.h
diff --git a/lib/libcompat/4.1/ftime.c b/lib/libc/compat-41/ftime.c
rename from lib/libcompat/4.1/ftime.c
rename to lib/libc/compat-41/ftime.c
--- a/lib/libcompat/4.1/ftime.c
+++ b/lib/libc/compat-41/ftime.c
@@ -35,7 +35,15 @@
#include <sys/types.h>
#include <sys/time.h>
+
+/* Let's not generate warnings about deprecation during libc build. */
+#ifdef __GNUC__
+#undef __GNUC__
+#include <sys/timeb.h>
+#define __GNUC__
+#else
#include <sys/timeb.h>
+#endif
int
ftime(struct timeb *tbp)
diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile
--- a/lib/libcompat/Makefile
+++ b/lib/libcompat/Makefile
@@ -8,12 +8,7 @@
WARNS?= 0
-.PATH: ${.CURDIR}/4.1 ${.CURDIR}/4.3 ${.CURDIR}/4.4
-
-# compat 4.1 sources
-SRCS+= ftime.c
-
-MAN+= 4.1/ftime.3
+.PATH: ${.CURDIR}/4.3 ${.CURDIR}/4.4
# compat 4.3 sources
SRCS+= re_comp.c rexec.c
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 8:37 PM (17 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27819730
Default Alt Text
D39994.id121641.diff (2 KB)
Attached To
Mode
D39994: libutil: move ftime to libutil
Attached
Detach File
Event Timeline
Log In to Comment