--- libdb/bt_open~.c	Fri Apr 21 12:35:16 2006
+++ libdb/bt_open.c	Sun Apr 30 12:15:00 2006
@@ -410,6 +410,8 @@
 	char path[1024];
 
 	envtmp = getenv("TMPDIR");
+	if (envtmp == NULL)
+		envtmp = getenv("TMP");
 	if (envtmp && strlen(envtmp) + strlen("/bt.XXXXXX") >= sizeof(path))
 		return -1;
 	(void)snprintf(path, sizeof(path),
--- libutil/xargs~.c	Fri Apr 21 12:35:16 2006
+++ libutil/xargs.c	Fri May 05 11:05:26 2006
@@ -40,6 +40,9 @@
 #if !defined(ARG_MAX) && defined(_SC_ARG_MAX)
 #define ARG_MAX         sysconf(_SC_ARG_MAX)
 #endif
+#if !defined(ARG_MAX) && defined(_WIN32)
+#define ARG_MAX         8192
+#endif
 
 static int exec_line_limit(int);
 static char *repeat_find_read(void);
