git: 8bb34ce5c9f6 - main - liblua: Accept + and e in io.popen mode

From: Ryan Moeller <rmoeller_at_FreeBSD.org>
Date: Sat, 14 Nov 2026 14:30:40 UTC
The branch main has been updated by rmoeller:

URL: https://cgit.FreeBSD.org/src/commit/?id=8bb34ce5c9f6fad11223dab31846b4377bf8472d

commit 8bb34ce5c9f6fad11223dab31846b4377bf8472d
Author:     Ryan Moeller <rmoeller@FreeBSD.org>
AuthorDate: 2026-11-12 04:52:38 +0000
Commit:     Ryan Moeller <rmoeller@FreeBSD.org>
CommitDate: 2026-11-14 14:26:25 +0000

    liblua: Accept + and e in io.popen mode
    
    Our popen(3) accepts more than the historical "r" and "w" types.  Define
    the appropriate macro to provide a custom mode check accepting all valid
    pipe types.
    
    Reviewed by:    kevans
    Approved by:    kevans (mentor)
    Differential Revision:  https://reviews.freebsd.org/D61175
---
 lib/liblua/luaconf.local.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/liblua/luaconf.local.h b/lib/liblua/luaconf.local.h
index 8f3fef15ddca..e14e32f50836 100644
--- a/lib/liblua/luaconf.local.h
+++ b/lib/liblua/luaconf.local.h
@@ -15,6 +15,10 @@
 #define LUA_USE_POSIX
 #ifndef BOOTSTRAPPING
 #define LUA_USE_DLOPEN
+#define l_checkmodep(m) \
+	(strcmp(m, "r") == 0 || strcmp(m, "re") == 0 || \
+	 strcmp(m, "r+") == 0 || strcmp(m, "r+e") == 0 || \
+	 strcmp(m, "w") == 0 || strcmp(m, "we") == 0)
 #endif
 
 #undef LUA_ROOT