This patch is from the upstream pull request https://github.com/chadaustin/sajson/pull/54. It fixes linking with GCC. diff --git a/include/sajson.h b/include/sajson.h index 8b4e05a..1bd045b 100644 --- a/include/sajson.h +++ b/include/sajson.h @@ -138,12 +138,17 @@ constexpr inline size_t make_element(tag t, size_t value) { // header. This trick courtesy of Rich Geldreich's Purple JSON parser. template struct globals_struct { + static const unsigned char parse_flags[256]; +}; +typedef globals_struct<> globals; + // clang-format off // bit 0 (1) - set if: plain ASCII string character // bit 1 (2) - set if: whitespace // bit 4 (0x10) - set if: 0-9 e E . - constexpr static const uint8_t parse_flags[256] = { + template + const unsigned char globals_struct::parse_flags[256] = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 @@ -162,15 +167,13 @@ struct globals_struct { }; // clang-format on -}; -typedef globals_struct<> globals; -constexpr inline bool is_plain_string_character(char c) { +inline bool is_plain_string_character(char c) { // return c >= 0x20 && c <= 0x7f && c != 0x22 && c != 0x5c; return (globals::parse_flags[static_cast(c)] & 1) != 0; } -constexpr inline bool is_whitespace(char c) { +inline bool is_whitespace(char c) { // return c == '\r' || c == '\n' || c == '\t' || c == ' '; return (globals::parse_flags[static_cast(c)] & 2) != 0; } r'>author
8218]....* gnu/packages/file.scm (file): Update to 5.37. * gnu/packages/patches/file-CVE-2019-18218.patch: New file. * gnu/packages/patches/file-CVE-2018-10360.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
AgeCommit message (Expand)Author
2023-10-28profiles: Hooks honor the #:system parameter of ‘profile-derivation’....Fixes <https://issues.guix.gnu.org/65225>. * guix/profiles.scm (info-dir-file, package-cache-file) (info-dir-file, ghc-package-cache-file, ca-certificate-bundle) (emacs-subdirs, gdk-pixbuf-loaders-cache-file, glib-schemas) (gtk-icon-themes, gtk-im-modules, linux-module-database) (xdg-desktop-database, xdg-mime-database, fonts-dir-file) (manual-database, manual-database/optional): Add optional #:system parameter and pass it to ‘gexp->derivation’. (profile-derivation): Pass HOOK a second parameter, SYSTEM. * gnu/bootloader.scm (efi-bootloader-profile)[efi-bootloader-profile-hook]: Add optional #:system parameter and pass it to ‘gexp->derivation’. * guix/channels.scm (package-cache-file): Likewise. * tests/profiles.scm ("profile-derivation, #:system, and hooks"): New test. Reported-by: Tobias Geerinckx-Rice <me@tobias.gr> Ludovic Courtès
Leo Famulari
2019-05-01Merge branch 'master' into core-updatesMarius Bakke
2019-03-30gnu: Use 'this-package' as a native input instead of 'self-native-input?'....* gnu/packages/file.scm (file)[self-native-input?]: Remove. [native-inputs]: New field. * gnu/packages/guile.scm (guile-1.8)[self-native-input?]: Remove. [native-inputs]: New field. (guile-2.0)[self-native-input?]: Remove. [native-inputs]: Add THIS-PACKAGE when (%current-target-system) is true. * gnu/packages/ncurses.scm (ncurses)[self-native-input?]: Remove. [native-inputs]: Add THIS-PACKAGE when (%current-target-system) is true. * gnu/packages/python-xyz.scm (python-file)[self-native-input?]: Remove. [native-inputs]: New field. Ludovic Courtès
2019-02-07gnu: file: Incorporate grafted changes....* gnu/packages/file.scm (file)[replacement]: Remove. [source](patches): New field. (file/fixed): Remove variable. Marius Bakke