This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

New warnings in utmpx.h + patch



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

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