Remove XALAN_STRICT_ANSI_HEADERS
diff --git a/Tests/Conf/conf.cpp b/Tests/Conf/conf.cpp
index 956b25f..c228a1d 100644
--- a/Tests/Conf/conf.cpp
+++ b/Tests/Conf/conf.cpp
@@ -25,6 +25,7 @@
#include <strstream>
#include <cstdio>
+#include <cstring>
@@ -237,9 +238,7 @@
bool isICUIntegrated,
MemoryManager& theMemoryManager)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strcmp;
-#endif
CharVectorType theFileName(theMemoryManager);
diff --git a/Tests/Performance/Logger.cpp b/Tests/Performance/Logger.cpp
index e25dad9..3cfa57f 100644
--- a/Tests/Performance/Logger.cpp
+++ b/Tests/Performance/Logger.cpp
@@ -73,11 +73,9 @@
Logger::StreamType&
Logger::log(eLogType logType)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::ctime;
using std::time;
using std::time_t;
-#endif
time_t theTime;
time(&theTime);
diff --git a/Tests/Performance/perf.cpp b/Tests/Performance/perf.cpp
index ccd1cad..a00d32a 100644
--- a/Tests/Performance/perf.cpp
+++ b/Tests/Performance/perf.cpp
@@ -26,9 +26,7 @@
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strcmp;
-#endif
diff --git a/Tests/Threads/ThreadTest.cpp b/Tests/Threads/ThreadTest.cpp
index 226dbed..d5183ab 100644
--- a/Tests/Threads/ThreadTest.cpp
+++ b/Tests/Threads/ThreadTest.cpp
@@ -61,7 +61,7 @@
#include <csignal>
// This is a workaround for a Tru64 compiler bug...
-#if defined(XALAN_STRICT_ANSI_HEADERS) && defined(TRU64)
+#if defined(TRU64)
#include <csetjmp>
typedef long sigjmp_buf[_JBLEN];
#endif
@@ -80,11 +80,9 @@
-#if defined(XALAN_STRICT_ANSI_HEADERS)
- using std::atoi;
- using std::signal;
- using std::strcmp;
-#endif
+using std::atoi;
+using std::signal;
+using std::strcmp;
diff --git a/samples/ExternalFunction/ExternalFunction.cpp b/samples/ExternalFunction/ExternalFunction.cpp
index aec820d..987a39b 100644
--- a/samples/ExternalFunction/ExternalFunction.cpp
+++ b/samples/ExternalFunction/ExternalFunction.cpp
@@ -83,7 +83,6 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sqrt;
#endif
@@ -170,9 +169,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::pow;
-#endif
return executionContext.getXObjectFactory().createNumber(pow(args[0]->num(executionContext), 3));
}
@@ -253,13 +250,11 @@
generalError(executionContext, context, locator);
}
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::time;
using std::time_t;
using std::localtime;
using std::asctime;
using std::strlen;
-#endif
time_t theTime;
diff --git a/samples/StreamTransform/StreamTransform.cpp b/samples/StreamTransform/StreamTransform.cpp
index 2f47a8a..cf8d056 100644
--- a/samples/StreamTransform/StreamTransform.cpp
+++ b/samples/StreamTransform/StreamTransform.cpp
@@ -47,9 +47,7 @@
using std::ofstream;
using std::ostrstream;
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strlen;
-#endif
int theResult = -1;
diff --git a/samples/ThreadSafe/ThreadSafe.cpp b/samples/ThreadSafe/ThreadSafe.cpp
index c1fd86b..ebce1a9 100644
--- a/samples/ThreadSafe/ThreadSafe.cpp
+++ b/samples/ThreadSafe/ThreadSafe.cpp
@@ -52,10 +52,8 @@
// This is a workaround for a Tru64 compiler bug...
#if defined(TRU64)
-#if defined(XALAN_STRICT_ANSI_HEADERS)
#include <csetjmp>
typedef long sigjmp_buf[_JBLEN];
-#endif
extern "C" void *theThread(void *param);
#endif
@@ -68,9 +66,7 @@
//error Unsupported Platform!
#endif
-#if defined(XALAN_STRICT_ANSI_HEADERS)
- using std::perror;
-#endif
+using std::perror;
#define NUM_THREADS 10
diff --git a/samples/TraceListen/TraceListen.cpp b/samples/TraceListen/TraceListen.cpp
index 7fda08f..3a24378 100644
--- a/samples/TraceListen/TraceListen.cpp
+++ b/samples/TraceListen/TraceListen.cpp
@@ -52,9 +52,7 @@
using std::cerr;
using std::endl;
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strcmp;
-#endif
// TraceListener flags...
bool traceTemplates = false;
diff --git a/samples/XPathWrapper/XPathWrapper.cpp b/samples/XPathWrapper/XPathWrapper.cpp
index 9776772..b0d7311 100644
--- a/samples/XPathWrapper/XPathWrapper.cpp
+++ b/samples/XPathWrapper/XPathWrapper.cpp
@@ -89,9 +89,7 @@
ostream& errorStream,
CharVectorTypeVectorType& theResultList)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strlen;
-#endif
{
diff --git a/samples/XalanTransformerCallback/XalanTransformerCallback.cpp b/samples/XalanTransformerCallback/XalanTransformerCallback.cpp
index 4828cee..36b5c48 100644
--- a/samples/XalanTransformerCallback/XalanTransformerCallback.cpp
+++ b/samples/XalanTransformerCallback/XalanTransformerCallback.cpp
@@ -30,13 +30,11 @@
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::FILE;
using std::fclose;
using std::fflush;
using std::fopen;
using std::fwrite;
-#endif
diff --git a/src/xalanc/Harness/XalanFileUtility.cpp b/src/xalanc/Harness/XalanFileUtility.cpp
index dcd47fe..2d14c0f 100644
--- a/src/xalanc/Harness/XalanFileUtility.cpp
+++ b/src/xalanc/Harness/XalanFileUtility.cpp
@@ -53,7 +53,6 @@
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fclose;
using std::feof;
using std::ferror;
@@ -64,7 +63,6 @@
using std::strftime;
using std::tm;
using std::time;
-#endif
diff --git a/src/xalanc/Harness/XalanXMLFileReporter.cpp b/src/xalanc/Harness/XalanXMLFileReporter.cpp
index 0f50144..b3496c9 100644
--- a/src/xalanc/Harness/XalanXMLFileReporter.cpp
+++ b/src/xalanc/Harness/XalanXMLFileReporter.cpp
@@ -37,14 +37,12 @@
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fclose;
using std::fflush;
using std::fopen;
using std::fprintf;
using std::fputs;
using std::sprintf;
-#endif
diff --git a/src/xalanc/Harness/XalanXMLFileReporter.hpp b/src/xalanc/Harness/XalanXMLFileReporter.hpp
index cd23b75..d6bee45 100644
--- a/src/xalanc/Harness/XalanXMLFileReporter.hpp
+++ b/src/xalanc/Harness/XalanXMLFileReporter.hpp
@@ -55,11 +55,7 @@
typedef XalanMap<XalanDOMString, XalanDOMString> Hashtable;
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::FILE FileHandleType;
-#else
- typedef FILE FileHandleType;
-#endif
public:
diff --git a/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp b/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp
index d0a0578..010818b 100644
--- a/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp
+++ b/src/xalanc/ICUBridge/ICUBridgeCollationCompareFunctorImpl.cpp
@@ -74,11 +74,7 @@
XalanDOMString* theLocaleName = 0)
{
const char* theLang =
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::getenv("LANG");
-#else
- getenv("LANG");
-#endif
if (theLang == 0)
{
diff --git a/src/xalanc/Include/SolarisDefinitions.hpp b/src/xalanc/Include/SolarisDefinitions.hpp
index cc3a276..938eb32 100644
--- a/src/xalanc/Include/SolarisDefinitions.hpp
+++ b/src/xalanc/Include/SolarisDefinitions.hpp
@@ -32,8 +32,6 @@
#define XALAN_PLATFORM_IMPORT_FUNCTION(T) T XALAN_PLATFORM_IMPORT
-#define XALAN_STRICT_ANSI_HEADERS
-
#if defined(_STLP_CONFIG_H)
#define XALAN_HAS_STD_ITERATORS
#define XALAN_HAS_STD_DISTANCE
diff --git a/src/xalanc/Include/TRU64Definitions.hpp b/src/xalanc/Include/TRU64Definitions.hpp
index 54f2618..724e088 100644
--- a/src/xalanc/Include/TRU64Definitions.hpp
+++ b/src/xalanc/Include/TRU64Definitions.hpp
@@ -41,10 +41,6 @@
#define XALAN_HAS_STD_DISTANCE
#define XALAN_NO_REENTRANT_TIME_FUNCTIONS
-#if defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS)
-#define XALAN_STRICT_ANSI_HEADERS
-#endif
-
#endif // TRU64DEFINITIONS_HEADER_GUARD_1357924680
diff --git a/src/xalanc/Include/XalanAutoPtr.hpp b/src/xalanc/Include/XalanAutoPtr.hpp
index 48eea95..8e7bd5b 100644
--- a/src/xalanc/Include/XalanAutoPtr.hpp
+++ b/src/xalanc/Include/XalanAutoPtr.hpp
@@ -179,11 +179,7 @@
}
Type&
-#if defined(XALAN_STRICT_ANSI_HEADERS)
operator[](std::size_t index) const
-#else
- operator[](size_t index) const
-#endif
{
return m_pointer[index];
}
diff --git a/src/xalanc/Include/XalanMemMgrAutoPtr.hpp b/src/xalanc/Include/XalanMemMgrAutoPtr.hpp
index 44b1233..0e029a0 100644
--- a/src/xalanc/Include/XalanMemMgrAutoPtr.hpp
+++ b/src/xalanc/Include/XalanMemMgrAutoPtr.hpp
@@ -218,11 +218,7 @@
{
public:
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::size_t size_type;
-#else
- typedef size_t size_type;
-#endif
class MemMgrAutoPtrArrayData
{
diff --git a/src/xalanc/Include/XalanMemoryManagement.hpp b/src/xalanc/Include/XalanMemoryManagement.hpp
index d270c6b..6b4757b 100644
--- a/src/xalanc/Include/XalanMemoryManagement.hpp
+++ b/src/xalanc/Include/XalanMemoryManagement.hpp
@@ -48,11 +48,7 @@
public:
#if XERCES_VERSION_MAJOR < 3
- #if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::size_t size_type;
- #else
- typedef size_t size_type;
- #endif
#else
typedef XalanSize_t size_type;
#endif
@@ -101,11 +97,7 @@
{
public:
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::size_t size_type;
-#else
- typedef size_t size_type;
-#endif
XalanAllocationGuard(
MemoryManager& theMemoryManager,
diff --git a/src/xalanc/PlatformSupport/DOMStringHelper.cpp b/src/xalanc/PlatformSupport/DOMStringHelper.cpp
index 9f0d8a9..3d978a1 100644
--- a/src/xalanc/PlatformSupport/DOMStringHelper.cpp
+++ b/src/xalanc/PlatformSupport/DOMStringHelper.cpp
@@ -53,9 +53,7 @@
-#if defined (XALAN_STRICT_ANSI_HEADERS)
- using std::size_t;
-#endif
+using std::size_t;
@@ -1387,9 +1385,7 @@
{
char theBuffer[MAX_PRINTF_DIGITS + 1];
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sprintf;;
-#endif
const int theCharsWritten = sprintf(theBuffer, "%p", theValue);
assert(theCharsWritten != 0);
@@ -1445,11 +1441,9 @@
{
char theBuffer[MAX_PRINTF_DIGITS + 1];
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sprintf;
using std::atof;
using std::isdigit;
-#endif
const char* const * thePrintfString = thePrintfStrings;
@@ -1747,11 +1741,9 @@
{
char theBuffer[MAX_PRINTF_DIGITS + 1];
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sprintf;
using std::atof;
using std::isdigit;
-#endif
const char* const * thePrintfString = thePrintfStrings;
diff --git a/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp b/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp
index 87ff278..2384c70 100644
--- a/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp
+++ b/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp
@@ -334,9 +334,7 @@
XalanDOMString theSuffix(theMemoryManager);
if ( !target_Dir )
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strlen;
-#endif
int lenSpec = strlen(theSpec);
theFullSearchSpec.substr(theName, lenSpec, indexName);
diff --git a/src/xalanc/PlatformSupport/DoubleSupport.cpp b/src/xalanc/PlatformSupport/DoubleSupport.cpp
index c8da8f0..514b2d1 100644
--- a/src/xalanc/PlatformSupport/DoubleSupport.cpp
+++ b/src/xalanc/PlatformSupport/DoubleSupport.cpp
@@ -279,11 +279,7 @@
double theResult = divide(theLHS, theRHS);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
return std::modf(theResult, &theDummy) * theRHS;
-#else
- return modf(theResult, &theDummy) * theRHS;
-#endif
}
}
@@ -313,9 +309,7 @@
}
else
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
- using std::fabs;
-#endif
+ using std::fabs;
return fabs(theDouble);
}
}
@@ -578,10 +572,8 @@
}
else
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::localeconv;
using std::atof;
-#endif
const char theDecimalPointChar =
localeconv()->decimal_point[0];
@@ -711,11 +703,7 @@
{
double intPart = 0;
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::modf(theValue + 0.5, &intPart);
-#else
- modf(theValue + 0.5, &intPart);
-#endif
return intPart;
}
@@ -762,11 +750,7 @@
double intPart = 0;
const double fracPart =
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::modf(theValue, &intPart);
-#else
- modf(theValue, &intPart);
-#endif
const double theAdjustedValue =
fracPart == -0.5 ? theValue + 0.5 : theValue - 0.5;
diff --git a/src/xalanc/PlatformSupport/DoubleSupport.hpp b/src/xalanc/PlatformSupport/DoubleSupport.hpp
index b4b5d00..1d99842 100644
--- a/src/xalanc/PlatformSupport/DoubleSupport.hpp
+++ b/src/xalanc/PlatformSupport/DoubleSupport.hpp
@@ -547,11 +547,7 @@
static double
ceiling(double theValue)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
return std::ceil(theValue);
-#else
- return ceil(theValue);
-#endif
}
/**
@@ -564,11 +560,7 @@
static double
floor(double theValue)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
return std::floor(theValue);
-#else
- return ::floor(theValue);
-#endif
}
union NumberUnion
diff --git a/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp b/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp
index f77d026..aaf5f83 100644
--- a/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp
+++ b/src/xalanc/PlatformSupport/XalanFStreamOutputStream.cpp
@@ -86,9 +86,7 @@
const char* theBuffer,
size_type theBufferLength)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fwrite;
-#endif
const size_t theBytesWritten =
fwrite(theBuffer,
diff --git a/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp b/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp
index a9e8cbc..e4d12d7 100644
--- a/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp
+++ b/src/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp
@@ -36,9 +36,7 @@
namespace XALAN_CPP_NAMESPACE {
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::FILE;
-#endif
class XALAN_PLATFORMSUPPORT_EXPORT XalanFStreamOutputStream : public XalanOutputStream
{
diff --git a/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp b/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
index ade49d9..97504be 100644
--- a/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
+++ b/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
@@ -168,9 +168,7 @@
}
}
#else
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fopen;
-#endif
CharVectorType theResult(theManager);
TranscodeToLocalCodePage(theFileName, theResult, true);
@@ -261,9 +259,7 @@
CloseHandle(m_handle);
}
#else
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fclose;
-#endif
if (m_handle != 0)
{
@@ -278,9 +274,7 @@
XalanFileOutputStream::doFlush()
{
#if !defined(XALAN_WINDOWS)
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fflush;
-#endif
if (fflush(m_handle) != 0)
{
@@ -317,9 +311,7 @@
theExceptionBuffer);
}
#else
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fwrite;
-#endif
const size_t theBytesWritten =
fwrite(theBuffer,
diff --git a/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp b/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp
index 780d42d..27ab4d7 100644
--- a/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp
+++ b/src/xalanc/PlatformSupport/XalanFileOutputStream.hpp
@@ -41,9 +41,7 @@
namespace XALAN_CPP_NAMESPACE {
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::FILE;
-#endif
class XALAN_PLATFORMSUPPORT_EXPORT XalanFileOutputStream : public XalanOutputStream
{
diff --git a/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp b/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
index a63d34f..f51b518 100644
--- a/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
+++ b/src/xalanc/PlatformSupport/XalanStdOutputStream.cpp
@@ -133,9 +133,7 @@
if (!m_outputStream)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using namespace std;
-#endif
XalanDOMString thebuffer(getMemoryManager());
throw XalanStdOutputStreamWriteException(errno, thebuffer);
@@ -156,9 +154,7 @@
if (!m_outputStream)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using namespace std;
-#endif
XalanDOMString thebuffer(getMemoryManager());
throw XalanStdOutputStreamWriteException(errno, thebuffer);
diff --git a/src/xalanc/TestXSLT/process.cpp b/src/xalanc/TestXSLT/process.cpp
index 52868a0..026afb6 100644
--- a/src/xalanc/TestXSLT/process.cpp
+++ b/src/xalanc/TestXSLT/process.cpp
@@ -389,11 +389,7 @@
if(i < argc && argv[i][0] != '-')
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
p.indentAmount = std::atoi(argv[i]);
-#else
- p.indentAmount = atoi(argv[i]);
-#endif
}
else
{
diff --git a/src/xalanc/Utils/MsgCreator/InMemHandler.cpp b/src/xalanc/Utils/MsgCreator/InMemHandler.cpp
index 4fcf518..4b4ee95 100644
--- a/src/xalanc/Utils/MsgCreator/InMemHandler.cpp
+++ b/src/xalanc/Utils/MsgCreator/InMemHandler.cpp
@@ -31,9 +31,7 @@
namespace XALAN_CPP_NAMESPACE {
-#if defined(XALAN_STRICT_ANSI_HEADERS)
- using std::sprintf;
-#endif
+using std::sprintf;
// -----------------------------------------------------------------------
// Constructors
diff --git a/src/xalanc/Utils/MsgCreator/MsgCreator.cpp b/src/xalanc/Utils/MsgCreator/MsgCreator.cpp
index aa3f4a7..c742389 100644
--- a/src/xalanc/Utils/MsgCreator/MsgCreator.cpp
+++ b/src/xalanc/Utils/MsgCreator/MsgCreator.cpp
@@ -147,9 +147,7 @@
++i;
if( i < argc && argv[i][0] != '-' )
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::size_t;
-#endif
const size_t localeLen = strlen(argv[i]);
if ( localeLen != 2 && localeLen !=5)
@@ -244,10 +242,8 @@
const CmdLineParams& p,
char FileName[])
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strlen;
using std::size_t;
-#endif
const size_t dirLength = strlen(p.outDir);
diff --git a/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.cpp b/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.cpp
index 0edd220..39be314 100644
--- a/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.cpp
+++ b/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.cpp
@@ -41,9 +41,7 @@
{
assert(theFileName != 0);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fopen;
-#endif
return fopen(theFileName, "wb");
}
@@ -66,9 +64,7 @@
MsgFileOutputStream::~MsgFileOutputStream()
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fclose;
-#endif
if (m_handle != 0)
{
@@ -81,9 +77,7 @@
void
MsgFileOutputStream::doFlush()
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fflush;
-#endif
if (fflush(m_handle) != 0)
{
@@ -100,9 +94,7 @@
const char* theBuffer,
XalanSize_t theBufferLength)
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::fwrite;
-#endif
const size_t theBytesWritten =
fwrite(theBuffer,
@@ -131,9 +123,7 @@
assert(theFileName != 0);
assert(theResult != 0);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sprintf;
-#endif
sprintf(
theResult,
diff --git a/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.hpp b/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.hpp
index 91dc5be..bc88dd6 100644
--- a/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.hpp
+++ b/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.hpp
@@ -42,11 +42,7 @@
{
public :
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::FILE* HandleType;
-#else
- typedef FILE* HandleType;
-#endif
/**
* Construct an MsgFileOutputStream object.
diff --git a/src/xalanc/Utils/MsgCreator/NLSHandler.cpp b/src/xalanc/Utils/MsgCreator/NLSHandler.cpp
index bf2ca89..44b03ab 100644
--- a/src/xalanc/Utils/MsgCreator/NLSHandler.cpp
+++ b/src/xalanc/Utils/MsgCreator/NLSHandler.cpp
@@ -121,9 +121,7 @@
{
char szNumb[20];
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sprintf;
-#endif
sprintf(
szNumb,
diff --git a/src/xalanc/Utils/MsgCreator/SAX2Handler.cpp b/src/xalanc/Utils/MsgCreator/SAX2Handler.cpp
index 68f1fdc..c6d4204 100644
--- a/src/xalanc/Utils/MsgCreator/SAX2Handler.cpp
+++ b/src/xalanc/Utils/MsgCreator/SAX2Handler.cpp
@@ -35,9 +35,7 @@
namespace XALAN_CPP_NAMESPACE {
-#if defined(XALAN_STRICT_ANSI_HEADERS)
- using std::sprintf;
-#endif
+using std::sprintf;
using xercesc::Attributes;
diff --git a/src/xalanc/XMLSupport/FormatterToHTML.cpp b/src/xalanc/XMLSupport/FormatterToHTML.cpp
index 3db96ca..c3e11c9 100644
--- a/src/xalanc/XMLSupport/FormatterToHTML.cpp
+++ b/src/xalanc/XMLSupport/FormatterToHTML.cpp
@@ -170,9 +170,7 @@
{
initAttrCharsMap();
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::memset;
-#endif
memset(m_charsMap, 0, sizeof(m_charsMap));
diff --git a/src/xalanc/XMLSupport/FormatterToXML.cpp b/src/xalanc/XMLSupport/FormatterToXML.cpp
index e8095a8..c68eaf8 100644
--- a/src/xalanc/XMLSupport/FormatterToXML.cpp
+++ b/src/xalanc/XMLSupport/FormatterToXML.cpp
@@ -40,6 +40,10 @@
+#include <cstring>
+
+
+
namespace XALAN_CPP_NAMESPACE {
@@ -377,11 +381,7 @@
void
FormatterToXML::initAttrCharsMap()
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::memset(m_attrCharsMap, 0, sizeof(m_attrCharsMap));
-#else
- memset(m_attrCharsMap, 0, sizeof(m_attrCharsMap));
-#endif
const XalanDOMString::size_type nSpecials =
m_attrSpecialChars.length();
@@ -415,11 +415,7 @@
{
initAttrCharsMap();
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::memset(m_charsMap, 0, sizeof(m_charsMap));
-#else
- memset(m_charsMap, 0, sizeof(m_charsMap));
-#endif
m_charsMap[XalanUnicode::charLessThanSign] = 'S';
m_charsMap[XalanUnicode::charGreaterThanSign] = 'S';
diff --git a/src/xalanc/XPath/XPathFunctionTable.cpp b/src/xalanc/XPath/XPathFunctionTable.cpp
index 1b8ee56..1a14fbe 100644
--- a/src/xalanc/XPath/XPathFunctionTable.cpp
+++ b/src/xalanc/XPath/XPathFunctionTable.cpp
@@ -116,11 +116,7 @@
{
assert(int(s_functionNamesSize) == TableSize);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::memset(m_functionTable, 0, sizeof(m_functionTable));
-#else
- memset(m_functionTable, 0, sizeof(m_functionTable));
-#endif
if (fCreateTable == true)
{
@@ -467,11 +463,7 @@
m_functionTable + TableSize,
DeleteFunctorType(*m_memoryManager));
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::memset(m_functionTable, 0, sizeof(m_functionTable));
-#else
- memset(m_functionTable, 0, sizeof(m_functionTable));
-#endif
}
catch(...)
{
diff --git a/src/xalanc/XPath/XPathProcessorImpl.hpp b/src/xalanc/XPath/XPathProcessorImpl.hpp
index 3f4a288..51a7b8f 100644
--- a/src/xalanc/XPath/XPathProcessorImpl.hpp
+++ b/src/xalanc/XPath/XPathProcessorImpl.hpp
@@ -714,11 +714,7 @@
XPathExpression::eOpCodes m_opCode;
};
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::size_t size_type;
-#else
- typedef size_t size_type;
-#endif
static const TableEntry&
searchTable(
diff --git a/src/xalanc/XSLT/AVT.hpp b/src/xalanc/XSLT/AVT.hpp
index a147799..25293d5 100644
--- a/src/xalanc/XSLT/AVT.hpp
+++ b/src/xalanc/XSLT/AVT.hpp
@@ -59,11 +59,7 @@
{
public:
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::size_t size_type;
-#else
- typedef size_t size_type;
-#endif
/**
* Construct an Attribute Value Template(AVT) by parsing the string, and
diff --git a/src/xalanc/XSLT/ElemNumber.cpp b/src/xalanc/XSLT/ElemNumber.cpp
index 9f821ab..864bc27 100644
--- a/src/xalanc/XSLT/ElemNumber.cpp
+++ b/src/xalanc/XSLT/ElemNumber.cpp
@@ -1485,11 +1485,7 @@
XalanDOMChar buf[buflen + 1];
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::memset(buf, 0, (buflen + 1) * sizeof(XalanDOMChar));
-#else
- memset(buf, 0, (buflen + 1) * sizeof(XalanDOMChar));
-#endif
// next character to set in the buffer
XalanDOMString::size_type charPos = buflen - 1 ; // work backward through buf[]
diff --git a/src/xalanc/XSLT/ElemUse.hpp b/src/xalanc/XSLT/ElemUse.hpp
index b1b0a0b..89ef68c 100644
--- a/src/xalanc/XSLT/ElemUse.hpp
+++ b/src/xalanc/XSLT/ElemUse.hpp
@@ -38,11 +38,7 @@
{
public:
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::size_t size_type;
-#else
- typedef size_t size_type;
-#endif
/**
* Construct an object corresponding to an "use-attribute-sets" attribute.
diff --git a/src/xalanc/XSLT/FunctionSystemProperty.cpp b/src/xalanc/XSLT/FunctionSystemProperty.cpp
index 520e63e..45bf366 100644
--- a/src/xalanc/XSLT/FunctionSystemProperty.cpp
+++ b/src/xalanc/XSLT/FunctionSystemProperty.cpp
@@ -179,11 +179,7 @@
TranscodeToLocalCodePage(fullName, theResultVect, true);
const char* const theEnvString =
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::getenv(c_str(theResultVect));
-#else
- getenv(c_str(theResultVect));
-#endif
if (theEnvString != 0)
{
diff --git a/src/xalanc/XSLT/StylesheetExecutionContext.hpp b/src/xalanc/XSLT/StylesheetExecutionContext.hpp
index 9e0067d..b115974 100644
--- a/src/xalanc/XSLT/StylesheetExecutionContext.hpp
+++ b/src/xalanc/XSLT/StylesheetExecutionContext.hpp
@@ -66,9 +66,7 @@
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::FILE;
-#endif
diff --git a/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp b/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
index 228ff8b..255f92d 100644
--- a/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
+++ b/src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp
@@ -607,11 +607,7 @@
if (i != m_matchPatternCache.end())
{
// Update hit time...
-#if defined(XALAN_STRICT_ANSI_HEADERS)
(*i).second.second = std::clock();
-#else
- (*i).second.second = clock();
-#endif
theResult = (*i).second.first;
}
@@ -2594,11 +2590,7 @@
{
assert(m_xsltProcessor != 0);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
ClockType addClock = std::clock();
-#else
- ClockType addClock = clock();
-#endif
if (m_matchPatternCache.size() == eXPathCacheMax)
{
diff --git a/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp b/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp
index 96118c3..204789e 100644
--- a/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp
+++ b/src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp
@@ -89,11 +89,7 @@
{
public:
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::clock_t ClockType;
-#else
- typedef clock_t ClockType;
-#endif
typedef XalanVector<FormatterListener*> FormatterListenerVectorType;
typedef XalanVector<PrintWriter*> PrintWriterVectorType;
diff --git a/src/xalanc/XSLT/XSLTResultTarget.hpp b/src/xalanc/XSLT/XSLTResultTarget.hpp
index ab23fdc..003e77f 100644
--- a/src/xalanc/XSLT/XSLTResultTarget.hpp
+++ b/src/xalanc/XSLT/XSLTResultTarget.hpp
@@ -48,9 +48,7 @@
typedef std::ostream StreamType;
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::FILE FILE;
-#endif
explicit
diff --git a/src/xalanc/XSLT/XalanMatchPatternData.hpp b/src/xalanc/XSLT/XalanMatchPatternData.hpp
index 7967ff4..2c77cc1 100644
--- a/src/xalanc/XSLT/XalanMatchPatternData.hpp
+++ b/src/xalanc/XSLT/XalanMatchPatternData.hpp
@@ -56,11 +56,7 @@
typedef XPath::eMatchScore eMatchScore;
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::size_t size_type;
-#else
- typedef size_t size_type;
-#endif
/**
diff --git a/src/xalanc/XalanDOM/XalanDOMString.cpp b/src/xalanc/XalanDOM/XalanDOMString.cpp
index 53f2557..6e62c2d 100644
--- a/src/xalanc/XalanDOM/XalanDOMString.cpp
+++ b/src/xalanc/XalanDOM/XalanDOMString.cpp
@@ -248,11 +248,7 @@
else
{
// Yuck. We have to move data...
-#if defined(XALAN_STRICT_ANSI_HEADERS)
std::memmove(&*begin(), &*begin() + thePosition, theCount * sizeof(XalanDOMChar));
-#else
- memmove(&*begin(), &*begin() + thePosition, theCount * sizeof(XalanDOMChar));
-#endif
resize(theCount);
}
@@ -791,16 +787,9 @@
{
assert(theString != 0);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
assert(std::strlen(theString) < size_type(npos));
return size_type(std::strlen(theString));
-#else
- assert(strlen(theString) < size_type(npos));
-
- return size_type(strlen(theString));
-#endif
-
}
diff --git a/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp b/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp
index 1046ea6..cf3cd90 100644
--- a/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp
+++ b/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp
@@ -101,12 +101,10 @@
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sprintf;
using std::time;
using std::time_t;
using std::tm;
-#endif
@@ -114,10 +112,8 @@
namespace
{
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::gmtime;
using std::localtime;
-#endif
static struct tm*
localtime_r(const time_t *clock, struct tm *res)
diff --git a/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp b/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
index f485ce0..f4ba8d2 100644
--- a/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
+++ b/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
@@ -426,9 +426,7 @@
locator);
}
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::rand;
-#endif
const int value = rand();
@@ -484,9 +482,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::acos;
-#endif
return executionContext.getXObjectFactory().createNumber(acos(args[0]->num(executionContext)));
}
@@ -533,9 +529,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::asin;
-#endif
return executionContext.getXObjectFactory().createNumber(asin(args[0]->num(executionContext)));
}
@@ -581,9 +575,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::atan;
-#endif
return executionContext.getXObjectFactory().createNumber(atan(args[0]->num(executionContext)));
}
@@ -630,9 +622,7 @@
assert(args[0].null() == false && args[1].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::atan2;
-#endif
return executionContext.getXObjectFactory().createNumber(
atan2(args[0]->num(executionContext), args[1]->num(executionContext)));
@@ -1139,9 +1129,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::cos;
-#endif
return executionContext.getXObjectFactory().createNumber(cos(args[0]->num(executionContext)));
}
@@ -1186,9 +1174,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::exp;
-#endif
return executionContext.getXObjectFactory().createNumber(exp(args[0]->num(executionContext)));
}
@@ -1233,9 +1219,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::log;
-#endif
return executionContext.getXObjectFactory().createNumber(log(args[0]->num(executionContext)));
}
@@ -1282,9 +1266,7 @@
assert(args[0].null() == false && args[1].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::pow;
-#endif
return executionContext.getXObjectFactory().createNumber(
pow(
@@ -1332,9 +1314,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sin;
-#endif
return executionContext.getXObjectFactory().createNumber(sin(args[0]->num(executionContext)));
}
@@ -1381,9 +1361,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::sqrt;
-#endif
return executionContext.getXObjectFactory().createNumber(sqrt(args[0]->num(executionContext)));
}
@@ -1428,9 +1406,7 @@
assert(args[0].null() == false);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::tan;
-#endif
return executionContext.getXObjectFactory().createNumber(tan(args[0]->num(executionContext)));
}
@@ -1552,10 +1528,8 @@
// Sets the starting point for generating a series of pseudorandom integers,
// we need it for random() EXSLT function
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::srand;
using std::time;
-#endif
srand( (unsigned)time( NULL ) );
}
diff --git a/src/xalanc/XalanExe/XalanExe.cpp b/src/xalanc/XalanExe/XalanExe.cpp
index 2d9703b..90823ce 100644
--- a/src/xalanc/XalanExe/XalanExe.cpp
+++ b/src/xalanc/XalanExe/XalanExe.cpp
@@ -58,11 +58,9 @@
#include "windows.h"
#else
#include <ctime>
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::clock;
using std::clock_t;
#endif
-#endif
@@ -72,11 +70,9 @@
using std::endl;
using std::ostream;
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::atoi;
using std::strcmp;
using std::strlen;
-#endif
@@ -458,11 +454,7 @@
#if defined(XALAN_USE_WINDOWS_TIMING)
typedef LARGE_INTEGER ClockType;
#else
-#if defined(XALAN_STRICT_ANSI_HEADERS)
typedef std::clock_t ClockType;
-#else
-typedef clock_t ClockType;
-#endif
#endif
typedef ostream OstreamType;
@@ -478,11 +470,7 @@
return theResult;
#else
-#if defined(XALAN_STRICT_ANSI_HEADERS)
return std::clock();
-#else
- return clock();
-#endif
#endif
}
diff --git a/src/xalanc/XalanTransformer/XalanTransformer.cpp b/src/xalanc/XalanTransformer/XalanTransformer.cpp
index 94e9fc5..553f7af 100644
--- a/src/xalanc/XalanTransformer/XalanTransformer.cpp
+++ b/src/xalanc/XalanTransformer/XalanTransformer.cpp
@@ -19,7 +19,7 @@
#include <algorithm>
#include <iostream>
-
+#include <cstring>
#include <xercesc/sax/SAXParseException.hpp>
@@ -536,9 +536,7 @@
theMessage.resize(theLength + 1);
-#if defined(XALAN_STRICT_ANSI_HEADERS)
using std::strncpy;;
-#endif
strncpy(
&*theMessage.begin(),