Blame src/microhttpd/mhd_itc_types.h

Packit 875988
/*
Packit 875988
  This file is part of libmicrohttpd
Packit 875988
  Copyright (C) 2016 Karlson2k (Evgeny Grin), Christian Grothoff
Packit 875988
Packit 875988
  This library is free software; you can redistribute it and/or
Packit 875988
  modify it under the terms of the GNU Lesser General Public
Packit 875988
  License as published by the Free Software Foundation; either
Packit 875988
  version 2.1 of the License, or (at your option) any later version.
Packit 875988
Packit 875988
  This library is distributed in the hope that it will be useful,
Packit 875988
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 875988
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 875988
  Lesser General Public License for more details.
Packit 875988
Packit 875988
  You should have received a copy of the GNU Lesser General Public
Packit 875988
  License along with this library; if not, write to the Free Software
Packit 875988
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 875988
Packit 875988
*/
Packit 875988
Packit 875988
/**
Packit 875988
 * @file microhttpd/mhd_itc_types.h
Packit 875988
 * @brief  Types for platform-independent inter-thread communication
Packit 875988
 * @author Karlson2k (Evgeny Grin)
Packit 875988
 * @author Christian Grothoff
Packit 875988
 *
Packit 875988
 * Provides basic types for inter-thread communication.
Packit 875988
 * Designed to be included by other headers.
Packit 875988
 */
Packit 875988
#ifndef MHD_ITC_TYPES_H
Packit 875988
#define MHD_ITC_TYPES_H 1
Packit 875988
#include "mhd_options.h"
Packit 875988
Packit 875988
/* Force socketpair on native W32 */
Packit 875988
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(_MHD_ITC_SOCKETPAIR)
Packit 875988
#error _MHD_ITC_SOCKETPAIR is not defined on naitive W32 platform
Packit 875988
#endif /* _WIN32 && !__CYGWIN__ && !_MHD_ITC_SOCKETPAIR */
Packit 875988
Packit 875988
#if defined(_MHD_ITC_EVENTFD)
Packit 875988
/* **************** Optimized GNU/Linux ITC implementation by eventfd ********** */
Packit 875988
Packit 875988
/**
Packit 875988
 * Data type for a MHD ITC.
Packit 875988
 */
Packit 875988
struct MHD_itc_
Packit 875988
{
Packit 875988
  int fd;
Packit 875988
};
Packit 875988
Packit 875988
#elif defined(_MHD_ITC_PIPE)
Packit 875988
/* **************** Standard UNIX ITC implementation by pipe ********** */
Packit 875988
Packit 875988
/**
Packit 875988
 * Data type for a MHD ITC.
Packit 875988
 */
Packit 875988
struct MHD_itc_
Packit 875988
{
Packit 875988
  int fd[2];
Packit 875988
};
Packit 875988
Packit 875988
Packit 875988
#elif defined(_MHD_ITC_SOCKETPAIR)
Packit 875988
/* **************** ITC implementation by socket pair ********** */
Packit 875988
Packit 875988
#include "mhd_sockets.h"
Packit 875988
Packit 875988
/**
Packit 875988
 * Data type for a MHD ITC.
Packit 875988
 */
Packit 875988
struct MHD_itc_
Packit 875988
{
Packit 875988
  MHD_socket sk[2];
Packit 875988
};
Packit 875988
Packit 875988
#endif /* _MHD_ITC_SOCKETPAIR */
Packit 875988
Packit 875988
#endif /* ! MHD_ITC_TYPES_H */