Wine build failure in tools/winebuild/spec16 due to recent change

Marcus Meissner marcus at jet.franken.de
Mon May 21 15:22:21 CDT 2001


On Mon, May 21, 2001 at 03:28:25PM +0200, Gerald Pfeifer wrote:
> On Sat, 19 May 2001, Marcus Meissner wrote:
> > Okidoki, dann loesen wir das mit ein paar defines und nem autoconf check.
> 
> Sieht gut aus!
> 
> > Kannst du bitte folgenden Patch applyen, dann:
> >
> > 	Er sollte bei 'whether file operations are already 64 bit' 'YES' sagen.
> 
> Passt.
> 
> > Dann "make depend && make" ...
> > Es sollte compilieren und bei server/file.c KEINE Fehler wie:
> > 	"file.c:288: warning: right shift count >= width of type"
> > auswerfen und insgesamt durchcompilieren...
> 
> Passt.

Ok, Alexandre,

here is the FreeBSD 64 bit file operations fix ... 

Ciao, Marcus

Changelog:
	In case our stat already supports 64bit operations (like FreeBSD
	stat does), we don't need to stub them, we can just define the
	x64 functions to x.
	Thanks to Gerald Pfeifer for spotting the problem and testing this!
	
Index: configure.in
===================================================================
RCS file: /home/wine/wine/configure.in,v
retrieving revision 1.201
diff -u -r1.201 configure.in
--- configure.in	2001/05/16 20:56:05	1.201
+++ configure.in	2001/05/19 19:34:30
@@ -798,6 +813,7 @@
 	memmove \
 	mmap \
 	rfork \
+	sched_yield \
 	select \
 	sendmsg \
 	settimeofday \
@@ -879,6 +895,37 @@
 AC_TYPE_SIZE_T()
 AC_CHECK_SIZEOF(long long,0)
 
+dnl *** 64bit file operations ***
+dnl *** FreeBSD already has 64bit clean stat struct and off_t in newer vers ***
+AC_CACHE_CHECK("whether file operations are already 64 bit",
+	wine_cv_fileop64,
+	AC_TRY_RUN([
+		#define _LARGEFILE64_SOURCE
+		#include <sys/types.h>
+		#include <sys/stat.h>
+
+		int 
+		main(int argc,char **argv) {
+			struct stat stbuf;
+			if (sizeof(off_t)!=8)
+				return 1;
+			if (sizeof(stbuf.st_size)!=8)
+				return 1;
+			return 0;
+		}
+	],
+	wine_cv_fileop64="yes",
+	wine_cv_fileop64="no",
+	wine_cv_fileop64="no"
+	)
+    )
+    if test "$wine_cv_fileop64" = "yes"
+    then
+        AC_DEFINE(HAVE_FILEOP64)
+    fi
+
+
+dnl *** Linux defines off64_t, struct stat64 and resp. functions ***
 AC_CACHE_CHECK("for off64_t",
 	wine_cv_off64_t,
 	AC_TRY_COMPILE([
Index: include/acconfig.h
===================================================================
RCS file: /home/wine/wine/include/acconfig.h,v
retrieving revision 1.39
diff -u -r1.39 acconfig.h
--- include/acconfig.h	2001/05/16 20:56:06	1.39
+++ include/acconfig.h	2001/05/19 19:34:30
@@ -131,3 +134,6 @@
 
 /* Define if we have struct stat64 */
 #undef HAVE_STRUCT_STAT64
+
+/* Define if we have 64bit clean struct stat and off_t already */
+#undef HAVE_FILEOP64
Index: library/port.c
===================================================================
RCS file: /home/wine/wine/library/port.c,v
retrieving revision 1.12
diff -u -r1.12 port.c
--- library/port.c	2001/05/16 19:45:34	1.12
+++ library/port.c	2001/05/19 19:34:31
@@ -389,6 +389,7 @@
 }
 #endif /* HAVE_LSTAT */
 
+#ifndef HAVE_FILEOP64
 #if !defined(HAVE_STAT64) || !defined(HAVE_LSTAT64) || !defined(HAVE_FSTAT64)
 static void _convert_stat_stat64(struct stat64 *stto,struct stat *stfrom)
 {
@@ -477,6 +478,9 @@
     return ftruncate(fd,(off_t)where);
 }
 #endif /* HAVE_LSEEK64 */
+
+#endif /* HAVE_FILEOP64 */
+
 /***********************************************************************
  *		getrlimit
  */
Index: include/wine/port.h
===================================================================
RCS file: /home/wine/wine/include/wine/port.h,v
retrieving revision 1.12
diff -u -r1.12 port.h
--- include/wine/port.h	2001/05/16 19:45:34	1.12
+++ include/wine/port.h	2001/05/19 19:34:32
@@ -133,6 +133,15 @@
 #define S_ISLNK(mod) (0)
 #endif /* S_ISLNK */
 
+#ifdef HAVE_FILEOP64
+# define stat64 stat
+# define off64_t off_t
+# define lstat64 lstat
+# define fstat64 fstat
+# define lseek64 lseek
+# define ftruncate64 ftruncate
+#else
+
 #ifndef HAVE_OFF64_T
 # if SIZEOF_LONG_LONG > 0 
 typedef long long off64_t;
@@ -179,6 +188,8 @@
 #ifndef HAVE_FTRUNCATE64
 extern int ftruncate64(int fd, off64_t offset);
 #endif
+
+#endif /* HAVE_FILEOP64 */
 
 #ifndef O_LARGEFILE
 # define O_LARGEFILE 0




More information about the wine-patches mailing list