Commit Graph

123 Commits

Author SHA1 Message Date
Ryan Lortie
b2cb386b78 post-release bump 2011-11-21 15:21:23 -05:00
Ryan Lortie
36c21d4790 release glib 2.31.2 2011-11-21 14:23:17 -05:00
Christian Persch
eaaf18960f Fix the fix for G*_TO_POINTER casts on 32 bits
The 'fix' from commit 16292dd753 broke the
build on 32 bit because it was missing the parentheses around "gint" / "guint"
in glib_gp[u]i_cast.

https://bugzilla.gnome.org/show_bug.cgi?id=661546
2011-11-17 14:24:09 +01:00
Benjamin Otte
8863071b9d localfileenumerator: Take the type from the readdir() call
That way, we can avoid stat() calls for all enumerated files in various
cases. In particular in the autocompletion code in the GTK filechooser.
2011-11-16 17:22:03 +01:00
Lucas De Marchi
16292dd753 Fix G*_TO_POINTER casts on 32 bits
If we don't do the cast to the proper size in 32 bits, things like below
doesn't work:

uint8_t u = 20;
void *p;

p = GUINT_TO_POINTER(u);

Signed-off-by: Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=661546
2011-11-16 10:47:21 -05:00
Alexander Larsson
8d023c2706 win32: Use timeGetTime as monotonic base
This allows apps that need it to increase timer accuracy
using timeBeginPeriod
2011-11-16 09:10:46 +01:00
Matthias Clasen
375015018b Switch to using template-free docs build
All docs are finally inline, so we can do this switch.
2011-11-14 21:22:46 -05:00
Dan Winship
fe5ba0f291 add GNetworkMonitor, for... monitoring the network
Add GNetworkMonitor and its associated extension point, provide a base
implementation that always claims the network is available, and a
netlink-based implementation built on top of that that actually tracks
the network state.

https://bugzilla.gnome.org/show_bug.cgi?id=620932
2011-11-14 13:42:30 -05:00
Kristian Rietveld
f218353e04 Need to include xlocale.h on Darwin for strtod_l
This fixes the build of gstrfuncs.c on Darwin.
2011-11-09 08:32:33 +01:00
Robert Nagy
ba7bf09285 Fix some build issues on OpenBSD
Adapt to some OpenBSD header quirks.
Patch by Robert Nagy.

https://bugzilla.gnome.org/show_bug.cgi?id=661386
2011-10-24 21:20:14 -04:00
Ryan Lortie
3fd412549f configure.ac: join the cargo-cult of _cv_
For some reason, the setting of g_atomic_lock_free wasn't making it down
to the lower part of the configure script where glibconfig.h was being
generated when building using mingw32-configure.

If we prefix glib_cv_ to the start of the variable name (like everyone
else is doing) then it magically starts working.

I love you, automake.
2011-10-19 10:11:54 -04:00
Ryan Lortie
aba0f0c38b gatomic: introduce G_ATOMIC_LOCK_FREE
We clean up the detection of if we should do 'real' atomic operations or
mutex-emulated ones with the introduction of a new (public) macro:
G_ATOMIC_LOCK_FREE.  If defined, our atomic operations are guaranteed to
be done in hardware.

We need to use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to determine if our
compiler supports GCC-style atomic operations from the gatomic.h header
because we might be building a program against GLib using a different
set of compiler options (or a different compiler) than was used to build
GLib itself.

Unfortunately, this macro is not available on clang, so it has currently
regressed to using the mutex emulation.  A bug about that has been
opened here:

  http://llvm.org/bugs/show_bug.cgi?id=11174
2011-10-18 16:45:28 -04:00
Ryan Lortie
e5fd0f5df6 Revert "Bug 652827 - glib-2.29.8 no longer builds with mingw.org's toolchain"
This reverts commit 3492122112.
2011-10-17 10:55:02 -04:00
Ryan Lortie
306aa62ea5 drop -uninstalled.pc files
These were meant to provide the ability to use GLib directly out of its
build tree but have a couple of rather serious limitations that prevent
their serious use:

 - these files only worked with programs built using libtool

 - for non-trivial uses, other environment variables will need to be
   setup to allow GLib to function properly

 - the system doesn't stack well when attempting to use multiple
   libraries all uninstalled

The jhbuild --prefix= style system works much better in every way, so we
remove this old hack.
2011-10-16 19:14:18 -04:00
Ryan Lortie
a9a1c97904 gthread: move test cases to glib/ 2011-10-16 19:08:59 -04:00
Ryan Lortie
a5800ef336 Finish killing off GSystemThread 2011-10-12 23:04:15 -04:00
Dan Winship
71cf70b39c Simplify checks for CLOCK_MONOTONIC
Remove the complicated configure-time and runtime checks, and just use
CLOCK_MONOTONIC if it's defined.

https://bugzilla.gnome.org/show_bug.cgi?id=661421
2011-10-12 08:59:35 -04:00
Matthias Clasen
7455dd370e Make single includes mandatory
This has been the official line since 2.17, which seems plenty
long enough for a transition phase.
2011-10-12 00:25:38 -04:00
Matthias Clasen
0e3f530185 Remove cruft from g_strerror and g_strsignal
We can just assume that strerror/strsignal are available
nowadays. At the same time, drop use of thread-private storage.
Instead, always return interned strings.

https://bugzilla.gnome.org/show_bug.cgi?id=660849
2011-10-05 01:12:53 -04:00
Matthias Clasen
ddbd4acdfb Need to check for prlimit 2011-10-05 01:04:02 -04:00
Matthias Clasen
1909d2398a Make thread names useful in a debugger
Associate the name with the system thread, so that debuggers
can see it. This is currently only implemented for Linux, using
prctl.

https://bugzilla.gnome.org/show_bug.cgi?id=660635
2011-10-02 22:11:58 -04:00
Matthias Clasen
e6c76d9fd4 Clean up atomic cruft
Nothing is using these defines anymore, and the messages
are misleading. Based on a patch by Kean Johnston.

https://bugzilla.gnome.org/show_bug.cgi?id=660013
2011-09-29 23:20:09 -04:00
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