bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/7] stdlib: putenv() needs a cast on OS/2 kLIBC


From: KO Myung-Hun
Subject: [PATCH 4/7] stdlib: putenv() needs a cast on OS/2 kLIBC
Date: Tue, 19 Jan 2021 01:40:10 +0900

On OS/2 kLIBC, the first parameter of putenv () is `const char *string'
not `char *string'.

* lib/stdlib.in.h: Use _GL_CXXALIAS_SYS_CAST() for putenv().
---
 lib/stdlib.in.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 49fc44e14..a0e113665 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -711,7 +711,9 @@ _GL_CXXALIAS_RPL (putenv, int, (char *string));
 #  endif
 _GL_CXXALIAS_MDA (putenv, int, (char *string));
 # else
-_GL_CXXALIAS_SYS (putenv, int, (char *string));
+/* Need to cast, because on OS/2 kLIBC, the first parameter is
+                                     const char *string.  */
+_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string));
 # endif
 _GL_CXXALIASWARN (putenv);
 #elif @GNULIB_MDA_PUTENV@
-- 
2.22.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]