summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-12-01 19:41:16 -0800
committerZachary T Welch <zw@superlucidity.net>2009-12-02 13:26:26 -0800
commit34654359a918edae10ca7dd7ebc0a487fdf609a4 (patch)
tree118b101ad9d0a7c1050dcab029b59a0f51a8caba /src/server
parent62fbb0f545213f8a813819f319e20fee8a859319 (diff)
downloadopenocd_libswd-34654359a918edae10ca7dd7ebc0a487fdf609a4.tar.gz
openocd_libswd-34654359a918edae10ca7dd7ebc0a487fdf609a4.tar.bz2
openocd_libswd-34654359a918edae10ca7dd7ebc0a487fdf609a4.tar.xz
openocd_libswd-34654359a918edae10ca7dd7ebc0a487fdf609a4.zip
remove #if logic for openocd_sleep_*lude
Adds server_stubs.c to hold these routines, using automake logic to ensure it gets included under the right conditions.
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Makefile.am4
-rw-r--r--src/server/server.h9
-rw-r--r--src/server/server_stubs.c32
3 files changed, 45 insertions, 0 deletions
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index 95fb519b..b47b8d09 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -13,6 +13,10 @@ libserver_la_SOURCES = server.c telnet_server.c gdb_server.c
if HTTPD
libserver_la_SOURCES += httpd.c
+else
+if !ECOSBOARD
+libserver_la_SOURCES += server_stubs.c
+endif
endif
noinst_HEADERS += httpd.h
diff --git a/src/server/server.h b/src/server/server.h
index 173de951..e632bf1e 100644
--- a/src/server/server.h
+++ b/src/server/server.h
@@ -82,6 +82,15 @@ int server_loop(struct command_context *command_context);
int server_register_commands(struct command_context *context);
/**
+ * Used by server_loop(), defined in server_stubs.c, httpd.c, or ecosboard.c
+ */
+void openocd_sleep_prelude(void);
+/**
+ * Used by server_loop(), defined in server_stubs.c, httpd.c, or ecosboard.c
+ */
+void openocd_sleep_postlude(void);
+
+/**
* Defines an extended command handler function declaration to enable
* access to (and manipulation of) the server port number.
* Call server_port like a normal COMMAND_HANDLER with an extra @a out parameter
diff --git a/src/server/server_stubs.c b/src/server/server_stubs.c
new file mode 100644
index 00000000..dcddec0e
--- /dev/null
+++ b/src/server/server_stubs.c
@@ -0,0 +1,32 @@
+/***************************************************************************
+ * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "server.h"
+
+void openocd_sleep_prelude(void)
+{
+ // no-op
+}
+void openocd_sleep_postlude(void)
+{
+ // no-op
+}