diff options
-rw-r--r-- | ChangeLog | 45 | ||||
-rw-r--r-- | configure.in | 29 | ||||
-rw-r--r-- | dbus/dbus-errors.c | 24 | ||||
-rw-r--r-- | dbus/dbus-errors.h | 2 | ||||
-rw-r--r-- | dbus/dbus-sysdeps-unix.c | 6 | ||||
-rw-r--r-- | dbus/dbus-sysdeps.h | 10 |
6 files changed, 90 insertions, 26 deletions
@@ -12,6 +12,14 @@ * tools/dbus-launch.c: convert C++-style comment to C-style, add {} for clarity * .gitignore: ignore vi swapfiles + * dbus/dbus-errors.h, dbus/dbus-errors.c: Add DBUS_ERROR_INIT macro + for the benefit of libdbus users whose coding style allows initialized + variables (although dbus core coding style doesn't) + * configure.in, dbus/dbus-sysdeps.h, dbus/dbus-sysdeps-unix.c: Fix + detection of i486 atomic ops. Previously, the attempts to determine + support at compile-time on Darwin were causing the i486 atomic ops to + be used on *all* i386 or x86-64 GCC builds (AH_VERBATIM can't be + conditionalized like we were trying to). 2007-10-10 Simon McVittie <simon.mcvittie@collabora.co.uk> @@ -26,6 +34,16 @@ * .gitignore: add various things that weren't in .cvsignore because CVS implicitly ignored them; generally bring up to date +2007-10-09 John (J5) Palmieri <johnp@redhat.com> + + * tools/run-with-tmp-session-bus.sh: Fix env exports for better + portability (#9280) + * tools/dbus-send.1: Document syntax for container types in dbus-send + man file (#9553) - patch from Jack Spaar <jspaar at + users.sourceforge.net> + + [Both OK for MIT/X11 relicensing -smcv] + 2007-10-09 Simon McVittie <simon.mcvittie@collabora.co.uk> * doc/dbus-specification.xml: Specifically forbid empty structs (#7969) @@ -35,6 +53,33 @@ [All of the above are OK for MIT/X11 licensing] +2007-10-03 John (J5) Palmieri <johnp@redhat.com> + + * dbus/dbus-internals.h: fd.o bug #11678 Don't error out if compiler + does not support vararg macros. _dbus_verbose is the only function + that does this so make it a noop if vararg macros are not supported + * bus/selinux.c, dbus/dbus-sysdeps-util-unix.c: fd.o bug #12429 + Reverse check to setpcap and only init audit if we were root + (patch by Dan Walsh <dwalsh@redhat.com>, + https://bugs.freedesktop.org/show_bug.cgi?id=12429). Reverse + we_were_root check to setpcap if we were root. Also only init audit + if we were root. So error dbus message will not show up when policy + reload happens. dbus -session will no longer try to send audit + message, only system will. + * configure.in: fd.o bug #11872 improve linker test for --gc-sections. + Patch by Tim Mooney <enchanter at users.sourceforge.net> + * configure.in, dbus/dbus-sysdeps.c: fd.o bug #11872 fix clearenv for + systems that do not have it. Patch from Brian Cameron <brian.cameron + at sun.com> + * tools/dbus-launch.c: fd.o bug #12547 remove superfluous if. + Also convert tabs to spaces + * configure.in, bus/Makefile.am, dbus/Makefile.am: Correctly implement + -fPIC and -fPIE. For security reasons we want possition independent + code for libraries and possition independent executable for + executables. Before we were just enabling -fPIC. Now we correctly + enable -fPIC and -PIE for libdbus and the bus respectively. Proper + LD_FLAGS are set for each also. + 2007-09-20 Ryan Lortie <desrt@desrt.ca> Add argument path matching support. Bug #11066. diff --git a/configure.in b/configure.in index d2c5e568..f5d4edc2 100644 --- a/configure.in +++ b/configure.in @@ -537,7 +537,7 @@ fi #### Atomic integers (checks by Sebastian Wilhelmi for GLib) AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers]) -have_atomic_inc=no +have_atomic_inc_cond=0 if test x"$GCC" = xyes; then if test "x$enable_ansi" = "xyes"; then AC_MSG_RESULT([no]) @@ -552,18 +552,13 @@ if test x"$GCC" = xyes; then AC_MSG_RESULT([darwin]) # check at compile-time, so that it is possible to build universal # (with multiple architectures at once on the compile line) - AH_VERBATIM([DBUS_USE_ATOMIC_INT_486_DARWIN], [ - #if (defined(__i386__) || defined(__x86_64__)) - # define DBUS_USE_ATOMIC_INT_486 1 - #endif - ]) + have_atomic_inc_cond="(defined(__i386__) || defined(__x86_64__))" ;; *) AC_MSG_RESULT([i486]) - AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486]) + have_atomic_inc_cond=1 ;; esac - have_atomic_inc=yes ;; *) AC_MSG_RESULT([no]) @@ -571,20 +566,10 @@ if test x"$GCC" = xyes; then esac fi fi -if test x$have_atomic_inc = xyes ; then - case $host_os in - darwin*) - AH_VERBATIM([DBUS_HAVE_ATOMIC_INT_DARWIN], [ - #if (defined(__i386__) || defined(__x86_64__)) - # define DBUS_HAVE_ATOMIC_INT 1 - #endif - ]) - ;; - *) - AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present]) - ;; - esac -fi +AC_DEFINE_UNQUOTED([DBUS_USE_ATOMIC_INT_486_COND], ["$have_atomic_inc_cond"], + [Always defined; expands to 1 if we should use atomic integer implementation for 486, else 0]) +AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT_COND, ["$have_atomic_inc_cond"], + [Always defined; expands to 1 if we have an atomic integer implementation, else 0]) #### Various functions AC_CHECK_LIB(socket,socket) diff --git a/dbus/dbus-errors.c b/dbus/dbus-errors.c index d0a80b02..9629c682 100644 --- a/dbus/dbus-errors.c +++ b/dbus/dbus-errors.c @@ -34,7 +34,29 @@ * @brief Error reporting internals * @{ */ - + +/** + * @def DBUS_ERROR_INIT + * + * Expands to a suitable initializer for a DBusError on the stack. + * Declaring a DBusError with: + * + * @code + * DBusError error = DBUS_ERROR_INIT; + * + * do_things_with (&error); + * @endcode + * + * is a more concise form of: + * + * @code + * DBusError error; + * + * dbus_error_init (&error); + * do_things_with (&error); + * @endcode + */ + /** * Internals of DBusError */ diff --git a/dbus/dbus-errors.h b/dbus/dbus-errors.h index e01818c4..0a480d8c 100644 --- a/dbus/dbus-errors.h +++ b/dbus/dbus-errors.h @@ -58,6 +58,8 @@ struct DBusError void *padding1; /**< placeholder */ }; +#define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL } + void dbus_error_init (DBusError *error); void dbus_error_free (DBusError *error); void dbus_set_error (DBusError *error, diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 0ab5e730..2ce7427b 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -1741,7 +1741,7 @@ _dbus_parse_uid (const DBusString *uid_str, _DBUS_DEFINE_GLOBAL_LOCK (atomic); -#ifdef DBUS_USE_ATOMIC_INT_486 +#if DBUS_USE_ATOMIC_INT_486_COND /* Taken from CVS version 1.7 of glibc's sysdeps/i386/i486/atomicity.h */ /* Since the asm stuff here is gcc-specific we go ahead and use "inline" also */ static inline dbus_int32_t @@ -1768,7 +1768,7 @@ atomic_exchange_and_add (DBusAtomic *atomic, dbus_int32_t _dbus_atomic_inc (DBusAtomic *atomic) { -#ifdef DBUS_USE_ATOMIC_INT_486 +#if DBUS_USE_ATOMIC_INT_486_COND return atomic_exchange_and_add (atomic, 1); #else dbus_int32_t res; @@ -1791,7 +1791,7 @@ _dbus_atomic_inc (DBusAtomic *atomic) dbus_int32_t _dbus_atomic_dec (DBusAtomic *atomic) { -#ifdef DBUS_USE_ATOMIC_INT_486 +#if DBUS_USE_ATOMIC_INT_486_COND return atomic_exchange_and_add (atomic, -1); #else dbus_int32_t res; diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index eadfb433..1a52e7fb 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -199,6 +199,16 @@ struct DBusAtomic #endif }; +/* The value we get from autofoo is in the form of a cpp expression; + * convert that to a conventional defined/undef switch. (We can't get + * the conventional defined/undef because of multiarch builds only running + * ./configure once, on Darwin.) */ +#if DBUS_HAVE_ATOMIC_INT_COND +# define DBUS_HAVE_ATOMIC_INT 1 +#else +# undef DBUS_HAVE_ATOMIC_INT +#endif + dbus_int32_t _dbus_atomic_inc (DBusAtomic *atomic); dbus_int32_t _dbus_atomic_dec (DBusAtomic *atomic); |