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

[PATCH] Initial AIX portability fixes.

From
Jason Riedy <ejr@eecs.berkeley.edu>
Date
Dec 6, 2005, 22:20 UTC
Message-ID
<20493.1133907616@lotus.CS.Berkeley.EDU>

Added an AIX clause in the Makefile; that clause likely will be wrong for any AIX pre-5.2, but I can only test on 5.3. mailinfo.c was missing the compat header file, and convert-objects.c needs to define a specific _XOPEN_SOURCE as well as _XOPEN_SOURCE_EXTENDED.

Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu>
---
 Makefile          |    4 ++++
 convert-objects.c |    3 ++-
 mailinfo.c        |    1 +
 3 files changed, 7 insertions(+), 1 deletions(-)
54b8c282e017b246612b94bcbf5b88ab39c042a0
diff --git a/Makefile b/Makefile
index 425c519..01b6643 100644
--- a/Makefile
+++ b/Makefile
@@ -243,6 +243,10 @@ ifeq ($(uname_S),NetBSD)
 	ALL_CFLAGS += -I/usr/pkg/include
 	ALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib
 endif
+ifeq ($(uname_S),AIX)
+	NO_STRCASESTR=YesPlease
+	NEEDS_LIBICONV=YesPlease
+endif
 ifneq (,$(findstring arm,$(uname_M)))
 	ARM_SHA1 = YesPlease
 endif
diff --git a/convert-objects.c b/convert-objects.c
index d78a8b4..b49bce2 100644
--- a/convert-objects.c
+++ b/convert-objects.c
@@ -1,4 +1,5 @@
-#define _XOPEN_SOURCE /* glibc2 needs this */
+#define _XOPEN_SOURCE 500 /* glibc2 and AIX 5.3L need this */
+#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
 #include <time.h>
 #include "cache.h"
 
diff --git a/mailinfo.c b/mailinfo.c
index 3b97a89..d4b4163 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -8,6 +8,7 @@
 #include <string.h>
 #include <ctype.h>
 #include <iconv.h>
+#include "git-compat-util.h"
 #include "cache.h"
 
 static FILE *cmitmsg, *patchfile;
-- 
0.99.9.GIT
Next: Johannes Schindelin
Message 1 of 5 in “Initial AIX portability fixes.”
  1. Initial AIX portability fixes.Jason Riedy, Dec 6, 2005
  2. Johannes SchindelinDec 6, 2005
  3. Jason RiedyDec 7, 2005
  4. Junio C HamanoDec 7, 2005
  5. Junio C HamanoDec 7, 2005

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.