git: 60c11e7c54d0 - main - rpcsvc: Remove obsolete bool definition from yp_prot.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 30 May 2026 13:44:23 UTC
The branch main has been updated by fuz:
URL: https://cgit.FreeBSD.org/src/commit/?id=60c11e7c54d0128fafcea9c804c7736e2fb53e37
commit 60c11e7c54d0128fafcea9c804c7736e2fb53e37
Author: Faraz Vahedi <kfv@kfv.io>
AuthorDate: 2026-05-25 19:14:58 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-05-30 13:43:51 +0000
rpcsvc: Remove obsolete bool definition from yp_prot.h
`yp_prot.h` has carried a SunRPC-era typedef of `bool` guarded by
`BOOL_DEFINED`, but the header itself does not use it. The YP/RPC
interfaces use `bool_t` for protocol booleans.
Defining `bool` in a public header collides with modern C headers
that provide `bool` as a macro or keyword, such as `<stdbool.h>`
and C23-aware assert handling. Drop the compatibility typedef and
leave `bool` definition to the consumer's language mode.
Signed-off-by: Faraz Vahedi <kfv@kfv.io>
Reviewed by: fuz
MFC after: 1 month
Pull Request: https://github.com/freebsd/freebsd-src/pull/2203
---
include/rpcsvc/yp_prot.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/include/rpcsvc/yp_prot.h b/include/rpcsvc/yp_prot.h
index 091347231c8b..d0ad15bd657c 100644
--- a/include/rpcsvc/yp_prot.h
+++ b/include/rpcsvc/yp_prot.h
@@ -67,11 +67,6 @@
* YPPROC_MAPLIST takes (char *), returns (struct ypmaplist *).
*/
-#ifndef BOOL_DEFINED
-typedef u_int bool;
-#define BOOL_DEFINED
-#endif
-
/* Program and version symbols, magic numbers */
#define YPPROG ((u_long)100004)