PatchSet 6876
Date: 2005/08/30 22:30:37
Author: kaz
Branch: HEAD
Tag: (none)
Log:
2005-08-27 Ito Kazumitsu <[EMAIL PROTECTED]>
* libraries/clib/target/Linux/target_native_file.h
(TARGET_NATIVE_FILE_AVAILABLE): Return length=0 if fstat for the
file is successful but the file is not a regular file.
Members:
ChangeLog:1.4397->1.4398
libraries/clib/target/Linux/target_native_file.h:1.5->1.6
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4397 kaffe/ChangeLog:1.4398
--- kaffe/ChangeLog:1.4397 Sun Aug 28 01:46:46 2005
+++ kaffe/ChangeLog Tue Aug 30 22:30:37 2005
@@ -1,3 +1,9 @@
+2005-08-27 Ito Kazumitsu <[EMAIL PROTECTED]>
+
+ * libraries/clib/target/Linux/target_native_file.h
+ (TARGET_NATIVE_FILE_AVAILABLE): Return length=0 if fstat for the
+ file is successful but the file is not a regular file.
+
2005-08-27 Dalibor Topic <[EMAIL PROTECTED]>
Resynced with GNU Classpath.
Index: kaffe/libraries/clib/target/Linux/target_native_file.h
diff -u kaffe/libraries/clib/target/Linux/target_native_file.h:1.5
kaffe/libraries/clib/target/Linux/target_native_file.h:1.6
--- kaffe/libraries/clib/target/Linux/target_native_file.h:1.5 Fri Aug 5
01:20:19 2005
+++ kaffe/libraries/clib/target/Linux/target_native_file.h Tue Aug 30
22:30:40 2005
@@ -138,18 +138,26 @@
\
length=0; \
\
- if ((KFSTAT(filedescriptor,&__statBuffer)==0) &&
S_ISREG(__statBuffer.st_mode)) \
+ if (KFSTAT(filedescriptor,&__statBuffer)==0) \
{ \
- int klseek_result; \
- klseek_result=(KLSEEK(filedescriptor,0,SEEK_CUR, &__n)); \
- if (klseek_result == 0) \
+ if (S_ISREG(__statBuffer.st_mode)) \
{ \
-
length=TARGET_NATIVE_MATH_INT_INT32_TO_INT64(__statBuffer.st_size-__n); \
- result=TARGET_NATIVE_OK; \
+ int klseek_result; \
+ klseek_result=(KLSEEK(filedescriptor,0,SEEK_CUR, &__n)); \
+ if (klseek_result == 0) \
+ { \
+
length=TARGET_NATIVE_MATH_INT_INT32_TO_INT64(__statBuffer.st_size-__n); \
+ result=TARGET_NATIVE_OK; \
+ } \
+ else \
+ { \
+ result=TARGET_NATIVE_ERROR; \
+ } \
} \
else \
{ \
- result=TARGET_NATIVE_ERROR; \
+ length=TARGET_NATIVE_MATH_INT_INT32_TO_INT64(0); \
+ result=TARGET_NATIVE_OK; \
} \
} \
else \
_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe