diff -aprNU3 ispell-3.3.01.orig/config.X ispell-3.3.01/config.X
--- ispell-3.3.01.orig/config.X	2005-05-01 23:07:58.000000000 +0000
+++ ispell-3.3.01/config.X	2005-05-14 22:48:24.000000000 +0000
@@ -569,7 +569,9 @@
 #endif /* OLDPAFF */
 
 /* where to put log files (inside home */
+#ifndef DEFLOGDIR
 #define DEFLOGDIR ".ispell_logs"
+#endif
 
 /* environment variable for include file string */
 #ifndef INCSTRVAR
diff -aprNU3 ispell-3.3.01.orig/pc/cfgmain.sed ispell-3.3.01/pc/cfgmain.sed
--- ispell-3.3.01.orig/pc/cfgmain.sed	2001-08-20 23:24:44.000000000 +0000
+++ ispell-3.3.01/pc/cfgmain.sed	2005-05-14 22:47:28.000000000 +0000
@@ -11,4 +11,13 @@
 		   || (mv -f Makefile Makefile.orig; \\\
 		       ../../pc/cfglang.sed Makefile.orig > Makefile); \\
 /^ijoin.o:/i\
-term.o: pc/djterm.c
+term.o: pc/djterm.c\
+popen.o: pc/popen.c
+
+/^ispell:/i\
+popen.o: pc/popen.c\
+	@. ./config.sh; \\\
+	  echo $$CC $$CFLAGS -c pc/popen.c 1>&2; \\\
+	  $$CC $$CFLAGS -c pc/popen.c \
+
+/^OBJS	=	/s/=	/&popen.o /
diff -aprNU3 ispell-3.3.01.orig/pc/local.djgpp ispell-3.3.01/pc/local.djgpp
--- ispell-3.3.01.orig/pc/local.djgpp	2005-05-01 23:03:24.000000000 +0000
+++ ispell-3.3.01/pc/local.djgpp	2005-05-14 22:47:28.000000000 +0000
@@ -354,3 +354,11 @@
 ** The extension of executable files.
 */
 #define EXEEXT	".exe"
+
+/*
+** Decide at run time which of the
+** versions of DEFLOGDIR will be used.
+*/
+#ifdef __DJGPP__
+#define DEFLOGDIR	((pathconf(NULL, _PC_NAME_MAX) > 12) ? ".ispell_logs" : "_ispell_logs")
+#endif
diff -aprNU3 ispell-3.3.01.orig/pc/make-dj.bat ispell-3.3.01/pc/make-dj.bat
--- ispell-3.3.01.orig/pc/make-dj.bat	2005-05-01 22:52:56.000000000 +0000
+++ ispell-3.3.01/pc/make-dj.bat	2005-05-14 22:47:28.000000000 +0000
@@ -33,9 +33,11 @@ gcc -c -O2 -g lookup.c
 gcc -c -O2 -g tgood.c
 gcc -c -O2 -g tree.c
 gcc -c -O2 -g xgets.c
+gcc -c -O2 -g pc/popen.c
+
 :build
 @echo ispell.o term.o correct.o defmt.o dump.o good.o lookup.o > link.lst
-@echo fields.o exp_table.o hash.o makedent.o tgood.o tree.o xgets.o >> link.lst
+@echo fields.o exp_table.o hash.o makedent.o tgood.o tree.o xgets.o popen.o >> link.lst
 @del link.lst
 gcc -o -g ispell @link.lst
 @Rem
