gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5654 - in GNUnet/src: applications/fs/ecrs applications/fs


From: gnunet
Subject: [GNUnet-SVN] r5654 - in GNUnet/src: applications/fs/ecrs applications/fs/fsui applications/fs/module applications/fs/uritrack applications/state applications/vpn util/containers util/os
Date: Sun, 23 Sep 2007 04:29:48 -0600 (MDT)

Author: durner
Date: 2007-09-23 04:29:47 -0600 (Sun, 23 Sep 2007)
New Revision: 5654

Modified:
   GNUnet/src/applications/fs/ecrs/download.c
   GNUnet/src/applications/fs/fsui/deserialize.c
   GNUnet/src/applications/fs/module/ondemand.c
   GNUnet/src/applications/fs/uritrack/uri_info.c
   GNUnet/src/applications/state/state.c
   GNUnet/src/applications/vpn/vpn.c
   GNUnet/src/util/containers/bloomfilter.c
   GNUnet/src/util/os/semaphore.c
Log:
MinGW

Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c  2007-09-23 10:02:20 UTC (rev 
5653)
+++ GNUnet/src/applications/fs/ecrs/download.c  2007-09-23 10:29:47 UTC (rev 
5654)
@@ -227,7 +227,7 @@
       MUTEX_UNLOCK (this->lock);
       return SYSERR;
     }
-  lseek (this->handles[level], pos, SEEK_SET);
+  LSEEK (this->handles[level], pos, SEEK_SET);
   ret = READ (this->handles[level], buf, len);
   MUTEX_UNLOCK (this->lock);
 #if DEBUG_DOWNLOAD
@@ -262,7 +262,7 @@
       MUTEX_UNLOCK (this->lock);
       return len;               /* lie -- no temps allowed... */
     }
-  lseek (this->handles[level], pos, SEEK_SET);
+  LSEEK (this->handles[level], pos, SEEK_SET);
   ret = WRITE (this->handles[level], buf, len);
   if (ret != len)
     {

Modified: GNUnet/src/applications/fs/fsui/deserialize.c
===================================================================
--- GNUnet/src/applications/fs/fsui/deserialize.c       2007-09-23 10:02:20 UTC 
(rev 5653)
+++ GNUnet/src/applications/fs/fsui/deserialize.c       2007-09-23 10:29:47 UTC 
(rev 5654)
@@ -755,7 +755,7 @@
       GE_LOG (ctx->ectx,
               GE_WARNING | GE_BULK | GE_USER,
               _("FSUI state file `%s' had syntax error at offset %u.\n"),
-              ctx->name, lseek (fd, 0, SEEK_CUR));
+              ctx->name, LSEEK (fd, 0, SEEK_CUR));
     }
   CLOSE (fd);
   UNLINK (ctx->name);

Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c        2007-09-23 10:02:20 UTC 
(rev 5653)
+++ GNUnet/src/applications/fs/module/ondemand.c        2007-09-23 10:29:47 UTC 
(rev 5654)
@@ -214,7 +214,7 @@
           FREE (fn);
           return SYSERR;
         }
-      lseek (fd, fileOffset, SEEK_SET);
+      LSEEK (fd, fileOffset, SEEK_SET);
       ret = WRITE (fd, &content[1], size - sizeof (DBlock));
       if (ret == size - sizeof (DBlock))
         {
@@ -456,7 +456,7 @@
     FREE (afsDir);
   }
 #endif
-  if (ntohll (odb->fileOffset) != lseek (fileHandle,
+  if (ntohll (odb->fileOffset) != LSEEK (fileHandle,
                                          ntohll (odb->fileOffset), SEEK_SET))
     {
       GE_LOG_STRERROR_FILE (ectx,

Modified: GNUnet/src/applications/fs/uritrack/uri_info.c
===================================================================
--- GNUnet/src/applications/fs/uritrack/uri_info.c      2007-09-23 10:02:20 UTC 
(rev 5653)
+++ GNUnet/src/applications/fs/uritrack/uri_info.c      2007-09-23 10:29:47 UTC 
(rev 5654)
@@ -97,7 +97,7 @@
   if (fd == -1)
     return URITRACK_FRESH;
   o = 2 * (crc % size);
-  if (o != lseek (fd, o, SEEK_SET))
+  if (o != LSEEK (fd, o, SEEK_SET))
     {
       GE_LOG_STRERROR_FILE (ectx,
                             GE_WARNING | GE_USER | GE_ADMIN | GE_BULK,
@@ -143,7 +143,7 @@
       return;
     }
   o = 2 * (crc % size);
-  if (o != lseek (fd, o, SEEK_SET))
+  if (o != LSEEK (fd, o, SEEK_SET))
     {
       GE_LOG_STRERROR_FILE (ectx,
                             GE_WARNING | GE_USER | GE_ADMIN | GE_BULK,
@@ -163,7 +163,7 @@
       io[1] = URITRACK_FRESH;
     }
   io[1] |= state;
-  if (o != lseek (fd, o, SEEK_SET))
+  if (o != LSEEK (fd, o, SEEK_SET))
     {
       GE_LOG_STRERROR_FILE (ectx,
                             GE_WARNING | GE_USER | GE_ADMIN | GE_BULK,

Modified: GNUnet/src/applications/state/state.c
===================================================================
--- GNUnet/src/applications/state/state.c       2007-09-23 10:02:20 UTC (rev 
5653)
+++ GNUnet/src/applications/state/state.c       2007-09-23 10:29:47 UTC (rev 
5654)
@@ -121,7 +121,7 @@
       FREE (fil);
       return SYSERR;            /* failed! */
     }
-  lseek (fd, 0, SEEK_END);
+  LSEEK (fd, 0, SEEK_END);
   WRITE (fd, block, len);
   disk_file_close (ectx, fil, fd);
   FREE (fil);

Modified: GNUnet/src/applications/vpn/vpn.c
===================================================================
--- GNUnet/src/applications/vpn/vpn.c   2007-09-23 10:02:20 UTC (rev 5653)
+++ GNUnet/src/applications/vpn/vpn.c   2007-09-23 10:29:47 UTC (rev 5654)
@@ -1590,7 +1590,7 @@
   else
     {
       /* store the blocking mode */
-      __win_SetHandleBlockingMode (handle, 0);
+      plibc_fd_set_blocking(handle, 0);
     }
 #else
   int flags = fcntl (handle, F_GETFL);

Modified: GNUnet/src/util/containers/bloomfilter.c
===================================================================
--- GNUnet/src/util/containers/bloomfilter.c    2007-09-23 10:02:20 UTC (rev 
5653)
+++ GNUnet/src/util/containers/bloomfilter.c    2007-09-23 10:29:47 UTC (rev 
5654)
@@ -166,7 +166,7 @@
   fileSlot = bitIdx / 2;
   targetLoc = bitIdx % 2;
 
-  if (fileSlot != (unsigned int) lseek (fd, fileSlot, SEEK_SET))
+  if (fileSlot != (unsigned int) LSEEK (fd, fileSlot, SEEK_SET))
     GE_DIE_STRERROR (NULL,
                      GE_ADMIN | GE_USER | GE_FATAL | GE_IMMEDIATE, "lseek");
   value = 0;
@@ -186,7 +186,7 @@
         high++;
     }
   value = ((high << 4) | low);
-  if (fileSlot != (unsigned int) lseek (fd, fileSlot, SEEK_SET))
+  if (fileSlot != (unsigned int) LSEEK (fd, fileSlot, SEEK_SET))
     GE_DIE_STRERROR (NULL,
                      GE_ADMIN | GE_USER | GE_FATAL | GE_IMMEDIATE, "lseek");
   if (1 != WRITE (fd, &value, 1))
@@ -218,7 +218,7 @@
   /* Each char slot in the counter file holds two 4 bit counters */
   fileSlot = bitIdx / 2;
   targetLoc = bitIdx % 2;
-  lseek (fd, fileSlot, SEEK_SET);
+  LSEEK (fd, fileSlot, SEEK_SET);
   value = 0;
   READ (fd, &value, 1);
 
@@ -245,7 +245,7 @@
         }
     }
   value = ((high << 4) | low);
-  lseek (fd, fileSlot, SEEK_SET);
+  LSEEK (fd, fileSlot, SEEK_SET);
   if (1 != WRITE (fd, &value, 1))
     GE_DIE_STRERROR (NULL,
                      GE_ADMIN | GE_USER | GE_FATAL | GE_IMMEDIATE, "write");
@@ -271,7 +271,7 @@
     return SYSERR;
   buffer = MALLOC (BUFFSIZE);
   memset (buffer, 0, BUFFSIZE);
-  lseek (fd, 0, SEEK_SET);
+  LSEEK (fd, 0, SEEK_SET);
 
   while (bytesleft > 0)
     {

Modified: GNUnet/src/util/os/semaphore.c
===================================================================
--- GNUnet/src/util/os/semaphore.c      2007-09-23 10:02:20 UTC (rev 5653)
+++ GNUnet/src/util/os/semaphore.c      2007-09-23 10:29:47 UTC (rev 5654)
@@ -136,10 +136,10 @@
   fsync (fd);
 }
 static int
-LSEEK (int fd, off_t pos, int mode)
+SEMA_LSEEK (int fd, off_t pos, int mode)
 {
   int ret;
-  ret = lseek (fd, pos, mode);
+  ret = LSEEK (fd, pos, mode);
   if (ret == -1)
     GE_LOG_STRERROR (NULL, GE_ERROR | GE_USER | GE_ADMIN | GE_BULK, "lseek");
   return ret;
@@ -326,18 +326,18 @@
   if (sizeof (int) != READ (fd, &cnt, sizeof (int)))
     {
       cnt = htonl (initialValue);
-      LSEEK (fd, 0, SEEK_SET);
+      SEMA_LSEEK (fd, 0, SEEK_SET);
       if (sizeof (int) != WRITE (fd, &cnt, sizeof (int)))
         GE_LOG_STRERROR_FILE (ectx,
                               GE_ERROR | GE_USER | GE_BULK,
                               "write", basename);
     }
-  LSEEK (fd, sizeof (int), SEEK_SET);
+  SEMA_LSEEK (fd, sizeof (int), SEEK_SET);
   if (sizeof (int) != READ (fd, &cnt, sizeof (int)))
     cnt = htonl (1);
   else
     cnt = htonl (ntohl (cnt) + 1);
-  LSEEK (fd, sizeof (int), SEEK_SET);
+  SEMA_LSEEK (fd, sizeof (int), SEEK_SET);
   if (sizeof (int) != WRITE (fd, &cnt, sizeof (int)))
     GE_LOG_STRERROR_FILE (ectx,
                           GE_WARNING | GE_USER | GE_BULK, "write", basename);
@@ -380,7 +380,7 @@
 
     MUTEX_LOCK (&sem->internalLock);
     FLOCK (sem->fd, LOCK_EX);
-    LSEEK (sem->fd, 0, SEEK_SET);
+    SEMA_LSEEK (sem->fd, 0, SEEK_SET);
     if (sizeof (int) != READ (sem->fd, &cnt, sizeof (int)))
       {
         GE_LOG_STRERROR_FILE (sem->ectx,
@@ -391,7 +391,7 @@
         return;
       }
     cnt = htonl (ntohl (cnt) + 1);
-    LSEEK (sem->fd, 0, SEEK_SET);
+    SEMA_LSEEK (sem->fd, 0, SEEK_SET);
     if (sizeof (int) != WRITE (sem->fd, &cnt, sizeof (int)))
       GE_LOG_STRERROR_FILE (sem->ectx,
                             GE_WARNING | GE_USER | GE_BULK,
@@ -444,7 +444,7 @@
     cnt = ntohl (0);
     while (htonl (cnt) == 0)
       {
-        LSEEK (sem->fd, 0, SEEK_SET);
+        SEMA_LSEEK (sem->fd, 0, SEEK_SET);
         if (sizeof (int) != READ (sem->fd, &cnt, sizeof (int)))
           {
             GE_LOG_STRERROR_FILE (sem->ectx,
@@ -464,7 +464,7 @@
       }
 
     cnt = htonl (ntohl (cnt) - 1);
-    LSEEK (sem->fd, 0, SEEK_SET);
+    SEMA_LSEEK (sem->fd, 0, SEEK_SET);
     if (sizeof (int) != WRITE (sem->fd, &cnt, sizeof (int)))
       GE_LOG_STRERROR_FILE (sem->ectx,
                             GE_WARNING | GE_USER | GE_BULK,
@@ -524,11 +524,11 @@
 
     MUTEX_DESTROY (&sem->internalLock);
     FLOCK (sem->fd, LOCK_EX);
-    LSEEK (sem->fd, sizeof (int), SEEK_SET);
+    SEMA_LSEEK (sem->fd, sizeof (int), SEEK_SET);
     if (sizeof (int) == READ (sem->fd, &cnt, sizeof (int)))
       {
         cnt = htonl (ntohl (cnt) - 1);
-        LSEEK (sem->fd, sizeof (int), SEEK_SET);
+        SEMA_LSEEK (sem->fd, sizeof (int), SEEK_SET);
         if (sizeof (int) != WRITE (sem->fd, &cnt, sizeof (int)))
           GE_LOG_STRERROR (sem->ectx,
                            GE_WARNING | GE_USER | GE_BULK, "write");





reply via email to

[Prev in Thread] Current Thread [Next in Thread]