> -----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? -- 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