build fix, use the right scsi header on win32

Now we are using either ddk/ntddscsi.h or ntddscsi.h and even don't
stop if we have none of them.
merge-requests/1/head
Ruediger Meier 2012-01-16 01:54:27 +01:00 zatwierdzone przez Chris Bagwell
rodzic f3a8705525
commit 0e3d873624
3 zmienionych plików z 22 dodań i 9 usunięć

Wyświetl plik

@ -1,8 +1,10 @@
2012-01-15 Ruediger Meier <sweet_f_a@gmx.de>
2012-01-21 Ruediger Meier <sweet_f_a@gmx.de>
* backend/canon_dr.h, backend/cardscan.h, backend/dll.c,
backend/epjitsu.h, backend/fujitsu.h, backend/gt68xx.c,
backend/kodak.h, backend/microtek2.h, sanei/sanei_access.[hc]: fix and
cleanup portable PATH_SEP and DIR_PATH defines
* sanei/sanei_scsi.c, tools/sane-find-scanner.c, configure.in,
sane/config.h.in: use the right scsi header on win32.
2012-01-18 Rolf Bensch <rolf at bensch hyphen online dot de>
* backend/pixma_mp150, doc/descriptions/pixma.desc, doc/sane-pixma.man:

Wyświetl plik

@ -62,6 +62,10 @@
#include <sys/param.h>
#include <sys/types.h>
#if defined (HAVE_WINDOWS_H)
# include <windows.h>
#endif
#define STUBBED_INTERFACE 0
#define LINUX_INTERFACE 1
#define BSD_INTERFACE 2
@ -211,11 +215,13 @@
# include <IOKit/scsi-commands/SCSITaskLib.h>
# endif
# endif
#elif defined (HAVE_WINDOWS_H)
#elif defined (HAVE_DDK_NTDDSCSI_H)
# define USE WIN32_INTERFACE
# include <windows.h>
# include <ddk/scsi.h>
# include <ddk/ntddscsi.h>
#elif defined (HAVE_NTDDSCSI_H)
# define USE WIN32_INTERFACE
# include <ntddscsi.h>
#endif
#ifndef USE

Wyświetl plik

@ -30,10 +30,15 @@
#include <dirent.h>
#include <errno.h>
#if defined (HAVE_WINDOWS_H)
#include <windows.h>
#include <ddk/scsi.h>
#include <ddk/ntddscsi.h>
#if defined (HAVE_DDK_NTDDSCSI_H) || defined (HAVE_NTDDSCSI_H)
# define WIN32_SCSI
# include <windows.h>
# if defined (HAVE_DDK_NTDDSCSI_H)
# include <ddk/scsi.h>
# include <ddk/ntddscsi.h>
# elif defined (HAVE_NTDDSCSI_H)
# include <ntddscsi.h>
# endif
#endif
#include "../include/sane/sanei.h"
@ -1148,7 +1153,7 @@ get_next_file (char *dir_name, DIR * dir)
return file_name;
}
#if defined (HAVE_WINDOWS_H)
#if defined(WIN32_SCSI)
/* Return a list of potential scanners. There's a lot of hardcoded values here that might break on a system with lots of scsi devices. */
static char **build_scsi_dev_list(void)
{
@ -1840,7 +1845,7 @@ main (int argc, char **argv)
0
};
#if defined (HAVE_WINDOWS_H) || \
#if defined (WIN32_SCSI) || \
defined (HAVE_IOKIT_CDB_IOSCSILIB_H) || \
defined (HAVE_IOKIT_SCSI_SCSICOMMANDOPERATIONCODES_H) || \
defined (HAVE_IOKIT_SCSI_COMMANDS_SCSICOMMANDOPERATIONCODES_H)