| Bug #20530 | qsort redefinition violates the standard | ||
|---|---|---|---|
| Submitted: | 19 Jun 2006 10:15 | Modified: | 20 Dec 2007 0:51 |
| Reporter: | Christopher Yeleighton (Candidate Quality Contributor) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0.23-BK, 5.0.12 | OS: | Windows (Microsoft Windows XP Professiona) |
| Assigned to: | Alexey Kopytov | CPU Architecture: | Any |
| Tags: | qc | ||
[19 Jun 2006 10:15]
Christopher Yeleighton
[19 Jun 2006 10:39]
Valeriy Kravchuk
Thank you for a problem report. I am not sure about standard violation (let developers decide), but even in today's 5.0.23-BK sources we still do declare qsort:
/****************************************************************************
** 'standard' quicksort with the following extensions:
**
** Can be compiled with the qsort2_cmp compare function
** Store ranges on stack to avoid recursion
** Use insert sort on small ranges
** Optimize for sorting of pointers (used often by MySQL)
** Use median comparison to find partition element
*****************************************************************************/
#ifdef QSORT_EXTRA_CMP_ARGUMENT
qsort_t qsort2(void *base_ptr, size_t count, size_t size, qsort2_cmp cmp,
void *cmp_argument)
#else
qsort_t qsort(void *base_ptr, size_t count, size_t size, qsort_cmp cmp)
#endif
[23 Jun 2006 15:04]
Elliot Murphy
The naming causes conflicts on OS X build too. This should be fixed.
[23 Oct 2007 5:10]
Alexey Kopytov
This bug was fixed by the changesets for bug #31207.
[7 Dec 2007 23:07]
Bugs System
Pushed into 6.0.5-alpha
[7 Dec 2007 23:09]
Bugs System
Pushed into 5.1.23-rc
[7 Dec 2007 23:10]
Bugs System
Pushed into 5.0.54
[20 Dec 2007 0:51]
Paul DuBois
Noted in 5.0.54, 5.1.23, 6.0.5 changelogs. The mysys library had a qsort() function, causing conflicts between its use and the qsort() in glibc. Resolved by renaming the mysys version to my_qsort().
