]> arthur.barton.de Git - bup.git/commit
Wrap readline oursleves to avoid py3's interference
authorRob Browning <rlb@defaultvalue.org>
Sun, 7 Jun 2020 20:32:10 +0000 (15:32 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 21 Jun 2020 16:20:58 +0000 (11:20 -0500)
commit9277b335d0be832b19f95f5f77f0c3bd29362a5b
treed866457445b0f9588858d5647b8a92760610e0a5
parente881f2c352bc9bb788515e3b54d1bf5d08fd61a4
Wrap readline oursleves to avoid py3's interference

We don't want Python to "help" us by guessing and insisting on the
encoding before we can even look at the incoming data, so wrap
readline ourselves, with a bytes-oriented (and more direct) API.  This
will allows us to preserve the status quo for now (and maintain parity
between Python 2 and 3) when using Python 3 as we remove our LC_CTYPE
override.

At least on Linux, readline --cflags currently defines _DEFAULT_SOURCE
and defines _XOPEN_SOURCE to 600, and the latter conflicts with a
setting of 700 via Python.h in some installations, so for now, just
defer to Python as long as it doesn't choose an older version.

Thanks to Johannes Berg for fixes for allocation issues, etc. in an
earler version, and help figuring out the #define arrangement.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile
README.md
config/configure
dev/prep-for-debianish-build
dev/prep-for-freebsd-build
dev/prep-for-macos-build
lib/bup/_helpers.c