aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c804
1 files changed, 402 insertions, 402 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c
index fb9429a..e658623 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c
+++ b/libraries/irrlicht-1.8/source/Irrlicht/jpeglib/ckconfig.c
@@ -1,402 +1,402 @@
1/* 1/*
2 * ckconfig.c 2 * ckconfig.c
3 * 3 *
4 * Copyright (C) 1991-1994, Thomas G. Lane. 4 * Copyright (C) 1991-1994, Thomas G. Lane.
5 * This file is part of the Independent JPEG Group's software. 5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file. 6 * For conditions of distribution and use, see the accompanying README file.
7 */ 7 */
8 8
9/* 9/*
10 * This program is intended to help you determine how to configure the JPEG 10 * This program is intended to help you determine how to configure the JPEG
11 * software for installation on a particular system. The idea is to try to 11 * software for installation on a particular system. The idea is to try to
12 * compile and execute this program. If your compiler fails to compile the 12 * compile and execute this program. If your compiler fails to compile the
13 * program, make changes as indicated in the comments below. Once you can 13 * program, make changes as indicated in the comments below. Once you can
14 * compile the program, run it, and it will produce a "jconfig.h" file for 14 * compile the program, run it, and it will produce a "jconfig.h" file for
15 * your system. 15 * your system.
16 * 16 *
17 * As a general rule, each time you try to compile this program, 17 * As a general rule, each time you try to compile this program,
18 * pay attention only to the *first* error message you get from the compiler. 18 * pay attention only to the *first* error message you get from the compiler.
19 * Many C compilers will issue lots of spurious error messages once they 19 * Many C compilers will issue lots of spurious error messages once they
20 * have gotten confused. Go to the line indicated in the first error message, 20 * have gotten confused. Go to the line indicated in the first error message,
21 * and read the comments preceding that line to see what to change. 21 * and read the comments preceding that line to see what to change.
22 * 22 *
23 * Almost all of the edits you may need to make to this program consist of 23 * Almost all of the edits you may need to make to this program consist of
24 * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL", 24 * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL",
25 * or vice versa. This is called defining or undefining that symbol. 25 * or vice versa. This is called defining or undefining that symbol.
26 */ 26 */
27 27
28 28
29/* First we must see if your system has the include files we need. 29/* First we must see if your system has the include files we need.
30 * We start out with the assumption that your system has all the ANSI-standard 30 * We start out with the assumption that your system has all the ANSI-standard
31 * include files. If you get any error trying to include one of these files, 31 * include files. If you get any error trying to include one of these files,
32 * undefine the corresponding HAVE_xxx symbol. 32 * undefine the corresponding HAVE_xxx symbol.
33 */ 33 */
34 34
35#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */ 35#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */
36#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */ 36#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */
37#include <stddef.h> 37#include <stddef.h>
38#endif 38#endif
39 39
40#define HAVE_STDLIB_H /* same thing for stdlib.h */ 40#define HAVE_STDLIB_H /* same thing for stdlib.h */
41#ifdef HAVE_STDLIB_H 41#ifdef HAVE_STDLIB_H
42#include <stdlib.h> 42#include <stdlib.h>
43#endif 43#endif
44 44
45#include <stdio.h> /* If you ain't got this, you ain't got C. */ 45#include <stdio.h> /* If you ain't got this, you ain't got C. */
46 46
47/* We have to see if your string functions are defined by 47/* We have to see if your string functions are defined by
48 * strings.h (old BSD convention) or string.h (everybody else). 48 * strings.h (old BSD convention) or string.h (everybody else).
49 * We try the non-BSD convention first; define NEED_BSD_STRINGS 49 * We try the non-BSD convention first; define NEED_BSD_STRINGS
50 * if the compiler says it can't find string.h. 50 * if the compiler says it can't find string.h.
51 */ 51 */
52 52
53#undef NEED_BSD_STRINGS 53#undef NEED_BSD_STRINGS
54 54
55#ifdef NEED_BSD_STRINGS 55#ifdef NEED_BSD_STRINGS
56#include <strings.h> 56#include <strings.h>
57#else 57#else
58#include <string.h> 58#include <string.h>
59#endif 59#endif
60 60
61/* On some systems (especially older Unix machines), type size_t is 61/* On some systems (especially older Unix machines), type size_t is
62 * defined only in the include file <sys/types.h>. If you get a failure 62 * defined only in the include file <sys/types.h>. If you get a failure
63 * on the size_t test below, try defining NEED_SYS_TYPES_H. 63 * on the size_t test below, try defining NEED_SYS_TYPES_H.
64 */ 64 */
65 65
66#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */ 66#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */
67#ifdef NEED_SYS_TYPES_H 67#ifdef NEED_SYS_TYPES_H
68#include <sys/types.h> 68#include <sys/types.h>
69#endif 69#endif
70 70
71 71
72/* Usually type size_t is defined in one of the include files we've included 72/* Usually type size_t is defined in one of the include files we've included
73 * above. If not, you'll get an error on the "typedef size_t my_size_t;" line. 73 * above. If not, you'll get an error on the "typedef size_t my_size_t;" line.
74 * In that case, first try defining NEED_SYS_TYPES_H just above. 74 * In that case, first try defining NEED_SYS_TYPES_H just above.
75 * If that doesn't work, you'll have to search through your system library 75 * If that doesn't work, you'll have to search through your system library
76 * to figure out which include file defines "size_t". Look for a line that 76 * to figure out which include file defines "size_t". Look for a line that
77 * says "typedef something-or-other size_t;". Then, change the line below 77 * says "typedef something-or-other size_t;". Then, change the line below
78 * that says "#include <someincludefile.h>" to instead include the file 78 * that says "#include <someincludefile.h>" to instead include the file
79 * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find 79 * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find
80 * type size_t anywhere, try replacing "#include <someincludefile.h>" with 80 * type size_t anywhere, try replacing "#include <someincludefile.h>" with
81 * "typedef unsigned int size_t;". 81 * "typedef unsigned int size_t;".
82 */ 82 */
83 83
84#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */ 84#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */
85 85
86#ifdef NEED_SPECIAL_INCLUDE 86#ifdef NEED_SPECIAL_INCLUDE
87#include <someincludefile.h> 87#include <someincludefile.h>
88#endif 88#endif
89 89
90typedef size_t my_size_t; /* The payoff: do we have size_t now? */ 90typedef size_t my_size_t; /* The payoff: do we have size_t now? */
91 91
92 92
93/* The next question is whether your compiler supports ANSI-style function 93/* The next question is whether your compiler supports ANSI-style function
94 * prototypes. You need to know this in order to choose between using 94 * prototypes. You need to know this in order to choose between using
95 * makefile.ansi and using makefile.unix. 95 * makefile.ansi and using makefile.unix.
96 * The #define line below is set to assume you have ANSI function prototypes. 96 * The #define line below is set to assume you have ANSI function prototypes.
97 * If you get an error in this group of lines, undefine HAVE_PROTOTYPES. 97 * If you get an error in this group of lines, undefine HAVE_PROTOTYPES.
98 */ 98 */
99 99
100#define HAVE_PROTOTYPES 100#define HAVE_PROTOTYPES
101 101
102#ifdef HAVE_PROTOTYPES 102#ifdef HAVE_PROTOTYPES
103int testfunction (int arg1, int * arg2); /* check prototypes */ 103int testfunction (int arg1, int * arg2); /* check prototypes */
104 104
105struct methods_struct { /* check method-pointer declarations */ 105struct methods_struct { /* check method-pointer declarations */
106 int (*error_exit) (char *msgtext); 106 int (*error_exit) (char *msgtext);
107 int (*trace_message) (char *msgtext); 107 int (*trace_message) (char *msgtext);
108 int (*another_method) (void); 108 int (*another_method) (void);
109}; 109};
110 110
111int testfunction (int arg1, int * arg2) /* check definitions */ 111int testfunction (int arg1, int * arg2) /* check definitions */
112{ 112{
113 return arg2[arg1]; 113 return arg2[arg1];
114} 114}
115 115
116int test2function (void) /* check void arg list */ 116int test2function (void) /* check void arg list */
117{ 117{
118 return 0; 118 return 0;
119} 119}
120#endif 120#endif
121 121
122 122
123/* Now we want to find out if your compiler knows what "unsigned char" means. 123/* Now we want to find out if your compiler knows what "unsigned char" means.
124 * If you get an error on the "unsigned char un_char;" line, 124 * If you get an error on the "unsigned char un_char;" line,
125 * then undefine HAVE_UNSIGNED_CHAR. 125 * then undefine HAVE_UNSIGNED_CHAR.
126 */ 126 */
127 127
128#define HAVE_UNSIGNED_CHAR 128#define HAVE_UNSIGNED_CHAR
129 129
130#ifdef HAVE_UNSIGNED_CHAR 130#ifdef HAVE_UNSIGNED_CHAR
131unsigned char un_char; 131unsigned char un_char;
132#endif 132#endif
133 133
134 134
135/* Now we want to find out if your compiler knows what "unsigned short" means. 135/* Now we want to find out if your compiler knows what "unsigned short" means.
136 * If you get an error on the "unsigned short un_short;" line, 136 * If you get an error on the "unsigned short un_short;" line,
137 * then undefine HAVE_UNSIGNED_SHORT. 137 * then undefine HAVE_UNSIGNED_SHORT.
138 */ 138 */
139 139
140#define HAVE_UNSIGNED_SHORT 140#define HAVE_UNSIGNED_SHORT
141 141
142#ifdef HAVE_UNSIGNED_SHORT 142#ifdef HAVE_UNSIGNED_SHORT
143unsigned short un_short; 143unsigned short un_short;
144#endif 144#endif
145 145
146 146
147/* Now we want to find out if your compiler understands type "void". 147/* Now we want to find out if your compiler understands type "void".
148 * If you get an error anywhere in here, undefine HAVE_VOID. 148 * If you get an error anywhere in here, undefine HAVE_VOID.
149 */ 149 */
150 150
151#define HAVE_VOID 151#define HAVE_VOID
152 152
153#ifdef HAVE_VOID 153#ifdef HAVE_VOID
154/* Caution: a C++ compiler will insist on complete prototypes */ 154/* Caution: a C++ compiler will insist on complete prototypes */
155typedef void * void_ptr; /* check void * */ 155typedef void * void_ptr; /* check void * */
156#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ 156#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
157typedef void (*void_func) (int a, int b); 157typedef void (*void_func) (int a, int b);
158#else 158#else
159typedef void (*void_func) (); 159typedef void (*void_func) ();
160#endif 160#endif
161 161
162#ifdef HAVE_PROTOTYPES /* check void function result */ 162#ifdef HAVE_PROTOTYPES /* check void function result */
163void test3function (void_ptr arg1, void_func arg2) 163void test3function (void_ptr arg1, void_func arg2)
164#else 164#else
165void test3function (arg1, arg2) 165void test3function (arg1, arg2)
166 void_ptr arg1; 166 void_ptr arg1;
167 void_func arg2; 167 void_func arg2;
168#endif 168#endif
169{ 169{
170 char * locptr = (char *) arg1; /* check casting to and from void * */ 170 char * locptr = (char *) arg1; /* check casting to and from void * */
171 arg1 = (void *) locptr; 171 arg1 = (void *) locptr;
172 (*arg2) (1, 2); /* check call of fcn returning void */ 172 (*arg2) (1, 2); /* check call of fcn returning void */
173} 173}
174#endif 174#endif
175 175
176 176
177/* Now we want to find out if your compiler knows what "const" means. 177/* Now we want to find out if your compiler knows what "const" means.
178 * If you get an error here, undefine HAVE_CONST. 178 * If you get an error here, undefine HAVE_CONST.
179 */ 179 */
180 180
181#define HAVE_CONST 181#define HAVE_CONST
182 182
183#ifdef HAVE_CONST 183#ifdef HAVE_CONST
184static const int carray[3] = {1, 2, 3}; 184static const int carray[3] = {1, 2, 3};
185 185
186#ifdef HAVE_PROTOTYPES 186#ifdef HAVE_PROTOTYPES
187int test4function (const int arg1) 187int test4function (const int arg1)
188#else 188#else
189int test4function (arg1) 189int test4function (arg1)
190 const int arg1; 190 const int arg1;
191#endif 191#endif
192{ 192{
193 return carray[arg1]; 193 return carray[arg1];
194} 194}
195#endif 195#endif
196 196
197 197
198/* If you get an error or warning about this structure definition, 198/* If you get an error or warning about this structure definition,
199 * define INCOMPLETE_TYPES_BROKEN. 199 * define INCOMPLETE_TYPES_BROKEN.
200 */ 200 */
201 201
202#undef INCOMPLETE_TYPES_BROKEN 202#undef INCOMPLETE_TYPES_BROKEN
203 203
204#ifndef INCOMPLETE_TYPES_BROKEN 204#ifndef INCOMPLETE_TYPES_BROKEN
205typedef struct undefined_structure * undef_struct_ptr; 205typedef struct undefined_structure * undef_struct_ptr;
206#endif 206#endif
207 207
208 208
209/* If you get an error about duplicate names, 209/* If you get an error about duplicate names,
210 * define NEED_SHORT_EXTERNAL_NAMES. 210 * define NEED_SHORT_EXTERNAL_NAMES.
211 */ 211 */
212 212
213#undef NEED_SHORT_EXTERNAL_NAMES 213#undef NEED_SHORT_EXTERNAL_NAMES
214 214
215#ifndef NEED_SHORT_EXTERNAL_NAMES 215#ifndef NEED_SHORT_EXTERNAL_NAMES
216 216
217int possibly_duplicate_function () 217int possibly_duplicate_function ()
218{ 218{
219 return 0; 219 return 0;
220} 220}
221 221
222int possibly_dupli_function () 222int possibly_dupli_function ()
223{ 223{
224 return 1; 224 return 1;
225} 225}
226 226
227#endif 227#endif
228 228
229 229
230 230
231/************************************************************************ 231/************************************************************************
232 * OK, that's it. You should not have to change anything beyond this 232 * OK, that's it. You should not have to change anything beyond this
233 * point in order to compile and execute this program. (You might get 233 * point in order to compile and execute this program. (You might get
234 * some warnings, but you can ignore them.) 234 * some warnings, but you can ignore them.)
235 * When you run the program, it will make a couple more tests that it 235 * When you run the program, it will make a couple more tests that it
236 * can do automatically, and then it will create jconfig.h and print out 236 * can do automatically, and then it will create jconfig.h and print out
237 * any additional suggestions it has. 237 * any additional suggestions it has.
238 ************************************************************************ 238 ************************************************************************
239 */ 239 */
240 240
241 241
242#ifdef HAVE_PROTOTYPES 242#ifdef HAVE_PROTOTYPES
243int is_char_signed (int arg) 243int is_char_signed (int arg)
244#else 244#else
245int is_char_signed (arg) 245int is_char_signed (arg)
246 int arg; 246 int arg;
247#endif 247#endif
248{ 248{
249 if (arg == 189) { /* expected result for unsigned char */ 249 if (arg == 189) { /* expected result for unsigned char */
250 return 0; /* type char is unsigned */ 250 return 0; /* type char is unsigned */
251 } 251 }
252 else if (arg != -67) { /* expected result for signed char */ 252 else if (arg != -67) { /* expected result for signed char */
253 printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); 253 printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
254 printf("I fear the JPEG software will not work at all.\n\n"); 254 printf("I fear the JPEG software will not work at all.\n\n");
255 } 255 }
256 return 1; /* assume char is signed otherwise */ 256 return 1; /* assume char is signed otherwise */
257} 257}
258 258
259 259
260#ifdef HAVE_PROTOTYPES 260#ifdef HAVE_PROTOTYPES
261int is_shifting_signed (long arg) 261int is_shifting_signed (long arg)
262#else 262#else
263int is_shifting_signed (arg) 263int is_shifting_signed (arg)
264 long arg; 264 long arg;
265#endif 265#endif
266/* See whether right-shift on a long is signed or not. */ 266/* See whether right-shift on a long is signed or not. */
267{ 267{
268 long res = arg >> 4; 268 long res = arg >> 4;
269 269
270 if (res == -0x7F7E80CL) { /* expected result for signed shift */ 270 if (res == -0x7F7E80CL) { /* expected result for signed shift */
271 return 1; /* right shift is signed */ 271 return 1; /* right shift is signed */
272 } 272 }
273 /* see if unsigned-shift hack will fix it. */ 273 /* see if unsigned-shift hack will fix it. */
274 /* we can't just test exact value since it depends on width of long... */ 274 /* we can't just test exact value since it depends on width of long... */
275 res |= (~0L) << (32-4); 275 res |= (~0L) << (32-4);
276 if (res == -0x7F7E80CL) { /* expected result now? */ 276 if (res == -0x7F7E80CL) { /* expected result now? */
277 return 0; /* right shift is unsigned */ 277 return 0; /* right shift is unsigned */
278 } 278 }
279 printf("Right shift isn't acting as I expect it to.\n"); 279 printf("Right shift isn't acting as I expect it to.\n");
280 printf("I fear the JPEG software will not work at all.\n\n"); 280 printf("I fear the JPEG software will not work at all.\n\n");
281 return 0; /* try it with unsigned anyway */ 281 return 0; /* try it with unsigned anyway */
282} 282}
283 283
284 284
285#ifdef HAVE_PROTOTYPES 285#ifdef HAVE_PROTOTYPES
286int main (int argc, char ** argv) 286int main (int argc, char ** argv)
287#else 287#else
288int main (argc, argv) 288int main (argc, argv)
289 int argc; 289 int argc;
290 char ** argv; 290 char ** argv;
291#endif 291#endif
292{ 292{
293 char signed_char_check = (char) (-67); 293 char signed_char_check = (char) (-67);
294 FILE *outfile; 294 FILE *outfile;
295 295
296 /* Attempt to write jconfig.h */ 296 /* Attempt to write jconfig.h */
297 if ((outfile = fopen("jconfig.h", "w")) == NULL) { 297 if ((outfile = fopen("jconfig.h", "w")) == NULL) {
298 printf("Failed to write jconfig.h\n"); 298 printf("Failed to write jconfig.h\n");
299 return 1; 299 return 1;
300 } 300 }
301 301
302 /* Write out all the info */ 302 /* Write out all the info */
303 fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n"); 303 fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n");
304 fprintf(outfile, "/* see jconfig.txt for explanations */\n\n"); 304 fprintf(outfile, "/* see jconfig.txt for explanations */\n\n");
305#ifdef HAVE_PROTOTYPES 305#ifdef HAVE_PROTOTYPES
306 fprintf(outfile, "#define HAVE_PROTOTYPES\n"); 306 fprintf(outfile, "#define HAVE_PROTOTYPES\n");
307#else 307#else
308 fprintf(outfile, "#undef HAVE_PROTOTYPES\n"); 308 fprintf(outfile, "#undef HAVE_PROTOTYPES\n");
309#endif 309#endif
310#ifdef HAVE_UNSIGNED_CHAR 310#ifdef HAVE_UNSIGNED_CHAR
311 fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n"); 311 fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n");
312#else 312#else
313 fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n"); 313 fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n");
314#endif 314#endif
315#ifdef HAVE_UNSIGNED_SHORT 315#ifdef HAVE_UNSIGNED_SHORT
316 fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n"); 316 fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n");
317#else 317#else
318 fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n"); 318 fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n");
319#endif 319#endif
320#ifdef HAVE_VOID 320#ifdef HAVE_VOID
321 fprintf(outfile, "/* #define void char */\n"); 321 fprintf(outfile, "/* #define void char */\n");
322#else 322#else
323 fprintf(outfile, "#define void char\n"); 323 fprintf(outfile, "#define void char\n");
324#endif 324#endif
325#ifdef HAVE_CONST 325#ifdef HAVE_CONST
326 fprintf(outfile, "/* #define const */\n"); 326 fprintf(outfile, "/* #define const */\n");
327#else 327#else
328 fprintf(outfile, "#define const\n"); 328 fprintf(outfile, "#define const\n");
329#endif 329#endif
330 if (is_char_signed((int) signed_char_check)) 330 if (is_char_signed((int) signed_char_check))
331 fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n"); 331 fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n");
332 else 332 else
333 fprintf(outfile, "#define CHAR_IS_UNSIGNED\n"); 333 fprintf(outfile, "#define CHAR_IS_UNSIGNED\n");
334#ifdef HAVE_STDDEF_H 334#ifdef HAVE_STDDEF_H
335 fprintf(outfile, "#define HAVE_STDDEF_H\n"); 335 fprintf(outfile, "#define HAVE_STDDEF_H\n");
336#else 336#else
337 fprintf(outfile, "#undef HAVE_STDDEF_H\n"); 337 fprintf(outfile, "#undef HAVE_STDDEF_H\n");
338#endif 338#endif
339#ifdef HAVE_STDLIB_H 339#ifdef HAVE_STDLIB_H
340 fprintf(outfile, "#define HAVE_STDLIB_H\n"); 340 fprintf(outfile, "#define HAVE_STDLIB_H\n");
341#else 341#else
342 fprintf(outfile, "#undef HAVE_STDLIB_H\n"); 342 fprintf(outfile, "#undef HAVE_STDLIB_H\n");
343#endif 343#endif
344#ifdef NEED_BSD_STRINGS 344#ifdef NEED_BSD_STRINGS
345 fprintf(outfile, "#define NEED_BSD_STRINGS\n"); 345 fprintf(outfile, "#define NEED_BSD_STRINGS\n");
346#else 346#else
347 fprintf(outfile, "#undef NEED_BSD_STRINGS\n"); 347 fprintf(outfile, "#undef NEED_BSD_STRINGS\n");
348#endif 348#endif
349#ifdef NEED_SYS_TYPES_H 349#ifdef NEED_SYS_TYPES_H
350 fprintf(outfile, "#define NEED_SYS_TYPES_H\n"); 350 fprintf(outfile, "#define NEED_SYS_TYPES_H\n");
351#else 351#else
352 fprintf(outfile, "#undef NEED_SYS_TYPES_H\n"); 352 fprintf(outfile, "#undef NEED_SYS_TYPES_H\n");
353#endif 353#endif
354 fprintf(outfile, "#undef NEED_FAR_POINTERS\n"); 354 fprintf(outfile, "#undef NEED_FAR_POINTERS\n");
355#ifdef NEED_SHORT_EXTERNAL_NAMES 355#ifdef NEED_SHORT_EXTERNAL_NAMES
356 fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n"); 356 fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n");
357#else 357#else
358 fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n"); 358 fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n");
359#endif 359#endif
360#ifdef INCOMPLETE_TYPES_BROKEN 360#ifdef INCOMPLETE_TYPES_BROKEN
361 fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n"); 361 fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n");
362#else 362#else
363 fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n"); 363 fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n");
364#endif 364#endif
365 fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n"); 365 fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n");
366 if (is_shifting_signed(-0x7F7E80B1L)) 366 if (is_shifting_signed(-0x7F7E80B1L))
367 fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n"); 367 fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n");
368 else 368 else
369 fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n"); 369 fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n");
370 fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n"); 370 fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n");
371 fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n"); 371 fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n");
372 fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n"); 372 fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n");
373 fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n"); 373 fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n");
374 fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n"); 374 fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n");
375 fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n"); 375 fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n");
376 fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n"); 376 fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n");
377 fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n"); 377 fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n");
378 fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n"); 378 fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n");
379 fprintf(outfile, "#undef DONT_USE_B_MODE\n"); 379 fprintf(outfile, "#undef DONT_USE_B_MODE\n");
380 fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n"); 380 fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n");
381 fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n"); 381 fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n");
382 382
383 /* Close the jconfig.h file */ 383 /* Close the jconfig.h file */
384 fclose(outfile); 384 fclose(outfile);
385 385
386 /* User report */ 386 /* User report */
387 printf("Configuration check for Independent JPEG Group's software done.\n"); 387 printf("Configuration check for Independent JPEG Group's software done.\n");
388 printf("\nI have written the jconfig.h file for you.\n\n"); 388 printf("\nI have written the jconfig.h file for you.\n\n");
389#ifdef HAVE_PROTOTYPES 389#ifdef HAVE_PROTOTYPES
390 printf("You should use makefile.ansi as the starting point for your Makefile.\n"); 390 printf("You should use makefile.ansi as the starting point for your Makefile.\n");
391#else 391#else
392 printf("You should use makefile.unix as the starting point for your Makefile.\n"); 392 printf("You should use makefile.unix as the starting point for your Makefile.\n");
393#endif 393#endif
394 394
395#ifdef NEED_SPECIAL_INCLUDE 395#ifdef NEED_SPECIAL_INCLUDE
396 printf("\nYou'll need to change jconfig.h to include the system include file\n"); 396 printf("\nYou'll need to change jconfig.h to include the system include file\n");
397 printf("that you found type size_t in, or add a direct definition of type\n"); 397 printf("that you found type size_t in, or add a direct definition of type\n");
398 printf("size_t if that's what you used. Just add it to the end.\n"); 398 printf("size_t if that's what you used. Just add it to the end.\n");
399#endif 399#endif
400 400
401 return 0; 401 return 0;
402} 402}