[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libcdio-devel] W32 problems
From: |
Rocky Bernstein |
Subject: |
Re: [Libcdio-devel] W32 problems |
Date: |
Sat, 15 Sep 2012 23:20:09 -0400 |
I spent some time today looking at these patches. While there are probably
some aspects that will help things, it doesn't look like I can apply any of
these as is. In some cases things might be worse in other environments.
Are these patches go again the current git sources. If not please use git
sources https://savannah.gnu.org/git/?group=libcdio
Comments on specific patches below.
On Sat, Sep 15, 2012 at 12:45 AM, LRN <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Here are some patches for W32 version of libcdio, my test results and
> observations.
>
> 0002-use-sleep-compatible-to.mingw32.patch - there's no sleep() on
> W32, but MinGW provides usleep.
>
One can't just unconditionally change sleep() into usleep() changing the
value of the parameter correspondingly. And there already are feature tests
for sleep() and usleep(). I have changed in git mmc_read.c and mmc_write.c
to test for availability of usleep() in addition to sleep() that had been
there. And as a last resort when usleep, sleep and MSWindows Sleep isn't
there, I've coded in a loop.
> 0004-disable-realpath-test-on.mingw32.patch - cdio_realpath() falls
> back to a simple strdup() on W32, so there's no sense in testing it
> (and we have no symlink() anyway).
>
There is a workaround for W32 not having symlink in the git sources. So
along with the previous patch this leads me to believe you weren't using
git sources.
Just because an implementation falls back to something perhaps obvious,
that is no reason not do a test. The tests are there to make sure that in
the future if this gets changed we will catch that we are doing something
reasonable.
> 0006-fix-differences-in-_img_private_t-definition.all.patch - stdbool
> REDEFINES (!) "bool" to be _Bool, not int. Therefore all files that
> define something with "bool" type have to include stdbool.h, otherwise
> different source files will have different sizes for some structures.
>
I tried compiling on Mingw and I do not see an error in compiling
win32_ioctl.c. Again old sources?
>
> 0007-fix-struct-packing-on-latest.mingw32.patch - as of gcc-4.7.0
> - -mms-bitfields is enabled by default. Problem is, when it is enabled,
> gcc struct member packing attributes have no effect. Pragma pack has
> to be used to pack structures. This patch makes sure that on W32
> structures are packed (requires configuring with
> CFLAGS=-std=iso9899:1999).
>
I tried applying this on mingw and I get a warning about that a pragma
attribute is ignored. Possibly you need a better test on the gcc version.
Also, I didn't see any noticable change on tests. So what test does this
fix? Or what behavior do you get before the patch that you don't get after?
>
> The output of `make check -k' is attached. As you can see, my patches
> did not quite fix the packing issue, so you might want to look into that.
>
> Lots of mmc errors, DeviceIoControl() simply returns 0 and sets error
> to 87. No idea why.
>
> The tests that fail to find files might be failing because i'm
> building OOTSD.
>
> Note that i'm running W7, and thus have no ASPI driver (AFAIK there
> are no free ASPI drivers).
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (MingW32)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJQVAfvAAoJEOs4Jb6SI2CwXaQIALe1syfgNvq8WAH03LpPGbWb
> npNZ/zgYjPwbvaGOSRt29agINvQLVw5W4eXwLQgVSXJyAcihD5n+377gvpChWCaa
> +yEPz5mxk0lNsDHyHwGDf/iyFDdhZ5932wpHnaYvmqXgOZ658FgVyNN58Uu0+xFU
> GBB1Umc0wl8N5XcWiwoCXHXIBlZglm34ZnXafdWG9m/2oIqwJ8OWniZwZADorZxQ
> 8LNBH15nRFHvD8RDI+/Rr5iXJnKeRJPeTs4BFuFSYK8qT9DdwMga9KM+cHkxQCv8
> 3KuikXSMfU3ZeMswiRirH4+LZ++/V4CKdQSfoo/WpSEuueBScPlmnl5O1W6zm4A=
> =LPSz
> -----END PGP SIGNATURE-----
>