Commit f17a38ab authored by Nick Mathewson's avatar Nick Mathewson 🎨
Browse files

r14940@catbus: nickm | 2007-09-06 13:22:26 -0400

 Move NT services code into its own C file.  Probably will not build happily on win32 yet; more hacking needed.


svn:r11388
parent c5b4f779
......@@ -32,6 +32,7 @@ Changes in version 0.2.0.7-alpha - 2007-??-??
- Revamp file-writing logic so we don't need to have the entire contents
of a file in memory at once before we write to disk. Tor, meet stdio.
- Turn "descriptor store" into a full-fledged type.
- Move all NT services code into a separate source file.
Changes in version 0.1.2.17 - 2007-08-30
......
......@@ -126,6 +126,7 @@ fi
if test $bwin32 = true; then
AC_DEFINE(MS_WINDOWS, 1, [Define to 1 if we are building for Windows.])
fi
AM_CONDITIONAL(BUILD_NT_SERVICES, test x$bwin32 = xtrue)
dnl Enable C99 when compiling with MIPSpro
AC_MSG_CHECKING([for MIPSpro compiler])
......
......@@ -4,11 +4,19 @@ noinst_PROGRAMS = test
bin_PROGRAMS = tor
if BUILD_NT_SERVICES
PLATFORM_SOURCES=ntmain.c
else
PLATFORM_SOURCES=
endif
EXTRA_DIST=ntmain.c
tor_SOURCES = buffers.c circuitbuild.c circuitlist.c \
circuituse.c command.c config.c \
connection.c connection_edge.c connection_or.c control.c \
cpuworker.c directory.c dirserv.c dirvote.c \
dns.c dnsserv.c hibernate.c main.c \
dns.c dnsserv.c hibernate.c main.c $(PLATFORM_SOURCES) \
onion.c policies.c relay.c rendcommon.c rendclient.c rendmid.c \
rendservice.c rephist.c router.c routerlist.c routerparse.c \
eventdns.c \
......@@ -25,7 +33,7 @@ test_SOURCES = buffers.c circuitbuild.c circuitlist.c \
circuituse.c command.c config.c \
connection.c connection_edge.c connection_or.c control.c \
cpuworker.c directory.c dirserv.c dirvote.c \
dns.c dnsserv.c hibernate.c main.c \
dns.c dnsserv.c hibernate.c main.c $(PLATFORM_SOURCES) \
onion.c policies.c relay.c rendcommon.c rendclient.c rendmid.c \
rendservice.c rephist.c router.c routerlist.c routerparse.c \
eventdns.c \
......
......@@ -4610,6 +4610,9 @@ extern const char dirserv_c_id[];
extern const char dns_c_id[];
extern const char hibernate_c_id[];
extern const char main_c_id[];
#ifdef NT_SERVICE
extern const char ntmain_c_id[];
#endif
extern const char onion_c_id[];
extern const char policies_c_id[];
extern const char relay_c_id[];
......@@ -4663,6 +4666,9 @@ print_svn_version(void)
puts(dns_c_id);
puts(hibernate_c_id);
puts(main_c_id);
#ifdef NT_SERVICE
puts(ntmain_c_id);
#endif
puts(onion_c_id);
puts(policies_c_id);
puts(relay_c_id);
......
This diff is collapsed.
This diff is collapsed.
......@@ -3018,6 +3018,19 @@ void tor_free_all(int postfork);
int tor_main(int argc, char *argv[]);
/********************************* ntmain.c ***************************/
#ifdef MS_WINDOWS
#define NT_SERVICE
#endif
#ifdef NT_SERVICE
int nt_service_parse_options(int argc, char **argv);
int nt_service_is_stopping(void);
void nt_service_set_state(DWORD state);
#else
#define nt_service_is_stopping() (0)
#endif
/********************************* onion.c ***************************/
int onion_pending_add(or_circuit_t *circ);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment