1. 03 Aug, 2017 1 commit
    • Philip Withnall's avatar
      Consistently save errno immediately after the operation setting it · 5cddde1f
      Philip Withnall authored
      Prevent the situation where errno is set by function A, then function B
      is called (which is typically _(), but could be anything else) and it
      overwrites errno, then errno is checked by the caller.
      
      errno is a horrific API, and we need to be careful to save its value as
      soon as a function call (which might set it) returns. i.e. Follow the
      pattern:
        int errsv, ret;
        ret = some_call_which_might_set_errno ();
        errsv = errno;
      
        if (ret < 0)
          puts (strerror (errsv));
      
      This patch implements that pattern throughout GLib. There might be a few
      places in the test code which still use errno directly. They should be
      ported as necessary. It doesn’t modify all the call sites like this:
        if (some_call_which_might_set_errno () && errno == ESOMETHING)
      since the refactoring involved is probably more harmful than beneficial
      there. It does, however, refactor other call sites regardless of whether
      they were originally buggy.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=785577
      5cddde1f
  2. 29 May, 2017 1 commit
  3. 29 Jun, 2016 1 commit
  4. 07 Aug, 2015 1 commit
  5. 20 Feb, 2014 1 commit
  6. 09 Feb, 2014 1 commit
    • Matthias Clasen's avatar
      Docs: Drop entities, switch away from sgml mode · 35066ed6
      Matthias Clasen authored
      Since all element markup is now gone from the doc comments,
      we can turn off the gtk-doc sgml mode, which means that from
      now on, docbook markup is no longer allowed in doc comments.
      
      To make this possible, we have to replace all remaining
      entities in doc comments by their replacement text, &amp; -> &
      and so on.
      35066ed6
  7. 06 Feb, 2014 2 commits
  8. 31 Jan, 2014 1 commit
  9. 13 Jul, 2013 1 commit
  10. 24 Jun, 2013 2 commits
  11. 18 Dec, 2012 1 commit
  12. 09 Nov, 2012 1 commit
    • John Ralls's avatar
      Fix poll able streams for Darwin (and probably BSD) · b65dac80
      John Ralls authored
      
      Darwin's poll doesn't change revents if there are no available events, though it returns 0. Initialize the fd.revents to 0 so that the test passes.
      
      That reveals a test failure, though, because with socket streams it takes time for an event to pass through the socket. Provide an 80-usec delay to allow time for the propagation.
      b65dac80
  13. 12 Jun, 2012 1 commit
  14. 17 Apr, 2012 1 commit
    • Dan Winship's avatar
      gio: use GPollable* to implement fallback read_async/write_async · 00ee06e6
      Dan Winship authored
      If a GInputStream does not provide a read_async() implementation, but
      does implement GPollableInputStream, then instead of doing
      read-synchronously-in-a-thread, just use
      g_pollable_input_stream_read_nonblocking() and
      g_pollable_input_stream_create_source() to implement an async read in
      the same thread. Similarly for GOutputStream.
      
      Remove a bunch of existing read_async()/write_async() implementations
      that are basically equivalent to the new fallback method.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=673997
      00ee06e6
  15. 05 Mar, 2012 1 commit
  16. 14 Nov, 2011 1 commit
    • Dan Winship's avatar
      GUnixInput/OutputStream: fix blocking methods to always block · 74dad004
      Dan Winship authored
      Previously, if you created a GUnixInputStream or GUnixOutputStream
      from a non-blocking file descriptor, it might sometimes return
      G_IO_ERROR_WOULD_BLOCK from g_input_stream_read/g_output_stream_write,
      which is wrong. Fix that. (Use the GPollableInput/OutputStream methods
      if you want non-blocking I/O.)
      
      Also, add a test for this to gio/tests/unix-streams.
      
      Also, fix the GError messages to say "Error reading from file
      descriptor", etc instead of "Error reading from unix" (which was
      presumably from a bad search and replace job).
      
      https://bugzilla.gnome.org/show_bug.cgi?id=626866
      74dad004
  17. 13 Nov, 2011 2 commits
  18. 09 Nov, 2011 1 commit
  19. 26 Nov, 2010 2 commits
  20. 03 Nov, 2010 1 commit
  21. 24 Sep, 2010 1 commit
  22. 11 Jul, 2010 1 commit
  23. 07 Jul, 2010 1 commit
  24. 09 May, 2010 1 commit
  25. 18 Sep, 2009 1 commit
  26. 19 Aug, 2009 2 commits
  27. 01 Jul, 2009 1 commit
  28. 22 Apr, 2009 1 commit
  29. 31 Dec, 2008 1 commit
  30. 08 Dec, 2008 1 commit
  31. 26 Sep, 2008 1 commit
    • Dan Winship's avatar
      Bug 505361 - gunixinputstream.c assumes poll() available · 7f4864e5
      Dan Winship authored
      	Bug 509446 - portable blocking gio cancellation
      
      	* gcancellable.c (g_cancellable_make_pollfd): New method to make a
      	GPollFD for a cancellable (which is slightly more complicated on
      	Windows than Unix).
      
      	* gunixinputstream.c (g_unix_input_stream_read):
      	* gunixoutputstream.c (g_unix_output_stream_write): Use
      	g_cancellable_make_pollfd() and g_poll() rather than using poll()
      	directly.
      
      	* tests/unix-streams.c: test of GUnixInputStream,
      	GUnixOutputStream, and GCancellable.
      
      svn path=/trunk/; revision=7553
      7f4864e5
  32. 22 Jun, 2008 1 commit
  33. 16 Jun, 2008 1 commit
  34. 06 Feb, 2008 2 commits
    • Murray Cumming's avatar
      Fixed some minor typos in documentation. · 0d7b605f
      Murray Cumming authored
      2008-02-06  Murray Cumming  <murrayc@murrayc.com>
      
      * glib/gconvert.c:
      * glib/pcre/pcre_internal.h: Fixed some minor typos in documentation.
      
      svn path=/trunk/; revision=6467
      0d7b605f
    • Christian Persch's avatar
      Save errno before calling other funcs that potentially alter it. Bug · 37ac644b
      Christian Persch authored
      	* gio/gdesktopappinfo.c: (ensure_dir):
      	* gio/glocalfile.c: (g_local_file_query_filesystem_info),
      	(g_local_file_read), (g_local_file_delete), (g_local_file_trash),
      	(g_local_file_move):
      	* gio/glocalfileinfo.c: (set_xattr), (_g_local_file_info_get),
      	(_g_local_file_info_get_from_fd), (set_unix_mode),
      	(set_unix_uid_gid), (set_symlink), (set_mtime_atime):
      	* gio/glocalfileinputstream.c: (g_local_file_input_stream_read),
      	(g_local_file_input_stream_skip),
      	(g_local_file_input_stream_close),
      	(g_local_file_input_stream_seek):
      	* gio/glocalfileoutputstream.c:
      	(g_local_file_output_stream_write),
      	(g_local_file_output_stream_close),
      	(g_local_file_output_stream_seek),
      	(g_local_file_output_stream_truncate), (copy_file_data),
      	(handle_overwrite_open):
      	* gio/gunixinputstream.c: (g_unix_input_stream_read),
      	(g_unix_input_stream_close), (read_async_cb), (close_async_cb):
      	* gio/gunixoutputstream.c: (g_unix_output_stream_write),
      	(g_unix_output_stream_close), (write_async_cb), (close_async_cb):
      	Save
      	errno before calling other funcs that potentially alter it. Bug
      	#514766.
      
      svn path=/trunk/; revision=6466
      37ac644b