Skip to content

Commit

Permalink
Do not use generic header names
Browse files Browse the repository at this point in the history
Zephyr has a global list of include directories that is applicable for
all modules unless specifically excluded by using "targets", and using a
generic named header can cause issues if there are duplicate headers
files and depending on the inclusion order.

So, rename the header with module prefix to avoid naming collision.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 authored and frkv committed Sep 27, 2024
1 parent b8dfab5 commit b41e899
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion library/bignum_mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#ifndef MBEDTLS_BIGNUM_MOD_H
#define MBEDTLS_BIGNUM_MOD_H

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_BIGNUM_C)
#include "mbedtls/bignum.h"
Expand Down
2 changes: 1 addition & 1 deletion library/constant_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <stdint.h>
#include <limits.h>

#include "common.h"
#include "oberon_psa_common.h"
#include "constant_time_internal.h"
#include "mbedtls/constant_time.h"
#include "mbedtls/error.h"
Expand Down
2 changes: 1 addition & 1 deletion library/constant_time_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <stddef.h>

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_BIGNUM_C)
#include "mbedtls/bignum.h"
Expand Down
2 changes: 1 addition & 1 deletion library/constant_time_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <stdint.h>
#include <stddef.h>

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_BIGNUM_C)
#include "mbedtls/bignum.h"
Expand Down
2 changes: 1 addition & 1 deletion library/md_psa.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef MBEDTLS_MD_PSA_H
#define MBEDTLS_MD_PSA_H

#include "common.h"
#include "oberon_psa_common.h"

#include "mbedtls/md.h"
#include "psa/crypto.h"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion library/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_PLATFORM_C)

Expand Down
2 changes: 1 addition & 1 deletion library/platform_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define _GNU_SOURCE
#endif

#include "common.h"
#include "oberon_psa_common.h"

#include "mbedtls/platform_util.h"
#include "mbedtls/platform.h"
Expand Down
2 changes: 1 addition & 1 deletion library/psa_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* NOTICE: This file has been modified by Oberon microsystems AG.
*/

#include "common.h"
#include "oberon_psa_common.h"
#include "psa_crypto_core_common.h"

#if defined(MBEDTLS_PSA_CRYPTO_C)
Expand Down
2 changes: 1 addition & 1 deletion library/psa_crypto_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#include "common.h"
#include "oberon_psa_common.h"
#include "psa/crypto.h"

#if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
Expand Down
2 changes: 1 addition & 1 deletion library/psa_crypto_driver_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* NOTICE: This file has been modified by Oberon microsystems AG.
*/

#include "common.h"
#include "oberon_psa_common.h"
#include "psa/crypto.h"
#include "psa_crypto_core.h"
#include "psa_crypto_driver_wrappers.h"
Expand Down
2 changes: 1 addition & 1 deletion library/psa_crypto_invasive.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "psa/build_info.h"

#include "psa/crypto.h"
#include "common.h"
#include "oberon_psa_common.h"

#include "mbedtls/entropy.h"

Expand Down
2 changes: 1 addition & 1 deletion library/psa_crypto_slot_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_PSA_CRYPTO_C)

Expand Down
2 changes: 1 addition & 1 deletion library/psa_crypto_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C)

Expand Down
2 changes: 1 addition & 1 deletion library/psa_its_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_PSA_ITS_FILE_C)

Expand Down
2 changes: 1 addition & 1 deletion library/threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define _POSIX_C_SOURCE 200112L
#endif

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_THREADING_C)

Expand Down
2 changes: 1 addition & 1 deletion oberon/platforms/demo/library/psa_crypto_driver_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* NOTICE: This file has been modified by Oberon microsystems AG.
*/

#include "common.h"
#include "oberon_psa_common.h"
#include "psa/crypto.h"
#include "psa_crypto_core.h"
#include "psa_crypto_driver_wrappers.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* NOTICE: This file has been modified by Oberon microsystems AG.
*/

#include "common.h"
#include "oberon_psa_common.h"
#include "psa/crypto.h"
#include "psa_crypto_core.h"
#include "psa_crypto_driver_wrappers.h"
Expand Down
2 changes: 1 addition & 1 deletion programs/ssl/library/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#include "common.h"
#include "oberon_psa_common.h"

/*
* Availability of functions in this module is controlled by two
Expand Down
2 changes: 1 addition & 1 deletion programs/ssl/library/psa_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/

#include "common.h"
#include "oberon_psa_common.h"

/* This is needed for MBEDTLS_ERR_XXX macros */
#include <mbedtls/error.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/generated/test_suite_psa_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int restore_output(FILE *out_stream, int dup_fd)
#include "mbedtls/asn1.h"
#include "mbedtls/asn1write.h"
#include "mbedtls/oid.h"
#include "common.h"
#include "oberon_psa_common.h"

#include "mbedtls/psa_util.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/test_suite_psa_crypto.pbkdf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int restore_output(FILE *out_stream, int dup_fd)
#include "mbedtls/asn1.h"
#include "mbedtls/asn1write.h"
#include "mbedtls/oid.h"
#include "common.h"
#include "oberon_psa_common.h"

#include "mbedtls/psa_util.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/generated/test_suite_psa_crypto_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int restore_output(FILE *out_stream, int dup_fd)
#line 2 "tests/suites/test_suite_psa_crypto_memory.function"
#include <stdint.h>

#include "common.h"
#include "oberon_psa_common.h"

#include "psa/crypto.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/include/test/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
#include "mbedtls/memory_buffer_alloc.h"
#endif
#include "common.h"
#include "oberon_psa_common.h"

/**
* \brief This macro tests the expression passed to it as a test step or
Expand Down
2 changes: 1 addition & 1 deletion tests/src/asn1parse_min.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* NOTICE: This file has been modified by Oberon microsystems AG.
*/

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_ASN1_PARSE_C)

Expand Down
2 changes: 1 addition & 1 deletion tests/src/asn1write_min.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* NOTICE: This file has been modified by Oberon microsystems AG.
*/

#include "common.h"
#include "oberon_psa_common.h"

#if defined(MBEDTLS_ASN1_WRITE_C)

Expand Down

0 comments on commit b41e899

Please sign in to comment.