diff options
author | doccvs <doccvs@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-06 07:37:17 +0000 |
---|---|---|
committer | doccvs <doccvs@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-06 07:37:17 +0000 |
commit | 5f82b5208617ab7e935f0b1ca6027478d285f696 (patch) | |
tree | 4cd136faefe30ad597d91e691d102e89d5fcba0a | |
parent | 8b4ec6a773a305046f784c588bdabc5ff9d66ca9 (diff) | |
download | ATCD-5f82b5208617ab7e935f0b1ca6027478d285f696.tar.gz |
ChangeLogTag:Thu Sep 6 02:30:14 2001 Christopher Kohlhoff <chris@kohlhoff.com>
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 10 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 10 | ||||
-rw-r--r-- | examples/Export/Makefile.bor | 3 | ||||
-rw-r--r-- | examples/Export/dll.h | 20 | ||||
-rw-r--r-- | examples/Export/export_dll.bor | 11 | ||||
-rw-r--r-- | examples/Export/test.bor | 11 |
7 files changed, 71 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index d0d12af802a..bcf5f00d38d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Thu Sep 6 02:30:14 2001 Christopher Kohlhoff <chris@kohlhoff.com> + + * examples/Export/Makefile.bor: + * examples/Export/export_dll.bor: + * examples/Export/test.bor: + * examples/Export/dll.h: + Added makefiles for this example and fixed a template problem with + Borland C++. Thanks to Charles Frasch <cfrasch@spawar.navy.mil> for + contributing this. + Wed Sep 5 19:48:34 2001 Priyanka Gontla <pgontla@ece.uci.edu> * ace/SOCK_Dgram.cpp (set_nic): diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index d0d12af802a..bcf5f00d38d 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,13 @@ +Thu Sep 6 02:30:14 2001 Christopher Kohlhoff <chris@kohlhoff.com> + + * examples/Export/Makefile.bor: + * examples/Export/export_dll.bor: + * examples/Export/test.bor: + * examples/Export/dll.h: + Added makefiles for this example and fixed a template problem with + Borland C++. Thanks to Charles Frasch <cfrasch@spawar.navy.mil> for + contributing this. + Wed Sep 5 19:48:34 2001 Priyanka Gontla <pgontla@ece.uci.edu> * ace/SOCK_Dgram.cpp (set_nic): diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index d0d12af802a..bcf5f00d38d 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,13 @@ +Thu Sep 6 02:30:14 2001 Christopher Kohlhoff <chris@kohlhoff.com> + + * examples/Export/Makefile.bor: + * examples/Export/export_dll.bor: + * examples/Export/test.bor: + * examples/Export/dll.h: + Added makefiles for this example and fixed a template problem with + Borland C++. Thanks to Charles Frasch <cfrasch@spawar.navy.mil> for + contributing this. + Wed Sep 5 19:48:34 2001 Priyanka Gontla <pgontla@ece.uci.edu> * ace/SOCK_Dgram.cpp (set_nic): diff --git a/examples/Export/Makefile.bor b/examples/Export/Makefile.bor new file mode 100644 index 00000000000..1b12952063b --- /dev/null +++ b/examples/Export/Makefile.bor @@ -0,0 +1,3 @@ +MAKEFILES = export_dll.bor test.bor + +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> diff --git a/examples/Export/dll.h b/examples/Export/dll.h index cf22efe0eb9..c10ecba521a 100644 --- a/examples/Export/dll.h +++ b/examples/Export/dll.h @@ -35,20 +35,32 @@ public: // the singleton will be used (which defeats the purpose of a Singleton). // // This occurs because the ACE_Singleton template is expanded in both -// places because Visual C++ does this automatically by including -// the template source. This in turn creates two copies of the static -// member variable. +// places because Visual C++ and Borland C++ do this automatically by +// including the template source. This in turn creates two copies of +// the static member variable. // // So to get around this problem, the *_SINGLETON_DECLARE macro is // used to instruct the compiler to not create the second copy in the -// program. +// program. This macro solution does not work for Borland C++, so for +// this compiler you must explicitly disable the template instantiation +// using a #pragma (or use the other workaround below). // // Another workaround for this is to not to expose the Singleton itself // to the outside world, but to instead supply a function or static // member function that returns the singleton to the executable // (like get_dll_singleton () does below). +#if defined (__BORLANDC__) +# if !defined (TEST_BUILD_DLL) +# pragma option push -Jgx +# endif +#endif typedef ACE_Singleton<test_class, ACE_Null_Mutex> TEST_SINGLETON; TEST_SINGLETON_DECLARE (ACE_Singleton, test_class, ACE_Null_Mutex); +#if defined (__BORLANDC__) +# if !defined (TEST_BUILD_DLL) +# pragma option pop +# endif +#endif Test_Export test_class *get_dll_singleton (); diff --git a/examples/Export/export_dll.bor b/examples/Export/export_dll.bor new file mode 100644 index 00000000000..019a14d69e0 --- /dev/null +++ b/examples/Export/export_dll.bor @@ -0,0 +1,11 @@ +NAME = export_dll + +OBJFILES = $(OBJDIR)\dll.obj + +CFLAGS = $(ACE_CFLAGS) -DTEST_BUILD_DLL + +CPPDIR = . + +LIBFILES = $(ACE_LIB) + +!include <$(ACE_ROOT)\include\makeinclude\build_dll.bor> diff --git a/examples/Export/test.bor b/examples/Export/test.bor new file mode 100644 index 00000000000..e4964c73779 --- /dev/null +++ b/examples/Export/test.bor @@ -0,0 +1,11 @@ +NAME = test + +OBJFILES = $(OBJDIR)\$(NAME).obj + +CFLAGS = $(ACE_CFLAGS) + +CPPDIR = . + +LIBFILES = $(ACE_LIB) $(CORE_BINDIR)\export_dll$(LIB_DECORATOR).lib + +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> |