From 788233da909b0f6bc684a99200c614e3dee2aa20 Mon Sep 17 00:00:00 2001
From: Gilles Depeyrot <gilles_depeyrot@mac.com>
Date: Sat, 31 Aug 2002 22:31:03 +0000
Subject: [PATCH] disable use of #pragma interface under Mac OS X GNU compiler
 included with Mac OS X 10.2 (Jaguar) as well as August Developer Tools update
 contain a bug concerning #pragma interface handling that can only be worked
 around by not using them (and they are not necessary anyways)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 samples/artprov/artbrows.h         | 2 +-
 samples/calendar/calendar.cpp      | 3 ++-
 samples/drawing/drawing.cpp        | 2 +-
 samples/dynamic/dynamic.cpp        | 2 +-
 samples/erase/erase.cpp            | 2 +-
 samples/event/event.cpp            | 2 +-
 samples/exec/exec.cpp              | 3 ++-
 samples/html/about/about.cpp       | 2 +-
 samples/html/help/help.cpp         | 3 +--
 samples/html/helpview/helpview.cpp | 2 +-
 samples/html/test/test.cpp         | 2 +-
 samples/html/virtual/virtual.cpp   | 2 +-
 samples/html/widget/widget.cpp     | 2 +-
 samples/html/zip/zip.cpp           | 2 +-
 samples/internat/internat.cpp      | 2 +-
 samples/opengl/cube/cube.cpp       | 2 +-
 samples/png/pngdemo.h              | 2 +-
 samples/printing/printing.h        | 2 +-
 samples/proplist/proplist.h        | 2 +-
 samples/propsize/propsize.cpp      | 2 +-
 samples/sockets/client.cpp         | 2 +-
 samples/sockets/server.cpp         | 2 +-
 samples/statbar/statbar.cpp        | 1 +
 samples/taskbar/tbtest.cpp         | 4 ++--
 samples/typetest/typetest.h        | 2 +-
 samples/wizard/wizard.cpp          | 2 +-
 26 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/samples/artprov/artbrows.h b/samples/artprov/artbrows.h
index 2494a6ea34..40bca1ec81 100644
--- a/samples/artprov/artbrows.h
+++ b/samples/artprov/artbrows.h
@@ -12,7 +12,7 @@
 #ifndef __ARTBROWS_H__
 #define __ARTBROWS_H__
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma interface "artbrows.h"
 #endif
 
diff --git a/samples/calendar/calendar.cpp b/samples/calendar/calendar.cpp
index b16e1b0c90..1d66e39253 100644
--- a/samples/calendar/calendar.cpp
+++ b/samples/calendar/calendar.cpp
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "calendar.cpp"
     #pragma interface "calendar.cpp"
 #endif
@@ -32,6 +32,7 @@
 // for all others, include the necessary headers
 #ifndef WX_PRECOMP
     #include "wx/app.h"
+    #include "wx/log.h"
     #include "wx/frame.h"
     #include "wx/panel.h"
     #include "wx/stattext.h"
diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp
index c3c0b3796a..9059c501b3 100644
--- a/samples/drawing/drawing.cpp
+++ b/samples/drawing/drawing.cpp
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "drawing.cpp"
     #pragma interface "drawing.cpp"
 #endif
diff --git a/samples/dynamic/dynamic.cpp b/samples/dynamic/dynamic.cpp
index 6eaf7eb148..308b391f82 100644
--- a/samples/dynamic/dynamic.cpp
+++ b/samples/dynamic/dynamic.cpp
@@ -9,7 +9,7 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma implementation "dynamic.cpp"
 #pragma interface "dynamic.cpp"
 #endif
diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp
index 8a708f79ed..1eeba32d3a 100644
--- a/samples/erase/erase.cpp
+++ b/samples/erase/erase.cpp
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "erase.cpp"
     #pragma interface "erase.cpp"
 #endif
diff --git a/samples/event/event.cpp b/samples/event/event.cpp
index 380cdd17bd..beeaad030d 100644
--- a/samples/event/event.cpp
+++ b/samples/event/event.cpp
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     // DO NOT use event.cpp here, it breaks statics initialization in
     // src/common/event.cpp and nothing works at all then!
     #pragma implementation "eventsample.cpp"
diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp
index 43858fa326..30bed13776 100644
--- a/samples/exec/exec.cpp
+++ b/samples/exec/exec.cpp
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "exec.cpp"
     #pragma interface "exec.cpp"
 #endif
@@ -33,6 +33,7 @@
 // need because it includes almost all "standard" wxWindows headers
 #ifndef WX_PRECOMP
     #include "wx/app.h"
+    #include "wx/log.h"
     #include "wx/frame.h"
     #include "wx/panel.h"
 
diff --git a/samples/html/about/about.cpp b/samples/html/about/about.cpp
index 7b6aec192e..67b2bc0153 100644
--- a/samples/html/about/about.cpp
+++ b/samples/html/about/about.cpp
@@ -3,7 +3,7 @@
 // Purpose:     wxHtml testing example
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "test.cpp"
     #pragma interface "test.cpp"
 #endif
diff --git a/samples/html/help/help.cpp b/samples/html/help/help.cpp
index 1c344c68f8..fb4609a90e 100644
--- a/samples/html/help/help.cpp
+++ b/samples/html/help/help.cpp
@@ -1,10 +1,9 @@
-
 /////////////////////////////////////////////////////////////////////////////
 // Name:        test.cpp
 // Purpose:     wxHtml testing example
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "help.cpp"
     #pragma interface "help.cpp"
 #endif
diff --git a/samples/html/helpview/helpview.cpp b/samples/html/helpview/helpview.cpp
index 71914be05a..1b07b46823 100644
--- a/samples/html/helpview/helpview.cpp
+++ b/samples/html/helpview/helpview.cpp
@@ -6,7 +6,7 @@
 // standalone help browser.
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma implementation "help.cpp"
 #pragma interface "help.cpp"
 #endif
diff --git a/samples/html/test/test.cpp b/samples/html/test/test.cpp
index 4519cfe898..9d1f1d98d9 100644
--- a/samples/html/test/test.cpp
+++ b/samples/html/test/test.cpp
@@ -3,7 +3,7 @@
 // Purpose:     wxHtml testing example
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "test.cpp"
     #pragma interface "test.cpp"
 #endif
diff --git a/samples/html/virtual/virtual.cpp b/samples/html/virtual/virtual.cpp
index 86e9fcb9b4..f21e4d5b0f 100644
--- a/samples/html/virtual/virtual.cpp
+++ b/samples/html/virtual/virtual.cpp
@@ -4,7 +4,7 @@
 //              demonstrates virtual file systems feature
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "test.cpp"
     #pragma interface "test.cpp"
 #endif
diff --git a/samples/html/widget/widget.cpp b/samples/html/widget/widget.cpp
index 1c8db4fa06..d0849a04ce 100644
--- a/samples/html/widget/widget.cpp
+++ b/samples/html/widget/widget.cpp
@@ -4,7 +4,7 @@
 //              demonstrates virtual file systems feature
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "test.cpp"
     #pragma interface "test.cpp"
 #endif
diff --git a/samples/html/zip/zip.cpp b/samples/html/zip/zip.cpp
index 8152667459..3eb2d0daa4 100644
--- a/samples/html/zip/zip.cpp
+++ b/samples/html/zip/zip.cpp
@@ -3,7 +3,7 @@
 // Purpose:     wxHtml testing example
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "test.cpp"
     #pragma interface "test.cpp"
 #endif
diff --git a/samples/internat/internat.cpp b/samples/internat/internat.cpp
index c7fc1feb08..d009e1cbf8 100644
--- a/samples/internat/internat.cpp
+++ b/samples/internat/internat.cpp
@@ -9,7 +9,7 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma implementation
 #pragma interface
 #endif
diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp
index 02bf45444a..2172b9472c 100644
--- a/samples/opengl/cube/cube.cpp
+++ b/samples/opengl/cube/cube.cpp
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma implementation
 #pragma interface
 #endif
diff --git a/samples/png/pngdemo.h b/samples/png/pngdemo.h
index c664e1a145..5653a14074 100644
--- a/samples/png/pngdemo.h
+++ b/samples/png/pngdemo.h
@@ -9,7 +9,7 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined( __GNUG__) && !defined(__APPLE__)
 #pragma interface
 #endif
 
diff --git a/samples/printing/printing.h b/samples/printing/printing.h
index 13933bb91f..927676794c 100644
--- a/samples/printing/printing.h
+++ b/samples/printing/printing.h
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma interface
 #endif
 
diff --git a/samples/proplist/proplist.h b/samples/proplist/proplist.h
index eb50e3f815..a277b1c85f 100644
--- a/samples/proplist/proplist.h
+++ b/samples/proplist/proplist.h
@@ -9,7 +9,7 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma interface "proplist_sample.h"
 #endif
 
diff --git a/samples/propsize/propsize.cpp b/samples/propsize/propsize.cpp
index af785b369d..d17a0e57f5 100644
--- a/samples/propsize/propsize.cpp
+++ b/samples/propsize/propsize.cpp
@@ -16,7 +16,7 @@
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "propsize.cpp"
     #pragma interface "propsize.cpp"
 #endif
diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp
index f621bf370e..94e010410e 100644
--- a/samples/sockets/client.cpp
+++ b/samples/sockets/client.cpp
@@ -17,7 +17,7 @@
 // headers
 // --------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #  pragma implementation "client.cpp"
 #  pragma interface "client.cpp"
 #endif
diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp
index b3ddb96def..ac8a2dd3f0 100644
--- a/samples/sockets/server.cpp
+++ b/samples/sockets/server.cpp
@@ -17,7 +17,7 @@
 // headers
 // --------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #  pragma implementation "server.cpp"
 #  pragma interface "server.cpp"
 #endif
diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp
index 2b9924d343..9c1cbcd7c9 100644
--- a/samples/statbar/statbar.cpp
+++ b/samples/statbar/statbar.cpp
@@ -31,6 +31,7 @@
 // for all others, include the necessary headers
 #ifndef WX_PRECOMP
     #include "wx/app.h"
+    #include "wx/log.h"
     #include "wx/frame.h"
     #include "wx/statusbr.h"
     #include "wx/timer.h"
diff --git a/samples/taskbar/tbtest.cpp b/samples/taskbar/tbtest.cpp
index eab3c3f1ab..8e868f2a82 100644
--- a/samples/taskbar/tbtest.cpp
+++ b/samples/taskbar/tbtest.cpp
@@ -17,10 +17,10 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include <wx/wx.h>
+#include "wx/wx.h"
 #endif
 
-#include <wx/msw/taskbar.h>
+#include "wx/msw/taskbar.h"
 #include "tbtest.h"
 
 // Declare two frames
diff --git a/samples/typetest/typetest.h b/samples/typetest/typetest.h
index 2c60f54424..0b1ca03b17 100644
--- a/samples/typetest/typetest.h
+++ b/samples/typetest/typetest.h
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma interface "typetest.h"
 #endif
 
diff --git a/samples/wizard/wizard.cpp b/samples/wizard/wizard.cpp
index 50e1a1ce22..85c99f9d60 100644
--- a/samples/wizard/wizard.cpp
+++ b/samples/wizard/wizard.cpp
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
     #pragma implementation "wizard.cpp"
     #pragma interface "wizard.cpp"
 #endif
-- 
2.47.2