summaryrefslogtreecommitdiff
path: root/otherlibs/unix/nanosecond_stat.h
blob: 6abeb57e40202aaec239b575de32f0c84d725f74 (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
26
27
/**************************************************************************/
/*                                                                        */
/*                                 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 Lesser General Public License version 2.1, with the          */
/*   special exception on linking described in the 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