* New warnings in utmpx.h + patch
@ 1999-05-15 8:30 Andreas Jaeger
1999-05-15 8:33 ` H.J. Lu
1999-05-15 9:32 ` Ulrich Drepper
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Jaeger @ 1999-05-15 8:30 UTC (permalink / raw)
To: libc-hacker
With make check I received the following warning:
In file included from tst-utmp.c:28,
from tst-utmpx.c:2:
../sysdeps/gnu/utmpx.h:66: warning: `struct utmp' declared inside parameter list
../sysdeps/gnu/utmpx.h:66: warning: its scope is only this definition or declara
tion,
../sysdeps/gnu/utmpx.h:66: warning: which is probably not what you want.
../sysdeps/gnu/utmpx.h:70: warning: `struct utmp' declared inside parameter list
Since getutmp and getutmpx use struct utmp we should include <utmp.h>
(Solaris also includes <utmp.h>).
Andreas
1999-05-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/gnu/utmpx.h: Include <utmp.h>.
--- sysdeps/gnu/utmpx.h.~1~ Fri May 14 07:49:08 1999
+++ sysdeps/gnu/utmpx.h Sat May 15 15:53:15 1999
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
@@ -27,6 +27,11 @@
/* Get system dependent values and data structures. */
#include <bits/utmpx.h>
+/* Get struct utmp. */
+#ifdef __USE_GNU
+# include <utmp.h>
+#endif
+
#ifdef __USE_GNU
/* Compatibility names for the strings of the canonical file names. */
# define UTMPX_FILE _PATH_UTMPX
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: New warnings in utmpx.h + patch
1999-05-15 8:30 New warnings in utmpx.h + patch Andreas Jaeger
@ 1999-05-15 8:33 ` H.J. Lu
1999-05-15 9:32 ` Ulrich Drepper
1 sibling, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1999-05-15 8:33 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-hacker
>
>
> With make check I received the following warning:
>
> In file included from tst-utmp.c:28,
> from tst-utmpx.c:2:
> ../sysdeps/gnu/utmpx.h:66: warning: `struct utmp' declared inside parameter list
> ../sysdeps/gnu/utmpx.h:66: warning: its scope is only this definition or declara
> tion,
> ../sysdeps/gnu/utmpx.h:66: warning: which is probably not what you want.
> ../sysdeps/gnu/utmpx.h:70: warning: `struct utmp' declared inside parameter list
>
> Since getutmp and getutmpx use struct utmp we should include <utmp.h>
> (Solaris also includes <utmp.h>).
>
> Andreas
>
> 1999-05-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
>
> * sysdeps/gnu/utmpx.h: Include <utmp.h>.
>
I much prefer to use forward declaration, i.e.,
struct utmp;
H.J.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: New warnings in utmpx.h + patch
1999-05-15 8:30 New warnings in utmpx.h + patch Andreas Jaeger
1999-05-15 8:33 ` H.J. Lu
@ 1999-05-15 9:32 ` Ulrich Drepper
1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Drepper @ 1999-05-15 9:32 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: libc-hacker
Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:
> Since getutmp and getutmpx use struct utmp we should include <utmp.h>
> (Solaris also includes <utmp.h>).
I've made appropriate changes. Thanks,
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-05-15 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-15 8:30 New warnings in utmpx.h + patch Andreas Jaeger
1999-05-15 8:33 ` H.J. Lu
1999-05-15 9:32 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).