--- include/openssl/opensslconf.h.orig	2008-04-17 21:20:44.000000000 +1000
+++ include/openssl/opensslconf.h	2008-04-17 21:37:33.000000000 +1000
@@ -134,13 +134,21 @@
 /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
  * %20 speed up (longs are 8 bytes, int's are 4). */
 #ifndef DES_LONG
+#if defined(__x86_64__)
 #define DES_LONG unsigned int
+#else
+#define DES_LONG unsigned long
+#endif
 #endif
 #endif
 
 #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
 #define CONFIG_HEADER_BN_H
+#if defined(__ppc64__) || defined(__x86_64__)
 #undef BN_LLONG
+#else
+#define BN_LLONG
+#endif
 
 /* Should we define BN_DIV2W here? */
 
@@ -148,9 +156,17 @@
 /* The prime number generation stuff may not work when
  * EIGHT_BIT but I don't care since I've only used this mode
  * for debuging the bignum libraries */
+#if defined(__ppc64__) || defined(__x86_64__)
 #define SIXTY_FOUR_BIT_LONG
+#else
+#undef SIXTY_FOUR_BIT_LONG
+#endif
 #undef SIXTY_FOUR_BIT
+#if defined(__ppc64__) || defined(__x86_64__)
 #undef THIRTY_TWO_BIT
+#else
+#define THIRTY_TWO_BIT
+#endif
 #undef SIXTEEN_BIT
 #undef EIGHT_BIT
 #endif
@@ -164,7 +180,11 @@
 
 #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
 #define CONFIG_HEADER_BF_LOCL_H
+#if defined(__x86_64__)
 #define BF_PTR2
+#else
+#define BF_PTR
+#endif
 #endif /* HEADER_BF_LOCL_H */
 
 #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)

