Skip to content

Commit a6da939

Browse files
Jason RiedyJunio C Hamano
authored andcommitted
[PATCH] Initial AIX portability fixes.
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> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent be61db9 commit a6da939

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ ifeq ($(uname_S),NetBSD)
243243
ALL_CFLAGS += -I/usr/pkg/include
244244
ALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib
245245
endif
246+
ifeq ($(uname_S),AIX)
247+
NO_STRCASESTR=YesPlease
248+
NEEDS_LIBICONV=YesPlease
249+
endif
246250
ifneq (,$(findstring arm,$(uname_M)))
247251
ARM_SHA1 = YesPlease
248252
endif

convert-objects.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#define _XOPEN_SOURCE /* glibc2 needs this */
1+
#define _XOPEN_SOURCE 500 /* glibc2 and AIX 5.3L need this */
2+
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
23
#include <time.h>
34
#include "cache.h"
45

mailinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <string.h>
99
#include <ctype.h>
1010
#include <iconv.h>
11+
#include "git-compat-util.h"
1112
#include "cache.h"
1213

1314
static FILE *cmitmsg, *patchfile;

0 commit comments

Comments
 (0)