Browse Source

Create ntmain.h

Sebastian Hahn 13 years ago
parent
commit
af0c954bc5
4 changed files with 33 additions and 15 deletions
  1. 1 0
      src/or/main.c
  2. 2 0
      src/or/ntmain.c
  3. 30 0
      src/or/ntmain.h
  4. 0 15
      src/or/or.h

+ 1 - 0
src/or/main.c

@@ -33,6 +33,7 @@
 #include "main.h"
 #include "microdesc.h"
 #include "networkstatus.h"
+#include "ntmain.h"
 #include "rendclient.h"
 #include "rendcommon.h"
 #include "rendservice.h"

+ 2 - 0
src/or/ntmain.c

@@ -5,6 +5,8 @@
 
 #define MAIN_PRIVATE
 #include "or.h"
+#include "config.h"
+#include "main.h"
 
 #ifdef HAVE_EVENT2_EVENT_H
 #include <event2/event.h>

+ 30 - 0
src/or/ntmain.h

@@ -0,0 +1,30 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2010, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file ntmain.h
+ * \brief Header file for ntmain.c.
+ **/
+
+#ifndef _TOR_NTMAIN_H
+#define _TOR_NTMAIN_H
+
+#ifdef MS_WINDOWS
+#if !defined (WINCE)
+#define NT_SERVICE
+#endif
+#endif
+
+#ifdef NT_SERVICE
+int nt_service_parse_options(int argc, char **argv, int *should_exit);
+int nt_service_is_stopping(void);
+void nt_service_set_state(DWORD state);
+#else
+#define nt_service_is_stopping() 0
+#endif
+
+#endif
+

+ 0 - 15
src/or/or.h

@@ -3293,21 +3293,6 @@ typedef enum version_status_t {
   VS_UNKNOWN, /**< We have no idea. */
 } version_status_t;
 
-/********************************* ntmain.c ***************************/
-#ifdef MS_WINDOWS
-#if !defined (WINCE)
-#define NT_SERVICE
-#endif
-#endif
-
-#ifdef NT_SERVICE
-int nt_service_parse_options(int argc, char **argv, int *should_exit);
-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, char *onionskin);