summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-05-25 09:58:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-05-25 12:54:04 +0200
commit0a126b4c661d65860fd2de92f8cc49bdb65a957c (patch)
tree60a4736f0d32ffeed211d36e9f55eab032052cb0 /include
parent5c79032077d387053c62829d62518695f68555c1 (diff)
Deprecate osl_demultiplexSocketEvents et al
The oslSocketSet/osl_*SocketSet/osl_demultiplexSocketEvents functionality is based on the POSIX fd_set/FD_*/select functionality, which suffers from the issue that it has undefined behavior for file descriptors with numerical values greater than or equal to FD_SETSIZE. (And this can be a real issue e.g. on Linux, where tools::extendApplicationEnvironment in tools/source/misc/extendapplicationenvironment.cxx bumps the soft RLIMIT_NOFILE to the hard limit---so that file descriptors can likely have large values---, but where the GNU C library sets FD_SETSIZE to only 1024 and ignores larger descriptors.) This functionality is unused at least by LO itself, and also likely unused by third-party code. So instead of fixing the Unix-based implementation in sal/osl/unx/socket.cxx (by e.g. switching it from select to poll), just mark the functionality as deprecated (with the option of eventually removing the functionality completely from sal/osl/{unx,w32}/socket.cxx, leaving just stubs in sal/osl/all/compat.cxx). Change-Id: I2b97f8a37b45f298da9328660006f3c14361c9a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116089 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/osl/socket.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/osl/socket.h b/include/osl/socket.h
index 0492dd3179ab..8e2a0066d17e 100644
--- a/include/osl/socket.h
+++ b/include/osl/socket.h
@@ -611,22 +611,30 @@ SAL_DLLPUBLIC oslSocketError SAL_CALL osl_getLastSocketError(
oslSocket Socket);
/** Type for the representation of socket sets.
+
+ @deprecated
*/
typedef struct oslSocketSetImpl * oslSocketSet;
/** Creates a set of sockets to be used with osl_demultiplexSocketEvents().
@return A oslSocketSet or 0 if creation failed.
+
+ @deprecated
*/
SAL_DLLPUBLIC oslSocketSet SAL_CALL osl_createSocketSet(void);
/** Destroys an oslSocketSet.
+
+ @deprecated
*/
SAL_DLLPUBLIC void SAL_CALL osl_destroySocketSet(oslSocketSet Set);
/** Clears the set from all previously added sockets.
@param Set the set to be cleared.
+
+ @deprecated
*/
SAL_DLLPUBLIC void SAL_CALL osl_clearSocketSet(oslSocketSet Set);
@@ -635,6 +643,8 @@ SAL_DLLPUBLIC void SAL_CALL osl_clearSocketSet(oslSocketSet Set);
@param Set the set were the socket is added.
@param Socket the socket to be added.
+
+ @deprecated
*/
SAL_DLLPUBLIC void SAL_CALL osl_addToSocketSet(oslSocketSet Set, oslSocket Socket);
@@ -642,6 +652,8 @@ SAL_DLLPUBLIC void SAL_CALL osl_addToSocketSet(oslSocketSet Set, oslSocket Socke
@param Set the set were the socket is removed from.
@param Socket the socket to be removed.
+
+ @deprecated
*/
SAL_DLLPUBLIC void SAL_CALL osl_removeFromSocketSet(oslSocketSet Set, oslSocket Socket);
@@ -651,6 +663,8 @@ SAL_DLLPUBLIC void SAL_CALL osl_removeFromSocketSet(oslSocketSet Set, oslSocket
@param Socket check if this socket is in the set.
@retval sal_True if socket is in the set.
+
+ @deprecated
*/
SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket Socket);
@@ -667,6 +681,8 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket So
@return -1 on errors, otherwise the number of sockets with pending events. In case of timeout, the
number might be 0.
+
+ @deprecated
*/
SAL_DLLPUBLIC sal_Int32 SAL_CALL osl_demultiplexSocketEvents(
oslSocketSet IncomingSet,