Skip to content

Commit

Permalink
Move e_os.h to include/internal
Browse files Browse the repository at this point in the history
Including e_os.h with a path from a header file doesn't work well on
certain exotic platform.  It simply fails to build.

Since we don't seem to be able to stop ourselves, the better move is
to move e_os.h to an include directory that's part of the inclusion
path given to the compiler.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #17641)

(cherry picked from commit d5f9166)
Reviewed-by: Hugo Landau <hlandau@openssl.org>
  • Loading branch information
levitte authored and t8m committed Nov 11, 2022
1 parent 70df6ca commit 97477bb
Show file tree
Hide file tree
Showing 63 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion apps/include/apps.h
Expand Up @@ -10,7 +10,7 @@
#ifndef OSSL_APPS_H
# define OSSL_APPS_H

# include "e_os.h" /* struct timeval for DTLS */
# include "internal/e_os.h" /* struct timeval for DTLS */
# include "internal/nelem.h"
# include "internal/sockets.h" /* for openssl_fdset() */
# include "internal/cryptlib.h" /* ossl_assert() */
Expand Down
2 changes: 1 addition & 1 deletion apps/s_client.c
Expand Up @@ -8,7 +8,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/bio/bio_local.h
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

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

/* BEGIN BIO_ADDRINFO/BIO_ADDR stuff. */
Expand Down
2 changes: 1 addition & 1 deletion crypto/bio/bss_bio.c
Expand Up @@ -15,7 +15,7 @@
* See ssl/ssltest.c for some hints on how this can be used.
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/cmp/cmp_client.c
Expand Up @@ -11,7 +11,7 @@

#include "cmp_local.h"
#include "internal/cryptlib.h"
#include "e_os.h" /* ossl_sleep() */
#include "internal/e_os.h" /* ossl_sleep() */

/* explicit #includes not strictly needed since implied by the above: */
#include <openssl/bio.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/conf/conf_api.c
Expand Up @@ -9,7 +9,7 @@

/* Part of the code in here was originally in conf.c, which is now removed */

#include "e_os.h"
#include "internal/e_os.h"
#include "internal/cryptlib.h"
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/conf/conf_def.c
Expand Up @@ -11,7 +11,7 @@

#include <stdio.h>
#include <string.h>
#include "e_os.h" /* struct stat */
#include "internal/e_os.h" /* struct stat */
#ifdef __TANDEM
# include <sys/types.h> /* needed for stat.h */
# include <sys/stat.h> /* struct stat */
Expand Down
2 changes: 1 addition & 1 deletion crypto/conf/conf_lib.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <stdio.h>
#include <string.h>
#include "internal/conf.h"
Expand Down
2 changes: 1 addition & 1 deletion crypto/cpuid.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include "crypto/cryptlib.h"

#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
Expand Down
2 changes: 1 addition & 1 deletion crypto/cryptlib.c
Expand Up @@ -8,7 +8,7 @@
* https://www.openssl.org/source/license.html
*/

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

Expand Down
2 changes: 1 addition & 1 deletion crypto/des/cfb_enc.c
Expand Up @@ -13,7 +13,7 @@
*/
#include "internal/deprecated.h"

#include "e_os.h"
#include "internal/e_os.h"
#include "des_local.h"
#include <assert.h>

Expand Down
4 changes: 2 additions & 2 deletions crypto/dh/dh_kdf.c
Expand Up @@ -13,8 +13,8 @@
*/
#include "internal/deprecated.h"

#include "e_os.h"
#include "e_os.h"
#include "internal/e_os.h"
#include "internal/e_os.h"
#include <string.h>
#include <openssl/core_names.h>
#include <openssl/dh.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/dllmain.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include "crypto/cryptlib.h"

#if defined(_WIN32) || defined(__CYGWIN__)
Expand Down
2 changes: 1 addition & 1 deletion crypto/dso/dso_dlfcn.c
Expand Up @@ -17,7 +17,7 @@
#endif

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

#ifdef DSO_DLFCN

Expand Down
2 changes: 1 addition & 1 deletion crypto/dso/dso_win32.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

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

#if defined(DSO_WIN32)
Expand Down
2 changes: 1 addition & 1 deletion crypto/ec/curve448/arch_32/f_impl32.c
Expand Up @@ -10,7 +10,7 @@
* Originally written by Mike Hamburg
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <openssl/macros.h>
#include "internal/numbers.h"

Expand Down
2 changes: 1 addition & 1 deletion crypto/ec/curve448/arch_64/f_impl64.c
Expand Up @@ -10,7 +10,7 @@
* Originally written by Mike Hamburg
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <openssl/macros.h>
#include "internal/numbers.h"

Expand Down
2 changes: 1 addition & 1 deletion crypto/ec/ec_backend.c
Expand Up @@ -24,7 +24,7 @@
#include "crypto/bn.h"
#include "crypto/ec.h"
#include "ec_local.h"
#include "e_os.h"
#include "internal/e_os.h"
#include "internal/param_build_set.h"

/* Mapping between a flag and a name */
Expand Down
2 changes: 1 addition & 1 deletion crypto/encode_decode/decoder_lib.c
Expand Up @@ -20,7 +20,7 @@
#include "internal/provider.h"
#include "crypto/decoder.h"
#include "encoder_local.h"
#include "e_os.h"
#include "internal/e_os.h"

struct decoder_process_data_st {
OSSL_DECODER_CTX *ctx;
Expand Down
2 changes: 1 addition & 1 deletion crypto/engine/eng_init.c
Expand Up @@ -10,7 +10,7 @@
/* We need to use some engine deprecated APIs */
#define OPENSSL_SUPPRESS_DEPRECATED

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

/*
Expand Down
2 changes: 1 addition & 1 deletion crypto/engine/eng_lib.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include "eng_local.h"
#include <openssl/rand.h>
#include "internal/refcount.h"
Expand Down
2 changes: 1 addition & 1 deletion crypto/engine/tb_asnmth.c
Expand Up @@ -10,7 +10,7 @@
/* We need to use some engine deprecated APIs */
#define OPENSSL_SUPPRESS_DEPRECATED

#include "e_os.h"
#include "internal/e_os.h"
#include "eng_local.h"
#include <openssl/evp.h>
#include "crypto/asn1.h"
Expand Down
2 changes: 1 addition & 1 deletion crypto/err/err.c
Expand Up @@ -23,7 +23,7 @@
#include "internal/thread_once.h"
#include "crypto/ctype.h"
#include "internal/constant_time.h"
#include "e_os.h"
#include "internal/e_os.h"
#include "err_local.h"

/* Forward declaration in case it's not published because of configuration */
Expand Down
2 changes: 1 addition & 1 deletion crypto/getenv.c
Expand Up @@ -13,7 +13,7 @@

#include <stdlib.h>
#include "internal/cryptlib.h"
#include "e_os.h"
#include "internal/e_os.h"

char *ossl_safe_getenv(const char *name)
{
Expand Down
2 changes: 1 addition & 1 deletion crypto/http/http_client.c
Expand Up @@ -8,7 +8,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <stdio.h>
#include <stdlib.h>
#include "crypto/ctype.h"
Expand Down
2 changes: 1 addition & 1 deletion crypto/info.c
Expand Up @@ -12,7 +12,7 @@
#include "crypto/dso_conf.h"
#include "internal/thread_once.h"
#include "internal/cryptlib.h"
#include "e_os.h"
#include "internal/e_os.h"
#include "buildinf.h"

#if defined(__arm__) || defined(__arm) || defined(__aarch64__)
Expand Down
2 changes: 1 addition & 1 deletion crypto/init.c
Expand Up @@ -10,7 +10,7 @@
/* We need to use some engine deprecated APIs */
#define OPENSSL_SUPPRESS_DEPRECATED

#include "e_os.h"
#include "internal/e_os.h"
#include "crypto/cryptlib.h"
#include <openssl/err.h>
#include "crypto/rand.h"
Expand Down
2 changes: 1 addition & 1 deletion crypto/mem.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include "internal/cryptlib.h"
#include "crypto/cryptlib.h"
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/mem_sec.c
Expand Up @@ -15,7 +15,7 @@
* For details on that implementation, see below (look for uppercase
* "SECURE HEAP IMPLEMENTATION").
*/
#include "e_os.h"
#include "internal/e_os.h"
#include <openssl/crypto.h>

#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/o_dir.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <errno.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion crypto/o_fopen.c
Expand Up @@ -25,7 +25,7 @@
# endif
# endif

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

#if !defined(OPENSSL_NO_STDIO)
Expand Down
2 changes: 1 addition & 1 deletion crypto/o_init.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <openssl/err.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion crypto/o_str.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <string.h>
#include <limits.h>
#include <openssl/crypto.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/objects/o_names.c
Expand Up @@ -19,7 +19,7 @@
#include "internal/thread_once.h"
#include "crypto/lhash.h"
#include "obj_local.h"
#include "e_os.h"
#include "internal/e_os.h"

/*
* I use the ex_data stuff to manage the identifiers for the obj_name_types
Expand Down
2 changes: 1 addition & 1 deletion crypto/property/property_parse.c
Expand Up @@ -17,7 +17,7 @@
#include "crypto/ctype.h"
#include "internal/nelem.h"
#include "property_local.h"
#include "e_os.h"
#include "internal/e_os.h"

DEFINE_STACK_OF(OSSL_PROPERTY_DEFINITION)

Expand Down
2 changes: 1 addition & 1 deletion crypto/rand/rand_deprecated.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

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

Expand Down
2 changes: 1 addition & 1 deletion crypto/rand/rand_lib.c
Expand Up @@ -28,7 +28,7 @@
# include <openssl/engine.h>
# include "crypto/rand_pool.h"
# include "prov/seeding.h"
# include "e_os.h"
# include "internal/e_os.h"

# ifndef OPENSSL_NO_ENGINE
/* non-NULL if default_RAND_meth is ENGINE-provided */
Expand Down
2 changes: 1 addition & 1 deletion crypto/store/store_lib.c
Expand Up @@ -14,7 +14,7 @@
/* We need to use some STORE deprecated APIs */
#define OPENSSL_SUPPRESS_DEPRECATED

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

#include <openssl/crypto.h>
#include <openssl/err.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/store/store_result.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

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

#include <openssl/core.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/ts/ts_rsp_sign.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

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

#include <openssl/objects.h>
#include <openssl/ts.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/ui/ui_openssl.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include <openssl/e_os2.h>
#include <openssl/err.h>
#include <openssl/ui.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/x509/by_dir.c
Expand Up @@ -16,7 +16,7 @@
# include <sys/stat.h>
#endif

#include "e_os.h"
#include "internal/e_os.h"
#include "internal/cryptlib.h"
#include <stdio.h>
#include <time.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/x509/v3_tlsf.c
Expand Up @@ -7,7 +7,7 @@
* https://www.openssl.org/source/license.html
*/

#include "e_os.h"
#include "internal/e_os.h"
#include "internal/cryptlib.h"
#include <stdio.h>
#include <openssl/asn1t.h>
Expand Down
2 changes: 1 addition & 1 deletion crypto/x509/v3_utl.c
Expand Up @@ -9,7 +9,7 @@

/* X509 v3 extension utilities */

#include "e_os.h"
#include "internal/e_os.h"
#include "internal/cryptlib.h"
#include <stdio.h>
#include <string.h>
Expand Down

0 comments on commit 97477bb

Please sign in to comment.