summaryrefslogtreecommitdiff
path: root/otherlibs/unix/nanosecond_stat.h
blob: c1a648ef12b94699863acafeda3b25e661f5be2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/***********************************************************************/
/*                                                                     */
/*                                OCaml                                */
/*                                                                     */
/*                 Jeremie Dimino, Jane Street Group, LLC              */
/*                                                                     */
/*  Copyright 2015 Institut National de Recherche en Informatique et   */
/*  en Automatique.  All rights reserved.  This file is distributed    */
/*  under the terms of the GNU Library General Public License, with    */
/*  the special exception on linking described in file ../../LICENSE.  */
/*                                                                     */
/***********************************************************************/

/* This file is used by the configure test program nanosecond_stat.c
   and stat.c in this directory */

#if HAS_NANOSECOND_STAT == 1
#  define NSEC(buf, field) buf->st_##field##tim.tv_nsec
#elif HAS_NANOSECOND_STAT == 2
#  define NSEC(buf, field) buf->st_##field##timespec.tv_nsec
#elif HAS_NANOSECOND_STAT == 3
#  define NSEC(buf, field) buf->st_##field##timensec
#else
#  define NSEC(buf, field) 0
#endif