Move e_os.h to be the very first include.

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)
This commit is contained in:
Pauli 2017-08-24 09:05:07 +10:00
parent 9590da2cd6
commit 07016a8a31
39 changed files with 43 additions and 59 deletions

View 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

View 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

View 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);

View 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"

View 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"

View 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);

View 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;

View 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>

View 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) || \

View 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.

View 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__

View 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>

View 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

View 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"

View 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"

View 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;

View 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

View 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>

View 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

View 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"

View 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>

View 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"

View 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

View 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>

View 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
/*

View 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

View 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>

View 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>

View 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"

1
e_os.h
View file

@ -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>

View 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>

View 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>

View file

@ -12,10 +12,6 @@
#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>

View file

@ -11,12 +11,12 @@
#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

View 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"

View 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>

View 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"

View 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).

View 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"