diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-12-01 19:41:16 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-12-02 13:26:26 -0800 |
commit | 34654359a918edae10ca7dd7ebc0a487fdf609a4 (patch) | |
tree | 118b101ad9d0a7c1050dcab029b59a0f51a8caba /src/server | |
parent | 62fbb0f545213f8a813819f319e20fee8a859319 (diff) | |
download | riscv-openocd-34654359a918edae10ca7dd7ebc0a487fdf609a4.zip riscv-openocd-34654359a918edae10ca7dd7ebc0a487fdf609a4.tar.gz riscv-openocd-34654359a918edae10ca7dd7ebc0a487fdf609a4.tar.bz2 |
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.am | 4 | ||||
-rw-r--r-- | src/server/server.h | 9 | ||||
-rw-r--r-- | src/server/server_stubs.c | 32 |
3 files changed, 45 insertions, 0 deletions
diff --git a/src/server/Makefile.am b/src/server/Makefile.am index 95fb519..b47b8d0 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 173de95..e632bf1 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 0000000..dcddec0 --- /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 +} |