+2004-06-11 Ken Raeburn <raeburn@mit.edu>
+
+ * pty-int.h (_AIX && _THREAD_SAFE): Undefine _THREAD_SAFE.
+
2004-06-04 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBBASE): Renamed from LIB.
#ifndef __PTY_INT_H__
#include <pty_err.h>
#include <sys/types.h>
+
+#if defined(_AIX) && defined(_THREAD_SAFE)
+/* On AIX 4.3.3, both utmp.h and utmpx.h will define struct utmp_data,
+ and they'll define them differently, if _THREAD_SAFE is defined.
+
+ We don't actually care about this library being thread-safe, but
+ for various reasons we do use both versions of the interface at the
+ moment.
+
+ So trick the system headers into not "helping" us in that area.
+
+ This is an ugly hack, and shouldn't be needed. Bleah. */
+# undef _THREAD_SAFE
+#endif
+
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif