Print this page
remove support for non-ANSI compilation


   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*


  27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  */
  30 
  31 /*
  32  * An application should not include this header directly.  Instead it
  33  * should be included only through the inclusion of other Sun headers.
  34  *
  35  * The contents of this header is limited to identifiers specified in the
  36  * C Standard.  Any new identifiers specified in future amendments to the
  37  * C Standard must be placed in this header.  If these new identifiers
  38  * are required to also be in the C++ Standard "std" namespace, then for
  39  * anything other than macro definitions, corresponding "using" directives
  40  * must also be added to <time.h.h>.
  41  */
  42 
  43 #ifndef _ISO_TIME_ISO_H
  44 #define _ISO_TIME_ISO_H
  45 
  46 #pragma ident   "%Z%%M% %I%     %E% SMI" /* SVr4.0 1.18 */
  47 
  48 #include <sys/feature_tests.h>
  49 
  50 #ifdef  __cplusplus
  51 extern "C" {
  52 #endif
  53 
  54 #if __cplusplus >= 199711L
  55 namespace std {
  56 #endif
  57 
  58 #ifndef NULL
  59 #if defined(_LP64)
  60 #define NULL    0L
  61 #else
  62 #define NULL    0
  63 #endif
  64 #endif
  65 
  66 #if !defined(_SIZE_T) || __cplusplus >= 199711L
  67 #define _SIZE_T


  80 #if !defined(_TIME_T) || __cplusplus >= 199711L
  81 #define _TIME_T
  82 typedef long    time_t;
  83 #endif  /* !_TIME_T */
  84 
  85 #define CLOCKS_PER_SEC          1000000L
  86 
  87 struct  tm {    /* see ctime(3) */
  88         int     tm_sec;
  89         int     tm_min;
  90         int     tm_hour;
  91         int     tm_mday;
  92         int     tm_mon;
  93         int     tm_year;
  94         int     tm_wday;
  95         int     tm_yday;
  96         int     tm_isdst;
  97 };
  98 
  99 
 100 #if defined(__STDC__)
 101 
 102 extern char *asctime(const struct tm *);
 103 extern clock_t clock(void);
 104 extern char *ctime(const time_t *);
 105 extern double difftime(time_t, time_t);
 106 extern struct tm *gmtime(const time_t *);
 107 extern struct tm *localtime(const time_t *);
 108 extern time_t mktime(struct tm *);
 109 extern time_t time(time_t *);
 110 extern size_t strftime(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
 111         const struct tm *_RESTRICT_KYWD);
 112 
 113 #else /* __STDC__ */
 114 
 115 extern char *asctime();
 116 extern clock_t clock();
 117 extern char *ctime();
 118 extern double difftime();
 119 extern struct tm *gmtime();
 120 extern struct tm *localtime();
 121 extern time_t mktime();
 122 extern time_t time();
 123 extern size_t strftime();
 124 
 125 #endif  /* __STDC__ */
 126 
 127 #if __cplusplus >= 199711L
 128 }
 129 #endif /* end of namespace std */
 130 
 131 #ifdef  __cplusplus
 132 }
 133 #endif
 134 
 135 #endif  /* _ISO_TIME_ISO_H */


   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1988 AT&T     */
  23 /*        All Rights Reserved   */
  24 

  25 /*
  26  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  27  *
  28  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  29  * Use is subject to license terms.
  30  */
  31 
  32 /*
  33  * An application should not include this header directly.  Instead it
  34  * should be included only through the inclusion of other Sun headers.
  35  *
  36  * The contents of this header is limited to identifiers specified in the
  37  * C Standard.  Any new identifiers specified in future amendments to the
  38  * C Standard must be placed in this header.  If these new identifiers
  39  * are required to also be in the C++ Standard "std" namespace, then for
  40  * anything other than macro definitions, corresponding "using" directives
  41  * must also be added to <time.h.h>.
  42  */
  43 
  44 #ifndef _ISO_TIME_ISO_H
  45 #define _ISO_TIME_ISO_H
  46 


  47 #include <sys/feature_tests.h>
  48 
  49 #ifdef  __cplusplus
  50 extern "C" {
  51 #endif
  52 
  53 #if __cplusplus >= 199711L
  54 namespace std {
  55 #endif
  56 
  57 #ifndef NULL
  58 #if defined(_LP64)
  59 #define NULL    0L
  60 #else
  61 #define NULL    0
  62 #endif
  63 #endif
  64 
  65 #if !defined(_SIZE_T) || __cplusplus >= 199711L
  66 #define _SIZE_T


  79 #if !defined(_TIME_T) || __cplusplus >= 199711L
  80 #define _TIME_T
  81 typedef long    time_t;
  82 #endif  /* !_TIME_T */
  83 
  84 #define CLOCKS_PER_SEC          1000000L
  85 
  86 struct  tm {    /* see ctime(3) */
  87         int     tm_sec;
  88         int     tm_min;
  89         int     tm_hour;
  90         int     tm_mday;
  91         int     tm_mon;
  92         int     tm_year;
  93         int     tm_wday;
  94         int     tm_yday;
  95         int     tm_isdst;
  96 };
  97 
  98 


  99 extern char *asctime(const struct tm *);
 100 extern clock_t clock(void);
 101 extern char *ctime(const time_t *);
 102 extern double difftime(time_t, time_t);
 103 extern struct tm *gmtime(const time_t *);
 104 extern struct tm *localtime(const time_t *);
 105 extern time_t mktime(struct tm *);
 106 extern time_t time(time_t *);
 107 extern size_t strftime(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
 108         const struct tm *_RESTRICT_KYWD);
 109 














 110 #if __cplusplus >= 199711L
 111 }
 112 #endif /* end of namespace std */
 113 
 114 #ifdef  __cplusplus
 115 }
 116 #endif
 117 
 118 #endif  /* _ISO_TIME_ISO_H */