Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Tarmigan <tarmigan+git@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>, mkraai@beckman.com
Subject: Re: Git on QNX
Date: Tue, 15 Dec 2009 13:42:57 -0800	[thread overview]
Message-ID: <7v6387zzfi.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <905315640912151323s4b158565o2e74ce018b64dc72@mail.gmail.com> (Tarmigan's message of "Tue\, 15 Dec 2009 13\:23\:37 -0800")

Tarmigan <tarmigan+git@gmail.com> writes:

> diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
> index 8ed4a6f..5cbc16c 100644
> --- a/builtin-fetch-pack.c
> +++ b/builtin-fetch-pack.c
> @@ -778,7 +778,7 @@ static int fetch_pack_config(const char *var,
> const char *value, void *cb)
>  	return git_default_config(var, value, cb);
>  }
>
> -static struct lock_file lock;
> +static struct lock_file lockfile;
>
>  static void fetch_pack_setup(void)
>  {
> @@ -958,14 +958,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
>  			  )
>  			die("shallow file was changed during fetch");
>
> -		fd = hold_lock_file_for_update(&lock, shallow,
> +		fd = hold_lock_file_for_update(&lockfile, shallow,
>  					       LOCK_DIE_ON_ERROR);
>  		if (!write_shallow_commits(&sb, 0)
>  		 || write_in_full(fd, sb.buf, sb.len) != sb.len) {
>  			unlink_or_warn(shallow);
> -			rollback_lock_file(&lock);
> +			rollback_lock_file(&lockfile);
>  		} else {
> -			commit_lock_file(&lock);
> +			commit_lock_file(&lockfile);
>  		}
>  		strbuf_release(&sb);
>  	}

Is this because QNX uses "lock" as some global identifier for some other
purpose?  I think moving the file-scope-static definition to the scope
it is used in without renaming would make a cleaner patch.

> diff --git a/git-compat-util.h b/git-compat-util.h
> index 5c59687..857e938 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -79,6 +84,7 @@
>  #include <stdlib.h>
>  #include <stdarg.h>
>  #include <string.h>
> +#include <strings.h>
>  #include <errno.h>
>  #include <limits.h>
>  #include <sys/param.h>

Other hunks are QNX specific enough but this hunk is worrisome; you cannot
tell how you are hurting other platforms with this change.  Can you tell
declarations of which functions are missing on QNX without this change?

  reply	other threads:[~2009-12-15 21:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 21:23 Git on QNX Tarmigan
2009-12-15 21:42 ` Junio C Hamano [this message]
2009-12-15 22:13   ` Tarmigan
2009-12-16 14:20     ` Alex Riesen
2009-12-16 22:38     ` Sean Boudreau
2009-12-17  1:03       ` Tarmigan
2009-12-17  1:37         ` Sean Boudreau

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=7v6387zzfi.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mkraai@beckman.com \
    --cc=tarmigan+git@gmail.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