the old version to macosx-pastebin-native.
- document the -uc option (exg).
- assertions in libev are now enabled depending on frills.
+ - work around arrogant bsd idiocies again: netbsd spills the default
+ namespace with lots of symbols "for gnu/gcc compatibility" even
+ though neither of them does it, and then calls the rest of the world
+ in need of fixing. go figure.
9.06 Sat Nov 8 17:47:18 CET 2008
- NOTICE: this release updates terminfo/termcap.
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
+/* "use syscall interface for clock_gettime" */
+#undef HAVE_CLOCK_SYSCALL
+
/* Define to 1 if you have the <cwchar> header file. */
#undef HAVE_CWCHAR
/* Define to 1 if you have the `setuid' function. */
#undef HAVE_SETUID
+/* Define to 1 if you have the `signalfd' function. */
+#undef HAVE_SIGNALFD
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
+/* Define to 1 if you have the <sys/signalfd.h> header file. */
+#undef HAVE_SYS_SIGNALFD_H
+
/* Define to 1 if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
-for ac_header in sys/inotify.h sys/epoll.h sys/event.h sys/queue.h port.h poll.h sys/select.h sys/eventfd.h
+
+for ac_header in sys/inotify.h sys/epoll.h sys/event.h sys/queue.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd
+
+for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
:
else
- if test -z "$LIBEV_M4_AVOID_LIBRT"; then
+ if test $(uname) = Linux; then
+ { echo "$as_me:$LINENO: checking for clock_gettime syscall" >&5
+echo $ECHO_N "checking for clock_gettime syscall... $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 <syscall.h>
+ #include <time.h>
+int
+main ()
+{
+struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_have_clock_syscall=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CLOCK_SYSCALL 1
+_ACEOF
+
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then
{ echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6; }
-
-
# Extract the first word of "tic", so it can be a program name with args.
set dummy tic; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
#define EV_USE_POLL 0
#define EV_USE_INOTIFY 0
#define EV_USE_EVENTFD 0
+#define EV_USE_SIGNALFD 0
#define EV_MULTIPLICITY 0
#define EV_PERIODIC_ENABLE 0
#define EV_STAT_ENABLE 0
compare_priority (keysym_t *a, keysym_t *b)
{
// (the more '1's in state; the less range): the greater priority
- int ca = popcount (a->state /* & OtherModMask */);
- int cb = popcount (b->state /* & OtherModMask */);
+ int ca = rxvt_popcount (a->state /* & OtherModMask */);
+ int cb = rxvt_popcount (b->state /* & OtherModMask */);
if (ca != cb)
return ca - cb;
if (screen->visual->c_class == TrueColor)
{
- c.pixel = (color.r >> (16 - popcount (screen->visual->red_mask )) << ctz (screen->visual->red_mask ))
- | (color.g >> (16 - popcount (screen->visual->green_mask)) << ctz (screen->visual->green_mask))
- | (color.b >> (16 - popcount (screen->visual->blue_mask )) << ctz (screen->visual->blue_mask ));
+ c.pixel = (color.r >> (16 - rxvt_popcount (screen->visual->red_mask )) << rxvt_ctz (screen->visual->red_mask ))
+ | (color.g >> (16 - rxvt_popcount (screen->visual->green_mask)) << rxvt_ctz (screen->visual->green_mask))
+ | (color.b >> (16 - rxvt_popcount (screen->visual->blue_mask )) << rxvt_ctz (screen->visual->blue_mask ));
return true;
}
}
#if !HAVE_GCC_BUILTINS
-int ctz (unsigned int x) CONST
+int rxvt_ctz (unsigned int x) CONST
{
int r = 0;
return r;
}
-int popcount (unsigned int x) CONST
+int rxvt_popcount (unsigned int x) CONST
{
x -= (x >> 1) & 0x55555555;
x = ((x >> 2) & 0x33333333) + (x & 0x33333333);
// some bit functions, xft fuck me plenty
#if HAVE_GCC_BUILTINS
-static inline int ctz (unsigned int x) { return __builtin_ctz (x); }
-static inline int popcount (unsigned int x) { return __builtin_popcount (x); }
+/* netbsd stupidly defines popcount itself and puts it into string.h */
+static inline int rxvt_ctz (unsigned int x) { return __builtin_ctz (x); }
+static inline int rxvt_popcount (unsigned int x) { return __builtin_popcount (x); }
#else
// count trailing zero bits and count # of one bits
-int ctz (unsigned int x) CONST;
-int popcount (unsigned int x) CONST;
+int rxvt_ctz (unsigned int x) CONST;
+int rxvt_popcount (unsigned int x) CONST;
#endif
// in range including end