libzmq/src/fd.hpp

46 lines
1.2 KiB
C++
Raw Normal View History

2009-07-29 12:07:54 +02:00
/*
Copyright (c) 2007-2009 iMatix Corporation
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
2009-07-29 12:07:54 +02:00
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
2009-07-29 12:07:54 +02:00
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
2009-07-29 12:07:54 +02:00
You should have received a copy of the GNU Lesser General Public License
2009-07-29 12:07:54 +02:00
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2009-08-03 11:30:13 +02:00
#ifndef __ZMQ_FD_HPP_INCLUDED__
#define __ZMQ_FD_HPP_INCLUDED__
2009-07-29 12:07:54 +02:00
#include "platform.hpp"
2009-08-03 11:30:13 +02:00
#ifdef ZMQ_HAVE_WINDOWS
2009-07-29 12:07:54 +02:00
#include "windows.hpp"
#endif
2009-08-03 11:30:13 +02:00
namespace zmq
2009-07-29 12:07:54 +02:00
{
2009-10-05 15:06:40 +02:00
#ifdef ZMQ_HAVE_WINDOWS
#if defined _MSC_VER &&_MSC_VER <= 1400
2009-07-29 12:07:54 +02:00
typedef UINT_PTR fd_t;
2009-11-03 14:06:25 +01:00
enum {retired_fd = (fd_t)(~0)};
2009-07-29 12:07:54 +02:00
#else
typedef SOCKET fd_t;
enum {retired_fd = INVALID_SOCKET};
#endif
#else
typedef int fd_t;
enum {retired_fd = -1};
#endif
}
#endif