{"thread":{"id":"2760","subject":"[PATCH] Initial AIX portability fixes.","startedAt":"2005-12-06T22:20:16Z","lastAt":"2005-12-07T00:12:52Z","messageCount":5,"participants":["Jason Riedy","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"13288","messageId":"20493.1133907616@lotus.CS.Berkeley.EDU","threadId":"2760","inReplyTo":null,"subject":"[PATCH] Initial AIX portability fixes.","fromName":"Jason Riedy","fromEmail":"ejr@eecs.berkeley.edu","sentAt":"2005-12-06T22:20:16Z","receivedAt":"2005-12-06T22:20:16Z","isPatch":true,"sender":{"key":"ejr@eecs.berkeley.edu","avatar":"https://gravatar.com/avatar/547fa56f887cab01599edab4e9f813c949c1269e02714f20e0496c56185d9837?d=mp&s=160"},"body":"\nAdded an AIX clause in the Makefile; that clause likely\nwill be wrong for any AIX pre-5.2, but I can only test\non 5.3.  mailinfo.c was missing the compat header file,\nand convert-objects.c needs to define a specific\n_XOPEN_SOURCE as well as _XOPEN_SOURCE_EXTENDED.\n\nSigned-off-by: E. Jason Riedy <ejr@cs.berkeley.edu>\n\n---\n\n Makefile          |    4 ++++\n convert-objects.c |    3 ++-\n mailinfo.c        |    1 +\n 3 files changed, 7 insertions(+), 1 deletions(-)\n\n54b8c282e017b246612b94bcbf5b88ab39c042a0\ndiff --git a/Makefile b/Makefile\nindex 425c519..01b6643 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -243,6 +243,10 @@ ifeq ($(uname_S),NetBSD)\n \tALL_CFLAGS += -I/usr/pkg/include\n \tALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib\n endif\n+ifeq ($(uname_S),AIX)\n+\tNO_STRCASESTR=YesPlease\n+\tNEEDS_LIBICONV=YesPlease\n+endif\n ifneq (,$(findstring arm,$(uname_M)))\n \tARM_SHA1 = YesPlease\n endif\ndiff --git a/convert-objects.c b/convert-objects.c\nindex d78a8b4..b49bce2 100644\n--- a/convert-objects.c\n+++ b/convert-objects.c\n@@ -1,4 +1,5 @@\n-#define _XOPEN_SOURCE /* glibc2 needs this */\n+#define _XOPEN_SOURCE 500 /* glibc2 and AIX 5.3L need this */\n+#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n #include <time.h>\n #include \"cache.h\"\n \ndiff --git a/mailinfo.c b/mailinfo.c\nindex 3b97a89..d4b4163 100644\n--- a/mailinfo.c\n+++ b/mailinfo.c\n@@ -8,6 +8,7 @@\n #include <string.h>\n #include <ctype.h>\n #include <iconv.h>\n+#include \"git-compat-util.h\"\n #include \"cache.h\"\n \n static FILE *cmitmsg, *patchfile;\n-- \n0.99.9.GIT\n"},{"id":"13294","messageId":"Pine.LNX.4.63.0512070055430.5888@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2760","inReplyTo":"20493.1133907616@lotus.CS.Berkeley.EDU","subject":"Re: [PATCH] Initial AIX portability fixes.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-12-06T23:58:28Z","receivedAt":"2005-12-06T23:58:28Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 6 Dec 2005, Jason Riedy wrote:\n\n> -#define _XOPEN_SOURCE /* glibc2 needs this */\n> +#define _XOPEN_SOURCE 500 /* glibc2 and AIX 5.3L need this */\n> +#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n\nWhy not enclose the #define in #ifndef/#endif, and do the real magic in \nthe Makefile? Within the AIX clause:\n\n\tALL_CFLAGS += -D_XOPEN_SOURCE=500 -XOPEN_SOURCE_EXTENDED=1\n\nThis way the source does not get cluttered with platform dependent \ndefines.\n\nHth,\nDscho\n"},{"id":"13295","messageId":"21075.1133914036@lotus.CS.Berkeley.EDU","threadId":"2760","inReplyTo":"Pine.LNX.4.63.0512070055430.5888@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Initial AIX portability fixes.","fromName":"Jason Riedy","fromEmail":"ejr@eecs.berkeley.edu","sentAt":"2005-12-07T00:07:16Z","receivedAt":"2005-12-07T00:07:16Z","isPatch":true,"sender":{"key":"ejr@eecs.berkeley.edu","avatar":"https://gravatar.com/avatar/547fa56f887cab01599edab4e9f813c949c1269e02714f20e0496c56185d9837?d=mp&s=160"},"body":"And Johannes Schindelin writes:\n - Why not enclose the #define in #ifndef/#endif, and do the real magic in \n - the Makefile? Within the AIX clause:\n - \tALL_CFLAGS += -D_XOPEN_SOURCE=500 -XOPEN_SOURCE_EXTENDED=1\n\nBecause other files do _not_ compile when given those options.\nI'm going for minimal changes to the existing structure; the\n#define for glibc2 has been there a long, long time.  Yes, it\nprobably can be done better, but these are 1.0rc versions...\n\nJason\n"},{"id":"13296","messageId":"7vzmndzs3u.fsf@assigned-by-dhcp.cox.net","threadId":"2760","inReplyTo":"Pine.LNX.4.63.0512070055430.5888@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Initial AIX portability fixes.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-07T00:08:21Z","receivedAt":"2005-12-07T00:08:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Tue, 6 Dec 2005, Jason Riedy wrote:\n>\n>> -#define _XOPEN_SOURCE /* glibc2 needs this */\n>> +#define _XOPEN_SOURCE 500 /* glibc2 and AIX 5.3L need this */\n>> +#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */\n>\n> Why not enclose the #define in #ifndef/#endif, and do the real magic in \n> the Makefile? Within the AIX clause:\n>\n> \tALL_CFLAGS += -D_XOPEN_SOURCE=500 -XOPEN_SOURCE_EXTENDED=1\n>\n> This way the source does not get cluttered with platform dependent \n> defines.\n\nTrue but the original convert-objects.c defines _XOPEN_SOURCE on\nall platforms not just AIX.\n"},{"id":"13297","messageId":"7vvey1zrwb.fsf@assigned-by-dhcp.cox.net","threadId":"2760","inReplyTo":"21075.1133914036@lotus.CS.Berkeley.EDU","subject":"Re: [PATCH] Initial AIX portability fixes.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-07T00:12:52Z","receivedAt":"2005-12-07T00:12:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jason Riedy <ejr@EECS.Berkeley.EDU> writes:\n\n> And Johannes Schindelin writes:\n>  - Why not enclose the #define in #ifndef/#endif, and do the real magic in \n>  - the Makefile? Within the AIX clause:\n>  - \tALL_CFLAGS += -D_XOPEN_SOURCE=500 -XOPEN_SOURCE_EXTENDED=1\n>\n> Because other files do _not_ compile when given those options.\n> I'm going for minimal changes to the existing structure; the\n> #define for glibc2 has been there a long, long time.  Yes, it\n> probably can be done better, but these are 1.0rc versions...\n\nI agree with your approach of least impact for now.  Thanks.\n"}]}