97 Commits

Author SHA1 Message Date
1b9d89cab3
Use kqueue on Darwin as well
Since poll() is implemented in terms of kqueue() there,
it doesn't seem like this could have improved anything.

Besides man 3 ev, libevent code, and [1],
I haven't managed to find much relevant information.

[1] https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/
2021-09-29 12:07:25 +02:00
a3ad5e7751
Ignore empty XDG_*_DIRS env. variables
As the specification says we should.  GLib does this as well.

It is still possible to achieve an empty set by using ":",
which are two non-absolute paths that should be ignored.
GLib doesn't implement this.  Thus, we're now better than GLib.
2021-09-26 08:49:51 +02:00
960420df3e
Escape DEL character in config_item_write_string() 2020-10-31 21:28:29 +01:00
9639777814
Fix validation of overlong UTF-8
It was too strict and Egyptian dicks didn't want to pass,
so we'll do it half-arsedly for a subset.
2020-10-24 19:09:09 +02:00
929229a1d7
Fix config PEG grammar to match strtoll() 2020-10-24 08:05:17 +02:00
53bcebc2f0
Split out utf8_validate_cp(), adhere to RFC 3629 2020-10-21 05:20:20 +02:00
b08cf6c29f
Reject overlong UTF-8 sequences 2020-10-21 05:08:59 +02:00
69101eb155
Fix optional arguments in --help output
An equals sign is necessary.
2020-10-13 21:27:46 +02:00
9d14562f7e
Improve the UTF-8 API
We need to be able to detect partial sequences.
2020-10-12 22:56:22 +02:00
7e5b6c5343
Fix crashes in the config parser
It had a duality between not requiring null-terminated input
and relying on it, depending on where you looked.
2020-10-12 02:07:14 +02:00
e029aae1d3
Import xwrite(), cstr_set(), resolve_..._template()
From degesch and json-rpc-shell.
2020-10-10 04:31:52 +02:00
b9457c321f
Rename cstr_transform() argument
It does not always have to be tolower().
2020-10-10 04:30:19 +02:00
2201becca4
Mark some issues 2020-10-10 04:29:41 +02:00
d21f8466b5
Bump copyright years 2020-10-02 06:43:16 +02:00
7f919025ee
Add iscntrl_ascii()
It's too easy to miss the DEL character.
2020-10-02 06:31:46 +02:00
1a76b2032e
Add a slogan of sorts 2020-08-01 14:03:23 +02:00
722ef65c1f
Name change 2020-08-01 14:02:25 +02:00
317dfcb6e2
Improve setjmp safety in config parser 2020-04-19 07:02:13 +02:00
3e4e4e5103
Allow aborting the FastCGI protocol parser 2018-10-18 04:08:47 +02:00
8ffe20c0e8
Add missing include for "struct iovec" 2018-06-24 06:09:40 +02:00
69800a6afb
Relicense to 0BSD, update mail address
I've come to the conclusion that copyright mostly just stands in the way
of software development.  In my jurisdiction I cannot give up my own
copyright and 0BSD seems to be the closest thing to public domain.

The updated mail address, also used in my author/committer lines,
is shorter and looks nicer.  People rarely interact anyway.
2018-06-21 23:57:25 +02:00
fe1035633a
Describe syntax of advanced configuration w/ PEG 2018-04-19 00:09:46 +02:00
3835b6e499
Improve simple_config_update_from_file()
- considerably shorter
 - catch file read errors as we should
 - better error messages, now including the filename
 - disallow empty keys as they are never used
 - allow whitespace before start of comment

NUL characters stop processing now, though.  If anyone cares.
2017-06-22 20:42:44 +02:00
bf534010cb
_init() -> _make() where possible 2017-06-22 20:42:44 +02:00
1dcd259d05
Make config_item_clone() static 2017-06-12 08:33:59 +02:00
412100289e
Improve read_line()
One less useless boolean variable.
2017-06-12 02:48:42 +02:00
17322a3686
Make socket_io_try_*() actually use read/write
So that they can be used with pipes.
2017-05-07 09:24:03 +02:00
22edb6d489
Add a warning comment to "poller_fd::closed" 2017-05-06 21:15:03 +02:00
9866675bb7
Fix broken toupper_ascii()
Update copyright years.
2017-05-06 10:55:10 +02:00
daa900e12f
Fix and update LICENSE 2017-02-03 23:03:32 +01:00
084e964286
Fixes to the previous batch of commits 2017-01-23 23:14:04 +01:00
0e08055d6d
Rename strv_add*() to strv_append*()
Consistency.
2017-01-23 23:07:24 +01:00
6642bdf9cd
Rename str_ensure_space() to str_reserve()
Let's not invent our own terminology.
2017-01-23 23:05:42 +01:00
349a0fc3b1
join_strv() -> strv_join(), take a string argument 2017-01-23 23:03:46 +01:00
5552ce1dbe
Rename "struct str_vector" to "struct strv"
Short names for things used often.
2017-01-23 23:01:20 +01:00
973a4b7656
Add ARRAY convenience macros
Because dynamically allocated arrays in C are a pain.
2017-01-23 22:47:39 +01:00
f53b717f3b
Add some consts to function arguments 2016-10-23 13:35:16 +02:00
dc54db9069
Make error_set() return NULL for convenience
This often eliminates the need for a block where one line is enough.
2016-10-10 07:43:57 +02:00
0b77bdeaf9
Merge cstr_split() and cstr_split_ignore_empty() 2016-10-09 09:45:27 +02:00
ad143fd8c0
Add some constness to str_map methods 2016-10-05 05:31:39 +02:00
296cc704a1
Fix a comment 2016-10-04 19:12:30 +02:00
c1c191717f
Use CLOCK_MONOTONIC_RAW for timers if available
Should make timers work more precisely on Linux.
2016-10-04 15:46:20 +02:00
952cf985dc
Add config_read_from_file() 2016-10-01 04:36:59 +02:00
6234f686e0
Add socket_io_*() functions 2016-10-01 04:35:12 +02:00
b07d9df5fc
Simplify resolve_relative_filename_generic() 2016-10-01 04:10:44 +02:00
365aed456e Add poller_post_fork() for *BSD kqueue 2016-03-13 16:41:16 +01:00
9bff16f5ec Fix config schema application 2016-02-01 21:51:45 +01:00
052d2ffc9a Allow fsync() to fail on special files 2016-01-26 21:35:45 +01:00
ce8703cea0 Silence warning 2016-01-26 21:35:40 +01:00
f213a76ad4 Add lock_pid_file() 2016-01-17 04:39:19 +01:00