diff options
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/Versions | 3 | ||||
-rw-r--r-- | libc/misc/madvise.c | 9 | ||||
-rw-r--r-- | libc/misc/sys/cdefs.h | 9 |
3 files changed, 17 insertions, 4 deletions
diff --git a/libc/misc/Versions b/libc/misc/Versions index 7f525eaf5..b2a91473d 100644 --- a/libc/misc/Versions +++ b/libc/misc/Versions @@ -149,4 +149,7 @@ libc { GLIBC_2.16 { __getauxval; getauxval; } + GLIBC_PRIVATE { + __madvise; + } } diff --git a/libc/misc/madvise.c b/libc/misc/madvise.c index 8f1c873c0..4e9681a52 100644 --- a/libc/misc/madvise.c +++ b/libc/misc/madvise.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1994,1995,1996,1997,2000,2007 Free Software Foundation, Inc. +/* Advise system about intentions for a memory region. Stub version. + Copyright (C) 1994-2012 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 @@ -23,11 +24,13 @@ for the region starting at ADDR and extending LEN bytes. */ int -madvise (__ptr_t addr, size_t len, int advice) +__madvise (void *addr, size_t len, int advice) { __set_errno (ENOSYS); return -1; } -libc_hidden_def (madvise) +libc_hidden_def (__madvise) +weak_alias (__madvise, madvise) + stub_warning (madvise) #include <stub-tag.h> diff --git a/libc/misc/sys/cdefs.h b/libc/misc/sys/cdefs.h index b94147efe..fb6c959d9 100644 --- a/libc/misc/sys/cdefs.h +++ b/libc/misc/sys/cdefs.h @@ -320,7 +320,7 @@ /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. */ -#if !defined __cplusplus || __GNUC_PREREQ (4,3) +#if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__ # if defined __GNUC_STDC_INLINE__ || defined __cplusplus # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # define __extern_always_inline \ @@ -329,6 +329,13 @@ # define __extern_inline extern __inline # define __extern_always_inline extern __always_inline # endif +#elif defined __GNUC__ /* C++ and GCC <4.3. */ +# define __extern_inline extern __inline +# define __extern_always_inline \ + extern __always_inline +#else /* Not GCC. */ +# define __extern_inline /* Ignore */ +# define __extern_always_inline /* Ignore */ #endif /* GCC 4.3 and above allow passing all anonymous arguments of an |