IRC logs for #opendune on OFTC at 2013-02-10
⏴ go to previous day
14:37:23 <TrueBrain> hmm, glx, OpenDUNE doesnt compile for me on MSVC
14:37:32 <TrueBrain> cannot convert ThreadProc to LPTHREAD_START_ROUTINE
14:40:48 <TrueBrain> I dont really understand it :s
14:41:02 <TrueBrain> it fails to tell me how LPTHREAD_START_ROUTINE looks like :P
14:42:50 <glx> confirmed, 32bit doesn't compile
14:43:01 <TrueBrain> I just made a commit to 'fix' it
14:43:15 <TrueBrain> no clue if that is valid ... a quick google look told me it was
14:43:19 <TrueBrain> but it feels weeeiiirrrrrdddd
14:50:12 <TrueBrain> I wonder why the 64bit version works, and the 32bit doesnt
14:56:47 <TrueBrain> commit; hopefully this fixes it correctly
17:19:44 <glx> ha right 64bit doesn't have this silly thing :)
17:20:12 <TrueBrain> I dont really like my solution, as it adds WINAPI for linux
17:20:14 <TrueBrain> but ... best I could find
17:57:12 <glx> the other option is to change default calling convention in project properties
17:57:53 <glx> openttd uses __fastcall which is compatible with __stdcall :)
17:59:40 <TrueBrain> well .. your call :)
17:59:44 <TrueBrain> I know too little about MSVC :P
18:01:23 <glx> but if we change calling convention we must add __cdecl before all variadic functions ;)
18:02:24 <glx> better keep it like it is now
18:42:27 <glx> d:/developpement/GitHub/OpenDUNE/src/os/thread_win32.c: In function 'Thread_Create':
18:42:27 <glx> d:/developpement/GitHub/OpenDUNE/src/os/thread_win32.c:9:2: warning: passing argument 3 of 'CreateThread' from incompatible pointer type [enabled by default]
18:42:27 <glx> d:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/winbase.h:1423:26: note: expected 'LPTHREAD_START_ROUTINE' but argument is of type 'ThreadProc'
18:42:27 <glx> d:/developpement/GitHub/OpenDUNE/src/os/thread_win32.c: In function 'Thread_Wait':
18:42:27 <glx> d:/developpement/GitHub/OpenDUNE/src/os/thread_win32.c:15:2: warning: passing argument 2 of 'GetExitCodeThread' from incompatible pointer type [enabled by default]
18:42:29 <glx> d:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/winbase.h:1607:24: note: expected 'PDWORD' but argument is of type 'int *'
18:42:40 <glx> of course int is not DWORD
18:43:47 <TrueBrain> DWORD is the 32bit integer variant
18:47:18 <glx> typedef unsigned long DWORD; <-- not an int :)
18:48:08 <TrueBrain> ah, yes, it is unsigned
18:48:16 <TrueBrain> but that should not be worth a warning, as they are compatible ..
18:50:06 <glx> still warns with unsigned int
18:50:20 <TrueBrain> are you sure it warns about that? :P
18:50:27 <TrueBrain> took me a while to find it warned me about the calling convention :)
18:51:39 <glx> the second warning is clearly not related to calling convention :)
18:56:58 <glx> just tried typedef DWORD (WINAPI *ThreadProc)(void *); first warning gone, if I remove WINAPI it returns
18:57:20 <glx> so it clearly warns about int not being DWORD :)
20:29:58 <glx> ok after some research, the warning is valid because according to C specifications int can be smaller than long
20:30:21 <glx> even if on windows int is the same as long :)
21:23:58 <TrueBrain> if it works, go for it
21:55:30 <TrueBrain> ugh, once again "the dude" is trying to shove his opinion up our asssssssssss .... ugh
21:57:38 <TrueBrain> I ran out of nice words, so I thought it would be better if I dont speak at all
21:57:47 <glx> luckily miniupnp knows how to reply :)
21:58:42 <TrueBrain> he has the background I assume, giving his other projects :P
21:58:48 <TrueBrain> still, it is sad that one person can be such a white noise in a project
21:58:59 <TrueBrain> I keep hoping he just goes away, but .. he doesn ... and the attitude stays ...
21:59:26 <glx> and I agree with miniupnp, strlcat and strlcpy are way better :)
22:00:29 <TrueBrain> I wonder how long it will be before we pull the OpenTTD solutions for those things :P
continue to next day ⏵