#include "pgapifunc.h"
ColumnInfoClass *
-CI_Constructor()
+CI_Constructor(void)
{
ColumnInfoClass *rv;
}
}
-static ConnectionClass *CC_alloc()
+static ConnectionClass *
+CC_alloc(void)
{
return (ConnectionClass *) calloc(sizeof(ConnectionClass), 1);
}
#ifdef HAVE_LOCALE_H
static char *current_locale = NULL;
static char *current_decimal_point = NULL;
-static void current_numeric_locale()
+static void current_numeric_locale(void)
{
char *loc = setlocale(LC_NUMERIC, NULL);
if (NULL == current_locale || 0 != stricmp(loc, current_locale))
#ifdef _HANDLE_ENLIST_IN_DTC_
#define INI_XAOPT "XaOpt"
-const char *GetXaLibPath();
+const char *GetXaLibPath(void);
#endif /* _HANDLE_ENLIST_IN_DTC_ */
/* Bit representaion for abbreviated connection strings */
#define BIT_LFCONVERSION (1L)
pthread_mutex_t common_lcs;
#endif /* WIN_MULTITHREAD_SUPPORT */
-void shortterm_common_lock()
+void shortterm_common_lock(void)
{
ENTER_COMMON_CS;
}
-void shortterm_common_unlock()
+void shortterm_common_unlock(void)
{
LEAVE_COMMON_CS;
}
-int getConnCount()
+int getConnCount(void)
{
return conns_count;
}
-ConnectionClass * const *getConnList()
+ConnectionClass * const *getConnList(void)
{
return conns;
}
strcpy((char *) szSqlState, EN_is_odbc3(env) ? ver3str : ver2str);
}
-PG_ErrorInfo *ER_Constructor(SDWORD errnumber, const char *msg)
+PG_ErrorInfo *
+ER_Constructor(SDWORD errnumber, const char *msg)
{
PG_ErrorInfo *error;
ssize_t aladd, errsize;
free(self);
}
-PG_ErrorInfo *ER_Dup(const PG_ErrorInfo *self)
+PG_ErrorInfo *
+ER_Dup(const PG_ErrorInfo *self)
{
PG_ErrorInfo *new;
Int4 alsize;
char EN_add_connection(EnvironmentClass *self, ConnectionClass *conn);
char EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn);
void EN_log_error(const char *func, char *desc, EnvironmentClass *self);
-int getConnCount();
-ConnectionClass * const *getConnList();
+int getConnCount(void);
+ConnectionClass * const *getConnList(void);
#define EN_OV_ODBC2 1L
#define EN_CONN_POOLING (1L<<1)
#define DELETE_COMMON_CS
#endif /* WIN_MULTITHREAD_SUPPORT */
-void shortterm_common_lock();
-void shortterm_common_unlock();
+void shortterm_common_lock(void);
+void shortterm_common_unlock(void);
#ifdef __cplusplus
}
#endif
#endif /* _HANDLE_ENLIST_IN_DTC_ */
#if defined(WIN_DYN_LOAD)
-BOOL SSLLIB_check()
+BOOL SSLLIB_check(void)
{
extern HINSTANCE s_hModule;
HMODULE hmodule = NULL;
return (NULL != hmodule);
}
#else
-BOOL SSLLIB_check()
+BOOL SSLLIB_check(void)
{
return TRUE;
}
LEAVE_MYLOG_CS;
GENERAL_ERRNO_SET(gerrno);
}
-static void mylog_initialize()
+static void mylog_initialize(void)
{
INIT_MYLOG_CS;
mylog_on = force_log;
}
-static void mylog_finalize()
+static void mylog_finalize(void)
{
mylog_on = 0;
if (MLOGFP)
DELETE_MYLOG_CS;
}
#else
-static void mylog_initialize() {}
-static void mylog_finalize() {}
+static void mylog_initialize(void) {}
+static void mylog_finalize(void) {}
#endif /* MY_LOG */
LEAVE_QLOG_CS;
GENERAL_ERRNO_SET(gerrno);
}
-static void qlog_initialize()
+static void qlog_initialize(void)
{
INIT_QLOG_CS;
qlog_on = force_log;
}
-static void qlog_finalize()
+static void qlog_finalize(void)
{
qlog_on = 0;
if (QLOGFP)
DELETE_QLOG_CS;
}
#else
-static void qlog_initialize() {}
-static void qlog_finalize() {}
+static void qlog_initialize(void) {}
+static void qlog_finalize(void) {}
#endif /* Q_LOG */
-void InitializeLogging()
+void InitializeLogging(void)
{
char dir[PATH_MAX];
qlog_initialize();
}
-void FinalizeLogging()
+void FinalizeLogging(void)
{
mylog_finalize();
qlog_finalize();
int get_qlog(void);
int get_mylog(void);
-void InitializeLogging();
-void FinalizeLogging();
+void InitializeLogging(void);
+void FinalizeLogging(void);
#ifdef __cplusplus
}
#endif
static int exepgm = 0;
-BOOL isMsAccess() {return 1 == exepgm;}
-BOOL isMsQuery() {return 2 == exepgm;}
-BOOL isSqlServr() {return 3 == exepgm;}
+BOOL isMsAccess(void) {return 1 == exepgm;}
+BOOL isMsQuery(void) {return 2 == exepgm;}
+BOOL isSqlServr(void) {return 3 == exepgm;}
GLOBAL_VALUES globals;
#define DRIVER_FILE_NAME "psqlodbca.so"
#endif
#endif /* WIN32 */
-BOOL isMsAccess();
-BOOL isMsQuery();
-BOOL isSqlServr();
+BOOL isMsAccess(void);
+BOOL isMsQuery(void);
+BOOL isSqlServr(void);
/* ESCAPEs */
#define ESCAPE_IN_LITERAL '\\'
* CLASS QResult
*/
QResultClass *
-QR_Constructor()
+QR_Constructor(void)
{
QResultClass *rv;
static HCRYPTPROV hProv = (HCRYPTPROV) 0;
static PCCERT_CONTEXT pClientCertContext = NULL;
-static void FreeCertStores()
+static void FreeCertStores(void)
{
shortterm_common_lock();
if (pClientCertContext)
shortterm_common_unlock();
}
-void LeaveSSPIService()
+void LeaveSSPIService(void)
{
FreeCertStores();
bMyCert = FALSE;
* This driver allows certificates of PFX form when a pair of
* postgresql.crt and postgresql.key doesn't work well.
*/
-static void CertStoreInit_pfx()
+static void CertStoreInit_pfx(void)
{
BOOL success = FALSE;
LPCTSTR pgsslpfx = NULL;
FreeCertStores();
}
-static void CertStoreInit()
+static void CertStoreInit(void)
{
BOOL success = FALSE;
LPCTSTR pgsslkey = NULL, pgsslcert = NULL;
return;
}
-static int InstallRootCA()
+static int InstallRootCA(void)
{
HCERTSTORE hTempCertStore = NULL, hRootCertStore = NULL;
LPCTSTR pgsslroot = NULL;
,NegotiateService = (1L << 2)
} SSPI_Service;
-void LeaveSSPIService();
+void LeaveSSPIService(void);
void ReleaseSvcSpecData(SocketClass *self, UInt4);
int StartupSspiService(SocketClass *self, SSPI_Service svc, const void *opt, int *bReconnect);
int ContinueSspiService(SocketClass *self, SSPI_Service svc, const void *opt);
static char xalibpath[_MAX_PATH] = "";
static char xalibname[_MAX_FNAME] = "";
-const char *GetXaLibName()
+const char *GetXaLibName(void)
{
char dllpath[_MAX_PATH], drive[_MAX_DRIVE], dir[_MAX_DIR],
fname[_MAX_FNAME], ext[_MAX_EXT];
return xalibname;
}
-const char *GetXaLibPath()
+const char *GetXaLibPath(void)
{
GetXaLibName();
return xalibpath;