Use G_LIKELY. (#69022)
[platform/upstream/glib.git] / ChangeLog
1 2002-11-20  Matthias Clasen  <maclas@gmx.de>
2
3         * glib/gmessages.h (g_return_if_fail): 
4         (g_return_val_if_fail): Use G_LIKELY.  (#69022)
5
6         * glib/gmacros.h (G_LIKELY): 
7         (G_UNLIKELY): New macros for hinting the compiler about the
8         expected result of expressions. For gcc 3.x, define these
9         using __builtin_expect.  (#69022)
10
11 Tue Nov 19 14:38:18 2002  Owen Taylor  <otaylor@redhat.com>
12
13         * glib/gstrfuncs.c (g_ascii_strtoull): Fix 
14         strtull/strtoull type in docs (#99012, Morten
15         Welinder.) Add copyright information for code
16         taken from GNU libc.
17
18 2002-11-18  Tor Lillqvist  <tml@iki.fi>
19
20         * glib/gspawn-win32.c (do_spawn_with_pipes): Do handle
21         G_SPAWN_DO_NOT_REAP_CHILD after all, similarily as on Unix. If the
22         flag is not set, don't call DuplicateHandle() on the handle
23         returned by the helper process, and set the "child pid" returned
24         to the called to zero. Close the handle to the helper process in
25         all cases.
26
27         * glib/gspawn.c (g_spawn_async_with_pipes): Document Windows
28         behaviour of G_SPAWN_DO_NOT_REAP_CHILD.
29
30 2002-11-18  Tor Lillqvist  <tml@iki.fi>
31
32         [Win32] Fix the asynchronous g_spawn* to return the process handle
33         of the started program properly. (Note: not the process id. The
34         spawn*() functions in the C runtime return the created process's
35         handle. There doesn't seem to be any way to get the process id of
36         a child process if you have the handle. But then, the process
37         handle usually is more useful anyway.)
38
39         * glib/gspawn-win32-helper.c (WinMain): If the spawning of the
40         child process succeeded, and if asynchronous spawn (P_NOWAIT),
41         write the result handle up to the parent process, waiting to read
42         it in do_spawn_with_pipes().
43
44         * glib/gspawn-win32.c (do_spawn): Use return value from spawning
45         the helper. If it is -1 the helper wasn't found or couldn't be run
46         for some reason. Otherwise it is the helper's process handle.
47
48         (g_spawn_async_with_pipes): Pass the child_pid parameter on to
49         do_spawn_with_pipes().
50
51         (do_spawn_with_pipes): Take also a child_pid parameter. If
52         do_spawn() returned -1, fail immediately. Otherwise make the
53         handle passed to us by the helper process into a handle valid in
54         this process by calling DuplicateHandle().
55
56 2002-11-17  Tor Lillqvist  <tml@iki.fi>
57
58         * glib/gspawn-win32.c (g_spawn_async_with_pipes): Ignore the
59         G_SPAWN_DO_NOT_REAP_CHILD flag, can't be meaninfully implemented
60         on Windows, at least not now. Always pass dont_wait as TRUE to
61         do_spawn_with_pipes(). The semantics of the dont_wait parameter is
62         very different from the semantics of the intermediate_child
63         parameter to fork_exec_with_pipes() in the Unix version. This
64         fixes a serious bug, g_spawn_async() in fact behaved
65         synchronously.
66
67         (do_spawn_with_pipes, do_spawn): Rename from
68         fork_exec_with_pipes() and do_exec(), those names were from the
69         Unix bersion, and misleading.
70
71         (close_and_invalidate): Don't try to close invalid fds.
72
73         * glib/gspawn.c (g_spawn_async_with_pipes): Add warning about
74         Windows behaviour. There is no fork(), so the child_setup()
75         function is in fact called in the parent.
76         
77         * glib/gspawn-win32-helper.c (WinMain): Insert spaces in argv
78         debugging output.
79
80         * tests/spawn-test-win32-gui.c: New file. Test program to be
81         linked as a GUI application. Behaves differently depending on how
82         invoked (by spawn-test).
83
84         * tests/spawn-test.c (run_tests): On Win32, run the
85         spawn-test-win32-gui program, too, in several ways, synchronously
86         and asynchronously.
87
88         * tests/Makefile.am: Corresponding change.
89
90 Fri Nov  8 19:44:20 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
91
92         * docs/reference/glib/tmpl/arrays.sgml:
93         * docs/reference/glib/tmpl/arrays_byte.sgml:
94         * docs/reference/glib/tmpl/arrays_pointer.sgml:
95         * docs/reference/glib/tmpl/date.sgml:
96         * docs/reference/glib/tmpl/linked_lists_double.sgml:
97         * docs/reference/glib/tmpl/linked_lists_single.sgml:
98         * docs/reference/glib/tmpl/main.sgml:
99         * docs/reference/glib/tmpl/queue.sgml:
100         * docs/reference/glib/tmpl/random_numbers.sgml:
101         * docs/reference/glib/tmpl/relations.sgml:
102         * docs/reference/glib/tmpl/scanner.sgml:
103         * docs/reference/gobject/tmpl/gtype.sgml:
104         * docs/reference/gobject/tmpl/value_arrays.sgml glib/garray.h:
105         * glib/gdate.h glib/giochannel.h glib/glist.h glib/gmain.c:
106         * glib/gmain.h glib/gqueue.c glib/gqueue.h glib/grand.c glib/grand.h:
107         * glib/grel.h glib/gslist.h glib/gtimer.h gobject/gvaluearray.h:
108
109         Trivial s/foo/foo_/ fixes to make <glib.h> includable with
110         -Wshadow without warnings (#91680)
111
112 Thu Nov  7 19:32:26 2002  Owen Taylor  <otaylor@redhat.com>
113
114         * glib/gutils.[ch] (g_set/get_application_name): 
115         Patch from Havoc Pennington to add functions for 
116         setting and getting a human readable application
117         name.
118
119         * configure.in: Up to version 2.1.3, since we'll
120         need to depend on last addition for GTK+.
121
122 2002-11-06  Tor Lillqvist  <tml@iki.fi>
123
124         * glib/glib.def: Add g_main_thread_init.
125
126 2002-11-06  Matthias Clasen  <maclas@gmx.de>
127
128         * glib/gstrfuncs.c (g_str_has_suffix): 
129         (g_str_has_prefix): Minor doc markup fix.
130
131 Mon Nov  4 10:45:48 2002  Owen Taylor  <otaylor@redhat.com>
132
133         * configure.in: Add -DG_DISABLE_CAST_CHECKS for 
134         everything but --enable-debug.
135
136         * configure.in: Require pkg-config 0.14. (#97553)
137
138 Mon Nov  4 14:41:48 2002  Owen Taylor  <otaylor@redhat.com>
139  
140         * glib/gbsearcharray.c: Include config.h
141         so DISABLE_MEMPOOLS actually has an effect.
142         (#96437, Morten Welinder)
143  
144         * tests/uri-test.c: Include <config.h>
145
146 2002-11-03  Dmitry G. Mastrukov  <dmitry@taurussoft.org>
147
148         * configure.in: Added Belarusian to ALL_LINGUAS
149
150 2002-11-02  Daniel Elstner  <daniel.elstner@gmx.net>
151
152         * glib/giochannel.c (g_io_channel_write_chars): Fix left_len
153         calculation in the from UTF-8 to UTF-8 case: left_len should
154         be the number of bytes left in the input buffer rather than
155         channel->write_buf. (#96373)
156
157 2002-10-27  Tor Lillqvist  <tml@iki.fi>
158
159         * configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
160         trouble.
161         
162         * glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
163         (http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
164         and others. We waited for events only for GPollFDs whose events
165         field had G_IO_IN set. We need to wait also for events for
166         GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
167         process of being connect()ed are one such case. Also silence a
168         couple of gcc warnings.
169
170 Fri Oct 18 13:41:30 2002  Manish Singh  <yosh@gimp.org>
171
172         * glib/giochannel.c (g_io_channel_read_line_backend): avoid
173         creating negative values out of unsigned values using MAX,
174         check to see if the result would be positive before doing
175         the calculation.
176
177 Tue Oct 15 15:28:47 2002  Manish Singh  <yosh@gimp.org>
178
179         * tests/iochannel-test.c: use gsize instead of int where appropriate
180         (64-bit cleanliness fix). Removed leftover line_term cruft.
181
182 Tue Oct 15 15:07:45 2002  Manish Singh  <yosh@gimp.org>
183
184         * gmodule/Makefile.am gobject/Makefile.am gthread/Makefile.am:
185         add -DG_DISABLED_DEPRECATED
186
187         * tests/gio-test.c tests/mainloop-test.c tests/string-test.c
188         tests/testglib.c test/tree-test.c tests/unicode-collate.c
189         tests/unicode-normalize.c: Deprecation cleanup
190
191 Mon Oct 14 15:51:05 2002  Owen Taylor  <otaylor@redhat.com>
192
193         * glib/gdate.c (g_date_fill_parse_tokens): Fix a memory
194         leak. (#94550, Sebastian Rittau)
195
196 Mon Oct 14 15:36:11 2002  Owen Taylor  <otaylor@redhat.com>
197
198         * glib/gcompletion.[ch] (g_completion_complete): Make
199         prefix argument const. (#91662, Gustavo Carneiro) 
200
201 Mon Oct 14 15:32:14 2002  Owen Taylor  <otaylor@redhat.com>
202  
203         * tests/mainloop-test.c (adder_response): Fix a minor memory
204         leak.
205  
206 Sat Oct 12 21:30:41 2002  Tim Janik  <timj@gtk.org>
207
208         * merged up from glib-2-0:
209
210         * glib/gstrfuncs.c (g_ascii_strtod): fix comment.
211         (g_ascii_strtoull): new function, acting like strtoull(3) in the C
212         locale.
213
214         * glib/gscanner.[hc]: fix 32bit issues with integer parsing and
215         support storing 64bit values in GTokenValue by
216         using g_ascii_strtoull().
217
218 Sat Oct 12 12:34:22 2002  Soeren Sandmann  <sandmann@daimi.au.dk>
219
220         * glib/gtree.c (g_tree_search), glib/gspawn.c
221         (g_spawn_async_with_pipes): 
222
223         Documentation fixes: #71778, Owen Taylor; #85095, Bill Janssen,
224         Owen Taylor. 
225
226 Thu Oct 10 23:27:02 2002  Tim Janik  <timj@gtk.org>
227
228         * glib/gscanner.c (g_scanner_msg_handler): if input_name is NULL,
229         print out "<memory>" instead of completely skipping input specification
230         and thusly loosing error line information.
231
232 Sun Sep 29 12:15:44 2002  Manish Singh  <yosh@gimp.org>
233
234         * tests/mainloop-test.c: use gsize instead of int where appropriate
235         (64-bit cleanliness fix)
236
237 2002-09-29  Tor Lillqvist  <tml@iki.fi>
238
239         * configure.in: Instead of forcing -fnative-struct into CFLAGS
240         when using gcc for Win32, check for gcc version 3.x which uses
241         -mms-bitfields instead. Also check if either of these switches is
242         actually available at all, and warn if not. Thanks to Soren
243         Andersen for the inspiration.
244
245         * HACKING: Say we require autoconf 2.52 as that is what
246         configure.in does.
247
248 2002-09-23  Arvind Samptur <arvind.samptur@wipro.com>
249         * glib/gspawn.c (fork_exec_with_pipes) : when the child fails
250         we need to reap it to avoid a zombie. This would
251         happen in case of g_spawn_sync. Fixes #92658
252
253 2002-09-20  Matthias Clasen  <maclas@gmx.de>
254
255         * glib/gscanner.c (g_scanner_msg_handler): Don't print
256         scanner->input_name when it is NULL.  (#93752)
257
258 2002-09-06  Havoc Pennington  <hp@redhat.com>
259
260         * autogen.sh: automake 1.4
261
262 2002-09-01  Soeren Sandmann  <sandmann@daimi.au.dk>
263
264         * docs/reference/glib/tmpl/datalist.sgml, glib/gmain.c:
265
266         Documentation fixes: (#75255, Martin Schulze; #76104, Daryll Strauss)
267
268 2002-08-26  Tor Lillqvist  <tml@iki.fi>
269
270         * configure.in (G_LIBS_EXTRA): Don't link with -lwsock32 on
271         Cygwin (#91696, Masahiro Sakai).
272
273 Tue Aug 20 16:01:03 2002  HideToshi Tajima  <hidetoshi.tajima@sun.com>
274
275         * glib/gconvert.c (strdup_len): validate 'len' argument properly
276         for the case that input string is not null-terminated. (#91222)
277
278 2002-08-10  Gustavo Noronha Silva  <kov@debian.org>
279
280         * configure.in: added pt_BR to ALL_LINGUAS
281
282 2002-08-07  Matthias Clasen  <maclas@gmx.de>
283
284         * glib/gmarkup.c (g_markup_parse_context_get_element): 
285         Use g_return_val_if_fail, no g_return_if_fail.
286
287 2002-08-06  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
288
289         * glib/gthread.c: Set the normal PID surrogate priority according
290         to getpid() to avoid errors for niced processes. (#86116)
291
292         * gthread/gthread-impl.c, gthread/gthread-posix.c,
293         gthread/gthread-solaris.c: Do the same for the posix/dce
294         implementation. Solaris still needs to set priority of the main
295         thread, because all unbound threads will schedule according to
296         that value and it defaults to 0 (the minimal value). 
297
298         * glib/gmain.c: Factor out g_main_context_init_pipe from
299         g_main_context_new to initialize the wakeup pipe of a
300         context. Call that function from g_main_context_new if threads are
301         initialized and for all contexts when threads are initialized
302         in g_main_thread_init. (#86872) 
303
304         * gthread/gthread-impl.c: Call g_main_thread_init. (#86872) 
305
306 Thu Jul 25 14:23:15 2002  Owen Taylor  <otaylor@redhat.com>
307
308         * glib/gfileutils.c: Clarify the behavior of g_build_path()
309         for empty elements and for leading and trailing copies
310         of the separator in the docs.
311  
312         * glib/gfileutils.c: Fix problems with leading elements
313         consisting only of "/" characters. (#85928, Guillaume Chazarain)
314  
315         * tests/strfunc-test.c (main): Add more test cases
316         for g_build_filename().
317  
318 2002-07-26  Matthias Clasen  <maclas@gmx.de>
319
320         * glib/gunicode.h: 
321         * glib/gutf8.c (g_utf8_strreverse): New function to revert
322         a utf8 string.
323         * glib/gpattern.c (g_utf8_reverse): Gone, replaced by 
324         g_utf8_strreverse.  (#87725)
325
326 Thu Jul 25 20:57:20 2002  Owen Taylor  <otaylor@redhat.com>
327
328         * glib/giochannel.c (g_io_channel_read_line): Fix 
329         docs for @str_return to conform to the main docs
330         and the implementation as to whether the terminator
331         is included. (#87964, Jacob Berkman)
332
333 Thu Jul 25 19:52:41 2002  Owen Taylor  <otaylor@redhat.com>
334
335         * glib/guniprop.c (real_tolower): Handle the 
336         end of the string properly when max_len is set.
337         (#88545, Morten Welinder.) Rename the next_t
338         variable to next_type to make cc-mode happy.
339
340         * glib/gconvert.c (g_iconv_open): Fix missing
341         label from previous commit.
342
343 Thu Jul 25 19:41:03 2002  Owen Taylor  <otaylor@redhat.com>
344
345         * glib/giochannel.c (g_io_channel_get_flags): Fix 
346         incorrect return value in g_return_val_if_fail 
347         (#85545, David L. Cooper II)
348
349 Thu Jul 25 19:12:43 2002  Owen Taylor  <otaylor@redhat.com>
350
351         * glib/giochannel.c (g_io_channel_set_encoding): Clarify
352         that only one of the conditions listed in the docs
353         need to be true, not all of them. (#87176,
354         Sebastian Rittau)
355
356         * glib/giochannel.c (g_io_channel_read_line): Fix 
357         description of the return value. (#87754, Manuel Clos)
358
359 Thu Jul 25 19:02:53 2002  Owen Taylor  <otaylor@redhat.com>
360
361         * glib/gmain.c (g_timeout_add): Remove reference
362         in the docs to @notify parameter. (#87768,
363         Manuel Clos)
364
365 Thu Jul 25 17:57:07 2002  Owen Taylor  <otaylor@redhat.com>
366
367         * glib/gconvert.c (g_iconv_open): Document the
368         (GIConv)-1 return value on failure. (#87559, 
369         Jarek Dukat)
370
371         * glib/gconvert.c (g_iconv_open): Fix potential
372         problems with the assumption that (GIConv)(iconv_t)-1
373         is the same as (GIConv)-1.
374         
375 2002-07-15  Matthias Clasen  <maclas@gmx.de>
376
377         * glib/gmarkup.h: 
378         * glib/gmarkup.c (g_markup_parse_context_get_element): New
379         function to get the currently open element.  (#70448)
380
381 2002-07-04  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
382
383         * tests/*.c: Added #undef G_DISABLE_ASSERT and #undef G_LOG_DOMAIN
384         throughout the files, which didn't already have them. (#87312)
385
386 2002-07-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
387
388         * configure.in: Made the thread flags determination tests first
389         check for the canonical form -pthread[s], then for other
390         possibilities. Also recognize some more platforms. Modeled after
391         patch from Miroslaw Dobrzanski-Neumann <mne@mosaic-ag.com>
392         (#77981).
393         
394         * configure.in: Fixed bugs in posix thread priority
395         resolution. Also added AIX priorities. Fix from
396         Laurent Vivier <Laurent.Vivier@bull.net>. (#82599)
397         
398         * gthread/gthread-solaris.c: Use thr_min_stack() instead of
399         sysconf (_SC_THREAD_STACK_MIN). if stack_size is 0 on entry to
400         g_thread_create_solaris_impl, also pass 0 to thr_create. Otherwise
401         the stack might be to small for any nontrivial thread. Discovered
402         on intel-solaris by Rajkumar Sivasamy <rajkumar.siva@wipro.com>.
403
404 2002-07-03  Anders Carlsson  <andersca@gnu.org>
405
406         * configure.in: Add a forgotten trailing ` in the 
407         GLIB_BINARY_AGE expression. Also fixup LT_CURRENT.
408
409 2002-07-02  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
410
411         * configure.in: Set binary age to 0 to make it compile.
412
413         * configure.in: Improve checks for dce/posix threads to also do
414         the right thing, if the thread functions are not declared in
415         pthread.h. Idea from Miroslaw Dobrzanski-Neumann
416         <mne@mosaic-ag.com> in #77981.
417
418 2002-07-01  Anders Carlsson  <andersca@gnu.org>
419
420         * configure.in: Up version to 2.1.0.
421
422 2002-07-01  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
423
424         * glib/garray.h: Add parenthesis to protect macro
425         argument. Spotted by Sam Couter <sam@topic.com.au>. (#86826)
426
427 2002-06-28  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
428
429         * glib/gmessages.h (g_assert, g_assert_not_reached,
430         g_return_if_fail, g_return_val_if_fail): In case of
431         G_DISABLE_ASSERT replace "G_STMT_START{ }G_STMT_END" with
432         "G_STMT_START{ (void)0; }G_STMT_END", because the former chokes
433         gcc prior to 3.0. (#86664)
434
435 2002-06-26  Yanko Kaneti <yaneti@declera.com>
436
437         * configure.in: (ALL_LINGUAS) Added Bulgarian (bg).
438
439 Thu Jun 13 16:12:04 2002  Owen Taylor  <otaylor@redhat.com>
440
441         * glib/gmain.c (struct _GTimeoutSource): Make 
442         interval unsigned to match g_timeout_source_new().
443         (#82624, Tim Janik.)
444
445         * glib/gmain.c (g_timeout_prepare): Add some
446         extra gymnastics to avoid signed/unisgned integer
447         overflows.
448
449 Thu Jun 13 15:57:46 2002  Owen Taylor  <otaylor@redhat.com>
450
451         * INSTALL.in: Add a note about the deficiency
452         of Tru64 iconv. (#81699, Manuel Op de Coul)
453
454 Tue Jun 11 17:03:39 2002  Owen Taylor  <otaylor@redhat.com>
455
456         * tests/patterntest.c (test_compilation)
457         * glib/gmem.c (profiler_try_realloc): A couple
458         of 64-bit printf format fix from George Lebl.
459         (#82817)
460
461         * glib/gconvert.c (open_converter): Fix gsize/gint
462         mixup for g_iconv() arguments. (#83270,
463         David L. Cooper II)
464
465 2002-06-03  Matthias Clasen  <maclas@gmx.de>
466
467         * glib/gwin32.c (g_win32_get_package_installation_directory):
468         Replace homegrown "hash" entity by standard ISO entity "num".
469
470 2002-05-26  Matthias Clasen  <maclas@gmx.de>
471
472         * glib/gmain.c: Remove references to nonexisting functions 
473         g_source_set_callback_closure(), g_source_poll(), g_source_add()
474         from docs.
475
476         * glib/gdir.c (g_dir_open): Typo fix in docs.
477
478         * glib/gasyncqueue.c (g_async_queue_lock):
479         (g_async_queue_unref_and_unlock): Fix markup to avoid erroneous 
480         <link>s in docs.
481
482         * glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
483
484         * glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
485
486         * glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
487
488 2002-05-23  Havoc Pennington  <hp@redhat.com>
489
490         * glib/gspawn.c (fork_exec_with_pipes): on success, close the
491         pipes from the child. Fix from Tim.
492
493 2002-05-22  jacob berkman  <jacob@ximian.com>
494
495         * m4macros/glib-gettext.m4 (AM_GLIB_WITH_NLS): fix tyop
496
497 Wed May 22 15:40:47 2002  Owen Taylor  <otaylor@redhat.com>
498
499         * README.in: Remove notes about now-fixed-bugs.
500
501         * m4macros/glib-gettext.m4 acinclude.m4: Get rid
502         of AC_MSG_NOTICE() usage, since some broken systems
503         (Hi Debian!) might not be using autoconf-2.5x for
504         downstream packages even though we require it for
505         glib itself.
506
507         * INSTALL.in: Add a note about installing extra
508         converters for Solaris.
509
510         * glib/gutils.h (g_bit_nth_msf): Fix termination
511         condition. (#82582, Paolo Molaro)
512  
513 Tue May 21 15:51:17 2002  Owen Taylor  <otaylor@redhat.com>
514
515         * configure.in: $with_libiconv, not $with_iconv.
516
517 Mon May 20 18:02:46 2002  Owen Taylor  <otaylor@redhat.com>
518
519         * configure.in: Move iconv tests before gettext
520         checks. (#81999)
521
522         * m4macros/glib-gettext.m4 acinclude.m4: If we can't
523         link to gettext, try adding in -liconv. (#80076,
524         Boyd Lynn Gerber)
525
526         * m4macros/glib-gettext.m4 acinclude.m4: Suppress
527         warnings about xgettext not being GNU gettext when
528         libintl wasn't found at all. 
529         (#79016, Andrew P. Lentvorski, Jr.)
530          
531 2002-05-21  Matthias Clasen  <maclas@gmx.de>
532
533         * glib/gmarkup.c (g_markup_parse_context_parse): Added
534         proper support for CDATA sections.
535
536 2002-05-20  jacob berkman  <jacob@ximian.com>
537
538         * glib/gdir.c: include sys/types.h before dirent.h to build on
539         darwin (fixes #72859)
540
541 Mon May 20 15:35:59 2002  Owen Taylor  <otaylor@redhat.com>
542  
543         * glib/gfileutils.c (get_contents_regfile): Fix double
544         close of file descriptor on error. (#82139, Wayne Schuller)
545  
546         * glib/gspawn.c (close_and_invalidate): Don't close
547         fd's that have already been closed. (Fix from Michael
548         Meeks, #81959)
549  
550         * glib/giochannel.c (g_io_channel_close): If not flushing,
551         dump the contents of the write buffers, so we won't try
552         to write them to an invalid fd later. (Patch from Ron Steinke,
553         fixing #78290, Andreas Persenius.)
554  
555 2002-05-18  Matthias Clasen  <maclas@gmx.de>
556
557         * tests/markups/fail-36.gmarkup: 
558         * tests/markups/fail-35.gmarkup: 
559         * tests/markups/valid-8.gmarkup: 
560         * tests/markups/valid-7.gmarkup: 
561         * tests/markups/valid-6.gmarkup: 
562         * tests/markups/valid-5.gmarkup: New testcases.
563
564         * tests/markup-test.c (passthrough_handler): 
565         (text_handler): Don't ignore the text_len parameter.
566
567         * glib/gmarkup.c (find_current_text_end): Don't hang on embedded
568         nuls.  (#81977)
569         (g_markup_parse_context_parse): Fix passthrough handling to
570         correctly skip processing instructions, comments, doctype
571         declarations and CDATA marked sections.  (#81977)
572
573 Sat May 18 00:21:51 2002  Tim Janik  <timj@gtk.org>
574
575         [merged from stable]
576
577         * glib/gscanner.c (g_scanner_unexp_token): fix missing cases for
578         expected_token.
579
580 2002-05-17  Tor Lillqvist  <tml@iki.fi>
581
582         * config.h.win32.in: Match new additions in a configure-produced
583         config.h.
584
585         * glibconfig.h.win32.in: gssize and gsize as in a
586         configure-produced glibconfig.h.
587
588         * glib/glib.def: Add new functions.
589
590 Thu May 16 12:24:00 2002  Owen Taylor  <otaylor@redhat.com>
591  
592         * acinclude.m4 m4macros/glib-gettext.m4: Incorporate 
593         AM_LC_MESSAGES, AM_PATH_PROG_WITH_TEST as AM_GLIB_* to avoid 
594         dependencies on gettext m4 files. (#81885, Hidetoshi Tajima.)
595         
596 2002-05-14  Alex Larsson <alexl@redhat.com>
597         
598         * glib/gstrfuncs.c: 
599         * glib/gstrfuncs.h:
600         New functions g_str_has_suffix and g_str_has_prefix.
601         
602         * tests/string-test.c: (main):
603         Test the new functions.
604
605 Mon May 13 23:20:00 2002  Owen Taylor  <otaylor@redhat.com>
606
607         * autogen.sh (have_gettext): Add a check for GNU gettext.
608         (Pointed out by Dan Winship in #59386.)
609
610 Mon May 13 11:55:33 2002  Owen Taylor  <otaylor@redhat.com>
611
612         * configure.in acglib.m4: If sizeof(int) == sizeof(long)
613         run compilation tests to determine which way gsize should
614         be defined. (#74413, reported by Miroslaw Dobrzanski-Neumann)
615
616 Mon May 13 11:42:23 2002  Owen Taylor  <otaylor@redhat.com>
617  
618         * glib/libcharset/*: Update from libcharset CVS.
619         Includes additional encodings for Solaris (#80396,
620         Qingjiang Yuan)
621  
622         * configure.in: Add getc_unlocked to CHECK_FUNCS().
623  
624         * glib/gmessages.c (strdup_convert): If
625         g_convert_with_fallback() fails, print the error
626         message to stderr the first time, then return
627         the original string. (#78197)
628  
629 2002-05-10  Naba Kumar  <kh_naba@users.sourceforge.net>
630
631         * configure.in: Added "hi" to ALL_LINGUAS.
632
633 2002-05-08  Michael Natterer  <mitch@gimp.org>
634
635         * configure.in: fixed yesterdays fix for cross compiling: simply
636         check the variable "cross_compiling" which gets set by autoconf.
637
638 2002-05-07  Matthias Clasen  <maclas@gmx.de>
639
640         * glib/gmarkup.c (unescape_text): Report unfinished entity
641         references as errors rather than running into an assert.  (#80441)
642
643 2002-05-07  Michael Natterer  <mitch@gimp.org>
644
645         * configure.in: added a new conditional CROSS_COMPILING which
646         indicates ($build != $host). If it is set, look for
647         glib-genmarshal in PATH. Error out if it was not found.
648
649 Tue May  7 11:24:22 2002  Owen Taylor  <otaylor@redhat.com>
650
651         Fixes for #79347, Ron Arts.
652
653         * glib/gqsort.c (g_qsort_with_data): Handle 0 elements,
654         don't g_return_if_fail().
655
656         * tests/qsort-test.c (main): Add a 0 element test.
657
658         * glib/garray.c (g_[ptr_]array_sort_with[_data]): 
659         Remove invalid assertions that array->pdata != NULL ..
660         it's NULL for 0 elements which is a valid case.
661
662 Mon May  6 16:00:41 2002  Owen Taylor  <otaylor@redhat.com>
663
664         * glib/gbacktrace.h: Exclude OSF from alpha definition
665         of G_BREAKPOINT(), since the assembler apparently
666         doesn't support bpt. (#77852, Gareth Pierce) [from stable]
667
668 Mon May  6 11:48:08 2002  Owen Taylor  <otaylor@redhat.com>
669
670         [ merged from stable ]
671  
672         * Makefile.am (EXTRA_DIST): Add ChangeLog.pre-2-0 (#78641)
673  
674         * m4macros/glib-2.0.m4: save CFLAGS/LIBS properly when
675         compiling "what went wrong" test case. (#79330)
676  
677         * m4macros/glib-2.0.m4: Remove reference to editing
678         pkg-config script. (From Jim Gettys)
679  
680         * configure.in: (Look for dyld interfaces before dlopen()
681         since OS X can have both. Patch from Jacob Berkman, 
682         #80438)
683         
684 2002-05-01  jacob berkman  <jacob@ximian.com>
685
686         * configure.in: fix typo on 64-bit printf formatting string
687         configure message (fixes #80389)
688
689 2002-04-29  Pablo Saratxaga  <pablo@mandrakesoft.com>
690
691         * configure.in: Added Vietnamese (vi) to ALL_LINGUAS
692
693 2002-04-19  Tor Lillqvist  <tml@iki.fi>
694
695         * glib/gspawn.c (g_spawn_command_line_sync): Add Windows-specific
696         note to the gtk-doc comment.
697
698         * glib/gspawn-win32.c: Remove the copy-pasted gtk-doc comment
699         blocks. It's enough to have them in gspawn.c.
700
701 2002-04-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
702
703         * gthread/gthread-impl.c (g_thread_init): Fixed typo. (#78985)
704
705 2002-04-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
706
707         * glib/gthreadpool.c (g_thread_pool_thread_proxy): Unlock the pool
708         for all threads leaving it. (#78348)
709
710 2002-04-11  Matthias Clasen  <maclas@gmx.de>
711
712         * tests/patterntest.c: Remove manual UTF-8 -> Latin1 conversion for
713         stuff fed to g_print.
714
715 2002-04-08  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
716
717         * tests/gio-test.c, tests/markup-test.c: Use gsize instead of
718         gint. From Miroslaw Dobrzanski-Neumann
719         <mne@mosaic-ag.com>. (#77982)
720         
721 2002-04-08  Stanislav Brabec  <utx@penguin.cz> 
722
723         * cs.po: Added Czech (cs) to ALL_LINGUAS.
724
725 2002-03-31  Hasbullah Bin Pit <sebol@ikhlas.com>
726
727         * configure.in: Added Malay (ms)to ALL_LINGUAS.
728
729 2002-03-29  Tor Lillqvist  <tml@iki.fi>
730
731         * glib/glib.def: Add g_convert_init.
732
733 Thu Mar 28 18:25:14 2002  Owen Taylor  <otaylor@redhat.com>
734
735         * Released 2.0.1
736
737         * configure.in: Version 2.0.1, interface, binary age 1.
738
739 Thu Mar 28 18:22:53 2002  Owen Taylor  <otaylor@redhat.com>
740
741         * README: Remove warning about g_print, etc, encoding.
742
743         * NEWS: Updates.
744
745         * glib/gmessages.c (g_log_default_handler): Use %lu
746         (plus a cast) when printing out pid_t arguments.
747         (#76770, Morten Welinder)
748
749         * glib/gstrfuncs.c (g_strdup_vprintf): Check the
750         result of vasprintf(), return NULL on failure.
751         (#76802, Akira Tagoh)
752
753         * tests/testglib.c (TEST): Supress a warning with
754         some GCC versions. 
755
756 Thu Mar 28 20:31:51 2002  Tim Janik  <timj@gtk.org>
757
758         * glib/gmessages.c:
759         (g_print): 
760         (g_printerr): convert prtinf() strings to local charset
761         when writing them to stdout or stderr.
762
763 Wed Mar 27 18:42:22 2002  Tim Janik  <timj@gtk.org>
764
765         * gmessages.[hc]:
766         major cleanups. introduced _g_log_fallback_handler() to handle
767         recursive messages which really doesn't call any GLib functions.
768         this allowes the default handler to use normal GLib functions and
769         also fixes user supplied log level handlers.
770         fixed locking issues, based on a patch from Sebastian Willhelmi,
771         attached to #74356. translate log messages from UTF-8, based
772         on the same patch. save fatal and recursion flags across flag
773         loop. use new integer format code from above patch.
774         move GLib functions out of locked mutex state to avoid deadlocks.
775         move the level prefix and filedescriptor logic into mklevel_prefix().
776         move _g_debug_init() into a place where we can figure and handle
777         recursion.
778
779 Mon Mar 25 18:13:06 2002  Owen Taylor  <otaylor@redhat.com>
780
781         * glib/gtypes.h (GUINT*_SWAP_LE_BE_X86): Remove __const__
782         qualifier from __asm__ statements... GCC since at least
783         2.96 has assumed no side effects automaticaly, and gcc-3.1
784         will warn about this usage. (#73308, Cody Russell)
785
786 Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
787
788         * glib/gmem.c (g_mem_chunk_reset): Fix problem where
789         if g_mem_chunk_reset() is called on an alloc-only
790         memchunk, then a useles GTree was created.
791
792 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
793
794         * glib/gconvert.c (open_converter): Try to work around segfaults
795         on Solaris if NULL is passed for outbuf... supposedly gchar
796         *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
797
798 Wed Mar 20 11:17:32 2002  Owen Taylor  <otaylor@redhat.com>
799
800         * glib/gfileutils.c (get_contents_regfile): Close the
801         file descriptor. (#75507, Matthias Clasen)
802
803 Wed Mar 20 11:00:59 2002  Owen Taylor  <otaylor@redhat.com>
804
805         * configure.in: Use $PKG_CONFIG, not pkg-config.
806         (LEE Sau Dan, #75572)
807
808 2002-03-20  Sven Neumann  <sven@gimp.org>
809
810         * glib/ghash.c (g_hash_table_resize): avoid repeated call of 
811         g_spaced_primes_closest() by moving it out of the CLAMP macro 
812         (spotted by Salmaso Raffaele).
813
814 2002-03-17  Tor Lillqvist  <tml@iki.fi>
815
816         * README.win32: Add MSVC-specific text by Hans Breuer.
817
818 2002-03-16  Tor Lillqvist  <tml@iki.fi>
819
820         * glib/giowin32.c: Some debugging output formatting changes. The
821         following changes fix a problem with buffered GIOChannels, noticed
822         with the help of Owen's test program, thanks! (#59969)
823         (g_io_win32_prepare): Return value that takes the buffer condition
824         into account, like g_io_unix_prepare() does.
825         (g_io_win32_check): Ditto, like g_io_unix_check().
826         (g_io_win32_dispatch): Ditto, like g_io_unix_dispatch().
827
828 Thu Mar 14 17:37:45 2002  Owen Taylor  <otaylor@redhat.com>
829
830         * glib/giochannel.c (g_io_channel_write_chars): Fix some
831         gsize/gint mismatches. (#74422, Miroslaw Dobrzanski-Neumann)
832
833 2002-03-14  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
834
835         * glib/gmessages.c: Fixed threading issues brought up by
836         #74577. Make g_log_find_domain, g_log_domain_new,
837         g_log_domain_check_free and g_log_domain_get_handler require being
838         called with g_messages_lock held and remove all internal locking
839         in them. Then added proper locking to g_log_set_handler,
840         g_log_remove_handler and g_logv. Problem spotted by Miroslaw
841         Dobrzanski-Neumann <mne@mosaic-ag.com>. (#74577)
842
843 2002-03-13  Erwann Chenede  <erwann.chenede@sun.com>
844         * glib/gconvert.c 
845           glib/gen-unicode-tables.pl
846           glib/gunidecomp.h : fixed cast/type problems to 
847           avoid warnings (with forte compiler) (#73898)
848         
849 2002-03-12  Alexander Larsson  <alla@lysator.liu.se>
850
851         * glib/gconvert.c:
852         Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
853         use instead. Add g_convert_init() that calls have_broken_filenames()
854
855         * gthread/gthread-impl.c:
856         Have g_thread_init call g_convert_init.
857
858 2002-03-11  Matthias Clasen  <maclas@gmx.de>
859
860         * glib/gstrfuncs.c (g_strtod): 
861         (g_ascii_strtod): 
862         (g_ascii_dtostr): 
863         (g_ascii_formatd): Doc formatting fixes.
864