X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fpread.h;h=99a91b2d6c55040c237e232a3df3cab5af991cb8;hb=327b6e8a1660e1c937b7987fa31f972af393521b;hp=0e64326af5e497511e84f0e0f6f442419bfb7aa7;hpb=489233b45bc68e94b2d065f696ed22bc6e6eec02;p=pciutils.git diff --git a/lib/pread.h b/lib/pread.h index 0e64326..99a91b2 100644 --- a/lib/pread.h +++ b/lib/pread.h @@ -3,7 +3,9 @@ * * Copyright (c) 1997--2003 Martin Mares * - * Can be freely distributed and used under the terms of the GNU GPL. + * Can be freely distributed and used under the terms of the GNU GPL v2+ + * + * SPDX-License-Identifier: GPL-2.0-or-later */ /* @@ -30,15 +32,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 PCI_HAVE_DO_READ - #else /* In all other cases we use lseek/read/write instead to be safe */ #define make_rw_glue(op) \