Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to fully-qualified #includes #1261

Merged
merged 2 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ src/include/config.h.in~
src/include/stamp-h1
/test-driver
/VERSION
/VERSION.stamp
/scripts/mosh
src/include/version.h
16 changes: 8 additions & 8 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(top_srcdir)/aminclude_static.am
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = scripts src man conf
EXTRA_DIST = autogen.sh ocb-license.html README.md COPYING.iOS
BUILT_SOURCES = VERSION
BUILT_SOURCES = VERSION.stamp
AM_DISTCHECK_CONFIGURE_FLAGS += --enable-compile-warnings=distcheck --enable-examples --enable-syslog

# AX_CODE_COVERAGE configuration
Expand All @@ -31,22 +31,22 @@ OCLINT_OPTIONS = -enable-global-analysis -max-priority-2=1000 -max-priority-3=10
-rc SHORT_VARIABLE_NAME=1 \
-rc MINIMUM_CASES_IN_SWITCH=2

.PHONY: VERSION
.PHONY: VERSION.stamp

VERSION:
VERSION.stamp:
@echo @PACKAGE_STRING@ > VERSION.dist
@set -e; if git describe --dirty --always > VERSION.git 2>&1 && \
[ -z `git rev-parse --show-prefix` ]; then \
if ! diff -q VERSION.git VERSION > /dev/null 2>&1; then \
mv -f VERSION.git VERSION; \
if ! diff -q VERSION.git VERSION.stamp > /dev/null 2>&1; then \
mv -f VERSION.git VERSION.stamp; \
fi; \
elif ! diff -q VERSION.dist VERSION > /dev/null 2>&1; then \
mv -f VERSION.dist VERSION; \
elif ! diff -q VERSION.dist VERSION.stamp > /dev/null 2>&1; then \
mv -f VERSION.dist VERSION.stamp; \
fi
@rm -f VERSION.dist VERSION.git

clean-local:
@rm -rf VERSION cov-int mosh-coverity.txz compile_commands.json
@rm -rf VERSION.stamp cov-int mosh-coverity.txz compile_commands.json

# Linters and static checkers, for development only. Not included in
# build dependencies, and outside of Automake processing.
Expand Down
2 changes: 1 addition & 1 deletion macosx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ perl -wlpi -e 's{#!/usr/bin/env perl}{#!/usr/bin/perl}' "$PREFIX/local/bin/mosh"

popd > /dev/null

PACKAGE_VERSION=$(cat ../VERSION)
PACKAGE_VERSION=$(cat ../VERSION.stamp)

OUTFILE="$PACKAGE_VERSION.pkg"

Expand Down
4 changes: 2 additions & 2 deletions scripts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if BUILD_CLIENT
endif
CLEANFILES = $(bin_SCRIPTS)

mosh: mosh.pl ../VERSION Makefile
mosh: mosh.pl ../VERSION.stamp Makefile
perl -Mdiagnostics -c $(srcdir)/mosh.pl
@sed -e "s/\@VERSION\@/`cat ../VERSION`/" -e "s/\@PACKAGE_STRING\@/@PACKAGE_STRING@/" $(srcdir)/mosh.pl > mosh
@sed -e "s/\@VERSION\@/`cat ../VERSION.stamp`/" -e "s/\@PACKAGE_STRING\@/@PACKAGE_STRING@/" $(srcdir)/mosh.pl > mosh
@chmod a+x mosh
2 changes: 1 addition & 1 deletion src/crypto/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AM_CPPFLAGS = -I$(srcdir)/../util $(CRYPTO_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/ $(CRYPTO_CFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) $(CODE_COVERAGE_CXXFLAGS)

noinst_LIBRARIES = libmoshcrypto.a
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/base64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <string.h>
#include <stdlib.h>

#include "fatal_assert.h"
#include "base64.h"
#include "src/util/fatal_assert.h"
#include "src/crypto/base64.h"

static const char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifndef BYTEORDER_HPP
#define BYTEORDER_HPP

#include "config.h"
#include "src/include/config.h"

#if HAVE_DECL_BE64TOH || HAVE_DECL_BETOH64

Expand Down
10 changes: 5 additions & 5 deletions src/crypto/crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
#include <sys/resource.h>
#include <fstream>

#include "byteorder.h"
#include "crypto.h"
#include "base64.h"
#include "fatal_assert.h"
#include "prng.h"
#include "src/crypto/byteorder.h"
#include "src/crypto/crypto.h"
#include "src/crypto/base64.h"
#include "src/util/fatal_assert.h"
#include "src/crypto/prng.h"

using namespace Crypto;

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifndef CRYPTO_HPP
#define CRYPTO_HPP

#include "ae.h"
#include "src/crypto/ae.h"
#include <string>
#include <string.h>
#include <stdint.h>
Expand Down
8 changes: 4 additions & 4 deletions src/crypto/ocb_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/ Comments are welcome: Ted Krovetz <[email protected]> - Dedicated to Laurel K
/------------------------------------------------------------------------- */

#include "config.h"
#include "src/include/config.h"

/* This module implements the ae.h interface for OpenSSL, Apple Common
/ Crypto, and Nettle. */
Expand Down Expand Up @@ -84,9 +84,9 @@
/* Includes and compiler specific definitions */
/* ----------------------------------------------------------------------- */

#include "ae.h"
#include "crypto.h"
#include "fatal_assert.h"
#include "src/crypto/ae.h"
#include "src/crypto/crypto.h"
#include "src/util/fatal_assert.h"
#include <stdlib.h>
#include <string.h>
#if defined(HAVE_STRINGS_H)
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/ocb_openssl.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "config.h"
#include "ae.h"
#include "src/include/config.h"
#include "src/crypto/ae.h"

#include <cstring>
#include <openssl/crypto.h>
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/prng.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <stdint.h>
#include <fstream>

#include "crypto.h"
#include "src/crypto/crypto.h"

/* Read random bytes from /dev/urandom.
Expand Down
2 changes: 1 addition & 1 deletion src/examples/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS)
AM_CXXFLAGS = -I$(top_srcdir)/ $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS)
AM_LDFLAGS = $(HARDEN_LDFLAGS)

if BUILD_EXAMPLES
Expand Down
14 changes: 7 additions & 7 deletions src/examples/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
also delete it here.
*/

#include "config.h"
#include "src/include/config.h"

#include <errno.h>
#include <locale.h>
Expand All @@ -52,12 +52,12 @@
#include <util.h>
#endif

#include "swrite.h"
#include "completeterminal.h"
#include "user.h"
#include "terminaloverlay.h"
#include "locale_utils.h"
#include "fatal_assert.h"
#include "src/util/swrite.h"
#include "src/statesync/completeterminal.h"
#include "src/statesync/user.h"
#include "src/frontend/terminaloverlay.h"
#include "src/util/locale_utils.h"
#include "src/util/fatal_assert.h"

const int ITERATIONS = 100000;

Expand Down
2 changes: 1 addition & 1 deletion src/examples/decrypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <iostream>
#include <sstream>

#include "crypto.h"
#include "src/crypto/crypto.h"

using namespace Crypto;

Expand Down
2 changes: 1 addition & 1 deletion src/examples/encrypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <iostream>
#include <sstream>

#include "crypto.h"
#include "src/crypto/crypto.h"

using namespace Crypto;

Expand Down
12 changes: 6 additions & 6 deletions src/examples/ntester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
#include <termios.h>
#include <unistd.h>

#include "user.h"
#include "fatal_assert.h"
#include "pty_compat.h"
#include "networktransport-impl.h"
#include "select.h"
#include "shared.h"
#include "src/statesync/user.h"
#include "src/util/fatal_assert.h"
#include "src/util/pty_compat.h"
#include "src/network/networktransport-impl.h"
#include "src/util/select.h"
#include "src/util/shared.h"

using namespace Network;

Expand Down
14 changes: 7 additions & 7 deletions src/examples/parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
also delete it here.
*/

#include "config.h"
#include "src/include/config.h"

#include <unistd.h>
#include <stdio.h>
Expand All @@ -53,12 +53,12 @@
#include <libutil.h>
#endif

#include "parser.h"
#include "swrite.h"
#include "locale_utils.h"
#include "fatal_assert.h"
#include "pty_compat.h"
#include "select.h"
#include "src/terminal/parser.h"
#include "src/util/swrite.h"
#include "src/util/locale_utils.h"
#include "src/util/fatal_assert.h"
#include "src/util/pty_compat.h"
#include "src/util/select.h"

const size_t buf_size = 1024;

Expand Down
16 changes: 8 additions & 8 deletions src/examples/termemu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
also delete it here.
*/

#include "config.h"
#include "src/include/config.h"

#include <unistd.h>
#include <stdio.h>
Expand Down Expand Up @@ -60,13 +60,13 @@
#include <libutil.h>
#endif

#include "parser.h"
#include "completeterminal.h"
#include "swrite.h"
#include "fatal_assert.h"
#include "pty_compat.h"
#include "locale_utils.h"
#include "select.h"
#include "src/terminal/parser.h"
#include "src/statesync/completeterminal.h"
#include "src/util/swrite.h"
#include "src/util/fatal_assert.h"
#include "src/util/pty_compat.h"
#include "src/util/locale_utils.h"
#include "src/util/select.h"

const size_t buf_size = 16384;

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(TINFO_CFLAGS) $(protobuf_CFLAGS) $(CRYPTO_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/ $(TINFO_CFLAGS) $(protobuf_CFLAGS) $(CRYPTO_CFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) $(CODE_COVERAGE_CXXFLAGS)
AM_LDFLAGS = $(HARDEN_LDFLAGS) $(CODE_COVERAGE_LIBS)
LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lm $(TINFO_LIBS) $(protobuf_LIBS) $(CRYPTO_LIBS)
Expand Down
10 changes: 5 additions & 5 deletions src/frontend/mosh-client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
also delete it here.
*/

#include "config.h"
#include "version.h"
#include "src/include/config.h"
#include "src/include/version.h"

#include <stdlib.h>
#include <unistd.h>

#include "stmclient.h"
#include "crypto.h"
#include "locale_utils.h"
#include "fatal_assert.h"
#include "src/crypto/crypto.h"
#include "src/util/locale_utils.h"
#include "src/util/fatal_assert.h"

/* These need to be included last because of conflicting defines. */
/*
Expand Down
24 changes: 12 additions & 12 deletions src/frontend/mosh-server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
also delete it here.
*/

#include "config.h"
#include "version.h"
#include "src/include/config.h"
#include "src/include/version.h"

#include <err.h>
#include <errno.h>
Expand Down Expand Up @@ -79,21 +79,21 @@
#include <libutil.h>
#endif

#include "completeterminal.h"
#include "swrite.h"
#include "user.h"
#include "fatal_assert.h"
#include "locale_utils.h"
#include "pty_compat.h"
#include "select.h"
#include "timestamp.h"
#include "fatal_assert.h"
#include "src/statesync/completeterminal.h"
#include "src/util/swrite.h"
#include "src/statesync/user.h"
#include "src/util/fatal_assert.h"
#include "src/util/locale_utils.h"
#include "src/util/pty_compat.h"
#include "src/util/select.h"
#include "src/util/timestamp.h"
#include "src/util/fatal_assert.h"

#ifndef _PATH_BSHELL
#define _PATH_BSHELL "/bin/sh"
#endif

#include "networktransport-impl.h"
#include "src/network/networktransport-impl.h"

typedef Network::Transport< Terminal::Complete, Network::UserStream > ServerConnection;

Expand Down
22 changes: 11 additions & 11 deletions src/frontend/stmclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
also delete it here.
*/

#include "config.h"
#include "src/include/config.h"

#include <err.h>
#include <errno.h>
Expand All @@ -52,16 +52,16 @@
#endif

#include "stmclient.h"
#include "swrite.h"
#include "completeterminal.h"
#include "user.h"
#include "fatal_assert.h"
#include "locale_utils.h"
#include "pty_compat.h"
#include "select.h"
#include "timestamp.h"

#include "networktransport-impl.h"
#include "src/util/swrite.h"
#include "src/statesync/completeterminal.h"
#include "src/statesync/user.h"
#include "src/util/fatal_assert.h"
#include "src/util/locale_utils.h"
#include "src/util/pty_compat.h"
#include "src/util/select.h"
#include "src/util/timestamp.h"

#include "src/network/networktransport-impl.h"

using std::wstring;

Expand Down
Loading
Loading