summaryrefslogtreecommitdiff
path: root/gio
Commit message (Collapse)AuthorAgeFilesLines
* Silence automakeMatthias Clasen2013-02-023-10/+9
| | | | automake doesn't like INCLUDES anymore.
* Fix gio tests makefile for W32Руслан Ижбулатов2013-02-021-0/+4
| | | | | | | | | | | While compiling, libtool will say that undefined symbols are not allowed, and will refuse to make you a dll. This is only one line, easy to miss. And it doesn't prevent `make' from completing successfully. The code this patch adds is from other Makefile.am files that use $(no_undefined). It's absence in gio is, most likely, an oversight. Fixes #692058
* Don't try to find nfs mounts on WindowsMatthias Clasen2013-02-021-0/+11
| | | | | This should fix the build there. https://bugzilla.gnome.org/show_bug.cgi?id=592211
* gdbus: Don't output invalid nested <para> docbook tagsStef Walter2013-01-311-7/+13
| | | | | | | Fix gdbus-codegen so it no longer outputs tags like <para><para>Text</para></para> https://bugzilla.gnome.org/show_bug.cgi?id=692865
* gdbus: Don't output invalid empty <variablelist> tagsStef Walter2013-01-311-19/+21
| | | | | | | | Docbook doesn't allow an empty <variablelist> and so the docbook output from gdbus-codegen is invalid when a method/signal has no arguments. https://bugzilla.gnome.org/show_bug.cgi?id=692865
* GInetSocketAddress: fix the byte order of flowinfo and scope_idDan Winship2013-01-303-6/+6
| | | | | | | | | | | | | | The flowinfo and scope_id fields of struct sockaddr_in6 are in host byte order, but the code previously assumed they were in network byte order. Fix that. This is an ABI-breaking change (since before you would have had to use g_ntohl() and g_htonl() with them to get the correct values, and now that would give the wrong values), but the previous behavior was clearly wrong, and no one ever reported it, so it is likely that no one was actually using it. https://bugzilla.gnome.org/show_bug.cgi?id=684404
* Add g_close(), use itColin Walters2013-01-2910-56/+63
| | | | | | | | | | | | | | | There are two benefits to this: 1) We can centralize any operating system specific knowledge of close-vs-EINTR handling. For example, while on Linux we should never retry, if someone cared enough later about HP-UX, they could come by and change this one spot. 2) For places that do care about the return value and want to provide the caller with a GError, this function makes it convenient to do so. Note that gspawn.c had an incorrect EINTR loop-retry around close(). https://bugzilla.gnome.org/show_bug.cgi?id=682819
* GFile: Clean up file_copy_fallback to fix SEGV with btrfsColin Walters2013-01-271-64/+76
| | | | | | | | | | Ok, this function was just an awful mess before. Now the problem domain is not trivial, and I won't claim this new code is *beautiful*, but it should fix the bug at hand, and be somewhat less prone to failure for the next person who tries to modify it. There's only one unref call for each object now. https://bugzilla.gnome.org/show_bug.cgi?id=692408
* .gitignore updatesDan Winship2013-01-261-0/+4
|
* Plug a small memleak in gdbus-export testMatthias Clasen2013-01-251-0/+1
|
* gfile: Ensure we create internal pipe with FD_CLOEXECColin Walters2013-01-251-6/+5
| | | | | | That way the descriptors aren't leaked to child processes. https://bugzilla.gnome.org/show_bug.cgi?id=692544
* gcontenttype: Duplicate the string inside Mutex lock for thread-safetyAkira TAGOH2013-01-251-1/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=692360
* Ignore fstab entries that are bind mountsAlexander Larsson2013-01-241-0/+4
| | | | | | | | We don't show the bind mounts anyway, so it only leads to problems when we show the fstab entries, like being unable to mount them. https://bugzilla.gnome.org/show_bug.cgi?id=625552
* build: fix a srcdir != builddir problem with gnetworking.hDan Winship2013-01-231-4/+2
| | | | | | | | | | | | gio's glib-mkenums call needs to get gnetworking.h out of $(builddir), not $(srcdir). Fix/simplify it by using $(filter) on $^ and letting make find everything. Also add -Wno-portability to AM_INIT_AUTOMAKE in configure.ac, so that it doesn't warn about this (or about the gmake-specific features we were already using in gio/tests/) https://bugzilla.gnome.org/show_bug.cgi?id=691866
* GNetworkMonitorNetlink: make the netlink socket cloexecDan Winship2013-01-233-36/+57
| | | | | | | | Use the same code GSocket does, to try SOCK_CLOEXEC first, and then fall back to FD_CLOEXEC if it fails. (And fix that code to not call fcntl if SOCK_CLOEXEC worked.) https://bugzilla.gnome.org/show_bug.cgi?id=692332
* gfile: don't report completion twice on g_file_load_contents errorCosimo Cecchi2013-01-211-4/+5
| | | | | | | | | | | | When an error occurs while reading the file input stream in g_file_load_contents (e.g. because the operation was cancelled), the code is correctly calling g_task_return_error(), but in the callback from the close operation, g_task_return_boolean() will be called again. Code that cleans up its state in the async callback will then be called twice, leading to invalid memory access. https://bugzilla.gnome.org/show_bug.cgi?id=692202
* inotify: fix a memleakCosimo Cecchi2013-01-211-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=692201
* fam: implement gio-nfs-{file,directory}-monitorRyan Lortie2013-01-193-0/+10
| | | | | | | | Declare explicit support for monitor NFS from the fam file monitoring backend. This will cause it to be preferred for monitoring on NFS, if it is installed. https://bugzilla.gnome.org/show_bug.cgi?id=592211
* localfile: add support for monitoring on NFSRyan Lortie2013-01-196-12/+105
| | | | | | | | | | | | | Add a pair of new extension points: 'gio-nfs-file-monitor' and 'gio-nfs-directory-monitor'. Add a check to GLocalFile when creating a file monitor. If the requested file is in the user's home directory and the user has an NFS home directory then attempt to use an implementation of one of the new extension points. If we don't have any implementations then fall back to the normal "local" monitors. https://bugzilla.gnome.org/show_bug.cgi?id=592211
* file monitors: use new giomodule functionRyan Lortie2013-01-192-112/+8
| | | | | | | | | | | | Get rid of the complicated default module detection code in GLocalFileMonitor and GLocalDirectoryMonitor and use the new _gio_module_get_default_type() function instead. This change also adds the ability to override the default file monitor via the GIO_USE_FILE_MONITOR environment variable in the same way as can be done for GIO_USE_VFS. https://bugzilla.gnome.org/show_bug.cgi?id=592211
* giomodule: add a new "get default" functionRyan Lortie2013-01-192-2/+122
| | | | | | | | | | | | | | | | | _gio_module_get_default() is a very convenient function for modules implementing a singleton -- it finds the default module by priority subject to override by a given environment variable name, instantiates it, and caches the instance for future calls. It also has the ability to query instances for being 'active' using a callback. It doesn't work very well for non-singletons (like file monitors). Add a new function _gio_module_get_default_type() that skips the instantiation, returning the GType instead. As a replacement for the 'active' callback, a vtable offset can be given for a virtual function to use to query if a particular backend is supported. https://bugzilla.gnome.org/show_bug.cgi?id=592211
* Remove a few more G_GNUC_INTERNAL usersRyan Lortie2013-01-182-2/+2
|
* Fix visibility for glib/ and gio/ submodulesRyan Lortie2013-01-185-0/+5
| | | | | | | | | | | | | | | | We have various sub directories in glib/ and gio/ (eg: inotify, gnulib, pcre, xdgmime, etc.) that build convenience libraries that are then included into libglib and libgio. The files in these directories need to be built with the same visibility policy as the files in the first level directories, so add CFLAGS for them all. This wasn't a problem when the visibility flags were set directly in CFLAGS but then we had to deal with some modules that we built that we explicitly wanted to export symbols from. For now, we can keep things the way they are because it's less hacky and although it's a theoretical hazard to forget these CFLAGS, we rarely add new subdirectories to the build.
* Remove most use of G_GNUC_INTERNALColin Walters2013-01-187-48/+1
| | | | | | | Now that we use an explicit list of symbols to export, the G_GNUC_INTERNAL is redundant. https://bugzilla.gnome.org/show_bug.cgi?id=688681
* Remove ABI checking scriptsRyan Lortie2013-01-173-1829/+0
| | | | | | Before this commit, the only difference between the expected and actual ABI were the addition of _init and _fini symbols in each module (now that regexp-based export control is not catching those).
* Remove regexp-based export controlRyan Lortie2013-01-171-3/+1
|
* gio/tests: add some more async stream testsDan Winship2013-01-163-48/+394
| | | | | | | | | | | | | | | Add read_async() and skip_async() tests to buffered-input-stream. Fix and re-enable filter-streams's existing close_async() tests, and add read_async(), skip_async(), and write_async() tests as well. Also, redo the tests to use dummy GFilterInputStream and GFilterOutputStream subclasses rather than GBufferedInput/OutputStream, so that we're testing the base filter stream implementations of everything (since the buffered stream overrides are already getting tested in the buffered-input-stream and buffered-output-stream tests anyway). Add a skip_async() test to unix-streams. (This one would crash without the bugfix in the previous commit.)
* gio: callback_data is the task not the task data.Alban Browaeys2013-01-161-2/+2
| | | | | | | | | | skip_callback_wrapper expect the user_data (callback_data) to be the task holding the task_data, not the task_data itself. Otherwise the task_data is cast as GTask and then task_data is extracted from this bogus task. https://bugzilla.gnome.org/show_bug.cgi?id=691812
* visibility: Use a separate CFLAGS variableRyan Lortie2013-01-142-6/+5
| | | | | | | | | | | | | | | | | | | | | We only want to control the default visibility for our five main installable libraries: libglib, libgthread, libgmodule, libgobject, libgio. We should therefore only set -fvisibility=hidden when building those. Use a separate substitution variable for this purpose. Using CFLAGS directly leads to some modules built in testcases not exporting their symbols (and then the tests fail). It also affects the fam file monitoring module. Colin had originally done it this way in his visibility patch series but I failed to understand why so I didn't copy it. Now I do. Also: revert changes made to two testcases in an attempt to work around this issue. https://bugzilla.gnome.org/show_bug.cgi?id=691756
* Fix distcheckMatthias Clasen2013-01-147-9/+9
| | | | | With gdbus-testserver now being a compiled program, it no longer lives in SRCDIR.
* Remove an unused functionMatthias Clasen2013-01-141-9/+0
|
* win32: hide g_win32_app_info_get_type()Ryan Lortie2013-01-141-1/+0
| | | | | | | This was in a private header file and was never part of the public ABI. Hide it again. Caught by Dieter Verfaillie.
* glocal*monitor: export ABI only on UNIXRyan Lortie2013-01-142-0/+4
| | | | | | | | | | | Add an #ifdef G_OS_UNIX around the GLIB_AVAILABLE_IN_ALL annotation on the _get_type() functions for GLocal{File,Directory}Monitor. These symbols are in private header files and are only exported so that the in-tree file monitoring modules can subclass. This is only needed on UNIX and was therefore never part of the public ABI on Windows. Caught by Dieter Verfaillie.
* tests: introduce a small hack for visibilityRyan Lortie2013-01-141-3/+5
| | | | | | | | | | One of our testcases builds a small giomodule for testing the loading of modules containing resources. Unfortunately, this module gets built using the same CFLAGS as the rest of GLib, including the visibility flags (defaulting to hidden). Use "config.h" to get a declaration of _GLIB_EXTERN that will export symbols properly and use it to annotate the necessary APIs.
* kqueue: Reduce G_GNUC_INTERNAL + G_LOCK abuseRyan Lortie2013-01-133-6/+4
| | | | | | | | The kqueue file monitoring backend was misusing G_GNUC_INTERNAL for want of 'static' in a couple of places and also using it to declare a lock that was never used at all. Fix those up.
* gio: remove export tags from two private headersRyan Lortie2013-01-132-5/+0
| | | | | I got a little bit too excited and added GLIB_AVAILABLE_IN_ALL tags to some internal API.
* win32: build: stop using .def filesRyan Lortie2013-01-131-18/+2
| | | | | | | | | | | | | | | | | | | | | | With visibility now under the control of __declspec(dllexport) we no longer need to build .def files or use them for building our various .dll files. .def files used to be installed (even though it is only really useful when creating the .dll or .lib file). Don't do that anymore either. The Makefiles still contain rules to create a .lib file for use with Visual Studio and these rules require .def files. There are special requirements to using these rules (like having installed and setup Microsoft tools for use during the build) and therefore the problem of creating a .def file for use with them is left open to anyone willing to make the effort. Many options are available depending on which toolchain is in use (dlltool, pexport, gendef, dumpbin.exe, just to name a few). If we can find a free tool for creating .lib files in the future, we should probably revisit this issue and add proper support back to our build system.
* gio: hide another leaked symbolRyan Lortie2013-01-132-2/+1
| | | | guint g_menu_model_items_changed_signal leaked out. Tuck it back in.
* gio: add some missing array annotations with their element-typeRico Tzschichholz2013-01-133-9/+12
|
* gio: add missing element-type annotationRico Tzschichholz2013-01-131-2/+2
|
* add a missing AVAILABLE_IN_2_36 annotationRyan Lortie2013-01-131-0/+1
|
* various: add GLIB_AVAILABLE_IN_ALL everywhere elseRyan Lortie2013-01-13136-0/+1425
| | | | | | | | | | | Add the GLIB_AVAILABLE_IN_ALL annotation to all old functions (that haven't already been annotated with the GLIB_AVAILABLE_IN_* macros or a deprecation macro). If we discover in the future that we cannot use only one macro on Windows, it will be an easy sed patch to fix that. https://bugzilla.gnome.org/show_bug.cgi?id=688681
* gioenumtypes.h.template: use GLIB_AVAILABLE_IN_ALLRyan Lortie2013-01-131-1/+1
| | | | | | | | glib-mkenums is not currently clever enough to know which version an enum type was added in, so just mark all the _get_type() functions as available in all versions. https://bugzilla.gnome.org/show_bug.cgi?id=688681
* Add G_GNUC_PRINTF on all functions with format stringsHenrique Dante de Almeida2013-01-138-7/+13
| | | | | | | | This allows compilation with clang without errors, even when -Wformat-nonliteral is active (as long as there are no real cases of non literal formatting). https://bugzilla.gnome.org/show_bug.cgi?id=691608
* GInputStream: fix default g_input_stream_skip_async() logicDan Winship2013-01-131-7/+8
| | | | | | | | | | | | | g_input_stream_real_skip_async() wants to use read_async() normally, but will use skip() in a thread instead if it sees that read_async() will end up using threads. Except that the test for "will read_async() use threads" never got updated to know about the GPollableInputStream support in read_async(), so it was doing the wrong thing in that case. Fix. Also remove a small bit of pre-GTask cruft noticed nearby. https://bugzilla.gnome.org/show_bug.cgi?id=691489
* glocalfile: Only check for .hidden files if standard::is-hidden is requestedColin Walters2013-01-111-4/+8
| | | | | | | | | | | | | For OSTree, I use Gio and also really care about performance. It's disturbing to see open('.hidden') all over my straces and such. At the moment I have an explicit set of things to query, as opposed to "standard::*", since even before this that also implies an lstat() of the parent directory. This matches up with what we do for all the other attributes. See https://bugzilla.gnome.org/show_bug.cgi?id=587806 https://bugzilla.gnome.org/show_bug.cgi?id=691558
* gio-querymodules: Ensure we're linked to GObjectColin Walters2013-01-101-0/+3
| | | | | | | | Since we're dynamically loading objects, after the g_type_init() change, we now need to ensure people building with --as-needed don't lose the DT_NEEDED on libgobject. https://bugzilla.gnome.org/show_bug.cgi?id=691077
* G_IO_ERROR_INVALID_DATA: fix docstring typoWill Thompson2013-01-101-1/+1
|
* ipv6_v4mapped: force pass even if we don't speak IPv4Antoine Jacoutot2013-01-091-0/+12
| | | | | | | | Some OS (e.g. OpenBSD) do not implement IP v4-mapped addresses. When this is the case, then we get a "Connection refused", so force the test to pass to that further tests can run. https://bugzilla.gnome.org/show_bug.cgi?id=686058
* glib-compile-resources: avoid warnings with -Wmissing-field-initializersDan Winship2013-01-091-1/+1
| | | | | Initialize all the fields of the generated GStaticResource, to avoid warnings in packages that build with -Wmissing-field-initializers.