Bug 1237471: Fix VS2015 build by not using custom snprintf/vsnprintf functions when having VS2015's. r=jya draft
authorBas Schouten <bschouten@mozilla.com>
Thu, 07 Jan 2016 03:16:58 +0100
changeset 319540 8d140408c8e2c3596efc7e52afb98f7585c3f0a1
parent 319539 733d3f5c161975dcd8ed476a7c923dad42c117eb
child 512605 799d004828b2e89db48eca589e364376466ae44c
push id9045
push userbschouten@mozilla.com
push dateThu, 07 Jan 2016 02:17:33 +0000
reviewersjya
bugs1237471
milestone46.0a1
Bug 1237471: Fix VS2015 build by not using custom snprintf/vsnprintf functions when having VS2015's. r=jya
media/ffvpx/ffvpxcommon.mozbuild
media/ffvpx/libavutil/avutil-54-oldmsvc.symbols
media/ffvpx/libavutil/avutil-54.symbols
media/ffvpx/libavutil/moz.build
--- a/media/ffvpx/ffvpxcommon.mozbuild
+++ b/media/ffvpx/ffvpxcommon.mozbuild
@@ -68,13 +68,14 @@ elif CONFIG['_MSC_VER']:
         '-wd4245', # conversion from 'int' to 'uint32_t', signed/unsigned mismatch
         '-wd4703', # potentially uninitialized local pointer
         '-wd4293', # '<<' : shift count negative or too big, undefined behavior
         # from FFmpeg configure
         '-wd4244', '-wd4127', '-wd4018', '-wd4389', '-wd4146', '-wd4701',
         '-wd4057', '-wd4204', '-wd4706', '-wd4305', '-wd4152', '-wd4324',
         '-we4013', '-wd4100', '-wd4214', '-wd4307', '-wd4273', '-wd4554',
     ]
-    DEFINES['snprintf'] = "avpriv_snprintf"
-    DEFINES['_snprintf'] = "avpriv_snprintf"
-    DEFINES['vsnprintf'] = "avpriv_vsnprintf"
+    if CONFIG['_MSC_VER'] < '1900':
+        DEFINES['snprintf'] = "avpriv_snprintf"
+        DEFINES['_snprintf'] = "avpriv_snprintf"
+        DEFINES['vsnprintf'] = "avpriv_vsnprintf"
 
 DEFINES['HAVE_AV_CONFIG_H'] = True
new file mode 100644
--- /dev/null
+++ b/media/ffvpx/libavutil/avutil-54-oldmsvc.symbols
@@ -0,0 +1,353 @@
+av_add_q
+av_add_stable
+av_adler32_update
+av_append_path_component
+av_asprintf
+av_base64_decode
+av_base64_encode
+av_basename
+av_bprint_append_data
+av_bprint_channel_layout
+av_bprint_chars
+av_bprint_clear
+av_bprint_escape
+av_bprint_finalize
+av_bprint_get_buffer
+av_bprint_init
+av_bprint_init_for_buffer
+av_bprint_strftime
+av_bprintf
+av_buffer_alloc
+av_buffer_allocz
+av_buffer_create
+av_buffer_default_free
+av_buffer_get_opaque
+av_buffer_get_ref_count
+av_buffer_is_writable
+av_buffer_make_writable
+av_buffer_pool_get
+av_buffer_pool_init
+av_buffer_pool_uninit
+av_buffer_realloc
+av_buffer_ref
+av_buffer_unref
+av_calloc
+av_channel_layout_extract_channel
+av_chroma_location_name
+av_color_primaries_name
+av_color_range_name
+av_color_space_name
+av_color_transfer_name
+av_compare_mod
+av_compare_ts
+av_cpu_count
+av_crc
+av_crc_get_table
+av_crc_init
+av_ctz
+av_d2q
+av_d2str
+av_default_get_category
+av_default_item_name
+av_dict_copy
+av_dict_count
+av_dict_free
+av_dict_get
+av_dict_get_string
+av_dict_parse_string
+av_dict_set
+av_dict_set_int
+av_dirname
+av_display_matrix_flip
+av_display_rotation_get
+av_display_rotation_set
+av_div_q
+av_dynarray2_add
+av_dynarray_add
+av_dynarray_add_nofree
+av_escape
+av_expr_eval
+av_expr_free
+av_expr_parse
+av_expr_parse_and_eval
+av_fast_malloc
+av_fast_realloc
+av_fifo_alloc
+av_fifo_alloc_array
+av_fifo_drain
+av_fifo_free
+av_fifo_freep
+av_fifo_generic_peek
+av_fifo_generic_read
+av_fifo_generic_write
+av_fifo_grow
+av_fifo_realloc2
+av_fifo_reset
+av_fifo_size
+av_fifo_space
+av_find_best_pix_fmt_of_2
+av_find_info_tag
+av_find_nearest_q_idx
+av_force_cpu_flags
+av_frame_alloc
+av_frame_clone
+av_frame_copy
+av_frame_copy_props
+av_frame_free
+av_frame_get_best_effort_timestamp
+av_frame_get_buffer
+av_frame_get_channel_layout
+av_frame_get_channels
+av_frame_get_color_range
+av_frame_get_colorspace
+av_frame_get_decode_error_flags
+av_frame_get_metadata
+av_frame_get_pkt_duration
+av_frame_get_pkt_pos
+av_frame_get_pkt_size
+av_frame_get_plane_buffer
+av_frame_get_qp_table
+av_frame_get_sample_rate
+av_frame_get_side_data
+av_frame_is_writable
+av_frame_make_writable
+av_frame_move_ref
+av_frame_new_side_data
+av_frame_ref
+av_frame_remove_side_data
+av_frame_set_best_effort_timestamp
+av_frame_set_channel_layout
+av_frame_set_channels
+av_frame_set_color_range
+av_frame_set_colorspace
+av_frame_set_decode_error_flags
+av_frame_set_metadata
+av_frame_set_pkt_duration
+av_frame_set_pkt_pos
+av_frame_set_pkt_size
+av_frame_set_qp_table
+av_frame_set_sample_rate
+av_frame_side_data_name
+av_frame_unref
+av_free
+av_freep
+av_gcd
+av_get_alt_sample_fmt
+av_get_bits_per_pixel
+av_get_bytes_per_sample
+av_get_channel_description
+av_get_channel_layout
+av_get_channel_layout_channel_index
+av_get_channel_layout_nb_channels
+av_get_channel_layout_string
+av_get_channel_name
+av_get_colorspace_name
+av_get_cpu_flags
+av_get_default_channel_layout
+av_get_double
+av_get_int
+av_get_known_color_name
+av_get_media_type_string
+av_get_packed_sample_fmt
+av_get_padded_bits_per_pixel
+av_get_picture_type_char
+av_get_pix_fmt
+av_get_pix_fmt_loss
+av_get_pix_fmt_name
+av_get_pix_fmt_string
+av_get_planar_sample_fmt
+av_get_q
+av_get_sample_fmt
+av_get_sample_fmt_name
+av_get_sample_fmt_string
+av_get_standard_channel_layout
+av_get_string
+av_get_time_base_q
+av_get_token
+av_gettime
+av_gettime_relative
+av_gettime_relative_is_monotonic
+av_image_alloc
+av_image_check_sar
+av_image_check_size
+av_image_copy
+av_image_copy_plane
+av_image_copy_to_buffer
+av_image_fill_arrays
+av_image_fill_linesizes
+av_image_fill_max_pixsteps
+av_image_fill_pointers
+av_image_get_buffer_size
+av_image_get_linesize
+av_int_list_length_for_size
+av_isdigit
+av_isgraph
+av_isspace
+av_isxdigit
+av_log
+av_log2
+av_log2_16bit
+av_log_default_callback
+av_log_format_line
+av_log_get_flags
+av_log_get_level
+av_log_set_callback
+av_log_set_flags
+av_log_set_level
+av_malloc
+av_mallocz
+av_match_list
+av_match_name
+av_max_alloc
+av_memcpy_backptr
+av_memdup
+av_mul_q
+av_nearer_q
+av_next_option
+av_opt_child_class_next
+av_opt_child_next
+av_opt_copy
+av_opt_eval_double
+av_opt_eval_flags
+av_opt_eval_float
+av_opt_eval_int
+av_opt_eval_int64
+av_opt_eval_q
+av_opt_find
+av_opt_find2
+av_opt_flag_is_set
+av_opt_free
+av_opt_freep_ranges
+av_opt_get
+av_opt_get_channel_layout
+av_opt_get_dict_val
+av_opt_get_double
+av_opt_get_image_size
+av_opt_get_int
+av_opt_get_key_value
+av_opt_get_pixel_fmt
+av_opt_get_q
+av_opt_get_sample_fmt
+av_opt_get_video_rate
+av_opt_is_set_to_default
+av_opt_is_set_to_default_by_name
+av_opt_next
+av_opt_ptr
+av_opt_query_ranges
+av_opt_query_ranges_default
+av_opt_serialize
+av_opt_set
+av_opt_set_bin
+av_opt_set_channel_layout
+av_opt_set_defaults
+av_opt_set_defaults2
+av_opt_set_dict
+av_opt_set_dict2
+av_opt_set_dict_val
+av_opt_set_double
+av_opt_set_from_string
+av_opt_set_image_size
+av_opt_set_int
+av_opt_set_pixel_fmt
+av_opt_set_q
+av_opt_set_sample_fmt
+av_opt_set_video_rate
+av_opt_show2
+av_parse_color
+av_parse_cpu_caps
+av_parse_cpu_flags
+av_parse_ratio
+av_parse_time
+av_parse_video_rate
+av_parse_video_size
+av_pix_fmt_count_planes
+av_pix_fmt_desc_get
+av_pix_fmt_desc_get_id
+av_pix_fmt_desc_next
+av_pix_fmt_descriptors
+av_pix_fmt_get_chroma_sub_sample
+av_pix_fmt_swap_endianness
+av_pixelutils_get_sad_fn
+av_q2intfloat
+av_read_image_line
+av_realloc
+av_realloc_array
+av_realloc_f
+av_reallocp
+av_reallocp_array
+av_reduce
+av_rescale
+av_rescale_delta
+av_rescale_q
+av_rescale_q_rnd
+av_rescale_rnd
+av_reverse
+av_sample_fmt_is_planar
+av_samples_alloc
+av_samples_alloc_array_and_samples
+av_samples_copy
+av_samples_fill_arrays
+av_samples_get_buffer_size
+av_samples_set_silence
+av_set_cpu_flags_mask
+av_set_double
+av_set_int
+av_set_options_string
+av_set_q
+av_set_string3
+av_small_strptime
+av_strcasecmp
+av_strdup
+av_strerror
+av_stristart
+av_stristr
+av_strlcat
+av_strlcatf
+av_strlcpy
+av_strncasecmp
+av_strndup
+av_strnstr
+av_strstart
+av_strtod
+av_strtok
+av_sub_q
+av_thread_message_queue_alloc
+av_thread_message_queue_free
+av_thread_message_queue_recv
+av_thread_message_queue_send
+av_thread_message_queue_set_err_recv
+av_thread_message_queue_set_err_send
+av_timecode_adjust_ntsc_framenum2
+av_timecode_check_frame_rate
+av_timecode_get_smpte_from_framenum
+av_timecode_init
+av_timecode_init_from_string
+av_timecode_make_mpeg_tc_string
+av_timecode_make_smpte_tc_string
+av_timecode_make_string
+av_timegm
+av_usleep
+av_utf8_decode
+av_util_ffversion
+av_vbprintf
+av_version_info
+av_vlog
+av_write_image_line
+avpriv_alloc_fixed_dsp
+avpriv_float_dsp_alloc
+avpriv_float_dsp_init
+avpriv_frame_get_metadatap
+avpriv_get_gamma_from_trc
+avpriv_init_lls
+avpriv_report_missing_feature
+avpriv_request_sample
+avpriv_scalarproduct_float_c
+avpriv_set_systematic_pal2
+avpriv_solve_lls
+avutil_configuration
+avutil_license
+avutil_version
+avpriv_emms_yasm
+avpriv_snprintf
+avpriv_strtod
+avpriv_vsnprintf
--- a/media/ffvpx/libavutil/avutil-54.symbols
+++ b/media/ffvpx/libavutil/avutil-54.symbols
@@ -344,12 +344,9 @@ avpriv_request_sample
 avpriv_scalarproduct_float_c
 avpriv_set_systematic_pal2
 avpriv_solve_lls
 avutil_configuration
 avutil_license
 avutil_version
 #ifdef XP_WIN
 avpriv_emms_yasm
-avpriv_snprintf
-avpriv_strtod
-avpriv_vsnprintf
 #endif
--- a/media/ffvpx/libavutil/moz.build
+++ b/media/ffvpx/libavutil/moz.build
@@ -46,20 +46,27 @@ SOURCES += [
     'reverse.c',
     'samplefmt.c',
     'threadmessage.c',
     'time.c',
     'timecode.c',
     'utils.c',
 ]
 
+
 if CONFIG['_MSC_VER']:
     SOURCES += [
-        '../compat/msvcrt/snprintf.c',
         '../compat/strtod.c'
     ]
 
-SYMBOLS_FILE =  'avutil-54.symbols'
+if CONFIG['_MSC_VER'] < '1900':
+    SOURCES += [
+        '../compat/msvcrt/snprintf.c'
+    ]
+    SYMBOLS_FILE = 'avutil-54-oldmsvc.symbols'
+else:
+    SYMBOLS_FILE = 'avutil-54.symbols'
+
 NO_VISIBILITY_FLAGS = True
 
 OS_LIBS += CONFIG['REALTIME_LIBS']
 
 include("../ffvpxcommon.mozbuild")