summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-11-02 15:32:52 +0000
committerSascha Schumann <sas@php.net>2000-11-02 15:32:52 +0000
commit9866d899e926c971980fd13ccaa9ab5e83f17b90 (patch)
tree6d44d6d8ef66ac003a33c97aed3fe55deac28c3e
parent3ac8e2581273d799b29a624907a37ade31e921da (diff)
downloadphp-git-9866d899e926c971980fd13ccaa9ab5e83f17b90.tar.gz
Namespace protect mergesort (caused conflict on Darwin).
-rw-r--r--ext/standard/array.c4
-rw-r--r--main/mergesort.c2
-rw-r--r--main/php.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 1478da640b..1a558a07fd 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -1379,7 +1379,7 @@ PHP_FUNCTION(shuffle)
php_error(E_WARNING, "Wrong datatype in shuffle() call");
RETURN_FALSE;
}
- if (zend_hash_sort((*array)->value.ht, (sort_func_t)mergesort, array_data_shuffle, 1) == FAILURE) {
+ if (zend_hash_sort((*array)->value.ht, (sort_func_t)php_mergesort, array_data_shuffle, 1) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -2767,7 +2767,7 @@ PHP_FUNCTION(array_rand)
}
if (num_req_val == num_avail) {
- if (zend_hash_sort(Z_ARRVAL_P(return_value), (sort_func_t)mergesort, array_data_shuffle, 1) == FAILURE) {
+ if (zend_hash_sort(Z_ARRVAL_P(return_value), (sort_func_t)php_mergesort, array_data_shuffle, 1) == FAILURE) {
zval_dtor(return_value);
RETURN_FALSE;
}
diff --git a/main/mergesort.c b/main/mergesort.c
index b173bc1269..c1eb8bc26e 100644
--- a/main/mergesort.c
+++ b/main/mergesort.c
@@ -100,7 +100,7 @@ static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const voi
/*
* Arguments are as for qsort.
*/
-int mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *))
+int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *))
{
register unsigned int i;
register int sense;
diff --git a/main/php.h b/main/php.h
index 54d2e6ed40..b4b90ba6b7 100644
--- a/main/php.h
+++ b/main/php.h
@@ -272,7 +272,7 @@ int php_startup_internal_extensions(void);
int php_global_startup_internal_extensions(void);
int php_global_shutdown_internal_extensions(void);
-int mergesort(void *base, size_t nmemb, register size_t size, int (*cmp) (const void *, const void *));
+int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp) (const void *, const void *));
PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata);