Commit Graph

676 Commits

Author SHA1 Message Date
George Sokianos 9098ed0e31 Added OS4 makefile 2023-01-10 23:51:34 +00:00
Chun-wei Fan c47cf796fc tools/psl.c: Fix build on Windows
localtime_r() is not available on Windows but a more-secure variant
of localtime(), localtime_s() is provided on Windows.

Define localtime_r() on Windows as its arguments are reversed as compared
to localetime_s(), to achive more or less the same purpose.
2022-12-27 11:09:14 +01:00
Chun-wei Fan 86923341a3 meson: Clean up ICU dependency search
Since we are using Meson 0.60.0 or later, use CMake to help us find ICU,
which is cleaner and more comprehensive, and allows us to use libicu_dep
= depedency(...) even on Visual Studio, where CMake will find the
appropriate ICU headers and libraries for us internally.

Sadly, due to peculiarities, we have to live with the warning that comes
up as we needed to look for ICU in the older method instead of the
recommended modules: ['ICU::uc'] method.
2022-12-27 11:07:54 +01:00
Tim Rühsen 927b202c69 Release v0.21.2 2022-12-26 13:46:23 +01:00
Tim Rühsen f2bdc1709d tools/psl.c: Use localtime_r instead of localtime 2022-12-09 13:38:14 +01:00
Tim Rühsen 5eaa8b4796 CI: Install missing autopoint 2022-12-09 13:28:57 +01:00
Tim Rühsen c03f48aa24 Update PSL 2022-12-09 13:28:57 +01:00
LGTM Migrator 4cb5c0cea0 Add CodeQL workflow for GitHub code scanning 2022-12-09 13:10:11 +01:00
Matt Turner 182bfd0e5f Use AC_SYS_LARGEFILE
Ensures that calls to fopen() and stat() can handle largefiles.
2022-11-06 19:31:50 +01:00
Cœur c546aafc0a Fix "Although the value stored to 'pos' is used in the enclosing expression, the value is never actually read from 'pos'" 2022-10-15 19:06:05 +02:00
Eli Schwartz b9503b64c3 meson: fix regression that made it impossible to build
In commit aa4909766c an option was
modified and changed its type from a list of possible strings to a
true/false value.

However, the build wasn't updated to correspond to that change, so it
didn't logically work -- and Meson even threw a type error saying you
cannot compare strings to booleans.

The actual change was basically "do not use this option anymore except
to pass a macro to the source file and embed the data at all". So we can
simply get rid of a bunch of complex dependency conditionals.

Fixes #185
2022-07-26 12:16:13 +02:00
Tim Rühsen a7b63cbb35
Merge pull request #183 from neheb/patch-1
meson: switch iconv to meson's handling
2022-06-10 15:54:38 +02:00
Tim Rühsen cf6878fd24 Update PSL submodule 2022-06-10 15:51:21 +02:00
Tim Rühsen 7a4cbdd386
Merge pull request #181 from hwti/builtin-option
Make builtin option independant from runtime one
2022-06-10 15:49:58 +02:00
Rosen Penev b27d4b69ce
meson: switch iconv to meson's handling
Fixes compilation under OpenWrt.
2022-06-09 17:01:18 -07:00
Loïc Yhuel aa4909766c Make builtin option independant from runtime one
Since commit deabd4a, psl2c has been replaced by psl-make-dafsa.
The builtin PSL data is always generated the same way, and the value of the builtin
configure option does not matter anymore.

The built-in data is now embedded by default (instead of the previous "auto"), unless
explicitly disabled by --disable-builtin/-Dbuiltin=false.

When not using an run-time runtime IDNA library (--disable-runtime/-Druntime=no), libpsl can
now include the built-in data without any build-time dependency.
2022-06-06 22:48:32 +02:00
Tim Rühsen 6a82bcbc2a Fix comments from C++ to C/C++ in psl-make-dafsa 2022-06-06 12:32:17 +02:00
Tim Rühsen 664f3dc852
Merge pull request #180 from eugmes/remove-macro
Remove definition of _GCC_VERSION_AT_LEAST
2022-02-18 19:39:29 +01:00
Ievgenii Meshcheriakov 9d39483d42 Remove definition of _GCC_VERSION_AT_LEAST
This macro is unused and is the only piece for compiler-specific
code in this file.
2022-02-18 16:57:35 +01:00
Tim Rühsen 67aadbe967 Remove obsolete fuzzer builds from fuzz/run-clang 2022-01-16 19:36:07 +01:00
Tim Rühsen 54038ae4d9 Require gettext version 0.19.3 2022-01-16 19:14:33 +01:00
Tim Rühsen 97f8ae52c1 Update fuzzing tools and build scripts 2022-01-16 12:59:23 +01:00
Tim Rühsen 21d2d51911 Avoid 'NULL + 1' as it is UB 2022-01-16 12:55:51 +01:00
Tim Rühsen 55d0ae04de Avoid 8bit overflow in is_public_suffix() 2022-01-16 12:51:33 +01:00
Tim Rühsen 042c586371 Update corpora from OSS-FUZZ 2022-01-16 12:08:01 +01:00
Tim Rühsen 1023a9ad12 Fix stack buffer overflow WRITE 1 in domain_to_punycode()
Reported-by: oss-fuzz (issue 39424 and issue 39226)

The affected code would only be built into the library when
configured to build without any IDNA library.
2022-01-15 22:38:36 +01:00
Tim Rühsen 044b5ed5d4 Bump gettext version to 0.19.3 2022-01-15 14:26:06 +01:00
Tim Rühsen be03c8ef97 Update m4/ax_check_compile_flag.m4 2022-01-15 14:18:37 +01:00
Tim Rühsen 864d938f39 Add brackets for AC_INIT argument 2022-01-15 14:18:18 +01:00
Tim Rühsen 5f796be788
Merge pull request #177 from equeim/meson-static
meson: automatically add PSL_STATIC define when building Windows static library and fix tests/tools link errors
2022-01-15 13:54:28 +01:00
Alexey Rochev 1159bd46c3 meson: fix tests/tools link errors when building shared library for Windows
We need to link them with ws2_32 explicitly.
2022-01-13 01:55:03 +03:00
Alexey Rochev ba6f11f751 meson: automatically add PSL_STATIC define when building Windows static library 2022-01-13 01:54:38 +03:00
Tim Rühsen 4a10a1698b
Merge pull request #179 from equeim/meson-libicu-static
Use C++ linker when building with libicu
2022-01-08 19:43:10 +01:00
Alexey Rochev 02c8476071 Use C++ linker when building with libicu
ICU is a C++ library, event though it has C interface.
Therefore we have to use C++ linker when linking with it.
2022-01-07 01:12:17 +03:00
Tim Rühsen 88a75d4711
Merge pull request #178 from equeim/tests-libicu
Fix Meson build
2022-01-06 19:29:39 +01:00
Alexey Rochev 5a29a64444 Remove libicu includes from test-registrable-domain.c
It doesn't seem like they are used,
and they cause build failures with meson.
2022-01-06 03:03:43 +03:00
Alexey Rochev 43fc4f0631 meson: bring back libiconv dependency lookup 2022-01-06 03:03:43 +03:00
Alexey Rochev 0ecc788797 Remove meson.build generation and separate project and library versions in their own files
Project and library version are now stored in
version.txt and libtool_version_info.txt files respectively.
Both autotools and meson get their versioning information from this files.
Meson additionally automatically transforms library version
from libtool's own format.

Also raise meson version requirement from 0.47 to 0.57 which
is required by these changes.
2022-01-06 03:02:33 +03:00
Tim Rühsen 4afd9e705b
Merge pull request #174 from rockdaboot/tmp-wsa-startup
Add WSAStartup() for Windows psl tool and tests.
2021-11-26 19:18:19 +01:00
Tim Rühsen f5035b854b Add WSAStartup() for Windows psl tool and tests.
As reported at https://github.com/rockdaboot/libpsl/issues/173,
psl_is_cookie_domain_acceptable() doesn't work properly without
WSAStartup() on Windows.

Co-authored-by: gvanem@yahoo.no
2021-11-26 19:10:37 +01:00
Tim Rühsen b2625f93f2 Fix write buffer overflow by 1 in domain_to_punycode()
This issue has been triggered after the previous commit increased
the size of label_buf.

It has been found by OSS-Fuzz (issue 39226).
The testcase is included into the unit tests.
2021-09-26 18:02:04 +02:00
Tim Rühsen 304ca77522 Increase label size from 48 -> 128 2021-09-18 12:24:45 +02:00
Tim Rühsen 50ff7f2edf Update upstream PSL 2021-09-18 12:22:16 +02:00
Tim Rühsen 6ce6c4e399
Merge pull request #168 from nacho/nacho/gtk-doc
meson: build reference manual with gtk_doc
2021-01-31 17:38:23 +01:00
Ignacio Casal Quinteiro a1b91e86e4 meson: build reference manual with gtk_doc 2021-01-26 12:38:01 +01:00
Tim Rühsen 6f4f6d766c Replace obsolete AC_HELP_STRING with AS_HELP_STRING 2021-01-16 18:16:35 +01:00
Tim Rühsen 99e7e6a2af
Merge pull request #166 from quink-black/fix-build-iconv
Add libiconv dep to meson build again
2021-01-16 18:07:35 +01:00
Tim Rühsen 44443ad3a4 Update PSL data from upstream 2021-01-16 17:56:23 +01:00
Tim Rühsen fef1568bef
Merge pull request #167 from SteelPangolin/meson-install-more
Meson: install libpsl man page, DAFSA builder
2021-01-16 17:46:39 +01:00
Erica Ehrhardt 62081a021f Meson: install libpsl man page, DAFSA builder
Partially addresses issue #136,
at least when building from a distribution tarball.
2021-01-14 17:13:46 -08:00