Skip to content

Commit

Permalink
my_HTONLL tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed Oct 9, 2024
1 parent 361b2de commit b788a5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ uint16_t my_HTONS(const uint16_t x);

void socket_set_nodelay(const int fd);

#define my_HTONLL(x) ((1==htonl(1)) ? (x) : (((uint64_t)htonl((x) & 0xFFFFFFFFUL)) << 32) | htonl((uint32_t)((x) >> 32)))
#define my_NTOHLL(x) ((1==ntohl(1)) ? (x) : (((uint64_t)ntohl((x) & 0xFFFFFFFFUL)) << 32) | ntohl((uint32_t)((x) >> 32)))
#define my_HTONLL(x) ((1==my_HTONL(1)) ? (x) : (((uint64_t)my_HTONL((x) & 0xFFFFFFFFUL)) << 32) | my_HTONL((uint32_t)((x) >> 32)))
#define my_NTOHLL(x) ((1==my_NTOHL(1)) ? (x) : (((uint64_t)my_NTOHL((x) & 0xFFFFFFFFUL)) << 32) | my_NTOHL((uint32_t)((x) >> 32)))

extern uint64_t running_since;

0 comments on commit b788a5b

Please sign in to comment.