Commit d7958e9b authored by tomas@mc05.(none)'s avatar tomas@mc05.(none)

portability fixes

parent 77f9069c
......@@ -40,7 +40,6 @@ SHLIBEXT := sl
endif
ifeq ($(NDB_OS), MACOSX)
CCFLAGS_TOP += -DNDBOUT_UINTPTR
SHLIBEXT := dylib
endif
......
......@@ -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
......
......@@ -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
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment