X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fpread.h;h=3db90e3e182a3a82912660905598cd462de35962;hb=4582426202ad6ac6539305dae2c0b70016f014f4;hp=46370780588cca73b1853b7874f36b90cd427660;hpb=11f7b31bba25a7cdabb3cd64d3c6ba89975a2695;p=pciutils.git diff --git a/lib/pread.h b/lib/pread.h index 4637078..3db90e3 100644 --- a/lib/pread.h +++ b/lib/pread.h @@ -30,15 +30,6 @@ static int pread(unsigned int fd, void *buf, size_t size, loff_t where) static int pwrite(unsigned int fd, void *buf, size_t size, loff_t where) { return syscall(SYS_pwrite, fd, buf, size, where); } -#elif defined(i386) -/* old libc on i386 -> call syscalls directly the old way */ -#include -static _syscall5(int, pread, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi); -static _syscall5(int, pwrite, unsigned int, fd, void *, buf, size_t, size, u32, where_lo, u32, where_hi); -static int do_read(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pread(fd, buf, size, where, 0); } -static int do_write(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, int where) { return pwrite(fd, buf, size, where, 0); } -#define HAVE_DO_READ - #else /* In all other cases we use lseek/read/write instead to be safe */ #define make_rw_glue(op) \ @@ -57,10 +48,10 @@ static int do_write(struct pci_dev *d UNUSED, int fd, void *buf, size_t size, in } make_rw_glue(read) make_rw_glue(write) -#define HAVE_DO_READ +#define PCI_HAVE_DO_READ #endif -#ifndef HAVE_DO_READ +#ifndef PCI_HAVE_DO_READ #define do_read(d,f,b,l,p) pread(f,b,l,p) #define do_write(d,f,b,l,p) pwrite(f,b,l,p) #endif