Commit fe2a47b2 authored by unknown's avatar unknown

wl1744 - ndb windoze port


ndb/include/ndb_types.h:
  ndb windoze
ndb/src/common/util/version.c:
  ndb windoze
ndb/src/mgmsrv/ConfigInfo.cpp:
  ndb windoze
ndb/src/ndbapi/ndberror.c:
  ndb windoze
parent 4a3e1d1a
...@@ -40,15 +40,17 @@ typedef __SIZE_TYPE__ UintPtr; ...@@ -40,15 +40,17 @@ typedef __SIZE_TYPE__ UintPtr;
#ifdef HAVE_INTTYPES_H #ifdef HAVE_INTTYPES_H
#include <inttypes.h> #include <inttypes.h>
#endif #endif
typedef uintptr_t UintPtr;
#endif
#if defined(WIN32) || defined(NDB_WIN32) #if defined(WIN32) || defined(NDB_WIN32)
typedef unsigned __int64 Uint64; typedef unsigned __int64 Uint64;
typedef signed __int64 Int64; typedef signed __int64 Int64;
typedef Uint32 UintPtr;
typedef UintPtr ssize_t;
#else #else
typedef unsigned long long Uint64; typedef unsigned long long Uint64;
typedef signed long long Int64; typedef signed long long Int64;
typedef uintptr_t UintPtr;
#endif
#endif #endif
#endif #endif
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <ndb_version.h> #include <ndb_version.h>
#include <version.h> #include <version.h>
#include <basestring_vsnprintf.h>
Uint32 getMajor(Uint32 version) { Uint32 getMajor(Uint32 version) {
return (version >> 16) & 0xFF; return (version >> 16) & 0xFF;
...@@ -38,14 +39,14 @@ Uint32 makeVersion(Uint32 major, Uint32 minor, Uint32 build) { ...@@ -38,14 +39,14 @@ Uint32 makeVersion(Uint32 major, Uint32 minor, Uint32 build) {
const char * getVersionString(Uint32 version, const char * status) { const char * getVersionString(Uint32 version, const char * status) {
char buff[100]; char buff[100];
if (status && status[0] != 0) if (status && status[0] != 0)
snprintf(buff, sizeof(buff), basestring_snprintf(buff, sizeof(buff),
"Version %d.%d.%d (%s)", "Version %d.%d.%d (%s)",
getMajor(version), getMajor(version),
getMinor(version), getMinor(version),
getBuild(version), getBuild(version),
status); status);
else else
snprintf(buff, sizeof(buff), basestring_snprintf(buff, sizeof(buff),
"Version %d.%d.%d", "Version %d.%d.%d",
getMajor(version), getMajor(version),
getMinor(version), getMinor(version),
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <mgmapi_config_parameters.h> #include <mgmapi_config_parameters.h>
#include <ndb_limits.h> #include <ndb_limits.h>
#include "InitConfigFileParser.hpp" #include "InitConfigFileParser.hpp"
#include <m_string.h>
#define MAX_LINE_LENGTH 255 #define MAX_LINE_LENGTH 255
#define KEY_INTERNAL 0 #define KEY_INTERNAL 0
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <ndberror.h> #include <ndberror.h>
#include <basestring_vsnprintf.h>
typedef struct ErrorBundle { typedef struct ErrorBundle {
int code; int code;
...@@ -594,7 +595,7 @@ int ndb_error_string(int err_no, char *str, unsigned int size) ...@@ -594,7 +595,7 @@ int ndb_error_string(int err_no, char *str, unsigned int size)
ndberror_update(&error); ndberror_update(&error);
len = len =
snprintf(str, size-1, "%s: %s: %s", error.message, basestring_snprintf(str, size-1, "%s: %s: %s", error.message,
ndberror_status_message(error.status), ndberror_status_message(error.status),
ndberror_classification_message(error.classification)); ndberror_classification_message(error.classification));
str[size-1]= '\0'; str[size-1]= '\0';
......
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