- Jun 17, 2017
-
-
Jonathan Lebon authored
-
- Jun 14, 2017
-
-
Colin Walters authored
I originally tried to get this into GLib: https://bugzilla.gnome.org/show_bug.cgi?id=783751 But that looks like it's going to fail due to MSVC. Let's add it here at least so I can start using it tomorrow and not wait for the MSVC team to catch up. I renamed `glnx-alloca.h` to `glnx-macros.h` as a more natural collective home for things from systemd's `macro.h`. Finally, I used a Coccinelle spatch similar to the one referenced in the above BZ to patch our uses.
-
- May 11, 2017
-
-
Jonathan Lebon authored
For completeness. It just looks much cleaner than doing the `, FALSE` trick. It also takes care of appending the ': ' for you like its errno version.
-
- Apr 21, 2017
-
-
Colin Walters authored
Like tmpfs. See: https://github.com/flatpak/flatpak/issues/686
-
- Mar 24, 2017
-
-
Colin Walters authored
We were missing the previous automatic `: ` addition; noticed in a failing ostree test. Fix this by just calling the new API as the non-prefix case does too.
-
- Mar 23, 2017
-
-
Jonathan Lebon authored
These are equivalent to the non-null throw, except that the returned value is a NULL pointer. They can be used in functions where one wants to return a pointer. E.g.: GKeyFile *foo(GError **error) { return glnx_null_throw (error, "foobar"); } The function call redirections are wrapped around a compound statement expression[1] so that they represent a single top-level expression. This allows us to avoid -Wunused-value warnings vs using a comma operator if the return value isn't used. I made the 'args...' absorb the fmt argument as well so that callers can still use it without always having to specify at least one additional variadic argument. I had to check to be sure that the expansion is all done by the preprocessor, so we don't need to worry about stack intricacies. [1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
-
- Mar 22, 2017
-
-
Colin Walters authored
Following up to the previous commit, also shorten our use of `g_set_error (..., G_IO_ERROR_FAILED, ...)`. There's a lot of this in libostree at least. See also https://bugzilla.gnome.org/show_bug.cgi?id=774061
-
- Mar 02, 2017
-
-
Colin Walters authored
I want the `RENAME_EXCHANGE` version for rpm-ostree, to atomically swap `/usr/share/rpm` (a directory) with a new verison. While we're here we might as well expose `RENAME_NOREPLACE` in case something else wants it. These both have fallbacks to the non-atomic version. Closes: https://github.com/GNOME/libglnx/pull/36
-
Jonathan Lebon authored
-
- Feb 21, 2017
-
-
Colin Walters authored
This showed up in the ostree runs with `-fsanitize=undefined` - if we happened to get `0` then `g_malloc` would return `NULL`. However, what's interesting is it seemed to happen *consistently*. I think what's going on is GCC proved that the value *could* be zero, and hence it *could* return NULL, and hence it was undefined behavior. Hooray for `-fsanitize=undefined`.
-
- Jan 29, 2017
-
-
Colin Walters authored
This is actually the first test case in libglnx
; hopefully the consumers are prepared for us injecting into `TESTS`.
-