Skip to content

Commit

Permalink
Fix linking for not-so-clever linkers.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jul 10, 2006
1 parent f443455 commit b75a82b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ char git_commit_encoding[MAX_ENCODING_LENGTH] = "utf-8";
int shared_repository = PERM_UMASK;
const char *apply_default_whitespace = NULL;
int zlib_compression_level = Z_DEFAULT_COMPRESSION;
int pager_in_use;

static char *git_dir, *git_object_dir, *git_index_file, *git_refs_dir,
*git_graft_file;
Expand Down
2 changes: 0 additions & 2 deletions pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* something different on Windows, for example.
*/

int pager_in_use;

static void run_pager(const char *pager)
{
execlp(pager, pager, NULL);
Expand Down

0 comments on commit b75a82b

Please sign in to comment.