diff options
author | unknown <monty@mashka.mysql.fi> | 2003-03-07 01:00:58 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-03-07 01:00:58 +0200 |
commit | 7ae420a4a17fab1b45ee56dc5cac2f8d9063baa5 (patch) | |
tree | 2c6510164c1daabd81513593ccdf9fcf413109d0 /mysys | |
parent | b308fe3b595e1961f7ecd29cfc3b0cc60ea4b5d8 (diff) | |
download | mariadb-git-7ae420a4a17fab1b45ee56dc5cac2f8d9063baa5.tar.gz |
Portability fix for IBM compiler on AIX
configure.in:
Remove duplicated configure line
sql-bench/crash-me.sh:
Fix for connect test
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_tempnam.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mysys/my_tempnam.c b/mysys/my_tempnam.c index a652fae3574..d079b9f66a5 100644 --- a/mysys/my_tempnam.c +++ b/mysys/my_tempnam.c @@ -115,13 +115,19 @@ my_string my_tempnam(const char *dir, const char *pfx, old_env=(char**)environ; if (dir) { /* Don't use TMPDIR if dir is given */ - ((char**) environ)=(char**) temp_env; + /* + The following strange cast is required because the IBM compiler on AIX + doesn't allow us to cast the value of environ. + The cast of environ is needed as some systems doesn't allow us to + update environ with a char ** pointer. (const mismatch) + */ + (*(char***) &environ)=(char**) temp_env; temp_env[0]=0; } #endif res=tempnam((char*) dir,(my_string) pfx); /* Use stand. dir with prefix */ #if !defined(OS2) && !defined(__NETWARE__) - ((char**) environ)=(char**) old_env; + (*(char***) &environ)=(char**) old_env; #endif if (!res) DBUG_PRINT("error",("Got error: %d from tempnam",errno)); |