/*
 * Copyright (C) 2008-2010, Gostai S.A.S.
 *
 * This software is provided "as is" without warranty of any kind,
 * either expressed or implied, including but not limited to the
 * implied warranties of fitness for a particular purpose.
 *
 * See the LICENSE file for more information.
 */

#ifndef LIBPORT_CSIGNAL
# define LIBPORT_CSIGNAL

# include <libport/detect-win32.h>
# include <libport/export.hh>
# include <csignal>

#if defined WIN32 || defined _MSC_VER
extern "C"
{
  // In this case, we just ignore it.
  typedef void (*sig_t) (int);
}
#endif

namespace libport
{
  /// Call std::signal, wrapped with perror on failure.
  LIBPORT_API sig_t signal(int sig, sig_t func);
}

#endif // LIBPORT_CSIGNAL

// Local Variables:
// mode: C++
// End:
