unsigned int vs. int.
[openssl.git] / ssl / ssltest.c
index 0960c1acbcbddbb6ea000b74baa694fa41ac15c1..0592e6c2a8e467699161279fabff7c6f032d77f6 100644 (file)
  *
  */
 
+#define _XOPEN_SOURCE 600      /* Or gethostname won't be declared properly
+                                  on Linux and GNU platforms. */
+#define _XOPEN_SOURCE_EXTENDED /* Or gethostname won't be declared properly
+                                  on Compaq platforms (at least with DEC C).
+                               */
+
 #include <assert.h>
 #include <errno.h>
 #include <limits.h>
 #ifdef OPENSSL_SYS_WINDOWS
 #include <winsock.h>
 #include "../crypto/bio/bss_file.c"
+#else
+#include OPENSSL_UNISTD
 #endif
 
 #ifdef OPENSSL_SYS_VMS
@@ -358,7 +366,12 @@ int main(int argc, char *argv[])
        if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))))
                {
                CRYPTO_malloc_debug_init();
-               CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
+               CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
+               }
+       else
+               {
+               /* OPENSSL_DEBUG_MEMORY=off */
+               CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);
                }
        CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
 
@@ -706,6 +719,7 @@ end:
        free_tmp_rsa();
 #endif
        ENGINE_cleanup();
+       CRYPTO_cleanup_all_ex_data();
        ERR_free_strings();
        ERR_remove_state(0);
        EVP_cleanup();