delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/06/18:37:58

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=MBEAGjM0mlIsPl2z
hCUljjnlkpoQVuvH5LJOAYFfSg3f5hGGVgTumDGbG9BuReQJjK5SmS6GdLUTUO54
SGVQxvbi79l1lO/7/E3AguF/7Qi4NVHa83euCak7xsJ992PyHpuKvrrkC5WiF722
2Osw8Xw1+jPpNuVVPx2PcNbdiLY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=s6jErXZy5UO4m0avYvD4tN
SreYY=; b=MDlj+UgThud02li+37ovRB3qP0xBMCY6klg/RAvlIaYxfxGPr1ocex
wPxg+WeDJrC91cPyvdRaa3RWxeGaIJfb3oNuUacdI1qowyBedIwz6wWj8a3AFHFq
4UMZ6mKnXEx9sPkudZfZ3UqKAStSmOGXLIuho+ZN7rHZugGEEHYU0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: vms173025pub.verizon.net
Message-id: <52F41CC3.7050203@cygwin.com>
Date: Thu, 06 Feb 2014 18:37:39 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: qsort_r and libc.a version?
References: <0C723FEB5B4E5642B25B451BA57E27307514F78A AT S1P5DAG3C DOT EXCHPROD DOT USA DOT NET> <52F3E4DA DOT 40002 AT cygwin DOT com> <0C723FEB5B4E5642B25B451BA57E27307514FBE4 AT S1P5DAG3C DOT EXCHPROD DOT USA DOT NET>
In-reply-to: <0C723FEB5B4E5642B25B451BA57E27307514FBE4@S1P5DAG3C.EXCHPROD.USA.NET>

On 2/6/2014 6:29 PM, Jim Garrison wrote:
>> -----Original Message-----
>> Behalf Of Larry Hall (Cygwin)
>> Sent: Thursday, February 06, 2014 11:39 AM
>> Subject: Re: qsort_r and libc.a version?
>>
>> On 2/6/2014 2:04 PM, Jim Garrison wrote:
>>> I tried to build libgit2 so I could try to build gitg but encountered
>>>
>>>       undefined reference to `qsort_r'
>>>
>>> GitHub has a closed issue for this
>>> https://github.com/libgit2/libgit2/issues/1606 saying that qsort_r was
>>> added to glibc in version 2.8, released in 2008.
>>>
>>> Since libc in Cygwin is part of the base package, how would I find out
>>> which upstream version it's based on?
>>
>> Cygwin uses newlib for its C library.  From what I can see, qsort is there but
>> qsort_r isn't.
>>
>>> There was a commit in libgit2 that was supposed to fix this :
>>>
>>>
>> https://github.com/libgit2/libgit2/commit/0d77647adc1f76df66e437e6442d
>>> 7f7706e2c38e#diff-bb2cd4651768482b99cb1c52d29ceffdR694
>>>
>>> but I don't know enough about Cygwin internals to determine why it
>>> still fails on Cygwin.
>>
>> The problem with that patch is that it doesn't take Cygwin into account.
>> If you append a check for Cygwin there as well (i.e. defined(__CYGWIN__) )
>> then that should resolve the compile issue.
>>
>> --
>> Larry
>
> So the correct patch for this would be to treat __CYGWIN__ the same as
> __MINGW32__ and use the internal git__insertsort_r function?

Yes, give that a try.  This branch may work for Cygwin without any
further changes on either side.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019