From 9e15a4f969e53a0fc3775fefeba7ac5ed7b5d0e6 Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Sat, 28 Jun 2003 22:56:27 +0000 Subject: 2003-06-29 Miloslav Trmac * dbus/dbus-mainloop.c (_dbus_loop_remove_watch) (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used --- ChangeLog | 8 ++++++++ configure.in | 40 +++++++++++++++++++++++++++------------- dbus/dbus-mainloop.c | 4 ++-- 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00b421e0..dd87a635 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-06-29 Miloslav Trmac + + * dbus/dbus-mainloop.c (_dbus_loop_remove_watch) + (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p + + * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS + and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used + 2003-06-24 Havoc Pennington * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0) diff --git a/configure.in b/configure.in index 5d699faa..f8e69caf 100644 --- a/configure.in +++ b/configure.in @@ -109,6 +109,16 @@ if test "x$GCC" = "xyes"; then *) CFLAGS="$CFLAGS -ansi" ;; esac + case " $CFLAGS " in + *[\ \ ]-D_POSIX_C_SOURCE*) ;; + *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;; + esac + case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; @@ -272,19 +282,23 @@ AC_C_BIGENDIAN AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers]) have_atomic_inc=no if test x"$GCC" = xyes; then - case $host_cpu in - i386) - AC_MSG_RESULT([no]) - ;; - i?86) - AC_MSG_RESULT([i486]) - AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486]) - have_atomic_inc=yes - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac + if test "x$enable_ansi" = "xyes"; then + AC_MSG_RESULT([no]) + else + case $host_cpu in + i386) + AC_MSG_RESULT([no]) + ;; + i?86) + AC_MSG_RESULT([i486]) + AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486]) + have_atomic_inc=yes + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac + fi fi if test x$have_atomic_inc = xyes ; then AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present]) diff --git a/dbus/dbus-mainloop.c b/dbus/dbus-mainloop.c index 04c8f1de..51eb7b0d 100644 --- a/dbus/dbus-mainloop.c +++ b/dbus/dbus-mainloop.c @@ -282,7 +282,7 @@ _dbus_loop_remove_watch (DBusLoop *loop, } _dbus_warn ("could not find watch %p function %p data %p to remove\n", - watch, function, data); + watch, (void *)function, data); } dbus_bool_t @@ -336,7 +336,7 @@ _dbus_loop_remove_timeout (DBusLoop *loop, } _dbus_warn ("could not find timeout %p function %p data %p to remove\n", - timeout, function, data); + timeout, (void *)function, data); } /* Convolutions from GLib, there really must be a better way -- cgit