Necessary changes were made in the aws-sdk-cpp to support AIX OS.#3714
Necessary changes were made in the aws-sdk-cpp to support AIX OS.#3714patel-parth7 wants to merge 6 commits intoaws:mainfrom
Conversation
| #include <climits> | ||
| #endif | ||
| #ifdef _AIX | ||
| #define NAME_MAX 255 |
There was a problem hiding this comment.
what is this define used for?
There was a problem hiding this comment.
NAME_MAX is used in the same file at line 281.
On AIX, this macro is undefined. So need to define it with respect to AIX.
There was a problem hiding this comment.
on line 281 NAME_MAX is used as
#if defined(HAS_PATHCONF)
errno = 0;
long longNameLength = pathconf(".", _PC_NAME_MAX);
ASSERT_TRUE(longNameLength >= 0 || errno == 0);
if (longNameLength <= 0)
{
longNameLength = NAME_MAX;
}
#else
// Path compoments on Windows can't exceed 255(_MAX_FNAME) chars.
// To cover the Windows case where the path with length over 260(MAX_PATH) chars,
// set one path part to be 255 characters, so dir1/dir2/dir3/[longDirName] is over 260 chars.
long longNameLength = 255;
#endifso which one does AIX fall into? does it have HAS_PATHCONF in which case why can you not use it? if it does not why does the default value of 255 not work for you?
There was a problem hiding this comment.
AIX defines HAS_PATHCONF, so the code enters the corresponding conditional block. However, the NAME_MAX macro is not defined in the AIX system header (sys/limits.h). Therefore, this macro must be explicitly defined for AIX.
|
|
||
| void LocalTime(tm* t, std::time_t time) | ||
| { | ||
| localtime_r(&time, t); |
There was a problem hiding this comment.
are localtime_r and gmtime_r supported in AIX?
There was a problem hiding this comment.
Yes. localtime_r and gmtime_r are supported in AIX.
|
|
||
| if(NOT CMAKE_SYSTEM_NAME STREQUAL "AIX") | ||
| # use response files to prevent command-line-too-big errors for large libraries like iam | ||
| set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) |
There was a problem hiding this comment.
why do these cmake flags need to be turned off for AIX?
There was a problem hiding this comment.
CMake response file support is not enabled on AIX; therefore, it must be blocked.
*Issue #3440 *
Description of changes:
Check all that applies:
Require to add support for AIX platform.
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.