# - scons: Cross-platform build system http://www.scons.org/
# - googletest: Google C++ Test Framework http://code.google.com/p/googletest/
# * Install in ..\gtest-1.4.0
-# - google-glog: Google Logging Library for C++ http://code.google.com/p/google-glog/
-# * Install in ..\glog-0.3.0
-# * I get ..\glog-0.3.0\src\windows\glog/log_severity.h(51) : error C2059: syntax error :
-# 'constant' while running scons. Apparently the ERROR constant is already defined somewhere.
-# #undef ERROR before the def allows include.
-#
# - OpenSSL: http://www.slproweb.com/products/Win32OpenSSL.html
# * Install non-light Win32 binary in \openssl
# * Using a openssl-0.9.8k tar-ball doesn't work as the includes there
include = os.environ['INCLUDE']
include += '..\\gtest-1.4.0\\include;'
- include += '..\\glog-0.3.0\\src\\windows;' # Funky
include += '\\openssl\\include;'
env.Append ( ENV = { 'INCLUDE' : include } )
source += ['compat/unixio.cpp']
# Set libs to link to
- libs = ['libglog','ws2_32']
+ libs = ['ws2_32']
if DEBUG:
libs += ['gtestd','libeay32MTd']
else:
libpath = os.environ['LIBPATH']
if DEBUG:
libpath += '\\build\\gtest-1.4.0\\msvc\\gtest\\Debug;'
- libpath += '\\build\\glog-0.3.0\\vsprojects\\libglog\\Debug;'
libpath += '\\openssl\\lib\\VC\\static;'
else:
libpath += '\\build\\gtest-1.4.0\\msvc\\gtest\\Release;'
- libpath += '\\build\\glog-0.3.0\\vsprojects\\libglog\\Release;'
libpath += '\\openssl\\lib;'
# Somehow linker can't find uuid.lib
libpath += 'C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Lib;'
# env.Append(CXXFLAGS="-g")
# Set libs to link to
- libs = ['stdc++','gtest','glog','pthread','crypto']
+ libs = ['stdc++','gtest','pthread','crypto']
if 'LIBPATH' in os.environ:
libpath = os.environ['LIBPATH']
else:
int sec_ackd = 0;
// bind sending socket
- SOCKET send_sock = Datagram::Bind(Datagram::Address(INADDR_ANY,send_port));
+ SOCKET send_sock = Datagram::Bind(Address(INADDR_ANY,send_port));
// bind receiving socket
- SOCKET ack_sock = Datagram::Bind(Datagram::Address(INADDR_ANY,ack_port));
+ SOCKET ack_sock = Datagram::Bind(Address(INADDR_ANY,ack_port));
struct sockaddr_in send_to, ack_to;
memset(&send_to, 0, sizeof(struct sockaddr_in));
memset(&ack_to, 0, sizeof(struct sockaddr_in));
p2tp::LibraryInit();
printf("Warning: use the script to set up dummynet!\n");
testing::InitGoogleTest(&argc, argv);
- google::InitGoogleLogging(argv[0]);
dest_addr = htonl(INADDR_LOOPBACK);
while ((opt = getopt(argc, argv, "a:d:s:h")) != -1)
switch (opt) {
int main (int argc, char** argv) {
- google::InitGoogleLogging(argv[0]);
-
std::string tempdir = gettmpdir();
unlink((tempdir + std::string(".70196e6065a42835b1f08227ac3e2fb419cf78c8.0.hashes")).c_str());
unlink((tempdir + std::string(".70196e6065a42835b1f08227ac3e2fb419cf78c8.0.peaks")).c_str());
int f = open(BTF,O_RDWR|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if (f < 0)
{
- PLOG(FATAL)<< "Error opening " << BTF << "\n";
+ eprintf("Error opening %s\n",BTF);
return -1;
}
uint8_t buf[1024];