]> git.sur5r.net Git - i3/i3/commitdiff
Remove compatibility definitions for xcb-util < 0.3.8 (#2473)
authorMichael Stapelberg <stapelberg@users.noreply.github.com>
Sat, 24 Sep 2016 16:48:32 +0000 (09:48 -0700)
committerGitHub <noreply@github.com>
Sat, 24 Sep 2016 16:48:32 +0000 (09:48 -0700)
Even Debian oldstable has xcb-util 0.3.8.

13 files changed:
common.mk
i3-config-wizard/i3-config-wizard.mk
i3-dump-log/i3-dump-log.mk
i3-input/i3-input.mk
i3-msg/i3-msg.mk
i3-nagbar/i3-nagbar.mk
i3bar/i3bar.mk
i3bar/include/xcb.h
i3bar/src/xcb.c
include/all.h
include/xcb_compat.h [deleted file]
libi3/libi3.mk
src/i3.mk

index b9569ca73d4bab4fd1b641402dd0fdb1d11a3033..2bd879d45a709241bd73b10c0fa879d6d87d5f6b 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -93,15 +93,10 @@ XCB_CFLAGS  := $(call cflags_for_lib, xcb)
 XCB_CFLAGS  += $(call cflags_for_lib, xcb-event)
 XCB_LIBS    := $(call ldflags_for_lib, xcb,xcb)
 XCB_LIBS    += $(call ldflags_for_lib, xcb-event,xcb-event)
 XCB_CFLAGS  += $(call cflags_for_lib, xcb-event)
 XCB_LIBS    := $(call ldflags_for_lib, xcb,xcb)
 XCB_LIBS    += $(call ldflags_for_lib, xcb-event,xcb-event)
-ifeq ($(shell $(PKG_CONFIG) --exists xcb-util 2>/dev/null || echo 1),1)
-XCB_CFLAGS  += $(call cflags_for_lib, xcb-atom)
-XCB_CFLAGS  += $(call cflags_for_lib, xcb-aux)
-XCB_LIBS    += $(call ldflags_for_lib, xcb-atom,xcb-atom)
-XCB_LIBS    += $(call ldflags_for_lib, xcb-aux,xcb-aux)
-XCB_CPPFLAGS+= -DXCB_COMPAT
-else
 XCB_CFLAGS  += $(call cflags_for_lib, xcb-util)
 XCB_LIBS    += $(call ldflags_for_lib, xcb-util)
 XCB_CFLAGS  += $(call cflags_for_lib, xcb-util)
 XCB_LIBS    += $(call ldflags_for_lib, xcb-util)
+ifneq ($(shell $(PKG_CONFIG) --atleast-version=0.3.8 xcb-util 2>/dev/null && echo 1),1)
+$(error "xcb-util >= 0.3.8 not found")
 endif
 XCB_XKB_LIBS := $(call ldflags_for_lib, xcb-xkb,xcb-xkb)
 
 endif
 XCB_XKB_LIBS := $(call ldflags_for_lib, xcb-xkb,xcb-xkb)
 
index 900893f5e85297824fc0ae1ee0621d9c826b7d5a..2a761433b4de2e9d27d7ca065d2dd0a85070efc7 100644 (file)
@@ -12,7 +12,7 @@ i3_config_wizard_OBJECTS := $(i3_config_wizard_SOURCES:.c=.o)
 
 i3-config-wizard/%.o: i3-config-wizard/%.c $(i3_config_wizard_HEADERS) i3-config-parser.stamp
        echo "[i3-config-wizard] CC $<"
 
 i3-config-wizard/%.o: i3-config-wizard/%.c $(i3_config_wizard_HEADERS) i3-config-parser.stamp
        echo "[i3-config-wizard] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_config_wizard_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_config_wizard_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 i3-config-wizard/i3-config-wizard: libi3.a $(i3_config_wizard_OBJECTS)
        echo "[i3-config-wizard] Link i3-config-wizard"
 
 i3-config-wizard/i3-config-wizard: libi3.a $(i3_config_wizard_OBJECTS)
        echo "[i3-config-wizard] Link i3-config-wizard"
index 7e5d4499fab7dc5d8f3dde55f401437b0d9f8f02..09a793f5969b0dd8ef9a80372daee07575be21a6 100644 (file)
@@ -12,7 +12,7 @@ i3_dump_log_OBJECTS := $(i3_dump_log_SOURCES:.c=.o)
 
 i3-dump-log/%.o: i3-dump-log/%.c $(i3_dump_log_HEADERS)
        echo "[i3-dump-log] CC $<"
 
 i3-dump-log/%.o: i3-dump-log/%.c $(i3_dump_log_HEADERS)
        echo "[i3-dump-log] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_dump_log_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_dump_log_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 i3-dump-log/i3-dump-log: libi3.a $(i3_dump_log_OBJECTS)
        echo "[i3-dump-log] Link i3-dump-log"
 
 i3-dump-log/i3-dump-log: libi3.a $(i3_dump_log_OBJECTS)
        echo "[i3-dump-log] Link i3-dump-log"
index be3e28331d263d02d820be553ae4e0d82508b491..2b1f451eef157b7e33f7a3788ad720681305dbf0 100644 (file)
@@ -12,7 +12,7 @@ i3_input_OBJECTS := $(i3_input_SOURCES:.c=.o)
 
 i3-input/%.o: i3-input/%.c $(i3_input_HEADERS)
        echo "[i3-input] CC $<"
 
 i3-input/%.o: i3-input/%.c $(i3_input_HEADERS)
        echo "[i3-input] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_input_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_input_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 i3-input/i3-input: libi3.a $(i3_input_OBJECTS)
        echo "[i3-input] Link i3-input"
 
 i3-input/i3-input: libi3.a $(i3_input_OBJECTS)
        echo "[i3-input] Link i3-input"
index 277c43e7b788407013dccf69f408330e802cc1e4..dfba4d2c0fe66137ba80033809d55b5722d9b99b 100644 (file)
@@ -12,7 +12,7 @@ i3_msg_OBJECTS := $(i3_msg_SOURCES:.c=.o)
 
 i3-msg/%.o: i3-msg/%.c $(i3_msg_HEADERS)
        echo "[i3-msg] CC $<"
 
 i3-msg/%.o: i3-msg/%.c $(i3_msg_HEADERS)
        echo "[i3-msg] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_msg_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_msg_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 i3-msg/i3-msg: libi3.a $(i3_msg_OBJECTS)
        echo "[i3-msg] Link i3-msg"
 
 i3-msg/i3-msg: libi3.a $(i3_msg_OBJECTS)
        echo "[i3-msg] Link i3-msg"
index b10e389e534be45fa128eda1bf198200d0f2d8e8..564a7bc20edcaa5fe0ba6fc1769d1411247e8394 100644 (file)
@@ -12,7 +12,7 @@ i3_nagbar_OBJECTS := $(i3_nagbar_SOURCES:.c=.o)
 
 i3-nagbar/%.o: i3-nagbar/%.c $(i3_nagbar_HEADERS)
        echo "[i3-nagbar] CC $<"
 
 i3-nagbar/%.o: i3-nagbar/%.c $(i3_nagbar_HEADERS)
        echo "[i3-nagbar] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_nagbar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_nagbar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 i3-nagbar/i3-nagbar: libi3.a $(i3_nagbar_OBJECTS)
        echo "[i3-nagbar] Link i3-nagbar"
 
 i3-nagbar/i3-nagbar: libi3.a $(i3_nagbar_OBJECTS)
        echo "[i3-nagbar] Link i3-nagbar"
index 5aed1902f3a3714d8832c2c72c4b3cfed06b4483..114e9314afc5ad1d00ea1892e52e221dc5cd1131 100644 (file)
@@ -12,7 +12,7 @@ i3bar_OBJECTS := $(i3bar_SOURCES:.c=.o)
 
 i3bar/src/%.o: i3bar/src/%.c $(i3bar_HEADERS)
        echo "[i3bar] CC $<"
 
 i3bar/src/%.o: i3bar/src/%.c $(i3bar_HEADERS)
        echo "[i3bar] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3bar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -Ii3bar/include -c -o $@ $<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3bar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -Ii3bar/include -c -o $@ $<
 
 i3bar/i3bar: libi3.a $(i3bar_OBJECTS)
        echo "[i3bar] Link i3bar"
 
 i3bar/i3bar: libi3.a $(i3bar_OBJECTS)
        echo "[i3bar] Link i3bar"
index 03bfc51ec2287886b24957da0182dcc416648570..e5af39fa3a14ab3466cad64a6aa12cdd83b8e980 100644 (file)
 #include <stdint.h>
 //#include "outputs.h"
 
 #include <stdint.h>
 //#include "outputs.h"
 
-#ifdef XCB_COMPAT
-#define XCB_ATOM_CARDINAL CARDINAL
-#endif
-
 #define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0
 #define _NET_SYSTEM_TRAY_ORIENTATION_VERT 1
 #define SYSTEM_TRAY_REQUEST_DOCK 0
 #define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0
 #define _NET_SYSTEM_TRAY_ORIENTATION_VERT 1
 #define SYSTEM_TRAY_REQUEST_DOCK 0
index 9bf36187162669d5967bec7c8dbe32d7197a3a7d..d44da4582f5f47539cee32ed7ee1883a7e9e8c54 100644 (file)
 #include <xcb/xcb_aux.h>
 #include <xcb/xcb_cursor.h>
 
 #include <xcb/xcb_aux.h>
 #include <xcb/xcb_cursor.h>
 
-#ifdef XCB_COMPAT
-#include "xcb_compat.h"
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 85397d59a3d8cad3d6205dc8baee4ed4cdf09e50..e39e27b9fdf308b23ce659fd727e4ef9e31bb689 100644 (file)
 #include <yajl/yajl_gen.h>
 #include <yajl/yajl_version.h>
 
 #include <yajl/yajl_gen.h>
 #include <yajl/yajl_version.h>
 
-/* Contains compatibility definitions for old libxcb versions */
-#ifdef XCB_COMPAT
-#include "xcb_compat.h"
-#endif
-
 #include "data.h"
 #include "util.h"
 #include "ipc.h"
 #include "data.h"
 #include "util.h"
 #include "ipc.h"
diff --git a/include/xcb_compat.h b/include/xcb_compat.h
deleted file mode 100644 (file)
index 066d834..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * vim:ts=4:sw=4:expandtab
- *
- * i3 - an improved dynamic tiling window manager
- * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
- *
- * xcb_compat.h: uses #define to create aliases for xcb functions which got
- *               renamed. Makes the code work with >= 0.3.8 xcb-util and
- *               older versions.
- *
- */
-#pragma once
-
-#define xcb_icccm_get_wm_protocols_reply_t xcb_get_wm_protocols_reply_t
-#define xcb_icccm_get_wm_protocols xcb_get_wm_protocols
-#define xcb_icccm_get_wm_protocols_unchecked xcb_get_wm_protocols_unchecked
-#define xcb_icccm_get_wm_protocols_reply xcb_get_wm_protocols_reply
-#define xcb_icccm_get_wm_protocols_reply_wipe xcb_get_wm_protocols_reply_wipe
-#define XCB_ICCCM_WM_STATE_NORMAL XCB_WM_STATE_NORMAL
-#define XCB_ICCCM_WM_STATE_WITHDRAWN XCB_WM_STATE_WITHDRAWN
-#define xcb_icccm_get_wm_size_hints_from_reply xcb_get_wm_size_hints_from_reply
-#define xcb_icccm_get_wm_size_hints_reply xcb_get_wm_size_hints_reply
-#define xcb_icccm_get_wm_normal_hints xcb_get_wm_normal_hints
-#define xcb_icccm_get_wm_normal_hints_reply xcb_get_wm_normal_hints_reply
-#define xcb_icccm_get_wm_normal_hints_unchecked xcb_get_wm_normal_hints_unchecked
-#define XCB_ICCCM_SIZE_HINT_P_MIN_SIZE XCB_SIZE_HINT_P_MIN_SIZE
-#define XCB_ICCCM_SIZE_HINT_P_MAX_SIZE XCB_SIZE_HINT_P_MAX_SIZE
-#define XCB_ICCCM_SIZE_HINT_P_RESIZE_INC XCB_SIZE_HINT_P_RESIZE_INC
-#define XCB_ICCCM_SIZE_HINT_BASE_SIZE XCB_SIZE_HINT_BASE_SIZE
-#define XCB_ICCCM_SIZE_HINT_P_ASPECT XCB_SIZE_HINT_P_ASPECT
-#define xcb_icccm_wm_hints_t xcb_wm_hints_t
-#define xcb_icccm_get_wm_hints xcb_get_wm_hints
-#define xcb_icccm_get_wm_hints_from_reply xcb_get_wm_hints_from_reply
-#define xcb_icccm_get_wm_hints_reply xcb_get_wm_hints_reply
-#define xcb_icccm_get_wm_hints_unchecked xcb_get_wm_hints_unchecked
-#define xcb_icccm_wm_hints_get_urgency xcb_wm_hints_get_urgency
-#define xcb_icccm_get_wm_transient_for_from_reply xcb_get_wm_transient_for_from_reply
-
-#define XCB_ATOM_CARDINAL CARDINAL
-#define XCB_ATOM_WINDOW WINDOW
-#define XCB_ATOM_WM_TRANSIENT_FOR WM_TRANSIENT_FOR
-#define XCB_ATOM_WM_NAME WM_NAME
-#define XCB_ATOM_WM_CLASS WM_CLASS
-#define XCB_ATOM_WM_HINTS WM_HINTS
-#define XCB_ATOM_ATOM ATOM
-#define XCB_ATOM_WM_NORMAL_HINTS WM_NORMAL_HINTS
-#define XCB_ATOM_STRING STRING
index 965e3e49ebd04a5a48624f5812f0b8d5b0b8008d..d313a44e1b1b859f1e4c463091dcb7bbe5bd3f91 100644 (file)
@@ -10,7 +10,7 @@ libi3_OBJECTS := $(libi3_SOURCES:.c=.o)
 
 libi3/%.o: libi3/%.c $(libi3_HEADERS)
        echo "[libi3] CC $<"
 
 libi3/%.o: libi3/%.c $(libi3_HEADERS)
        echo "[libi3] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(libi3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(libi3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 libi3.a: $(libi3_OBJECTS)
        echo "[libi3] AR libi3.a"
 
 libi3.a: $(libi3_OBJECTS)
        echo "[libi3] AR libi3.a"
index de7478263160d688b9a56a4489cc0d493e710ed4..de3f68456b44ba57769a7ce69057f82a0f3903f3 100644 (file)
--- a/src/i3.mk
+++ b/src/i3.mk
@@ -33,33 +33,33 @@ canonical_path := ../$(shell basename $(shell pwd -P))
 
 include/all.h.pch: $(i3_HEADERS)
        echo "[i3] PCH all.h"
 
 include/all.h.pch: $(i3_HEADERS)
        echo "[i3] PCH all.h"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -x c-header include/all.h -o include/all.h.pch
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -x c-header include/all.h -o include/all.h.pch
 
 src/version.o: src/version.c LAST_VERSION $(i3_HEADERS_DEP)
        echo "[i3] CC $<"
 
 src/version.o: src/version.c LAST_VERSION $(i3_HEADERS_DEP)
        echo "[i3] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$<
 
 src/%.o: src/%.c $(i3_HEADERS_DEP)
        echo "[i3] CC $<"
 
 src/%.o: src/%.c $(i3_HEADERS_DEP)
        echo "[i3] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$<
 
 test-tools: test.commands_parser test.config_parser
 
 test.commands_parser: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp libi3.a
        echo "[i3] Link test.commands_parser"
 
 test-tools: test.commands_parser test.config_parser
 
 test.commands_parser: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp libi3.a
        echo "[i3] Link test.commands_parser"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.commands_parser $< $(LIBS) $(i3_LIBS)
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.commands_parser $< $(LIBS) $(i3_LIBS)
 
 test.config_parser: src/config_parser.c $(i3_HEADERS_DEP) i3-config-parser.stamp libi3.a
        echo "[i3] Link test.config_parser"
 
 test.config_parser: src/config_parser.c $(i3_HEADERS_DEP) i3-config-parser.stamp libi3.a
        echo "[i3] Link test.config_parser"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.config_parser $< $(LIBS) $(i3_LIBS)
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -g -o test.config_parser $< $(LIBS) $(i3_LIBS)
 
 src/commands_parser.o: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp
        echo "[i3] CC $<"
 
 src/commands_parser.o: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp
        echo "[i3] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$<
 
 src/config_parser.o: src/config_parser.c $(i3_HEADERS_DEP) i3-config-parser.stamp
        echo "[i3] CC $<"
 
 src/config_parser.o: src/config_parser.c $(i3_HEADERS_DEP) i3-config-parser.stamp
        echo "[i3] CC $<"
-       $(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$<
+       $(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$<
 
 i3-command-parser.stamp: generate-command-parser.pl parser-specs/commands.spec
        echo "[i3] Generating command parser"
 
 i3-command-parser.stamp: generate-command-parser.pl parser-specs/commands.spec
        echo "[i3] Generating command parser"