g4tools  5.4.0
std_system
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_std_system
5 #define tools_std_system
6 
7 #include <cstdlib>
8 #include <ostream>
9 
10 #if defined(__APPLE__)
11 #include <TargetConditionals.h>
12 #endif
13 
14 namespace tools {
15 
16 inline int std_system(std::ostream& a_out,const std::string& a_string) {
17 #if TARGET_OS_IPHONE
18  a_out << "tools::std_system : system() not available on iOS. Can't execute " << sout(a_string) << "." << std::endl;
19  return EXIT_FAILURE;
20 #else
21  return ::system(a_string.c_str());
22  (void)a_out;
23 #endif
24 }
25 
26 }
27 
28 #endif
tools::std_system
int std_system(std::ostream &a_out, const std::string &a_string)
Definition: std_system:16
tools::sout
Definition: sout:17
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26