Re: [PATCH] Fix mingw _putenv warning

2024-01-13 Thread Mike Frysinger
i merged Vadim's patch now, thanks
-mike


signature.asc
Description: PGP signature


Re: [PATCH] Fix mingw _putenv warning

2023-03-24 Thread Jonathan Yong

On 3/19/23 12:13, Jonathan Yong wrote:

This was breaking mpg123 if CFLAGS has -pedantic -Werror.

Refresh of the patch from:
https://lists.gnu.org/archive/html/libtool/2011-06/msg00040.html

_putenv is always __cdecl and is always dllimported from the OS C 
runtime DLL.


Ping, any updates on this?




[PATCH] Fix mingw _putenv warning

2023-03-19 Thread Jonathan Yong

This was breaking mpg123 if CFLAGS has -pedantic -Werror.

Refresh of the patch from:
https://lists.gnu.org/archive/html/libtool/2011-06/msg00040.html

_putenv is always __cdecl and is always dllimported from the OS C 
runtime DLL.From 74bae2bbd96cf38eeda3495bedfcd7f5b90680fb Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10wa...@gmail.com>
Date: Sun, 19 Mar 2023 12:03:33 +
Subject: [PATCH] libtool: fix long standing mingw _putenv warning

Fixes build if -Werror -pendantic is enabled in CFLAGS.
The MS specific _putenv in MinGW* will always be __cdecl and
will always be coming from the OS C runtime DLL, with no plans
for a static reimplementation.

Signed-off-by: Jonathan Yong <10wa...@gmail.com>
---
 build-aux/ltmain.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 3b76bd08..21330576 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -3662,7 +3662,8 @@ EOF
 /* declarations of non-ANSI functions */
 #if defined __MINGW32__
 # ifdef __STRICT_ANSI__
-int _putenv (const char *);
+/* mingw _putenv is always from the C runtime DLL, and it is always __cdecl ABI */
+_CRTIMP int __cdecl _putenv (const char *);
 # endif
 #elif defined __CYGWIN__
 # ifdef __STRICT_ANSI__
-- 
2.40.0