From 62068fafcb40c2f91d31cf3fa5e775ecc52a6ba8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Aug 2020 10:15:04 +0000 Subject: syscall: support sparc64 (and maybe other big-endian systems) Thanks to the GCC compile farm project, we can wire up syscalls for sparc64 and set system-specific SFD_* constants properly. I've FINALLY figured out how to use POSIX::SigSet to generate a usable buffer for the syscall perlfunc. This is required for endian-neutral behavior and relevant to sparc64, at least. There's no need for signalfd-related stuff to be constants, either. signalfd initialization is never a hot path and a stub subroutine for constants uses several KB of memory in the interpreter. We'll drop the needless SEEK_CUR import while we're importing O_NONBLOCK, too. --- script/public-inbox-watch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script') diff --git a/script/public-inbox-watch b/script/public-inbox-watch index c07d45d7..20534bf2 100755 --- a/script/public-inbox-watch +++ b/script/public-inbox-watch @@ -7,7 +7,7 @@ use PublicInbox::WatchMaildir; use PublicInbox::Config; use PublicInbox::DS; use PublicInbox::Sigfd; -use PublicInbox::Syscall qw(SFD_NONBLOCK); +use PublicInbox::Syscall qw($SFD_NONBLOCK); my $oldset = PublicInbox::Sigfd::block_signals(); STDOUT->autoflush(1); STDERR->autoflush(1); @@ -35,7 +35,7 @@ if ($watch_md) { unless (grep(/\A--no-scan\z/, @ARGV)) { PublicInbox::DS::requeue($scan); } - my $sigfd = PublicInbox::Sigfd->new($sig, SFD_NONBLOCK); + my $sigfd = PublicInbox::Sigfd->new($sig, $SFD_NONBLOCK); local %SIG = (%SIG, %$sig) if !$sigfd; if (!$sigfd) { PublicInbox::Sigfd::set_sigmask($oldset); -- cgit v1.2.3-24-ge0c7