summary refs log tree commit diff
path: root/sysdeps/nacl/xstatconv.h
blob: 26785940744cd785f6e8376b61e853dc75e9af9e (plain) (blame)
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
28
29
30
31
32
33
34
35
36
37
38
/* Convert between the NaCl ABI's `struct stat' format, and libc's.
   Copyright (C) 2014 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <http://www.gnu.org/licenses/>.  */

#include <nacl-interfaces.h>

struct stat;

/* We use this header to define struct nacl_abi_stat.  But we must avoid
   its excess declarations, and defining these names away is (marginally)
   cleaner than #undef'ing __native_client__.  */
#undef  stat
#define stat    __avoid_nacl_stat
#undef  fstat
#define fstat   __avoid_nacl_fstat
#undef  lstat
#define lstat   __avoid_nacl_lstat
#include <native_client/src/trusted/service_runtime/include/sys/stat.h>
#undef  stat
#undef  fstat
#undef  lstat

extern int __xstat_conv (int vers, const struct nacl_abi_stat *, void *)
  internal_function attribute_hidden;