Imported from ../bash-2.05a.tar.gz.
diff --git a/bashansi.h b/bashansi.h
index 4e9f907..e7f1158 100644
--- a/bashansi.h
+++ b/bashansi.h
@@ -22,11 +22,16 @@
 #define _BASHANSI_H_
 
 #if defined (HAVE_STRING_H)
+#  if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
+#    include <memory.h>
+#  endif
 #  include <string.h>
-#else
-#  include <strings.h>
 #endif /* !HAVE_STRING_H */
 
+#if defined (HAVE_STRINGS_H)
+#  include <strings.h>
+#endif /* !HAVE_STRINGS_H */
+
 #if defined (HAVE_STDLIB_H)
 #  include <stdlib.h>
 #else