this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add stubs for libcache

+311 -2
+2 -1
cmake/use_ld64.cmake
··· 127 127 -Wl,-dylib_file,/usr/lib/libcoretls.dylib:${CMAKE_BINARY_DIR}/src/external/coretls/libcoretls.dylib \ 128 128 -Wl,-dylib_file,/usr/lib/libenergytrace.dylib:${CMAKE_BINARY_DIR}/src/external/energytrace/libenergytrace.dylib \ 129 129 -Wl,-dylib_file,/System/Library/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory:${CMAKE_BINARY_DIR}/src/frameworks/CFOpenDirectory/CFOpenDirectory \ 130 - -Wl,-dylib_file,/usr/lib/libnetwork.dylib:${CMAKE_BINARY_DIR}/src/external/libnetwork/libnetwork.dylib") 130 + -Wl,-dylib_file,/usr/lib/libnetwork.dylib:${CMAKE_BINARY_DIR}/src/external/libnetwork/libnetwork.dylib \ 131 + -Wl,-dylib_file,/usr/lib/system/libcache.dylib:${CMAKE_BINARY_DIR}/src/libcache/libcache.dylib") 131 132 132 133 add_dependencies(${target} x86_64-apple-darwin11-ld) 133 134
+1
src/CMakeLists.txt
··· 139 139 add_subdirectory(libremovefile) 140 140 add_subdirectory(launchd) 141 141 add_subdirectory(keymgr) 142 + add_subdirectory(libcache) 142 143 add_subdirectory(ncurses) 143 144 add_subdirectory(libiconv) 144 145 add_subdirectory(libelfloader)
+20
src/libcache/CMakeLists.txt
··· 1 + project(cache) 2 + 3 + set(DYLIB_INSTALL_NAME "/usr/lib/system/libcache.dylib") 4 + set(DYLIB_COMPAT_VERSION "1.0.0") 5 + set(DYLIB_CURRENT_VERSION "83.0.0") 6 + 7 + include_directories(include) 8 + 9 + add_circular(libcache FAT 10 + SOURCES 11 + src/cache.c 12 + SIBLINGS 13 + system_c 14 + system_dyld 15 + system_malloc 16 + platform 17 + system_kernel 18 + ) 19 + set_target_properties(libcache PROPERTIES OUTPUT_NAME "cache") 20 + install(TARGETS libcache DESTINATION libexec/darling/usr/lib/system)
+64
src/libcache/include/cache/cache.h
··· 1 + /** 2 + * This file is part of Darling. 3 + * 4 + * Copyright (C) 2020 Lubos Dolezel 5 + * 6 + * Darling is free software: you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation, either version 3 of the License, or 9 + * (at your option) any later version. 10 + * 11 + * Darling is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #ifndef _CACHE_CACHE_H_ 21 + #define _CACHE_CACHE_H_ 22 + 23 + #ifdef __cplusplus 24 + extern "C" { 25 + #endif 26 + 27 + void* cache_create(void); 28 + void* cache_destroy(void); 29 + void* cache_get(void); 30 + void* cache_get_and_retain(void); 31 + void* cache_get_cost_hint(void); 32 + void* cache_get_count_hint(void); 33 + void* cache_get_info(void); 34 + void* cache_get_info_for_key(void); 35 + void* cache_get_info_for_keys(void); 36 + void* cache_get_minimum_values_hint(void); 37 + void* cache_get_name(void); 38 + void* cache_hash_byte_string(void); 39 + void* cache_invoke(void); 40 + void* cache_key_hash_cb_cstring(void); 41 + void* cache_key_hash_cb_integer(void); 42 + void* cache_key_is_equal_cb_cstring(void); 43 + void* cache_key_is_equal_cb_integer(void); 44 + void* cache_print(void); 45 + void* cache_print_stats(void); 46 + void* cache_release_cb_free(void); 47 + void* cache_release_value(void); 48 + void* cache_remove(void); 49 + void* cache_remove_all(void); 50 + void* cache_remove_with_block(void); 51 + void* cache_set_and_retain(void); 52 + void* cache_set_cost_hint(void); 53 + void* cache_set_count_hint(void); 54 + void* cache_set_minimum_values_hint(void); 55 + void* cache_set_name(void); 56 + void* cache_simulate_memory_warning_event(void); 57 + void* cache_value_make_nonpurgeable_cb(void); 58 + void* cache_value_make_purgeable_cb(void); 59 + 60 + #ifdef __cplusplus 61 + }; 62 + #endif 63 + 64 + #endif // _CACHE_CACHE_H_
+221
src/libcache/src/cache.c
··· 1 + /** 2 + * This file is part of Darling. 3 + * 4 + * Copyright (C) 2020 Lubos Dolezel 5 + * 6 + * Darling is free software: you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License as published by 8 + * the Free Software Foundation, either version 3 of the License, or 9 + * (at your option) any later version. 10 + * 11 + * Darling is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #include <cache/cache.h> 21 + #include <stdlib.h> 22 + #include <stdio.h> 23 + 24 + static int verbose = 0; 25 + 26 + __attribute__((constructor)) 27 + static void initme(void) { 28 + verbose = getenv("STUB_VERBOSE") != NULL; 29 + } 30 + 31 + void* cache_create(void) 32 + { 33 + if (verbose) puts("STUB: cache_create called"); 34 + return NULL; 35 + } 36 + 37 + void* cache_destroy(void) 38 + { 39 + if (verbose) puts("STUB: cache_destroy called"); 40 + return NULL; 41 + } 42 + 43 + void* cache_get(void) 44 + { 45 + if (verbose) puts("STUB: cache_get called"); 46 + return NULL; 47 + } 48 + 49 + void* cache_get_and_retain(void) 50 + { 51 + if (verbose) puts("STUB: cache_get_and_retain called"); 52 + return NULL; 53 + } 54 + 55 + void* cache_get_cost_hint(void) 56 + { 57 + if (verbose) puts("STUB: cache_get_cost_hint called"); 58 + return NULL; 59 + } 60 + 61 + void* cache_get_count_hint(void) 62 + { 63 + if (verbose) puts("STUB: cache_get_count_hint called"); 64 + return NULL; 65 + } 66 + 67 + void* cache_get_info(void) 68 + { 69 + if (verbose) puts("STUB: cache_get_info called"); 70 + return NULL; 71 + } 72 + 73 + void* cache_get_info_for_key(void) 74 + { 75 + if (verbose) puts("STUB: cache_get_info_for_key called"); 76 + return NULL; 77 + } 78 + 79 + void* cache_get_info_for_keys(void) 80 + { 81 + if (verbose) puts("STUB: cache_get_info_for_keys called"); 82 + return NULL; 83 + } 84 + 85 + void* cache_get_minimum_values_hint(void) 86 + { 87 + if (verbose) puts("STUB: cache_get_minimum_values_hint called"); 88 + return NULL; 89 + } 90 + 91 + void* cache_get_name(void) 92 + { 93 + if (verbose) puts("STUB: cache_get_name called"); 94 + return NULL; 95 + } 96 + 97 + void* cache_hash_byte_string(void) 98 + { 99 + if (verbose) puts("STUB: cache_hash_byte_string called"); 100 + return NULL; 101 + } 102 + 103 + void* cache_invoke(void) 104 + { 105 + if (verbose) puts("STUB: cache_invoke called"); 106 + return NULL; 107 + } 108 + 109 + void* cache_key_hash_cb_cstring(void) 110 + { 111 + if (verbose) puts("STUB: cache_key_hash_cb_cstring called"); 112 + return NULL; 113 + } 114 + 115 + void* cache_key_hash_cb_integer(void) 116 + { 117 + if (verbose) puts("STUB: cache_key_hash_cb_integer called"); 118 + return NULL; 119 + } 120 + 121 + void* cache_key_is_equal_cb_cstring(void) 122 + { 123 + if (verbose) puts("STUB: cache_key_is_equal_cb_cstring called"); 124 + return NULL; 125 + } 126 + 127 + void* cache_key_is_equal_cb_integer(void) 128 + { 129 + if (verbose) puts("STUB: cache_key_is_equal_cb_integer called"); 130 + return NULL; 131 + } 132 + 133 + void* cache_print(void) 134 + { 135 + if (verbose) puts("STUB: cache_print called"); 136 + return NULL; 137 + } 138 + 139 + void* cache_print_stats(void) 140 + { 141 + if (verbose) puts("STUB: cache_print_stats called"); 142 + return NULL; 143 + } 144 + 145 + void* cache_release_cb_free(void) 146 + { 147 + if (verbose) puts("STUB: cache_release_cb_free called"); 148 + return NULL; 149 + } 150 + 151 + void* cache_release_value(void) 152 + { 153 + if (verbose) puts("STUB: cache_release_value called"); 154 + return NULL; 155 + } 156 + 157 + void* cache_remove(void) 158 + { 159 + if (verbose) puts("STUB: cache_remove called"); 160 + return NULL; 161 + } 162 + 163 + void* cache_remove_all(void) 164 + { 165 + if (verbose) puts("STUB: cache_remove_all called"); 166 + return NULL; 167 + } 168 + 169 + void* cache_remove_with_block(void) 170 + { 171 + if (verbose) puts("STUB: cache_remove_with_block called"); 172 + return NULL; 173 + } 174 + 175 + void* cache_set_and_retain(void) 176 + { 177 + if (verbose) puts("STUB: cache_set_and_retain called"); 178 + return NULL; 179 + } 180 + 181 + void* cache_set_cost_hint(void) 182 + { 183 + if (verbose) puts("STUB: cache_set_cost_hint called"); 184 + return NULL; 185 + } 186 + 187 + void* cache_set_count_hint(void) 188 + { 189 + if (verbose) puts("STUB: cache_set_count_hint called"); 190 + return NULL; 191 + } 192 + 193 + void* cache_set_minimum_values_hint(void) 194 + { 195 + if (verbose) puts("STUB: cache_set_minimum_values_hint called"); 196 + return NULL; 197 + } 198 + 199 + void* cache_set_name(void) 200 + { 201 + if (verbose) puts("STUB: cache_set_name called"); 202 + return NULL; 203 + } 204 + 205 + void* cache_simulate_memory_warning_event(void) 206 + { 207 + if (verbose) puts("STUB: cache_simulate_memory_warning_event called"); 208 + return NULL; 209 + } 210 + 211 + void* cache_value_make_nonpurgeable_cb(void) 212 + { 213 + if (verbose) puts("STUB: cache_value_make_nonpurgeable_cb called"); 214 + return NULL; 215 + } 216 + 217 + void* cache_value_make_purgeable_cb(void) 218 + { 219 + if (verbose) puts("STUB: cache_value_make_purgeable_cb called"); 220 + return NULL; 221 + }
+3 -1
src/libsystem/CMakeLists.txt
··· 86 86 system_dnssd 87 87 system_networkextension 88 88 system_darwin 89 + libcache 89 90 ) 90 91 91 92 add_dependencies(system system_malloc system_m) ··· 122 123 -sub_library libcorecrypto \ 123 124 -sub_library libsystem_dnssd \ 124 125 -sub_library libsystem_networkextension \ 125 - -sub_library libsystem_darwin") 126 + -sub_library libsystem_darwin \ 127 + -sub_library libcache") 126 128 127 129 install(TARGETS system DESTINATION libexec/darling/usr/lib) 128 130