This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix warning in libf2c/libU77/hostnm_.c on glibc systems
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 04 Feb 2003 01:07:24 +0100
- Subject: Re: Fix warning in libf2c/libU77/hostnm_.c on glibc systems
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <u8el6p3cs6.fsf@gromit.moeb>
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)