Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
b4a1b7b2
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b4a1b7b2
编写于
7月 27, 2009
作者:
A
alanb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6864319: (fs) Eliminate static dependency on fdopendir (lnx)
Reviewed-by: martin
上级
ce6b0326
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
4 deletion
+12
-4
src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
+12
-4
未找到文件。
src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
浏览文件 @
b4a1b7b2
...
...
@@ -85,19 +85,21 @@ static jfieldID entry_options;
static
jfieldID
entry_dev
;
/**
* System calls that may not be available at
build
time.
* System calls that may not be available at
run
time.
*/
typedef
int
openat64_func
(
int
,
const
char
*
,
int
,
...);
typedef
int
fstatat64_func
(
int
,
const
char
*
,
struct
stat64
*
,
int
);
typedef
int
unlinkat_func
(
int
,
const
char
*
,
int
);
typedef
int
renameat_func
(
int
,
const
char
*
,
int
,
const
char
*
);
typedef
int
futimesat_func
(
int
,
const
char
*
,
const
struct
timeval
*
);
typedef
DIR
*
fdopendir_func
(
int
);
static
openat64_func
*
my_openat64_func
=
NULL
;
static
fstatat64_func
*
my_fstatat64_func
=
NULL
;
static
unlinkat_func
*
my_unlinkat_func
=
NULL
;
static
renameat_func
*
my_renameat_func
=
NULL
;
static
futimesat_func
*
my_futimesat_func
=
NULL
;
static
fdopendir_func
*
my_fdopendir_func
=
NULL
;
/**
* fstatat missing from glibc on Linux. Temporary workaround
...
...
@@ -183,7 +185,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
entry_options
=
(
*
env
)
->
GetFieldID
(
env
,
clazz
,
"opts"
,
"[B"
);
entry_dev
=
(
*
env
)
->
GetFieldID
(
env
,
clazz
,
"dev"
,
"J"
);
/* system calls that might not be available at
build
time */
/* system calls that might not be available at
run
time */
#if defined(__solaris__) && defined(_LP64)
/* Solaris 64-bit does not have openat64/fstatat64 */
...
...
@@ -196,6 +198,7 @@ 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"
);
my_fdopendir_func
=
(
fdopendir_func
*
)
dlsym
(
RTLD_DEFAULT
,
"fdopendir"
);
#if defined(FSTATAT64_SYSCALL_AVAILABLE)
/* fstatat64 missing from glibc */
...
...
@@ -205,7 +208,7 @@ Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this)
if
(
my_openat64_func
!=
NULL
&&
my_fstatat64_func
!=
NULL
&&
my_unlinkat_func
!=
NULL
&&
my_renameat_func
!=
NULL
&&
my_futimesat_func
!=
NULL
)
my_futimesat_func
!=
NULL
&&
my_fdopendir_func
!=
NULL
)
{
flags
|=
sun_nio_fs_UnixNativeDispatcher_HAS_AT_SYSCALLS
;
}
...
...
@@ -565,8 +568,13 @@ JNIEXPORT jlong JNICALL
Java_sun_nio_fs_UnixNativeDispatcher_fdopendir
(
JNIEnv
*
env
,
jclass
this
,
int
dfd
)
{
DIR
*
dir
;
if
(
my_fdopendir_func
==
NULL
)
{
JNU_ThrowInternalError
(
env
,
"should not reach here"
);
return
(
jlong
)
-
1
;
}
/* EINTR not listed as a possible error */
dir
=
fdopendir
((
int
)
dfd
);
dir
=
(
*
my_fdopendir_func
)
((
int
)
dfd
);
if
(
dir
==
NULL
)
{
throwUnixException
(
env
,
errno
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录