Use build.info, not ifdef for crypto modules
[openssl.git] / crypto / rand / randfile.c
index 45d20e5c03d715c011d0e8fe902057705b765daa..7dde54b18726ca1f2a5319924f1f33532703856a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
@@ -110,7 +110,7 @@ int RAND_load_file(const char *file, long bytes)
 
     if (bytes < 0) {
         if (S_ISREG(sb.st_mode))
-            bytes = (sb.st_size <= LONG_MAX) ? sb.st_size : LONG_MAX;
+            bytes = sb.st_size;
         else
             bytes = RAND_DRBG_STRENGTH;
     }
@@ -254,7 +254,7 @@ const char *RAND_file_name(char *buf, size_t size)
     size_t len;
     int use_randfile = 1;
 
-#if defined(_WIN32) && defined(CP_UTF8)
+#if defined(_WIN32) && defined(CP_UTF8) && !defined(_WIN32_WCE)
     DWORD envlen;
     WCHAR *var;