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

[TODO] MinGW compilers no longer supported (regression). #1

Closed
zv-io opened this issue Dec 23, 2018 · 3 comments
Closed

[TODO] MinGW compilers no longer supported (regression). #1

zv-io opened this issue Dec 23, 2018 · 3 comments
Assignees

Comments

@zv-io
Copy link
Contributor

zv-io commented Dec 23, 2018

Using i686-w64-mingw32 and x86_64-w64-mingw32, the following error is produced, as the -H flag is "not yet implemented" by configure.sh and History support depends on termios.h, which is unavailable in MinGW.

This change occurred between 6bae85d (2018-12-14) and fb14efc (2018-12-22).

Testing C compilers...

CC (gcc) is not compatible with gcc/clang options

usage: ./configure.sh [-b|-d|-c] [-ghHSR] [-O OPT_LEVEL] [-k KARATSUBA_LEN]
...

The previous linenoise-based implementation worked well on Win32 save for a bug where a fresh line (returning from history) could not be reached, as first noted in IRC.

@gavinhoward
Copy link
Owner

So there are a couple of reasons why this is happening.

  1. As you said, <termios.h> does not exist.
  2. configure.sh does a full compile to test CC and HOSTCC. The reason for this at the time was that this project did not support compiling with the POSIX-standard c99 command. Now, it does, and such a test should be unnecessary.
  3. History is not supported, and never will be, on Windows. This means that the project is set to error on any compiler where BC_ENABLE_HISTORY is 1 and _WIN32 is defined.

I will try to get changes to fix this (for example, removing the testing compilers bit), but history will remain unsupported on Windows (and MinGW).

@gavinhoward
Copy link
Owner

@zv-io, can you check to see if 1545ffe solved your problem?

@gavinhoward gavinhoward self-assigned this Dec 24, 2018
@gavinhoward
Copy link
Owner

OP has said on IRC that issue is fixed by 959375c.

gavinhoward pushed a commit that referenced this issue May 13, 2020
Pull request description:

> bump _POSIX_C_SOURCE to 200809L, remove _XOPEN_SOURCE' (#1)
> from e5ten/bc:posix-c into master
gavinhoward pushed a commit that referenced this issue May 14, 2020
This reverts commit a054de4, reversing
changes made to a43c650.
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

2 participants