The problem here is that Cygwin is not translating the Windows error
correctly. I have proposed a patch
<https://cygwin.com/ml/cygwin-patches/2015-q1/msg00046.html> upstream. The
reason you see hostname working in Cygwin seems because they switched to
another hostname implementation than coreutils.

2015-03-12 13:01 GMT-03:00 Qian Hong <[email protected]>:

> Hi David,
>
> On Thu, Mar 12, 2015 at 5:22 PM, David Macek <[email protected]>
> wrote:
> > First, check if the `develop` branch of
> https://github.com/Alexpux/Cygwin has this change you want to test. Then:
> >
> > $ pacman -S --needed base-devel msys2-devel git mingw-w64-cross-gcc
> mingw-w64-cross-zlib zlib-devel gettext-devel libiconv-devel diffutils
> > $ git clone https://github.com/Alexpux/MSYS2-packages.git
> > $ cd MSYS2-packages/msys2-runtime
> > $ makepkg
> > $ pacman -U *.pkg.tar.xz
> >
> > Close all MSYS2 processes and you're good to go.
>
> Thanks a lot for the hint. I rebuilt latest msys2-runtime, but
> hostname.exe still fail on long name, reported "Operation not
> permitted" as before.
>
> Now I'm wondering if there is anything related to newlib VS winsup:
> there are two gethostname implementations, one is in
> newlib/libc/sys/linux/gethostname.c, the other is in
> winsup/cygwin/net.cc,
> is it possible that Cygwin is using the newlib version but MSYS2 is
> using the winsup version?
>
> Thanks a lot!
>
> --
> Regards,
> Qian Hong
>
> -
> http://www.winehq.org
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Msys2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/msys2-users
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to