Implemented 64bit file size handling.
Removed several unneeded sys/stat.h includes.
This commit is contained in:
parent
5920737f80
commit
3f1ed52d8b
|
@ -5792,6 +5792,8 @@ for ac_func in \
|
|||
ecvt \
|
||||
finite \
|
||||
fpclass \
|
||||
fstat64 \
|
||||
ftruncate64 \
|
||||
getnetbyaddr \
|
||||
getnetbyname \
|
||||
getpagesize \
|
||||
|
@ -5801,7 +5803,9 @@ for ac_func in \
|
|||
getservbyport \
|
||||
getsockopt \
|
||||
inet_network \
|
||||
lseek64 \
|
||||
lstat \
|
||||
lstat64 \
|
||||
memmove \
|
||||
mmap \
|
||||
rfork \
|
||||
|
@ -5809,6 +5813,7 @@ for ac_func in \
|
|||
sendmsg \
|
||||
settimeofday \
|
||||
sigaltstack \
|
||||
stat64 \
|
||||
statfs \
|
||||
strcasecmp \
|
||||
strerror \
|
||||
|
@ -5822,12 +5827,12 @@ for ac_func in \
|
|||
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:5826: checking for $ac_func" >&5
|
||||
echo "configure:5831: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5831 "configure"
|
||||
#line 5836 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -5850,7 +5855,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -5932,17 +5937,17 @@ for ac_hdr in \
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:5936: checking for $ac_hdr" >&5
|
||||
echo "configure:5941: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5941 "configure"
|
||||
#line 5946 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:5946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:5951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -5969,12 +5974,12 @@ fi
|
|||
done
|
||||
|
||||
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
|
||||
echo "configure:5973: checking whether stat file-mode macros are broken" >&5
|
||||
echo "configure:5978: checking whether stat file-mode macros are broken" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5978 "configure"
|
||||
#line 5983 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -6027,12 +6032,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||
echo "configure:6031: checking for working const" >&5
|
||||
echo "configure:6036: checking for working const" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6036 "configure"
|
||||
#line 6041 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -6081,7 +6086,7 @@ ccp = (char const *const *) p;
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
|
@ -6102,21 +6107,21 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for inline""... $ac_c" 1>&6
|
||||
echo "configure:6106: checking for inline" >&5
|
||||
echo "configure:6111: checking for inline" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_cv_c_inline=no
|
||||
for ac_kw in inline __inline__ __inline; do
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6113 "configure"
|
||||
#line 6118 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
} int $ac_kw foo() {
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_inline=$ac_kw; break
|
||||
else
|
||||
|
@ -6142,12 +6147,12 @@ EOF
|
|||
esac
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
echo "configure:6146: checking for ANSI C header files" >&5
|
||||
echo "configure:6151: checking for ANSI C header files" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6151 "configure"
|
||||
#line 6156 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -6155,7 +6160,7 @@ else
|
|||
#include <float.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:6159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:6164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -6172,7 +6177,7 @@ rm -f conftest*
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6176 "configure"
|
||||
#line 6181 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
|
@ -6190,7 +6195,7 @@ fi
|
|||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6194 "configure"
|
||||
#line 6199 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
|
@ -6211,7 +6216,7 @@ if test "$cross_compiling" = yes; then
|
|||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6215 "configure"
|
||||
#line 6220 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
|
@ -6222,7 +6227,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|||
exit (0); }
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:6226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
:
|
||||
else
|
||||
|
@ -6246,12 +6251,12 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for size_t""... $ac_c" 1>&6
|
||||
echo "configure:6250: checking for size_t" >&5
|
||||
echo "configure:6255: checking for size_t" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6255 "configure"
|
||||
#line 6260 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
|
@ -6279,7 +6284,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking size of long long""... $ac_c" 1>&6
|
||||
echo "configure:6283: checking size of long long" >&5
|
||||
echo "configure:6288: checking size of long long" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6287,7 +6292,7 @@ else
|
|||
ac_cv_sizeof_long_long=0
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6291 "configure"
|
||||
#line 6296 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
|
@ -6298,7 +6303,7 @@ main()
|
|||
exit(0);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:6302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_long_long=`cat conftestval`
|
||||
else
|
||||
|
@ -6318,13 +6323,94 @@ EOF
|
|||
|
||||
|
||||
|
||||
echo $ac_n "checking "for off64_t"""... $ac_c" 1>&6
|
||||
echo "configure:6328: checking "for off64_t"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_off64_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6333 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <sys/types.h>
|
||||
|
||||
int main() {
|
||||
|
||||
off64_t testoffset;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_off64_t="yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
wine_cv_off64_t="no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$wine_cv_off64_t" 1>&6
|
||||
if test "$wine_cv_off64_t" = "yes"
|
||||
then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_OFF64_T 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking "for struct stat64"""... $ac_c" 1>&6
|
||||
echo "configure:6368: checking "for struct stat64"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_struct_stat64'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6373 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int main() {
|
||||
|
||||
struct stat64 tst64;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_struct_stat64="yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
wine_cv_struct_stat64="no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$wine_cv_struct_stat64" 1>&6
|
||||
if test "$wine_cv_struct_stat64" = "yes"
|
||||
then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_STRUCT_STAT64 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking "whether linux/input.h is for real"""... $ac_c" 1>&6
|
||||
echo "configure:6323: checking "whether linux/input.h is for real"" >&5
|
||||
echo "configure:6409: checking "whether linux/input.h is for real"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_linux_input_h'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6328 "configure"
|
||||
#line 6414 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <linux/input.h>
|
||||
|
@ -6337,7 +6423,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_linux_input_h=yes
|
||||
else
|
||||
|
@ -6361,12 +6447,12 @@ EOF
|
|||
|
||||
|
||||
echo $ac_n "checking "whether we can use re-entrant gethostbyname_r Linux style"""... $ac_c" 1>&6
|
||||
echo "configure:6365: checking "whether we can use re-entrant gethostbyname_r Linux style"" >&5
|
||||
echo "configure:6451: checking "whether we can use re-entrant gethostbyname_r Linux style"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_linux_gethostbyname_r_6'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6370 "configure"
|
||||
#line 6456 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <netdb.h>
|
||||
|
@ -6387,7 +6473,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_linux_gethostbyname_r_6=yes
|
||||
else
|
||||
|
@ -6413,12 +6499,12 @@ EOF
|
|||
if test "$ac_cv_header_linux_joystick_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether linux/joystick.h uses the Linux 2.2+ API"""... $ac_c" 1>&6
|
||||
echo "configure:6417: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5
|
||||
echo "configure:6503: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_linux_joystick_22_api'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6422 "configure"
|
||||
#line 6508 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -6433,7 +6519,7 @@ int main() {
|
|||
/*empty*/
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_linux_joystick_22_api=yes
|
||||
else
|
||||
|
@ -6460,12 +6546,12 @@ fi
|
|||
if test "$ac_cv_header_sys_vfs_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/vfs.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:6464: checking "whether sys/vfs.h defines statfs"" >&5
|
||||
echo "configure:6550: checking "whether sys/vfs.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_vfs_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6469 "configure"
|
||||
#line 6555 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -6482,7 +6568,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_vfs_has_statfs=yes
|
||||
else
|
||||
|
@ -6509,12 +6595,12 @@ fi
|
|||
if test "$ac_cv_header_sys_statfs_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/statfs.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:6513: checking "whether sys/statfs.h defines statfs"" >&5
|
||||
echo "configure:6599: checking "whether sys/statfs.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_statfs_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6518 "configure"
|
||||
#line 6604 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -6529,7 +6615,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_statfs_has_statfs=yes
|
||||
else
|
||||
|
@ -6556,12 +6642,12 @@ fi
|
|||
if test "$ac_cv_header_sys_mount_h" = "yes"
|
||||
then
|
||||
echo $ac_n "checking "whether sys/mount.h defines statfs"""... $ac_c" 1>&6
|
||||
echo "configure:6560: checking "whether sys/mount.h defines statfs"" >&5
|
||||
echo "configure:6646: checking "whether sys/mount.h defines statfs"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_sys_mount_has_statfs'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6565 "configure"
|
||||
#line 6651 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -6576,7 +6662,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_sys_mount_has_statfs=yes
|
||||
else
|
||||
|
@ -6602,7 +6688,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
|
||||
echo "configure:6606: checking "for statfs.f_bfree"" >&5
|
||||
echo "configure:6692: checking "for statfs.f_bfree"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_statfs_bfree'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6611,7 +6697,7 @@ else
|
|||
wine_cv_statfs_bfree=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6615 "configure"
|
||||
#line 6701 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -6638,7 +6724,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_statfs_bfree=yes
|
||||
else
|
||||
|
@ -6662,7 +6748,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
|
||||
echo "configure:6666: checking "for statfs.f_bavail"" >&5
|
||||
echo "configure:6752: checking "for statfs.f_bavail"" >&5
|
||||
if eval "test \"`echo '$''{'wine_cv_statfs_bavail'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6671,7 +6757,7 @@ else
|
|||
wine_cv_statfs_bavail=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6675 "configure"
|
||||
#line 6761 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -6698,7 +6784,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
wine_cv_statfs_bavail=yes
|
||||
else
|
||||
|
@ -6723,12 +6809,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
|
||||
echo "configure:6727: checking "for msg_accrights in struct msghdr"" >&5
|
||||
echo "configure:6813: checking "for msg_accrights in struct msghdr"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_msg_accrights'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6732 "configure"
|
||||
#line 6818 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -6736,7 +6822,7 @@ int main() {
|
|||
struct msghdr hdr; hdr.msg_accrights=0
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_msg_accrights="yes"
|
||||
else
|
||||
|
@ -6759,12 +6845,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "for sun_len in struct sockaddr_un"""... $ac_c" 1>&6
|
||||
echo "configure:6763: checking "for sun_len in struct sockaddr_un"" >&5
|
||||
echo "configure:6849: checking "for sun_len in struct sockaddr_un"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_sun_len'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6768 "configure"
|
||||
#line 6854 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -6773,7 +6859,7 @@ int main() {
|
|||
static struct sockaddr_un addr; addr.sun_len = 1
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:6863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_sun_len="yes"
|
||||
else
|
||||
|
@ -6796,12 +6882,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6
|
||||
echo "configure:6800: checking "whether we need to define __i386__"" >&5
|
||||
echo "configure:6886: checking "whether we need to define __i386__"" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_cpp_def_i386'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6805 "configure"
|
||||
#line 6891 "configure"
|
||||
#include "confdefs.h"
|
||||
#if (defined(i386) || defined(__i386)) && !defined(__i386__)
|
||||
yes
|
||||
|
|
42
configure.in
42
configure.in
|
@ -757,6 +757,8 @@ AC_CHECK_FUNCS(\
|
|||
ecvt \
|
||||
finite \
|
||||
fpclass \
|
||||
fstat64 \
|
||||
ftruncate64 \
|
||||
getnetbyaddr \
|
||||
getnetbyname \
|
||||
getpagesize \
|
||||
|
@ -766,7 +768,9 @@ AC_CHECK_FUNCS(\
|
|||
getservbyport \
|
||||
getsockopt \
|
||||
inet_network \
|
||||
lseek64 \
|
||||
lstat \
|
||||
lstat64 \
|
||||
memmove \
|
||||
mmap \
|
||||
rfork \
|
||||
|
@ -774,6 +778,7 @@ AC_CHECK_FUNCS(\
|
|||
sendmsg \
|
||||
settimeofday \
|
||||
sigaltstack \
|
||||
stat64 \
|
||||
statfs \
|
||||
strcasecmp \
|
||||
strerror \
|
||||
|
@ -850,6 +855,43 @@ AC_C_INLINE()
|
|||
AC_TYPE_SIZE_T()
|
||||
AC_CHECK_SIZEOF(long long,0)
|
||||
|
||||
AC_CACHE_CHECK("for off64_t",
|
||||
wine_cv_off64_t,
|
||||
AC_TRY_COMPILE([
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <sys/types.h>
|
||||
],[
|
||||
off64_t testoffset;
|
||||
],
|
||||
wine_cv_off64_t="yes",
|
||||
wine_cv_off64_t="no",
|
||||
wine_cv_off64_t="yes"
|
||||
)
|
||||
)
|
||||
if test "$wine_cv_off64_t" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_OFF64_T)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK("for struct stat64",
|
||||
wine_cv_struct_stat64,
|
||||
AC_TRY_COMPILE([
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
],[
|
||||
struct stat64 tst64;
|
||||
],
|
||||
wine_cv_struct_stat64="yes",
|
||||
wine_cv_struct_stat64="no",
|
||||
wine_cv_struct_stat64="yes"
|
||||
)
|
||||
)
|
||||
if test "$wine_cv_struct_stat64" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_STRUCT_STAT64)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK("whether linux/input.h is for real",
|
||||
wine_cv_linux_input_h,
|
||||
AC_TRY_COMPILE([
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -25,7 +25,6 @@ HKEY_DYN_DATA
|
|||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <memory.h>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <memory.h>
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/exception.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h> /* qsort() & bsearch() */
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <limits.h> /* INT_MIN */
|
||||
#include <float.h> /* FLT_MAX */
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
|
|
36
files/file.c
36
files/file.c
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
@ -36,7 +37,6 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/winbase16.h"
|
||||
#include "wine/port.h"
|
||||
#include "drive.h"
|
||||
#include "file.h"
|
||||
#include "heap.h"
|
||||
|
@ -491,7 +491,7 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
|
|||
*
|
||||
* Fill a file information from a struct stat.
|
||||
*/
|
||||
static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
|
||||
static void FILE_FillInfo( struct stat64 *st, BY_HANDLE_FILE_INFORMATION *info )
|
||||
{
|
||||
if (S_ISDIR(st->st_mode))
|
||||
info->dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;
|
||||
|
@ -506,7 +506,11 @@ static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
|
|||
|
||||
info->dwVolumeSerialNumber = 0; /* FIXME */
|
||||
info->nFileSizeHigh = 0;
|
||||
info->nFileSizeLow = S_ISDIR(st->st_mode) ? 0 : st->st_size;
|
||||
info->nFileSizeLow = 0;
|
||||
if (!S_ISDIR(st->st_mode)) {
|
||||
info->nFileSizeHigh = st->st_size >> 32;
|
||||
info->nFileSizeLow = st->st_size & 0xffffffff;
|
||||
}
|
||||
info->nNumberOfLinks = st->st_nlink;
|
||||
info->nFileIndexHigh = 0;
|
||||
info->nFileIndexLow = st->st_ino;
|
||||
|
@ -520,9 +524,9 @@ static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
|
|||
*/
|
||||
BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
|
||||
{
|
||||
struct stat st;
|
||||
struct stat64 st;
|
||||
|
||||
if (lstat( unixName, &st ) == -1)
|
||||
if (lstat64( unixName, &st ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
|
@ -532,7 +536,7 @@ BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
|
|||
{
|
||||
/* do a "real" stat to find out
|
||||
about the type of the symlink destination */
|
||||
if (stat( unixName, &st ) == -1)
|
||||
if (stat64( unixName, &st ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
|
@ -1644,17 +1648,8 @@ DWORD WINAPI SetFilePointer( HANDLE hFile, LONG distance, LONG *highword,
|
|||
{
|
||||
DWORD ret = 0xffffffff;
|
||||
|
||||
if (highword &&
|
||||
((distance >= 0 && *highword != 0) || (distance < 0 && *highword != -1)))
|
||||
{
|
||||
FIXME("64-bit offsets not supported yet\n"
|
||||
"SetFilePointer(%08x,%08lx,%08lx,%08lx)\n",
|
||||
hFile,distance,*highword,method);
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
return ret;
|
||||
}
|
||||
TRACE("handle %d offset %ld origin %ld\n",
|
||||
hFile, distance, method );
|
||||
TRACE("handle %d offset %ld high %ld origin %ld\n",
|
||||
hFile, distance, highword?*highword:0, method );
|
||||
|
||||
SERVER_START_REQ( set_file_pointer )
|
||||
{
|
||||
|
@ -2015,7 +2010,10 @@ BOOL WINAPI MoveFileExW( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
|
|||
BOOL WINAPI MoveFileA( LPCSTR fn1, LPCSTR fn2 )
|
||||
{
|
||||
DOS_FULL_NAME full_name1, full_name2;
|
||||
struct stat fstat;
|
||||
/* Even though we do not need the size, stat will fail for large files,
|
||||
* so we need to use stat64 here. */
|
||||
struct stat64 fstat;
|
||||
|
||||
|
||||
TRACE("(%s,%s)\n", fn1, fn2 );
|
||||
|
||||
|
@ -2035,7 +2033,7 @@ BOOL WINAPI MoveFileA( LPCSTR fn1, LPCSTR fn2 )
|
|||
}
|
||||
else return TRUE;
|
||||
else /*copy */ {
|
||||
if (stat( full_name1.long_name, &fstat ))
|
||||
if (stat64( full_name1.long_name, &fstat ))
|
||||
{
|
||||
WARN("Invalid source file %s\n",
|
||||
full_name1.long_name);
|
||||
|
|
|
@ -19,10 +19,8 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "wingdi.h"
|
||||
|
|
|
@ -122,3 +122,9 @@
|
|||
|
||||
/* Define if we have CUPS */
|
||||
#undef HAVE_CUPS
|
||||
|
||||
/* Define if we have 64 bit file offsets */
|
||||
#undef HAVE_OFF64_T
|
||||
|
||||
/* Define if we have struct stat64 */
|
||||
#undef HAVE_STRUCT_STAT64
|
||||
|
|
|
@ -154,6 +154,12 @@
|
|||
/* Define if we have CUPS */
|
||||
#undef HAVE_CUPS
|
||||
|
||||
/* Define if we have 64 bit file offsets */
|
||||
#undef HAVE_OFF64_T
|
||||
|
||||
/* Define if we have struct stat64 */
|
||||
#undef HAVE_STRUCT_STAT64
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
|
@ -181,6 +187,12 @@
|
|||
/* Define if you have the fpclass function. */
|
||||
#undef HAVE_FPCLASS
|
||||
|
||||
/* Define if you have the fstat64 function. */
|
||||
#undef HAVE_FSTAT64
|
||||
|
||||
/* Define if you have the ftruncate64 function. */
|
||||
#undef HAVE_FTRUNCATE64
|
||||
|
||||
/* Define if you have the gethostbyname function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
|
@ -214,9 +226,15 @@
|
|||
/* Define if you have the iswalnum function. */
|
||||
#undef HAVE_ISWALNUM
|
||||
|
||||
/* Define if you have the lseek64 function. */
|
||||
#undef HAVE_LSEEK64
|
||||
|
||||
/* Define if you have the lstat function. */
|
||||
#undef HAVE_LSTAT
|
||||
|
||||
/* Define if you have the lstat64 function. */
|
||||
#undef HAVE_LSTAT64
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#undef HAVE_MEMMOVE
|
||||
|
||||
|
@ -241,6 +259,9 @@
|
|||
/* Define if you have the sigaltstack function. */
|
||||
#undef HAVE_SIGALTSTACK
|
||||
|
||||
/* Define if you have the stat64 function. */
|
||||
#undef HAVE_STAT64
|
||||
|
||||
/* Define if you have the statfs function. */
|
||||
#undef HAVE_STATFS
|
||||
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
#ifndef __WINE_WINE_PORT_H
|
||||
#define __WINE_WINE_PORT_H
|
||||
|
||||
#define _LARGEFILE64_SOURCE /* for glibc 64 bit file functions */
|
||||
|
||||
#include "config.h"
|
||||
#include "winnt.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -131,6 +132,57 @@ int lstat(const char *file_name, struct stat *buf);
|
|||
#define S_ISLNK(mod) (0)
|
||||
#endif /* S_ISLNK */
|
||||
|
||||
#ifndef HAVE_OFF64_T
|
||||
# if SIZEOF_LONG_LONG > 0
|
||||
typedef long long off64_t;
|
||||
# else
|
||||
typedef long off64_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_STAT64
|
||||
/* This does not convert all struct members to 64bit, only size. */
|
||||
struct stat64 {
|
||||
dev_t st_dev; /* device */
|
||||
ino_t st_ino; /* inode */
|
||||
mode_t st_mode; /* protection */
|
||||
nlink_t st_nlink; /* number of hard links */
|
||||
uid_t st_uid; /* user ID of owner */
|
||||
gid_t st_gid; /* group ID of owner */
|
||||
dev_t st_rdev; /* device type (if inode device) */
|
||||
off64_t st_size; /* total size, in bytes */
|
||||
unsigned long st_blksize; /* blocksize for filesystem I/O */
|
||||
unsigned long st_blocks; /* number of blocks allocated */
|
||||
time_t st_atime; /* time of last access */
|
||||
time_t st_mtime; /* time of last modification */
|
||||
time_t st_ctime; /* time of last change */
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LSEEK64
|
||||
extern off64_t lseek64(int fildes, off64_t offset, int whence);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STAT64
|
||||
extern int stat64(const char *file_name, struct stat64 *buf);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LSTAT64
|
||||
extern int lstat64(const char *file_name, struct stat64 *buf);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FSTAT64
|
||||
extern int fstat64(int fd, struct stat64 *buf);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FTRUNCATE64
|
||||
extern int ftruncate64(int fd, off64_t offset);
|
||||
#endif
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
# define O_LARGEFILE 0
|
||||
#endif
|
||||
|
||||
extern void *wine_dlopen( const char *filename, int flag, char *error, int errorsize );
|
||||
extern void *wine_dlsym( void *handle, const char *symbol, char *error, int errorsize );
|
||||
extern int wine_dlclose( void *handle, char *error, int errorsize );
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
@ -18,7 +19,6 @@
|
|||
|
||||
#include "winnt.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#define MAX_DLLS 100
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#ifdef __BEOS__
|
||||
#include <be/kernel/fs_info.h>
|
||||
|
@ -43,7 +44,6 @@
|
|||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include "wine/port.h"
|
||||
|
||||
/***********************************************************************
|
||||
* usleep
|
||||
|
@ -389,7 +389,93 @@ int lstat(const char *file_name, struct stat *buf)
|
|||
}
|
||||
#endif /* HAVE_LSTAT */
|
||||
|
||||
static void
|
||||
_convert_stat_stat64(struct stat64 *stto,struct stat *stfrom)
|
||||
{
|
||||
stto->st_dev = stfrom->st_dev;
|
||||
stto->st_ino = stfrom->st_ino;
|
||||
stto->st_mode = stfrom->st_mode;
|
||||
stto->st_nlink = stfrom->st_nlink;
|
||||
stto->st_uid = stfrom->st_uid;
|
||||
stto->st_gid = stfrom->st_gid;
|
||||
stto->st_rdev = stfrom->st_rdev;
|
||||
stto->st_blksize = stfrom->st_blksize;
|
||||
stto->st_blocks = stfrom->st_blocks;
|
||||
stto->st_atime = stfrom->st_atime;
|
||||
stto->st_mtime = stfrom->st_mtime;
|
||||
stto->st_ctime = stfrom->st_ctime;
|
||||
stto->st_size = (off64_t)stfrom->st_size;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* stat64
|
||||
*/
|
||||
#ifndef HAVE_STAT64
|
||||
int stat64(const char *file_name, struct stat64 *buf)
|
||||
{
|
||||
struct stat stbuf;
|
||||
int res = stat(file_name,&stbuf);
|
||||
_convert_stat_stat64(buf,&stbuf);
|
||||
return res;
|
||||
}
|
||||
#endif /* HAVE_STAT64 */
|
||||
|
||||
/***********************************************************************
|
||||
* lstat64
|
||||
*/
|
||||
#ifndef HAVE_LSTAT64
|
||||
int lstat64(const char *file_name, struct stat64 *buf)
|
||||
{
|
||||
struct stat stbuf;
|
||||
int res = lstat(file_name,&stbuf);
|
||||
_convert_stat_stat64(buf,&stbuf);
|
||||
return res;
|
||||
}
|
||||
#endif /* HAVE_LSTAT64 */
|
||||
|
||||
/***********************************************************************
|
||||
* fstat64
|
||||
*/
|
||||
#ifndef HAVE_FSTAT64
|
||||
int fstat64(int fd, struct stat64 *buf)
|
||||
{
|
||||
struct stat stbuf;
|
||||
int res = fstat(fd,&stbuf);
|
||||
_convert_stat_stat64(buf,&stbuf);
|
||||
return res;
|
||||
}
|
||||
#endif /* HAVE_FSTAT */
|
||||
|
||||
/***********************************************************************
|
||||
* lseek64
|
||||
*/
|
||||
#ifndef HAVE_LSEEK64
|
||||
off64_t lseek64(int fd, off64_t where, int whence)
|
||||
{
|
||||
off_t res;
|
||||
if ((where >= 0x8000000LL) || ( where <= -0x7fffffffLL)) {
|
||||
errno = EFBIG; /* FIXME: hack */
|
||||
return -1;
|
||||
}
|
||||
|
||||
res = lseek(fd,(off_t)where,whence);
|
||||
return (off64_t)res;
|
||||
}
|
||||
#endif /* HAVE_LSEEK64 */
|
||||
|
||||
/***********************************************************************
|
||||
* ftruncate64
|
||||
*/
|
||||
#ifndef HAVE_FTRUNCATE64
|
||||
int ftruncate64(int fd, off64_t where)
|
||||
{
|
||||
if ((where >= 0x8000000LL) || ( where <= -0x7fffffffLL)) {
|
||||
errno = EFBIG; /* FIXME: hack */
|
||||
return -1;
|
||||
}
|
||||
return ftruncate(fd,(off_t)where);
|
||||
}
|
||||
#endif /* HAVE_LSEEK64 */
|
||||
/***********************************************************************
|
||||
* getrlimit
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,6 @@ asm(".org 0x110000");
|
|||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include "windef.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
|
|
|
@ -5,11 +5,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef linux
|
||||
#include <linux/fd.h>
|
||||
# include <linux/fd.h>
|
||||
#endif
|
||||
#include "miscemu.h"
|
||||
/* #define DEBUG_INT */
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
# include <sys/file.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_SYS_ERRNO_H
|
||||
#include <sys/errno.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -152,7 +153,7 @@ static struct file *create_file( const char *nameptr, size_t len, unsigned int a
|
|||
}
|
||||
|
||||
/* FIXME: should set error to STATUS_OBJECT_NAME_COLLISION if file existed before */
|
||||
if ((fd = open( name, flags | O_NONBLOCK,
|
||||
if ((fd = open( name, flags | O_NONBLOCK | O_LARGEFILE,
|
||||
(attrs & FILE_ATTRIBUTE_READONLY) ? 0444 : 0666 )) == -1)
|
||||
goto file_error;
|
||||
/* refuse to open a directory */
|
||||
|
@ -258,11 +259,11 @@ static int file_flush( struct object *obj )
|
|||
|
||||
static int file_get_info( struct object *obj, struct get_file_info_request *req )
|
||||
{
|
||||
struct stat st;
|
||||
struct stat64 st;
|
||||
struct file *file = (struct file *)obj;
|
||||
assert( obj->ops == &file_ops );
|
||||
|
||||
if (fstat( file->obj.fd, &st ) == -1)
|
||||
if (fstat64( file->obj.fd, &st ) == -1)
|
||||
{
|
||||
file_set_error();
|
||||
return 0;
|
||||
|
@ -275,8 +276,16 @@ static int file_get_info( struct object *obj, struct get_file_info_request *req
|
|||
if (!(st.st_mode & S_IWUSR)) req->attr |= FILE_ATTRIBUTE_READONLY;
|
||||
req->access_time = st.st_atime;
|
||||
req->write_time = st.st_mtime;
|
||||
if (S_ISDIR(st.st_mode))
|
||||
{
|
||||
req->size_high = 0;
|
||||
req->size_low = S_ISDIR(st.st_mode) ? 0 : st.st_size;
|
||||
req->size_low = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
req->size_high = st.st_size >> 32;
|
||||
req->size_low = st.st_size & 0xffffffff;
|
||||
}
|
||||
req->links = st.st_nlink;
|
||||
req->index_high = st.st_dev;
|
||||
req->index_low = st.st_ino;
|
||||
|
@ -331,21 +340,15 @@ struct file *get_file_obj( struct process *process, handle_t handle, unsigned in
|
|||
return (struct file *)get_handle_obj( process, handle, access, &file_ops );
|
||||
}
|
||||
|
||||
static int set_file_pointer( handle_t handle, int *low, int *high, int whence )
|
||||
static int set_file_pointer( handle_t handle, unsigned int *low, int *high, int whence )
|
||||
{
|
||||
struct file *file;
|
||||
int result;
|
||||
|
||||
if ((*low >= 0 && *high != 0) || (*low < 0 && *high != -1))
|
||||
{
|
||||
fprintf( stderr, "set_file_pointer: offset > 2Gb not supported yet\n" );
|
||||
set_error( STATUS_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
off64_t result,xto;
|
||||
|
||||
xto = *low+((off64_t)*high<<32);
|
||||
if (!(file = get_file_obj( current->process, handle, 0 )))
|
||||
return 0;
|
||||
if ((result = lseek( file->obj.fd, *low, whence )) == -1)
|
||||
if ((result = lseek64(file->obj.fd,xto,whence))==-1)
|
||||
{
|
||||
/* Check for seek before start of file */
|
||||
|
||||
|
@ -358,7 +361,8 @@ static int set_file_pointer( handle_t handle, int *low, int *high, int whence )
|
|||
release_object( file );
|
||||
return 0;
|
||||
}
|
||||
*low = result;
|
||||
*low = result & 0xffffffff;
|
||||
*high = result >> 32;
|
||||
release_object( file );
|
||||
return 1;
|
||||
}
|
||||
|
@ -366,12 +370,12 @@ static int set_file_pointer( handle_t handle, int *low, int *high, int whence )
|
|||
static int truncate_file( handle_t handle )
|
||||
{
|
||||
struct file *file;
|
||||
int result;
|
||||
off64_t result;
|
||||
|
||||
if (!(file = get_file_obj( current->process, handle, GENERIC_WRITE )))
|
||||
return 0;
|
||||
if (((result = lseek( file->obj.fd, 0, SEEK_CUR )) == -1) ||
|
||||
(ftruncate( file->obj.fd, result ) == -1))
|
||||
if (((result = lseek64( file->obj.fd, 0, SEEK_CUR )) == -1) ||
|
||||
(ftruncate64( file->obj.fd, result ) == -1))
|
||||
{
|
||||
file_set_error();
|
||||
release_object( file );
|
||||
|
@ -384,20 +388,16 @@ static int truncate_file( handle_t handle )
|
|||
/* try to grow the file to the specified size */
|
||||
int grow_file( struct file *file, int size_high, int size_low )
|
||||
{
|
||||
struct stat st;
|
||||
struct stat64 st;
|
||||
off64_t size = size_low + (((off64_t)size_high)<<32);
|
||||
|
||||
if (size_high)
|
||||
{
|
||||
set_error( STATUS_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
if (fstat( file->obj.fd, &st ) == -1)
|
||||
if (fstat64( file->obj.fd, &st ) == -1)
|
||||
{
|
||||
file_set_error();
|
||||
return 0;
|
||||
}
|
||||
if (st.st_size >= size_low) return 1; /* already large enough */
|
||||
if (ftruncate( file->obj.fd, size_low ) != -1) return 1;
|
||||
if (st.st_size >= size) return 1; /* already large enough */
|
||||
if (ftruncate64( file->obj.fd, size ) != -1) return 1;
|
||||
file_set_error();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#ifdef HAVE_SYS_ERRNO_H
|
||||
#include <sys/errno.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#ifdef HAVE_SYS_ERRNO_H
|
||||
#include <sys/errno.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#ifdef HAVE_SYS_ERRNO_H
|
||||
# include <sys/errno.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
|
|
|
@ -9,16 +9,9 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_SYS_ERRNO_H
|
||||
|
@ -56,7 +57,7 @@ BOOL16 WINAPI SetFileAttributes16( LPCSTR lpFileName, DWORD attributes )
|
|||
*/
|
||||
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
|
||||
{
|
||||
struct stat buf;
|
||||
struct stat64 buf;
|
||||
DOS_FULL_NAME full_name;
|
||||
|
||||
if (!DOSFS_GetFullName( lpFileName, TRUE, &full_name ))
|
||||
|
@ -69,7 +70,7 @@ BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
|
|||
FIXME("(%s):%lx illegal combination with FILE_ATTRIBUTE_NORMAL.\n",
|
||||
lpFileName,attributes);
|
||||
}
|
||||
if(stat(full_name.long_name,&buf)==-1)
|
||||
if(stat64(full_name.long_name,&buf)==-1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
|
Loading…
Reference in New Issue