+2003-12-05 Tom Yu <tlyu@mit.edu>
+
+ * configure.in: Add support for building an LD_PRELOAD object for
+ Solaris, used by util/Makefile.in.
+
2003-09-26 Ken Raeburn <raeburn@mit.edu>
* aclocal.m4 (KRB5_AC_MAINTAINER_MODE): New macro.
+2003-12-05 Tom Yu <tlyu@mit.edu>
+
+ * shlib.conf: Add Solaris support for LD_PRELOAD.
+
2003-09-26 Ken Raeburn <raeburn@mit.edu>
* post.in (configure): Make configure depend on configure.in and
CC_LINK_SHARED='$(PURE) $(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(PURE) $(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ case $krb5_cv_host in
+ *-*-solaris2.9*)
+ case $krb5_cv_prog_cc in
+ # XXX need better test for 64-bit compilation
+ *xarch=v9*)
+ RUN_ENV="$RUN_ENV"' LD_PRELOAD_64=$(BUILDTOP)/util/exitsleep; export LD_PRELOAD_64;'
+ ;;
+ *)
+ RUN_ENV="$RUN_ENV"' LD_PRELOAD_32=$(BUILDTOP)/util/exitsleep; export LD_PRELOAD_32;'
+ ;;
+ esac
+ esac
;;
*-*-sunos*)
if test -n "$KRB4_LIB"; then
AC_CONFIG_SUBDIRS(krb524)
fi
+case $krb5_cv_host in
+*-*-solaris2.9*)
+ if test "$krb5_cv_prog_gcc" = yes; then
+ DL_COMPILE='$(CC) -fpic -G -nostdlib'
+ DL_COMPILE_TAIL='-lc -ldl'
+ else
+ DL_COMPILE='$(CC) -Kpic -G'
+ DL_COMPILE_TAIL='-ldl'
+ fi
+ EXITSLEEP_TARG=exitsleep
+ ;;
+esac
+AC_SUBST(DL_COMPILE)
+AC_SUBST(DL_COMPILE_TAIL)
+AC_SUBST(EXITSLEEP_TARG)
+
AC_CONFIG_SUBDIRS(kdc kadmin slave clients appl tests)
AC_CONFIG_FILES(krb5-config, [chmod +x krb5-config])
V5_AC_OUTPUT_MAKEFILE(. util util/send-pr lib config-files gen-manpages)
+2003-12-05 Tom Yu <tlyu@mit.edu>
+
+ * env-setup.shin: Allow BUILDTOP substitution.
+
2003-05-13 Ken Raeburn <raeburn@mit.edu>
* start_servers_local: Set KRB5RCACHEDIR.
# The shared library run time setup
TOPLIBD=@RBUILD@/lib
PROG_LIBPATH=-L@RBUILD@/lib
+BUILDTOP=@RBUILD@
# XXX kludge!
PROG_RPATH=@RBUILD@/lib
# This converts $(TOPLIBD) to $TOPLIBD
+2003-12-05 Tom Yu <tlyu@mit.edu>
+
+ * Makefile.in (DL_COMPILE, DL_COMPILE_TAIL): New variables to
+ support compilation of the exitsleep LD_PRELOAD object.
+
+ * exitsleep.c: New file. LD_PRELOAD object for Solaris, to work
+ around a kernel bug where final output prior to a pty close gets
+ lost.
+
2003-05-23 Ken Raeburn <raeburn@mit.edu>
* depfix.sed: Don't check for krb524 headers.
HAVE_GCC=@HAVE_GCC@
SLIBSH=sed -e 's|@''CC''@|$(CC)|g' -e 's,@''HOST_TYPE''@,$(HOST_TYPE),g' -e 's,@''HAVE_GCC''@,$(HAVE_GCC),g'
-all-recurse: libupdate makeshlib
+DL_COMPILE=@DL_COMPILE@
+DL_COMPILE_TAIL=@DL_COMPILE_TAIL@
+
+all-recurse: libupdate makeshlib @EXITSLEEP_TARG@
all-mac::
NO_OUTDIR=1
$(RM) $@ $@.tmp
$(SLIBSH) $(srcdir)/makeshlib.sh >$@.tmp&&chmod a+x $@.tmp&&mv $@.tmp $@
+exitsleep: $(srcdir)/exitsleep.c
+ $(DL_COMPILE) -oexitsleep $(srcdir)/exitsleep.c $(DL_COMPILE_TAIL)
+
clean::
$(RM) libupdate makeshlib
--- /dev/null
+/*
+ * util/exitsleep.c
+ *
+ * Copyright (C) 2003 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ * Kludge to sleep 100ms prior to exit on Solaris 9 to work around a
+ * pty bug.
+ */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <dlfcn.h>
+#include <link.h>
+
+void
+exit(int status)
+{
+ void (*realexit)(int);
+ struct timeval tv;
+
+ tv.tv_sec = 0;
+ tv.tv_usec = 100000;
+ realexit = (void (*)(int))dlsym(RTLD_NEXT, "exit");
+ select(0, 0, 0, 0, &tv);
+ realexit(status);
+}