aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
Commit message (Collapse)AuthorAgeFilesLines
* Back out changeset 2c1583bb0e0fKim Alvefur2020-10-151-0/+4
| | | | Same reason as 712b2e6a09d9
* Back out 6dde2c9fa272: Doesn't work on Lua 5.1Kim Alvefur2020-10-151-13/+6
|
* util.strbitop: Remove redundant init functionKim Alvefur2020-10-151-4/+0
| | | | | When you have 3 almost identical functions, you tend to edit one and then copypaste. Forgot to remove this line from the other two.
* util.strbitop: Create buffer in the correct size (optimization)Kim Alvefur2020-10-151-6/+13
| | | | | This avoids dynamically growing the buffer as Lua does when luaL_addchar is used, thus saving on realloc calls.
* util.strbitop: Reformat codeKim Alvefur2020-10-151-9/+9
| | | | | | | | | | | | | | astyle \ --indent=tab \ --attach-classes \ --indent-switches \ --break-blocks \ --pad-oper \ --unpad-paren \ --add-braces \ --align-pointer=name \ --lineend=linux \ *.c
* util.strbitop: Library for bitwise operations on stringsKim Alvefur2019-09-073-2/+93
|
* util.pposix: Avoid overflow of malloc info at 2GB (fixes #1445 until 4GB)Kim Alvefur2019-11-161-5/+5
|
* util.encodings: Allow unassigned code points in ICU mode to match libidn ↵Kim Alvefur2019-04-241-1/+1
| | | | behavior (fixes #1348)
* util.hashes: Use HMAC function provided by OpenSSL (fixes #1345)Kim Alvefur2019-04-191-17/+11
|
* util-src/makefile: Update with util.poll and util.compat (fixes #1251)Kim Alvefur2018-11-301-1/+2
|
* util.xpcall, util.compat: Add non-hacky multi-argument xpcall() for Lua 5.1Matthew Wild2018-10-262-1/+31
|
* net.server_epoll: Special handling of signal interruptsKim Alvefur2018-10-121-0/+5
|
* net.server_epoll: Ignore ENOENT when deregitering socketKim Alvefur2018-10-121-1/+2
| | | | It should not really happen
* net.server_epoll: Graceful handling of registering already added socketKim Alvefur2018-10-121-1/+7
|
* util.poll: Fix inverted logicKim Alvefur2018-10-111-1/+1
|
* util.poll: Handle failed epoll FD creationKim Alvefur2018-10-111-1/+12
|
* util.poll: Early return from __gc in case of no valid epoll FDKim Alvefur2018-10-111-0/+4
| | | | | This could happen if the epoll FD has already been closed or the epoll_create call failed
* util.poll: Increase max epoll events per callKim Alvefur2018-10-081-1/+1
| | | | | | | | | | This makes the struct roughly the same size in both epoll and select mode (64bit). There doesn’t seem to be much guidance on an appropriate size, it does not seem to matter too much since if there are more events they will simply show up in the next epoll_wait call. The number of exactly concurrent events should be fairly low most of the time anyways.
* util.poll: Zero FD sets watched for errors on creationKim Alvefur2018-10-071-0/+2
|
* net.poll: Guard against negative or too large FDsKim Alvefur2018-10-071-0/+14
|
* util.poll: Fix missing return for adding duplicate FDKim Alvefur2018-10-071-0/+1
|
* util.poll: Tweak metatable name fieldKim Alvefur2018-10-061-2/+2
|
* util.poll: Fix monitoring of socket exceptions in select modeKim Alvefur2018-10-061-1/+1
| | | | | Since state->err is a set of all watched FDs, this mistake caused all sockets to appear to have errors.
* util.poll: Lua 5.1 compatKim Alvefur2018-09-151-0/+6
|
* util.poll: Remove 'inline' from function declarationKim Alvefur2018-09-151-1/+1
| | | | Why does this fix building?
* util.poll: Import poll library with epoll and select supportKim Alvefur2018-05-162-1/+425
|
* util.pposix: Allow _DARWIN_C_SOURCE to be overridenKim Alvefur2018-09-081-0/+2
| | | | Like the others there
* Merge 0.10->trunkKim Alvefur2018-09-081-0/+3
|\
| * util.pposix: Fix or silence a warning on OS X (#1202)Kim Alvefur2018-09-081-0/+3
| |
* | Merge 0.10->trunkKim Alvefur2018-09-081-1/+1
|\|
| * util.pposix: Fix building on OS X (#1202)Kim Alvefur2018-08-181-1/+1
| |
* | util.pposix: Restrict use of malloc_info to glibcKim Alvefur2018-09-071-1/+1
| | | | | | | | Fixes build on musl based distros like Alpine linux
* | util.pposix: Do not attempt to assign to stdio variables [pedantic]Kim Alvefur2018-09-071-3/+3
| | | | | | | | | | | | Fixes build on gcc 6.4.0 See also https://stackoverflow.com/a/586416
* | util-src/makefile: Add util.time to BSD makefileKim Alvefur2018-08-111-1/+1
| |
* | util.time: Allow for already set constantKim Alvefur2018-08-111-0/+2
| |
* | util.time: Add monotonic timeKim Alvefur2017-03-091-0/+9
| |
* | util.time: Convert to CKim Alvefur2017-03-092-1/+25
| |
* | encodings: Explicitly say that base64 decoding falls through in a switch, ↵Emmanuel Gil Peyrot2018-08-081-0/+2
| | | | | | | | fixes a warning in gcc 7+.
* | pposix: Generate an error when a passed string isn’t "unlimited".Emmanuel Gil Peyrot2018-08-081-0/+1
| |
* | pposix, signal: Ignore unused arguments.Emmanuel Gil Peyrot2018-08-082-0/+3
| |
* | net, pposix, signal: Check for redefined defines, fix warnings.Emmanuel Gil Peyrot2018-08-083-0/+11
| |
* | util.pposix: Use freopen(3) when replacing standard IO streams (thanks ↵Kim Alvefur2018-07-121-7/+3
| | | | | | | | | | | | ratchetfreak) Man page says this is what freopen(3) is for.
* | util.ringbuffer: Fix typo in comment [codespell]Kim Alvefur2018-04-061-1/+1
| |
* | Add makefiles compatible with BSD makeKim Alvefur2018-03-111-0/+44
| |
* | Rename Makefile -> GNUmakefile to reflect dependency on GNU MakeKim Alvefur2017-10-311-1/+1
| |
* | util.ringbuffer: Add method for discarding buffered data without returning ↵Kim Alvefur2018-02-241-0/+23
| | | | | | | | it to lua
* | util.ringbuffer: Add various commentsKim Alvefur2018-02-241-0/+19
| |
* | util.crand: Return early if a zero bytes are requestedKim Alvefur2017-12-031-1/+5
| |
* | util.crand: Throw an error for sizes smaller than 1 byteKim Alvefur2017-12-031-1/+3
| |
* | util.crand: Make it possible to use arc4random on Linux (needs libbsd)Kim Alvefur2017-12-031-1/+5
| |