在 2022/11/6 03:10, H. Müller 写道:
Hi all,localtime() does not respect if TZ variable is set via char **environ on CLANG32, CLANG64 and UCRT64. But it works on MINGW32, MINGW64. All the details are given on: https://github.com/msys2/MINGW-packages/issues/13925#issuecomment-1304112646
I don't think it's valid to declare ``` #ifndef __MINGW32__ extern char **environ; #endif ```You should be using the macro `_environ`, which is not necessary the name of a variable. For example, when linking against UCRT, it expands to `(* __p__environ())`.
Note only MSVCRT exports the `_environ` symbol; UCRT doesn't have it. See our 'stdlib.h' and 'msvcrt.def.in' for details.
-- Best regards, LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
