summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile1
-rwxr-xr-xsrc/configure26
-rw-r--r--src/posix/sysExec.hpp20
-rw-r--r--src/sysExec.h4
4 files changed, 28 insertions, 23 deletions
diff --git a/src/Makefile b/src/Makefile
index 0e91563..6a3683d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -179,6 +179,7 @@ distclean: cleanall
find . -name *.o -exec rm -f {} \;
rm -f config.sub config.guess
rm -f signalHandler.hpp
+ rm -f sysExec.hpp
rm -f version.h
rm -f tunDevice.cpp
rm -f include.mk
diff --git a/src/configure b/src/configure
index 2c6d8ea..1524577 100755
--- a/src/configure
+++ b/src/configure
@@ -143,26 +143,30 @@ fi
rm -f include.mk
case $TARGET in
- Linux)
- rm -f tunDevice.cpp
- ln -sf linux/tunDevice.cpp
+ Linux)
+ rm -f tunDevice.cpp
+ ln -sf linux/tunDevice.cpp
rm -f signalHandler.hpp
ln -sf posix/signalHandler.hpp
+ rm -f sysExec.hpp
+ ln -sf posix/sysExec.hpp
echo "loading Linux specific TUN Device"
- ;;
- OpenBSD|FreeBSD|NetBSD|GNU/kFreeBSD)
- rm -f tunDevice.cpp
- ln -sf bsd/tunDevice.cpp
+ ;;
+ OpenBSD|FreeBSD|NetBSD|GNU/kFreeBSD)
+ rm -f tunDevice.cpp
+ ln -sf bsd/tunDevice.cpp
rm -f signalHandler.hpp
ln -sf posix/signalHandler.hpp
+ rm -f sysExec.hpp
+ ln -sf posix/sysExec.hpp
echo "loading BSD specific TUN Device"
CXXFLAGS=$CXXFLAGS' -I/usr/local/include'
LDFLAGS=$LDFLAGS' -L/usr/local/lib'
- ;;
- *)
- echo "platform not supported"
+ ;;
+ *)
+ echo "platform not supported"
exit 1
- ;;
+ ;;
esac
case $CRYPTO_LIB in
diff --git a/src/posix/sysExec.hpp b/src/posix/sysExec.hpp
index 506e03d..359c1e4 100644
--- a/src/posix/sysExec.hpp
+++ b/src/posix/sysExec.hpp
@@ -29,10 +29,10 @@
* You should have received a copy of the GNU General Public License
* along with anytun. If not, see <http://www.gnu.org/licenses/>.
*/
-#pragma once
-#ifndef ANYTUN_sysexec_hpp_INCLUDED
-#define ANYTUN_sysexec_hpp_INCLUDED
-
+#pragma once
+#ifndef ANYTUN_sysexec_hpp_INCLUDED
+#define ANYTUN_sysexec_hpp_INCLUDED
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -42,7 +42,7 @@
#include <stdlib.h>
#include <string.h>
#include <cstring>
-
+
SysExec::~SysExec()
{
if(!closed_)
@@ -62,7 +62,7 @@ char** dupEnv(StringList const& env)
evp[env.size()] = NULL;
return evp;
}
-
+
void SysExec::doExec(std::string const& script, StringVector const& args, StringList const& env)
{
int pipefd[2];
@@ -145,7 +145,7 @@ int SysExec::waitForScript()
return return_code_;
}
-
+
void SysExec::waitAndDestroy(SysExec*& s)
{
if(!s)
@@ -161,6 +161,6 @@ void SysExec::waitAndDestroy(SysExec*& s)
delete(s);
s = NULL;
-}
-
-#endif // ANYTUN_sysexec_hpp_INCLUDED \ No newline at end of file
+}
+
+#endif // ANYTUN_sysexec_hpp_INCLUDED
diff --git a/src/sysExec.h b/src/sysExec.h
index 28e6d23..02ac00e 100644
--- a/src/sysExec.h
+++ b/src/sysExec.h
@@ -60,7 +60,7 @@ class SysExec
void doExec(std::string const& script, StringVector const& args, StringList const& env);
std::string script_;
-
+ bool closed_;
#ifdef _MSC_VER
PROCESS_INFORMATION process_info_;
DWORD return_code_;
@@ -69,7 +69,7 @@ class SysExec
int pipefd_;
int return_code_;
#endif
- bool closed_;
+
};