Function strstr and MinGW
Hi everyone, I'm still trying to improve wine cmd but I'm stuck with my patch making tests failing. After some investigations, I've found that my function which replace all @space@ by real spaces does not always work. So I've written a test_case (attached code). It runs perfectly on Ubuntu (compiled with gcc) but does nothing on Windows (compiled with i586-mingw32msvc-gcc). In fact, on windows, strstr fails and so never goes into the while{ } loop. Is MinGW the culprit ? Should I use another function ? Any idea ? [Why *standard* function don't even work on Windows ?] Thanks in advance !
brutalcomputer(a)b:/tmp$ i586-mingw32msvc-gcc test.c brutalcomputer(a)b:/tmp$ wine a.exe 17_'A simple test . ' brutalcomputer(a)b:/tmp$ gcc test.c brutalcomputer(a)b:/tmp$ ./a.out 47_'A(a)space@simple(a)space@test(a)space@@space(a).@space@' brutalcomputer(a)b:/tmp$ I don't understand either... Ubuntu 10.04. i586-mingw32msvc-gcc (GCC) 4.4.2 gcc (Ubuntu 4.3.4-10ubuntu1) 4.3.4 Can this be a bug in gcc 4.3? Btw. In Visual 2008 it works correctly. Eric 2010/11/5 GOUJON Alexandre <ale.goujon(a)gmail.com>:
Hi everyone,
I'm still trying to improve wine cmd but I'm stuck with my patch making tests failing.
After some investigations, I've found that my function which replace all @space@ by real spaces does not always work. So I've written a test_case (attached code). It runs perfectly on Ubuntu (compiled with gcc) but does nothing on Windows (compiled with i586-mingw32msvc-gcc). In fact, on windows, strstr fails and so never goes into the while{ } loop.
Is MinGW the culprit ? Should I use another function ? Any idea ?
[Why *standard* function don't even work on Windows ?]
Thanks in advance !
participants (2)
-
Eryk Wieliczko -
GOUJON Alexandre