X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fpoll.h;h=2c290e3c148c289fe52b4c96c067606dd201ac04;hp=858eba958e8ede5a9f937f4878853c8697db5b6a;hb=6437a10ee3d3160d01d04afe071901e8f496ad34;hpb=3576736bac485d8f04b2fc4f6b5cfcef7576d741 diff --git a/include/yaz/poll.h b/include/yaz/poll.h index 858eba9..2c290e3 100644 --- a/include/yaz/poll.h +++ b/include/yaz/poll.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 1995-2007, Index Data +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2013 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -24,7 +24,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: poll.h,v 1.4 2007-11-30 11:44:46 adam Exp $ */ /** * \file @@ -59,7 +58,7 @@ struct yaz_poll_fd { void *client_data; }; -/** \brief poll wrapper for poll or select +/** \brief poll wrapper for poll or select \param fds array of sockets to be polled \param num_fds size of fds array (number of sockets) \param sec number of seconds to wait (-1 for no timeout) @@ -71,6 +70,7 @@ struct yaz_poll_fd { This functions calls yaz_poll_poll on systems where poll is available and yaz_poll_select where it it unavailable. */ +YAZ_EXPORT int yaz_poll(struct yaz_poll_fd *fds, int num_fds, int sec, int nsec); #define yaz_poll_add(var,value) var = (enum yaz_poll_mask ) ((int) var | value) @@ -80,6 +80,7 @@ YAZ_END_CDECL /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab