Avoid race condition.
[oweals/openssl.git] / crypto / rand / rand.h
index 5d85741452ad464bda0de9450caa91860667105d..918f865d90fadd1cdd8bb24a77367e7c29515d91 100644 (file)
@@ -79,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 );
@@ -93,17 +91,28 @@ 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
+
+#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 */
@@ -119,8 +128,5 @@ int RAND_event(UINT, WPARAM, LPARAM);
 /* Reason codes. */
 #define RAND_R_PRNG_NOT_SEEDED                          100
 
-#ifdef  __cplusplus
-}
-#endif
 #endif