Commit Graph

3348 Commits

Author SHA1 Message Date
Nelson Benítez León
811fcbcd95 Add new GFileCopyFlag
svn path=/trunk/; revision=7526
2008-09-21 23:53:40 +00:00
Hans Petter Jansson
991b625aea Rewrite most of GHashTable to use open addressing with quadratic probing
2008-09-19  Hans Petter Jansson  <hpj@novell.com>

	Rewrite most of GHashTable to use open addressing with quadratic
	probing instead of chaining. This has the potential to reduce memory
	fragmentation significantly, while being slightly faster due to
	better locality and no need to call alloc/free functions for nodes.
	Benchmarks suggest it also uses less memory overall.

	* glib/ghash.c (prime_mod): Table of suitable primes for
	initial-probe distribution.
	(g_hash_table_set_shift): New function.
	(g_hash_table_find_closest_shift): New function.
	(g_hash_table_set_shift_from_size): New function.
	(g_hash_table_lookup_node_for_insertion): New function.
	(g_hash_table_lookup_node): Rewritten to return node index instead of
	pointer, use quadratic probe on flat table, and not return insertion
	data. The latter saves some computation for read-only lookups.
	(g_hash_table_remove_node): Rewrite to take a pointer directly to the
	node structure to remove, and clear that. Remove unlinking code.
	(g_hash_table_remove_all_nodes): Rewrite to not clear nodes
	individually, but en masse using memset () after potentially calling
	notify functions.
	(iter_remove_or_steal): Use new data structure and algorithm. Vastly
	simplified - now just a call to g_hash_table_remove_node ().
	(g_hash_table_resize): New resize code, re-indexing with new prime
	and cleaning up tombstones.
	(g_hash_table_maybe_resize): Table may hold 8 buckets minimum, no less
	than 1/4 load excluding tombstones, and no more than 15/16 load
	including tombstones. These numbers are the results of a lot of
	benchmarking with multiple complex applications, and should not be
	changed lightly.
	(g_hash_table_iter_next)
	(g_hash_table_lookup)
	(g_hash_table_lookup_extended)
	(g_hash_table_insert_internal)
	(g_hash_table_remove_internal)
	(g_hash_table_foreach_remove_or_steal)
	(g_hash_table_foreach)
	(g_hash_table_find)
	(g_hash_table_get_keys)
	(g_hash_table_get_values): Use new data structure and algorithm,
	fairly trivial changes.


svn path=/trunk/; revision=7518
2008-09-20 04:05:11 +00:00
Tor Lillqvist
4c264998cb Look for man pages in share/man.
2008-09-19  Tor Lillqvist  <tml@novell.com>

	* glib-zip.in: Look for man pages in share/man.


svn path=/trunk/; revision=7512
2008-09-19 10:42:04 +00:00
Tor Lillqvist
bc8e1dd8c1 glib/gutils.c (_glib_get_dll_directory) Be a bit less restrictive, look
2008-09-19  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (_glib_get_dll_directory)
	* glib/gspawn-win32.c (do_spawn_with_pipes): Be a bit less
	restrictive, look for the helper programs in the same folder where
	the GLib DLL is, not necessarily in a "bin" subfolder of the top
	GLib installation folder.


svn path=/trunk/; revision=7511
2008-09-19 10:20:41 +00:00
Matthias Clasen
a44ff6ef33 Bump version to 2.19.0
2008-09-18  Matthias Clasen <mclasen@redhat.com>

        * configure.in: Bump version to 2.19.0

        * ChangeLog.pre-2-18: rotate ChangeLog

        * === branch for 2.18 ===


svn path=/trunk/; revision=7510
2008-09-18 14:47:14 +00:00
Matthias Clasen
d369843405 Bump version
svn path=/trunk/; revision=7507
2008-09-17 23:58:48 +00:00
Matthias Clasen
ac516ab07e 2.18.1
svn path=/trunk/; revision=7505
2008-09-17 23:56:04 +00:00
Matthias Clasen
042345d59e Updates
svn path=/trunk/; revision=7504
2008-09-17 22:52:48 +00:00
Tor Lillqvist
6af6a8dab0 time_t is 64 bits in all the newer Microsoft C libraries, not just 64-bit
2008-09-16  Tor Lillqvist  <tml@novell.com>

	* glib/gtimer.c (g_time_val_to_iso8601): time_t is 64 bits in all
	the newer Microsoft C libraries, not just 64-bit ones. So to avoid
	crash if compiled with newer MSVSes, use a separate time_t
	variable in all cases on Windows.


svn path=/trunk/; revision=7496
2008-09-15 22:52:12 +00:00
Tor Lillqvist
d4ad716a05 Define G_BREAKPOINT() also for 64-bit MSVC, using the __debugbreak()
2008-09-16  Tor Lillqvist  <tml@novell.com>

	* glib/gbacktrace.h: Define G_BREAKPOINT() also for 64-bit MSVC,
	using the __debugbreak() intrinsic.


svn path=/trunk/; revision=7495
2008-09-15 22:19:38 +00:00
Behdad Esfahbod
bf6222e785 Fix description of module shared library suffix.
2008-09-15  Behdad Esfahbod  <behdad@gnome.org>

        * configure.in: Fix description of module shared library suffix.


svn path=/trunk/; revision=7494
2008-09-15 18:59:25 +00:00
Tor Lillqvist
b006f4832f Update to match what the configure script produces. Just for uniformity,
2008-09-15  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Update to match what the configure script
	produces. Just for uniformity, only commented out parts affected.


svn path=/trunk/; revision=7489
2008-09-15 15:14:00 +00:00
Tor Lillqvist
e55fca9533 glib/gutils.h Deprecate G_WIN32_DLLMAIN_FOR_DLL_NAME(),
2008-09-13  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.h
	* glib/gwin32.h: Deprecate G_WIN32_DLLMAIN_FOR_DLL_NAME(),
	g_win32_get_package_installation_directory() and
	g_win32_get_package_installation_subdirectory() as their
	documentation has warned for a while. Sorry that I forgot to do
	this before 2.18.0.

	* glib/gwin32.c (g_win32_get_package_installation_directory):
	Print a warning if a non-NULL package parameter is passed to this
	function, as that is deprecated usage, as the documentation says.


svn path=/trunk/; revision=7480
2008-09-13 20:23:17 +00:00
Matthias Clasen
dc85674b57 Bug 548321 – <string.h> is not included in gi18n-lib.h
2008-09-11  Matthias Clasen  <mclasen@redhat.com>

        Bug 548321 – <string.h> is not included in gi18n-lib.h

        * glib/gi18n.h:
        * glib/gi18n-lib.h: Include string.h, since strlen is used in
        the macros. Pointed out by Ignacio Casal Quinteiro


svn path=/trunk/; revision=7455
2008-09-11 16:48:44 +00:00
Matthias Clasen
6848d2578d Documentation improvements
svn path=/trunk/; revision=7453
2008-09-11 04:21:17 +00:00
Matthias Clasen
8f85da0b5e Add required includes
svn path=/trunk/; revision=7452
2008-09-10 22:39:05 +00:00
Matthias Clasen
0b890c6298 Bug 551228 – G_STRFUNC on recent Sun compiler should be expanded to
2008-09-09  Matthias Clasen  <mclasen@redhat.com>

        Bug 551228 – G_STRFUNC on recent Sun compiler should be expanded to
        __func__ rather than '???'

        * glib/gmacros.h: Don't use glibconfig.h defines in gmacros.h,
        as the comment up top says. Instead look at __STDC_VERSION__.
        Problem reported by Lin Ma.


svn path=/trunk/; revision=7451
2008-09-10 03:21:42 +00:00
Matthias Clasen
b36ea0b1c7 Bug 523463 – Core dump in gmain.c:2482:IA__g_main_context_check()
2008-09-09  Matthias Clasen  <mclasen@redhat.com>

        Bug 523463 – Core dump in gmain.c:2482:IA__g_main_context_check()

        * glib/gmain.c (g_main_context_check): Be robust against setting
        event fields on the fly, as e.g. happens in linc. Tracked down
        by Paul Smith, fix proposed by Owen Taylor.

svn path=/trunk/; revision=7447
2008-09-09 06:04:21 +00:00
Christian Dywan
2201cae29a Bug 550433 – g_test_init doesn't recognize --help
* glib/gtestutils.c (parse_args): Add detailed --help output

svn path=/trunk/; revision=7442
2008-09-08 08:25:29 +00:00
Matthias Clasen
6905f5c524 Bump version
svn path=/trunk/; revision=7436
2008-09-02 20:20:04 +00:00
Matthias Clasen
e43de8e0e6 2.18.0
svn path=/trunk/; revision=7434
2008-09-02 20:09:55 +00:00
Ryan Lortie
920f3bffb3 Bug 549771 – improved .gitignore for glib
2007-09-02  Ryan Lortie  <desrt@desrt.ca>

        Bug 549771 – improved .gitignore for glib

        * docs/reference/.gitignore:
        * docs/reference/gio/.gitignore:
        * docs/reference/gobject/tmpl/.gitignore:
        * gio/.gitignore:
        * gio/tests/.gitignore:
        * glib/.gitignore:
        * glib/libcharset/.gitignore:
        * glib/tests/.gitignore:
        * gmodule/.gitignore:
        * gobject/.gitignore:
        * gobject/tests/.gitignore:
        * po/.gitignore:
        * tests/.gitignore: new files
        * .gitignore: remove 'build' (since it's part of glib now), add more
        useful things.


svn path=/trunk/; revision=7432
2008-09-02 18:40:39 +00:00
Matthias Clasen
8f5a2e0d31 Updates
svn path=/trunk/; revision=7431
2008-09-02 18:36:48 +00:00
Matthias Clasen
691c77e37d Bump version to 2.18.0
svn path=/trunk/; revision=7430
2008-09-02 17:47:54 +00:00
Matthias Clasen
11cc2e2aeb Fix up docs
svn path=/trunk/; revision=7424
2008-09-02 16:48:40 +00:00
Michael Natterer
ed2bbc43cc add g_return_if_fail (checksum != NULL)
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* glib/gchecksum.c (g_checksum_reset): add
	g_return_if_fail (checksum != NULL)


svn path=/trunk/; revision=7423
2008-09-02 14:07:27 +00:00
Paolo Borelli
e6eb809599 Bug 550040 - Move GString, rand and printf tests to the unit test
2008-09-01  Paolo Borelli  <pborelli@katamail.com>

	Bug 550040 - Move GString, rand and printf tests to the unit test
	framework

	* tests/printf-test.c:
	* tests/rand-test.c:
	* tests/string-test.c:
	Removed

	* glib/tests/printf.c:
	* glib/tests/rand.c:
	* glib/tests/string.c:
	Added

	* tests/Makefile.am:
	* glib/tests/Makefile.am:
	Updated for the above


svn path=/trunk/; revision=7419
2008-09-01 09:31:40 +00:00
Emmanuele Bassi
e701ea96b6 Bug 550096 – GBookmarkFile parser is not forward compatible
2008-08-31  Emmanuele Bassi  <ebassi@gnome.org>

	Bug 550096 – GBookmarkFile parser is not forward compatible

	* glib/gbookmarkfile.c:
	(parse_bookmark_element), (parse_application_element),
	(parse_mime_type_element), (parse_icon_element): Relax the
	attributes checking of the GBookmarkFile parser for the
	attributes that the desktop bookmark file specification
	defines and controls. This allows adding new attributes to
	the existing elements in newer versions without breaking the
	parser in older ones.

svn path=/trunk/; revision=7418
2008-08-31 19:53:21 +00:00
Ryan Lortie
2edf928499 Fixup for test case in previous commit.
2008-08-28  Ryan Lortie  <desrt@desrt.ca>

        Fixup for test case in previous commit.

        * glib/tests/strfuncs.c: don't fail if we can't open the test data.
        This happens if $(builddir) != $(srcdir) (like when doing 'make
        distcheck').  Quick workaround for now until #549783 can be fixed.


svn path=/trunk/; revision=7415
2008-08-29 06:02:47 +00:00
Ryan Lortie
2cf0f4853a [REVERT] Bug 548612 – g_strstr_len() should use memmem when available
2008-08-28  Ryan Lortie  <desrt@desrt.ca>

        [REVERT] Bug 548612 – g_strstr_len() should use memmem when available

        * glib/gstrfuncs.c (g_strstr_len): fix off-by-one memory access error
        * glib/tests/strfuncs.c (test_bounds): add some new test cases that
        would catch problems like this
        * glib/tests/4096-random-bytes: test data for the previous
        * glib/tests/Makefile.am: add previous to EXTRA_DIST


svn path=/trunk/; revision=7414
2008-08-28 23:03:24 +00:00
Ryan Lortie
ef4df848e0 [REVERT] Bug 548612 – g_strstr_len() should use memmem when available
2008-08-28  Ryan Lortie  <desrt@desrt.ca>

        [REVERT] Bug 548612 – g_strstr_len() should use memmem when available

        * configure.in:
        * glib/gstrfuncs.c (g_strstr_len): revert use of memmem (see bug)


svn path=/trunk/; revision=7413
2008-08-28 22:55:36 +00:00
Matthias Clasen
0eca17a9f2 Fix selinux linking
svn path=/trunk/; revision=7412
2008-08-28 19:45:58 +00:00
Michael Natterer
13fe35b66d make "endptr" const since it's always a pointer into the const string
2008-08-28  Michael Natterer  <mitch@imendio.com>

	* glib/gstrfuncs.c (g_parse_long_long): make "endptr" const since
	it's always a pointer into the const string passed. Remove some
	casting to (gchar*) in this function.

	(g_ascii_strtoull)
	(g_ascii_strtoll): cast "endptr" to (const gchar**) here when
	passing it to above function.


svn path=/trunk/; revision=7410
2008-08-28 14:47:56 +00:00
Bastien Nocera
f84518e35b Bug 548612 – g_strstr_len() should use memmem when available
2008-08-28  Bastien Nocera  <hadess@hadess.net>

	Bug 548612 – g_strstr_len() should use memmem when available

	* glib/tests/strfuncs.c (test_strstr):
	* tests/string-test.c (main): Patch by Paolo Borelli
	<pborelli@katamail.com> to move the tests to the right place,
	and add more tests

	* glib/gstrfuncs.c (g_strstr_len): Fix problem with memmem ignoring
	nul-terminators in strings, and using the haystack_len instead


svn path=/trunk/; revision=7409
2008-08-28 12:53:59 +00:00
Bastien Nocera
5e2a6047ea Bug 548612 – g_strstr_len() should use memmem when available
2008-08-28  Bastien Nocera  <hadess@hadess.net>

	Bug 548612 – g_strstr_len() should use memmem when available

	* configure.in: detect whether memmem is available in the C library
	* glib/gstrfuncs.c (g_strstr_len): use memmem for g_strstr_len() if
	available in it's available, as it could be optimised by the C library
	* tests/string-test.c (main): Add a few tests for g_strstr_len()


svn path=/trunk/; revision=7407
2008-08-27 23:23:23 +00:00
Tor Lillqvist
2c5de8ed26 Stylistic changes. Plug an unlikely memory leak that occurred in
2008-08-27  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c: Stylistic changes. Plug an unlikely memory leak
	that occurred in create_thread() if closing the thread handle
	failed. Add more error messages to g_io_win32_free() that are
	printed only when debugging. Plug handle leak, a socket channel's
	event was never closed.


svn path=/trunk/; revision=7405
2008-08-27 16:49:17 +00:00
Tor Lillqvist
194493f3f8 Should not define HAVE_DIRENT_H when compiling with MSVC, as the only file
2008-08-27  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Should not define HAVE_DIRENT_H when
	compiling with MSVC, as the only file which checks HAVE_DIRENT_H
	is gdir.c, and that includes the dirent.h and wdirent.c from
	build/win32/dirent explicitly anyway when being compiled with
	MSVC.


svn path=/trunk/; revision=7403
2008-08-27 12:48:57 +00:00
Björn Lindqvist
886c0e0d81 Bug 523939 – Example program for GValue
2008-08-22  Björn Lindqvist  <bjourne@gmail.com>

	Bug 523939 – Example program for GValue

	* gobject/gvalue.c: Add code example that demonstrates GValue's
	features.

svn path=/trunk/; revision=7387
2008-08-22 18:23:05 +00:00
Tor Lillqvist
54d62aa368 Don't bother compiling the binary compatibility
2008-08-21  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c: Don't bother compiling the binary
	compatibility g_io_channel_win32_new_stream_socket()
	function that has not been mentioned in any header since 2.0 on
	Win64.

	* glib/glib.symbols: Mark it, too, private, and don't export it on
	Win64.


svn path=/trunk/; revision=7384
2008-08-21 11:47:04 +00:00
Tor Lillqvist
5becc45bf4 Improve run-time warning messages. Drop some #if 0 code.
2008-08-21  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c: Improve run-time warning messages. Drop
	some #if 0 code.


svn path=/trunk/; revision=7383
2008-08-21 11:35:51 +00:00
Tor Lillqvist
2da8893a72 Minor comment improvements.
2008-08-21  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c: Minor comment improvements.


svn path=/trunk/; revision=7382
2008-08-21 11:24:00 +00:00
Tor Lillqvist
465d01a8c2 Improve last entry
svn path=/trunk/; revision=7380
2008-08-21 10:29:36 +00:00
Tor Lillqvist
605682521b Rework the g_poll() implementation on Windows to match poll() semantics
2008-08-21  Tor Lillqvist  <tml@novell.com>

	* glib/gmain.c: Rework the g_poll() implementation on Windows to
	match poll() semantics more closely. This makes the test program
	in bug #468910 behave better and doesn't seem to break anything
	else.

	If polling several GPollFDs, i.e. messages and/or waitable
	handles, first check if one or several of them are in the
	signalled state right away, and return indication for all that are
	in that case.

	If not, then poll with timeout and indicate only the single one
	that the Win32 wait function tells us as before.

	Remove unnecessary ifdefs, as we always have G_MAIN_POLL_DEBUG
	defined on Windows.

	Initialise g_main_poll_debug in g_main_context_new() so we have it
	before testing it in one case.

	Don't add several copies of a handle in the array of handles to
	wait for. The documentation says this is not allowed, although it
	did seem to work fine in practise. But do as the documentations
	says anyway.


svn path=/trunk/; revision=7375
2008-08-21 02:27:13 +00:00
Tor Lillqvist
971ab2b50f Bug 500246 - Bug fixes for giowin32
2008-08-20  Tor Lillqvist  <tml@novell.com>

	Bug 500246 - Bug fixes for giowin32

	* glib/giowin32.c (read_thread) (write_thread): Change the nbytes
	variables to signed.
	(g_io_channel_win32_make_pollfd): Fix an obvious error in the file
	descriptor case leftover after the patch from bug #333098 on
	2006-03-02. Thanks to Marcus Brinkmann.


svn path=/trunk/; revision=7373
2008-08-20 01:30:31 +00:00
Tor Lillqvist
f7f48d5c08 Bug 324234 - Using g_io_add_watch_full() to wait for connect() to return
2008-08-20  Tor Lillqvist  <tml@novell.com>

	Bug 324234 - Using g_io_add_watch_full() to wait for connect() to
	return on a non-blocking socket returns prematurely

	Bug 548278 - Async GETs connections are always terminated
	unexpectedly on Windows

	* glib/giowin32.c: Add one more state variable to the
	GIOWin32Channel struct, ever_writable. Initialise it to FALSE, set
	to TRUE when the WSAEventSelect() indicates FD_WRITE, and never
	reset to FALSE.

	Don't do the WSASetEvent() in g_io_win32_prepare() unless
	ever_writable is TRUE. Don't automatically indicate G_IO_OUT in
	g_io_win32_check() unless ever_writable is TRUE.

	This fixes the behaviour of the test case program in bug #548278,
	and the "Testcase for the spurious OUT event bug" in bug
	#324234. It also doesn't seem to break anything. Not that there is
	any exhaustive test suite...

	Add a comment with a list of bugs that are related to the code in
	this file.


svn path=/trunk/; revision=7372
2008-08-19 23:48:16 +00:00
Matthias Clasen
f1d6c42b3d Bump version
svn path=/trunk/; revision=7369
2008-08-18 13:21:56 +00:00
Matthias Clasen
e17c805ce4 2.17.7
svn path=/trunk/; revision=7367
2008-08-18 13:17:39 +00:00
Sven Neumann
4848eec5a6 mention GWinHttpVfs.
2008-08-17  Sven Neumann  <sven@gimp.org>

	* NEWS: mention GWinHttpVfs.


svn path=/trunk/; revision=7365
2008-08-17 10:39:59 +00:00
Matthias Clasen
372712df9b Updates
svn path=/trunk/; revision=7362
2008-08-16 04:01:57 +00:00
12:41:26 Tim Janik
6011a022d9 changed assertion messages, so older emacsen can also detect failing
2008-08-15 12:41:26  Tim Janik  <timj@imendio.com>

	* glib/gtestutils.c: changed assertion messages, so older emacsen
	can also detect failing source file and line, fixes:
	Bug 502498 – Test framework assertion failures should follow gcc error format


svn path=/trunk/; revision=7358
2008-08-15 10:44:57 +00:00
Matthias Clasen
d94f2b42be Accept lesser mmaps
svn path=/trunk/; revision=7356
2008-08-15 03:41:14 +00:00
Matthias Clasen
88c7129340 Bug 547337 – G_DISABLE_DEPRECATED breaks tests build
2008-08-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 547337 – G_DISABLE_DEPRECATED breaks tests build

        * tests/testglib.c: Protect deprecated API by ifdefs.
        Patch by Kalle Vahlman


svn path=/trunk/; revision=7353
2008-08-14 03:05:17 +00:00
Matthias Clasen
d62a4f6bf9 Bug 547637 – unconditional #include of sys/statfs.h in configure impedes
2008-08-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 547637 – unconditional #include of sys/statfs.h in configure
        impedes detection of statfs things if non-existant

        * configure.in: Protect the statfs.h include by guards.


svn path=/trunk/; revision=7352
2008-08-14 03:01:23 +00:00
Federico Mena Quintero
70323cf694 Hint about having to include config.h
2008-08-12  Federico Mena Quintero  <federico@novell.com>

	* glib/gi18n-lib.h: In the #error about having to define
	GETTEXT_PACKAGE, add a hint about a possibly-missing config.h.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=7343
2008-08-12 19:01:46 +00:00
Behdad Esfahbod
8b4e4a13d8 Bug 547200 – g_utf8_find_next_char() issues
2008-08-11  Behdad Esfahbod  <behdad@gnome.org>

        Bug 547200 – g_utf8_find_next_char() issues

        * glib/gutf8.c: Improve wording about @end arguments in str funcs.


svn path=/trunk/; revision=7337
2008-08-11 19:03:04 +00:00
Behdad Esfahbod
ae6300bd09 Fix docs to use "nul-terminated" consistently.
2008-08-10  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gutf8.c: Fix docs to use "nul-terminated" consistently.


svn path=/trunk/; revision=7334
2008-08-10 20:24:32 +00:00
Ryan Lortie
ce42e7ad4a Fix 'fail' markup test cases to -not- be valid XML 1.1.
2008-08-08  Ryan Lortie  <desrt@desrt.ca>

        * tests/markups/fail-32.gmarkup: change &#x10; to &#x0; since the
        former is no longer a failure.


svn path=/trunk/; revision=7328
2008-08-08 18:35:19 +00:00
Ryan Lortie
4958c5cd4e Bug 546876 - Modify GMarkup parser to accept &#x1; .. &#x1f;
2008-08-08  Ryan Lortie  <desrt@desrt.ca>

        * glib/gmarkup.c: previously the parser only accepted character
        references for \t \n and \r (as per XML 1.0); now it accepts all
        of &#x1; .. &#x1f;.


svn path=/trunk/; revision=7326
2008-08-08 16:41:30 +00:00
Tor Lillqvist
c13b9d5d63 Output comment clarifying GPid semantics to glibconfig.h.
2008-08-07  Tor Lillqvist  <tml@novell.com>

	* configure.in: Output comment clarifying GPid semantics to
	glibconfig.h.

	* glibconfig.h.win32.in: Ditto here.


svn path=/trunk/; revision=7317
2008-08-07 15:40:03 +00:00
Matthias Clasen
065928c778 Fix a doc issue
svn path=/trunk/; revision=7310
2008-08-05 01:23:16 +00:00
Tor Lillqvist
fb17a5de30 Make the union _GSystemThread::data array 8 bytes on Win64. Not that it
2008-08-04  Tor Lillqvist  <tml@novell.com>

	* glibconfig.h.win32.in: Make the union _GSystemThread::data array
	8 bytes on Win64. Not that it matters as the union contains a
	pointer also anyway, but for equivalence with the configure-
	generated glibconfig.h


svn path=/trunk/; revision=7309
2008-08-04 19:32:26 +00:00
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