git repos / oastat

commit 52f73d5a

sago007 · 2014-06-18 15:35
52f73d5a93eefec14f3fab7746e6843a3ff45704 patch · browse files
parent a9d4933849bd88fdd06c8673967ca04ba94788e0

Make it compile with MXE. The minimum.

Changed files

M src/Makefile before
M src/oastat.cpp before
diff --git a/src/Makefile b/src/Makefile index 9c38d28..4426fef 100644 --- a/src/Makefile +++ b/src/Makefile
@@ -1,7 +1,7 @@
USEDBIXX=1
USECPPDB=1
-BASE_LIBS=-lgcrypt -lboost_program_options
+BASE_LIBS=-lgcrypt -lboost_program_options -lgpg-error
BASE_CFLAGS=-c -g -O2 -Wall -std=c++0x
-include Makefile.local
diff --git a/src/oastat.cpp b/src/oastat.cpp index f22ab6e..8a82a58 100644 --- a/src/oastat.cpp +++ b/src/oastat.cpp
@@ -25,7 +25,9 @@ http://code.google.com/p/oastat/
#include <iostream>
#include <fstream>
+#ifndef _WIN32
#include "pstream.h" //<pstreams/pstream.h>
+#endif
#include <vector>
#include <gcrypt.h>
#include <stdio.h>
@@ -295,10 +297,14 @@ int main (int argc, const char* argv[])
}
if (filename.length()>0) {
+#ifndef _WIN32
if (useTail) {
redi::ipstream in("tail -s 1 -f "+filename);
processStdIn(in,commands);
- } else {
+ }
+ else
+#endif
+ {
ifstream in(filename.c_str(),ifstream::in);
processStdIn(in,commands);
}