musl/include/sys/mman.h
Rich Felker 3b94daba71 _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE
this is ugly and stupid, but now that the *64 symbol names exist, a
lot of broken GNU software detects them in configure, then either
breaks during build due to missing off64_t definition, or attempts to
compile without function declarations/prototypes. "fixing" it here is
easier than telling everyone to add yet another feature test macro to
their builds.
2012-06-04 08:03:56 -04:00

48 lines
889 B
C

#ifndef _SYS_MMAN_H
#define _SYS_MMAN_H
#ifdef __cplusplus
extern "C" {
#endif
#define __NEED_mode_t
#define __NEED_size_t
#define __NEED_off_t
#include <bits/alltypes.h>
#include <bits/mman.h>
void *mmap (void *, size_t, int, int, int, off_t);
int munmap (void *, size_t);
int mprotect (void *, size_t, int);
int msync (void *, size_t, int);
int posix_madvise (void *, size_t, int);
int mlock (const void *, size_t);
int munlock (const void *, size_t);
int mlockall (int);
int munlockall (void);
#ifdef _GNU_SOURCE
void *mremap (void *, size_t, size_t, int, ...);
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
int madvise (void *, size_t, int);
#endif
int shm_open (const char *, int, mode_t);
int shm_unlink (const char *);
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
#define mmap64 mmap
#define off64_t off_t
#endif
#ifdef __cplusplus
}
#endif
#endif