summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@mc05.(none)>2004-05-13 14:38:35 +0200
committerunknown <tomas@mc05.(none)>2004-05-13 14:38:35 +0200
commitd8522613d5395b63d2bd46ee6a0955bac78ed117 (patch)
tree35d81cecabf5daca37ae8be312dafcb0a82b6153
parent218a0220b50174c030e79fb3d9a82bfd21933e37 (diff)
parentdf41e3d55d81d228fcf286d603f158c22eb88bbf (diff)
downloadmariadb-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.mk1
-rw-r--r--ndb/include/ndb_types.h10
-rw-r--r--ndb/src/common/portlib/unix/NdbMem.c12
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
}