[freetds] 0.61 tsql core dump, locale = "C C C C C C"

Cooperstock, Dan dan.cooperstock at hepcoe.com
Thu May 15 14:31:50 EDT 2003


Just to be clear, both long * and int * are 8-byte pointers. However, int is
a 4-byte datatype, and long is 8-byte. 

I've forgotten which is which of big-endian and little-endian. But I wrote a
small test program, and set an int to 1. The 1 showed up in the right-most
of the 4 bytes in the int.

After making the change of adding "#define _XOPEN_SOURCE_EXTENDED" to my
config.h, here's what happens in the compile:

cpp: "convert.c", line 2650: warning 2013: Unknown preprocessing directive.

On line 2650, I see "#!perl", which obviously is not valid. It's within a
section "#ifdef DONT_TRY_TO_COMPILE_THIS", but obviously my compiler still
complains. We're using the standard HP-UX C Compiler.

The other warning has gone away, but there's a new one, apparently on
linking tdspool:
ld: (Warning) Unsatisfied symbol "htons" in file
../server/.libs/libtdssrv.sl

I'm not really planning to use tdspool, but maybe this is an indication of
some other problem that we need to be concerned about.

Dan Cooperstock, Senior Technical Consultant, HEPCOE Credit Union
dcoops at hepcoe.com    416-597-5055

-----Original Message-----
From: ZIGLIO Frediano [mailto:Frediano.Ziglio at mail.vodafone.it]
Sent: Thursday, May 15, 2003 10:56 AM
To: FreeTDS Development Group
Subject: RE: [freetds] 0.61 tsql core dump, locale = "C C C C C C"

>
> > What's sizeof(socklen_t) and sizeof(size_t) ??
> Both have size 8.
> - Dan.

The warning occur on accept call

Manual
(http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90682&service=hpux&path=
../B2355-90682/00/00/6&title=HP-UX%20Reference%20Volume%203%3A%20Sections%20
2%20and%204) say

   int accept(int s, void *addr, int *addrlen);

   _XOPEN_SOURCE_EXTENDED only (UNIX 98)

   int accept(int s, struct sockaddr *addr, socklen_t *addrlen);

   Obsolescent _XOPEN_SOURCE_EXTENDED only (UNIX 95)

   int accept(int s, struct sockaddr *addr, size_t *addrlen);


The conversion from long* to int* suggest that we should define
_XOPEN_SOURCE_EXTENDED somewhere for HP/UX...

Add a "#define _XOPEN_SOURCE_EXTENDED" to config.h and try recompile.
Warning should disappear...
However I don't understand... I a program call int* (32bit pointer) it call
the same function of size_t*/socklen_t* (64bit pointer) version ?? It seem a
header bug to me... Is HP/UX little endian or big endian ???

freddy77



More information about the FreeTDS mailing list