Commit graph

373 commits

Author SHA1 Message Date
Kim Alvefur
255423ab56 util.pposix: Use correct type for limits [-Wconstant-conversion] 2017-03-07 22:36:43 +01:00
Kim Alvefur
3c789f1ac7 util.pposix: Limit meminfo to Linux until we can figure out how to get this info on other platforms 2017-03-07 22:33:57 +01:00
Kim Alvefur
2246bd21b5 util.ringbuffer: Change types of length related variables to size_t [-Wsign-compare] 2017-03-02 19:22:07 +01:00
Kim Alvefur
3bf3935e78 Backed out changeset a3a4ed0d34f4 C99 is ok 2017-03-02 00:46:32 +01:00
Kim Alvefur
956c50882b util.crand: Only include getrandom shiv with glibc older than 2.25 2017-03-02 00:17:34 +01:00
Kim Alvefur
7dba99875f util.crand: Change argumen names to match some man page 2017-03-02 00:15:04 +01:00
Kim Alvefur
dfb72918f3 util.crand: Move comment block 2017-03-01 22:39:01 +01:00
Kim Alvefur
d205c78327 util.pposix, configure: Move _GNU_SOURCE macro into source files 2017-03-01 22:27:11 +01:00
Kim Alvefur
82755e48e8 util.pposix: Expose ENOENT constant (usually 2, but you never know) 2017-03-01 17:03:48 +01:00
Kim Alvefur
2b4028fd7e util.pposix: Fix typo in comment 2017-02-26 20:31:08 +01:00
Kim Alvefur
4707d5665d util.crand: Clarify that lua_error does not return 2017-02-25 18:12:24 +01:00
Kim Alvefur
a330175614 util.crand: Throw error if OpenSSLs RNG is not seeded 2017-02-25 17:57:22 +01:00
Kim Alvefur
40d8e257d8 util-src/*.c: Attach pointer * to name instead of type 2017-02-12 16:42:29 +01:00
Kim Alvefur
3e41ed8099 util.ringbuffer: Remove address of buffer itself from __tostring since is now in the same struct 2017-02-12 15:51:32 +01:00
Kim Alvefur
d8ab361f15 util.poll: Add missing return statements in fallback mode
These allowed modifying or deleting select() state for unregistered FDs.
During normal usage this should never happen. Modifying one that isn't
set might cause weirdness but deleting an already deleted FD isn't a
problem.
2019-07-28 16:17:23 +02:00
Kim Alvefur
63c03ce6ef util.encodings: Declare absence of arguments [-Wstrict-prototypes] 2019-05-13 11:30:45 +02:00
Kim Alvefur
0d28378a7a util-src/*.c: Squeeze repeated blank lines 2017-01-23 18:33:35 +01:00
Kim Alvefur
8bcfc38374 util.crand: TODOs 2017-01-22 09:55:52 +01:00
Kim Alvefur
2b7fcfdb13 util.crand: Comment about getrandom 2017-01-22 09:55:44 +01:00
Kim Alvefur
d5a5325526 util.crand: Add comment describing purpose of module 2017-01-22 09:32:33 +01:00
Kim Alvefur
7b85ad2d53 util.crand: Update copyright header 2017-01-22 09:31:56 +01:00
Kim Alvefur
c8e4e17b46 util.ringbuffer: Allocate buffer itself as part of userdata (simpler, single allocation, no need for __gc) 2017-01-22 09:23:10 +01:00
Kim Alvefur
26d03a9a1a util.ringbuffer: Remove unused macros 2017-01-22 04:05:41 +01:00
Kim Alvefur
13f287acb9 util.crand: Raise hard errors 2017-01-20 12:23:55 +01:00
Kim Alvefur
8e052e0857 util.crand: Remove seeding 2017-01-20 11:33:31 +01:00
Kim Alvefur
a59ab44459 util.crand: Let Lua handle allocation, freeing and error handling for buffer 2017-01-20 11:52:46 +01:00
Kim Alvefur
41485b40ab util.crand: Switch to luaL_checkinteger since checkint is deprecated in Lua 5.3 2017-01-20 11:41:07 +01:00
Kim Alvefur
5b10d245e3 util-src: Make C modules assert that the Lua runtime matches what it was compiled for 2017-01-08 14:21:08 +01:00
Kim Alvefur
4bacd7b4fc util.pposix: rfork() seems to be FreeBSD only (fixes #412) 2016-12-19 08:51:50 +01:00
Kim Alvefur
5cc3f59002 configure: Move -ggdb flag here from util-src/Make 2016-08-19 16:03:10 +02:00
Kim Alvefur
dfb9438ad7 Move C compiler flag -pedantic from Makefile to configure 2016-08-19 15:59:12 +02:00
Kim Alvefur
f092c77e11 util-src/Makefile: Remove redundant -Wall (already set by configure) 2016-08-19 15:58:07 +02:00
Kim Alvefur
2c74295bfa util.table: Move loop variable to top of function for C89 compatibility 2016-08-07 20:49:50 +02:00
Matthew Wild
544456bc19 util.table: Add pack() function (this is already available in Lua 5.2+) 2016-07-27 13:39:19 +01:00
Kim Alvefur
01a15bfbe2 util.pposix: Ask for shared file descriptor table using rfork() on *BSD (fixes #412) 2016-05-25 21:34:34 +02:00
Kim Alvefur
478e9b9327 util.crand: Silence compiler warning 2016-05-25 16:54:43 +02:00
Kim Alvefur
c35c696843 util.crand: Include stdlib.h instead of malloc.h for portability (thanks Tobias) 2016-02-22 22:56:05 +01:00
Kim Alvefur
ed8199402f util.crand: C binding to one of OpenSSL, Linux getrandom() or OpenBSD arc4random() CSPRNG 2016-02-22 18:44:43 +01:00
Kim Alvefur
ea0373f3ad Add util.ringbuffer, a ringbuffer with a file handle like interface 2016-02-02 20:24:27 +01:00
Kim Alvefur
c8454e9180 util.pposix: Expose the uname GNU extension field 'domainname' 2015-11-25 20:43:29 +01:00
Kim Alvefur
9a4c2f7e52 configure,util-src/Makefile: Make a variable that includes -l for OpenSSL (like with IDNA_LIBS) 2015-09-27 00:28:46 +02:00
Kim Alvefur
945a98ba5b util-src/Makefile: Remove redundant variables (set in config.unix already) 2015-09-27 00:12:07 +02:00
Kim Alvefur
265af7c012 util-src/Makefile: Don't make exceptions for how to build .so for util.hashes and util.encodings 2015-09-27 00:10:18 +02:00
Kim Alvefur
ffa983b265 util-src/Makefile: Tell Make how to build .so from .o in a modern way (Let built-in rules handle .o) 2015-09-27 00:08:46 +02:00
Kim Alvefur
0941a2d8f4 util-src/Makefile: Move Lua include path into CFLAGS variable 2015-09-27 00:04:14 +02:00
Kim Alvefur
1ea718fb81 configure, util-src/Makefile: Move OS X deployment flag to an C compiler argument set by configure 2015-09-26 23:42:46 +02:00
Kim Alvefur
321cfea3f3 util-src/Makefile: Use variables for install binary and target directory 2015-09-26 23:38:09 +02:00
Kim Alvefur
ddc5466540 util-src/Makefile: Move list of .so files in a variable 2015-09-26 23:29:50 +02:00
Kim Alvefur
ddeed6873e util-src/*.c: Invert Lua 5.2 compat to be 5.2+ by default and a macro to support 5.1 2015-04-26 12:38:37 +02:00
Kim Alvefur
8f40f1f4e6 util.encodings: Move declarations to top of function [pedantic] 2015-05-02 14:52:51 +02:00