566 Commits

Author SHA1 Message Date
georgemoralis
d3bb810353 added cmakelists 2025-09-07 19:32:27 +03:00
georgemoralis
a948d938b3 Correctly pack epoll_event to match POSIX 2025-09-07 18:21:16 +03:00
georgemoralis
dac666d92f Be consistent with the macro definition of epoll on the linux platform and the return value of the function 2025-09-07 18:14:05 +03:00
Bert Belder
0598a791bf version 1.5.8 v1.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 v1.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 v1.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 v1.5.5 2019-05-05 05:14:52 +02:00