Merge mozilla-central and tracemonkey. (a=blockers)
[mozilla-central.git] / jpeg / jconfig.h
blobd181a5ec0cb054b2f3bc2259cfab41244995b201
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
39 * jconfig.h to configure the IJG JPEG library for the Mozilla/Netscape
40 * environment. Note that there are also Mozilla mods in jmorecfg.h.
43 /* We assume an ANSI C or C++ compilation environment */
44 #define HAVE_PROTOTYPES
45 #define HAVE_UNSIGNED_CHAR
46 #define HAVE_UNSIGNED_SHORT
47 /* #define void char */
48 /* #define const */
49 #ifndef HAVE_STDDEF_H
50 #define HAVE_STDDEF_H
51 #endif /* HAVE_STDDEF_H */
52 #ifndef HAVE_STDLIB_H
53 #define HAVE_STDLIB_H
54 #endif /* HAVE_STDLIB_H */
55 #undef NEED_BSD_STRINGS
56 #undef NEED_SYS_TYPES_H
57 #undef NEED_FAR_POINTERS
58 #undef NEED_SHORT_EXTERNAL_NAMES
59 /* Define this if you get warnings about undefined structures. */
60 #undef INCOMPLETE_TYPES_BROKEN
62 /* With this setting, the IJG code will work regardless of whether
63 * type "char" is signed or unsigned.
65 #undef CHAR_IS_UNSIGNED
68 /* defines that need not be visible to callers of the IJG library */
70 #ifdef JPEG_INTERNALS
72 /* If right shift of "long" quantities is unsigned on your machine,
73 * you'll have to define this. Fortunately few people should need it.
75 #undef RIGHT_SHIFT_IS_UNSIGNED
77 #endif /* JPEG_INTERNALS */
80 /* these defines are not interesting for building just the IJG library,
81 * but we leave 'em here anyway.
83 #ifdef JPEG_CJPEG_DJPEG
85 #define BMP_SUPPORTED /* BMP image file format */
86 #define GIF_SUPPORTED /* GIF image file format */
87 #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
88 #undef RLE_SUPPORTED /* Utah RLE image file format */
89 #define TARGA_SUPPORTED /* Targa image file format */
91 #undef TWO_FILE_COMMANDLINE
92 #undef NEED_SIGNAL_CATCHER
93 #undef DONT_USE_B_MODE
94 #undef PROGRESS_REPORT
96 #endif /* JPEG_CJPEG_DJPEG */
98 /* SSE* alignment support - only use on platforms that support declspec and __attribute__ */
100 #if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__)
101 #define ALIGN16_const_vector_short(name) __declspec(align(16)) const short name[8]
102 #define ALIGN16_const_vector_uchar(name) __declspec(align(16)) const unsigned char name[16]
103 #else
104 #define ALIGN16_const_vector_short(name) const short name[8] __attribute__ ((aligned (16)))
105 #define ALIGN16_const_vector_uchar(name) const unsigned char name[16] __attribute__ ((aligned (16)))
106 #endif /* ! XP_WIN32 && _M_IX86 && !__GNUC */