00001 /* safesysselect.h: #include <sys/select.h> with portability workarounds. 00002 * 00003 * Copyright (C) 2007 Olly Betts 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License as 00007 * published by the Free Software Foundation; either version 2 of the 00008 * License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00020 #ifndef XAPIAN_INCLUDED_SAFESYSSELECT_H 00021 #define XAPIAN_INCLUDED_SAFESYSSELECT_H 00022 00023 #ifndef PACKAGE 00024 # error You must #include <config.h> before #include "safesysselect.h" 00025 #endif 00026 00027 #ifdef HAVE_SYS_SELECT_H 00028 // According to POSIX 1003.1-2001. 00029 # include <sys/select.h> 00030 #else 00031 // According to earlier standards. 00032 # include <sys/time.h> 00033 # include <sys/types.h> 00034 # include <unistd.h> 00035 #endif 00036 00037 // On Solaris FDSET uses memset but fails to prototype it. 00038 #include <string.h> 00039 00040 #endif // XAPIAN_INCLUDED_SAFESYSSELECT_H