This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix warning in libf2c/libU77/hostnm_.c on glibc systems


Andreas Jaeger wrote:

Compiling hostnm_.c on a glibc 2.2.5 system, I get this warning:

/cvs/gcc/libf2c/libU77/hostnm_.c: In function `G77_hostnm_0':
/cvs/gcc/libf2c/libU77/hostnm_.c:39: warning: implicit declaration of function `gethostname'

The problem is that gethostname is only available in certain context,
e.g. with
#define _GNU_SOURCE 1
or #define _XOPEN_SOURCE 600L
Well, I'm not sure either, mostly because I do not know what _XOPEN_SOURCE 600L implies, altogether. So lets aim for the conservative here.

Please apply your patch - Thanks !

--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]