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

Non-standard feature in mbedtls_config.h #9859

Open
irwir opened this issue Dec 17, 2024 · 1 comment
Open

Non-standard feature in mbedtls_config.h #9859

irwir opened this issue Dec 17, 2024 · 1 comment
Labels
enhancement help-wanted This issue is not being actively worked on, but PRs welcome. size-xs Estimated task size: extra small (a few hours at most)

Comments

@irwir
Copy link
Contributor

irwir commented Dec 17, 2024

* This macro is expanded after an <tt>\#include</tt> directive. This is a popular but
* non-standard feature of the C language, so this feature is only available
* with compilers that perform macro expansion on an <tt>\#include</tt> line.

The feature should be faily standard. Quote from ANSI C, 1990:

A preprocessing directive of the form
#include pp-tokens new-line
(that does not match one of the two previous forms) is permitted. The preprocessing tokens after
include in the directive are processed just as in normal text. (Each identifier currently defined
as a macro name is replaced by its replacement list of preprocessing tokens.) The directive
resulting after all replacements shall match one of the two previous forms. The method by
which a sequence of preprocessing tokens between a < and a > preprocessing token pair or a pair
of " characters is combined into a single header name preprocessing token is implementationdefined.

@yanesca yanesca added enhancement help-wanted This issue is not being actively worked on, but PRs welcome. size-xs Estimated task size: extra small (a few hours at most) labels Dec 17, 2024
@irwir
Copy link
Contributor Author

irwir commented Dec 18, 2024

Two points could be added.

  1. The same text also was copied to PSA configuration header.
  2. * The value of this symbol is typically a path in double quotes, either
    * absolute or relative to a directory on the include search path.

    Visual Studio compiler discourages relative paths in #include directives and flags it with a warning (relative paths in project files are fine though). Therefore, suggestion of relative paths should be avoided in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help-wanted This issue is not being actively worked on, but PRs welcome. size-xs Estimated task size: extra small (a few hours at most)
Projects
None yet
Development

No branches or pull requests

2 participants