Loading...
libdarwin/stdlib.c Libc-1725.40.4 Libc-1272.200.26
--- Libc/Libc-1725.40.4/libdarwin/stdlib.c
+++ Libc/Libc-1272.200.26/libdarwin/stdlib.c
@@ -24,7 +24,7 @@
 
 #pragma mark API
 void
-os_localtime_file(char buff[static 32])
+os_localtime_file(char buff[32])
 {
 	struct timeval tv;
 	struct tm curtime;
@@ -42,8 +42,9 @@
 // MurmurHash2 was written by Austin Appleby, and is placed in the public
 // domain. The author hereby disclaims copyright to this source code.
 uint64_t
-os_simple_hash_with_seed(const void *buff, size_t len, uint64_t seed)
+os_simple_hash(const void *buff, size_t len)
 {
+	const uint64_t seed = 0;
 #ifdef __LP64__
 	// MurmurHash64A
 	const uint64_t m = 0xc6a4a7935bd1e995;
@@ -125,59 +126,8 @@
 }
 
 uint64_t
-os_simple_hash(const void *buff, size_t len)
-{
-	return os_simple_hash_with_seed(buff, len, 0);
-}
-
-uint64_t
-os_simple_hash_string_with_seed(const char *string, uint64_t seed)
+os_simple_hash_string(const char *string)
 {
 	size_t len = strlen(string);
-	return os_simple_hash_with_seed(string, len, seed);
+	return os_simple_hash(string, len);
 }
-
-uint64_t
-os_simple_hash_string(const char *string)
-{
-	return os_simple_hash_string_with_seed(string, 0);
-}
-
-errno_t
-realpath_np(os_fd_t fd, char buff[static PATH_MAX])
-{
-	errno_t error = -1;
-	int ret = -1;
-
-	ret = fcntl(fd, F_GETPATH, buff);
-	if (ret) {
-		error = errno;
-	} else {
-		error = 0;
-	}
-
-	return error;
-}
-
-errno_t
-memdup_np(void **_new, const void *src, size_t len)
-{
-	void *mynew = NULL;
-
-	mynew = malloc(len);
-	if (!mynew) {
-		return errno;
-	}
-
-	memcpy(mynew, src, len);
-	*_new = mynew;
-	return 0;
-}
-
-void *
-memdup2_np(const void *src, size_t len)
-{
-	void *_new = os_malloc(len);
-	memcpy(_new, src, len);
-	return _new;
-}