Commit Graph

101 Commits

Author SHA1 Message Date
Ryan Lortie
4ec6d47806 GStaticMutex: remove ./configure checks
Now that GMutex is exposed we can avoid the dance we did in ./configure
to allocate the correct amount of space for it within the GStaticMutex.

Remove the checks and move the definitions to gthread.h, trying very
hard to keep ABI-stable (even though we will be deprecating this soon).
2011-09-21 16:06:53 -04:00
Matthias Clasen
e02b062635 Use xlocale functions where available
Implement g_ascii_strto{d,ll,ull} and g_ascii_formatd using
xlocale functions where available. This is slightly faster
and a lot less icky than our homegrown code.

https://bugzilla.gnome.org/show_bug.cgi?id=640293
2011-09-17 22:48:39 -04:00
Matthias Clasen
61b51555ec Cosmetics
Make configure --help output a little more regular, by using
AC_HELP_STRING() more consistently.
2011-09-11 13:15:29 -04:00
Ryan Lortie
96e4896804 invert gthread-impl includes
configure.ac defined G_THREAD_SOURCE and gthread-impl would #include it.

Instead, since we only have two thread implementations now, and since we
always use the Windows one only on Windows, move the logic to the
Makefile, predicated on 'if OS_WIN32'.  Then have the chosen backend do
the #include "gthread-impl.c" from there.

Remove the G_THREAD_SOURCE define from configure.ac.
2011-09-09 12:47:40 -04:00
Ryan Lortie
715f94e951 Remove support for DCE threads 2011-09-09 12:47:40 -04:00
Dan Winship
5a30712dc7 Remove !g_thread_supported() codepaths in gio
In particular, remove the libasyncns import, which was only used by
GUnixResolver, which is only used when threads are not available.
Likewise remove GWin32Resolver, and the hacky broken non-threaded
parts of GIOScheduler.

https://bugzilla.gnome.org/show_bug.cgi?id=616754
2011-09-09 12:47:39 -04:00
Dan Winship
5bc7729d16 Make threads mandatory
G_THREADS_ENABLED still exists, but is always defined. It is still
possible to use libglib without threads, but gobject (and everything
above it) is now guaranteed to be using threads (as, in fact, it was
before, since it was accidentally impossible to compile with
--disable-threads).

https://bugzilla.gnome.org/show_bug.cgi?id=616754
2011-09-09 12:41:55 -04:00
Ryan Lortie
8060a7a207 'master' is now glib 2.31.0 2011-09-06 10:55:09 -04:00
Ryan Lortie
9d6b55499f glib 2.29.90 2011-09-06 10:08:34 -04:00
Ryan Lortie
b6fdbb8e44 g_date_time_format: honour T_FMT_AMPM for '%r'
We had the 12 hour time format hard-coded to "%02d:%02d:%02d %s" but it
actually changes depending on the locale.  Just with the other formats,
use nl_langinfo() if we have it, otherwise fall back on gettext().
2011-09-04 23:55:58 -04:00
Matthias Clasen
6274386e52 Only use gcc-specific options when the compiler is gcc
The -Wstrict-aliasing option that we use to compile atomic
tests does not exist with compilers other than gcc, so
don't pass it to those.
https://bugzilla.gnome.org/show_bug.cgi?id=652272
https://bugzilla.gnome.org/show_bug.cgi?id=656152
2011-09-04 20:06:53 -04:00
Patrick Welche
afa82ae805 Avoid getmntinfo
- getmntinfo can take struct statfs or statvfs depending on the
  OS. Use getvfsstat and if not found getfsstat instead. Idea from
  Dan Winship.
- g_local_file_query_filesystem_info(): use statvfs.f_fstypename
  if available

https://bugzilla.gnome.org/show_bug.cgi?id=617949
2011-09-04 17:50:41 -04:00
Dan Winship
e943366de5 configure: fix win32 build
Only require -lresolv on unix, like before

https://bugzilla.gnome.org/show_bug.cgi?id=645336
2011-09-04 08:42:03 -04:00
Ryan Lortie
2d7051e3a3 g_date_time_format: improve support for alt digits
Improve a few situations where g_date_time_format() was getting the
padding wrong when displaying alt digits (eg: Arabic numerals) for
formatting time.

We now depend on nl_langinfo (_NL_CTYPE_OUTDIGITn_WC) to do the
conversion, which is very likely glibc-specific, but our previous method
relied on a glibc-specific printf() feature, so no harm done there.

Add a configure check for nl_langinfo (_NL_CTYPE_OUTDIGITn_WC).

Uncomment a few testcases that were failing previously.

https://bugzilla.gnome.org/show_bug.cgi?id=658107
2011-09-03 23:06:18 -04:00
Dan Winship
0d63793129 configure: check if -lsocket is needed (for Solaris)
Also, link libgio to -lresolv explicitly, rather than depending on
getting it implicitly via the libasyncns build (which should
eventually be going away).

https://bugzilla.gnome.org/show_bug.cgi?id=645336
2011-09-03 19:58:40 -04:00
Ryan Lortie
ab8938c64d Revert "gdatetime: Add g_date_time_source_new()"
This reverts three commits:

 - 1feb752996
 - 5763c63147
 - 21a5389340

https://bugzilla.gnome.org/show_bug.cgi?id=655129
2011-08-31 12:56:28 -04:00
Matthias Clasen
780591b542 Post-release version bump 2011-08-30 11:44:57 -04:00
Matthias Clasen
c6850add98 2.29.18 2011-08-30 11:14:37 -04:00
Colin Walters
5763c63147 Add Linux timerfd_create() backend for g_date_time_source_new()
This makes the source efficient on Linux.

Tested on Fedora 15 x86_64 + updates, kernel-2.6.40-4.fc15.x86_64
Also tested fallback code for unsupported flag TFD_TIMER_CANCEL_ON_SET
on kernel 2.6.38.

https://bugzilla.gnome.org/show_bug.cgi?id=655129
2011-08-29 10:24:37 -04:00
Dieter Verfaillie
0eaec4e59a Avoid using - (hyphen) in gdbus-codegen directory name
It's an invalid character in Python module names and prevents us from
being able to import it.

https://bugzilla.gnome.org/show_bug.cgi?id=650763
2011-08-25 16:55:46 -04:00
Matthias Clasen
527dc86722 GDateTime: use nl_langinfo() when available
This makes g_date_time_format() react to LC_TIME, which is
what people expect.

Translators: this change means that the GDateTime strings
are only used when the C library does not already provide
suitable translated strings for these (month names, etc).
2011-08-21 23:48:07 -04:00
Ryan Lortie
b18ca488ae post-release bump 2011-08-15 21:01:52 -04:00
Ryan Lortie
e17ce3594e glib 2.29.16 2011-08-15 21:01:28 -04:00
Matthias Clasen
3c504e4765 Fix statfs/statvfs decision
We want to force use of statvfs when statfs is deficient.
This does not make any difference on Linux.

https://bugzilla.gnome.org/show_bug.cgi?id=656151
2011-08-13 15:07:38 -04:00
Behdad Esfahbod
3492122112 Bug 652827 - glib-2.29.8 no longer builds with mingw.org's toolchain
Check for Win32 atomic intrinsics.
2011-08-11 08:40:43 +02:00
Behdad Esfahbod
fc442bdbe6 Cleanup gatomic checks 2011-08-11 08:40:42 +02:00
Behdad Esfahbod
21e682388d Fix typo 2011-08-11 08:40:42 +02:00
Simon McVittie
8f50354870 Allow current lcov (version 1.9) to be used for coverage
It seems to work fine with the same invocation already used.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=656162
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-09 10:36:40 +01:00
Colin Walters
2512341fa6 Require Python 2.5 explicitly
Without someone to regularly test 2.4, and since the code in reality
requires 2.5, switch to that for now.
2011-08-06 09:36:49 -04:00
Colin Walters
b3111f87e2 configure: Fix statvfs/statfs detection
Add missing 'x' as pointed out by declanw@is.bbc.co.uk

https://bugzilla.gnome.org/show_bug.cgi?id=656048
2011-08-06 09:22:44 -04:00
Ryan Lortie
0584f0c504 GWakeup: test fallback case
We need to test the case of eventfd in the libc but no kernel support.

In order to do that, we add a separate compile of the GWakeup testcase
that interposes an 'eventfd' symbol that always returns -1 with errno
set.  That will trigger the fallback case.
2011-07-25 17:43:28 +02:00
Ryan Lortie
7df304a2d8 Bump the version 2011-07-22 09:48:34 +02:00
Ryan Lortie
a6c936c45f Release 2.29.14 2011-07-22 08:55:35 +02:00
Matthias Clasen
265f245376 post-release bump 2011-07-19 23:04:04 -04:00
Matthias Clasen
c073ce3a3b 2.29.12 2011-07-19 23:02:05 -04:00
Patrick Welche
7f289c924b Avoid failing arguments to statfs() test on systems which use statvfs.
- move choice of statfs vs statvfs from gio/glocalfile.c to configure.ac
- if statvfs is the choice, then don't check number of arguments to statfs()
- use choice in gio/gunixmounts.c as well

https://bugzilla.gnome.org/show_bug.cgi?id=617949
2011-07-18 14:17:28 -04:00
Matthias Clasen
65c6ebddee Post-release version bump
Up to 2.29.11
2011-07-05 11:22:11 -04:00
Matthias Clasen
89df070c1f 2.29.10 2011-07-05 11:21:40 -04:00
Ryan Lortie
b07f2833c0 Change to AM_MAINTAINER_MODE([enable])
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=653429
2011-06-27 11:31:26 +01:00
Colin Walters
fdca8060aa build: Cache check for futex() and eventfd() 2011-06-21 23:28:52 -04:00
Colin Walters
3904c8761a gmain: use Linux eventfd() for main context wake up
The Linux eventfd() call is basically tailor made for the main loop
wake up pipe - all we want is a threadsafe way to write to a file
descriptor, and wake up the context on the other end; we don't care
about the content at all.

The eventfd manual page basically explains the benefits:

       Applications can use an eventfd file descriptor instead of a
       pipe (see pipe(2)) in all cases where a pipe is used simply to
       signal events.  The kernel overhead of an eventfd file
       descriptor is much lower than that of a pipe, and only one file
       descriptor is required (versus the two required for a pipe).

When writing my multithreaded spawn test case I actually hit the 1024
file descriptor limit quickly, because we used 2 fds per main context.
This brings that down to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=653140
2011-06-21 23:28:52 -04:00
Javier Jardón
49fac943f3 configure.ac: Generate xz tarballs by default 2011-06-20 11:49:40 +01:00
Matthias Clasen
9a9cca9764 bump version 2011-06-13 23:54:59 -04:00
Matthias Clasen
9f11f054eb 2.29.8 2011-06-13 23:20:32 -04:00
Christophe Fergeau
28a9e91b13 Fix regression in qsort_r BSD detection
We can use AC_CHECK_FUNCS to detect if qsort_r is available on
the system or not since it will unconditionnally define
HAVE_QSORT_R, which we don't want since on BSD, qsort_r isn't usable
for us, so we don't want to have HAVE_QSORT_R defined on such platforms.
By using AC_CHECK_FUNC instead, we can defer defining HAVE_QSORT_R until
we have actually tested it's usable.

https://bugzilla.gnome.org/show_bug.cgi?id=651920
2011-06-10 15:18:58 +02:00
Kalev Lember
03441e406c configure.ac: Check for qsort_r function before running the test program
When cross compiling, test programs cannot be run. In order to make it
easier to cross compile for targets that do not have qsort_r(), check
for the function before trying to run the test program.

This avoid having to populate cache with glib_cv_have_qsort_r=no with
e.g. mingw cross compiler.

https://bugzilla.gnome.org/show_bug.cgi?id=651920
2011-06-05 19:38:47 +03:00
Kalev Lember
886a3499e1 configure.ac: Print qsort_r result only once
AC_CACHE_CHECK that was introduced in 70a19815 prints the result, so the
following AC_MSG_RESULT is no longer needed.
2011-06-05 19:37:49 +03:00
Matthias Clasen
b3effbf683 bump version 2011-06-04 20:06:44 -04:00
Matthias Clasen
3e6dc0d8fa 2.29.6 2011-06-04 19:05:51 -04:00
Matthias Clasen
3b9c8962dc configure.in: Use tar-ustar to avoid name length limitations
Also use dist-bzip2.
2011-06-04 14:43:20 -04:00