On 06/24/2016 11:01 PM, Tatsuro MATSUOKA wrote:


----- Original Message -----
From: John W. Eaton <j...@octave.org>
To: gnulib <bug-gnulib@gnu.org>
Cc: j...@octave.org
Date: 2016/6/25, Sat 04:46
Subject: gethostname on 64-bit Windows

I needed the attached change to cross compile Octave for i686-w64-mingw32.

Without it, rpl_gethostname was undefined because w64 has a gethostname function
so gethostname.c is not added to the list of files to build but gethostname was
still being redefined to rpl_gethostname.

jwe


gethostname on 64-bit Windows

I needed the attached change to cross compile Octave for i686-w64-mingw32.


This is not related to your patch.

The hostname Mingw w64 64 bit is x86_64-w64-mingw32.
The hostname Mingw w64 32 bit is i686-w64-mingw32.

Sorry, I copied the wrong system ID into the message.  It should have been:

  x86_64-w64-mingw32

I was cross compiling to x86_64-w64-mingw32, which appears to have a gethostname function (HAVE_GETHOSTNAME is defined to 1) but without my patch, the code in gnulib's unistd.in.h file will define gethostname to rpl_gethostname, and gethostname is not added to gl_LIBOBJS and gl_LTLIBOBJS. I think it is sufficient to just avoid the #define in this case.

jwe


Reply via email to