#include "data.h"
#include "xcb.h"
+/** Git commit identifier, from version.c */
+extern const char *i3_version;
+
/** The original value of RLIMIT_CORE when i3 was started. We need to restore
* this before starting any other process, since we set RLIMIT_CORE to
* RLIM_INFINITY for i3 debugging versions. */
check_for_duplicate_bindings(context);
if (use_nagbar && (context->has_errors || context->has_warnings)) {
- ELOG("FYI: You are using i3 version " I3_VERSION "\n");
+ ELOG("FYI: You are using i3 version %s\n", i3_version);
if (version == 3)
ELOG("Please convert your configfile first, then fix any remaining errors (see above).\n");
int main(int argc, char *argv[]) {
/* Keep a symbol pointing to the I3_VERSION string constant so that we have
* it in gdb backtraces. */
- const char *i3_version __attribute__((unused)) = I3_VERSION;
+ const char *_i3_version __attribute__((unused)) = i3_version;
char *override_configpath = NULL;
bool autostart = true;
char *layout_path = NULL;
only_check_config = true;
break;
case 'v':
- printf("i3 version " I3_VERSION " © 2009-2014 Michael Stapelberg and contributors\n");
+ printf("i3 version %s © 2009-2014 Michael Stapelberg and contributors\n", i3_version);
exit(EXIT_SUCCESS);
break;
case 'm':
- printf("Binary i3 version: " I3_VERSION " © 2009-2014 Michael Stapelberg and contributors\n");
+ printf("Binary i3 version: %s © 2009-2014 Michael Stapelberg and contributors\n", i3_version);
display_running_version();
exit(EXIT_SUCCESS);
break;
free(cwd);
}
- LOG("i3 " I3_VERSION " starting\n");
+ LOG("i3 %s starting\n", i3_version);
conn = xcb_connect(NULL, &conn_screen);
if (xcb_connection_has_error(conn))
--- /dev/null
+/*
+ * vim:ts=4:sw=4:expandtab
+ *
+ * i3 - an improved dynamic tiling window manager
+ * © 2009-2015 Michael Stapelberg and contributors (see also: LICENSE)
+ *
+ * Stores the latest Git commit identifier so that it can be linked into i3
+ * and used dynamically without recompiling every object file.
+ *
+ */
+const char *i3_version = I3_VERSION;