From: Martin Mares Date: Sun, 30 Jul 2006 10:41:38 +0000 (+0200) Subject: Polishing the Windows port. X-Git-Tag: v3.0.0~51 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1c5cc9b5b323c84179cad9d90e86600d3c0cdfb6;p=pciutils.git Polishing the Windows port. --- diff --git a/ChangeLog b/ChangeLog index 06f804e..6f1836c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-07-30 Martin Mares + + * lib/i386-io-windows.h: Fixed indentation and spelling. + + * README.Windows: Mention that WinIO.dll is needed and where to get it. + 2006-06-27 Martin Mares * lib/Makefile, Makefile: Added rules for building and cleaning the example. diff --git a/README.Windows b/README.Windows index 7281f1c..14c11e4 100644 --- a/README.Windows +++ b/README.Windows @@ -1,5 +1,8 @@ Since 2.1.99-test5, pciutils should also be compilable on Windows. Thanks to Alexander Stock for contributing the port. +To build this port, you need to install WinIO.dll first. You can get it +from http://www.internals.com/. + However, you need to use win32/config.h instead of the automatically generated lib/config.h as lib/configure does not run on Windows. diff --git a/lib/i386-io-windows.h b/lib/i386-io-windows.h index 7006aa5..c875a7d 100644 --- a/lib/i386-io-windows.h +++ b/lib/i386-io-windows.h @@ -9,11 +9,11 @@ #include #include #include - + #define outb(x,y) _outp(y,x) #define outw(x,y) _outpw(y,x) #define outl(x,y) _outpd(y,x) - + #define inb(x) _inp(x) #define inw(x) _inpw(x) #define inl(x) _inpd(x) @@ -26,7 +26,7 @@ intel_setup_io(void) if (intel_iopl_set < 0) { typedef int (*MYPROC)(void); - MYPROC InitializeWinIo; + MYPROC InitializeWinIo; HMODULE lib; intel_iopl_set = 0; @@ -37,12 +37,13 @@ intel_setup_io(void) fprintf(stderr, "libpci: Couldn't load WinIo.dll.\n"); return 0; } + /* XXX: Is this really needed? --mj */ GetProcAddress(lib, "InitializeWinIo"); - + InitializeWinIo = (MYPROC) GetProcAddress(lib, "InitializeWinIo"); if (!InitializeWinIo) { - fprintf(stderr, "libpci: Couldn't find InitialieWinIo function.\n"); + fprintf(stderr, "libpci: Couldn't find InitializeWinIo function.\n"); return 0; } @@ -52,7 +53,7 @@ intel_setup_io(void) return 0; } - intel_iopl_set=1; + intel_iopl_set = 1; } return intel_iopl_set; }