From: Guus Sliepen Date: Thu, 2 Apr 2020 18:28:11 +0000 (+0200) Subject: Turn constants back into macros. X-Git-Url: http://git.meshlink.io/?p=utcp;a=commitdiff_plain;h=134cccee1441033ad5bcb736a689a3a7481886d8 Turn constants back into macros. Constants initialized with expressions are not allowed by all compilers. --- diff --git a/utcp_priv.h b/utcp_priv.h index 0b2efe4..fe3fa6d 100644 --- a/utcp_priv.h +++ b/utcp_priv.h @@ -43,11 +43,11 @@ #define DEFAULT_MTU 1000 -static const long USEC_PER_SEC = 1000000; -static const long NSEC_PER_SEC = 1000000000; -static const int DEFAULT_USER_TIMEOUT = 60; // sec -static const long START_RTO = 1 * USEC_PER_SEC; // usec -static const long MAX_RTO = 3 * USEC_PER_SEC; // usec +#define USEC_PER_SEC 1000000L +#define NSEC_PER_SEC 1000000000L +#define DEFAULT_USER_TIMEOUT 60 +#define START_RTO (1 * USEC_PER_SEC) +#define MAX_RTO (3 * USEC_PER_SEC) struct hdr { uint16_t src; // Source port