bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] stdlib: Cast putenv() on OS/2 kLIBC


From: KO Myung-Hun
Subject: [PATCH] stdlib: Cast putenv() on OS/2 kLIBC
Date: Tue, 26 Sep 2023 00:20:12 +0900

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

* lib/stdlib.in.h (putenv) [kLIBC]: Cast with _GL_CXXALIAS_SYS_CAST().
---
 lib/stdlib.in.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index b9838c7d5e..b27d2c08c6 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1047,6 +1047,10 @@ _GL_CXXALIAS_RPL (putenv, int, (char *string));
 #   define putenv _putenv
 #  endif
 _GL_CXXALIAS_MDA (putenv, int, (char *string));
+# elif defined __KLIBC__
+/* Need to cast, because on OS/2 kLIBC, the first parameter is
+                                     const char *string.  */
+_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string));
 # else
 _GL_CXXALIAS_SYS (putenv, int, (char *string));
 # endif
@@ -1063,6 +1067,10 @@ _GL_CXXALIASWARN (putenv);
 /* Need to cast, because on mingw, the parameter is either
    'const char *string' or 'char *string'.  */
 _GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
+# elif defined __KLIBC__
+/* Need to cast, because on OS/2 kLIBC, the first parameter is
+                                     const char *string.  */
+_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string));
 # else
 _GL_CXXALIAS_SYS (putenv, int, (char *string));
 # endif
-- 
2.39.1




reply via email to

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