1 /***********************************************************************/ 2 /* */ 3 /* Objective Caml */ 4 /* */ 5 /* Damien Doligez, projet Moscova, INRIA Rocquencourt */ 6 /* */ 7 /* Copyright 2003 Institut National de Recherche en Informatique et */ 8 /* en Automatique. All rights reserved. This file is distributed */ 9 /* under the terms of the GNU Library General Public License, with */ 10 /* the special exception on linking described in file ../LICENSE. */ 11 /* */ 12 /***********************************************************************/ 13 14 /* $Id: compatibility.h,v 1.13 2004/06/14 14:28:30 doligez Exp $ */ 15 16 /* definitions for compatibility with old identifiers */ 17 18 #ifndef CAML_COMPATIBILITY_H 19 #define CAML_COMPATIBILITY_H 20 21 #ifndef CAML_NAME_SPACE 22 23 /* 24 #define --> CAMLextern (defined with CAMLexport or CAMLprim) 25 (rien) --> CAMLprim 26 g --> global C identifier 27 x --> special case 28 29 SP* signals the special cases: 30 - when the identifier was not simply prefixed with [caml_] 31 - when the [caml_] version was already used for something else, and 32 was renamed out of the way (watch out for [caml_alloc] and 33 [caml_array_bound_error] in *.s) 34 */ 35 36 /* a faire: 37 - ui_* (reverifier que win32.c n'en depend pas) 38 */ 39 40 41 /* **** alloc.c */ 42 #define alloc caml_alloc /*SP*/ 43 #define alloc_small caml_alloc_small 44 #define alloc_tuple caml_alloc_tuple 45 #define alloc_string caml_alloc_string 46 #define alloc_final caml_alloc_final 47 #define copy_string caml_copy_string 48 #define alloc_array caml_alloc_array 49 #define copy_string_array caml_copy_string_array 50 #define convert_flag_list caml_convert_flag_list 51 52 /* **** array.c */ 53 54 /* **** backtrace.c */ 55 #define backtrace_active caml_backtrace_active 56 #define backtrace_pos caml_backtrace_pos 57 #define backtrace_buffer caml_backtrace_buffer 58 #define backtrace_last_exn caml_backtrace_last_exn 59 #define print_exception_backtrace caml_print_exception_backtrace 60 61 /* **** callback.c */ 62 #define callback_depth caml_callback_depth 63 #define callbackN_exn caml_callbackN_exn 64 #define callback_exn caml_callback_exn 65 #define callback2_exn caml_callback2_exn 66 #define callback3_exn caml_callback3_exn 67 #define callback caml_callback 68 #define callback2 caml_callback2 69 #define callback3 caml_callback3 70 #define callbackN caml_callbackN 71 72 /* **** compact.c */ 73 74 /* **** compare.c */ 75 #define compare_unordered caml_compare_unordered 76 77 /* **** custom.c */ 78 #define alloc_custom caml_alloc_custom 79 #define register_custom_operations caml_register_custom_operations 80 81 /* **** debugger.c */ 82 83 /* **** dynlink.c */ 84 85 /* **** extern.c */ 86 #define output_val caml_output_val 87 #define output_value_to_malloc caml_output_value_to_malloc 88 #define output_value_to_block caml_output_value_to_block 89 #define serialize_int_1 caml_serialize_int_1 90 #define serialize_int_2 caml_serialize_int_2 91 #define serialize_int_4 caml_serialize_int_4 92 #define serialize_int_8 caml_serialize_int_8 93 #define serialize_float_4 caml_serialize_float_4 94 #define serialize_float_8 caml_serialize_float_8 95 #define serialize_block_1 caml_serialize_block_1 96 #define serialize_block_2 caml_serialize_block_2 97 #define serialize_block_4 caml_serialize_block_4 98 #define serialize_block_8 caml_serialize_block_8 99 #define serialize_block_float_8 caml_serialize_block_float_8 100 101 /* **** fail.c */ 102 #define external_raise caml_external_raise 103 #define mlraise caml_raise /*SP*/ 104 #define raise_constant caml_raise_constant 105 #define raise_with_arg caml_raise_with_arg 106 #define raise_with_string caml_raise_with_string 107 #define failwith caml_failwith 108 #define invalid_argument caml_invalid_argument 109 #define array_bound_error caml_array_bound_error /*SP*/ 110 #define raise_out_of_memory caml_raise_out_of_memory 111 #define raise_stack_overflow caml_raise_stack_overflow 112 #define raise_sys_error caml_raise_sys_error 113 #define raise_end_of_file caml_raise_end_of_file 114 #define raise_zero_divide caml_raise_zero_divide 115 #define raise_not_found caml_raise_not_found 116 #define raise_sys_blocked_io caml_raise_sys_blocked_io 117 #define init_exceptions caml_init_exceptions 118 /* **** asmrun/fail.c */ 119 /* **** asmrun/<arch>.s */ 120 121 /* **** finalise.c */ 122 123 /* **** fix_code.c */ 124 125 /* **** floats.c */ 126 /*#define Double_val caml_Double_val done in mlvalues.h as needed */ 127 /*#define Store_double_val caml_Store_double_val done in mlvalues.h as needed */ 128 #define copy_double caml_copy_double 129 130 /* **** freelist.c */ 131 132 /* **** gc_ctrl.c */ 133 134 /* **** globroots.c */ 135 #define register_global_root caml_register_global_root 136 #define remove_global_root caml_remove_global_root 137 138 /* **** hash.c */ 139 #define hash_variant caml_hash_variant 140 141 /* **** instrtrace.c */ 142 143 /* **** intern.c */ 144 #define input_val caml_input_val 145 #define input_val_from_string caml_input_val_from_string 146 #define input_value_from_malloc caml_input_value_from_malloc 147 #define input_value_from_block caml_input_value_from_block 148 #define deserialize_uint_1 caml_deserialize_uint_1 149 #define deserialize_sint_1 caml_deserialize_sint_1 150 #define deserialize_uint_2 caml_deserialize_uint_2 151 #define deserialize_sint_2 caml_deserialize_sint_2 152 #define deserialize_uint_4 caml_deserialize_uint_4 153 #define deserialize_sint_4 caml_deserialize_sint_4 154 #define deserialize_uint_8 caml_deserialize_uint_8 155 #define deserialize_sint_8 caml_deserialize_sint_8 156 #define deserialize_float_4 caml_deserialize_float_4 157 #define deserialize_float_8 caml_deserialize_float_8 158 #define deserialize_block_1 caml_deserialize_block_1 159 #define deserialize_block_2 caml_deserialize_block_2 160 #define deserialize_block_4 caml_deserialize_block_4 161 #define deserialize_block_8 caml_deserialize_block_8 162 #define deserialize_block_float_8 caml_deserialize_block_float_8 163 #define deserialize_error caml_deserialize_error 164 165 /* **** interp.c */ 166 167 /* **** ints.c */ 168 #define int32_ops caml_int32_ops 169 #define copy_int32 caml_copy_int32 170 /*#define Int64_val caml_Int64_val *** done in mlvalues.h as needed */ 171 #define int64_ops caml_int64_ops 172 #define copy_int64 caml_copy_int64 173 #define nativeint_ops caml_nativeint_ops 174 #define copy_nativeint caml_copy_nativeint 175 176 /* **** io.c */ 177 #define channel_mutex_free caml_channel_mutex_free 178 #define channel_mutex_lock caml_channel_mutex_lock 179 #define channel_mutex_unlock caml_channel_mutex_unlock 180 #define channel_mutex_unlock_exn caml_channel_mutex_unlock_exn 181 #define all_opened_channels caml_all_opened_channels 182 #define open_descriptor_in caml_open_descriptor_in /*SP*/ 183 #define open_descriptor_out caml_open_descriptor_out /*SP*/ 184 #define close_channel caml_close_channel /*SP*/ 185 #define channel_size caml_channel_size /*SP*/ 186 #define channel_binary_mode caml_channel_binary_mode 187 #define flush_partial caml_flush_partial /*SP*/ 188 #define flush caml_flush /*SP*/ 189 #define putword caml_putword 190 #define putblock caml_putblock 191 #define really_putblock caml_really_putblock 192 #define seek_out caml_seek_out /*SP*/ 193 #define pos_out caml_pos_out /*SP*/ 194 #define do_read caml_do_read 195 #define refill caml_refill 196 #define getword caml_getword 197 #define getblock caml_getblock 198 #define really_getblock caml_really_getblock 199 #define seek_in caml_seek_in /*SP*/ 200 #define pos_in caml_pos_in /*SP*/ 201 #define input_scan_line caml_input_scan_line /*SP*/ 202 #define finalize_channel caml_finalize_channel 203 #define alloc_channel caml_alloc_channel 204 /*#define Val_file_offset caml_Val_file_offset *** done in io.h as needed */ 205 /*#define File_offset_val caml_File_offset_val *** done in io.h as needed */ 206 207 /* **** lexing.c */ 208 209 /* **** main.c */ 210 /* *** no change */ 211 212 /* **** major_gc.c */ 213 #define heap_start caml_heap_start 214 #define heap_end caml_heap_end 215 #define page_table caml_page_table 216 217 /* **** md5.c */ 218 #define md5_string caml_md5_string 219 #define md5_chan caml_md5_chan 220 #define MD5Init caml_MD5Init 221 #define MD5Update caml_MD5Update 222 #define MD5Final caml_MD5Final 223 #define MD5Transform caml_MD5Transform 224 225 /* **** memory.c */ 226 #define alloc_shr caml_alloc_shr 227 #define initialize caml_initialize 228 #define modify caml_modify 229 #define stat_alloc caml_stat_alloc 230 #define stat_free caml_stat_free 231 #define stat_resize caml_stat_resize 232 233 /* **** meta.c */ 234 235 /* **** minor_gc.c */ 236 #define young_start caml_young_start 237 #define young_end caml_young_end 238 #define young_ptr caml_young_ptr 239 #define young_limit caml_young_limit 240 #define ref_table_ptr caml_ref_table_ptr 241 #define ref_table_limit caml_ref_table_limit 242 #define minor_collection caml_minor_collection 243 #define check_urgent_gc caml_check_urgent_gc 244 245 /* **** misc.c */ 246 247 /* **** obj.c */ 248 249 /* **** parsing.c */ 250 251 /* **** prims.c */ 252 253 /* **** printexc.c */ 254 #define format_caml_exception caml_format_exception /*SP*/ 255 256 /* **** roots.c */ 257 #define local_roots caml_local_roots 258 #define scan_roots_hook caml_scan_roots_hook 259 #define do_local_roots caml_do_local_roots 260 261 /* **** signals.c */ 262 #define async_signal_mode caml_async_signal_mode 263 #define pending_signal caml_pending_signal 264 #define something_to_do caml_something_to_do 265 #define enter_blocking_section_hook caml_enter_blocking_section_hook 266 #define leave_blocking_section_hook caml_leave_blocking_section_hook 267 #define async_action_hook caml_async_action_hook 268 #define enter_blocking_section caml_enter_blocking_section 269 #define leave_blocking_section caml_leave_blocking_section 270 #define convert_signal_number caml_convert_signal_number 271 /* **** asmrun/signals.c */ 272 #define garbage_collection caml_garbage_collection 273 274 /* **** stacks.c */ 275 #define stack_low caml_stack_low 276 #define stack_high caml_stack_high 277 #define stack_threshold caml_stack_threshold 278 #define extern_sp caml_extern_sp 279 #define trapsp caml_trapsp 280 #define trap_barrier caml_trap_barrier 281 282 /* **** startup.c */ 283 #define atom_table caml_atom_table 284 /* **** asmrun/startup.c */ 285 #define static_data_start caml_static_data_start 286 #define static_data_end caml_static_data_end 287 288 /* **** str.c */ 289 #define string_length caml_string_length 290 291 /* **** sys.c */ 292 #define sys_error caml_sys_error 293 #define sys_exit caml_sys_exit 294 295 /* **** terminfo.c */ 296 297 /* **** unix.c & win32.c */ 298 #define search_exe_in_path caml_search_exe_in_path 299 300 /* **** weak.c */ 301 302 /* **** asmcomp/asmlink.ml */ 303 304 /* **** asmcomp/cmmgen.ml */ 305 306 /* **** asmcomp/asmlink.ml, asmcomp/cmmgen.ml, asmcomp/compilenv.ml */ 307 308 #endif /* CAML_NAME_SPACE */ 309 #endif /* CAML_COMPATIBILITY_H */ 310