[PATCH] xorg-integration: fixup building on older compilers
Peter Hutterer
peter.hutterer at who-t.net
Thu Jan 31 16:23:50 PST 2013
On Thu, Jan 31, 2013 at 04:41:13PM +0100, Maarten Lankhorst wrote:
> Fixup 2 C99 constructs from a header including in a C++ file, and define all static libraries before the
> shared libraries, or linking will fail.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
applied, thanks
Cheers,
Peter
>
> ---
>
> diff --git a/common.mk b/common.mk
> index 0ea25d2..6d755bd 100644
> --- a/common.mk
> +++ b/common.mk
> @@ -15,10 +15,7 @@ AM_CPPFLAGS = \
> AM_CXXFLAGS = $(GTEST_CXXFLAGS) $(XORG_GTEST_CXXFLAGS)
>
> GTEST_LDADDS = \
> - $(XI_LIBS) \
> - $(XRANDR_LIBS) \
> - $(XORG_GTEST_LIBS) \
> - $(EVEMU_LIBS) \
> - $(XORG_GTEST_MAIN_LIBS)
> + $(XORG_GTEST_LIBS) $(XORG_GTEST_MAIN_LIBS) \
> + $(XI_LIBS) $(XRANDR_LIBS) $(EVEMU_LIBS)
>
> XIT_LIBS=$(top_builddir)/tests/common/libxit.a
> diff --git a/tests/input/Makefile.am b/tests/input/Makefile.am
> index 1fd7463..ab357b4 100644
> --- a/tests/input/Makefile.am
> +++ b/tests/input/Makefile.am
> @@ -11,26 +11,26 @@ noinst_PROGRAMS = legacy-drivers \
> TESTS=$(noinst_PROGRAMS)
>
> legacy_drivers_SOURCES = legacy-drivers.cpp
> -legacy_drivers_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +legacy_drivers_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
> input_module_load_SOURCES = input-module-load.cpp
> -input_module_load_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +input_module_load_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
> kbd_driver_SOURCES = kbd.cpp
> -kbd_driver_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +kbd_driver_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
> mouse_driver_SOURCES = mouse.cpp
> -mouse_driver_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +mouse_driver_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
> evdev_driver_SOURCES = evdev.cpp
> -evdev_driver_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +evdev_driver_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
> synaptics_driver_SOURCES = synaptics.cpp
> -synaptics_driver_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +synaptics_driver_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
> wacom_driver_SOURCES = wacom_devs.h \
> wacom-hovering-expresskeys.cpp \
> wacom-input-matrix.cpp \
> wacom.cpp
> -wacom_driver_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +wacom_driver_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
> diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
> index 40e9b76..efd7f1c 100644
> --- a/tests/lib/Makefile.am
> +++ b/tests/lib/Makefile.am
> @@ -4,4 +4,4 @@ noinst_PROGRAMS = libXi
> TESTS=$(noinst_PROGRAMS)
>
> libXi_SOURCES = libXi.cpp
> -libXi_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +libXi_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
> diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am
> index 510e356..d6ea249 100644
> --- a/tests/server/Makefile.am
> +++ b/tests/server/Makefile.am
> @@ -18,4 +18,4 @@ server_SOURCES = \
> barriers-devices.cpp \
> barriers-notify.cpp
>
> -server_LDADD = $(GTEST_LDADDS) $(XTEST_LIBS) $(XFIXES_LIBS) $(XSCREENSAVER_LIBS) $(XIT_LIBS) $(DGA_LIBS)
> +server_LDADD = $(XIT_LIBS) $(GTEST_LDADDS) $(XTEST_LIBS) $(XFIXES_LIBS) $(XSCREENSAVER_LIBS) $(DGA_LIBS)
> diff --git a/tests/server/barriers-common.h b/tests/server/barriers-common.h
> index 81be9f2..41d67b7 100644
> --- a/tests/server/barriers-common.h
> +++ b/tests/server/barriers-common.h
> @@ -126,12 +126,10 @@ public:
> int device_id_2;
>
> XIAnyHierarchyChangeInfo change;
> - change.add = (XIAddMasterInfo) {
> - .type = XIAddMaster,
> - .name = (char *) "New Master",
> - .send_core = False,
> - .enable = True
> - };
> + change.add.type = XIAddMaster;
> + change.add.name = (char *) "New Master";
> + change.add.send_core = False;
> + change.add.enable = True;
>
> master_id_1 = VIRTUAL_CORE_POINTER_ID;
>
> @@ -140,11 +138,10 @@ public:
> ASSERT_TRUE(FindInputDeviceByName(dpy, "New Master pointer", &master_id_2)) << "Failed to find the new master pointer.";
> ASSERT_TRUE(FindInputDeviceByName(dpy, "--device2--", &device_id_2)) << "Failed to find device2.";
>
> - change.attach = (XIAttachSlaveInfo) {
> - .type = XIAttachSlave,
> - .deviceid = device_id_2,
> - .new_master = master_id_2,
> - };
> + change.attach.type = XIAttachSlave;
> + change.attach.deviceid = device_id_2;
> + change.attach.new_master = master_id_2;
> +
> ASSERT_EQ(XIChangeHierarchy(dpy, &change, 1), Success) << "Couldn't attach device2 to the new master pointer.";
> }
>
> diff --git a/tests/video/Makefile.am b/tests/video/Makefile.am
> index 84883ed..513d61f 100644
> --- a/tests/video/Makefile.am
> +++ b/tests/video/Makefile.am
> @@ -5,5 +5,5 @@ noinst_PROGRAMS = video-module-load
> TESTS=$(noinst_PROGRAMS)
>
> video_module_load_SOURCES = video-module-load.cpp
> -video_module_load_LDADD = $(GTEST_LDADDS) $(XIT_LIBS)
> +video_module_load_LDADD = $(XIT_LIBS) $(GTEST_LDADDS)
>
>
More information about the xorg-devel
mailing list