Skip to content

cmake: c99 isn't really required, only enable compiler extensions. #57

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

Merged
merged 1 commit into from
May 2, 2025

Conversation

sezero
Copy link
Contributor

@sezero sezero commented May 2, 2025

also make example program to build in c90 mode.

CC: @mmontag

also make example program to build in c90 mode.
@mmontag
Copy link
Collaborator

mmontag commented May 2, 2025

I asked Copilot for fun. Will merge if you don't see anything surprising here:

The FluidLite repository uses some C99 constructs, as observed from the code snippets. Here are key findings:

  1. C99-Specific Features Identified:

    • Usage of inline keyword in various files such as libvorbis-1.3.5/lib/os.h and others.
    • Inclusion of C99 headers like <stdint.h> in multiple files, e.g., libogg-1.3.2/include/ogg/config_types.h.
    • Use of __attribute__((constructor)) in src/fluid_init.c, which is a GCC-specific feature commonly associated with C99 or later.
  2. Other Observations:

    • Some files include macros and constructs (#define) that may indicate compatibility with certain C99 features.
    • There are instances of comments using // which are valid in C99 but not in ANSI C (C90).

For full compatibility with ANSI C (C90), these constructs would need to be refactored or replaced. Let me know if you'd like assistance in determining specific changes needed for C90 compatibility!

@sezero
Copy link
Contributor Author

sezero commented May 2, 2025

The dependencies' reliances shouldn't affect fluidlite, and considering the dependency is libvorbis, it was written years ago w/o c99 in mind. I was actually able to build fluidlite using gcc2.95 which says something.

In any case, feel free to ignore this one.

P.S.: You can also drop the c99 thing from y-the cmake script entirely. (tell me if you want such a thing.)

@mmontag mmontag merged commit b04ed28 into divideconcept:master May 2, 2025
@sezero sezero deleted the cmake branch May 2, 2025 22:15
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.

2 participants