When built using cmake, the libdbus shared library contains code that's normally only used by modules that statically link libdbus-internal, i.e. the bus daemon and regression tests:
# for debugging
# for debugging
It should only need to contain the LIB and SHARED parts.
The shared library also includes dbus-auth-script, which is also unused.
Depends on Bug #29228, to make the CMake build system usable on Linux again (so I can test it).
Removing the util sources might conceivably break CMake builds on Windows, but if it does, the same changes are probably desirable for autotools (mingw32) builds anyway (e.g. commit 49d1e3fa5a9).
Created attachment 47991 [details] [review]
[PATCH 1/2] cmake: don't include -util sources in the shared library
Created attachment 47992 [details] [review]
[PATCH 2/2] Remove dbus-auth-script from the shared library
Review of attachment 47991 [details] [review]:
Seems sane to me. (no reviewer hat)
Review of attachment 47992 [details] [review]:
Looks OK too. (no reviewer hat)
Created attachment 52259 [details] [review]
_dbus_get_environment: move from shared library to dbus-sysdeps-util
Thanks, both applied for 1.5.10. Here's one more.
Review of attachment 52259 [details] [review]:
no-hat-review++ independently from any changes.
@@ +39,3 @@
+extern char **environ;
+# include <crt_externs.h>
I know it's a copy&paste, but since you changed the #include into "do nothing" ... :)
Do we have just UNIX WIN and MAC right?
isn't it clearer to use a
explicitly and leave a comment about DBUS_WIN declaration instead?
Unless the #else catches more than DBUS_UNIX-only of course.
The same way, the other file includes stdlib.h conditionally for WIN even if it's already included, so the if branch turns to be useless.
Both observation work either way, just pointing out in case you didn't see it.
Fixed in git for 1.5.10, thanks for the review.
(In reply to comment #7)
> Do we have just UNIX WIN and MAC right?
FYI: UNIX and WIN, where Mac is a subset of UNIX.
> isn't it clearer to use a
> #ifdef DBUS_UNIX
> explicitly and leave a comment about DBUS_WIN declaration instead?
I suppose it could be
# ifdef __APPLE__
/* ... Apple stuff ... */
/* ... Unix stuff ... */
/* on Windows it's in stdlib.h which we unconditionally included already */
but I'd prefer to just apply the simpler change and get on with my life :-)
> The same way, the other file includes stdlib.h conditionally for WIN even if
> it's already included, so the if branch turns to be useless.
Yeah, that's why I turned it into a comment here.