diff options
author | unknown <serg@serg.mysql.com> | 2002-10-12 17:43:40 +0000 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2002-10-12 17:43:40 +0000 |
commit | 2b70d7e56763e4b79feaf7f948ca2844a084861e (patch) | |
tree | 2ecc295bcc8ac0481ec9ac3228de8077442b23c6 /mysys/mf_tempdir.c | |
parent | c05fc7c9bd103cfc80e97e6e664e02b0ff422e6d (diff) | |
download | mariadb-git-2b70d7e56763e4b79feaf7f948ca2844a084861e.tar.gz |
--tmpdir=dir1:dir2... uses (is_windows ? ";" : ":") as a delimiter
Diffstat (limited to 'mysys/mf_tempdir.c')
-rw-r--r-- | mysys/mf_tempdir.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mysys/mf_tempdir.c b/mysys/mf_tempdir.c index 13b170ceee7..1ae034af67d 100644 --- a/mysys/mf_tempdir.c +++ b/mysys/mf_tempdir.c @@ -17,7 +17,12 @@ #include "mysys_priv.h" #include <m_string.h> +#if defined( __WIN__) || defined(OS2) +#define DELIM ';' +#else #define DELIM ':' +#endif + my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist) { char *end, *copy; @@ -45,13 +50,13 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist) convert_dirname(buff, pathlist, end); if (!(copy=my_strdup(buff, MYF(MY_WME)))) return TRUE; - if (insert_dynamic(&t_arr, ©)) + if (insert_dynamic(&t_arr, (gptr)©)) return TRUE; pathlist=end+1; } while (*end); freeze_size(&t_arr); - tmpdir->list=t_arr.buffer; + tmpdir->list=(char **)t_arr.buffer; tmpdir->max=t_arr.elements-1; tmpdir->cur=0; return FALSE; @@ -72,7 +77,7 @@ void free_tmpdir(MY_TMPDIR *tmpdir) uint i; for (i=0; i<=tmpdir->max; i++) my_free(tmpdir->list[i], MYF(0)); - my_free(tmpdir->list, MYF(0)); + my_free((gptr)tmpdir->list, MYF(0)); pthread_mutex_destroy(&tmpdir->mutex); } |