[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1106 - in GNUnet/src: applications/topology_default includ
From: |
durner |
Subject: |
[GNUnet-SVN] r1106 - in GNUnet/src: applications/topology_default include |
Date: |
Mon, 27 Jun 2005 15:07:26 -0700 (PDT) |
Author: durner
Date: 2005-06-27 15:07:21 -0700 (Mon, 27 Jun 2005)
New Revision: 1106
Modified:
GNUnet/src/applications/topology_default/topology.c
GNUnet/src/include/plibc.h
Log:
MinGW
Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2005-06-27 21:57:49 UTC
(rev 1105)
+++ GNUnet/src/applications/topology_default/topology.c 2005-06-27 22:07:21 UTC
(rev 1106)
@@ -259,7 +259,7 @@
if (minint == 0)
minint = 1;
for (i=slotCount-1;i>=0;i--) {
- if (((double) random() / RAND_MAX) > LIVE_SCAN_EFFECTIVENESS)
+ if (((double) RANDOM() / RAND_MAX) > LIVE_SCAN_EFFECTIVENESS)
continue;
if ( (minint > coreAPI->isSlotUsed(i)) &&
(! testConfigurationString("GNUNETD",
@@ -267,7 +267,7 @@
"YES")) )
scanForHosts(i);
}
- if (((double) random() / RAND_MAX) <= LIVE_PING_EFFECTIVENESS)
+ if (((double) RANDOM() / RAND_MAX) <= LIVE_PING_EFFECTIVENESS)
active = coreAPI->forAllConnectedNodes
(&checkNeedForPing,
NULL);
Modified: GNUnet/src/include/plibc.h
===================================================================
--- GNUnet/src/include/plibc.h 2005-06-27 21:57:49 UTC (rev 1105)
+++ GNUnet/src/include/plibc.h 2005-06-27 22:07:21 UTC (rev 1106)
@@ -22,7 +22,7 @@
* @brief PlibC header
* @attention This file is usually not installed under Unix,
* so ship it with your application
- * @version $Revision: 1.19 $
+ * @version $Revision: 1.21 $
*/
#ifndef _PLIBC_H_
@@ -335,6 +335,7 @@
int _win_access( const char *path, int mode );
int _win_chmod(const char *filename, int pmode);
char *realpath(const char *file_name, char *resolved_name);
+long _win_random(void);
int _win_remove(const char *path);
int _win_rename(const char *oldname, const char *newname);
int _win_stat(const char *path, struct stat *buffer);
@@ -432,6 +433,7 @@
#define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o)
#define MUNMAP(s, l) munmap(s, l)
#define STRERROR(i) strerror(i)
+ #define RANDOM() random()
#define READLINK(p, b, s) readlink(p, b, s)
#define LSTAT(p, b) lstat(p, b)
#define PRINTF(f, ...) printf(f , __VA_ARGS__)
@@ -485,6 +487,7 @@
#define ACCESS(p, m) _win_access(p, m)
#define CHMOD(f, p) _win_chmod(f, p)
#define PIPE(h) _win_pipe(h)
+ #define RANDOM() _win_random()
#define REMOVE(p) _win_remove(p)
#define RENAME(o, n) _win_rename(o, n)
#define STAT(p, b) _win_stat(p, b)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1106 - in GNUnet/src: applications/topology_default include,
durner <=