diff compat.c @ 62:2be5174bdb5d

Sync with latest DW code. Tab and RGB fixes.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 08 Dec 2001 04:47:43 +0000
parents 8add9a616d0e
children ab77a22a2a36
line wrap: on
line diff
--- a/compat.c	Wed Dec 05 06:03:49 2001 +0000
+++ b/compat.c	Sat Dec 08 04:47:43 2001 +0000
@@ -210,7 +210,7 @@
 
 /* Return in K to avoid big problems exceeding an
    unsigned long when no 64bit integers are available */
-#if defined(__IBMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__))
+#if (defined(__IBMC__) && __IBMC__ < 360) || (defined(__WIN32__) && !defined(__CYGWIN32__))
 unsigned long drivefree(int drive)
 #else
 unsigned long long drivefree(int drive)
@@ -233,7 +233,7 @@
 
 	kbytes = aulFSInfoBuf[3]/1024;
 
-	return (unsigned long)(kbytes * aulFSInfoBuf[1] * aulFSInfoBuf[4]);
+	return (kbytes * aulFSInfoBuf[1] * aulFSInfoBuf[4]);
 #elif defined(__WIN32__) || defined(WINNT)
 	char buffer[10] = "C:\\";
 	DWORD spc, bps, fc, tc;
@@ -246,7 +246,7 @@
 
 	kbytes = fc/1024;
 
-	return (unsigned long)(spc*bps*kbytes);
+	return (spc*bps*kbytes);
 #elif defined(__FreeBSD__)
 	struct statfs *fsp;
 	int entries, index = 1;
@@ -318,7 +318,7 @@
 
 /* Return in K to avoid big problems exceeding an
    unsigned long when no 64bit integers are available */
-#if defined(__IBMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__))
+#if (defined(__IBMC__) && __IBMC__  < 360) || (defined(__WIN32__) && !defined(__CYGWIN32__))
 unsigned long drivesize(int drive)
 #else
 unsigned long long drivesize(int drive)
@@ -341,7 +341,7 @@
 
 	kbytes = aulFSInfoBuf[2]/1024;
 
-	return (unsigned long)(kbytes * aulFSInfoBuf[1] * aulFSInfoBuf[4]);
+	return (kbytes * aulFSInfoBuf[1] * aulFSInfoBuf[4]);
 #elif defined(__WIN32__) || defined(WINNT)
 	char buffer[10] = "C:\\";
 	DWORD spc, bps, fc, tc;
@@ -354,7 +354,7 @@
 
 	kbytes = tc/1024;
 
-	return (unsigned long)(spc*bps*kbytes);
+	return (spc*bps*kbytes);
 #elif defined(__FreeBSD__)
 	struct statfs *fsp;
 	int entries, index = 1;