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. 21 Jun, 2017 1 commit
  3. 29 May, 2017 1 commit
  4. 10 Apr, 2017 1 commit
  5. 08 Feb, 2017 1 commit
  6. 22 Nov, 2016 1 commit
  7. 12 Oct, 2016 1 commit
  8. 12 Sep, 2015 1 commit
  9. 27 Mar, 2014 1 commit
  10. 08 Feb, 2014 2 commits
  11. 31 Jan, 2014 1 commit
  12. 28 Nov, 2013 1 commit
  13. 27 Nov, 2013 1 commit
  14. 24 Nov, 2013 1 commit
    • Manuel Bachmann's avatar
      Fix G_OS #ifdefs in gbusserver.c · 1fb4b3b2
      Manuel Bachmann authored
      G_OS #ifdefs are only available once glibconfig.h has been
      evaluated ; that is, after including glib headers.
      Move this block down so it gets correctly evaluated.
      1fb4b3b2
  15. 20 Nov, 2013 1 commit
    • Dan Winship's avatar
      Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX · 158dde05
      Dan Winship authored
      In Windows development environments that have it, <unistd.h> is mostly
      just a wrapper around several other native headers (in particular,
      <io.h>, which contains read(), close(), etc, and <process.h>, which
      contains getpid()). But given that some Windows dev environments don't
      have <unistd.h>, everything that uses those functions on Windows
      already needed to include the correct Windows header as well, and so
      there is never any point to including <unistd.h> on Windows.
      
      Also, remove some <unistd.h> includes (and a few others) that were
      unnecessary even on unix.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=710519
      158dde05
  16. 21 May, 2013 1 commit
    • Dan Winship's avatar
      Use 'dumb quotes' rather than `really dumb quotes' · 4b94c083
      Dan Winship authored
      Back in the far-off twentieth century, it was normal on unix
      workstations for U+0060 GRAVE ACCENT to be drawn as "‛" and for U+0027
      APOSTROPHE to be drawn as "’". This led to the convention of using
      them as poor-man's ‛smart quotes’ in ASCII-only text.
      
      However, "'" is now universally drawn as a vertical line, and "`" at a
      45-degree angle, making them an `odd couple' when used together.
      
      Unfortunately, there are lots of very old strings in glib, and also
      lots of new strings in which people have kept up the old tradition,
      perhaps entirely unaware that it used to not look stupid.
      
      Fix this by just using 'dumb quotes' everywhere.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=700746
      4b94c083
  17. 29 Jan, 2013 1 commit
    • Colin Walters's avatar
      Add g_close(), use it · f398bec5
      Colin Walters authored
      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
      f398bec5
  18. 19 Apr, 2012 1 commit
  19. 31 Mar, 2012 1 commit
  20. 24 Feb, 2012 1 commit
  21. 11 Jan, 2012 1 commit
  22. 03 Jan, 2012 1 commit
  23. 07 Oct, 2011 1 commit
  24. 29 Aug, 2011 1 commit
    • Matthias Clasen's avatar
      Spelling fixes · 1b28408b
      Matthias Clasen authored
      Spelling fixes in comments and docs, provided by
      Kjartan Maraas in bug 657336.
      1b28408b
  25. 19 Jul, 2011 1 commit
  26. 20 Jun, 2011 1 commit
  27. 27 Apr, 2011 1 commit
  28. 15 Apr, 2011 1 commit
  29. 08 Apr, 2011 1 commit
  30. 24 Mar, 2011 1 commit
  31. 09 Sep, 2010 1 commit
  32. 04 Sep, 2010 1 commit
  33. 30 Aug, 2010 1 commit
    • Christian Persch's avatar
      Plug a mem leak · 802c2583
      Christian Persch authored
      ==6793== 19 (8 direct, 11 indirect) bytes in 1 blocks are definitely lost in loss record 640 of 1,423
      ==6793==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
      ==6793==    by 0x4057094: g_malloc (gmem.c:134)
      ==6793==    by 0x40573DB: g_malloc_n (gmem.c:281)
      ==6793==    by 0x4073D1B: g_strsplit (gstrfuncs.c:2436)
      ==6793==    by 0x4224A89: initable_init (gdbusserver.c:1040)
      ==6793==    by 0x41A73F9: g_initable_init (ginitable.c:105)
      ==6793==    by 0x41A759B: g_initable_new_valist (ginitable.c:218)
      ==6793==    by 0x41A743E: g_initable_new (ginitable.c:138)
      ==6793==    by 0x42238F5: g_dbus_server_new_sync (gdbusserver.c:484)
      
      Bug #628328.
      802c2583
  34. 28 Jul, 2010 1 commit
  35. 20 Jul, 2010 1 commit
  36. 07 Jul, 2010 3 commits
  37. 30 Jun, 2010 1 commit