Drop any file64 functions, try to use system supplied 64-bit mode by

using proper defines.
oldstable
Marcus Meissner 2001-05-29 20:55:21 +00:00 committed by Alexandre Julliard
parent 0925d6ecb4
commit 6bb990f7fd
9 changed files with 91 additions and 362 deletions

200
configure vendored
View File

@ -5887,7 +5887,6 @@ for ac_func in \
ecvt \
finite \
fpclass \
fstat64 \
ftruncate64 \
getnetbyaddr \
getnetbyname \
@ -5900,7 +5899,6 @@ for ac_func in \
inet_network \
lseek64 \
lstat \
lstat64 \
memmove \
mmap \
rfork \
@ -5908,7 +5906,6 @@ for ac_func in \
sendmsg \
settimeofday \
sigaltstack \
stat64 \
statfs \
strcasecmp \
strerror \
@ -5922,12 +5919,12 @@ for ac_func in \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5926: checking for $ac_func" >&5
echo "configure:5923: 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 5931 "configure"
#line 5928 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5950,7 +5947,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5951: \"$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
@ -6032,17 +6029,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:6036: checking for $ac_hdr" >&5
echo "configure:6033: 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 6041 "configure"
#line 6038 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6043: \"$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*
@ -6069,12 +6066,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
echo "configure:6073: checking whether stat file-mode macros are broken" >&5
echo "configure:6070: 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 6078 "configure"
#line 6075 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -6127,12 +6124,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:6131: checking for working const" >&5
echo "configure:6128: 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 6136 "configure"
#line 6133 "configure"
#include "confdefs.h"
int main() {
@ -6181,7 +6178,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -6202,21 +6199,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:6206: checking for inline" >&5
echo "configure:6203: 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 6213 "configure"
#line 6210 "configure"
#include "confdefs.h"
int main() {
} int $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:6220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@ -6242,12 +6239,12 @@ EOF
esac
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:6246: checking for ANSI C header files" >&5
echo "configure:6243: 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 6251 "configure"
#line 6248 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -6255,7 +6252,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6256: \"$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*
@ -6272,7 +6269,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 6276 "configure"
#line 6273 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -6290,7 +6287,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 6294 "configure"
#line 6291 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -6311,7 +6308,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 6315 "configure"
#line 6312 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -6322,7 +6319,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:6326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:6323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -6346,12 +6343,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:6350: checking for size_t" >&5
echo "configure:6347: 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 6355 "configure"
#line 6352 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -6379,7 +6376,7 @@ EOF
fi
echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:6383: checking size of long long" >&5
echo "configure:6380: 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
@ -6387,7 +6384,7 @@ else
ac_cv_sizeof_long_long=0
else
cat > conftest.$ac_ext <<EOF
#line 6391 "configure"
#line 6388 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@ -6398,7 +6395,7 @@ main()
exit(0);
}
EOF
if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:6399: \"$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
@ -6418,94 +6415,13 @@ EOF
echo $ac_n "checking "for off64_t"""... $ac_c" 1>&6
echo "configure:6423: 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 6428 "configure"
#include "confdefs.h"
#define _LARGEFILE64_SOURCE
#include <sys/types.h>
int main() {
off64_t testoffset;
; return 0; }
EOF
if { (eval echo configure:6440: \"$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:6463: 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 6468 "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:6481: \"$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:6504: checking "whether linux/input.h is for real"" >&5
echo "configure:6420: 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 6509 "configure"
#line 6425 "configure"
#include "confdefs.h"
#include <linux/input.h>
@ -6518,7 +6434,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:6522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_linux_input_h=yes
else
@ -6542,12 +6458,12 @@ EOF
echo $ac_n "checking "whether we can use re-entrant gethostbyname_r Linux style"""... $ac_c" 1>&6
echo "configure:6546: checking "whether we can use re-entrant gethostbyname_r Linux style"" >&5
echo "configure:6462: 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 6551 "configure"
#line 6467 "configure"
#include "confdefs.h"
#include <netdb.h>
@ -6568,7 +6484,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:6572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_linux_gethostbyname_r_6=yes
else
@ -6594,12 +6510,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:6598: checking "whether linux/joystick.h uses the Linux 2.2+ API"" >&5
echo "configure:6514: 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 6603 "configure"
#line 6519 "configure"
#include "confdefs.h"
#include <sys/ioctl.h>
@ -6614,7 +6530,7 @@ int main() {
/*empty*/
; return 0; }
EOF
if { (eval echo configure:6618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_linux_joystick_22_api=yes
else
@ -6641,12 +6557,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:6645: checking "whether sys/vfs.h defines statfs"" >&5
echo "configure:6561: 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 6650 "configure"
#line 6566 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -6663,7 +6579,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:6667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_sys_vfs_has_statfs=yes
else
@ -6690,12 +6606,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:6694: checking "whether sys/statfs.h defines statfs"" >&5
echo "configure:6610: 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 6699 "configure"
#line 6615 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -6710,7 +6626,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:6714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_sys_statfs_has_statfs=yes
else
@ -6737,12 +6653,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:6741: checking "whether sys/mount.h defines statfs"" >&5
echo "configure:6657: 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 6746 "configure"
#line 6662 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -6757,7 +6673,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:6761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_sys_mount_has_statfs=yes
else
@ -6783,7 +6699,7 @@ fi
echo $ac_n "checking "for statfs.f_bfree"""... $ac_c" 1>&6
echo "configure:6787: checking "for statfs.f_bfree"" >&5
echo "configure:6703: 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
@ -6792,7 +6708,7 @@ else
wine_cv_statfs_bfree=no
else
cat > conftest.$ac_ext <<EOF
#line 6796 "configure"
#line 6712 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -6819,7 +6735,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:6823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_statfs_bfree=yes
else
@ -6843,7 +6759,7 @@ EOF
fi
echo $ac_n "checking "for statfs.f_bavail"""... $ac_c" 1>&6
echo "configure:6847: checking "for statfs.f_bavail"" >&5
echo "configure:6763: 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
@ -6852,7 +6768,7 @@ else
wine_cv_statfs_bavail=no
else
cat > conftest.$ac_ext <<EOF
#line 6856 "configure"
#line 6772 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -6879,7 +6795,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:6883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
wine_cv_statfs_bavail=yes
else
@ -6904,12 +6820,12 @@ fi
echo $ac_n "checking "for msg_accrights in struct msghdr"""... $ac_c" 1>&6
echo "configure:6908: checking "for msg_accrights in struct msghdr"" >&5
echo "configure:6824: 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 6913 "configure"
#line 6829 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@ -6917,7 +6833,7 @@ int main() {
struct msghdr hdr; hdr.msg_accrights=0
; return 0; }
EOF
if { (eval echo configure:6921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_msg_accrights="yes"
else
@ -6940,12 +6856,12 @@ fi
echo $ac_n "checking "for sun_len in struct sockaddr_un"""... $ac_c" 1>&6
echo "configure:6944: checking "for sun_len in struct sockaddr_un"" >&5
echo "configure:6860: 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 6949 "configure"
#line 6865 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@ -6954,7 +6870,7 @@ int main() {
static struct sockaddr_un addr; addr.sun_len = 1
; return 0; }
EOF
if { (eval echo configure:6958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:6874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_sun_len="yes"
else
@ -6977,12 +6893,12 @@ fi
echo $ac_n "checking "whether we need to define __i386__"""... $ac_c" 1>&6
echo "configure:6981: checking "whether we need to define __i386__"" >&5
echo "configure:6897: 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 6986 "configure"
#line 6902 "configure"
#include "confdefs.h"
#if (defined(i386) || defined(__i386)) && !defined(__i386__)
yes

View File

@ -781,7 +781,6 @@ AC_CHECK_FUNCS(\
ecvt \
finite \
fpclass \
fstat64 \
ftruncate64 \
getnetbyaddr \
getnetbyname \
@ -794,7 +793,6 @@ AC_CHECK_FUNCS(\
inet_network \
lseek64 \
lstat \
lstat64 \
memmove \
mmap \
rfork \
@ -802,7 +800,6 @@ AC_CHECK_FUNCS(\
sendmsg \
settimeofday \
sigaltstack \
stat64 \
statfs \
strcasecmp \
strerror \
@ -879,43 +876,6 @@ 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([

View File

@ -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 stat64 *st, BY_HANDLE_FILE_INFORMATION *info )
static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
{
if (S_ISDIR(st->st_mode))
info->dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;
@ -524,9 +524,9 @@ static void FILE_FillInfo( struct stat64 *st, BY_HANDLE_FILE_INFORMATION *info )
*/
BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
{
struct stat64 st;
struct stat st;
if (lstat64( unixName, &st ) == -1)
if (lstat( unixName, &st ) == -1)
{
FILE_SetDosError();
return FALSE;
@ -536,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 (stat64( unixName, &st ) == -1)
if (stat( unixName, &st ) == -1)
{
FILE_SetDosError();
return FALSE;
@ -2010,9 +2010,7 @@ BOOL WINAPI MoveFileExW( LPCWSTR fn1, LPCWSTR fn2, DWORD flag )
BOOL WINAPI MoveFileA( LPCSTR fn1, LPCSTR fn2 )
{
DOS_FULL_NAME full_name1, full_name2;
/* Even though we do not need the size, stat will fail for large files,
* so we need to use stat64 here. */
struct stat64 fstat;
struct stat fstat;
TRACE("(%s,%s)\n", fn1, fn2 );
@ -2033,7 +2031,7 @@ BOOL WINAPI MoveFileA( LPCSTR fn1, LPCSTR fn2 )
}
else return TRUE;
else /*copy */ {
if (stat64( full_name1.long_name, &fstat ))
if (stat( full_name1.long_name, &fstat ))
{
WARN("Invalid source file %s\n",
full_name1.long_name);

View File

@ -3,6 +3,10 @@
* defined in the 'configure' script.
*/
/* This is for glibc on Linux, it will turn on 64 bit file support at compile time */
#define _FILE_OFFSET_BITS 64
@TOP@
/* Define if .type asm directive must be inside a .def directive */
#undef NEED_TYPE_IN_DEF
@ -125,9 +129,3 @@
/* Define if FreeType 2 is installed */
#undef HAVE_FREETYPE
/* Define if we have 64 bit file offsets */
#undef HAVE_OFF64_T
/* Define if we have struct stat64 */
#undef HAVE_STRUCT_STAT64

View File

@ -1,4 +1,11 @@
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
/*
* This file is used by 'autoheader' to generate the list of symbols
* defined in the 'configure' script.
*/
/* This is for glibc on Linux, it will turn on 64 bit file support at compile time */
#define _FILE_OFFSET_BITS 64
/* Define if using alloca.c. */
#undef C_ALLOCA
@ -157,12 +164,6 @@
/* Define if FreeType 2 is installed */
#undef HAVE_FREETYPE
/* 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
@ -190,9 +191,6 @@
/* 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
@ -235,9 +233,6 @@
/* 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
@ -262,9 +257,6 @@
/* 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

View File

@ -6,8 +6,6 @@
#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 <fcntl.h>
@ -133,53 +131,7 @@ 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
/* So we open files in 64 bit access mode on Linux */
#ifndef O_LARGEFILE
# define O_LARGEFILE 0
#endif

View File

@ -389,94 +389,6 @@ int lstat(const char *file_name, struct stat *buf)
}
#endif /* HAVE_LSTAT */
#if !defined(HAVE_STAT64) || !defined(HAVE_LSTAT64) || !defined(HAVE_FSTAT64)
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;
}
#endif /* HAVE_STAT64 || HAVE_LSTAT64 || HAVE_FSTAT64 */
/***********************************************************************
* 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
*/

View File

@ -259,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 stat64 st;
struct stat st;
struct file *file = (struct file *)obj;
assert( obj->ops == &file_ops );
if (fstat64( file->obj.fd, &st ) == -1)
if (fstat( file->obj.fd, &st ) == -1)
{
file_set_error();
return 0;
@ -343,12 +343,12 @@ struct file *get_file_obj( struct process *process, handle_t handle, unsigned in
static int set_file_pointer( handle_t handle, unsigned int *low, int *high, int whence )
{
struct file *file;
off64_t result,xto;
off_t result,xto;
xto = *low+((off64_t)*high<<32);
xto = *low+((off_t)*high<<32);
if (!(file = get_file_obj( current->process, handle, 0 )))
return 0;
if ((result = lseek64(file->obj.fd,xto,whence))==-1)
if ((result = lseek(file->obj.fd,xto,whence))==-1)
{
/* Check for seek before start of file */
@ -370,17 +370,18 @@ static int set_file_pointer( handle_t handle, unsigned int *low, int *high, int
static int truncate_file( handle_t handle )
{
struct file *file;
off64_t result;
off_t result;
if (!(file = get_file_obj( current->process, handle, GENERIC_WRITE )))
return 0;
if (((result = lseek64( file->obj.fd, 0, SEEK_CUR )) == -1) ||
(ftruncate64( file->obj.fd, result ) == -1))
if (((result = lseek( file->obj.fd, 0, SEEK_CUR )) == -1) ||
(ftruncate( file->obj.fd, result ) == -1))
{
file_set_error();
release_object( file );
return 0;
}
fprintf(stderr,"server:truncated to %Ld\n",result);
release_object( file );
return 1;
}
@ -388,16 +389,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 stat64 st;
off64_t size = size_low + (((off64_t)size_high)<<32);
struct stat st;
off_t size = size_low + (((off_t)size_high)<<32);
if (fstat64( file->obj.fd, &st ) == -1)
if (fstat( file->obj.fd, &st ) == -1)
{
file_set_error();
return 0;
}
if (st.st_size >= size) return 1; /* already large enough */
if (ftruncate64( file->obj.fd, size ) != -1) return 1;
if (ftruncate( file->obj.fd, size ) != -1) return 1;
file_set_error();
return 0;
}

View File

@ -57,7 +57,7 @@ BOOL16 WINAPI SetFileAttributes16( LPCSTR lpFileName, DWORD attributes )
*/
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
{
struct stat64 buf;
struct stat buf;
DOS_FULL_NAME full_name;
if (!DOSFS_GetFullName( lpFileName, TRUE, &full_name ))
@ -70,7 +70,7 @@ BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD attributes)
FIXME("(%s):%lx illegal combination with FILE_ATTRIBUTE_NORMAL.\n",
lpFileName,attributes);
}
if(stat64(full_name.long_name,&buf)==-1)
if(stat(full_name.long_name,&buf)==-1)
{
FILE_SetDosError();
return FALSE;