Commit Graph

3237 Commits

Author SHA1 Message Date
Tor Lillqvist
c9211d68fc MSDN says: "Do not cast a pointer to a FILETIME structure to either a
2008-08-04  Tor Lillqvist  <tml@novell.com>

	* glib/gmain.c (g_get_current_time): MSDN says: "Do not cast a
	pointer to a FILETIME structure to either a LARGE_INTEGER* or
	__int64* value because it can cause alignment faults on 64-bit
	Windows." So don't do that then. Indeed the code did work randomly
	on Win64 when compiled with optimisation.


svn path=/trunk/; revision=7308
2008-08-04 19:22:05 +00:00
Tor Lillqvist
0e2384faa8 glib/giowin32.c glib/gmain.c glib/gspawn-win32.c Change gssize casts
2008-08-04  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c
	* glib/gmain.c
	* glib/gspawn-win32.c
	* glib/gspawn-win32-helper.c: Change gssize casts introduced on
	2008-07-28 to gintptr casts now that we have that. gssize is as
	such the same as gintptr on both 32- and 64-bit Windows, but the
	gintptr name indicates that it is used to hold pointers, i.e. also
	HANDLEs.


svn path=/trunk/; revision=7306
2008-08-04 18:46:59 +00:00
Tor Lillqvist
b5b363019a Avoid warning on Win64 by using gintptr cast instead if long cast.
2008-08-04  Tor Lillqvist  <tml@novell.com>

	* tests/testglib.c: Avoid warning on Win64 by using gintptr cast
	instead if long cast.


svn path=/trunk/; revision=7304
2008-08-04 18:12:11 +00:00
Matthias Clasen
b71a3a0f6b Bump version
svn path=/trunk/; revision=7303
2008-08-04 18:00:48 +00:00
Matthias Clasen
26c1be0d51 2.13.6
svn path=/trunk/; revision=7301
2008-08-04 17:58:13 +00:00
Matthias Clasen
1a9db68e53 Bump version
svn path=/trunk/; revision=7299
2008-08-04 17:02:59 +00:00
Matthias Clasen
ab0f863606 2.17.5
svn path=/trunk/; revision=7297
2008-08-04 17:01:23 +00:00
Matthias Clasen
5d4b0f7c23 Updates
svn path=/trunk/; revision=7295
2008-08-04 16:03:41 +00:00
Tor Lillqvist
e4194cb055 Add 64-bit versions of GPOINTER_TO_INT(), GPOINTER_TO_UINT() and vice
2008-08-02  Tor Lillqvist  <tml@novell.com>

	* glibconfig.h.win32.in: Add 64-bit versions of
	GPOINTER_TO_INT(), GPOINTER_TO_UINT() and vice versa, too.


svn path=/trunk/; revision=7288
2008-08-02 11:21:14 +00:00
Tor Lillqvist
59137b9923 Add gintptr and guintptr typedefs here, too, appropriately ifdeffed for
2008-08-02  Tor Lillqvist  <tml@novell.com>

	* glibconfig.h.win32.in: Add gintptr and guintptr typedefs here,
	too, appropriately ifdeffed for 32/64 bit, gcc/MSVC.


svn path=/trunk/; revision=7287
2008-08-02 08:51:27 +00:00
Matthias Clasen
3fceef00aa Updates
svn path=/trunk/; revision=7285
2008-08-01 22:16:03 +00:00
Matthias Clasen
a1c45bd9ae Add a since
svn path=/trunk/; revision=7279
2008-08-01 18:30:37 +00:00
Tor Lillqvist
274c2dc8c5 Bug 545485 - Implicit declaration of utime()
2008-07-30  Tor Lillqvist  <tml@novell.com>

	Bug 545485 - Implicit declaration of utime()

	* glib/gstdio.c: Include <utime.h> on POSIX.


svn path=/trunk/; revision=7273
2008-07-30 15:35:01 +00:00
Tor Lillqvist
6eb6ee655e Output to glibconfig.h typedefs for gintptr as the signed integer type
2008-07-28  Tor Lillqvist  <tml@novell.com>

	* configure.in: Output to glibconfig.h typedefs for gintptr as the
	signed integer type that can hold a pointer, and guintptr as the
	corresponding unsigned type. These types are portable equivalents
	to intptr_t and uintptr_t which are not available in all
	compilers.

	For all current platforms, they will presumably end up as the same
	types as gssize and gsize, but in theory size_t can be smaller
	than intptr_t. Also, the intended use case for gintptr and
	guintptr is different from that of gssize and gsize. As the name
	indicates, gintptr is for when one wants an integer type that can
	hold a pointer, and gsize is for when one wants an integer type
	that can hold the value of the sizeof operator.


svn path=/trunk/; revision=7272
2008-07-30 15:30:26 +00:00
Matthias Clasen
99a6b0d4e4 Add g_markup_context_get_user_data
svn path=/trunk/; revision=7265
2008-07-28 16:52:15 +00:00
Tor Lillqvist
6f84cab2a8 Message catalogs should always get installed into share/locale nowadays,
2008-07-28  Tor Lillqvist  <tml@novell.com>

	* glib-zip.in: Message catalogs should always get installed into
	share/locale nowadays, don't bother with the convoluted logic
	checking if they are in lib/locale instead. Put the correct helper
	programs in the zipfile.


svn path=/trunk/; revision=7262
2008-07-28 00:36:49 +00:00
Tor Lillqvist
a3fa74853a Fix problems on 64-bit Windows. Avoid warnings, some of which indicated
2008-07-28  Tor Lillqvist  <tml@novell.com>

	Fix problems on 64-bit Windows. Avoid warnings, some of which
	indicated actual problems, some which were just annoyances. 

	Where casts to an integer type are needed for pointers, use
	gssize. Technically intptr_t would be the more proper type, but we
	still want to be compilable with MSVS6 and 7 which don't have
	intptr_t. MSVS8 and 9 do have intptr_t, but in <crtdefs.h>, not
	<stdint.h>.

	Use %p to print out handles. Use gssize casts when assigning
	GPollFD::fd fields.

	Use G_GSIZE_FORMAT when printing size_t values.
	
	* configure.in: Define automake conditional G_OS_WIN32_X64 which
	is true on Win64.

	* glib/giochannel.h: Use slightly different prototype for
	g_io_channel_win32_new_messages() on Win64 with gsize instead of
	guint.

	* glib/giowin32.c
	* glib/gmain.c
	* glib/gspawn-win32.c
	* tests/testglib.c: Generic changes as described above.

	* glib/gmain.h: Don't bother mentioning GIMP in comment.

	* glib/grel.c (tuple_hash_2): Use all bits of pointer.

	* glib/gspawn-win32.c
	* glib/gspawn-win32-helper.c: Use gssize types in the
	communication between parent and helper process, so that we can
	pass process handles, which are pointers, also on Win64.

	* glib/gtimer.c (g_time_val_to_iso8601): time_t is 64 bits on
	Win64 so we can't pass the address of a GTimeVal::tv_sec which is
	a long directly to gmtime(). On the other hand, changing
	GTimeVal::tv_sec to be a gint64 on Win64 is not really feasible
	either, as that would then require changes in much code that uses
	GTimeVals.

	* glib/gspawn-win32.c
	* glib/Makefile.am: Call the helper programs
	gspawn-win64-helper.exe and gspawn-win64-helper-console.exe on
	Win64, to avoid potential risk of running a 32-bit version of the
	helper.


svn path=/trunk/; revision=7260
2008-07-28 00:24:14 +00:00
Tor Lillqvist
80ecc30841 glib/glib.symbols glib/gconvert.c glib/gdir.c glib/gfileutils.c
2008-07-27  Tor Lillqvist  <tml@novell.com>

	* glib/glib.symbols
	* glib/gconvert.c
	* glib/gdir.c
	* glib/gfileutils.c
	* glib/giowin32.c
	* glib/gspawn-win32.c
	* glib/gutils.c
	* glib/gwin32.c: Bypass the Windows "ABI compatibility" symbols on
	_WIN64. As there hasn't been any widely deployed 64-bit Windows
	builds of the really old GLib (pre-2.8.1) versions those refer to,
	there is no need to have the "ABI compatibility" versions in the
	DLL.

	* glib/makegalias.pl: Handle #ifndef _WIN64: Just output it, too.


svn path=/trunk/; revision=7257
2008-07-27 17:15:16 +00:00
Tor Lillqvist
a076a30457 Set LIB_EXE_MACHINE_FLAG to either X86 or X64 on Windows. AC_SUBST it.
2008-07-27  Tor Lillqvist  <tml@novell.com>

	* configure.in: Set LIB_EXE_MACHINE_FLAG to either X86 or X64 on
	Windows. AC_SUBST it.

	* */Makefile.am: Correspondingly, pass appropriate -machine
	flag to lib.exe when producing the import library for the MS
	toolchain.


svn path=/trunk/; revision=7255
2008-07-27 15:54:15 +00:00
15:47:08 Tim Janik
8017661f6d added new sample test to prepare for extended range random tests.
2008-07-25 15:47:08  Tim Janik  <timj@imendio.com>

        * glib/tests/testing.c (test_random_conversions): added new sample
        test to prepare for extended range random tests.


svn path=/trunk/; revision=7253
2008-07-25 13:49:00 +00:00
Tor Lillqvist
1fdca0ad31 Include <stdio.h> for FILENAME_MAX on newer mingw installations.
2008-07-24  Tor Lillqvist  <tml@novell.com>

	* glib/gdir.c: Include <stdio.h> for FILENAME_MAX on newer mingw
	installations.


svn path=/trunk/; revision=7251
2008-07-24 01:13:33 +00:00
Tor Lillqvist
440ebdec6f Use G_GSIZE_FORMAT instead of the C99 "zu".
2008-07-24  Tor Lillqvist  <tml@novell.com>

	* glib/gslice.c (smc_notify_free): Use G_GSIZE_FORMAT instead of
	the C99 "zu".


svn path=/trunk/; revision=7249
2008-07-24 00:50:08 +00:00
Tor Lillqvist
c023cc94f8 Must output the GLIB_USING_SYSTEM_PRINTF to glibconfig.h using the same
2008-07-24  Tor Lillqvist  <tml@novell.com>

	* configure.in: Must output the GLIB_USING_SYSTEM_PRINTF to
	glibconfig.h using the same two phase code as for the other
	defines in it. Can't check enable_included_printf directly in the
	shell code that is the first argument to AC_CONFIG_COMMANDS().

	Preset glib_cv_stack_grows=no on Windows to help
	cross-compilation.

	* configure.in: Enhancements for 64-bit Windows: 

	Handle also size_t being larger than long. It is long long
	a.k.a. __int64 on the LLP64 Win64.

	Set glib_void_p and glib_long correctly. Their assignments were
	crossed. It hasn't mattered on LP64 platforms like all (?) 64-bit
	UNIXes, but on the LLP Win64 it was wrong.


svn path=/trunk/; revision=7248
2008-07-24 00:29:56 +00:00
Tor Lillqvist
d395b1dcda Check also _WIN64.
2008-07-24  Tor Lillqvist  <tml@novell.com>

	* glibconfig.h.win32.in: Check also _WIN64.


svn path=/trunk/; revision=7247
2008-07-23 23:53:15 +00:00
Tor Lillqvist
8d4242580e Patch for 64-bit Windows from Richard Hult.
2008-07-24  Tor Lillqvist  <tml@novell.com>

	* glibconfig.h.win32.in: Patch for 64-bit Windows from Richard
	Hult.


svn path=/trunk/; revision=7245
2008-07-23 21:05:16 +00:00
Matthias Clasen
6e55e05284 Remove leftovers
svn path=/trunk/; revision=7243
2008-07-23 16:22:32 +00:00
Mathias Hasselmann
981fbaa21e Set LANG variable for group caption tests to get reproducable results.
* glib/tests/option-context.c (group_captions()):
  Set LANG variable to C in the forked process to get reproducable.
  Don't silence the forked process in --verbose mode to support
  debugging.

svn path=/trunk/; revision=7238
2008-07-21 23:34:44 +00:00
Matthias Clasen
9343e4faeb Fix detection of struct statfs fields.
svn path=/trunk/; revision=7237
2008-07-21 22:22:59 +00:00
Matthias Clasen
f9baf9679e Bump version
svn path=/trunk/; revision=7236
2008-07-21 18:07:55 +00:00
Matthias Clasen
282805b1d4 2.17.4
svn path=/trunk/; revision=7234
2008-07-21 17:56:17 +00:00
Matthias Clasen
e8516ee93d Updates
svn path=/trunk/; revision=7233
2008-07-21 17:33:33 +00:00
Emmanuele Bassi
bb123b85cf Use the right format string to get leading zeros when converting to ISO
2008-07-21  Emmanuele Bassi  <ebassi@gnome.org>

	* glib/gtimer.c (g_time_val_to_iso8601): Use the right format
	string to get leading zeros when converting to ISO 8601. (Sven
	Herzberg)

svn path=/trunk/; revision=7232
2008-07-21 16:30:16 +00:00
Emmanuele Bassi
bcdc09e641 Do not set the timestamp value using time(), as it will be overwritten
2008-07-21  Emmanuele Bassi  <ebassi@gnome.org>

	* glib/gbookmarkfile.c:
	(bookmark_app_info_new): Do not set the timestamp value
	using time(), as it will be overwritten anyway. (#535223,
	Michael Meeks)

	(parse_application_element),
	(bookmark_app_info_dump): Support the "modified" attribute,
	which takes an ISO-formatted string instead of a Unix time
	stamp, to keep the number of g_strdup_printf() calls to a
	minimum.

	* glib/gtimer.c:
	(g_time_val_to_iso8601): Do not use strftime(): we know
	the format and contents of the ISO 8601 date format we
	use.

	* tests/bookmarks/valid-03.xbel: Add a test file for the
	modified attribute.

svn path=/trunk/; revision=7231
2008-07-21 13:05:24 +00:00
Matthias Clasen
85840c57b7 Forgotten entry
svn path=/trunk/; revision=7222
2008-07-21 02:05:31 +00:00
Tor Lillqvist
55790836fb Patch from Yu Kuan that makes watched sockets behave much better. See
2008-07-20  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c (g_io_win32_prepare): Patch from Yu Kuan that
	makes watched sockets behave much better. See gtk-devel-list
	archives from May for the (unfortunately rather meager)
	discussion. This patch fixes the presented simple test program,
	which reasonably could be expected to work.


svn path=/trunk/; revision=7220
2008-07-20 20:44:39 +00:00
Matthias Clasen
0c64ba5aea Updates
svn path=/trunk/; revision=7204
2008-07-18 22:03:11 +00:00
Matthias Clasen
e417f54c28 Bug 536996 – Missing noop i18n macro equivalent to C_
* glib/glib.symbols:
        * glib/gstrfuncs.[hc]: Add g_dpgettext2() which is a
        variant of g_dpgettext() taking context and id as separate
        arguments.

        * glib/gi18n-lib.h:
        * glib/gi18n.h: Add an NC_() macro that is to C_() as N_()
        is to _().


svn path=/trunk/; revision=7202
2008-07-18 18:14:04 +00:00
Matthias Clasen
d0bd89a301 Move another test
svn path=/trunk/; revision=7198
2008-07-18 07:07:39 +00:00
Matthias Clasen
063c43c0d8 Move tests around
svn path=/trunk/; revision=7197
2008-07-18 06:25:23 +00:00
Matthias Clasen
f37b73fb95 Avoid a warning when printing a pid_t. Pointed out by Morten Welinder.
* glib/gslice.c (mem_error): Avoid a warning when printing a pid_t.
        Pointed out by Morten Welinder.


svn path=/trunk/; revision=7196
2008-07-16 23:12:00 +00:00
Matthias Clasen
ba7563a4cb Document that this function does accept localized infinities and nans.
* glib/gstrfuncs.c (g_ascii_strtod): Document that this
        function does accept localized infinities and nans. Reported
        by Morten Welinder.


svn path=/trunk/; revision=7195
2008-07-16 22:05:24 +00:00
Matthias Clasen
6c2c99aa0e Detect overflow and error out. Reported by Morten Welinder.
* glib/gfileutils.c (get_contents_stdio): Detect overflow and
        error out. Reported by Morten Welinder.


svn path=/trunk/; revision=7194
2008-07-16 21:42:48 +00:00
Matthias Clasen
36372b5add Improve an error message
svn path=/trunk/; revision=7189
2008-07-16 04:28:07 +00:00
Matthias Clasen
3ec443b188 Ignore the error if iconv doesn't support EUC-JP.
* tests/iochannel-test.c: Ignore the error if iconv doesn't
        support EUC-JP.


svn path=/trunk/; revision=7182
2008-07-14 19:31:33 +00:00
Matthias Clasen
7560b45764 Print error messages when something fails
svn path=/trunk/; revision=7181
2008-07-14 19:15:18 +00:00
Matthias Clasen
052f3e6bd9 Skip a test if iconv doesn't support the encoding
svn path=/trunk/; revision=7180
2008-07-14 18:17:20 +00:00
Ryan Lortie
178698c8d3 add functions g_markup_parse_context_{push,pop} in order to provide some
2008-07-10  Ryan Lortie  <desrt@desrt.ca>

        * docs/reference/glib/glib-sections.txt:
        * glib/glib.symbols:
        * glib/gmarkup.c:
        * glib/gmarkup.h: add functions g_markup_parse_context_{push,pop} in
        order to provide some small hooks on which to build easy-to-use
        subparsers.
 
        * glib/tests/Makefile: add new test
        * glib/tests/markup-subparser.c: new test for subparsers
 
        Fixes bug #337518.


svn path=/trunk/; revision=7174
2008-07-10 08:41:59 +00:00
Matthias Clasen
e42e2fe168 Set a sane default recursion limit of 8192 instead of 1000000. Patch by
* glib/pcre/Makefile.am: Set a sane default recursion limit
        of 8192 instead of 1000000.
        Patch by Mart Raudsepp.


svn path=/trunk/; revision=7166
2008-07-06 04:25:18 +00:00
Behdad Esfahbod
e9a316866d Bug 541507 – Ambiguous description of assigned characters in the Glib
2008-07-04  Behdad Esfahbod  <behdad@gnome.org>

        Bug 541507 – Ambiguous description of assigned characters in the Glib
        Unicode Manipulation reference

        * glib/guniprop.c
        (g_unichar_isgraph): Return true for PrivateUse too.
        (g_unichar_isprint): Return true for PrivateUse too.
        (g_unichar_isdefined): Return false for Surrogate.


svn path=/trunk/; revision=7161
2008-07-04 18:05:13 +00:00
Michael Natterer
4cd8caa6c7 Bug 541208 – Functions to easily install and use signals without class
2008-07-04  Michael Natterer  <mitch@imendio.com>

	Bug 541208 – Functions to easily install and use signals without
	class struct slot

	* tests/gobject/override.c: added tests for the new gsignal
	overriding and chaining APIs.


svn path=/trunk/; revision=7158
2008-07-04 11:10:48 +00:00