move EINT* values to util.h

This commit is contained in:
Viktor Szakats 2025-02-28 19:11:35 +01:00
parent 1a86c75b4b
commit 564402de4e
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
7 changed files with 14 additions and 44 deletions

View File

@ -64,11 +64,6 @@
/* include memdebug.h last */
#include "memdebug.h"
#ifdef USE_WINSOCK
#undef EINTR
#define EINTR 4 /* errno.h value */
#endif
#define DEFAULT_PORT 1883 /* MQTT default port */
#ifndef DEFAULT_LOGFILE

View File

@ -56,13 +56,6 @@
/* include memdebug.h last */
#include "memdebug.h"
#ifdef USE_WINSOCK
#undef EINTR
#define EINTR 4 /* errno.h value */
#undef ERANGE
#define ERANGE 34 /* errno.h value */
#endif
#ifdef USE_IPV6
static bool use_ipv6 = FALSE;
#endif

View File

@ -114,17 +114,6 @@
/* include memdebug.h last */
#include "memdebug.h"
#ifdef USE_WINSOCK
#undef EINTR
#define EINTR 4 /* errno.h value */
#undef EAGAIN
#define EAGAIN 11 /* errno.h value */
#undef ENOMEM
#define ENOMEM 12 /* errno.h value */
#undef EINVAL
#define EINVAL 22 /* errno.h value */
#endif
#define DEFAULT_PORT 8999
#ifndef DEFAULT_LOGFILE

View File

@ -85,11 +85,6 @@
/* include memdebug.h last */
#include "memdebug.h"
#ifdef USE_WINSOCK
#undef EINTR
#define EINTR 4 /* errno.h value */
#endif
#define DEFAULT_PORT 8905
#ifndef DEFAULT_LOGFILE

View File

@ -58,15 +58,6 @@
/* include memdebug.h last */
#include "memdebug.h"
#ifdef USE_WINSOCK
#undef EINTR
#define EINTR 4 /* errno.h value */
#undef EAGAIN
#define EAGAIN 11 /* errno.h value */
#undef ERANGE
#define ERANGE 34 /* errno.h value */
#endif
static int socket_domain = AF_INET;
static bool use_gopher = FALSE;
static int serverlogslocked = 0;

View File

@ -56,13 +56,6 @@
#include "timeval.h"
#include "timediff.h"
#ifdef USE_WINSOCK
#undef EINTR
#define EINTR 4 /* errno.h value */
#undef EINVAL
#define EINVAL 22 /* errno.h value */
#endif
const char *serverlogfile = DEFAULT_LOGFILE;
static struct timeval tvnow(void);

View File

@ -25,6 +25,20 @@
***************************************************************************/
#include "server_setup.h"
#ifdef USE_WINSOCK
/* errno.h values */
#undef EINTR
#define EINTR 4
#undef EAGAIN
#define EAGAIN 11
#undef ENOMEM
#define ENOMEM 12
#undef EINVAL
#define EINVAL 22
#undef ERANGE
#define ERANGE 34
#endif
enum {
DOCNUMBER_NOTHING = -7,
DOCNUMBER_QUIT = -6,