From: Joshua Juran <jjuran@gmail.com>
To: git@vger.kernel.org
Subject: Git, C89, and older compilers
Date: Tue, 31 Mar 2009 12:26:57 -0700 [thread overview]
Message-ID: <9D199AAA-5EC6-4E7C-AC26-0CDA68341D00@gmail.com> (raw)
Hello,
I'm porting Git to Lamp (Lamp ain't Mac POSIX), a Unix-like
environment which runs in classic Mac OS, much like Cygwin.
One of the complications I've run into is that Metrowerks C 2.4.1
(released in 2001) doesn't support some of the constructs git uses,
such as initializing an aggregate's member with the address of a
local variable, illustrated by the patch below:
diff --git a/builtin-commit.c b/builtin-commit.c
index 46e649c..8b98547 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -605,7 +605,8 @@ static int prepare_to_commit(const char
*index_file, const c
if (use_editor) {
char index[PATH_MAX];
- const char *env[2] = { index, NULL };
+ const char *env[2] = { NULL, NULL };
+ env[0] = index;
snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s",
index_file);
if (launch_editor(git_path(commit_editmsg), NULL,
env)) {
fprintf(stderr,
Is git intended to compile on a C89 compiler? In any case, if I
produce a complete set of patches, will they be applied?
Josh
next reply other threads:[~2009-03-31 19:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-31 19:26 Joshua Juran [this message]
2009-03-31 21:32 ` Git, C89, and older compilers Jay Soffian
2009-03-31 22:22 ` Joshua Juran
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=9D199AAA-5EC6-4E7C-AC26-0CDA68341D00@gmail.com \
--to=jjuran@gmail.com \
--cc=git@vger.kernel.org \
/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).