10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 50Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 60Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 70Sstevel@tonic-gate * with the License. 80Sstevel@tonic-gate * 90Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 100Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 110Sstevel@tonic-gate * See the License for the specific language governing permissions 120Sstevel@tonic-gate * and limitations under the License. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 150Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 160Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 170Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 180Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 190Sstevel@tonic-gate * 200Sstevel@tonic-gate * CDDL HEADER END 210Sstevel@tonic-gate */ 220Sstevel@tonic-gate /* 230Sstevel@tonic-gate * Copyright 1987 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate /* Copyright (c) 1984 AT&T */ 280Sstevel@tonic-gate /* All Rights Reserved */ 290Sstevel@tonic-gate 30*722Smuffin #ifndef __5include_time_h 31*722Smuffin #define __5include_time_h 320Sstevel@tonic-gate 33*722Smuffin #pragma ident "%Z%%M% %I% %E% SMI" 340Sstevel@tonic-gate 350Sstevel@tonic-gate #include <sys/stdtypes.h> 360Sstevel@tonic-gate 370Sstevel@tonic-gate #ifndef NULL 380Sstevel@tonic-gate #define NULL 0 390Sstevel@tonic-gate #endif 400Sstevel@tonic-gate 410Sstevel@tonic-gate struct tm { /* see ctime(3) */ 420Sstevel@tonic-gate int tm_sec; 430Sstevel@tonic-gate int tm_min; 440Sstevel@tonic-gate int tm_hour; 450Sstevel@tonic-gate int tm_mday; 460Sstevel@tonic-gate int tm_mon; 470Sstevel@tonic-gate int tm_year; 480Sstevel@tonic-gate int tm_wday; 490Sstevel@tonic-gate int tm_yday; 500Sstevel@tonic-gate int tm_isdst; 510Sstevel@tonic-gate char *tm_zone; 520Sstevel@tonic-gate long tm_gmtoff; 530Sstevel@tonic-gate }; 540Sstevel@tonic-gate 550Sstevel@tonic-gate /* 560Sstevel@tonic-gate * Following 2 lines are required to make CLK_TCK work. 570Sstevel@tonic-gate * If they change here they have to change in <sys/unistd.h> as well. 580Sstevel@tonic-gate */ 590Sstevel@tonic-gate extern long sysconf(/* int name */); 600Sstevel@tonic-gate #define _SC_CLK_TCK 3 /* clock ticks/sec */ 610Sstevel@tonic-gate /* 620Sstevel@tonic-gate * POSIX.1 uses CLK_TCK to specify units used by times(3). 630Sstevel@tonic-gate * POSIX.1a doesn't use a name for this and says CLK_TCK is obsolescent, but 640Sstevel@tonic-gate * we'll probably have to support it for a long time. 650Sstevel@tonic-gate */ 660Sstevel@tonic-gate #define CLK_TCK (sysconf(_SC_CLK_TCK)) 670Sstevel@tonic-gate /* 881207 ANSI C draft uses CLOCKS_PER_SEC to specify units used by clock(3). */ 680Sstevel@tonic-gate #define CLOCKS_PER_SEC 1000000L 690Sstevel@tonic-gate 700Sstevel@tonic-gate extern char * asctime(/* const struct tm *t */); 710Sstevel@tonic-gate extern char * ctime(/* const time_t *t */); 720Sstevel@tonic-gate extern struct tm * gmtime(/* const time_t *t */); 730Sstevel@tonic-gate extern struct tm * localtime(/* const time_t *t */); 740Sstevel@tonic-gate extern time_t mktime(/* struct tm *timeptr */); 750Sstevel@tonic-gate extern size_t strftime(/* char *s, size_t maxsize, const char *format, 760Sstevel@tonic-gate const struct tm *timeptr */); 770Sstevel@tonic-gate extern time_t time(/* time_t *t */); 780Sstevel@tonic-gate extern void tzset(/* void */); 790Sstevel@tonic-gate 800Sstevel@tonic-gate extern char *tzname[]; 810Sstevel@tonic-gate #ifndef _POSIX_SOURCE 820Sstevel@tonic-gate extern int daylight; 830Sstevel@tonic-gate extern long timezone; 840Sstevel@tonic-gate extern void tzsetwall(/* void */); 85*722Smuffin #endif /* !_POSIX_SOURCE */ 860Sstevel@tonic-gate 87*722Smuffin #endif /* !__5include_time_h */ 88