Skip to content
Permalink
Branch: bleeding
Commits on Jan 9, 2020
  1. api: fixed zero producing warnings for primitive types.

    Snaipe committed Jan 4, 2020
    We also stop using empty() and ! as a basis for checking for zero-ness,
    and instead we simply compare the current parameter with the zero value
    of the type. This does requires that the type is default-constructible,
    which is, I think, reasonable, because a type that does not have
    a default-constructor cannot be guantanteed to define what a
    "zero-value" of itself means, if any.
    
    It is probably fine to make that assumption and document it as such, as
    the obvious workaround is to cr_assert the appropriate boolean
    condition.
Commits on Jan 6, 2020
  1. api,cxx: throw std::bad_alloc on allocation failures

    Snaipe committed Jan 6, 2020
Commits on Jan 3, 2020
  1. elf: stop assuming that PAGE_SIZE is 4KiB.

    Snaipe committed Dec 31, 2019
    On some architectures, it's possible to make the kernel use 64KiB pages.
    We've had some code in the elf section handling that aligned sections on
    4KiB page boundaries regardless, instead of asking for the right page
    size through sysconf(3).
Commits on Jan 2, 2020
  1. meson: fixed warnings.

    Snaipe committed Jan 2, 2020
  2. misc: remove old debian packaging files

    Snaipe committed Jan 2, 2020
  3. client: use PRId macros instead of PRIi

    Snaipe committed Jan 2, 2020
    This shouldn't really matter for printf, but mingw complains about %lli.
    In any case, using %i is semi-bogus for printf since it only has a
    significant meaning for the scanf function family. Let's just use %d.
  4. api: use the correct printf specifiers on mingw-gcc.

    Snaipe committed Dec 31, 2019
    MinGW uses by default the windows CRT for printf, but can be convinced
    to use its own ANSI-compatible printf implementation by defining the
    __USE_MINGW_ANSI_STDIO macro.
    
    This fix is two-fold: first, we use the "I64" specifier prefix instead of "ll"
    for the long long type modifier if we're using MSVC.
    
    Then, since cr_asprintf uses printf and is compiled in libcriterion.so,
    we have to make a choice on which printf to use for our users.
    Naturally, we prefer the standards-compliant one.
  5. api: re-unify size_t format specifier

    Snaipe committed Jan 1, 2020
    We change CR_SIZE_T_FORMAT into a more formal PRI-like macro:
    CRI_PRIuSIZE. We also get rid of CRI_SIZE_T_FMT, which was ridiculous.
  6. api: remove continuation backslash in definition

    Snaipe committed Jan 1, 2020
    This makes compiler diagnostics choke, as it believes that the rest of
    the entire file is part of the macro definition for some reason.
You can’t perform that action at this time.