[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r883 - in GNUnet/src: applications/fs/ecrs applications/fs/
From: |
durner |
Subject: |
[GNUnet-SVN] r883 - in GNUnet/src: applications/fs/ecrs applications/fs/fsui applications/gap applications/testbed conf util |
Date: |
Tue, 7 Jun 2005 14:22:52 -0700 (PDT) |
Author: durner
Date: 2005-06-07 14:22:38 -0700 (Tue, 07 Jun 2005)
New Revision: 883
Modified:
GNUnet/src/applications/fs/ecrs/ecrstest.c
GNUnet/src/applications/fs/ecrs/meta.c
GNUnet/src/applications/fs/fsui/collection.c
GNUnet/src/applications/fs/fsui/upload.c
GNUnet/src/applications/gap/gaptest.c
GNUnet/src/applications/testbed/commands.c
GNUnet/src/applications/testbed/gnunet-testbed.c
GNUnet/src/applications/testbed/testbed.c
GNUnet/src/conf/lex.zconf.c
GNUnet/src/conf/mconf.c
GNUnet/src/conf/wizard_util.c
GNUnet/src/util/configuration.c
Log:
MinGW
Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c 2005-06-07 17:18:02 UTC (rev
882)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c 2005-06-07 21:22:38 UTC (rev
883)
@@ -85,7 +85,7 @@
hash(&buf[i+sizeof(HashCode512)],
42,
(HashCode512*) &buf[i]);
- write(fd, buf, size);
+ WRITE(fd, buf, size);
FREE(buf);
closefile(fd);
ret = ECRS_uploadFile(name,
@@ -203,7 +203,7 @@
hash(&buf[i+sizeof(HashCode512)],
42,
(HashCode512*) &buf[i]);
- if (size != read(fd, in, size))
+ if (size != READ(fd, in, size))
ret = SYSERR;
else if (0 == memcmp(buf,
in,
Modified: GNUnet/src/applications/fs/ecrs/meta.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/meta.c 2005-06-07 17:18:02 UTC (rev
882)
+++ GNUnet/src/applications/fs/ecrs/meta.c 2005-06-07 21:22:38 UTC (rev
883)
@@ -768,7 +768,7 @@
if (0 != RENAME(filename, renameTo))
LOG(LOG_ERROR,
_("Renaming of file '%s' to '%s' failed: %s\n"),
- filename, renameTo, strerror(errno));
+ filename, renameTo, STRERROR(errno));
else
ret = STRDUP(renameTo);
} else {
Modified: GNUnet/src/applications/fs/fsui/collection.c
===================================================================
--- GNUnet/src/applications/fs/fsui/collection.c 2005-06-07 17:18:02 UTC
(rev 882)
+++ GNUnet/src/applications/fs/fsui/collection.c 2005-06-07 21:22:38 UTC
(rev 883)
@@ -252,7 +252,7 @@
return;
}
dirLen = ntohl(cd->hdr.size) - sizeof(CollectionData) - strlen(cd->name);
- if (-1 == write(fd, &cd->name[strlen(cd->name)+1], dirLen)) {
+ if (-1 == WRITE(fd, &cd->name[strlen(cd->name)+1], dirLen)) {
LOG_STRERROR(LOG_ERROR, "write");
FREE(tmpName);
return;
Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c 2005-06-07 17:18:02 UTC (rev
882)
+++ GNUnet/src/applications/fs/fsui/upload.c 2005-06-07 21:22:38 UTC (rev
883)
@@ -145,7 +145,7 @@
handle = mkstemp(tempName);
if (handle == -1) {
LOG_FILE_STRERROR(LOG_ERROR, tempName, "mkstemp");
- } else if (len != write(handle,
+ } else if (len != WRITE(handle,
data,
len)) {
LOG_FILE_STRERROR(LOG_ERROR, tempName, "write");
Modified: GNUnet/src/applications/gap/gaptest.c
===================================================================
--- GNUnet/src/applications/gap/gaptest.c 2005-06-07 17:18:02 UTC (rev
882)
+++ GNUnet/src/applications/gap/gaptest.c 2005-06-07 21:22:38 UTC (rev
883)
@@ -93,7 +93,7 @@
hash(&buf[i+sizeof(HashCode512)],
42,
(HashCode512*) &buf[i]);
- write(fd, buf, size);
+ WRITE(fd, buf, size);
FREE(buf);
closefile(fd);
ret = ECRS_uploadFile(name,
@@ -211,7 +211,7 @@
hash(&buf[i+sizeof(HashCode512)],
42,
(HashCode512*) &buf[i]);
- if (size != read(fd, in, size))
+ if (size != READ(fd, in, size))
ret = SYSERR;
else if (0 == memcmp(buf,
in,
Modified: GNUnet/src/applications/testbed/commands.c
===================================================================
--- GNUnet/src/applications/testbed/commands.c 2005-06-07 17:18:02 UTC (rev
882)
+++ GNUnet/src/applications/testbed/commands.c 2005-06-07 21:22:38 UTC (rev
883)
@@ -296,7 +296,7 @@
s = SOCKET(PF_INET, SOCK_STREAM, 0);
if (s == -1) {
XPRINTF("Cannot open socket: %s\n",
- strerror(errno));
+ STRERROR(errno));
return -1;
}
if ( SETSOCKOPT(s,
@@ -348,12 +348,12 @@
sargv);
LOG(LOG_ERROR,
" execvp failed: %s\n",
- strerror(errno));
+ STRERROR(errno));
exit(-1);
}
if (pid == -1) {
XPRINTF("Failed to fork: %s\n",
- strerror(errno));
+ STRERROR(errno));
return -1;
}
Modified: GNUnet/src/applications/testbed/gnunet-testbed.c
===================================================================
--- GNUnet/src/applications/testbed/gnunet-testbed.c 2005-06-07 17:18:02 UTC
(rev 882)
+++ GNUnet/src/applications/testbed/gnunet-testbed.c 2005-06-07 21:22:38 UTC
(rev 883)
@@ -391,7 +391,7 @@
FD_ZERO(&wset);
FD_ZERO(&eset);
FD_SET(ssock, &rset);
- sock = select(ssock+1, &rset, &wset, &eset, NULL);
+ sock = SELECT(ssock+1, &rset, &wset, &eset, NULL);
if (sock == -1)
continue;
sock = ACCEPT(ssock,
Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c 2005-06-07 17:18:02 UTC (rev
882)
+++ GNUnet/src/applications/testbed/testbed.c 2005-06-07 21:22:38 UTC (rev
883)
@@ -539,7 +539,7 @@
_("'%s' %s failed: %s\n"),
"execvp",
pi->argv[0],
- strerror(errno));
+ STRERROR(errno));
exit(errno);
} /* end pi->pid == 0 */
FREE(dir);
@@ -570,7 +570,7 @@
#define PRT_BUFSIZE 65536
buffer = MALLOC(PRT_BUFSIZE);
while (ret > 0) {
- ret = read(pi->outputPipe,
+ ret = READ(pi->outputPipe,
buffer,
PRT_BUFSIZE);
if (ret <= 0)
@@ -853,7 +853,7 @@
((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf,
end - ((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf);
if (htonl(msg->type) == TESTBED_FILE_DELETE) {
- if (remove(filename) && errno != ENOENT) {
+ if (REMOVE(filename) && errno != ENOENT) {
LOG_FILE_STRERROR(LOG_WARNING, "remove", filename);
ack = SYSERR;
} else
Modified: GNUnet/src/conf/lex.zconf.c
===================================================================
--- GNUnet/src/conf/lex.zconf.c 2005-06-07 17:18:02 UTC (rev 882)
+++ GNUnet/src/conf/lex.zconf.c 2005-06-07 21:22:38 UTC (rev 883)
@@ -2132,7 +2132,7 @@
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
errno=0; \
- while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0
) \
+ while ( (result = READ( fileno(zconfin), (char *) buf, max_size )) < 0
) \
{ \
if( errno != EINTR) \
{ \
Modified: GNUnet/src/conf/mconf.c
===================================================================
--- GNUnet/src/conf/mconf.c 2005-06-07 17:18:02 UTC (rev 882)
+++ GNUnet/src/conf/mconf.c 2005-06-07 21:22:38 UTC (rev 883)
@@ -637,7 +637,7 @@
fd = CREAT(".help.tmp", 0777);
WRITE(fd, text, strlen(text));
- close(fd);
+ CLOSE(fd);
while (dialog_textbox(title, ".help.tmp", r, c) < 0)
;
UNLINK(".help.tmp");
Modified: GNUnet/src/conf/wizard_util.c
===================================================================
--- GNUnet/src/conf/wizard_util.c 2005-06-07 17:18:02 UTC (rev 882)
+++ GNUnet/src/conf/wizard_util.c 2005-06-07 21:22:38 UTC (rev 883)
@@ -290,7 +290,7 @@
"esac\n"
"exit 0\n", f);
fclose(f);
- chmod("/etc/init.d/gnunetd", S_IRWXU |
S_IRGRP | S_IXGRP |
+ CHMOD("/etc/init.d/gnunetd", S_IRWXU |
S_IRGRP | S_IXGRP |
S_IROTH | S_IXOTH);
}
system("/usr/sbin/update-rc.d gnunetd defaults");
Modified: GNUnet/src/util/configuration.c
===================================================================
--- GNUnet/src/util/configuration.c 2005-06-07 17:18:02 UTC (rev 882)
+++ GNUnet/src/util/configuration.c 2005-06-07 21:22:38 UTC (rev 883)
@@ -416,17 +416,17 @@
that we can write there (if it does not
exist) */
expCfgName = "/etc/gnunetd.conf";
- if (access(expCfgName, R_OK)) {
+ if (ACCESS(expCfgName, R_OK)) {
expCfgName = "/var/lib/GNUnet/gnunetd.conf";
- if (access(expCfgName, R_OK)) {
+ if (ACCESS(expCfgName, R_OK)) {
expCfgName = eName;
- if (access(expCfgName, R_OK)) {
- if (0 == access("/etc/gnunetd.conf", W_OK))
+ if (ACCESS(expCfgName, R_OK)) {
+ if (0 == ACCESS("/etc/gnunetd.conf", W_OK))
expCfgName = "/etc/gnunetd.conf";
mkdirp("/var/lib/GNUnet");
- if (0 == access("/var/lib/GNUnet/gnunetd.conf", W_OK))
+ if (0 == ACCESS("/var/lib/GNUnet/gnunetd.conf", W_OK))
expCfgName = "/var/lib/GNUnet/gnunetd.conf";
- if (0 == access(eName, W_OK))
+ if (0 == ACCESS(eName, W_OK))
expCfgName = eName;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r883 - in GNUnet/src: applications/fs/ecrs applications/fs/fsui applications/gap applications/testbed conf util,
durner <=