diff --git a/gfx/ots/include/opentype-sanitiser.h b/gfx/ots/include/opentype-sanitiser.h --- a/gfx/ots/include/opentype-sanitiser.h +++ b/gfx/ots/include/opentype-sanitiser.h @@ -12,16 +12,19 @@ typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned int uint32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #include // for htons/ntohs #undef min #undef max +#elif defined(_AIX) +#include +#include #else #include #include #endif #include // for std::min #include #include diff --git a/gfx/ots/src/Makefile.in b/gfx/ots/src/Makefile.in --- a/gfx/ots/src/Makefile.in +++ b/gfx/ots/src/Makefile.in @@ -81,8 +81,12 @@ LOCAL_INCLUDES += -I$(srcdir) FORCE_STATIC_LIB = 1 # This library is used by other shared libs in a static build FORCE_USE_PIC = 1 include $(topsrcdir)/config/rules.mk DEFINES += -DPACKAGE_VERSION="\"moz\"" DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\"" + +ifeq ($(OS_ARCH),AIX) +CXXFLAGS += -qlanglvl=varargmacros +endif diff --git a/gfx/ots/src/cmap.cc b/gfx/ots/src/cmap.cc --- a/gfx/ots/src/cmap.cc +++ b/gfx/ots/src/cmap.cc @@ -137,17 +137,17 @@ bool Parse3x4(ots::OpenTypeFile *file, i return OTS_FAILURE(); } if (ranges[i].id_range_offset & 1) { // Some font generators seem to put 65535 on id_range_offset // for 0xFFFF-0xFFFF range. // (e.g., many fonts in http://www.princexml.com/fonts/) if (i == segcount - 1u) { - OTS_WARNING("bad id_range_offset"); + OTS_WARNING("bad id_range_offset", ""); ranges[i].id_range_offset = 0; // The id_range_offset value in the transcoded font will not change // since this table is not actually "transcoded" yet. } else { return OTS_FAILURE(); } } } @@ -157,17 +157,17 @@ bool Parse3x4(ots::OpenTypeFile *file, i for (unsigned i = 1; i < segcount; ++i) { if ((i == segcount - 1u) && (ranges[i - 1].start_range == 0xffff) && (ranges[i - 1].end_range == 0xffff) && (ranges[i].start_range == 0xffff) && (ranges[i].end_range == 0xffff)) { // Some fonts (e.g., Germania.ttf) have multiple 0xffff terminators. // We'll accept them as an exception. - OTS_WARNING("multiple 0xffff terminators found"); + OTS_WARNING("multiple 0xffff terminators found", ""); continue; } // Note: some Linux fonts (e.g., LucidaSansOblique.ttf, bsmi00lp.ttf) have // unsorted table... if (ranges[i].end_range <= ranges[i - 1].end_range) { return OTS_FAILURE(); } diff --git a/gfx/ots/src/gasp.cc b/gfx/ots/src/gasp.cc --- a/gfx/ots/src/gasp.cc +++ b/gfx/ots/src/gasp.cc @@ -27,52 +27,51 @@ bool ots_gasp_parse(OpenTypeFile *file, if (gasp->version > 1) { // Lots of Linux fonts have bad version numbers... OTS_WARNING("bad version: %u", gasp->version); DROP_THIS_TABLE; return true; } if (num_ranges == 0) { - OTS_WARNING("num_ranges is zero"); + OTS_WARNING("num_ranges is zero", ""); DROP_THIS_TABLE; return true; } gasp->gasp_ranges.reserve(num_ranges); for (unsigned i = 0; i < num_ranges; ++i) { uint16_t max_ppem = 0; uint16_t behavior = 0; if (!table.ReadU16(&max_ppem) || !table.ReadU16(&behavior)) { return OTS_FAILURE(); } if ((i > 0) && (gasp->gasp_ranges[i - 1].first >= max_ppem)) { // The records in the gaspRange[] array must be sorted in order of // increasing rangeMaxPPEM value. - OTS_WARNING("ranges are not sorted"); + OTS_WARNING("ranges are not sorted", ""); DROP_THIS_TABLE; return true; } if ((i == num_ranges - 1u) && // never underflow. (max_ppem != 0xffffu)) { - OTS_WARNING("The last record should be 0xFFFF as a sentinel value " - "for rangeMaxPPEM"); + OTS_WARNING("The last record should be 0xFFFF as a sentinel value ", "for rangeMaxPPEM"); DROP_THIS_TABLE; return true; } if (behavior >> 8) { OTS_WARNING("undefined bits are used: %x", behavior); // mask undefined bits. behavior &= 0x000fu; } if (gasp->version == 0 && (behavior >> 2) != 0) { - OTS_WARNING("changed the version number to 1"); + OTS_WARNING("changed the version number to 1", ""); gasp->version = 1; } gasp->gasp_ranges.push_back(std::make_pair(max_ppem, behavior)); } return true; } diff --git a/gfx/ots/src/glyf.cc b/gfx/ots/src/glyf.cc --- a/gfx/ots/src/glyf.cc +++ b/gfx/ots/src/glyf.cc @@ -225,17 +225,17 @@ bool ots_glyf_parse(OpenTypeFile *file, return OTS_FAILURE(); } // workaround for fonts in http://www.princexml.com/fonts/ if ((xmin == 32767) && (xmax == -32767) && (ymin == 32767) && (ymax == -32767)) { - OTS_WARNING("bad xmin/xmax/ymin/ymax values"); + OTS_WARNING("bad xmin/xmax/ymin/ymax values", ""); xmin = xmax = ymin = ymax = 0; } if (xmin > xmax || ymin > ymax) { return OTS_FAILURE(); } unsigned new_size = 0; @@ -264,17 +264,17 @@ bool ots_glyf_parse(OpenTypeFile *file, current_offset += new_size; } resulting_offsets[num_glyphs] = current_offset; const uint16_t max16 = std::numeric_limits::max(); if ((*std::max_element(resulting_offsets.begin(), resulting_offsets.end()) >= (max16 * 2u)) && (file->head->index_to_loc_format != 1)) { - OTS_WARNING("2-bytes indexing is not possible (due to the padding above)"); + OTS_WARNING("2-bytes indexing is not possible (due to the padding above)", ""); file->head->index_to_loc_format = 1; } file->loca->offsets = resulting_offsets; return true; } bool ots_glyf_should_serialise(OpenTypeFile *file) { diff --git a/gfx/ots/src/hdmx.cc b/gfx/ots/src/hdmx.cc --- a/gfx/ots/src/hdmx.cc +++ b/gfx/ots/src/hdmx.cc @@ -20,17 +20,17 @@ bool ots_hdmx_parse(OpenTypeFile *file, OpenTypeHDMX * const hdmx = file->hdmx; if (!file->head || !file->maxp) { return OTS_FAILURE(); } if ((file->head->flags & 0x14) == 0) { // http://www.microsoft.com/typography/otspec/recom.htm - OTS_WARNING("the table should not be present when bit 2 and 4 of the " + OTS_WARNING("the table should not be present when bit 2 and 4 of the ", "head->flags are not set"); DROP_THIS_TABLE; return true; } int16_t num_recs; if (!table.ReadU16(&hdmx->version) || !table.ReadS16(&num_recs) || @@ -65,17 +65,17 @@ bool ots_hdmx_parse(OpenTypeFile *file, OpenTypeHDMXDeviceRecord rec; if (!table.ReadU8(&rec.pixel_size) || !table.ReadU8(&rec.max_width)) { return OTS_FAILURE(); } if ((i != 0) && (rec.pixel_size <= last_pixel_size)) { - OTS_WARNING("records are not sorted"); + OTS_WARNING("records are not sorted", ""); DROP_THIS_TABLE; return true; } last_pixel_size = rec.pixel_size; rec.widths.reserve(file->maxp->num_glyphs); for (unsigned j = 0; j < file->maxp->num_glyphs; ++j) { uint8_t width; diff --git a/gfx/ots/src/kern.cc b/gfx/ots/src/kern.cc --- a/gfx/ots/src/kern.cc +++ b/gfx/ots/src/kern.cc @@ -25,17 +25,17 @@ bool ots_kern_parse(OpenTypeFile *file, } if (kern->version > 0) { DROP_THIS_TABLE; return true; } if (num_tables == 0) { - OTS_WARNING("num_tables is zero"); + OTS_WARNING("num_tables is zero", ""); DROP_THIS_TABLE; return true; } kern->subtables.reserve(num_tables); for (unsigned i = 0; i < num_tables; ++i) { OpenTypeKERNFormat0 subtable; uint16_t sub_length = 0; @@ -56,21 +56,21 @@ bool ots_kern_parse(OpenTypeFile *file, } if (!table.ReadU16(&subtable.coverage)) { return OTS_FAILURE(); } if (!(subtable.coverage & 0x1)) { OTS_WARNING( - "We don't support vertical data as the renderer doesn't support it."); + "We don't support vertical data as the renderer doesn't support it.", ""); continue; } if (subtable.coverage & 0xF0) { - OTS_WARNING("Reserved fields should zero-filled."); + OTS_WARNING("Reserved fields should zero-filled.", ""); DROP_THIS_TABLE; return true; } const uint32_t format = (subtable.coverage & 0xFF00) >> 8; if (format != 0) { OTS_WARNING("Format %d is not supported.", format); continue; } @@ -80,77 +80,77 @@ bool ots_kern_parse(OpenTypeFile *file, if (!table.ReadU16(&num_pairs) || !table.ReadU16(&subtable.search_range) || !table.ReadU16(&subtable.entry_selector) || !table.ReadU16(&subtable.range_shift)) { return OTS_FAILURE(); } if (!num_pairs) { - OTS_WARNING("Zero length subtable is found."); + OTS_WARNING("Zero length subtable is found.", ""); DROP_THIS_TABLE; return true; } // Sanity checks for search_range, entry_selector, and range_shift. See the // comment in ots.cc for details. const size_t kFormat0PairSize = 6; // left, right, and value. 2 bytes each. if (num_pairs > (65536 / kFormat0PairSize)) { // Some fonts (e.g. calibri.ttf, pykes_peak_zero.ttf) have pairs >= 10923. - OTS_WARNING("Too large subtable."); + OTS_WARNING("Too large subtable.", ""); DROP_THIS_TABLE; return true; } unsigned max_pow2 = 0; while (1u << (max_pow2 + 1) <= num_pairs) { ++max_pow2; } const uint16_t expected_search_range = (1u << max_pow2) * kFormat0PairSize; if (subtable.search_range != expected_search_range) { - OTS_WARNING("bad search range"); + OTS_WARNING("bad search range", ""); subtable.search_range = expected_search_range; } if (subtable.entry_selector != max_pow2) { return OTS_FAILURE(); } const uint32_t expected_range_shift = kFormat0PairSize * num_pairs - subtable.search_range; if (subtable.range_shift != expected_range_shift) { - OTS_WARNING("bad range shift"); + OTS_WARNING("bad range shift", ""); subtable.range_shift = expected_range_shift; } // Read kerning pairs. subtable.pairs.reserve(num_pairs); uint32_t last_pair = 0; for (unsigned j = 0; j < num_pairs; ++j) { OpenTypeKERNFormat0Pair kerning_pair; if (!table.ReadU16(&kerning_pair.left) || !table.ReadU16(&kerning_pair.right) || !table.ReadS16(&kerning_pair.value)) { return OTS_FAILURE(); } const uint32_t current_pair = (kerning_pair.left << 16) + kerning_pair.right; if (j != 0 && current_pair <= last_pair) { - OTS_WARNING("Kerning pairs are not sorted."); + OTS_WARNING("Kerning pairs are not sorted.", ""); // Many free fonts don't follow this rule, so we don't call OTS_FAILURE // in order to support these fonts. DROP_THIS_TABLE; return true; } last_pair = current_pair; subtable.pairs.push_back(kerning_pair); } kern->subtables.push_back(subtable); } if (!kern->subtables.size()) { - OTS_WARNING("All subtables are removed."); + OTS_WARNING("All subtables are removed.", ""); DROP_THIS_TABLE; return true; } return true; } bool ots_kern_should_serialise(OpenTypeFile *file) { diff --git a/gfx/ots/src/os2.cc b/gfx/ots/src/os2.cc --- a/gfx/ots/src/os2.cc +++ b/gfx/ots/src/os2.cc @@ -121,30 +121,30 @@ bool ots_os2_parse(OpenTypeFile *file, c // the settings of bits 0 and 1 must be reflected in the macStyle bits // in the 'head' table. if (!file->head) { return OTS_FAILURE(); } if ((os2->selection & 0x1) && !(file->head->mac_style & 0x2)) { - OTS_WARNING("adjusting Mac style (italic)"); + OTS_WARNING("adjusting Mac style (italic)", ""); file->head->mac_style |= 0x2; } if ((os2->selection & 0x2) && !(file->head->mac_style & 0x4)) { - OTS_WARNING("adjusting Mac style (underscore)"); + OTS_WARNING("adjusting Mac style (underscore)", ""); file->head->mac_style |= 0x4; } // While bit 6 on implies that bits 0 and 1 of macStyle are clear, // the reverse is not true. if ((os2->selection & 0x40) && (file->head->mac_style & 0x3)) { - OTS_WARNING("adjusting Mac style (regular)"); + OTS_WARNING("adjusting Mac style (regular)", ""); file->head->mac_style &= 0xfffcu; } if ((os2->version < 4) && (os2->selection & 0x300)) { // bit 8 and 9 must be unset in OS/2 table versions less than 4. return OTS_FAILURE(); } diff --git a/gfx/ots/src/ots.cc b/gfx/ots/src/ots.cc --- a/gfx/ots/src/ots.cc +++ b/gfx/ots/src/ots.cc @@ -203,32 +203,32 @@ bool ProcessTTF(ots::OpenTypeFile *heade while (1u << (max_pow2 + 1) <= header->num_tables) { max_pow2++; } const uint16_t expected_search_range = (1u << max_pow2) << 4; // Don't call ots_failure() here since ~25% of fonts (250+ fonts) in // http://www.princexml.com/fonts/ have unexpected search_range value. if (header->search_range != expected_search_range) { - OTS_WARNING("bad search range"); + OTS_WARNING("bad search range", ""); header->search_range = expected_search_range; // Fix the value. } // entry_selector is Log2(maximum power of 2 <= numTables) if (header->entry_selector != max_pow2) { return OTS_FAILURE(); } // range_shift is NumTables x 16-searchRange. We know that 16*num_tables // doesn't over flow because we range checked it above. Also, we know that // it's > header->search_range by construction of search_range. const uint32_t expected_range_shift = 16 * header->num_tables - header->search_range; if (header->range_shift != expected_range_shift) { - OTS_WARNING("bad range shift"); + OTS_WARNING("bad range shift", ""); header->range_shift = expected_range_shift; // the same as above. } // Next up is the list of tables. std::vector tables; for (unsigned i = 0; i < header->num_tables; ++i) { OpenTypeTable table; diff --git a/gfx/ots/src/ots.h b/gfx/ots/src/ots.h --- a/gfx/ots/src/ots.h +++ b/gfx/ots/src/ots.h @@ -26,16 +26,19 @@ bool Failure(const char *f, int l, const #define OTS_WARNING(format) #else // GCC #if defined(OTS_DEBUG) #define OTS_WARNING(format, args...) \ ots::Warning(__FILE__, __LINE__, format, ##args) void Warning(const char *f, int l, const char *format, ...) __attribute__((format(printf, 3, 4))); + +#elif ! defined(_AIX51) && defined(_AIX43) // AIX before v5.1 +#define OTS_WARNING(format,...) #else #define OTS_WARNING(format, args...) #endif #endif // Define OTS_NO_TRANSCODE_HINTS (i.e., g++ -DOTS_NO_TRANSCODE_HINTS) if you // want to omit TrueType hinting instructions and variables in glyf, fpgm, prep, // and cvt tables. diff --git a/gfx/ots/src/post.cc b/gfx/ots/src/post.cc --- a/gfx/ots/src/post.cc +++ b/gfx/ots/src/post.cc @@ -54,17 +54,17 @@ bool ots_post_parse(OpenTypeFile *file, if (!file->maxp) { return OTS_FAILURE(); } if (num_glyphs == 0) { if (file->maxp->num_glyphs > 258) { return OTS_FAILURE(); } - OTS_WARNING("table version is 1, but no glyf names are found"); + OTS_WARNING("table version is 1, but no glyf names are found", ""); // workaround for fonts in http://www.fontsquirrel.com/fontface // (e.g., yataghan.ttf). post->version = 0x00010000; return true; } if (num_glyphs != file->maxp->num_glyphs) { // Note: Fixedsys500c.ttf seems to have inconsistent num_glyphs values. diff --git a/gfx/ots/src/vdmx.cc b/gfx/ots/src/vdmx.cc --- a/gfx/ots/src/vdmx.cc +++ b/gfx/ots/src/vdmx.cc @@ -42,29 +42,29 @@ bool ots_vdmx_parse(OpenTypeFile *file, if (rec.charset > 1) { OTS_WARNING("bad charset: %u", rec.charset); DROP_THIS_TABLE; return true; } if (rec.y_start_ratio > rec.y_end_ratio) { - OTS_WARNING("bad y ratio"); + OTS_WARNING("bad y ratio", ""); DROP_THIS_TABLE; return true; } // All values set to zero signal the default grouping to use; // if present, this must be the last Ratio group in the table. if ((i < vdmx->num_ratios - 1u) && (rec.x_ratio == 0) && (rec.y_start_ratio == 0) && (rec.y_end_ratio == 0)) { // workaround for fonts which have 2 or more {0, 0, 0} terminators. - OTS_WARNING("superfluous terminator found"); + OTS_WARNING("superfluous terminator found", ""); DROP_THIS_TABLE; return true; } vdmx->rat_ranges.push_back(rec); } vdmx->offsets.reserve(vdmx->num_ratios); @@ -94,25 +94,25 @@ bool ots_vdmx_parse(OpenTypeFile *file, for (unsigned j = 0; j < group.recs; ++j) { OpenTypeVDMXVTable vt; if (!table.ReadU16(&vt.y_pel_height) || !table.ReadS16(&vt.y_max) || !table.ReadS16(&vt.y_min)) { return OTS_FAILURE(); } if (vt.y_max < vt.y_min) { - OTS_WARNING("bad y min/max"); + OTS_WARNING("bad y min/max", ""); DROP_THIS_TABLE; return true; } // This table must appear in sorted order (sorted by yPelHeight), // but need not be continuous. if ((j != 0) && (group.entries[j - 1].y_pel_height >= vt.y_pel_height)) { - OTS_WARNING("the table is not sorted"); + OTS_WARNING("the table is not sorted", ""); DROP_THIS_TABLE; return true; } group.entries.push_back(vt); } vdmx->groups.push_back(group); } diff --git a/gfx/ots/src/vorg.cc b/gfx/ots/src/vorg.cc --- a/gfx/ots/src/vorg.cc +++ b/gfx/ots/src/vorg.cc @@ -47,17 +47,17 @@ bool ots_vorg_parse(OpenTypeFile *file, for (unsigned i = 0; i < num_recs; ++i) { OpenTypeVORGMetrics rec; if (!table.ReadU16(&rec.glyph_index) || !table.ReadS16(&rec.vert_origin_y)) { return OTS_FAILURE(); } if ((i != 0) && (rec.glyph_index <= last_glyph_index)) { - OTS_WARNING("the table is not sorted"); + OTS_WARNING("the table is not sorted", ""); DROP_THIS_TABLE; return true; } last_glyph_index = rec.glyph_index; vorg->metrics.push_back(rec); } diff --git a/gfx/qcms/Makefile.in b/gfx/qcms/Makefile.in --- a/gfx/qcms/Makefile.in +++ b/gfx/qcms/Makefile.in @@ -17,8 +17,12 @@ CSRCS = iccread.c transform.c FORCE_STATIC_LIB = 1 # This library is used by other shared libs FORCE_USE_PIC = 1 include $(topsrcdir)/config/rules.mk CFLAGS += -DMOZ_QCMS + +ifeq ($(OS_ARCH),AIX) +CFLAGS += -qenum=4 +endif diff --git a/gfx/qcms/qcmsint.h b/gfx/qcms/qcmsint.h --- a/gfx/qcms/qcmsint.h +++ b/gfx/qcms/qcmsint.h @@ -55,17 +55,17 @@ typedef uint16_t uInt16Number; struct XYZNumber { s15Fixed16Number X; s15Fixed16Number Y; s15Fixed16Number Z; }; struct curveType { uint32_t count; - uInt16Number data[0]; + uInt16Number data[]; }; struct lutType { uint8_t num_input_channels; uint8_t num_output_channels; uint8_t num_clut_grid_points; s15Fixed16Number e00; diff --git a/gfx/qcms/qcmstypes.h b/gfx/qcms/qcmstypes.h --- a/gfx/qcms/qcmstypes.h +++ b/gfx/qcms/qcmstypes.h @@ -5,16 +5,18 @@ #include "prtypes.h" /* prtypes.h defines IS_LITTLE_ENDIAN and IS_BIG ENDIAN */ #if defined (__SVR4) && defined (__sun) /* int_types.h gets included somehow, so avoid redefining the types differently */ #include +#elif defined (_AIX) +#include #else typedef PRInt8 int8_t; typedef PRUint8 uint8_t; typedef PRInt16 int16_t; typedef PRUint16 uint16_t; typedef PRInt32 int32_t; typedef PRUint32 uint32_t; typedef PRInt64 int64_t; @@ -65,17 +67,17 @@ typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #ifdef _WIN64 typedef unsigned __int64 uintptr_t; #else typedef unsigned long uintptr_t; #endif #elif defined (_AIX) -# include +# include #else # include #endif #endif typedef qcms_bool bool; #define true 1 diff --git a/gfx/src/thebes/nsThebesDeviceContext.cpp b/gfx/src/thebes/nsThebesDeviceContext.cpp --- a/gfx/src/thebes/nsThebesDeviceContext.cpp +++ b/gfx/src/thebes/nsThebesDeviceContext.cpp @@ -192,17 +192,17 @@ nsThebesDeviceContext::SetDPI() if (NS_FAILED(rv)) { prefDPI = -1; } } #if defined(MOZ_ENABLE_GTK2) GdkScreen *screen = gdk_screen_get_default(); gtk_settings_get_for_screen(screen); // Make sure init is run so we have a resolution - PRInt32 OSVal = PRInt32(round(gdk_screen_get_resolution(screen))); + PRInt32 OSVal = PRInt32(rint(gdk_screen_get_resolution(screen))); if (prefDPI == 0) // Force the use of the OS dpi dpi = OSVal; else // Otherwise, the minimum dpi is 96dpi dpi = PR_MAX(OSVal, 96); #elif defined(XP_WIN) // XXX we should really look at the widget if !dc but it is currently always null diff --git a/media/libsydneyaudio/src/sydney_audio_aix.c b/media/libsydneyaudio/src/sydney_audio_aix.c --- a/media/libsydneyaudio/src/sydney_audio_aix.c +++ b/media/libsydneyaudio/src/sydney_audio_aix.c @@ -43,16 +43,25 @@ #include #include #include "sydney_audio.h" #ifndef DEFAULT_AUDIO_DEVICE #define DEFAULT_AUDIO_DEVICE "/dev/paud0/1" #endif +#ifdef _AIX43 +#if ! defined _AIX51 +#define AUDIO_PCM PCM +#define AUDIO_TWOS_COMPLEMENT TWOS_COMPLEMENT +#define AUDIO_PLAY PLAY +#define AUDIO_OUTPUT_1 OUTPUT_1 +#endif /* ! _AIX51 */ +#endif /* _AIX43 */ + #define LOOP_WHILE_EINTR(v,func) do { (v) = (func); } \ while ((v) == -1 && errno == EINTR); typedef struct sa_buf sa_buf; struct sa_buf { unsigned int size; /* the size of data */ sa_buf *next; unsigned char data[]; /* sound data */ diff --git a/modules/plugin/base/public/nptypes.h b/modules/plugin/base/public/nptypes.h --- a/modules/plugin/base/public/nptypes.h +++ b/modules/plugin/base/public/nptypes.h @@ -31,16 +31,19 @@ * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ +#ifndef nptypes_h_ +#define nptypes_h_ + /* * Header file for ensuring that C99 types ([u]int32_t and bool) and * true/false macros are available. */ #if defined(WIN32) || defined(OS2) /* * Win32 and OS/2 don't know C99, so define [u]int_16/32 here. The bool @@ -106,8 +109,11 @@ * works. */ #define bool int #define true 1 #define false 0 #endif #endif #endif + +#endif /* nptypes_h_ */ + diff --git a/widget/src/gtk2/Makefile.in b/widget/src/gtk2/Makefile.in --- a/widget/src/gtk2/Makefile.in +++ b/widget/src/gtk2/Makefile.in @@ -181,9 +181,13 @@ INCLUDES += \ -I$(srcdir)/../xpwidgets \ -I$(topsrcdir)/other-licenses/atk-1.0 \ $(NULL) test_container: mozdrawingarea.o mozcontainer.o test_container.c $(CC) $(MOZ_GTK2_CFLAGS) -o test_container test_container.c \ mozdrawingarea.o mozcontainer.o \ $(MOZ_GTK2_LIBS) + +ifeq ($(OS_ARCH),AIX) +CXXFLAGS += -qlanglvl=varargmacros +endif diff --git a/widget/src/gtk2/nsClipboard.cpp b/widget/src/gtk2/nsClipboard.cpp --- a/widget/src/gtk2/nsClipboard.cpp +++ b/widget/src/gtk2/nsClipboard.cpp @@ -54,16 +54,20 @@ // For manipulation of the X event queue #include #include #include #include #include #include +#if ! defined (_AIX51) && defined (_AIX43) +#include +#endif + #ifdef POLL_WITH_XCONNECTIONNUMBER #include #endif // Callback when someone asks us for the selection void invisible_selection_get_cb (GtkWidget *aWidget, GtkSelectionData *aSelectionData, diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp --- a/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp @@ -134,17 +134,17 @@ extern "C" { #include D_DEBUG_DOMAIN( ns_Window, "nsWindow", "nsWindow" ); } #include "gfxDirectFBSurface.h" #define GDK_WINDOW_XWINDOW(_win) _win #else -#define D_DEBUG_AT(x,y...) do {} while (0) +#define D_DEBUG_AT(x,...) do {} while (0) #endif // Don't put more than this many rects in the dirty region, just fluff // out to the bounding-box if there are more #define MAX_RECTS_IN_REGION 100 /* For PrepareNativeWidget */ static NS_DEFINE_IID(kDeviceContextCID, NS_DEVICE_CONTEXT_CID);