Re: [Firebird-devel] CMake build system

2014-12-17 Thread Egor Pugin
In Visual Studio:
1. Select boot_* (boot step), epp_* (boot and master epp -> cpp steps),
databases (security.fdb, messages.fdb, help.fdb generation), messages
(firebird.msg generation), other projects you need to turn off (examples,
etc). Right click - unload projects. They still will be unloaded after VS
restart.
2. Just uncheck projects in Solution Properties -> Configuration Properties.


On 17 December 2014 at 03:46, Adriano dos Santos Fernandes <
adrian...@gmail.com> wrote:
>
> On 16-12-2014 07:12, Egor Pugin wrote:
> > Hi!
> >
> > ​I prepared building of Firebird using CMake.
> > You can find more information on the link below. Also you can try it.
> > https://bitbucket.org/egor_pugin/firebird_cmake
> >
> > CMake can simplify the build process, solve a lot of problems with
> > integration icu, zlib and other libraries into the build (I saw
> > discussions here about them during last 2-3 weeks).
> >
> > ​I hope you find this useful and consider including this into trunk.
> > If you like it, we'll discuss details about patch later.
> >
>
> After an initial full build, how do I build it avoiding the boot-build
> phase?
>
>
> Adriano
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>


-- 
Egor Pugin
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] CMake build system

2014-12-17 Thread Adriano dos Santos Fernandes
On 17/12/2014 08:03, Egor Pugin wrote:
> In Visual Studio:
> 1. Select boot_* (boot step), epp_* (boot and master epp -> cpp
> steps), databases (security.fdb, messages.fdb, help.fdb generation),
> messages (firebird.msg generation), other projects you need to turn
> off (examples, etc). Right click - unload projects. They still will be
> unloaded after VS restart.
> 2. Just uncheck projects in Solution Properties -> Configuration
> Properties.
>
>

I want to known with make in Linux, sorry, missed to say...


Adriano


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] CMake build system

2014-12-17 Thread Egor Pugin
Yes, this is a problem.
I know possible solution and will try to fix it.

On 17 December 2014 at 13:16, Adriano dos Santos Fernandes <
adrian...@gmail.com> wrote:
>
> On 17/12/2014 08:03, Egor Pugin wrote:
> > In Visual Studio:
> > 1. Select boot_* (boot step), epp_* (boot and master epp -> cpp
> > steps), databases (security.fdb, messages.fdb, help.fdb generation),
> > messages (firebird.msg generation), other projects you need to turn
> > off (examples, etc). Right click - unload projects. They still will be
> > unloaded after VS restart.
> > 2. Just uncheck projects in Solution Properties -> Configuration
> > Properties.
> >
> >
>
> I want to known with make in Linux, sorry, missed to say...
>
>
> Adriano
>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>


-- 
Egor Pugin
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Retrieving relation alias

2014-12-17 Thread Rudolf Grauberger

Hey guys,thanks for the information and your support.

Using the implementation of Java (postet byMark Rotteveel), the source code 
from the Firebird server 
(https://searchcode.com/codesearch/view/25432247/)andwith support of 
mycolleagues at work, I could understand the process and can now also read 
aliases from a statement.
It is important that before the "isc_dsql_sql_info"with 
"isc_info_sql_relation_alias"is called, the statementmust be prepared oder 
executed.
I solved my problem like this (tested with Firebird 2.1.5.18497 and Firebird 
2.5.3.26778):

-- code start --

IBS status;
char result[4096];

char itemsReq[] =
{
// byte order little endian
//c = 1 byte
//h = 2 byte
//d = 4 byte
//s = n bytes string not terminated

isc_info_sql_select, // result = c type
isc_info_sql_describe_vars, // result = c type + h package length + d parameter 
count
isc_info_sql_relation_alias, // result = c type + h package length + s alias + 
c unknown
};

isc_dsql_sql_info(status.Self(), &mHandle, sizeof(itemsReq), itemsReq, 
sizeof(result), result);

if (status.Errors()) throw SQLExceptionImpl(status,
"TableAliases", _("isc_dsql_sql_info failed."));

auto GetStrings = [] (char *buffer, char token, char subtoken) -> 
std::vector
{
char *p = buffer;

if (*p != token)
throw LogicExceptionImpl("GetStrings", _("Token not found."));

// the first byte is isc_info_sql_select that consists of one byte without 
length
++p;

auto FindToken = [] (char token, char *aBuffer) -> char*
{
if (aBuffer == nullptr)
return nullptr;

char* p = aBuffer;

while (*p != isc_info_end)
{
int len;

if (*p == token)
return p;

len = (*gds.Call()->m_vax_integer)(p + 1, 2);
p += (len + 3);
}

return nullptr;
};

std::vector results;
std::string strData;

while ((p = FindToken(subtoken, p)) != nullptr)
{
int len;
len = (*gds.Call()->m_vax_integer)(p+1, 2);
strData = std::string(p+3, len);

// skip the string
p += 3 + len;

if (*p == isc_info_sql_describe_end)
++p;

results.push_back(strData);
}

return results;
};

std::vector aliases = GetStrings(result, isc_info_sql_select, 
isc_info_sql_relation_alias);

-- code end -- This may not be the best implementation, but I wanted to share 
my results with all the interested it.With best regards,

Rudolf
Am 16. Dezember 2014, hat Vlad Khorsun  geschrieben:
> 16.12.2014 11:13, Mark Rotteveel wrote:
> > On Tue, 16 Dec 2014 11:03:39 +0200, Vlad Khorsun <>
> > wrote:
> > > 16.12.2014 10:27, Rudolf Grauberger wrote:
> > > > I would like to read the table aliases,
> > > > 
> > > After call of isc_dsql_prepare() you'll have XSQLDA structure filled
> > > with all
> > > info, including known relation aliases. Read IB6 "API Guide", chapter
> > > "Working
> > > with Dynamic SQL". Guide is available here:
> > > 
> > > http://www.firebirdsql.org/en/reference-manuals/
> > > 
> > The XSQLDA doesn't include the relation alias, only the relation name (and
> > the column name and alias). So you need to to use sql_info to obtain the
> > relation_alias; isc_info_sql_relation_alias was also only added in Firebird
> > 2.
> > 
> You right, i forget about it. Hope, your link helps Rudolf.
> 
> Regards,
> Vlad
> 
> 
> 
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> 
> Firebird-Devel mailing list, web interface at 
> 
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Reopened: (CORE-4259) Don't call setlocale(LC_CTYPE, "") in isql for Windows

2014-12-17 Thread Dimitry Sibiryakov (JIRA)

 [ 
http://tracker.firebirdsql.org/browse/CORE-4259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dimitry Sibiryakov reopened CORE-4259:
--

Fix Version/s: 3.0 Beta 2
   (was: 3.0 Alpha 2)

Someone added another call to setlocale() into ISQL_main() thus resurrecting 
the bug. Remove it, please.

> Don't call setlocale(LC_CTYPE, "") in isql for Windows
> --
>
> Key: CORE-4259
> URL: http://tracker.firebirdsql.org/browse/CORE-4259
> Project: Firebird Core
>  Issue Type: Bug
>  Components: ISQL
>Affects Versions: 3.0 Alpha 1
> Environment: WinXP
>Reporter: Dimitry Sibiryakov
>Assignee: Frank Schlottmann-Goedde
>Priority: Minor
> Fix For: 3.0 Beta 2
>
>
> It breaks usual chcp work.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4640) subselect losing the index when where clause includes coalesce()

2014-12-17 Thread JIRA
subselect losing the index when where clause includes coalesce()


 Key: CORE-4640
 URL: http://tracker.firebirdsql.org/browse/CORE-4640
 Project: Firebird Core
  Issue Type: Bug
  Components: Engine
Affects Versions: 2.5.2 Update 1
 Environment: Win8.1, Firebird 2.5.2.26540 (x64)
Reporter: Omacht András
 Attachments: FB_TEST.ZIP

See the attached database.

When running 

select t3.id,
   (select first 1 v1.id
  from v1
  where v1.vc1 = 'A' and v1.i2 = 1000 and v1.i1 = coalesce(t3.i1_1, 
t3.i1_2))
  from t3

no indicies were found for view v1:

Plan
PLAN (V1 T1 NATURAL)
PLAN (V1 T2 NATURAL)
PLAN (T3 NATURAL)

The engine should use T1_UK and T2_UK:
Plan
PLAN (V1 T1 INDEX (T1_UK1))
PLAN (V1 T2 INDEX (T2_UK1))
PLAN (T3 NATURAL)


Without coalesce in then where clause it works fine:

select t3.id,
   (select first 1 v1.id
  from v1
  where v1.vc1 = 'A' and v1.i2 = 1000 and v1.i1 = t3.i1_1)
  from t3

Plan
PLAN (V1 T1 INDEX (T1_UK1))
PLAN (V1 T2 INDEX (T2_UK1))
PLAN (T3 NATURAL)

and

select t3.id,
   (select first 1 v1.id
  from v1
  where v1.vc1 = 'A' and v1.i2 = 1000 and v1.i1 = t3.i1_2)
  from t3

Plan
PLAN (V1 T1 INDEX (T1_UK1))
PLAN (V1 T2 INDEX (T2_UK1))
PLAN (T3 NATURAL)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

   

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] FB3 initializing security database with legacy settings is impossible also changing password issue

2014-12-17 Thread liviuslivius
Hi,

if i set 
AuthClient = Legacy_Auth, Srp, Win_Sspi 
UserManager = Legacy_UserManager
WireCrypt = Disabled

then initializing security database not work at all
gsec –user sysdba –password masterkey
gsec add sysdba –pw xxx admin yes
run without errors but  change nothing

when i try to login with flamerobin i get 

---
Unhandled Error in FlameRobin
---
*** IBPP::SQLException ***
Context: Database::Connect
Message: isc_attach_database failed

SQL Message : -902
Unsuccessful execution caused by a system error that precludes successful 
execution of subsequent statements

Engine Code: 335544472
Engine Message :
Your user name and password are not defined. Ask your database administrator to 
set up a Firebird login.
Install incomplete, please read chapter "Initializing security database" in 
Quick Start Guide

---
OK   
---


when i run gsec display i see:
C:\Program Files\Firebird\Firebird_3_0>gsec -user sysdba -password masterkey
GSEC> display
 user nameuid   gid admin full name


SYSDBA  0 0   Sql Server Administrator


when i set default config – all work ok – i can initialize sec database
and after that when i can change config to legacy
i can connect to database with masterkey pass

but next when i try to change pass this not work at all
gsec run without errors but change nothing
i try also by sql “alter user” also run without error but change nothing


regards,
Karol Bieniaszewski




--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Fixes for recent changes

2014-12-17 Thread Alexey Pavlov
>From d437cb98a45566a51e36cf510434d2f3bd27d302 Mon Sep 17 00:00:00 2001
From: Alexpux 
Date: Thu, 18 Dec 2014 10:11:09 +0300
Subject: [PATCH] Fixes for commit "make all file descriptors, opened by
 firebird, close on exec()"

---
 src/common/os/win32/os_utils.cpp | 4 ++--
 src/remote/inet.cpp  | 4 ++--
 src/remote/remote.h  | 2 ++
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/common/os/win32/os_utils.cpp
b/src/common/os/win32/os_utils.cpp
index 7bf995a..948e7ab 100644
--- a/src/common/os/win32/os_utils.cpp
+++ b/src/common/os/win32/os_utils.cpp
@@ -303,9 +303,9 @@ bool isIPv6supported()
  return false;
 }

-int open(const char *pathname, int flags, mode_t mode = 0666)
+int open(const char *pathname, int flags, mode_t mode)
 {
- return ::_open(char *pathname, flags, mode);
+ return ::_open(pathname, flags, mode);
 }

 FILE* fopen(const char *pathname, const char *mode)
diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp
index 8f8ff91..a1d3892 100644
--- a/src/remote/inet.cpp
+++ b/src/remote/inet.cpp
@@ -3086,7 +3086,7 @@ namespace os_utils
 {

 // force socket descriptor to have O_CLOEXEC set
-int socket(int domain, int type, int protocol)
+SOCKET socket(int domain, int type, int protocol)
 {
 #ifdef WIN_NT
  return ::socket(domain, type, protocol);
@@ -3109,7 +3109,7 @@ int socket(int domain, int type, int protocol)
 }

 // force socket descriptor to have O_CLOEXEC set
-int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
+SOCKET accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
 {
 #ifdef WIN_NT
  return ::accept(sockfd, addr, addrlen);
diff --git a/src/remote/remote.h b/src/remote/remote.h
index de1a68d..2501ac7 100644
--- a/src/remote/remote.h
+++ b/src/remote/remote.h
@@ -53,6 +53,8 @@
 #ifndef INVALID_SOCKET
 #define INVALID_SOCKET  -1
 #endif
+#else
+#include 
 #endif // !WIN_NT

 #if defined(HAVE_ZLIB_H)
-- 
2.2.0
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Fixes for recent changes

2014-12-17 Thread Vlad Khorsun
18.12.2014 9:13, Alexey Pavlov wrote:
>  From d437cb98a45566a51e36cf510434d2f3bd27d302 Mon Sep 17 00:00:00 2001
> From: Alexpux mailto:alexey.paw...@gmail.com>>
> Date: Thu, 18 Dec 2014 10:11:09 +0300
> Subject: [PATCH] Fixes for commit "make all file descriptors, opened by
>   firebird, close on exec()"

   Already fixed, but thanks anyway

Regards,
Vlad

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [PATCH] Cobol interface

2014-12-17 Thread Alexey Pavlov
>From 04e29d51b1067a6c532eba160bb675515006ab47 Mon Sep 17 00:00:00 2001
From: Alexpux 
Date: Thu, 18 Dec 2014 10:23:11 +0300
Subject: [PATCH] Cobol interface: fix warnings and cast error.

---
 src/gpre/languages/fbrmclib.cpp | 19 +
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/gpre/languages/fbrmclib.cpp
b/src/gpre/languages/fbrmclib.cpp
index 6441dc3..26e4b5b 100644
--- a/src/gpre/languages/fbrmclib.cpp
+++ b/src/gpre/languages/fbrmclib.cpp
@@ -72,9 +72,9 @@ struct argument_entry

 struct entry_table
 {
- char *EntryPointCobolName;
- int (*EntryPointAddress)(char *, int, argument_entry *, int);
- char *EntryPointName;
+ const char *EntryPointCobolName;
+ int (*EntryPointAddress)(char *, int, argument_entry *, int);
+ const char *EntryPointName;
 };

 struct date_fmt
@@ -1392,8 +1392,7 @@ EXPORT RM_ENTRY(rmc_status_address)

  CobolToStatus(stat, &arg_vector[0]);
  ISC_STATUS *p = stat;
- *(ISC_ULONG *)arg_vector[-1].a_address = (ISC_ULONG)p;
-
+ *(uintptr_t *)arg_vector[-1].a_address = (uintptr_t)p;

  return (0);
 }
@@ -1666,24 +1663,24 @@ EXPORT RM_ENTRY(rmc_ctos)
  return (0);
 }

-static char* banner = "Firebird Embedded SQL Interface";
+static const char* banner = "Firebird Embedded SQL Interface";

 #ifdef __cplusplus
 extern "C" {
 #endif
-char* RM_AddOnBanner();
-char* RM_AddOnLoadMessage();
+const char* RM_AddOnBanner();
+const char* RM_AddOnLoadMessage();
 #ifdef __cplusplus
 }
 #endif

 // Return additional banner message for this module
-char* RM_AddOnBanner()
+const char* RM_AddOnBanner()
 {
  return (banner);
 }

-char* RM_AddOnLoadMessage()
+const char* RM_AddOnLoadMessage()
 {
  return (banner);
 }
-- 
2.2.0
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] [PATCH] Cobol interface

2014-12-17 Thread Dmitry Yemanov
18.12.2014 10:47, Alexey Pavlov wrote:

> -*(ISC_ULONG *)arg_vector[-1].a_address = (ISC_ULONG)p;
> -
> +*(uintptr_t *)arg_vector[-1].a_address = (uintptr_t)p;

So far our practice is to favor FB-specific typedefs instead of system 
ones. U_IPTR should be used here instead of uintptr_t.


Dmitry


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [PATCH] Fix using function pointer

2014-12-17 Thread Alexey Pavlov
Some times ago I'm send patch to
http://tracker.firebirdsql.org/browse/CORE-4619
Will be it applied?

Last patch version:

>From ef37330b471405d5803495214be5eb218fadab47 Mon Sep 17 00:00:00 2001
From: Alexpux 
Date: Wed, 19 Nov 2014 22:40:20 +0300
Subject: [PATCH] Fix using function pointer

---
 src/common/classes/locks.cpp | 4 ++--
 src/common/classes/locks.h   | 7 +++
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/common/classes/locks.cpp b/src/common/classes/locks.cpp
index 5a3499f..5a44ad4 100644
--- a/src/common/classes/locks.cpp
+++ b/src/common/classes/locks.cpp
@@ -120,8 +120,8 @@ BOOL WINAPI
TryEnterCriticalSection_Win9X(CRITICAL_SECTION* cs)

 // On Win 98 and Win ME TryEnterCriticalSection is defined, but not
implemented
 // So direct linking to it won't hurt and will signal our incompatibility
with Win 95
-TryEnterCS::tTryEnterCriticalSection* TryEnterCS::m_funct =
-
reinterpret_cast(&TryEnterCriticalSection);
+TryEnterCS::tTryEnterCriticalSection TryEnterCS::m_funct =
+
reinterpret_cast(TryEnterCriticalSection);

 static TryEnterCS tryEnterCS;

diff --git a/src/common/classes/locks.h b/src/common/classes/locks.h
index 952b24c..c6f57eb 100644
--- a/src/common/classes/locks.h
+++ b/src/common/classes/locks.h
@@ -62,14 +62,13 @@ public:

  static bool tryEnter(LPCRITICAL_SECTION lpCS)
  {
- return ((*m_funct) (lpCS) == TRUE);
+ return ((m_funct) (lpCS) == TRUE);
  }

 private:
- typedef WINBASEAPI BOOL WINAPI tTryEnterCriticalSection
- (LPCRITICAL_SECTION lpCriticalSection);
+ typedef BOOL (WINAPI *tTryEnterCriticalSection)(LPCRITICAL_SECTION
lpCriticalSection);

- static tTryEnterCriticalSection* m_funct;
+ static tTryEnterCriticalSection m_funct;
 };

 class Mutex : public Reasons
-- 
2.2.0
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel