glib r7286 - in trunk/build: . win32/dirent



Author: tml
Date: Sat Aug  2 08:43:30 2008
New Revision: 7286
URL: http://svn.gnome.org/viewvc/glib?rev=7286&view=rev

Log:
2008-08-02  Tor Lillqvist  <tml novell com>

	Bug 545954 - 64-bit issue in dirent

	* win32/dirent/dirent.h: Use __int64 for the dd_handle on 64-bit
	Windows. (Would use intptr_t, but that is not available before
	MSVS8, and we want to keep this compilable also with MSVS6 and 7,
	I think.) Thanks to Richard Hult.



Modified:
   trunk/build/ChangeLog
   trunk/build/win32/dirent/dirent.h

Modified: trunk/build/win32/dirent/dirent.h
==============================================================================
--- trunk/build/win32/dirent/dirent.h	(original)
+++ trunk/build/win32/dirent/dirent.h	Sat Aug  2 08:43:30 2008
@@ -25,6 +25,12 @@
 	char		d_name[FILENAME_MAX]; /* File name. */
 };
 
+#ifdef _WIN64
+#define INTPTR __int64
+#else
+#define INTPTR long
+#endif
+
 /*
  * This is an internal data structure. Good programmers will not use it
  * except as an argument to one of the functions below.
@@ -41,7 +47,7 @@
 	struct dirent		dd_dir;
 
 	/* _findnext handle */
-	long			dd_handle;
+	INTPTR			dd_handle;
 
 	/*
          * Status of search:
@@ -88,7 +94,7 @@
 	struct _wdirent		dd_dir;
 
 	/* _findnext handle */
-	long			dd_handle;
+	INTPTR			dd_handle;
 
 	/*
          * Status of search:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]