Compare commits

...

62 Commits
v1.5.4 ... dist

Author SHA1 Message Date
Bert Belder
0598a791bf
version 1.5.8 2020-06-29 04:38:00 +02:00
Bert Belder
e215682be2
win: use lower case file names when importing Windows SDK headers
Although the header files included in the official Windows SDK have
mixed case file names, MinGW opted to ship headers with entirely lower
case names.

Since the MinGW headers are often used when cross compiling Windows
binaries on Linux hosts, and Linux treats paths as case sensitive by
default, following the 'official' spelling breaks many cross build
setups.

Non-cross builds do not seem to be affected by using lower case file
names, and Microsoft also does not seem particularly consistent in the
way it spells header file names in e.g. documentation and sample code.

Therefore, this patch makes wepoll use lower case file names when
including Windows headers, regardless of whether MinGW or the official
SDK is used.

See also https://github.com/libevent/libevent/pull/1039
and https://github.com/stjepang/smol/issues/138.

Closes: https://github.com/piscisaureus/wepoll/pull/19
2020-06-29 04:18:06 +02:00
Bert Belder
8ddde74704
ci: add Visual Studio 2019 x86 and x64 test jobs 2020-06-29 03:32:01 +02:00
Bert Belder
990ab03d70
ci: use msvc x64 toolset to build x64 targets 2020-06-29 03:27:04 +02:00
Bert Belder
98decd24e2
src: use '#define's instead of global variables for integer constants
By doing this, it is no longer necessary to invoke `unused_var()` to
squelch compiler warnings about unused variables that are used only in
`assert()` calls. These `assert()` calls are removed by the preprocessor
in release builds, which causes these warnings.
2020-06-20 08:51:29 +02:00
Bert Belder
1c549c3ab7
ci: upgrade node.js to v12.x LTS 2020-06-20 08:51:29 +02:00
Bert Belder
dcaa6606e0
reflock: squelch clang warning about unused const var 'REFLOCK_DESTROY_MASK'
It is used, except when assertions are disabled due to the 'NDEBUG'
preprocessor variable being defined.
2020-06-04 03:02:50 +02:00
Bert Belder
4a7e05917f
src: inline some small and single-caller functions 2020-06-03 12:29:36 +02:00
Bert Belder
f8325fba92
ci: don't dump the entire environment into the build log 2020-05-26 19:24:53 +02:00
Bert Belder
71e9ea6664
tools/bundle: don't emit empty line when stripping 'clang-format on|off' comment 2020-05-26 19:07:03 +02:00
Bert Belder
e9fa25980b
config: re-enable overriding 'WEPOLL_EXPORT' when compiling bundle
This possibility got inadvertently removed in the big config refactor
(3ad20d7), which made building a shared library from the bundled source
distribution (as is done by e.g. vcpkg) impossible.
2020-05-26 19:07:03 +02:00
Bert Belder
2ce1a56c40
config: rename macro 'WEPOLL_INTERNAL_VAR' to 'WEPOLL_INTERNAL_EXTERN'
The old name was not really appropriate; this attribute should only be
used on variable declarations, while the definition of the same variable
needs to be tagged with 'WEPOLL_INTERNAL'.
2020-05-26 19:07:03 +02:00
Bert Belder
f8a135487d
src: improve code comments 2020-05-26 19:07:02 +02:00
Bert Belder
07af653b17
src: rename 'afd_helper' to the more descriptive 'afd_device' 2020-05-26 19:07:02 +02:00
Bert Belder
78bb46e678
port,sock: minor tweaks to 'alloc()' and 'free()' functions 2020-05-26 18:57:00 +02:00
Bert Belder
fa78be3f47
version 1.5.7 2020-05-15 22:38:42 +02:00
Bert Belder
469cb335c1
dist: merge release tag v1.5.7 2020-05-15 22:38:42 +02:00
Bert Belder
8dc6115127
ws: add workaround for Komodia based LSPs that break SIO_BASE_HANDLE 2020-05-13 01:31:16 +02:00
Bert Belder
8223744d7b
port: drop '_handle' suffix from 'port_(un)register_socket()' function names 2020-05-12 03:56:30 +02:00
Bert Belder
81411367b5
queue: rename functions to make their purpose more obvious 2020-05-12 03:56:29 +02:00
Bert Belder
126c00944c
test: make the memory leak checker for tests work again
It turns out that these static constructors declared with
`__declspec(allocate(".CRT$XCU"))` don't work if you try to link them
from a static library. With this patch we go back to passing
'leak-check.c' as an extra source file when compiling a test.
2020-05-09 11:16:07 +02:00
Bert Belder
532d57ed31
style: use clang-format version 10.x 2020-05-09 11:06:23 +02:00
Bert Belder
8128da416c
version 1.5.6 2020-01-13 00:26:46 +01:00
Bert Belder
4fe5f50f22
dist: merge release tag v1.5.6 2020-01-13 00:26:46 +01:00
Bert Belder
efa35adbc5
tree: rename 'FIXUP' macros to 'REBALANCE' 2020-01-13 00:15:16 +01:00
Bert Belder
3ad20d71ff
build: refactor config infrastructure and test build setup
* Configuration is now done with files, instead of through command line
  switches specified in CMakeLists.txt.
* Link tests with a static library instead of compiling individual
  wepoll source files as part of the test executable. This should make
  the CI run significantly faster.
2020-01-12 23:56:59 +01:00
Bert Belder
4536518f8a
tools/bundle: log files in which no include guards were found 2020-01-12 23:42:37 +01:00
Bert Belder
bb6c522d8f
tools/bundle: require include guards to end with '_H_' 2020-01-12 23:42:37 +01:00
Bert Belder
d272c5188d
tools/bundle: rename 'combine.js' to 'bundle.js' 2020-01-12 23:42:37 +01:00
Bert Belder
dd7dd6fcd9
build: rename configuration 'combined' to 'bundle' 2020-01-12 23:42:36 +01:00
Bert Belder
c57eb84863
build: work around bug in in Windows SDK 10.0.17763.0 and maybe other versions 2020-01-12 23:42:34 +01:00
Bert Belder
8cd6e896cd
test: fix clang warning caused by 'static_assert' polyfill 2020-01-12 23:42:07 +01:00
Bert Belder
d87deefada
doc: update copyright years 2020-01-12 23:42:06 +01:00
Bert Belder
a11398b1c5
api: fix typo in comment 2019-06-24 18:14:47 +02:00
Bert Belder
8c98df30da
gitignore: sort patterns 2019-06-24 18:14:47 +02:00
Bert Belder
d5f8f5f1b1
afd: use IO_STATUS_BLOCK instead of OVERLAPPED to track async poll ops
This reduces per-socket memory usage, as the OVERLAPPED structure
contains some fields that are never used.
2019-06-12 21:49:12 +02:00
Bert Belder
a627f365fd
src,test: clean up #include directives 2019-06-12 21:49:11 +02:00
Bert Belder
027fb4a419
util,test: remove definition and usage of type 'ssize_t' 2019-06-12 21:49:11 +02:00
Bert Belder
7080d540e2
build: do not force-include wepoll.h using a command line switch 2019-06-12 21:49:10 +02:00
Bert Belder
017fa62aac
tools/combine: fold identical 'typedef struct' declarations 2019-06-12 21:49:10 +02:00
Bert Belder
06dd355e33
tools: use prettier to format javascript files 2019-06-12 21:21:31 +02:00
Bert Belder
20af8d02c7
port: rename 'iocp' to 'iocp_handle' where appropriate 2019-05-17 13:56:37 -07:00
Bert Belder
cf4530307f
port: make the definition of 'struct port_state' private 2019-05-17 13:42:08 -07:00
Bert Belder
0088a1f263
sock: put functions in a more logical order 2019-05-17 13:42:08 -07:00
Bert Belder
4727adafb7
src: reformat with clang-format 8.0 2019-05-17 13:42:08 -07:00
Bert Belder
65b4e44abd
dist: merge release tag v1.5.5 2019-05-05 05:14:53 +02:00
Bert Belder
e9bf27c395
version 1.5.5 2019-05-05 05:14:52 +02:00
Bert Belder
adf44ab203
test: remove unnecessary semicolon from test-tree 2019-05-05 04:52:33 +02:00
Bert Belder
f196d9fc31
doc: update copyright years 2019-05-05 04:45:29 +02:00
Bert Belder
870273c60d
reflock: use proper access mask when creating keyed event 2018-12-06 08:54:12 +01:00
Bert Belder
ec78f05d70
nt: use documented parameter names for keyed event functions 2018-12-06 08:54:05 +01:00
Bert Belder
2cd1a594d4
nt: sort NT_NTDLL_IMPORT_LIST 2018-12-06 07:15:49 +01:00
Bert Belder
b7289278e1
reflock: make assert in reflock_unref() more strict, improve comments 2018-12-04 13:19:40 -08:00
Bert Belder
b55b10a934
reflock: use lowercase for hex digits consistently 2018-12-04 12:28:46 -08:00
Bert Belder
210f4f8fba
init: fix grammar and clarify comment 2018-11-26 16:43:01 -07:00
Bert Belder
fca062c60d
tools: remove optional parentheses around arrow function parameters 2018-11-26 15:52:40 -07:00
Bert Belder
11633bf403
tools/combine: use arrow functions for Array.map closures 2018-11-26 15:52:07 -07:00
Bert Belder
1bc78625f0
tools/release: simplify regex 2018-11-26 15:50:47 -07:00
Bert Belder
97276ce4dd
nt: remove unused LSA_UNICODE_STRING type 2018-11-25 23:31:23 -07:00
Bert Belder
a82802933a
build: strip clang-format on/off directives from combined source 2018-11-18 03:06:13 -08:00
Bert Belder
653545fd35
test: make test-connect-success-events more robust 2018-11-17 02:02:49 -08:00
Bert Belder
6cf7a01f4a
dist: merge release tag v1.5.4 2018-11-17 00:47:49 -08:00
3 changed files with 512 additions and 449 deletions

View File

@ -1,7 +1,7 @@
wepoll - epoll for Windows
https://github.com/piscisaureus/wepoll
Copyright 2012-2018, Bert Belder <bertbelder@gmail.com>
Copyright 2012-2020, Bert Belder <bertbelder@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without

809
wepoll.c

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
* wepoll - epoll for Windows
* https://github.com/piscisaureus/wepoll
*
* Copyright 2012-2018, Bert Belder <bertbelder@gmail.com>
* Copyright 2012-2020, Bert Belder <bertbelder@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -38,8 +38,6 @@
#include <stdint.h>
/* clang-format off */
enum EPOLL_EVENTS {
EPOLLIN = (int) (1U << 0),
EPOLLPRI = (int) (1U << 1),
@ -72,8 +70,6 @@ enum EPOLL_EVENTS {
#define EPOLL_CTL_MOD 2
#define EPOLL_CTL_DEL 3
/* clang-format on */
typedef void* HANDLE;
typedef uintptr_t SOCKET;