git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Schiele <rschiele@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] add definitions for global variables to shell.c
Date: Mon, 18 Aug 2008 14:37:27 +0200	[thread overview]
Message-ID: <20080818123727.GB11842@schiele.dyndns.org> (raw)

Commit 5b8e6f85 introduced stubs for three functions that make no sense
for git-shell.  But those stubs defined libgit.a functions a second time
so that a linker can complain.  While commit 78568448 fixes this problem
it introduces a new issue on the affected systems: Some versions of the
Sun compiler generate references to global variables when they see
extern declarations for those, even when they are never used in the
code.

This patch does a similar workaround for this problem as commit 5b8e6f85
did for the functions.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
---
 shell.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/shell.c b/shell.c
index 6a48de0..8902ea5 100644
--- a/shell.c
+++ b/shell.c
@@ -3,12 +3,17 @@
 #include "exec_cmd.h"
 #include "strbuf.h"
 
-/* Stubs for functions that make no sense for git-shell. These stubs
- * are provided here to avoid linking in external redundant modules.
+/* Stubs for functions and external variables that make no sense for
+ * git-shell. These stubs are provided here to avoid linking in
+ * external redundant modules.
  */
 void release_pack_memory(size_t need, int fd){}
 void trace_argv_printf(const char **argv, const char *fmt, ...){}
 void trace_printf(const char *fmt, ...){}
+int trust_executable_bit;
+const unsigned char null_sha1[20];
+const signed char hexval_table[256];
+int has_symlinks;
 
 
 static int do_generic_cmd(const char *me, char *arg)
-- 
1.5.4.5

             reply	other threads:[~2008-08-18 12:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18 12:37 Robert Schiele [this message]
2008-08-19  0:29 ` [PATCH] add definitions for global variables to shell.c Junio C Hamano
2008-08-19  7:26   ` Robert Schiele
2008-08-19  7:53     ` Junio C Hamano
2008-08-19  8:16       ` Robert Schiele
2008-08-19  8:49       ` Johannes Sixt
2008-08-19  9:18         ` Robert Schiele
2008-08-19 23:09           ` Junio C Hamano
2008-08-20  1:06             ` [PATCH 1/2] shell: do not play duplicated definition games to shrink the executable Junio C Hamano
2008-08-20  1:06             ` [PATCH 2/2] Build-in "git-shell" Junio C Hamano
2008-08-20  6:54               ` Johannes Sixt
2008-08-20  1:06             ` [PATCH] add definitions for global variables to shell.c Junio C Hamano
2008-08-20  4:36               ` Robert Schiele

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080818123727.GB11842@schiele.dyndns.org \
    --to=rschiele@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).