@@ -58,40 +58,30 @@ add_feature_info(futimens GIT_USE_FUTIMENS "futimens support")
5858
5959# qsort
6060
61- # for these tests, temporarily save CMAKE_C_FLAGS and disable warnings about
62- # unused functions and parameters, otherwise they will always fail if
63- # ENABLE_WERROR is on
64- set (SAVED_CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
65- disable_warnings(unused-function)
66- disable_warnings(unused-parameter)
67-
6861# old-style FreeBSD qsort_r() has the 'context' parameter as the first argument
6962# of the comparison function:
70- check_prototype_definition (qsort_r
63+ check_prototype_definition_safe (qsort_r
7164 "void (qsort_r)(void *base, size_t nmemb, size_t size, void *context, int (*compar)(void *, const void *, const void *))"
7265 "" "stdlib.h" GIT_QSORT_BSD)
7366
7467# GNU or POSIX qsort_r() has the 'context' parameter as the last argument of the
7568# comparison function:
76- check_prototype_definition (qsort_r
69+ check_prototype_definition_safe (qsort_r
7770 "void (qsort_r)(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *context)"
7871 "" "stdlib.h" GIT_QSORT_GNU)
7972
8073# C11 qsort_s() has the 'context' parameter as the last argument of the
8174# comparison function, and returns an error status:
82- check_prototype_definition (qsort_s
75+ check_prototype_definition_safe (qsort_s
8376 "errno_t (qsort_s)(void *base, rsize_t nmemb, rsize_t size, int (*compar)(const void *, const void *, void *), void *context)"
8477 "0" "stdlib.h" GIT_QSORT_C11)
8578
8679# MSC qsort_s() has the 'context' parameter as the first argument of the
8780# comparison function, and as the last argument of qsort_s():
88- check_prototype_definition (qsort_s
81+ check_prototype_definition_safe (qsort_s
8982 "void (qsort_s)(void *base, size_t num, size_t width, int (*compare )(void *, const void *, const void *), void *context)"
9083 "" "stdlib.h" GIT_QSORT_MSC)
9184
92- # restore CMAKE_C_FLAGS
93- set (CMAKE_C_FLAGS "${SAVED_CMAKE_C_FLAGS} " )
94-
9585# random / entropy data
9686
9787check_function_exists(getentropy GIT_RAND_GETENTROPY)
0 commit comments