Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ZerXes
Tor
Commits
9cf01020
Commit
9cf01020
authored
Aug 12, 2003
by
Nick Mathewson
🎨
Browse files
Misc patches to make windows build work. Now everything is done except the sockets stuff
svn:r393
parent
bbd4032f
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/or/directory.c
View file @
9cf01020
...
...
@@ -181,7 +181,7 @@ int directory_handle_command(connection_t *conn) {
assert
(
conn
&&
conn
->
type
==
CONN_TYPE_DIR
);
if
(
conn
->
inbuf_datalen
<
strlen
(
getstring
))
{
/* entire response available? */
if
(
conn
->
inbuf_datalen
<
(
int
)
strlen
(
getstring
))
{
/* entire response available? */
log_fn
(
LOG_DEBUG
,
"Entire command not here yet. Waiting."
);
return
0
;
/* not yet */
}
...
...
src/or/main.c
View file @
9cf01020
...
...
@@ -513,10 +513,12 @@ static int do_main_loop(void) {
* non-zero. This is where we try to connect to all the other ORs,
* and start the listeners
*/
retry_all_connections
(
options
.
ORPort
,
options
.
APPort
,
options
.
DirPort
);
retry_all_connections
((
uint16_t
)
options
.
ORPort
,
(
uint16_t
)
options
.
APPort
,
(
uint16_t
)
options
.
DirPort
);
for
(;;)
{
#ifndef MS_WIN
DOWS
/* do signal stuff only on unix */
#ifndef MS_WIN
32
/* do signal stuff only on unix */
if
(
please_dumpstats
)
{
dumpstats
();
please_dumpstats
=
0
;
...
...
@@ -588,7 +590,7 @@ static int do_main_loop(void) {
static
void
catch
(
int
the_signal
)
{
#ifndef MS_WIN
DOWS
/* do signal stuff only on unix */
#ifndef MS_WIN
32
/* do signal stuff only on unix */
switch
(
the_signal
)
{
// case SIGABRT:
case
SIGTERM
:
...
...
@@ -822,6 +824,7 @@ dump_signed_directory_to_string_impl(char *s, int maxlen, directory_t *dir,
}
void
daemonize
(
void
)
{
#ifndef MS_WINDOWS
/* Fork; parent exits. */
if
(
fork
())
exit
(
0
);
...
...
@@ -837,6 +840,7 @@ void daemonize(void) {
fclose
(
stdin
);
fclose
(
stdout
);
/* XXX Nick: this closes our log, right? is it safe to leave this open? */
fclose
(
stderr
);
#endif
}
int
tor_main
(
int
argc
,
char
*
argv
[])
{
...
...
src/or/or.h
View file @
9cf01020
...
...
@@ -82,11 +82,11 @@
#include
<winsock.h>
#endif
#ifdef
_
MS
C_VER
#ifdef MS
_WINDOWS
#include
<io.h>
#define WIN32_LEAN_AND_MEAN
#include
<windows.h>
#define snprintf
#define snprintf
_snprintf
#endif
...
...
src/win32/orconfig.h
View file @
9cf01020
...
...
@@ -2,6 +2,8 @@
* orconfig.h -- This file is *not* generated by autoconf. Instead,
* it has to be hand-edited to keep win32 happy.
*/
#define MS_WINDOWS
#define MS_WIN32
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment