summaryrefslogtreecommitdiff
path: root/ndb/src/common
diff options
context:
space:
mode:
authortomas@mc05.(none) <>2004-05-12 06:24:12 +0200
committertomas@mc05.(none) <>2004-05-12 06:24:12 +0200
commite2fd02e494104d2f3bc03384fab50950289b9351 (patch)
tree83e35cb392312ebf8591779828136965f605265e /ndb/src/common
parent3a880e3aacf5c1cbd325355867e2969eb588dadd (diff)
downloadmariadb-git-e2fd02e494104d2f3bc03384fab50950289b9351.tar.gz
portability/autoconf fixes and removed warnings
Diffstat (limited to 'ndb/src/common')
-rw-r--r--ndb/src/common/editline/editline.c4
-rw-r--r--ndb/src/common/mgmcommon/ConfigRetriever.cpp1
-rw-r--r--ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp1
-rw-r--r--ndb/src/common/portlib/unix/NdbCondition.c1
-rw-r--r--ndb/src/common/portlib/unix/NdbDaemon.c15
-rw-r--r--ndb/src/common/portlib/unix/NdbHost.c2
-rw-r--r--ndb/src/common/util/File.cpp8
-rw-r--r--ndb/src/common/util/getarg.c2
-rw-r--r--ndb/src/common/util/strlcat.c1
-rw-r--r--ndb/src/common/util/strlcpy.c5
10 files changed, 16 insertions, 24 deletions
diff --git a/ndb/src/common/editline/editline.c b/ndb/src/common/editline/editline.c
index 0529d18b952..1e4c1ecba76 100644
--- a/ndb/src/common/editline/editline.c
+++ b/ndb/src/common/editline/editline.c
@@ -19,10 +19,10 @@
**
** Main editing routines for editline library.
*/
+#include <ndb_global.h>
+
#include "editline_internal.h"
#include <signal.h>
-#include <ctype.h>
-#include <unistd.h>
/*
** Manifest constants.
diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
index ef6861ef291..04dc5466bbc 100644
--- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp
+++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
@@ -16,7 +16,6 @@
#include <ndb_global.h>
#include <ndb_version.h>
-#include <sys/stat.h>
#include <ConfigRetriever.hpp>
diff --git a/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp b/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp
index f5d0c6a0a4c..b1d84131810 100644
--- a/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp
+++ b/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp
@@ -18,7 +18,6 @@
#include <ndb_global.h>
-#include <sys/mman.h>
#include <NdbOut.hpp>
#include <NdbThread.h>
diff --git a/ndb/src/common/portlib/unix/NdbCondition.c b/ndb/src/common/portlib/unix/NdbCondition.c
index 9615e107d0c..1d229bdcdef 100644
--- a/ndb/src/common/portlib/unix/NdbCondition.c
+++ b/ndb/src/common/portlib/unix/NdbCondition.c
@@ -61,7 +61,6 @@ NdbCondition_Wait(struct NdbCondition* p_cond,
return result;
}
-#include <time.h>
int
NdbCondition_WaitTimeout(struct NdbCondition* p_cond,
NdbMutex* p_mutex,
diff --git a/ndb/src/common/portlib/unix/NdbDaemon.c b/ndb/src/common/portlib/unix/NdbDaemon.c
index fbe684598f2..6eb319e1fcf 100644
--- a/ndb/src/common/portlib/unix/NdbDaemon.c
+++ b/ndb/src/common/portlib/unix/NdbDaemon.c
@@ -19,15 +19,13 @@
#define NdbDaemon_ErrorSize 500
#if defined(NDB_LINUX) || defined(NDB_SOLARIS)
+ /* XXX fix other unixes */
long NdbDaemon_DaemonPid;
int NdbDaemon_ErrorCode;
char NdbDaemon_ErrorText[NdbDaemon_ErrorSize];
-#endif
int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
{
- /* XXX fix other unixes */
-#if defined(NDB_LINUX) || defined(NDB_SOLARIS)
int lockfd = -1, logfd = -1, n;
char buf[64];
@@ -129,10 +127,19 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
dup2(logfd, 2);
close(logfd);
}
-#endif
/* Success */
return 0;
}
+#else
+int
+NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
+{
+ /* Fail */
+ snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize,
+ "Daemon mode not implemented");
+ return -1;
+}
+#endif
#ifdef NDB_DAEMON_TEST
diff --git a/ndb/src/common/portlib/unix/NdbHost.c b/ndb/src/common/portlib/unix/NdbHost.c
index 8d2a23fccda..4749bb39ea7 100644
--- a/ndb/src/common/portlib/unix/NdbHost.c
+++ b/ndb/src/common/portlib/unix/NdbHost.c
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <ndb_global.h>
#include "NdbHost.h"
-#include <unistd.h>
int NdbHost_GetHostName(char* buf)
{
diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp
index ccd6ba24916..22d262a0d27 100644
--- a/ndb/src/common/util/File.cpp
+++ b/ndb/src/common/util/File.cpp
@@ -14,13 +14,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <File.hpp>
-
-#include <sys/stat.h>
+#include <ndb_global.h>
-#if defined NDB_OSE || defined NDB_SOFTOSE
-#include <unistd.h>
-#endif
+#include <File.hpp>
#include <NdbOut.hpp>
diff --git a/ndb/src/common/util/getarg.c b/ndb/src/common/util/getarg.c
index 136965ad89c..ae016746987 100644
--- a/ndb/src/common/util/getarg.c
+++ b/ndb/src/common/util/getarg.c
@@ -34,8 +34,6 @@
#include <ndb_global.h>
-#include <time.h>
-#include <ctype.h>
#include "getarg.h"
#define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag)
diff --git a/ndb/src/common/util/strlcat.c b/ndb/src/common/util/strlcat.c
index 3da47dee6f5..aa282abe48d 100644
--- a/ndb/src/common/util/strlcat.c
+++ b/ndb/src/common/util/strlcat.c
@@ -32,7 +32,6 @@
*/
#include <ndb_global.h>
-#include <ndb_types.h>
/* RCSID("$KTH: strlcat.c,v 1.1 2000/08/16 01:23:47 lha Exp $"); */
diff --git a/ndb/src/common/util/strlcpy.c b/ndb/src/common/util/strlcpy.c
index 70233e3e239..97cff177d48 100644
--- a/ndb/src/common/util/strlcpy.c
+++ b/ndb/src/common/util/strlcpy.c
@@ -32,16 +32,11 @@
*/
#include <ndb_global.h>
-#include <ndb_types.h>
/* RCSID("$KTH: strlcpy.c,v 1.1 2000/08/16 01:23:48 lha Exp $"); */
#ifndef HAVE_STRLCPY
-#ifdef NDB_WIN32
-#include <string.h>
-#endif
-
size_t
strlcpy (char *dst, const char *src, size_t dst_sz)
{