summaryrefslogtreecommitdiff
path: root/mysys/mf_tempfile.c
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2006-04-15 08:49:00 -0700
committerunknown <brian@zim.(none)>2006-04-15 08:49:00 -0700
commit06e8697d04ea7ecc28aed3ae7d68a3156546004c (patch)
tree0016808c56b0545d9e84a1650e620b6bf9dc516b /mysys/mf_tempfile.c
parent1b2312211f3938a45a79ea49ead7f3660fbb2c3e (diff)
downloadmariadb-git-06e8697d04ea7ecc28aed3ae7d68a3156546004c.tar.gz
Another long patch to remove the rest of the OS2 support.
include/config-win.h: Removing OS2 stuff include/errmsg.h: Removing OS2 stuff include/m_string.h: OS2 removal include/my_global.h: OS2 removal include/my_net.h: OS2 removal include/my_no_pthread.h: OS2 removal include/my_pthread.h: OS2 removal include/thr_alarm.h: OS2 removal mysys/default.c: OS2 removal mysys/mf_path.c: OS2 removal mysys/mf_tempdir.c: OS2 removal mysys/mf_tempfile.c: OS2 removal mysys/my_access.c: OS2 removal mysys/my_clock.c: OS2 removal mysys/my_copy.c: OS2 removal mysys/my_create.c: OS2 removal mysys/my_dup.c: OS2 removal mysys/my_file.c: OS2 removal mysys/my_getwd.c: OS2 removal mysys/my_init.c: OS2 removal mysys/my_lib.c: OS2 removal mysys/my_lock.c: OS2 removal mysys/my_mkdir.c: OS2 removal mysys/my_open.c: OS2 removal mysys/my_pthread.c: OS2 removal mysys/my_redel.c: OS2 removal mysys/my_sleep.c: OS2 removal mysys/my_static.c: OS2 removal mysys/my_thr_init.c: OS2 removal mysys/thr_alarm.c: OS2 removal storage/myisam/myisamchk.c: OS2 removal
Diffstat (limited to 'mysys/mf_tempfile.c')
-rw-r--r--mysys/mf_tempfile.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index a15bda4da6d..b079b9ec8e3 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -24,7 +24,7 @@
#endif
#ifdef HAVE_TEMPNAM
-#if !defined(MSDOS) && !defined(OS2) && !defined(__NETWARE__)
+#if !defined(MSDOS) && !defined(__NETWARE__)
extern char **environ;
#endif
#endif
@@ -121,16 +121,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
to[1]= 0;
dir=to;
}
-#ifdef OS2
- /* changing environ variable doesn't work with VACPP */
- char buffer[256], *end;
- buffer[sizeof(buffer)-1]= 0;
- end= strxnmov(buffer, sizeof(buffer)-1, (char*) "TMP=", dir, NullS);
- /* remove ending backslash */
- if (end[-1] == '\\')
- end[-1]= 0;
- putenv(buffer);
-#elif !defined(__NETWARE__)
+#if !defined(__NETWARE__)
old_env= (char**) environ;
if (dir)
{ /* Don't use TMPDIR if dir is given */
@@ -152,7 +143,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
{
DBUG_PRINT("error",("Got error: %d from tempnam",errno));
}
-#if !defined(OS2) && !defined(__NETWARE__)
+#if !defined(__NETWARE__)
environ=(const char**) old_env;
#endif
}