1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1985-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
18 * David Korn <dgk@research.att.com> *
19 * Phong Vo <kpv@research.att.com> *
21 ***********************************************************************/
23 /* : : generated by proto : : */
24 /* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
27 #if !defined(__PROTO__)
28 # if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
29 # if defined(__cplusplus)
30 # define __LINKAGE__ "C"
35 # define __PROTO__(x) x
37 # define __PARAM__(n,o) n
38 # if !defined(__STDC__) && !defined(__cplusplus)
39 # if !defined(c_plusplus)
50 # define __PROTO__(x) ()
51 # define __OTORP__(x) x
52 # define __PARAM__(n,o) o
60 # define __MANGLE__ __LINKAGE__
61 # if defined(__cplusplus) || defined(c_plusplus)
62 # define __VARARG__ ...
66 # if defined(__STDARG__)
67 # define __VA_START__(p,a) va_start(p,a)
69 # define __VA_START__(p,a) va_start(p)
71 # if !defined(__INLINE__)
72 # if defined(__cplusplus)
73 # define __INLINE__ extern __MANGLE__ inline
75 # if defined(_WIN32) && !defined(__GNUC__)
76 # define __INLINE__ __inline
81 #if !defined(__LINKAGE__)
82 #define __LINKAGE__ /* 2004-08-11 transition */
89 * high resolution Tv_t interface definitions
94 #define TV_NSEC_IGNORE (1000000000L)
95 #define TV_TOUCH_RETAIN ((Tv_t*)1)
103 #define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
104 #define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
105 #define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
107 #define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
108 #define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
109 #define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
111 #define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
112 #define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
113 #define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
115 #define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
116 #define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
117 #define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
119 #if _BLD_ast && defined(__EXPORT__)
121 #define __MANGLE__ __LINKAGE__ __EXPORT__
124 extern __MANGLE__
int tvgettime
__PROTO__((Tv_t
*));
125 extern __MANGLE__
int tvsettime
__PROTO__((const Tv_t
*));
126 extern __MANGLE__
int tvcmp
__PROTO__((const Tv_t
*, const Tv_t
*));
127 extern __MANGLE__
int tvtouch
__PROTO__((const char*, const Tv_t
*, const Tv_t
*, const Tv_t
*, int));
128 extern __MANGLE__
int tvsleep
__PROTO__((const Tv_t
*, Tv_t
*));
130 extern __MANGLE__
char* fmttv
__PROTO__((const char*, Tv_t
*));