git: 304cdac7385a - main - lib{c,sys}: expose _getlogin consistently

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Thu, 29 Feb 2024 19:48:00 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=304cdac7385a40477484737fc0a4aa928c3be9d6

commit 304cdac7385a40477484737fc0a4aa928c3be9d6
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-02-29 19:46:33 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-02-29 19:46:33 +0000

    lib{c,sys}: expose _getlogin consistently
    
    Historically we exposed _getlogin as a private symbol on a per-arch basis
    (except on aarch64 and riscv) for no obvious reason.  We now need to
    expose it for libc's use so remove the special case from
    makesyscalls.lua and expose it in the generated syscalls.map.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D44116
---
 lib/libc/powerpc64/Symbol.map       | 4 ----
 lib/libsys/amd64/Symbol.sys.map     | 2 --
 lib/libsys/arm/Symbol.sys.map       | 1 -
 lib/libsys/i386/Symbol.sys.map      | 1 -
 lib/libsys/powerpc/Symbol.sys.map   | 4 ----
 lib/libsys/powerpc64/Symbol.sys.map | 4 ----
 lib/libsys/syscalls.map             | 1 +
 sys/tools/makesyscalls.lua          | 2 +-
 8 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map
index 3a772922e2e3..edccb69e960b 100644
--- a/lib/libc/powerpc64/Symbol.map
+++ b/lib/libc/powerpc64/Symbol.map
@@ -12,7 +12,3 @@ FBSD_1.0 {
 	fpsetmask;
 	fpsetround;
 };
-
-FBSDprivate_1.0 {
-	_getlogin;
-};
diff --git a/lib/libsys/amd64/Symbol.sys.map b/lib/libsys/amd64/Symbol.sys.map
index 6a531b659c46..5e0714aef35d 100644
--- a/lib/libsys/amd64/Symbol.sys.map
+++ b/lib/libsys/amd64/Symbol.sys.map
@@ -21,8 +21,6 @@ FBSD_1.6 {
  *
  */
 FBSDprivate_1.0 {
-	_getlogin;
-
 	_brk;
 	_vfork;
 };
diff --git a/lib/libsys/arm/Symbol.sys.map b/lib/libsys/arm/Symbol.sys.map
index 89a57d68f81d..179889b60832 100644
--- a/lib/libsys/arm/Symbol.sys.map
+++ b/lib/libsys/arm/Symbol.sys.map
@@ -4,7 +4,6 @@ FBSD_1.0 {
 };
 
 FBSDprivate_1.0 {
-	_getlogin;
 	_vfork;
 	_brk;
 	_sbrk;
diff --git a/lib/libsys/i386/Symbol.sys.map b/lib/libsys/i386/Symbol.sys.map
index c1b52b49c7a4..7d8c4ef61c11 100644
--- a/lib/libsys/i386/Symbol.sys.map
+++ b/lib/libsys/i386/Symbol.sys.map
@@ -23,7 +23,6 @@ FBSD_1.6 {
 };
 
 FBSDprivate_1.0 {
-	_getlogin;
 	_vfork;
 	_brk;
 };
diff --git a/lib/libsys/powerpc/Symbol.sys.map b/lib/libsys/powerpc/Symbol.sys.map
index d79597c0b45e..f241c4ed0984 100644
--- a/lib/libsys/powerpc/Symbol.sys.map
+++ b/lib/libsys/powerpc/Symbol.sys.map
@@ -2,7 +2,3 @@ FBSD_1.0 {
 	brk;
 	sbrk;
 };
-
-FBSDprivate_1.0 {
-	_getlogin;
-};
diff --git a/lib/libsys/powerpc64/Symbol.sys.map b/lib/libsys/powerpc64/Symbol.sys.map
index d79597c0b45e..f241c4ed0984 100644
--- a/lib/libsys/powerpc64/Symbol.sys.map
+++ b/lib/libsys/powerpc64/Symbol.sys.map
@@ -2,7 +2,3 @@ FBSD_1.0 {
 	brk;
 	sbrk;
 };
-
-FBSDprivate_1.0 {
-	_getlogin;
-};
diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map
index f96647652430..b79c512834e0 100644
--- a/lib/libsys/syscalls.map
+++ b/lib/libsys/syscalls.map
@@ -80,6 +80,7 @@ FBSDprivate_1.0 {
 	__sys_ktrace;
 	_getgid;
 	__sys_getgid;
+	_getlogin;
 	__sys_getlogin;
 	_setlogin;
 	__sys_setlogin;
diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua
index 1c80aa44c1a7..8784ff603e81 100644
--- a/sys/tools/makesyscalls.lua
+++ b/sys/tools/makesyscalls.lua
@@ -924,7 +924,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype,
 		    config.syscallprefix, funcalias, sysnum))
 		write_line("sysmk", string.format(" \\\n\t%s.o",
 		    funcalias))
-		if funcalias ~= "exit" and funcalias ~= "getlogin" and funcalias ~= "vfork" then
+		if funcalias ~= "exit" and funcalias ~= "vfork" then
 			write_line("libsysmap", string.format("\t_%s;\n",
 			    funcalias))
 		end