From: "Goplat" <[EMAIL PROTECTED]>
> flags_to_win32 sets fdwShareMode to FILE_SHARE_DELETE, which is not
supported
> in win98 and will cause the CreateFile to fail, so the ParrotIO is NULL,
and
A fix for that should be windows version specific and needs support of the
config subsystem.
The logic is as follows:
In the config subsystem ...
1) run a test which defines the os version
2) set the compiler option up
if version is windows 95
add -D_WIN32_WINDOWS=0x0400 to cflags
else if version is windows 98 then
add -D_WIN32_WINDOWS=0x0410 to cflags
else if version is windows Me then
add -D_WIN32_WINDOWS=0x0500 to cflags
else if version is winnt 4.0 then
add -D_WIN32_WINNT=0x0400 to cflags
else if version is windows 2000 then
add -D_WIN32_WINNT=0x0500 to cflags
else if version is windows XP then
add -D_WIN32_WINNT=0x0501 to cflags
else if version is windows server 2003 then
add -D_WIN32_WINNT=0x0502 to cflags
end
In io.h ...
#ifdef _WIN32
# if defined(_WIN32_WINDOWS) && (_WIN32_WINDOWS <= 0x0500)
# define PIO_WIN32_SHARE_MODE (FILE_SHARE_READ |\
# FILE_SHARE_WRITE)
# else
# define PIO_WIN32_SHARE_MODE (FILE_SHARE_READ |\
# FILE_SHARE_WRITE |\
# FILE_SHARE_DELETE)
#endif
0x4C56