Commit Graph

29 Commits

Author SHA1 Message Date
Philip Withnall
5942cd7984 gio: Add SPDX license headers automatically
Add SPDX license (but not copyright) headers to all files which follow a
certain pattern in their existing non-machine-readable header comment.

This commit was entirely generated using the command:
```
git ls-files gio/*.[ch] | xargs perl -0777 -pi -e 's/\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/\n \*\n \* SPDX-License-Identifier: LGPL-2.1-or-later\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/igs'
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1415
2022-05-18 09:18:52 +01:00
Philip Withnall
00bfb3ab44 tree: Fix various typos and outdated terminology
This was mostly machine generated with the following command:
```
codespell \
    --builtin clear,rare,usage \
    --skip './po/*' --skip './.git/*' --skip './NEWS*' \
    --write-changes .
```
using the latest git version of `codespell` as per [these
instructions](https://github.com/codespell-project/codespell#user-content-updating).

Then I manually checked each change using `git add -p`, made a few
manual fixups and dropped a load of incorrect changes.

There are still some outdated or loaded terms used in GLib, mostly to do
with git branch terminology. They will need to be changed later as part
of a wider migration of git terminology.

If I’ve missed anything, please file an issue!

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-06-12 15:01:08 +01:00
Tom Schoonjans
663a5cc95f gio/gasynchelper.c: fix cast from pointer to smaller int type on win64
https://bugzilla.gnome.org/show_bug.cgi?id=777310
2017-11-01 12:54:14 +00:00
Sébastien Wilmet
3bf4a720c3 gio/: LGPLv2+ -> LGPLv2.1+
Sub-directories inside gio/ already processed in a previous commit:
- fam/
- gdbus-2.0/ (which contains only codegen/)
- gvdb/
- inotify/
- tests/
- win32/
- xdgmime/

Other sub-directories inside gio/:
- completion/: no license headers
- kqueue/: not LGPL, BSD-style license

https://bugzilla.gnome.org/show_bug.cgi?id=776504
2017-05-29 19:53:34 +02:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Dan Winship
6d328a0d5d gio: port unix streams to GUnixFDSource
The unix input/output streams were using a gio-only source type that
was mostly identical to GUnixFDSource. Get rid of that source type
and just use GUnixFDSource instead.

https://bugzilla.gnome.org/show_bug.cgi?id=701511
2013-07-13 16:38:55 -04:00
Dan Winship
1da47d5ede gsourceclosure: use g_cclosure_marshal_generic
For the glib-defined source types, and any source type that defines a
closure callback but not a closure marshal, use
g_cclosure_marshal_generic. And then remove all the other remaining
source closure marshals.

https://bugzilla.gnome.org/show_bug.cgi?id=701511
2013-07-13 16:38:55 -04:00
Marc-André Lureau
b9d7b80897 win32: make gio stream cancellable
v2:
 - fix cancellation of concurrent readers
 - replace g_assert() usage with g_warn_if_fail()
v3:
 - fix indentation
 - fix loop code to not leak (silly me)

https://bugzilla.gnome.org/show_bug.cgi?id=679288
2012-08-20 17:10:31 +02:00
Marc-André Lureau
23d80a04da win32: use overlapped events for streams
Any file handle created with FLAG_OVERLAPPED must have
ReadFile()/WriteFile() called with an OVERLAPPED structure.
Failing to do so will give unspecified results, invalid read/write or
corruption.

Without FLAG_OVERLAPPED, it is not possible to read and write
concurrently, even with two seperate threads, created by 2 input and
output gio streams. Also, only with FLAG_OVERLAPPED may an IO
operation be asynchronous and thus be cancellable.

We may want to call ReOpenFile() to make sure the FLAG is set, but
this API is only available since Vista+.

According to MSDN doc, adding the OVERLAPPED argument for IO operation
on handles without FLAG_OVERLAPPED is allowed, and indeed the existing
test still passes.

v2:
- update GetLastError() after _g_win32_overlap_wait_result ()
- split the unrelated ERROR_MORE_DATA handling

https://bugzilla.gnome.org/show_bug.cgi?id=679288
2012-08-20 17:10:31 +02:00
David King
83392caa72 docs: Fix typo GAsyncReady → GAsyncResult
Also GSimpleAsyncReady → GSimpleAsyncResult.
2012-02-21 01:10:54 +01:00
Javier Jardón
8d3250016d gio: Use G_VALUE_INIT 2011-10-18 17:12:33 +01:00
Ryan Lortie
8a7d33024a gio docs: lots more fixes 2011-09-06 00:31:49 -04:00
Dan Winship
6181c7de36 GCancellable: add g_cancellable_create_source()
g_cancellable_create_source() returns a GSource that triggers when its
corresponding GCancellable is cancelled. This can be used with
g_source_add_child_source() to add cancellability to a source.

Port gasynchelper's FDSource to use this rather than doing its own
cancellable handling, and also fix up its callback argument order to
be more normal.

https://bugzilla.gnome.org/show_bug.cgi?id=634239
2010-11-26 15:07:28 -05:00
Dan Winship
73d823ac1e Implement closure-related methods for gio GSource types
Also, fix up the argument ordering on GFDSourceFunc

https://bugzilla.gnome.org/show_bug.cgi?id=634239
2010-11-26 15:07:28 -05:00
Matthias Clasen
b2715bbc5e Fix a possible deadlock
the FdSource was calling g_cancellable_disconnect while holding the
main context lock, which is bad news if the ::cancelled handler is
trying to get that lock to wake up the mainloop...

Bug 586432
2010-08-03 10:41:21 -04:00
Ryan Lortie
5b946e0504 gio/: fully remove gioalias hacks 2010-07-07 19:53:22 -04:00
Dan Winship
2c4a79c810 GSocket: Merge the unix and windows socket sources together
And remove the bits that were added to gasynchelper.c to support the
previous unix socket source.

part of https://bugzilla.gnome.org/show_bug.cgi?id=587898
2010-04-23 12:25:56 -04:00
Dan Winship
28a39fab5a Remove some unused code 2009-06-30 19:05:44 -04:00
Alexander Larsson
bd87df9e73 Make GSocketSourceFunc return the GSocket
This is very useful when you have multiple sockets with sources.
2009-05-14 18:12:40 +02:00
Alexander Larsson
0f48f804b6 Use g_cancellable_connect/disconnect
Use the new cancellable helper functions to avoid races. (#572844)
2009-04-20 13:17:10 +02:00
Johan Dahlin
761424465a Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch


svn path=/trunk/; revision=7092
2008-06-22 15:10:51 +00:00
Matthias Clasen
f3144c7efe Doc fixes
svn path=/trunk/; revision=6554
2008-02-21 18:20:17 +00:00
Matthias Clasen
0debd52858 Fix up includes in section docs
svn path=/trunk/; revision=6149
2007-12-18 02:52:11 +00:00
15:08:59 Tim Janik
cc3de68e21 http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html
2007-12-10 15:08:59  Tim Janik  <timj@imendio.com>

        * let g_warn_if_fail replace g_assert as discussed here:
          http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html

        * fix bug #502498: Test framework assertion failures should follow
        gcc error format.

        * gmessages.h, gmessages.c: deprecated g_assert_warning() which is
        unused now. removed g_assert*() definitions whcih are provided by 
        gtestutils.h now. added g_warn_if_reached() and g_warn_if_fail()  
        which are recommended as g_assert/g_assert_not_reached replacements
        for non-test programs.
        added g_warn_message() to implement g_warn_*() macros.
        use emacs-next-error friendly formatting for file:line: for warnings.

        * gtestutils.h, gtestutils.c: use emacs-next-error friendly formatting.
        implement g_assert_not_reached() with g_assertion_message() and
        g_assert() in terms of g_assertion_message_expr() so we'll be able to
        provide assertion messages in test logs.

        * gkeyfile.c, gbookmarkfile.c: changed g_assert*() to g_warn_if_fail()
        or g_return_if_fail() where suitable.

        * gio/: changed g_assert to g_warn_if_fail.



svn path=/trunk/; revision=6086
2007-12-10 14:07:42 +00:00
Matthias Clasen
09471fec46 Coding style fixups
svn path=/trunk/; revision=5993
2007-11-29 07:17:59 +00:00
Alexander Larsson
7f3280230b Added. Added. Added. Added.
2007-11-28  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * abicheck.sh: Added.
        * makegioalias.pl: Added.
        * pltcheck.sh: Added.
        * gio.symbols: Added.
	* *.c:
        * inotify/*.c
	Initial work on adding symbol handling.

	* gvfs.h:
	Correct ifdef guard name

        * fam/Makefile.am:
        * inotify/Makefile.am:
        * xdgmime/Makefile.am:
	Include toplevel Makefile.decl


svn path=/trunk/; revision=5972
2007-11-28 12:39:07 +00:00
Matthias Clasen
61582bd91c Another round of trivial doc fixes
svn path=/trunk/; revision=5970
2007-11-28 06:43:33 +00:00
Andrew Walton
5247f12f36 Bumps documentation to 93% symbol coverage, touching most
of the public files. Fixes broken function documentation prototypes. 
	Fixes GCancellable inaccuracies. Removes unnecessary incomplete 
	gtk-doc headers in private files.

svn path=/trunk/; revision=5953
2007-11-27 14:00:13 +00:00
Alexander Larsson
3781343738 gio/ docs/reference/gio Merged gio-standalone into glib.
2007-11-26  Alexander Larsson  <alexl@redhat.com>

        * Makefile.am:
        * configure.in:
        * gio-2.0-uninstalled.pc.in:
        * gio-2.0.pc.in: 
        * gio-unix-2.0-uninstalled.pc.in:
        * gio-unix-2.0.pc.in:
	* gio/
	* docs/reference/gio
	Merged gio-standalone into glib.
	
        * glib/glibintl.h:
        * glib/gutils.c:
	Export glib_gettext so that gio can use it
	Add P_ (using same domain for now)
	Add I_ as g_intern_static_string


svn path=/trunk/; revision=5941
2007-11-26 16:13:05 +00:00