Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/ostime.h

Issue 565343002: [NaCl SDK] nacl_io: Plumb through {,f}utime{,s} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 #ifndef LIBRARIES_NACL_IO_OSTIME_H_ 5 #ifndef LIBRARIES_NACL_IO_OSTIME_H_
6 #define LIBRARIES_NACL_IO_OSTIME_H_ 6 #define LIBRARIES_NACL_IO_OSTIME_H_
7 7
8 #if defined(WIN32) 8 #if defined(WIN32)
9 9
10 #include <pthread.h> 10 #include <pthread.h>
11 11
12 #ifndef CLOCK_REALTIME 12 #ifndef CLOCK_REALTIME
13 #define CLOCK_REALTIME (clockid_t)1 13 #define CLOCK_REALTIME (clockid_t)1
14 #endif 14 #endif
15 15
16 int clock_gettime(clockid_t clock_id, struct timespec* tp); 16 int clock_gettime(clockid_t clock_id, struct timespec* tp);
17 int clock_settime(clockid_t clock_id, const struct timespec* tp); 17 int clock_settime(clockid_t clock_id, const struct timespec* tp);
18 18
19 #else 19 #else
20 20
21 #include <time.h> 21 #include <time.h>
22 #include <utime.h>
23 #include <sys/time.h>
24
25 #ifdef __GLIBC__
26 #define st_atimensec st_atim.tv_nsec
27 #define st_mtimensec st_mtim.tv_nsec
28 #define st_ctimensec st_ctim.tv_nsec
29 #endif
22 30
23 #endif 31 #endif
24 32
25 #endif // LIBRARIES_NACL_IO_OSUNISTD_H_ 33 #endif // LIBRARIES_NACL_IO_OSUNISTD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698