01:33 < ddnet-commits> [ddnet] heinrich5991 opened pull request #902: Fix victim handling (master...pr_ddnet_fix_victim) https://git.io/vdyos 01:41 <+ddnet-discord> @heinrich5991 only travis seems to run on push, why? 01:47 <+ddnet-discord> not sure why it looks like that 01:48 <+ddnet-discord> @Learath2 does the bors icon look broken to you as well? https://github.com/ddnet/ddnet/pull/902 01:48 <+Learath2> no looks normal 01:50 <@heinrich5991> hm 01:50 <@heinrich5991> can you send me the image link? 01:52 <+Learath2> https://avatars1.githubusercontent.com/u/24979321?s=40&v=4 02:32 < ddnet-commits> [ddnet] bors[bot] merged staging into master: https://git.io/vdyPp 12:46 <+ddnet-discord> what actually boris does? 13:02 <+Learath2> boris makes sure the CI tests pass before merging, also it checks whether merging pr A breaks the tests for merging pr B 13:04 <+ddnet-discord> lol 14:28 < ddnet-commits> [ddnet] Learath2 opened pull request #903: Fix a heap-use-after-free (master...dd_pr_fetcherfree) https://git.io/vdSzt 15:40 < ddnet-commits> [ddnet] Learath2 closed pull request #903: Fix a heap-use-after-free (master...dd_pr_fetcherfree) https://git.io/vdSzt 16:03 <+ddnet-discord> ```ddnet\src\engine\client\backend_sdl.cpp:561:41: error: 'putenv' was not declared in this scope 16:03 <+ddnet-discord> putenv("SDL_VIDEO_WINDOW_POS=center"); // ignore_convention``` 16:03 <+ddnet-discord> mingw :/ 16:03 <+ddnet-discord> try _putenv 16:04 <+ddnet-discord> error: '_putenv' was not declared in this scope 16:05 <+ddnet-discord> is stdlib.h included? 16:05 <+ddnet-discord> if not, try that 16:06 <+ddnet-discord> added it, not wokring 16:06 <+ddnet-discord> my ide tells me that include is not being used also 16:07 <+ddnet-discord> same with cstdlib 16:13 <+ddnet-discord> i wonder why it even uses getenv and putenv for sdl flags 16:13 <+ddnet-discord> oh, i just noticed they modernized the sdl documentation, neat http://sdl.beuc.net/sdl.wiki/FrontPage 16:14 <+ddnet-discord> (oh nvm, this is not the oficial docs..) 16:15 <+ddnet-discord> i guess for some reason mingw decided not to include putenv in the headers?? 16:16 <+ddnet-discord> `putenv` is not a standard C function 16:16 <+ddnet-discord> yeah, i meant stdlib.h and cstdlib 16:16 <+ddnet-discord> yes. but it's not a standard C function, so they aren't obliged to put it in there 16:17 <+ddnet-discord> so what can i do? 16:17 <+ddnet-discord> I'm looking for a soltuion 16:17 <+ddnet-discord> and why would they define `_CRTIMP __cdecl __MINGW_NOTHROW char *getenv (const char *);` and not putenv 16:17 <+ddnet-discord> makes no sense to me 16:17 <+ddnet-discord> (you could also google it) 16:18 <+ddnet-discord> to just hackily compile it, you could put a `int putenv(char *string);` above the function that uses it 16:19 <+ddnet-discord> i found why 16:19 <+ddnet-discord> the _putenv declaration is inside #if !defined (__STRICT_ANSI__) 16:19 <+ddnet-discord> `#if !defined (__STRICT_ANSI__)` 16:19 <+ddnet-discord> and it looks like its defined for some reason (in mingw?) 16:22 <+ddnet-discord> your fix doesnt work, `int putenv(const char*);` undefined reference to `putenv(char const*)' 16:23 <+ddnet-discord> ok 16:23 <+ddnet-discord> maybe try 16:23 <+ddnet-discord> ``` 16:23 <+ddnet-discord> int _putenv(const char *); 16:23 <+ddnet-discord> #define putenv _putenv 16:23 <+ddnet-discord> ``` 16:24 <+ddnet-discord> undefined reference to `_putenv(char const*)' 16:24 <+ddnet-discord> mhhh 16:24 <+ddnet-discord> xD 16:28 <+ddnet-discord> tried `extern int putenv(const char *);` but also doesnt work 16:28 <+ddnet-discord> `extern` is the same as without for function prototypes 16:29 <+ddnet-discord> I don't know. were you able to compile it with mingw in the past? 16:29 <+ddnet-discord> ah, never used extern before, i found it on internet 16:29 <+ddnet-discord> i think yes 16:29 <+ddnet-discord> its weird.. 16:29 <+ddnet-discord> https://stackoverflow.com/questions/21826649/boost-test-on-windows-with-mingw-compiler-error-putenv-not-declared 16:29 <+ddnet-discord> in this answer they say mingw doesnt define putenv 16:30 <+ddnet-discord> ``` 16:30 <+ddnet-discord> #ifdef __MINGW32__ 16:30 <+ddnet-discord> // Mingw doesn't define putenv() needed by Boost.Test 16:30 <+ddnet-discord> extern int putenv(char*); 16:30 <+ddnet-discord> #endif``` 16:30 <+ddnet-discord> wait 16:30 <+ddnet-discord> you wrote `const char *`. can you try `char *`? 16:30 <+ddnet-discord> k 16:30 <+ddnet-discord> or even 16:31 <+ddnet-discord> ``` 16:31 <+ddnet-discord> extern "C" 16:31 <+ddnet-discord> { 16:31 <+ddnet-discord> int putenv(char *); 16:31 <+ddnet-discord> } 16:31 <+ddnet-discord> ``` 16:31 <+ddnet-discord> i tried also extern int _putenv(char *); 16:31 <+ddnet-discord> with _ 16:31 <+ddnet-discord> warning: ISO C++ forbids converting a string constant to 'char*' 16:31 <+ddnet-discord> this means it could work? 16:31 <+ddnet-discord> yes 16:32 <+ddnet-discord> but adding const makes it undefined reference 16:32 <+ddnet-discord> have you done the `extern "C"` version? maybe with `const` to get rid of the warning? 16:33 <+ddnet-discord> ``` 16:33 <+ddnet-discord> extern "C" 16:33 <+ddnet-discord> { 16:33 <+ddnet-discord> int putenv(const char *); 16:33 <+ddnet-discord> }``` 16:33 <+ddnet-discord> this worked 16:34 <+ddnet-discord> cool 🙂 16:34 <+ddnet-discord> ```#ifdef __MINGW32__ 16:34 <+ddnet-discord> extern "C" 16:34 <+ddnet-discord> { 16:34 <+ddnet-discord> int putenv(const char *); 16:34 <+ddnet-discord> } 16:34 <+ddnet-discord> #endif``` i guess this is how it shold be 16:34 <+ddnet-discord> this is a workaround, hopefully, there's a better fix 16:34 <+ddnet-discord> ```cpp 16:34 <+ddnet-discord> #ifdef __MINGW32__ 16:34 <+ddnet-discord> extern "C" 16:34 <+ddnet-discord> { 16:34 <+ddnet-discord> int putenv(const char *); 16:35 <+ddnet-discord> } 16:35 <+ddnet-discord> #endif``` i guess this is how it shold be 16:35 <+ddnet-discord> i pr? 16:35 <+ddnet-discord> I'd prefer a better version tbh 16:35 <+ddnet-discord> if u know it ^^ 16:35 <+ddnet-discord> no, I don't 16:35 <+ddnet-discord> and I'm gone now 16:35 <+ddnet-discord> cya then 16:42 < ddnet-commits> [ddnet] Ryozuki opened pull request #905: MinGW putenv workaround (master...pr_mingw_workaround) https://git.io/vdSMa