diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-03-11 21:32:03 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-03-11 21:32:03 +0000 |
commit | 0313c595555ae1c391766d1594735042ccd20443 (patch) | |
tree | c540c8c4ab3fdd31417f34197206bbb0787b92de /src/helper | |
parent | b9162dcc8e68413966c8493556e471fbdcb88a1f (diff) | |
download | openocd+libswd-0313c595555ae1c391766d1594735042ccd20443.tar.gz openocd+libswd-0313c595555ae1c391766d1594735042ccd20443.tar.bz2 openocd+libswd-0313c595555ae1c391766d1594735042ccd20443.tar.xz openocd+libswd-0313c595555ae1c391766d1594735042ccd20443.zip |
reduce compare noise. If someone should be crazy enough to try to run OpenOCD under eCos, then they'v got some hooks to point them in the general direction.
git-svn-id: svn://svn.berlios.de/openocd/trunk@499 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/Makefile.am | 9 | ||||
-rw-r--r-- | src/helper/replacements.h | 14 |
2 files changed, 20 insertions, 3 deletions
diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am index 91fe01b6..e518bc7f 100644 --- a/src/helper/Makefile.am +++ b/src/helper/Makefile.am @@ -2,7 +2,14 @@ INCLUDES = $(all_includes) METASOURCES = AUTO AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" -DPKGLIBDIR=\"$(pkglibdir)\" @CPPFLAGS@ noinst_LIBRARIES = libhelper.a -libhelper_a_SOURCES = binarybuffer.c configuration.c options.c log.c interpreter.c command.c time_support.c \ + +if ECOSBOARD +CONFIGFILES = +else +CONFIGFILES = options.c +endif + +libhelper_a_SOURCES = binarybuffer.c $(CONFIGFILES) configuration.c log.c interpreter.c command.c time_support.c \ replacements.c fileio.c noinst_HEADERS = binarybuffer.h configuration.h types.h log.h command.h \ interpreter.h time_support.h replacements.h fileio.h diff --git a/src/helper/replacements.h b/src/helper/replacements.h index fcfa8bc8..79a7a1bd 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -26,6 +26,12 @@ #include "types.h" +#if BUILD_ECOSBOARD +#include <pkgconf/system.h> +#include <stdlib.h> +#include <sys/select.h> +#endif + /* include necessary headers for socket functionality */ #ifdef _WIN32 #include <winsock2.h> @@ -112,15 +118,19 @@ extern size_t strnlen(const char *s, size_t maxlen); #endif /* HAVE_STRNLEN */ #ifndef HAVE_USLEEP +#ifdef _WIN32 static __inline unsigned usleep(unsigned int usecs) { -#ifdef _WIN32 Sleep((usecs/1000)); 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 */ |