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

Avoid naming conflict of header files. #111

Open
erlingrj opened this issue Sep 19, 2022 · 3 comments
Open

Avoid naming conflict of header files. #111

erlingrj opened this issue Sep 19, 2022 · 3 comments
Assignees

Comments

@erlingrj
Copy link
Collaborator

Some of the header files have very common names like "platform.h" and "port.h". This is already causing problems when porting it to XMOS. Likely this will cause problems when integrating reactor-c with other libraries and projects. There seems to be two ways to solve this.

  1. Renaming:
    platform -> lf_platform, port -> lf_port etc.

  2. Use paths (thanks Christian :))
    We can move all the header files out of the "core" folder and into the "include" folder. We put them like this:

core
include
-- reactor-c
---- platform.h
---- port.h
---- platform
------ lf_arduino.h

Then we put ~/include on the include path. This means that you have to do #include "reactor-c/platform.h" for all includes. I.e. you have to prepend reactor-c to all your includes. I think this latter solution is cleanest. We can at the same remove the symlink from include/core to core.

@lhstrh
Copy link
Member

lhstrh commented Jan 7, 2023

Based on conversation on Zulip, it appears that everyone so far is in favor of option 2.

@erlingrj
Copy link
Collaborator Author

OK. I will make a PR for this soon.

@erlingrj erlingrj self-assigned this Jan 13, 2023
@gundralaa
Copy link
Collaborator

#147
Changed for lf_types for nrf port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants