* cygwin.din (madvise): Export posix_madvise as madvise.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR. * include/sys/mman.h: Define madvise constants, keep Linux-specific constants undefined. (madvise): Declare.
This commit is contained in:
parent
7971c2a29c
commit
6147b7f8a3
|
@ -1,3 +1,11 @@
|
|||
2011-01-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* cygwin.din (madvise): Export posix_madvise as madvise.
|
||||
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
|
||||
* include/sys/mman.h: Define madvise constants, keep Linux-specific
|
||||
constants undefined.
|
||||
(madvise): Declare.
|
||||
|
||||
2011-01-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (struct part_t): New type.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* version.h -- Cygwin version numbers and accompanying documentation.
|
||||
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
|
@ -397,13 +397,14 @@ details. */
|
|||
cpowf, cproj, cprojf, creal, crealf, csin, csinf, csinh, csinhf,
|
||||
csqrt, csqrtf, ctan, ctanf, ctanh, ctanhf.
|
||||
233: Add TIOCGPGRP, TIOCSPGRP. Export llround, llroundf.
|
||||
234: Export program_invocation_name, program_invocation_short_name
|
||||
234: Export program_invocation_name, program_invocation_short_name.
|
||||
235: Export madvise.
|
||||
*/
|
||||
|
||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||
|
||||
#define CYGWIN_VERSION_API_MAJOR 0
|
||||
#define CYGWIN_VERSION_API_MINOR 234
|
||||
#define CYGWIN_VERSION_API_MINOR 235
|
||||
|
||||
/* There is also a compatibity version number associated with the
|
||||
shared memory regions. It is incremented when incompatible
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* sys/mman.h
|
||||
|
||||
Copyright 1996, 1997, 1998, 2000, 2001, 2003, 2005, 2007 Red Hat, Inc.
|
||||
Copyright 1996, 1997, 1998, 2000, 2001, 2003, 2005, 2007, 2011 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
|
@ -56,6 +56,26 @@ extern "C" {
|
|||
#define POSIX_MADV_WILLNEED 3
|
||||
#define POSIX_MADV_DONTNEED 4
|
||||
|
||||
/*
|
||||
* Flags for madvise. BSD/Linux-specific.
|
||||
*/
|
||||
#define MADV_NORMAL 0
|
||||
#define MADV_SEQUENTIAL 1
|
||||
#define MADV_RANDOM 2
|
||||
#define MADV_WILLNEED 3
|
||||
#define MADV_DONTNEED 4
|
||||
/* Deliberately don't define these Linux-specific flags. An application
|
||||
expecting them to behave as defined would be in for a surprise. */
|
||||
#if 0
|
||||
#define MADV_REMOVE 5
|
||||
#define MADV_DONTFORK 6
|
||||
#define MADV_DOFORK 7
|
||||
#define MADV_HWPOISON 8
|
||||
#define MADV_SOFT_OFFLINE 9
|
||||
#define MADV_MERGEABLE 10
|
||||
#define MADV_UNMERGEABLE 11
|
||||
#endif
|
||||
|
||||
#ifndef __INSIDE_CYGWIN__
|
||||
extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, off_t __off);
|
||||
#endif
|
||||
|
@ -66,6 +86,7 @@ extern int mlock (const void *__addr, size_t __len);
|
|||
extern int munlock (const void *__addr, size_t __len);
|
||||
|
||||
extern int posix_madvise (void *__addr, size_t __len, int __advice);
|
||||
extern int madvise (void *__addr, size_t __len, int __advice);
|
||||
|
||||
extern int shm_open (const char *__name, int __oflag, mode_t __mode);
|
||||
extern int shm_unlink (const char *__name);
|
||||
|
|
Loading…
Reference in New Issue