freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] latest snapshot won't compile
- Date: Wed, 15 Dec 2004 16:07:22 +0100
>
> Hi Guys,
>
> The latest snapshot won't compile in my environment.
>
> 1) "../../include/replacements.h", line 58: cannot find include file:
> "../replacements/readpassphrase.h"
>
> so I get readpassphrase.h from CVS and put it into
> src/replacements, and
> I get as far as....
>
> 2) "token.c", line 1800: syntax error before or at: int
>
> line 1800 of token.c (1.273) being...
>
> tds5_process_result(TDSSOCKET * tds)
> {
> int hdrsize;
>
> CHECK_TDS_EXTRA(tds);
>
> /* int colnamelen; */
> int col, num_cols; < line 1800
> TDSCOLUMN *curcol;
> TDSRESULTINFO *info;
> TDSCURSOR *cursor;
>
>
> in tds_checks.h, CHECK_TDS_EXTRA is #defined as:
>
> #define CHECK_TDS_EXTRA(tds)
> CHECK_STRUCT_EXTRA(tds_check_tds_extra,tds)
>
> and CHECK_STRUCT_EXTRA is #defined as:
>
> #define CHECK_STRUCT_EXTRA(func,s)
>
> (assuming ENABLE_EXTRA_CHECKS is not defined...I haven't explicitly
> defined it...)
>
> ...so this code seems to expand to:
>
>
> tds5_process_result(TDSSOCKET * tds)
> {
> int hdrsize;
>
> ;
>
> /* int colnamelen; */
> int col, num_cols; < line 1800
> TDSCOLUMN *curcol;
> TDSRESULTINFO *info;
> TDSCURSOR *cursor;
>
>
> which my C compiler doesn't like. e.g.
>
> test.c :
>
> #include <stdio.h>
> main() {
>
> ;
>
> int i, j;
>
> i = 0;
> }
>
> cc test.c -o mytest
>
> "test.c", line 6: syntax error before or at: int
>
>
> So. In this function we need to move the macro after the
> declares, e.g.
> :
>
> tds5_process_result(TDSSOCKET * tds)
> {
> int hdrsize;
> /* int colnamelen; */
> int col, num_cols; < line 1800
> TDSCOLUMN *curcol;
> TDSRESULTINFO *info;
> TDSCURSOR *cursor;
>
> CHECK_TDS_EXTRA(tds);
>
> .....
>
> And the same problem arises in tds_convert_string() in query.c
>
Opps.... both issues fixed in CVS.
bye
freddy77
-
[freetds] latest snapshot won't compile,
Thompson, Bill D (London), 12/15/2004
- <Possible follow-up(s)>
- RE: [freetds] latest snapshot won't compile, ZIGLIO, Frediano, VF-IT, 12/15/2004
Archive powered by MHonArc 2.6.24.