This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,457 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
set (PROJECT_MAJOR_VERSION 1) | ||
set (PROJECT_MINOR_VERSION 2) | ||
set (PROJECT_PATCH_VERSION 15) | ||
set (PROJECT_PATCH_VERSION 16) | ||
set (PROJECT_VERSION | ||
"${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
static void * mm__dup_(const void * src, size_t size) { | ||
void * mem = malloc(size); | ||
|
||
return mem ? memcpy(mem, src, size) : NULL; | ||
} | ||
|
||
#define mm__alloc_(type, ...) \ | ||
(type *)mm__dup_((type[]) {__VA_ARGS__ }, sizeof(type)) | ||
|
||
#define bind__sock_port0_(HTP) ({ \ | ||
struct sockaddr_in sin; \ | ||
socklen_t len = len = sizeof(struct sockaddr); \ | ||
uint16_t port; \ | ||
\ | ||
evhtp_bind_socket(HTP, "127.0.0.1", 0, 128); \ | ||
\ | ||
getsockname( \ | ||
evconnlistener_get_fd(HTP->server), \ | ||
(struct sockaddr *)&sin, &len); \ | ||
\ | ||
port = ntohs(sin.sin_port); \ | ||
port; \ | ||
}) |
Oops, something went wrong.