From: Jim Meyering Date: Tue, 16 Jan 2007 09:40:30 +0000 (+0000) Subject: * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct- X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d1a38221a4077759f4a25855d07dd44b93b1e93;p=pspp * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct- redefinition bug when using both and headers. * lib/readutmp.h: Likewise. Reported by Daniel Richard G. in . --- diff --git a/ChangeLog b/ChangeLog index dfae5c620e..113f9b72f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-01-15 Jim Meyering + + * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct- + redefinition bug when using both and headers. + * lib/readutmp.h: Likewise. Reported by Daniel Richard G. in + . + 2007-01-15 Bruno Haible * modules/striconveh: New file. diff --git a/lib/readutmp.h b/lib/readutmp.h index dd2efbb448..84cf117924 100644 --- a/lib/readutmp.h +++ b/lib/readutmp.h @@ -1,7 +1,6 @@ /* Declarations for GNU's read utmp module. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1992-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,6 +35,11 @@ /* HPUX 10.20 needs utmp.h, for the definition of e.g., UTMP_FILE. */ # include # endif +# if defined _THREAD_SAFE && defined UTMP_DATA_INIT + /* When including both utmp.h and utmpx.h on AIX 4.3, with _THREAD_SAFE + defined, work around the duplicate struct utmp_data declaration. */ +# define utmp_data gl_aix_4_3_workaround_utmp_data +# endif # include # define UTMP_STRUCT_NAME utmpx # define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_tv.tv_sec) diff --git a/m4/readutmp.m4 b/m4/readutmp.m4 index 33ed4e848a..2e520cd70c 100644 --- a/m4/readutmp.m4 +++ b/m4/readutmp.m4 @@ -1,5 +1,5 @@ -# readutmp.m4 serial 12 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# readutmp.m4 serial 13 +dnl Copyright (C) 2002-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -28,6 +28,11 @@ $ac_includes_default # include #endif #ifdef HAVE_UTMP_H +# if defined _THREAD_SAFE && defined UTMP_DATA_INIT + /* When including both utmp.h and utmpx.h on AIX 4.3, with _THREAD_SAFE + defined, work around the duplicate struct utmp_data declaration. */ +# define utmp_data gl_aix_4_3_workaround_utmp_data +# endif # include #endif "