implement G_STMT_START and G_STMT_END with do{}while(0), which is believed
[platform/upstream/glib.git] / ChangeLog
1 2008-05-22 10:49:37  Tim Janik  <timj@imendio.com>
2
3         * glib/gmacros.h: implement G_STMT_START and G_STMT_END with
4         do{}while(0), which is believed to be widely portable, fixes:
5         Bug 519026 - G_STMT_START/G_STMT_END test a non-existent preprocessor symbol
6
7 2008-05-20  Behdad Esfahbod  <behdad@gnome.org>
8
9         Bug 501651 – Update glib/libcharset
10
11         * configure.in:
12         * glib/libcharset/Makefile.am:
13         * glib/libcharset/README:
14         * glib/libcharset/codeset.m4:
15         * glib/libcharset/config.charset:
16         * glib/libcharset/glibc21.m4:
17         * glib/libcharset/libcharset-glib.patch:
18         * glib/libcharset/libcharset.h:
19         * glib/libcharset/localcharset.c (_g_locale_get_charset_aliases),
20         (_g_locale_charset_raw):
21         * glib/libcharset/localcharset.h:
22         * glib/libcharset/make-patch.sh:
23         * glib/libcharset/ref-add.sin:
24         * glib/libcharset/ref-del.sin:
25         * glib/libcharset/update.sh:
26         Update libcharset to the one shipped with libiconv-0.12.
27
28 2008-05-20  Behdad Esfahbod  <behdad@gnome.org>
29
30         Bug 459905 – Bug in wcwidth data
31         Bug 534085 – g_unichar_iswide_cjk() has a totally wrong table
32         * glib/guniprop.c (g_unichar_iswide), (g_unichar_iswide_cjk):
33         Regenrate wide and wide_cjk tables from Unicode 5.1.0 data directly.
34         Not using Markus Kuhn's tables anymore.
35
36 2008-05-20 14:31:18  Tim Janik  <timj@imendio.com>
37
38         * reverted recent unapproved changes by Yair Hershkovitz, regarding:
39         Bug 503071 – Application direction changes to right to left even if theres no translation.
40
41 2008-05-20  Tor Lillqvist  <tml@novell.com>
42
43         * configure.in: Don't need memory barriers when using a non-gcc
44         compiler on Windows either.
45
46 2008-05-19  Tor Lillqvist  <tml@novell.com>
47
48         * glib/gdir.c: Include the dirent.h and wdirent.c from
49         ../build/win32/dirent directly here when compiling with MSVC and
50         without HAVE_DIRENT_H.
51
52 2008-05-19  Hans Breuer  <hans@breuer.org>
53
54         * glib/makefile.msc : added gi18n.c
55
56 2008-05-19  Tor Lillqvist  <tml@novell.com>
57
58         * glib/Makefile.am: #define HELPER_CONSOLE in
59         gspawn-win32-helper-console.c
60
61         * glib/gspawn-win32-helper.c: Compile a main() instead of
62         WinMain() if HELPER_CONSOLE is defined. MSVC insists on a console
63         application having a main().
64
65 2008-05-18  Matthias Clasen  <mclasen@redhat.com>
66
67         Bug 527214 – g_timer_elapsed() returns random values.
68
69         * glib/gtimer.c (g_timer_new()):
70         Print warning if g_thread_init() has not been called yet. 
71         Patch by Mathias Hasselmann
72
73 2008-05-12  Jeffrey Stedfast  <fejj@novell.com>
74
75         * glib/gchecksum.c (g_checksum_reset): New function to reset the
76         state of a GChecksum.
77         (g_checksum_new): Call g_checksum_reset() instead of duplicating
78         code.
79
80 2008-05-17  Matthias Clasen  <mclasen@redhat.com>
81
82         Bug 528667 – Typos in testing module documentation
83
84         * glib/gtestutils.c: Fix typos in the documentation.
85
86 2008-05-17  Tor Lillqvist  <tml@novell.com>
87
88         * glib/giowin32.c: Make debugging printout more compact and add
89         more information to it. No changes to actual functionality.
90
91         * glib/gmain.c: Improve debugging printouts. When
92         G_MAIN_POLL_DEBUG is defined, we check for an environment variable
93         of the same name to decide whether to print out debugging
94         information or not. G_MAIN_POLL_DEBUG is always defined on Windows
95         as there is more often a need to debug this stuff there. On Unix
96         the definition has to be uncommented (or done on the compile
97         command line).
98
99 2008-05-17  Tor Lillqvist  <tml@novell.com>
100
101         * build: Don't include the "build" module with svn:externals any
102         longer. Instead add the still relevant directories and files from
103         it for real here in GLib.
104
105 2008-05-17  Yair Hershkovitz  <yairhr@gmail.com>
106
107         * glib/glib.symbols:
108         * glib/gi18n.h: Added g_disable_setlocale().
109
110         * glib/gi18n.c: Added g_disable_setlocale() API to disable setting
111         the locale in g_i18n_init(). Dont disable translations if textdomain
112         was not set before calling g_i18n_init(). Dont disable translations if
113         the locale is "C".
114
115 2008-05-16  Tor Lillqvist  <tml@novell.com>
116
117         * config.h.win32.in: Update to match the configure-produced one.
118
119 2008-05-14  Michael Natterer  <mitch@imendio.com>
120
121         * glib/gatomic.c: #include "config.h" before using G_ATOMIC_ARM.
122
123 2008-05-13  Kjartan Maraas  <kmaraas@gnome.org>
124
125         * glib/gi18n.c: #include <locale.h> to fix the build.
126
127 2008-05-12  Yair Hershkovitz  <yairhr@gmail.com>
128
129         * glib/gi18n.c (g_i18n_init): Coding convention fix. Space between
130         a function name and its opening parenthesis.
131
132 2008-05-12  Tor Lillqvist  <tml@novell.com>
133
134         * glib/glib.symbols: Add g_i18n_init.
135
136 2008-05-12  Tor Lillqvist  <tml@novell.com>
137
138         Bug 530457 - G_USER_DIRECTORY_DOWNLOAD folder improperly mapped
139
140         * glib/gutils.c (load_user_special_dirs): When running on Vista or
141         later, use SHGetKnownFolderPath() to get the FOLDERID_Downloads
142         folder for G_USER_DIRECTORY_DOWNLOAD, and FOLDERID_Public for
143         G_USER_DIRECTORY_PUBLIC_SHARE.
144
145 2008-05-11  Yair Hershkovitz  <yairhr@gmail.com>
146
147         Bug 503071 - Application direction changes to right to left even if
148         theres no translation. 
149
150         * glib/gi18n.c: g_i18n_init() for initializing the glib i18n,
151         checking if a translation is available for the calling app. wrappers for
152         gettext, dgettext and dpgettext to check first if the application
153         should be translated.
154
155         * glib/gi18n.h: symbol declaration for gettext wrappers.
156
157         * glib/gi18n-lib.h: include gi18n.h instead of libintl.h.
158
159         * glib/gstrfuncs.c: moved g_dpgettext() to glib/gi18n.c.
160
161         * glib/gutils.c: use g_dgettext() instead of dgettext().
162
163         * glib/glibintl.h: include gi18n.h.
164
165         * glib.symbols: added gettext wrappers.
166
167         * glib/Makefile.am: added gi18n.c.
168
169 2008-05-05  Michael Natterer  <mitch@imendio.com>
170
171         * glib/glib.h: #define __GLIB_H_INSIDE__ around including
172         everything.
173
174         * glib/*.h: check for that define instead of __G_LIB_H__ if
175         G_DISABLE_SINGLE_INCLUDES is defined.
176
177         * glib/gdatasetprivate.h: #include <glib.h> instead of
178         <glib/gdataset.h>
179
180 2008-05-02 13:24:13  Tim Janik  <timj@imendio.com>
181
182         * glib/gmain.c: renamed GMainDispatch.dispatching_sources to be more
183         descriptive and distinguishable within the source file.
184
185 2008-04-21  Tor Lillqvist  <tml@novell.com>
186
187         Bug 528752 - Win32 build and SSL not working
188
189         This bug report against libsoup points out an issue with the use
190         of bitfields in the GIOChannel struct that should really be taken
191         care of here in GLib.
192
193         * configure.in: Add Autoconf variable GLIB_EXTRA_CFLAGS which will
194         contain the -mms-bitfields flag on Windows.
195         
196         * glib-2.0.pc.in: Add it to Cflags.
197
198 2008-04-21  Tor Lillqvist  <tml@novell.com>
199
200         * configure.in
201         * */Makefile.am: More work on enabling static building on
202         Windows. When building statically: Also define
203         GOBJECT_STATIC_COMPILATION in glibconfig.h so that also the
204         variables in gparamspecs.h get declared without any
205         dllimport/dllexport decorations. Don't install .def files which
206         obviously have no meaning for static libraries. Don't create MS
207         import libraries. Don't do any resource object files.
208
209 2008-04-18 17:40:58  Tim Janik  <timj@imendio.com>
210
211         * tests/testglib.c: fixed gstdio.h include.
212
213         * tests/Makefile.am: properly list testglib.c SOURCES.
214
215 2008-04-17  Emmanuele Bassi  <ebassi@gnome.org>
216
217         * glib/gchecksum.c:
218         (sha_byte_reverse): Use the macro GLib provides for byte-swapping
219         as it can be optimized.
220         
221         (g_checksum_update): Fix a compiler warning.
222
223 2008-04-15  Mukund Sivaraman  <muks@mukund.org>
224
225         * gio/gfile.c: Fixed typos in gtk-doc comments.
226
227 2008-04-10  Mathias Hasselmann  <mathias@openismus.com>
228
229         Bug 519137 – g_slice_dup macro needs cast for 64-bit platform
230
231         * glib/gslice.h (g_slice_copy): Apply type casts needed
232           for proper compilation on 64-bit platforms.
233
234 2008-04-09  Federico Mena Quintero  <federico@novell.com>
235
236         * glib/gbookmarkfile.c (bookmark_metadata_free): Don't leak
237         the apps_by_name hash table if the applications list is empty.
238
239 2008-04-08  Behdad Esfahbod  <behdad@gnome.org>
240
241         * glib/gunicode.h: Add ISO 15924 code comments for new scripts.
242
243 2008-04-07  Matthias Clasen  <mclasen@redhat.com>
244
245         Bug 491554 – Update to Unicode 5.1.0
246
247         * glib/gunichartables.h:
248         * glib/gunicode.h:
249         * glib/gunibreak.h:
250         * glib/gmirroringtable.h:
251         * glib/gscripttable.h:
252         * glib/gen-script-table.pl: Update to Unicode 5.1.0. Patch by
253         Behdad Esfahbod
254
255 2008-04-07  Matthias Clasen  <mclasen@redhat.com>
256
257         Bug 526619 – make test-report crash
258
259         * glib/gtester.c: Allocate enough space for argv. Patch by
260          Hiroyuki Ikezoe
261
262 2008-04-04  Matthias Clasen  <mclasen@redhat.com>
263
264         * glib/gmain.c: Make the fix for bug 448943 work.
265
266 2008-04-04  Tor Lillqvist  <tml@novell.com>
267
268         * configure.in: Make sure we don't build both shared and static at
269         the same time on Windows. Put a #define for
270         GLIB_STATIC_COMPILATION into glibconfig.h in the static case, so
271         that the use of variables from libglib gets the GLIB_VAR macro in
272         gtypes.h automatically correct. This means that a shared and
273         static build of GLib can't be installed in the same prefix on
274         Windows, which sucks a bit. But with variables in the GLib API,
275         there isn't much we can do otherwise. The alternative would be to
276         force the developer who compiles against a statically built GLib
277         to use -DGLIB_STATIC_COMPILATION.
278
279         * glibconfig.h.win32.in: Define GLIB_STATIC_COMPILATION here also,
280         if needed.
281
282 2008-04-03  Tor Lillqvist  <tml@novell.com>
283
284         * configure.in: Don't enforce shared library build only on
285         Windows. It might well make sense to build static libraries in
286         some use cases.
287
288         * glib/gutils.c: Don't compile the DllMain if building libglib
289         statically. Also in that case don't return NULL from
290         _glib_get_installation_directory(), but return the installation
291         directory of the program's .exe file.
292
293 2008-04-03  Tor Lillqvist  <tml@novell.com>
294
295         Bug 525972 - UCS-4 not in the new win_iconv implementation
296
297         * glib/win_iconv.c: Add UCS-4. Also add spelling of UCS-2 without
298         the hyphen.
299
300 2008-04-03  Matthias Clasen  <mclasen@redhat.com>
301
302         Bug 448943 – g_timeout_add_seconds() problems
303
304         * glib/gmain.c (g_timeout_set_expiration): Prevent expiration
305         time going negative. Reported by Cody Russell, analyzed by
306         Olivier Crete, patch by Sjoerd Simons.
307
308 2008-04-03  Matthias Clasen  <mclasen@redhat.com>
309
310         Bug 525674 – A typo in gmarkup.c
311
312         * glib/gmarkup.c (g_markup_parse_context_get_element_stack): Fix
313         the docs, reported by Hiroyuki Ikezoe
314
315 2008-04-03  Matthias Clasen  <mclasen@redhat.com>
316
317         Bug 525732 – Error in documentation for g_list_first
318
319         * glib/glist.c (g_list_first): Fix the docs, reported by 
320         Salvatore Iovene
321
322 2008-04-02  Tor Lillqvist  <tml@novell.com>
323
324         Bug 524314 - g_convert() on Win32 implicitly converts full width
325         alphanumerics into half width
326         
327         * glib/win_iconv.c: Update from Yukihiro Nakadaira. Use
328         WC_NO_BEST_FIT_CHARS flag for WideCharToMultiByte() unless the
329         //translit flag was suffixed to the codeset name.
330
331         * glib/gconvert.c: Include win_iconv.c earlier so that its
332         definition of WINVER before it includes <windows.h> is used.
333
334 2008-03-31  Tor Lillqvist  <tml@novell.com>
335
336         * glib/gmain.c (g_poll): Improve fix for #525192 below: Use
337         SleepEx() so that the sleep is alertable. Thanks to John
338         Ehresman.
339
340 2008-03-31  Tor Lillqvist  <tml@novell.com>
341
342         * glib/gwin32.c
343         (g_win32_get_package_installation_directory_of_module): Fix Cygwin
344         breakage. Patch by Lieven van der Heide.
345
346 2008-03-31 10:39:17  Tim Janik  <timj@imendio.com>
347
348         * glib/gutils.h: reapply inlining fix from r6333 to fix:
349         Bug 522292 – Gives warnings in glib/gutils.h with GCC in C99 mode
350         and again:
351         Bug 315437 – extern inline -> static inline
352
353 2008-03-31  Tor Lillqvist  <tml@novell.com>
354
355         Bug 525192 - 100% CPU if run main loop with no IO sources
356
357         * glib/gmain.c (g_poll) [Win32]: Patch by Neil Roberts.
358
359 2008-03-30  Matthias Clasen  <mclasen@redhat.com>
360
361         * glib/gtester.c: Don't use ARG_MAX.  (#522335, patch by 
362         Samuel Thibault, adapted by Sebastian Dröge)
363
364 2008-03-30  Matthias Clasen  <mclasen@redhat.com>
365
366         * glib/gmacros.h: Add macros wrapping the gcc alloc_size 
367         function attribute.  (#523019, Rodrigo Moya)
368
369         * glib/gmem.h: 
370         * glib/gslice.h:
371         * glib/gstrfuncs.h: Use the new attribute where appropriate.
372
373 2008-03-30  Matthias Clasen  <mclasen@redhat.com>
374
375         * glib/glibintl.h:
376         * glib/gstrfuncs.c:
377         * glib/gutils.c: Simple fixes to help building GLib on 
378         embedded systems without NLS.  (#524350, Peter Kjellerstedt)
379
380 2008-03-30  Matthias Clasen  <mclasen@redhat.com>
381
382         * glib/ghash.c: Fix the build with -DG_DISABLE_ASSERT.
383         (#525060, Arfrever Frehtes Taifersar Arahesis)
384
385 2008-03-30  Matthias Clasen  <mclasen@redhat.com>
386         
387         * glib/gthread.h: Replace occurrances of G_GNUC_PRETTY_FUNCTION
388         by G_STRFUNC.  (#524344, Peter Kjellerstedt)
389
390 2008-03-30  Matthias Clasen  <mclasen@redhat.com>
391
392         * glib/gtestutils.c: Fix a doc typo. (#524742, Hiroyuki Ikezoe)
393
394 2008-03-22  Claudio Saavedra  <csaavedra@gnome.org>
395
396         Bug 523877 – gbookmarkfile: avoid using g_string_append_printf() and
397         other optimizations
398
399         * glib/gbookmarkfile.c: (bookmark_metadata_dump),
400         (bookmark_item_dump), (g_bookmark_file_dump), (expand_exec_line):
401         Replace all calls to g_string_append_printf with g_strconcat () or
402         g_string_append () where appropriate, to reduce the file creation time.
403         Also, use g_string_sized_new () with an appropriate buffer size instead
404         of g_string_new (NULL), to reduce time spent in memory reallocation.
405         (#523877, Claudio Saavedra, Emmanuele Bassi)
406
407 2008-03-22  Emmanuele Bassi  <ebassi@gnome.org>
408
409         Bug 518160 - replace two g_strdup_printf calls in GBookmarkFile
410
411         * glib/gbookmarkfile.c (is_element_full): Compare the fragments
412         instead of building two strings; this avoids two g_strdup_printf()
413         per namespaced element enountered. (#518160, Felix Riemann)
414
415 2008-03-20  Alexander Larsson  <alexl@redhat.com>
416
417         * configure.in:
418         Final fixes for struct statfs.f_fstypename checks (OpenBSD). (#521045)
419         Patch from ephraim_owns@hotmail.com
420
421 2008-03-19  Tor Lillqvist  <tml@novell.com>
422
423         Bug 523298 - win_iconv can't convert from UTF-8 to GB18030 (or vice versa)
424
425         * glib/win_iconv.c: Fixes for code page 54936 (GB18030)
426         (mbtowc_flags): New function. Check if a code page is one of those
427         for which the dwFlags parameter to MultiByteToWideChar() must be
428         zero. Return 0 or MB_ERR_INVALID_CHARS.
429         (mbcs_mblen): New function for multi-byte (more than two bytes for
430         some characters) code pages. Only handles 54936 for now.
431         (make_csconv): Use it for 54936.
432         (kernel_mbtowc): Use mbtowc_flags().
433
434 2008-03-18  Sebastian Dröge  <slomo@circular-chaos.org>
435
436         Bug 522292 - Gives warnings in glib/gutils.h with GCC in C99 mode
437
438         * glib/gutils.h: Use "__attribute__ ((__gnu_inline__))" for inlining
439         if either __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ are defined. In
440         gcc version prior to 4.3 no correct C99-inline was implemented which
441         has semantic differences to GNU inline.
442
443 2008-03-16  Tor Lillqvist  <tml@novell.com>
444
445         * configure.in: Don't bother defining Autoconf variables for
446         glib.def, gmodule.def, gobject.def and gthread.def when this can
447         be handled easily in */Makefile.am which are the only files that
448         use them. Remove also TESTGMODULE_EXP which isn't used at all.
449
450         * glib/Makefile.am: Corrsponding change.
451         
452 2008-03-14  Michael Natterer  <mitch@imendio.com>
453
454         * glib/*.h: make it possible to disable single-file includes by
455         defining G_DISABLE_SINGLE_INCLUDES when building against GLib.
456         Approved by Tim Janik.
457
458         * glib/glib.h: include <glib/gslice.h>.
459
460         * glib/gi18n.h
461         * glib/gi18n-lib.h
462         * glib/gprintf.h: include <glib.h> so the above works when these
463         files are included without including <glib.h> first.
464
465 2008-03-14  Alexander Larsson  <alexl@redhat.com>
466
467         * configure.in:
468         Add required includes for f_fstypename member check.
469
470 2008-03-14  Alexander Larsson  <alexl@redhat.com>
471
472         * configure.in:
473         Added checks for FEN (Solaris  File Event Notification)
474
475 2008-03-13  Tor Lillqvist  <tml@novell.com>
476
477         * glib-zip.in: Add lib/gio-2.0.lib and lib/gio-2.0.def.
478
479 2008-03-12  Tor Lillqvist  <tml@novell.com>
480
481         * configure.in: Expand gio/win32/Makefile.
482
483 2008-03-12  Matthias Clasen <mclasen@redhat.com>
484
485         * configure.in: Bump version to 2.17.0
486
487         * ChangeLog.pre-2-16: rotate ChangeLog
488         
489         * === branch for 2.16 ===