Make code and man pages share the same default values
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 4 May 2016 20:59:41 +0000 (16:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 10 May 2016 02:28:39 +0000 (22:28 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac
doc/man/Makefile.am
doc/man/lttng-ust.3.txt
include/ust-comm.h

index 5f3e9dc20ce28b8c7eec6f743a43a30ef0fb816e..c137ff87668df5f6f87a6450c4013617829420c7 100644 (file)
@@ -424,6 +424,15 @@ and installing the man pages.
 AM_CONDITIONAL([MAN_PAGES_OPT], [test "x$man_pages_opt" != "xno"])
 AM_CONDITIONAL([HAVE_ASCIIDOC_XMLTO], [test "x$have_asciidoc_xmlto" = "xyes"])
 
+# Default values
+AC_DEFUN([_AC_DEFINE_AND_SUBST], [
+       AC_DEFINE_UNQUOTED([CONFIG_$1], [$2], [$1])
+       $1="$2"
+       AC_SUBST([$1])
+])
+
+_AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS], [3000])
+
 AC_CONFIG_FILES([
        Makefile
        doc/Makefile
index 20362045efea5edc57eb5db2383750d06584f09d..22aed15498cd7a6d3d4ced1a4febb2f88c483aa9 100644 (file)
@@ -55,7 +55,8 @@ if MAN_PAGES_OPT
 if HAVE_ASCIIDOC_XMLTO
 # Tools to execute:
 ADOC = $(ASCIIDOC) -f $(ASCIIDOC_CONF) -d manpage \
-       -a lttng_version="$(PACKAGE_VERSION)"
+       -a lttng_version="$(PACKAGE_VERSION)" \
+       -a lttng_ust_register_timeout="@LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS@"
 ADOC_DOCBOOK = $(ADOC) -b docbook
 XTO = $(XMLTO) -m $(firstword $(XSL_SRC_FILES)) man
 
index 1d69221d122f269311727c463b26f484ee379834..ff0e14f75ca6b86002c979ecbb2d86c228f884fd 100644 (file)
@@ -1100,7 +1100,7 @@ The value 0 means _do not wait_. The value -1 means _wait forever_.
 Setting this environment variable to 0 is recommended for applications
 with time constraints on the process startup time.
 +
-Default: 3000.
+Default: {lttng_ust_register_timeout}.
 
 `LTTNG_UST_WITHOUT_BADDR_STATEDUMP`::
     Prevent `liblttng-ust` from performing a base address state dump
index 7f363d402f7c57b9e7ebc179acc29fc35b08970c..fb0c0bbc773b854bfc97af19b93a18e5e7c1b914 100644 (file)
@@ -40,7 +40,7 @@
  * variable "LTTNG_UST_REGISTER_TIMEOUT". Note that if the sessiond is not
  * found, the application proceeds directly without any delay.
  */
-#define LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS       3000
+#define LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS       CONFIG_LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS
 
 #define LTTNG_DEFAULT_RUNDIR                           LTTNG_SYSTEM_RUNDIR
 #define LTTNG_DEFAULT_HOME_RUNDIR                      ".lttng"
This page took 0.026715 seconds and 4 git commands to generate.