diff options
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/Makefile.am | 6 | ||||
-rw-r--r-- | src/helper/command.c | 7 | ||||
-rw-r--r-- | src/helper/command.h | 6 | ||||
-rw-r--r-- | src/helper/ioutil.c | 2 | ||||
-rw-r--r-- | src/helper/replacements.h | 4 | ||||
-rw-r--r-- | src/helper/system.h | 3 | ||||
-rw-r--r-- | src/helper/time_support_ecos.c | 44 |
7 files changed, 1 insertions, 71 deletions
diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am index c9479b43..6189b63a 100644 --- a/src/helper/Makefile.am +++ b/src/helper/Makefile.am @@ -3,13 +3,7 @@ include $(top_srcdir)/common.mk METASOURCES = AUTO noinst_LTLIBRARIES = libhelper.la -if ECOSBOARD -CONFIGFILES = time_support_ecos.c -else CONFIGFILES = options.c time_support_common.c -endif - - libhelper_la_SOURCES = \ binarybuffer.c \ diff --git a/src/helper/command.c b/src/helper/command.c index c218f3fc..fb1a709a 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -31,10 +31,8 @@ #include "config.h" #endif -#if !BUILD_ECOSBOARD /* see Embedder-HOWTO.txt in Jim Tcl project hosted on BerliOS*/ #define JIM_EMBEDDED -#endif /* @todo the inclusion of target.h here is a layering violation */ #include <jtag/jtag.h> @@ -1280,7 +1278,6 @@ struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp context->output_handler = NULL; context->output_handler_priv = NULL; -#if !BUILD_ECOSBOARD /* Create a jim interpreter if we were not handed one */ if (interp == NULL) { /* Create an interpreter */ @@ -1289,7 +1286,7 @@ struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp Jim_RegisterCoreCommands(interp); Jim_InitStaticExtensions(interp); } -#endif + context->interp = interp; /* Stick to lowercase for HostOS strings. */ @@ -1349,7 +1346,6 @@ int command_context_mode(struct command_context *cmd_ctx, enum command_mode mode void process_jim_events(struct command_context *cmd_ctx) { -#if !BUILD_ECOSBOARD static int recursion; if (recursion) return; @@ -1357,7 +1353,6 @@ void process_jim_events(struct command_context *cmd_ctx) recursion++; Jim_ProcessEvents(cmd_ctx->interp, JIM_ALL_EVENTS | JIM_DONT_WAIT); recursion--; -#endif } #define DEFINE_PARSE_NUM_TYPE(name, type, func, min, max) \ diff --git a/src/helper/command.h b/src/helper/command.h index 01316a1a..7cd5cc4c 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -26,12 +26,6 @@ #include <helper/types.h> -/* Integrate the JIM TCL interpretor into the command processing. */ -#if BUILD_ECOSBOARD -#include <stdio.h> -#include <stdarg.h> -#endif - #include <jim.h> #include <jim-nvp.h> diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c index 4e9d6878..684950d1 100644 --- a/src/helper/ioutil.c +++ b/src/helper/ioutil.c @@ -48,10 +48,8 @@ #include <ifaddrs.h> #endif #ifdef HAVE_MALLOC_H -#if !BUILD_ECOSBOARD #include <malloc.h> #endif -#endif /* loads a file and returns a pointer to it in memory. The file contains * a 0 byte(sentinel) after len bytes - the length of the file. */ diff --git a/src/helper/replacements.h b/src/helper/replacements.h index 6f2e9595..ceb22584 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -128,12 +128,8 @@ static inline unsigned usleep(unsigned int usecs) return 0; } #else -#if BUILD_ECOSBOARD -void usleep(int us); -#else #error no usleep defined for your platform #endif -#endif #endif /* HAVE_USLEEP */ /* Windows specific */ diff --git a/src/helper/system.h b/src/helper/system.h index 85e0b1ee..82d0cae7 100644 --- a/src/helper/system.h +++ b/src/helper/system.h @@ -45,9 +45,6 @@ /* --- AC_HEADER_TIME --- */ /* +++ platform specific headers +++ */ -#if BUILD_ECOSBOARD == 1 -#include <pkgconf/system.h> -#endif #ifdef _WIN32 #include <winsock2.h> #include <ws2tcpip.h> diff --git a/src/helper/time_support_ecos.c b/src/helper/time_support_ecos.c deleted file mode 100644 index 110edd24..00000000 --- a/src/helper/time_support_ecos.c +++ /dev/null @@ -1,44 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Dominic Rath * - * Dominic.Rath@gmx.de * - * * - * Copyright (C) 2007,2008 Øyvind Harboe * - * oyvind.harboe@zylin.com * - * * - * Copyright (C) 2008 by Spencer Oliver * - * spen@spen-soft.co.uk * - * * - * 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 "time_support.h" - -#include <cyg/kernel/kapi.h> - -int64_t timeval_ms() -{ - /* Faster/less noisy implementation of getting ms when - * profiling - */ - static const int ms_per_tick = - (CYGNUM_HAL_RTC_NUMERATOR / CYGNUM_HAL_RTC_DENOMINATOR) / 1000000; - cyg_tick_count_t cur_time = cyg_current_time(); - return ((int)cur_time) * ms_per_tick; -} |