[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8326: Fix spaces; restore support for mapping files over 4GB on wi (in tor/trunk: . src/common src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8326: Fix spaces; restore support for mapping files over 4GB on wi (in tor/trunk: . src/common src/or)
- From: nickm@xxxxxxxx
- Date: Wed, 6 Sep 2006 04:42:16 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Wed, 06 Sep 2006 04:42:23 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-09-06 04:42:16 -0400 (Wed, 06 Sep 2006)
New Revision: 8326
Modified:
tor/trunk/
tor/trunk/src/common/compat.c
tor/trunk/src/common/compat.h
tor/trunk/src/or/config.c
Log:
r8724@Kushana: nickm | 2006-09-06 04:32:28 -0400
Fix spaces; restore support for mapping files over 4GB on win32 (?)
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r8724] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c 2006-09-06 08:42:12 UTC (rev 8325)
+++ tor/trunk/src/common/compat.c 2006-09-06 08:42:16 UTC (rev 8326)
@@ -167,22 +167,22 @@
res->mmap_handle = res->file_handle = INVALID_HANDLE_VALUE;
res->file_handle = CreateFile(filename,
- GENERIC_READ,
- 0, NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- 0);
+ GENERIC_READ,
+ 0, NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ 0);
if (res->file_handle == INVALID_HANDLE_VALUE)
- goto err;
+ goto err;
res->base.size = GetFileSize(res->file_handle, NULL);
res->mmap_handle = CreateFileMapping(res->file_handle,
NULL,
PAGE_READONLY,
- 0,
- res->base.size,
+ (res->base.size >> 32),
+ (res->base.size & 0xfffffffful),
NULL);
if (res->mmap_handle != INVALID_HANDLE_VALUE)
goto err;
@@ -426,8 +426,8 @@
set_socket_nonblocking(int socket)
{
#ifdef MS_WINDOWS
- unsigned long nonblocking = 1;
- ioctlsocket(socket, FIONBIO, (unsigned long*) &nonblocking);
+ unsigned long nonblocking = 1;
+ ioctlsocket(socket, FIONBIO, (unsigned long*) &nonblocking);
#else
fcntl(socket, F_SETFL, O_NONBLOCK);
#endif
@@ -572,7 +572,7 @@
log_fn(LOG_INFO, LD_NET,
"This platform is missing getrlimit(). Proceeding.");
if (limit < cap) {
- log_info(LD_CONFIG, "ConnLimit must be at most %d. Using that.", (int) cap);
+ log_info(LD_CONFIG, "ConnLimit must be at most %d. Using that.", (int)cap);
limit = cap;
}
#else
@@ -809,8 +809,6 @@
const char *
get_uname(void)
{
-
-
#ifdef HAVE_UNAME
struct utsname u;
#endif
@@ -864,7 +862,6 @@
memset(&info, 0, sizeof(info));
info.dwOSVersionInfoSize = sizeof(info);
if (! GetVersionEx((LPOSVERSIONINFO)&info)) {
-
strlcpy(uname_result, "Bizarre version of Windows where GetVersionEx"
" doesn't work.", sizeof(uname_result));
uname_result_is_set = 1;
@@ -1004,7 +1001,6 @@
/** End the current thread/process.
*/
-
void
spawn_exit(void)
{
@@ -1161,7 +1157,7 @@
tor_assert(0);
break;
case WAIT_FAILED:
- log_warn(LD_GENERAL, "Failed to acquire mutex: %d", (int) GetLastError());
+ log_warn(LD_GENERAL, "Failed to acquire mutex: %d",(int) GetLastError());
}
}
void
Modified: tor/trunk/src/common/compat.h
===================================================================
--- tor/trunk/src/common/compat.h 2006-09-06 08:42:12 UTC (rev 8325)
+++ tor/trunk/src/common/compat.h 2006-09-06 08:42:16 UTC (rev 8326)
@@ -319,9 +319,7 @@
#define VER_SUITE_SINGLEUSERTS 0x00000100
#endif
-
#endif
-
#endif
Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c 2006-09-06 08:42:12 UTC (rev 8325)
+++ tor/trunk/src/or/config.c 2006-09-06 08:42:16 UTC (rev 8326)
@@ -2761,7 +2761,7 @@
fname = tor_strdup(dflt);
} else {
#ifndef MS_WINDOWS
- char *fn;
+ char *fn;
fn = expand_filename("~/.torrc");
if (fn && file_status(fn) == FN_FILE) {
fname = fn;