<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glib.git/tests/timeloop-basic.c, branch pgriffis/wip/resolver-https</title>
<subtitle>gitlab.gnome.org: GNOME/glib.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/'/>
<entry>
<title>Normalize C source files to end with exactly one newline</title>
<updated>2020-06-10T08:48:02+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2020-04-21T13:46:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=44c004c84e9080040ff4e0e90b322dda0561cf85'/>
<id>44c004c84e9080040ff4e0e90b322dda0561cf85</id>
<content type='text'>
Some editors automatically remove trailing blank lines, or
automatically add a trailing newline to avoid having a trailing
non-blank line that is not terminated by a newline. To avoid unrelated
whitespace changes when users of such editors contribute to GLib,
let's pre-emptively normalize all files.

Unlike more intrusive whitespace normalization like removing trailing
whitespace from each line, this seems unlikely to cause significant
issues with cherry-picking changes to stable branches.

Implemented by:

    find . -name '*.[ch]' -print0 | \
    xargs -0 perl -0777 -p -i -e 's/\n+\z//g; s/\z/\n/g'

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some editors automatically remove trailing blank lines, or
automatically add a trailing newline to avoid having a trailing
non-blank line that is not terminated by a newline. To avoid unrelated
whitespace changes when users of such editors contribute to GLib,
let's pre-emptively normalize all files.

Unlike more intrusive whitespace normalization like removing trailing
whitespace from each line, this seems unlikely to cause significant
issues with cherry-picking changes to stable branches.

Implemented by:

    find . -name '*.[ch]' -print0 | \
    xargs -0 perl -0777 -p -i -e 's/\n+\z//g; s/\z/\n/g'

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace all instances of ssize_t with gssize</title>
<updated>2017-10-11T11:56:11+00:00</updated>
<author>
<name>Руслан Ижбулатов</name>
<email>lrn1986@gmail.com</email>
</author>
<published>2017-10-10T11:59:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=4a77eb16cecc7e3a076e046c6e890bee590a5c01'/>
<id>4a77eb16cecc7e3a076e046c6e890bee590a5c01</id>
<content type='text'>
ssize_t is supported widely, but not universally, so use gssize instead.
Currently only one piece of code actually *needs* this change to be compilable
with MSVC, the rest are mostly in *nix parts of the code, but these are changed
too, for symmetry.

https://bugzilla.gnome.org/show_bug.cgi?id=788180
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ssize_t is supported widely, but not universally, so use gssize instead.
Currently only one piece of code actually *needs* this change to be compilable
with MSVC, the rest are mostly in *nix parts of the code, but these are changed
too, for symmetry.

https://bugzilla.gnome.org/show_bug.cgi?id=788180
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently save errno immediately after the operation setting it</title>
<updated>2017-08-03T09:21:13+00:00</updated>
<author>
<name>Philip Withnall</name>
<email>withnall@endlessm.com</email>
</author>
<published>2017-07-31T10:30:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=5cddde1fb2b8466d8104595008eafabd0728de5d'/>
<id>5cddde1fb2b8466d8104595008eafabd0728de5d</id>
<content type='text'>
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 &lt; 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 () &amp;&amp; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt; 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 () &amp;&amp; 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Use POSIX-specified &lt;poll.h&gt; over &lt;sys/poll.h&gt;</title>
<updated>2013-12-22T16:33:07+00:00</updated>
<author>
<name>Ryan Lortie</name>
<email>desrt@desrt.ca</email>
</author>
<published>2013-12-22T16:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=3f41e492851b3e69ceb050986766fe3137cbb1fe'/>
<id>3f41e492851b3e69ceb050986766fe3137cbb1fe</id>
<content type='text'>
POSIX specifies that &lt;poll.h&gt; is the correct header to include for
poll(), so let's do that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=141251
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
POSIX specifies that &lt;poll.h&gt; is the correct header to include for
poll(), so let's do that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=141251
</pre>
</div>
</content>
</entry>
<entry>
<title>Some file list updates (#398069, Owen Taylor)</title>
<updated>2007-01-19T15:50:30+00:00</updated>
<author>
<name>Matthias Clasen</name>
<email>mclasen@redhat.com</email>
</author>
<published>2007-01-19T15:50:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=912027f0df88dc54999144a493208aec01ea9905'/>
<id>912027f0df88dc54999144a493208aec01ea9905</id>
<content type='text'>
2007-01-19  Matthias Clasen  &lt;mclasen@redhat.com&gt;

        Some file list updates (#398069, Owen Taylor)

        * docs/Changes-2.0.txt
        * docs/reference/README.cvs-commits
        * glib.spec.in: Remove obsolete files

        * tests/Makefile.am:
        * glib/libcharset/Makefile.am:
        * gobject/Makefile.am:
        * Makefile.am: Add some missing files to EXTRA_DIST

        * tests/timeloop-basic.c: Make it build
        * HACKING: Small updates


svn path=/trunk/; revision=5302
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2007-01-19  Matthias Clasen  &lt;mclasen@redhat.com&gt;

        Some file list updates (#398069, Owen Taylor)

        * docs/Changes-2.0.txt
        * docs/reference/README.cvs-commits
        * glib.spec.in: Remove obsolete files

        * tests/Makefile.am:
        * glib/libcharset/Makefile.am:
        * gobject/Makefile.am:
        * Makefile.am: Add some missing files to EXTRA_DIST

        * tests/timeloop-basic.c: Make it build
        * HACKING: Small updates


svn path=/trunk/; revision=5302
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently use gsize rather than size_t. (#333310, Morten Welinder)</title>
<updated>2006-12-28T04:48:06+00:00</updated>
<author>
<name>Matthias Clasen</name>
<email>mclasen@redhat.com</email>
</author>
<published>2006-12-28T04:48:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=98d552e0cd0479ec373055eefc11716d2927936e'/>
<id>98d552e0cd0479ec373055eefc11716d2927936e</id>
<content type='text'>
2006-12-27  Matthias Clasen  &lt;mclasen@redhat.com&gt;

        * glib/gconvert.[hc]:
        * glib/gfileutils.c:
        * glib/giochannel.c:
        * glib/goption.c:
        * glib/gspawn.c:
        * glib/gunicollate.c:
        * glib/gutils.c:
        * tests/timeloop-basic.c:
        Consistently use gsize rather than size_t.  (#333310,
        Morten Welinder)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2006-12-27  Matthias Clasen  &lt;mclasen@redhat.com&gt;

        * glib/gconvert.[hc]:
        * glib/gfileutils.c:
        * glib/giochannel.c:
        * glib/goption.c:
        * glib/gspawn.c:
        * glib/gunicollate.c:
        * glib/gutils.c:
        * tests/timeloop-basic.c:
        Consistently use gsize rather than size_t.  (#333310,
        Morten Welinder)
</pre>
</div>
</content>
</entry>
<entry>
<title>Added #undef G_DISABLE_ASSERT and #undef G_LOG_DOMAIN throughout the</title>
<updated>2002-07-04T15:19:30+00:00</updated>
<author>
<name>Sebastian Wilhelmi</name>
<email>wilhelmi@ira.uka.de</email>
</author>
<published>2002-07-04T15:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=d81ac5339fcf9537a3731ebb5770238f4fa69d59'/>
<id>d81ac5339fcf9537a3731ebb5770238f4fa69d59</id>
<content type='text'>
2002-07-04  Sebastian Wilhelmi  &lt;wilhelmi@ira.uka.de&gt;

	* tests/*.c: Added #undef G_DISABLE_ASSERT and #undef G_LOG_DOMAIN
	throughout the files, which didn't already have them. (#87312)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2002-07-04  Sebastian Wilhelmi  &lt;wilhelmi@ira.uka.de&gt;

	* tests/*.c: Added #undef G_DISABLE_ASSERT and #undef G_LOG_DOMAIN
	throughout the files, which didn't already have them. (#87312)
</pre>
</div>
</content>
</entry>
<entry>
<title>Changes for 64-bit cleanliness, loosely based on patch from Mark Murnane.</title>
<updated>2001-06-23T13:55:09+00:00</updated>
<author>
<name>Owen Taylor</name>
<email>otaylor@redhat.com</email>
</author>
<published>2001-06-23T13:55:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=f5c28ce4ab8e8015a1432060b6cfe547183b2f9e'/>
<id>f5c28ce4ab8e8015a1432060b6cfe547183b2f9e</id>
<content type='text'>
Wed Jun 20 12:00:54 2001  Owen Taylor  &lt;otaylor@redhat.com&gt;

        Changes for 64-bit cleanliness, loosely based on patch
	from Mark Murnane.

	* gconvert.c (g_convert/g_convert_with_fallback): Remove
	workarounds for since-fixed GNU libc bugs. Minor
	doc fix.

	* gconvert.[ch]: Change gint to gsize/gssize as
	appropriate.

	* gconvert.c (g_locale/filename_to/from_utf8): Fix incorrect
	computation of bytes_read / bytes_written.

	* gfileutils.[ch] (g_file_get_contents): Make length
	out parameter 'gsize *len'.

	* ghook.c (g_hook_compare_ids): Don't compare a
	and b as 'a - b'.

	* gmacros.h (GSIZE_TO_POINTER): Add GPOINTER_TO_SIZE,
	GSIZE_TO_POINTER.

	* gmain.c (g_timeout_prepare): Rewrite to avoid
	overflows. (Fixes bug when system clock skews
	backwards more than 24 days.)

	* gmarkup.[ch]: Make lengths passed to callbacks
	gsize, length for g_markup_parse-context_parse(),
	g_markup_escape_text() gssize.

	* gmessages.[ch] (g_printf_string_upper_bound): Change
	return value to gsize.

	* gmessages.c (printf_string_upper_bound): Remove
	a ridiculous use of 'inline' on a 300 line function.

	* gstring.[ch]: Represent size of string as a gsize,
	not gint. Make parameters to functions take gsize,
	or gssize where -1 is allowed.

	* gstring.c (g_string_erase): Make
	g_string_erase (string, pos, -1) a synonym for
	g_string_truncate for consistency with other G*
	APIs.

	* gstrfuncs.[ch]: Make all functions taking a string
	length, take a gsize, or gssize if -1 is allowed.
	(g_strstr_len, g_strrstr_len). Also fix some boundary
	conditions in g_str[r]str[_len].

	* gutf8.c tests/unicode-encoding.c: Make parameters that
	are byte lengths gsize, gssize as appropriate. Make
	character offsets, other counts, glong.

	* gasyncqueue.c gcompletion.c
          timeloop.c timeloop-basic.c gutils.c gspawn.c.
	Small 64 bit cleanliness fixups.

	* glist.c (g_list_sort2, g_list_sort_real): Fix functions
	that should have been static.

	* gdate.c (g_date_fill_parse_tokens): Fix extra
	declaration that was shadowing another.

	* tests/module-test.c: Include string.h

Mon Jun 18 15:43:29 2001  Owen Taylor  &lt;otaylor@redhat.com&gt;

	* gutf8.c (g_get_charset): Make argument
	G_CONST_RETURN char **.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wed Jun 20 12:00:54 2001  Owen Taylor  &lt;otaylor@redhat.com&gt;

        Changes for 64-bit cleanliness, loosely based on patch
	from Mark Murnane.

	* gconvert.c (g_convert/g_convert_with_fallback): Remove
	workarounds for since-fixed GNU libc bugs. Minor
	doc fix.

	* gconvert.[ch]: Change gint to gsize/gssize as
	appropriate.

	* gconvert.c (g_locale/filename_to/from_utf8): Fix incorrect
	computation of bytes_read / bytes_written.

	* gfileutils.[ch] (g_file_get_contents): Make length
	out parameter 'gsize *len'.

	* ghook.c (g_hook_compare_ids): Don't compare a
	and b as 'a - b'.

	* gmacros.h (GSIZE_TO_POINTER): Add GPOINTER_TO_SIZE,
	GSIZE_TO_POINTER.

	* gmain.c (g_timeout_prepare): Rewrite to avoid
	overflows. (Fixes bug when system clock skews
	backwards more than 24 days.)

	* gmarkup.[ch]: Make lengths passed to callbacks
	gsize, length for g_markup_parse-context_parse(),
	g_markup_escape_text() gssize.

	* gmessages.[ch] (g_printf_string_upper_bound): Change
	return value to gsize.

	* gmessages.c (printf_string_upper_bound): Remove
	a ridiculous use of 'inline' on a 300 line function.

	* gstring.[ch]: Represent size of string as a gsize,
	not gint. Make parameters to functions take gsize,
	or gssize where -1 is allowed.

	* gstring.c (g_string_erase): Make
	g_string_erase (string, pos, -1) a synonym for
	g_string_truncate for consistency with other G*
	APIs.

	* gstrfuncs.[ch]: Make all functions taking a string
	length, take a gsize, or gssize if -1 is allowed.
	(g_strstr_len, g_strrstr_len). Also fix some boundary
	conditions in g_str[r]str[_len].

	* gutf8.c tests/unicode-encoding.c: Make parameters that
	are byte lengths gsize, gssize as appropriate. Make
	character offsets, other counts, glong.

	* gasyncqueue.c gcompletion.c
          timeloop.c timeloop-basic.c gutils.c gspawn.c.
	Small 64 bit cleanliness fixups.

	* glist.c (g_list_sort2, g_list_sort_real): Fix functions
	that should have been static.

	* gdate.c (g_date_fill_parse_tokens): Fix extra
	declaration that was shadowing another.

	* tests/module-test.c: Include string.h

Mon Jun 18 15:43:29 2001  Owen Taylor  &lt;otaylor@redhat.com&gt;

	* gutf8.c (g_get_charset): Make argument
	G_CONST_RETURN char **.
</pre>
</div>
</content>
</entry>
<entry>
<title>Major change in API for creating sources to handle multiple main loops</title>
<updated>2000-12-05T20:45:33+00:00</updated>
<author>
<name>Owen Taylor</name>
<email>otaylor@redhat.com</email>
</author>
<published>2000-12-05T20:45:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=e2fd4e2bd0589b159f87b491095565d16fac2789'/>
<id>e2fd4e2bd0589b159f87b491095565d16fac2789</id>
<content type='text'>
Tue Dec  5 12:23:04 2000  Owen Taylor  &lt;otaylor@redhat.com&gt;

        * gmain.[hc]: Major change in API for creating sources
	to handle multiple main loops (GMainContext *).

	GSources are now exposed as GSource * and implemented
	with structure derivation.

	* giochannel.[ch]: Changed vtable for GIOChannel to correspond
	to the new mainloop API, add g_io_channel_create_watch().

	* gtypes.h: Move GTimeVal here.

	* gthread.h: Remove gmain.h include to avoid circularity.

        * giounix.c: Update for new GMain API.

	* giowin32.c: Update for new GMain API. (No check for
	proper compilation or working.)

	* timeloop.c timeloop-basic.c: A benchmarking program for
	the main loop comparing the main loop against a
	hand-written (timeloop-basic.c) variant.

	* tests/mainloop-test.c: New torture test of mainloop.

	* docs/Changes-2.0.txt: Started. Added text about
	changes to GMain.

	* gmain.c (g_main_add_poll_unlocked): Initial fd-&gt;revents
	to zero. (#8482, Benjamin Kahn)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tue Dec  5 12:23:04 2000  Owen Taylor  &lt;otaylor@redhat.com&gt;

        * gmain.[hc]: Major change in API for creating sources
	to handle multiple main loops (GMainContext *).

	GSources are now exposed as GSource * and implemented
	with structure derivation.

	* giochannel.[ch]: Changed vtable for GIOChannel to correspond
	to the new mainloop API, add g_io_channel_create_watch().

	* gtypes.h: Move GTimeVal here.

	* gthread.h: Remove gmain.h include to avoid circularity.

        * giounix.c: Update for new GMain API.

	* giowin32.c: Update for new GMain API. (No check for
	proper compilation or working.)

	* timeloop.c timeloop-basic.c: A benchmarking program for
	the main loop comparing the main loop against a
	hand-written (timeloop-basic.c) variant.

	* tests/mainloop-test.c: New torture test of mainloop.

	* docs/Changes-2.0.txt: Started. Added text about
	changes to GMain.

	* gmain.c (g_main_add_poll_unlocked): Initial fd-&gt;revents
	to zero. (#8482, Benjamin Kahn)
</pre>
</div>
</content>
</entry>
</feed>
