Skip to content
Snippets Groups Projects
Commit 88f43b3b authored by Christoph Langer's avatar Christoph Langer
Browse files

8171906: Changes for 8148023 break AIX build

Reviewed-by: goetz, bpb
parent 80340c2a
No related branches found
No related tags found
No related merge requests found
......@@ -39,10 +39,6 @@
#include <dlfcn.h>
#include <limits.h>
#if defined(__solaris__) && !defined(NAME_MAX)
#define NAME_MAX MAXNAMLEN
#endif
#include "jni.h"
#include "jni_util.h"
#include "jlong.h"
......@@ -52,6 +48,19 @@
#include "java_io_FileSystem.h"
#include "java_io_UnixFileSystem.h"
#if defined(_AIX)
#if !defined(NAME_MAX)
#define NAME_MAX MAXNAMLEN
#endif
#define DIR DIR64
#define opendir opendir64
#define closedir closedir64
#endif
#if defined(__solaris__) && !defined(NAME_MAX)
#define NAME_MAX MAXNAMLEN
#endif
#if defined(_ALLBSD_SOURCE)
#define dirent64 dirent
#define readdir64_r readdir_r
......
/*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -62,13 +62,16 @@ isAsciiDigit(char c)
return c >= '0' && c <= '9';
}
#ifdef _ALLBSD_SOURCE
#if defined(_AIX)
/* AIX does not understand '/proc/self' - it requires the real process ID */
#define FD_DIR aix_fd_dir
#define DIR DIR64
#define opendir opendir64
#define closedir closedir64
#elif defined(_ALLBSD_SOURCE)
#define FD_DIR "/dev/fd"
#define dirent64 dirent
#define readdir64 readdir
#elif defined(_AIX)
/* AIX does not understand '/proc/self' - it requires the real process ID */
#define FD_DIR aix_fd_dir
#else
#define FD_DIR "/proc/self/fd"
#endif
......
......@@ -81,6 +81,12 @@
#include "sun_nio_fs_UnixNativeDispatcher.h"
#if defined(_AIX)
#define DIR DIR64
#define opendir opendir64
#define closedir closedir64
#endif
/**
* Size of password or group entry when not available via sysconf
*/
......@@ -264,7 +270,11 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
my_unlinkat_func = (unlinkat_func*) dlsym(RTLD_DEFAULT, "unlinkat");
my_renameat_func = (renameat_func*) dlsym(RTLD_DEFAULT, "renameat");
my_futimesat_func = (futimesat_func*) dlsym(RTLD_DEFAULT, "futimesat");
#if defined(_AIX)
my_fdopendir_func = (fdopendir_func*) dlsym(RTLD_DEFAULT, "fdopendir64");
#else
my_fdopendir_func = (fdopendir_func*) dlsym(RTLD_DEFAULT, "fdopendir");
#endif
#if defined(FSTATAT64_SYSCALL_AVAILABLE)
/* fstatat64 missing from glibc */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment