diff --git a/applications/test/alloc/Test-malloc.C b/applications/test/alloc/Test-malloc.C index 1614987e3c..4bfc18a20e 100644 --- a/applications/test/alloc/Test-malloc.C +++ b/applications/test/alloc/Test-malloc.C @@ -1,6 +1,6 @@ #include "stream.h" #include -#include +#include main() { diff --git a/applications/test/alloc/Test.C b/applications/test/alloc/Test.C index 67f77ab05c..a2de8b24df 100644 --- a/applications/test/alloc/Test.C +++ b/applications/test/alloc/Test.C @@ -1,4 +1,4 @@ -#include +#include class Int { diff --git a/applications/test/maxMem/Test-maxMem.C b/applications/test/maxMem/Test-maxMem.C index 590c542ee9..3a6c5c5c6e 100644 --- a/applications/test/maxMem/Test-maxMem.C +++ b/applications/test/maxMem/Test-maxMem.C @@ -1,5 +1,6 @@ #include -#include +#include + using namespace std; int main(int argc, char *argv[]) diff --git a/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C b/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C index 928c17216a..399f81b507 100644 --- a/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C +++ b/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C @@ -121,14 +121,14 @@ void usage() std::cout << "usage: addr2line [-e filename|--exe=filename]" " address [address...]\n" << std::endl; - ::exit(1); + std::exit(1); } void version() { std::cout<< "OpenFOAM addr2line emulator\n" << std::endl; - ::exit(0); + std::exit(0); } diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 37ba5fe667..775d90ea59 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -272,7 +272,7 @@ void Foam::dictionary::checkITstream << " at line " << is.lineNumber() << '.' << nl << std::endl; - ::exit(1); + std::exit(1); } } else if (!is.size()) @@ -305,7 +305,7 @@ void Foam::dictionary::checkITstream << " at line " << is.lineNumber() << '.' << nl << std::endl; - ::exit(1); + std::exit(1); } } } diff --git a/src/OpenFOAM/db/dictionary/entry/entry.C b/src/OpenFOAM/db/dictionary/entry/entry.C index eccfa396c7..9bd55a3e05 100644 --- a/src/OpenFOAM/db/dictionary/entry/entry.C +++ b/src/OpenFOAM/db/dictionary/entry/entry.C @@ -116,7 +116,7 @@ void Foam::entry::checkITstream(const ITstream& is) const << " at line " << is.lineNumber() << '.' << nl << std::endl; - ::exit(1); + std::exit(1); } } else if (!is.size()) @@ -149,7 +149,7 @@ void Foam::entry::checkITstream(const ITstream& is) const << " at line " << is.lineNumber() << '.' << nl << std::endl; - ::exit(1); + std::exit(1); } } } diff --git a/src/OpenFOAM/db/error/IOerror.C b/src/OpenFOAM/db/error/IOerror.C index 51b007342b..d3b51b3e71 100644 --- a/src/OpenFOAM/db/error/IOerror.C +++ b/src/OpenFOAM/db/error/IOerror.C @@ -153,7 +153,7 @@ void Foam::IOerror::SafeFatalIOError << " in file " << sourceFileName << " at line " << sourceFileLineNumber << '.' << std::endl; - ::exit(1); + std::exit(1); } } @@ -210,7 +210,7 @@ void Foam::IOerror::exit(const int) { Perr<< endl << *this << endl << "\nFOAM exiting\n" << endl; - ::exit(1); + std::exit(1); } } } @@ -229,7 +229,7 @@ void Foam::IOerror::abort() Perr<< endl << *this << endl << "\nFOAM aborting (FOAM_ABORT set)\n" << endl; printStack(Perr); - ::abort(); + std::abort(); } if (Pstream::parRun()) @@ -256,7 +256,7 @@ void Foam::IOerror::abort() Perr<< endl << *this << endl << "\nFOAM aborting\n" << endl; printStack(Perr); - ::abort(); + std::abort(); } } } diff --git a/src/OpenFOAM/db/error/error.C b/src/OpenFOAM/db/error/error.C index 8140ed6f9c..c143fcf5f1 100644 --- a/src/OpenFOAM/db/error/error.C +++ b/src/OpenFOAM/db/error/error.C @@ -244,7 +244,7 @@ void Foam::error::exit(const int errNo) { Perr<< endl << *this << endl << "\nFOAM exiting\n" << endl; - ::exit(errNo); + std::exit(errNo); } } @@ -262,7 +262,7 @@ void Foam::error::abort() Perr<< endl << *this << endl << "\nFOAM aborting (FOAM_ABORT set)\n" << endl; printStack(Perr); - ::abort(); + std::abort(); } if (throwExceptions_) @@ -287,7 +287,7 @@ void Foam::error::abort() Perr<< endl << *this << endl << "\nFOAM aborting\n" << endl; printStack(Perr); - ::abort(); + std::abort(); } } diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index a95b8d1b2b..bdb0128ceb 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -887,7 +887,7 @@ bool Foam::functionObjectList::read() catch (const Foam::IOerror& ioErr) { Info<< ioErr << nl << endl; - ::exit(1); + std::exit(1); } catch (const Foam::error& err) { diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 8a100b33cb..f9daf29dc8 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -906,7 +906,7 @@ void Foam::argList::parse if (quickExit) { - ::exit(0); + std::exit(0); } } diff --git a/src/OpenFOAM/global/debug/debug.C b/src/OpenFOAM/global/debug/debug.C index a22251d9ce..bdbc0ce8c4 100644 --- a/src/OpenFOAM/global/debug/debug.C +++ b/src/OpenFOAM/global/debug/debug.C @@ -147,7 +147,7 @@ Foam::dictionary& Foam::debug::switchSet << controlDict().name().c_str() << std::endl << std::endl; - ::exit(1); + std::exit(1); } subDictPtr = &(eptr->dict()); diff --git a/src/OpenFOAM/global/etcFiles/etcFiles.C b/src/OpenFOAM/global/etcFiles/etcFiles.C index de3c6f83c7..3e04dbe70f 100644 --- a/src/OpenFOAM/global/etcFiles/etcFiles.C +++ b/src/OpenFOAM/global/etcFiles/etcFiles.C @@ -82,7 +82,7 @@ static inline void errorMandatoryNotFound << locationToString(location) << ")\n '" << name << "'\n" << std::endl; - ::exit(1); + std::exit(1); } diff --git a/src/OpenFOAM/global/new.C b/src/OpenFOAM/global/new.C index ac7f38f077..d98ec3d2fd 100644 --- a/src/OpenFOAM/global/new.C +++ b/src/OpenFOAM/global/new.C @@ -46,7 +46,7 @@ void newError() "by e.g. bad use of pointers or an out of date shared library" << std::endl; - ::abort(); + std::abort(); } void (*old_new_handler)() = std::set_new_handler(newError); diff --git a/src/Pstream/dummy/UPstream.C b/src/Pstream/dummy/UPstream.C index 661e5a2cc5..9dbaf0f574 100644 --- a/src/Pstream/dummy/UPstream.C +++ b/src/Pstream/dummy/UPstream.C @@ -58,14 +58,14 @@ bool Foam::UPstream::init(int& argc, char**& argv, const bool needsThread) void Foam::UPstream::exit(int errnum) { // No MPI - just exit - ::exit(errnum); + std::exit(errnum); } void Foam::UPstream::abort() { // No MPI - just abort - ::abort(); + std::abort(); } diff --git a/src/Pstream/mpi/UPstream.C b/src/Pstream/mpi/UPstream.C index 5a2ec78973..0fec38de2c 100644 --- a/src/Pstream/mpi/UPstream.C +++ b/src/Pstream/mpi/UPstream.C @@ -213,7 +213,7 @@ void Foam::UPstream::exit(int errnum) if (!flag) { // Not initialized - just exit - ::exit(errnum); + std::exit(errnum); return; } @@ -224,7 +224,7 @@ void Foam::UPstream::exit(int errnum) WarningInFunction << "MPI was already finalized (perhaps by a connected program)" << endl; - ::exit(1); + std::exit(1); return; } @@ -271,7 +271,7 @@ void Foam::UPstream::exit(int errnum) if (errnum == 0) { MPI_Finalize(); - ::exit(errnum); + std::exit(errnum); } else { diff --git a/src/conversion/ccm/common/ccmInternal.C b/src/conversion/ccm/common/ccmInternal.C index 47dd0c3933..42698b4924 100644 --- a/src/conversion/ccm/common/ccmInternal.C +++ b/src/conversion/ccm/common/ccmInternal.C @@ -118,7 +118,7 @@ bool Foam::ccm::ccmGlobalState::assertNoError << "\n libccmio reports -> " << errorMsg(err) << " <-\n" << endl; - ::exit(1); + std::exit(1); } return (err == kCCMIONoErr); diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index 6518115a13..c8269b51d8 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -3916,7 +3916,7 @@ void Foam::snappyLayerDriver::addLayers else { Perr<< "\nFOAM exiting\n" << endl; - ::exit(0); + std::exit(0); } } }