OpenBSD patches for ttsnoop.
Mostly adding std:: for strstream interfaces.
This commit is contained in:
committed by
Jon Trulson
parent
76984653b4
commit
43bae997c8
@@ -63,7 +63,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#include <iostream>
|
||||
#include <strstream>
|
||||
#include <fstream>
|
||||
@@ -112,8 +112,8 @@ unsigned int snoopedArgsCount = 0;
|
||||
char * optTraceScript = 0;
|
||||
String apiTracerArgv[ 10 ];
|
||||
String snooperArgv[ 10 ];
|
||||
ostrstream tttraceCmd;
|
||||
ofstream snoopStream;
|
||||
std::ostrstream tttraceCmd;
|
||||
std::ofstream snoopStream;
|
||||
|
||||
// Xt squats on -tf ?! XXX
|
||||
const char Usage[] =
|
||||
@@ -196,7 +196,7 @@ signalHandler(
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__osf__) || defined(linux)
|
||||
#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__osf__) || defined(linux) || defined(CSRG_BASED)
|
||||
#if !defined(SIG_PF)
|
||||
typedef void (*sig_pf_t)(int);
|
||||
#define SIG_PF sig_pf_t
|
||||
@@ -208,7 +208,7 @@ _tt_sigset(
|
||||
int sig,
|
||||
SIG_PF handler )
|
||||
{
|
||||
#if defined(hpux) || defined(linux)
|
||||
#if defined(hpux) || defined(linux) || defined(CSRG_BASED)
|
||||
struct sigaction act;
|
||||
act.sa_handler = handler;
|
||||
sigemptyset(&act.sa_mask);
|
||||
@@ -670,7 +670,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
Tt_status status;
|
||||
snoopStream.open( snoopFile, ios::app );
|
||||
ostrstream envStr;
|
||||
std::ostrstream envStr;
|
||||
envStr << "TT_TRACE_SCRIPT=> ";
|
||||
envStr << traceFile << ends;
|
||||
traceScript = envStr.str();
|
||||
|
||||
Reference in New Issue
Block a user