1 /**
2 * D header file for POSIX.
3 *
4 * Copyright: Copyright Sean Kelly 2005 - 2009.
5 * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
6 * Authors: Sean Kelly
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
8 */
9
10 /* Copyright Sean Kelly 2005 - 2009.
11 * Distributed under the Boost Software License, Version 1.0.
12 * (See accompanying file LICENSE or copy at
13 * http://www.boost.org/LICENSE_1_0.txt)
14 */
15 module core.sys.posix.utime;
16
17 import core.sys.posix.config;
18 public import core.sys.posix.sys.types; // for time_t
19
20 version (OSX)
21 version = Darwin;
22 else version (iOS)
23 version = Darwin;
24 else version (TVOS)
25 version = Darwin;
26 else version (WatchOS)
27 version = Darwin;
28
version(Posix)29 version (Posix):
30 extern (C):
31 nothrow:
32 @nogc:
33 @system:
34
35 //
36 // Required
37 //
38 /*
39 struct utimbuf
40 {
41 time_t actime;
42 time_t modtime;
43 }
44
45 int utime(const scope char*, const scope utimbuf*);
46 */
47
48 version (CRuntime_Glibc)
49 {
50 struct utimbuf
51 {
52 time_t actime;
53 time_t modtime;
54 }
55
56 int utime(const scope char*, const scope utimbuf*);
57 }
version(CRuntime_Musl)58 else version (CRuntime_Musl)
59 {
60 struct utimbuf
61 {
62 time_t actime;
63 time_t modtime;
64 }
65
66 int utime(const scope char*, const scope utimbuf*);
67 }
version(Darwin)68 else version (Darwin)
69 {
70 struct utimbuf
71 {
72 time_t actime;
73 time_t modtime;
74 }
75
76 int utime(const scope char*, const scope utimbuf*);
77 }
version(FreeBSD)78 else version (FreeBSD)
79 {
80 struct utimbuf
81 {
82 time_t actime;
83 time_t modtime;
84 }
85
86 int utime(const scope char*, const scope utimbuf*);
87 }
version(NetBSD)88 else version (NetBSD)
89 {
90 struct utimbuf
91 {
92 time_t actime;
93 time_t modtime;
94 }
95
96 int utime(const scope char*, const scope utimbuf*);
97 }
version(OpenBSD)98 else version (OpenBSD)
99 {
100 struct utimbuf
101 {
102 time_t actime;
103 time_t modtime;
104 }
105
106 int utime(const scope char*, const scope utimbuf*);
107 }
version(DragonFlyBSD)108 else version (DragonFlyBSD)
109 {
110 struct utimbuf
111 {
112 time_t actime;
113 time_t modtime;
114 }
115
116 int utime(const scope char*, const scope utimbuf*);
117 }
version(Solaris)118 else version (Solaris)
119 {
120 struct utimbuf
121 {
122 time_t actime;
123 time_t modtime;
124 }
125
126 int utime(const scope char*, const scope utimbuf*);
127 }
version(CRuntime_Bionic)128 else version (CRuntime_Bionic)
129 {
130 struct utimbuf
131 {
132 time_t actime;
133 time_t modtime;
134 }
135
136 int utime(const scope char*, const scope utimbuf*);
137 }
version(CRuntime_UClibc)138 else version (CRuntime_UClibc)
139 {
140 struct utimbuf
141 {
142 time_t actime;
143 time_t modtime;
144 }
145
146 int utime(const scope char*, const scope utimbuf*);
147 }
148