Author: gcasa
Date: Fri Jul 25 13:13:44 2014
New Revision: 38012

URL: http://svn.gna.org/viewcvs/gnustep?rev=38012&view=rev
Log:
NSData compilation error correction.

Modified:
    libs/base/trunk/Source/NSData.m

Modified: libs/base/trunk/Source/NSData.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSData.m?rev=38012&r1=38011&r2=38012&view=diff
==============================================================================
--- libs/base/trunk/Source/NSData.m     (original)
+++ libs/base/trunk/Source/NSData.m     Fri Jul 25 13:13:44 2014
@@ -150,7 +150,11 @@
   FILE         *theFile = 0;
   void         *tmp = 0;
   int          c;
+#if defined(__MINGW__)
+  long         fileLength;
+#else
   off_t        fileLength;
+#endif
        
 #if defined(__MINGW__)
   thePath = (const unichar*)[path fileSystemRepresentation];
@@ -178,7 +182,11 @@
   /*
    *   Seek to the end of the file.
    */
+#if defined(__MINGW__)
+  c = fseek(theFile, 0L, SEEK_END);
+#else
   c = fseeko(theFile, 0, SEEK_END);
+#endif
   if (c != 0)
     {
       NSWarnFLog(@"Seek to end of file (%@) failed - %@", path,
@@ -190,8 +198,13 @@
    *   Determine the length of the file (having seeked to the end of the
    *   file) by calling ftello().
    */
+#if defined(__MINGW__)
+  fileLength = ftell(theFile);
+  if (fileLength == -1)
+#else
   fileLength = ftello(theFile);
   if (fileLength == (off_t) -1)
+#endif
     {
       NSWarnFLog(@"Ftell on %@ failed - %@", path, [NSError _last]);
       goto failure;
@@ -201,7 +214,11 @@
    *   Rewind the file pointer to the beginning, preparing to read in
    *   the file.
    */
+#if defined(__MINGW__)
+  c = fseek(theFile, 0L, SEEK_SET);
+#else
   c = fseeko(theFile, 0, SEEK_SET);
+#endif
   if (c != 0)
     {
       NSWarnFLog(@"Fseek to start of file (%@) failed - %@", path,


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to