-/* int grantpt(int); */
-int heapsort(void *, size_t, size_t,
- int (*)(const void *, const void *));
-char *initstate(unsigned long, char *, long);
-int mergesort(void *, size_t, size_t,
- int (*)(const void *, const void *));
-/* int posix_openpt(int); */
-/* char *ptsname(int); */
-void qsort_r(void *, size_t, size_t, void *,
- int (*)(void *, const void *, const void *));
-int radixsort(const unsigned char **, int, const unsigned char *,
- unsigned);
-void setprogname(const char *);
-int sradixsort(const unsigned char **, int, const unsigned char *,
- unsigned);
+int heapsort(void *__base, size_t __nel, size_t __width,
+ int (* _Nonnull __compar)(const void *, const void *));
+#ifdef __BLOCKS__
+int heapsort_b(void *__base, size_t __nel, size_t __width,
+ int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+int mergesort(void *__base, size_t __nel, size_t __width,
+ int (* _Nonnull __compar)(const void *, const void *));
+#ifdef __BLOCKS__
+int mergesort_b(void *__base, size_t __nel, size_t __width,
+ int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+#ifndef UNIFDEF_DRIVERKIT
+void psort(void *__base, size_t __nel, size_t __width,
+ int (* _Nonnull __compar)(const void *, const void *))
+ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#ifdef __BLOCKS__
+void psort_b(void *__base, size_t __nel, size_t __width,
+ int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+void psort_r(void *__base, size_t __nel, size_t __width, void *,
+ int (* _Nonnull __compar)(void *, const void *, const void *))
+ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* UNIFDEF_DRIVERKIT */
+#ifdef __BLOCKS__
+void qsort_b(void *__base, size_t __nel, size_t __width,
+ int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape)
+ __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
+#endif /* __BLOCKS__ */
+void qsort_r(void *__base, size_t __nel, size_t __width, void *,
+ int (* _Nonnull __compar)(void *, const void *, const void *));
+int radixsort(const unsigned char **__base, int __nel, const unsigned char *__table,
+ unsigned __endbyte);
+int rpmatch(const char *)
+ __API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0));
+int sradixsort(const unsigned char **__base, int __nel, const unsigned char *__table,
+ unsigned __endbyte);
+#ifndef UNIFDEF_DRIVERKIT