on a few architectures). Reported by darix.
- include one trailing space in rectangular selections to indicate
the inserted newline (yeah, weird, but visually more pleasing).
- - try to use sched_yield to improve terminal data transfer efficiency.
+ - try to use sched_yield to (drastically) improve terminal data
+ transfer efficiency.
- further minor cleanups.
6.1 Tue Dec 27 13:23:40 CET 2005
/* Needed to get declarations for msg_control and msg_controllen on Solaris */
#undef __EXTENSIONS__
+/* Define if you have sched-h and sched_yield */
+#undef HAVE_SCHED_YIELD
+
/* Build shared library version - specify via configure only */
#undef LIBRXVT
AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])])
AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])])
+dnl sched_yield to improve terminal efficiency
+AC_MSG_CHECKING(for sched_yield support)
+AC_TRY_LINK([#include <sched.h>],[sched_yield ()],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SCHED_YIELD, 1, Define if you have sched-h and sched_yield)],
+ [AC_MSG_RESULT(no)])
+
dnl AC_ENABLE_SHARED(no)dnl# libtool
dnl AC_ENABLE_STATIC(yes)dnl# libtool
dnl AC_PROG_LIBTOOL()dnl# libtool
fi
+echo "$as_me:$LINENO: checking for sched_yield support" >&5
+echo $ECHO_N "checking for sched_yield support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sched.h>
+int
+main ()
+{
+sched_yield ()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SCHED_YIELD 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
MALLOC_TYPE=S
#include "version.h"
#include "command.h"
+#if HAVE_SCHED_YIELD
+# include <sched.h>
+#endif
+
#ifdef KEYSYM_RESOURCE
# include "keyboard.h"
#endif
#include <csignal>
-#define HAVE_SCHED_YIELD 1 //D//TODO//FIXME
-#if HAVE_SCHED_YIELD
-# include <sched.h>
-#endif
-
/*----------------------------------------------------------------------*/
#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)