Commit d22b1a0b authored by Alexander Barkov's avatar Alexander Barkov

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
parent 3c76e0e2
...@@ -28,7 +28,7 @@ filamzip.cpp tabtbl.cpp myutil.cpp ...@@ -28,7 +28,7 @@ filamzip.cpp tabtbl.cpp myutil.cpp
tabutil.cpp tabxcl.cpp taboccur.cpp tabpivot.cpp tabutil.cpp tabxcl.cpp taboccur.cpp tabpivot.cpp
block.h catalog.h checklvl.h colblk.h connect.h csort.h engmsg.h 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 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 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 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 user_connect.h valblk.h value.h xindex.h xobject.h xtable.h
......
...@@ -44,6 +44,7 @@ RCODE CntDeleteRow(PGLOBAL g, PTDB tdbp, bool all); ...@@ -44,6 +44,7 @@ RCODE CntDeleteRow(PGLOBAL g, PTDB tdbp, bool all);
bool CntInfo(PGLOBAL g, PTDB tdbp, PXF info); bool CntInfo(PGLOBAL g, PTDB tdbp, PXF info);
int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
bool *incl, key_part_map *kmap); bool *incl, key_part_map *kmap);
PGLOBAL CntExit(PGLOBAL g);
/***********************************************************************/ /***********************************************************************/
/* Definition of classes XCOLCRT, XIXDEF, XKPDEF, DOXDEF, TDBDOX */ /* Definition of classes XCOLCRT, XIXDEF, XKPDEF, DOXDEF, TDBDOX */
......
...@@ -137,6 +137,7 @@ ...@@ -137,6 +137,7 @@
#include "mycat.h" #include "mycat.h"
#include "myutil.h" #include "myutil.h"
#include "preparse.h" #include "preparse.h"
#include "inihandl.h"
#define PLGXINI "plgcnx.ini" /* Configuration settings file */ #define PLGXINI "plgcnx.ini" /* Configuration settings file */
#define my_strupr(p) my_caseup_str(default_charset_info, (p)); #define my_strupr(p) my_caseup_str(default_charset_info, (p));
...@@ -3252,8 +3253,8 @@ static char *encode(PGLOBAL g, char *cnm) ...@@ -3252,8 +3253,8 @@ static char *encode(PGLOBAL g, char *cnm)
Return 0 if ok Return 0 if ok
*/ */
bool add_field(String *sql, const char *field_name, const char *type, static bool add_field(String *sql, const char *field_name, const char *type,
int len, int dec, uint tm, const char *rem) int len, int dec, uint tm, const char *rem)
{ {
bool error= false; bool error= false;
......
...@@ -29,9 +29,8 @@ ...@@ -29,9 +29,8 @@
//#include <sys/types.h> //#include <sys/types.h>
//#include <memory.h> //#include <memory.h>
#include "my_global.h" #include "my_global.h"
//#include "osutil.h"
#include "global.h" #include "global.h"
#include "inihandl.h"
// The types and variables used locally // The types and variables used locally
//typedef int bool; //typedef int bool;
...@@ -672,7 +671,7 @@ static BOOL PROFILE_DeleteKey(PROFILESECTION* *section, ...@@ -672,7 +671,7 @@ static BOOL PROFILE_DeleteKey(PROFILESECTION* *section,
* *
* Delete all keys from a profile tree. * Delete all keys from a profile tree.
***********************************************************************/ ***********************************************************************/
void PROFILE_DeleteAllKeys(LPCSTR section_name) static void PROFILE_DeleteAllKeys(LPCSTR section_name)
{ {
PROFILESECTION* *section= &CurProfile->section; PROFILESECTION* *section= &CurProfile->section;
...@@ -1038,6 +1037,7 @@ static BOOL PROFILE_SetString(LPCSTR section_name, LPCSTR key_name, ...@@ -1038,6 +1037,7 @@ static BOOL PROFILE_SetString(LPCSTR section_name, LPCSTR key_name,
* Convenience function that turns a string 'xxx, yyy, zzz' into * Convenience function that turns a string 'xxx, yyy, zzz' into
* the 'xxx\0 yyy, zzz' and returns a pointer to the 'yyy, zzz'. * the 'xxx\0 yyy, zzz' and returns a pointer to the 'yyy, zzz'.
***********************************************************************/ ***********************************************************************/
#if 0
char *PROFILE_GetStringItem(char* start) char *PROFILE_GetStringItem(char* start)
{ {
char *lpchX, *lpch; char *lpchX, *lpch;
...@@ -1065,6 +1065,7 @@ char *PROFILE_GetStringItem(char* start) ...@@ -1065,6 +1065,7 @@ char *PROFILE_GetStringItem(char* start)
return NULL; return NULL;
} // end of PROFILE_GetStringItem } // end of PROFILE_GetStringItem
#endif
/********************************************************************** /**********************************************************************
* if allow_section_name_copy is TRUE, allow the copying : * if allow_section_name_copy is TRUE, allow the copying :
...@@ -1132,7 +1133,7 @@ static int PROFILE_GetPrivateProfileString(LPCSTR section, LPCSTR entry, ...@@ -1132,7 +1133,7 @@ static int PROFILE_GetPrivateProfileString(LPCSTR section, LPCSTR entry,
* GetPrivateProfileStringA (KERNEL32.@) * GetPrivateProfileStringA (KERNEL32.@)
***********************************************************************/ ***********************************************************************/
int GetPrivateProfileString(LPCSTR section, LPCSTR entry, LPCSTR def_val, 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, return PROFILE_GetPrivateProfileString(section, entry, def_val,
buffer, len, filename, TRUE); buffer, len, filename, TRUE);
...@@ -1308,7 +1309,8 @@ BOOL WritePrivateProfileSection(LPCSTR section, ...@@ -1308,7 +1309,8 @@ BOOL WritePrivateProfileSection(LPCSTR section,
* Note that when the buffer is big enough then the return value may be any * 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. * 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; DWORD ret = 0;
......
#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__ */
...@@ -32,44 +32,6 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength); ...@@ -32,44 +32,6 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength);
BOOL MessageBeep(uint); BOOL MessageBeep(uint);
unsigned long _filelength(int fd); 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 strupr(PSZ s);
PSZ strlwr(PSZ s); PSZ strlwr(PSZ s);
...@@ -90,12 +52,4 @@ typedef __int64 FILEPOS; ...@@ -90,12 +52,4 @@ typedef __int64 FILEPOS;
#define XSTR(x) ((x)?(x):"<null>") #define XSTR(x) ((x)?(x):"<null>")
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /* __OSUTIL_H__ */ #endif /* __OSUTIL_H__ */
...@@ -41,9 +41,7 @@ ...@@ -41,9 +41,7 @@
#include "tabdos.h" #include "tabdos.h"
#include "tabsys.h" #include "tabsys.h"
#include "tabmul.h" #include "tabmul.h"
#if defined(UNIX) #include "inihandl.h"
#include "osutil.h"
#endif // UNIX
#define CSZ 36 // Column section name length #define CSZ 36 // Column section name length
#define CDZ 256 // Column definition length #define CDZ 256 // Column definition length
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "osutil.h" #include "osutil.h"
#include "global.h" #include "global.h"
#include "plgdbsem.h" #include "plgdbsem.h"
#include "connect.h"
#include "user_connect.h" #include "user_connect.h"
#include "mycat.h" #include "mycat.h"
...@@ -54,11 +55,6 @@ extern int xtrace; ...@@ -54,11 +55,6 @@ extern int xtrace;
/****************************************************************************/ /****************************************************************************/
PCONNECT user_connect::to_users= NULL; PCONNECT user_connect::to_users= NULL;
/****************************************************************************/
/* CONNECT functions called externally. */
/****************************************************************************/
PGLOBAL CntExit(PGLOBAL g);
/* -------------------------- class user_connect -------------------------- */ /* -------------------------- class user_connect -------------------------- */
/****************************************************************************/ /****************************************************************************/
......
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