mariadb/client/echo.c
unknown a843a05f92 Workaround for problem where cygwin's bash/sh randomly fails with error 128 which
mainly occurs on win2003 64bit.
 - Execute "exec" commands directly with cmd.exe and replace "--exec echo ..." with "--exec .\echo.exe ..." 


client/mysqltest.c:
  Workaround the problem with "echo" in windows not behaving like "echo" in Unix.
  - Replace "--exec echo ..." with "--exec <path to mysqltest>\echo.exe" thus forcing
    use of our own echo implementation which baheves like on Unix.
  - The above change makes it possible to remove the need to execute all --exec's
    inside cygwin. Add ifdefs to only use use cygwin's bash conditionally
mysql-test/lib/mtr_misc.pl:
  Add function for converting to the OS's native format
mysql-test/mysql-test-run.pl:
  Convert path to executables to "windows native" (c:\<path>\) instead of "mixed"(c:/<path>) mode
  necessary for pipes and redirects to work properly in cmd.exe
client/echo.c:
  New BitKeeper file ``client/echo.c''
2007-02-16 15:19:38 +01:00

45 lines
1.4 KiB
C

/* Copyright (C) 2000 MySQL AB
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 */
/*
echo is a replacement for the "echo" command builtin to cmd.exe
on Windows, to get a Unix eqvivalent behaviour when running commands
like:
$> echo "hello" | mysql
The windows "echo" would have sent "hello" to mysql while
Unix echo will send hello without the enclosing hyphens
This is a very advanced high tech program so take care when
you change it and remember to valgrind it before production
use.
*/
#include <stdio.h>
int main(int argc, char **argv)
{
int i;
for (i= 1; i < argc; i++)
{
fprintf(stdout, "%s", argv[i]);
if (i < argc - 1)
fprintf(stdout, " ");
}
fprintf(stdout, "\n");
return 0;
}