summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-06-02 00:09:14 +0300
committermonty@mysql.com <>2004-06-02 00:09:14 +0300
commit70c2256d2f186640d328ea3655936db74184a0b1 (patch)
tree7c47751643d7b2719fbee614235acaf2653f1d2a /client
parent53d05f4adbf21f70fde5d552321033792479c6f1 (diff)
parent3b313f14f2986cc6069ab55ad9123afe73ba821e (diff)
downloadmariadb-git-70c2256d2f186640d328ea3655936db74184a0b1.tar.gz
Merge with 4.0 to get fixes for netware
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index be2270850fa..830846eda84 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -187,7 +187,7 @@ typedef struct
*/
static char *subst_env_var(const char *cmd);
-static int my_popen(const char *cmd, const char *mode);
+static FILE *my_popen(const char *cmd, const char *mode);
#define popen(A,B) my_popen((A),(B))
#endif /* __NETWARE__ */
@@ -3710,6 +3710,7 @@ static void get_replace_column(struct st_query *q)
static char *subst_env_var(const char *str)
{
char *result;
+ char *pos;
result= pos= my_malloc(MAX_QUERY, MYF(MY_FAE));
while (*str)
@@ -3729,7 +3730,7 @@ static char *subst_env_var(const char *str)
*str && !isspace(*str) && *str != '\\' && *str != '/' &&
*str != '$';
str++)
- *env_pos++ *str;
+ *env_pos++= *str;
*env_pos= 0;
if (!(subst= getenv(env_var)))
@@ -3772,11 +3773,11 @@ static char *subst_env_var(const char *str)
#undef popen /* Remove wrapper */
-int my_popen(const char *cmd, const char *mode __attribute__((unused)) t)
+FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
{
char *subst_cmd;
- int res_file;
-
+ FILE *res_file;
+
subst_cmd= subst_env_var(cmd);
res_file= popen(subst_cmd, "r0");
my_free(subst_cmd, MYF(0));