From a8995ebe35885f9170cc3856d3208c813fb8e451 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Thu, 19 Apr 2012 08:52:45 -0400 Subject: libarchive: Avoid trailing , in enum for XL v6 (#13148) IBM xlc v6 cannot cope with a trailing ',' in enum definitions. --- .../cmlibarchive/libarchive/archive_write_set_format_iso9660.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c b/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c index 87136a6..0b9aaf9 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c @@ -197,7 +197,7 @@ struct isofile { enum { NO = 0, BOOT_CATALOG, - BOOT_IMAGE, + BOOT_IMAGE } boot; /* @@ -850,7 +850,7 @@ enum dir_rec_type { DIR_REC_VD, /* Stored in Volume Descriptor. */ DIR_REC_SELF, /* Stored as Current Directory. */ DIR_REC_PARENT, /* Stored as Parent Directory. */ - DIR_REC_NORMAL, /* Stored as Child. */ + DIR_REC_NORMAL /* Stored as Child. */ }; /* @@ -860,7 +860,7 @@ enum vdc { VDC_STD, VDC_LOWERCASE, VDC_UCS2, - VDC_UCS2_DIRECT, + VDC_UCS2_DIRECT }; /* @@ -897,7 +897,7 @@ struct idr { enum char_type { A_CHAR, - D_CHAR, + D_CHAR }; @@ -3989,7 +3989,7 @@ enum keytype { KEY_FLG, KEY_STR, KEY_INT, - KEY_HEX, + KEY_HEX }; static void set_option_info(struct archive_string *info, int *opt, const char *key, -- cgit v0.12 From 09a91c6d5a2533ed2bccd116fcdb87458d602a98 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 19 Apr 2012 09:49:43 -0400 Subject: libarchive: Avoid 'inline' keyword on XL C v6 (#13148) --- Utilities/cmlibarchive/libarchive/archive_endian.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Utilities/cmlibarchive/libarchive/archive_endian.h b/Utilities/cmlibarchive/libarchive/archive_endian.h index 1dd8536..c3c78b3 100644 --- a/Utilities/cmlibarchive/libarchive/archive_endian.h +++ b/Utilities/cmlibarchive/libarchive/archive_endian.h @@ -44,9 +44,12 @@ * - Watcom C++ in C code. (For any version?) * - SGI MIPSpro * - Microsoft Visual C++ 6.0 (supposedly newer versions too) + * - IBM VisualAge 6 (XL v6) */ #if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__) #define inline +#elif defined(__IBMC__) && __IBMC__ < 700 +#define inline #elif defined(_MSC_VER) || defined(__osf__) #define inline __inline #endif -- cgit v0.12 From b3c77889e43176547b37d392451171acd7860650 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Thu, 19 Apr 2012 14:25:55 -0400 Subject: Workaround IBM XL v6 streams seekg bug (#13149) It seems that file.seekg(0) will, in some circumstances, cause the next file.getline() to omit the first character it reads. Workaround the bug by seeking from ios::beg explicitly. --- Source/cmFileCommand.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 3f14fa1..d69431e 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -300,7 +300,7 @@ bool cmFileCommand::HandleReadCommand(std::vector const& args) offset = atoi(offsetArg.GetCString()); } - file.seekg(offset); + file.seekg(offset, std::ios::beg); // explicit ios::beg for IBM VisualAge 6 std::string output; -- cgit v0.12