From 60cd5c30c80e405b45cb66e97bb522c5bfd936dd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Apr 2013 15:32:37 -0700 Subject: [PATCH] Right mman.h bits for NaCl. --- sysdeps/nacl/Makefile | 11 +++++++++++ sysdeps/nacl/bits/mman.h | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 sysdeps/nacl/bits/mman.h diff --git a/sysdeps/nacl/Makefile b/sysdeps/nacl/Makefile index 43419821d0d..01a5fe0e3c3 100644 --- a/sysdeps/nacl/Makefile +++ b/sysdeps/nacl/Makefile @@ -54,6 +54,17 @@ $(nacl-optional-interfaces:%=$(nacl-interface-pattern)): \ sysdep_routines += nacl_interface_query \ nacl-interfaces $(nacl-interface-routines) +# The Linux bits are close enough for NaCl and we want to use the existing +# file rather than copying it into sysdeps/nacl and letting it bit rot. +# But we certainly don't want sysdeps/unix/sysv/linux in our sysdirs list! +# So copy the file to the build directory. +sysdep_headers += bits/mman-linux.h +before-compile += $(common-objpfx)bits/mman-linux.h +$(common-objpfx)bits/mman-linux.h: \ + $(..)sysdeps/unix/sysv/linux/bits/mman-linux.h + $(make-target-directory) + ln -f $< $@ || cp -f $< $@ + # XXX temp test others += hello diff --git a/sysdeps/nacl/bits/mman.h b/sysdeps/nacl/bits/mman.h new file mode 100644 index 00000000000..07f8929ef2c --- /dev/null +++ b/sysdeps/nacl/bits/mman.h @@ -0,0 +1,24 @@ +/* Definitions for POSIX memory map interface. NaCl version. + Copyright (C) 2013 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 + . */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* NaCl uses the Linux bits for this. */ +#include -- 2.47.2