[or-cvs] [tor/master 28/40] Create ntmain.h

nickm at torproject.org nickm at torproject.org
Fri Jul 30 01:56:58 UTC 2010


Author: Sebastian Hahn <sebastian at torproject.org>
Date: Fri, 23 Jul 2010 20:21:24 +0200
Subject: Create ntmain.h
Commit: af0c954bc5201e49b406332bea26ca4a71b32a94

---
 src/or/main.c   |    1 +
 src/or/ntmain.c |    2 ++
 src/or/ntmain.h |   30 ++++++++++++++++++++++++++++++
 src/or/or.h     |   15 ---------------
 4 files changed, 33 insertions(+), 15 deletions(-)
 create mode 100644 src/or/ntmain.h

diff --git a/src/or/main.c b/src/or/main.c
index 18525f0..67688bd 100644
--- a/src/or/main.c
+++ b/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"
diff --git a/src/or/ntmain.c b/src/or/ntmain.c
index 6f349cc..9bcb704 100644
--- a/src/or/ntmain.c
+++ b/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>
diff --git a/src/or/ntmain.h b/src/or/ntmain.h
new file mode 100644
index 0000000..2cfa653
--- /dev/null
+++ b/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
+
diff --git a/src/or/or.h b/src/or/or.h
index 4f1eab5..2afbac6 100644
--- a/src/or/or.h
+++ b/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);
-- 
1.7.1




More information about the tor-commits mailing list