summaryrefslogtreecommitdiffstats
path: root/contrib/opie/libmissing/getutline.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/opie/libmissing/getutline.c')
-rw-r--r--contrib/opie/libmissing/getutline.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/contrib/opie/libmissing/getutline.c b/contrib/opie/libmissing/getutline.c
index 9653950..0ceb76b 100644
--- a/contrib/opie/libmissing/getutline.c
+++ b/contrib/opie/libmissing/getutline.c
@@ -1,13 +1,16 @@
/* getutline.c: A replacement for the getutline() function
-%%% copyright-cmetz
-This software is Copyright 1996 by Craig Metz, All Rights Reserved.
+%%% copyright-cmetz-96
+This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved.
The Inner Net License Version 2 applies to this software.
You should have received a copy of the license with this software. If
you didn't get a copy, you may request one from <license@inner.net>.
History:
+ Modified by cmetz for OPIE 2.31. If the OS won't tell us where
+ _PATH_UTMP is, play the SVID game, then use
+ Autoconf-discovered values.
Created by cmetz for OPIE 2.3.
*/
@@ -18,6 +21,14 @@ you didn't get a copy, you may request one from <license@inner.net>.
static struct utmp u;
+#ifndef _PATH_UTMP
+#ifdef UTMP_FILE
+#define _PATH_UTMP UTMP_FILE
+#else /* UTMP_FILE */
+#define _PATH_UTMP PATH_UTMP_AC
+#endif /* UTMP_FILE */
+#endif /* _PATH_UTMP */
+
struct utmp *getutline FUNCTION((utmp), struct utmp *utmp)
{
FILE *f;
OpenPOWER on IntegriCloud