From: Pauli Date: Wed, 23 Aug 2017 23:05:07 +0000 (+1000) Subject: Move e_os.h to be the very first include. X-Git-Tag: OpenSSL_1_1_1-pre1~742 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07016a8a3174db5caf07182930533cf88ad9b0ad;p=thirdparty%2Fopenssl.git Move e_os.h to be the very first include. cryptilib.h is the second. Reviewed-by: Andy Polyakov Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/4188) --- diff --git a/apps/apps.h b/apps/apps.h index bbc9a5ad8fc..c208c1999de 100644 --- a/apps/apps.h +++ b/apps/apps.h @@ -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 /* struct timeval for DTLS */ # endif diff --git a/apps/s_client.c b/apps/s_client.c index 5f7b31c9dc4..5a4a2f65e7b 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -8,12 +8,12 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include #include #include #include -#include "e_os.h" #include #ifndef OPENSSL_NO_SOCK diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c index 9fa47600c9f..e34382c5578 100644 --- a/crypto/bio/bss_bio.c +++ b/crypto/bio/bss_bio.c @@ -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 #include #include @@ -24,8 +25,6 @@ #include #include -#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); diff --git a/crypto/blake2/blake2b.c b/crypto/blake2/blake2b.c index e77bd9ac16f..829ba5b50a5 100644 --- a/crypto/blake2/blake2b.c +++ b/crypto/blake2/blake2b.c @@ -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 #include #include -#include "e_os.h" #include "blake2_locl.h" #include "blake2_impl.h" diff --git a/crypto/blake2/blake2s.c b/crypto/blake2/blake2s.c index 7451b14f5a2..8211374d123 100644 --- a/crypto/blake2/blake2s.c +++ b/crypto/blake2/blake2s.c @@ -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 #include #include -#include "e_os.h" #include "blake2_locl.h" #include "blake2_impl.h" diff --git a/crypto/conf/conf_api.c b/crypto/conf/conf_api.c index 6026dca9282..6f8947df2c8 100644 --- a/crypto/conf/conf_api.c +++ b/crypto/conf/conf_api.c @@ -9,11 +9,11 @@ /* Part of the code in here was originally in conf.c, which is now removed */ +#include "e_os.h" #include #include #include #include -#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); diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 74759c56d5e..06bb3f7ff1a 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -7,6 +7,7 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include #include "internal/conf.h" @@ -15,7 +16,6 @@ #include #include #include -#include "e_os.h" static CONF_METHOD *default_CONF_method = NULL; diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index da591cba636..7622d8e1f33 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -7,11 +7,10 @@ * https://www.openssl.org/source/license.html */ +#include "internal/cryptlib.h" #include #include #include -#include "internal/cryptlib.h" -#include "e_os.h" #include "internal/conf.h" #include "internal/dso.h" #include diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index bafcaab9668..6e45b0d8ba1 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -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 #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ diff --git a/crypto/des/cfb64ede.c b/crypto/des/cfb64ede.c index 7017fd96ff4..21943f6143e 100644 --- a/crypto/des/cfb64ede.c +++ b/crypto/des/cfb64ede.c @@ -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. diff --git a/crypto/dllmain.c b/crypto/dllmain.c index 376a34165a0..b0459c2e73b 100644 --- a/crypto/dllmain.c +++ b/crypto/dllmain.c @@ -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__ diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c index 19781b8ab05..f2196b4e540 100644 --- a/crypto/engine/eng_devcrypto.c +++ b/crypto/engine/eng_devcrypto.c @@ -7,6 +7,7 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include #include @@ -15,8 +16,6 @@ #include #include -#include "e_os.h" - #include #include #include diff --git a/crypto/engine/eng_init.c b/crypto/engine/eng_init.c index 3d5eaa14e4e..7c235fc472a 100644 --- a/crypto/engine/eng_init.c +++ b/crypto/engine/eng_init.c @@ -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 diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c index 51998340a94..c060a5d6ac9 100644 --- a/crypto/engine/eng_lib.c +++ b/crypto/engine/eng_lib.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include "eng_int.h" #include "e_os.h" +#include "eng_int.h" #include #include "internal/refcount.h" diff --git a/crypto/engine/tb_asnmth.c b/crypto/engine/tb_asnmth.c index ca3727e9022..bc6e91ccabb 100644 --- a/crypto/engine/tb_asnmth.c +++ b/crypto/engine/tb_asnmth.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include "eng_int.h" #include "e_os.h" +#include "eng_int.h" #include #include "internal/asn1_int.h" diff --git a/crypto/init.c b/crypto/init.c index fa68a29b2c2..074e683cc01 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -7,6 +7,7 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include "internal/cryptlib_int.h" #include #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; diff --git a/crypto/mem.c b/crypto/mem.c index 2713b833c0b..c171ae486c2 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -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 #include #include #include -#include "e_os.h" -#include "internal/cryptlib.h" -#include "internal/cryptlib_int.h" #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE # include #endif diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c index 703ddad5e59..f8470249c39 100644 --- a/crypto/mem_sec.c +++ b/crypto/mem_sec.c @@ -15,8 +15,8 @@ * For details on that implementation, see below (look for uppercase * "SECURE HEAP IMPLEMENTATION"). */ -#include #include "e_os.h" +#include #include diff --git a/crypto/o_dir.c b/crypto/o_dir.c index 459ce9c1e1c..fca9c75e053 100644 --- a/crypto/o_dir.c +++ b/crypto/o_dir.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include #include "e_os.h" +#include /* * The routines really come from the Levitte Programming, so to make life diff --git a/crypto/o_str.c b/crypto/o_str.c index be130ce8047..cf098fc90a2 100644 --- a/crypto/o_str.c +++ b/crypto/o_str.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include #include "e_os.h" +#include #include #include "internal/cryptlib.h" #include "internal/o_str.h" diff --git a/crypto/ocsp/ocsp_ht.c b/crypto/ocsp/ocsp_ht.c index ef84a2d4c9e..42c36864313 100644 --- a/crypto/ocsp/ocsp_ht.c +++ b/crypto/ocsp/ocsp_ht.c @@ -7,11 +7,11 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include #include "internal/ctype.h" #include -#include "e_os.h" #include #include #include diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index 4f01e8aad59..08ea55fbb9d 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -7,9 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include - #include "e_os.h" +#include #include "internal/cryptlib.h" #include #include "rand_lcl.h" diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c index f6cb928ae3c..1c794ef8263 100644 --- a/crypto/store/loader_file.c +++ b/crypto/store/loader_file.c @@ -7,6 +7,7 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include #include @@ -29,8 +30,6 @@ #include "internal/store_int.h" #include "store_locl.h" -#include "e_os.h" - #ifdef _WIN32 # define stat _stat #endif diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c index 6f789eb79c9..2cc247d12ed 100644 --- a/crypto/store/store_lib.c +++ b/crypto/store/store_lib.c @@ -7,11 +7,9 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include - -#include "e_os.h" - #include #include #include diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c index cff1a840abe..3b74e6b7e46 100644 --- a/crypto/ui/ui_openssl.c +++ b/crypto/ui/ui_openssl.c @@ -7,10 +7,10 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include #include -#include "e_os.h" #ifndef OPENSSL_NO_UI_CONSOLE /* diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c index 335c3b3dda2..8476f0025e0 100644 --- a/crypto/x509/by_dir.c +++ b/crypto/x509/by_dir.c @@ -7,14 +7,13 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" +#include "internal/cryptlib.h" #include #include #include #include -#include "internal/cryptlib.h" -#include "e_os.h" - #ifndef OPENSSL_NO_POSIX_IO # include #endif diff --git a/crypto/x509v3/v3_ncons.c b/crypto/x509v3/v3_ncons.c index 3b9145b15e0..7731bacd049 100644 --- a/crypto/x509v3/v3_ncons.c +++ b/crypto/x509v3/v3_ncons.c @@ -8,9 +8,8 @@ */ #include "e_os.h" /* for strncasecmp */ -#include #include "internal/cryptlib.h" -#include "e_os.h" +#include #include "internal/asn1_int.h" #include #include diff --git a/crypto/x509v3/v3_tlsf.c b/crypto/x509v3/v3_tlsf.c index 8e5daf9d158..5f2d5d2cf8f 100644 --- a/crypto/x509v3/v3_tlsf.c +++ b/crypto/x509v3/v3_tlsf.c @@ -7,9 +7,9 @@ * https://www.openssl.org/source/license.html */ -#include -#include "internal/cryptlib.h" #include "e_os.h" +#include "internal/cryptlib.h" +#include #include "internal/o_str.h" #include #include diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index b58fac5fd05..8bba5a67d29 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -9,10 +9,10 @@ /* X509 v3 extension utilities */ +#include "e_os.h" +#include "internal/cryptlib.h" #include #include "internal/ctype.h" -#include "internal/cryptlib.h" -#include "e_os.h" #include #include #include "internal/x509_int.h" diff --git a/e_os.h b/e_os.h index 14089f56554..bf317ce6c03 100644 --- a/e_os.h +++ b/e_os.h @@ -10,6 +10,7 @@ #ifndef HEADER_E_OS_H # define HEADER_E_OS_H +# include # include # include diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index e4abe92ac1b..6c594a26860 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -7,11 +7,11 @@ * https://www.openssl.org/source/license.html */ +#include "e_os.h" #include #include #include #include "ssl_locl.h" -#include "e_os.h" #if defined(OPENSSL_SYS_VXWORKS) # include diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 1a5c3f76b81..c9371af9c9f 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -13,7 +13,6 @@ #include #include "internal/nelem.h" #include "ssl_locl.h" -#include "e_os.h" #include #include #include diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index bbffce0f93f..ba5fb653fed 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -12,10 +12,6 @@ #include #include "internal/nelem.h" -#ifndef NO_SYS_TYPES_H -# include -#endif - #include "internal/o_dir.h" #include #include diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index 72f48752e97..f3fc5bc25ad 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -11,12 +11,12 @@ #ifndef HEADER_SSL_LOCL_H # define HEADER_SSL_LOCL_H +# include "e_os.h" /* struct timeval for Windows */ # include # include # include # include -# include "e_os.h" /* struct timeval for Windows */ # if defined(__unix) || defined(__unix__) # include /* struct timeval for DTLS */ # endif diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c index fd48f666c0d..d171ece2a0b 100644 --- a/ssl/statem/statem.c +++ b/ssl/statem/statem.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include #include "e_os.h" +#include #include "../ssl_locl.h" #include "statem_locl.h" diff --git a/test/bntest.c b/test/bntest.c index 667cba67a7e..6f1f5d7cd90 100644 --- a/test/bntest.c +++ b/test/bntest.c @@ -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 #include #include @@ -13,7 +14,6 @@ #include #include "internal/nelem.h" -#include "../e_os.h" #include "internal/numbers.h" #include #include diff --git a/test/ssl_test_ctx.c b/test/ssl_test_ctx.c index d4642e78ac8..0be68c7e3ce 100644 --- a/test/ssl_test_ctx.c +++ b/test/ssl_test_ctx.c @@ -7,13 +7,13 @@ * https://www.openssl.org/source/license.html */ +#include "../e_os.h" #include #include #include #include "internal/nelem.h" -#include "../e_os.h" #include "ssl_test_ctx.h" #include "testutil.h" diff --git a/test/ssltest_old.c b/test/ssltest_old.c index faabc2dff05..ebe052f55cb 100644 --- a/test/ssltest_old.c +++ b/test/ssltest_old.c @@ -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). diff --git a/test/v3nametest.c b/test/v3nametest.c index a4ba775b5c4..0d55f81ba3d 100644 --- a/test/v3nametest.c +++ b/test/v3nametest.c @@ -7,9 +7,9 @@ * https://www.openssl.org/source/license.html */ +#include "../e_os.h" #include #include "internal/nelem.h" -#include "../e_os.h" #include #include #include "testutil.h"