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

Fix c99 compilation #317

Merged
merged 4 commits into from
Jan 12, 2024
Merged

Conversation

jean-roland
Copy link
Contributor

C99 compilation was broken because of the usage of c11 generics macros:

  • Tests are only built with c11 standard as they use generics.
  • c99 examples are patched to avoid using c11 generics.
  • A c99 compilation test was added to the CI to avoid this kind of issue going unnoticed in the future.

@Mallets Mallets merged commit 0f36124 into eclipse-zenoh:master Jan 12, 2024
48 checks passed
@jean-roland jean-roland deleted the fix_c99_compilation branch January 12, 2024 14:18
Copy link
Member

@cguimaraes cguimaraes left a comment

Choose a reason for hiding this comment

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

LGTM

p-avital pushed a commit that referenced this pull request Jan 17, 2024
* fix: build tests only in c11

* fix: remove c11 macros from examples

* feat: add a way to force c99 standard

* ci: add a c99 compilation test
Mallets pushed a commit that referenced this pull request Jan 18, 2024
* attachment API implemented, todo: integration with options and codecs

* Fix c99 compilation (#317)

* fix: build tests only in c11

* fix: remove c11 macros from examples

* feat: add a way to force c99 standard

* ci: add a c99 compilation test

* Attachments validated on pub/sub

* fix uses of this which breaks C++ compilation

* remove inlines that should not have been there

* move this fixes

* fix merge goofs

* disable query/reply attachments for to release pub/sub attachments

* fix initialization in _z_msg_make_query

* increase timeout for single thread action

* remove accidental internal header inclusions

* getting desperate for single-thread CI to link this

* fix default constructor for put options

* fix default options

* remove accidentatlly included valgrind core file

* back to 5 min timeout for ST test

* make attachments optional

* oops

* z_bytes: expose wrap and rename new to from_str

---------

Co-authored-by: Jean-Roland Gosse <[email protected]>
p-avital pushed a commit that referenced this pull request Jan 18, 2024
* Fix c99 compilation (#317)

* fix: build tests only in c11

* fix: remove c11 macros from examples

* feat: add a way to force c99 standard

* ci: add a c99 compilation test

* fix: set correct session pointer type

* refactor: rename sptr to rc

* feat: add compiler based definition

* fix: allocate int instead of int pointer

* fix: align implementation counter size

* fix: require single thread config to use single thread implem

* feat: add c99 gcc rc implementation

* refactor: rename derived sptr types to rc

* feat: name anon struct for forward declaration

* feat: add _z_session refcounter type

* chore: clang-format

* chore: update gitignore

* build: add compiler id log

* build: add compiler symbol on platformio builds

* feat: remove superfluous function

* feat: go through indirect session pointer

* fix: use correct type type for session pointers

* feat: use session ref counter in z_session

* fix: prevent segfault when clearing empty session

* fix: drop owned config all the time

* feat: add new_from_val rc function

* feat: switch publisher sesssion ptr to rc

* feat: switch subscriber session ptr to rc

* fix: remove unnecessary dependency

* fix: add necessary dependency

* feat: switch queryable session ptr to rc

* refactor: flatten queryable primitives

* refactor: flatten subscriber primitives

* refactor: flatten publisher primitives

* feat: change rc to use a single inner pointer

* feat: mutualize rc code between implems

* chore: clang-format

* fix: compilation issues
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

Successfully merging this pull request may close these issues.

3 participants