git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git on QNX

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2009, 21:42 UTC
Message-ID
<7v6387zzfi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<905315640912151323s4b158565o2e74ce018b64dc72@mail.gmail.com>
Tarmigan <tarmigan+git@gmail.com> writes:
Show 32 quoted lines
> 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.

Show 12 quoted lines
> 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?

Previous: TarmiganNext: Tarmigan
Message 2 of 7 in “Git on QNX”
  1. TarmiganDec 15, 2009
  2. Junio C HamanoDec 15, 2009
  3. TarmiganDec 15, 2009
  4. Alex RiesenDec 16, 2009
  5. Sean BoudreauDec 16, 2009
  6. TarmiganDec 17, 2009
  7. Sean BoudreauDec 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.