Skip to content

Commit

Permalink
e_os.h removal from other headers and source files.
Browse files Browse the repository at this point in the history
Removed e_os.h from all bar three headers (apps/apps.h crypto/bio/bio_lcl.h and
ssl/ssl_locl.h).

Added e_os.h into the files that need it now.

Directly reference internal/nelem.h when required.

Reviewed-by: Andy Polyakov <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
(Merged from openssl#4188)
  • Loading branch information
paulidale committed Aug 29, 2017
1 parent 5889102 commit 677963e
Show file tree
Hide file tree
Showing 55 changed files with 90 additions and 51 deletions.
3 changes: 2 additions & 1 deletion apps/apps.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-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
Expand All @@ -10,6 +10,7 @@
#ifndef HEADER_APPS_H
# define HEADER_APPS_H

# include "internal/nelem.h"
# include "e_os.h"
# if defined(__unix) || defined(__unix__)
# include <sys/time.h> /* struct timeval for DTLS */
Expand Down
5 changes: 3 additions & 2 deletions crypto/asn1/ameth_lib.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/*
* Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2006-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
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/

#include <stdio.h>
#include "e_os.h" /* for strncasecmp */
#include "internal/cryptlib.h"
#include <stdio.h>
#include <openssl/asn1t.h>
#include <openssl/x509.h>
#include <openssl/engine.h>
Expand Down
3 changes: 2 additions & 1 deletion crypto/asn1/tasn_utl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2000-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
Expand All @@ -10,6 +10,7 @@
#include <stddef.h>
#include <string.h>
#include "internal/cryptlib.h"
#include "e_os.h"
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
Expand Down
1 change: 0 additions & 1 deletion crypto/async/arch/async_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

# include <ucontext.h>
# include <setjmp.h>
# include "e_os.h"

typedef struct async_fibre_st {
ucontext_t fibre;
Expand Down
3 changes: 1 addition & 2 deletions crypto/blake2/blake2_impl.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,7 +15,6 @@
*/

#include <string.h>
#include "e_os.h"

static ossl_inline uint32_t load32(const uint8_t *src)
{
Expand Down
3 changes: 1 addition & 2 deletions crypto/blake2/blake2_locl.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,7 +15,6 @@
*/

#include <stddef.h>
#include "e_os.h"

#define BLAKE2S_BLOCKBYTES 64
#define BLAKE2S_OUTBYTES 32
Expand Down
4 changes: 2 additions & 2 deletions crypto/bn/bn_dh.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2014-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
Expand All @@ -8,7 +8,7 @@
*/

#include "bn_lcl.h"
#include "e_os.h"
#include "internal/nelem.h"

#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
Expand Down
4 changes: 2 additions & 2 deletions crypto/bn/bn_srp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2014-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
Expand All @@ -8,7 +8,7 @@
*/

#include "bn_lcl.h"
#include "e_os.h"
#include "internal/nelem.h"

#ifndef OPENSSL_NO_SRP

Expand Down
4 changes: 1 addition & 3 deletions crypto/cast/cast_lcl.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-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
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"

#ifdef OPENSSL_SYS_WIN32
# include <stdlib.h>
#endif
Expand Down
1 change: 1 addition & 0 deletions crypto/conf/conf_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#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>
Expand Down
3 changes: 2 additions & 1 deletion crypto/cryptlib.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1998-2017 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
Expand All @@ -9,6 +9,7 @@
*/

#include "internal/cryptlib_int.h"
#include "e_os.h"
#include <openssl/safestack.h>

#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
Expand Down
2 changes: 1 addition & 1 deletion crypto/des/cfb64ede.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-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
Expand Down
1 change: 1 addition & 0 deletions crypto/dh/dh_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <stdio.h>
#include "internal/cryptlib.h"
#include "e_os.h"
#include <openssl/bn.h>
#include "dh_locl.h"
#include <openssl/engine.h>
Expand Down
3 changes: 2 additions & 1 deletion crypto/dllmain.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -8,6 +8,7 @@
*/

#include "internal/cryptlib_int.h"
#include "e_os.h"

#if defined(_WIN32) || defined(__CYGWIN__)
# ifdef __CYGWIN__
Expand Down
3 changes: 2 additions & 1 deletion crypto/dsa/dsa_lib.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-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
Expand All @@ -11,6 +11,7 @@

#include <stdio.h>
#include "internal/cryptlib.h"
#include "e_os.h"
#include <openssl/bn.h>
#include "dsa_locl.h"
#include <openssl/asn1.h>
Expand Down
3 changes: 2 additions & 1 deletion crypto/dso/dso_lib.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2000-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
Expand All @@ -8,6 +8,7 @@
*/

#include "dso_locl.h"
#include "e_os.h"

static DSO_METHOD *default_DSO_meth = NULL;

Expand Down
3 changes: 2 additions & 1 deletion crypto/dso/dso_win32.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/*
* Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2000-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
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "dso_locl.h"

#if defined(DSO_WIN32)
Expand Down
1 change: 1 addition & 0 deletions crypto/ec/ec_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <openssl/err.h>
#include <openssl/asn1t.h>
#include <openssl/objects.h>
#include "internal/nelem.h"

int EC_GROUP_get_basis_type(const EC_GROUP *group)
{
Expand Down
2 changes: 1 addition & 1 deletion crypto/ec/ec_curve.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <openssl/err.h>
#include <openssl/obj_mac.h>
#include <openssl/opensslconf.h>
#include "e_os.h"
#include "internal/nelem.h"

typedef struct {
int field_type, /* either NID_X9_62_prime_field or
Expand Down
3 changes: 2 additions & 1 deletion crypto/ec/ec_key.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2002-2017 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
Expand All @@ -11,6 +11,7 @@
#include "internal/cryptlib.h"
#include <string.h>
#include "ec_lcl.h"
#include "e_os.h"
#include <openssl/err.h>
#include <openssl/engine.h>

Expand Down
4 changes: 1 addition & 3 deletions crypto/ec/ec_lcl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
Expand All @@ -15,8 +15,6 @@
#include <openssl/bn.h>
#include "internal/refcount.h"

#include "e_os.h"

#if defined(__SUNPRO_C)
# if __SUNPRO_C >= 0x520
# pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
Expand Down
3 changes: 2 additions & 1 deletion crypto/ec/ec_mult.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
Expand All @@ -14,6 +14,7 @@
#include "internal/cryptlib.h"
#include "internal/bn_int.h"
#include "ec_lcl.h"
#include "e_os.h"

/*
* This file implements the wNAF-based interleaving multi-exponentiation method
Expand Down
3 changes: 2 additions & 1 deletion crypto/ec/ecp_nistz256.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2014-2017 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2014, Intel Corporation. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
Expand All @@ -21,6 +21,7 @@
#include "internal/cryptlib.h"
#include "internal/bn_int.h"
#include "ec_lcl.h"
#include "e_os.h"

#if BN_BITS2 != 64
# define TOBN(hi,lo) lo,hi
Expand Down
3 changes: 2 additions & 1 deletion crypto/engine/eng_init.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-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
Expand All @@ -8,6 +8,7 @@
*/

#include "eng_int.h"
#include "e_os.h"

/*
* Initialise a engine type for use (or up its functional reference count if
Expand Down
1 change: 1 addition & 0 deletions crypto/engine/eng_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

#include "eng_int.h"
#include "e_os.h"
#include <openssl/rand.h>
#include "internal/refcount.h"

Expand Down
3 changes: 2 additions & 1 deletion crypto/engine/tb_asnmth.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2006-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
Expand All @@ -8,6 +8,7 @@
*/

#include "eng_int.h"
#include "e_os.h"
#include <openssl/evp.h>
#include "internal/asn1_int.h"

Expand Down
1 change: 1 addition & 0 deletions crypto/evp/p_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <stdio.h>
#include "internal/cryptlib.h"
#include "e_os.h"
#include <openssl/bn.h>
#include <openssl/err.h>
#include <openssl/objects.h>
Expand Down
1 change: 1 addition & 0 deletions crypto/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "internal/thread_once.h"
#include "internal/dso.h"
#include "internal/store.h"
#include "e_os.h"

static int stopped = 0;

Expand Down
1 change: 1 addition & 0 deletions crypto/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#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
Expand Down
4 changes: 2 additions & 2 deletions crypto/objects/obj_xref.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2006-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
Expand All @@ -9,7 +9,7 @@

#include <openssl/objects.h>
#include "obj_xref.h"
#include "e_os.h"
#include "internal/nelem.h"

static STACK_OF(nid_triple) *sig_app, *sigx_app;

Expand Down
1 change: 1 addition & 0 deletions crypto/rsa/rsa_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <stdio.h>
#include <openssl/crypto.h>
#include "internal/cryptlib.h"
#include "e_os.h"
#include <openssl/lhash.h>
#include "internal/bn_int.h"
#include <openssl/engine.h>
Expand Down
Loading

0 comments on commit 677963e

Please sign in to comment.