xlibre-xserver/os/ossock.h
Enrico Weigelt, metux IT consult 97f3ff8c7e os: cross platform socket close() wrapper
Reducing the ifdef-zoo a bit by moving the platform specific socket
close calls into separate function. On win32, this also checks the
retval and potentially query for error. On Unix, just calling close().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-07 12:40:35 +02:00

26 lines
491 B
C

/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_OS_OSSOCK_H_
#define _XSERVER_OS_OSSOCK_H_
#include <errno.h>
/*
* os specific initialization of the socket layer
*/
void ossock_init(void);
/*
* os specific socket ioctl function
*/
int ossock_ioctl(int fd, unsigned long request, void *arg);
/*
* os specific socket close function
*/
int ossock_close(int fd);
#endif /* _XSERVER_OS_OSSOCK_H_ */