From f4d99210fa54181ad5471c1c4346e95b1610f46a Mon Sep 17 00:00:00 2001 From: Peter Szabo Date: Sun, 19 Jan 2014 20:17:05 +0100 Subject: [PATCH] made `#pragma interface' and `pragma implementation' conditional to avoid clang-3.4 warnings without -Wunknown-pragmas --- StdAfx.h | 2 ++ appliers.cpp | 2 ++ at_bitmap.h | 2 ++ cgif.c | 2 ++ cgif.h | 2 ++ crc32.c | 2 ++ crc32.h | 2 ++ encoder.cpp | 2 ++ encoder.hpp | 2 ++ error.cpp | 2 ++ error.hpp | 2 ++ gensi.cpp | 2 ++ gensi.hpp | 2 ++ gensio.cpp | 2 ++ gensio.hpp | 2 ++ helpere.hpp | 2 ++ image.cpp | 2 ++ image.hpp | 2 ++ in_bmp.cpp | 2 ++ in_gif.cpp | 2 ++ in_jai.cpp | 2 ++ in_jai.hpp | 2 ++ in_jpeg.cpp | 2 ++ in_lbm.cpp | 2 ++ in_png.cpp | 2 ++ in_pnm.cpp | 2 ++ in_ps.cpp | 2 ++ in_tga.cpp | 2 ++ in_tiff.cpp | 2 ++ in_xpm.cpp | 2 ++ input-bmp.ci | 2 ++ input-pnm.ci | 2 ++ input-tga.ci | 2 ++ jpegdump_main.cpp | 2 ++ main.hpp | 2 ++ mapping.cpp | 2 ++ mapping.hpp | 2 ++ minips.cpp | 2 ++ minips.hpp | 2 ++ pts_fax.c | 2 ++ pts_fax.h | 2 ++ pts_lzw.c | 2 ++ pts_lzw.h | 2 ++ rule.cpp | 2 ++ rule.hpp | 2 ++ snprintf.h | 2 ++ testfax_main.c | 2 ++ vcsam2p.h | 2 ++ 48 files changed, 96 insertions(+) diff --git a/StdAfx.h b/StdAfx.h index 7b8cbb5..ccb8d4a 100644 --- a/StdAfx.h +++ b/StdAfx.h @@ -7,7 +7,9 @@ #define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_ #if _MSC_VER > 1000 +#ifndef __clang__ #pragma once +#endif #endif // _MSC_VER > 1000 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers diff --git a/appliers.cpp b/appliers.cpp index 5e0248f..a8490ff 100644 --- a/appliers.cpp +++ b/appliers.cpp @@ -6,8 +6,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "rule.hpp" #include "error.hpp" diff --git a/at_bitmap.h b/at_bitmap.h index b3e6c56..40f8ce1 100644 --- a/at_bitmap.h +++ b/at_bitmap.h @@ -9,8 +9,10 @@ #define AT_BITMAP_H #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #define PTS_SAM2P 1 #define FATALP(m) Error::sev(Error::EERROR) << m << (Error*)0; diff --git a/cgif.c b/cgif.c index 3645149..c956745 100644 --- a/cgif.c +++ b/cgif.c @@ -30,8 +30,10 @@ THE SOFTWARE. */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif /**** pts: not an ANSI C function */ #undef EXTERN_C diff --git a/cgif.h b/cgif.h index 385a41e..0324ee3 100644 --- a/cgif.h +++ b/cgif.h @@ -40,8 +40,10 @@ THE SOFTWARE. #define CGIF_H #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #include "config2.h" /* PTS_const */ diff --git a/crc32.c b/crc32.c index 9ad826b..c321656 100644 --- a/crc32.c +++ b/crc32.c @@ -7,8 +7,10 @@ /* $Id: crc32.c,v 1.2 2002/12/11 14:01:52 pts Exp $ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #if OBJDEP # warning PROVIDES: crc32 #endif diff --git a/crc32.h b/crc32.h index 0059919..31ea43f 100644 --- a/crc32.h +++ b/crc32.h @@ -5,8 +5,10 @@ #define CRC32_H 1 #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #include "config2.h" diff --git a/encoder.cpp b/encoder.cpp index 7beeb69..0eb5005 100644 --- a/encoder.cpp +++ b/encoder.cpp @@ -9,8 +9,10 @@ /* Imp: add zlib */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "encoder.hpp" diff --git a/encoder.hpp b/encoder.hpp index d254846..6c66b7f 100644 --- a/encoder.hpp +++ b/encoder.hpp @@ -3,8 +3,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef ENCODER_HPP #define ENCODER_HPP 1 diff --git a/error.cpp b/error.cpp index 3f3dedf..1764c9e 100644 --- a/error.cpp +++ b/error.cpp @@ -5,8 +5,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "error.hpp" #include "gensio.hpp" diff --git a/error.hpp b/error.hpp index ddeedf3..e556ac5 100644 --- a/error.hpp +++ b/error.hpp @@ -3,8 +3,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef ERROR_HPP #define ERROR_HPP 1 diff --git a/gensi.cpp b/gensi.cpp index ddaa32f..e25b03d 100644 --- a/gensi.cpp +++ b/gensi.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "gensi.hpp" #include /* strlen() */ diff --git a/gensi.hpp b/gensi.hpp index 71dc1fa..d4751cb 100644 --- a/gensi.hpp +++ b/gensi.hpp @@ -4,8 +4,10 @@ /* Imp: get rid of gensio.o (Buffer::Writable::printf requires B...) */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef GENSI_HPP #define GENSI_HPP 1 diff --git a/gensio.cpp b/gensio.cpp index abb86a2..4d25b4b 100644 --- a/gensio.cpp +++ b/gensio.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #if 0 extern "C" int errno; diff --git a/gensio.hpp b/gensio.hpp index e9df7d5..915b6a0 100644 --- a/gensio.hpp +++ b/gensio.hpp @@ -3,8 +3,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef GENSIO_HPP #define GENSIO_HPP 1 diff --git a/helpere.hpp b/helpere.hpp index 7c63250..17c36c0 100644 --- a/helpere.hpp +++ b/helpere.hpp @@ -5,8 +5,10 @@ /* Don't use this here, because we don't have helpere.cpp #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif */ #ifndef HELPERE_HPP diff --git a/image.cpp b/image.cpp index ea26ab6..182d909 100644 --- a/image.cpp +++ b/image.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" #include "error.hpp" diff --git a/image.hpp b/image.hpp index 84012fb..381161e 100644 --- a/image.hpp +++ b/image.hpp @@ -5,8 +5,10 @@ /* Imp: keep future transparency in toIndexed(...) */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef SAMPLED_HPP #define SAMPLED_HPP 1 diff --git a/in_bmp.cpp b/in_bmp.cpp index 8784916..6a683b2 100644 --- a/in_bmp.cpp +++ b/in_bmp.cpp @@ -5,8 +5,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" #include "error.hpp" diff --git a/in_gif.cpp b/in_gif.cpp index fe9372d..1bc5399 100644 --- a/in_gif.cpp +++ b/in_gif.cpp @@ -12,8 +12,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #ifdef USE_GNU_SOURCE_INSTEAD_OF_POSIX_SOURCE #define _GNU_SOURCE 1 /* Implies _POSIX_C_SOURCE and _POSIX_C_SOURCE >= 2. */ diff --git a/in_jai.cpp b/in_jai.cpp index 634f065..94d5f0f 100644 --- a/in_jai.cpp +++ b/in_jai.cpp @@ -5,8 +5,10 @@ /* Imp: test this code with various JPEG files! */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" #include "error.hpp" diff --git a/in_jai.hpp b/in_jai.hpp index df5c875..4b35105 100644 --- a/in_jai.hpp +++ b/in_jai.hpp @@ -2,8 +2,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef IN_JAI_HPP #define IN_JAI_HPP 1 diff --git a/in_jpeg.cpp b/in_jpeg.cpp index 74df59b..cceedf6 100644 --- a/in_jpeg.cpp +++ b/in_jpeg.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" diff --git a/in_lbm.cpp b/in_lbm.cpp index f18e336..7433f42 100644 --- a/in_lbm.cpp +++ b/in_lbm.cpp @@ -10,8 +10,10 @@ /* Imp: get docs about the LBM format, and rewrite this from scratch */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" #include "error.hpp" diff --git a/in_png.cpp b/in_png.cpp index dc5f22e..57342ce 100644 --- a/in_png.cpp +++ b/in_png.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" diff --git a/in_pnm.cpp b/in_pnm.cpp index 4c5181a..dedf676 100644 --- a/in_pnm.cpp +++ b/in_pnm.cpp @@ -5,8 +5,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" #include "error.hpp" diff --git a/in_ps.cpp b/in_ps.cpp index ef6bfe4..da2ce1e 100644 --- a/in_ps.cpp +++ b/in_ps.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" diff --git a/in_tga.cpp b/in_tga.cpp index d164ef2..48da9e6 100644 --- a/in_tga.cpp +++ b/in_tga.cpp @@ -5,8 +5,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" #include "error.hpp" diff --git a/in_tiff.cpp b/in_tiff.cpp index a3e68d4..313207b 100644 --- a/in_tiff.cpp +++ b/in_tiff.cpp @@ -6,8 +6,10 @@ /* Imp: use xviff.c */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" diff --git a/in_xpm.cpp b/in_xpm.cpp index dce69bf..6e6a490 100644 --- a/in_xpm.cpp +++ b/in_xpm.cpp @@ -5,8 +5,10 @@ /* Imp: test this code with various xpm files! */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "image.hpp" diff --git a/input-bmp.ci b/input-bmp.ci index 9834f05..4a4d843 100644 --- a/input-bmp.ci +++ b/input-bmp.ci @@ -3,8 +3,10 @@ /* input-bmp.ci: reads any bitmap I could get for testing */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include #include diff --git a/input-pnm.ci b/input-pnm.ci index 2a54a71..0890a3d 100644 --- a/input-pnm.ci +++ b/input-pnm.ci @@ -7,8 +7,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif /* #include "types.h" */ #include "at_bitmap.h" diff --git a/input-tga.ci b/input-tga.ci index 3ff1561..e785cc5 100644 --- a/input-tga.ci +++ b/input-tga.ci @@ -3,8 +3,10 @@ /* input-tga.ci reads tga files */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include #include diff --git a/jpegdump_main.cpp b/jpegdump_main.cpp index 17098eb..a662d83 100644 --- a/jpegdump_main.cpp +++ b/jpegdump_main.cpp @@ -10,8 +10,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "config2.h" #include diff --git a/main.hpp b/main.hpp index c940dda..fdb47f3 100644 --- a/main.hpp +++ b/main.hpp @@ -3,8 +3,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef MAIN_HPP #define MAIN_HPP 1 diff --git a/mapping.cpp b/mapping.cpp index da3f954..c3f325a 100644 --- a/mapping.cpp +++ b/mapping.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "mapping.hpp" #include "error.hpp" diff --git a/mapping.hpp b/mapping.hpp index 18f6df1..e7c798b 100644 --- a/mapping.hpp +++ b/mapping.hpp @@ -3,8 +3,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef MAPPING_HPP #define MAPPING_HPP 1 diff --git a/minips.cpp b/minips.cpp index 1856c11..36f8fc6 100644 --- a/minips.cpp +++ b/minips.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "minips.hpp" #include "error.hpp" diff --git a/minips.hpp b/minips.hpp index 76a8a92..1583346 100644 --- a/minips.hpp +++ b/minips.hpp @@ -3,8 +3,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef MINIPS_HPP #define MINIPS_HPP 1 diff --git a/pts_fax.c b/pts_fax.c index 39a1f68..8dce9ed 100644 --- a/pts_fax.c +++ b/pts_fax.c @@ -38,8 +38,10 @@ Free Software Foundation, Inc., 59 Temple Place Suite 330, Boston, MA /* #define cxxintern extern */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif /* misc_types.h by pts@fazekas.hu at Sat Jul 6 19:20:17 CEST 2002 */ #ifndef MISC_TYPES_H diff --git a/pts_fax.h b/pts_fax.h index fcf17fc..dd4ee05 100644 --- a/pts_fax.h +++ b/pts_fax.h @@ -33,8 +33,10 @@ Free Software Foundation, Inc., 59 Temple Place Suite 330, Boston, MA # define PTS_FAX_H 1 #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif /* #include "scommon.h" */ /*$Id: pts_fax.h,v 1.4 2005/07/20 21:15:08 pts Exp $ */ diff --git a/pts_lzw.c b/pts_lzw.c index 43142ef..7fff517 100644 --- a/pts_lzw.c +++ b/pts_lzw.c @@ -46,8 +46,10 @@ exit */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #if _MSC_VER > 1000 # undef __PROTOTYPES__ diff --git a/pts_lzw.h b/pts_lzw.h index 499ebdb..4e132b4 100644 --- a/pts_lzw.h +++ b/pts_lzw.h @@ -7,8 +7,10 @@ #define PTS_LZW_H 1 #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #include "config2.h" /* PTS_const */ diff --git a/rule.cpp b/rule.cpp index 8482c16..ca39832 100644 --- a/rule.cpp +++ b/rule.cpp @@ -4,8 +4,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #include "rule.hpp" #include "error.hpp" diff --git a/rule.hpp b/rule.hpp index 0cc5427..7dcf3cd 100644 --- a/rule.hpp +++ b/rule.hpp @@ -3,8 +3,10 @@ */ #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #ifndef RULE_HPP #define RULE_HPP 1 diff --git a/snprintf.h b/snprintf.h index 9e3e12a..7713c31 100644 --- a/snprintf.h +++ b/snprintf.h @@ -6,8 +6,10 @@ #define SNPRINTF_H 1 #ifdef __GNUC__ +#ifndef __clang__ #pragma interface #endif +#endif #include "config2.h" #include /* ... */ diff --git a/testfax_main.c b/testfax_main.c index cb1adce..e519379 100644 --- a/testfax_main.c +++ b/testfax_main.c @@ -14,8 +14,10 @@ #include #ifdef __GNUC__ +#ifndef __clang__ #pragma implementation #endif +#endif #if OBJDEP # warning PROVIDES: testfax_main diff --git a/vcsam2p.h b/vcsam2p.h index e1c2903..f5404b4 100644 --- a/vcsam2p.h +++ b/vcsam2p.h @@ -3,7 +3,9 @@ #define AFX_VCSAM2P_H__26C24785_06B6_11D7_846E_0004E2009304__INCLUDED_ #if _MSC_VER > 1000 +#ifndef __clang__ #pragma once +#endif #endif // _MSC_VER > 1000 #include "resource.h"