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

Re: [patch 04/16] Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.

From
TATor Arntsen <tor@spacetec.no>
Date
Apr 27, 2010, 16:08 UTC
Message-ID
<4BD70C1A.80709@spacetec.no>
In-Reply-To
<20100427135823.017417000@mlists.thewrittenword.com>
On Tue, Apr 27, 2010 at 15:57, Gary V. Vaughan <git@mlists.thewrittenword.com> wrote:
Show 38 quoted lines
> enum style is inconsistent already, with some enums declared on one
> line, some over 3 lines with the enum values all on the middle line,
> sometimes with 1 enum value per line... and independently of that the
> trailing comma is sometimes present and other times absent, often
> mixing with/without trailing comma styles in a single file, and
> sometimes in consecutive enum declarations.
>
> Clearly, omitting the comma is the more portable style, and this patch
> changes all enum declarations to use the portable omitted dangling
> comma style consistently.
> ---
>  attr.h                 |    2 +-
>  builtin/apply.c        |    4 ++--
>  builtin/branch.c       |    4 ++--
>  builtin/commit.c       |    6 +++---
>  builtin/help.c         |    2 +-
>  builtin/mailinfo.c     |    4 ++--
>  builtin/receive-pack.c |    2 +-
>  builtin/remote.c       |    2 +-
>  cache.h                |   16 ++++++++--------
>  commit.h               |    2 +-
>  connect.c              |    2 +-
>  ctype.c                |    2 +-
>  diff.h                 |    2 +-
>  dir.c                  |    6 +++---
>  fast-import.c          |    2 +-
>  grep.h                 |    8 ++++----
>  http-push.c            |    2 +-
>  http-walker.c          |    2 +-
>  imap-send.c            |    2 +-
>  merge-recursive.h      |    2 +-
>  parse-options.h        |    6 +++---
>  pretty.c               |    2 +-
>  remote.h               |    2 +-
>  rerere.c               |    2 +-
>  revision.c             |    2 +-
>  wt-status.h            |    2 +-
>  26 files changed, 45 insertions(+), 45 deletions(-)
The patch is against master. Are we supposed to make patches against master or maint? (I thought I saw the latter somewhere. I'm pretty new in here though..)
I can confirm that master doesn't compile on AIX 5.1 with the IBM VisualAge compiler V5 (V5.0.2) without the patch above, and it does compile with the patch:
Tested-by: Tor Arntsen <tor@spacetec.no>
but with the following caveats:
1: With the patch, it'll build with configure (and only configure), run like so:
./configure --enable-pthreads=-lpthread CFLAGS=-Dinline=''
In other words, this system would also need an AIX version of the 'no-inline' patch you did for HP-UX.
And without the --enable-pthreads=-lpthread above it'll try to link with -pthread, which won't work for this system.
The const-expr patch is also useful for AIX-5.1 / XlC V5.0.2. It does build without, but with warnings.
2: The compiler cannot build on AIX 5.1 without the following additional patch (against master. maint has similar problems but files have been moved):
>From a8989213b4c8baa53c14c1f227b916910265c517 Mon Sep 17 00:00:00 2001
From: Tor Arntsen <tor@spacetec.no>
Date: Tue, 27 Apr 2010 16:05:12 +0000
Subject: [PATCH 2/2] C99 comments changed to old-style C comments
Signed-off-by: Tor Arntsen <tor@spacetec.no>
---
 builtin/blame.c        |    2 +-
 builtin/for-each-ref.c |    4 ++--
 remote.c               |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index fc15863..4dd4c3f 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1589,7 +1589,7 @@ static void emit_porcelain(struct scoreboard *sb, struct blame_entry *ent)
 	strcpy(hex, sha1_to_hex(suspect->commit->object.sha1));
 	printf("%s%c%d %d %d\n",
 	       hex,
-	       ent->guilty ? ' ' : '*', // purely for debugging
+	       ent->guilty ? ' ' : '*', /* purely for debugging */
 	       ent->s_lno + 1,
 	       ent->lno + 1,
 	       ent->num_lines);
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 62be1bb..7f5011f 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -549,10 +549,10 @@ static void grab_values(struct atom_value *val, int deref, struct object *obj, v
 		grab_person("committer", val, deref, obj, buf, sz);
 		break;
 	case OBJ_TREE:
-		// grab_tree_values(val, deref, obj, buf, sz);
+		/* grab_tree_values(val, deref, obj, buf, sz); */
 		break;
 	case OBJ_BLOB:
-		// grab_blob_values(val, deref, obj, buf, sz);
+		/* grab_blob_values(val, deref, obj, buf, sz); */
 		break;
 	default:
 		die("Eh?  Object of type %d?", obj->type);
diff --git a/remote.c b/remote.c
index c70181c..26ce560 100644
--- a/remote.c
+++ b/remote.c
@@ -476,7 +476,7 @@ static void read_config(void)
 	unsigned char sha1[20];
 	const char *head_ref;
 	int flag;
-	if (default_remote_name) // did this already
+	if (default_remote_name) /* did this already */
 		return;
 	default_remote_name = xstrdup("origin");
 	current_branch = NULL;
-- 
1.7.1.rc1.GIT
Previous: Gary V. VaughanNext: Gary V. Vaughan
Message 8 of 49 in “Portability Patches for git-1.7.1 (v4)”
  1. 00/16 Portability Patches for git-1.7.1 (v4)Gary V. Vaughan, Apr 27, 2010
  2. 01/16 user-cppflags.patchGary V. Vaughan, Apr 27, 2010
  3. 02/16 const-expr.patchGary V. Vaughan, Apr 27, 2010
  4. Erik Faye-LundApr 27, 2010
  5. Gary V. VaughanApr 27, 2010
  6. 03/16 pthread.patchGary V. Vaughan, Apr 27, 2010
  7. 04/16 Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX 5.1 fails to compile git.Gary V. Vaughan, Apr 27, 2010
  8. Tor ArntsenApr 27, 2010
  9. Gary V. VaughanApr 28, 2010
  10. Tor ArntsenApr 28, 2010
  11. Jeff KingApr 28, 2010
  12. 05/16 diff-export.patchGary V. Vaughan, Apr 27, 2010
  13. 06/16 diff-test_cmp.patchGary V. Vaughan, Apr 27, 2010
  14. Jonathan NiederApr 27, 2010
  15. Gary V. VaughanApr 28, 2010
  16. Jonathan NiederApr 28, 2010
  17. Gary V. VaughanApr 28, 2010
  18. Jonathan NiederApr 28, 2010
  19. 07/16 diff-defaults.patchGary V. Vaughan, Apr 27, 2010
  20. 08/16 host-SunOS56.patchGary V. Vaughan, Apr 27, 2010
  21. 09/16 host-IRIX.patchGary V. Vaughan, Apr 27, 2010
  22. 10/16 host-HPUX10.patchGary V. Vaughan, Apr 27, 2010
  23. 11/16 host-HPUX11.patchGary V. Vaughan, Apr 27, 2010
  24. 12/16 host-OSF1.patchGary V. Vaughan, Apr 27, 2010
  25. Tor ArntsenApr 27, 2010
  26. Gary V. VaughanApr 27, 2010
  27. Tor ArntsenApr 27, 2010
  28. Gary V. VaughanApr 28, 2010
  29. 13/16 no-hstrerror.patchGary V. Vaughan, Apr 27, 2010
  30. 14/16 no-inet_ntop.patchGary V. Vaughan, Apr 27, 2010
  31. 15/16 no-socklen_t.patchGary V. Vaughan, Apr 27, 2010
  32. 16/16 no-inline.patchGary V. Vaughan, Apr 27, 2010
  33. Michael J GruberApr 27, 2010
  34. Jeff KingApr 27, 2010
  35. Andreas SchwabApr 27, 2010
  36. Jeff KingApr 28, 2010
  37. Gary V. VaughanApr 28, 2010
  38. Jeff KingApr 28, 2010
  39. Gary V. VaughanApr 28, 2010
  40. Gary V. VaughanApr 28, 2010
  41. Ævar Arnfjörð BjarmasonApr 28, 2010
  42. Michael J GruberMay 1, 2010
  43. Junio C HamanoMay 1, 2010
  44. Gary V. VaughanMay 3, 2010
  45. Øyvind A. HolmMay 2, 2010
  46. Gary V. VaughanApr 28, 2010
  47. Gary V. VaughanApr 29, 2010
  48. Gary V. VaughanMay 3, 2010
  49. Gary V. VaughanMay 4, 2010

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.