Skip to Content.
Sympa Menu

freetds - Re: [freetds] can't compile master without threads?

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] can't compile master without threads?
  • Date: Wed, 13 Mar 2013 17:43:55 +0000

2013/3/12 James K. Lowden <jklowden AT freetds.org>:
> On Tue, 12 Mar 2013 09:00:05 +0000
> Frediano Ziglio <freddy77 AT gmail.com> wrote:
>
>> > In file included from ../../../include/tds.h:54:0,
>> > from ../../../src/replacements/getpassarg.c:29:
>> > ../../../include/tdsthread.h:216:2: error: #error Condition not
>> > supported! *** Error code 1
>> >
>> > Suggestions?
>> >
>> > --jkl
>> >
>>
>> Ehm.... disable --thread-safe? The other option is to write
>> conditional code for no thread environment. Are you sure you are never
>> using thread?
>
> Let me try answering again, now that I've had some coffee....
>
> I haven't investigated it carefully, but as of NetBSD 5.0 FreeTDS
> couldn't be compiled with threads enabled. It's probably (?) because
> of some autoconf snafu. I am planning to upgrade, and it might go
> away. But I doubt I'm the only user who compiles without threading
> support.
>
> I've never cared. I don't like multithreaded programming, and I don't
> understand why an I/O library should support it! It's not as if you
> can process rows faster with multiple threads; the server is always the
> bottleneck.
>
> So, yes, "never" is pretty much where I stand re threads. :-) I also
> think there must be other platforms -- and maybe even other programmers
> -- that can't use or can't stand threads.
>
>> The other problem is that some test require thread (they test thread
>> behaviour).
>
> Yes, but that's easy to work around, no? Wrap the whole thing in a #if
> that tests whether threading is enabled. What more is needed?
>
> Regards,
>
> --jkl

Mm... I don't understand why you are not able to use normal options. I
installed a virtual machine with NetBSD 5.0 (amd64), installed wget
(not that easy), got a "make dist" output, configure and make works
without problems. Perhaps the configure I'm using works even for
NetBSD 5 ? Or probably as a side effect IPv6 support fixed NetBSD.

I didn't try however to do some connection test.

Anyway, I pushed a fix. MARS require thread support however.
Personally I think that if a system support threads (which Unix
nowadays does not support thread? Today even phones are quad core!) is
better to be thread-safe. If some strange implementation decide to
call your signal from another thread created from another library it
prevent nasty things to happen.

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page