summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-05-13 14:59:59 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-05-13 14:59:59 +0400
commitd22b1a0b35e794212c92e65f1d7f7d3e108cceef (patch)
treebc3d9724bd32dfa0276a807b124dcbe0e65384fc
parent3c76e0e2ad05229ea1718b6e9c3dce85d75aaa4d (diff)
downloadmariadb-git-d22b1a0b35e794212c92e65f1d7f7d3e108cceef.tar.gz
Fixing a few compilation warnings ("no previous declaration for XXX")
added: storage/connect/inihandl.h modified: storage/connect/CMakeLists.txt storage/connect/connect.h storage/connect/ha_connect.cc storage/connect/inihandl.c storage/connect/osutil.h storage/connect/tabsys.cpp storage/connect/user_connect.cc
-rw-r--r--storage/connect/CMakeLists.txt2
-rw-r--r--storage/connect/connect.h1
-rw-r--r--storage/connect/ha_connect.cc5
-rw-r--r--storage/connect/inihandl.c12
-rw-r--r--storage/connect/inihandl.h54
-rw-r--r--storage/connect/osutil.h46
-rw-r--r--storage/connect/tabsys.cpp4
-rw-r--r--storage/connect/user_connect.cc6
8 files changed, 68 insertions, 62 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index d3663c5eee3..81dd8c77b67 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -28,7 +28,7 @@ filamzip.cpp tabtbl.cpp myutil.cpp
tabutil.cpp tabxcl.cpp taboccur.cpp tabpivot.cpp
block.h catalog.h checklvl.h colblk.h connect.h csort.h engmsg.h
filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h
-global.h ha_connect.h maputil.h msgid.h mycat.h myutil.h os.h
+global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h os.h
osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h
tabdos.h tabfix.h tabfmt.h tabmul.h tabsys.h tabtbl.h tabvct.h
user_connect.h valblk.h value.h xindex.h xobject.h xtable.h
diff --git a/storage/connect/connect.h b/storage/connect/connect.h
index 3fd52d283c6..e81e54776c9 100644
--- a/storage/connect/connect.h
+++ b/storage/connect/connect.h
@@ -44,6 +44,7 @@ RCODE CntDeleteRow(PGLOBAL g, PTDB tdbp, bool all);
bool CntInfo(PGLOBAL g, PTDB tdbp, PXF info);
int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
bool *incl, key_part_map *kmap);
+PGLOBAL CntExit(PGLOBAL g);
/***********************************************************************/
/* Definition of classes XCOLCRT, XIXDEF, XKPDEF, DOXDEF, TDBDOX */
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index a4611c83ffe..214ad8ba049 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -137,6 +137,7 @@
#include "mycat.h"
#include "myutil.h"
#include "preparse.h"
+#include "inihandl.h"
#define PLGXINI "plgcnx.ini" /* Configuration settings file */
#define my_strupr(p) my_caseup_str(default_charset_info, (p));
@@ -3252,8 +3253,8 @@ static char *encode(PGLOBAL g, char *cnm)
Return 0 if ok
*/
-bool add_field(String *sql, const char *field_name, const char *type,
- int len, int dec, uint tm, const char *rem)
+static bool add_field(String *sql, const char *field_name, const char *type,
+ int len, int dec, uint tm, const char *rem)
{
bool error= false;
diff --git a/storage/connect/inihandl.c b/storage/connect/inihandl.c
index 25629b04e60..60b72bd2604 100644
--- a/storage/connect/inihandl.c
+++ b/storage/connect/inihandl.c
@@ -29,9 +29,8 @@
//#include <sys/types.h>
//#include <memory.h>
#include "my_global.h"
-//#include "osutil.h"
#include "global.h"
-
+#include "inihandl.h"
// The types and variables used locally
//typedef int bool;
@@ -672,7 +671,7 @@ static BOOL PROFILE_DeleteKey(PROFILESECTION* *section,
*
* Delete all keys from a profile tree.
***********************************************************************/
-void PROFILE_DeleteAllKeys(LPCSTR section_name)
+static void PROFILE_DeleteAllKeys(LPCSTR section_name)
{
PROFILESECTION* *section= &CurProfile->section;
@@ -1038,6 +1037,7 @@ static BOOL PROFILE_SetString(LPCSTR section_name, LPCSTR key_name,
* Convenience function that turns a string 'xxx, yyy, zzz' into
* the 'xxx\0 yyy, zzz' and returns a pointer to the 'yyy, zzz'.
***********************************************************************/
+#if 0
char *PROFILE_GetStringItem(char* start)
{
char *lpchX, *lpch;
@@ -1065,6 +1065,7 @@ char *PROFILE_GetStringItem(char* start)
return NULL;
} // end of PROFILE_GetStringItem
+#endif
/**********************************************************************
* if allow_section_name_copy is TRUE, allow the copying :
@@ -1132,7 +1133,7 @@ static int PROFILE_GetPrivateProfileString(LPCSTR section, LPCSTR entry,
* GetPrivateProfileStringA (KERNEL32.@)
***********************************************************************/
int GetPrivateProfileString(LPCSTR section, LPCSTR entry, LPCSTR def_val,
- LPSTR buffer, uint len, LPCSTR filename)
+ LPSTR buffer, DWORD len, LPCSTR filename)
{
return PROFILE_GetPrivateProfileString(section, entry, def_val,
buffer, len, filename, TRUE);
@@ -1308,7 +1309,8 @@ BOOL WritePrivateProfileSection(LPCSTR section,
* Note that when the buffer is big enough then the return value may be any
* value between 1 and len-1 (or len in Win95), including len-2.
*/
-DWORD GetPrivateProfileSectionNames(LPSTR buffer, DWORD size, LPCSTR filename)
+static DWORD
+GetPrivateProfileSectionNames(LPSTR buffer, DWORD size, LPCSTR filename)
{
DWORD ret = 0;
diff --git a/storage/connect/inihandl.h b/storage/connect/inihandl.h
new file mode 100644
index 00000000000..7f6fcb1f582
--- /dev/null
+++ b/storage/connect/inihandl.h
@@ -0,0 +1,54 @@
+#ifndef __INIHANDL_H__
+#define __INIHANDL_H__
+
+#if defined(UNIX) || defined(UNIV_LINUX)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void PROFILE_Close(LPCSTR filename);
+
+int GetPrivateProfileString(
+ LPCTSTR lpAppName, // section name
+ LPCTSTR lpKeyName, // key name
+ LPCTSTR lpDefault, // default string
+ LPTSTR lpReturnedString, // destination buffer
+ DWORD nSize, // size of destination buffer
+ LPCTSTR lpFileName // initialization file name
+ );
+
+uint GetPrivateProfileInt(
+ LPCTSTR lpAppName, // section name
+ LPCTSTR lpKeyName, // key name
+ INT nDefault, // return value if key name not found
+ LPCTSTR lpFileName // initialization file name
+ );
+
+BOOL WritePrivateProfileString(
+ LPCTSTR lpAppName, // section name
+ LPCTSTR lpKeyName, // key name
+ LPCTSTR lpString, // string to add
+ LPCTSTR lpFileName // initialization file
+ );
+
+int GetPrivateProfileSection(
+ LPCTSTR lpAppName, // section name
+ LPTSTR lpReturnedString, // return buffer
+ DWORD nSize, // size of return buffer
+ LPCTSTR lpFileName // initialization file name
+ );
+
+BOOL WritePrivateProfileSection(
+ LPCTSTR lpAppName, // section name
+ LPCTSTR lpString, // data
+ LPCTSTR lpFileName // file name
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* defined(UNIX) */
+
+#endif /* __INIHANDL_H__ */
diff --git a/storage/connect/osutil.h b/storage/connect/osutil.h
index 440373dd7a1..148a22321f4 100644
--- a/storage/connect/osutil.h
+++ b/storage/connect/osutil.h
@@ -32,44 +32,6 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength);
BOOL MessageBeep(uint);
unsigned long _filelength(int fd);
-void PROFILE_Close(LPCSTR filename);
-
-int GetPrivateProfileString(
- LPCTSTR lpAppName, // section name
- LPCTSTR lpKeyName, // key name
- LPCTSTR lpDefault, // default string
- LPTSTR lpReturnedString, // destination buffer
- int nSize, // size of destination buffer
- LPCTSTR lpFileName // initialization file name
- );
-
-uint GetPrivateProfileInt(
- LPCTSTR lpAppName, // section name
- LPCTSTR lpKeyName, // key name
- INT nDefault, // return value if key name not found
- LPCTSTR lpFileName // initialization file name
- );
-
-BOOL WritePrivateProfileString(
- LPCTSTR lpAppName, // section name
- LPCTSTR lpKeyName, // key name
- LPCTSTR lpString, // string to add
- LPCTSTR lpFileName // initialization file
- );
-
-int GetPrivateProfileSection(
- LPCTSTR lpAppName, // section name
- LPTSTR lpReturnedString, // return buffer
- int nSize, // size of return buffer
- LPCTSTR lpFileName // initialization file name
- );
-
-BOOL WritePrivateProfileSection(
- LPCTSTR lpAppName, // section name
- LPCTSTR lpString, // data
- LPCTSTR lpFileName // file name
- );
-
PSZ strupr(PSZ s);
PSZ strlwr(PSZ s);
@@ -90,12 +52,4 @@ typedef __int64 FILEPOS;
#define XSTR(x) ((x)?(x):"<null>")
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
#endif /* __OSUTIL_H__ */
diff --git a/storage/connect/tabsys.cpp b/storage/connect/tabsys.cpp
index 705bb79bcb4..6434e011882 100644
--- a/storage/connect/tabsys.cpp
+++ b/storage/connect/tabsys.cpp
@@ -41,9 +41,7 @@
#include "tabdos.h"
#include "tabsys.h"
#include "tabmul.h"
-#if defined(UNIX)
-#include "osutil.h"
-#endif // UNIX
+#include "inihandl.h"
#define CSZ 36 // Column section name length
#define CDZ 256 // Column definition length
diff --git a/storage/connect/user_connect.cc b/storage/connect/user_connect.cc
index 3fd3ac43e32..d85f11d1950 100644
--- a/storage/connect/user_connect.cc
+++ b/storage/connect/user_connect.cc
@@ -43,6 +43,7 @@
#include "osutil.h"
#include "global.h"
#include "plgdbsem.h"
+#include "connect.h"
#include "user_connect.h"
#include "mycat.h"
@@ -54,11 +55,6 @@ extern int xtrace;
/****************************************************************************/
PCONNECT user_connect::to_users= NULL;
-/****************************************************************************/
-/* CONNECT functions called externally. */
-/****************************************************************************/
-PGLOBAL CntExit(PGLOBAL g);
-
/* -------------------------- class user_connect -------------------------- */
/****************************************************************************/