2008-02-20 Tor Lillqvist <tml@novell.com>
* glib/gtestutils.c (g_test_trap_fork) [Win32]: Change the
g_error() to g_message() to avoid stopping on warnings. At least
now testglib runs to completion and the old tests in it get
exercised even if the newfangled ones don't.
(g_test_trap_assertions) [Win32]: Bypass on Windows.
svn path=/trunk/; revision=6542
2008-02-17 Hans Breuer <hans@breuer.org>
* glib/gutils.c : define CSIDL_MYPICTURES if not available
* gthread/gthread-win32.c : use G_STRFUNC instead of compiler
specific __FUNCTION__
svn path=/trunk/; revision=6526
2008-02-13 Tor Lillqvist <tml@novell.com>
* glib/gwin32.c: Doc change: Deprecate passing anything but NULL
for the "package" parameter to
g_win32_get_package_installation_directory() and
g_win32_get_package_installation_subdirectory().
svn path=/trunk/; revision=6508
2008-02-10 Matthias Clasen <mclasen@redhat.com>
* glib/gtestutils.h: Make the g_test_add macro work with
gcc 4.3
* tests/gobject/paramspec-test.c: Adapt to recent changes in
GParamGType initialization.
svn path=/trunk/; revision=6500
2008-02-07 Tor Lillqvist <tml@novell.com>
* configure.in: Unfortunately the mingw implementations of
C99-style snprintf and vsnprintf don't seem to be quite good
enough, at least not in mingw-runtime-3.14. I don't know exactly
what the problem is, but it is related to floating point
formatting and decimal point vs. comma, and the symptoms show up
in some dialogs in GIMP, presumably also elsewhere. The simple
tests in AC_FUNC_VSNPRINTF_C99 and AC_FUNC_SNPRINTF_C99 aren't
rigorous enough to notice, though. So preset
ac_cv_func_vsnprintf_c99 and ac_cv_func_snprintf_c99 to "no".
svn path=/trunk/; revision=6482
2008-02-07 12:58:54 Tim Janik <timj@imendio.com>
* Makefile.am: fixed build order to build gobject after gmodule gthread
so gobject tests can be threaded.
svn path=/trunk/; revision=6480
2008-02-07 Ryan Lortie <desrt@desrt.ca>
* glib/gmessages.h (g_error): add for(;;); after the g_log call so
that GCC stops issuing false warnings about reachability Bug #514920
svn path=/trunk/; revision=6476
2008-02-06 Behdad Esfahbod <behdad@gnome.org>
* glib/pltcheck.sh: Skip g_bit_*(). Inline functions may end up with
a local plt if the compiler doesn't support what we want. Bug #514702
svn path=/trunk/; revision=6468
2008-02-02 Jonathon Jongsma <jjongsma@gnome.org>
* gio/gbufferedoutputstream.c:
* gio/gbufferedoutputstream.h: modify the new_sized() constructor to take a
gsize param instead of guint to match the GBufferedInputStream constructor.
svn path=/trunk/; revision=6448
2008-01-31 Michael Natterer <mitch@imendio.com>
* glib/gmem.c: use %G_GSIZE_FORMAT instead of %lu since sizes have
changed from gulong to gsize in this file.
svn path=/trunk/; revision=6432
2008-01-29 Christian Persch <chpe@gnome.org>
* docs/reference/glib/tmpl/macros_misc.sgml: G_GNUC_[PRETTY_]FUNCTION
are deprecated since 2.16, not 2.14.
svn path=/trunk/; revision=6419
2008-01-29 14:58:31 Tim Janik <timj@imendio.com>
* glib/gmem.[hc]: changed size argument type from gulong to gsize as
discussed on gtk-devel-list:
http://mail.gnome.org/archives/gtk-devel-list/2007-March/msg00062.html
this should be ABI compatible on all platforms except win64 for which
no ABI binding port exists yet.
svn path=/trunk/; revision=6413
2008-01-29 Sebastian Wilhelmi <wilhelmi@google.com>
* tests/threadpool-test.c (test_thread_pools): Grab
thread_counter_pools LOCK when increasing
leftover_task_counter. Fixes race in test. (#512624, Simon Murray)
svn path=/trunk/; revision=6406
2008-01-27 Matthias Clasen <mclasen@redhat.com>
* configure.in: Fix the pcre Unicode test to work with
LDFLAGS=-Wl,--as-needed. (#484261, Mark Lee)
svn path=/trunk/; revision=6387
2008-01-27 Murray Cumming <murrayc@murrayc.com>
* gio/gfile.c: (g_file_replace_contents),
(g_file_replace_contents_finish): Document that the new_etags output
gchar* should be freed.
svn path=/trunk/; revision=6383
2008-01-25 Loïc Minier <lool@dooz.org>
* glib/goption.c: (group_has_visible_entries),
(group_list_has_visible_entires), (g_option_context_get_help): Pass
context down the implementation to check for the main_group.
Bug #510292.
* glib/tests/option-context.c:
Don't set G_OPTION_FLAG_IN_MAIN in main_entries
(group_captions): only create group when actually adding it to the
context; add an exit(0) to make sure the test succeeds.
svn path=/trunk/; revision=6377
2008-01-23 Jens Granseuer <jensgr@gmx.net>
* glib/gtestutils.c: (g_test_trap_fork):
* glib/tests/testing.c: (test_assertions): Only declare variables at
the beginning of a code block. Bug #511654.
svn path=/trunk/; revision=6361
2008-01-20 Murray Cumming <murrayc@murrayc.com>
* glib/gchecksum.c: (g_checksum_update): Accept -1 for the data
length if the data is a null-terminated string. Bug #510855.
svn path=/trunk/; revision=6340
2008-01-21 Alexander Larsson <alexl@redhat.com>
* inotify/Makefile.am:
* inotify/inotify-helper.c:
* inotify/inotify-kernel.c:
* inotify/inotify-path.c:
* inotify/local_inotify.h: Removed.
* inotify/local_inotify_syscalls.h: Removed.
Removed the included copies of the inotify
headers. We now only use the <sys/inotify.h>
header which exists on modern systems.
This fixes problems on ARM and SH5 (#510448)
but is also generally much cleaner and future
safe. For instance, if other OSes add support
for inotify it should "just work".
svn path=/trunk/; revision=6338
2008-01-18 16:51:23 Tim Janik <timj@imendio.com>
* glib/gutils.h: don't define __GNUC_PREREQ which is not in the glib
namespace. for gcc, define G_INLINE_FUNC to "static inline" as with
all other C compilers, because newer GCC versions incompatibly
changed "extern inline" semantics.
svn path=/trunk/; revision=6333
2008-01-18 Murray Cumming <murrayc@murrayc.com>
* glib/gfileutils.c:
* glib/gsequence.c:
* glib/gstring.c: Fixed some minor typos in the documentation.
svn path=/trunk/; revision=6332
* glib/gchecksum.c (md5_sum_update): Fix another bug (which
doesn't affect the results, but may cause it to read bad memory).
svn path=/trunk/; revision=6323
* glib/gchecksum.c (md5_sum_update): fix this; the previous code
gave the wrong md5sum when called in certain ways with buffers
larger than 64 bytes.
(g_checksum_update): remove the unnecessary "length > 1"
restriction
* tests/checksum-test.c: Rewrite this to be much more exhaustive
(and in particular to test the md5_sum_update bugfix).
svn path=/trunk/; revision=6314
2008-01-12 Andre Klapper <a9016009@gmx.de>
* configure.in: ALL_LINGUAS: remove line breaks from previous
commit to get damned-lies stats correct again. Add Sinhala (si).
svn path=/trunk/; revision=6298
2008-01-11 12:55:19 Tim Janik <timj@imendio.com>
* tests/testingbase64.c: added g_base64_encode()/g_base64_decode()
test case by Asbjoern <asbgpe@online.no>. fixed up coding style.
svn path=/trunk/; revision=6292
2008-01-11 09:00:28 Tim Janik <timj@imendio.com>
* glib/Makefile.am (install-exec-hook): use mv/sed/rm on a temporary
file instead of "sed -i" which is not portable enough.
svn path=/trunk/; revision=6291
2008-01-02 Alvaro Lopez Ortega <alvaro@sun.com>
* gio/gunixmount.c (g_unix_mount_unmount, g_unix_mount_eject):
These void functions were trying to return a value. It was causing
the compilation to fail.
svn path=/trunk/; revision=6232
2008-01-02 Alvaro Lopez Ortega <alvaro@sun.com>
* glib/ghash.c (g_hash_table_replace, g_hash_table_insert): These
functions prototype defines its output as void, and therefore they
should not return any value. This patch fixes a compilation error:
the "return" clauses were incompatible with the functions prototype.
svn path=/trunk/; revision=6230
Muntyan. (#504142)
* glib/goption.c: Do not show empty groups in --help output.
* glib/tests/Makefile.am: Add option-context.c
* glib/tests/option-context.c: Test skipping of empty groups.
svn path=/trunk/; revision=6198
2007-12-21 18:02:30 Tim Janik <timj@imendio.com>
* glib/Makefile.am: use "sed -i.bak <CMD> <FILE> && rm -f <FILE>.bak"
syntax for install-exec-hook, which seems to be the only "sed -i"
variant that is portable across linux and MacOS.
svn path=/trunk/; revision=6187
2007-12-21 Matthias Clasen <mclasne@redhat.com>
* glib/gtestutils.h: Bring up to GLib coding standards: remove
C99 comments, trailing commas in enumerations and extra ; after
G_BEGIN/END_DECLS. Among other things, this makes xulrunner build
against GLib 2.15.
* glib/gtester.c: More of the same
svn path=/trunk/; revision=6185
2007-12-09 Hans Breuer <hans@breuer.org>
* tests/gio-ls.c : adapt to recent api changes
* tests/testglib.c : variable declaration at the beginning of a block
(Lieven van der Heide, #503602)
* win32-fixup.pl : process *.rc.in as well; substitute
LT_CURRENT_MINUS_AGE
* glib/makefile.msc.in : alphabetic sorting of OBJECTS
svn path=/trunk/; revision=6184
2007-12-20 16:34:04 Tim Janik <timj@imendio.com>
* glib/gtester-report: commented class definitions. moved HTML character
escaping out of javascript. fixed string->bool conversions. added performance
results to test case "Details" window.
svn path=/trunk/; revision=6176
2007-12-20 Christian Persch <chpe@gnome.org>
* glib/gchecksum.c: (g_checksum_new): Use g_slice_new0, to fix
"conditional jump or move depends on uninitialised value(s)" error
from valgrind. Bug #504527.
svn path=/trunk/; revision=6174
2007-12-20 15:03:51 Tim Janik <timj@imendio.com>
* glib/gtester-report: new python script that generates an HTML
unit test report from the XML files generated by gtester.
* glib/Makefile.am: install gtester-report in $bindir and configure
it upon installation (version number and python shebang).
svn path=/trunk/; revision=6171
2007-12-19 Emmanuele Bassi <ebassi@gnome.org>
* glib/gtimer.c (g_time_val_from_iso8601): Fix the date validation
check. (#503029)
* tests/testglib.c (various_string_tests): Add an invalid date
for testing the above fix.
svn path=/trunk/; revision=6160
* docs/reference/glib/glib-sections.txt:
* glib/gasyncqueue.c: (g_async_queue_new), (g_async_queue_new_full),
(g_async_queue_unref):
* glib/gasyncqueue.h: add g_async_queue_new_full() which takes a
GDestroyNotify function to free any remaining queue items when the
queue is destroyed after the final atomic unref (#367550).
svn path=/trunk/; revision=6152
2007-12-18 13:45:23 Tim Janik <timj@imendio.com>
* glib/gtestutils.[hc]: added g_test_trap_assert_stdout_unmatched() and
g_test_trap_assert_stderr_unmatched(), based on a suggestion by Mathias
Hasselmann. reworked g_test_trap_assertions() to use flags to encode
assertion semantics, fixes#504227.
svn path=/trunk/; revision=6151
2007-12-13 Bastien Nocera <hadess@hadess.net>
* glib/gtimer.c: (g_time_val_from_iso8601):
Don't try to parse dates that start with anything but a
digit, a plus or a minus sign, as those can't be valid
ISO8601 dates (Closes: #503029)
svn path=/trunk/; revision=6111
2007-12-12 16:06:11 Tim Janik <timj@imendio.com>
* tests/testglib.c: split up tests and reworked code to use
the new test framework.
* tests/Makefile.am: added testglib to TEST_PROGS.
svn path=/trunk/; revision=6103
* gobject/glib-genmarshal.c: Add global exit_status variable, and use
it in pad() and process_signature() to return with non-zero error code
when printing warnings. (#495294)
svn path=/trunk/; revision=6098
* glib/garray.h: use an intermediate cast to void * in g_array_index()
to not trigger cast alignment warnings, fixes#502927.
svn path=/trunk/; revision=6092
2007-12-10 15:08:59 Tim Janik <timj@imendio.com>
* let g_warn_if_fail replace g_assert as discussed here:
http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html
* fix bug #502498: Test framework assertion failures should follow
gcc error format.
* gmessages.h, gmessages.c: deprecated g_assert_warning() which is
unused now. removed g_assert*() definitions whcih are provided by
gtestutils.h now. added g_warn_if_reached() and g_warn_if_fail()
which are recommended as g_assert/g_assert_not_reached replacements
for non-test programs.
added g_warn_message() to implement g_warn_*() macros.
use emacs-next-error friendly formatting for file:line: for warnings.
* gtestutils.h, gtestutils.c: use emacs-next-error friendly formatting.
implement g_assert_not_reached() with g_assertion_message() and
g_assert() in terms of g_assertion_message_expr() so we'll be able to
provide assertion messages in test logs.
* gkeyfile.c, gbookmarkfile.c: changed g_assert*() to g_warn_if_fail()
or g_return_if_fail() where suitable.
* gio/: changed g_assert to g_warn_if_fail.
svn path=/trunk/; revision=6086
2007-12-10 Matthias Clasen <mclasen@redhat.com>
* glib/gstrfuncs.h:
* glib/gstrfuncs.c (g_dpgettext): Change prototype to take
msgctxtid + offset instead of two strings, to avoid duplication
of string constants if the compiler/linker don't perform constant
suffix merging. (#502590, Christian Persch)
* glib/gi18n.h:
* glib/gi18n-lib.h: Adapt the definitions of C_() and Q_().
svn path=/trunk/; revision=6081
2007-12-09 Hans Breuer <hans@breuer.org>
* tests/gio-ls.c : (new file) a test program emulating some of 'ls'
* tests/makefile.msc.in : build it (currently on win32)
svn path=/trunk/; revision=6079
2007-12-09 Hans Breuer <hans@breuer.org>
* **/makefile.msc glib/makefile.msc.in : removed -GD to compile
with msvc9 (vs2008) with less complains
* glibconfig.h.win32.in : #define G_HAVE_ISO_VARARGS 1 for
msv8 (vs2005) and above
* glib/gfileutils.c : s/stricmp/_stricmp/
* msvc_recommended_pragmas.h : work around Microsoft's premature
attempt to deprecate the C-Library
* tests/makefile.msc.in : added checksum-test
svn path=/trunk/; revision=6076
2007-12-08 Christian Persch <chpe@gnome.org>
* gio/glocalfileinfo.c: (get_thumbnail_attributes): Add forgotten
#ifdef G_OS_WIN32 to fix the build on linux.
svn path=/trunk/; revision=6074
2007-12-06 09:27:42 Tim Janik <timj@imendio.com>
* tests/scannerapi.c: added new scanner test from #501654, by
Patrick Hulin with various modifications.
reworked coding style, adapted to new testing framework, fixed
token parser test and use a forked sub process to test
g_scanner_error() output messages.
svn path=/trunk/; revision=6055
2007-12-05 17:21:05 Tim Janik <timj@imendio.com>
* glib/glib/gtestutils.c: print out random seed for verbose tests,
also adapted test result reporting slightly in verbose mode to allow
custom debugging output. support "thorough" as test mode alis for "slow".
* glib/glib/gtestutils.h: added g_test_thorough().
* glib/glib/gtester.c: print out the last random seed when tests fail.
added result attribute to test case status logging to easily spot
failing tests in log files. disabled debugging output when skipping tests.
svn path=/trunk/; revision=6052
2007-12-05 11:43:22 Tim Janik <timj@imendio.com>
* glib/gtestutils.[hc]: added g_test_add_data_func() to pass data
into tests. allow data arguments for fixture tests.
* glib/gtestutils.c: fixed fatal log flag setup, so tests really abort
upon criticals/warnings/errors.
* glib/tests/testing.c: test test_data arguments.
* glib/gtester.c: some prototype fixups.
svn path=/trunk/; revision=6049
2007-12-05 Tor Lillqvist <tml@novell.com>
* glib/win_iconv.c: Add "shift-jis" as an alternative spelling of
"shift_jis".
svn path=/trunk/; revision=6047
2007-12-05 Ryan Lortie <desrt@desrt.ca>
* autogen.sh: for the benefit of git users, checkout build/ if it is
missing
* .gitignore: but after that, ignore it.
svn path=/trunk/; revision=6046
2007-12-04 Emmanuele Bassi <ebassi@gnome.org>
* glib/gchecksum.[ch]: Add GChecksum, a generic wrapper around
various hashing algorithms. At the moment, the MD5, SHA-1 and
SHA-256 algorithms are supported. (#443648)
* glib/glib.h:
* glib/Makefile.am:
* glib/glib.symbols: Build glue for GChecksum
* tests/Makefile.am
* tests/checksum-test.c: Add test suite for GChecksum.
svn path=/trunk/; revision=6042
2007-12-03 Ryan Lortie <desrt@desrt.ca>
* glib/ghash.c: no code changes; add comments to document the internal
functions.
svn path=/trunk/; revision=6037
2007-12-03 Ryan Lortie <desrt@desrt.ca>
* glib/ghash.c: no code changes; reorder functions to remove the need
for forward declarations.
svn path=/trunk/; revision=6036
2007-12-03 Ryan Lortie <desrt@desrt.ca>
* glib/glib.symbols (glib_gettext): remove stray (duplicate) entry
from file to fix the build
svn path=/trunk/; revision=6031
2007-12-03 Hans Breuer <hans@breuer.org>
* glib/glib.symbols : added glib_gettext (in use by gio)
* makefile.msc : also try building gio
* glib/gmarkup.c : use G_GUINT64_CONSTANT() to avoid
'bad suffix on number'
* glib/gtestutils.c : declare cariable at the beginning of the block,
include <io.h> for G_OS_WIN32
* makefile.msc.in : add gurifuncs and gtestutils
svn path=/trunk/; revision=6028
2007-12-03 Ryan Lortie <desrt@desrt.ca>
* glib/ghash.c: create a common function for the many places where all
nodes in the table are removed (remove_all, steal_all, destroy, unref,
etc...)
svn path=/trunk/; revision=6026
2006-12-03 Ryan Lortie <desrt@desrt.ca>
* tests/hash-test.c (second_hash_test): fix memory leak, add a few
extra sanity tests.
svn path=/trunk/; revision=6025