Re: test-mergesort conflict with stdlib.h
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 17, 2012, 17:46 UTC
- Message-ID
- <7vd376ntem.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <E6D295C2-C35E-4ECF-990D-FCF8407C2429@gernhardtsoftware.com>
Brian Gernhardt <brian@gernhardtsoftware.com> writes:
Show 14 quoted lines
> On OS X 10.7.3, I get the following error attempting to build next: > > CC test-mergesort.o > In file included from test-mergesort.c:2: > ./mergesort.h:4:7: error: conflicting types for 'mergesort' > void *mergesort(void *list, > ^ > /usr/include/stdlib.h:306:6: note: previous declaration is here > int mergesort(void *, size_t, size_t, > ^ > > This appears to be due to the fact that 0db71e0: "add mergesort() for > linked lists" added a mergesort implementation with a different > signature than a mergesort implemented by OS X's standard library.
Unfortunate. OS X shouldn't contaminate the user namespace by adding such names in stdlib.h (which incidentally has qsort()), but the damage is done already, so I am not opposed to rename it to llist_mergesort() or something.