8154921: Fix aix after "8146879: Add option for handling existing log files in UL"

Rename os::fileno to os::get_fileno because AIX defines macro 'fileno'.

Reviewed-by: coleenp
This commit is contained in:
Goetz Lindenmaier 2016-04-22 14:57:18 +02:00
parent 2e4cd63893
commit dafa24689b
4 changed files with 5 additions and 5 deletions

View File

@ -181,8 +181,8 @@ int os::log_vsnprintf(char* buf, size_t len, const char* fmt, va_list args) {
return vsnprintf(buf, len, fmt, args);
}
int os::fileno(FILE* fp) {
return ::fileno(fp);
int os::get_fileno(FILE* fp) {
return NOT_AIX(::)fileno(fp);
}
void os::Posix::print_load_average(outputStream* st) {

View File

@ -4602,7 +4602,7 @@ int os::ftruncate(int fd, jlong length) {
return 0;
}
int os::fileno(FILE* fp) {
int os::get_fileno(FILE* fp) {
return _fileno(fp);
}

View File

@ -252,7 +252,7 @@ bool LogFileOutput::initialize(const char* options, outputStream* errstream) {
if (_file_count == 0 && is_regular_file(_file_name)) {
log_trace(logging)("Truncating log file");
os::ftruncate(os::fileno(_stream), 0);
os::ftruncate(os::get_fileno(_stream), 0);
}
return true;

View File

@ -520,7 +520,7 @@ class os: AllStatic {
static int ftruncate(int fd, jlong length);
static int fsync(int fd);
static int available(int fd, jlong *bytes);
static int fileno(FILE* fp);
static int get_fileno(FILE* fp);
static int compare_file_modified_times(const char* file1, const char* file2);