PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Installing sybperl on NT
Date: Mar 28 2002 2:50PM

Akanksha_Gulati writes:
 > Hi,
 >   I am building sybperl-2.14_01 on NT.I have perl 5.05 on my machine.
 > After running Makefile.PL,Makefile for CTlib,DBlib gets successfully made.
 > The second step is to run NMAKE in which ceation of CTlib.obj and CTlib.dll
 > does not take place
 > I face the following kind of error
 > 
 > Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
 > Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
 > Skip ..\blib\lib\Sybase\CTlib.pm (unchanged)
 >         cl -c -ID:\sybase\include -nologo -O1 -MD -DNDEBUG -DWIN32
 > -D_CONSOLE -D
 > NO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
 > -DPERL_M
 > SVCRT_READFIX -O1 -MD -DNDEBUG    -DVERSION=\"2.14_01\"
 > -DXS_VERSION=\"2.14_01\
 > "  -ID:\Perl\lib\CORE -DCTLIBVS=100 -DSYBPLVER=\"2.14_01\" -DDO_TIE CTlib.c
 > CTlib.c
 > CTlib.xs(1191) : warning C4133: 'function' : incompatible types - from
 > 'struct _
 > PerlIO *' to 'struct _iobuf *'

At the top of CTlib.xs (below the #include lines) add:

#ifndef PerlIO
#  define PerlIO FILE
#  define PerlIO_printf fprintf
#  define PerlIO_stderr() stderr
#  define PerlIO_close(f) fclose(f)
#  define PerlIO_open(f,m) fopen(f,m)
#  define PerlIO_flush(f) Fflush(f)
#  define PerlIO_puts(f,s) fputs(s,f)
#endif

Now you need to edit the CTlib.xs source and replace all the fprintf,
etc. calls with PerlIO_printf, etc.

Unfortunately I don't have the time to do that right now...

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org           *or*          mpeppler@mbay.net
http://www.mbay.net/~mpeppler
International Sybase User Group: http://www.isug.com