Some windows cleanups - thanks to Marco Atzeri for the patch
cmr=v1.7.5:reviewer=miked This commit was SVN r30720.
Этот коммит содержится в:
родитель
4e1c07cbf2
Коммит
f7abaee8c4
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -14,16 +15,12 @@
|
||||
|
||||
#include <stddef.h> /* include for ptrdiff_t */
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# define OSHMEM_COMPLEX_TYPE(type)
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
# include <complex>
|
||||
# define OSHMEM_COMPLEX_TYPE(type) std::complex<type>
|
||||
#else
|
||||
# if defined(c_plusplus) || defined(__cplusplus)
|
||||
# include <complex>
|
||||
# define OSHMEM_COMPLEX_TYPE(type) std::complex<type>
|
||||
# else
|
||||
# include <complex.h>
|
||||
# define OSHMEM_COMPLEX_TYPE(type) type complex
|
||||
# endif
|
||||
# include <complex.h>
|
||||
# define OSHMEM_COMPLEX_TYPE(type) type complex
|
||||
#endif
|
||||
|
||||
|
||||
@ -35,18 +32,10 @@
|
||||
|
||||
|
||||
#ifndef OSHMEM_DECLSPEC
|
||||
# if defined(WIN32) || defined(_WIN32)
|
||||
# if defined(OSHMEM_IMPORTS)
|
||||
# define OSHMEM_DECLSPEC __declspec(dllimport)
|
||||
# else
|
||||
# define OSHMEM_DECLSPEC
|
||||
# endif /* defined(OSHMEM_IMPORTS) */
|
||||
# if defined(OPAL_C_HAVE_VISIBILITY) && (OPAL_C_HAVE_VISIBILITY == 1)
|
||||
# define OSHMEM_DECLSPEC __attribute__((visibility("default")))
|
||||
# else
|
||||
# if defined(OPAL_C_HAVE_VISIBILITY) && (OPAL_C_HAVE_VISIBILITY == 1)
|
||||
# define OSHMEM_DECLSPEC __attribute__((visibility("default")))
|
||||
# else
|
||||
# define OSHMEM_DECLSPEC
|
||||
# endif
|
||||
# define OSHMEM_DECLSPEC
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -21,6 +22,7 @@
|
||||
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined(MPAGE_ENABLE) && (MPAGE_ENABLE > 0)
|
||||
#include <infiniband/verbs.h>
|
||||
@ -222,7 +224,7 @@ static int _shm_attach(map_segment_t *s, size_t size, int use_hp, int do_rmid)
|
||||
|
||||
shm_context = use_hp;
|
||||
|
||||
flags = IPC_CREAT | IPC_EXCL | SHM_R | SHM_W;
|
||||
flags = IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR;;
|
||||
#if defined (SHM_HUGETLB)
|
||||
flags |= (use_hp ? SHM_HUGETLB : 0);
|
||||
#endif
|
||||
|
@ -482,31 +482,6 @@ MAX_RELEASE_CHECK_RATE default: 255 unless not DL_HAVE_MMAP
|
||||
improvement at the expense of carrying around more memory.
|
||||
*/
|
||||
|
||||
#ifndef WIN32
|
||||
#ifdef _WIN32
|
||||
#define WIN32 1
|
||||
#endif /* _WIN32 */
|
||||
#endif /* WIN32 */
|
||||
#ifdef WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define DL_HAVE_MMAP 1
|
||||
#define HAVE_MORECORE 0
|
||||
#define LACKS_UNISTD_H
|
||||
#define LACKS_SYS_PARAM_H
|
||||
#define LACKS_SYS_MMAN_H
|
||||
#define LACKS_STRING_H
|
||||
#define LACKS_STRINGS_H
|
||||
#define LACKS_SYS_TYPES_H
|
||||
#define LACKS_ERRNO_H
|
||||
#define MALLOC_FAILURE_ACTION
|
||||
#ifdef _WIN32_WCE /* WINCE reportedly does not clear */
|
||||
#define MMAP_CLEARS 0
|
||||
#else
|
||||
#define MMAP_CLEARS 1
|
||||
#endif /* _WIN32_WCE */
|
||||
#endif /* WIN32 */
|
||||
|
||||
#if defined(DARWIN) || defined(_DARWIN)
|
||||
/* Mac OSX docs advise not to use sbrk; it seems better to use mmap */
|
||||
#ifndef HAVE_MORECORE
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user