Hi François,
I tried to use winemaker on an app, and I had the following notes about it.
1) Some subdirs were not visited by winemaker, while some others were. Should it visit all of them recursively? Does it stops if there are no source file in a dir (but there are subdirs)? The last point looks like the culprit.
2) Would it be possible to make winemaker understand the i64 postfix and do something about it? I believe the most portable way would be to change from "1234567890i64" to "(((__int64) 12) * ((__int64) 100000000) + ((__int64) 34567890))", as just replacing i64 by LL would be too easy.
3) winemaker changed the name of some .txt files from "a name.txt" to "a_name.txt". Since those are not source code, and their endlines were not unixified, I'm not sure it's such a good idea to touch those files.
4) Would there be a way to transform __try {}/__finally{} blocks to __TRY {}/__FINALLY()? I'm not sure the changes I did are now compilable under MSVC nor MingW.
Sidenote about exception.h: you need to use glibc's setjmp.h to get sigsetjmp(), but the default use of winemaker is to use wine's msvcrt's setjmp.h, which doesn't provide it. I sidestepped this by changing #include <setjmp.h> to #include "setjmp.h" and putting a symlink to /usr/include/setjmp.h in the current dir. It works, but it's far from being perfect.
Other than that, the app compiled without much problems (but a lot of warnings).
Vincent
On Sat, 18 Feb 2005, Vincent Béron wrote:
Hi François,
I tried to use winemaker on an app, and I had the following notes about it.
- Some subdirs were not visited by winemaker, while some others were.
Should it visit all of them recursively? Does it stops if there are no source file in a dir (but there are subdirs)? The last point looks like the culprit.
This does not seem to be the problem. Rather, winemaker generates a makefile only if it finds a .dsp, .mak or makefile in the directory. Maybe this is why some directories got ignored?
- Would it be possible to make winemaker understand the i64 postfix and
do something about it? I believe the most portable way would be to change from "1234567890i64" to "(((__int64) 12) * ((__int64) 100000000)
- ((__int64) 34567890))", as just replacing i64 by LL would be too easy.
I have attached a patch that does this. Does it work for you? Note that all large decimal numbers are converted to hexadecimal. When splitting them in two the decimal representation does not mean much anyway.
- winemaker changed the name of some .txt files from "a name.txt" to
"a_name.txt". Since those are not source code, and their endlines were not unixified, I'm not sure it's such a good idea to touch those files.
I sent a patch fixing this this morning.
- Would there be a way to transform __try {}/__finally{} blocks to
__TRY {}/__FINALLY()? I'm not sure the changes I did are now compilable under MSVC nor MingW.
Unfortunately they don't work exactly the same. There has been many attempts to improve exception support in Winelib but none that were deemed good enough to be committed to CVS.
Sidenote about exception.h: you need to use glibc's setjmp.h to get sigsetjmp(), but the default use of winemaker is to use wine's msvcrt's setjmp.h, which doesn't provide it.
When creating a new project in Visual C++, that new project gets linked with msvcrt, so this is also what winemaker does. If that's not what you want, use the --nomsvcrt option and winemaker should no longer put msvcrt's headers in the include path and link dlls and applications with it.
Hi,
--- Francois Gouget fgouget@free.fr wrote:
- Would there be a way to transform __try {}/__finally{} blocks to
__TRY {}/__FINALLY()? I'm not sure the changes I did are now compilable under MSVC nor MingW.
Unfortunately they don't work exactly the same. There has been many attempts to improve exception support in Winelib but none that were deemed good enough to be committed to CVS.
We have a Macro based SEH solution in ReactOS that seems to be mostly compatbile with microsofts SEH and a tool to convert existing sources.
http://svn.reactos.com/viewcvs/trunk/reactos/lib/pseh/ http://svn.reactos.com/viewcvs/trunk/reactos/tools/ms2ps/
Thanks Steven
__________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail
Francois Gouget wrote:
__TRY {}/__FINALLY()? I'm not sure the changes I did are now compilable under MSVC nor MingW.
- Would there be a way to transform __try {}/__finally{} blocks to
Unfortunately they don't work exactly the same. There has been many attempts to improve exception support in Winelib but none that were deemed good enough to be committed to CVS.
Below is a technique I use in C++. I'm not sure it can be used in C. But if you have C++ it is perfect. And nothing needs done in Winemaker Just have the #define available before the using code like in your StdAfx.h file.
<__try__finally> #define __try try #define _CONCAT_(s1,s2) s1##s2 #define __except( foofoo ) \ catch(...){ \ int d = foofoo ; \ switch(d){ \ case 0: \ throw ; \ case -1: \ case 1 : \ goto _CONCAT_(gifs,__LINE__) ; } } _CONCAT_(gifs,__LINE__) : </__try__finally>
the CONCAT macro is because of the pseudo 2 pass of the preprocessor, Other wise the __LINE__ is not expanded to produce a unique goto label. goto is used to jump over the "}}" closing scope of the catch and switch. So using code does not change. (There is one restriction you can't use 2 __except statements in the same line)
Free Life Boaz