diff options
author | unknown <tomas@mc05.(none)> | 2004-05-13 14:38:35 +0200 |
---|---|---|
committer | unknown <tomas@mc05.(none)> | 2004-05-13 14:38:35 +0200 |
commit | d8522613d5395b63d2bd46ee6a0955bac78ed117 (patch) | |
tree | 35d81cecabf5daca37ae8be312dafcb0a82b6153 | |
parent | 218a0220b50174c030e79fb3d9a82bfd21933e37 (diff) | |
parent | df41e3d55d81d228fcf286d603f158c22eb88bbf (diff) | |
download | mariadb-git-d8522613d5395b63d2bd46ee6a0955bac78ed117.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mc05.(none):/space/tomas/mysql-4.1-ndb
-rw-r--r-- | ndb/Defs.mk | 1 | ||||
-rw-r--r-- | ndb/include/ndb_types.h | 10 | ||||
-rw-r--r-- | ndb/src/common/portlib/unix/NdbMem.c | 12 |
3 files changed, 14 insertions, 9 deletions
diff --git a/ndb/Defs.mk b/ndb/Defs.mk index cf891caa5c2..ac4507562fd 100644 --- a/ndb/Defs.mk +++ b/ndb/Defs.mk @@ -40,7 +40,6 @@ SHLIBEXT := sl endif ifeq ($(NDB_OS), MACOSX) -CCFLAGS_TOP += -DNDBOUT_UINTPTR SHLIBEXT := dylib endif diff --git a/ndb/include/ndb_types.h b/ndb/include/ndb_types.h index 166368b99c5..5e7b952cfc5 100644 --- a/ndb/include/ndb_types.h +++ b/ndb/include/ndb_types.h @@ -18,8 +18,8 @@ * @file ndb_types.h */ -#ifndef SYS_TYPES_H -#define SYS_TYPES_H +#ifndef NDB_TYPES_H +#define NDB_TYPES_H typedef char Int8; typedef unsigned char Uint8; @@ -33,7 +33,13 @@ typedef unsigned int UintR; #ifdef __SIZE_TYPE__ typedef __SIZE_TYPE__ UintPtr; #else +#include <my_config.h> +#ifdef HAVE_STDINT_H #include <stdint.h> +#endif +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#endif typedef uintptr_t UintPtr; #endif diff --git a/ndb/src/common/portlib/unix/NdbMem.c b/ndb/src/common/portlib/unix/NdbMem.c index ce422f45a9d..0b06e5b23f1 100644 --- a/ndb/src/common/portlib/unix/NdbMem.c +++ b/ndb/src/common/portlib/unix/NdbMem.c @@ -54,18 +54,18 @@ void NdbMem_Free(void* ptr) int NdbMem_MemLockAll(){ -#ifndef HAVE_MLOCKALL - return -1; -#else +#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) return mlockall(MCL_CURRENT); +#else + return -1; #endif } int NdbMem_MemUnlockAll(){ -#ifndef HAVE_MLOCKALL - return -1; -#else +#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) return munlockall(); +#else + return -1; #endif } |