From 22f703cab05b7cd368f4de9e03991b7664dc5022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 1 Sep 2014 13:56:46 +0200 Subject: Initial import of argyll version 1.5.1-8 --- spectro/pollem.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 spectro/pollem.h (limited to 'spectro/pollem.h') diff --git a/spectro/pollem.h b/spectro/pollem.h new file mode 100644 index 0000000..f8a86ee --- /dev/null +++ b/spectro/pollem.h @@ -0,0 +1,50 @@ + +#ifndef POLLEN_H + + /* Unix serial I/O class poll() emulation. */ + +/* + * Argyll Color Correction System + * + * Author: Graeme W. Gill + * Date: 12/9/2004 + * + * Copyright 2004, 2010 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU GENERAL PUBLIC LICENSE Version 2 or later :- + * see the License2.txt file for licencing details. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +#ifdef UNIX + +/* Fake up poll() support on systems that only support select() */ + +/* Fake poll array structure */ +struct pollfd { + int fd; /* File descriptor */ + short events; /* Requested events */ + short revents; /* Returned events */ +}; + +/* Fake Poll flag values supported */ +#define POLLIN 0x01 +#define POLLPRI 0x02 +#define POLLOUT 0x04 + +/* Timeout is in milliseconds, -1 == wait forever */ +int pollem(struct pollfd fds[], unsigned long nfds, int timeout); + +#define POLLEN_H +#endif /* POLLEN_H */ + +#endif /* UNIX */ + +#ifdef __cplusplus + } +#endif + -- cgit v1.2.3