aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-01-31 10:59:42 -0500
committerNick Mathewson <nickm@torproject.org>2012-01-31 15:48:47 -0500
commit5cf9167f919dfef964b1d149731ed04941e25ebf (patch)
tree37668dde9fd4c68d80cb1bde90523b55fba4b226 /src/or/control.c
parent23054543278a8ee5db6d8dae3b3a96e2b2fd5377 (diff)
downloadtor-5cf9167f919dfef964b1d149731ed04941e25ebf.tar
tor-5cf9167f919dfef964b1d149731ed04941e25ebf.tar.gz
Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32
This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/control.c b/src/or/control.c
index b7c46e92b..9a07777a7 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -34,7 +34,7 @@
#include "routerlist.h"
#include "routerparse.h"
-#ifndef MS_WINDOWS
+#ifndef _WIN32
#include <pwd.h>
#include <sys/resource.h>
#endif
@@ -542,7 +542,7 @@ control_ports_write_to_file(void)
log_warn(LD_CONTROL, "Writing %s failed: %s",
options->ControlPortWriteToFile, strerror(errno));
}
-#ifndef MS_WINDOWS
+#ifndef _WIN32
if (options->ControlPortFileGroupReadable) {
if (chmod(options->ControlPortWriteToFile, 0640)) {
log_warn(LD_FS,"Unable to make %s group-readable.",
@@ -1392,7 +1392,7 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
} else if (!strcmp(question, "process/pid")) {
int myPid = -1;
- #ifdef MS_WINDOWS
+ #ifdef _WIN32
myPid = _getpid();
#else
myPid = getpid();
@@ -1400,14 +1400,14 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
tor_asprintf(answer, "%d", myPid);
} else if (!strcmp(question, "process/uid")) {
- #ifdef MS_WINDOWS
+ #ifdef _WIN32
*answer = tor_strdup("-1");
#else
int myUid = geteuid();
tor_asprintf(answer, "%d", myUid);
#endif
} else if (!strcmp(question, "process/user")) {
- #ifdef MS_WINDOWS
+ #ifdef _WIN32
*answer = tor_strdup("");
#else
int myUid = geteuid();
@@ -1435,7 +1435,7 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
}
#elif defined(CYGWIN) || defined(__CYGWIN__)
*answer = tor_strdup("3200");
- #elif defined(MS_WINDOWS)
+ #elif defined(_WIN32)
*answer = tor_strdup("15000");
#else
*answer = tor_strdup("15000");
@@ -4231,7 +4231,7 @@ init_cookie_authentication(int enabled)
tor_free(fname);
return -1;
}
-#ifndef MS_WINDOWS
+#ifndef _WIN32
if (get_options()->CookieAuthFileGroupReadable) {
if (chmod(fname, 0640)) {
log_warn(LD_FS,"Unable to make %s group-readable.", escaped(fname));