/*  DO NOT EDIT THIS FILE.

    It has been auto-edited by fixincludes from:

	"/usr/include/time.h"

    This had to be done to correct non-standard usages in the
    original, manufacturer supplied header file.  */

/* HPUX_ID: @(#) $Revision: ../hdr/time.h@@/main/r11ros/cup_ros-cpe/cup_libc-ros-cpe/6 $  */
#ifndef _TIME_INCLUDED
#define _TIME_INCLUDED

#include <sys/stdsyms.h>

#ifdef _NAMESPACE_STD
#define _NAMESPACE_STD_START namespace std {
#define _NAMESPACE_STD_END }
#define _hpux_size_t std::size_t
#define __time_t std::time_t
#define __FILE std::FILE
#define __wint_t std::wint_t
#define __struct_tm std::tm
#define __va__list std::va_list
#else
#define _NAMESPACE_STD_START
#define _NAMESPACE_STD_END
#define _hpux_size_t size_t
#define __time_t time_t
#define __FILE FILE
#define __wint_t wint_t
#define __struct_tm struct tm
#define __va__list va_list
#endif


/*
 * For CASPEC, include tm_* macros and identifiers here
 * But for all other cases, maintain definitions in sys/time.h
 */

#ifdef _INCLUDE_HPUX_SOURCE
#ifdef __INCLUDE_FROM_TIME_H
#undef __INCLUDE_FROM_TIME_H
#endif /*  __INCLUDE_FROM_TIME_H */
#define  __INCLUDE_FROM_TIME_H
#include <sys/time.h>
#    ifndef _GET_EXPIRATION_TIME
#      define _GET_EXPIRATION_TIME
#if !defined(__STDC_32_MODE__)
typedef int64_t         hrtime_t; /* not defined for true ANSI-C name space */
#endif
#ifdef __cplusplus
   extern "C" {
#endif /* __cplusplus */
#if !defined(__STDC_32_MODE__)
extern  hrtime_t        gethrtime();
#endif
           extern int get_expiration_time __((struct timespec *,struct timespec *));
#ifdef __cplusplus
   }
#endif /* __cplusplus */
#    endif
#undef  __INCLUDE_FROM_TIME_H
#else /* _INCLUDE_HPUX_SOURCE */

/* ANSI C time constants, types, and structures */
#  ifdef _INCLUDE__STDC__

#    ifndef CLOCKS_PER_SEC
#      define CLOCKS_PER_SEC 1000000
#    endif

#    ifndef __NULL_INCLUDED
#      include <sys/_null.h>
#    endif /* _NULL_INCLUDED */

/***
 ** clock_t and time_t only need to be 32-bits, and are restricted
 ** to being 32-bits in sys/types.h, however time.h has
 ** namespace restrictions that do not allow sys/_inttypes.h
 ** to be included here. Therefore we can not use uint32_t,
 ** but will have to rely on the knowledge that we are LP64.
 **/
#    ifndef _CLOCK_T
#      define _CLOCK_T
#			ifdef __ILP64__
				Error: ILP64 not supported for clock_t in time.h
#			else /** __ILP64__ **/
_NAMESPACE_STD_START
				typedef unsigned int clock_t;
_NAMESPACE_STD_END
#			endif /* __ILP64__ */
#    endif /* _CLOCK_T */

#    ifndef _TIME_T_INCLUDED
#      include <sys/_time_t.h>
#    endif /* _TIME_T_INCLUDED */

#    ifndef _SIZE_T_INCLUDED
#      include <sys/_size_t.h>
#    endif /* _SIZE_T_INCLUDED */

     /* Structure used with gmtime(), localtime(), mktime(), strftime(). */
#ifndef _STRUCT_TM
#	define _STRUCT_TM
_NAMESPACE_STD_START
     struct tm {
        int tm_sec;	/* second (0-61, allows for leap seconds) */
        int tm_min;	/* minute (0-59) */
        int tm_hour;	/* hour (0-23) */
        int tm_mday;	/* day of the month (1-31) */
        int tm_mon;	/* month (0-11) */
        int tm_year;	/* years since 1900 */
        int tm_wday;	/* day of the week (0-6) */
        int tm_yday;	/* day of the year (0-365) */
        int tm_isdst;	/* non-0 if daylight savings time is in effect */
     };
_NAMESPACE_STD_END
#endif /* _STRUCT_TM */
#  endif /* _INCLUDE__STDC__ */

/*
 * CLK_TCK is needed by the kernel, and also in the POSIX namespace.
 */

#ifdef _INCLUDE_POSIX_SOURCE
#  ifndef CLK_TCK
#    define CLK_TCK 100
#  endif /* CLK_TCK */
#endif


/* Function prototypes and external variable declarations */

#ifndef _KERNEL
#ifdef __cplusplus
   extern "C" {
#endif /* __cplusplus */

#ifdef _INCLUDE__STDC__
#  ifdef _PROTOTYPES
_NAMESPACE_STD_START
#    ifndef _DIFFTIME
#      define _DIFFTIME
       extern double difftime(time_t, time_t);
#    endif /** _DIFFTIME **/
#    ifndef _MKTIME
#      define _MKTIME
       extern time_t mktime(struct tm *);
#    endif /** _MKTIME **/
#    ifndef _TIME
#      define _TIME
       extern time_t time(time_t *);
#    endif
#    ifndef _ASCTIME
#      define _ASCTIME
       extern char *asctime(const struct tm *);
#    endif
#    ifndef _CTIME
#      define _CTIME
       extern char *ctime(const time_t *);
#    endif
#    ifndef _GMTIME
#      define _GMTIME
       extern struct tm *gmtime(const time_t *);
#    endif
#    ifndef _LOCALTIME
#      define _LOCALTIME
       extern struct tm *localtime(const time_t *);
#    endif
#    ifndef _STRFTIME
#      define _STRFTIME
       extern size_t strftime(char *, size_t, const char *, const struct tm *);
#    endif
_NAMESPACE_STD_END
#      ifdef _REENTRANT
#        ifndef _ASCTIME_R
#          define _ASCTIME_R
#          ifndef _PTHREADS_DRAFT4
             extern char *asctime_r(const __struct_tm *, char *);
#          else /* _PTHREADS_DRAFT4 */
             extern int asctime_r(const __struct_tm *, char *, int);
#          endif /* _PTHREADS_DRAFT4 */
#        endif
#        ifndef _GMTIME_R
#	        define _GMTIME_R
#           ifndef _PTHREADS_DRAFT4
               extern __struct_tm *gmtime_r(const __time_t *, __struct_tm *);
#           else /* _PTHREADS_DRAFT4 */
               extern int gmtime_r(const __time_t *, __struct_tm *);
#           endif /* _PTHREADS_DRAFT4 */
#        endif
#        ifndef _LOCALTIME_R
#           define _LOCALTIME_R
#           ifndef _PTHREADS_DRAFT4
              extern __struct_tm *localtime_r(const __time_t *, __struct_tm *);
#           else /* _PTHREADS_DRAFT4 */
              extern int localtime_r(const __time_t *, __struct_tm *);
#           endif /* _PTHREADS_DRAFT4 */
#        endif
#       endif
#  else /* not _PROTOTYPES */

#    ifndef _DIFFTIME
#      define _DIFFTIME
       extern double difftime();
#    endif

#    ifndef _MKTIME
#      define _MKTIME
       extern time_t mktime();
#    endif

#    ifndef _TIME
#      define _TIME
       extern time_t time();
#    endif

#    ifndef _ASCTIME
#      define _ASCTIME
       extern char *asctime();
#    endif

#    ifndef _CTIME
#      define _CTIME
       extern char *ctime();
#    endif

#    ifndef _GMTIME
#      define _GMTIME
       extern struct tm *gmtime();
#    endif

#    ifndef _LOCALTIME
#      define _LOCALTIME
       extern struct tm *localtime();
#    endif

#    ifndef _STRFTIME
#      define _STRFTIME
       extern size_t strftime();
#    endif

#    ifdef _REENTRANT

#      ifndef _ASCTIME_R
#        define _ASCTIME_R
#        ifndef _PTHREADS_DRAFT4
           extern char *asctime_r();
#        else /* _PTHREADS_DRAFT4 */
           extern int asctime_r();
#        endif /* _PTHREADS_DRAFT4 */
#      endif

#      ifndef _GMTIME_R
#        define _GMTIMRE_R
#        ifndef _PTHREADS_DRAFT4
           extern struct tm *gmtime_r();
#        else /* _PTHREADS_DRAFT4 */
           extern int gmtime_r();
#        endif /* _PTHREADS_DRAFT4 */
#      endif

#      ifndef _LOCALTIME_R
#        define _LOCALTIME_R
#        ifndef _PTHREADS_DRAFT4
           extern struct tm *localtime_r();
#        else /* _PTHREADS_DRAFT4 */
           extern int localtime_r();
#        endif /* _PTHREADS_DRAFT4 */
#      endif

#    endif
#  endif /* not _PROTOTYPES */

#  ifdef _CLASSIC_ANSI_TYPES

#    ifndef _CLOCK
#      ifndef __LP64__
#        define _CLOCK
         extern long clock();
#      endif /* !__LP64 */
#    endif   /* !_CLOCK */

#  else /* not _CLASSIC_ANSI_TYPES */
#    ifdef _PROTOTYPES
#      ifndef _CLOCK
#        define _CLOCK
_NAMESPACE_STD_START
         extern clock_t clock(void);
_NAMESPACE_STD_END
#      endif
#    else /* not _PROTOTYPES */
#      ifndef _CLOCK
#        define _CLOCK
         extern clock_t clock();
#      endif
#    endif /* not _PROTOTYPES */
#  endif /* not _CLASSIC_ANSI_TYPES */
#endif /* _INCLUDE__STDC__ */

#ifdef _INCLUDE_POSIX_SOURCE
#  ifdef _PROTOTYPES

#    ifndef _TZSET
#      define _TZSET
       extern void tzset(void);
#    endif

#  else /* not _PROTOTYPES */

#    ifndef _TZSET
#      define _TZSET
       extern void tzset();
#    endif

#  endif /* not _PROTOTYPES */

#  ifndef _TZNAME
#    define _TZNAME
     extern char *tzname[2];
#  endif

#endif /* _INCLUDE_POSIX_SOURCE */

#ifdef _INCLUDE_XOPEN_SOURCE
#  ifdef _PROTOTYPES

#    ifndef _STRPTIME
#	    define _STRPTIME
       extern char *strptime(const char *, const char *, __struct_tm *);
#    endif

#  else /* not _PROTOTYPES */

#    ifndef _STRPTIME
#      define _STRPTIME
       extern char *strptime();
#    endif

#  endif /* not _PROTOTYPES */

#  ifndef _TIMEZONE
#    define _TIMEZONE
     extern long timezone;
#  endif

#  ifndef _DAYLIGHT
#    define _DAYLIGHT
     extern int daylight;
#  endif

#endif /* _INCLUDE_XOPEN_SOURCE */

#ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED
#  ifdef _PROTOTYPES

#    ifndef _GETDATE
#      define _GETDATE
       extern __struct_tm *getdate(const char *string);
#    endif

#  else /* !_PROTOTYPES */

#    ifndef _GETDATE
#      define _GETDATE
       extern struct tm *getdate();
#    endif

#  endif /* !_PROTOTYPES */

#    ifndef _GETDATE_ERR
#      define _GETDATE_ERR
# if defined(_REENTRANT) && !defined(_PTHREADS_DRAFT4)
	int * __getdate_error __((void)) ;
	#define getdate_err (*__getdate_error())
#else
       extern int getdate_err;
#endif /* defined(_REENTRANT) && !defined(_PTHREADS_DRAFT4) */
#    endif

#endif /* _INCLUDE_XOPEN_SOURCE_EXTENDED */

#ifdef _INCLUDE_HPUX_SOURCE

#    ifndef _GET_EXPIRATION_TIME
#      define _GET_EXPIRATION_TIME
	   extern int get_expiration_time __((struct timespec *,struct timespec *));
#    endif

# ifdef _PTHREADS_DRAFT4
#  ifdef _PROTOTYPES

#    ifndef _GETDATE_R
#      define _GETDATE_R
       extern int getdate_r(const char *, __struct_tm *, int *);
#    endif

#  else /* !_PROTOTYPES */

#    ifndef _GETDATE_R
#      define _GETDATE_R
       extern int getdate_r();
#    endif

#  endif /* !_PROTOTYPES */
# endif /* _PTHREADS_DRAFT4 */
#endif /* _INCLUDE_HPUX_SOURCE */

#ifdef __cplusplus
   }
#endif /* __cplusplus */
#endif /* not _KERNEL */

# endif /*  _INCLUDE_HPUX_SOURCE */

#endif /* _TIME_INCLUDED */
