Open GoogleCodeExporter opened 9 years ago
As far as I remember, strtoi64 wsa used because strtoll was not available in
MSVC.
The EXTERNAL_COMPRESSION stuff enables a bunch of POSIX code which probably
won't
work. I'm open to suggestions. A while back someone suggested I look at
"groff" for
a portable implementation of this stuff.
Original comment by josh.mac...@gmail.com
on 14 Dec 2007 at 6:39
OK, here is an initial patch:
* Makefile adjustsments: adds -DEXTERNAL_COMPRESSION=0 and changes the
-DXD3_STDIO=1 to -DXD3_STDIO=0 -DXD3_POSIX=0 -DXD3_WIN32=1 for targets
xdelta3, xdelta3-debug, xdelta3-32, xdelta3-debug2, xdelta3-debug3 and
xdelta3-decoder . Didn't bother adding .exe to generated binary names
and it would be best to make a new makefile named Makefile.mingw or
something.
* xdelta3.h: moved the XD3_USE_LARGEFILE64 definition to a place before
windows.h is included. Added compile time options:
if XD3_USE_LARGEFILE64 : set WINVER and _WIN32_WINNT to 0x0500 which
requires WinME, or Win2000 and or newer version of WinNT, uses 64 bit
file offsets (GetFileSizeEx and SetFilePointerEx)
if !XD3_USE_LARGEFILE64 : set WINVER and _WIN32_WINNT to 0x0400 which
is compatible with win95-98 and WinNT4, uses 32 bit (DWORD) file offsets
(GetFileSize and SetFilePointer)
This should also handle the issue #16 about GetFileSizeEx, somehow.
* xdelta3.h : #ifndef _MSC_VER : uses stdint.h for most type definitions
and does not empty-define inline
* xdelta3-main.h : uses _strtoi64 only with _MSC_VER, otherwise uses
strtoll
* xdelta3-main.h : according to the _WIN32_WINNT values defined above,
uses GetFileSize and SetFilePointer for 32 bit file offsets, or the 'Ex'
ones for 64 bits.
With this patch applied, I successfully compiled the targets I mentioned.
I used a cross-toolchain on redhat9, details:
gcc-core-3.4.5-20060117-1
gcc-g++-3.4.5-20060117-1
binutils-2.17.50-20070129-1
w32api-3.10
mingw-runtime-3.13
Here are the only warnings I got:
In file included from xdelta3.c:789:
xdelta3-main.h: In function `get_millisecs_now':
xdelta3-main.h:557: warning: dereferencing type-punned pointer will break
strict-aliasing rules
xdelta3.c: At top level:
xdelta3-test.h:347: warning: 'test_save_copy' defined but not used
xdelta3-test.h:1600: warning: 'test_command_line_arguments' defined but not used
xdelta3-test.h:1916: warning: 'test_recode_command' defined but not used
xdelta3-test.h:2138: warning: 'test_force_behavior' defined but not used
xdelta3-test.h:2170: warning: 'test_stdout_behavior' defined but not used
xdelta3-test.h:2204: warning: 'test_no_output' defined but not used
Cheers.
Original comment by seze...@gmail.com
on 14 Dec 2007 at 9:50
Attachments:
Hmm, the patch I attached had some illegal GetFileSize/SetFilePointer
usage, result: seg.. Good one attached, run-tested on win98 and winxp.
Cheers.
Original comment by seze...@gmail.com
on 14 Dec 2007 at 11:46
Attachments:
Thanks!
BTW: I've had an accident w/ my windows laptop today, and won't be able to test
build
w/ MSVC or Cygwin in the foreseeable future. (Working at the laundromat,
bleach,
battery, badness.)
See if SVN 221 does the trick.
Original comment by josh.mac...@gmail.com
on 15 Dec 2007 at 12:37
Seems to compile fine with my mingw. Will run-test in an hour,
thanks. The makefile shall need some serious lovin' though ;)
Original comment by seze...@gmail.com
on 15 Dec 2007 at 12:53
OK, it's good, tested on win98se with 32bit mode. My patch application
now runs fine on linux, dos and win32, and should also work on other
unices. As a data point for you, patching of two files, one 21 MB and
one 75 MB, on my pentium-120 machine with 32 MB ram takes 4 minutes
whereas the similar application using xdelta-1.1.4 took around 32 mins
on DOS with no disk read-cache TSRs active.
Thanks.
Original comment by seze...@gmail.com
on 15 Dec 2007 at 1:33
Great! Thanks.
Original comment by josh.mac...@gmail.com
on 15 Dec 2007 at 1:55
Attached a tiny patch (svn221-fix-comments.diff) that fixes a comment
about windows version requirements. no code change.
Original comment by seze...@gmail.com
on 15 Dec 2007 at 8:02
Attachments:
Attached an initial patch to the mingw makefile: Contains some FIXMEs,
especially about those python stuff (which I'm clueless about). Shall
need additional look from your side.
Original comment by seze...@gmail.com
on 15 Dec 2007 at 8:05
Attachments:
I would really like to use a Python module on Windows, up until now I've been
using
Cygwin for Python development on Windows. Sadly, my Windows machine is dead at
the
moment, so I'll leave this issue open.
Original comment by josh.mac...@gmail.com
on 15 Dec 2007 at 6:39
Can't someone make the Windows Python version available?
Original comment by dmpem...@yahoo.com
on 22 Sep 2008 at 6:02
Original issue reported on code.google.com by
seze...@gmail.com
on 14 Dec 2007 at 11:40Attachments: