1f809d9d9Sdrahn #include <openssl/opensslfeatures.h> 2f809d9d9Sdrahn /* crypto/opensslconf.h.in */ 3f809d9d9Sdrahn 4*e0aac349Stb #if defined(HEADER_CRYPTO_LOCAL_H) && !defined(OPENSSLDIR) 5f809d9d9Sdrahn #define OPENSSLDIR "/etc/ssl" 6f809d9d9Sdrahn #endif 7f809d9d9Sdrahn 8f809d9d9Sdrahn #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 9f809d9d9Sdrahn 10f809d9d9Sdrahn #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 11f809d9d9Sdrahn #define IDEA_INT unsigned int 12f809d9d9Sdrahn #endif 13f809d9d9Sdrahn 14f809d9d9Sdrahn #if defined(HEADER_MD2_H) && !defined(MD2_INT) 15f809d9d9Sdrahn #define MD2_INT unsigned int 16f809d9d9Sdrahn #endif 17f809d9d9Sdrahn 18f809d9d9Sdrahn #if defined(HEADER_RC2_H) && !defined(RC2_INT) 19f809d9d9Sdrahn /* I need to put in a mod for the alpha - eay */ 20f809d9d9Sdrahn #define RC2_INT unsigned int 21f809d9d9Sdrahn #endif 22f809d9d9Sdrahn 23f809d9d9Sdrahn #if defined(HEADER_RC4_H) 24f809d9d9Sdrahn #if !defined(RC4_INT) 25f809d9d9Sdrahn /* using int types make the structure larger but make the code faster 26f809d9d9Sdrahn * on most boxes I have tested - up to %20 faster. */ 27f809d9d9Sdrahn /* 28f809d9d9Sdrahn * I don't know what does "most" mean, but declaring "int" is a must on: 29f809d9d9Sdrahn * - Intel P6 because partial register stalls are very expensive; 30f809d9d9Sdrahn * - elder Alpha because it lacks byte load/store instructions; 31f809d9d9Sdrahn */ 32f809d9d9Sdrahn #define RC4_INT unsigned int 33f809d9d9Sdrahn #endif 34f809d9d9Sdrahn #if !defined(RC4_CHUNK) 35f809d9d9Sdrahn /* 36f809d9d9Sdrahn * This enables code handling data aligned at natural CPU word 37f809d9d9Sdrahn * boundary. See crypto/rc4/rc4_enc.c for further details. 38f809d9d9Sdrahn */ 39f809d9d9Sdrahn #define RC4_CHUNK unsigned long 40f809d9d9Sdrahn #endif 41f809d9d9Sdrahn #endif 42f809d9d9Sdrahn 43f809d9d9Sdrahn #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 44f809d9d9Sdrahn /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 45f809d9d9Sdrahn * %20 speed up (longs are 8 bytes, int's are 4). */ 46f809d9d9Sdrahn #ifndef DES_LONG 47f809d9d9Sdrahn #define DES_LONG unsigned int 48f809d9d9Sdrahn #endif 49f809d9d9Sdrahn #endif 50f809d9d9Sdrahn 51f809d9d9Sdrahn #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 52f809d9d9Sdrahn #define CONFIG_HEADER_BN_H 53f809d9d9Sdrahn #undef BN_LLONG 54f809d9d9Sdrahn 55f809d9d9Sdrahn /* Should we define BN_DIV2W here? */ 56f809d9d9Sdrahn 57f809d9d9Sdrahn /* Only one for the following should be defined */ 58f809d9d9Sdrahn #define SIXTY_FOUR_BIT_LONG 59f809d9d9Sdrahn #undef SIXTY_FOUR_BIT 60f809d9d9Sdrahn #undef THIRTY_TWO_BIT 61f809d9d9Sdrahn #endif 62f809d9d9Sdrahn 63f809d9d9Sdrahn #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 64f809d9d9Sdrahn #define CONFIG_HEADER_BF_LOCL_H 65f809d9d9Sdrahn #undef BF_PTR 66f809d9d9Sdrahn #endif /* HEADER_BF_LOCL_H */ 67f809d9d9Sdrahn 68f809d9d9Sdrahn #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 69f809d9d9Sdrahn #define CONFIG_HEADER_DES_LOCL_H 70f809d9d9Sdrahn #ifndef DES_DEFAULT_OPTIONS 71f809d9d9Sdrahn /* the following is tweaked from a config script, that is why it is a 72f809d9d9Sdrahn * protected undef/define */ 73f809d9d9Sdrahn #ifndef DES_PTR 74f809d9d9Sdrahn #undef DES_PTR 75f809d9d9Sdrahn #endif 76f809d9d9Sdrahn 77f809d9d9Sdrahn /* This helps C compiler generate the correct code for multiple functional 7871743258Sjmc * units. It reduces register dependencies at the expense of 2 more 79f809d9d9Sdrahn * registers */ 80f809d9d9Sdrahn #ifndef DES_RISC1 81f809d9d9Sdrahn #undef DES_RISC1 82f809d9d9Sdrahn #endif 83f809d9d9Sdrahn 84f809d9d9Sdrahn #ifndef DES_RISC2 85f809d9d9Sdrahn #undef DES_RISC2 86f809d9d9Sdrahn #endif 87f809d9d9Sdrahn 88f809d9d9Sdrahn #if defined(DES_RISC1) && defined(DES_RISC2) 89f809d9d9Sdrahn YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 90f809d9d9Sdrahn #endif 91f809d9d9Sdrahn 92f809d9d9Sdrahn /* Unroll the inner loop, this sometimes helps, sometimes hinders. 9371743258Sjmc * Very much CPU dependent */ 94f809d9d9Sdrahn #ifndef DES_UNROLL 95f809d9d9Sdrahn #define DES_UNROLL 96f809d9d9Sdrahn #endif 97f809d9d9Sdrahn 98f809d9d9Sdrahn /* These default values were supplied by 99f809d9d9Sdrahn * Peter Gutman <pgut001@cs.auckland.ac.nz> 100f809d9d9Sdrahn * They are only used if nothing else has been defined */ 101f809d9d9Sdrahn #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 102f809d9d9Sdrahn /* Special defines which change the way the code is built depending on the 103f809d9d9Sdrahn CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 104f809d9d9Sdrahn even newer MIPS CPU's, but at the moment one size fits all for 105f809d9d9Sdrahn optimization options. Older Sparc's work better with only UNROLL, but 106f809d9d9Sdrahn there's no way to tell at compile time what it is you're running on */ 107f809d9d9Sdrahn 108f809d9d9Sdrahn #if defined( sun ) /* Newer Sparc's */ 109f809d9d9Sdrahn # define DES_PTR 110f809d9d9Sdrahn # define DES_RISC1 111f809d9d9Sdrahn # define DES_UNROLL 112f809d9d9Sdrahn #elif defined( __ultrix ) /* Older MIPS */ 113f809d9d9Sdrahn # define DES_PTR 114f809d9d9Sdrahn # define DES_RISC2 115f809d9d9Sdrahn # define DES_UNROLL 116f809d9d9Sdrahn #elif defined( __osf1__ ) /* Alpha */ 117f809d9d9Sdrahn # define DES_PTR 118f809d9d9Sdrahn # define DES_RISC2 119f809d9d9Sdrahn #elif defined ( _AIX ) /* RS6000 */ 120f809d9d9Sdrahn /* Unknown */ 121f809d9d9Sdrahn #elif defined( __hpux ) /* HP-PA */ 122f809d9d9Sdrahn /* Unknown */ 123f809d9d9Sdrahn #elif defined( __aux ) /* 68K */ 124f809d9d9Sdrahn /* Unknown */ 125f809d9d9Sdrahn #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 126f809d9d9Sdrahn # define DES_UNROLL 127f809d9d9Sdrahn #elif defined( __sgi ) /* Newer MIPS */ 128f809d9d9Sdrahn # define DES_PTR 129f809d9d9Sdrahn # define DES_RISC2 130f809d9d9Sdrahn # define DES_UNROLL 131f809d9d9Sdrahn #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 132f809d9d9Sdrahn # define DES_PTR 133f809d9d9Sdrahn # define DES_RISC1 134f809d9d9Sdrahn # define DES_UNROLL 135f809d9d9Sdrahn #endif /* Systems-specific speed defines */ 136f809d9d9Sdrahn #endif 137f809d9d9Sdrahn 138f809d9d9Sdrahn #endif /* DES_DEFAULT_OPTIONS */ 139f809d9d9Sdrahn #endif /* HEADER_DES_LOCL_H */ 140