Skip to Content.
Sympa Menu

freetds - RE: [freetds] Free TDS Build on HP/UX 11 using aCC A.03.37

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Harrison, Bruce (CXO)" <Bruce.Harrison AT hp.com>
  • To: <LowdenJK AT bernstein.com>
  • Cc: <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Free TDS Build on HP/UX 11 using aCC A.03.37
  • Date: Mon, 9 Dec 2002 14:03:38 -0700

Hello James,

Here's a list of the sizes of the variable / pointer types:

The size of a char is 1
The size of a short is 2
The size of a int is 4
The size of a long is 4
The size of a float is 4
The size of a double is 8
The size of a long long is 8

The size of a char * is 4
The size of a int * is 4
The size of a long int * is 4
The size of an unsigned long * is 4

It looks as if an int * and an unsigned long * are the same size. As
far as the char * to int conversion (such as in the strtok_r call), we
are probably OK for now as the int and the char * are the same size.
The man pages for strtok_r does indicate that it returns a pointer.
This is something that should be fixed at some point as more and more
machines are becoming 64-bit and the pointer size may get changed to 8,
whilst the size of an int remains at 4. If (when?) this happens, then
the code would definitely break.

I haven't tried running it yet, but will go ahead now that the
configure script is running successfully. Previously the configure
script was generating the following:
checking size of char... 0
checking size of short... 0
checking size of long... 0
checking size of int... 0
checking size of float... 0
checking size of double... 0
checking size of long long... 0
checking size of __int64... 0
configure: error: No 32-bit float found.
But (as you have already found and fixed), this was being caused by the
#include <stdlib.h> not being in the test code used by the configure
script.

I would be happy to recompile (i.e. configure / make) whenever needed,
just let me know!

Thanks again for all your help!

Bruce Harrison
Consultant
Hewlett-Packard Company
Colorado Springs, CO
(719) 592-4513


-----Original Message-----
From: Lowden, James K [mailto:LowdenJK AT bernstein.com]
Sent: Monday, December 09, 2002 12:22 PM
To: freetds AT lists.ibiblio.org
Subject: RE: [freetds] Free TDS Build on HP/UX 11 using aCC A.03.37

> From: Harrison, Bruce (CXO) [mailto:Bruce.Harrison AT hp.com]
> Sent: December 9, 2002 1:36 PM
>
> I just saw it. I pulled down the current snap-shot. The problems
> with the configure script are solved, but I still get quite a few
> compiler warnings and errors.

Hi Bruce,

Well, I don't see any errors. Does it run?

There are a lot of warnings, most of which are harmless, some of which
might
be OS-related:

$ grep line log |perl -pe 's/^.+# //' |grep ^Type |sort |uniq -c
13 Types 'char *' and 'int' are not assignment-compatible.
18 Types 'char *' and 'unsigned char *' are not assignment-compatible.
12 Types 'const char *' and 'unsigned char *' are not
assignment-compatible.
18 Types 'const unsigned char *' and 'char *' are not
assignment-compatible.
2 Types 'int *' and 'unsigned long *' are not assignment-compatible.
1 Types 'passwd *' and 'int' are not assignment-compatible.
22 Types 'unsigned char *' and 'char *' are not assignment-compatible.
1 Types 'void *' and 'int (*)(cs_context *,cs_clientmsg *)' are not
assignment-compatible.

The unsigned/signed warnings need cleaning up but are probably OK. You
tell
me if int* and unsigned long* are the same size. But the char* and int
warnings could easily be trouble, if your OS returns a count and we
expect a
pointer, or vice versa. Those need careful examination.

OTOH, if it compiles under GNU, I doubt the code is as broken as these
warnings seem to indicate. I think it's more likely we're getting
useful
information about nonfatal problems.

It would help if you could look at the char*/int warnings especially,
and
check what return type is defined for your system. I will fix any
genuine
problems (functional prototype differences) in the autoconf setup. If
you
don't mind recompiling every attempt, I think someone might be willing
to
eliminate *all* the warnings. (We also accept patches!) :)

I don't understand why strtok_r is getting pulled in, because you
haven't
configured for threadsafe operation.

--jkl


The information contained in this transmission may contain privileged
and
confidential information and is intended only for the use of the
person(s)
named above. If you are not the intended recipient, or an employee or
agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication
is
strictly prohibited. If you are not the intended recipient, please
contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders
and/or
instructions by e-mail, and therefore will not be responsible for
carrying
out such orders and/or instructions.


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page