Commit Graph

326 Commits

Author SHA1 Message Date
Ryan Lortie
e15ba53cda configure.ac: fix typo in last patch
20e709d8b9 fixed some issues in
configure.ac but also introduced a typo.  Fix that.
2014-07-27 10:08:47 +02:00
Alessandro Di Federico
20e709d8b9 configure: Remove unintentional nested functions
More of the same as 9362a1b2d9.

https://bugzilla.gnome.org/show_bug.cgi?id=733715
2014-07-26 10:02:32 +02:00
Simon McVittie
9060a85193 glib-init: statically assert that we have 8-bit bytes
configure.ac assumes this.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932
2014-07-23 09:18:43 +01:00
Matthias Clasen
79e63d4e5d Bump version 2014-07-14 10:48:09 -04:00
Matthias Clasen
bc56512dd7 Bump version 2014-06-23 23:14:56 -04:00
Matthias Clasen
1429ff12d8 2.41.1 2014-06-23 21:58:07 -04:00
Ryan Lortie
9362a1b2d9 configure.ac: fix check for futex and eventfd
We were using AC_LANG_PROGRAM to build a program to test for our ability
to call syscall (__NR_futex, ...);.  This macro adds "main () { ... }"
around the provided code segment automatically.  The provided code
segment provided its own main() function, however.

The result looked something like:

int main (void) {
  int main (void) {
    ...
  }
}

which worked on GCC, but not on clang.

Let's fix that.  Let's fix the same mistake copied over for eventfd()
detection while we're at it.
2014-06-20 16:00:48 -04:00
Erik van Pienbroek
9f69534030 Prevent an invalid @CARBON_LIBS@ from appearing in the .pc files
Fixes static linking when using the glib pkgconfig file.
Regression was introduced in commit 8d037c6 (bz #668152)

https://bugzilla.gnome.org/show_bug.cgi?id=731657
2014-06-14 14:21:37 -04:00
Chun-wei Fan
6eb55b9a33 Support Building Using Visual Studio 2013
Like the Visual Studio 2012 project files, the Visual Studio 2013 files are
largely the same as the Visual Studio 2010 project files, so support
Visual Studio 2013 by updating the autotools scripts that is used for
Visual Studio 2012.  This means that project files for Visual Studio 2012
and Visual Studio 2013 can be maintained by simply maintaining the Visual
Studio 2010 project files, adding minimal maintenance overhead.
2014-06-03 15:50:37 +08:00
Antoine Jacoutot
6c7972a05c build: also unset LIBS when LDFLAGS is unset
On OpenBSD, libintl is installed under /usr/local/lib. When configure
checks unset LDFLAGS, LIBS should also be unset otherwise we end up with
-lintl which cannot be found resulting to the compile check to fail.

https://bugzilla.gnome.org/show_bug.cgi?id=727939
2014-04-15 15:12:08 +02:00
Antoine Jacoutot
74ec947079 openbsd: remove -pthread
This is not needed any longer; libpthread is properly included in
shared libs on OpenBSD where -pthread -lpthread mean the same.
2014-04-12 07:56:09 +02:00
Alexandre Rostovtsev
2b178c762f gobject: try to link with -Wl,-z,nodelete
Since the type system does not support reloading its data and assumes
that libgobject remains loaded for the lifetime of the process, we
should link libgobject with a flag indicating that it can't be unloaded.

https://bugzilla.gnome.org/show_bug.cgi?id=707298
2014-04-10 01:38:41 -04:00
Philip Withnall
8d037c678d build: Include Cocoa/Carbon in Libs.private if targetting Mac OS X
This allows static linking against GIO on OS X, which would previously
fail due to unresolved symbols from the above two frameworks.

https://bugzilla.gnome.org/show_bug.cgi?id=668152
2014-04-01 19:11:32 +01:00
Dan Winship
31694f9ccb Bump version to 2.41.0, add GLIB_VERSION_2_42, etc 2014-03-29 12:54:29 -04:00
Ryan Lortie
599c669b23 GLib 2.39.92 2014-03-17 17:18:47 -04:00
Ryan Lortie
73060f5e78 slow-motion post-release version bump 2014-02-21 07:56:26 -05:00
Ryan Lortie
1de36e7755 Fix g_cond_wait_until() vs. monotonic time
We've had a relatively rocky path with g_cond_wait_until() on systems
that either don't support pthread_condattr_setclock() or where
g_get_monotonic_time() is not based on CLOCK_MONOTONIC (ie: Android and
Mac OS).

Fortunately, both of these platforms seem to share
pthread_cond_timedwait_relative_np() which allows us to implement
g_cond_wait_until() without races.

With this patch, we now require that one of pthread_condattr_setclock()
or pthread_cond_timedwait_relative_np() exists.  A quick look around
suggests that this is true for all platforms that we care about.

This patch removes our use of pthread_cond_timedwait_monotonic() and
pthread_cond_timedwait_monotonic_np() which were Android-only APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=673607
2014-02-20 17:55:09 -05:00
Ryan Lortie
d614312546 gmain: rework g_get_monotonic_time() a bit
We now assume the existence of clock_gettime() and CLOCK_MONOTONIC as
specified by POSIX.1-2001.  This means that we always return truly
monotonic time, which will prevent problems in the case that the user
changes the time.

Mac OS doesn't have clock_gettime() but it does have
mach_absolute_time(), so we can use that there.

We keep our Windows case as well (although we should simplify it once XP
hits EOL later this year).

This patch removes the fallback to gettimeofday() in case of missing
clock_gettime().  We no longer have any way to test this codepath and
therefore it must go.

This patch also restructures the #ifdef a bit so that we repeat the
entire function definition inside of #ifdef instead of just the entire
body of one function.

https://bugzilla.gnome.org/show_bug.cgi?id=724687
2014-02-20 17:52:49 -05:00
Ryan Lortie
ec17605d4f GLib 2.39.90 2014-02-17 18:33:34 -05:00
Matthias Clasen
c81834c089 Bump gtk-doc dep to 1.20 2014-02-17 16:57:13 -05:00
Ryan Lortie
450e7b1036 configure.ac: tweak inotify check
Our check for inotify_init1() being defined is broken.  We happily
declare that inotify is supported, even if the check fails.

This was originally intended to check for inotify_init1 in the libc so
that we could fall back to inotify_init if it was not yet defined.

FreeBSD has a libinotify that emulates the inotify API via kqueue.  It
installs a <sys/inotify.h> header and requires linking to -linotify.  We
don't want to falsely detect working inotify in this case.

Treat the lack of inotify_init1() in the libc as a lack of inotify
support.  This requires only a new libc -- we still support old kernels:
in the case that inotify1_init() fails, we fall back to inotify_init().

https://bugzilla.gnome.org/show_bug.cgi?id=724330
2014-02-14 10:42:40 -05:00
Matthias Clasen
7a76ab6f48 Bump version 2014-02-03 19:34:15 -05:00
Matthias Clasen
e7db49b6e3 2.39.4 2014-02-03 19:06:53 -05:00
Matthias Clasen
ff9a61eed9 Fix CFLAGS manipulation
The code for ensuring that CFLAGS contain -g if
--enable-debug has been specified did not work right.

https://bugzilla.gnome.org/show_bug.cgi?id=685204
2014-01-20 08:16:09 -05:00
Matthias Clasen
8aeb391a77 Improve GIOModule test coverage
Add a dedicated test for GIOModule.
2014-01-01 17:59:21 -05:00
Ryan Lortie
3f41e49285 Use POSIX-specified <poll.h> over <sys/poll.h>
POSIX specifies that <poll.h> is the correct header to include for
poll(), so let's do that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=141251
2013-12-22 11:33:07 -05:00
Matthias Clasen
2f01b0975e Some tweaks to coverage support
Rename the configure option to --enable-coverage, and make
it quiet by default.
2013-12-21 13:22:00 -05:00
Matthias Clasen
4846fd923d Bump version 2013-12-17 00:45:41 -05:00
Matthias Clasen
698393f15d Fix the stack direction check again
Turns out I got it wrong.
2013-11-23 21:09:32 -05:00
Matthias Clasen
341c0b1988 Improve stack direction detection
When the function in the test program is inlined, all bets are
off whether the detection will work correctly or not. Make it
harder for the compiler to play games on us by making the
function recursive.

https://bugzilla.gnome.org/show_bug.cgi?id=307947
2013-11-23 20:27:04 -05:00
Matthias Clasen
df71ecfc2d Fix the configure check for growing stack
The check was getting the direction wrong, as proven by the
just committed signal invocation hint test.

https://bugzilla.gnome.org/show_bug.cgi?id=711871
2013-11-23 20:26:10 -05:00
Dan Winship
158dde0507 Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX
In Windows development environments that have it, <unistd.h> is mostly
just a wrapper around several other native headers (in particular,
<io.h>, which contains read(), close(), etc, and <process.h>, which
contains getpid()). But given that some Windows dev environments don't
have <unistd.h>, everything that uses those functions on Windows
already needed to include the correct Windows header as well, and so
there is never any point to including <unistd.h> on Windows.

Also, remove some <unistd.h> includes (and a few others) that were
unnecessary even on unix.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:25:39 -05:00
Dan Winship
3981cddbf8 Require POSIX.1 (1990) compliance on unix
Assume unix platforms support the original POSIX.1 standard.
Specifically, assume that if G_OS_UNIX, then we have chown(),
getcwd(), getgrgid(), getpwuid(), link(), <grp.h>, <pwd.h>,
<sys/types.h>, <sys/uio.h>, <sys/wait.h>, and <unistd.h>.

Additionally, since all versions of Windows that we care about also
have <sys/types.h>, we can remove HAVE_SYS_TYPES_H checks everywhere.

Also remove one include of <sys/times.h>, and the corresponding
configure check, since the include is not currently needed (and may
always have just been a typo for <sys/time.h>).

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:17:42 -05:00
Dan Winship
6e4a7fca43 Require C90 compliance
Assume all supported platforms implement C90, and therefore they
(correctly) implement atexit(), memmove(), setlocale(), strerror(),
and vprintf(), and have <float.h> and <limits.h>.

(Also remove the configure check testing that "do ... while (0)" works
correctly; the non-do/while-based version of G_STMT_START and
G_STMT_END was removed years ago, but the check remained. Also, remove
some checks that configure.ac claimed were needed for libcharset, but
aren't actually used.)

Note that removing the g_memmove() function is not an ABI break even
on systems where g_memmove() was previously not a macro, because it
was never marked GLIB_AVAILABLE_IN_ALL or listed in glib.symbols, so
it would have been glib-internal since 2004.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:16:16 -05:00
Dan Winship
7f5b2901cf Remove alleged support for last-millennium Unixes
Remove workarounds for NeXTStep (last released in 1995), SunOS (1994),
HP-UX 9.x (1992) and 10.x (1995), OSF/1 / Digital UNIX / Tru64 UNIX
4.x (1999), and AIX 4.x (1999).

HP-UX 11 implements dlopen(), so dropping support for earlier versions
also lets us remove the HP-UX-specific gmodule-dld.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:16:16 -05:00
Dan Winship
51a917bc16 Remove alleged support for BeOS
Since the initial addition of BeOS support in 1999, there has only
been one update to it (in 2005, and it wasn't even very big). GLib is
known to not currently build on Haiku (or presumably actual BeOS)
without additional patching, and the fact that there isn't a single
G_OS_BEOS check in gio/ is suspicious.

Additionally, other than the GModule implementation, all of the
existing G_OS_BEOS checks are either (a) "G_OS_UNIX || G_OS_BEOS", or
(b) random minor POSIXy tweaks (include this header file rather than
that one, etc), suggesting that if we were going to support Haiku, it
would probably be simpler to treat it as a special kind of G_OS_UNIX
(as we do with Mac OS X) rather than as its own completely different
thing.

So, kill G_OS_BEOS.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:16:16 -05:00
Michael Haubenwallner
1f0573d2e6 AIX splice() is something different
AIX does provide the splice() symbol, but this does have different
signature and usecase than what Linux may provide.

https://bugzilla.gnome.org/show_bug.cgi?id=712314
2013-11-18 14:48:55 -05:00
Michael Haubenwallner
efb1701bf3 Use AC_HEADER_MAJOR
Instead of checking for sys/mkdev.h headerfile, there is the
AC_HEADER_MAJOR helper for how to get major(), minor(), makedev().

https://bugzilla.gnome.org/show_bug.cgi?id=712314
2013-11-18 14:47:53 -05:00
Ryan Lortie
d33f758313 bump version 2013-11-12 00:19:50 -05:00
Ryan Lortie
c0865fbaf2 bump version
dconf needs the new version with read_user_value() on the backend API.
2013-10-28 10:23:29 -07:00
John Ralls
5aead642c2 Restore gl_GLIBC21 to configure; needed for libcharset 2013-10-04 11:47:46 -07:00
William Orr
7eb1e5fc5b glocalfile: Only use O_DIRECTORY if available
Solaris 10 for example doesn't have it.

https://bugzilla.gnome.org/show_bug.cgi?id=708860
2013-09-26 15:22:51 -04:00
Ryan Lortie
d974d2ec8f Bump version to 2.39.0 2013-09-23 17:47:49 -04:00
Ryan Lortie
c8de2b11bb GLib 2.38.0 2013-09-23 17:07:33 -04:00
Ryan Lortie
373980f545 bump 2013-09-16 14:14:07 -04:00
Ryan Lortie
f4c3e56f19 GLib 2.37.92 2013-09-16 13:47:04 -04:00
Matthias Clasen
801a5c8bb2 bump version 2013-09-02 12:12:58 -04:00
Antoine Jacoutot
996edb0c46 fix atomic ops detection
AC_TRY_LINK should be used instead of AC_TRY_COMPILE because the code
will compile everywhere, either producing ``atomic'' code, or an
external reference to __sync_bool_compare_and_swap.

https://bugzilla.gnome.org/show_bug.cgi?id=706958
2013-08-28 12:01:44 +02:00
Matthias Clasen
a4363582b0 post-release bump 2013-08-19 23:54:43 -04:00
Matthias Clasen
0f46a48ee3 post-release version bump 2013-07-29 18:07:32 -04:00