Skip to Content.
Sympa Menu

freetds - Re: [freetds] Compilation issues when compiling under HP-UX B.11.31.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Compilation issues when compiling under HP-UX B.11.31.
  • Date: Tue, 29 Mar 2016 12:42:18 +0100

2016-03-28 16:39 GMT+01:00 Mike Jetzer <mjetzer.cdc AT gmail.com>:
> Two compilation issues with freetds-0.95.89 (as well as .88 and .80) when
> compiling under HP-UX B.11.31 with the "HP C/aC++ B3910B A.06.20 [May 13
> 2008]" compiler in 32-bit mode. Both have simple work-arounds which are
> fine for my requirements, but I thought I'd report them to be addressed
> when time permits.
>
> src/tds/token.c generates a 'warning #2513-D: a value of type "int" cannot
> be assigned to an entity of type "char *" because <alloca.h> has not been
> #included:
> nbcbuf = alloca((info->num_cols + 7) / 8);
> ^
>
> Simply adding an "#include <alloca.h>" to token.c solves the issue. I did
> not include a patch file because I imagine that this would most properly be
> resolved via configure/config.h rather than unconditionally adding it to
> token.c. (In the version of Linux I use, <stdlib.h> performs an #include
> of <alloca.h> with the default compiler defines, so a prototype is present
> and gcc produces no similar warning.)
>

Fixed. I added AC_FUNC_ALLOCA in configure and proper headers
changes.

>
> The second issue is with src/dblib/dbpivot.c, which generates a large
> number of 'error #2136: struct "col_t" has no field "XX" errors due to the
> anonymous union in struct col_t's definition. A Google search implies that
> anonymous unions were once a gcc extension but were adopted in C11; the
> HP-UX compiler only accepts up to and including C99.
>
> My work-around was to assign a name to the union and then update references
> to the union members with this union name. I am not including a patch
> because I just named the union "x" and do not know what a more logical name
> for the union might be.

Named as "data".
Tomorrow snapshot should work without problems

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page