Fix #316221, Michal Benes, Stanislav Brabec;
[platform/upstream/glib.git] / ChangeLog.pre-2-10
1 2005-12-27  Matthias Clasen  <mclasen@redhat.com>
2         
3         Fix #316221, Michal Benes, Stanislav Brabec;
4
5         * configure.in: Fix a strict aliasing problem in 
6         g_static_mutex_get_mutex(). 
7         * glib/gthread.h: ...and in 
8         g_static_mutex_get_mutex_impl_shortcut().
9
10         * glib/gdatasetprivate.h: Add a cast to silence compiler
11         warnings.  (#321978, Andrew Paprocki)
12
13         Partial fix for bug #32937, Bogdan Nicula.
14
15         * configure.in: Check for malloc.h
16         * glib/gslice.c: Don't include malloc.h unconditionally.
17
18 2005-12-27  Manish Singh  <yosh@gimp.org>
19
20         * tests/run-collate-tests.sh: export LC_COLLATE so it takes.
21         (#324950, Dan Yefimov)
22
23 2005-12-26  Matthias Clasen  <mclasen@redhat.com>
24
25         * glib/gslice.c: On Win32, include process.h  (#325015, Kazuki
26         Iwamoto)
27
28 2005-12-25  Matthias Clasen  <mclasen@redhat.com>
29
30         * AUTHORS: Update my email
31
32         * tests/slice-test.c: Fix C99isms.  (#324950, Dan Yefimov)
33
34 2005-12-21  Matthias Clasen  <mclasen@redhat.com>
35         
36         * README.in: Add some notes on when 'make check' may fail.
37
38 2005-12-20  Matthias Clasen  <mclasen@redhat.com>
39
40         * glib/glib.symbols: 
41         * glib/gthreadpool.h: 
42         * glib/gthreadpool.c (g_thread_pool_set_sort_function): New function
43         to sort tasks pushed into a threadpool.  (#324479, Martyn Russell)
44
45         * tests/threadpool-test.c: Test this.
46
47 Tue Dec 20 18:14:14 2005  Tim Janik  <timj@imendio.com>
48
49         * glib/gslice.[hc]: added mem_error() and mem_assert() to test and 
50         handle  errors without depending on gmessage.c which might not be
51         setup when the error occours.
52         removed G_SLICE_CONFIG_ALWAYS_FREE config option, fixed the code so
53         always freeing can be achieved by adjusting the working set time to
54         0 with G_SLICE_CONFIG_WORKING_SET_MSECS.
55         added G_SLICE_CONFIG_COLOR_INCREMENT to test different color increments
56         (mainly 0 and 1). reduced the minimum block size to 128 bytes, to
57         minimize wastage if small amounts of differently sized structrues are
58         allocated, this does come at a performance cost of roughly 5% though.
59         fixed up block alignment calculation, so it works for varying
60         block sizes. only use strerror() not g_strerror() since the latter
61         depends on working GQuark and GSlice.
62         mem_error(): implemented in terms of fprintf and vfprintf.
63
64         * tests/slice-color.c: new program to test cache colorization effects.
65
66         * tests/slice-test.c: trade G_SLICE_CONFIG_ALWAYS_FREE for 0 duration
67         G_SLICE_CONFIG_WORKING_SET_MSECS.
68
69 2005-12-17  Matthias Clasen  <mclasen@redhat.com>
70
71         * glib/goption.c (parse_short_option): Set an error in all
72         failure cases.  (#324332, Tim-Philipp Müller) 
73
74 2005-12-17  Sebastian Wilhelmi  <seppi@seppi.de>
75
76         * glib/gatomic.c: Fix memory barrier position in g_atomic_int_get
77         and g_atomic_pointer_get. Add g_atomic_int_set and
78         g_atomic_pointer_set implementations for the !DEFINE_WITH_MUTEXES &&
79         G_ATOMIC_OP_MEMORY_BARRIER_NEEDED case, as well as defining them
80         as functions (additionally to the macros in the header) for the 
81         !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED case.
82
83 2005-12-16  Matthias Clasen  <mclasen@redhat.com>
84
85         *  glib/gmem.c (g_allocator_new): Don't return a pointer to
86         a const struct, since apps expect to be able to modify it. 
87         (#324179, J. Ali Harlow)
88
89 Tue Dec 13 10:13:32 2005  Tim Janik  <timj@imendio.com>
90
91         * glib/gatomic.h: added g_atomic_pointer_set() and g_atomic_int_set()
92         for systems where the initialization of atomic variables requires a
93         write memory barrier.
94
95 2005-12-09  Matthias Clasen  <mclasen@redhat.com>
96
97         * configure.in: Bump version
98
99         * === Released 2.9.1 ===
100
101 2005-12-09  Alexander Larsson  <alexl@redhat.com>
102
103         * glib/glist.h: 
104         * glib/gslist.h:
105         Use G_GNUC_WARN_UNUSED_RESULT on list functions that return
106         the whole list.
107
108 2005-12-08  Matthias Clasen  <mclasen@redhat.com>
109
110         * NEWS: Updates
111
112 2005-12-07  Martyn Russell  <martyn@imendio.com>
113
114         * glib/gasyncqueue.c:
115         - Call g_queue_insert_sorted() instead of duplicating the code.
116         - Call g_queue_sort() instead of duplicating the code.
117         - Invert sort function results to make sure the same sort function
118         gives the same results across glist, gslist, gqueue and
119         gasyncqueue.
120
121         * tests/asyncqueue-test.c:
122         - Updated the sort function to reflect the example in the
123         documentation for gasyncqueue.c.
124
125 2005-12-07  Martyn Russell  <martyn@imendio.com>
126
127         * docs/reference/glib/glib-sections.txt:
128         * docs/reference/glib/tmpl/linked_lists_double.sgml:
129         * docs/reference/glib/tmpl/linked_lists_single.sgml:
130         * glib/glist.[ch]: 
131         * glib/gslist.[ch]: 
132         - Added g_list_insert_sorted_with_data () and
133         g_slist_insert_sorted_with_data ().
134         - Removed the extra check in g_list_sort() and g_slist_sort() for
135         GCompareDataFunc vs. GCompareFunc.
136         
137 2005-12-07  Tor Lillqvist  <tml@novell.com>
138
139         * glib-gettextize.in: Look up prefix at run-time on Win32,
140         assuming the standard directory structure with glib-gettextize in
141         $prefix/bin.
142
143 2005-12-06  Matthias Clasen  <mclasen@redhat.com>
144
145         * glib/gmem.h: Exempt GTK+ from the mem chunk deprecation, since
146         we need GTK+ 2.8 to compile against GLib 2.10.
147
148 2005-12-05  Manish Singh  <yosh@gimp.org>
149
150         * tests/run-collate-test.sh: set LC_COLLATE, not LANG, to be sure
151         to override any user settings.
152
153 2005-12-05  Matthias Clasen  <mclasen@redhat.com>
154
155         * configure.in: Revert an accidential commit
156
157 2005-12-05  Matthias Clasen  <mclasen@redhat.com>
158
159         * glib/gutf8.c: Documentation updates.  (#323291, Morten Welinder)
160
161         * tests/Makefile.am (TESTS_ENVIRONMENT): 
162         * tests/gobject/Makefile.am (TESTS_ENVIRONMENT): Set
163         MALLOC_CHECK_ and MALLOC_PERTURB_
164
165         * tests/run-collate-tests.sh: Run the collation tests explicitly 
166         in en_US locale. (#320463)
167
168         * glib/gmem.h: Really deprecate GMemChunk.
169
170         * glib/gdate.c: 
171         * glib/gutils.c: 
172         * glib/gtree.c: 
173         * glib/gstring.c: 
174         * glib/giochannel.c: 
175         * glib/gstrfuncs.c: Add versioned deprecation docs. 
176
177 2005-12-05  Martyn Russell  <martyn@imendio.com>
178
179         * docs/reference/glib/glib-sections.txt:
180         * glib/gasyncqueue.[ch]:
181         - Added support for sorting async queues by with _push_sorted(),
182         _push_sorted_unlocked(), _sort() and _sort_unlocked() (#323047).
183         
184         * tests/Makefile.am:
185         * tests/asyncqueue-test.c:
186         - Added test case for gasyncqueue.c
187
188 Mon Dec  5 15:53:20 2005  Tim Janik  <timj@imendio.com>
189
190         * glib/gslice.c: implement chain walking for arbitrary ->next pointer
191         offsets in g_slice_free_chain_with_offset() based on a patch by behdad
192         in bug 323178. moved time consuming logic from g_slice_free() out of
193         the inner loop, so g_slice_free_chain_with_offset() provides a real
194         performance benefit over g_slice_free1() now.
195         
196         * glib/gslice.h: renamed g_slice_free_chain() to
197         g_slice_free_chain_with_offset(). implemented g_slice_free_chain() as
198         a type-safe macro as suggested in bug 323178.
199         simplified the macro implementation of g_slice_free() and implemented
200         it in a type safe manner for all compliers as suggested by Morten
201         Welinder <mortenw@gnome.org>.
202
203         * glib/gmain.c:
204         * glib/glist.c:
205         * glib/gslist.c:
206         * glib/glib.symbols: s/g_slice_free_chain/g_slice_free_chain_with_offset/
207
208 2005-12-05  Matthias Clasen  <mclasen@redhat.com>
209
210         * glib/gasyncqueue.c: Add some docs.
211
212         * tests/libmoduletestplugin_a.c: Fix compiler warnings.
213
214         * glib/gatomic.c: In the ia64 implementation, use
215         __sync builtin without _si or _di suffix.  (#321229,
216         Stanislav Brabec, patch by Andreas Schwab)
217
218 2005-12-04  Behdad Esfahbod  <behdad@gnome.org>
219
220         * glib/gslice.h: Remove comma at the end of enum.
221
222 2005-12-04  Matthias Clasen  <mclasen@redhat.com>
223
224         Handle multiple user names with the same UID better.
225         (#319535, Laszlo Peter)
226         
227         * glib/gutils.c (g_get_any_init_do): When determining user
228         data, first look up $LOGNAME. If the UID doesn't match
229         getuid(), fall back to the current behaviour of looking
230         up the user data based on getuid().
231
232 2005-12-04  Matthias Clasen  <mclasen@redhat.com>
233
234         * glib/gmacros.h (G_GNUC_WARN_UNUSED_RESULT): Add a macro
235         to make gcc warn if a function result is ignored.  (#145466,
236         Arjan van de Ven, Alex Larsson)
237
238         * glib/gmem.h: Add the new attribute to g_realloc and 
239         g_try_realloc.
240
241 2005-12-03  Matthias Clasen  <mclasen@redhat.com>
242
243         * glib/glib.symbols: 
244         * glib/gcache.h: Deprecate g_cache_value_foreach. (#322956,
245         Nicolas Caniart)
246
247         * glib/gmappedfile.c: Make mapping of empty files
248         work.  (#321530)
249         
250         * glib/gfileutils.c: Don't fork a new process just to 
251         fix the permissions of the created temp file.  (#321318,
252         Alexis S. L. Carvalho)
253
254 2005-12-02  Matthias Clasen  <mclasen@redhat.com>
255
256         * README.in: Add a note about Solaris threads.
257
258         * glib/gspawn.c:
259         * configure.in: Remove support for Solaris threads. 
260         (#136971, Sebastian Wilhelmi, patch by Andrew Paprocki)
261
262 2005-12-02  Matthias Clasen  <mclasen@redhat.com>
263
264         * configure.in: Define G_GUINT64_CONSTANT in analogy to
265         G_GINT64_CONSTANT.  (#322568, Andrew Paprocki)
266
267 2005-12-02  Matthias Clasen  <mclasen@redhat.com>
268
269         * glib/gslice.c: Win32 portability fixes and C99ism removal,
270         pointed out by Kazuki Iwamoto.  (#323052)
271         
272 2005-12-02  Matthias Clasen  <mclasen@redhat.com>
273
274         * glib/gatomic.c (g_atomic_int_add): Add a missing volatile for
275         the IA64 implementation.
276
277 Fri Dec  2 16:18:09 2005  Tim Janik  <timj@imendio.com>
278
279         * glib/gslice.c: some naming and type size fixups.
280
281 Fri Dec  2 13:08:58 2005  Tim Janik  <timj@gtk.org>
282
283         * glib/gslice.h (g_slice_free): reworked GCC-specific type-safe macro
284         variant into something less verbose, but digestible for gcc-3.4.
285
286 Fri Dec  2 10:55:07 2005  Tim Janik  <timj@imendio.com>
287
288         * tests/slice-test.c: extended to perform the benchmarking on the old
289         memchunk code if 'O' is selected.
290
291         * tests/memchunks.c: new file which contains the old GLib mem chunks
292         implementation with prefix old_mem_chunk_.
293
294         * tests/Makefile.am: added memchunks.c
295
296 Fri Dec  2 00:16:59 2005  Tim Janik  <timj@imendio.com>
297
298         * glib/gslice.c: improved gettimeofday() timer resolution by maintaining
299         acceptable load distribution of the syscall.
300         (allocator_get_magazine_threshold): reduce minimum/single-thread magazine
301         sizes to approximately page_size/2.5 to avoid excessive startup allocations.
302
303 2005-12-01  Matthias Clasen  <mclasen@redhat.com>
304
305         * tests/gobject/ifacecheck.c (test_iface_base_init): Don't
306         double-free base interface members.
307
308         * tests/Makefile.am: Remove duplicate variable.
309
310 Thu Dec  1 17:32:46 2005  Tim Janik  <timj@imendio.com>
311
312         * glib/gslice.[hc]: new slice allocator implementation.
313
314         * tests/slice-test.c: added random slice allocation test.
315
316         * glib/gthread.[hc]: removed newly added private thread mem API.
317
318         * glib/gthreadinit.h:
319         * glib/gmessages.c:
320         * glib/gthread.c:
321         * glib/gmem.c: divided glib threading initialisation into three phases,
322         initialisation where private keys and messaging are not available (only
323         needed by gmem.c), initialisation without messaging but private keys
324         available (gslice.c, gmessage.c), and full fledged initialisers that
325         server the rest of glib. initialisation functions got renamed to reflect
326         the limitations of their corresponding phases.
327
328         * glib/gmem.c: removed memchunk code, defer allocations to 
329         g_slice_* instead.
330
331         * glib/gmem.[hc]: removed g_slice_* skeletons.
332
333         * glib/glib.symbols: added g_slice_* symbols.
334
335         * configure.in: check for availability of posix_memalign(3), memalign(3)
336         and valloc(3). 
337
338         * glib/Makefile.am: added gslice.[hc].
339
340 2005-12-01  Tor Lillqvist  <tml@novell.com>
341
342         * glib/gstdio.c (g_stat): In the Win32 implementation, strip
343         trailing slash(es) for non-root folders. stat() fails if non-root
344         folders are specified with trailing slashes. It's too much hassle
345         to demand that callers strip such slashes themselves, especially
346         as it is easy to get it wrong and strip the slash of a root
347         folder.
348         (g_rename): On NT-based Windows, use MoveFileEx() with
349         MOVEFILE_REPLACE_EXISTING to better match Unix behaviour.
350
351 2005-11-28  Matthias Clasen  <mclasen@redhat.com>
352
353         Fix G_STMT_START / G_STMT_END on Solaris.  (#321972,
354         Andrew Paprocki)
355         
356         * configure.in: Check whether do { } while (0) works.
357
358         * glib/gmacros.h: Use do { } while (0) for G_STMT_START / 
359         G_STMT_END if it works.
360         
361 2005-11-28  Matthias Clasen  <mclasen@redhat.com>
362
363         * glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal): 
364         * glib/gnode.c (g_node_depth_traverse_level): 
365         * glib/gmem.c (g_allocator_new): 
366         * glib/ghash.c (g_hash_table_unref, g_hash_table_destroy) 
367         (g_hash_table_foreach_remove_or_steal): Silence compiler
368         warnings.
369
370 2005-11-27  Matthias Clasen  <mclasen@redhat.com>
371
372         * glib/gunicollate.c (g_utf8_collate_key_for_filename): 
373         Don't read beyond len.  (#322520, Christian Persch)
374
375 Wed Nov 23 17:34:01 2005  Tim Janik  <timj@imendio.com>
376
377         * glib/gdataset.c: access datalist flags via atomic pointer access
378         functions, instead of acquiring the dataset lock. this is faster and
379         also matches the atomic pointer readouts in gdatalistprivate.h and
380         direct pointer modifications required by gobject.c.
381
382 Wed Nov 23 13:35:31 2005  Tim Janik  <timj@gtk.org>
383
384         * glib/gdataset.c: streamlined initialization code somewhat,
385         removed GData node cache.
386
387 2005-11-22  Matthias Clasen  <mclasen@redhat.com>
388
389         * glib/ghash.c (g_hash_table_ref): 
390         (g_hash_table_unref): Mark these as new API.
391
392         Avoid double locking in g_intern_string (#322133,
393         Benedikt Meurer)
394
395         * glib/gdataset.c (g_quark_from_string_internal): New 
396         internal function which factors out common parts of 
397         g_quark_from[_static]_string.
398         (g_quark_from_string, g_quark_from_static_string):
399         Use g_quark_from_string_internal.
400         (g_intern_string, g_intern_static_string): Use
401         g_quark_from_string_internal, and only take the
402         lock once.
403         (g_quark_new): Don't store the strings shifted by -1
404         in the g_quarks array.
405         (g_quark_to_string): Adapt to the previous change.
406
407 Tue Nov 22 14:04:26 2005  Tim Janik  <timj@imendio.com>
408
409         * glib/ghash.h: 
410         * glib/ghash.c: 
411         g_hash_table_new_full(): create hash tables with a ref count of 1.
412         g_hash_table_ref(): atomically ref_count+=1
413         g_hash_table_unref(): atomically ref_count-=1, destroys hash table
414         when refcount reaches 0.
415         g_hash_table_destroy(): just destroy keys and values, unref by 1.
416         g_hash_table_insert(): 
417         g_hash_table_replace(): assert ref_count>0.
418
419         * glib/gatomic.h: 
420         * glib/gatomic.c: added 'volatile' qualifier to all atomic pointer and
421         integer pointers.
422
423 2005-11-20  Behdad Esfahbod  <behdad@gnome.org>
424
425         * glib/guniprop.c (g_unichar_get_mirror_char): Remove unused
426         variables. (#321984, Andrew Paprocki)
427
428 2005-11-18  Matthias Clasen  <mclasen@redhat.com>
429
430         * configure.in: Bump version
431
432 2005-11-17  Matthias Clasen  <mclasen@redhat.com>
433
434         * === Released 2.9.0 ===
435
436         * glib/glib.symbols: Updates
437
438         * glib/gutf8.c (g_utf8_offset_to_pointer): Add some performance
439         hints to the docs. (Paolo Borelli)
440         
441         * NEWS: Updates
442
443         * glib/gthread.c (g_thread_foreach): Mark as new api.
444
445         * README.in: Updates.
446
447         * glib/glib.symbols: 
448         * glib/gdate.h: 
449         * glib/gdate.c (g_date_set_time_t): 
450         (g_date_set_time_val): Add functions to set a date from
451         a time_t and from a GTimeVal.
452         (g_date_set_time): Deprecate.  (#314067, Roger Leigh)
453         
454         * tests/Makefile.am:
455         * tests/utf8-pointer.c: Unit tests for g_utf8_pointer_to_offset
456         and g_utf8_offset_to_pointer.
457
458         * glib/gutf8.c (g_utf8_pointer_to_offset) 
459         (g_utf8_offset_to_pointer): Handle negative offsets, and use
460         "stutter stepping" for going backwards. (#320638, Larry
461         Ewing)
462
463         * glib/gbacktrace.c:
464         * glib/gdate.c:
465         * glib/gthread.c: const correctness fixes, found
466         by Arjan van de Ven and gcc.
467         
468 2005-11-16  Behdad Esfahbod  <behdad@gnome.org>
469
470         * docs/reference/glib/tmpl/unicode.sgml: Correct typo on mentioning
471         @G_UNICODE_BREAK_UNKNOWN that should be #G_UNICODE_BREAK_UNKNOWN.
472
473 2005-11-09  Behdad Esfahbod  <behdad@gnome.org>
474
475         * glib/guniprop.c: Use bit hacks instead when checking a general
476         category value against multiple values.
477
478         * glib/gutf8.c: Change ISO10646 to Unicode in docs.
479
480 2005-11-10  Simos Xenitellis  <simos@gnome.org>
481
482         * configure.in: Added tt (Tatar) to ALL_LINGUAS.
483
484 2005-11-05  Tor Lillqvist  <tml@novell.com>
485
486         * glib/giowin32.c (g_io_win32_set_flags): Don't call g_warning().
487         (#320688) Instead set error and return failure.
488
489 2005-11-07  Matthias Clasen  <mclasen@redhat.com>
490
491         * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
492         while holding the context lock.  (#320886, Andy Wingo)
493
494 2005-11-07  Billy Biggs <vektor@dumbterm.net>
495
496         * tests/refcount/Makefile.am: Add a missing reference to libglib
497         in the LDADD for this test.
498
499 2005-11-07  Matthias Clasen  <mclasen@redhat.com>
500
501         * glib/gmem.c (g_allocator_new): We need to set n_preallocs to a
502         nonzero value, otherwise GTK+ 2.8 breaks when compiled against
503         GLib 2.9.  (#320755, Luca Ferretti)
504
505 2005-11-04  Matthias Clasen  <mclasen@redhat.com>
506
507         * glib/Makefile.am: Apply a patch from Behdad Esfahbod to 
508         use a faster lookup table for g_unichar_get_mirror_char().
509         * glib/gmirroringtable.h: The new table.
510         * glib/gunichartables.h: Remove bidi_mirroring_table.
511         * glib/gen-unicode-tables.pl: Don't generate the mirroring
512         table.
513         * glib/glib-mirroring-tab/*: Sources for the program
514         which generated gmirroringtable.h.
515
516         * glib/glist.c: Avoid some code duplication.
517
518         * glib/gscanner.h: Include gdataset.h.  (#320322)
519
520         * glib/gdebug.h: add new GDebugFlag for fatal_criticals
521         * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
522         to help find critical warnings in applications.  (#320017,
523         Vincent Untz)
524
525 2005-11-02  Tor Lillqvist  <tml@novell.com>
526
527         * glib/glib.symbols: Remove large amount of trailing whitespace
528         from one line. Remove #ifdef G_UNDEFINED from around
529         g_hash_table_new and g_hash_table_new_full symbols, what was the
530         purpose of that? Add the g_slice functions.
531
532 Tue Nov  1 16:24:20 2005  Tim Janik  <timj@imendio.com>
533
534         * glib/gmem.[hc]: prepared deprecation of GMemChunk and GAllocator.
535         added g_slice_*() API to allocate and cache small bits of memory.
536         an actuall allocator implementation for g_slice_*() is still pending.
537
538         * glib/gthread.[hc]: changes from a patch by Matthias Clasen.
539         changed GRealThread list to use in-structure *next; fields instead
540         of GSList, in order for thread iteration to not depenend on g_slice_*()
541         indirectly.
542         _g_thread_mem_private_get():
543         _g_thread_mem_private_set(): added accessors for private memory,
544         needed because the ordinary GPrivate implementation relies on GArray
545         and GSList and therefore indirectly on working g_slice_*() allocations.
546
547         * glib/gthread.[hc]:
548         g_thread_foreach(): new public API function to loop over all existing threads.
549
550         * glib/gdataset.c:
551         * glib/gstring.c:
552         * glib/gcache.c:
553         * glib/garray.c: 
554         * glib/gqueue.c:
555         * glib/gslist.c:
556         * glib/glist.c:
557         * glib/ghash.c:
558         * glib/gtree.c:
559         * glib/ghook.c:
560         * glib/gmain.c:
561         * glib/gnode.c:
562         removed GAllocator and free list usages and accompanying locks.
563         use g_slice_*() API to allocate and cache small bits of memory.
564
565         * glib/ghook.h: removed GMemChunk field from public API.
566
567         * glib/gslist.h:
568         * glib/glist.h: deprecate allocator API, provide _free1() for consistency.
569
570         * glib/gnode.h: deprecate allocator API.
571
572         * glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can
573         be used for poll rec lists.
574
575         * glib/grel.c: removed mem chunk usage, and allocated tuples via g_slice_*().
576         g_relation_destroy(): free all tuples from the all_tuples hash table,
577         this effectively maintains the life time track keeping of tuples.
578         g_relation_delete_tuple(): free tuples which are removed from the
579         all_tuples hash table. this fixes a temporary leak that was present
580         in the memchunk code until the destruction of the relation.
581
582 2005-10-29  Matthias Clasen  <mclasen@redhat.com>
583
584         * tests/convert-test.c: Add some tests for conversions between
585         UTF-8, UCS-4 and UTF-16.
586
587         * glib/gutf8.c (g_utf8_to_ucs4, g_utf8_to_utf16): Fix handling
588         of len == -1, noticed by Morten Welinder.
589
590 2005-10-27  Erdal Ronahi  <erdal.ronahi@gmail.com>
591
592         * configure.in: Added ku (Kurdish) to ALL_LINGUAS
593
594 2005-10-26  Matthias Clasen  <mclasen@redhat.com>
595
596         * glib/gutf8.c (g_ucs4_to_utf8): Don't set items_read twice
597         in the error case, and add some documentation.  (#319806, Morten
598         Welinder)
599
600 2005-10-19  Manish Singh  <yosh@gimp.org>
601
602         * configure.in: Use AC_CHECK_FUNCS for _NSGetEnviron, to get the
603         config.h symbol automatically. Fixes bug #313731.
604
605 2005-10-19  Tor Lillqvist  <tml@novell.com>
606
607         * glib/gwin32.c (g_win32_get_package_installation_directory):
608         Return a g_strdup()ed copy of the value stored in the hash table,
609         so that it can be g_free()d without leaving a dangling pointer in
610         the hash table. (#319232)
611
612 2005-10-06  Matthias Clasen  <mclasen@redhat.com>
613
614         * glib/gunicollate.c (g_utf8_collate_key_for_filename): Handle
615         all-zero sequences correctly.  (#317930, Sebastien Bacher)
616
617 2005-10-05  Matthias Clasen  <mclasen@redhat.com>
618
619         * glib/gmarkup.c (g_markup_escape_text): Doc addition
620
621         * Makefile.am: Add Collation tests.
622
623         * tests/collate/*: Inputs and expected outputs for collation tests.
624
625         * tests/run-collate-tests.sh: Script to run collation tests.
626
627         * tests/unicode-collate.c (main): Rework slightly to make
628         it usable in unit tests. Also test g_utf8_collate_key_for_filename().
629
630 2005-10-01  Behdad Esfahbod  <behdad@gnome.org>
631
632         * docs/reference/glib/tmpl/unicode.sgml:
633         * glib/gen-unicode-tables.pl:
634         * glib/gunibreak.h:
635         * glib/gunichartables.h:
636         * glib/gunicode.h:
637         * tests/casefold.txt:
638         * tests/casemap.txt: Updated to Unicode 4.1.  There are five new
639         GUnicodeBreakType types.  That may break some applications, like
640         Pango <= 1.10.
641
642 2005-09-26  Matthias Clasen  <mclasen@redhat.com>
643
644         * glib/gstrfuncs.c (g_ascii_strtoull): Add details to the 
645         docs.  (#314393, Matthew F. Barnes)
646
647         * glib/glib.symbols:
648         * glib/gprintf.h: Remove g_snprintf() and g_vsnprintf(), since
649         they are already declared in glib.h. This doesn't break documented
650         use of gprintf.h, but should probably be pointed out in the 
651         release notes for 2.10. (#314232, Behdad Esfahbod)
652
653 Tue Sep 20 13:16:04 2005  Tim Janik  <timj@imendio.com>
654
655         * glib/gpattern.c (g_pattern_ph_match): applied significant recursion
656         complexity optimization, based on a patch from Matthias Clasen.
657
658         * tests/patterntest.c: more tests, mostly from matthias.
659
660 2005-09-20  Matthias Clasen  <mclasen@redhat.com>
661
662         * glib/gqueue.c (g_queue_insert_sorted): Correct the docs.
663         (#316703, Mark Drago)
664
665 Mon Sep 19 17:23:23 2005  Tim Janik  <timj@imendio.com>
666
667         * glib/gpattern.c: applied a patch from matthias which checks on the
668         upper bound of GPatternSpec length to optimize matches.
669         cosmetic fixups.
670
671         * tests/patterntest.c: added more match cases.
672
673 2005-09-16  Tor Lillqvist  <tml@novell.com>
674
675         * glib/gstrfuncs.c (g_ascii_strcasecmp, g_ascii_strncasecmp): Add
676         warning to doc comment that these functions should not be used on
677         encodings like CP932.
678
679 2005-09-14  Matthias Clasen  <mclasen@redhat.com>
680
681         * tests/keyfile-test.c: Add a test for grup names of length 1.
682
683         * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
684         of length 1.  (#316309)
685         
686 2005-09-12  Matthias Clasen  <mclasen@redhat.com>
687
688         * glib/gmarkup.c (g_markup_escape_text): Clarify docs.
689
690 2005-09-11  Sebastian Wilhelmi  <seppi@seppi.de>
691
692         * tests/refcount/Makefile.am (INCLUDES): Link the the refcount
693         tests to the system thread library $(G_THREAD_LIBS). Fixes #313744
694         and #314217.
695
696 2005-09-11  Kjartan Maraas  <kmaraas@gnome.org>
697
698         * glib/gmain.c: (g_child_watch_prepare), (g_child_watch_check),
699         (child_watch_helper_thread): Remove some dead code. Closes
700         bug #315278.
701
702 2005-09-07  Tor Lillqvist  <tml@novell.com>
703
704         * glib/Makefile.am: Create also a console version of the
705         gspawn-win32-helper program, gspawn-win32-helper-console.exe.
706         It's otherwise identical to gspawn-win32-helper.exe, except marked
707         as a console application (linked without the -mwindows option).
708         
709         * glib/gspawn-win32.c (do_spawn_directly, do_spawn_with_pipes):
710         Drop the dont_wait parameter. Its truth value correlated 100% with
711         the NULLness of the exit_status parameter anyway, so it's enough
712         to check whether exit_status is NULL. Invert the sense of the
713         dont_return_handle parameter and rename it to do_return_handle, to
714         make the code easier to read by avoiding double negations.
715
716         (g_spawn_sync_utf8, g_spawn_async_with_pipes_utf8): Modify calls
717         to do_spawn_with_pipes() accordingly.
718
719         (do_spawn_with_pipes): If we have a console, use the console
720         version of the helper program, otherwise use the GUI one. This
721         avoids extra console windows opening up in some situations. (In
722         case a console application uses the GUI gspawn-win32-helper.exe to
723         spawn another console application we would get a separate console
724         for the spawned console application).
725
726         * glib-zip.in: Distribute also gspawn-win32-helper-console.exe.
727
728 2005-09-05  Matthias Clasen  <mclasen@redhat.com>
729
730         * glib/gmappedfile.c (g_mapped_file_new): Report an error
731         if the file is too large.  (#315275, Kjartan Maraas)
732
733         * glib/gkeyfile.c (g_key_file_load_from_fd): The return value
734         of read() is signed.  (#315273, Kjartan Maraas)
735         
736 2005-08-31  Tor Lillqvist  <tml@novell.com>
737
738         * glib/gutils.h: Wrapping atexit() is a bad idea on Windows, where
739         the EXE and each DLL have their own atexit function chains.
740
741         #define g_atexit as atexit instead. This means it has a
742         better chance of doing what the caller wants. For instance,
743         gtkhtml calls g_atexit() registering a function in gtkhtml
744         itself. This caused a crash when g_atexit() was implemented as a
745         function in the GLib DLL. The gtkhtml DLL was already unloaded by
746         the time the GLib DLL got unloaded.
747
748         * glib/gutils.c: #undef the #define mentioned above, to also get a
749         real g_atexit() into the DLL for backward compatibility. Document
750         the Windows behaviour of g_atexit(), and document the varying ways
751         atexit() can behave in the context of dynamically loaded modules
752         on Unix.
753
754 2005-08-31  Matthias Clasen  <mclasen@redhat.com>
755
756         * glib/glib.symbols: 
757         * glib/gquark.h: 
758         * glib/gdataset.c: Add string interning functions.
759
760 2005-08-28  Matthias Clasen  <mclasen@redhat.com>
761
762         * glib/giochannel.c: Unify some near-duplicate strings. (#314654,
763         Clytie Siddall)
764         
765 2005-08-26  Matthias Clasen  <mclasen@redhat.com>
766
767         * configure.in: Bump version to 2.9.0
768
769 2005-08-25  Tor Lillqvist  <tml@novell.com>
770
771         Make also the g_spawn*() functions take parameters in the GLib
772         file name encoding, i.e. UTF-8, on Windows. Has no impact on Unix
773         API or ABI. Like the other GLib API that was earlier changed to
774         use UTF-8 on Windows, the names of the functions that take UTF-8
775         have _utf8 suffixes added by using preprocessor macros in the
776         header file. The old names are kept for functions with the old
777         behaviour, taking parameters in the system codepage, for DLL ABI
778         stability.
779         
780         * glib/gspawn.h: On Win32 add the suffix _utf8 to the names of the
781         g_spawn*() functions.
782         
783         * glib/gspawn-win32.c: Use wide-char API on NT-based
784         Windows. Convert parameters from UTF-8 to wide chars (NT) or
785         system codepage (Win9x) and call the C library _wspawn*() or
786         spawn*() functions respectvely. Add DLL ABI stability versions
787         that take parameters in the system codepage.
788
789         * glib/gspawn-win32-helper.c: On NT-based Windows use the
790         wide-char versions of argv and envp, and use wide-char API to
791         change directory and spawn the program to run. Remove the verbose
792         debugging output, it was too complex to modify for the wide-char
793         features. (Just add temporary debugging printouts if needed, no
794         need to have them permanently in the source.)
795
796         * glib/gspawn.c: Corresponding documentation updates.
797
798         * glib/glib.symbols: Corresponding changes: Mark the ABI stability
799         symbols as PRIVATE, add the new _utf8-suffixed ones.
800
801 2005-08-24  Stepan Kasal  <kasal@ucw.cz>
802
803         * glib/gtypes.h (G_MININT64): Cast the constant to gint64; it is
804         guint64 otherwise and that can produce warnings about comparison
805         between signed and unsigned.
806
807 2005-08-23  Matthias Clasen  <mclasen@redhat.com>
808
809         * glib/gutils.c: Fix the crt_externs.h include.
810
811 2005-08-23  Stepan Kasal  <kasal@ucw.cz>
812
813         * NEWS: Fix spelling of my first name.
814
815 2005-08-23  Matthias Clasen  <mclasen@redhat.com>
816
817         * Bump version
818
819         * === Released 2.8.1 ===
820
821         * NEWS: Updates
822
823 2005-08-20  Hans Breuer  <hans@breuer.org>
824
825         * glib/makefile.msc.in : link with ws2_32.lib
826
827 2005-08-18  Tor Lillqvist  <tml@novell.com>
828
829         * configure.in: Check for <sys/wait.h>
830
831         * glib/gbacktrace.c: Include <sys/wait.h> on if HAVE_SYS_WAIT_H.
832
833 2005-08-18  Ross Burton  <ross@burtonini.com>
834
835         * glib/gstring.c:
836         Optimise single-character insertions.
837         
838         * glib/gutf8.c:
839         Note copied code.
840         
841         * tests/string-test.c:
842         Add tests for new optimisation, and fix a leak.
843
844 2005-08-17  Matthias Clasen  <mclasen@redhat.com>
845
846         * configure.in: Check for crt_externs.h and _NSGetEnviron.
847
848         * glib/gutils.c: On Darwin, include crt-externs.h and
849         define environ using _NSGetEnviron().  (#313731)
850
851 2005-08-16  Stepan Kasal  <kasal@ucw.cz>
852
853         * glib/gutils.c (g_get_any_init): Move the body of the big if...
854         (g_get_any_init_do): ... to this new function.
855         (g_get_any_init): Declare as inline.
856         (g_get_any_init_locked): New inline function, does the locking.
857         Make use of these two throughout the code.
858
859 2005-08-15  Matthias Clasen  <mclasen@redhat.com>
860
861         * glib/gbacktrace.c (g_on_error_stack_trace): Wait for
862         the child process and then simply return. This makes 
863         The "S" option work as documented in g_on_error_query().
864         (#313125, Matthew F. Barnes)
865
866         * glib/gunicode.h: Update the link to Unicode category
867         values.  (#313369, Behnam Esfahbod)
868
869         * glib/gqueue.c (g_queue_find_custom): Clarify docs
870         a little.  (#311727, Tristan van Berkom)
871
872         * glib/abicheck.sh, gobject/abicheck.sh: Make the 
873         check work on ia64 too, where some symbols ended up 
874         in yet another section.
875