From 605a7127012d0b6eb797520037e5177ff4736821 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 25 Nov 2013 14:43:12 -0800 Subject: [PATCH] simplify __cplusplus ifdef drop c_plusplus which is from a quite ancient pre-standard compiler Change-Id: I9e357b3292a6b52b14c2641ba11f4f872c04b7fb --- examples/cwebp.c | 4 ++-- examples/dwebp.c | 4 ++-- examples/example_util.h | 4 ++-- examples/gif2webp_util.h | 4 ++-- examples/jpegdec.h | 4 ++-- examples/metadata.h | 4 ++-- examples/pngdec.h | 4 ++-- examples/tiffdec.h | 4 ++-- examples/wicdec.h | 4 ++-- src/dec/alphai.h | 4 ++-- src/dec/decode_vp8.h | 4 ++-- src/dec/vp8i.h | 4 ++-- src/dec/vp8li.h | 4 ++-- src/dec/webpi.h | 4 ++-- src/dsp/dsp.h | 4 ++-- src/dsp/lossless.h | 4 ++-- src/dsp/yuv.h | 4 ++-- src/enc/backward_references.h | 4 ++-- src/enc/cost.h | 4 ++-- src/enc/histogram.h | 4 ++-- src/enc/vp8enci.h | 4 ++-- src/enc/vp8li.h | 4 ++-- src/mux/muxi.h | 4 ++-- src/utils/alpha_processing.h | 4 ++-- src/utils/bit_reader.h | 4 ++-- src/utils/bit_writer.h | 4 ++-- src/utils/color_cache.h | 4 ++-- src/utils/filters.h | 4 ++-- src/utils/huffman.h | 4 ++-- src/utils/huffman_encode.h | 4 ++-- src/utils/quant_levels.h | 4 ++-- src/utils/quant_levels_dec.h | 4 ++-- src/utils/random.h | 4 ++-- src/utils/rescaler.h | 4 ++-- src/utils/thread.h | 4 ++-- src/utils/utils.h | 4 ++-- src/webp/decode.h | 4 ++-- src/webp/demux.h | 4 ++-- src/webp/encode.h | 4 ++-- src/webp/mux.h | 4 ++-- src/webp/mux_types.h | 4 ++-- 41 files changed, 82 insertions(+), 82 deletions(-) diff --git a/examples/cwebp.c b/examples/cwebp.c index 2d1f076d..378dfa85 100644 --- a/examples/cwebp.c +++ b/examples/cwebp.c @@ -31,13 +31,13 @@ #include "./wicdec.h" #ifndef WEBP_DLL -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif extern void* VP8GetCPUInfo; // opaque forward declaration. -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif #endif // WEBP_DLL diff --git a/examples/dwebp.c b/examples/dwebp.c index fca9c9a7..c1470466 100644 --- a/examples/dwebp.c +++ b/examples/dwebp.c @@ -49,13 +49,13 @@ static int verbose = 0; #ifndef WEBP_DLL -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif extern void* VP8GetCPUInfo; // opaque forward declaration. -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif #endif // WEBP_DLL diff --git a/examples/example_util.h b/examples/example_util.h index 0122fd3c..b478025f 100644 --- a/examples/example_util.h +++ b/examples/example_util.h @@ -15,7 +15,7 @@ #include "webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -29,7 +29,7 @@ int ExUtilReadFile(const char* const file_name, int ExUtilWriteFile(const char* const file_name, const uint8_t* data, size_t data_size); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/examples/gif2webp_util.h b/examples/gif2webp_util.h index fd540459..95313e6c 100644 --- a/examples/gif2webp_util.h +++ b/examples/gif2webp_util.h @@ -18,7 +18,7 @@ #include "webp/mux.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -73,7 +73,7 @@ WebPMuxError WebPFrameCacheFlushAll(WebPFrameCache* const cache, int verbose, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/examples/jpegdec.h b/examples/jpegdec.h index 156620f2..cc6e3a19 100644 --- a/examples/jpegdec.h +++ b/examples/jpegdec.h @@ -15,7 +15,7 @@ #include #include "webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -28,7 +28,7 @@ struct WebPPicture; int ReadJPEG(FILE* in_file, struct WebPPicture* const pic, struct Metadata* const metadata); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/examples/metadata.h b/examples/metadata.h index 989a43eb..7f272c6b 100644 --- a/examples/metadata.h +++ b/examples/metadata.h @@ -15,7 +15,7 @@ #include "webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -40,7 +40,7 @@ void MetadataFree(Metadata* const metadata); int MetadataCopy(const char* metadata, size_t metadata_len, MetadataPayload* const payload); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/examples/pngdec.h b/examples/pngdec.h index 80c142d2..aeeb02ad 100644 --- a/examples/pngdec.h +++ b/examples/pngdec.h @@ -14,7 +14,7 @@ #include -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -28,7 +28,7 @@ struct WebPPicture; int ReadPNG(FILE* in_file, struct WebPPicture* const pic, int keep_alpha, struct Metadata* const metadata); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/examples/tiffdec.h b/examples/tiffdec.h index cde1534f..d6f90958 100644 --- a/examples/tiffdec.h +++ b/examples/tiffdec.h @@ -12,7 +12,7 @@ #ifndef WEBP_EXAMPLES_TIFFDEC_H_ #define WEBP_EXAMPLES_TIFFDEC_H_ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -27,7 +27,7 @@ int ReadTIFF(const char* const filename, struct WebPPicture* const pic, int keep_alpha, struct Metadata* const metadata); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/examples/wicdec.h b/examples/wicdec.h index 6d797ce0..94d44b36 100644 --- a/examples/wicdec.h +++ b/examples/wicdec.h @@ -12,7 +12,7 @@ #ifndef WEBP_EXAMPLES_WICDEC_H_ #define WEBP_EXAMPLES_WICDEC_H_ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -27,7 +27,7 @@ int ReadPictureWithWIC(const char* const filename, struct WebPPicture* const pic, int keep_alpha, struct Metadata* const metadata); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dec/alphai.h b/src/dec/alphai.h index 3fbae4ae..5fa230ca 100644 --- a/src/dec/alphai.h +++ b/src/dec/alphai.h @@ -17,7 +17,7 @@ #include "./webpi.h" #include "../utils/filters.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -48,7 +48,7 @@ void ALPHDelete(ALPHDecoder* const dec); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dec/decode_vp8.h b/src/dec/decode_vp8.h index 25aec324..b9337bbe 100644 --- a/src/dec/decode_vp8.h +++ b/src/dec/decode_vp8.h @@ -16,7 +16,7 @@ #include "../webp/decode.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -178,7 +178,7 @@ WEBP_EXTERN(int) VP8LGetInfo( const uint8_t* data, size_t data_size, // data available so far int* const width, int* const height, int* const has_alpha); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dec/vp8i.h b/src/dec/vp8i.h index bb438626..410b403c 100644 --- a/src/dec/vp8i.h +++ b/src/dec/vp8i.h @@ -21,7 +21,7 @@ #include "../utils/thread.h" #include "../dsp/dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -352,7 +352,7 @@ int VP8DecodeLayer(VP8Decoder* const dec); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dec/vp8li.h b/src/dec/vp8li.h index aa132a64..afa294db 100644 --- a/src/dec/vp8li.h +++ b/src/dec/vp8li.h @@ -22,7 +22,7 @@ #include "../utils/huffman.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -130,7 +130,7 @@ void VP8LDelete(VP8LDecoder* const dec); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dec/webpi.h b/src/dec/webpi.h index 4ae0bfc5..d915f5ef 100644 --- a/src/dec/webpi.h +++ b/src/dec/webpi.h @@ -14,7 +14,7 @@ #ifndef WEBP_DEC_WEBPI_H_ #define WEBP_DEC_WEBPI_H_ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -109,7 +109,7 @@ void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index 98782c88..3be783af 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -16,7 +16,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -217,7 +217,7 @@ void WebPInitPremultiplyNEON(void); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dsp/lossless.h b/src/dsp/lossless.h index 81196063..0f1d4420 100644 --- a/src/dsp/lossless.h +++ b/src/dsp/lossless.h @@ -18,7 +18,7 @@ #include "../webp/types.h" #include "../webp/decode.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -213,7 +213,7 @@ void VP8LBundleColorMap(const uint8_t* const row, int width, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/dsp/yuv.h b/src/dsp/yuv.h index 3ad434ee..dd778f9c 100644 --- a/src/dsp/yuv.h +++ b/src/dsp/yuv.h @@ -55,7 +55,7 @@ //------------------------------------------------------------------------------ // YUV -> RGB conversion -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -310,7 +310,7 @@ static WEBP_INLINE int VP8_RGB_TO_V(int r, int g, int b, int rounding) { #endif // USE_YUVj -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/enc/backward_references.h b/src/enc/backward_references.h index c89789bf..e1c75f04 100644 --- a/src/enc/backward_references.h +++ b/src/enc/backward_references.h @@ -18,7 +18,7 @@ #include "../webp/types.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -145,7 +145,7 @@ int VP8LCalculateEstimateForCacheSize(const uint32_t* const argb, int xsize, int ysize, int* const best_cache_bits); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } #endif diff --git a/src/enc/cost.h b/src/enc/cost.h index 7d7c2c79..3cbad1ae 100644 --- a/src/enc/cost.h +++ b/src/enc/cost.h @@ -16,7 +16,7 @@ #include "./vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -44,7 +44,7 @@ extern const uint16_t VP8FixedCostsI4[NUM_BMODES][NUM_BMODES][NUM_BMODES]; //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/enc/histogram.h b/src/enc/histogram.h index 583b5a4f..4d346a85 100644 --- a/src/enc/histogram.h +++ b/src/enc/histogram.h @@ -24,7 +24,7 @@ #include "../webp/format_constants.h" #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -94,7 +94,7 @@ int VP8LGetHistoImageSymbols(int xsize, int ysize, VP8LHistogramSet* const image_in, uint16_t* const histogram_symbols); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } #endif diff --git a/src/enc/vp8enci.h b/src/enc/vp8enci.h index be7b9a80..20d0af92 100644 --- a/src/enc/vp8enci.h +++ b/src/enc/vp8enci.h @@ -20,7 +20,7 @@ #include "../utils/bit_writer.h" #include "../utils/thread.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -563,7 +563,7 @@ int VP8FilterStrengthFromDelta(int sharpness, int delta); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/enc/vp8li.h b/src/enc/vp8li.h index 01f01f57..96d6faed 100644 --- a/src/enc/vp8li.h +++ b/src/enc/vp8li.h @@ -19,7 +19,7 @@ #include "../webp/encode.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -63,7 +63,7 @@ WebPEncodingError VP8LEncodeStream(const WebPConfig* const config, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/mux/muxi.h b/src/mux/muxi.h index 995e3f28..072fd061 100644 --- a/src/mux/muxi.h +++ b/src/mux/muxi.h @@ -19,7 +19,7 @@ #include "../dec/vp8li.h" #include "../webp/mux.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -223,7 +223,7 @@ WebPMuxError MuxValidate(const WebPMux* const mux); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/alpha_processing.h b/src/utils/alpha_processing.h index 5dcc097d..80e1ae45 100644 --- a/src/utils/alpha_processing.h +++ b/src/utils/alpha_processing.h @@ -16,7 +16,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -39,7 +39,7 @@ void WebPMultRows(uint8_t* ptr, int stride, const uint8_t* alpha, int alpha_stride, int width, int num_rows, int inverse); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/bit_reader.h b/src/utils/bit_reader.h index 52306393..98df98a7 100644 --- a/src/utils/bit_reader.h +++ b/src/utils/bit_reader.h @@ -21,7 +21,7 @@ #endif #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -327,7 +327,7 @@ static WEBP_INLINE void VP8LSetBitPos(VP8LBitReader* const br, int val) { // Advances the read buffer by 4 bytes to make room for reading next 32 bits. void VP8LFillBitWindow(VP8LBitReader* const br); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/bit_writer.h b/src/utils/bit_writer.h index cbb095c1..89a9ead4 100644 --- a/src/utils/bit_writer.h +++ b/src/utils/bit_writer.h @@ -16,7 +16,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -118,7 +118,7 @@ void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/color_cache.h b/src/utils/color_cache.h index e5a0bd6f..0f824ed4 100644 --- a/src/utils/color_cache.h +++ b/src/utils/color_cache.h @@ -17,7 +17,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -63,7 +63,7 @@ void VP8LColorCacheClear(VP8LColorCache* const color_cache); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } #endif diff --git a/src/utils/filters.h b/src/utils/filters.h index ae8ef85d..dde39cb5 100644 --- a/src/utils/filters.h +++ b/src/utils/filters.h @@ -16,7 +16,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -52,7 +52,7 @@ extern const WebPUnfilterFunc WebPUnfilters[WEBP_FILTER_LAST]; WEBP_FILTER_TYPE EstimateBestFilter(const uint8_t* data, int width, int height, int stride); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/huffman.h b/src/utils/huffman.h index f219c541..e8afd27f 100644 --- a/src/utils/huffman.h +++ b/src/utils/huffman.h @@ -17,7 +17,7 @@ #include #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -80,7 +80,7 @@ int HuffmanCodeLengthsToCodes(const int* const code_lengths, int code_lengths_size, int* const huff_codes); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/huffman_encode.h b/src/utils/huffman_encode.h index 0b81f470..ee51c68c 100644 --- a/src/utils/huffman_encode.h +++ b/src/utils/huffman_encode.h @@ -16,7 +16,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -42,7 +42,7 @@ int VP8LCreateCompressedHuffmanTree(const HuffmanTreeCode* const tree, int VP8LCreateHuffmanTree(int* const histogram, int tree_depth_limit, HuffmanTreeCode* const tree); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } #endif diff --git a/src/utils/quant_levels.h b/src/utils/quant_levels.h index 2d90828d..1cb5a32c 100644 --- a/src/utils/quant_levels.h +++ b/src/utils/quant_levels.h @@ -18,7 +18,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -29,7 +29,7 @@ extern "C" { int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels, uint64_t* const sse); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/quant_levels_dec.h b/src/utils/quant_levels_dec.h index a707224d..0288383a 100644 --- a/src/utils/quant_levels_dec.h +++ b/src/utils/quant_levels_dec.h @@ -16,7 +16,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -27,7 +27,7 @@ extern "C" { int DequantizeLevels(uint8_t* const data, int width, int height, int row, int num_rows); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/random.h b/src/utils/random.h index 32632d3d..08a83e96 100644 --- a/src/utils/random.h +++ b/src/utils/random.h @@ -17,7 +17,7 @@ #include #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -55,7 +55,7 @@ static WEBP_INLINE int VP8RandomBits(VP8Random* const rg, int num_bits) { return VP8RandomBits2(rg, num_bits, rg->amp_); } -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/rescaler.h b/src/utils/rescaler.h index a5b40d45..68e49cee 100644 --- a/src/utils/rescaler.h +++ b/src/utils/rescaler.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_RESCALER_H_ #define WEBP_UTILS_RESCALER_H_ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -77,7 +77,7 @@ int WebPRescalerExport(WebPRescaler* const rescaler); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/thread.h b/src/utils/thread.h index c2b92c9f..aef33bda 100644 --- a/src/utils/thread.h +++ b/src/utils/thread.h @@ -18,7 +18,7 @@ #include "config.h" #endif -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -90,7 +90,7 @@ void WebPWorkerEnd(WebPWorker* const worker); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/utils/utils.h b/src/utils/utils.h index e10aeeb9..8bdf0f03 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -19,7 +19,7 @@ #include "../webp/types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -76,7 +76,7 @@ static WEBP_INLINE void PutLE32(uint8_t* const data, uint32_t val) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/webp/decode.h b/src/webp/decode.h index ad5125ac..0c3b62e2 100644 --- a/src/webp/decode.h +++ b/src/webp/decode.h @@ -16,7 +16,7 @@ #include "./types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -484,7 +484,7 @@ WEBP_EXTERN(WebPIDecoder*) WebPIDecode(const uint8_t* data, size_t data_size, WEBP_EXTERN(VP8StatusCode) WebPDecode(const uint8_t* data, size_t data_size, WebPDecoderConfig* config); -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/webp/demux.h b/src/webp/demux.h index 09b5a7a8..2da3239d 100644 --- a/src/webp/demux.h +++ b/src/webp/demux.h @@ -50,7 +50,7 @@ #include "./mux_types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -217,7 +217,7 @@ WEBP_EXTERN(void) WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/webp/encode.h b/src/webp/encode.h index 0b8fe4c9..7a428b4e 100644 --- a/src/webp/encode.h +++ b/src/webp/encode.h @@ -16,7 +16,7 @@ #include "./types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -491,7 +491,7 @@ WEBP_EXTERN(int) WebPEncode(const WebPConfig* config, WebPPicture* picture); //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/webp/mux.h b/src/webp/mux.h index 37884d60..eb57f51c 100644 --- a/src/webp/mux.h +++ b/src/webp/mux.h @@ -51,7 +51,7 @@ #include "./mux_types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -370,7 +370,7 @@ WEBP_EXTERN(WebPMuxError) WebPMuxAssemble(WebPMux* mux, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif diff --git a/src/webp/mux_types.h b/src/webp/mux_types.h index 94d8806e..c94043a3 100644 --- a/src/webp/mux_types.h +++ b/src/webp/mux_types.h @@ -18,7 +18,7 @@ #include // memset() #include "./types.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -90,7 +90,7 @@ static WEBP_INLINE int WebPDataCopy(const WebPData* src, WebPData* dst) { return 1; } -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif