fcntl patch for UNIX platforms; code compiled and tests run on Mac & Win

This commit is contained in:
Aleksandar Fabijanic
2012-04-26 02:57:16 +00:00
parent 15d960b057
commit a9cef39021
3 changed files with 47 additions and 9 deletions

View File

@@ -148,6 +148,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#if POCO_OS != POCO_OS_HPUX
#include <sys/select.h>
#endif
@@ -170,6 +171,7 @@
#define POCO_INVALID_SOCKET -1
#define poco_socket_t int
#define poco_socklen_t socklen_t
#define poco_fcntl_request_t int
#if defined(POCO_OS_FAMILY_BSD)
#define poco_ioctl_request_t unsigned long
#else

View File

@@ -352,8 +352,6 @@ public:
virtual bool getBlocking() const;
/// Returns the blocking mode of the socket.
/// This method will only work if the blocking modes of
/// the socket are changed via the setBlocking method!
virtual bool secure() const;
/// Returns true iff the socket's connection is secure
@@ -372,6 +370,14 @@ public:
void ioctl(poco_ioctl_request_t request, void* arg);
/// A wrapper for the ioctl system call.
#if defined(POCO_OS_FAMILY_UNIX)
int fcntl(poco_fcntl_request_t request);
/// A wrapper for the fcntl system call.
int fcntl(poco_fcntl_request_t request, long arg);
/// A wrapper for the fcntl system call.
#endif
bool initialized() const;
/// Returns true iff the underlying socket is initialized.