--- a/jpeg/jpeglib.h
+++ b/jpeg/jpeglib.h
@@ -1,3 +1,8 @@
+/* FLTK *************************************************************** */
+/* FLTK   Comments marked with FLTK show modifications for FLTK which   */
+/* FLTK   should probably be preserved when the JPEG lib is upgraded.   */
+/* FLTK *************************************************************** */
+
 /*
  * jpeglib.h
  *
@@ -887,7 +892,8 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
  * characters, you are out of luck.  Get a better compiler.)
  */
 
-#ifdef NEED_SHORT_EXTERNAL_NAMES
+/* FLTK: disable short external names */
+/* #ifdef NEED_SHORT_EXTERNAL_NAMES
 #define jpeg_std_error		jStdError
 #define jpeg_CreateCompress	jCreaCompress
 #define jpeg_CreateDecompress	jCreaDecompress
@@ -941,7 +947,181 @@ typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
 #define jpeg_abort		jAbort
 #define jpeg_destroy		jDestroy
 #define jpeg_resync_to_restart	jResyncRestart
-#endif /* NEED_SHORT_EXTERNAL_NAMES */
+#endif */ /* NEED_SHORT_EXTERNAL_NAMES */
+
+
+/* FLTK: enable prefixes */
+/* This list was generated with the following command:
+ * nm --extern-only --defined-only libfltk_jpeg.a | awk '{print $3}' | sort | uniq | sed '/^$/d' | awk '{print "#define "$1" fltk_"$1}'
+ */
+#define jcopy_block_row fltk_jcopy_block_row
+#define jcopy_sample_rows fltk_jcopy_sample_rows
+#define jdiv_round_up fltk_jdiv_round_up
+#define jinit_1pass_quantizer fltk_jinit_1pass_quantizer
+#define jinit_2pass_quantizer fltk_jinit_2pass_quantizer
+#define jinit_arith_decoder fltk_jinit_arith_decoder
+#define jinit_arith_encoder fltk_jinit_arith_encoder
+#define jinit_c_coef_controller fltk_jinit_c_coef_controller
+#define jinit_c_main_controller fltk_jinit_c_main_controller
+#define jinit_c_master_control fltk_jinit_c_master_control
+#define jinit_color_converter fltk_jinit_color_converter
+#define jinit_color_deconverter fltk_jinit_color_deconverter
+#define jinit_compress_master fltk_jinit_compress_master
+#define jinit_c_prep_controller fltk_jinit_c_prep_controller
+#define jinit_d_coef_controller fltk_jinit_d_coef_controller
+#define jinit_d_main_controller fltk_jinit_d_main_controller
+#define jinit_downsampler fltk_jinit_downsampler
+#define jinit_d_post_controller fltk_jinit_d_post_controller
+#define jinit_forward_dct fltk_jinit_forward_dct
+#define jinit_huff_decoder fltk_jinit_huff_decoder
+#define jinit_huff_encoder fltk_jinit_huff_encoder
+#define jinit_input_controller fltk_jinit_input_controller
+#define jinit_inverse_dct fltk_jinit_inverse_dct
+#define jinit_marker_reader fltk_jinit_marker_reader
+#define jinit_marker_writer fltk_jinit_marker_writer
+#define jinit_master_decompress fltk_jinit_master_decompress
+#define jinit_memory_mgr fltk_jinit_memory_mgr
+#define jinit_merged_upsampler fltk_jinit_merged_upsampler
+#define jinit_upsampler fltk_jinit_upsampler
+#define jpeg_abort fltk_jpeg_abort
+#define jpeg_abort_compress fltk_jpeg_abort_compress
+#define jpeg_abort_decompress fltk_jpeg_abort_decompress
+#define jpeg_add_quant_table fltk_jpeg_add_quant_table
+#define jpeg_alloc_huff_table fltk_jpeg_alloc_huff_table
+#define jpeg_alloc_quant_table fltk_jpeg_alloc_quant_table
+#define jpeg_aritab fltk_jpeg_aritab
+#define jpeg_calc_jpeg_dimensions fltk_jpeg_calc_jpeg_dimensions
+#define jpeg_calc_output_dimensions fltk_jpeg_calc_output_dimensions
+#define jpeg_consume_input fltk_jpeg_consume_input
+#define jpeg_copy_critical_parameters fltk_jpeg_copy_critical_parameters
+#define jpeg_core_output_dimensions fltk_jpeg_core_output_dimensions
+#define jpeg_CreateCompress fltk_jpeg_CreateCompress
+#define jpeg_CreateDecompress fltk_jpeg_CreateDecompress
+#define jpeg_default_colorspace fltk_jpeg_default_colorspace
+#define jpeg_default_qtables fltk_jpeg_default_qtables
+#define jpeg_destroy fltk_jpeg_destroy
+#define jpeg_destroy_compress fltk_jpeg_destroy_compress
+#define jpeg_destroy_decompress fltk_jpeg_destroy_decompress
+#define jpeg_fdct_10x10 fltk_jpeg_fdct_10x10
+#define jpeg_fdct_10x5 fltk_jpeg_fdct_10x5
+#define jpeg_fdct_11x11 fltk_jpeg_fdct_11x11
+#define jpeg_fdct_12x12 fltk_jpeg_fdct_12x12
+#define jpeg_fdct_12x6 fltk_jpeg_fdct_12x6
+#define jpeg_fdct_13x13 fltk_jpeg_fdct_13x13
+#define jpeg_fdct_14x14 fltk_jpeg_fdct_14x14
+#define jpeg_fdct_14x7 fltk_jpeg_fdct_14x7
+#define jpeg_fdct_15x15 fltk_jpeg_fdct_15x15
+#define jpeg_fdct_16x16 fltk_jpeg_fdct_16x16
+#define jpeg_fdct_16x8 fltk_jpeg_fdct_16x8
+#define jpeg_fdct_1x1 fltk_jpeg_fdct_1x1
+#define jpeg_fdct_1x2 fltk_jpeg_fdct_1x2
+#define jpeg_fdct_2x1 fltk_jpeg_fdct_2x1
+#define jpeg_fdct_2x2 fltk_jpeg_fdct_2x2
+#define jpeg_fdct_2x4 fltk_jpeg_fdct_2x4
+#define jpeg_fdct_3x3 fltk_jpeg_fdct_3x3
+#define jpeg_fdct_3x6 fltk_jpeg_fdct_3x6
+#define jpeg_fdct_4x2 fltk_jpeg_fdct_4x2
+#define jpeg_fdct_4x4 fltk_jpeg_fdct_4x4
+#define jpeg_fdct_4x8 fltk_jpeg_fdct_4x8
+#define jpeg_fdct_5x10 fltk_jpeg_fdct_5x10
+#define jpeg_fdct_5x5 fltk_jpeg_fdct_5x5
+#define jpeg_fdct_6x12 fltk_jpeg_fdct_6x12
+#define jpeg_fdct_6x3 fltk_jpeg_fdct_6x3
+#define jpeg_fdct_6x6 fltk_jpeg_fdct_6x6
+#define jpeg_fdct_7x14 fltk_jpeg_fdct_7x14
+#define jpeg_fdct_7x7 fltk_jpeg_fdct_7x7
+#define jpeg_fdct_8x16 fltk_jpeg_fdct_8x16
+#define jpeg_fdct_8x4 fltk_jpeg_fdct_8x4
+#define jpeg_fdct_9x9 fltk_jpeg_fdct_9x9
+#define jpeg_fdct_float fltk_jpeg_fdct_float
+#define jpeg_fdct_ifast fltk_jpeg_fdct_ifast
+#define jpeg_fdct_islow fltk_jpeg_fdct_islow
+#define jpeg_finish_compress fltk_jpeg_finish_compress
+#define jpeg_finish_decompress fltk_jpeg_finish_decompress
+#define jpeg_finish_output fltk_jpeg_finish_output
+#define jpeg_free_large fltk_jpeg_free_large
+#define jpeg_free_small fltk_jpeg_free_small
+#define jpeg_get_large fltk_jpeg_get_large
+#define jpeg_get_small fltk_jpeg_get_small
+#define jpeg_has_multiple_scans fltk_jpeg_has_multiple_scans
+#define jpeg_idct_10x10 fltk_jpeg_idct_10x10
+#define jpeg_idct_10x5 fltk_jpeg_idct_10x5
+#define jpeg_idct_11x11 fltk_jpeg_idct_11x11
+#define jpeg_idct_12x12 fltk_jpeg_idct_12x12
+#define jpeg_idct_12x6 fltk_jpeg_idct_12x6
+#define jpeg_idct_13x13 fltk_jpeg_idct_13x13
+#define jpeg_idct_14x14 fltk_jpeg_idct_14x14
+#define jpeg_idct_14x7 fltk_jpeg_idct_14x7
+#define jpeg_idct_15x15 fltk_jpeg_idct_15x15
+#define jpeg_idct_16x16 fltk_jpeg_idct_16x16
+#define jpeg_idct_16x8 fltk_jpeg_idct_16x8
+#define jpeg_idct_1x1 fltk_jpeg_idct_1x1
+#define jpeg_idct_1x2 fltk_jpeg_idct_1x2
+#define jpeg_idct_2x1 fltk_jpeg_idct_2x1
+#define jpeg_idct_2x2 fltk_jpeg_idct_2x2
+#define jpeg_idct_2x4 fltk_jpeg_idct_2x4
+#define jpeg_idct_3x3 fltk_jpeg_idct_3x3
+#define jpeg_idct_3x6 fltk_jpeg_idct_3x6
+#define jpeg_idct_4x2 fltk_jpeg_idct_4x2
+#define jpeg_idct_4x4 fltk_jpeg_idct_4x4
+#define jpeg_idct_4x8 fltk_jpeg_idct_4x8
+#define jpeg_idct_5x10 fltk_jpeg_idct_5x10
+#define jpeg_idct_5x5 fltk_jpeg_idct_5x5
+#define jpeg_idct_6x12 fltk_jpeg_idct_6x12
+#define jpeg_idct_6x3 fltk_jpeg_idct_6x3
+#define jpeg_idct_6x6 fltk_jpeg_idct_6x6
+#define jpeg_idct_7x14 fltk_jpeg_idct_7x14
+#define jpeg_idct_7x7 fltk_jpeg_idct_7x7
+#define jpeg_idct_8x16 fltk_jpeg_idct_8x16
+#define jpeg_idct_8x4 fltk_jpeg_idct_8x4
+#define jpeg_idct_9x9 fltk_jpeg_idct_9x9
+#define jpeg_idct_float fltk_jpeg_idct_float
+#define jpeg_idct_ifast fltk_jpeg_idct_ifast
+#define jpeg_idct_islow fltk_jpeg_idct_islow
+#define jpeg_input_complete fltk_jpeg_input_complete
+#define jpeg_mem_available fltk_jpeg_mem_available
+#define jpeg_mem_dest fltk_jpeg_mem_dest
+#define jpeg_mem_init fltk_jpeg_mem_init
+#define jpeg_mem_src fltk_jpeg_mem_src
+#define jpeg_mem_term fltk_jpeg_mem_term
+#define jpeg_natural_order fltk_jpeg_natural_order
+#define jpeg_natural_order2 fltk_jpeg_natural_order2
+#define jpeg_natural_order3 fltk_jpeg_natural_order3
+#define jpeg_natural_order4 fltk_jpeg_natural_order4
+#define jpeg_natural_order5 fltk_jpeg_natural_order5
+#define jpeg_natural_order6 fltk_jpeg_natural_order6
+#define jpeg_natural_order7 fltk_jpeg_natural_order7
+#define jpeg_new_colormap fltk_jpeg_new_colormap
+#define jpeg_open_backing_store fltk_jpeg_open_backing_store
+#define jpeg_quality_scaling fltk_jpeg_quality_scaling
+#define jpeg_read_coefficients fltk_jpeg_read_coefficients
+#define jpeg_read_header fltk_jpeg_read_header
+#define jpeg_read_raw_data fltk_jpeg_read_raw_data
+#define jpeg_read_scanlines fltk_jpeg_read_scanlines
+#define jpeg_resync_to_restart fltk_jpeg_resync_to_restart
+#define jpeg_save_markers fltk_jpeg_save_markers
+#define jpeg_set_colorspace fltk_jpeg_set_colorspace
+#define jpeg_set_defaults fltk_jpeg_set_defaults
+#define jpeg_set_linear_quality fltk_jpeg_set_linear_quality
+#define jpeg_set_marker_processor fltk_jpeg_set_marker_processor
+#define jpeg_set_quality fltk_jpeg_set_quality
+#define jpeg_simple_progression fltk_jpeg_simple_progression
+#define jpeg_start_compress fltk_jpeg_start_compress
+#define jpeg_start_decompress fltk_jpeg_start_decompress
+#define jpeg_start_output fltk_jpeg_start_output
+#define jpeg_std_error fltk_jpeg_std_error
+#define jpeg_stdio_dest fltk_jpeg_stdio_dest
+#define jpeg_stdio_src fltk_jpeg_stdio_src
+#define jpeg_std_message_table fltk_jpeg_std_message_table
+#define jpeg_suppress_tables fltk_jpeg_suppress_tables
+#define jpeg_write_coefficients fltk_jpeg_write_coefficients
+#define jpeg_write_marker fltk_jpeg_write_marker
+#define jpeg_write_m_byte fltk_jpeg_write_m_byte
+#define jpeg_write_m_header fltk_jpeg_write_m_header
+#define jpeg_write_raw_data fltk_jpeg_write_raw_data
+#define jpeg_write_scanlines fltk_jpeg_write_scanlines
+#define jpeg_write_tables fltk_jpeg_write_tables
+#define jround_up fltk_jround_up
 
 
 /* Default error-management setup */
