add configure check for Solaris Legacy munmap prototype
This commit was SVN r24839.
Этот коммит содержится в:
родитель
cc0f93afca
Коммит
8c0af7838a
@ -10,7 +10,7 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved.
|
# Copyright (c) 2007-2011 Oracle and/or its affiliates. All rights reserved.
|
||||||
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
@ -81,6 +81,18 @@ AC_DEFUN([MCA_opal_memory_malloc_solaris_CONFIG],[
|
|||||||
AS_IF([test "$memory_malloc_solaris_happy" = "yes"],
|
AS_IF([test "$memory_malloc_solaris_happy" = "yes"],
|
||||||
[memory_malloc_solaris_WRAPPER_EXTRA_LIBS="$memory_malloc_solaris_LIBS"])
|
[memory_malloc_solaris_WRAPPER_EXTRA_LIBS="$memory_malloc_solaris_LIBS"])
|
||||||
|
|
||||||
|
# There is a difference in the munmap prototypes for different
|
||||||
|
# Solaris versions. So determine whether we are to use Legacy
|
||||||
|
# S10 or later prototypes.
|
||||||
|
AC_MSG_CHECKING([for Solaris Legacy MUNMAP])
|
||||||
|
AC_TRY_COMPILE([#include <sys/mman.h>
|
||||||
|
char *addr;
|
||||||
|
extern int munmap(caddr_t addr, size_t len);],
|
||||||
|
[],
|
||||||
|
[AC_DEFINE_UNQUOTED([USE_SOLARIS_LEGACY_MUNMAP_PROTOTYPE],
|
||||||
|
1,[memory_malloc_solaris_munmap define USE_LEGACY_MUNMAP_PROTOTYPE])],
|
||||||
|
[AC_MSG_RESULT([no])])
|
||||||
|
|
||||||
AS_IF([test "$memory_malloc_solaris_happy" = "no" -a \
|
AS_IF([test "$memory_malloc_solaris_happy" = "no" -a \
|
||||||
"$memory_malloc_solaris_should_use" = "1"],
|
"$memory_malloc_solaris_should_use" = "1"],
|
||||||
[AC_MSG_ERROR([malloc_solaris memory management requested but not available. Aborting.])])
|
[AC_MSG_ERROR([malloc_solaris memory management requested but not available. Aborting.])])
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2007-2008 Sun Microsystems, Inc. All rights reserved.
|
* Copyright (c) 2007-2011 Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -97,8 +97,15 @@ opal_memory_malloc_open(void)
|
|||||||
* the syscall, and if that doesn't work, try looking in the dynamic
|
* the syscall, and if that doesn't work, try looking in the dynamic
|
||||||
* libc.
|
* libc.
|
||||||
*/
|
*/
|
||||||
|
#if defined(USE_SOLARIS_LEGACY_MUNMAP_PROTOTYPE)
|
||||||
|
/* We are compiling using S10 so use its munmap prototype */
|
||||||
int
|
int
|
||||||
munmap(caddr_t addr, size_t len)
|
munmap(caddr_t addr, size_t len)
|
||||||
|
#else
|
||||||
|
/* From S11 on forward munmap's addr is void * */
|
||||||
|
int
|
||||||
|
munmap(void *addr, size_t len)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#if !defined(HAVE___MUNMAP) && \
|
#if !defined(HAVE___MUNMAP) && \
|
||||||
!defined(HAVE_SYSCALL) && defined(HAVE_DLSYM)
|
!defined(HAVE_SYSCALL) && defined(HAVE_DLSYM)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user