head 1.3; access; symbols pkgsrc-2017Q3:1.2.0.60 pkgsrc-2017Q3-base:1.2 pkgsrc-2017Q2:1.2.0.56 pkgsrc-2017Q2-base:1.2 pkgsrc-2017Q1:1.2.0.54 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.52 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.50 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.48 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.46 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.44 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.2.0.42 pkgsrc-2015Q3-base:1.2 pkgsrc-2015Q2:1.2.0.40 pkgsrc-2015Q2-base:1.2 pkgsrc-2015Q1:1.2.0.38 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.2.0.36 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.34 pkgsrc-2014Q3-base:1.2 pkgsrc-2014Q2:1.2.0.32 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.2.0.30 pkgsrc-2014Q1-base:1.2 pkgsrc-2013Q4:1.2.0.28 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.26 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.24 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.2.0.22 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.2.0.20 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.18 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.2.0.16 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.14 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.12 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.10 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.8 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.6 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.4 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.2.0.2 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.1.1.1.0.12 pkgsrc-2010Q2-base:1.1.1.1 pkgsrc-2010Q1:1.1.1.1.0.10 pkgsrc-2010Q1-base:1.1.1.1 pkgsrc-2009Q4:1.1.1.1.0.8 pkgsrc-2009Q4-base:1.1.1.1 pkgsrc-2009Q3:1.1.1.1.0.6 pkgsrc-2009Q3-base:1.1.1.1 pkgsrc-2009Q2:1.1.1.1.0.4 pkgsrc-2009Q2-base:1.1.1.1 pkgsrc-2009Q1:1.1.1.1.0.2 pkgsrc-2009Q1-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2017.09.28.04.45.11; author wiz; state dead; branches; next 1.2; commitid RLmQ4xwjIhVA5V8A; 1.2 date 2010.07.19.12.32.24; author sno; state Exp; branches; next 1.1; 1.1 date 2009.03.22.21.17.03; author sno; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2009.03.22.21.17.03; author sno; state Exp; branches; next ; desc @@ 1.3 log @p5-Sys-Utmp: update to 1.7. Changes not documented. @ text @$NetBSD: patch-aa,v 1.2 2010/07/19 12:32:24 sno Exp $ --- Utmp.xs.orig 2006-10-13 14:10:30.000000000 +0000 +++ Utmp.xs @@@@ -4,24 +4,24 @@@@ #include -#ifdef NOUTFUNCS +#ifdef _AIX +#define _HAVE_UT_HOST 1 +#endif -#include -#include -#include -#include -#include -#include -#include -#include +/* + It is almost certain that if these are not defined the fields they are + for are not present or this is BSD :) +*/ #ifdef BSD #define _NO_UT_ID #define _NO_UT_TYPE #define _NO_UT_PID #define ut_user ut_name +#define _HAVE_UT_HOST 1 #endif + /* define these so it still works as documented :) */ @@@@ -43,21 +43,15 @@@@ #endif -/* - It is almost certain that if these are not defined the fields they are - for are not present or this is BSD :) -*/ - - -#ifndef UT_LINESIZE -# define UT_LINESIZE 32 -#endif -#ifndef UT_NAMESIZE -# define UT_NAMESIZE 32 -#endif -#ifndef UT_HOSTSIZE -# define UT_HOSTSIZE -#endif +#ifdef NOUTFUNCS +#include +#include +#include +#include +#include +#include +#include +#include static int ut_fd = -1; @@@@ -207,7 +201,7 @@@@ SV *self static SV *ut_ref; static char *_ut_id; static struct utmp *utent; - static char ut_host[UT_HOSTSIZE]; + static char ut_host[sizeof(utent->ut_host)]; HV *self_hash; @@@@ -249,9 +243,9 @@@@ SV *self ut_tv = (IV)utent->ut_time; #endif #ifdef _HAVE_UT_HOST - strncpy(ut_host, utent->ut_host,UT_HOSTSIZE); + strncpy(ut_host, utent->ut_host,sizeof(utent->ut_host)); #else - strcpy(ut_host, "",1); + strncpy(ut_host, "",1); #endif @ 1.2 log @Updating sysutils/p5-Sys-Utmp from 1.6 to 1.6nb1 to remark some fixes: - Fix Utmp.xs to compile on NetBSD (fixes PR pkg/42082) - Apply patch from RT#52369 (FreeBSD 7.2: compilation error and host support) see https://rt.cpan.org/Ticket/Display.html?id=52369 @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d1 5 a5 3 --- Utmp.xs.orig 2006-10-13 16:10:30.000000000 +0200 +++ Utmp.xs 2009-02-13 13:45:12.000000000 +0100 @@@@ -4,8 +4,11 @@@@ d14 12 a25 7 +#ifdef NOUTFUNCS #include #include #include @@@@ -15,6 +18,7 @@@@ #include #include a26 1 + d30 3 a32 2 @@@@ -42,23 +46,12 @@@@ #define ACCOUNTING 9 d35 1 a35 1 - d37 1 a37 2 It is almost certain that if these are not defined the fields they are for are not present or this is BSD :) d39 2 d43 6 d58 10 a67 1 - d70 1 a70 2 static char _ut_name[] = _PATH_UTMP; @@@@ -207,7 +200,7 @@@@ d79 1 a79 1 @@@@ -249,9 +242,9 @@@@ @ 1.1.1.1 log @Importing package for Sys::Utmp - an object(ish) interface to UTMP files. Sys::Utmp provides a vaguely object oriented interface to the Unix user accounting file (sometimes /etc/utmp or /var/run/utmp). Whilst it would prefer to use the getutent() function from the systems C libraries it will attempt to provide its own if they are missing. Oked by joerg@@ @ text @@