use EPICS_PRIVATE_API macro and fix bug with darwin/ios
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbDefs.h"
|
||||
#include "epicsEvent.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
#include "osiSock.h"
|
||||
|
||||
/*
|
||||
@@ -11,7 +12,8 @@
|
||||
*/
|
||||
int epicsSocketUnsentCount(SOCKET sock) {
|
||||
int unsent;
|
||||
if (getsockopt(sock, SOL_SOCKET, SO_NWRITE, &unsent) == 0)
|
||||
socklen_t len = sizeof(unsent);
|
||||
if (getsockopt(sock, SOL_SOCKET, SO_NWRITE, &unsent, &len) == 0)
|
||||
return unsent;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
\*************************************************************************/
|
||||
|
||||
#include <linux/sockios.h>
|
||||
#define EPICS_PRIVATE_API
|
||||
#include "osiSock.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
\*************************************************************************/
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#define EPICS_PRIVATE_API
|
||||
#include "osiSock.h"
|
||||
#include <mstcpip.h>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
#include "osiSock.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#define EPICS_PRIVATE_API
|
||||
#include "osiSock.h"
|
||||
|
||||
/*
|
||||
@@ -11,7 +12,8 @@
|
||||
*/
|
||||
int epicsSocketUnsentCount(SOCKET sock) {
|
||||
int unsent;
|
||||
if (getsockopt(sock, SOL_SOCKET, SO_NWRITE, &unsent) == 0)
|
||||
socklen_t len = sizeof(unsent);
|
||||
if (getsockopt(sock, SOL_SOCKET, SO_NWRITE, &unsent, &len) == 0)
|
||||
return unsent;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -52,12 +52,14 @@ enum epicsSocketSystemCallInterruptMechanismQueryInfo {
|
||||
epicsShareFunc enum epicsSocketSystemCallInterruptMechanismQueryInfo
|
||||
epicsSocketSystemCallInterruptMechanismQuery ();
|
||||
|
||||
#ifdef EPICS_PRIVATE_API
|
||||
/*
|
||||
* Some systems (e.g Linux and Windows 10) allow to check the amount
|
||||
* of unsent data in the output queue.
|
||||
* Returns -1 if the information is not available.
|
||||
*/
|
||||
epicsShareFunc int epicsSocketUnsentCount(SOCKET sock);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* convert socket address to ASCII in this order
|
||||
|
||||
Reference in New Issue
Block a user