rand_deprecated.c 827 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #include "internal/e_os.h"
  10. #include <openssl/macros.h>
  11. #include <openssl/rand.h>
  12. #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
  13. # include <windows.h>
  14. # if OPENSSL_API_COMPAT < 0x10100000L
  15. # define DEPRECATED_RAND_FUNCTIONS_DEFINED
  16. int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
  17. {
  18. RAND_poll();
  19. return RAND_status();
  20. }
  21. void RAND_screen(void)
  22. {
  23. RAND_poll();
  24. }
  25. # endif
  26. #endif
  27. #ifndef DEPRECATED_RAND_FUNCTIONS_DEFINED
  28. NON_EMPTY_TRANSLATION_UNIT
  29. #endif