diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..94f938f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*~ +*_test +Makefile +*.log +*.status +autom4te.cache diff --git a/Makefile b/Makefile index f395d0a..b192268 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,8 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : sbin_PROGRAMS = helmetd$(EXEEXT) +noinst_PROGRAMS = udpclient_test$(EXEEXT) service_test$(EXEEXT) \ + server_test$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -103,11 +105,24 @@ CONFIG_HEADER = defines.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" -PROGRAMS = $(sbin_PROGRAMS) -am_helmetd_OBJECTS = server.$(OBJEXT) service.$(OBJEXT) \ - tunnel.$(OBJEXT) +PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS) +am_helmetd_OBJECTS = helmetd.$(OBJEXT) server.$(OBJEXT) \ + service.$(OBJEXT) interface.$(OBJEXT) hello.pb.$(OBJEXT) \ + udpclient.$(OBJEXT) resolver.$(OBJEXT) helmetd_OBJECTS = $(am_helmetd_OBJECTS) helmetd_LDADD = $(LDADD) +am_server_test_OBJECTS = server_test.$(OBJEXT) server.$(OBJEXT) \ + service.$(OBJEXT) interface.$(OBJEXT) +server_test_OBJECTS = $(am_server_test_OBJECTS) +server_test_LDADD = $(LDADD) +am_service_test_OBJECTS = service_test.$(OBJEXT) server.$(OBJEXT) \ + service.$(OBJEXT) interface.$(OBJEXT) +service_test_OBJECTS = $(am_service_test_OBJECTS) +service_test_LDADD = $(LDADD) +am_udpclient_test_OBJECTS = resolver.$(OBJEXT) udpclient.$(OBJEXT) \ + udpclient_test.$(OBJEXT) +udpclient_test_OBJECTS = $(am_udpclient_test_OBJECTS) +udpclient_test_LDADD = $(LDADD) AM_V_P = $(am__v_P_$(V)) am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) am__v_P_0 = false @@ -148,8 +163,10 @@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(helmetd_SOURCES) -DIST_SOURCES = $(helmetd_SOURCES) +SOURCES = $(helmetd_SOURCES) $(server_test_SOURCES) \ + $(service_test_SOURCES) $(udpclient_test_SOURCES) +DIST_SOURCES = $(helmetd_SOURCES) $(server_test_SOURCES) \ + $(service_test_SOURCES) $(udpclient_test_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -221,17 +238,17 @@ ECHO_N = -n ECHO_T = ETAGS = etags EXEEXT = -INSTALL = /bin/install -c +INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LDFLAGS = -pthread +LDFLAGS = -pthread -static LIBOBJS = -LIBS = +LIBS = -Wl,--as-need -lprotobuf-lite LTLIBOBJS = MAKEINFO = ${SHELL} '/home/ziggi/Projects/tcpserv09/missing' makeinfo -MKDIR_P = /bin/mkdir -p +MKDIR_P = /usr/bin/mkdir -p OBJEXT = o PACKAGE = helmet PACKAGE_BUGREPORT = @@ -241,6 +258,7 @@ PACKAGE_TARNAME = helmet PACKAGE_URL = PACKAGE_VERSION = 0.0.1 PATH_SEPARATOR = : +PROTOC = /usr/bin/protoc RANLIB = ranlib SET_MAKE = SHELL = /bin/bash @@ -293,15 +311,34 @@ top_build_prefix = top_builddir = . top_srcdir = . AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo subdir-objects -helmetd_SOURCES = server.cpp \ +helmetd_SOURCES = helmetd.cpp \ + server.cpp server.hpp \ service.cpp service.hpp \ - tunnel.cpp tunnel.hpp + interface.cpp interface.hpp \ + hello.pb.cc hello.pb.h \ + udpclient.cpp udpclient.hpp \ + resolver.cpp resolver.hpp + +server_test_SOURCES = server_test.cpp \ + server.cpp server.hpp \ + service.cpp service.hpp \ + interface.cpp interface.hpp + +service_test_SOURCES = service_test.cpp \ + server.cpp server.hpp \ + service.cpp service.hpp \ + interface.cpp interface.hpp + +udpclient_test_SOURCES = \ + resolver.cpp resolver.hpp \ + udpclient.cpp udpclient.hpp \ + udpclient_test.cpp all: defines.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .cpp .o .obj +.SUFFIXES: .cc .cpp .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -350,6 +387,9 @@ $(srcdir)/defines.h.in: $(am__configure_deps) distclean-hdr: -rm -f defines.h stamp-h1 + +clean-noinstPROGRAMS: + -$(am__rm_f) $(noinst_PROGRAMS) install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ @@ -397,12 +437,30 @@ helmetd$(EXEEXT): $(helmetd_OBJECTS) $(helmetd_DEPENDENCIES) $(EXTRA_helmetd_DEP @rm -f helmetd$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(helmetd_OBJECTS) $(helmetd_LDADD) $(LIBS) +server_test$(EXEEXT): $(server_test_OBJECTS) $(server_test_DEPENDENCIES) $(EXTRA_server_test_DEPENDENCIES) + @rm -f server_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(server_test_OBJECTS) $(server_test_LDADD) $(LIBS) + +service_test$(EXEEXT): $(service_test_OBJECTS) $(service_test_DEPENDENCIES) $(EXTRA_service_test_DEPENDENCIES) + @rm -f service_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(service_test_OBJECTS) $(service_test_LDADD) $(LIBS) + +udpclient_test$(EXEEXT): $(udpclient_test_OBJECTS) $(udpclient_test_DEPENDENCIES) $(EXTRA_udpclient_test_DEPENDENCIES) + @rm -f udpclient_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(udpclient_test_OBJECTS) $(udpclient_test_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c +.cc.o: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< + +.cc.obj: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + .cpp.o: $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< @@ -678,7 +736,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-local clean-sbinPROGRAMS mostlyclean-am +clean-am: clean-generic clean-local clean-noinstPROGRAMS \ + clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -749,28 +808,34 @@ uninstall-am: uninstall-sbinPROGRAMS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ - clean-cscope clean-generic clean-local clean-sbinPROGRAMS \ - cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - dist-zstd distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-sbinPROGRAMS + clean-cscope clean-generic clean-local clean-noinstPROGRAMS \ + clean-sbinPROGRAMS cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS .PRECIOUS: Makefile +test: udpclient_test + ./udpclient_test + run: helmetd ./helmetd +hello.pb.cc hello.pb.h: hello.proto + $(PROTOC) --cpp_out=. hello.proto + clean-local: rm -rf autom4te.cache rm -f *~ diff --git a/Makefile.am b/Makefile.am index 04152ab..60cce60 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,17 +2,49 @@ AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo subdir-objects CXXFLAGS = -std=c++23 -Wall -I. -pthread -D_GNU_SOURCE=1 -LDFLAGS = -pthread +LDFLAGS = -pthread -static +LIBS = -Wl,--as-need -lprotobuf-lite sbin_PROGRAMS = helmetd -helmetd_SOURCES = server.cpp \ +helmetd_SOURCES = helmetd.cpp \ + server.cpp server.hpp \ service.cpp service.hpp \ - tunnel.cpp tunnel.hpp + interface.cpp interface.hpp \ + hello.pb.cc hello.pb.h \ + udpclient.cpp udpclient.hpp \ + resolver.cpp resolver.hpp + +noinst_PROGRAMS = \ + udpclient_test \ + service_test \ + server_test + +server_test_SOURCES = server_test.cpp \ + server.cpp server.hpp \ + service.cpp service.hpp \ + interface.cpp interface.hpp + +service_test_SOURCES = service_test.cpp \ + server.cpp server.hpp \ + service.cpp service.hpp \ + interface.cpp interface.hpp + + +udpclient_test_SOURCES = \ + resolver.cpp resolver.hpp \ + udpclient.cpp udpclient.hpp \ + udpclient_test.cpp + +test: udpclient_test + ./udpclient_test run: helmetd ./helmetd +hello.pb.cc hello.pb.h: hello.proto + $(PROTOC) --cpp_out=. hello.proto + clean-local: rm -rf autom4te.cache rm -f *~ diff --git a/Makefile.in b/Makefile.in index 7bd538c..d2e6657 100644 --- a/Makefile.in +++ b/Makefile.in @@ -89,6 +89,8 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : sbin_PROGRAMS = helmetd$(EXEEXT) +noinst_PROGRAMS = udpclient_test$(EXEEXT) service_test$(EXEEXT) \ + server_test$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -103,11 +105,24 @@ CONFIG_HEADER = defines.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" -PROGRAMS = $(sbin_PROGRAMS) -am_helmetd_OBJECTS = server.$(OBJEXT) service.$(OBJEXT) \ - tunnel.$(OBJEXT) +PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS) +am_helmetd_OBJECTS = helmetd.$(OBJEXT) server.$(OBJEXT) \ + service.$(OBJEXT) interface.$(OBJEXT) hello.pb.$(OBJEXT) \ + udpclient.$(OBJEXT) resolver.$(OBJEXT) helmetd_OBJECTS = $(am_helmetd_OBJECTS) helmetd_LDADD = $(LDADD) +am_server_test_OBJECTS = server_test.$(OBJEXT) server.$(OBJEXT) \ + service.$(OBJEXT) interface.$(OBJEXT) +server_test_OBJECTS = $(am_server_test_OBJECTS) +server_test_LDADD = $(LDADD) +am_service_test_OBJECTS = service_test.$(OBJEXT) server.$(OBJEXT) \ + service.$(OBJEXT) interface.$(OBJEXT) +service_test_OBJECTS = $(am_service_test_OBJECTS) +service_test_LDADD = $(LDADD) +am_udpclient_test_OBJECTS = resolver.$(OBJEXT) udpclient.$(OBJEXT) \ + udpclient_test.$(OBJEXT) +udpclient_test_OBJECTS = $(am_udpclient_test_OBJECTS) +udpclient_test_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -148,8 +163,10 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(helmetd_SOURCES) -DIST_SOURCES = $(helmetd_SOURCES) +SOURCES = $(helmetd_SOURCES) $(server_test_SOURCES) \ + $(service_test_SOURCES) $(udpclient_test_SOURCES) +DIST_SOURCES = $(helmetd_SOURCES) $(server_test_SOURCES) \ + $(service_test_SOURCES) $(udpclient_test_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -226,9 +243,9 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = -pthread +LDFLAGS = -pthread -static LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = -Wl,--as-need -lprotobuf-lite LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ @@ -241,6 +258,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PROTOC = @PROTOC@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -293,15 +311,34 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo subdir-objects -helmetd_SOURCES = server.cpp \ +helmetd_SOURCES = helmetd.cpp \ + server.cpp server.hpp \ service.cpp service.hpp \ - tunnel.cpp tunnel.hpp + interface.cpp interface.hpp \ + hello.pb.cc hello.pb.h \ + udpclient.cpp udpclient.hpp \ + resolver.cpp resolver.hpp + +server_test_SOURCES = server_test.cpp \ + server.cpp server.hpp \ + service.cpp service.hpp \ + interface.cpp interface.hpp + +service_test_SOURCES = service_test.cpp \ + server.cpp server.hpp \ + service.cpp service.hpp \ + interface.cpp interface.hpp + +udpclient_test_SOURCES = \ + resolver.cpp resolver.hpp \ + udpclient.cpp udpclient.hpp \ + udpclient_test.cpp all: defines.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .cpp .o .obj +.SUFFIXES: .cc .cpp .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -350,6 +387,9 @@ $(srcdir)/defines.h.in: $(am__configure_deps) distclean-hdr: -rm -f defines.h stamp-h1 + +clean-noinstPROGRAMS: + -$(am__rm_f) $(noinst_PROGRAMS) install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ @@ -397,12 +437,30 @@ helmetd$(EXEEXT): $(helmetd_OBJECTS) $(helmetd_DEPENDENCIES) $(EXTRA_helmetd_DEP @rm -f helmetd$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(helmetd_OBJECTS) $(helmetd_LDADD) $(LIBS) +server_test$(EXEEXT): $(server_test_OBJECTS) $(server_test_DEPENDENCIES) $(EXTRA_server_test_DEPENDENCIES) + @rm -f server_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(server_test_OBJECTS) $(server_test_LDADD) $(LIBS) + +service_test$(EXEEXT): $(service_test_OBJECTS) $(service_test_DEPENDENCIES) $(EXTRA_service_test_DEPENDENCIES) + @rm -f service_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(service_test_OBJECTS) $(service_test_LDADD) $(LIBS) + +udpclient_test$(EXEEXT): $(udpclient_test_OBJECTS) $(udpclient_test_DEPENDENCIES) $(EXTRA_udpclient_test_DEPENDENCIES) + @rm -f udpclient_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(udpclient_test_OBJECTS) $(udpclient_test_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c +.cc.o: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< + +.cc.obj: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + .cpp.o: $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< @@ -678,7 +736,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-local clean-sbinPROGRAMS mostlyclean-am +clean-am: clean-generic clean-local clean-noinstPROGRAMS \ + clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -749,28 +808,34 @@ uninstall-am: uninstall-sbinPROGRAMS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ - clean-cscope clean-generic clean-local clean-sbinPROGRAMS \ - cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - dist-zstd distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-sbinPROGRAMS + clean-cscope clean-generic clean-local clean-noinstPROGRAMS \ + clean-sbinPROGRAMS cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS .PRECIOUS: Makefile +test: udpclient_test + ./udpclient_test + run: helmetd ./helmetd +hello.pb.cc hello.pb.h: hello.proto + $(PROTOC) --cpp_out=. hello.proto + clean-local: rm -rf autom4te.cache rm -f *~ diff --git a/config.log b/config.log deleted file mode 100644 index e4fe8bf..0000000 --- a/config.log +++ /dev/null @@ -1,460 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by helmet configure 0.0.1, which was -generated by GNU Autoconf 2.72. Invocation command line was - - $ ./configure - -## --------- ## -## Platform. ## -## --------- ## - -hostname = t14x.unix7.org -uname -m = x86_64 -uname -r = 6.12.74+deb13+1-amd64 -uname -s = Linux -uname -v = #1 SMP PREEMPT_DYNAMIC Debian 6.12.74-2 (2026-03-08) - -/usr/bin/uname -p = unknown -/bin/uname -X = unknown - -/bin/arch = x86_64 -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /home/ziggi/.node/bin/ -PATH: /bin/ -PATH: /usr/bin/ -PATH: /usr/local/bin/ -PATH: /sbin/ -PATH: /usr/sbin/ -PATH: /usr/local/sbin/ -PATH: ~/bin/ -PATH: ~/go/bin/ -PATH: /home/ziggi/.krew/bin/ -PATH: ~/go/bin/ - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure:2376: looking for aux files: compile missing install-sh -configure:2389: trying ./ -configure:2418: ./compile found -configure:2418: ./missing found -configure:2400: ./install-sh found -configure:2548: checking for a BSD-compatible install -configure:2622: result: /bin/install -c -configure:2633: checking whether sleep supports fractional seconds -configure:2649: result: yes -configure:2652: checking filesystem timestamp resolution -configure:2787: result: 0.01 -configure:2792: checking whether build environment is sane -configure:2833: result: yes -configure:3004: checking for a race-free mkdir -p -configure:3047: result: /bin/mkdir -p -configure:3054: checking for gawk -configure:3090: result: no -configure:3054: checking for mawk -configure:3075: found /bin/mawk -configure:3087: result: mawk -configure:3098: checking whether make sets $(MAKE) -configure:3122: result: yes -configure:3148: checking whether make supports nested variables -configure:3167: result: yes -configure:3181: checking xargs -n works -configure:3197: result: yes -configure:3368: checking for gcc -configure:3389: found /bin/gcc -configure:3401: result: gcc -configure:3432: checking for C compiler version -configure:3441: gcc --version >&5 -gcc (Debian 14.2.0-19) 14.2.0 -Copyright (C) 2024 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:3452: $? = 0 -configure:3441: gcc -v >&5 -Using built-in specs. -COLLECT_GCC=gcc -COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper -OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa -OFFLOAD_TARGET_DEFAULT=1 -Target: x86_64-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Debian 14.2.0-19' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=3 -Thread model: posix -Supported LTO compression algorithms: zlib zstd -gcc version 14.2.0 (Debian 14.2.0-19) -... rest of stderr output deleted ... -configure:3452: $? = 0 -configure:3441: gcc -V >&5 -gcc: error: unrecognized command-line option '-V' -gcc: fatal error: no input files -compilation terminated. -configure:3452: $? = 1 -configure:3441: gcc -qversion >&5 -gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'? -gcc: fatal error: no input files -compilation terminated. -configure:3452: $? = 1 -configure:3441: gcc -version >&5 -gcc: error: unrecognized command-line option '-version' -gcc: fatal error: no input files -compilation terminated. -configure:3452: $? = 1 -configure:3472: checking whether the C compiler works -configure:3494: gcc conftest.c >&5 -configure:3498: $? = 0 -configure:3549: result: yes -configure:3553: checking for C compiler default output file name -configure:3555: result: a.out -configure:3561: checking for suffix of executables -configure:3568: gcc -o conftest conftest.c >&5 -configure:3572: $? = 0 -configure:3596: result: -configure:3620: checking whether we are cross compiling -configure:3628: gcc -o conftest conftest.c >&5 -configure:3632: $? = 0 -configure:3639: ./conftest -configure:3643: $? = 0 -configure:3658: result: no -configure:3664: checking for suffix of object files -configure:3687: gcc -c conftest.c >&5 -configure:3691: $? = 0 -configure:3715: result: o -configure:3719: checking whether the compiler supports GNU C -configure:3739: gcc -c conftest.c >&5 -configure:3739: $? = 0 -configure:3751: result: yes -configure:3762: checking whether gcc accepts -g -configure:3783: gcc -c -g conftest.c >&5 -configure:3783: $? = 0 -configure:3830: result: yes -configure:3850: checking for gcc option to enable C11 features -configure:3865: gcc -c -g -O2 conftest.c >&5 -configure:3865: $? = 0 -configure:3884: result: none needed -configure:4008: checking whether gcc understands -c and -o together -configure:4031: gcc -c conftest.c -o conftest2.o -configure:4034: $? = 0 -configure:4031: gcc -c conftest.c -o conftest2.o -configure:4034: $? = 0 -configure:4047: result: yes -configure:4067: checking whether make supports the include directive -configure:4082: make -f confmf.GNU && cat confinc.out -this is the am__doit target -configure:4085: $? = 0 -configure:4104: result: yes (GNU style) -configure:4130: checking dependency style of gcc -configure:4243: result: none -configure:4307: checking for ranlib -configure:4328: found /bin/ranlib -configure:4340: result: ranlib -configure:4432: checking for g++ -configure:4453: found /bin/g++ -configure:4465: result: g++ -configure:4492: checking for C++ compiler version -configure:4501: g++ --version >&5 -g++ (Debian 14.2.0-19) 14.2.0 -Copyright (C) 2024 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:4512: $? = 0 -configure:4501: g++ -v >&5 -Using built-in specs. -COLLECT_GCC=g++ -COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper -OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa -OFFLOAD_TARGET_DEFAULT=1 -Target: x86_64-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Debian 14.2.0-19' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=3 -Thread model: posix -Supported LTO compression algorithms: zlib zstd -gcc version 14.2.0 (Debian 14.2.0-19) -... rest of stderr output deleted ... -configure:4512: $? = 0 -configure:4501: g++ -V >&5 -g++: error: unrecognized command-line option '-V' -g++: fatal error: no input files -compilation terminated. -configure:4512: $? = 1 -configure:4501: g++ -qversion >&5 -g++: error: unrecognized command-line option '-qversion'; did you mean '--version'? -g++: fatal error: no input files -compilation terminated. -configure:4512: $? = 1 -configure:4516: checking whether the compiler supports GNU C++ -configure:4536: g++ -c conftest.cpp >&5 -configure:4536: $? = 0 -configure:4548: result: yes -configure:4559: checking whether g++ accepts -g -configure:4580: g++ -c -g conftest.cpp >&5 -configure:4580: $? = 0 -configure:4627: result: yes -configure:4647: checking for g++ option to enable C++11 features -configure:4662: g++ -c -g -O2 conftest.cpp >&5 -conftest.cpp: In function 'int main(int, char**)': -conftest.cpp:177:25: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] - 177 | cxx11test::delegate d2(); - | ^~ -conftest.cpp:177:25: note: remove parentheses to default-initialize a variable - 177 | cxx11test::delegate d2(); - | ^~ - | -- -conftest.cpp:177:25: note: or replace parentheses with braces to value-initialize a variable -configure:4662: $? = 0 -configure:4681: result: none needed -configure:4752: checking dependency style of g++ -configure:4865: result: none -configure:4984: checking that generated files are newer than configure -configure:4990: result: done -configure:5029: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by helmet config.status 0.0.1, which was -generated by GNU Autoconf 2.72. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on t14x.unix7.org - -config.status:848: creating Makefile -config.status:848: creating defines.h -config.status:1029: defines.h is unchanged -config.status:1077: executing depfiles commands - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_c_compiler_gnu=yes -ac_cv_cxx_compiler_gnu=yes -ac_cv_env_CCC_set= -ac_cv_env_CCC_value= -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CXXFLAGS_set= -ac_cv_env_CXXFLAGS_value= -ac_cv_env_CXX_set= -ac_cv_env_CXX_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_objext=o -ac_cv_path_install='/bin/install -c' -ac_cv_path_mkdir=/bin/mkdir -ac_cv_prog_AWK=mawk -ac_cv_prog_ac_ct_CC=gcc -ac_cv_prog_ac_ct_CXX=g++ -ac_cv_prog_ac_ct_RANLIB=ranlib -ac_cv_prog_cc_c11= -ac_cv_prog_cc_g=yes -ac_cv_prog_cc_stdc= -ac_cv_prog_cxx_cxx11= -ac_cv_prog_cxx_g=yes -ac_cv_prog_cxx_stdcxx= -ac_cv_prog_make_make_set=yes -am_cv_CC_dependencies_compiler_type=none -am_cv_CXX_dependencies_compiler_type=none -am_cv_filesystem_timestamp_resolution=0.01 -am_cv_make_support_nested_variables=yes -am_cv_prog_cc_c_o=yes -am_cv_sleep_fractional_seconds=yes -am_cv_xargs_n_works=yes - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -ACLOCAL='${SHELL} '\''/home/ziggi/Projects/tcpserv09/missing'\'' aclocal-1.17' -AMDEPBACKSLASH='\' -AMDEP_FALSE='#' -AMDEP_TRUE='' -AMTAR='$${TAR-tar}' -AM_BACKSLASH='\' -AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -AM_DEFAULT_VERBOSITY='1' -AM_V='$(V)' -AUTOCONF='${SHELL} '\''/home/ziggi/Projects/tcpserv09/missing'\'' autoconf' -AUTOHEADER='${SHELL} '\''/home/ziggi/Projects/tcpserv09/missing'\'' autoheader' -AUTOMAKE='${SHELL} '\''/home/ziggi/Projects/tcpserv09/missing'\'' automake-1.17' -AWK='mawk' -CC='gcc' -CCDEPMODE='depmode=none' -CFLAGS='-g -O2' -CPPFLAGS='' -CSCOPE='cscope' -CTAGS='ctags' -CXX='g++' -CXXDEPMODE='depmode=none' -CXXFLAGS='-g -O2' -CYGPATH_W='echo' -DEFS='-DHAVE_CONFIG_H' -DEPDIR='.deps' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -ETAGS='etags' -EXEEXT='' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' -LDFLAGS='' -LIBOBJS='' -LIBS='' -LTLIBOBJS='' -MAKEINFO='${SHELL} '\''/home/ziggi/Projects/tcpserv09/missing'\'' makeinfo' -MKDIR_P='/bin/mkdir -p' -OBJEXT='o' -PACKAGE='helmet' -PACKAGE_BUGREPORT='' -PACKAGE_NAME='helmet' -PACKAGE_STRING='helmet 0.0.1' -PACKAGE_TARNAME='helmet' -PACKAGE_URL='' -PACKAGE_VERSION='0.0.1' -PATH_SEPARATOR=':' -RANLIB='ranlib' -SET_MAKE='' -SHELL='/bin/bash' -STRIP='' -VERSION='0.0.1' -ac_ct_CC='gcc' -ac_ct_CXX='g++' -am__EXEEXT_FALSE='' -am__EXEEXT_TRUE='#' -am__fastdepCC_FALSE='' -am__fastdepCC_TRUE='#' -am__fastdepCXX_FALSE='' -am__fastdepCXX_TRUE='#' -am__include='include' -am__isrc='' -am__leading_dot='.' -am__nodep='_no' -am__quote='' -am__rm_f_notfound='' -am__tar='$${TAR-tar} chof - "$$tardir"' -am__untar='$${TAR-tar} xf -' -am__xargs_n='xargs -n' -bindir='${exec_prefix}/bin' -build_alias='' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -dvidir='${docdir}' -exec_prefix='${prefix}' -host_alias='' -htmldir='${docdir}' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -install_sh='${SHELL} /home/ziggi/Projects/tcpserv09/install-sh' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -mandir='${datarootdir}/man' -mkdir_p='$(MKDIR_P)' -oldincludedir='/usr/include' -pdfdir='${docdir}' -prefix='/usr/local' -program_transform_name='s,x,x,' -psdir='${docdir}' -runstatedir='${localstatedir}/run' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target_alias='' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -/* confdefs.h */ -#define PACKAGE_NAME "helmet" -#define PACKAGE_TARNAME "helmet" -#define PACKAGE_VERSION "0.0.1" -#define PACKAGE_STRING "helmet 0.0.1" -#define PACKAGE_BUGREPORT "" -#define PACKAGE_URL "" -#define PACKAGE "helmet" -#define VERSION "0.0.1" - -configure: exit 0 - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by helmet config.status 0.0.1, which was -generated by GNU Autoconf 2.72. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status Makefile - -on t14x.unix7.org - -config.status:848: creating Makefile - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by helmet config.status 0.0.1, which was -generated by GNU Autoconf 2.72. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status Makefile - -on t14x.unix7.org - -config.status:848: creating Makefile - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by helmet config.status 0.0.1, which was -generated by GNU Autoconf 2.72. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status Makefile - -on t14x.unix7.org - -config.status:848: creating Makefile diff --git a/config.status b/config.status deleted file mode 100755 index 4b46858..0000000 --- a/config.status +++ /dev/null @@ -1,1185 +0,0 @@ -#! /bin/bash -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=${CONFIG_SHELL-/bin/bash} -export SHELL -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else case e in #( - e) case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as 'sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - printf "%s\n" "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else case e in #( - e) as_fn_append () - { - eval $1=\$$1\$2 - } ;; -esac -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else case e in #( - e) as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } ;; -esac -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. - # In both cases, we have to default to 'cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" -as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated - -# Sed expression to map a string onto a valid variable name. -as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -as_tr_sh="eval sed '$as_sed_sh'" # deprecated - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by helmet $as_me 0.0.1, which was -generated by GNU Autoconf 2.72. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" Makefile" -config_headers=" defines.h" -config_commands=" depfiles" - -ac_cs_usage="\ -'$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -ac_cs_config='' -ac_cs_version="\ -helmet config.status 0.0.1 -configured by ./configure, generated by GNU Autoconf 2.72, - with options \"$ac_cs_config\" - -Copyright (C) 2023 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/ziggi/Projects/tcpserv09' -srcdir='.' -INSTALL='/bin/install -c' -MKDIR_P='/bin/mkdir -p' -AWK='mawk' -test -n "$AWK" || AWK=awk -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: '$1' -Try '$0 --help' for more information.";; - --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: '$1' -Try '$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - set X /bin/bash './configure' $ac_configure_extra_args --no-create --no-recursion - shift - \printf "%s\n" "running CONFIG_SHELL=/bin/bash $*" >&6 - CONFIG_SHELL='/bin/bash' - export CONFIG_SHELL - exec "$@" -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - printf "%s\n" "$ac_log" -} >&5 - -# -# INIT-COMMANDS -# -AMDEP_TRUE="" MAKE="make" - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "defines.h") CONFIG_HEADERS="$CONFIG_HEADERS defines.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to '$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with './config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && -S["am__EXEEXT_FALSE"]="" -S["am__EXEEXT_TRUE"]="#" -S["LTLIBOBJS"]="" -S["LIBOBJS"]="" -S["am__fastdepCXX_FALSE"]="" -S["am__fastdepCXX_TRUE"]="#" -S["CXXDEPMODE"]="depmode=none" -S["ac_ct_CXX"]="g++" -S["CXXFLAGS"]="-g -O2" -S["CXX"]="g++" -S["RANLIB"]="ranlib" -S["am__fastdepCC_FALSE"]="" -S["am__fastdepCC_TRUE"]="#" -S["CCDEPMODE"]="depmode=none" -S["am__nodep"]="_no" -S["AMDEPBACKSLASH"]="\\" -S["AMDEP_FALSE"]="#" -S["AMDEP_TRUE"]="" -S["am__include"]="include" -S["DEPDIR"]=".deps" -S["OBJEXT"]="o" -S["EXEEXT"]="" -S["ac_ct_CC"]="gcc" -S["CPPFLAGS"]="" -S["LDFLAGS"]="" -S["CFLAGS"]="-g -O2" -S["CC"]="gcc" -S["am__xargs_n"]="xargs -n" -S["am__rm_f_notfound"]="" -S["AM_BACKSLASH"]="\\" -S["AM_DEFAULT_VERBOSITY"]="1" -S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" -S["AM_V"]="$(V)" -S["CSCOPE"]="cscope" -S["ETAGS"]="etags" -S["CTAGS"]="ctags" -S["am__untar"]="$${TAR-tar} xf -" -S["am__tar"]="$${TAR-tar} chof - \"$$tardir\"" -S["AMTAR"]="$${TAR-tar}" -S["am__leading_dot"]="." -S["SET_MAKE"]="" -S["AWK"]="mawk" -S["mkdir_p"]="$(MKDIR_P)" -S["MKDIR_P"]="/bin/mkdir -p" -S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" -S["STRIP"]="" -S["install_sh"]="${SHELL} /home/ziggi/Projects/tcpserv09/install-sh" -S["MAKEINFO"]="${SHELL} '/home/ziggi/Projects/tcpserv09/missing' makeinfo" -S["AUTOHEADER"]="${SHELL} '/home/ziggi/Projects/tcpserv09/missing' autoheader" -S["AUTOMAKE"]="${SHELL} '/home/ziggi/Projects/tcpserv09/missing' automake-1.17" -S["AUTOCONF"]="${SHELL} '/home/ziggi/Projects/tcpserv09/missing' autoconf" -S["ACLOCAL"]="${SHELL} '/home/ziggi/Projects/tcpserv09/missing' aclocal-1.17" -S["VERSION"]="0.0.1" -S["PACKAGE"]="helmet" -S["CYGPATH_W"]="echo" -S["am__isrc"]="" -S["INSTALL_DATA"]="${INSTALL} -m 644" -S["INSTALL_SCRIPT"]="${INSTALL}" -S["INSTALL_PROGRAM"]="${INSTALL}" -S["target_alias"]="" -S["host_alias"]="" -S["build_alias"]="" -S["LIBS"]="" -S["ECHO_T"]="" -S["ECHO_N"]="-n" -S["ECHO_C"]="" -S["DEFS"]="-DHAVE_CONFIG_H" -S["mandir"]="${datarootdir}/man" -S["localedir"]="${datarootdir}/locale" -S["libdir"]="${exec_prefix}/lib" -S["psdir"]="${docdir}" -S["pdfdir"]="${docdir}" -S["dvidir"]="${docdir}" -S["htmldir"]="${docdir}" -S["infodir"]="${datarootdir}/info" -S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" -S["oldincludedir"]="/usr/include" -S["includedir"]="${prefix}/include" -S["runstatedir"]="${localstatedir}/run" -S["localstatedir"]="${prefix}/var" -S["sharedstatedir"]="${prefix}/com" -S["sysconfdir"]="${prefix}/etc" -S["datadir"]="${datarootdir}" -S["datarootdir"]="${prefix}/share" -S["libexecdir"]="${exec_prefix}/libexec" -S["sbindir"]="${exec_prefix}/sbin" -S["bindir"]="${exec_prefix}/bin" -S["program_transform_name"]="s,x,x," -S["prefix"]="/usr/local" -S["exec_prefix"]="${prefix}" -S["PACKAGE_URL"]="" -S["PACKAGE_BUGREPORT"]="" -S["PACKAGE_STRING"]="helmet 0.0.1" -S["PACKAGE_VERSION"]="0.0.1" -S["PACKAGE_TARNAME"]="helmet" -S["PACKAGE_NAME"]="helmet" -S["PATH_SEPARATOR"]=":" -S["SHELL"]="/bin/bash" -S["am__quote"]="" -_ACAWK -cat >>"$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with './config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -D["PACKAGE_NAME"]=" \"helmet\"" -D["PACKAGE_TARNAME"]=" \"helmet\"" -D["PACKAGE_VERSION"]=" \"0.0.1\"" -D["PACKAGE_STRING"]=" \"helmet 0.0.1\"" -D["PACKAGE_BUGREPORT"]=" \"\"" -D["PACKAGE_URL"]=" \"\"" -D["PACKAGE"]=" \"helmet\"" -D["VERSION"]=" \"0.0.1\"" - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { - line = $ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain ':'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is 'configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac -ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - printf "%s\n" "/* $configure_input */" >&1 \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac - shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf - do - # Strip MF so we end up with the name of the file. - am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? - done - if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See 'config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk -} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 diff --git a/configure b/configure index b0096dd..6288408 100755 --- a/configure +++ b/configure @@ -610,6 +610,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +PROTOC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE @@ -4878,6 +4879,58 @@ fi +for ac_prog in protoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PROTOC+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $PROTOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_PROTOC="$PROTOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PROTOC="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +PROTOC=$ac_cv_path_PROTOC +if test -n "$PROTOC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROTOC" >&5 +printf "%s\n" "$PROTOC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$PROTOC" && break +done + + ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF diff --git a/configure.ac b/configure.ac index b32ab22..6845a85 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,8 @@ AC_PROG_CC([gcc cc]) AC_PROG_RANLIB AC_PROG_CXX([g++ c++]) +AC_PATH_PROGS([PROTOC],[protoc]) + AC_CONFIG_FILES([ Makefile ]) diff --git a/hello.pb.cc b/hello.pb.cc new file mode 100644 index 0000000..f52ba55 --- /dev/null +++ b/hello.pb.cc @@ -0,0 +1,280 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hello.proto + +#include "hello.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace control { +PROTOBUF_CONSTEXPR Hello::Hello( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.id_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct HelloDefaultTypeInternal { + PROTOBUF_CONSTEXPR HelloDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HelloDefaultTypeInternal() {} + union { + Hello _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HelloDefaultTypeInternal _Hello_default_instance_; +} // namespace control +namespace control { + +// =================================================================== + +class Hello::_Internal { + public: +}; + +Hello::Hello(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:control.Hello) +} +Hello::Hello(const Hello& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Hello* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.id_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.id_ = from._impl_.id_; + // @@protoc_insertion_point(copy_constructor:control.Hello) +} + +inline void Hello::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.id_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Hello::~Hello() { + // @@protoc_insertion_point(destructor:control.Hello) + if (auto *arena = _internal_metadata_.DeleteReturnArena()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Hello::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void Hello::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Hello::Clear() { +// @@protoc_insertion_point(message_clear_start:control.Hello) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.id_ = 0; + _internal_metadata_.Clear(); +} + +const char* Hello::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int32 id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Hello::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:control.Hello) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // int32 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target); + } + + // string name = 2; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "control.Hello.name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:control.Hello) + return target; +} + +size_t Hello::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:control.Hello) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 2; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // int32 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Hello::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast( + &from)); +} + +void Hello::MergeFrom(const Hello& from) { + Hello* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:control.Hello) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (from._internal_id() != 0) { + _this->_internal_set_id(from._internal_id()); + } + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Hello::CopyFrom(const Hello& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:control.Hello) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Hello::IsInitialized() const { + return true; +} + +void Hello::InternalSwap(Hello* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.id_, other->_impl_.id_); +} + +std::string Hello::GetTypeName() const { + return "control.Hello"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace control +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::control::Hello* +Arena::CreateMaybeMessage< ::control::Hello >(Arena* arena) { + return Arena::CreateMessageInternal< ::control::Hello >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/hello.pb.h b/hello.pb.h new file mode 100644 index 0000000..c9288e7 --- /dev/null +++ b/hello.pb.h @@ -0,0 +1,292 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hello.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_hello_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_hello_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_hello_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_hello_2eproto { + static const uint32_t offsets[]; +}; +namespace control { +class Hello; +struct HelloDefaultTypeInternal; +extern HelloDefaultTypeInternal _Hello_default_instance_; +} // namespace control +PROTOBUF_NAMESPACE_OPEN +template<> ::control::Hello* Arena::CreateMaybeMessage<::control::Hello>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace control { + +// =================================================================== + +class Hello final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:control.Hello) */ { + public: + inline Hello() : Hello(nullptr) {} + ~Hello() override; + explicit PROTOBUF_CONSTEXPR Hello(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Hello(const Hello& from); + Hello(Hello&& from) noexcept + : Hello() { + *this = ::std::move(from); + } + + inline Hello& operator=(const Hello& from) { + CopyFrom(from); + return *this; + } + inline Hello& operator=(Hello&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const Hello& default_instance() { + return *internal_default_instance(); + } + static inline const Hello* internal_default_instance() { + return reinterpret_cast( + &_Hello_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Hello& a, Hello& b) { + a.Swap(&b); + } + inline void Swap(Hello* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Hello* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Hello* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Hello& from); + void MergeFrom(const Hello& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Hello* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "control.Hello"; + } + protected: + explicit Hello(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 2, + kIdFieldNumber = 1, + }; + // string name = 2; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // int32 id = 1; + void clear_id(); + int32_t id() const; + void set_id(int32_t value); + private: + int32_t _internal_id() const; + void _internal_set_id(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:control.Hello) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int32_t id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_hello_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Hello + +// int32 id = 1; +inline void Hello::clear_id() { + _impl_.id_ = 0; +} +inline int32_t Hello::_internal_id() const { + return _impl_.id_; +} +inline int32_t Hello::id() const { + // @@protoc_insertion_point(field_get:control.Hello.id) + return _internal_id(); +} +inline void Hello::_internal_set_id(int32_t value) { + + _impl_.id_ = value; +} +inline void Hello::set_id(int32_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:control.Hello.id) +} + +// string name = 2; +inline void Hello::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& Hello::name() const { + // @@protoc_insertion_point(field_get:control.Hello.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Hello::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:control.Hello.name) +} +inline std::string* Hello::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:control.Hello.name) + return _s; +} +inline const std::string& Hello::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Hello::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Hello::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Hello::release_name() { + // @@protoc_insertion_point(field_release:control.Hello.name) + return _impl_.name_.Release(); +} +inline void Hello::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:control.Hello.name) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace control + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_hello_2eproto diff --git a/hello.proto b/hello.proto new file mode 100644 index 0000000..2b89f42 --- /dev/null +++ b/hello.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package control; +option optimize_for = LITE_RUNTIME; +option cc_generic_services = false; + + +message Hello { + int32 id = 1; + string name = 2; +} + diff --git a/helmetd.cpp b/helmetd.cpp new file mode 100644 index 0000000..b731339 --- /dev/null +++ b/helmetd.cpp @@ -0,0 +1,12 @@ + +#include +#include +#include + +#include +#include + + +int main(int argc, char** argv) { + return 0; +} diff --git a/tunnel.cpp b/interface.cpp similarity index 99% rename from tunnel.cpp rename to interface.cpp index c910771..cd48bfd 100644 --- a/tunnel.cpp +++ b/interface.cpp @@ -24,7 +24,7 @@ extern "C" { #include #include -#include +#include std::expected Interface::Create(const std::string name) { if ((tunfd = open("/dev/net/tun", O_RDWR | O_CLOEXEC)) < 0) { diff --git a/tunnel.hpp b/interface.hpp similarity index 94% rename from tunnel.hpp rename to interface.hpp index 904e7f5..8c7285c 100644 --- a/tunnel.hpp +++ b/interface.hpp @@ -1,6 +1,6 @@ -#ifndef TUNNEL_HPP_QWERTY -#define TUNNEL_HPP_QWERTY +#ifndef INTERFACE_HPP +#define INTERFACE_HPP class Interface { private: diff --git a/resolver.cpp b/resolver.cpp new file mode 100644 index 0000000..8a4e6e9 --- /dev/null +++ b/resolver.cpp @@ -0,0 +1,76 @@ + +extern "C" { +#include +#include +#include +} + +#include +#include +#include + +#include + +Address::Address(std::string iaddress, int ifamily) { + address = iaddress; + family = ifamily; +} + +int Address::GetFamily() { + return family; +} + +std::string Address::GetAddress() { + return address; +} + +std::expected Resolver::Resolve(std::string hostname) { + struct sockaddr_in sa; + if (inet_pton(AF_INET, hostname.c_str(), &(sa.sin_addr)) == 1) { + family = AF_INET; + return Address(hostname, AF_INET); + } + if (inet_pton(AF_INET6, hostname.c_str(), &(sa.sin_addr)) == 1) { + return Address(hostname, AF_INET6); + } + + struct addrinfo hints, *res; + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_DGRAM; + + int status = 0; + if ((status = getaddrinfo(hostname.c_str(), NULL, &hints, &res)) != 0) { + std::string error = gai_strerror(status); + return std::unexpected("Resolve adress error: " + error); + } + struct addrinfo* p; + char ipaddr[INET6_ADDRSTRLEN + 1]; + for (p = res; p != NULL; p = p->ai_next) { + if (p->ai_family == AF_INET) { + struct sockaddr_in *ipv4 = (struct sockaddr_in *)p->ai_addr; + void* addr = &(ipv4->sin_addr); + if (inet_ntop(p->ai_family, addr, ipaddr, sizeof(ipaddr)) == NULL) { + int errnocopy = errno; + std::string error = std::strerror(errnocopy); + return std::unexpected("Cannot conver address: " + error); + } + std::string address(ipaddr); + return Address(address, AF_INET);; + } + } + for (p = res; p != NULL; p = p->ai_next) { + if (p->ai_family == AF_INET6) { + struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)p->ai_addr; + void* addr = &(ipv6->sin6_addr); + if (inet_ntop(p->ai_family, addr, ipaddr, sizeof(ipaddr)) == NULL) { + int errnocopy = errno; + std::string error = std::strerror(errnocopy); + return std::unexpected("Cannot conver address: " + error); + } + std::string address(ipaddr); + return Address(address, AF_INET6); + } + } + return std::unexpected("Cannot resolve hostname " + hostname); +} diff --git a/resolver.hpp b/resolver.hpp new file mode 100644 index 0000000..463c4fd --- /dev/null +++ b/resolver.hpp @@ -0,0 +1,20 @@ + +#include +#include + +class Address { + private: + int family; + std::string address; + public: + Address(const std::string iaddress, const int ifamily); + int GetFamily(); + std::string GetAddress(); +}; + +class Resolver { + private: + int family; + public: + std::expected Resolve(const std::string hostname); +}; diff --git a/server.cpp b/server.cpp index 3c74fe6..f2eb5b7 100644 --- a/server.cpp +++ b/server.cpp @@ -14,15 +14,8 @@ extern "C" { #include #include +#include -using namespace std::chrono_literals; - -class Server { - private: - Interface iface; - public: - std::expected Create(const std::string name, const std::string addr, const int prefix); -}; std::expected Server::Create(const std::string name, const std::string addr, const int prefix) { auto createres = iface.Create(name); @@ -44,29 +37,3 @@ std::expected Server::Create(const std::string name, const st return {}; } -int main(int argc, char** argv) { -#if 0 - Service svc(1025); - auto bindres = svc.Bind(); - if (!bindres) { - std::cerr << bindres.error() << std::endl; - return 1; - } - Handler handler; - auto listres = svc.Listen(&handler); - if (!listres) { - std::cerr << listres.error() << std::endl; - return 1; - } -#endif - Server srv; - auto createres = srv.Create("tun10", "10.1.2.1", 30); - if (!createres) { - std::cerr << "Error: " << createres.error() << std::endl; - return 1; - } - - std::chrono::milliseconds timesleep(20s); - std::this_thread::sleep_for(timesleep); - return 0; -} diff --git a/server.hpp b/server.hpp new file mode 100644 index 0000000..151708f --- /dev/null +++ b/server.hpp @@ -0,0 +1,29 @@ + + + +extern "C" { +#include +} + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +using namespace std::chrono_literals; + +class Server { + private: + Interface iface; + public: + std::expected Create(const std::string name, const std::string addr, const int prefix); +}; diff --git a/server_test.cpp b/server_test.cpp new file mode 100644 index 0000000..2397361 --- /dev/null +++ b/server_test.cpp @@ -0,0 +1,23 @@ + +#include +#include +#include +#include + +#include +#include + +using namespace std::chrono_literals; + + +int main(int argc, char** argv) { + Server srv; + auto createres = srv.Create("tun10", "10.1.2.1", 30); + if (!createres) { + std::cerr << "Error: " << createres.error() << std::endl; + return 1; + } + std::chrono::milliseconds timesleep(20s); + std::this_thread::sleep_for(timesleep); + return 0; +} diff --git a/service_test.cpp b/service_test.cpp new file mode 100644 index 0000000..28fc5b0 --- /dev/null +++ b/service_test.cpp @@ -0,0 +1,27 @@ + +extern "C" { +#include +} + +#include +#include +#include +#include + +#include +#include + +int main(int argc, char** argv) { + Service svc(1025); + auto bindres = svc.Bind(); + if (!bindres) { + std::cerr << bindres.error() << std::endl; + return 1; + } + Handler handler; + auto listres = svc.Listen(&handler); + if (!listres) { + std::cerr << listres.error() << std::endl; + return 1; + } +} diff --git a/udpclient.cpp b/udpclient.cpp new file mode 100644 index 0000000..5760afd --- /dev/null +++ b/udpclient.cpp @@ -0,0 +1,96 @@ + +extern "C" { +#include +#include +#include +#include + +#include +#include +} + +#include +#include +#include +#include + +#include +#include + + +UDPClient::UDPClient(void){ + sockfd = 0; + rmax = 2024; +}; + +std::expected UDPClient::Bind(std::string hostname, int nport) { + port = nport; + + Resolver resolver; + auto resolveRes = resolver.Resolve(hostname); + if (!resolveRes) { + auto msg = std::format("Cannot resolve hostname {}: {}", hostname, resolveRes.error()); + return std::unexpected(msg); + } + auto addr = resolveRes.value(); + address = addr.GetAddress(); + family = addr.GetFamily(); + + if ((sockfd = socket(family, SOCK_DGRAM, 0)) < 0) { + int errnocopy = errno; + std::string error = std::strerror(errnocopy); + return std::unexpected("Create socket error: " + error); + } + return {}; + +} + +std::expected UDPClient::Send(std::string message) { + struct sockaddr_in servaddr; + memset(&servaddr, 0, sizeof(servaddr)); + servaddr.sin_family = family; + servaddr.sin_port = htons(port); + servaddr.sin_addr.s_addr = inet_addr(address.c_str()); + + if (sendto(sockfd, message.data(), message.size(), 0, + (const struct sockaddr*)&servaddr, sizeof(servaddr)) < 0) { + int errnocopy = errno; + std::string error = std::strerror(errnocopy); + return std::unexpected("Send datagram error: " + error); + } + return {}; +} + +std::expected UDPClient::Recv() { + struct sockaddr_in servaddr; + memset(&servaddr, 0, sizeof(servaddr)); + servaddr.sin_family = family; + servaddr.sin_port = htons(port); + servaddr.sin_addr.s_addr = inet_addr(address.c_str()); + + socklen_t len = sizeof(servaddr); + int rsize = 0; + std::string buffer(rmax, 0); + if((rsize = recvfrom(sockfd, buffer.data(), buffer.size(), + 0, (struct sockaddr *)&servaddr, &len)) < 0) { + int errnocopy = errno; + std::string error = std::strerror(errnocopy); + return std::unexpected("Receive datagram error: " + error); + } + std::string reply(buffer.begin(), buffer.begin() + rsize); + return reply; +} + +void UDPClient::Close(void) { + if (sockfd > 0) { + close(sockfd); + sockfd = 0; + } +}; + +UDPClient::~UDPClient(void) { + if (sockfd > 0) { + close(sockfd); + } +}; + diff --git a/udpclient.hpp b/udpclient.hpp new file mode 100644 index 0000000..5456793 --- /dev/null +++ b/udpclient.hpp @@ -0,0 +1,21 @@ + +#ifndef UPDCLIENT_HPP +#define UPDCLIENT_HPP + +class UDPClient { + private: + int sockfd; + std::string address; + int port; + int rmax; + int family; + public: + UDPClient(void); + std::expected Bind(std::string address, int port); + std::expected Send(std::string buffer); + std::expected Recv(); + void Close(void); + ~UDPClient(void); +}; + +#endif diff --git a/udpclient_test.cpp b/udpclient_test.cpp new file mode 100644 index 0000000..edc6a63 --- /dev/null +++ b/udpclient_test.cpp @@ -0,0 +1,26 @@ + +#include +#include +#include + +#include + +int main(int argc, char** argv) { + UDPClient cli; + std::string message("Hello"); + { + auto res = cli.Bind("www.gnu.org", 1025); + if (!res) { + std::cerr << std::format("Error: {}", res.error()) << std::endl; + return 1; + } + } + { + auto res = cli.Send(message); + if (!res) { + std::cerr << std::format("Error: {}", res.error()) << std::endl; + return 1; + } + } + return 0; +}