Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded namespacing in header files #921

Merged
merged 4 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
mbed TLS ChangeLog (Sorted per branch, date)

= mbed TLS x.x.x branch released xxxx-xx-xx

Bugfix
* Fix namespacing in header files. Remove the `mbedtls` namespacing in
the `#include` in the header files. Resolves #857

= mbed TLS 2.11.0 branch released 2018-06-18

Features
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/cmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifndef MBEDTLS_CMAC_H
#define MBEDTLS_CMAC_H

#include "mbedtls/cipher.h"
#include "cipher.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2973,7 +2973,7 @@
/* \} name SECTION: Customisation configuration options */

/* Target and application specific configurations */
//#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "mbedtls/target_config.h"
//#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "target_config.h"

#if defined(TARGET_LIKE_MBED) && defined(YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE)
#include YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/ctr_drbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "aes.h"

#if defined(MBEDTLS_THREADING_C)
#include "mbedtls/threading.h"
#include "threading.h"
#endif

#define MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED -0x0034 /**< The entropy source failed. */
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/hmac_drbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "md.h"

#if defined(MBEDTLS_THREADING_C)
#include "mbedtls/threading.h"
#include "threading.h"
#endif

/*
Expand Down
4 changes: 2 additions & 2 deletions include/mbedtls/net.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* \file net.h
*
* \brief Deprecated header file that includes mbedtls/net_sockets.h
* \brief Deprecated header file that includes net_sockets.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Why did you remove mbedtls/ from this comment for example and not from the one below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have a good answer.
Probably because in this comment, it's more reasonable that a human reader will read the file within the same folder, and in the warning message, the compilation will probably be from the root folder. I'm fine either way

*
* \deprecated Superseded by mbedtls/net_sockets.h
*/
Expand All @@ -25,7 +25,7 @@
*/

#if !defined(MBEDTLS_DEPRECATED_REMOVED)
#include "mbedtls/net_sockets.h"
#include "net_sockets.h"
#if defined(MBEDTLS_DEPRECATED_WARNING)
#warning "Deprecated header file: Superseded by mbedtls/net_sockets.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change this one as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andresag01 Why do you think it shouldn't change? Although net.h is superseded, it can still be included.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a long time ago, so what I probably meant is that in the message for this warning there is a mbedtls/net_sockets.h. Do we want to make that net_sockets.h as well? Its a really minor thing and certainly not a stopper, more of a question. I will accept the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in the message, it's more appropriate to keep it as is, as it is intended for human readers, and it's informative with the current wording

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think it's better to keep it as it is.

#endif /* MBEDTLS_DEPRECATED_WARNING */
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#endif

#if defined(MBEDTLS_HAVE_TIME)
#include "mbedtls/platform_time.h"
#include "platform_time.h"
#endif

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion include/mbedtls/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#endif

#if defined(MBEDTLS_HAVE_TIME)
#include "mbedtls/platform_time.h"
#include "platform_time.h"
#endif

/*
Expand Down