Fix linking for not-so-clever linkers.
On one of my systems, the linker is not intelligent enough to link with pager.o (in libgit.a) when only the variable pager_in_use is needed. The consequence is that the linker complains about an undefined variable. So, put the variable into environment.o, where it is linked always. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin committed
Jul 10, 2006 at 13:40 UTC
b75a82b75402c9462cfd2e9891d2fbe7ce6239f4
2 files changed
+1
-2
environment.c
+1
@@ -21,6 +21,7 @@ char git_commit_encoding[MAX_ENCODING_LENGTH] = "utf-8";
21
int shared_repository = PERM_UMASK;
22
const char *apply_default_whitespace = NULL;
23
int zlib_compression_level = Z_DEFAULT_COMPRESSION;
24
+int pager_in_use;
25
26
static char *git_dir, *git_object_dir, *git_index_file, *git_refs_dir,
27
*git_graft_file;
pager.c
-2
@@ -5,8 +5,6 @@
5
* something different on Windows, for example.
6
*/
7
8
-int pager_in_use;
9
-
8
static void run_pager(const char *pager)
9
{
10
execlp(pager, pager, NULL);