From: victor Date: Fri, 6 Nov 2009 14:12:12 +0000 (+0000) Subject: cleaned google-log deps entirely X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=1d0ee071f094fcc5274af1fcd67280a7de4e40cd;p=swift-upb.git cleaned google-log deps entirely git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@504 e16421f0-f15b-0410-abcd-98678b794739 --- diff --git a/SConstruct b/SConstruct index 62d2347..c7d0246 100644 --- a/SConstruct +++ b/SConstruct @@ -5,12 +5,6 @@ # - 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 @@ -43,7 +37,6 @@ if sys.platform == "win32": 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 } ) @@ -58,7 +51,7 @@ if sys.platform == "win32": source += ['compat/unixio.cpp'] # Set libs to link to - libs = ['libglog','ws2_32'] + libs = ['ws2_32'] if DEBUG: libs += ['gtestd','libeay32MTd'] else: @@ -68,11 +61,9 @@ if sys.platform == "win32": 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;' @@ -91,7 +82,7 @@ else: # 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: diff --git a/tests/dgramtest.cpp b/tests/dgramtest.cpp index 5d580cb..24822a0 100644 --- a/tests/dgramtest.cpp +++ b/tests/dgramtest.cpp @@ -96,7 +96,6 @@ int main (int argc, char** argv) { p2tp::LibraryInit(); testing::InitGoogleTest(&argc, argv); - google::InitGoogleLogging(argv[0]); return RUN_ALL_TESTS(); } diff --git a/tests/ledbattest.cpp b/tests/ledbattest.cpp index 8abd9da..55af714 100644 --- a/tests/ledbattest.cpp +++ b/tests/ledbattest.cpp @@ -5,7 +5,6 @@ #include "datagram.h" #include "p2tp.h" #include -//#include using namespace p2tp; using namespace std; @@ -171,8 +170,7 @@ int main (int argc, char** argv) { printf("Warning: use the script to set up dummynet!\n"); p2tp::LibraryInit(); - testing::InitGoogleTest(&argc, argv); - google::InitGoogleLogging(argv[0]); return RUN_ALL_TESTS(); + } diff --git a/tests/ledbattest2.cpp b/tests/ledbattest2.cpp index 4fdf7cb..2dc8b3a 100644 --- a/tests/ledbattest2.cpp +++ b/tests/ledbattest2.cpp @@ -52,9 +52,9 @@ TEST(Datagram,LedbatTest) { 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)); @@ -188,7 +188,6 @@ int main (int argc, char** argv) { 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) { diff --git a/tests/transfertest.cpp b/tests/transfertest.cpp index 86ea728..334f9a8 100644 --- a/tests/transfertest.cpp +++ b/tests/transfertest.cpp @@ -99,8 +99,6 @@ TEST(TransferTest,TransferFile) { 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()); @@ -115,7 +113,7 @@ int main (int argc, char** argv) { 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];