summaryrefslogtreecommitdiff
path: root/sdk/recipes/patches/libjpeg/symbolclash.p
blob: fcdf0885230f50ebb311115507f15bffda7c7504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
--- cdjpeg.c.orig	1997-09-07 16:51:36.000000000 +0100
+++ cdjpeg.c	2011-01-05 21:55:15.000000000 +0000
@@ -43,7 +43,7 @@
 }
 
 
-GLOBAL(void)
+JGLOBAL(void)
 enable_signal_catcher (j_common_ptr cinfo)
 {
   sig_cinfo = cinfo;
@@ -64,7 +64,7 @@
 
 #ifdef PROGRESS_REPORT
 
-METHODDEF(void)
+JMETHODDEF(void)
 progress_monitor (j_common_ptr cinfo)
 {
   cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
@@ -85,7 +85,7 @@
 }
 
 
-GLOBAL(void)
+JGLOBAL(void)
 start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
 {
   /* Enable progress display, unless trace output is on */
@@ -99,7 +99,7 @@
 }
 
 
-GLOBAL(void)
+JGLOBAL(void)
 end_progress_monitor (j_common_ptr cinfo)
 {
   /* Clear away progress display */
@@ -118,7 +118,7 @@
  * minchars is length of minimum legal abbreviation.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 keymatch (char * arg, const char * keyword, int minchars)
 {
   register int ca, ck;
@@ -145,7 +145,7 @@
  * Non-Unix systems often require some hacking to get out of text mode.
  */
 
-GLOBAL(FILE *)
+JGLOBAL(FILE *)
 read_stdin (void)
 {
   FILE * input_file = stdin;
@@ -163,7 +163,7 @@
 }
 
 
-GLOBAL(FILE *)
+JGLOBAL(FILE *)
 write_stdout (void)
 {
   FILE * output_file = stdout;
--- cdjpeg.h.orig	2011-01-05 22:21:13.000000000 +0000
+++ cdjpeg.h	2011-01-05 22:26:20.000000000 +0000
@@ -117,41 +117,41 @@
 
 /* Module selection routines for I/O modules. */
 
-EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
+JEXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
+JEXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
 					    boolean is_os2));
-EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
-EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
-EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
+JEXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
+JEXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
+JEXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
+JEXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
+JEXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
+JEXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
+JEXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
+JEXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
 
 /* cjpeg support routines (in rdswitch.c) */
 
-EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
+JEXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
 				       boolean force_baseline));
-EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
-EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg,
+JEXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
+JEXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg,
 					 boolean force_baseline));
-EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
-EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
+JEXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
+JEXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
 
 /* djpeg support routines (in rdcolmap.c) */
 
-EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
+JEXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
 
 /* common support routines (in cdjpeg.c) */
 
-EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
-EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
+JEXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
+JEXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
 					 cd_progress_ptr progress));
-EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
-EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
-EXTERN(FILE *) read_stdin JPP((void));
-EXTERN(FILE *) write_stdout JPP((void));
+JEXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
+JEXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
+JEXTERN(FILE *) read_stdin JPP((void));
+JEXTERN(FILE *) write_stdout JPP((void));
 
 /* miscellaneous useful macros */
 
--- cjpeg.c.orig	2008-12-30 11:40:37.000000000 +0000
+++ cjpeg.c	2011-01-05 21:55:15.000000000 +0000
@@ -77,7 +77,7 @@
 static boolean is_targa;	/* records user -targa switch */
 
 
-LOCAL(cjpeg_source_ptr)
+JLOCAL(cjpeg_source_ptr)
 select_file_type (j_compress_ptr cinfo, FILE * infile)
 {
   int c;
@@ -138,7 +138,7 @@
 static char * outfilename;	/* for -outfile switch */
 
 
-LOCAL(void)
+JLOCAL(void)
 usage (void)
 /* complain about bad command line */
 {
@@ -200,7 +200,7 @@
 }
 
 
-LOCAL(int)
+JLOCAL(int)
 parse_switches (j_compress_ptr cinfo, int argc, char **argv,
 		int last_file_arg_seen, boolean for_real)
 /* Parse optional switches.
--- djpeg.c.orig	2009-03-24 20:31:18.000000000 +0000
+++ djpeg.c	2011-01-05 21:55:15.000000000 +0000
@@ -87,7 +87,7 @@
 static char * outfilename;	/* for -outfile switch */
 
 
-LOCAL(void)
+JLOCAL(void)
 usage (void)
 /* complain about bad command line */
 {
@@ -159,7 +159,7 @@
 }
 
 
-LOCAL(int)
+JLOCAL(int)
 parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
 		int last_file_arg_seen, boolean for_real)
 /* Parse optional switches.
@@ -351,7 +351,7 @@
  * Note this code relies on a non-suspending data source.
  */
 
-LOCAL(unsigned int)
+JLOCAL(unsigned int)
 jpeg_getc (j_decompress_ptr cinfo)
 /* Read next byte */
 {
@@ -366,7 +366,7 @@
 }
 
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 print_text_marker (j_decompress_ptr cinfo)
 {
   boolean traceit = (cinfo->err->trace_level >= 1);
--- example.c.orig	2009-03-21 17:51:08.000000000 +0000
+++ example.c	2011-01-05 21:55:15.000000000 +0000
@@ -68,7 +68,7 @@
  * and a compression quality factor are passed in.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 write_JPEG_file (char * filename, int quality)
 {
   /* This struct contains the JPEG compression parameters and pointers to
@@ -259,7 +259,7 @@
  * Here's the routine that will replace the standard error_exit method:
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 my_error_exit (j_common_ptr cinfo)
 {
   /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
@@ -280,7 +280,7 @@
  */
 
 
-GLOBAL(int)
+JGLOBAL(int)
 read_JPEG_file (char * filename)
 {
   /* This struct contains the JPEG decompression parameters and pointers to
--- jcapimin.c.orig	2010-02-14 16:10:30.000000000 +0000
+++ jcapimin.c	2011-01-05 21:55:15.000000000 +0000
@@ -27,7 +27,7 @@
  * The error manager must already be set up (in case memory manager fails).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
 {
   int i;
@@ -92,7 +92,7 @@
  * Destruction of a JPEG compression object
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_destroy_compress (j_compress_ptr cinfo)
 {
   jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
@@ -104,7 +104,7 @@
  * but don't destroy the object itself.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_abort_compress (j_compress_ptr cinfo)
 {
   jpeg_abort((j_common_ptr) cinfo); /* use common routine */
@@ -123,7 +123,7 @@
  * jcparam.o would be linked whether the application used it or not.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress)
 {
   int i;
@@ -151,7 +151,7 @@
  * work including most of the actual output.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_finish_compress (j_compress_ptr cinfo)
 {
   JDIMENSION iMCU_row;
@@ -196,7 +196,7 @@
  * first call to jpeg_write_scanlines() or jpeg_write_raw_data().
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_write_marker (j_compress_ptr cinfo, int marker,
 		   const JOCTET *dataptr, unsigned int datalen)
 {
@@ -218,7 +218,7 @@
 
 /* Same, but piecemeal. */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
 {
   if (cinfo->next_scanline != 0 ||
@@ -230,7 +230,7 @@
   (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_write_m_byte (j_compress_ptr cinfo, int val)
 {
   (*cinfo->marker->write_marker_byte) (cinfo, val);
@@ -258,7 +258,7 @@
  * will not re-emit the tables unless it is passed write_all_tables=TRUE.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_write_tables (j_compress_ptr cinfo)
 {
   if (cinfo->global_state != CSTATE_START)
--- jcapistd.c.orig	1996-01-06 17:24:10.000000000 +0000
+++ jcapistd.c	2011-01-05 21:55:15.000000000 +0000
@@ -34,7 +34,7 @@
  * wrong thing.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
 {
   if (cinfo->global_state != CSTATE_START)
@@ -73,7 +73,7 @@
  * when using a multiple-scanline buffer.
  */
 
-GLOBAL(JDIMENSION)
+JGLOBAL(JDIMENSION)
 jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,
 		      JDIMENSION num_lines)
 {
@@ -116,7 +116,7 @@
  * Processes exactly one iMCU row per call, unless suspended.
  */
 
-GLOBAL(JDIMENSION)
+JGLOBAL(JDIMENSION)
 jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
 		     JDIMENSION num_lines)
 {
--- jcarith.c.orig	2009-09-16 19:50:58.000000000 +0100
+++ jcarith.c	2011-01-05 21:55:15.000000000 +0000
@@ -112,7 +112,7 @@
 #endif
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_byte (int val, j_compress_ptr cinfo)
 /* Write next output byte; we do not support suspension in this module. */
 {
@@ -129,7 +129,7 @@
  * Finish up at the end of an arithmetic-compressed scan.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_pass (j_compress_ptr cinfo)
 {
   arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
@@ -215,7 +215,7 @@
  * derived from Markus Kuhn's JBIG implementation.
  */
 
-LOCAL(void)
+JLOCAL(void)
 arith_encode (j_compress_ptr cinfo, unsigned char *st, int val) 
 {
   register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
@@ -315,7 +315,7 @@
  * Emit a restart marker & resynchronize predictions.
  */
 
-LOCAL(void)
+JLOCAL(void)
 emit_restart (j_compress_ptr cinfo, int restart_num)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -358,7 +358,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -449,7 +449,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -551,7 +551,7 @@
  * MCU encoding for DC successive approximation refinement scan.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -586,7 +586,7 @@
  * MCU encoding for AC successive approximation refinement scan.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -682,7 +682,7 @@
  * Encode and output one MCU's worth of arithmetic-compressed coefficients.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -827,7 +827,7 @@
  * Initialize for an arithmetic-compressed scan.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass (j_compress_ptr cinfo, boolean gather_statistics)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -910,7 +910,7 @@
  * Module initialization routine for arithmetic entropy encoding.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_arith_encoder (j_compress_ptr cinfo)
 {
   arith_entropy_ptr entropy;
--- jccoefct.c.orig	2006-02-25 14:21:59.000000000 +0000
+++ jccoefct.c	2011-01-05 21:55:15.000000000 +0000
@@ -58,17 +58,17 @@
 
 
 /* Forward declarations */
-METHODDEF(boolean) compress_data
+JMETHODDEF(boolean) compress_data
     JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
 #ifdef FULL_COEF_BUFFER_SUPPORTED
-METHODDEF(boolean) compress_first_pass
+JMETHODDEF(boolean) compress_first_pass
     JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
-METHODDEF(boolean) compress_output
+JMETHODDEF(boolean) compress_output
     JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf));
 #endif
 
 
-LOCAL(void)
+JLOCAL(void)
 start_iMCU_row (j_compress_ptr cinfo)
 /* Reset within-iMCU-row counters for a new row */
 {
@@ -96,7 +96,7 @@
  * Initialize for a processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -139,7 +139,7 @@
  * which we index according to the component's SOF position.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -244,7 +244,7 @@
  * at the scan-dependent variables (MCU dimensions, etc).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -341,7 +341,7 @@
  * NB: input_buf is ignored; it is likely to be a NULL pointer.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -405,7 +405,7 @@
  * Initialize coefficient buffer controller.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
 {
   my_coef_ptr coef;
--- jccolor.c.orig	1996-01-06 17:24:22.000000000 +0000
+++ jccolor.c	2011-01-05 21:55:15.000000000 +0000
@@ -82,7 +82,7 @@
  * Initialize for RGB->YCC colorspace conversion.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 rgb_ycc_start (j_compress_ptr cinfo)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
@@ -126,7 +126,7 @@
  * offset required on that side.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 rgb_ycc_convert (j_compress_ptr cinfo,
 		 JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 		 JDIMENSION output_row, int num_rows)
@@ -182,7 +182,7 @@
  * We assume rgb_ycc_start has been called (we only use the Y tables).
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 rgb_gray_convert (j_compress_ptr cinfo,
 		  JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 		  JDIMENSION output_row, int num_rows)
@@ -221,7 +221,7 @@
  * We assume rgb_ycc_start has been called.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 cmyk_ycck_convert (j_compress_ptr cinfo,
 		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 		   JDIMENSION output_row, int num_rows)
@@ -276,7 +276,7 @@
  * The source can be either plain grayscale or YCbCr (since Y == gray).
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 grayscale_convert (j_compress_ptr cinfo,
 		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 		   JDIMENSION output_row, int num_rows)
@@ -305,7 +305,7 @@
  * We assume input_components == num_components.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 null_convert (j_compress_ptr cinfo,
 	      JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 	      JDIMENSION output_row, int num_rows)
@@ -337,7 +337,7 @@
  * Empty method for start_pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 null_method (j_compress_ptr cinfo)
 {
   /* no work needed */
@@ -348,7 +348,7 @@
  * Module initialization routine for input colorspace conversion.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_color_converter (j_compress_ptr cinfo)
 {
   my_cconvert_ptr cconvert;
--- jcdctmgr.c.orig	2006-02-25 14:28:38.000000000 +0000
+++ jcdctmgr.c	2011-01-05 21:55:15.000000000 +0000
@@ -61,7 +61,7 @@
  * blocks. The quantized coefficients are returned in coef_blocks[].
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
 	     JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
 	     JDIMENSION start_row, JDIMENSION start_col,
@@ -124,7 +124,7 @@
 
 #ifdef DCT_FLOAT_SUPPORTED
 
-METHODDEF(void)
+JMETHODDEF(void)
 forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
 		   JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
 		   JDIMENSION start_row, JDIMENSION start_col,
@@ -176,7 +176,7 @@
  * first scan.  Hence all components should be examined here.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_fdctmgr (j_compress_ptr cinfo)
 {
   my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct;
@@ -460,7 +460,7 @@
  * Initialize FDCT manager.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_forward_dct (j_compress_ptr cinfo)
 {
   my_fdct_ptr fdct;
--- jchuff.c.orig	2009-09-14 13:01:14.000000000 +0100
+++ jchuff.c	2011-01-05 21:55:15.000000000 +0000
@@ -157,7 +157,7 @@
  * This routine also performs some validation checks on the table.
  */
 
-LOCAL(void)
+JLOCAL(void)
 jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
 			 c_derived_tbl ** pdtbl)
 {
@@ -265,7 +265,7 @@
 	    dump_buffer_e(entropy); }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 dump_buffer_s (working_state * state)
 /* Empty the output buffer; return TRUE if successful, FALSE if must suspend */
 {
@@ -280,7 +280,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 dump_buffer_e (huff_entropy_ptr entropy)
 /* Empty the output buffer; we do not support suspension in this case. */
 {
@@ -302,8 +302,8 @@
  * between calls, so 24 bits are sufficient.
  */
 
-INLINE
-LOCAL(boolean)
+JINLINE
+JLOCAL(boolean)
 emit_bits_s (working_state * state, unsigned int code, int size)
 /* Emit some bits; return TRUE if successful, FALSE if must suspend */
 {
@@ -341,8 +341,8 @@
 }
 
 
-INLINE
-LOCAL(void)
+JINLINE
+JLOCAL(void)
 emit_bits_e (huff_entropy_ptr entropy, unsigned int code, int size)
 /* Emit some bits, unless we are in gather mode */
 {
@@ -382,7 +382,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 flush_bits_s (working_state * state)
 {
   if (! emit_bits_s(state, 0x7F, 7)) /* fill any partial byte with ones */
@@ -393,7 +393,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 flush_bits_e (huff_entropy_ptr entropy)
 {
   emit_bits_e(entropy, 0x7F, 7); /* fill any partial byte with ones */
@@ -406,8 +406,8 @@
  * Emit (or just count) a Huffman symbol.
  */
 
-INLINE
-LOCAL(void)
+JINLINE
+JLOCAL(void)
 emit_dc_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol)
 {
   if (entropy->gather_statistics)
@@ -419,8 +419,8 @@
 }
 
 
-INLINE
-LOCAL(void)
+JINLINE
+JLOCAL(void)
 emit_ac_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol)
 {
   if (entropy->gather_statistics)
@@ -436,7 +436,7 @@
  * Emit bits from a correction bit buffer.
  */
 
-LOCAL(void)
+JLOCAL(void)
 emit_buffered_bits (huff_entropy_ptr entropy, char * bufstart,
 		    unsigned int nbits)
 {
@@ -455,7 +455,7 @@
  * Emit any pending EOBRUN symbol.
  */
 
-LOCAL(void)
+JLOCAL(void)
 emit_eobrun (huff_entropy_ptr entropy)
 {
   register int temp, nbits;
@@ -486,7 +486,7 @@
  * Emit a restart marker & resynchronize predictions.
  */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 emit_restart_s (working_state * state, int restart_num)
 {
   int ci;
@@ -507,7 +507,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_restart_e (huff_entropy_ptr entropy, int restart_num)
 {
   int ci;
@@ -537,7 +537,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -624,7 +624,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -735,7 +735,7 @@
  * is not very clear on the point.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -782,7 +782,7 @@
  * MCU encoding for AC successive approximation refinement scan.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -912,7 +912,7 @@
 
 /* Encode a single block's worth of coefficients */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val,
 		  c_derived_tbl *dctbl, c_derived_tbl *actbl)
 {
@@ -1012,7 +1012,7 @@
  * Encode and output one MCU's worth of Huffman-compressed coefficients.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1069,7 +1069,7 @@
  * Finish up at the end of a Huffman-compressed scan.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_pass_huff (j_compress_ptr cinfo)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1118,7 +1118,7 @@
 
 /* Process a single block's worth of coefficients */
 
-LOCAL(void)
+JLOCAL(void)
 htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val,
 		 long dc_counts[], long ac_counts[])
 {
@@ -1193,7 +1193,7 @@
  * No data is actually output, so no suspension return is possible.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1252,7 +1252,7 @@
  * So the extra complexity of an optimal algorithm doesn't seem worthwhile.
  */
 
-LOCAL(void)
+JLOCAL(void)
 jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])
 {
 #define MAX_CLEN 32		/* assumed maximum initial code length */
@@ -1393,7 +1393,7 @@
  * Finish up a statistics-gathering pass and create the new Huffman tables.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_pass_gather (j_compress_ptr cinfo)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1447,7 +1447,7 @@
  * just count the Huffman symbols used and generate Huffman code tables.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1553,7 +1553,7 @@
  * Module initialization routine for Huffman entropy encoding.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_huff_encoder (j_compress_ptr cinfo)
 {
   huff_entropy_ptr entropy;
--- jcinit.c.orig	2006-02-24 11:40:16.000000000 +0000
+++ jcinit.c	2011-01-05 21:55:15.000000000 +0000
@@ -26,7 +26,7 @@
  * which modules will be used and give them appropriate initialization calls.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_compress_master (j_compress_ptr cinfo)
 {
   /* Initialize master control (includes parameter checking/processing) */
--- jcmainct.c.orig	2003-10-19 18:55:34.000000000 +0100
+++ jcmainct.c	2011-01-05 21:55:15.000000000 +0000
@@ -51,11 +51,11 @@
 
 
 /* Forward declarations */
-METHODDEF(void) process_data_simple_main
+JMETHODDEF(void) process_data_simple_main
 	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
 	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
 #ifdef FULL_MAIN_BUFFER_SUPPORTED
-METHODDEF(void) process_data_buffer_main
+JMETHODDEF(void) process_data_buffer_main
 	JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf,
 	     JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail));
 #endif
@@ -65,7 +65,7 @@
  * Initialize for a processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 {
   my_main_ptr main = (my_main_ptr) cinfo->main;
@@ -109,7 +109,7 @@
  * where we have only a strip buffer.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 process_data_simple_main (j_compress_ptr cinfo,
 			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
 			  JDIMENSION in_rows_avail)
@@ -165,7 +165,7 @@
  * This routine handles all of the modes that use a full-size buffer.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 process_data_buffer_main (j_compress_ptr cinfo,
 			  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
 			  JDIMENSION in_rows_avail)
@@ -241,7 +241,7 @@
  * Initialize main buffer controller.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
 {
   my_main_ptr main;
--- jcmarker.c.orig	2009-12-31 14:44:28.000000000 +0000
+++ jcmarker.c	2011-01-05 21:55:15.000000000 +0000
@@ -105,7 +105,7 @@
  * points where markers will be written.
  */
 
-LOCAL(void)
+JLOCAL(void)
 emit_byte (j_compress_ptr cinfo, int val)
 /* Emit a byte */
 {
@@ -119,7 +119,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark)
 /* Emit a marker code */
 {
@@ -128,7 +128,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_2bytes (j_compress_ptr cinfo, int value)
 /* Emit a 2-byte integer; these are always MSB first in JPEG files */
 {
@@ -141,7 +141,7 @@
  * Routines to write specific marker types.
  */
 
-LOCAL(int)
+JLOCAL(int)
 emit_dqt (j_compress_ptr cinfo, int index)
 /* Emit a DQT marker */
 /* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */
@@ -182,7 +182,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
 /* Emit a DHT marker */
 {
@@ -220,7 +220,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_dac (j_compress_ptr cinfo)
 /* Emit a DAC marker */
 /* Since the useful info is so small, we want to emit all the tables in */
@@ -267,7 +267,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_dri (j_compress_ptr cinfo)
 /* Emit a DRI marker */
 {
@@ -279,7 +279,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_sof (j_compress_ptr cinfo, JPEG_MARKER code)
 /* Emit a SOF marker */
 {
@@ -310,7 +310,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_sos (j_compress_ptr cinfo)
 /* Emit a SOS marker */
 {
@@ -345,7 +345,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_pseudo_sos (j_compress_ptr cinfo)
 /* Emit a pseudo SOS marker */
 {
@@ -361,7 +361,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_jfif_app0 (j_compress_ptr cinfo)
 /* Emit a JFIF-compliant APP0 marker */
 {
@@ -396,7 +396,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_adobe_app14 (j_compress_ptr cinfo)
 /* Emit an Adobe APP14 marker */
 {
@@ -450,7 +450,7 @@
  * Counting the parameter bytes properly is the caller's responsibility.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen)
 /* Emit an arbitrary marker header */
 {
@@ -462,7 +462,7 @@
   emit_2bytes(cinfo, (int) (datalen + 2));	/* total length */
 }
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_marker_byte (j_compress_ptr cinfo, int val)
 /* Emit one byte of marker parameters following write_marker_header */
 {
@@ -481,7 +481,7 @@
  * jpeg_start_compress returns.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_file_header (j_compress_ptr cinfo)
 {
   my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
@@ -506,7 +506,7 @@
  * try to error-check the quant table numbers as soon as they see the SOF.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_frame_header (j_compress_ptr cinfo)
 {
   int ci, prec;
@@ -570,7 +570,7 @@
  * Compressed data will be written following the SOS.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_scan_header (j_compress_ptr cinfo)
 {
   my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
@@ -614,7 +614,7 @@
  * Write datastream trailer.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_file_trailer (j_compress_ptr cinfo)
 {
   emit_marker(cinfo, M_EOI);
@@ -628,7 +628,7 @@
  * emitted.  Note that all tables will be marked sent_table = TRUE at exit.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_tables_only (j_compress_ptr cinfo)
 {
   int i;
@@ -657,7 +657,7 @@
  * Initialize the marker writer module.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_marker_writer (j_compress_ptr cinfo)
 {
   my_marker_ptr marker;
--- jcmaster.c.orig	2010-02-14 15:56:38.000000000 +0000
+++ jcmaster.c	2011-01-05 21:55:15.000000000 +0000
@@ -49,7 +49,7 @@
  * Hence it mustn't do anything that can't be done twice.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo)
 /* Do computations that are needed before master selection phase */
 {
@@ -190,7 +190,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 jpeg_calc_trans_dimensions (j_compress_ptr cinfo)
 {
   if (cinfo->min_DCT_h_scaled_size < 1 || cinfo->min_DCT_h_scaled_size > 16
@@ -215,7 +215,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 initial_setup (j_compress_ptr cinfo, boolean transcode_only)
 /* Do computations that are needed before master selection phase */
 {
@@ -334,7 +334,7 @@
 
 #ifdef C_MULTISCAN_FILES_SUPPORTED
 
-LOCAL(void)
+JLOCAL(void)
 validate_script (j_compress_ptr cinfo)
 /* Verify that the scan script in cinfo->scan_info[] is valid; also
  * determine whether it uses progressive JPEG, and set cinfo->progressive_mode.
@@ -469,7 +469,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 reduce_script (j_compress_ptr cinfo)
 /* Adapt scan script for use with reduced block size;
  * assume that script has been validated before.
@@ -504,7 +504,7 @@
 #endif /* C_MULTISCAN_FILES_SUPPORTED */
 
 
-LOCAL(void)
+JLOCAL(void)
 select_scan_parameters (j_compress_ptr cinfo)
 /* Set up the scan parameters for the current scan */
 {
@@ -548,7 +548,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 per_scan_setup (j_compress_ptr cinfo)
 /* Do computations that are needed before processing a JPEG scan */
 /* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */
@@ -641,7 +641,7 @@
  * required.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 prepare_for_pass (j_compress_ptr cinfo)
 {
   my_master_ptr master = (my_master_ptr) cinfo->master;
@@ -729,7 +729,7 @@
  * In multi-pass processing, this routine is not used.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 pass_startup (j_compress_ptr cinfo)
 {
   cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */
@@ -743,7 +743,7 @@
  * Finish up at end of pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_pass_master (j_compress_ptr cinfo)
 {
   my_master_ptr master = (my_master_ptr) cinfo->master;
@@ -783,7 +783,7 @@
  * Initialize master compression control.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
 {
   my_master_ptr master;
--- jcomapi.c.orig	1997-10-08 20:01:22.000000000 +0100
+++ jcomapi.c	2011-01-05 21:55:15.000000000 +0000
@@ -25,7 +25,7 @@
  * responsibility.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_abort (j_common_ptr cinfo)
 {
   int pool;
@@ -65,7 +65,7 @@
  * responsibility.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_destroy (j_common_ptr cinfo)
 {
   /* We need only tell the memory manager to release everything. */
@@ -82,7 +82,7 @@
  * (Would jutils.c be a more reasonable place to put these?)
  */
 
-GLOBAL(JQUANT_TBL *)
+JGLOBAL(JQUANT_TBL *)
 jpeg_alloc_quant_table (j_common_ptr cinfo)
 {
   JQUANT_TBL *tbl;
@@ -94,7 +94,7 @@
 }
 
 
-GLOBAL(JHUFF_TBL *)
+JGLOBAL(JHUFF_TBL *)
 jpeg_alloc_huff_table (j_common_ptr cinfo)
 {
   JHUFF_TBL *tbl;
--- jconfig.cfg.orig	2010-04-29 13:42:58.000000000 +0100
+++ jconfig.cfg	2011-01-05 21:55:15.000000000 +0000
@@ -28,7 +28,7 @@
 #ifdef JPEG_INTERNALS
 
 #undef RIGHT_SHIFT_IS_UNSIGNED
-#undef INLINE
+#undef JINLINE
 /* These are for configuring the JPEG memory manager. */
 #undef DEFAULT_MAX_MEM
 #undef NO_MKTEMP
--- jcparam.c.orig	2008-12-30 11:38:14.000000000 +0000
+++ jcparam.c	2011-01-05 21:55:15.000000000 +0000
@@ -20,7 +20,7 @@
  * Quantization table setup routines
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,
 		      const unsigned int *basic_table,
 		      int scale_factor, boolean force_baseline)
@@ -87,7 +87,7 @@
 };
 
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline)
 /* Set or change the 'quality' (quantization) setting, using default tables
  * and straight percentage-scaling quality scales.
@@ -102,7 +102,7 @@
 }
 
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
 			 boolean force_baseline)
 /* Set or change the 'quality' (quantization) setting, using default tables
@@ -119,7 +119,7 @@
 }
 
 
-GLOBAL(int)
+JGLOBAL(int)
 jpeg_quality_scaling (int quality)
 /* Convert a user-specified quality rating to a percentage scaling factor
  * for an underlying quantization table, using our recommended scaling curve.
@@ -145,7 +145,7 @@
 }
 
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
 /* Set or change the 'quality' (quantization) setting, using default tables.
  * This is the standard quality-adjusting entry point for typical user
@@ -165,7 +165,7 @@
  * Huffman table setup routines
  */
 
-LOCAL(void)
+JLOCAL(void)
 add_huff_table (j_compress_ptr cinfo,
 		JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val)
 /* Define a Huffman table */
@@ -195,7 +195,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 std_huff_tables (j_compress_ptr cinfo)
 /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
 /* IMPORTANT: these are only valid for 8-bit data precision! */
@@ -281,7 +281,7 @@
  * your code will still work (they'll be set to reasonable defaults).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_set_defaults (j_compress_ptr cinfo)
 {
   int i;
@@ -377,7 +377,7 @@
  * Select an appropriate JPEG colorspace for in_color_space.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_default_colorspace (j_compress_ptr cinfo)
 {
   switch (cinfo->in_color_space) {
@@ -409,7 +409,7 @@
  * Set the JPEG colorspace, and choose colorspace-dependent default values.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
 {
   jpeg_component_info * compptr;
@@ -493,7 +493,7 @@
 
 #ifdef C_PROGRESSIVE_SUPPORTED
 
-LOCAL(jpeg_scan_info *)
+JLOCAL(jpeg_scan_info *)
 fill_a_scan (jpeg_scan_info * scanptr, int ci,
 	     int Ss, int Se, int Ah, int Al)
 /* Support routine: generate one scan for specified component */
@@ -508,7 +508,7 @@
   return scanptr;
 }
 
-LOCAL(jpeg_scan_info *)
+JLOCAL(jpeg_scan_info *)
 fill_scans (jpeg_scan_info * scanptr, int ncomps,
 	    int Ss, int Se, int Ah, int Al)
 /* Support routine: generate one scan for each component */
@@ -527,7 +527,7 @@
   return scanptr;
 }
 
-LOCAL(jpeg_scan_info *)
+JLOCAL(jpeg_scan_info *)
 fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al)
 /* Support routine: generate interleaved DC scan if possible, else N scans */
 {
@@ -555,7 +555,7 @@
  * cinfo->num_components and cinfo->jpeg_color_space must be correct.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_simple_progression (j_compress_ptr cinfo)
 {
   int ncomps = cinfo->num_components;
--- jcprepct.c.orig	2003-10-19 18:47:16.000000000 +0100
+++ jcprepct.c	2011-01-05 21:55:15.000000000 +0000
@@ -74,7 +74,7 @@
  * Initialize for a processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 {
   my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
@@ -102,7 +102,7 @@
  * by duplicating the bottom row.
  */
 
-LOCAL(void)
+JLOCAL(void)
 expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols,
 		    int input_rows, int output_rows)
 {
@@ -124,7 +124,7 @@
  * input rows.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 pre_process_data (j_compress_ptr cinfo,
 		  JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
 		  JDIMENSION in_rows_avail,
@@ -193,7 +193,7 @@
  * Process some data in the context case.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 pre_process_context (j_compress_ptr cinfo,
 		     JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
 		     JDIMENSION in_rows_avail,
@@ -265,7 +265,7 @@
  * Create the wrapped-around downsampling input buffer needed for context mode.
  */
 
-LOCAL(void)
+JLOCAL(void)
 create_context_buffer (j_compress_ptr cinfo)
 {
   my_prep_ptr prep = (my_prep_ptr) cinfo->prep;
@@ -314,7 +314,7 @@
  * Initialize preprocessing controller.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer)
 {
   my_prep_ptr prep;
--- jcsample.c.orig	2003-10-21 15:13:36.000000000 +0100
+++ jcsample.c	2011-01-05 21:55:15.000000000 +0000
@@ -80,7 +80,7 @@
  * Initialize for a downsampling pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_downsample (j_compress_ptr cinfo)
 {
   /* no work for now */
@@ -92,7 +92,7 @@
  * by duplicating the rightmost samples.
  */
 
-LOCAL(void)
+JLOCAL(void)
 expand_right_edge (JSAMPARRAY image_data, int num_rows,
 		   JDIMENSION input_cols, JDIMENSION output_cols)
 {
@@ -119,7 +119,7 @@
  * In this version we simply downsample each component independently.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 sep_downsample (j_compress_ptr cinfo,
 		JSAMPIMAGE input_buf, JDIMENSION in_row_index,
 		JSAMPIMAGE output_buf, JDIMENSION out_row_group_index)
@@ -146,7 +146,7 @@
  * Note that this version is not actually used for customary sampling ratios.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
 		JSAMPARRAY input_data, JSAMPARRAY output_data)
 {
@@ -195,7 +195,7 @@
  * without smoothing.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
 		     JSAMPARRAY input_data, JSAMPARRAY output_data)
 {
@@ -220,7 +220,7 @@
  * alternate pixel locations (a simple ordered dither pattern).
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
 		 JSAMPARRAY input_data, JSAMPARRAY output_data)
 {
@@ -257,7 +257,7 @@
  * without smoothing.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
 		 JSAMPARRAY input_data, JSAMPARRAY output_data)
 {
@@ -301,7 +301,7 @@
  * with smoothing.  One row of context is required.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
 			JSAMPARRAY input_data, JSAMPARRAY output_data)
 {
@@ -402,7 +402,7 @@
  * with smoothing.  One row of context is required.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
 			    JSAMPARRAY input_data, JSAMPARRAY output_data)
 {
@@ -474,7 +474,7 @@
  * Note that we must select a routine for each component.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_downsampler (j_compress_ptr cinfo)
 {
   my_downsample_ptr downsample;
--- jctrans.c.orig	2009-09-14 00:35:44.000000000 +0100
+++ jctrans.c	2011-01-05 21:55:15.000000000 +0000
@@ -17,9 +17,9 @@
 
 
 /* Forward declarations */
-LOCAL(void) transencode_master_selection
+JLOCAL(void) transencode_master_selection
 	JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
-LOCAL(void) transencode_coef_controller
+JLOCAL(void) transencode_coef_controller
 	JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
 
 
@@ -35,7 +35,7 @@
  * typically will be realized during this routine and filled afterwards.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)
 {
   if (cinfo->global_state != CSTATE_START)
@@ -60,7 +60,7 @@
  * scan script and Huffman optimization) are left in their default states.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,
 			       j_compress_ptr dstinfo)
 {
@@ -159,7 +159,7 @@
  * This substitutes for jcinit.c's initialization of the full compressor.
  */
 
-LOCAL(void)
+JLOCAL(void)
 transencode_master_selection (j_compress_ptr cinfo,
 			      jvirt_barray_ptr * coef_arrays)
 {
@@ -217,7 +217,7 @@
 typedef my_coef_controller * my_coef_ptr;
 
 
-LOCAL(void)
+JLOCAL(void)
 start_iMCU_row (j_compress_ptr cinfo)
 /* Reset within-iMCU-row counters for a new row */
 {
@@ -245,7 +245,7 @@
  * Initialize for a processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -268,7 +268,7 @@
  * NB: input_buf is ignored; it is likely to be a NULL pointer.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -353,7 +353,7 @@
  * with unitheight at least v_samp_factor.
  */
 
-LOCAL(void)
+JLOCAL(void)
 transencode_coef_controller (j_compress_ptr cinfo,
 			     jvirt_barray_ptr * coef_arrays)
 {
--- jdapimin.c.orig	2009-06-25 09:26:52.000000000 +0100
+++ jdapimin.c	2011-01-05 21:55:15.000000000 +0000
@@ -27,7 +27,7 @@
  * The error manager must already be set up (in case memory manager fails).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize)
 {
   int i;
@@ -88,7 +88,7 @@
  * Destruction of a JPEG decompression object
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_destroy_decompress (j_decompress_ptr cinfo)
 {
   jpeg_destroy((j_common_ptr) cinfo); /* use common routine */
@@ -100,7 +100,7 @@
  * but don't destroy the object itself.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_abort_decompress (j_decompress_ptr cinfo)
 {
   jpeg_abort((j_common_ptr) cinfo); /* use common routine */
@@ -111,7 +111,7 @@
  * Set default decompression parameters.
  */
 
-LOCAL(void)
+JLOCAL(void)
 default_decompress_parms (j_decompress_ptr cinfo)
 {
   /* Guess the input colorspace, and set output colorspace accordingly. */
@@ -238,7 +238,7 @@
  * extra error checking.
  */
 
-GLOBAL(int)
+JGLOBAL(int)
 jpeg_read_header (j_decompress_ptr cinfo, boolean require_image)
 {
   int retcode;
@@ -284,7 +284,7 @@
  * method.
  */
 
-GLOBAL(int)
+JGLOBAL(int)
 jpeg_consume_input (j_decompress_ptr cinfo)
 {
   int retcode = JPEG_SUSPENDED;
@@ -331,7 +331,7 @@
  * Have we finished reading the input file?
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jpeg_input_complete (j_decompress_ptr cinfo)
 {
   /* Check for valid jpeg object */
@@ -346,7 +346,7 @@
  * Is there more than one scan?
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jpeg_has_multiple_scans (j_decompress_ptr cinfo)
 {
   /* Only valid after jpeg_read_header completes */
@@ -366,7 +366,7 @@
  * a suspending data source is used.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jpeg_finish_decompress (j_decompress_ptr cinfo)
 {
   if ((cinfo->global_state == DSTATE_SCANNING ||
--- jdapistd.c.orig	2002-02-24 18:59:32.000000000 +0000
+++ jdapistd.c	2011-01-05 21:55:15.000000000 +0000
@@ -20,7 +20,7 @@
 
 
 /* Forward declarations */
-LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
+JLOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
 
 
 /*
@@ -34,7 +34,7 @@
  * a suspending data source is used.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jpeg_start_decompress (j_decompress_ptr cinfo)
 {
   if (cinfo->global_state == DSTATE_READY) {
@@ -91,7 +91,7 @@
  *       If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
  */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 output_pass_setup (j_decompress_ptr cinfo)
 {
   if (cinfo->global_state != DSTATE_PRESCAN) {
@@ -148,7 +148,7 @@
  * an oversize buffer (max_lines > scanlines remaining) is not an error.
  */
 
-GLOBAL(JDIMENSION)
+JGLOBAL(JDIMENSION)
 jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines,
 		     JDIMENSION max_lines)
 {
@@ -181,7 +181,7 @@
  * Processes exactly one iMCU row per call, unless suspended.
  */
 
-GLOBAL(JDIMENSION)
+JGLOBAL(JDIMENSION)
 jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
 		    JDIMENSION max_lines)
 {
@@ -224,7 +224,7 @@
  * Initialize for an output pass in buffered-image mode.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
 {
   if (cinfo->global_state != DSTATE_BUFIMAGE &&
@@ -249,7 +249,7 @@
  * a suspending data source is used.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jpeg_finish_output (j_decompress_ptr cinfo)
 {
   if ((cinfo->global_state == DSTATE_SCANNING ||
--- jdarith.c.orig	2009-09-16 19:53:08.000000000 +0100
+++ jdarith.c	2011-01-05 21:55:15.000000000 +0000
@@ -61,7 +61,7 @@
 #define AC_STAT_BINS 256
 
 
-LOCAL(int)
+JLOCAL(int)
 get_byte (j_decompress_ptr cinfo)
 /* Read next input byte; we do not support suspension in this module. */
 {
@@ -102,7 +102,7 @@
  * derived from Markus Kuhn's JBIG implementation.
  */
 
-LOCAL(int)
+JLOCAL(int)
 arith_decode (j_decompress_ptr cinfo, unsigned char *st)
 {
   register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy;
@@ -186,7 +186,7 @@
  * Check for a restart marker & resynchronize decoder.
  */
 
-LOCAL(void)
+JLOCAL(void)
 process_restart (j_decompress_ptr cinfo)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -238,7 +238,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -317,7 +317,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -394,7 +394,7 @@
  * MCU decoding for DC successive approximation refinement scan.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -427,7 +427,7 @@
  * MCU decoding for AC successive approximation refinement scan.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -499,7 +499,7 @@
  * Decode one MCU's worth of arithmetic-compressed coefficients.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -627,7 +627,7 @@
  * Initialize for an arithmetic-compressed scan.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass (j_decompress_ptr cinfo)
 {
   arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
@@ -737,7 +737,7 @@
  * Module initialization routine for arithmetic entropy decoding.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_arith_decoder (j_decompress_ptr cinfo)
 {
   arith_entropy_ptr entropy;
--- jdatadst.c.orig	2009-11-16 15:52:18.000000000 +0000
+++ jdatadst.c	2011-01-05 21:55:15.000000000 +0000
@@ -60,7 +60,7 @@
  * before any data is actually written.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 init_destination (j_compress_ptr cinfo)
 {
   my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -74,7 +74,7 @@
   dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
 }
 
-METHODDEF(void)
+JMETHODDEF(void)
 init_mem_destination (j_compress_ptr cinfo)
 {
   /* no work necessary here */
@@ -104,7 +104,7 @@
  * write it out when emptying the buffer externally.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 empty_output_buffer (j_compress_ptr cinfo)
 {
   my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -119,7 +119,7 @@
   return TRUE;
 }
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 empty_mem_output_buffer (j_compress_ptr cinfo)
 {
   size_t nextsize;
@@ -159,7 +159,7 @@
  * for error exit.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 term_destination (j_compress_ptr cinfo)
 {
   my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -176,7 +176,7 @@
     ERREXIT(cinfo, JERR_FILE_WRITE);
 }
 
-METHODDEF(void)
+JMETHODDEF(void)
 term_mem_destination (j_compress_ptr cinfo)
 {
   my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest;
@@ -192,7 +192,7 @@
  * for closing it after finishing compression.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile)
 {
   my_dest_ptr dest;
@@ -228,7 +228,7 @@
  * freeing the requested memory.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_mem_dest (j_compress_ptr cinfo,
 	       unsigned char ** outbuffer, unsigned long * outsize)
 {
--- jdatasrc.c.orig	2010-04-29 10:49:52.000000000 +0100
+++ jdatasrc.c	2011-01-05 21:55:15.000000000 +0000
@@ -41,7 +41,7 @@
  * before any data is actually read.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 init_source (j_decompress_ptr cinfo)
 {
   my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -53,7 +53,7 @@
   src->start_of_file = TRUE;
 }
 
-METHODDEF(void)
+JMETHODDEF(void)
 init_mem_source (j_decompress_ptr cinfo)
 {
   /* no work necessary here */
@@ -93,7 +93,7 @@
  * the front of the buffer rather than discarding it.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 fill_input_buffer (j_decompress_ptr cinfo)
 {
   my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -118,7 +118,7 @@
   return TRUE;
 }
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 fill_mem_input_buffer (j_decompress_ptr cinfo)
 {
   static JOCTET mybuffer[4];
@@ -151,7 +151,7 @@
  * buffer is the application writer's problem.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 skip_input_data (j_decompress_ptr cinfo, long num_bytes)
 {
   struct jpeg_source_mgr * src = cinfo->src;
@@ -192,7 +192,7 @@
  * for error exit.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 term_source (j_decompress_ptr cinfo)
 {
   /* no work necessary here */
@@ -205,7 +205,7 @@
  * for closing it after finishing decompression.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile)
 {
   my_src_ptr src;
@@ -244,7 +244,7 @@
  * The buffer must contain the whole JPEG data.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_mem_src (j_decompress_ptr cinfo,
 	      unsigned char * inbuffer, unsigned long insize)
 {
--- jdcoefct.c.orig	2002-02-24 18:29:28.000000000 +0000
+++ jdcoefct.c	2011-01-05 21:55:15.000000000 +0000
@@ -62,20 +62,20 @@
 typedef my_coef_controller * my_coef_ptr;
 
 /* Forward declarations */
-METHODDEF(int) decompress_onepass
+JMETHODDEF(int) decompress_onepass
 	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
 #ifdef D_MULTISCAN_FILES_SUPPORTED
-METHODDEF(int) decompress_data
+JMETHODDEF(int) decompress_data
 	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
 #endif
 #ifdef BLOCK_SMOOTHING_SUPPORTED
-LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
-METHODDEF(int) decompress_smooth_data
+JLOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo));
+JMETHODDEF(int) decompress_smooth_data
 	JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
 #endif
 
 
-LOCAL(void)
+JLOCAL(void)
 start_iMCU_row (j_decompress_ptr cinfo)
 /* Reset within-iMCU-row counters for a new row (input side) */
 {
@@ -103,7 +103,7 @@
  * Initialize for an input processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_input_pass (j_decompress_ptr cinfo)
 {
   cinfo->input_iMCU_row = 0;
@@ -115,7 +115,7 @@
  * Initialize for an output processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_output_pass (j_decompress_ptr cinfo)
 {
 #ifdef BLOCK_SMOOTHING_SUPPORTED
@@ -143,7 +143,7 @@
  * which we index according to the component's SOF position.
  */
 
-METHODDEF(int)
+JMETHODDEF(int)
 decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -224,7 +224,7 @@
  * Dummy consume-input routine for single-pass operation.
  */
 
-METHODDEF(int)
+JMETHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
   return JPEG_SUSPENDED;	/* Always indicate nothing was done */
@@ -240,7 +240,7 @@
  * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED.
  */
 
-METHODDEF(int)
+JMETHODDEF(int)
 consume_data (j_decompress_ptr cinfo)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -311,7 +311,7 @@
  * NB: output_buf contains a plane for each component in image.
  */
 
-METHODDEF(int)
+JMETHODDEF(int)
 decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -401,7 +401,7 @@
  * more accurately than they really are.
  */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 smoothing_ok (j_decompress_ptr cinfo)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -457,7 +457,7 @@
  * Variant of decompress_data for use when doing block smoothing.
  */
 
-METHODDEF(int)
+JMETHODDEF(int)
 decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 {
   my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
@@ -672,7 +672,7 @@
  * Initialize coefficient buffer controller.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
 {
   my_coef_ptr coef;
--- jdcolor.c.orig	1997-08-03 19:39:16.000000000 +0100
+++ jdcolor.c	2011-01-05 21:55:15.000000000 +0000
@@ -66,7 +66,7 @@
  * Initialize tables for YCC->RGB colorspace conversion.
  */
 
-LOCAL(void)
+JLOCAL(void)
 build_ycc_rgb_table (j_decompress_ptr cinfo)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
@@ -116,7 +116,7 @@
  * offset required on that side.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 ycc_rgb_convert (j_decompress_ptr cinfo,
 		 JSAMPIMAGE input_buf, JDIMENSION input_row,
 		 JSAMPARRAY output_buf, int num_rows)
@@ -165,7 +165,7 @@
  * converting from separate-planes to interleaved representation.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 null_convert (j_decompress_ptr cinfo,
 	      JSAMPIMAGE input_buf, JDIMENSION input_row,
 	      JSAMPARRAY output_buf, int num_rows)
@@ -197,7 +197,7 @@
  * we just copy the Y (luminance) component and ignore chrominance.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 grayscale_convert (j_decompress_ptr cinfo,
 		   JSAMPIMAGE input_buf, JDIMENSION input_row,
 		   JSAMPARRAY output_buf, int num_rows)
@@ -213,7 +213,7 @@
  * with grayscale as a separate case.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 gray_rgb_convert (j_decompress_ptr cinfo,
 		  JSAMPIMAGE input_buf, JDIMENSION input_row,
 		  JSAMPARRAY output_buf, int num_rows)
@@ -241,7 +241,7 @@
  * We assume build_ycc_rgb_table has been called.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 ycck_cmyk_convert (j_decompress_ptr cinfo,
 		   JSAMPIMAGE input_buf, JDIMENSION input_row,
 		   JSAMPARRAY output_buf, int num_rows)
@@ -289,7 +289,7 @@
  * Empty method for start_pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_dcolor (j_decompress_ptr cinfo)
 {
   /* no work needed */
@@ -300,7 +300,7 @@
  * Module initialization routine for output colorspace conversion.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_color_deconverter (j_decompress_ptr cinfo)
 {
   my_cconvert_ptr cconvert;
--- jdct.h.orig	2004-03-06 19:18:30.000000000 +0000
+++ jdct.h	2011-01-05 22:27:21.000000000 +0000
@@ -162,175 +162,175 @@
 
 /* Extern declarations for the forward and inverse DCT routines. */
 
-EXTERN(void) jpeg_fdct_islow
+JEXTERN(void) jpeg_fdct_islow
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_ifast
+JEXTERN(void) jpeg_fdct_ifast
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_float
+JEXTERN(void) jpeg_fdct_float
     JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_7x7
+JEXTERN(void) jpeg_fdct_7x7
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_6x6
+JEXTERN(void) jpeg_fdct_6x6
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_5x5
+JEXTERN(void) jpeg_fdct_5x5
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_4x4
+JEXTERN(void) jpeg_fdct_4x4
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_3x3
+JEXTERN(void) jpeg_fdct_3x3
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_2x2
+JEXTERN(void) jpeg_fdct_2x2
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_1x1
+JEXTERN(void) jpeg_fdct_1x1
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_9x9
+JEXTERN(void) jpeg_fdct_9x9
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_10x10
+JEXTERN(void) jpeg_fdct_10x10
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_11x11
+JEXTERN(void) jpeg_fdct_11x11
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_12x12
+JEXTERN(void) jpeg_fdct_12x12
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_13x13
+JEXTERN(void) jpeg_fdct_13x13
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_14x14
+JEXTERN(void) jpeg_fdct_14x14
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_15x15
+JEXTERN(void) jpeg_fdct_15x15
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_16x16
+JEXTERN(void) jpeg_fdct_16x16
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_16x8
+JEXTERN(void) jpeg_fdct_16x8
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_14x7
+JEXTERN(void) jpeg_fdct_14x7
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_12x6
+JEXTERN(void) jpeg_fdct_12x6
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_10x5
+JEXTERN(void) jpeg_fdct_10x5
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_8x4
+JEXTERN(void) jpeg_fdct_8x4
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_6x3
+JEXTERN(void) jpeg_fdct_6x3
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_4x2
+JEXTERN(void) jpeg_fdct_4x2
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_2x1
+JEXTERN(void) jpeg_fdct_2x1
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_8x16
+JEXTERN(void) jpeg_fdct_8x16
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_7x14
+JEXTERN(void) jpeg_fdct_7x14
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_6x12
+JEXTERN(void) jpeg_fdct_6x12
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_5x10
+JEXTERN(void) jpeg_fdct_5x10
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_4x8
+JEXTERN(void) jpeg_fdct_4x8
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_3x6
+JEXTERN(void) jpeg_fdct_3x6
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_2x4
+JEXTERN(void) jpeg_fdct_2x4
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
-EXTERN(void) jpeg_fdct_1x2
+JEXTERN(void) jpeg_fdct_1x2
     JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col));
 
-EXTERN(void) jpeg_idct_islow
+JEXTERN(void) jpeg_idct_islow
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_ifast
+JEXTERN(void) jpeg_idct_ifast
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_float
+JEXTERN(void) jpeg_idct_float
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_7x7
+JEXTERN(void) jpeg_idct_7x7
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_6x6
+JEXTERN(void) jpeg_idct_6x6
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_5x5
+JEXTERN(void) jpeg_idct_5x5
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_4x4
+JEXTERN(void) jpeg_idct_4x4
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_3x3
+JEXTERN(void) jpeg_idct_3x3
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_2x2
+JEXTERN(void) jpeg_idct_2x2
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_1x1
+JEXTERN(void) jpeg_idct_1x1
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_9x9
+JEXTERN(void) jpeg_idct_9x9
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_10x10
+JEXTERN(void) jpeg_idct_10x10
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_11x11
+JEXTERN(void) jpeg_idct_11x11
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_12x12
+JEXTERN(void) jpeg_idct_12x12
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_13x13
+JEXTERN(void) jpeg_idct_13x13
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_14x14
+JEXTERN(void) jpeg_idct_14x14
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_15x15
+JEXTERN(void) jpeg_idct_15x15
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_16x16
+JEXTERN(void) jpeg_idct_16x16
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_16x8
+JEXTERN(void) jpeg_idct_16x8
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_14x7
+JEXTERN(void) jpeg_idct_14x7
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_12x6
+JEXTERN(void) jpeg_idct_12x6
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_10x5
+JEXTERN(void) jpeg_idct_10x5
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_8x4
+JEXTERN(void) jpeg_idct_8x4
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_6x3
+JEXTERN(void) jpeg_idct_6x3
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_4x2
+JEXTERN(void) jpeg_idct_4x2
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_2x1
+JEXTERN(void) jpeg_idct_2x1
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_8x16
+JEXTERN(void) jpeg_idct_8x16
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_7x14
+JEXTERN(void) jpeg_idct_7x14
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_6x12
+JEXTERN(void) jpeg_idct_6x12
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_5x10
+JEXTERN(void) jpeg_idct_5x10
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_4x8
+JEXTERN(void) jpeg_idct_4x8
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_3x6
+JEXTERN(void) jpeg_idct_3x6
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_2x4
+JEXTERN(void) jpeg_idct_2x4
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
-EXTERN(void) jpeg_idct_1x2
+JEXTERN(void) jpeg_idct_1x2
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	 JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col));
 
--- jddctmgr.c.orig	2010-02-20 09:41:32.000000000 +0000
+++ jddctmgr.c	2011-01-05 21:55:15.000000000 +0000
@@ -86,7 +86,7 @@
  * a matching multiplier table.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass (j_decompress_ptr cinfo)
 {
   my_idct_ptr idct = (my_idct_ptr) cinfo->idct;
@@ -358,7 +358,7 @@
  * Initialize IDCT manager.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_inverse_dct (j_decompress_ptr cinfo)
 {
   my_idct_ptr idct;
--- jdhuff.c.orig	2009-09-19 09:59:10.000000000 +0100
+++ jdhuff.c	2011-01-05 21:55:15.000000000 +0000
@@ -319,7 +319,7 @@
  * This routine also performs some validation checks on the table.
  */
 
-LOCAL(void)
+JLOCAL(void)
 jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
 			 d_derived_tbl ** pdtbl)
 {
@@ -461,7 +461,7 @@
 #endif
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 jpeg_fill_bit_buffer (bitread_working_state * state,
 		      register bit_buf_type get_buffer, register int bits_left,
 		      int nbits)
@@ -588,7 +588,7 @@
  * Out-of-line code for Huffman code decoding.
  */
 
-LOCAL(int)
+JLOCAL(int)
 jpeg_huff_decode (bitread_working_state * state,
 		  register bit_buf_type get_buffer, register int bits_left,
 		  d_derived_tbl * htbl, int min_bits)
@@ -632,7 +632,7 @@
  * Returns FALSE if must suspend.
  */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 process_restart (j_decompress_ptr cinfo)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -691,7 +691,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {   
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -762,7 +762,7 @@
  * or first pass of successive approximation).
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {   
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -851,7 +851,7 @@
  * is not very clear on the point.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {   
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -900,7 +900,7 @@
  * MCU decoding for AC successive approximation refinement scan.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {   
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1055,7 +1055,7 @@
  * partial blocks.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1183,7 +1183,7 @@
  * full-size blocks.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1306,7 +1306,7 @@
  * Initialize for a Huffman-compressed scan.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_huff_decoder (j_decompress_ptr cinfo)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
@@ -1505,7 +1505,7 @@
  * Module initialization routine for Huffman entropy decoding.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_huff_decoder (j_decompress_ptr cinfo)
 {
   huff_entropy_ptr entropy;
--- jdinput.c.orig	2009-12-28 10:01:10.000000000 +0000
+++ jdinput.c	2011-01-05 21:55:15.000000000 +0000
@@ -29,7 +29,7 @@
 
 
 /* Forward declarations */
-METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo));
+JMETHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo));
 
 
 /*
@@ -43,7 +43,7 @@
  * Hence it mustn't do anything that can't be done twice.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_core_output_dimensions (j_decompress_ptr cinfo)
 /* Do computations that are needed before master selection phase.
  * This function is used for transcoding and full decompression.
@@ -204,7 +204,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 initial_setup (j_decompress_ptr cinfo)
 /* Called once, when first SOS marker is reached */
 {
@@ -384,7 +384,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 per_scan_setup (j_decompress_ptr cinfo)
 /* Do computations that are needed before processing a JPEG scan */
 /* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */
@@ -483,7 +483,7 @@
  * not at the current Q-table slots.
  */
 
-LOCAL(void)
+JLOCAL(void)
 latch_quant_tables (j_decompress_ptr cinfo)
 {
   int ci, qtblno;
@@ -517,7 +517,7 @@
  * Subsequent calls come from consume_markers, below.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_input_pass (j_decompress_ptr cinfo)
 {
   per_scan_setup(cinfo);
@@ -534,7 +534,7 @@
  * the expected data of the scan.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_input_pass (j_decompress_ptr cinfo)
 {
   cinfo->inputctl->consume_input = consume_markers;
@@ -555,7 +555,7 @@
  * read_markers is processed and then skipped for other markers.
  */
 
-METHODDEF(int)
+JMETHODDEF(int)
 consume_markers (j_decompress_ptr cinfo)
 {
   my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;
@@ -615,7 +615,7 @@
  * Reset state to begin a fresh datastream.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 reset_input_controller (j_decompress_ptr cinfo)
 {
   my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl;
@@ -637,7 +637,7 @@
  * This is called only once, when the decompression object is created.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_input_controller (j_decompress_ptr cinfo)
 {
   my_inputctl_ptr inputctl;
--- jdmainct.c.orig	2002-02-24 19:07:28.000000000 +0000
+++ jdmainct.c	2011-01-05 21:55:15.000000000 +0000
@@ -140,20 +140,20 @@
 
 
 /* Forward declarations */
-METHODDEF(void) process_data_simple_main
+JMETHODDEF(void) process_data_simple_main
 	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
 	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
-METHODDEF(void) process_data_context_main
+JMETHODDEF(void) process_data_context_main
 	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
 	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
 #ifdef QUANT_2PASS_SUPPORTED
-METHODDEF(void) process_data_crank_post
+JMETHODDEF(void) process_data_crank_post
 	JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
 	     JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail));
 #endif
 
 
-LOCAL(void)
+JLOCAL(void)
 alloc_funny_pointers (j_decompress_ptr cinfo)
 /* Allocate space for the funny pointer lists.
  * This is done only once, not once per pass.
@@ -191,7 +191,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 make_funny_pointers (j_decompress_ptr cinfo)
 /* Create the funny pointer lists discussed in the comments above.
  * The actual workspace is already allocated (in main->buffer),
@@ -234,7 +234,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 set_wraparound_pointers (j_decompress_ptr cinfo)
 /* Set up the "wraparound" pointers at top and bottom of the pointer lists.
  * This changes the pointer list state from top-of-image to the normal state.
@@ -262,7 +262,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 set_bottom_pointers (j_decompress_ptr cinfo)
 /* Change the pointer lists to duplicate the last sample row at the bottom
  * of the image.  whichptr indicates which xbuffer holds the final iMCU row.
@@ -303,7 +303,7 @@
  * Initialize for a processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
 {
   my_main_ptr main = (my_main_ptr) cinfo->main;
@@ -341,7 +341,7 @@
  * This handles the simple case where no context is required.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 process_data_simple_main (j_decompress_ptr cinfo,
 			  JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
 			  JDIMENSION out_rows_avail)
@@ -381,7 +381,7 @@
  * This handles the case where context rows must be provided.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 process_data_context_main (j_decompress_ptr cinfo,
 			   JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
 			   JDIMENSION out_rows_avail)
@@ -455,7 +455,7 @@
 
 #ifdef QUANT_2PASS_SUPPORTED
 
-METHODDEF(void)
+JMETHODDEF(void)
 process_data_crank_post (j_decompress_ptr cinfo,
 			 JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
 			 JDIMENSION out_rows_avail)
@@ -472,7 +472,7 @@
  * Initialize main buffer controller.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
 {
   my_main_ptr main;
--- jdmarker.c.orig	2009-08-29 18:49:24.000000000 +0100
+++ jdmarker.c	2011-01-05 21:55:15.000000000 +0000
@@ -194,7 +194,7 @@
  */
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 get_soi (j_decompress_ptr cinfo)
 /* Process an SOI marker */
 {
@@ -234,7 +234,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 get_sof (j_decompress_ptr cinfo, boolean is_baseline, boolean is_prog,
 	 boolean is_arith)
 /* Process a SOFn marker */
@@ -300,7 +300,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 get_sos (j_decompress_ptr cinfo)
 /* Process a SOS marker */
 {
@@ -374,7 +374,7 @@
 
 #ifdef D_ARITH_CODING_SUPPORTED
 
-LOCAL(boolean)
+JLOCAL(boolean)
 get_dac (j_decompress_ptr cinfo)
 /* Process a DAC marker */
 {
@@ -420,7 +420,7 @@
 #endif /* D_ARITH_CODING_SUPPORTED */
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 get_dht (j_decompress_ptr cinfo)
 /* Process a DHT marker */
 {
@@ -491,7 +491,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 get_dqt (j_decompress_ptr cinfo)
 /* Process a DQT marker */
 {
@@ -581,7 +581,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 get_dri (j_decompress_ptr cinfo)
 /* Process a DRI marker */
 {
@@ -617,7 +617,7 @@
 #define APPN_DATA_LEN	14	/* Must be the largest of the above!! */
 
 
-LOCAL(void)
+JLOCAL(void)
 examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data,
 	      unsigned int datalen, INT32 remaining)
 /* Examine first few bytes from an APP0.
@@ -693,7 +693,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
 	       unsigned int datalen, INT32 remaining)
 /* Examine first few bytes from an APP14.
@@ -724,7 +724,7 @@
 }
 
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 get_interesting_appn (j_decompress_ptr cinfo)
 /* Process an APP0 or APP14 marker without saving it */
 {
@@ -772,7 +772,7 @@
 
 #ifdef SAVE_MARKERS_SUPPORTED
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 save_marker (j_decompress_ptr cinfo)
 /* Save an APPn or COM marker into the marker list */
 {
@@ -878,7 +878,7 @@
 #endif /* SAVE_MARKERS_SUPPORTED */
 
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 skip_variable (j_decompress_ptr cinfo)
 /* Skip over an unknown or uninteresting variable-length marker */
 {
@@ -907,7 +907,7 @@
  * but it will never be 0 or FF.
  */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 next_marker (j_decompress_ptr cinfo)
 {
   int c;
@@ -954,7 +954,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 first_marker (j_decompress_ptr cinfo)
 /* Like next_marker, but used to obtain the initial SOI marker. */
 /* For this marker, we do not allow preceding garbage or fill; otherwise,
@@ -990,7 +990,7 @@
  * after processing for the caller.
  */
 
-METHODDEF(int)
+JMETHODDEF(int)
 read_markers (j_decompress_ptr cinfo)
 {
   /* Outer loop repeats once for each marker. */
@@ -1155,7 +1155,7 @@
  * it holds a marker which the decoder will be unable to read past.
  */
 
-METHODDEF(boolean)
+JMETHODDEF(boolean)
 read_restart_marker (j_decompress_ptr cinfo)
 {
   /* Obtain a marker unless we already did. */
@@ -1234,7 +1234,7 @@
  * any other marker would have to be bogus data in that case.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
 {
   int marker = cinfo->unread_marker;
@@ -1284,7 +1284,7 @@
  * Reset marker processing state to begin a fresh datastream.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 reset_marker_reader (j_decompress_ptr cinfo)
 {
   my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
@@ -1304,7 +1304,7 @@
  * This is called only once, when the decompression object is created.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_marker_reader (j_decompress_ptr cinfo)
 {
   my_marker_ptr marker;
@@ -1342,7 +1342,7 @@
 
 #ifdef SAVE_MARKERS_SUPPORTED
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,
 		   unsigned int length_limit)
 {
@@ -1391,7 +1391,7 @@
  * Install a special processing method for COM or APPn markers.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code,
 			   jpeg_marker_parser_method routine)
 {
--- jdmaster.c.orig	2009-12-28 10:01:10.000000000 +0000
+++ jdmaster.c	2011-01-05 21:55:15.000000000 +0000
@@ -41,7 +41,7 @@
  * CRUCIAL: this must match the actual capabilities of jdmerge.c!
  */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 use_merged_upsample (j_decompress_ptr cinfo)
 {
 #ifdef UPSAMPLE_MERGING_SUPPORTED
@@ -84,7 +84,7 @@
  * Also note that it may be called before the master module is initialized!
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
 /* Do computations that are needed before master selection phase.
  * This function is used for full decompression.
@@ -227,7 +227,7 @@
  * enough and used often enough to justify this.
  */
 
-LOCAL(void)
+JLOCAL(void)
 prepare_range_limit_table (j_decompress_ptr cinfo)
 /* Allocate and fill in the sample_range_limit table */
 {
@@ -267,7 +267,7 @@
  * settings.
  */
 
-LOCAL(void)
+JLOCAL(void)
 master_selection (j_decompress_ptr cinfo)
 {
   my_master_ptr master = (my_master_ptr) cinfo->master;
@@ -410,7 +410,7 @@
  * (In the latter case, jdapistd.c will crank the pass to completion.)
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 prepare_for_output_pass (j_decompress_ptr cinfo)
 {
   my_master_ptr master = (my_master_ptr) cinfo->master;
@@ -470,7 +470,7 @@
  * Finish up at end of an output pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_output_pass (j_decompress_ptr cinfo)
 {
   my_master_ptr master = (my_master_ptr) cinfo->master;
@@ -487,7 +487,7 @@
  * Switch to a new external colormap between output passes.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_new_colormap (j_decompress_ptr cinfo)
 {
   my_master_ptr master = (my_master_ptr) cinfo->master;
@@ -515,7 +515,7 @@
  * This is performed at the start of jpeg_start_decompress.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_master_decompress (j_decompress_ptr cinfo)
 {
   my_master_ptr master;
--- jdmerge.c.orig	1996-01-06 17:27:36.000000000 +0000
+++ jdmerge.c	2011-01-05 21:55:15.000000000 +0000
@@ -79,7 +79,7 @@
  * This is taken directly from jdcolor.c; see that file for more info.
  */
 
-LOCAL(void)
+JLOCAL(void)
 build_ycc_rgb_table (j_decompress_ptr cinfo)
 {
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
@@ -122,7 +122,7 @@
  * Initialize for an upsampling pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_merged_upsample (j_decompress_ptr cinfo)
 {
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
@@ -140,7 +140,7 @@
  * The control routine just handles the row buffering considerations.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 merged_2v_upsample (j_decompress_ptr cinfo,
 		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 		    JDIMENSION in_row_groups_avail,
@@ -189,7 +189,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 merged_1v_upsample (j_decompress_ptr cinfo,
 		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 		    JDIMENSION in_row_groups_avail,
@@ -222,7 +222,7 @@
  * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 h2v1_merged_upsample (j_decompress_ptr cinfo,
 		      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
 		      JSAMPARRAY output_buf)
@@ -284,7 +284,7 @@
  * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 h2v2_merged_upsample (j_decompress_ptr cinfo,
 		      JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr,
 		      JSAMPARRAY output_buf)
@@ -366,7 +366,7 @@
  * of this module; no safety checks are made here.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_merged_upsampler (j_decompress_ptr cinfo)
 {
   my_upsample_ptr upsample;
--- jdpostct.c.orig	1996-01-06 17:27:44.000000000 +0000
+++ jdpostct.c	2011-01-05 21:55:15.000000000 +0000
@@ -43,20 +43,20 @@
 
 
 /* Forward declarations */
-METHODDEF(void) post_process_1pass
+JMETHODDEF(void) post_process_1pass
 	JPP((j_decompress_ptr cinfo,
 	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 	     JDIMENSION in_row_groups_avail,
 	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
 	     JDIMENSION out_rows_avail));
 #ifdef QUANT_2PASS_SUPPORTED
-METHODDEF(void) post_process_prepass
+JMETHODDEF(void) post_process_prepass
 	JPP((j_decompress_ptr cinfo,
 	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 	     JDIMENSION in_row_groups_avail,
 	     JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
 	     JDIMENSION out_rows_avail));
-METHODDEF(void) post_process_2pass
+JMETHODDEF(void) post_process_2pass
 	JPP((j_decompress_ptr cinfo,
 	     JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 	     JDIMENSION in_row_groups_avail,
@@ -69,7 +69,7 @@
  * Initialize for a processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)
 {
   my_post_ptr post = (my_post_ptr) cinfo->post;
@@ -122,7 +122,7 @@
  * This is used for color precision reduction as well as one-pass quantization.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 post_process_1pass (j_decompress_ptr cinfo,
 		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 		    JDIMENSION in_row_groups_avail,
@@ -154,7 +154,7 @@
  * Process some data in the first pass of 2-pass quantization.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 post_process_prepass (j_decompress_ptr cinfo,
 		      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 		      JDIMENSION in_row_groups_avail,
@@ -198,7 +198,7 @@
  * Process some data in the second pass of 2-pass quantization.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 post_process_2pass (j_decompress_ptr cinfo,
 		    JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 		    JDIMENSION in_row_groups_avail,
@@ -246,7 +246,7 @@
  * Initialize postprocessing controller.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
 {
   my_post_ptr post;
--- jdsample.c.orig	2008-12-30 11:29:14.000000000 +0000
+++ jdsample.c	2011-01-05 21:55:15.000000000 +0000
@@ -66,7 +66,7 @@
  * Initialize for an upsampling pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_upsample (j_decompress_ptr cinfo)
 {
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
@@ -86,7 +86,7 @@
  * color conversion a row at a time.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 sep_upsample (j_decompress_ptr cinfo,
 	      JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
 	      JDIMENSION in_row_groups_avail,
@@ -154,7 +154,7 @@
  * "consumed" until we are done color converting and emitting it.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		   JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
@@ -167,7 +167,7 @@
  * These components will not be referenced by color conversion.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
@@ -186,7 +186,7 @@
  * you would be well advised to improve this code.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	      JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
@@ -230,7 +230,7 @@
  * It's still a box filter.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
@@ -258,7 +258,7 @@
  * It's still a box filter.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
@@ -290,7 +290,7 @@
  * Module initialization routine for upsampling.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_upsampler (j_decompress_ptr cinfo)
 {
   my_upsample_ptr upsample;
--- jdtrans.c.orig	2009-09-14 00:48:38.000000000 +0100
+++ jdtrans.c	2011-01-05 21:55:15.000000000 +0000
@@ -17,7 +17,7 @@
 
 
 /* Forward declarations */
-LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo));
+JLOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo));
 
 
 /*
@@ -42,7 +42,7 @@
  * a suspending data source is used.
  */
 
-GLOBAL(jvirt_barray_ptr *)
+JGLOBAL(jvirt_barray_ptr *)
 jpeg_read_coefficients (j_decompress_ptr cinfo)
 {
   if (cinfo->global_state == DSTATE_READY) {
@@ -94,7 +94,7 @@
  * This substitutes for jdmaster.c's initialization of the full decompressor.
  */
 
-LOCAL(void)
+JLOCAL(void)
 transdecode_master_selection (j_decompress_ptr cinfo)
 {
   /* This is effectively a buffered-image operation. */
--- jerror.c.orig	1998-02-21 19:03:16.000000000 +0000
+++ jerror.c	2011-01-05 21:55:15.000000000 +0000
@@ -66,7 +66,7 @@
  * or jpeg_destroy) at some point.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 error_exit (j_common_ptr cinfo)
 {
   /* Always display the message */
@@ -94,7 +94,7 @@
  * not just not use this routine.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 output_message (j_common_ptr cinfo)
 {
   char buffer[JMSG_LENGTH_MAX];
@@ -124,7 +124,7 @@
  * or change the policy about which messages to display.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 emit_message (j_common_ptr cinfo, int msg_level)
 {
   struct jpeg_error_mgr * err = cinfo->err;
@@ -153,7 +153,7 @@
  * Few applications should need to override this method.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 format_message (j_common_ptr cinfo, char * buffer)
 {
   struct jpeg_error_mgr * err = cinfo->err;
@@ -208,7 +208,7 @@
  * this method if it has additional error processing state.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 reset_error_mgr (j_common_ptr cinfo)
 {
   cinfo->err->num_warnings = 0;
@@ -227,7 +227,7 @@
  * after which the application may override some of the methods.
  */
 
-GLOBAL(struct jpeg_error_mgr *)
+JGLOBAL(struct jpeg_error_mgr *)
 jpeg_std_error (struct jpeg_error_mgr * err)
 {
   err->error_exit = error_exit;
--- jfdctflt.c.orig	2009-01-18 00:02:53.000000000 +0000
+++ jfdctflt.c	2011-01-05 21:55:15.000000000 +0000
@@ -56,7 +56,7 @@
  * Perform the forward DCT on one block of samples.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_float (FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
--- jfdctfst.c.orig	2009-01-18 00:03:07.000000000 +0000
+++ jfdctfst.c	2011-01-05 21:55:15.000000000 +0000
@@ -111,7 +111,7 @@
  * Perform the forward DCT on one block of samples.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_ifast (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
--- jfdctint.c.orig	2009-06-08 20:40:24.000000000 +0100
+++ jfdctint.c	2011-01-05 21:55:15.000000000 +0000
@@ -154,7 +154,7 @@
  * Perform the forward DCT on one block of samples.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_islow (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3;
@@ -324,7 +324,7 @@
  * Perform the forward DCT on a 7x7 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_7x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3;
@@ -459,7 +459,7 @@
  * Perform the forward DCT on a 6x6 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_6x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2;
@@ -572,7 +572,7 @@
  * Perform the forward DCT on a 5x5 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_5x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2;
@@ -682,7 +682,7 @@
  * Perform the forward DCT on a 4x4 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_4x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1;
@@ -775,7 +775,7 @@
  * Perform the forward DCT on a 3x3 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_3x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2;
@@ -860,7 +860,7 @@
  * Perform the forward DCT on a 2x2 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_2x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3;
@@ -904,7 +904,7 @@
  * Perform the forward DCT on a 1x1 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_1x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   /* Pre-zero output coefficient block. */
@@ -922,7 +922,7 @@
  * Perform the forward DCT on a 9x9 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_9x9 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
@@ -1072,7 +1072,7 @@
  * Perform the forward DCT on a 10x10 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_10x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
@@ -1235,7 +1235,7 @@
  * Perform the forward DCT on an 11x11 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_11x11 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
@@ -1418,7 +1418,7 @@
  * Perform the forward DCT on a 12x12 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_12x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
@@ -1583,7 +1583,7 @@
  * Perform the forward DCT on a 13x13 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_13x13 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
@@ -1782,7 +1782,7 @@
  * Perform the forward DCT on a 14x14 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_14x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
@@ -1982,7 +1982,7 @@
  * Perform the forward DCT on a 15x15 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_15x15 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
@@ -2161,7 +2161,7 @@
  * Perform the forward DCT on a 16x16 sample block.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_16x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
@@ -2369,7 +2369,7 @@
  * 16-point FDCT in pass 1 (rows), 8-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_16x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
@@ -2550,7 +2550,7 @@
  * 14-point FDCT in pass 1 (rows), 7-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_14x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
@@ -2714,7 +2714,7 @@
  * 12-point FDCT in pass 1 (rows), 6-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_12x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
@@ -2853,7 +2853,7 @@
  * 10-point FDCT in pass 1 (rows), 5-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_10x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
@@ -2985,7 +2985,7 @@
  * 8-point FDCT in pass 1 (rows), 4-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_8x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3;
@@ -3121,7 +3121,7 @@
  * 6-point FDCT in pass 1 (rows), 3-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_6x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2;
@@ -3221,7 +3221,7 @@
  * 4-point FDCT in pass 1 (rows), 2-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_4x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1;
@@ -3304,7 +3304,7 @@
  * 2-point FDCT in pass 1 (rows), 1-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_2x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1;
@@ -3337,7 +3337,7 @@
  * 8-point FDCT in pass 1 (rows), 16-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_8x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
@@ -3525,7 +3525,7 @@
  * 7-point FDCT in pass 1 (rows), 14-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_7x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
@@ -3706,7 +3706,7 @@
  * 6-point FDCT in pass 1 (rows), 12-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_6x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
@@ -3855,7 +3855,7 @@
  * 5-point FDCT in pass 1 (rows), 10-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_5x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3, tmp4;
@@ -4001,7 +4001,7 @@
  * 4-point FDCT in pass 1 (rows), 8-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_4x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2, tmp3;
@@ -4137,7 +4137,7 @@
  * 3-point FDCT in pass 1 (rows), 6-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_3x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1, tmp2;
@@ -4242,7 +4242,7 @@
  * 2-point FDCT in pass 1 (rows), 4-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_2x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1;
@@ -4321,7 +4321,7 @@
  * 1-point FDCT in pass 1 (rows), 2-point in pass 2 (columns).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_fdct_1x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
 {
   INT32 tmp0, tmp1;
--- jidctflt.c.orig	2010-02-21 10:51:08.000000000 +0000
+++ jidctflt.c	2011-01-05 21:55:15.000000000 +0000
@@ -65,7 +65,7 @@
  * Perform dequantization and inverse DCT on one block of coefficients.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
--- jidctfst.c.orig	1998-01-14 21:10:06.000000000 +0000
+++ jidctfst.c	2011-01-05 21:55:15.000000000 +0000
@@ -164,7 +164,7 @@
  * Perform dequantization and inverse DCT on one block of coefficients.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
--- jidctint.c.orig	2009-06-08 20:41:14.000000000 +0100
+++ jidctint.c	2011-01-05 21:55:15.000000000 +0000
@@ -167,7 +167,7 @@
  * Perform dequantization and inverse DCT on one block of coefficients.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -424,7 +424,7 @@
  * cK represents sqrt(2) * cos(K*pi/14).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_7x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -573,7 +573,7 @@
  * cK represents sqrt(2) * cos(K*pi/12).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -694,7 +694,7 @@
  * cK represents sqrt(2) * cos(K*pi/10).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_5x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -809,7 +809,7 @@
  * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT].
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -914,7 +914,7 @@
  * cK represents sqrt(2) * cos(K*pi/6).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_3x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -1003,7 +1003,7 @@
  * Multiplication-less algorithm.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -1058,7 +1058,7 @@
  * average pixel value, which is one-eighth of the DC coefficient.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -1085,7 +1085,7 @@
  * cK represents sqrt(2) * cos(K*pi/18).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_9x9 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -1256,7 +1256,7 @@
  * cK represents sqrt(2) * cos(K*pi/20).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_10x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -1451,7 +1451,7 @@
  * cK represents sqrt(2) * cos(K*pi/22).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_11x11 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -1645,7 +1645,7 @@
  * cK represents sqrt(2) * cos(K*pi/24).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -1861,7 +1861,7 @@
  * cK represents sqrt(2) * cos(K*pi/26).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_13x13 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -2089,7 +2089,7 @@
  * cK represents sqrt(2) * cos(K*pi/28).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_14x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -2315,7 +2315,7 @@
  * cK represents sqrt(2) * cos(K*pi/30).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_15x15 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -2557,7 +2557,7 @@
  * cK represents sqrt(2) * cos(K*pi/32).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_16x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		 JCOEFPTR coef_block,
 		 JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -2818,7 +2818,7 @@
  * 8-point IDCT in pass 1 (columns), 16-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_16x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -3089,7 +3089,7 @@
  * 7-point IDCT in pass 1 (columns), 14-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_14x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -3284,7 +3284,7 @@
  * 6-point IDCT in pass 1 (columns), 12-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_12x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -3460,7 +3460,7 @@
  * 5-point IDCT in pass 1 (columns), 10-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_10x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -3621,7 +3621,7 @@
  * 4-point IDCT in pass 1 (columns), 8-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_8x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -3774,7 +3774,7 @@
  * 3-point IDCT in pass 1 (columns), 6-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_6x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -3884,7 +3884,7 @@
  * 2-point IDCT in pass 1 (columns), 4-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_4x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -3974,7 +3974,7 @@
  * 1-point IDCT in pass 1 (columns), 2-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_2x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -4016,7 +4016,7 @@
  * 16-point IDCT in pass 1 (columns), 8-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_8x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -4234,7 +4234,7 @@
  * 14-point IDCT in pass 1 (columns), 7-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_7x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -4417,7 +4417,7 @@
  * 12-point IDCT in pass 1 (columns), 6-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_6x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -4581,7 +4581,7 @@
  * 10-point IDCT in pass 1 (columns), 5-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_5x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 		JCOEFPTR coef_block,
 		JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -4733,7 +4733,7 @@
  * 8-point IDCT in pass 1 (columns), 4-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_4x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -4913,7 +4913,7 @@
  * 6-point IDCT in pass 1 (columns), 3-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_3x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -5017,7 +5017,7 @@
  * 4-point IDCT in pass 1 (columns), 2-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_2x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
@@ -5101,7 +5101,7 @@
  * 2-point IDCT in pass 1 (columns), 1-point in pass 2 (rows).
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_idct_1x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 	       JCOEFPTR coef_block,
 	       JSAMPARRAY output_buf, JDIMENSION output_col)
--- jmemansi.c.orig	1996-01-06 17:29:46.000000000 +0000
+++ jmemansi.c	2011-01-05 21:55:15.000000000 +0000
@@ -32,13 +32,13 @@
  * routines malloc() and free().
  */
 
-GLOBAL(void *)
+JGLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void *) malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
   free(object);
@@ -52,13 +52,13 @@
  * you probably won't be able to process useful-size images in only 64KB.
  */
 
-GLOBAL(void FAR *)
+JGLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void FAR *) malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
   free(object);
@@ -77,7 +77,7 @@
 #define DEFAULT_MAX_MEM		1000000L /* default: one megabyte */
 #endif
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
 		    long max_bytes_needed, long already_allocated)
 {
@@ -93,7 +93,7 @@
  */
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 		    void FAR * buffer_address,
 		    long file_offset, long byte_count)
@@ -106,7 +106,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 		     void FAR * buffer_address,
 		     long file_offset, long byte_count)
@@ -119,7 +119,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
 {
   fclose(info->temp_file);
@@ -137,7 +137,7 @@
  * indeed, we can't even find out the actual name of the temp file.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 			 long total_bytes_needed)
 {
@@ -154,13 +154,13 @@
  * cleanup required.
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
   return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
   /* no work */
--- jmemdos.c.orig	1997-08-03 20:22:02.000000000 +0100
+++ jmemdos.c	2011-01-05 21:55:15.000000000 +0000
@@ -124,7 +124,7 @@
 
 static int next_file_num;	/* to distinguish among several temp files */
 
-LOCAL(void)
+JLOCAL(void)
 select_file_name (char * fname)
 {
   const char * env;
@@ -162,13 +162,13 @@
  * routines malloc() and free().
  */
 
-GLOBAL(void *)
+JGLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void *) malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
   free(object);
@@ -179,13 +179,13 @@
  * "Large" objects are allocated in far memory, if possible
  */
 
-GLOBAL(void FAR *)
+JGLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void FAR *) far_malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
   far_free(object);
@@ -204,7 +204,7 @@
 #define DEFAULT_MAX_MEM		300000L /* for total usage about 450K */
 #endif
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
 		    long max_bytes_needed, long already_allocated)
 {
@@ -239,7 +239,7 @@
  */
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_file_store (j_common_ptr cinfo, backing_store_ptr info,
 		 void FAR * buffer_address,
 		 long file_offset, long byte_count)
@@ -255,7 +255,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_file_store (j_common_ptr cinfo, backing_store_ptr info,
 		  void FAR * buffer_address,
 		  long file_offset, long byte_count)
@@ -271,7 +271,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 close_file_store (j_common_ptr cinfo, backing_store_ptr info)
 {
   jdos_close(info->handle.file_handle);	/* close the file */
@@ -284,7 +284,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 open_file_store (j_common_ptr cinfo, backing_store_ptr info,
 		 long total_bytes_needed)
 {
@@ -329,7 +329,7 @@
 #define ODD(X)	(((X) & 1L) != 0)
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_xms_store (j_common_ptr cinfo, backing_store_ptr info,
 		void FAR * buffer_address,
 		long file_offset, long byte_count)
@@ -362,7 +362,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_xms_store (j_common_ptr cinfo, backing_store_ptr info,
 		 void FAR * buffer_address,
 		 long file_offset, long byte_count)
@@ -397,7 +397,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 close_xms_store (j_common_ptr cinfo, backing_store_ptr info)
 {
   XMScontext ctx;
@@ -410,7 +410,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 open_xms_store (j_common_ptr cinfo, backing_store_ptr info,
 		long total_bytes_needed)
 {
@@ -487,7 +487,7 @@
 #define LOBYTE(W)  ((W) & 0xFF)
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_ems_store (j_common_ptr cinfo, backing_store_ptr info,
 		void FAR * buffer_address,
 		long file_offset, long byte_count)
@@ -512,7 +512,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_ems_store (j_common_ptr cinfo, backing_store_ptr info,
 		 void FAR * buffer_address,
 		 long file_offset, long byte_count)
@@ -537,7 +537,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 close_ems_store (j_common_ptr cinfo, backing_store_ptr info)
 {
   EMScontext ctx;
@@ -550,7 +550,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 open_ems_store (j_common_ptr cinfo, backing_store_ptr info,
 		long total_bytes_needed)
 {
@@ -595,7 +595,7 @@
  * Initial opening of a backing-store object.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 			 long total_bytes_needed)
 {
@@ -619,14 +619,14 @@
  * cleanup required.
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
   next_file_num = 0;		/* initialize temp file name generator */
   return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
   /* Microsoft C, at least in v6.00A, will not successfully reclaim freed
--- jmemmac.c.orig	1997-08-03 20:26:18.000000000 +0100
+++ jmemmac.c	2011-01-05 21:55:15.000000000 +0000
@@ -78,13 +78,13 @@
  * with relocatable storage.
  */
 
-GLOBAL(void *)
+JGLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void *) NewPtr(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
   DisposePtr((Ptr) object);
@@ -98,13 +98,13 @@
  * on rational architectures like the Mac.
  */
 
-GLOBAL(void FAR *)
+JGLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void FAR *) NewPtr(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
   DisposePtr((Ptr) object);
@@ -115,7 +115,7 @@
  * This routine computes the total memory space available for allocation.
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
 		    long max_bytes_needed, long already_allocated)
 {
@@ -150,7 +150,7 @@
  */
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 		    void FAR * buffer_address,
 		    long file_offset, long byte_count)
@@ -168,7 +168,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 		     void FAR * buffer_address,
 		     long file_offset, long byte_count)
@@ -186,7 +186,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
 {
   FSClose ( info->temp_file );
@@ -201,7 +201,7 @@
  * and puts the temporary file in there.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 			 long total_bytes_needed)
 {
@@ -268,7 +268,7 @@
  * cleanup required.
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
   next_file_num = 0;
@@ -282,7 +282,7 @@
   return FreeMem();
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
   /* no work */
--- jmemmgr.c.orig	1997-04-14 20:56:38.000000000 +0100
+++ jmemmgr.c	2011-01-05 21:55:15.000000000 +0000
@@ -182,7 +182,7 @@
 
 #ifdef MEM_STATS		/* optional extra stuff for statistics */
 
-LOCAL(void)
+JLOCAL(void)
 print_mem_stats (j_common_ptr cinfo, int pool_id)
 {
   my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
@@ -213,7 +213,7 @@
 #endif /* MEM_STATS */
 
 
-LOCAL(void)
+JLOCAL(void)
 out_of_memory (j_common_ptr cinfo, int which)
 /* Report an out-of-memory error and stop execution */
 /* If we compiled MEM_STATS support, report alloc requests before dying */
@@ -253,7 +253,7 @@
 #define MIN_SLOP  50		/* greater than 0 to avoid futile looping */
 
 
-METHODDEF(void *)
+JMETHODDEF(void *)
 alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
 /* Allocate a "small" object */
 {
@@ -338,7 +338,7 @@
  * deliberately bunch rows together to ensure a large request size.
  */
 
-METHODDEF(void FAR *)
+JMETHODDEF(void FAR *)
 alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject)
 /* Allocate a "large" object */
 {
@@ -391,7 +391,7 @@
  * a virtual array.
  */
 
-METHODDEF(JSAMPARRAY)
+JMETHODDEF(JSAMPARRAY)
 alloc_sarray (j_common_ptr cinfo, int pool_id,
 	      JDIMENSION samplesperrow, JDIMENSION numrows)
 /* Allocate a 2-D sample array */
@@ -439,7 +439,7 @@
  * This is essentially the same as the code for sample arrays, above.
  */
 
-METHODDEF(JBLOCKARRAY)
+JMETHODDEF(JBLOCKARRAY)
 alloc_barray (j_common_ptr cinfo, int pool_id,
 	      JDIMENSION blocksperrow, JDIMENSION numrows)
 /* Allocate a 2-D coefficient-block array */
@@ -519,7 +519,7 @@
  */
 
 
-METHODDEF(jvirt_sarray_ptr)
+JMETHODDEF(jvirt_sarray_ptr)
 request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
 		     JDIMENSION samplesperrow, JDIMENSION numrows,
 		     JDIMENSION maxaccess)
@@ -549,7 +549,7 @@
 }
 
 
-METHODDEF(jvirt_barray_ptr)
+JMETHODDEF(jvirt_barray_ptr)
 request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero,
 		     JDIMENSION blocksperrow, JDIMENSION numrows,
 		     JDIMENSION maxaccess)
@@ -579,7 +579,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 realize_virt_arrays (j_common_ptr cinfo)
 /* Allocate the in-memory buffers for any unrealized virtual arrays */
 {
@@ -686,7 +686,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing)
 /* Do backing store read or write of a virtual sample array */
 {
@@ -719,7 +719,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing)
 /* Do backing store read or write of a virtual coefficient-block array */
 {
@@ -752,7 +752,7 @@
 }
 
 
-METHODDEF(JSAMPARRAY)
+JMETHODDEF(JSAMPARRAY)
 access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr,
 		    JDIMENSION start_row, JDIMENSION num_rows,
 		    boolean writable)
@@ -837,7 +837,7 @@
 }
 
 
-METHODDEF(JBLOCKARRAY)
+JMETHODDEF(JBLOCKARRAY)
 access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr,
 		    JDIMENSION start_row, JDIMENSION num_rows,
 		    boolean writable)
@@ -926,7 +926,7 @@
  * Release all objects belonging to a specified pool.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 free_pool (j_common_ptr cinfo, int pool_id)
 {
   my_mem_ptr mem = (my_mem_ptr) cinfo->mem;
@@ -998,7 +998,7 @@
  * Note that this cannot be called unless cinfo->mem is non-NULL.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 self_destruct (j_common_ptr cinfo)
 {
   int pool;
@@ -1024,7 +1024,7 @@
  * When this is called, only the error manager pointer is valid in cinfo!
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_memory_mgr (j_common_ptr cinfo)
 {
   my_mem_ptr mem;
--- jmemname.c.orig	1997-09-14 17:35:10.000000000 +0100
+++ jmemname.c	2011-01-05 21:55:15.000000000 +0000
@@ -91,7 +91,7 @@
 #endif
 
 
-LOCAL(void)
+JLOCAL(void)
 select_file_name (char * fname)
 {
   FILE * tfile;
@@ -122,7 +122,7 @@
 #define TEMP_FILE_NAME  "%sJPG%dXXXXXX"
 #endif
 
-LOCAL(void)
+JLOCAL(void)
 select_file_name (char * fname)
 {
   next_file_num++;		/* advance counter */
@@ -139,13 +139,13 @@
  * routines malloc() and free().
  */
 
-GLOBAL(void *)
+JGLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void *) malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
   free(object);
@@ -159,13 +159,13 @@
  * you probably won't be able to process useful-size images in only 64KB.
  */
 
-GLOBAL(void FAR *)
+JGLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void FAR *) malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
   free(object);
@@ -184,7 +184,7 @@
 #define DEFAULT_MAX_MEM		1000000L /* default: one megabyte */
 #endif
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
 		    long max_bytes_needed, long already_allocated)
 {
@@ -200,7 +200,7 @@
  */
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 		    void FAR * buffer_address,
 		    long file_offset, long byte_count)
@@ -213,7 +213,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 write_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 		     void FAR * buffer_address,
 		     long file_offset, long byte_count)
@@ -226,7 +226,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 close_backing_store (j_common_ptr cinfo, backing_store_ptr info)
 {
   fclose(info->temp_file);	/* close the file */
@@ -243,7 +243,7 @@
  * Initial opening of a backing-store object.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 			 long total_bytes_needed)
 {
@@ -262,14 +262,14 @@
  * cleanup required.
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
   next_file_num = 0;		/* initialize temp file name generator */
   return DEFAULT_MAX_MEM;	/* default for max_memory_to_use */
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
   /* no work */
--- jmemnobs.c.orig	1996-01-06 17:31:18.000000000 +0000
+++ jmemnobs.c	2011-01-05 21:55:15.000000000 +0000
@@ -31,13 +31,13 @@
  * routines malloc() and free().
  */
 
-GLOBAL(void *)
+JGLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void *) malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
   free(object);
@@ -51,13 +51,13 @@
  * you probably won't be able to process useful-size images in only 64KB.
  */
 
-GLOBAL(void FAR *)
+JGLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
   return (void FAR *) malloc(sizeofobject);
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
   free(object);
@@ -69,7 +69,7 @@
  * Here we always say, "we got all you want bud!"
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
 		    long max_bytes_needed, long already_allocated)
 {
@@ -83,7 +83,7 @@
  * this should never be called and we can just error out.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 			 long total_bytes_needed)
 {
@@ -96,13 +96,13 @@
  * cleanup required.  Here, there isn't any.
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
   return 0;			/* just set max_memory_to_use to 0 */
 }
 
-GLOBAL(void)
+JGLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
   /* no work */
--- jmemsys.h.orig	1997-08-03 19:58:36.000000000 +0100
+++ jmemsys.h	2011-01-05 21:55:15.000000000 +0000
@@ -44,8 +44,8 @@
  * On an 80x86 machine using small-data memory model, these manage near heap.
  */
 
-EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
-EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
+JEXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject));
+JEXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object,
 				  size_t sizeofobject));
 
 /*
@@ -57,9 +57,9 @@
  * in case a different allocation strategy is desirable for large chunks.
  */
 
-EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
+JEXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo,
 				       size_t sizeofobject));
-EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
+JEXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object,
 				  size_t sizeofobject));
 
 /*
@@ -100,7 +100,7 @@
  * Conversely, zero may be returned to always use the minimum amount of memory.
  */
 
-EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
+JEXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo,
 				     long min_bytes_needed,
 				     long max_bytes_needed,
 				     long already_allocated));
@@ -177,7 +177,7 @@
  * just take an error exit.)
  */
 
-EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
+JEXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo,
 					  backing_store_ptr info,
 					  long total_bytes_needed));
 
@@ -194,5 +194,5 @@
  * all opened backing-store objects have been closed.
  */
 
-EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
-EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
+JEXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo));
+JEXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo));
--- jmorecfg.h.orig	2009-11-20 08:01:24.000000000 +0000
+++ jmorecfg.h	2011-01-05 21:55:15.000000000 +0000
@@ -188,13 +188,13 @@
  */
 
 /* a function called through method pointers: */
-#define METHODDEF(type)		static type
+#define JMETHODDEF(type)		static type
 /* a function used only in its module: */
-#define LOCAL(type)		static type
-/* a function referenced thru EXTERNs: */
-#define GLOBAL(type)		type
-/* a reference to a GLOBAL function: */
-#define EXTERN(type)		extern type
+#define JLOCAL(type)		static type
+/* a function referenced thru JEXTERNs: */
+#define JGLOBAL(type)		type
+/* a reference to a JGLOBAL function: */
+#define JEXTERN(type)		extern type
 
 
 /* This macro is used to declare a "method", that is, a function pointer.
@@ -328,16 +328,16 @@
 /* Definitions for speed-related optimizations. */
 
 
-/* If your compiler supports inline functions, define INLINE
+/* If your compiler supports inline functions, define JINLINE
  * as the inline keyword; otherwise define it as empty.
  */
 
-#ifndef INLINE
+#ifndef JINLINE
 #ifdef __GNUC__			/* for instance, GNU C knows about inline */
-#define INLINE __inline__
+#define JINLINE __inline__
 #endif
-#ifndef INLINE
-#define INLINE			/* default is to define it as empty */
+#ifndef JINLINE
+#define JINLINE			/* default is to define it as empty */
 #endif
 #endif
 
--- jpegint.h.orig	2009-09-19 09:51:24.000000000 +0100
+++ jpegint.h	2011-01-05 22:28:15.000000000 +0000
@@ -337,51 +337,51 @@
 
 
 /* Compression module initialization routines */
-EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
+JEXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo));
+JEXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo,
 					 boolean transcode_only));
-EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
+JEXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo,
 					  boolean need_full_buffer));
-EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
+JEXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo,
 					  boolean need_full_buffer));
-EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
+JEXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo,
 					  boolean need_full_buffer));
-EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
-EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
+JEXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo));
+JEXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo));
+JEXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo));
+JEXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo));
+JEXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo));
+JEXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo));
 /* Decompression module initialization routines */
-EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
+JEXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo,
 					  boolean need_full_buffer));
-EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
+JEXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo,
 					  boolean need_full_buffer));
-EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
+JEXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo,
 					  boolean need_full_buffer));
-EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
-EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo));
 /* Memory manager initialization */
-EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
+JEXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo));
 
 /* Utility routines in jutils.c */
-EXTERN(long) jdiv_round_up JPP((long a, long b));
-EXTERN(long) jround_up JPP((long a, long b));
-EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
+JEXTERN(long) jdiv_round_up JPP((long a, long b));
+JEXTERN(long) jround_up JPP((long a, long b));
+JEXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row,
 				    JSAMPARRAY output_array, int dest_row,
 				    int num_rows, JDIMENSION num_cols));
-EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
+JEXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row,
 				  JDIMENSION num_blocks));
-EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
+JEXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero));
 /* Constant tables in jutils.c */
 #if 0				/* This table is not actually needed in v6a */
 extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */
--- jpeglib.h.orig	2009-11-16 11:44:42.000000000 +0000
+++ jpeglib.h	2011-01-05 21:55:15.000000000 +0000
@@ -923,7 +923,7 @@
 
 
 /* Default error-management setup */
-EXTERN(struct jpeg_error_mgr *) jpeg_std_error
+JEXTERN(struct jpeg_error_mgr *) jpeg_std_error
 	JPP((struct jpeg_error_mgr * err));
 
 /* Initialization of JPEG compression objects.
@@ -939,82 +939,82 @@
 #define jpeg_create_decompress(cinfo) \
     jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
 			  (size_t) sizeof(struct jpeg_decompress_struct))
-EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
+JEXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo,
 				      int version, size_t structsize));
-EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
+JEXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo,
 					int version, size_t structsize));
 /* Destruction of JPEG compression objects */
-EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));
 
 /* Standard data source and destination managers: stdio streams. */
 /* Caller is responsible for opening the file before and closing after. */
-EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
-EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
+JEXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));
+JEXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));
 
 /* Data source and destination managers: memory buffers. */
-EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
+JEXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
 			       unsigned char ** outbuffer,
 			       unsigned long * outsize));
-EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
+JEXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
 			      unsigned char * inbuffer,
 			      unsigned long insize));
 
 /* Default parameter setup for compression */
-EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));
 /* Compression parameter setup aids */
-EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
+JEXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo,
 				      J_COLOR_SPACE colorspace));
-EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
+JEXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
 				   boolean force_baseline));
-EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
+JEXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo,
 					  int scale_factor,
 					  boolean force_baseline));
-EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
+JEXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo,
 				       boolean force_baseline));
-EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
+JEXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl,
 				       const unsigned int *basic_table,
 				       int scale_factor,
 				       boolean force_baseline));
-EXTERN(int) jpeg_quality_scaling JPP((int quality));
-EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
+JEXTERN(int) jpeg_quality_scaling JPP((int quality));
+JEXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo,
 				       boolean suppress));
-EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
-EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
+JEXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));
+JEXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));
 
 /* Main entry points for compression */
-EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
+JEXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
 				      boolean write_all_tables));
-EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
+JEXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo,
 					     JSAMPARRAY scanlines,
 					     JDIMENSION num_lines));
-EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));
 
 /* Precalculate JPEG dimensions for current compression parameters. */
-EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo));
 
 /* Replaces jpeg_write_scanlines when writing raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
+JEXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo,
 					    JSAMPIMAGE data,
 					    JDIMENSION num_lines));
 
 /* Write a special marker.  See libjpeg.txt concerning safe usage. */
-EXTERN(void) jpeg_write_marker
+JEXTERN(void) jpeg_write_marker
 	JPP((j_compress_ptr cinfo, int marker,
 	     const JOCTET * dataptr, unsigned int datalen));
 /* Same, but piecemeal. */
-EXTERN(void) jpeg_write_m_header
+JEXTERN(void) jpeg_write_m_header
 	JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));
-EXTERN(void) jpeg_write_m_byte
+JEXTERN(void) jpeg_write_m_byte
 	JPP((j_compress_ptr cinfo, int val));
 
 /* Alternate compression function: just write an abbreviated table file */
-EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));
 
 /* Decompression startup: read start of JPEG datastream to see what's there */
-EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
+JEXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
 				  boolean require_image));
 /* Return value is one of: */
 #define JPEG_SUSPENDED		0 /* Suspended due to lack of input data */
@@ -1027,25 +1027,25 @@
  */
 
 /* Main entry points for decompression */
-EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
-EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
+JEXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));
+JEXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo,
 					    JSAMPARRAY scanlines,
 					    JDIMENSION max_lines));
-EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
+JEXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));
 
 /* Replaces jpeg_read_scanlines when reading raw downsampled data. */
-EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
+JEXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo,
 					   JSAMPIMAGE data,
 					   JDIMENSION max_lines));
 
 /* Additional entry points for buffered-image mode. */
-EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
+JEXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));
+JEXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo,
 				       int scan_number));
-EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
-EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
-EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
+JEXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));
+JEXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));
+JEXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));
 /* Return value is one of: */
 /* #define JPEG_SUSPENDED	0    Suspended due to lack of input data */
 #define JPEG_REACHED_SOS	1 /* Reached start of new scan */
@@ -1054,24 +1054,24 @@
 #define JPEG_SCAN_COMPLETED	4 /* Completed last iMCU row of a scan */
 
 /* Precalculate output dimensions for current decompression parameters. */
-EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));
 
 /* Control saving of COM and APPn markers into marker_list. */
-EXTERN(void) jpeg_save_markers
+JEXTERN(void) jpeg_save_markers
 	JPP((j_decompress_ptr cinfo, int marker_code,
 	     unsigned int length_limit));
 
 /* Install a special processing method for COM or APPn markers. */
-EXTERN(void) jpeg_set_marker_processor
+JEXTERN(void) jpeg_set_marker_processor
 	JPP((j_decompress_ptr cinfo, int marker_code,
 	     jpeg_marker_parser_method routine));
 
 /* Read or write raw DCT coefficients --- useful for lossless transcoding. */
-EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
-EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
+JEXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo,
 					  jvirt_barray_ptr * coef_arrays));
-EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
+JEXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo,
 						j_compress_ptr dstinfo));
 
 /* If you choose to abort compression or decompression before completing
@@ -1080,17 +1080,17 @@
  * if you're done with the JPEG object, but if you want to clean it up and
  * reuse it, call this:
  */
-EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
-EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
+JEXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));
+JEXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));
 
 /* Generic versions of jpeg_abort and jpeg_destroy that work on either
  * flavor of JPEG object.  These may be more convenient in some places.
  */
-EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
-EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
+JEXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));
+JEXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));
 
 /* Default restart-marker-resync procedure for use by data source modules */
-EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
+JEXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo,
 					    int desired));
 
 
--- jpegtran.c.orig	2010-02-14 14:53:36.000000000 +0000
+++ jpegtran.c	2011-01-05 21:55:15.000000000 +0000
@@ -42,7 +42,7 @@
 static jpeg_transform_info transformoption; /* image transformation options */
 
 
-LOCAL(void)
+JLOCAL(void)
 usage (void)
 /* complain about bad command line */
 {
@@ -93,7 +93,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 select_transform (JXFORM_CODE transform)
 /* Silly little routine to detect multiple transform options,
  * which we can't handle.
@@ -116,7 +116,7 @@
 }
 
 
-LOCAL(int)
+JLOCAL(int)
 parse_switches (j_compress_ptr cinfo, int argc, char **argv,
 		int last_file_arg_seen, boolean for_real)
 /* Parse optional switches.
--- jquant1.c.orig	1996-01-06 17:31:32.000000000 +0000
+++ jquant1.c	2011-01-05 21:55:15.000000000 +0000
@@ -182,7 +182,7 @@
  */
 
 
-LOCAL(int)
+JLOCAL(int)
 select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
 /* Determine allocation of desired colors to components, */
 /* and fill in Ncolors[] array to indicate choice. */
@@ -241,7 +241,7 @@
 }
 
 
-LOCAL(int)
+JLOCAL(int)
 output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
 /* Return j'th output value, where j will range from 0 to maxj */
 /* The output values must fall in 0..MAXJSAMPLE in increasing order */
@@ -255,7 +255,7 @@
 }
 
 
-LOCAL(int)
+JLOCAL(int)
 largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
 /* Return largest input value that should map to j'th output value */
 /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
@@ -269,7 +269,7 @@
  * Create the colormap.
  */
 
-LOCAL(void)
+JLOCAL(void)
 create_colormap (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -329,7 +329,7 @@
  * Create the color index table.
  */
 
-LOCAL(void)
+JLOCAL(void)
 create_colorindex (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -392,7 +392,7 @@
  * distinct output values.
  */
 
-LOCAL(ODITHER_MATRIX_PTR)
+JLOCAL(ODITHER_MATRIX_PTR)
 make_odither_array (j_decompress_ptr cinfo, int ncolors)
 {
   ODITHER_MATRIX_PTR odither;
@@ -428,7 +428,7 @@
  * share a dither table.
  */
 
-LOCAL(void)
+JLOCAL(void)
 create_odither_tables (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -455,7 +455,7 @@
  * Map some rows of pixels to the output colormapped representation.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 		JSAMPARRAY output_buf, int num_rows)
 /* General case, no dithering */
@@ -483,7 +483,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 		 JSAMPARRAY output_buf, int num_rows)
 /* Fast path for out_color_components==3, no dithering */
@@ -511,7 +511,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 		     JSAMPARRAY output_buf, int num_rows)
 /* General case, with ordered dithering */
@@ -561,7 +561,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 		      JSAMPARRAY output_buf, int num_rows)
 /* Fast path for out_color_components==3, with ordered dithering */
@@ -606,7 +606,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 		    JSAMPARRAY output_buf, int num_rows)
 /* General case, with Floyd-Steinberg dithering */
@@ -718,7 +718,7 @@
  * Allocate workspace for Floyd-Steinberg errors.
  */
 
-LOCAL(void)
+JLOCAL(void)
 alloc_fs_workspace (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -737,7 +737,7 @@
  * Initialize for one-pass color quantization.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -794,7 +794,7 @@
  * Finish up at the end of the pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_pass_1_quant (j_decompress_ptr cinfo)
 {
   /* no work in 1-pass case */
@@ -806,7 +806,7 @@
  * Shouldn't get to this module!
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 new_color_map_1_quant (j_decompress_ptr cinfo)
 {
   ERREXIT(cinfo, JERR_MODE_CHANGE);
@@ -817,7 +817,7 @@
  * Module initialization routine for 1-pass color quantization.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_1pass_quantizer (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize;
--- jquant2.c.orig	1996-01-06 17:31:34.000000000 +0000
+++ jquant2.c	2011-01-05 21:55:15.000000000 +0000
@@ -220,7 +220,7 @@
  * NULL pointer).
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 		  JSAMPARRAY output_buf, int num_rows)
 {
@@ -269,7 +269,7 @@
 typedef box * boxptr;
 
 
-LOCAL(boxptr)
+JLOCAL(boxptr)
 find_biggest_color_pop (boxptr boxlist, int numboxes)
 /* Find the splittable box with the largest color population */
 /* Returns NULL if no splittable boxes remain */
@@ -289,7 +289,7 @@
 }
 
 
-LOCAL(boxptr)
+JLOCAL(boxptr)
 find_biggest_volume (boxptr boxlist, int numboxes)
 /* Find the splittable box with the largest (scaled) volume */
 /* Returns NULL if no splittable boxes remain */
@@ -309,7 +309,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 update_box (j_decompress_ptr cinfo, boxptr boxp)
 /* Shrink the min/max bounds of a box to enclose only nonzero elements, */
 /* and recompute its volume and population */
@@ -420,7 +420,7 @@
 }
 
 
-LOCAL(int)
+JLOCAL(int)
 median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,
 	    int desired_colors)
 /* Repeatedly select and split the largest box until we have enough boxes */
@@ -495,7 +495,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor)
 /* Compute representative color for a box, put it in colormap[icolor] */
 {
@@ -535,7 +535,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 select_colors (j_decompress_ptr cinfo, int desired_colors)
 /* Master routine for color selection */
 {
@@ -642,7 +642,7 @@
  * inner-loop variables.
  */
 
-LOCAL(int)
+JLOCAL(int)
 find_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
 		    JSAMPLE colorlist[])
 /* Locate the colormap entries close enough to an update box to be candidates
@@ -771,7 +771,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
 		  int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[])
 /* Find the closest colormap entry for each cell in the update box,
@@ -851,7 +851,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)
 /* Fill the inverse-colormap entries in the update box that contains */
 /* histogram cell c0/c1/c2.  (Only that one cell MUST be filled, but */
@@ -911,7 +911,7 @@
  * Map some rows of pixels to the output colormapped representation.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 pass2_no_dither (j_decompress_ptr cinfo,
 		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)
 /* This version performs no dithering */
@@ -945,7 +945,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 pass2_fs_dither (j_decompress_ptr cinfo,
 		 JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)
 /* This version performs Floyd-Steinberg dithering */
@@ -1104,7 +1104,7 @@
  * to Aaron Giles for this idea.
  */
 
-LOCAL(void)
+JLOCAL(void)
 init_error_limit (j_decompress_ptr cinfo)
 /* Allocate and fill in the error_limiter table */
 {
@@ -1139,7 +1139,7 @@
  * Finish up at the end of each pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_pass1 (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -1152,7 +1152,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_pass2 (j_decompress_ptr cinfo)
 {
   /* no work */
@@ -1163,7 +1163,7 @@
  * Initialize for each processing pass.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -1226,7 +1226,7 @@
  * Switch to a new external colormap between output passes.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 new_color_map_2_quant (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
@@ -1240,7 +1240,7 @@
  * Module initialization routine for 2-pass color quantization.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jinit_2pass_quantizer (j_decompress_ptr cinfo)
 {
   my_cquantize_ptr cquantize;
--- jutils.c.orig	2009-04-11 12:31:52.000000000 +0100
+++ jutils.c	2011-01-05 21:55:15.000000000 +0000
@@ -120,7 +120,7 @@
  * Arithmetic utilities
  */
 
-GLOBAL(long)
+JGLOBAL(long)
 jdiv_round_up (long a, long b)
 /* Compute a/b rounded up to next integer, ie, ceil(a/b) */
 /* Assumes a >= 0, b > 0 */
@@ -129,7 +129,7 @@
 }
 
 
-GLOBAL(long)
+JGLOBAL(long)
 jround_up (long a, long b)
 /* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
 /* Assumes a >= 0, b > 0 */
@@ -159,7 +159,7 @@
 #endif
 
 
-GLOBAL(void)
+JGLOBAL(void)
 jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
 		   JSAMPARRAY output_array, int dest_row,
 		   int num_rows, JDIMENSION num_cols)
@@ -193,7 +193,7 @@
 }
 
 
-GLOBAL(void)
+JGLOBAL(void)
 jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
 		 JDIMENSION num_blocks)
 /* Copy a row of coefficient blocks from one place to another. */
@@ -213,7 +213,7 @@
 }
 
 
-GLOBAL(void)
+JGLOBAL(void)
 jzero_far (void FAR * target, size_t bytestozero)
 /* Zero out a chunk of FAR memory. */
 /* This might be sample-array data, block-array data, or alloc_large data. */
--- rdbmp.c.orig	2010-02-14 15:22:22.000000000 +0000
+++ rdbmp.c	2011-01-05 21:55:16.000000000 +0000
@@ -65,7 +65,7 @@
 } bmp_source_struct;
 
 
-LOCAL(int)
+JLOCAL(int)
 read_byte (bmp_source_ptr sinfo)
 /* Read next byte from BMP file */
 {
@@ -78,7 +78,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize)
 /* Read the colormap from a BMP file */
 {
@@ -116,7 +116,7 @@
  * it is an 8-bit image, we must expand colormapped pixels to 24bit format.
  */
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading 8-bit colormap indexes */
 {
@@ -147,7 +147,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading 24-bit pixels */
 {
@@ -178,7 +178,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_32bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading 32-bit pixels */
 {
@@ -215,7 +215,7 @@
  * get_8bit_row, get_24bit_row, or get_32bit_row on subsequent calls.
  */
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   bmp_source_ptr source = (bmp_source_ptr) sinfo;
@@ -272,7 +272,7 @@
  * Read the file header; return image size and component count.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   bmp_source_ptr source = (bmp_source_ptr) sinfo;
@@ -449,7 +449,7 @@
  * Finish up at the end of the file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   /* no work */
@@ -460,7 +460,7 @@
  * The module selection routine for BMP format input.
  */
 
-GLOBAL(cjpeg_source_ptr)
+JGLOBAL(cjpeg_source_ptr)
 jinit_read_bmp (j_compress_ptr cinfo)
 {
   bmp_source_ptr source;
--- rdcolmap.c.orig	1996-11-19 10:38:44.000000000 +0000
+++ rdcolmap.c	2011-01-05 21:55:16.000000000 +0000
@@ -42,7 +42,7 @@
  * Add a (potentially) new color to the color map.
  */
 
-LOCAL(void)
+JLOCAL(void)
 add_map_entry (j_decompress_ptr cinfo, int R, int G, int B)
 {
   JSAMPROW colormap0 = cinfo->colormap[0];
@@ -75,7 +75,7 @@
  * Extract color map from a GIF file.
  */
 
-LOCAL(void)
+JLOCAL(void)
 read_gif_map (j_decompress_ptr cinfo, FILE * infile)
 {
   int header[13];
@@ -117,7 +117,7 @@
 /* Support routines for reading PPM */
 
 
-LOCAL(int)
+JLOCAL(int)
 pbm_getc (FILE * infile)
 /* Read next char, skipping over any comments */
 /* A comment/newline sequence is returned as a newline */
@@ -134,7 +134,7 @@
 }
 
 
-LOCAL(unsigned int)
+JLOCAL(unsigned int)
 read_pbm_integer (j_decompress_ptr cinfo, FILE * infile)
 /* Read an unsigned decimal integer from the PPM file */
 /* Swallows one trailing character after the integer */
@@ -167,7 +167,7 @@
  * Extract color map from a PPM file.
  */
 
-LOCAL(void)
+JLOCAL(void)
 read_ppm_map (j_decompress_ptr cinfo, FILE * infile)
 {
   int c;
@@ -227,7 +227,7 @@
  *  Output: colormap and actual_number_of_colors fields are set in cinfo.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 read_color_map (j_decompress_ptr cinfo, FILE * infile)
 {
   /* Allocate space for a color map of maximum supported size. */
--- rdgif.c.orig	1997-08-22 21:19:50.000000000 +0100
+++ rdgif.c	2011-01-05 21:55:16.000000000 +0000
@@ -27,7 +27,7 @@
  * The module selection routine for GIF format input.
  */
 
-GLOBAL(cjpeg_source_ptr)
+JGLOBAL(cjpeg_source_ptr)
 jinit_read_gif (j_compress_ptr cinfo)
 {
   fprintf(stderr, "GIF input is unsupported for legal reasons.  Sorry.\n");
--- rdppm.c.orig	2009-04-02 18:44:25.000000000 +0100
+++ rdppm.c	2011-01-05 21:55:16.000000000 +0000
@@ -81,7 +81,7 @@
 typedef ppm_source_struct * ppm_source_ptr;
 
 
-LOCAL(int)
+JLOCAL(int)
 pbm_getc (FILE * infile)
 /* Read next char, skipping over any comments */
 /* A comment/newline sequence is returned as a newline */
@@ -98,7 +98,7 @@
 }
 
 
-LOCAL(unsigned int)
+JLOCAL(unsigned int)
 read_pbm_integer (j_compress_ptr cinfo, FILE * infile)
 /* Read an unsigned decimal integer from the PPM file */
 /* Swallows one trailing character after the integer */
@@ -138,7 +138,7 @@
  */
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading text-format PGM files with any maxval */
 {
@@ -156,7 +156,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading text-format PPM files with any maxval */
 {
@@ -176,7 +176,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading raw-byte-format PGM files with any maxval */
 {
@@ -197,7 +197,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading raw-byte-format PPM files with any maxval */
 {
@@ -220,7 +220,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE.
  * In this case we just read right into the JSAMPLE buffer!
@@ -235,7 +235,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading raw-word-format PGM files with any maxval */
 {
@@ -259,7 +259,7 @@
 }
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading raw-word-format PPM files with any maxval */
 {
@@ -293,7 +293,7 @@
  * Read the file header; return image size and component count.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   ppm_source_ptr source = (ppm_source_ptr) sinfo;
@@ -429,7 +429,7 @@
  * Finish up at the end of the file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   /* no work */
@@ -440,7 +440,7 @@
  * The module selection routine for PPM format input.
  */
 
-GLOBAL(cjpeg_source_ptr)
+JGLOBAL(cjpeg_source_ptr)
 jinit_read_ppm (j_compress_ptr cinfo)
 {
   ppm_source_ptr source;
--- rdrle.c.orig	1996-01-06 17:32:20.000000000 +0000
+++ rdrle.c	2011-01-05 21:55:16.000000000 +0000
@@ -77,7 +77,7 @@
  * Read the file header; return image size and component count.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   rle_source_ptr source = (rle_source_ptr) sinfo;
@@ -183,7 +183,7 @@
  * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images.
  */
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   rle_source_ptr source = (rle_source_ptr) sinfo;
@@ -201,7 +201,7 @@
  * Used for PSEUDOCOLOR images.
  */
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   rle_source_ptr source = (rle_source_ptr) sinfo;
@@ -237,7 +237,7 @@
  * the appropriate row-reading routine.
  */
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   rle_source_ptr source = (rle_source_ptr) sinfo;
@@ -356,7 +356,7 @@
  * Finish up at the end of the file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   /* no work */
@@ -367,7 +367,7 @@
  * The module selection routine for RLE format input.
  */
 
-GLOBAL(cjpeg_source_ptr)
+JGLOBAL(cjpeg_source_ptr)
 jinit_read_rle (j_compress_ptr cinfo)
 {
   rle_source_ptr source;
--- rdswitch.c.orig	2003-11-03 20:51:40.000000000 +0000
+++ rdswitch.c	2011-01-05 21:55:16.000000000 +0000
@@ -18,7 +18,7 @@
 #include <ctype.h>		/* to declare isdigit(), isspace() */
 
 
-LOCAL(int)
+JLOCAL(int)
 text_getc (FILE * file)
 /* Read next char, skipping over any comments (# to end of line) */
 /* A comment/newline sequence is returned as a newline */
@@ -35,7 +35,7 @@
 }
 
 
-LOCAL(boolean)
+JLOCAL(boolean)
 read_text_integer (FILE * file, long * result, int * termchar)
 /* Read an unsigned decimal integer from a file, store it in result */
 /* Reads one trailing character after the integer; returns it in termchar */
@@ -70,7 +70,7 @@
 }
 
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 read_quant_tables (j_compress_ptr cinfo, char * filename, boolean force_baseline)
 /* Read a set of quantization tables from the specified file.
  * The file is plain ASCII text: decimal numbers with whitespace between.
@@ -126,7 +126,7 @@
 
 #ifdef C_MULTISCAN_FILES_SUPPORTED
 
-LOCAL(boolean)
+JLOCAL(boolean)
 read_scan_integer (FILE * file, long * result, int * termchar)
 /* Variant of read_text_integer that always looks for a non-space termchar;
  * this simplifies parsing of punctuation in scan scripts.
@@ -155,7 +155,7 @@
 }
 
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 read_scan_script (j_compress_ptr cinfo, char * filename)
 /* Read a scan script from the specified text file.
  * Each entry in the file defines one scan to be emitted.
@@ -263,7 +263,7 @@
 #endif /* C_MULTISCAN_FILES_SUPPORTED */
 
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 set_quality_ratings (j_compress_ptr cinfo, char *arg, boolean force_baseline)
 /* Process a quality-ratings parameter string, of the form
  *     N[,N,...]
@@ -295,7 +295,7 @@
 }
 
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 set_quant_slots (j_compress_ptr cinfo, char *arg)
 /* Process a quantization-table-selectors parameter string, of the form
  *     N[,N,...]
@@ -330,7 +330,7 @@
 }
 
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 set_sample_factors (j_compress_ptr cinfo, char *arg)
 /* Process a sample-factors parameter string, of the form
  *     HxV[,HxV,...]
--- rdtarga.c.orig	1996-01-07 11:42:36.000000000 +0000
+++ rdtarga.c	2011-01-05 21:55:16.000000000 +0000
@@ -84,7 +84,7 @@
 
 
 
-LOCAL(int)
+JLOCAL(int)
 read_byte (tga_source_ptr sinfo)
 /* Read next byte from Targa file */
 {
@@ -97,7 +97,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize)
 /* Read the colormap from a Targa file */
 {
@@ -119,7 +119,7 @@
  * read_pixel methods: get a single pixel from Targa file into tga_pixel[]
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_non_rle_pixel (tga_source_ptr sinfo)
 /* Read one Targa pixel from the input file; no RLE expansion */
 {
@@ -132,7 +132,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 read_rle_pixel (tga_source_ptr sinfo)
 /* Read one Targa pixel from the input file, expanding RLE data as needed */
 {
@@ -170,7 +170,7 @@
  */
 
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading 8-bit grayscale pixels */
 {
@@ -186,7 +186,7 @@
   return 1;
 }
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading 8-bit colormap indexes */
 {
@@ -207,7 +207,7 @@
   return 1;
 }
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading 16-bit pixels */
 {
@@ -235,7 +235,7 @@
   return 1;
 }
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 /* This version is for reading 24-bit pixels */
 {
@@ -269,7 +269,7 @@
  * with proper conversion of pixel format, but it's in a funny row order.
  */
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   tga_source_ptr source = (tga_source_ptr) sinfo;
@@ -296,7 +296,7 @@
  * get_memory_row on subsequent calls.
  */
 
-METHODDEF(JDIMENSION)
+JMETHODDEF(JDIMENSION)
 preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   tga_source_ptr source = (tga_source_ptr) sinfo;
@@ -329,7 +329,7 @@
  * Read the file header; return image size and component count.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   tga_source_ptr source = (tga_source_ptr) sinfo;
@@ -469,7 +469,7 @@
  * Finish up at the end of the file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
 {
   /* no work */
@@ -480,7 +480,7 @@
  * The module selection routine for Targa format input.
  */
 
-GLOBAL(cjpeg_source_ptr)
+JGLOBAL(cjpeg_source_ptr)
 jinit_read_targa (j_compress_ptr cinfo)
 {
   tga_source_ptr source;
--- transupp.c.orig	2009-09-03 15:45:06.000000000 +0100
+++ transupp.c	2011-01-05 21:55:16.000000000 +0000
@@ -75,7 +75,7 @@
  */
 
 
-LOCAL(void)
+JLOCAL(void)
 do_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	 JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	 jvirt_barray_ptr *src_coef_arrays,
@@ -113,7 +113,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_flip_h_no_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 		   JDIMENSION x_crop_offset,
 		   jvirt_barray_ptr *src_coef_arrays)
@@ -180,7 +180,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	   JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	   jvirt_barray_ptr *src_coef_arrays,
@@ -242,7 +242,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	   JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	   jvirt_barray_ptr *src_coef_arrays,
@@ -322,7 +322,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	      JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	      jvirt_barray_ptr *src_coef_arrays,
@@ -370,7 +370,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	   JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	   jvirt_barray_ptr *src_coef_arrays,
@@ -451,7 +451,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	    JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	    jvirt_barray_ptr *src_coef_arrays,
@@ -522,7 +522,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	    JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	    jvirt_barray_ptr *src_coef_arrays,
@@ -630,7 +630,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	       JDIMENSION x_crop_offset, JDIMENSION y_crop_offset,
 	       jvirt_barray_ptr *src_coef_arrays,
@@ -750,7 +750,7 @@
  * *strptr is advanced over the digit string, and *result is set to its value.
  */
 
-LOCAL(boolean)
+JLOCAL(boolean)
 jt_read_integer (const char ** strptr, JDIMENSION * result)
 {
   const char * ptr = *strptr;
@@ -780,7 +780,7 @@
  * This code is loosely based on XParseGeometry from the X11 distribution.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jtransform_parse_crop_spec (jpeg_transform_info *info, const char *spec)
 {
   info->crop = FALSE;
@@ -826,7 +826,7 @@
 
 /* Trim off any partial iMCUs on the indicated destination edge */
 
-LOCAL(void)
+JLOCAL(void)
 trim_right_edge (jpeg_transform_info *info, JDIMENSION full_width)
 {
   JDIMENSION MCU_cols;
@@ -837,7 +837,7 @@
     info->output_width = MCU_cols * info->iMCU_sample_width;
 }
 
-LOCAL(void)
+JLOCAL(void)
 trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height)
 {
   JDIMENSION MCU_rows;
@@ -866,7 +866,7 @@
  * and transformation is not perfect.  Otherwise returns TRUE.
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jtransform_request_workspace (j_decompress_ptr srcinfo,
 			      jpeg_transform_info *info)
 {
@@ -1097,7 +1097,7 @@
 
 /* Transpose destination image parameters */
 
-LOCAL(void)
+JLOCAL(void)
 transpose_critical_parameters (j_compress_ptr dstinfo)
 {
   int tblno, i, j, ci, itemp;
@@ -1143,7 +1143,7 @@
  * We try to adjust the Tags ExifImageWidth and ExifImageHeight if possible.
  */
 
-LOCAL(void)
+JLOCAL(void)
 adjust_exif_parameters (JOCTET FAR * data, unsigned int length,
 			JDIMENSION new_width, JDIMENSION new_height)
 {
@@ -1305,7 +1305,7 @@
  * to jpeg_write_coefficients().
  */
 
-GLOBAL(jvirt_barray_ptr *)
+JGLOBAL(jvirt_barray_ptr *)
 jtransform_adjust_parameters (j_decompress_ptr srcinfo,
 			      j_compress_ptr dstinfo,
 			      jvirt_barray_ptr *src_coef_arrays,
@@ -1400,7 +1400,7 @@
  * Note that some transformations will modify the source data arrays!
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jtransform_execute_transform (j_decompress_ptr srcinfo,
 			      j_compress_ptr dstinfo,
 			      jvirt_barray_ptr *src_coef_arrays,
@@ -1473,7 +1473,7 @@
  *           (may use custom action then)
  */
 
-GLOBAL(boolean)
+JGLOBAL(boolean)
 jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height,
 			     int MCU_width, int MCU_height,
 			     JXFORM_CODE transform)
@@ -1512,7 +1512,7 @@
  * This must be called before jpeg_read_header() to have the desired effect.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option)
 {
 #ifdef SAVE_MARKERS_SUPPORTED
@@ -1537,7 +1537,7 @@
  * JFIF APP0 or Adobe APP14 markers if selected.
  */
 
-GLOBAL(void)
+JGLOBAL(void)
 jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 		       JCOPY_OPTION option)
 {
--- transupp.h.orig	2009-09-03 09:54:26.000000000 +0100
+++ transupp.h	2011-01-05 21:55:16.000000000 +0000
@@ -156,25 +156,25 @@
 #if TRANSFORMS_SUPPORTED
 
 /* Parse a crop specification (written in X11 geometry style) */
-EXTERN(boolean) jtransform_parse_crop_spec
+JEXTERN(boolean) jtransform_parse_crop_spec
 	JPP((jpeg_transform_info *info, const char *spec));
 /* Request any required workspace */
-EXTERN(boolean) jtransform_request_workspace
+JEXTERN(boolean) jtransform_request_workspace
 	JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info));
 /* Adjust output image parameters */
-EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
+JEXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters
 	JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	     jvirt_barray_ptr *src_coef_arrays,
 	     jpeg_transform_info *info));
 /* Execute the actual transformation, if any */
-EXTERN(void) jtransform_execute_transform
+JEXTERN(void) jtransform_execute_transform
 	JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	     jvirt_barray_ptr *src_coef_arrays,
 	     jpeg_transform_info *info));
 /* Determine whether lossless transformation is perfectly
  * possible for a specified image and transformation.
  */
-EXTERN(boolean) jtransform_perfect_transform
+JEXTERN(boolean) jtransform_perfect_transform
 	JPP((JDIMENSION image_width, JDIMENSION image_height,
 	     int MCU_width, int MCU_height,
 	     JXFORM_CODE transform));
@@ -202,9 +202,9 @@
 #define JCOPYOPT_DEFAULT  JCOPYOPT_COMMENTS	/* recommended default */
 
 /* Setup decompression object to save desired markers in memory */
-EXTERN(void) jcopy_markers_setup
+JEXTERN(void) jcopy_markers_setup
 	JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option));
 /* Copy markers saved in the given source object to the destination object */
-EXTERN(void) jcopy_markers_execute
+JEXTERN(void) jcopy_markers_execute
 	JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
 	     JCOPY_OPTION option));
--- wrbmp.c.orig	1996-01-06 17:32:38.000000000 +0000
+++ wrbmp.c	2011-01-05 21:55:16.000000000 +0000
@@ -57,7 +57,7 @@
 
 
 /* Forward declarations */
-LOCAL(void) write_colormap
+JLOCAL(void) write_colormap
 	JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest,
 	     int map_colors, int map_entry_size));
 
@@ -67,7 +67,7 @@
  * In this module rows_supplied will always be 1.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		JDIMENSION rows_supplied)
 /* This version is for writing 24-bit pixels */
@@ -102,7 +102,7 @@
     *outptr++ = 0;
 }
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 	       JDIMENSION rows_supplied)
 /* This version is for grayscale OR quantized color output */
@@ -138,7 +138,7 @@
  * In this module we may as well postpone everything until finish_output.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   /* no work here */
@@ -153,7 +153,7 @@
  * First, routines to write the Windows and OS/2 variants of the file header.
  */
 
-LOCAL(void)
+JLOCAL(void)
 write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest)
 /* Write a Windows-style BMP file header, including colormap if needed */
 {
@@ -226,7 +226,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest)
 /* Write an OS2-style BMP file header, including colormap if needed */
 {
@@ -288,7 +288,7 @@
  * Windows uses BGR0 map entries; OS/2 uses BGR entries.
  */
 
-LOCAL(void)
+JLOCAL(void)
 write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest,
 		int map_colors, int map_entry_size)
 {
@@ -340,7 +340,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   bmp_dest_ptr dest = (bmp_dest_ptr) dinfo;
@@ -386,7 +386,7 @@
  * The module selection routine for BMP format output.
  */
 
-GLOBAL(djpeg_dest_ptr)
+JGLOBAL(djpeg_dest_ptr)
 jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2)
 {
   bmp_dest_ptr dest;
--- wrgif.c.orig	1997-09-24 10:56:50.000000000 +0100
+++ wrgif.c	2011-01-05 21:55:16.000000000 +0000
@@ -77,7 +77,7 @@
  * A data block consists of a count byte (1..255) and that many data bytes.
  */
 
-LOCAL(void)
+JLOCAL(void)
 flush_packet (gif_dest_ptr dinfo)
 /* flush any accumulated data */
 {
@@ -101,7 +101,7 @@
 
 /* Routine to convert variable-width codes into a byte stream */
 
-LOCAL(void)
+JLOCAL(void)
 output (gif_dest_ptr dinfo, int code)
 /* Emit a code of n_bits bits */
 /* Uses cur_accum and cur_bits to reblock into 8-bit bytes */
@@ -139,7 +139,7 @@
  * one symbol in every 256.
  */
 
-LOCAL(void)
+JLOCAL(void)
 compress_init (gif_dest_ptr dinfo, int i_bits)
 /* Initialize pseudo-compressor */
 {
@@ -158,7 +158,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 compress_pixel (gif_dest_ptr dinfo, int c)
 /* Accept and "compress" one pixel value.
  * The given value must be less than n_bits wide.
@@ -178,7 +178,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 compress_term (gif_dest_ptr dinfo)
 /* Clean up at end */
 {
@@ -196,7 +196,7 @@
 /* GIF header construction */
 
 
-LOCAL(void)
+JLOCAL(void)
 put_word (gif_dest_ptr dinfo, unsigned int w)
 /* Emit a 16-bit word, LSB first */
 {
@@ -205,7 +205,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 put_3bytes (gif_dest_ptr dinfo, int val)
 /* Emit 3 copies of same byte value --- handy subr for colormap construction */
 {
@@ -215,7 +215,7 @@
 }
 
 
-LOCAL(void)
+JLOCAL(void)
 emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap)
 /* Output the GIF file header, including color map */
 /* If colormap==NULL, synthesize a gray-scale colormap */
@@ -298,7 +298,7 @@
  * Startup: write the file header.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   gif_dest_ptr dest = (gif_dest_ptr) dinfo;
@@ -315,7 +315,7 @@
  * In this module rows_supplied will always be 1.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		JDIMENSION rows_supplied)
 {
@@ -334,7 +334,7 @@
  * Finish up at the end of the file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   gif_dest_ptr dest = (gif_dest_ptr) dinfo;
@@ -356,7 +356,7 @@
  * The module selection routine for GIF format output.
  */
 
-GLOBAL(djpeg_dest_ptr)
+JGLOBAL(djpeg_dest_ptr)
 jinit_write_gif (j_decompress_ptr cinfo)
 {
   gif_dest_ptr dest;
--- wrppm.c.orig	2009-04-06 22:20:20.000000000 +0100
+++ wrppm.c	2011-01-05 21:55:16.000000000 +0000
@@ -87,7 +87,7 @@
  * output buffer is physically the same as the fwrite buffer.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		JDIMENSION rows_supplied)
 {
@@ -102,7 +102,7 @@
  * format translation.  Typically this only happens in 12-bit mode.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		 JDIMENSION rows_supplied)
 {
@@ -125,7 +125,7 @@
  * We have to demap the color index values to straight data.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		  JDIMENSION rows_supplied)
 {
@@ -150,7 +150,7 @@
 }
 
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		   JDIMENSION rows_supplied)
 {
@@ -173,7 +173,7 @@
  * Startup: write the file header.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
@@ -202,7 +202,7 @@
  * Finish up at the end of the file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   /* Make sure we wrote the output file OK */
@@ -216,7 +216,7 @@
  * The module selection routine for PPM format output.
  */
 
-GLOBAL(djpeg_dest_ptr)
+JGLOBAL(djpeg_dest_ptr)
 jinit_write_ppm (j_decompress_ptr cinfo)
 {
   ppm_dest_ptr dest;
--- wrrle.c.orig	1996-01-06 17:32:50.000000000 +0000
+++ wrrle.c	2011-01-05 21:55:16.000000000 +0000
@@ -62,7 +62,7 @@
 typedef rle_dest_struct * rle_dest_ptr;
 
 /* Forward declarations */
-METHODDEF(void) rle_put_pixel_rows
+JMETHODDEF(void) rle_put_pixel_rows
     JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 	 JDIMENSION rows_supplied));
 
@@ -73,7 +73,7 @@
  * In this module it's easier to wait till finish_output to write anything.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   rle_dest_ptr dest = (rle_dest_ptr) dinfo;
@@ -149,7 +149,7 @@
  * This routine just saves the data away in a virtual array.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		    JDIMENSION rows_supplied)
 {
@@ -168,7 +168,7 @@
  * Here is where we really output the RLE file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   rle_dest_ptr dest = (rle_dest_ptr) dinfo;
@@ -273,7 +273,7 @@
  * The module selection routine for RLE format output.
  */
 
-GLOBAL(djpeg_dest_ptr)
+JGLOBAL(djpeg_dest_ptr)
 jinit_write_rle (j_decompress_ptr cinfo)
 {
   rle_dest_ptr dest;
--- wrtarga.c.orig	1996-01-06 17:32:54.000000000 +0000
+++ wrtarga.c	2011-01-05 21:55:16.000000000 +0000
@@ -50,7 +50,7 @@
 typedef tga_dest_struct * tga_dest_ptr;
 
 
-LOCAL(void)
+JLOCAL(void)
 write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors)
 /* Create and write a Targa header */
 {
@@ -95,7 +95,7 @@
  * In this module rows_supplied will always be 1.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		JDIMENSION rows_supplied)
 /* used for unquantized full-color output */
@@ -116,7 +116,7 @@
   (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width);
 }
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 	       JDIMENSION rows_supplied)
 /* used for grayscale OR quantized color output */
@@ -140,7 +140,7 @@
  * For Targa, this is only applied to grayscale data.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
 		   JDIMENSION rows_supplied)
 {
@@ -163,7 +163,7 @@
  * Startup: write the file header.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   tga_dest_ptr dest = (tga_dest_ptr) dinfo;
@@ -207,7 +207,7 @@
  * Finish up at the end of the file.
  */
 
-METHODDEF(void)
+JMETHODDEF(void)
 finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
 {
   /* Make sure we wrote the output file OK */
@@ -221,7 +221,7 @@
  * The module selection routine for Targa format output.
  */
 
-GLOBAL(djpeg_dest_ptr)
+JGLOBAL(djpeg_dest_ptr)
 jinit_write_targa (j_decompress_ptr cinfo)
 {
   tga_dest_ptr dest;