diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-04-25 20:44:27 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-05-01 13:37:21 +0100 |
commit | 4622a95fcc470d0c1a086ba046abe1f63b139750 (patch) | |
tree | 5b9252a0fb63d90ea71cd5448f5a0a7f28c1e36a /src/helper/command.c | |
parent | 89c6b93ba278e26113aadcc3b7d357e05264beba (diff) | |
download | riscv-openocd-4622a95fcc470d0c1a086ba046abe1f63b139750.zip riscv-openocd-4622a95fcc470d0c1a086ba046abe1f63b139750.tar.gz riscv-openocd-4622a95fcc470d0c1a086ba046abe1f63b139750.tar.bz2 |
helper/command: drop the TCL variable 'ocd_HOSTOS'
Commit 7a731eb63731 ("Added HostOS variable"), merged in 2009,
adds a TCL global variable 'ocd_HostOS' that reports in a string
the OS of the host.
This was proposed as a workaround for jimtcl that didn't define
the standard TCL variable 'tcl_platform(os)'.
With commit 42f3fb7b7f46 ("Determine platform_tcl() settings with
configure"), merged in 2010 and part of jimtcl 0.70 issued in
early 2011, jimtcl provides the requires TCL standard variable
'tcl_platform(os)'.
The variable 'ocd_HostOS' has never been used by any TCL script
distributed with OpenOCD.
Drop the TCL variable 'ocd_HostOS'.
Change-Id: I27858de35cc9d30df97145ca1ccd24877be4af11
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6189
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/helper/command.c')
-rw-r--r-- | src/helper/command.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 08d14b4..0c6e785 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -1277,7 +1277,6 @@ static const struct command_registration command_builtin_handlers[] = { struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp) { struct command_context *context = calloc(1, sizeof(struct command_context)); - const char *HostOs; context->mode = COMMAND_EXEC; @@ -1296,39 +1295,6 @@ struct command_context *command_init(const char *startup_tcl, Jim_Interp *interp context->interp = interp; - /* Stick to lowercase for HostOS strings. */ -#if defined(_MSC_VER) - /* WinXX - is generic, the forward - * looking problem is this: - * - * "win32" or "win64" - * - * "winxx" is generic. - */ - HostOs = "winxx"; -#elif defined(__linux__) - HostOs = "linux"; -#elif defined(__APPLE__) || defined(__DARWIN__) - HostOs = "darwin"; -#elif defined(__CYGWIN__) - HostOs = "cygwin"; -#elif defined(__MINGW32__) - HostOs = "mingw32"; -#elif defined(__ECOS) - HostOs = "ecos"; -#elif defined(__FreeBSD__) - HostOs = "freebsd"; -#elif defined(__NetBSD__) - HostOs = "netbsd"; -#elif defined(__OpenBSD__) - HostOs = "openbsd"; -#else -#warning "Unrecognized host OS..." - HostOs = "other"; -#endif - Jim_SetGlobalVariableStr(interp, "ocd_HOSTOS", - Jim_NewStringObj(interp, HostOs, strlen(HostOs))); - register_commands(context, NULL, command_builtin_handlers); Jim_SetAssocData(interp, "context", NULL, context); |