mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
fcntl patch for UNIX platforms; code compiled and tests run on Mac & Win
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user