Skip to content

Add example use with autotools - #272

Merged
BrianSipos merged 10 commits into
mainfrom
add-example-autotools
Aug 18, 2026
Merged

Add example use with autotools#272
BrianSipos merged 10 commits into
mainfrom
add-example-autotools

Conversation

@BrianSipos

@BrianSipos BrianSipos commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Related to guide updates for NASA-AMMOS/BSL-docs#38.

Part of this update cleans up the public interface of BSL to avoid leaking internal implementation details.

@BrianSipos BrianSipos added this to the BSL v2.0.0 milestone Aug 11, 2026
@BrianSipos BrianSipos self-assigned this Aug 11, 2026
@github-project-automation github-project-automation Bot moved this to Todo in BSL Aug 11, 2026
@BrianSipos BrianSipos added the documentation Improvements or additions to documentation label Aug 11, 2026
@BrianSipos
BrianSipos marked this pull request as ready for review August 12, 2026 14:11
@BrianSipos
BrianSipos requested a review from a team as a code owner August 12, 2026 14:11
@BrianSipos BrianSipos moved this from Todo to In Progress in BSL Aug 12, 2026
@BrianSipos

Copy link
Copy Markdown
Collaborator Author

@250MHz it was discovered that because the BSL public interface uses struct timespec its API requires a minimum POSIX version on the user compiling side. This change adds a corresponding define to the pkg-config control for bsl. Does this seem reasonable for your use? Any alternative would need manual user config of the compiler to be compatible, but would allow for other compatibility.

@250MHz

250MHz commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

@250MHz it was discovered that because the BSL public interface uses struct timespec its API requires a minimum POSIX version on the user compiling side. This change adds a corresponding define to the pkg-config control for bsl. Does this seem reasonable for your use? Any alternative would need manual user config of the compiler to be compatible, but would allow for other compatibility.

I think ION uses the same _POSIX_C_SOURCE as BSL and the macro is currently available in all our files (ION does this incorrectly, IMO), so it wouldn't affect us, but I'm not sure if putting feature test macros into the .pc's Cflags is desirable. I'd have to look more into how other libraries handle feature test macros.

But does struct timespec only appear in public headers at

void (*log_event)(const struct timespec *timestamp, int severity, const char *filename, int lineno,
const char *funcname, const char *format, va_list args);
and
void mock_bpa_LogEvent(const struct timespec *timestamp, int severity, const char *filename, int lineno,
const char *funcname, const char *format, va_list args);

If so, does struct timespec even need to be defined since these are pointers? Can we just forward declare struct timespec and not have to worry about feature test macros?

@BrianSipos

Copy link
Copy Markdown
Collaborator Author

That is true and simplifies configuration. I will update to forward declare this and add an explanation in the product guide.

@sonarqubecloud

Copy link
Copy Markdown

@mfarina1 mfarina1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving this now so that once Brian does the forward declare update, he can merge the PR

@BrianSipos
BrianSipos merged commit 65bd40d into main Aug 18, 2026
25 checks passed
@BrianSipos
BrianSipos deleted the add-example-autotools branch August 18, 2026 17:23
@github-project-automation github-project-automation Bot moved this from In Progress to Done in BSL Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants