Winemaker questions
Francois Gouget
fgouget at free.fr
Sat Feb 19 18:37:57 CST 2005
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.
>
> 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.
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?
> 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.
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.
> 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.
I sent a patch fixing this this morning.
> 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.
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.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
RFC 2549: ftp://ftp.isi.edu/in-notes/rfc2549.txt
IP over Avian Carriers with Quality of Service
-------------- next part --------------
Index: tools/winemaker
===================================================================
RCS file: /var/cvs/wine/tools/winemaker,v
retrieving revision 1.79
diff -u -p -r1.79 winemaker
--- tools/winemaker 11 Jan 2005 10:39:10 -0000 1.79
+++ tools/winemaker 20 Feb 2005 00:30:11 -0000
@@ -1479,6 +1478,37 @@ sub fix_file($$$)
}
} else {
+ my $again=1;
+ while ($again)
+ {
+ $again=0;
+ if (/\b([0-9]+|0x[0-9a-f]+)i64(?! \/* winemaker)/i) {
+ # Fix non-portable 64 bit values
+ my $number=$&;
+ my $value=$1;
+ if ($value =~ /^0[0-9]/) {
+ # BigInt does not support octal
+ s%$number%((__int64)$value) /* winemaker:warning: non portable 64 bit number */%g;
+ } else {
+ use Math::BigInt;
+ my $v=Math::BigInt->new($value);
+ my $high=$v >> 32;
+ my $low=$v & 0xffffffff;
+ if ($high == 0) {
+ $low=$low->as_hex() if ($value =~ /^0x/i);
+ s%$number%((__int64)$low) /* winemaker:warning: non portable 64 bit number: $value */%g;
+ } elsif ($low == 0) {
+ $high=$high->as_hex();
+ s%$number%((__int64)$high << 32) /* winemaker:warning: non portable 64 bit number: $value */%g;
+ } else {
+ $high=$high->as_hex();
+ $low=$low->as_hex();
+ s%$number%((__int64)$high << 32 | (__int64)$low) /* winemaker:warning: non portable 64 bit number: $value */%g;
+ }
+ }
+ $again=1;
+ }
+ }
print FILEO;
}
}
More information about the wine-devel
mailing list