Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2c6bee6a
Commit
2c6bee6a
authored
May 13, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portability fixes and some comments
parent
d8522613
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
19 deletions
+36
-19
ndb/include/portlib/PortDefs.h
ndb/include/portlib/PortDefs.h
+1
-1
ndb/src/client/odbc/common/common.hpp
ndb/src/client/odbc/common/common.hpp
+1
-1
ndb/src/common/portlib/unix/NdbThread.c
ndb/src/common/portlib/unix/NdbThread.c
+3
-4
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+6
-4
ndb/src/kernel/ndb-main/Main.cpp
ndb/src/kernel/ndb-main/Main.cpp
+3
-3
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+22
-6
No files found.
ndb/include/portlib/PortDefs.h
View file @
2c6bee6a
...
...
@@ -49,7 +49,7 @@ int getopt(int, char **, char *opts);
#endif // NDB_WIN32
#ifdef NDB_ALPHA
#ifdef NDB_GCC
#ifdef NDB_GCC
// only for NDB_ALPHA
extern
int
gnuShouldNotUseRPCC
();
#define RPCC() gnuShouldNotUseRPCC();
#else
...
...
ndb/src/client/odbc/common/common.hpp
View file @
2c6bee6a
...
...
@@ -19,7 +19,7 @@
// misc defs
#ifdef NDB_GCC
#ifdef NDB_GCC
// only for odbc
#define PRINTFLIKE(i,j) __attribute__ ((format (printf, i, j)))
#else
#define PRINTFLIKE(i,j)
...
...
ndb/src/common/portlib/unix/NdbThread.c
View file @
2c6bee6a
...
...
@@ -21,6 +21,7 @@
#define MAX_THREAD_NAME 16
//#define USE_PTHREAD_EXTRAS
struct
NdbThread
{
...
...
@@ -52,11 +53,9 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
pthread_attr_init
(
&
thread_attr
);
pthread_attr_setstacksize
(
&
thread_attr
,
thread_stack_size
);
#if defined NDB_SOLARIS
#if !defined NDB_SOLARIS6
#ifdef USE_PTHREAD_EXTRAS
/* Guard stack overflow with a 2k databuffer */
pthread_attr_setguardsize
(
&
thread_attr
,
2048
);
#endif
#endif
pthread_attr_setdetachstate
(
&
thread_attr
,
PTHREAD_CREATE_JOINABLE
);
...
...
@@ -104,7 +103,7 @@ void NdbThread_Exit(int status)
int
NdbThread_SetConcurrencyLevel
(
int
level
)
{
#if
ndef NDB_SOLARIS6
#if
def USE_PTHREAD_EXTRAS
return
pthread_setconcurrency
(
level
);
#else
return
0
;
...
...
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
2c6bee6a
...
...
@@ -17,7 +17,8 @@
/**
* O_DIRECT
*/
#ifdef NDB_LINUX
#if 0
//#ifdef NDB_LINUX
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
...
...
@@ -34,12 +35,14 @@
#include <NdbThread.h>
#include <signaldata/FsOpenReq.hpp>
#ifdef NDB_LINUX
#if 0
#ifdef HAVE_PREAD
// This is for pread and pwrite
#ifndef __USE_UNIX98
#define __USE_UNIX98
#endif
#endif
#endif
#if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE
#else
...
...
@@ -343,11 +346,10 @@ void AsyncFile::openReq(Request* request)
}
#if 0
#if NDB_LINUX
//
#if NDB_LINUX
if(Global_useO_DIRECT){
new_flags |= O_DIRECT;
}
#endif
#endif
switch
(
flags
&
0x3
){
...
...
ndb/src/kernel/ndb-main/Main.cpp
View file @
2c6bee6a
...
...
@@ -33,7 +33,7 @@
#include <EventLogger.hpp>
#include <NodeState.hpp>
#if defined NDB_SOLARIS
#if defined NDB_SOLARIS
// ok
#include <sys/processor.h> // For system informatio
#endif
...
...
@@ -199,7 +199,7 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
}
RegCloseKey
(
hKey
);
}
#elif defined NDB_SOLARIS
#elif defined NDB_SOLARIS
// ok
// Search for at max 16 processors among the first 256 processor ids
processor_info_t
pinfo
;
memset
(
&
pinfo
,
0
,
sizeof
(
pinfo
));
int
pid
=
0
;
...
...
@@ -213,7 +213,7 @@ systemInfo(const Configuration & config, const LogLevel & logLevel){
if
(
logLevel
.
getLogLevel
(
LogLevel
::
llStartUp
)
>
0
){
g_eventLogger
.
info
(
"NDB Cluster -- DB node %d"
,
globalData
.
ownId
);
g_eventLogger
.
info
(
"%s --"
,
NDB_VERSION_STRING
);
#ifdef NDB_SOLARIS
#ifdef NDB_SOLARIS
// ok
g_eventLogger
.
info
(
"NDB is running on a machine with %d processor(s) at %d MHz"
,
processor
,
speed
);
#endif
...
...
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
2c6bee6a
...
...
@@ -30,10 +30,6 @@
#include "MgmtErrorReporter.hpp"
#include "CpcClient.hpp"
#ifdef NDB_SOLARIS // XXX fix me
static
char
*
strsep
(
char
**
x
,
const
char
*
y
)
{
return
0
;
}
#endif
/*****************************************************************************
* HELP
...
...
@@ -1865,17 +1861,36 @@ CommandInterpreter::executeRep(char* parameters)
* CPC
*****************************************************************************/
#if 0
#if 0
//#ifdef NDB_SOLARIS // XXX fix me
static char* strsep(char** x, const char* y) { return 0; }
#endif
// Note this code has not been verified
#if 0
static char * my_strsep(char **stringp, const char *delim)
{
char *tmp= *stringp;
if (tmp == 0)
return 0;
*stringp = strtok(tmp, delim);
return tmp;
}
#endif
void
CommandInterpreter::executeCpc(char *parameters)
{
char *host_str = NULL, *port_str = NULL, *end;
long port = 1234; /* XXX */
while
((
host_str
=
strsep
(
&
parameters
,
"
\t
:"
))
!=
NULL
&&
while((host_str =
my_
strsep(¶meters, " \t:")) != NULL &&
host_str[0] == '\0');
if(parameters && parameters[0] != '\0') {
while
((
port_str
=
strsep
(
&
parameters
,
"
\t
:"
))
!=
NULL
&&
while((port_str =
my_
strsep(¶meters, " \t:")) != NULL &&
port_str[0] == '\0');
errno = 0;
...
...
@@ -1944,6 +1959,7 @@ CommandInterpreter::executeCpc(char *parameters)
<< endl;
return;
}
#endif
#if 0
static
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment