Commit Graph

2519 Commits

Author SHA1 Message Date
Tor Lillqvist
8d9150647c Prepare for potential Win64 build: Use gint64 for the fd field on Win64,
2007-01-15  Tor Lillqvist  <tml@novell.com>

	* glib/gmain.h (struct _GPollFD): Prepare for potential Win64
	build: Use gint64 for the fd field on Win64, as we want to be able
	to store a HANDLE in it. (#395422) (Other changes will surely also
	be necessary when building on Win64, at least in gwin32.c.)


svn path=/trunk/; revision=5260
2007-01-15 02:28:01 +00:00
Tor Lillqvist
12706811c2 Mention that my last change to gwin32.c also fixes #395419.
svn path=/trunk/; revision=5258
2007-01-15 02:06:30 +00:00
Tor Lillqvist
1535446885 Simplify greatly. Instead of hardcoding a large switch statement, just ask
2007-01-15  Tor Lillqvist  <tml@novell.com>

	* glib/gwin32.c (g_win32_getlocale): Simplify greatly. Instead of
	hardcoding a large switch statement, just ask Windows for the
	ISO639 and ISO3166 codes. Tack on @Latn or @Cyrl for those
	languages which can alternatively be written in Latin or Cyrillic.


svn path=/trunk/; revision=5257
2007-01-15 01:13:57 +00:00
Matthias Clasen
38b9221961 Rework the handling of invalid keys/groups again. We are back to being
2007-01-12  Matthias Clasen  <mclasen@redhat.com>

        * glib/gkeyfile.c: Rework the handling of invalid
        keys/groups again. We are back to being liberal about
        what we accept, and only reject things that would lead
        to non-rereadable keyfiles.

        * tests/keyfile-test.c: Adapt tests.



svn path=/trunk/; revision=5254
2007-01-12 20:25:57 +00:00
Matthias Clasen
8187230ab4 Improve docs
svn path=/trunk/; revision=5251
2007-01-12 17:54:13 +00:00
Matthias Clasen
6ac483bae4 Include windows.h and fix include order. (#394258, Kazuki Iwamoto)
2007-01-12  Matthias Clasen  <mclasen@redhat.com>

        * glib/gthread.c: Include windows.h and fix
        include order. (#394258, Kazuki Iwamoto)



svn path=/trunk/; revision=5249
2007-01-12 17:31:31 +00:00
Matthias Clasen
247997afed Make G_GNUC_INTERNAL a no-op for gcc 2.95. (#329031, David Schleef, Marc
2007-01-12  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Make G_GNUC_INTERNAL a no-op for
        gcc 2.95.    (#329031, David Schleef, Marc Brockschmidt)



svn path=/trunk/; revision=5245
2007-01-12 15:17:00 +00:00
Matthias Clasen
2c7dbe9c73 Fix errors in the recently moved time calculations. (#395203, Chris
2007-01-12  Matthias Clasen  <mclasen@redhat.com>

        * gthread/gthread-posix.c:
        * glib/gtimer.c:
        * glib/gthread.c: Fix errors in the recently moved
        time calculations.  (#395203, Chris Wilson)



svn path=/trunk/; revision=5244
2007-01-12 05:55:16 +00:00
Matthias Clasen
a0c1c3b14e Actually link gthread against librt. (#394641, Marco Pesenti Gritti)
2007-01-10  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Actually link gthread against librt.
        (#394641, Marco Pesenti Gritti)



svn path=/trunk/; revision=5241
2007-01-10 13:52:04 +00:00
Matthias Clasen
b021642caf Grr, allow '*' in keys, too. (#394262)
2007-01-10  Matthias Clasen  <mclasen@redhat.com>

        * glib/gkeyfile.c (g_key_file_is_key_name): Grr, allow '*' in keys,
        too.  (#394262)



svn path=/trunk/; revision=5239
2007-01-10 13:46:45 +00:00
Behdad Esfahbod
6b6fd9bac8 Use a more optimized g_bit_storage() when gcc is available. (#371670,
2007-01-09  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gutils.h: Use a more optimized g_bit_storage() when gcc is
        available.  (#371670, Daniel Elstner)


svn path=/trunk/; revision=5234
2007-01-09 19:05:36 +00:00
Matthias Clasen
cf7dcc4f38 Don't use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is defined.
2007-01-08  Matthias Clasen  <mclasen@redhat.com>

        * gthread/gthread-posix.c (g_thread_impl_init): Don't
        use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is
        defined.  (#394150)



svn path=/trunk/; revision=5230
2007-01-08 12:59:05 +00:00
Matthias Clasen
541462ab1e Don't link glib against libpthread. (#393812)
2007-01-07  Matthias Clasen  <mclasen@redhat.com>

	Don't link glib against libpthread.  (#393812)
	
	* configure.in: Link gthread against librt, not glib itself.

	* glib/gthread.h:
	* glib/gthread.c: Add a new thread function, gettime.

	* glib/gtimer.c: Use gettime instead of directly working with
	the various system interfaces.

	* gthread/gthread-impl.c:
	* gthread/gthread-posix.c:
	* gthread/gthread-win32.c: Implement gettime.
	

svn path=/trunk/; revision=5227
2007-01-08 05:13:15 +00:00
Matthias Clasen
8a688f12f0 Use PKG_PROG_PKG_CONFIG. (#392636, Yevgen Muntyan)
2007-01-07  Matthias Clasen  <mclasen@redhat.com>

        * m4macros/glib-2.0.m4: Use PKG_PROG_PKG_CONFIG.  (#392636,
        Yevgen Muntyan)



svn path=/trunk/; revision=5225
2007-01-08 04:42:31 +00:00
Tor Lillqvist
e5ef75596e Handle GIOChannels for file descriptors connected to the console
2007-01-07  Tor Lillqvist  <tml@novell.com>

	* glib/giowin32.c: Handle GIOChannels for file descriptors
	connected to the console separately. This would typically be the
	fd 0, 1, or 2 (if not redirected) in a console application. For
	such fds we don't need a separate thread, as console HANDLEs are
	waitable objects. (#359202, Michiel de Hoon)


svn path=/trunk/; revision=5222
2007-01-07 03:02:28 +00:00
Behdad Esfahbod
46dae95f4a Fix tests on x86_64.
2007-01-04  Behdad Esfahbod  <behdad@gnome.org>

        * tests/bit-test.c (builtin_bit_nth_lsf1), (builtin_bit_nth_lsf2),
        (builtin_bit_nth_msf): Fix tests on x86_64.


svn path=/trunk/; revision=5216
2007-01-05 03:31:54 +00:00
Behdad Esfahbod
61b40ad765 Add bug number to ChangeLog
svn path=/trunk/; revision=5207
2007-01-03 23:17:52 +00:00
Behdad Esfahbod
d2a9b31e61 Take zerowidth and double-width chars into consideration when computing
2007-01-03  Behdad Esfahbod  <behdad@gnome.org>

        * glib/goption.c (_g_unichar_get_width), (_g_utf8_strwidth),
        (calculate_max_length), (print_entry), (print_help): Take zerowidth
        and double-width chars into consideration when computing width of a
        string.  Also fix another bug in width computation.

        * glib/guniprop.c (g_unichar_iszerowidth): Fix typo.  It was not
        working correctly.


svn path=/trunk/; revision=5204
2007-01-03 23:05:36 +00:00
Behdad Esfahbod
a0c60a62d6 Add g_unichar_iszerowidth(). (#347645)
2007-01-03  Behdad Esfahbod  <behdad@gnome.org>

        * glib/glib.symbols:
        * glib/gunicode.h:
        * glib/guniprop.c: Add g_unichar_iszerowidth(). (#347645)


svn path=/trunk/; revision=5202
2007-01-03 20:48:24 +00:00
Behdad Esfahbod
048efdfbd5 Fix bug in g_bit_nth_lsf (#371631) and use __builtin_clzl for
2007-01-03  Behdad Esfahbod  <behdad@gnome.org>

        * glib/gutils.h: Fix bug in g_bit_nth_lsf (#371631) and use 
        __builtin_clzl for g_bit_storage if available (#371670).

        * tests/Makefile.am:
        * tests/bit-test.c: New test, to test g_bit_* operations against
        naive and builtin implementations.


svn path=/trunk/; revision=5200
2007-01-03 20:08:53 +00:00
Behdad Esfahbod
bf1b1d2711 Avoid more warnings from running libtool --config. (#391364)
2007-01-02  Behdad Esfahbod  <behdad@gnome.org>

        * configure.in: Avoid more warnings from running libtool --config.
        (#391364)


svn path=/trunk/; revision=5199
2007-01-03 18:32:04 +00:00
Michael Natterer
feb07512f0 removed all .cvsignore files. SVN doesn't need them.
2007-01-03  Michael Natterer  <mitch@imendio.com>

	* removed all .cvsignore files. SVN doesn't need them.


svn path=/trunk/; revision=5198
2007-01-03 11:22:36 +00:00
Emmanuele Bassi
029d43222f Add support for expanding the desktop entry spec variables %U (list of
2007-01-02  Emmanuele Bassi  <ebassi@gnome.org>

	* glib/gbookmarkfile.c (expand_exec_line): Add support for
	expanding the desktop entry spec variables %U (list of URIs)
	and %F (list of filenames), so that using the command line
	from the Exec and TryExec key of a desktop entry file works
	as intended.

svn path=/trunk/; revision=5196
2007-01-02 16:20:48 +00:00
Matthias Clasen
7eab26d13b Avoid warnings from running libtool --config. (#391364, Loïc Minier)
2007-01-02  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Avoid warnings from running libtool --config.
        (#391364, Loïc Minier)



svn path=/trunk/; revision=5194
2007-01-02 13:58:54 +00:00
Matthias Clasen
01c3535fe6 Return an error if the uri is bad. (#391370, Maciej Piechotka)
2007-01-02  Matthias Clasen  <mclasen@redhat.com>

        * glib/gbookmarkfile.c (g_bookmark_file_get_app_info):
        Return an error if the uri is bad. (#391370, Maciej Piechotka)



svn path=/trunk/; revision=5192
2007-01-02 13:53:15 +00:00
Matthias Clasen
db9c08d08b Guard g_slice_debug_tree_statistics by G_ENABLE_DEBUG. (#390940, Kazuki
2007-01-02  Matthias Clasen  <mclasen@redhat.com>

        * glib/glib.symbols: Guard g_slice_debug_tree_statistics
        by G_ENABLE_DEBUG.  (#390940, Kazuki Iwamoto)



svn path=/trunk/; revision=5190
2007-01-02 13:09:03 +00:00
Michael Natterer
99b531f425 configure.in remove references to build/ until a proper decision has been
2007-01-02  Michael Natterer  <mitch@imendio.com>

	* configure.in
	* Makefile.am: remove references to build/ until a proper decision
	has been made what to do with it.


svn path=/trunk/; revision=5189
2007-01-02 10:40:27 +00:00
Matthias Clasen
4dd6d0fd22 Silence autoconf warnings about datarootdir. (#391367, Loïc Minier)
2007-01-01  Matthias Clasen  <mclasen@redhat.com>

        * glib-gettextize.in: Silence autoconf warnings about
        datarootdir.  (#391367, Loïc Minier)



svn path=/trunk/; revision=5186
2007-01-02 05:26:14 +00:00
Matthias Clasen
e319147a9e Fix some C99isms. (#390913, Kazuki Iwamoto)
2006-12-31  Matthias Clasen  <mclasen@redhat.com>

        * glib/gslice.c: Fix some C99isms.  (#390913, Kazuki Iwamoto)



svn path=/trunk/; revision=5183
2006-12-31 16:27:45 +00:00
Tim Janik
0f9cf7898b turned detection of too late g_thread_init() calls into a warning. this is
Fri Dec 29 13:28:07 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: turned detection of too late g_thread_init() calls
        into a warning. this is a temporary work-around for some head-room
        to fix affected programs, memory corruption still occours regardless.
2006-12-29 12:29:55 +00:00
Matthias Clasen
d7b7c44e40 Define G_DEFINE_DYNAMIC_TYPE and and _EXTENDED variant. (#334437)
2006-12-29 Matthias Clasen  <mclasen@redhat.com>

        * gtypemodule.h: Define G_DEFINE_DYNAMIC_TYPE and
        and _EXTENDED variant.  (#334437)
2006-12-29 06:12:11 +00:00
Tim Janik
5fef9365d8 removed pthread-dependant debugging bits, the code was already converted
Thu Dec 28 21:14:45 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: removed pthread-dependant debugging bits, the code
        was already converted to GMutex. this obsoletes Tor's recent fixups.
2006-12-28 20:15:35 +00:00
Tor Lillqvist
98d5dea18a : Use only the wide character API here, too.
2006-12-28  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (get_windows_directory_root): : Use only the wide
	character API here, too.
2006-12-28 15:47:42 +00:00
Tor Lillqvist
a45be29beb Use only the wide character API here, too.
2006-12-28  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.h (G_WIN32_DLLMAIN_FOR_DLL_NAME): Use only the wide
	character API here, too.
2006-12-28 15:41:28 +00:00
Tor Lillqvist
b713fbc11a Make it compile on Win32 without pthreads: Use a Win32 critical section
2006-12-28  Tor Lillqvist  <tml@novell.com>

	* glib/gslice.c: Make it compile on Win32 without pthreads: Use a
	Win32 critical section instead.
2006-12-28 15:39:47 +00:00
Tor Lillqvist
fd1f409e41 On Win32, if we get a fatal error message while being debugged we break
2006-12-28  Tor Lillqvist  <tml@novell.com>

	* glib/gmessages.c (g_logv): On Win32, if we get a fatal error
	message while being debugged we break into the debugger with
	G_BREAKPOINT(). Don't call abort() if the user is foolhardy enough
	to continue after the breakpoint. The user presumably knows what
	he is doing and deserves what he gets. (#376645, Andreas Köhler)
2006-12-28 14:47:54 +00:00
Tim Janik
1bd8993451 implemented static debugging hash-tree to validate slice adresses and
Thu Dec 28 12:50:31 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.h, glib/gslice.c: implemented static debugging
        hash-tree to validate slice adresses and sizes with G_SLICE=debug-blocks.
        use abort() to exit in mem_error() to allow catching of these in gdb.
        abort programs with a descriptive error message if g_thread_init() is
        called after GSlice was in use. previously this just silently corrupted
        the magazines.

        * glib/ghash.c (struct _GHashNode): reordered fields to keep 8-byte
        pointer alignment on 64bit systems and request smaller slice sizes
        on 32bit systems.

        * tests/slice-test.c: support '~' option flag to introduce slice
        allocation/release corruption with a significant probability. this
        allowes testing of G_SLICE=debug-blocks.
2006-12-28 11:50:43 +00:00
Matthias Clasen
98d552e0cd Consistently use gsize rather than size_t. (#333310, Morten Welinder)
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * 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)
2006-12-28 04:48:06 +00:00
Matthias Clasen
f678ea9725 Use AC_CACHE_CHECK for the nl_langinfo check. (#304517, Lőrinczy
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Use AC_CACHE_CHECK for the nl_langinfo
        check.  (#304517, Lőrinczy Zsigmond)
2006-12-28 04:41:23 +00:00
Tor Lillqvist
90d70c5967 glib/gwin32.h Add const to gchar* arguments. (#384523, Yevgen Muntyan)
2006-12-27  Tor Lillqvist  <tml@novell.com>

	* glib/gwin32.h
	* glib/gwin32.c (get_package_directory_from_module)
	(g_win32_get_package_installation_directory)
	(g_win32_get_package_installation_subdirectory): Add const to
	gchar* arguments. (#384523, Yevgen Muntyan)
2006-12-27 14:50:17 +00:00
Ryan Lortie
e6b78c9af1 cache the value of the hash function in the GHashNode. this speeds up
2006-12-27  Ryan Lortie  <desrt@desrt.ca>

        * glib/ghash.c: cache the value of the hash function
        in the GHashNode.  this speeds up resizing the hash
        table and it also allows a slight optimisation on
        lookups.  (#388332)
2006-12-27 05:43:40 +00:00
Matthias Clasen
d1be55cccb Don't modify the current locale. (#389300)
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * glib/gunicollate.c (g_utf8_collate_key): Don't modify
        the current locale.  (#389300)
2006-12-27 05:12:47 +00:00
Matthias Clasen
3ab1139aef Add hints for locale-dependent interfaces. Add hints for locale-dependent
2006-12-26  Matthias Clasen  <mclasen@redhat.com>

        * glib/gutf8.c: Add hints for locale-dependent interfaces.
        * glib/gconvert.c: Add hints for locale-dependent interfaces.
2006-12-27 05:09:48 +00:00
Matthias Clasen
635341877f Improve formatting of docs.
2006-12-26  Matthias Clasen  <mclasen@redhat.com>

        * glib/gconvert.c (g_get_filename_charsets): Improve
        formatting of docs.
2006-12-27 04:29:27 +00:00
Behdad Esfahbod
992a0c5ed5 Use libtool to determine shared library suffix. (#357245)
2006-12-26  Behdad Esfahbod  <behdad@gnome.org>

        * configure.in: Use libtool to determine shared library suffix.
        (#357245)
2006-12-26 20:18:58 +00:00
Matthias Clasen
ca7dc0e94c Silently skip tests if we can't set LC_COLLATE to en_US. (#336438)
2006-12-24  Matthias Clasen  <mclasen@redhat.com>

        * tests/run-collate-tests.sh:
        * tests/unicode-collate.c: Silently skip tests if
        we can't set LC_COLLATE to en_US.  (#336438)
2006-12-24 21:47:05 +00:00
Matthias Clasen
01f78fa7f5 Accept '/', '+' and '.' in key names, since gnome-vfs uses mime types as
2006-12-19  Matthias Clasen  <mclasen@redhat.com>

        * glib/gkeyfile.c (g_key_file_is_key_name): Accept
        '/', '+' and '.' in key names, since gnome-vfs uses
        mime types as keys in some cache.

2
2006-12-19 21:08:32 +00:00
Matthias Clasen
493e7ca45f Fix the broken poll test. (#387260, Christian Persch)
2006-12-18  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Fix the broken poll test.  (#387260,
        Christian Persch)
2006-12-19 15:28:17 +00:00
Matthias Clasen
2d7fa2dd18 Readd a return which was removed as dead code a while ago. icc may
* glib/gmain.c (child_watch_helper_thread): Readd a
        return which was removed as dead code a while ago.
        icc may consider it dead, but gcc doesn't like non-void
        functions without a return...  (#354707)
2006-12-19 02:49:39 +00:00
Matthias Clasen
330e9ffc1b Try a different fix for bug 346373.
2006-12-18  Matthias Clasen  <mclasen@redhat.com>

        * tests/Makefile.am: Try a different fix for bug 346373.
2006-12-18 14:50:36 +00:00