Permalink
Browse files

Remove unused poll(2) emulation

Closes #235.
  • Loading branch information...
1 parent 043f9af commit bb651581a7b4bdb5579c490fb4b44bade5edd32a @kmcallister kmcallister committed with keithw May 1, 2012
Showing with 11 additions and 607 deletions.
  1. +0 −61 configure.ac
  2. +0 −29 debian/copyright
  3. +1 −36 macosx/copying.rtf
  4. +8 −15 src/examples/Makefile.am
  5. +2 −9 src/frontend/Makefile.am
  6. +0 −3 third/Makefile.am
  7. +0 −32 third/poll/LICENSE
  8. +0 −10 third/poll/Makefile.am
  9. +0 −306 third/poll/poll.c
  10. +0 −105 third/poll/poll.h
  11. +0 −1 third/poll/sys/poll.h
View
@@ -250,66 +250,6 @@ AC_CHECK_DECL([forkpty],
, [[#include <sys/types.h>
#include <libutil.h>]])
-AC_ARG_VAR([poll_CFLAGS], [C compiler flags for poll])
-AC_ARG_VAR([poll_LIBS], [linker flags for poll])
-AS_IF([test -z "$poll_LIBS"], [
- AC_CHECK_LIB([poll], [poll], [poll_LIBS="-lpoll"])
-])
-
-# Check to make sure poll() can handle stdin and ptys
-AC_CACHE_CHECK([whether poll can handle ptys],
- [ac_cv_poll_pty],
-[
- save_CFLAGS="$CFLAGS"
- save_LIBS="$LIBS"
-
- AS_IF([test "x$poll_CFLAGS" != "x"],
- [CFLAGS="$CFLAGS $poll_CFLAGS"])
-
- AS_IF([test "x$poll_LIBS" != "x"],
- [LIBS="$LIBS $poll_LIBS"])
-
- LIBS="$LIBS -lutil"
-
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#if HAVE_PTY_H
-#include <pty.h>
-#elif HAVE_UTIL_H
-#include <util.h>
-#endif
-#if FORKPTY_IN_LIBUTIL
-#include <libutil.h>
-#endif
-#include <sys/poll.h>
-
-int master, slave;
-struct pollfd pollfds[ 1 ];
-]], [[
-if ( openpty( &master, &slave, NULL, NULL, NULL ) < 0 ) {
- perror( "openpty" );
- exit( 1 );
-}
-pollfds[ 0 ].fd = master;
-pollfds[ 0 ].events = POLLIN;
-int active_fds = poll( pollfds, 1, 100 );
-if ( active_fds < 0 ) {
- perror( "poll" );
- exit( 1 );
-}
-if ( pollfds[ 0 ].revents & (POLLERR | POLLHUP | POLLNVAL) ) {
- exit( 2 );
-}
-]])],
- [ac_cv_poll_pty=yes],
- [ac_cv_poll_pty=no])
- CFLAGS="$save_CFLAGS"
- LIBS="$save_LIBS"
-])
-AM_CONDITIONAL([COND_THIRD_POLL], [test "x$ac_cv_poll_pty" = "xno"])
-
AC_MSG_CHECKING([whether pipe2(..., O_CLOEXEC) is supported])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
#include <unistd.h>
@@ -365,7 +305,6 @@ AC_CONFIG_FILES([
Makefile
third/Makefile
third/libstddjb/Makefile
- third/poll/Makefile
src/Makefile
src/crypto/Makefile
src/frontend/Makefile
View
@@ -189,32 +189,3 @@ License: ISC
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.
-
-Files: third/poll/*
-Copyright: 1995-2011, Brian M. Clapper
-License: BSD-3-Clause
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- .
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- .
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- .
- * Neither the name of the clapper.org nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
- .
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
View
@@ -249,39 +249,4 @@ The hypothetical commands `show w' and `show c' should show the appropriate part
\
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.\
\
-The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.\
-\
-===========================================================================\
-\
-The third/poll software is released under the following BSD license,\
-adapted from http://opensource.org/licenses/bsd-license.php\
----------------------------------------------------------------------------\
-\
-Copyright (c) 1995-2011, Brian M. Clapper\
-All rights reserved.\
-\
-Redistribution and use in source and binary forms, with or without\
-modification, are permitted provided that the following conditions are met:\
-\
-* Redistributions of source code must retain the above copyright notice,\
- this list of conditions and the following disclaimer.\
-\
-* Redistributions in binary form must reproduce the above copyright notice,\
- this list of conditions and the following disclaimer in the documentation\
- and/or other materials provided with the distribution.\
-\
-* Neither the name of the clapper.org nor the names of its contributors may\
- be used to endorse or promote products derived from this software without\
- specific prior written permission.\
-\
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\
-POSSIBILITY OF SUCH DAMAGE.}
+The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.}
@@ -3,13 +3,6 @@ if COND_THIRD_LIBSTDDJB
STDDJB_LDFLAGS += $(top_builddir)/third/libstddjb/libstddjb.a
STDDJB_CPPFLAGS += -I$(top_srcdir)/third/libstddjb
endif
-if COND_THIRD_POLL
- working_poll_LIBS = $(top_builddir)/third/poll/libpoll.a
- working_poll_CFLAGS = -I$(top_srcdir)/third/poll
-else
- working_poll_LIBS = $(poll_LIBS)
- working_poll_CFLAGS = $(poll_CFLAGS)
-endif
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS)
AM_LDFLAGS = $(HARDEN_LDFLAGS)
@@ -27,17 +20,17 @@ decrypt_CPPFLAGS = -I$(srcdir)/../crypto
decrypt_LDADD = ../crypto/libmoshcrypto.a
parse_SOURCES = parse.cc
-parse_CPPFLAGS = -I$(srcdir)/../terminal -I$(srcdir)/../util $(working_poll_CFLAGS)
-parse_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a -lutil $(working_poll_LIBS)
+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) $(working_poll_CFLAGS)
-termemu_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a ../statesync/libmoshstatesync.a ../protobufs/libmoshprotos.a -lutil $(STDDJB_LDFLAGS) $(TINFO_LIBS) $(protobuf_LIBS) $(working_poll_LIBS)
+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)
ntester_SOURCES = ntester.cc
-ntester_CPPFLAGS = -I$(srcdir)/../util -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs $(working_poll_CFLAGS) $(protobuf_CFLAGS)
-ntester_LDADD = ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../network/libmoshnetwork.a ../crypto/libmoshcrypto.a ../protobufs/libmoshprotos.a $(working_poll_LIBS) -lutil -lm $(protobuf_LIBS)
+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 -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) $(working_poll_CFLAGS) $(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) $(working_poll_LIBS) -lutil -lm $(TINFO_LIBS) $(protobuf_LIBS)
+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_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)
@@ -3,18 +3,11 @@ if COND_THIRD_LIBSTDDJB
STDDJB_LDFLAGS += $(top_builddir)/third/libstddjb/libstddjb.a
STDDJB_CPPFLAGS += -I$(top_srcdir)/third/libstddjb
endif
-if COND_THIRD_POLL
- working_poll_LIBS = $(top_builddir)/third/poll/libpoll.a
- working_poll_CFLAGS = -I$(top_srcdir)/third/poll
-else
- working_poll_LIBS = $(poll_LIBS)
- working_poll_CFLAGS = $(poll_CFLAGS)
-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) $(working_poll_CFLAGS)
+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_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) $(working_poll_LIBS) -lm $(TINFO_LIBS) $(protobuf_LIBS)
+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)
mosh_server_LDADD = $(LDADD) -lutil
View
@@ -2,6 +2,3 @@ SUBDIRS =
if COND_THIRD_LIBSTDDJB
SUBDIRS += libstddjb
endif
-if COND_THIRD_POLL
- SUBDIRS += poll
-endif
View
@@ -1,32 +0,0 @@
-This software is released under the following BSD license, adapted from
-http://opensource.org/licenses/bsd-license.php
----------------------------------------------------------------------------
-
-Copyright (c) 1995-2011, Brian M. Clapper
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of the clapper.org nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
@@ -1,10 +0,0 @@
-AM_CFLAGS = -pedantic -Wall -Wextra -pipe $(HARDEN_CFLAGS)
-
-noinst_LIBRARIES = libpoll.a
-
-libpoll_a_SOURCES = \
- sys/poll.h \
- poll.h \
- poll.c
-
-EXTRA_DIST = LICENSE
Oops, something went wrong.

0 comments on commit bb65158

Please sign in to comment.