dbertoni    2004/08/07 12:04:24

  Modified:    c/src/xalanc/XalanEXSLT XalanEXSLTDateTime.cpp
  Log:
  Fixed compilation problems with GCC 2.95.3 and Tru64.
  
  Revision  Changes    Path
  1.9       +23 -4     xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp
  
  Index: XalanEXSLTDateTime.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTDateTime.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XalanEXSLTDateTime.cpp    29 Jul 2004 20:18:11 -0000      1.8
  +++ XalanEXSLTDateTime.cpp    7 Aug 2004 19:04:24 -0000       1.9
  @@ -18,7 +18,10 @@
   #include "XalanEXSLTDateTimeImpl.hpp"
   
   
  -#include <time.h>
  +
  +#include <cstdio>
  +#include <ctime>
  +
   
   
   #include <xalanc/PlatformSupport/XalanMessageLoader.hpp>
  @@ -28,6 +31,7 @@
   #include <xalanc/XPath/XObjectFactory.hpp>
   
   
  +
   XALAN_CPP_NAMESPACE_BEGIN
   
   
  @@ -95,9 +99,20 @@
   
   
   
  +#if defined(XALAN_STRICT_ANSI_HEADERS)
  +using std::gmtime;
  +using std::localtime;
  +using std::sprintf;
  +using std::time;
  +using std::time_t;
  +using std::tm;
  +#endif
  +
  +
  +
   #if defined(WIN32) || defined(__DECCXX)
   
  -static struct tm *
  +static struct tm*
   localtime_r(const time_t *clock, struct tm *res)
   {
        assert( res != 0 );
  @@ -213,9 +228,13 @@
                                }
   
                                if(offset == 100)
  -                                     sprintf(timeZone , "%s", "z");
  +                {
  +                                     sprintf(timeZone, "%s", "z");
  +                }
                                else
  -                                     sprintf(timeZone , "%2.2d:00",offset);
  +                {
  +                                     sprintf(timeZone, "%2.2d:00", offset);
  +                }
   
                                theResult.append(timeZone);
                        }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to