/***************************************************************************
 * FILE: time.h/ctime (Time functions)
 *
 *                          Open Watcom Project
 *
 *    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
 *
 *    This file is automatically generated. Do not edit directly.
 *
 * =========================================================================
 *
 * Description: This header is part of the C/C++ standard library. It
 *              declares facilities for manipulating calendar dates and
 *              times.
 ***************************************************************************/
#ifndef _CTIME_INCLUDED
#define _CTIME_INCLUDED

#ifndef __cplusplus
#error the header ctime requires C++
#endif

#if !defined(_ENABLE_AUTODEPEND)
  #pragma read_only_file;
#endif


extern "C" {

#ifndef _COMDEF_H_INCLUDED
#include <_comdef.h>
#endif

#ifdef _M_IX86
#pragma pack( __push, 1 )
#else
#pragma pack( __push, 8 )
#endif

#ifndef _STDWCHAR_T_DEFINED
  #define _STDWCHAR_T_DEFINED
  namespace std {
    typedef long char wchar_t;
  }
#endif
#ifndef _WCHAR_T_DEFINED
  #define _WCHAR_T_DEFINED
  #define _WCHAR_T_DEFINED_
  using std::wchar_t;
#endif

#ifndef _STDSIZE_T_DEFINED
  #define _STDSIZE_T_DEFINED
  namespace std {
    typedef unsigned size_t;
  }
  typedef std::size_t _w_size_t;
#endif

#ifndef NULL
#if defined( __SMALL__ ) || defined( __MEDIUM__ ) || defined( __386__ ) || defined( __AXP__ ) || defined( __PPC__ )
#define                         NULL                    0
#else
#define                         NULL                    0L
#endif
#endif

#ifndef _STDTIME_T_DEFINED
  #define _STDTIME_T_DEFINED
  namespace std {
    typedef unsigned long time_t;
  }
#endif

#ifndef _STDCLOCK_T_DEFINED
  #define _STDCLOCK_T_DEFINED
  namespace std {
    typedef unsigned long clock_t;
  }
#endif

#define CLK_TCK          1000
#define CLOCKS_PER_SEC   1000


namespace std {
struct tm {
    int  tm_sec;    /* seconds after the minute -- [0,61] */
    int  tm_min;    /* minutes after the hour   -- [0,59] */
    int  tm_hour;   /* hours after midnight     -- [0,23] */
    int  tm_mday;   /* day of the month         -- [1,31] */
    int  tm_mon;    /* months since January     -- [0,11] */
    int  tm_year;   /* years since 1900                   */
    int  tm_wday;   /* days since Sunday        -- [0,6]  */
    int  tm_yday;   /* days since January 1     -- [0,365]*/
    int  tm_isdst;  /* Daylight Savings Time flag */
};
}

namespace std {
_WCRTLINK extern char        *asctime( const struct tm *__timeptr );
_WCRTLINK extern clock_t      clock( void );
_WCRTLINK extern char        *ctime( const time_t *__timer );
_WMRTLINK extern double       difftime( time_t __t1, time_t __t0 );
_WCRTLINK extern struct tm   *gmtime( const time_t *__timer );
_WCRTLINK extern struct tm   *localtime( const time_t *__timer );
_WCRTLINK extern time_t       mktime( struct tm *__timeptr );
_WCRTLINK extern size_t       strftime( char *__s, size_t __maxsiz, const char *__fmt, const struct tm *__tp );
_WCRTLINK extern time_t       time( time_t *__timer );
_WCRTLINK extern size_t       wcsftime( wchar_t *, size_t, const wchar_t *, const struct tm * );
}


_WCRTLINK extern wchar_t      *_wasctime( const std::tm * );
_WCRTLINK extern wchar_t      *_wctime( const std::time_t * );
_WCRTLINK extern wchar_t      *_wstrdate( wchar_t *__buf );
_WCRTLINK extern wchar_t      *_wstrtime( wchar_t *__buf );
_WCRTLINK extern std::size_t   _wstrftime_ms( wchar_t *, std::size_t, const char *, const std::tm * );

#if !defined(NO_EXT_KEYS) /* extensions enabled */
_WCRTLINK extern char        *_asctime( const std::tm *__timeptr, char *__buf );
_WCRTLINK extern char        *_ctime( const std::time_t *__timer, char *__buf );
_WCRTLINK extern std::tm     *_gmtime( const std::time_t *__timer, std::tm *__tmbuf );
_WCRTLINK extern std::tm     *_localtime( const std::time_t *__timer, std::tm *__tmbuf );
_WCRTLINK extern char        *_strdate( char *__buf );
_WCRTLINK extern char        *_strtime( char *__buf );
_WCRTLINK extern wchar_t     *__wctime( const std::time_t *, wchar_t * );
_WCRTLINK extern wchar_t     *__wasctime( const std::tm *, wchar_t * );
#endif

_WCRTLINK extern void  tzset( void );

#if defined(__FUNCTION_DATA_ACCESS)
#define tzname  ( *__get_tzname_ptr( void ) )
#elif defined(__SW_BR) || defined(_RTDLL)
#define tzname  tzname_br
#endif
_WCRTLINK extern char  *tzname[2];             /*  time zone names */

#if defined( __FUNCTION_DATA_ACCESS )
#define timezone ( *__get_timezone_ptr() )
#define daylight ( *__get_daylight_ptr() )
#elif defined( __SW_BR ) || defined( _RTDLL )
#define timezone timezone_br
#define daylight daylight_br
#endif
_WCRTLINK extern long  timezone;               /* # of seconds from GMT */
_WCRTLINK extern int   daylight;               /* d.s.t. indicator */

#pragma pack( __pop )

} /* End of extern "C" */


#endif
