Date: Mon, 11 Jan 2010 16:27:56 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r202086 - head/contrib/opie/libopie Message-ID: <201001111627.o0BGRuov013179@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Mon Jan 11 16:27:56 2010 New Revision: 202086 URL: http://svn.freebsd.org/changeset/base/202086 Log: Don't include <utmp.h> when using <utmpx.h>. libopie includes both <utmp.h> and <utmpx.h> in this case and uses some #defines to let the code use struct utmpx and its utility functions. We'd better not include <utmp.h> here, because maybe it will not be present in the future. Modified: head/contrib/opie/libopie/getutmpentry.c head/contrib/opie/libopie/insecure.c head/contrib/opie/libopie/login.c Modified: head/contrib/opie/libopie/getutmpentry.c ============================================================================== --- head/contrib/opie/libopie/getutmpentry.c Mon Jan 11 16:01:20 2010 (r202085) +++ head/contrib/opie/libopie/getutmpentry.c Mon Jan 11 16:27:56 2010 (r202086) @@ -15,13 +15,14 @@ you didn't get a copy, you may request o #include "opie_cfg.h" #include <stdio.h> #include <sys/types.h> -#include <utmp.h> #if DOUTMPX #include <utmpx.h> #define setutent setutxent #define getutline(x) getutxline(x) #define utmp utmpx +#else +#include <utmp.h> #endif /* DOUTMPX */ #if HAVE_STRING_H Modified: head/contrib/opie/libopie/insecure.c ============================================================================== --- head/contrib/opie/libopie/insecure.c Mon Jan 11 16:01:20 2010 (r202085) +++ head/contrib/opie/libopie/insecure.c Mon Jan 11 16:27:56 2010 (r202086) @@ -39,11 +39,12 @@ $FreeBSD$ #include <sys/param.h> #include <unistd.h> -#include <utmp.h> #if DOUTMPX #include <utmpx.h> #define utmp utmpx #define endutent endutxent +#else +#include <utmp.h> #endif /* DOUTMPX */ #if HAVE_SYS_UTSNAME_H Modified: head/contrib/opie/libopie/login.c ============================================================================== --- head/contrib/opie/libopie/login.c Mon Jan 11 16:01:20 2010 (r202085) +++ head/contrib/opie/libopie/login.c Mon Jan 11 16:27:56 2010 (r202086) @@ -21,13 +21,14 @@ you didn't get a copy, you may request o #include "opie_cfg.h" #include <stdio.h> #include <sys/types.h> -#include <utmp.h> #if DOUTMPX #include <utmpx.h> #define pututline(x) pututxline(x) #define endutent endutxent #define utmp utmpx +#else +#include <utmp.h> #endif /* DOUTMPX */ #if HAVE_STRING_H
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001111627.o0BGRuov013179>