hppa: Fix g++.dg/modules/bad-mapper-1.C on hpux
[official-gcc.git] / libgo / runtime / go-mmap.c
blobb2327ba68f56cf03fe75a008916eb74da727fbc0
1 /* go-mmap.c -- functions for calling C mmap functions.
3 Copyright 2023 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 #include "config.h"
9 #include <stdint.h>
10 #include <sys/mman.h>
12 /* The exact C function to call varies between mmap and mmap64, and
13 the size of the off_t argument also varies. Here we provide a
14 function that Go code can call with consistent types. */
16 void *
17 __go_mmap(void *addr, uintptr_t length, int32_t prot, int32_t flags,
18 int32_t fd, uintptr_t offset)
20 return mmap(addr, length, prot, flags, fd, offset);