From ce022eb1c7777049a198ebca33d2fae70b274734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Michel=20Vourg=C3=A8re?= Date: Mon, 2 Jul 2012 23:15:57 +0200 Subject: [PATCH] Add missing prototype: Fixes compiler warning SQLGetPrivateProfileString was not defined before use. --- src/odbc/connectparams.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/odbc/connectparams.c b/src/odbc/connectparams.c index 19daa50..04dd0d5 100644 --- a/src/odbc/connectparams.c +++ b/src/odbc/connectparams.c @@ -46,12 +46,20 @@ static char line[max_line]; static guint HashFunction (gconstpointer key); -#if !HAVE_SQLGETPRIVATEPROFILESTRING +#if HAVE_SQLGETPRIVATEPROFILESTRING +#include +extern int SQLGetPrivateProfileString( LPCSTR lpszSection, + LPCSTR lpszEntry, + LPCSTR lpszDefault, + LPSTR lpszRetBuffer, + int cbRetBuffer, + LPCSTR lpszFilename); +#else static GString* GetIniFileName (); static int FileExists (const gchar* name); static int FindSection (FILE* stream, const char* section); static int GetNextItem (FILE* stream, char** name, char** value); -#endif //!HAVE_SQLGETPRIVATEPROFILESTRING +#endif //HAVE_SQLGETPRIVATEPROFILESTRING static void visit (gpointer key, gpointer value, gpointer user_data); static gboolean cleanup (gpointer key, gpointer value, gpointer user_data);