12d03d1cbStedu #include <openssl/opensslfeatures.h> 2252ab50eSmiod /* crypto/opensslconf.h.in */ 3252ab50eSmiod 4*e0aac349Stb #if defined(HEADER_CRYPTO_LOCAL_H) && !defined(OPENSSLDIR) 5252ab50eSmiod #define OPENSSLDIR "/etc/ssl" 6252ab50eSmiod #endif 7252ab50eSmiod 8252ab50eSmiod #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 9252ab50eSmiod 10252ab50eSmiod #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 11252ab50eSmiod #define IDEA_INT unsigned int 12252ab50eSmiod #endif 13252ab50eSmiod 14252ab50eSmiod #if defined(HEADER_MD2_H) && !defined(MD2_INT) 15252ab50eSmiod #define MD2_INT unsigned int 16252ab50eSmiod #endif 17252ab50eSmiod 18252ab50eSmiod #if defined(HEADER_RC2_H) && !defined(RC2_INT) 19252ab50eSmiod /* I need to put in a mod for the alpha - eay */ 20252ab50eSmiod #define RC2_INT unsigned int 21252ab50eSmiod #endif 22252ab50eSmiod 23252ab50eSmiod #if defined(HEADER_RC4_H) 24252ab50eSmiod #if !defined(RC4_INT) 25252ab50eSmiod /* using int types make the structure larger but make the code faster 26252ab50eSmiod * on most boxes I have tested - up to %20 faster. */ 27252ab50eSmiod /* 28252ab50eSmiod * I don't know what does "most" mean, but declaring "int" is a must on: 29252ab50eSmiod * - Intel P6 because partial register stalls are very expensive; 30252ab50eSmiod * - elder Alpha because it lacks byte load/store instructions; 31252ab50eSmiod */ 32252ab50eSmiod #define RC4_INT unsigned int 33252ab50eSmiod #endif 34252ab50eSmiod #if !defined(RC4_CHUNK) 35252ab50eSmiod /* 36252ab50eSmiod * This enables code handling data aligned at natural CPU word 37252ab50eSmiod * boundary. See crypto/rc4/rc4_enc.c for further details. 38252ab50eSmiod */ 39252ab50eSmiod #define RC4_CHUNK unsigned long 40252ab50eSmiod #endif 41252ab50eSmiod #endif 42252ab50eSmiod 43252ab50eSmiod #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 44252ab50eSmiod /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 45252ab50eSmiod * %20 speed up (longs are 8 bytes, int's are 4). */ 46252ab50eSmiod #ifndef DES_LONG 47252ab50eSmiod #define DES_LONG unsigned int 48252ab50eSmiod #endif 49252ab50eSmiod #endif 50252ab50eSmiod 51252ab50eSmiod #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 52252ab50eSmiod #define CONFIG_HEADER_BN_H 53252ab50eSmiod #undef BN_LLONG 54252ab50eSmiod 55252ab50eSmiod /* Should we define BN_DIV2W here? */ 56252ab50eSmiod 57252ab50eSmiod /* Only one for the following should be defined */ 58252ab50eSmiod #define SIXTY_FOUR_BIT_LONG 59252ab50eSmiod #undef SIXTY_FOUR_BIT 60252ab50eSmiod #undef THIRTY_TWO_BIT 61252ab50eSmiod #endif 62252ab50eSmiod 63252ab50eSmiod #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 64252ab50eSmiod #define CONFIG_HEADER_BF_LOCL_H 65252ab50eSmiod #undef BF_PTR 66252ab50eSmiod #endif /* HEADER_BF_LOCL_H */ 67252ab50eSmiod 68252ab50eSmiod #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 69252ab50eSmiod #define CONFIG_HEADER_DES_LOCL_H 70252ab50eSmiod #ifndef DES_DEFAULT_OPTIONS 71252ab50eSmiod /* the following is tweaked from a config script, that is why it is a 72252ab50eSmiod * protected undef/define */ 73252ab50eSmiod #ifndef DES_PTR 74252ab50eSmiod #undef DES_PTR 75252ab50eSmiod #endif 76252ab50eSmiod 77252ab50eSmiod /* This helps C compiler generate the correct code for multiple functional 7871743258Sjmc * units. It reduces register dependencies at the expense of 2 more 79252ab50eSmiod * registers */ 80252ab50eSmiod #ifndef DES_RISC1 81252ab50eSmiod #undef DES_RISC1 82252ab50eSmiod #endif 83252ab50eSmiod 84252ab50eSmiod #ifndef DES_RISC2 85252ab50eSmiod #undef DES_RISC2 86252ab50eSmiod #endif 87252ab50eSmiod 88252ab50eSmiod #if defined(DES_RISC1) && defined(DES_RISC2) 89252ab50eSmiod YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 90252ab50eSmiod #endif 91252ab50eSmiod 92252ab50eSmiod /* Unroll the inner loop, this sometimes helps, sometimes hinders. 9371743258Sjmc * Very much CPU dependent */ 94252ab50eSmiod #ifndef DES_UNROLL 95252ab50eSmiod #define DES_UNROLL 96252ab50eSmiod #endif 97252ab50eSmiod 98252ab50eSmiod /* These default values were supplied by 99252ab50eSmiod * Peter Gutman <pgut001@cs.auckland.ac.nz> 100252ab50eSmiod * They are only used if nothing else has been defined */ 101252ab50eSmiod #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 102252ab50eSmiod /* Special defines which change the way the code is built depending on the 103252ab50eSmiod CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 104252ab50eSmiod even newer MIPS CPU's, but at the moment one size fits all for 105252ab50eSmiod optimization options. Older Sparc's work better with only UNROLL, but 106252ab50eSmiod there's no way to tell at compile time what it is you're running on */ 107252ab50eSmiod 108252ab50eSmiod #if defined( sun ) /* Newer Sparc's */ 109252ab50eSmiod # define DES_PTR 110252ab50eSmiod # define DES_RISC1 111252ab50eSmiod # define DES_UNROLL 112252ab50eSmiod #elif defined( __ultrix ) /* Older MIPS */ 113252ab50eSmiod # define DES_PTR 114252ab50eSmiod # define DES_RISC2 115252ab50eSmiod # define DES_UNROLL 116252ab50eSmiod #elif defined( __osf1__ ) /* Alpha */ 117252ab50eSmiod # define DES_PTR 118252ab50eSmiod # define DES_RISC2 119252ab50eSmiod #elif defined ( _AIX ) /* RS6000 */ 120252ab50eSmiod /* Unknown */ 121252ab50eSmiod #elif defined( __hpux ) /* HP-PA */ 122252ab50eSmiod /* Unknown */ 123252ab50eSmiod #elif defined( __aux ) /* 68K */ 124252ab50eSmiod /* Unknown */ 125252ab50eSmiod #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 126252ab50eSmiod # define DES_UNROLL 127252ab50eSmiod #elif defined( __sgi ) /* Newer MIPS */ 128252ab50eSmiod # define DES_PTR 129252ab50eSmiod # define DES_RISC2 130252ab50eSmiod # define DES_UNROLL 131252ab50eSmiod #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 132252ab50eSmiod # define DES_PTR 133252ab50eSmiod # define DES_RISC1 134252ab50eSmiod # define DES_UNROLL 135252ab50eSmiod #endif /* Systems-specific speed defines */ 136252ab50eSmiod #endif 137252ab50eSmiod 138252ab50eSmiod #endif /* DES_DEFAULT_OPTIONS */ 139252ab50eSmiod #endif /* HEADER_DES_LOCL_H */ 140