Module Name:    src
Committed By:   nia
Date:           Fri Nov  1 18:48:17 UTC 2024

Modified Files:
        src/include: unistd.h
        src/lib/libc/sys: dup.2 pipe.2

Log Message:
libc: Expose pipe2 and dup3 to POSIX.2024 applications


To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/include/unistd.h
cvs rdiff -u -r1.35 -r1.36 src/lib/libc/sys/dup.2
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/sys/pipe.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.168 src/include/unistd.h:1.169
--- src/include/unistd.h:1.168	Fri Sep 20 15:52:12 2024
+++ src/include/unistd.h	Fri Nov  1 18:48:17 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.168 2024/09/20 15:52:12 kre Exp $	*/
+/*	$NetBSD: unistd.h,v 1.169 2024/11/01 18:48:17 nia Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -326,8 +326,11 @@ int	fexecve(int, char * const *, char * 
 #if (_POSIX_C_SOURCE - 0) >= 202405L || (_XOPEN_SOURCE - 0 >= 800) || \
     defined(_NETBSD_SOURCE)
 int	 getentropy(void *, size_t);
+#ifndef __LIBC12_SOURCE__
+int	 dup3(int, int, int) __RENAME(__dup3100);
+#endif
+int	 pipe2(int *, int);
 #endif
-
 
 /*
  * Implementation-defined extensions
@@ -337,9 +340,6 @@ int	 acct(const char *);
 int	 closefrom(int);
 int	 des_cipher(const char *, char *, long, int);
 int	 des_setkey(const char *);
-#ifndef __LIBC12_SOURCE__
-int	 dup3(int, int, int) __RENAME(__dup3100);
-#endif
 void	 endusershell(void);
 int	 exect(const char *, char * const *, char * const *);
 int	 execvpe(const char *, char * const *, char * const *);
@@ -373,7 +373,6 @@ int      issetugid(void);
 long	 lpathconf(const char *, int);
 int	 mkstemps(char *, int);
 int	 nfssvc(int, void *);
-int	 pipe2(int *, int);
 int	 profil(char *, size_t, unsigned long, unsigned int);
 #ifndef __PSIGNAL_DECLARED
 #define __PSIGNAL_DECLARED

Index: src/lib/libc/sys/dup.2
diff -u src/lib/libc/sys/dup.2:1.35 src/lib/libc/sys/dup.2:1.36
--- src/lib/libc/sys/dup.2:1.35	Sat Jul  6 02:23:39 2024
+++ src/lib/libc/sys/dup.2	Fri Nov  1 18:48:17 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dup.2,v 1.35 2024/07/06 02:23:39 rin Exp $
+.\"	$NetBSD: dup.2,v 1.36 2024/11/01 18:48:17 nia Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)dup.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd May 19, 2024
+.Dd November 1, 2024
 .Dt DUP 2
 .Os
 .Sh NAME
@@ -247,6 +247,10 @@ and
 .Fn dup2
 functions conform to
 .St -p1003.1-90 .
+The
+.Fn dup3
+function conforms to
+.St -p1003.1-2024 .
 .Sh HISTORY
 The
 .Fn dup3

Index: src/lib/libc/sys/pipe.2
diff -u src/lib/libc/sys/pipe.2:1.32 src/lib/libc/sys/pipe.2:1.33
--- src/lib/libc/sys/pipe.2:1.32	Fri Nov 27 16:42:00 2020
+++ src/lib/libc/sys/pipe.2	Fri Nov  1 18:48:17 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pipe.2,v 1.32 2020/11/27 16:42:00 kamil Exp $
+.\"	$NetBSD: pipe.2,v 1.33 2024/11/01 18:48:17 nia Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)pipe.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd November 27, 2020
+.Dd November 1, 2024
 .Dt PIPE 2
 .Os
 .Sh NAME
@@ -152,6 +152,10 @@ The
 .Fn pipe
 function conforms to
 .St -p1003.1-90 .
+The 
+.Fn pipe2
+function conforms to
+.St -p1003.1-2024 .
 .Sh HISTORY
 A
 .Fn pipe

Reply via email to