Rebelde
2013-03-25 13:20:25 UTC
Hello,
(Is this group still alive?)
I'm porting our applications from Sybase 15.0.3 ESQL/C to 15.7 and encounter
the following prolem or bug in the generated C-code of Sybase's CPRE:
$ env | egrep 'SYB|PLA'
DSQUERY=sisisSYB157
SYBASE_OCS=OCS
SYBPLATFORM=sun_svr464
SYBASE=/data/sybase157
$ /data/sybase157/OCS-15_0/bin/cpre64 -v
Sybase ESQL/C Precompiler/15.7/P-EBF19582 ESD #1/DRV.15.7.0.1/SPARC/Solaris
10/BUILD1570-012/64bit/OPT/Thu Dec 8 01:57:08 2011
...
$ cat my.ec
#include <stdio.h>
#include "sybsqlex.h"
EXEC SQL INCLUDE sqlca;
EXEC SQL BEGIN DECLARE SECTION;
struct mytable {
char tstchar[26];
long tstint;
} myt;
typedef struct mytable t_mytable;
EXEC SQL END DECLARE SECTION;
int openc()
{
EXEC SQL BEGIN DECLARE SECTION;
t_mytable *aaa = myt;
EXEC SQL END DECLARE SECTION;
EXEC SQL OPEN dbctest_scr USING :aaa->tstint;
}
$ /data/sybase157/OCS-15_0/bin/cpre64 -r -a -w -l -y my.ec
$ fgrep tstint my.c
long tstint;
** EXEC SQL OPEN dbctest_scr USING :aaa->tstint;
&_sql->dfmtCS_LONG_TYPE,&tstint,
Note the wrong argument '&tstint' instead of something like &(aaa->tstint);
of course the CC will not understand this;
it looks a bit like an older bug 52113, just google for
sybase 52113 cs_connect
Any ideas?
matthias
(Is this group still alive?)
I'm porting our applications from Sybase 15.0.3 ESQL/C to 15.7 and encounter
the following prolem or bug in the generated C-code of Sybase's CPRE:
$ env | egrep 'SYB|PLA'
DSQUERY=sisisSYB157
SYBASE_OCS=OCS
SYBPLATFORM=sun_svr464
SYBASE=/data/sybase157
$ /data/sybase157/OCS-15_0/bin/cpre64 -v
Sybase ESQL/C Precompiler/15.7/P-EBF19582 ESD #1/DRV.15.7.0.1/SPARC/Solaris
10/BUILD1570-012/64bit/OPT/Thu Dec 8 01:57:08 2011
...
$ cat my.ec
#include <stdio.h>
#include "sybsqlex.h"
EXEC SQL INCLUDE sqlca;
EXEC SQL BEGIN DECLARE SECTION;
struct mytable {
char tstchar[26];
long tstint;
} myt;
typedef struct mytable t_mytable;
EXEC SQL END DECLARE SECTION;
int openc()
{
EXEC SQL BEGIN DECLARE SECTION;
t_mytable *aaa = myt;
EXEC SQL END DECLARE SECTION;
EXEC SQL OPEN dbctest_scr USING :aaa->tstint;
}
$ /data/sybase157/OCS-15_0/bin/cpre64 -r -a -w -l -y my.ec
$ fgrep tstint my.c
long tstint;
** EXEC SQL OPEN dbctest_scr USING :aaa->tstint;
&_sql->dfmtCS_LONG_TYPE,&tstint,
Note the wrong argument '&tstint' instead of something like &(aaa->tstint);
of course the CC will not understand this;
it looks a bit like an older bug 52113, just google for
sybase 52113 cs_connect
Any ideas?
matthias
--
Matthias Apitz
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5
Matthias Apitz
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5