[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4151 - in GNUnet: . src/util/os
From: |
grothoff |
Subject: |
[GNUnet-SVN] r4151 - in GNUnet: . src/util/os |
Date: |
Mon, 1 Jan 2007 17:12:04 -0800 (PST) |
Author: grothoff
Date: 2007-01-01 17:12:02 -0800 (Mon, 01 Jan 2007)
New Revision: 4151
Modified:
GNUnet/configure.ac
GNUnet/src/util/os/semaphore.c
GNUnet/src/util/os/statuscalls.c
Log:
OpenBSD improvements
Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2007-01-02 00:46:35 UTC (rev 4150)
+++ GNUnet/configure.ac 2007-01-02 01:12:02 UTC (rev 4151)
@@ -87,6 +87,7 @@
openbsd*)
AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
+ LIBS=`echo $LIBS | sed -e "s/-ldl//"`
;;
netbsd*)
AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
Modified: GNUnet/src/util/os/semaphore.c
===================================================================
--- GNUnet/src/util/os/semaphore.c 2007-01-02 00:46:35 UTC (rev 4150)
+++ GNUnet/src/util/os/semaphore.c 2007-01-02 01:12:02 UTC (rev 4151)
@@ -28,6 +28,8 @@
#include "gnunet_util_os.h"
#include "gnunet_util_string.h"
#include "gnunet_util_error.h"
+#include "gnunet_util_threads.h"
+#include "gnunet_util_disk.h"
#include "platform.h"
#if SOLARIS || FREEBSD || OSX
@@ -513,7 +515,7 @@
FLOCK(sem->fd,
LOCK_UN);
MUTEX_UNLOCK(&sem->internalLock);
- return;
+ return SYSERR;
}
if (htonl(cnt) == 0) {
/* busy wait! */
Modified: GNUnet/src/util/os/statuscalls.c
===================================================================
--- GNUnet/src/util/os/statuscalls.c 2007-01-02 00:46:35 UTC (rev 4150)
+++ GNUnet/src/util/os/statuscalls.c 2007-01-02 01:12:02 UTC (rev 4151)
@@ -149,17 +149,15 @@
#define MAX_PROC_LINE 5000
static void updateInterfaceTraffic(struct LoadMonitor * monitor) {
+#ifdef LINUX
unsigned long long rxnew;
unsigned long long txnew;
int i;
char line[MAX_PROC_LINE];
NetworkStats * ifc;
-#ifdef LINUX
char * data;
- int found;
if (monitor->proc_net_dev != NULL) {
- found = 0;
rewind(monitor->proc_net_dev);
fflush(monitor->proc_net_dev);
/* Parse the line matching the interface ('eth0') */
@@ -198,6 +196,9 @@
int name[6];
size_t len;
int rows;
+ int j;
+ int i;
+ NetworkStats * ifc;
name[0] = CTL_NET;
name[1] = PF_LINK;
@@ -208,7 +209,6 @@
len = sizeof(rows);
if (sysctl(name, 5, &rows, &len, (void *)0, 0) == 0) {
- int j;
for (j=1;j<=rows;j++) {
struct ifmibdata ifmd;
@@ -254,6 +254,10 @@
BYTE bPhysAddr[MAXLEN_PHYSADDR];
int iLine = 0;
FILE * command;
+ unsigned long long rxnew;
+ unsigned long long txnew;
+ int i;
+ char line[MAX_PROC_LINE];
/* Win 98 and NT SP 4 */
if (GNGetIfEntry) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4151 - in GNUnet: . src/util/os,
grothoff <=