summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* License headers: replace current FSF address by a link to gnu.orgSébastien Wilmet2017-01-0410-36/+20
| | | | | | | Even if the address is correct, it's far more convenient to have a link to a website. https://bugzilla.gnome.org/show_bug.cgi?id=776586
* License headers: replace old FSF address by a link to gnu.orgSébastien Wilmet2017-01-045-17/+9
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=776586
* License headers: "the Gnome Library" -> "this library"Sébastien Wilmet2017-01-0417-131/+114
| | | | | | | | | | | Harmonize a little the license headers. In most of the license headers in GLib, it is "this library". It is also what is explained at: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC4 "How to Apply These Terms to Your New Libraries" https://bugzilla.gnome.org/show_bug.cgi?id=776586
* License headers: "GLib" -> "This library"Sébastien Wilmet2017-01-0414-118/+98
| | | | | | | | | | | Harmonize a little the license headers. In most of the license headers in GLib, it is "This library". It is also what is explained at: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC4 "How to Apply These Terms to Your New Libraries" https://bugzilla.gnome.org/show_bug.cgi?id=776586
* License headers: "The GLib Library" -> "This library"Sébastien Wilmet2017-01-041-5/+5
| | | | | | | | | | | Harmonize a little the license headers. In most of the license headers in GLib, it is "This library". It is also what is explained at: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC4 "How to Apply These Terms to Your New Libraries" https://bugzilla.gnome.org/show_bug.cgi?id=776586
* subprocess: avoid infinite loop in verify_disposition()Christian Hergert2017-01-031-4/+7
| | | | | | | | | | | | | | | When performing the verify and building the error string there were two possibilities of an infinite loop. The first is the missing twos-complement to unset the bit in the filtered flags. The second is the lack of handling G_SUBPROCESS_FLAGS_NONE which can return a valid GFlagsValue (and cannot unset the bit since the value is zero). This walks all known values in the GSubprocessFlags type class and check if they are set. This has the benefit that we don't call needless functions which walk the same table as well as avoiding mutating values to build the error string. https://bugzilla.gnome.org/show_bug.cgi?id=775913
* resolver: Fix compilationBastien Nocera2017-01-031-0/+1
| | | | Problem introduced in commit 442b7ce.
* resolver: Return error looking up invalid hostnamesBastien Nocera2017-01-031-0/+20
| | | | | | | Make g_resolver_lookup_by_name() and g_resolver_lookup_by_name_async() error out when invalid hostnames are passed. https://bugzilla.gnome.org/show_bug.cgi?id=772989
* httpproxy: Fix invalid request on invalid hostnamesBastien Nocera2017-01-031-4/+13
| | | | | | | | | When an invalid hostname is passed for connection, the g_hostname_to_ascii() might fail when creating the request in create_request(). Make sure that error is caught and reported rather than passing "(null)" as the hostname of the site we want to connect to. https://bugzilla.gnome.org/show_bug.cgi?id=772989
* Remove stray semicolon after g_variant_print() function in gvariant.cShawn Walker2016-12-271-1/+1
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=776198 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Assert threads are created in test 642026Sjoerd Simons2016-12-271-0/+1
| | | | | | | | | | | | | We kept seeing the glib testsuite hanging on our CI system in the testcase for 642026. After some digging it turned out the jenkins slave was misconfigured and its task limit was too low. Add an assertion that the test thread has been created to more easily spot this error condition as opposed to the test simply hanging. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> https://bugzilla.gnome.org/show_bug.cgi?id=769672
* tests: Don't run tests requiring DBUS unconditionallyIngo Brückl2016-12-271-3/+6
| | | | | | | | | The tests defaultvalue, gdbus-peer and gdbus-unix-addresses will fail without DBUS, so only run them in case we HAVE_DBUS_DAEMON. Signed-off-by: Ingo Brückl <ib@wupperonline.de> https://bugzilla.gnome.org/show_bug.cgi?id=767609
* Updated Galician translationsFran Dieguez2016-12-271-349/+376
|
* build/Makefile.msvcproj: Fix cleanupChun-wei Fan2016-12-201-0/+2
| | | | | | | | When we make Visual Studio 2013 the baseline Visual Studio version, we need to the *.vs12.sourcefiles that are generated along the way so that 'make distcheck' won't complain about the leftover files. This was not caught in GLib as we do not yet require Visual Studio 2013, but we update this here as this module is intended to be used in projects that support Visual Studio project builds.
* Updated Czech translationMarek Černocký2016-12-181-81/+87
|
* Updated Hebrew translationYosef Or Boczko2016-12-111-102/+107
|
* gmessages.c: Windows: Improve g_log_writer_supports_colors()Chun-wei Fan2016-12-081-36/+187
| | | | | | | | ... when tty terminal emulators (such as mintty) are used. This support is however for Vista and later, so use of such terminals should have support for ANSI color codes in their outputs, even on Windows 7/8/8.1/ https://bugzilla.gnome.org/show_bug.cgi?id=775468
* Update Kazakh translationBaurzhan Muftakhidinov2016-12-081-382/+410
|
* Fixed notify id in FDO notification backenddonadigo2016-12-071-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775765
* gioerror: make WSAESHUTDOWN an alias of G_IO_ERROR_CONNECTION_CLOSEDIgnacio Casal Quinteiro2016-12-071-0/+1
| | | | | This fixes one of the assertions of the socket unit tests where G_IO_ERROR_FAILED was returned instead of G_IO_ERROR_CONNECTION_CLOSED.
* GSocket: Fix race conditions on Win32 if multiple threads are waiting on ↵Sebastian Dröge2016-12-051-26/+68
| | | | | | | | | | | | | | | conditions for the same socket WSAWaitForMultipleEvents() only returns for one of the waiting threads, and that one might not even be the one waiting for the condition that changed. As such, only let a single thread wait on the event and use a GCond for all other threads. With this it is possible to e.g. have an UDP socket that is written to from one thread and read from in another thread on Win32 too. On POSIX systems this was working before already. https://bugzilla.gnome.org/show_bug.cgi?id=762283
* gmessages: Fix compilation on AndroidSebastian Dröge2016-12-051-5/+5
| | | | | | There is no systemd on Android. https://bugzilla.gnome.org/show_bug.cgi?id=775621
* gmessages.c/Windows: Improve g_log_writer_supports_color()Chun-wei Fan2016-12-052-12/+88
| | | | | | | | | | | | | Windows 10 begins to support color output on the console using ANSI codes, but a few extra steps are required for this support, so we cannot just use isatty() and expect colors to work in the outputs. Instead, we use still use isatty() from the Windows CRT, and then enable ENABLE_VIRTUAL_TERMINAL_PROCESSING if it returns true. Also make the invalid parameter handler shared between gmessages.c and gspawn-win32-helper.c, since it is basically intended to be a no-op stub. https://bugzilla.gnome.org/show_bug.cgi?id=775468
* type-test: do not rely on signed integer overflow wrapping aroundSimon McVittie2016-12-021-3/+3
| | | | | | | | | | Signed integer overflow is undefined behaviour: if a compiler detects signed integer overflow, it is free to compile it to absolutely anything. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* g_hostname_is_ip_address: detect integer overflowSimon McVittie2016-12-021-1/+6
| | | | | | | | | | | | | | | Signed integer overflow is undefined behaviour, which the undefined behaviour sanitizer detects. Previously, if the compiler had implemented this in the obvious way (overflowing signed multiplication wraps around mod 2**32), we would have incorrectly classified addresses where one octet was, for example, (2**32 + 42) as valid IP addresses, by treating that octet as though it was 42. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* g_unichar_iswide_cjk: add a special case for U+0000Simon McVittie2016-12-021-0/+5
| | | | | | | | | bsearch() is defined to search for a non-null key, so we can't search for NULL. The undefined behaviour sanitizer picks this up. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* gdbus-serialization test: don't left-shift a negative numberSimon McVittie2016-12-021-1/+1
| | | | | | | | | | | -2LL<<34 is undefined, because left-shifting a negative number is undefined (it was implementation-defined behaviour in C99, but is formally undefined in C11). The undefined behaviour sanitizer picks this up. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* Avoid calling Standard C string/array functions with NULL argumentsSimon McVittie2016-12-0210-18/+43
| | | | | | | | | | | | | | | | glibc string.h declares memcpy() with attribute(nonnull(1,2)), causing calls with NULL arguments to be treated as undefined behaviour. This is consistent with ISO C99 and C11, which state that passing 0 to string functions as an array length does not remove the requirement that the pointer to the array is a valid pointer. gcc -fsanitize=undefined catches this while running OSTree's test suite. Similarly, running the GLib test suite reports similar issues for qsort(), memmove(), memcmp(). Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* GParam: make G_PARAM_USER_MASK unsignedSimon McVittie2016-12-021-1/+1
| | | | | | | | | | | | UBSan considers left-shifting a negative number to be undefined behaviour (per <http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_081.html> it is implementation-defined in C89, but according to <https://llvm.org/bugs/show_bug.cgi?id=17490> it is undefined in C99). Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510 Reviewed-by: Colin Walters
* Add missing check for termios.hOndrej Holy2016-12-021-0/+1
| | | | | | | Check for termios.h is missing and passwords in the new gio tool are echoed in the terminal consequently, which is really bad! https://bugzilla.gnome.org/show_bug.cgi?id=775517
* gdbusauth: fix crash when server data send returns NULLIgnacio Casal Quinteiro2016-11-291-9/+15
| | | | | | | | | | _g_dbus_auth_mechanism_server_data_send may fail in which case we would endup getting a NULL data. In this case we should not try to encode the data and simply let the state machine to continue. The auth mechanism will change internally to REJECTED so we just need to continue the iteration. https://bugzilla.gnome.org/show_bug.cgi?id=775309
* dbusaddress: do not leak error on win32 codeIgnacio Casal Quinteiro2016-11-291-1/+3
|
* glib: Namespace global tapset variables by sonamePhilip Withnall2016-11-232-20/+20
| | | | | | | | | | | global variables in SystemTap are shared between all SystemTap scripts; so if scripts are loaded for two versions of GLib (for example, a stable and a development version), those global variables will conflict. Avoid that by including the soname’s version in the global variable names. https://bugzilla.gnome.org/show_bug.cgi?id=770646
* glib: Add installed Valgrind suppressions file for GLib and GIOPhilip Withnall2016-11-232-0/+497
| | | | | | | | | | | | | | | | | While we cannot get Valgrind to automatically load this suppression file for applications which link to GLib (https://bugs.kde.org/show_bug.cgi?id=160905), we can at least install it on systems in a shared directory, so that developers can use a standardised (and up-to-date) suppressions file for GLib, rather than rolling their own. The file will typically be installed to: /usr/share/glib-2.0/valgrind/glib.supp Distributors: it is recommended that this suppression file be installed as part of the development package for GLib in your distribution. https://bugzilla.gnome.org/show_bug.cgi?id=666114
* Visual Studio builds: Update gio-2.0.pc generationChun-wei Fan2016-11-231-1/+2
| | | | We don't have libmount on Windows, so just make the entry for it blank.
* introspection: use (nullable) or (optional) instead of (allow-none)Christian Hergert2016-11-22151-987/+986
| | | | | | | | If we have an input parameter (or return value) we need to use (nullable). However, if it is an (inout) or (out) parameter, (optional) is sufficient. It looks like (nullable) could be used for everything according to the Annotation documentation, but (optional) is more specific.
* gdbus: Fix leak in g_dbus_message_print()Christophe Fergeau2016-11-221-0/+1
| | | | | | | This leak only happens when using G_DBUS_DEBUG=message or similar, but it's nicer to be valgrind-clean even in these cases. https://bugzilla.gnome.org/show_bug.cgi?id=736810
* GDBusMessage: Fix segfault if DEBUG_SERIALIZER is enabledLukasz Skalski2016-11-221-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=729730
* glib-init: statically assert that int is exactly 32 bits longSimon McVittie2016-11-221-0/+7
| | | | | | | | | | | | | | | | | The GVariant documentation says you can assume that types of no more than 32 bits may be assumed to be promoted to int by the usual promotions. If we're going to document that, we should statically assert that it's true, i.e. sizeof (int) >= sizeof (int32_t). All reasonable modern platforms are either ILP32 (32-bit platforms), LP64 (64-bit Linux, *BSD etc.), or LLP64 (64-bit Windows): there have been ILP64 platforms in the past, but ILP64 has the compelling disadvantage that {signed char, short, int} can't possibly provide all of {int8_t, int16_t, int32_t} unless int is 32 bits long. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Colin Walters
* glib-init: statically assert that "small" enums are all int-sizedSimon McVittie2016-11-221-0/+23
| | | | | | | | | | | | | | | | | | | | | | ISO C allows compilers to make enums smaller than int if their enumerated values would all fit in the range of a smaller type. In practice, I suspect that in relevant compilers, all enums whose values fit in the range INT32_MIN to INT32_MAX (inclusive) are the same size as int. ISO C allows compiler to break that assumption, but those that do would break code that works fine in other compilers, making the compiler look bad, for no significant benefit. I conjecture that such compilers are not popular. Let's statically assert that my assumption holds. If all goes well, GLib will continue to compile on every relevant platform; if it fails to compile on some platform as a result of this change, then there are probably a lot of naive uses of enums that need auditing for this assumption. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Allison Lortie
* gtask: Add guards for public functionsPavel Grunt2016-11-221-0/+39
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=769745
* gunixmounts: Fix crash if path doesn't existOndrej Holy2016-11-221-2/+5
| | | | | | | g_unix_mount_for segfaults for nonexistent paths. Return NULL if path doesn't exist. https://bugzilla.gnome.org/show_bug.cgi?id=772160
* gatomic: statically assert that our assumptions holdSimon McVittie2016-11-222-0/+18
| | | | | | | | | | | | | | | This code assumes that int is exactly 32 bits, and that pointers are either 4 or 8 bits, on platforms with __ATOMIC_SEQ_CST. In practice this is going to be true. A previous attempt at this assertion placed the G_STATIC_ASSERT at the top level in gatomic.h, but that broke anjuta, which redefined __unused__ at the time. These assertions are about the platform/compiler ABI, so it's sufficient to check them once, while compiling GLib itself; accordingly, move them to the implementation. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932
* gio-2.0.pc: include libmount in Libs.privateRahul Bedarkar2016-11-221-1/+1
| | | | | | | | | | | | This helps with static linking. When application statically links with libgio, it needs to link against libmount explicitly. When it is mentioned in Libs.private, build system can figure out with which extra libs to link against with help of pkg-config. This build failure is detected by Buildroot autobuilder: http://autobuild.buildroot.net/results/fdf/fdf26abbed0014606a7788ce5d60828a0e871186 Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
* GDBusMethodInvocation: Clarify how the ownership is handledDebarshi Ray2016-11-221-8/+24
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=767952
* glib-compile-resources: Add suggested bracesBenjamin Otte2016-11-201-1/+1
| | | | ... around empty body in an 'else' statement
* gvariant: Add suggested bracesBenjamin Otte2016-11-202-2/+7
| | | | ... around empty body in an 'else' statement
* glib-compile-resources: Escape file names in dependency filePatrick Griffis2016-11-201-3/+56
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774368
* glib-compile-resources: Add --generate-phony-targets flagPatrick Griffis2016-11-202-7/+26
| | | | | | | | | | | This includes phony targets for each dependency in the the generated dependency file which allows building with `ninja` which doesn't like the phony targets[1] but also allows silencing `make` errors similar to gcc's -MP option. [1] - https://github.com/ninja-build/ninja/issues/1184 https://bugzilla.gnome.org/show_bug.cgi?id=774368
* GSocket: do not process control messages if not requested by the userPetr Kulhavy2016-11-201-15/+14
| | | | | | | | | | | If g_socket_receive_message_with_timeout() is called with messages == NULL set the msg_control buffer to empty to not request the control messages from recvmsg() at all. This completely disables the control message processing and reduces overhead, which might be critical at high packet rate. https://bugzilla.gnome.org/show_bug.cgi?id=774520