Commit Graph

2528 Commits

Author SHA1 Message Date
Matthias Clasen
305c9c6de5 Disable a failing test, tsk, tsk. 2010-01-25 12:29:09 -05:00
Ryan Lortie
b4c0b10658 add testcase for GVariantType 2010-01-25 11:31:56 -05:00
Ryan Lortie
0ccb288da1 merge GVariantType
GVariantType is the type system for GVariant
2010-01-25 11:27:28 -05:00
Ryan Lortie
c8fc3112f9 Bug 448888 - don't init g_slice for always-malloc 2010-01-22 20:18:58 -05:00
Sven Herzberg
7448eb71c3 properly abort instead of looping infinitely
Fixes: Bug 568760 - nautilus freezes due to a bug in garray.c:322

* glib/garray.c: increase the size of potential return values by
  using an unsigned result; properly check if we still handle valid size
  proposals, return the original request if there's no usable size left
* tests/array-test.c: reproduce the error condition of the bug report
2010-01-13 15:01:00 +01:00
Alexander Larsson
de5c708e0b Make thread calls unconditional if G_THREADS_MANDATORY is set
Since gobject now initialized threads unconditionally if threads are
available it makes no sense to have each thread operation
conditionally check if threads are enables, so allow this to be avoided.

https://bugzilla.gnome.org/show_bug.cgi?id=606775
2010-01-12 21:37:41 +01:00
Hiroyuki Ikezoe
37716bd00a Use GCC atomic builtin operations.
Fix for bug #531902.
2010-01-07 19:33:39 +09:00
Haakon Sporsheim
e8ccfd1bb2 Avoid compilation warning from MSVC
Signed-off-by: Tor Lillqvist <tml@iki.fi>
2010-01-05 11:32:59 +02:00
Piotr Eljasiak
d13c552daf Fix a typo in the docs 2010-01-05 00:48:02 +01:00
Pablo Castellano
0542e6dbf9 Updated .gitignore files 2010-01-03 01:24:44 +01:00
Javier Jardón
73ca6f7019 [docs] Fix 'Deprecated' tag on some win32 functions
Fix g_win32_get_package_installation_directory() and
g_win32_get_package_installation_subdirectory_utf8()
2009-12-28 02:04:01 +01:00
Javier Jardón
85e00d3a94 [docs] Fix 'Deprecated' tag in g_date_set_time() 2009-12-24 05:05:21 +01:00
Martin Pitt
da66897950 Support storing assertion messages into core dump
Crash interception/debugging systems like Apport or ABRT capture core dumps for
later crash analysis. However, if a program exits with an assertion failure,
the core dump is not useful since the assertion message is only printed to
stderr.

glibc recently got a patch which stores the message of assert() into the
__abort_msg global variable.
(http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=48dcd0ba)
That works fine for programs which actually use the standard C assert() macro.

This patch adds the same functionality for glib's assertion tests. If we are
building against a glibc which already has __abort_msg (2.11 and later, or
backported above git commit), use that, otherwise put it into our own field
__glib_assert_msg.

Usage:

  $ cat test.c
  #include <glib.h>

  int main() {
      g_assert(1 < 0);
      return 0;
  }

  $ ./test
  **ERROR:test.c:5:main: assertion failed: (1 < 0)
  Aborted (Core dumped)

  $ gdb --batch --ex 'print (char*) __abort_msg' ./test core
  [...]
  $1 = 0x93bf028 "ERROR:test.c:5:main: assertion failed: (1 < 0)"

https://bugzilla.gnome.org/show_bug.cgi?id=594872
2009-12-23 15:51:11 +00:00
Matthias Clasen
71d508776e Remove comment as well 2009-12-21 09:21:54 -05:00
Matthias Clasen
7db8b92b97 Revert the g_set_prgname change
This change breaks our API and causes warnings from essentially all applications.
See bug 563627.
2009-12-21 09:16:32 -05:00
Kamal Mostafa
046e521b4f Fix typo "Performace" in gtester-report Details pop-up window 2009-12-19 01:57:03 +01:00
Matthew W. S. Bell
2321e5aed0 Initialise variable in g_time_val_from_iso8601()
The function does not initialise the struct tm,
giving it improper values of tm_isdst making the result
an hour out.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=603540
2009-12-02 01:48:30 +01:00
Ryan Lortie
74a970f754 Add byteswap macros for gsize/gssize. 2009-11-30 19:53:30 -05:00
Matthias Clasen
12939c54f9 Disable a broken test
One of the option context tests relied on the ability to
call g_set_pgrname() more than once. Thats no longer possible
(without incurring a warning that wrecks the test).
2009-11-29 20:47:51 -05:00
Christian Persch
b3156508c4 Add TB and PB cases to g_format_size_for_display 2009-11-26 10:20:12 +01:00
Cody Russell
04d83e8e50 gtester should fail even if -k is passed 2009-11-23 07:48:14 -06:00
Tor Lillqvist
6e86c9a6aa Avoid gcc warning about redeclaration of atexit() on MinGW 2009-11-10 01:40:01 +02:00
Tor Lillqvist
3c57a6c7cc Don't call WSAEventSelect() on -1
If g_io_win32_sock_close() has been called on a socket channel, don't
later in g_io_win32_free() call WSAEventSelect() on its fd which has
been set to -1.
2009-11-05 00:04:33 +02:00
Carlo Bramini
b64ee1f020 Make g_file_test() behave on Windows more like as on POSIX
Patch from bug #572252.
2009-11-03 14:30:16 +02:00
Benjamin Otte
4288ad7692 Properly nul-terminate return values from g_convert()
The patch ensures that multibyte character sets are properly
nul-terminated. This is an issue because the documentation claims to
return a "nul-terminated" string and users of the API assume that means
a proper nul-termination in the resulting character set.

I looked at Pidgin and GStreamer code and found at least 3 cases where
this was happening.

This patch also reverts the documentation change from
5a633f82db as that is now no longer
necessary.
2009-10-28 19:26:17 +01:00
Benjamin Otte
5a633f82db Clarify documentation about g_convert() nul-terminated returns
THere is effectively no nul-termination for multibyte characters.
2009-10-27 21:31:25 +01:00
Sven Herzberg
3dab24828e make sure g_set_prgname() gets called only once
* glib/gutils.c: copy the call-once statement from g_set_application_name();
  Fixes Bug #563627: g_get_prgname() threadsafety
2009-10-23 16:23:46 +02:00
Matthias Clasen
e9fe53980b Fix --runtime-libdir option
For stable releases, it needs to take LT_REVISION into account, not
hardcode 0.
2009-09-29 23:08:03 -04:00
Matthias Clasen
2f93bea177 Avoid a C99ism
Move a variable declaration to the beginning of the block; see
bug 596561. Also remove a pointless register declaration.
2009-09-29 20:45:26 -04:00
Matthias Clasen
442dadf311 Improve docs for g_utf16_to_utf8
Document that g_utf16_to_utf8 does not validate the resulting
UTF-8 string. See bug 596314.
2009-09-29 20:39:39 -04:00
Alexander Larsson
70027bf092 Fix up cast in gdb macros
We need to actually assign the casted value somewhere.
2009-09-28 15:48:17 +02:00
Alexander Larsson
e657dee578 Use right soname for gdb autoloaded python files
We need to look at LT_REVISION too to get the right filename.
This was just hardcoded to zero before which is obviously wrong.
2009-09-28 15:48:17 +02:00
Matthias Clasen
cc95c60c69 Fix location of gdb macros
These files need to be put in a location that corresponds to the
location of the libraries, so we need to take the runtime-libdir
path into account.
2009-09-24 10:26:46 -04:00
Matthias Clasen
4c633ff0b5 2.22.0 2009-09-22 16:57:08 -04:00
Alexander Larsson
42320706c4 Add gforeach gdb command 2009-09-21 15:39:00 +02:00
Alexander Larsson
2b8943237f Add pretty printer for hashtables 2009-09-21 15:39:00 +02:00
Alexander Larsson
2e8768d9a5 Add pretty printing for GList and GSList 2009-09-21 15:39:00 +02:00
Alexander Larsson
efe9169234 Initial support for gdb python macros
This includes support for gobject pointer pretty printing and
signal frame compression in backtraces.

https://bugzilla.gnome.org/show_bug.cgi?id=595619
2009-09-21 15:39:00 +02:00
Matthias Clasen
53fc10d269 Fix a lot of clang complaints
Mostly dead assignments.
2009-09-18 19:20:06 -04:00
Christian Dywan
278ac0a45d Bug 579050 Allow making selected critical and warning messages non-fatal
Implement g_test_log_set_fatal_handler which is a function similar to
g_log_set_default_handler but for use in unit tests where certain
errors have to be ignored because it is not possible to fix or avoid
them otherwise. A unit test is added.
2009-09-10 16:45:49 +02:00
Dan Winship
bc1dd5cf11 Call element_free_func when shrinking array with g_ptr_array_set_size 2009-09-07 12:35:51 -04:00
Matthias Clasen
05c2aeaf33 Add a Since: tag 2009-09-04 20:41:25 -04:00
Benjamin Otte
24bec5c5bd Bug 594034 - Add g_mkstemp_full()
This function exposes more variables than g_mkstemp() and therefor
allows more flexibility when creating temporary files.
The intended use is gio's code for g_file_replace() (see next patch)
2009-09-04 22:45:07 +02:00
Dan Winship
8212aadac7 g_time_val_from_iso8601: handle timezoneless dates
per ISO 8601:2004 4.2.5.2

Based on a patch from Andy Shevchenko
http://bugzilla.gnome.org/show_bug.cgi?id=589491
2009-09-01 09:40:03 -04:00
Matthias Clasen
3ba64e72cf Read /dev/urandom unbuffered
To avoid wasting entropy. Bug 593232.
2009-08-27 22:59:05 -04:00
Christian Persch
8ef30758d5 Preserve errno
When using errno in g_set_error with _(), preserve errno. Bug #592457.
2009-08-22 15:08:43 +02:00
Benjamin Otte
981d14e85c Improve documentation for g_error_matches() 2009-08-18 11:35:01 +02:00
Tor Lillqvist
1b298d6a1b Avoid gcc warning on Windows
Avoid "function declaration isn't a prototype" warnings from gcc 4.4
in the Windows-specific code.
2009-08-14 23:04:55 +03:00
Alexander Larsson
d20a188b12 Only fsync if the existing file is > 0 bytes
This means we don't sync in the case where we created an (empty)
temp file and now replace it with the data.

This fixes (among other things) the performance of trashing files.
2009-08-11 20:26:12 +02:00
Craig Loftus
a465508e2d Migrate gbase64 docs from SGML template to inline comments
Fixes bug #589649.

Signed-off-by: David King <davidk@openismus.com>
2009-08-10 15:40:01 +02:00