#if defined(SINGLE)

#define swap_bytes swap_bytes_sgl

#define calendar_type calendar_type_sgl
#define compare_dates compare_dates_sgl
#define compare_levels compare_levels_sgl
#define compare_lists compare_lists_sgl
#define compare_mean_periods compare_mean_periods_sgl
#define compare_records compare_records_sgl
#define compare_records_between_vars compare_records_between_vars_sgl
#define compare_records_within_var compare_records_within_var_sgl
#define compare_times compare_times_sgl
#define debug_dump_all_headers debug_dump_all_headers_sgl
#define file_parse_core file_parse_core_sgl
#define free_t_axis free_t_axis_sgl
#define free_z_axis free_z_axis_sgl
#define get_extra_data_length get_extra_data_length_sgl
#define get_extra_data_offset_and_length_core get_extra_data_offset_and_length_core_sgl
#define get_ff_disk_length get_ff_disk_length_sgl
#define get_mean_period get_mean_period_sgl
#define get_num_data_words get_num_data_words_sgl
#define get_record get_record_sgl
#define get_type get_type_sgl
#define get_type_and_num_words_core get_type_and_num_words_core_sgl
#define get_valid_records_ff get_valid_records_ff_sgl
#define get_var_compression get_var_compression_sgl
#define get_var_gridcode get_var_gridcode_sgl
#define get_var_packing get_var_packing_sgl
#define get_var_real_fill_value get_var_real_fill_value_sgl
#define get_var_stash_item get_var_stash_item_sgl
#define get_var_stash_model get_var_stash_model_sgl
#define get_var_stash_section get_var_stash_section_sgl
#define get_vars get_vars_sgl
#define gregorian_to_secs gregorian_to_secs_sgl
#define grid_supported grid_supported_sgl
#define initialise_records initialise_records_sgl
#define is_time_mean is_time_mean_sgl
#define lev_set lev_set_sgl
#define level_type level_type_sgl
#define new_t_axis new_t_axis_sgl
#define new_z_axis new_z_axis_sgl
#define process_vars process_vars_sgl
#define read_all_headers read_all_headers_sgl
#define read_all_headers_ff read_all_headers_ff_sgl
#define read_all_headers_pp read_all_headers_pp_sgl
#define read_extra_data_core read_extra_data_core_sgl
#define read_hdr read_hdr_sgl
#define read_hdr_at_offset read_hdr_at_offset_sgl
#define read_record_data_core read_record_data_core_sgl
#define read_record_data_dummy read_record_data_dummy_sgl
#define read_words read_words_sgl
#define records_from_different_vars records_from_different_vars_sgl
#define sec_to_day sec_to_day_sgl
#define set_disambig_index set_disambig_index_sgl
#define skip_fortran_record skip_fortran_record_sgl
#define skip_word skip_word_sgl
#define t_axis_add t_axis_add_sgl
#define test_skip_var test_skip_var_sgl
#define time_diff time_diff_sgl
#define time_set time_set_sgl
#define unpack_run_length_encoded unpack_run_length_encoded_sgl
#define unwgdos unwgdos_sgl
#define var_has_regular_z_t var_has_regular_z_t_sgl
#define var_is_missing var_is_missing_sgl
#define z_axis_add z_axis_add_sgl

#elif defined(DOUBLE)

#define swap_bytes swap_bytes_dbl

#define calendar_type calendar_type_dbl
#define compare_dates compare_dates_dbl
#define compare_levels compare_levels_dbl
#define compare_lists compare_lists_dbl
#define compare_mean_periods compare_mean_periods_dbl
#define compare_records compare_records_dbl
#define compare_records_between_vars compare_records_between_vars_dbl
#define compare_records_within_var compare_records_within_var_dbl
#define compare_times compare_times_dbl
#define debug_dump_all_headers debug_dump_all_headers_dbl
#define file_parse_core file_parse_core_dbl
#define free_t_axis free_t_axis_dbl
#define free_z_axis free_z_axis_dbl
#define get_extra_data_length get_extra_data_length_dbl
#define get_extra_data_offset_and_length_core get_extra_data_offset_and_length_core_dbl
#define get_ff_disk_length get_ff_disk_length_dbl
#define get_mean_period get_mean_period_dbl
#define get_num_data_words get_num_data_words_dbl
#define get_record get_record_dbl
#define get_type get_type_dbl
#define get_type_and_num_words_core get_type_and_num_words_core_dbl
#define get_valid_records_ff get_valid_records_ff_dbl
#define get_var_compression get_var_compression_dbl
#define get_var_gridcode get_var_gridcode_dbl
#define get_var_packing get_var_packing_dbl
#define get_var_real_fill_value get_var_real_fill_value_dbl
#define get_var_stash_item get_var_stash_item_dbl
#define get_var_stash_model get_var_stash_model_dbl
#define get_var_stash_section get_var_stash_section_dbl
#define get_vars get_vars_dbl
#define gregorian_to_secs gregorian_to_secs_dbl
#define grid_supported grid_supported_dbl
#define initialise_records initialise_records_dbl
#define is_time_mean is_time_mean_dbl
#define lev_set lev_set_dbl
#define level_type level_type_dbl
#define new_t_axis new_t_axis_dbl
#define new_z_axis new_z_axis_dbl
#define process_vars process_vars_dbl
#define read_all_headers read_all_headers_dbl
#define read_all_headers_ff read_all_headers_ff_dbl
#define read_all_headers_pp read_all_headers_pp_dbl
#define read_extra_data_core read_extra_data_core_dbl
#define read_hdr read_hdr_dbl
#define read_hdr_at_offset read_hdr_at_offset_dbl
#define read_record_data_core read_record_data_core_dbl
#define read_record_data_dummy read_record_data_dummy_dbl
#define read_words read_words_dbl
#define records_from_different_vars records_from_different_vars_dbl
#define sec_to_day sec_to_day_dbl
#define set_disambig_index set_disambig_index_dbl
#define skip_fortran_record skip_fortran_record_dbl
#define skip_word skip_word_dbl
#define t_axis_add t_axis_add_dbl
#define test_skip_var test_skip_var_dbl
#define time_diff time_diff_dbl
#define time_set time_set_dbl
#define unpack_run_length_encoded unpack_run_length_encoded_dbl
#define unwgdos unwgdos_dbl
#define var_has_regular_z_t var_has_regular_z_t_dbl
#define var_is_missing var_is_missing_dbl
#define z_axis_add z_axis_add_dbl

#else
#error Need to compile this file with -DSINGLE or -DDOUBLE
#endif
