Skip to Content.
Sympa Menu

freetds - Re: [freetds] Can't compile nightly build with VC6

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Can't compile nightly build with VC6
  • Date: Thu, 21 Oct 2010 22:57:25 -0400

Михаил Гаврилов wrote:
>
> config.c
> D:\php-sdk\php53dev\vc6\x86\pecl\freetds-0.83.dev.20101014\src\tds\conf
> ig.c(576) : error C2065: 'LONG_MIN' : undeclared identifier

I wonder how to interpret your message. Are you asking for advice?
Letting others know? Expecting a fix?

As the project maintainer, what I would like to see is a message saying,
"I couldn't compile [version] in my environment on [system] with
[compiler]. Please see attached patch that makes it work for me."

We try -- we really do try -- to make the FreeTDS code as portable as
possible. It's a collaborative effort. I build in Win32 from time to
time, and the code compiles for me in my environment. Others do, too. If
it doesn't build in your environment, it's because something's different.
No one but you has access to your system and can determine what, exactly,
is wrong. That's why a patch would be so much better than a a game of
three-code monte.

http://msdn.microsoft.com/en-us/library/7fh3a000(VS.80).aspx

LONG_MIN is defined, it seems, in Microsoft's limits.h. src/tds/config.c
says:

#if HAVE_LIMITS_H
#include <limits.h>
#endif

but win32/config.h doesn't define it:

$ grep -ci limit win32/config.h
0

So, the real mystery is why it works at all! But it's quite possible some
other file, perhaps a system header file, does include limits.h in some
versions of Visual Studio. Or maybe "VC6" (I don't remember which one
that is) didn't have a limits.h at all, doesn't define LONG_MIN? What
does your documentation say?

If you do have it, then I would try adding

#define HAVE_LIMITS_H 1

to win32/config.h.

HTH. I look forward to your patch! :-)

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page