Move e_os.h to be the very first include.
authorPauli <paul.dale@oracle.com>
Wed, 23 Aug 2017 23:05:07 +0000 (09:05 +1000)
committerPauli <paul.dale@oracle.com>
Tue, 29 Aug 2017 21:20:44 +0000 (07:20 +1000)
cryptilib.h is the second.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4188)

39 files changed:
apps/apps.h
apps/s_client.c
crypto/bio/bss_bio.c
crypto/blake2/blake2b.c
crypto/blake2/blake2s.c
crypto/conf/conf_api.c
crypto/conf/conf_lib.c
crypto/conf/conf_mod.c
crypto/cryptlib.c
crypto/des/cfb64ede.c
crypto/dllmain.c
crypto/engine/eng_devcrypto.c
crypto/engine/eng_init.c
crypto/engine/eng_lib.c
crypto/engine/tb_asnmth.c
crypto/init.c
crypto/mem.c
crypto/mem_sec.c
crypto/o_dir.c
crypto/o_str.c
crypto/ocsp/ocsp_ht.c
crypto/rand/rand_unix.c
crypto/store/loader_file.c
crypto/store/store_lib.c
crypto/ui/ui_openssl.c
crypto/x509/by_dir.c
crypto/x509v3/v3_ncons.c
crypto/x509v3/v3_tlsf.c
crypto/x509v3/v3_utl.c
e_os.h
ssl/d1_lib.c
ssl/s3_lib.c
ssl/ssl_cert.c
ssl/ssl_locl.h
ssl/statem/statem.c
test/bntest.c
test/ssl_test_ctx.c
test/ssltest_old.c
test/v3nametest.c

index bbc9a5ad8fc789db7607d59a244337fdd9745ec7..c208c1999de2e2d4684f3629ae9634bd352e4b0d 100644 (file)
@@ -10,8 +10,8 @@
 #ifndef HEADER_APPS_H
 # define HEADER_APPS_H
 
-# include "internal/nelem.h"
 # include "e_os.h"
+# include "internal/nelem.h"
 # if defined(__unix) || defined(__unix__)
 #  include <sys/time.h> /* struct timeval for DTLS */
 # endif
index 5f7b31c9dc4e7b3465a114bd2c3615e6ac6ee0f7..5a4a2f65e7b2516086d5201e952ef10c7586680c 100644 (file)
@@ -8,12 +8,12 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include "e_os.h"
 #include <openssl/e_os2.h>
 
 #ifndef OPENSSL_NO_SOCK
index 9fa47600c9fe504343071f1572087e2b54f79a75..e34382c5578141496b4e02d322400b59f0b0d080 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1999-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -15,6 +15,7 @@
  * See ssl/ssltest.c for some hints on how this can be used.
  */
 
+#include "e_os.h"
 #include <assert.h>
 #include <limits.h>
 #include <stdlib.h>
@@ -24,8 +25,6 @@
 #include <openssl/err.h>
 #include <openssl/crypto.h>
 
-#include "e_os.h"
-
 static int bio_new(BIO *bio);
 static int bio_free(BIO *bio);
 static int bio_read(BIO *bio, char *buf, int size);
index e77bd9ac16ffd9681af0b1e46c9d50132605fbcc..829ba5b50a5c44a3ea743018894e07071807e678 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -17,7 +17,6 @@
 #include <assert.h>
 #include <string.h>
 #include <openssl/crypto.h>
-#include "e_os.h"
 
 #include "blake2_locl.h"
 #include "blake2_impl.h"
index 7451b14f5a2690acc1d759487f3bd47dfb5dd18f..8211374d123f1275e36cc8025cfb5b9b36fbe953 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -17,7 +17,6 @@
 #include <assert.h>
 #include <string.h>
 #include <openssl/crypto.h>
-#include "e_os.h"
 
 #include "blake2_locl.h"
 #include "blake2_impl.h"
index 6026dca928214b06d9348ce841bd459cc9b3a275..6f8947df2c83ed9e125075d1472df0b3a5d0906b 100644 (file)
@@ -9,11 +9,11 @@
 
 /* Part of the code in here was originally in conf.c, which is now removed */
 
+#include "e_os.h"
 #include <stdlib.h>
 #include <string.h>
 #include <openssl/conf.h>
 #include <openssl/conf_api.h>
-#include "e_os.h"
 
 static void value_free_hash(const CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf);
 static void value_free_stack_doall(CONF_VALUE *a);
index 74759c56d5edbc0830f1e3862bf978292f400142..06bb3f7ff1a180c8f1bf47ce7070b32441827ca5 100644 (file)
@@ -7,6 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <stdio.h>
 #include <string.h>
 #include "internal/conf.h"
@@ -15,7 +16,6 @@
 #include <openssl/conf.h>
 #include <openssl/conf_api.h>
 #include <openssl/lhash.h>
-#include "e_os.h"
 
 static CONF_METHOD *default_CONF_method = NULL;
 
index da591cba6366e22a5373afa30a16592e0299dbc3..7622d8e1f3385b16ed46345a1894640f848043c6 100644 (file)
@@ -7,11 +7,10 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "internal/cryptlib.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <openssl/crypto.h>
-#include "internal/cryptlib.h"
-#include "e_os.h"
 #include "internal/conf.h"
 #include "internal/dso.h"
 #include <openssl/x509.h>
index bafcaab9668bee14818e1b766e3af5c3ad1c2925..6e45b0d8ba1fa23d45f115a53b7939d76aac9bb6 100644 (file)
@@ -8,8 +8,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "internal/cryptlib_int.h"
 #include "e_os.h"
+#include "internal/cryptlib_int.h"
 #include <openssl/safestack.h>
 
 #if     defined(__i386)   || defined(__i386__)   || defined(_M_IX86) || \
index 7017fd96ff47a5d762c759064d7c1d98a0daf8a1..21943f6143ead9c3926a1aab1b3b33131a65e34b 100644 (file)
@@ -8,7 +8,6 @@
  */
 
 #include "des_locl.h"
-#include "e_os.h"
 
 /*
  * The input and output encrypted as though 64bit cfb mode is being used.
index 376a34165a0c9f43a6d8efbdf2240f0d256107a4..b0459c2e73bd38031c480c8b3f899829620355ab 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "internal/cryptlib_int.h"
 #include "e_os.h"
+#include "internal/cryptlib_int.h"
 
 #if defined(_WIN32) || defined(__CYGWIN__)
 # ifdef __CYGWIN__
index 19781b8ab0598509e1035ffeb923b6e76d56fa4c..f2196b4e5402169885aa92408dbe7424f290d3d4 100644 (file)
@@ -7,6 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -15,8 +16,6 @@
 #include <unistd.h>
 #include <assert.h>
 
-#include "e_os.h"
-
 #include <openssl/evp.h>
 #include <openssl/err.h>
 #include <openssl/engine.h>
index 3d5eaa14e4ea07a47b78575a7767f98a256b1df0..7c235fc472a24688d91eb770c5a5a394230d40ca 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "eng_int.h"
 #include "e_os.h"
+#include "eng_int.h"
 
 /*
  * Initialise a engine type for use (or up its functional reference count if
index 51998340a9408c0e00626ada16fff376e9bbe34f..c060a5d6ac9723c9067b93d392a51fe6d022640a 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "eng_int.h"
 #include "e_os.h"
+#include "eng_int.h"
 #include <openssl/rand.h>
 #include "internal/refcount.h"
 
index ca3727e90227d42485e1a1f8a0a131f97ce17f64..bc6e91ccabbbffe8712705a339205d3617f59fd6 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "eng_int.h"
 #include "e_os.h"
+#include "eng_int.h"
 #include <openssl/evp.h>
 #include "internal/asn1_int.h"
 
index fa68a29b2c2515855d8e3fec59f3b30cc963ac7f..074e683cc01156b46c1517fcaec14ca9cf7310af 100644 (file)
@@ -7,6 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include "internal/cryptlib_int.h"
 #include <openssl/err.h>
 #include "internal/rand_int.h"
@@ -25,7 +26,6 @@
 #include "internal/thread_once.h"
 #include "internal/dso.h"
 #include "internal/store.h"
-#include "e_os.h"
 
 static int stopped = 0;
 
index 2713b833c0b5691de7a328a8f01856fd724338ec..c171ae486c20953832e77d35ec7b041c23ae1952 100644 (file)
@@ -7,13 +7,13 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
+#include "internal/cryptlib.h"
+#include "internal/cryptlib_int.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
 #include <openssl/crypto.h>
-#include "e_os.h"
-#include "internal/cryptlib.h"
-#include "internal/cryptlib_int.h"
 #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
 # include <execinfo.h>
 #endif
index 703ddad5e596b15684f439f16453d8a5c81145ad..f8470249c39648f3eaeefb89b3b34f1345282641 100644 (file)
@@ -15,8 +15,8 @@
  * For details on that implementation, see below (look for uppercase
  * "SECURE HEAP IMPLEMENTATION").
  */
-#include <openssl/crypto.h>
 #include "e_os.h"
+#include <openssl/crypto.h>
 
 #include <string.h>
 
index 459ce9c1e1cb08ac96ad357d3bbea0ffb2e96130..fca9c75e053385382055be6f6daedffbd89218f3 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <errno.h>
 #include "e_os.h"
+#include <errno.h>
 
 /*
  * The routines really come from the Levitte Programming, so to make life
index be130ce8047a40d84bba765a611f87e56a50d7ce..cf098fc90a2574b78973d268cdc4a4790f868dd9 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <limits.h>
 #include "e_os.h"
+#include <limits.h>
 #include <openssl/crypto.h>
 #include "internal/cryptlib.h"
 #include "internal/o_str.h"
index ef84a2d4c9e42e70cd08605bb437cda3c56b694e..42c3686431353401723fdcd2e7771eadc6e2039d 100644 (file)
@@ -7,11 +7,11 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include "internal/ctype.h"
 #include <string.h>
-#include "e_os.h"
 #include <openssl/asn1.h>
 #include <openssl/ocsp.h>
 #include <openssl/err.h>
index 4f01e8aad591bf8c45293b606321a0f9e6007928..08ea55fbb9dbf08a2f79c84ecb541605f156e0e0 100644 (file)
@@ -7,9 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <stdio.h>
-
 #include "e_os.h"
+#include <stdio.h>
 #include "internal/cryptlib.h"
 #include <openssl/rand.h>
 #include "rand_lcl.h"
index f6cb928ae3c306015ab76f1c0756732a9cfdabda..1c794ef82630292053887a96bb6e83d1ec06add6 100644 (file)
@@ -7,6 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <string.h>
 #include <sys/stat.h>
 #include <assert.h>
@@ -29,8 +30,6 @@
 #include "internal/store_int.h"
 #include "store_locl.h"
 
-#include "e_os.h"
-
 #ifdef _WIN32
 # define stat    _stat
 #endif
index 6f789eb79c9226d68b1f837b840ab4a26120af60..2cc247d12ed1eac10a21a11c6baea536ec34727b 100644 (file)
@@ -7,11 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <stdlib.h>
 #include <string.h>
-
-#include "e_os.h"
-
 #include <openssl/crypto.h>
 #include <openssl/err.h>
 #include <openssl/store.h>
index cff1a840abe14909981a4697fefd6449f658aa17..3b74e6b7e4671f3366ac1af220569516d0338b6d 100644 (file)
@@ -7,10 +7,10 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <openssl/e_os2.h>
 #include <openssl/err.h>
 #include <openssl/ui.h>
-#include "e_os.h"
 
 #ifndef OPENSSL_NO_UI_CONSOLE
 /*
index 335c3b3dda23fd146d66e902478f2c2ef0fbb8eb..8476f0025e0fed2b6ecf343c8a947c6dc5711b58 100644 (file)
@@ -7,14 +7,13 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
+#include "internal/cryptlib.h"
 #include <stdio.h>
 #include <time.h>
 #include <errno.h>
 #include <sys/types.h>
 
-#include "internal/cryptlib.h"
-#include "e_os.h"
-
 #ifndef OPENSSL_NO_POSIX_IO
 # include <sys/stat.h>
 #endif
index 3b9145b15e0b87643bddf561cea229d0b1e4991b..7731bacd0493329bb509472efda5305f2e6fb81c 100644 (file)
@@ -8,9 +8,8 @@
  */
 
 #include "e_os.h"               /* for strncasecmp */
-#include <stdio.h>
 #include "internal/cryptlib.h"
-#include "e_os.h"
+#include <stdio.h>
 #include "internal/asn1_int.h"
 #include <openssl/asn1t.h>
 #include <openssl/conf.h>
index 8e5daf9d1580689c91a71b43ea133799eb859363..5f2d5d2cf8f2b3b821929eeca4758f9208a0bb00 100644 (file)
@@ -7,9 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <stdio.h>
-#include "internal/cryptlib.h"
 #include "e_os.h"
+#include "internal/cryptlib.h"
+#include <stdio.h>
 #include "internal/o_str.h"
 #include <openssl/asn1t.h>
 #include <openssl/conf.h>
index b58fac5fd05d46c37f80016e49a32b748d8ebd6c..8bba5a67d294093b47e88c472cb807d29931e92a 100644 (file)
@@ -9,10 +9,10 @@
 
 /* X509 v3 extension utilities */
 
+#include "e_os.h"
+#include "internal/cryptlib.h"
 #include <stdio.h>
 #include "internal/ctype.h"
-#include "internal/cryptlib.h"
-#include "e_os.h"
 #include <openssl/conf.h>
 #include <openssl/x509v3.h>
 #include "internal/x509_int.h"
diff --git a/e_os.h b/e_os.h
index 14089f5655441cf757ce328406562bca64f062ea..bf317ce6c034f3fe743239b3c906187d7f3a672d 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -10,6 +10,7 @@
 #ifndef HEADER_E_OS_H
 # define HEADER_E_OS_H
 
+# include <limits.h>
 # include <openssl/opensslconf.h>
 
 # include <openssl/e_os2.h>
index e4abe92ac1be4d065a4c0acf58a26880188defc3..6c594a268606d7fa6194ee866767f22e2ef51c37 100644 (file)
@@ -7,11 +7,11 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
 #include <stdio.h>
 #include <openssl/objects.h>
 #include <openssl/rand.h>
 #include "ssl_locl.h"
-#include "e_os.h"
 
 #if defined(OPENSSL_SYS_VXWORKS)
 # include <sys/times.h>
index 1a5c3f76b817d2dab3851079507c70b57ae2b6f8..c9371af9c9f84222da9e3b565114fa5667a744c7 100644 (file)
@@ -13,7 +13,6 @@
 #include <openssl/objects.h>
 #include "internal/nelem.h"
 #include "ssl_locl.h"
-#include "e_os.h"
 #include <openssl/md5.h>
 #include <openssl/dh.h>
 #include <openssl/rand.h>
index bbffce0f93f3e5fb52a93c0943834307640b69ea..ba5fb653fed249538217ba3441f8c89d53cecce1 100644 (file)
 #include <sys/types.h>
 
 #include "internal/nelem.h"
-#ifndef NO_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include "internal/o_dir.h"
 #include <openssl/lhash.h>
 #include <openssl/bio.h>
index 72f48752e97651736faee487b9a320ac93460460..f3fc5bc25ad5a4c1ce2dba9ed12374e6f03ed625 100644 (file)
 
 #ifndef HEADER_SSL_LOCL_H
 # define HEADER_SSL_LOCL_H
+# include "e_os.h"              /* struct timeval for Windows */
 # include <stdlib.h>
 # include <time.h>
 # include <string.h>
 # include <errno.h>
 
-# include "e_os.h"              /* struct timeval for Windows */
 # if defined(__unix) || defined(__unix__)
 #  include <sys/time.h>         /* struct timeval for DTLS */
 # endif
index fd48f666c0df01a102b14d9ae2fa2b1548e80215..d171ece2a0bd92b72eb5bfc69e4ff7cb15971685 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/rand.h>
 #include "e_os.h"
+#include <openssl/rand.h>
 #include "../ssl_locl.h"
 #include "statem_locl.h"
 
index 667cba67a7e72271cd6b991df4ff8d2c85a72db6..6f1f5d7cd904803af49aa6252c043149f11555cc 100644 (file)
@@ -6,6 +6,7 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+#include "../e_os.h"
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h>
@@ -13,7 +14,6 @@
 #include <ctype.h>
 
 #include "internal/nelem.h"
-#include "../e_os.h"
 #include "internal/numbers.h"
 #include <openssl/bn.h>
 #include <openssl/crypto.h>
index d4642e78ac85abc938d5cc4ce0b4d1e07e9abae4..0be68c7e3ce39ba7ff6932afa6d14a15c8e9bb18 100644 (file)
@@ -7,13 +7,13 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "../e_os.h"
 #include <string.h>
 
 #include <openssl/e_os2.h>
 #include <openssl/crypto.h>
 
 #include "internal/nelem.h"
-#include "../e_os.h"
 #include "ssl_test_ctx.h"
 #include "testutil.h"
 
index faabc2dff0593d5f6f97959e2cb02df9ed1cc992..ebe052f55cbd4093f90b785ede31c95f8e6612a6 100644 (file)
@@ -9,6 +9,8 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "e_os.h"
+
 /* Or gethostname won't be declared properly on Linux and GNU platforms. */
 #ifndef _BSD_SOURCE
 # define _BSD_SOURCE 1
@@ -27,8 +29,6 @@
 
 #include "internal/nelem.h"
 
-#include "e_os.h"
-
 #ifdef OPENSSL_SYS_VMS
 /*
  * Or isascii won't be declared properly on VMS (at least with DECompHP C).
index a4ba775b5c40685fe96adf21d655c20051f1f51f..0d55f81ba3d360e753faf12dc74408a91582fc7f 100644 (file)
@@ -7,9 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+#include "../e_os.h"
 #include <string.h>
 #include "internal/nelem.h"
-#include "../e_os.h"
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include "testutil.h"