/usr/include/iso/time_iso.h


    1 /*	Copyright (c) 1988 AT&T	*/
    2 /*	  All Rights Reserved  	*/
    3 
    4 /*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
    5 /*	The copyright notice above does not evidence any   	*/
    6 /*	actual or intended publication of such source code.	*/
    7 
    8 /*
    9  *	Copyright (c) 1993-1999 by Sun Microsystems, Inc.
   10  *	All rights reserved.
   11  */
   12 
   13 /*
   14  * An application should not include this header directly.  Instead it
   15  * should be included only through the inclusion of other Sun headers.
   16  *
   17  * The contents of this header is limited to identifiers specified in the
   18  * C Standard.  Any new identifiers specified in future amendments to the
   19  * C Standard must be placed in this header.  If these new identifiers
   20  * are required to also be in the C++ Standard "std" namespace, then for
   21  * anything other than macro definitions, corresponding "using" directives
   22  * must also be added to <time.h.h>.
   23  */
   24 
   25 #ifndef _ISO_TIME_ISO_H
   26 #define	_ISO_TIME_ISO_H
   27 
   28 #pragma ident	"@(#)time_iso.h	1.1	99/08/09 SMI" /* SVr4.0 1.18 */
   29 
   30 #include <sys/feature_tests.h>
   31 
   32 #ifdef	__cplusplus
   33 extern "C" {
   34 #endif
   35 
   36 #if __cplusplus >= 199711L
   37 namespace std {
   38 #endif
   39 
   40 #ifndef NULL
   41 #if defined(_LP64) && !defined(__cplusplus)
   42 #define	NULL	0L
   43 #else
   44 #define	NULL	0
   45 #endif
   46 #endif
   47 
   48 #if !defined(_SIZE_T) || __cplusplus >= 199711L
   49 #define	_SIZE_T
   50 #if defined(_LP64) || defined(_I32LPx)
   51 typedef	unsigned long	size_t;		/* size of something in bytes */
   52 #else
   53 typedef unsigned	size_t;		/* (historical version) */
   54 #endif
   55 #endif	/* !_SIZE_T */
   56 
   57 #if !defined(_CLOCK_T) || __cplusplus >= 199711L
   58 #define	_CLOCK_T
   59 typedef	long	clock_t;
   60 #endif	/* !_CLOCK_T */
   61 
   62 #if !defined(_TIME_T) || __cplusplus >= 199711L
   63 #define	_TIME_T
   64 typedef	long	time_t;
   65 #endif	/* !_TIME_T */
   66 
   67 #define	CLOCKS_PER_SEC		1000000
   68 
   69 struct	tm {	/* see ctime(3) */
   70 	int	tm_sec;
   71 	int	tm_min;
   72 	int	tm_hour;
   73 	int	tm_mday;
   74 	int	tm_mon;
   75 	int	tm_year;
   76 	int	tm_wday;
   77 	int	tm_yday;
   78 	int	tm_isdst;
   79 };
   80 
   81 
   82 #if defined(__STDC__)
   83 
   84 extern char *asctime(const struct tm *);
   85 extern clock_t clock(void);
   86 extern char *ctime(const time_t *);
   87 extern double difftime(time_t, time_t);
   88 extern struct tm *gmtime(const time_t *);
   89 extern struct tm *localtime(const time_t *);
   90 extern time_t mktime(struct tm *);
   91 extern time_t time(time_t *);
   92 extern size_t strftime(char *, size_t, const char *, const struct tm *);
   93 
   94 #else /* __STDC__ */
   95 
   96 extern char *asctime();
   97 extern clock_t clock();
   98 extern char *ctime();
   99 extern double difftime();
  100 extern struct tm *gmtime();
  101 extern struct tm *localtime();
  102 extern time_t mktime();
  103 extern time_t time();
  104 extern size_t strftime();
  105 
  106 #endif	/* __STDC__ */
  107 
  108 #if __cplusplus >= 199711L
  109 }
  110 #endif /* end of namespace std */
  111 
  112 #ifdef	__cplusplus
  113 }
  114 #endif
  115 
  116 #endif	/* _ISO_TIME_ISO_H */