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

Modify include guards in cmd.c so that Windows compilers don't compil… #291

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

cr1901
Copy link
Contributor

@cr1901 cr1901 commented Apr 27, 2024

…e Unix-only code.

In 7fd4b01, functions like alphasort and scandir that are not available on Windows were added to a codepath that Windows compilers can see (when compiling, for instance, using a C++ compiler). This leads to errors such as: src/base/cmd/cmd.c:1904:21: error: 'scandir' was not declared in this scope; did you mean 'srand'?.

I've updated the include guards to work around those codepaths, and confirmed a successful compile and test run (synth_ice40 on a non-empty design) with yosys. These changes took a while to propagate to yosys, which is why it took me a while to notice.

@alanminko
Copy link
Contributor

Thank you for fixing this issue.

@alanminko alanminko merged commit 848dc0d into berkeley-abc:master Apr 29, 2024
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.

None yet

2 participants