From dd941df19d92e4122aec035e03c5c7a63cd7459b Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Sat, 5 May 2012 05:45:29 -0400 Subject: [PATCH] Remove unused sigfd and skalibs Closes #265. --- Makefile.am | 2 +- configure.ac | 45 ----------------- debian/copyright | 15 ------ src/examples/Makefile.am | 12 ++--- src/examples/benchmark.cc | 5 -- src/examples/termemu.cc | 5 -- src/frontend/Makefile.am | 10 +--- src/frontend/mosh-client.cc | 5 -- src/frontend/mosh-server.cc | 5 -- src/util/Makefile.am | 6 +-- src/util/sigfd.cc | 75 ----------------------------- src/util/sigfd.h | 54 --------------------- third/Makefile.am | 4 -- third/libstddjb/COPYING | 15 ------ third/libstddjb/Makefile.am | 35 -------------- third/libstddjb/allreadwrite.h | 25 ---------- third/libstddjb/coe.c | 11 ----- third/libstddjb/djbunix.h | 17 ------- third/libstddjb/error.h | 14 ------ third/libstddjb/fd_close.c | 15 ------ third/libstddjb/fd_read.c | 13 ----- third/libstddjb/fd_write.c | 13 ----- third/libstddjb/gccattributes.h | 61 ----------------------- third/libstddjb/ndelay_on.c | 15 ------ third/libstddjb/nsig.h | 13 ----- third/libstddjb/pipe_internal.c | 36 -------------- third/libstddjb/sanitize_read.c | 15 ------ third/libstddjb/selfpipe-internal.h | 28 ----------- third/libstddjb/selfpipe.h | 17 ------- third/libstddjb/selfpipe_finish.c | 35 -------------- third/libstddjb/selfpipe_init.c | 27 ----------- third/libstddjb/selfpipe_internal.c | 31 ------------ third/libstddjb/selfpipe_read.c | 31 ------------ third/libstddjb/selfpipe_trap.c | 51 -------------------- third/libstddjb/selfpipe_trapset.c | 64 ------------------------ third/libstddjb/selfpipe_untrap.c | 54 --------------------- third/libstddjb/sig.h | 61 ----------------------- third/libstddjb/sig_restoreto.c | 17 ------- third/libstddjb/skalibs-config.h | 0 third/libstddjb/skasig_dfl.c | 7 --- third/libstddjb/skasigaction.c | 42 ---------------- third/libstddjb/sysdeps.h | 24 --------- third/libstddjb/uint64.h | 7 --- 43 files changed, 7 insertions(+), 1030 deletions(-) delete mode 100644 src/util/sigfd.cc delete mode 100644 src/util/sigfd.h delete mode 100644 third/Makefile.am delete mode 100644 third/libstddjb/COPYING delete mode 100644 third/libstddjb/Makefile.am delete mode 100644 third/libstddjb/allreadwrite.h delete mode 100644 third/libstddjb/coe.c delete mode 100644 third/libstddjb/djbunix.h delete mode 100644 third/libstddjb/error.h delete mode 100644 third/libstddjb/fd_close.c delete mode 100644 third/libstddjb/fd_read.c delete mode 100644 third/libstddjb/fd_write.c delete mode 100644 third/libstddjb/gccattributes.h delete mode 100644 third/libstddjb/ndelay_on.c delete mode 100644 third/libstddjb/nsig.h delete mode 100644 third/libstddjb/pipe_internal.c delete mode 100644 third/libstddjb/sanitize_read.c delete mode 100644 third/libstddjb/selfpipe-internal.h delete mode 100644 third/libstddjb/selfpipe.h delete mode 100644 third/libstddjb/selfpipe_finish.c delete mode 100644 third/libstddjb/selfpipe_init.c delete mode 100644 third/libstddjb/selfpipe_internal.c delete mode 100644 third/libstddjb/selfpipe_read.c delete mode 100644 third/libstddjb/selfpipe_trap.c delete mode 100644 third/libstddjb/selfpipe_trapset.c delete mode 100644 third/libstddjb/selfpipe_untrap.c delete mode 100644 third/libstddjb/sig.h delete mode 100644 third/libstddjb/sig_restoreto.c delete mode 100644 third/libstddjb/skalibs-config.h delete mode 100644 third/libstddjb/skasig_dfl.c delete mode 100644 third/libstddjb/skasigaction.c delete mode 100644 third/libstddjb/sysdeps.h delete mode 100644 third/libstddjb/uint64.h diff --git a/Makefile.am b/Makefile.am index c98b971..ebb997f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = third src scripts man +SUBDIRS = src scripts man EXTRA_DIST = autogen.sh ocb-license.html README.md diff --git a/configure.ac b/configure.ac index cef7716..a177aad 100644 --- a/configure.ac +++ b/configure.ac @@ -160,49 +160,6 @@ AS_IF([test x"$with_utempter" != xno], AC_SEARCH_LIBS([compress], [z], , [AC_MSG_ERROR([Unable to find zlib.])]) -AC_ARG_WITH([skalibs], - [AS_HELP_STRING([--with-skalibs[=DIR]], - [root directory of skalibs installation])], - [with_skalibs=$withval - AS_IF([test x"$withval" != xyes], - [SKALIBS_CPPFLAGS="-I$withval/include" - SKALIBS_LDFLAGS="-L$withval/lib"])], - [with_skalibs=no]) -AC_ARG_WITH([skalibs-include], - [AS_HELP_STRING([--with-skalibs-include=DIR], - [specify exact include dir for skalibs headers])], - [SKALIBS_CPPFLAGS="-I$withval"]) -AC_ARG_WITH([skalibs-libdir], - [AS_HELP_STRING([--with-skalibs-libdir=DIR], - [specify exact library dir for skalibs libraries])], - [SKALIBS_LDFLAGS="-L$withval"]) - -STDDJB_CPPFLAGS="" -STDDJB_LDFLAGS="" -AS_IF([test x"$with_skalibs" != xno], - [AX_CHECK_LIBRARY([SKALIBS], [selfpipe.h], [stddjb], [], - [AC_MSG_ERROR([Unable to find skalibs.])]) - AC_SUBST([STDDJB_CPPFLAGS], ["$SKALIBS_CPPFLAGS"]) - AC_SUBST([STDDJB_LDFLAGS], ["$SKALIBS_LDFLAGS -lstddjb"])]) - -have_signalfd="no" -AC_CHECK_DECL([signalfd], - [have_signalfd="yes" - AC_DEFINE([HAVE_SIGNALFD], [1], - [Define if signalfd is available.])], - , [[#include ]]) - -AS_IF([test x"$have_signalfd" = xno], - [AC_DEFINE([USE_LIBSTDDJB], [1], - [Define if we should call functions from libstddjb (part of skalibs)])]) -AM_CONDITIONAL([USE_LIBSTDDJB], - [test x"$have_signalfd" = xno]) - -# Build the bundled libstddjb only if we'll use it and we don't have a -# path for skalibs. -AM_CONDITIONAL([COND_THIRD_LIBSTDDJB], - [test x"$have_signalfd" = xno && test x"$with_skalibs" = xno]) - # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h locale.h netinet/in.h stddef.h stdint.h inttypes.h stdlib.h string.h sys/ioctl.h sys/resource.h sys/socket.h sys/stat.h sys/time.h termios.h unistd.h wchar.h wctype.h], [], [AC_MSG_ERROR([Missing required header file.])]) @@ -303,8 +260,6 @@ PKG_CHECK_MODULES([protobuf], [protobuf]) AC_CONFIG_FILES([ Makefile - third/Makefile - third/libstddjb/Makefile src/Makefile src/crypto/Makefile src/frontend/Makefile diff --git a/debian/copyright b/debian/copyright index 6931ec4..e7819fb 100644 --- a/debian/copyright +++ b/debian/copyright @@ -174,18 +174,3 @@ License: GPL3+ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - -Files: third/libstddjb/* -Copyright: 2011-2012 Laurent Bercot -License: ISC - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - . - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index c206eef..0a7ab77 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am @@ -1,9 +1,3 @@ -# This must be set in Makefile.am for dependency tracking to work. -if COND_THIRD_LIBSTDDJB - STDDJB_LDFLAGS += $(top_builddir)/third/libstddjb/libstddjb.a - STDDJB_CPPFLAGS += -I$(top_srcdir)/third/libstddjb -endif - AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) AM_LDFLAGS = $(HARDEN_LDFLAGS) @@ -24,13 +18,13 @@ parse_CPPFLAGS = -I$(srcdir)/../terminal -I$(srcdir)/../util parse_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a -lutil termemu_SOURCES = termemu.cc -termemu_CPPFLAGS = -I$(srcdir)/../terminal -I$(srcdir)/../util -I$(srcdir)/../statesync -I../protobufs $(STDDJB_CPPFLAGS) -termemu_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a ../statesync/libmoshstatesync.a ../protobufs/libmoshprotos.a -lutil $(STDDJB_LDFLAGS) $(TINFO_LIBS) $(protobuf_LIBS) +termemu_CPPFLAGS = -I$(srcdir)/../terminal -I$(srcdir)/../util -I$(srcdir)/../statesync -I../protobufs +termemu_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a ../statesync/libmoshstatesync.a ../protobufs/libmoshprotos.a -lutil $(TINFO_LIBS) $(protobuf_LIBS) ntester_SOURCES = ntester.cc ntester_CPPFLAGS = -I$(srcdir)/../util -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs $(protobuf_CFLAGS) ntester_LDADD = ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../network/libmoshnetwork.a ../crypto/libmoshcrypto.a ../protobufs/libmoshprotos.a ../util/libmoshutil.a -lutil -lm $(protobuf_LIBS) benchmark_SOURCES = benchmark.cc -benchmark_CPPFLAGS = -I$(srcdir)/../util -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I../protobufs -I$(srcdir)/../frontend -I$(srcdir)/../crypto -I$(srcdir)/../network $(STDDJB_CPPFLAGS) $(protobuf_CFLAGS) +benchmark_CPPFLAGS = -I$(srcdir)/../util -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I../protobufs -I$(srcdir)/../frontend -I$(srcdir)/../crypto -I$(srcdir)/../network $(protobuf_CFLAGS) benchmark_LDADD = ../frontend/terminaloverlay.o ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../protobufs/libmoshprotos.a ../network/libmoshnetwork.a ../crypto/libmoshcrypto.a ../util/libmoshutil.a $(STDDJB_LDFLAGS) -lutil -lm $(TINFO_LIBS) $(protobuf_LIBS) diff --git a/src/examples/benchmark.cc b/src/examples/benchmark.cc index ef547b6..6ecdebd 100644 --- a/src/examples/benchmark.cc +++ b/src/examples/benchmark.cc @@ -44,11 +44,6 @@ #include "locale_utils.h" #include "fatal_assert.h" -/* For newer skalibs */ -extern "C" { - const char *PROG = "benchmark"; -} - const int ITERATIONS = 100000; using namespace Terminal; diff --git a/src/examples/termemu.cc b/src/examples/termemu.cc index 908f42d..51836a4 100644 --- a/src/examples/termemu.cc +++ b/src/examples/termemu.cc @@ -51,11 +51,6 @@ #include "locale_utils.h" #include "select.h" -/* For newer skalibs */ -extern "C" { - const char *PROG = "termemu"; -} - const size_t buf_size = 16384; void emulate_terminal( int fd ); diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am index 5bbe1da..2fae5bc 100644 --- a/src/frontend/Makefile.am +++ b/src/frontend/Makefile.am @@ -1,13 +1,7 @@ -# This must be set in Makefile.am for dependency tracking to work. -if COND_THIRD_LIBSTDDJB - STDDJB_LDFLAGS += $(top_builddir)/third/libstddjb/libstddjb.a - STDDJB_CPPFLAGS += -I$(top_srcdir)/third/libstddjb -endif - -AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(STDDJB_CPPFLAGS) $(TINFO_CFLAGS) $(protobuf_CFLAGS) +AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(TINFO_CFLAGS) $(protobuf_CFLAGS) AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) AM_LDFLAGS = $(HARDEN_LDFLAGS) -LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a $(STDDJB_LDFLAGS) -lm $(TINFO_LIBS) $(protobuf_LIBS) +LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lm $(TINFO_LIBS) $(protobuf_LIBS) mosh_server_LDADD = $(LDADD) -lutil diff --git a/src/frontend/mosh-client.cc b/src/frontend/mosh-client.cc index 4d4fe7c..fa5114b 100644 --- a/src/frontend/mosh-client.cc +++ b/src/frontend/mosh-client.cc @@ -30,11 +30,6 @@ #include #include -/* For newer skalibs */ -extern "C" { - const char *PROG = "mosh-client"; -} - void usage( const char *argv0 ) { fprintf( stderr, "mosh-client (%s)\n", PACKAGE_STRING ); fprintf( stderr, "Copyright 2012 Keith Winstein \n" ); diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc index 1dbf8fc..de99f4f 100644 --- a/src/frontend/mosh-server.cc +++ b/src/frontend/mosh-server.cc @@ -67,11 +67,6 @@ #include "networktransport.cc" -/* For newer skalibs */ -extern "C" { - const char *PROG = "mosh-server"; -} - typedef Network::Transport< Terminal::Complete, Network::UserStream > ServerConnection; void serve( int host_fd, diff --git a/src/util/Makefile.am b/src/util/Makefile.am index f97b7de..2d33d32 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -2,8 +2,4 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXF noinst_LIBRARIES = libmoshutil.a -libmoshutil_a_SOURCES = locale_utils.cc locale_utils.h swrite.cc swrite.h dos_assert.h fatal_assert.h sigfd.h select.h select.cc - -if !USE_LIBSTDDJB - libmoshutil_a_SOURCES += sigfd.cc -endif +libmoshutil_a_SOURCES = locale_utils.cc locale_utils.h swrite.cc swrite.h dos_assert.h fatal_assert.h select.h select.cc diff --git a/src/util/sigfd.cc b/src/util/sigfd.cc deleted file mode 100644 index 824f453..0000000 --- a/src/util/sigfd.cc +++ /dev/null @@ -1,75 +0,0 @@ -/* - Mosh: the mobile shell - Copyright 2012 Keith Winstein - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include -#include -#include -#include - -#include "fatal_assert.h" - -static sigset_t caught; -static int fd = -1; - -#define SIGNALFD_FLAGS ( SFD_NONBLOCK | SFD_CLOEXEC ) - -int sigfd_init( void ) -{ - if ( fd != -1 ) { - errno = EBUSY; - return -1; - } - sigemptyset( &caught ); - fd = signalfd( -1, &caught, SIGNALFD_FLAGS ); - return fd; -} - -int sigfd_trap( int sig ) -{ - /* The callers all fatal_assert on error, so we can do the same here. - We still return 'int' in order to have the same API as libstddjb. */ - fatal_assert( 0 <= fd ); - fatal_assert( 0 <= sigaddset( &caught, sig ) ); - fatal_assert( 0 <= sigprocmask( SIG_BLOCK, &caught, NULL ) ); - fatal_assert( 0 <= signalfd( fd, &caught, SIGNALFD_FLAGS ) ); - return 0; -} - -int sigfd_read( void ) -{ - int r; - struct signalfd_siginfo si; - - do { - r = read( fd, &si, sizeof( si ) ); - } while ( ( r == -1 ) && ( errno == EINTR ) ); - - if ( r == -1 ) { - if ( errno == EAGAIN || errno == EWOULDBLOCK ) - /* No signal available */ - return 0; - return -1; - } else if ( r != sizeof( si ) ) { - /* Should never happen? - Includes r = 0, i.e. end of file */ - errno = EPIPE; - return -1; - } - - return (int) si.ssi_signo; -} diff --git a/src/util/sigfd.h b/src/util/sigfd.h deleted file mode 100644 index d8d7905..0000000 --- a/src/util/sigfd.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Mosh: the mobile shell - Copyright 2012 Keith Winstein - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -/* Uses either signalfd or libstddjb's selfpipe to receive signals as part of - an event loop. - - selfpipe already does a fine job of interfacing to signalfd. But Debian and - Ubuntu want us to depend on the skalibs-dev package rather than build - libstddjb ourselves. That would be fine except that skalibs-dev has static - libraries only, and they aren't built with -fPIC. This interferes with - building mosh-{client,server} as position-independent executables, which - is a desirable security measure. - - So we have our own wrapper, which invokes either signalfd or selfpipe. And - we build it ourselves with our own flags, because it's part of the Mosh - project proper. */ - -#ifndef SIGFD_HPP -#define SIGFD_HPP - -#if USE_LIBSTDDJB - -extern "C" { -#include "selfpipe.h" -} - -#define sigfd_init selfpipe_init -#define sigfd_trap selfpipe_trap -#define sigfd_read selfpipe_read - -#else - -int sigfd_init( void ); -int sigfd_trap( int sig ); -int sigfd_read( void ); - -#endif - -#endif diff --git a/third/Makefile.am b/third/Makefile.am deleted file mode 100644 index ba3cbf9..0000000 --- a/third/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -SUBDIRS = -if COND_THIRD_LIBSTDDJB - SUBDIRS += libstddjb -endif diff --git a/third/libstddjb/COPYING b/third/libstddjb/COPYING deleted file mode 100644 index cc53e86..0000000 --- a/third/libstddjb/COPYING +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (c) 2011-2012 Laurent Bercot - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ diff --git a/third/libstddjb/Makefile.am b/third/libstddjb/Makefile.am deleted file mode 100644 index e645ae0..0000000 --- a/third/libstddjb/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -AM_CFLAGS = -pedantic -Wall -Wextra -pipe $(HARDEN_CFLAGS) - -noinst_LIBRARIES = libstddjb.a - -libstddjb_a_SOURCES = \ - allreadwrite.h \ - coe.c \ - djbunix.h \ - error.h \ - fd_close.c \ - fd_read.c \ - fd_write.c \ - gccattributes.h \ - ndelay_on.c \ - nsig.h \ - pipe_internal.c \ - sanitize_read.c \ - selfpipe-internal.h \ - selfpipe.h \ - selfpipe_finish.c \ - selfpipe_init.c \ - selfpipe_internal.c \ - selfpipe_read.c \ - selfpipe_trap.c \ - selfpipe_trapset.c \ - selfpipe_untrap.c \ - sig.h \ - sig_restoreto.c \ - skalibs-config.h \ - skasig_dfl.c \ - skasigaction.c \ - sysdeps.h \ - uint64.h - -EXTRA_DIST = COPYING diff --git a/third/libstddjb/allreadwrite.h b/third/libstddjb/allreadwrite.h deleted file mode 100644 index e893f52..0000000 --- a/third/libstddjb/allreadwrite.h +++ /dev/null @@ -1,25 +0,0 @@ -/* ISC license. */ - -#ifndef ALLREADWRITE_H -#define ALLREADWRITE_H - -typedef int iofunc_t (int, char *, unsigned int) ; -typedef iofunc_t *iofunc_t_ref ; - -typedef unsigned int alliofunc_t (int, char *, unsigned int) ; -typedef alliofunc_t *alliofunc_t_ref ; - -extern int sanitize_read (int) ; -extern unsigned int allreadwrite (iofunc_t_ref, int, char *, unsigned int) ; - -extern int fd_read (int, char *, unsigned int) ; -extern int fd_write (int, char const *, unsigned int) ; - -extern int fd_recv (int, char *, unsigned int, unsigned int) ; -extern int fd_send (int, char const *, unsigned int, unsigned int) ; - -extern unsigned int allread (int, char *, unsigned int) ; -extern unsigned int allwrite (int, char const *, unsigned int) ; - - -#endif diff --git a/third/libstddjb/coe.c b/third/libstddjb/coe.c deleted file mode 100644 index cee4fe9..0000000 --- a/third/libstddjb/coe.c +++ /dev/null @@ -1,11 +0,0 @@ -/* ISC license. */ - -#include -#include "djbunix.h" - -int coe (int fd) -{ - register int flags = fcntl(fd, F_GETFD, 0) ; - if (flags < 0) return -1 ; - return fcntl(fd, F_SETFD, flags | FD_CLOEXEC) ; -} diff --git a/third/libstddjb/djbunix.h b/third/libstddjb/djbunix.h deleted file mode 100644 index fd91546..0000000 --- a/third/libstddjb/djbunix.h +++ /dev/null @@ -1,17 +0,0 @@ -/* ISC license. */ - -#ifndef DJBUNIX_H -#define DJBUNIX_H - -#define DJBUNIX_FLAG_NB 0x01U -#define DJBUNIX_FLAG_COE 0x02U - -extern int coe (int) ; -extern int ndelay_on (int) ; -extern int pipe_internal (int *, unsigned int) ; -#define pipenb(p) pipe_internal(p, DJBUNIX_FLAG_NB) -#define pipecoe(p) pipe_internal(p, DJBUNIX_FLAG_COE) -#define pipenbcoe(p) pipe_internal(p, DJBUNIX_FLAG_NB|DJBUNIX_FLAG_COE) -extern int fd_close (int) ; - -#endif diff --git a/third/libstddjb/error.h b/third/libstddjb/error.h deleted file mode 100644 index 665bbd5..0000000 --- a/third/libstddjb/error.h +++ /dev/null @@ -1,14 +0,0 @@ -/* ISC license. */ - -#ifndef ERROR_H -#define ERROR_H - -#include -#include "gccattributes.h" - -extern char const *error_str (int) gccattr_const ; -extern int error_temp (int) gccattr_const ; - -#define error_isagain(e) (((e) == EAGAIN) || ((e) == EWOULDBLOCK)) - -#endif diff --git a/third/libstddjb/fd_close.c b/third/libstddjb/fd_close.c deleted file mode 100644 index 8fa19e0..0000000 --- a/third/libstddjb/fd_close.c +++ /dev/null @@ -1,15 +0,0 @@ -/* ISC license. */ - -#include -#include -#include "djbunix.h" - -int fd_close (int fd) -{ - register unsigned int i = 0 ; -doit: - if (!close(fd)) return 0 ; - i++ ; - if (errno == EINTR) goto doit ; - return ((errno == EBADF) && (i > 1)) ? 0 : -1 ; -} diff --git a/third/libstddjb/fd_read.c b/third/libstddjb/fd_read.c deleted file mode 100644 index 3a90e6b..0000000 --- a/third/libstddjb/fd_read.c +++ /dev/null @@ -1,13 +0,0 @@ -/* ISC license. */ - -#include -#include -#include "allreadwrite.h" - -int fd_read (int fd, char *buf, unsigned int len) -{ - register int r ; - do r = read(fd, buf, len) ; - while ((r == -1) && (errno == EINTR)) ; - return r ; -} diff --git a/third/libstddjb/fd_write.c b/third/libstddjb/fd_write.c deleted file mode 100644 index 780efac..0000000 --- a/third/libstddjb/fd_write.c +++ /dev/null @@ -1,13 +0,0 @@ -/* ISC license. */ - -#include -#include -#include "allreadwrite.h" - -int fd_write (int fd, char const *buf, unsigned int len) -{ - register int r ; - do r = write(fd, buf, len) ; - while ((r == -1) && (errno == EINTR)) ; - return r ; -} diff --git a/third/libstddjb/gccattributes.h b/third/libstddjb/gccattributes.h deleted file mode 100644 index 0584480..0000000 --- a/third/libstddjb/gccattributes.h +++ /dev/null @@ -1,61 +0,0 @@ -/* ISC license. */ - -#ifndef GCCATTRIBUTES_H -#define GCCATTRIBUTES_H - -#ifdef __GNUC__ - -#define gccattr_noreturn __attribute__((__noreturn__)) -#define gccattr_noinline __attribute__((__noinline__)) -#define gccattr_inline __attribute__((__always_inline__)) -#define gccattr_const __attribute__((__const__)) -#define gccattr_unused __attribute__((__unused__)) -#define gccattr_used __attribute__((__used__)) -#define gccattr_weak __attribute__((__weak__)) -#define gccattr_aligned __attribute__((__aligned__)) - -# if (__GNUC__ >= 3) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) -#define gccattr_malloc __attribute__((__malloc__)) -#define gccattr_pure __attribute__((__pure__)) -# else -#define gccattr_malloc -#define gccattr_pure -# endif - -# if (__GNUC__ >= 3) -#define gccattr_deprecated __attribute__((__deprecated__)) -# else -#define gccattr_deprecated -# endif - -#else - -#define gccattr_noreturn -#define gccattr_noinline -#define gccattr_inline -#define gccattr_const -#define gccattr_unused -#define gccattr_used -#define gccattr_weak -#define gccattr_aligned -#define gccattr_malloc -#define gccattr_pure -#define gccattr_deprecated - -#endif - -#ifdef GCCATTR_COMPAT_0_22 -#define _a_noreturn gccattr_noreturn -#define _a_noinline gccattr_noinline -#define _a_inline gccattr_inline -#define _a_const gccattr_const -#define _a_unused gccattr_unused -#define _a_used gccattr_used -#define _a_weak gccattr_weak -#define _a_aligned gccattr_aligned -#define _a_malloc gccattr_malloc -#define _a_pure gccattr_pure -#define _a_deprecated gccattr_deprecated -#endif - -#endif diff --git a/third/libstddjb/ndelay_on.c b/third/libstddjb/ndelay_on.c deleted file mode 100644 index 4fc5148..0000000 --- a/third/libstddjb/ndelay_on.c +++ /dev/null @@ -1,15 +0,0 @@ -/* ISC license. */ - -#include -#include -#include "djbunix.h" - -#ifndef O_NONBLOCK -#define O_NONBLOCK O_NDELAY -#endif - -int ndelay_on (int fd) -{ - register int got = fcntl(fd, F_GETFL) ; - return (got == -1) ? -1 : fcntl(fd, F_SETFL, got | O_NONBLOCK) ; -} diff --git a/third/libstddjb/nsig.h b/third/libstddjb/nsig.h deleted file mode 100644 index f6bd240..0000000 --- a/third/libstddjb/nsig.h +++ /dev/null @@ -1,13 +0,0 @@ -/* ISC license. */ - -#ifndef NSIG_H - -#include - -#define SKALIBS_NSIG 64 - -#ifndef NSIG -# define NSIG SKALIBS_NSIG -#endif - -#endif diff --git a/third/libstddjb/pipe_internal.c b/third/libstddjb/pipe_internal.c deleted file mode 100644 index 9e7aaf7..0000000 --- a/third/libstddjb/pipe_internal.c +++ /dev/null @@ -1,36 +0,0 @@ -/* ISC license. */ - -#include "sysdeps.h" -#ifdef HASPIPE2 -# define _GNU_SOURCE -# include -#else -# include -#endif - -#include -#include "djbunix.h" - -int pipe_internal (int *p, unsigned int flags) -{ -#ifdef HASPIPE2 - return pipe2(p, ((flags & DJBUNIX_FLAG_COE) ? O_CLOEXEC : 0) | ((flags & DJBUNIX_FLAG_NB) ? O_NONBLOCK : 0)) ; -#else - int pi[2] ; - if (pipe(pi) < 0) return -1 ; - if (flags & DJBUNIX_FLAG_COE) - if ((coe(pi[0]) < 0) || (coe(pi[1]) < 0)) goto err ; - if (flags & DJBUNIX_FLAG_NB) - if ((ndelay_on(pi[0]) < 0) || (ndelay_on(pi[1]) < 0)) goto err ; - p[0] = pi[0] ; p[1] = pi[1] ; - return 0 ; - err: - { - register int e = errno ; - fd_close(pi[1]) ; - fd_close(pi[0]) ; - errno = e ; - } - return -1 ; -#endif -} diff --git a/third/libstddjb/sanitize_read.c b/third/libstddjb/sanitize_read.c deleted file mode 100644 index 7d87d70..0000000 --- a/third/libstddjb/sanitize_read.c +++ /dev/null @@ -1,15 +0,0 @@ -/* ISC license. */ - -#include -#include "allreadwrite.h" -#include "error.h" - -int sanitize_read (int r) -{ - switch (r) - { - case -1 : return error_isagain(errno) ? (errno = 0, 0) : -1 ; - case 0 : return (errno = EPIPE, -1) ; - default : return r ; - } -} diff --git a/third/libstddjb/selfpipe-internal.h b/third/libstddjb/selfpipe-internal.h deleted file mode 100644 index 1f9d0f4..0000000 --- a/third/libstddjb/selfpipe-internal.h +++ /dev/null @@ -1,28 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#ifndef SELFPIPE_INTERNAL_H -#define SELFPIPE_INTERNAL_H - -#include -#include "sysdeps.h" - -extern sigset_t selfpipe_caught ; - -#ifdef HASSIGNALFD - -extern int selfpipe_fd ; - -#else - -#include "sig.h" - -extern int selfpipe[2] ; -#define selfpipe_fd selfpipe[0] - -extern struct skasigaction const selfpipe_ssa ; - -#endif - -#endif diff --git a/third/libstddjb/selfpipe.h b/third/libstddjb/selfpipe.h deleted file mode 100644 index c587f93..0000000 --- a/third/libstddjb/selfpipe.h +++ /dev/null @@ -1,17 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#ifndef SELFPIPE_H -#define SELFPIPE_H - -#include - -extern int selfpipe_init (void) ; -extern int selfpipe_trap (int) ; -extern int selfpipe_untrap (int) ; -extern int selfpipe_trapset (sigset_t const *) ; -extern int selfpipe_read (void) ; -extern void selfpipe_finish (void) ; - -#endif diff --git a/third/libstddjb/selfpipe_finish.c b/third/libstddjb/selfpipe_finish.c deleted file mode 100644 index af9a2da..0000000 --- a/third/libstddjb/selfpipe_finish.c +++ /dev/null @@ -1,35 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include "sysdeps.h" -#include "djbunix.h" -#include "selfpipe-internal.h" -#include "selfpipe.h" - -#ifdef HASSIGNALFD - -void selfpipe_finish (void) -{ - sigprocmask(SIG_UNBLOCK, &selfpipe_caught, 0) ; - sigemptyset(&selfpipe_caught) ; - fd_close(selfpipe_fd) ; - selfpipe_fd = -1 ; -} - -#else - -#include "sig.h" -#include "nsig.h" - -void selfpipe_finish (void) -{ - sig_restoreto(&selfpipe_caught, NSIG) ; - sigemptyset(&selfpipe_caught) ; - fd_close(selfpipe[1]) ; - fd_close(selfpipe[0]) ; - selfpipe[0] = selfpipe[1] = -1 ; -} - -#endif diff --git a/third/libstddjb/selfpipe_init.c b/third/libstddjb/selfpipe_init.c deleted file mode 100644 index 81d6f4d..0000000 --- a/third/libstddjb/selfpipe_init.c +++ /dev/null @@ -1,27 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include -#include "sysdeps.h" -#include "selfpipe-internal.h" -#include "selfpipe.h" - -#ifdef HASSIGNALFD -# include -#else -# include "djbunix.h" -#endif - -int selfpipe_init (void) -{ - if (selfpipe_fd >= 0) return (errno = EBUSY, -1) ; - sigemptyset(&selfpipe_caught) ; -#ifdef HASSIGNALFD - selfpipe_fd = signalfd(-1, &selfpipe_caught, SFD_NONBLOCK | SFD_CLOEXEC) ; -#else - if (pipenbcoe(selfpipe) < 0) return -1 ; -#endif - return selfpipe_fd ; -} diff --git a/third/libstddjb/selfpipe_internal.c b/third/libstddjb/selfpipe_internal.c deleted file mode 100644 index a3e39f4..0000000 --- a/third/libstddjb/selfpipe_internal.c +++ /dev/null @@ -1,31 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include "sysdeps.h" -#include "selfpipe-internal.h" - -sigset_t selfpipe_caught ; - -#ifdef HASSIGNALFD - -int selfpipe_fd = -1 ; - -#else - -#include -#include "allreadwrite.h" -#include "djbunix.h" - -int selfpipe[2] = { -1, -1 } ; - -static void selfpipe_trigger (int s) -{ - char c = (char)s ; - fd_write(selfpipe[1], &c, 1) ; -} - -struct skasigaction const selfpipe_ssa = { &selfpipe_trigger, SKASA_NOCLDSTOP | SKASA_MASKALL } ; - -#endif diff --git a/third/libstddjb/selfpipe_read.c b/third/libstddjb/selfpipe_read.c deleted file mode 100644 index dc34368..0000000 --- a/third/libstddjb/selfpipe_read.c +++ /dev/null @@ -1,31 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include "sysdeps.h" -#include "allreadwrite.h" -#include "selfpipe-internal.h" -#include "selfpipe.h" - -#ifdef HASSIGNALFD - -#include - -int selfpipe_read (void) -{ - struct signalfd_siginfo buf ; - register int r = sanitize_read(fd_read(selfpipe_fd, (char *)&buf, sizeof(struct signalfd_siginfo))) ; - return (r <= 0) ? r : (int)buf.ssi_signo ; -} - -#else - -int selfpipe_read (void) -{ - char c ; - register int r = sanitize_read((fd_read(selfpipe_fd, &c, 1))) ; - return (r <= 0) ? r : (int)c ; -} - -#endif - diff --git a/third/libstddjb/selfpipe_trap.c b/third/libstddjb/selfpipe_trap.c deleted file mode 100644 index 2f3db3a..0000000 --- a/third/libstddjb/selfpipe_trap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include -#include "sysdeps.h" -#include "selfpipe-internal.h" -#include "selfpipe.h" - -#ifdef HASSIGNALFD - -#include - -int selfpipe_trap (int sig) -{ - sigset_t ss = selfpipe_caught ; - sigset_t old ; - if (selfpipe_fd < 0) return (errno = EBADF, -1) ; - if ((sigaddset(&ss, sig) < 0) || (sigprocmask(SIG_BLOCK, &ss, &old) < 0)) - return -1 ; - if (signalfd(selfpipe_fd, &ss, SFD_NONBLOCK | SFD_CLOEXEC) < 0) - { - int e = errno ; - sigprocmask(SIG_SETMASK, &old, 0) ; - errno = e ; - return -1 ; - } - selfpipe_caught = ss ; - return 0 ; -} - -#else - -#include "sig.h" - -int selfpipe_trap (int sig) -{ - if (selfpipe_fd < 0) return (errno = EBADF, -1) ; - if (sig_catcha(sig, &selfpipe_ssa) < 0) return -1 ; - if (sigaddset(&selfpipe_caught, sig) < 0) - { - int e = errno ; - sig_restore(sig) ; - errno = e ; - return -1 ; - } - return 0 ; -} - -#endif diff --git a/third/libstddjb/selfpipe_trapset.c b/third/libstddjb/selfpipe_trapset.c deleted file mode 100644 index 4b97e29..0000000 --- a/third/libstddjb/selfpipe_trapset.c +++ /dev/null @@ -1,64 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include -#include "sysdeps.h" -#include "selfpipe-internal.h" -#include "selfpipe.h" - -#ifdef HASSIGNALFD - -#include - -int selfpipe_trapset (sigset_t const *set) -{ - sigset_t old ; - if (selfpipe_fd < 0) return (errno = EBADF, -1) ; - if (sigprocmask(SIG_SETMASK, set, &old) < 0) return -1 ; - if (signalfd(selfpipe_fd, set, SFD_NONBLOCK | SFD_CLOEXEC) < 0) - { - int e = errno ; - sigprocmask(SIG_SETMASK, &old, 0) ; - errno = e ; - return -1 ; - } - selfpipe_caught = *set ; - return 0 ; -} - -#else - -#include "sig.h" -#include "nsig.h" - -int selfpipe_trapset (sigset_t const *set) -{ - unsigned int i = 1 ; - if (selfpipe_fd < 0) return (errno = EBADF, -1) ; - for (; i <= NSIG ; i++) - { - register int h = sigismember(set, i) ; - if (h < 0) continue ; - if (h) - { - if (sig_catcha(i, &selfpipe_ssa) < 0) break ; - } - else if (sigismember(&selfpipe_caught, i)) - { - if (sig_restore(i) < 0) break ; - } - } - if (i <= NSIG) - { - int e = errno ; - sig_restoreto(set, i) ; - errno = e ; - return -1 ; - } - selfpipe_caught = *set ; - return 0 ; -} - -#endif diff --git a/third/libstddjb/selfpipe_untrap.c b/third/libstddjb/selfpipe_untrap.c deleted file mode 100644 index 994ab9f..0000000 --- a/third/libstddjb/selfpipe_untrap.c +++ /dev/null @@ -1,54 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include -#include "sysdeps.h" -#include "selfpipe-internal.h" -#include "selfpipe.h" - -#ifdef HASSIGNALFD - -#include - -int selfpipe_untrap (int sig) -{ - sigset_t ss = selfpipe_caught ; - sigset_t blah ; - register int r = sigismember(&selfpipe_caught, sig) ; - if (selfpipe_fd < 0) return (errno = EBADF, -1) ; - if (r < 0) return -1 ; - if (!r) return (errno = EINVAL, -1) ; - if ((sigdelset(&ss, sig) < 0) - || (signalfd(selfpipe_fd, &ss, SFD_NONBLOCK | SFD_CLOEXEC) < 0)) - return -1 ; - sigemptyset(&blah) ; - sigaddset(&blah, sig) ; - if (sigprocmask(SIG_UNBLOCK, &blah, 0) < 0) - { - int e = errno ; - signalfd(selfpipe_fd, &selfpipe_caught, SFD_NONBLOCK | SFD_CLOEXEC) ; - errno = e ; - return -1 ; - } - selfpipe_caught = ss ; - return 0 ; -} - -#else - -#include "sig.h" - -int selfpipe_untrap (int sig) -{ - register int r = sigismember(&selfpipe_caught, sig) ; - if (selfpipe_fd < 0) return (errno = EBADF, -1) ; - if (r < 0) return -1 ; - if (!r) return (errno = EINVAL, -1) ; - if (sig_restore(sig) < 0) return -1 ; - sigdelset(&selfpipe_caught, sig) ; - return 0 ; -} - -#endif diff --git a/third/libstddjb/sig.h b/third/libstddjb/sig.h deleted file mode 100644 index dab64bd..0000000 --- a/third/libstddjb/sig.h +++ /dev/null @@ -1,61 +0,0 @@ -/* ISC license. */ - -#ifndef SIG_H -#define SIG_H - -#include -#include "gccattributes.h" - -extern int sig_alarm gccattr_deprecated ; -extern int sig_child gccattr_deprecated ; -extern int sig_stop gccattr_deprecated ; -extern int sig_cont gccattr_deprecated ; -extern int sig_hangup gccattr_deprecated ; -extern int sig_int gccattr_deprecated ; -extern int sig_kill gccattr_deprecated ; -extern int sig_pipe gccattr_deprecated ; -extern int sig_term gccattr_deprecated ; -extern int sig_usr1 gccattr_deprecated ; -extern int sig_usr2 gccattr_deprecated ; -extern int sig_quit gccattr_deprecated ; -extern int sig_abort gccattr_deprecated ; - - -typedef void skasighandler_t (int) ; -typedef skasighandler_t *skasighandler_t_ref ; - -struct skasigaction -{ - skasighandler_t_ref handler ; - unsigned int flags : 2 ; -} ; - -#define SKASA_MASKALL 0x01 -#define SKASA_NOCLDSTOP 0x02 - -extern struct skasigaction const SKASIG_DFL ; -extern struct skasigaction const SKASIG_IGN ; -extern int skasigaction (int, struct skasigaction const *, struct skasigaction *) ; - -#define sig_catcha(sig, ac) skasigaction(sig, (ac), 0) -#define sig_restore(sig) skasigaction((sig), &SKASIG_DFL, 0) - -extern void sig_restoreto (sigset_t const *, unsigned int) ; -extern int sig_catch (int, skasighandler_t_ref) ; -#define sig_ignore(sig) sig_catcha((sig), &SKASIG_IGN) -#define sig_uncatch(sig) sig_restore(sig) - -#define SIGSTACKSIZE 16 -extern int sig_pusha (int, struct skasigaction const *) ; -extern int sig_pop (int) ; -extern int sig_push (int, skasighandler_t_ref) ; - -extern void sig_block (int) ; -extern void sig_blockset (sigset_t const *) ; -extern void sig_unblock (int) ; -extern void sig_blocknone (void) ; -extern void sig_pause (void) ; -extern void sig_shield (void) ; -extern void sig_unshield (void) ; - -#endif diff --git a/third/libstddjb/sig_restoreto.c b/third/libstddjb/sig_restoreto.c deleted file mode 100644 index 088fa68..0000000 --- a/third/libstddjb/sig_restoreto.c +++ /dev/null @@ -1,17 +0,0 @@ -/* ISC license. */ - -/* MT-unsafe */ - -#include -#include "sig.h" - -void sig_restoreto (sigset_t const *set, unsigned int n) -{ - register unsigned int i = 1 ; - for (; i <= n ; i++) - { - register int h = sigismember(set, i) ; - if (h < 0) continue ; - if (h) sig_restore(i) ; - } -} diff --git a/third/libstddjb/skalibs-config.h b/third/libstddjb/skalibs-config.h deleted file mode 100644 index e69de29..0000000 diff --git a/third/libstddjb/skasig_dfl.c b/third/libstddjb/skasig_dfl.c deleted file mode 100644 index b2790c6..0000000 --- a/third/libstddjb/skasig_dfl.c +++ /dev/null @@ -1,7 +0,0 @@ -/* ISC license. */ - -#include -#include "sig.h" - -struct skasigaction const SKASIG_DFL = { SIG_DFL, 0 } ; -struct skasigaction const SKASIG_IGN = { SIG_IGN, 0 } ; diff --git a/third/libstddjb/skasigaction.c b/third/libstddjb/skasigaction.c deleted file mode 100644 index 9fc8ab9..0000000 --- a/third/libstddjb/skasigaction.c +++ /dev/null @@ -1,42 +0,0 @@ -/* ISC license. */ - -#include -#include "sysdeps.h" -#include "sig.h" - -#ifdef HASSIGACTION - -int skasigaction (int sig, struct skasigaction const *new, struct skasigaction *old) -{ - struct sigaction sanew, saold ; - if (((new->flags & SKASA_MASKALL) ? sigfillset(&sanew.sa_mask) : sigemptyset(&sanew.sa_mask)) == -1) return -1 ; - sanew.sa_handler = new->handler ; - sanew.sa_flags = (new->flags & SKASA_NOCLDSTOP) ? SA_NOCLDSTOP : 0 ; - if (sigaction(sig, &sanew, &saold) == -1) return -1 ; - if (old) - { - register int r = sigismember(&saold.sa_mask, (sig == SIGTERM) ? SIGPIPE : SIGTERM) ; - if (r == -1) return -1 ; - old->flags = 0 ; - if (r) old->flags |= SKASA_MASKALL ; - if (saold.sa_flags & SA_NOCLDSTOP) old->flags |= SKASA_NOCLDSTOP ; - old->handler = saold.sa_handler ; - } - return 0 ; -} - -#else - -int skasigaction (int sig, struct skasigaction const *new, struct skasigaction *old) -{ - skasighandler_t_ref haold = signal(sig, new->handler) ; - if (haold == SIG_ERR) return -1 ; - if (old) - { - old->handler = haold ; - old->flags = 0 ; - } - return 0 ; -} - -#endif diff --git a/third/libstddjb/sysdeps.h b/third/libstddjb/sysdeps.h deleted file mode 100644 index 483ab58..0000000 --- a/third/libstddjb/sysdeps.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SYSDEPS_H -#define SYSDEPS_H - -#include "config.h" - -#ifdef HAVE_PIPE2_CLOEXEC -#define HASPIPE2 -#else -#undef HASPIPE2 -#endif - -#ifdef HAVE_SIGNALFD -#define HASSIGNALFD -#else -#undef HASSIGNALFD -#endif - -#ifdef HAVE_SIGACTION -#define HASSIGACTION -#else -#undef HASSIGACTION -#endif - -#endif diff --git a/third/libstddjb/uint64.h b/third/libstddjb/uint64.h deleted file mode 100644 index e5ad1c4..0000000 --- a/third/libstddjb/uint64.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef UINT64_H -#define UINT64_H - -#include -typedef uint64_t uint64; - -#endif