Avoid race condition.
[oweals/openssl.git] / crypto / rand / rand.h
index d4d8fbe9102a56fc522330499b7f9b95bfebad0f..918f865d90fadd1cdd8bb24a77367e7c29515d91 100644 (file)
 #ifndef HEADER_RAND_H
 #define HEADER_RAND_H
 
-#include <openssl/e_os2.h>
-
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
-#include <windows.h>
-#else
-#include <sys/types.h>
-#endif
+#include <stdlib.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -85,9 +79,7 @@ typedef struct rand_meth_st
 extern int rand_predictable;
 #endif
 
-struct engine_st;
-
-int RAND_set_rand_method(struct engine_st *meth);
+void RAND_set_rand_method(RAND_METHOD *meth);
 RAND_METHOD *RAND_get_rand_method(void );
 RAND_METHOD *RAND_SSLeay(void);
 void RAND_cleanup(void );
@@ -99,22 +91,29 @@ int  RAND_load_file(const char *file,long max_bytes);
 int  RAND_write_file(const char *file);
 const char *RAND_file_name(char *file,size_t num);
 int RAND_status(void);
-int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes);
 int RAND_egd(const char *path);
 int RAND_egd_bytes(const char *path,int bytes);
 void ERR_load_RAND_strings(void);
 int RAND_poll(void);
 
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
+#ifdef  __cplusplus
+}
+#endif
 
-void RAND_screen(void);
-int RAND_event(UINT, WPARAM, LPARAM);
+#if defined(WINDOWS) || defined(WIN32)
+#include <windows.h>
 
+#ifdef  __cplusplus
+extern "C" {
 #endif
 
+void RAND_screen(void);
+int RAND_event(UINT, WPARAM, LPARAM);
+
 #ifdef  __cplusplus
 }
 #endif
+#endif
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes