Skip to Content.
Sympa Menu

freetds - Re: [freetds] porting a windows program

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] porting a windows program
  • Date: Thu, 19 Jul 2007 15:16:24 -0400

Thomas Stover wrote:
> The first problem is that I don't seem to be including the
> correct header for the PDBPROCESS structure. I looked around in the
> FreeTDS headers and saw DBPROCESS all over the place, so I tried a
> "#define PDBPROCESS DBPROCESS" to no avail. The other big thing is that
> I'm going from the MS doc's version of what error and message handlers
> should look like. Clearly that part needs some work.

Thomas,

I recommend you add any such Sybase->Microsoft changes to sqldb.h, because
that's what Microsoft calls that file. For instance, PDBPROCESS is a
pointer to a DBPROCESS, so something like:


#define PDBPROCESS DBPROCESS*

should help.

If -- and only if -- you have real conflicts, wrap them:

#ifndef MSDBLIB
/* the usual */
#else
/* one microsoft way */
#endif

I would think the handlers could be defined something like:

typedef INT (DBERRHANDLER)(DBPROCESS*, INT, INT, INT, const char *, const
char *);
typedef INT (DBMSGHANDLER)(DBPROCESS*, DBINT, INT, INT, const char *,
const char *, const char *, DBUSMALLINT);

extern DBERRHANDLER dberrhandle(DBERRHANDLER);
extern DBMSGHANDLER dbmsghandle(DBMSGHANDLER);

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page