Skip to Content.
Sympa Menu

freetds - Re: compiling ctlib examples on Mac OS X

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brian Bruns" <camber AT ais.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: compiling ctlib examples on Mac OS X
  • Date: Mon, 10 Dec 2001 10:46:11 -0500


The problem here is the PROTOTYPE macro. Sybase defines it to determine
how to handle prototypes portably between K&R and ANSI compilers. FreeTDS
doesn't define one, but you could add something like:

#define PROTOTYPE(x) x

to the cspublic.h file and then attempt to build again. OpenClient does
some really convoluted crap to make K&R compilers work, but personally C
has been ansified for some dozen years, time to drop the baggage.

Brian

> I've done a lot of work with DBD::Sybase and SybPerl, but now I need to do
> some work in C.
>
> I thought I'd grab the example files from our Sybase installation from the
> $SYBASE/sample/ctlibrary/* directory and try to compile them.
>
> The goal is to make these run on Mac OS X. However, compiling them fails
> miserably. I've set up the makefile with a "mac" environment and set up my
> SYBASE and SYBPLATFORM environment variables, so it tries to compile, but
> it just chokes immediately.
>
> Below is the beginning of the error messages I get, if it's any help. I
> got similar errors trying to compile the dblib examples, so it's probabaly
> in my setup. (The examples compiled fine on our Sun box with the Sybase
> libraries.)
>
> Are there any pointers to help me get started.
>
> Thanks,
> John Gilmore-Baldwin
>
> [john:~/SybaseTests] john% make compute
> sh sybopts.sh verify; \
> `sh sybopts.sh compile` -I. -I/usr/local/freetds/include -DDEBUG
> -Dmac=1 -c exutils.c -o exutils.o
> SYBPLATFORM is mac
> Compiling with cc -g -ansi -pedantic -pipe -Wall -Wtraditional
> -Wpointer-arith -Wstrict-prototypes -Bstatic
> Sybase base libraries: -ltcl -linsck -lcomn -lintl
> System libraries: -lm
> exutils.h:47: illegal external declaration, missing `;' after
> `ex_display_dlen'
> exutils.h:48: illegal external declaration, missing `;' after `column'




Archive powered by MHonArc 2.6.24.

Top of Page