diff options
author | unknown <tomas@mc05.(none)> | 2004-05-13 13:42:36 +0200 |
---|---|---|
committer | unknown <tomas@mc05.(none)> | 2004-05-13 13:42:36 +0200 |
commit | b58eb134bb89c2b4102e9d8d662e2af90e1ace73 (patch) | |
tree | 1d691bfc25dc47262382d9f6cb3b7b95364c8328 /ndb | |
parent | 79f269cb4d342305bc2e34939d881ba210692340 (diff) | |
download | mariadb-git-b58eb134bb89c2b4102e9d8d662e2af90e1ace73.tar.gz |
portability fixes
Diffstat (limited to '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 } |