Have all tests use EXIT() to exit rather than exit(), since the latter doesn't
[openssl.git] / crypto / rc4 / rc4test.c
index 1410b72951b3dc922dc90a50471d177407e9daa2..b9d8f209753667b59e483bd90dad2f46eb9c4e49 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include "../e_os.h"
+
+#ifdef OPENSSL_NO_RC4
+int main(int argc, char *argv[])
+{
+    printf("No RC4 support\n");
+    return(0);
+}
+#else
 #include <openssl/rc4.h>
 
-unsigned char keys[7][30]={
+static unsigned char keys[7][30]={
        {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef},
        {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef},
        {8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
@@ -70,8 +80,8 @@ unsigned char keys[7][30]={
        {4,0xef,0x01,0x23,0x45},
        };
 
-unsigned char data_len[7]={8,8,8,20,28,10};
-unsigned char data[7][30]={
+static unsigned char data_len[7]={8,8,8,20,28,10};
+static unsigned char data[7][30]={
        {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xff},
        {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff},
        {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff},
@@ -86,7 +96,7 @@ unsigned char data[7][30]={
        {0},
        };
 
-unsigned char output[7][30]={
+static unsigned char output[7][30]={
        {0x75,0xb7,0x87,0x80,0x99,0xe0,0xc5,0x96,0x00},
        {0x74,0x94,0xc2,0xe7,0x10,0x4b,0x08,0x79,0x00},
        {0xde,0x18,0x89,0x41,0xa3,0x37,0x5d,0x3a,0x00},
@@ -187,7 +197,7 @@ int main(int argc, char *argv[])
                        }
                }
        printf("done\n");
-       exit(err);
+       EXIT(err);
        return(0);
        }
-
+#endif