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

cygwin - locale_utils.cc:112:3: error: ‘unsetenv’ was not declared in this scope #1027

Open
epilsits opened this issue Feb 27, 2019 · 3 comments

Comments

@epilsits
Copy link

Today's git fails with the following compile error on Windows 10.

locale_utils.cc:112:3: error: ‘unsetenv’ was not declared in this scope
   unsetenv( "LANG" );

First few lines of config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by mosh configure 1.3.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = exeter
uname -m = x86_64
uname -r = 3.0.1(0.338/5/3)
uname -s = CYGWIN_NT-10.0
uname -v = 2019-02-20 10:19

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /cygdrive/c/ProgramData/DockerDesktop/version-bin

The previous version I had was from Jan 2018, and it compiled OK for me.

@andersk
Copy link
Member

andersk commented Feb 27, 2019

Ggaaah. Feature test macros. Try make CPPFLAGS=-D_DEFAULT_SOURCE. This was almost certainly broken by a Cygwin change rather than a Mosh change, but nonetheless we should probably add this by default. (Except probably that's going to break some other platform and then we'll need feature tests for our feature test macros. Ggaaah.)

@epilsits
Copy link
Author

Lol. That did work, thank you.

To clarify though, I built version mosh 1.3.2 [build mosh-1.3.2-59-g10dca75] again today before updating from git, and it worked. So whatever changed wasn't only Cygwin.

@andersk
Copy link
Member

andersk commented Feb 27, 2019

You're right: this was exposed as a side effect of #990, since g++ -std=c++11 defines __STRICT_ANSI__ which disables _DEFAULT_SOURCE by default.

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