1 /* @(#)utime.h	1.9 10/08/24 Copyright 2001-2010 J. Schilling */
2 /*
3  *	Defines for utimes() / utime()
4  *
5  *	Copyright (c) 2001-2010 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 #ifndef	_SCHILY_UTIME_H
22 #define	_SCHILY_UTIME_H
23 
24 #ifndef _SCHILY_MCONFIG_H
25 #include <schily/mconfig.h>
26 #endif
27 
28 #ifndef	_SCHILY_TYPES_H
29 #include <schily/types.h>
30 #endif
31 
32 #ifdef	HAVE_UTIMES
33 #ifndef _SCHILY_TIME_H
34 #include <schily/time.h>
35 #endif
36 #endif
37 
38 #ifdef	HAVE_UTIME_H
39 #ifndef	_INCL_UTIME_H
40 #include <utime.h>
41 #define	_INCL_UTIME_H
42 #endif
43 #else
44 #ifdef	HAVE_SYS_UTIME_H
45 #ifndef	_INCL_SYS_UTIME_H
46 #include <sys/utime.h>
47 #define	_INCL_SYS_UTIME_H
48 #endif
49 #else
50 
51 #ifdef	__cplusplus
52 extern "C" {
53 #endif
54 
55 struct utimbuf {
56 	time_t	actime;
57 	time_t	modtime;
58 };
59 
60 #ifdef	__cplusplus
61 }
62 #endif
63 
64 #endif
65 #endif
66 
67 #ifdef	__comment__
68 /*
69  * file.c contains this
70  * I am not sure if it is really needed.
71  * It may be a good idea to add a test for HAVE_STRUCT_UTIMBUF
72  * as in gnutar.
73  */
74 #if (__COHERENT__ >= 0x420)
75 # include <sys/utime.h>
76 #else
77 #  include <utime.h>
78 #endif
79 
80 #endif	/* __comment__ */
81 
82 #endif	/* _SCHILY_UTIME_H */
83