Use a more optimized g_bit_storage() when gcc is available. (#371670,
[platform/upstream/glib.git] / ChangeLog
1 2007-01-09  Behdad Esfahbod  <behdad@gnome.org>
2
3         * glib/gutils.h: Use a more optimized g_bit_storage() when gcc is
4         available.  (#371670, Daniel Elstner)
5
6 2007-01-08  Matthias Clasen  <mclasen@redhat.com>
7
8         * gthread/gthread-posix.c (g_thread_impl_init): Don't
9         use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is
10         defined.  (#394150)
11
12 2007-01-07  Matthias Clasen  <mclasen@redhat.com>
13
14         Don't link glib against libpthread.  (#393812)
15         
16         * configure.in: Link gthread against librt, not glib itself.
17
18         * glib/gthread.h:
19         * glib/gthread.c: Add a new thread function, gettime.
20
21         * glib/gtimer.c: Use gettime instead of directly working with
22         the various system interfaces.
23
24         * gthread/gthread-impl.c:
25         * gthread/gthread-posix.c:
26         * gthread/gthread-win32.c: Implement gettime.
27         
28 2007-01-07  Matthias Clasen  <mclasen@redhat.com>
29
30         * m4macros/glib-2.0.m4: Use PKG_PROG_PKG_CONFIG.  (#392636,
31         Yevgen Muntyan)
32
33 2007-01-07  Tor Lillqvist  <tml@novell.com>
34
35         * glib/giowin32.c: Handle GIOChannels for file descriptors
36         connected to the console separately. This would typically be the
37         fd 0, 1, or 2 (if not redirected) in a console application. For
38         such fds we don't need a separate thread, as console HANDLEs are
39         waitable objects. (#359202, Michiel de Hoon)
40
41 2007-01-04  Behdad Esfahbod  <behdad@gnome.org>
42
43         * tests/bit-test.c (builtin_bit_nth_lsf1), (builtin_bit_nth_lsf2),
44         (builtin_bit_nth_msf): Fix tests on x86_64.
45
46 2007-01-03  Behdad Esfahbod  <behdad@gnome.org>
47
48         * glib/goption.c (_g_unichar_get_width), (_g_utf8_strwidth),
49         (calculate_max_length), (print_entry), (print_help): Take zerowidth
50         and double-width chars into consideration when computing width of a
51         string.  Also fix another bug in width computation. (#346955)
52
53         * glib/guniprop.c (g_unichar_iszerowidth): Fix typo.  It was not
54         working correctly.
55
56 2007-01-03  Behdad Esfahbod  <behdad@gnome.org>
57
58         * glib/glib.symbols:
59         * glib/gunicode.h:
60         * glib/guniprop.c: Add g_unichar_iszerowidth(). (#347645)
61
62 2007-01-03  Behdad Esfahbod  <behdad@gnome.org>
63
64         * glib/gutils.h: Fix bug in g_bit_nth_lsf (#371631) and use
65         __builtin_clzl for g_bit_storage if available (#371670).
66
67         * tests/Makefile.am:
68         * tests/bit-test.c: New test, to test g_bit_* operations against
69         naive and builtin implementations.
70
71 2007-01-02  Behdad Esfahbod  <behdad@gnome.org>
72
73         * configure.in: Avoid more warnings from running libtool --config.
74         (#391364)
75
76 2007-01-03  Michael Natterer  <mitch@imendio.com>
77
78         * removed all .cvsignore files. SVN doesn't need them.
79
80 2007-01-02  Emmanuele Bassi  <ebassi@gnome.org>
81
82         * glib/gbookmarkfile.c (expand_exec_line): Add support for
83         expanding the desktop entry spec variables %U (list of URIs)
84         and %F (list of filenames), so that using the command line
85         from the Exec and TryExec key of a desktop entry file works
86         as intended.
87
88 2007-01-02  Matthias Clasen  <mclasen@redhat.com>
89
90         * configure.in: Avoid warnings from running libtool --config.
91         (#391364, Loïc Minier)
92
93 2007-01-02  Matthias Clasen  <mclasen@redhat.com>
94
95         * glib/gbookmarkfile.c (g_bookmark_file_get_app_info): 
96         Return an error if the uri is bad. (#391370, Maciej Piechotka)
97
98 2007-01-02  Matthias Clasen  <mclasen@redhat.com>
99
100         * glib/glib.symbols: Guard g_slice_debug_tree_statistics
101         by G_ENABLE_DEBUG.  (#390940, Kazuki Iwamoto)
102
103 2007-01-02  Michael Natterer  <mitch@imendio.com>
104
105         * configure.in
106         * Makefile.am: remove references to build/ until a proper decision
107         has been made what to do with it.
108
109 2007-01-01  Matthias Clasen  <mclasen@redhat.com>
110
111         * glib-gettextize.in: Silence autoconf warnings about
112         datarootdir.  (#391367, Loïc Minier)
113
114 2006-12-31  Matthias Clasen  <mclasen@redhat.com>
115
116         * glib/gslice.c: Fix some C99isms.  (#390913, Kazuki Iwamoto)
117
118 Fri Dec 29 13:28:07 2006  Tim Janik  <timj@imendio.com>
119
120         * glib/gslice.c: turned detection of too late g_thread_init() calls
121         into a warning. this is a temporary work-around for some head-room
122         to fix affected programs, memory corruption still occours regardless.
123
124 2006-12-29  Matthias Clasen  <mclasen@redhat.com>
125
126         * tests/gobject/Makefile.am:
127         * tests/gobject/dynamictype.c: New test for dynamic type 
128         registration macros. 
129
130 Thu Dec 28 21:14:45 2006  Tim Janik  <timj@imendio.com>
131
132         * glib/gslice.c: removed pthread-dependant debugging bits, the code
133         was already converted to GMutex. this obsoletes Tor's recent fixups.
134
135 2006-12-28  Tor Lillqvist  <tml@novell.com>
136
137         * glib/gutils.h (G_WIN32_DLLMAIN_FOR_DLL_NAME)
138         * glib/gutils.c (get_windows_directory_root): : Use only the wide
139         character API here, too.
140
141         * glib/gslice.c: Make it compile on Win32 without pthreads: Use a
142         Win32 critical section instead.
143
144         * glib/gmessages.c (g_logv): On Win32, if we get a fatal error
145         message while being debugged we break into the debugger with
146         G_BREAKPOINT(). Don't call abort() if the user is foolhardy enough
147         to continue after the breakpoint. The user presumably knows what
148         he is doing and deserves what he gets. (#376645, Andreas Köhler)
149
150 Thu Dec 28 12:50:31 2006  Tim Janik  <timj@imendio.com>
151
152         * glib/gslice.h, glib/gslice.c: implemented static debugging
153         hash-tree to validate slice adresses and sizes with G_SLICE=debug-blocks.
154         use abort() to exit in mem_error() to allow catching of these in gdb.
155         abort programs with a descriptive error message if g_thread_init() is
156         called after GSlice was in use. previously this just silently corrupted
157         the magazines.
158
159         * glib/ghash.c (struct _GHashNode): reordered fields to keep 8-byte 
160         pointer alignment on 64bit systems and request smaller slice sizes
161         on 32bit systems.
162
163         * tests/slice-test.c: support '~' option flag to introduce slice 
164         allocation/release corruption with a significant probability. this
165         allowes testing of G_SLICE=debug-blocks.
166
167 2006-12-27  Matthias Clasen  <mclasen@redhat.com>
168
169         * glib/gconvert.[hc]:
170         * glib/gfileutils.c:
171         * glib/giochannel.c:
172         * glib/goption.c:
173         * glib/gspawn.c:
174         * glib/gunicollate.c:
175         * glib/gutils.c:
176         * tests/timeloop-basic.c: 
177         Consistently use gsize rather than size_t.  (#333310,
178         Morten Welinder)
179
180 2006-12-27  Matthias Clasen  <mclasen@redhat.com>
181
182         * configure.in: Use AC_CACHE_CHECK for the nl_langinfo
183         check.  (#304517, Lőrinczy Zsigmond)
184
185 2006-12-27  Tor Lillqvist  <tml@novell.com>
186
187         * glib/gwin32.h
188         * glib/gwin32.c (get_package_directory_from_module)
189         (g_win32_get_package_installation_directory)
190         (g_win32_get_package_installation_subdirectory): Add const to
191         gchar* arguments. (#384523, Yevgen Muntyan)
192         
193 2006-12-27  Ryan Lortie  <desrt@desrt.ca>
194
195         * glib/ghash.c: cache the value of the hash function
196         in the GHashNode.  this speeds up resizing the hash
197         table and it also allows a slight optimisation on
198         lookups.  (#388332)
199
200 2006-12-27  Matthias Clasen  <mclasen@redhat.com>
201
202         * glib/gunicollate.c (g_utf8_collate_key): Don't modify
203         the current locale.  (#389300)
204
205 2006-12-26  Matthias Clasen  <mclasen@redhat.com>
206
207         * glib/gutf8.c: Add hints for locale-dependent interfaces.
208         * glib/gconvert.c: Add hints for locale-dependent interfaces.
209
210         * glib/gconvert.c (g_get_filename_charsets): Improve
211         formatting of docs. 
212
213 2006-12-26  Behdad Esfahbod  <behdad@gnome.org>
214
215         * configure.in: Use libtool to determine shared library suffix.
216         (#357245)
217
218 2006-12-24  Matthias Clasen  <mclasen@redhat.com>
219
220         * tests/run-collate-tests.sh:
221         * tests/unicode-collate.c: Silently skip tests if
222         we can't set LC_COLLATE to en_US.  (#336438)
223
224 2006-12-19  Matthias Clasen  <mclasen@redhat.com>
225
226         * glib/gkeyfile.c (g_key_file_is_key_name): Accept
227         '/', '+' and '.' in key names, since gnome-vfs uses
228         mime types as keys in some cache.
229
230         * tests/keyfile-test.c: Tests for the above.
231
232 2006-12-18  Matthias Clasen  <mclasen@redhat.com>
233
234         * configure.in: Fix the broken poll test.  (#387260,
235         Christian Persch)
236
237         * glib/gmain.c (child_watch_helper_thread): Readd a
238         return which was removed as dead code a while ago.
239         icc may consider it dead, but gcc doesn't like non-void
240         functions without a return...  (#354707)
241
242         * tests/Makefile.am: Try a different fix for bug 346373.
243
244 2006-12-18  Matthias Clasen  <mclasen@redhat.com>
245
246         Fix bug 161288:
247
248         * configure.in: Check for wcslen.
249
250         * glib/gnulib/vasnprintf.c: Handle wcslen missing.
251
252 2006-12-18  Matthias Clasen  <mclasen@redhat.com>
253
254         * glib/gkeyfile.c: Accept '@' in locale names.
255
256         * glib/gkeyfile.c: Tighten up the check for allowed
257         key and group names.  (#343191, Tommi Komulainen)
258
259         * tests/keyfile-test.c: Test handling of key and group names.
260
261         * tests/Makefile.am: Don't use $RANDOM if the shell doesn't
262         have it.  (#346373, Thomas Klausner)
263
264 2006-12-17  Behdad Esfahbod  <behdad@gnome.org>
265
266         * glib/gstring.c: Improve docs about string functions taking a
267         length.  (#378727)
268
269 2006-12-17  Matthias Clasen  <mclasen@redhat.com>
270
271         * glib/gconvert.c:
272         * glib/gutf8.c (_g_charset_get_aliases): Put the G_GNUC_INTERNAL
273         where gcc doesn't complain about it.
274
275         * glib/ghash.c: Make ref_count an int to avoid compiler
276         warnings.
277
278         * configure.in: Use AC_LANG_SOURCE for the clock test.
279         
280         * glib/gthreadpool.h:
281         * glib/gthreadpool.c (g_thread_pool_free): Don't use "wait"
282         as parameter name.  (#379207, Christian Biere)
283
284         * glib/gspawn.c: Refer to g_child_watch_add() in addition
285         to waitpid().
286
287         * glib/gstrfuncs.c (g_strndup, g_strnfill): Move docs
288         inline, and improve wording.  (#372598, Behdad Esfahbod)
289
290         * glib/gspawn.c: Add some pointers to the gdk_spawn_
291         variants.  (#338134, Federico Mena Quintero)
292
293         * configure.in: Make montonic clock test work again. Does
294         AC_COMPILE_IFELSE not get confdefs ? Also, move the clock
295         tests below the thread checks to fix #364663.
296
297         * tests/run-markup-tests.sh: Don't use diff -u  (#380801,
298         Marek Rouchal)
299
300         * glib/gspawn.c: Fix the recent fdwalk()-related changes
301         to not break mapping-test.  (#286838, Marco Barisione)
302
303         * glib/gstring.c (g_string_chunk_new): Don't shadow size.
304         (#386760, Kazuki IWAMOTO)
305
306 2006-12-16  Matthias Clasen  <mclasen@redhat.com>
307
308         * glib/gstring.c: Move more documentation inline.
309
310         * configure.in: Use AC_COMPILE_IFELSE for the monotonic
311         clock test.  (#362918, Han-Wen Nienhuys, Jeremy Lainé)
312
313         * glib/gstring.c: Move documentation inline. 
314
315 2006-12-15  Matthias Clasen  <mclasen@redhat.com>
316
317         * glib/giochannel.h: Make ref_count a gint to avoid
318         compiler warnings.  (#321977, Andrew Paprocki)
319
320         * configure.in: On Solaris, set CFLAGS and LDFLAGS that
321         work both with Sun cc and gcc.  (#315061, Lazlo Peter)
322
323         * glib/gspawn.c: Undefine READ_OK to fix the build on
324         old versions of Darwin.  (#327800)
325
326         * glib/glib.symbols:
327         * glib/gstring.[hc] (g_string_chunk_clear): Add a function
328         for clearing a GStringChunk. (#364608, Matt Barnes)
329
330         * glib/guniprop.c (interval_compare): Avoid a compiler
331         warning.
332
333         * glib/gspawn.c (do_exec): Call set_cloexec() with
334         the right parameters.  (#386252, Guillaume Desmottes)
335
336 2006-12-15  Matthias Clasen  <mclasen@redhat.com>
337
338         Fix #357585, Padraig O'Briain.
339         
340         * configure.in: Check for fdwalk.
341         
342         * glib/gspawn.c (do_exec): Use fdwalk() to close all
343         file descriptors. 
344
345         * glib/gspawn.c (fdwalk): Fallback implementation of
346         fdwalk.
347
348 2006-12-14  Matthias Clasen  <mclasen@redhat.com>
349
350         * glib/gconvert.c (open_converter): Don't use alloca
351         and avoid allocating memory for small keys that are 
352         already cached.  (#172406, Morten Welinder)
353
354         * glib/gmain.c (g_child_watch_add_full): Improve the docs.
355         (#345569, Tim-Philipp Müller)
356
357         * glib/gkeyfile.c (g_key_file_add_group): If the group
358         is already there, make it current.  (#385910, Joe Halliwell)
359
360         * tests/keyfile-test.c: Add a test for duplicate groups/keys.
361
362 2006-12-13  Matthias Clasen  <mclasen@redhat.com>
363
364         * m4macros/glib-gettext.m4: Require AC_CANONICAL_HOST in
365         GLIB_WITH_NLS.  (#385132, Laszlo Peter)
366
367 2006-12-12  Matthias Clasen  <mclasen@redhat.com>
368
369         * configure.in: Add a check for broken poll on Mac OS X.
370
371         * glib/gmain.c: Use poll emulation on OS X.  (#302672, Toby Peterson,
372         patch by Dave Vasilevsky)
373
374 2006-12-11  Matthias Clasen  <mclasen@redhat.com>
375
376         * glib/gatomic.c: Don't use local numeric labels in
377         inline assembler on AIX.  (#316434, Hans Rosenfeld)
378
379         * glib/gunicode.h (g_utf8_next_char): Cast to const char *,
380         not char *.  (#138153, Nikolai Weibull)
381
382 Wed Nov 22 16:09:13 2006  Tim Janik  <timj@gtk.org>
383
384         * glib/gmacros.h: added G_GNUC_MAY_ALIAS, suggested by Mathias
385         Hasselmann in bug #335341, fixes bug #335853.
386
387 2006-11-15  Matthias Clasen  <mclasen@redhat.com>
388
389         * m4macros/glib-gettext.m4: Apply a patch from James 
390         Henstridge for compatibility with automake 2.60 (#343825)
391
392 2006-11-14  Behdad Esfahbod  <behdad@gnome.org>
393
394         * sanity_check: Replace bash-specific == with sh-understood =.
395         Fixes bug #373864.
396
397 2006-11-05  Hans Breuer  <hans@breuer.org>
398
399         * glib/makefile.msc.in : glib/ version not the gobject/ 
400         one I accidentially commited. Fixes bug #371074.
401         
402 2006-11-05  Tor Lillqvist  <tml@novell.com>
403
404         * makefile.mingw
405         * gmodule/makefile.mingw.in
406         * glib/makefile.mingw.in
407         * gobject/makefile.mingw.in
408         * gthread/makefile.mingw.in
409         * tests/makefile.mingw.in: Remove from CVS. Haven't been
410         maintained or distributed for long.
411
412 2006-10-26  Pascal Terjan  <pterjan@linuxfr.org>
413
414         * glib/libcharset/localcharset.c: Fix small leak on failed
415         realloc in _g_locale_get_charset_aliases (#338582)
416
417 2006-10-16  Behdad Esfahbod  <behdad@gnome.org>
418
419         * glib/gnulib/Makefile.am: Add $(GLIB_DEBUG_FLAGS).  (#362543,
420         Peter Kjellerstedt)
421
422 2006-10-15  Sebastian Wilhelmi  <seppi@seppi.de>
423
424         * tests/Makefile.am: Compile errorcheck-mutex-test with thread
425         libraries explicitly. (#74748, Javier Villavicencio)
426
427 2006-10-08  Matthias Clasen  <mclasen@redhat.com>
428
429         Add a way to obtain Unicode script information.  (#348348,
430         Marco Barisione)
431
432         * glib/glib.symbols:
433         * glib/gunicode.h: Add GUnicodeScript enumeration and
434         g_unichar_get_script. 
435         
436         * glib/guniprop.c: Implement g_unichar_get_script.
437
438         * glib/gscripttable.h: Generated private header containing
439         script tables.
440
441         * glib/gen-script-table.pl: Script to generate gscripttable.h.
442
443         * glib/Makefile.am: Update
444
445 2006-10-08  Matthias Clasen  <mclasen@redhat.com>
446
447         * tests/run-markup-tests.sh: Small portability fix.  (#347944,
448         Dan McMahill)
449
450 2006-10-07  Tor Lillqvist  <tml@novell.com>
451
452         * glib/gwin32.c (get_package_directory_from_module)
453         (g_win32_get_package_installation_directory): g_strdup the keys
454         that we are passed before adding them to the hash tables, to guard
455         against the caller freeing them. (#355955, Andreas Köhler)
456
457 2006-10-06  Matthias Clasen  <mclasen@redhat.com> 
458
459         * glib/gtimer.c: Fix a typo.  (#359190)
460
461 2006-10-02  Behdad Esfahbod  <behdad@gnome.org>
462
463         * glib/Makefile.am:
464         * gobject/Makefile.am:
465         Include pltcheck.sh in EXTRA_DIST, and remove redefinition of TESTS.
466         (#358966)
467
468 2006-10-01  Matthias Clasen  <mclasen@redhat.com>
469
470         * glib/gtimer.c (g_usleep): Use nsleep to implement
471         g_usleep on AIX.  (#321974, Andrew Paprocki)
472
473         * configure.in: Check for nsleep
474
475         * glib/gmain.c: Fix typos in doc comments.  
476         (#358421, Tom Tromey)
477
478 2006-09-30  Matthias Clasen  <mclasen@redhat.com>
479
480         * glib/pltcheck.sh: A script to check PLT entries.
481         * glib/Makefile.am (TESTS): Run pltcheck.sh
482
483         * glib/*: Fix includes to correct some issues with
484         PLT entries.  (#354522, Behdad Esfahbod)
485
486 2006-09-17  Hans Breuer  <hans@breuer.org>
487
488         * glib/makefile.msc.in gobject/makefile.msc.in : better filtering
489         of G_GNUC_* stuff when generating .def files. Now also works with
490         newer (less tolerant) linkers, e.g. from vc2500e
491
492 2006-09-10  Matthias Clasen  <mclasen@redhat.com>
493
494         * glib/gbacktrace.c: Assume string.h is available. 
495         (#354523, Behdad Esfahbod)
496
497         * configure.in: Bump version to 2.13.0
498
499         * glib/glib.symbols:
500         * glib/gmain.[hc]: Add functions to create approximate
501         timeouts.  (#353942, Arjan van de Ven)
502
503         * glib/gstdio.c (g_rename): Initialize save_errno.
504         (#355206, Mike Edenfield)
505
506 2006-09-03  Matthias Clasen  <mclasen@redhat.com>
507
508         * glib/gerror.c: Allocate GErrors using the slice allocator.
509         (#354054, Matt Barnes)
510
511 2006-09-02  Matthias Clasen  <mclasen@redhat.com>
512
513         * glib/gtimer.c: Forgotten HAVE_CLOCK_GETTIME.
514
515 2006-09-02  Tor Lillqvist  <tml@novell.com>
516
517         * glib/gutils.c (g_get_any_init_do): Correct C99ism (mixed
518         declarations and code) in Win32 ifdef branch. (#353903, Mike
519         Edenfield)
520
521 2006-09-01  Abel Cheung  <abel@oaka.org>
522
523         * configure.in: Added 'dz' 'hy' to ALL_LINGUAS.
524
525 2006-09-01  Matthias Clasen  <mclasen@redhat.com>
526
527         * configure.in: Check for CLOCK_MONOTONIC.
528
529         * glib/gtimer.c: Only use clock_gettime if we
530         have a monotonic clock.
531
532 2006-08-31  Matthias Clasen  <mclasen@redhat.com>
533
534         * configure.in: Add missing includes to a few test
535         programs.  (#353580, Chris Wilson)
536
537 2006-08-30  Matthias Clasen  <mclasen@redhat.com>
538
539         * glib/gmarkup.c (g_markup_vprintf_escaped): Don't call
540         va_end on caller-provided va_args.  (#353584, Chris Wilson)
541
542 2006-08-29  Tor Lillqvist  <tml@novell.com>
543
544         Remove support for Windows 9x/ME, as will be done also in Pango
545         and GTK+. GTK+ hasn't worked on Win9x since 2.6 or 2.8 anyway, so
546         it's pretty pointless to keep the Win9x code in here either. If
547         somebody is interested, the code can always be found in older GLib
548         versions, and in CVS.
549
550         * glib/gdir.c
551         * glib/gfileutils.c
552         * glib/gspawn-win32-helper.c
553         * glib/gspawn-win32.c
554         * glib/gstdio.c
555         * glib/gutils.c
556         * glib/gwin32.c
557         * glib/gwin32.h: Remove the G_WIN32_IS_NT_BASED() and
558         G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x)
559         branches, and any variables or static functions used only by the
560         Win9x branches.
561
562         * glib/gwin32.c (g_win32_windows_version_init): Call g_error() if
563         run on Win9x.
564
565 2006-08-27  Matthias Clasen  <mclasen@redhat.com>
566
567         * configure.in: Fix pthread compiler flag detection.
568
569         * glib/gtimer.c: Use Posix monotonic clocks instead of 
570         gettimeofday when available.  (#336114, William Jon McCann)
571
572 2006-08-26  Matthias Clasen  <mclasen@redhat.com>
573
574         * glib/gutils.h: 
575         * glib/gscanner.c: Fix some typos.  (#351741, Kjartan Maraas)
576
577 2006-08-25  Matthias Clasen  <mclasen@redhat.com>
578
579         * configure.in: Fix the pthread compiler flag detection.
580
581         * glib/gunicode.h: 
582         * glib/gutf8.c (_g_utf8_make_valid): Rename make_valid_utf8
583         from gconvert.c, move it to gutf8.c, and export it privately.
584
585         * glib/gconvert.c (g_filename_display_name): Adjust callers.
586
587         * glib/gkeyfile.c: Use _g_utf8_make_valid() in a number of
588         places to ensure error messages are valid UTF-8.  (#351853,
589         Simon Budig)
590
591 2006-08-22  Matthias Clasen <mclasen@redhat.com>
592
593         * Branch for 2.12
594