summaryrefslogtreecommitdiff
path: root/examples/Export
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-10 19:59:37 +0000
commit3df4acfa816441fc28a95dee6d0191a927145d95 (patch)
treeb5ae7ca44662cfd8e5c95f1826e4406021a606f5 /examples/Export
parent60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff)
downloadATCD-pre-subset.tar.gz
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'examples/Export')
-rw-r--r--examples/Export/Makefile.bor3
-rw-r--r--examples/Export/README7
-rw-r--r--examples/Export/dll.cpp21
-rw-r--r--examples/Export/dll.h66
-rw-r--r--examples/Export/export_dll.bor11
-rw-r--r--examples/Export/export_dll.dsp117
-rw-r--r--examples/Export/export_test.dsw44
-rwxr-xr-xexamples/Export/run_test.pl17
-rw-r--r--examples/Export/test.bor11
-rw-r--r--examples/Export/test.cpp64
-rw-r--r--examples/Export/test.dsp104
-rw-r--r--examples/Export/test_export.h40
12 files changed, 0 insertions, 505 deletions
diff --git a/examples/Export/Makefile.bor b/examples/Export/Makefile.bor
deleted file mode 100644
index 1b12952063b..00000000000
--- a/examples/Export/Makefile.bor
+++ /dev/null
@@ -1,3 +0,0 @@
-MAKEFILES = export_dll.bor test.bor
-
-!include <$(ACE_ROOT)\include\makeinclude\recurse.bor>
diff --git a/examples/Export/README b/examples/Export/README
deleted file mode 100644
index 83fc3108d50..00000000000
--- a/examples/Export/README
+++ /dev/null
@@ -1,7 +0,0 @@
-$Id$
-
-The Export example is just an example that both shows off and tests
-the macros created by generate_export_file.pl (or the earlier
-GenExportH.bat). These macros are used to properly export functions
-and classes from a Win32 DLL. On other platforms these macros expand
-to nothing (since shared objects just export everything).
diff --git a/examples/Export/dll.cpp b/examples/Export/dll.cpp
deleted file mode 100644
index bef2877c058..00000000000
--- a/examples/Export/dll.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-#include "dll.h"
-
-int
-test_function ()
-{
- test_variable = RETVAL;
- return RETVAL;
-}
-
-int
-test_class::method ()
-{
- return RETVAL;
-}
-
-test_class *
-get_dll_singleton ()
-{
- return TEST_SINGLETON::instance ();
-}
diff --git a/examples/Export/dll.h b/examples/Export/dll.h
deleted file mode 100644
index c10ecba521a..00000000000
--- a/examples/Export/dll.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id$
-
-// To use the export macros with a DLL, a file will need to be
-// created (see ACE_wrapper/bin/generate_export_file.pl) and
-// included. This file defines Test_Export (and the
-// TEST_SINGLETON_* macros).
-#include "test_export.h"
-
-#include "ace/Singleton.h"
-
-#define RETVAL 42
-
-// To expose a function outside of a DLL, use the *_Export
-// at the beginning of the function declaration.
-
-Test_Export int test_function ();
-
-// To expose data, put use the *Export at the beginning
-// of the variable declaration.
-
-Test_Export int test_variable;
-
-// To expose a class, put the *_Export between "class"
-// and the class name.
-
-class Test_Export test_class
-{
-public:
- int method ();
-};
-
-// ACE_Singleton and its relatives are special cases. The problem is
-// that ACE_Singleton is a template. If the singleton is used in both
-// the DLL and the executable linking the DLL, then two instances of
-// 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++ 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. 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
deleted file mode 100644
index 019a14d69e0..00000000000
--- a/examples/Export/export_dll.bor
+++ /dev/null
@@ -1,11 +0,0 @@
-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/export_dll.dsp b/examples/Export/export_dll.dsp
deleted file mode 100644
index 783adffb699..00000000000
--- a/examples/Export/export_dll.dsp
+++ /dev/null
@@ -1,117 +0,0 @@
-# Microsoft Developer Studio Project File - Name="export_dll" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=export_dll - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "export_dll.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "export_dll.mak" CFG="export_dll - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "export_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "export_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "export_dll - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPORT_DLL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "TEST_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 ace.lib /nologo /dll /machine:I386 /libpath:"../../ace/"
-
-!ELSEIF "$(CFG)" == "export_dll - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPORT_DLL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "TEST_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib /nologo /dll /debug /machine:I386 /out:"export_dlld.dll" /pdbtype:sept /libpath:"../../ace/"
-
-!ENDIF
-
-# Begin Target
-
-# Name "export_dll - Win32 Release"
-# Name "export_dll - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\dll.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\dll.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_export.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/Export/export_test.dsw b/examples/Export/export_test.dsw
deleted file mode 100644
index f46f6efeba6..00000000000
--- a/examples/Export/export_test.dsw
+++ /dev/null
@@ -1,44 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "export_dll"=.\export_dll.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "test"=.\test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name export_dll
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/Export/run_test.pl b/examples/Export/run_test.pl
deleted file mode 100755
index 7c84078d8ff..00000000000
--- a/examples/Export/run_test.pl
+++ /dev/null
@@ -1,17 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
-
-# $Id$
-# -*- perl -*-
-
-use lib "../../bin";
-use PerlACE::Run_Test;
-
-$TEST = new PerlACE::Process ("test");
-
-$status = $TEST->SpawnWaitKill (20);
-
-$status = 1 if ($status < 0);
-
-exit $status;
diff --git a/examples/Export/test.bor b/examples/Export/test.bor
deleted file mode 100644
index e4964c73779..00000000000
--- a/examples/Export/test.bor
+++ /dev/null
@@ -1,11 +0,0 @@
-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>
diff --git a/examples/Export/test.cpp b/examples/Export/test.cpp
deleted file mode 100644
index 69fe20158bf..00000000000
--- a/examples/Export/test.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id$
-
-#include "dll.h"
-#include <iostream>
-
-int
-main (int, char *[])
-{
- int failure_count = 0;
- test_class my_test_class;
-
- // Tet out the export of a class. I don't see
- // How this can fail at runtime (rather it would
- // probably give link errors), but just in case...
-
- std::cout << "Method Test: ";
- if (my_test_class.method () != RETVAL)
- {
- std::cout << "Failed" << std::endl;
- ++failure_count;
- }
- else
- std::cout << "Succeeded" << std::endl;
-
- // Test out the export of a function. Like above,
- // I don't know how this can fail at runtime.
-
- std::cout << "Function Test: ";
- if (test_function () != RETVAL)
- {
- std::cout << "Failed" << std::endl;
- ++failure_count;
- }
- else
- std::cout << "Succeeded" << std::endl;
-
- // Also test out the export of data.
-
- std::cout << "Variable Test: ";
- if (test_variable != RETVAL)
- {
- std::cout << "Failed" << std::endl;
- ++failure_count;
- }
- else
- std::cout << "Succeeded" << std::endl;
-
-
- // Test out the ACE_Singleton export by checking to see
- // that we have the same instance pointer as the DLL does.
- // This can fail at runtime.
-
- std::cout << "Singleton Test: ";
- if (TEST_SINGLETON::instance () != get_dll_singleton ())
- {
- std::cout << "Failed" << std::endl;
- ++failure_count;
- }
- else
- std::cout << "Succeeded" << std::endl;
-
- // Return the number of failures
- return failure_count;
-}
diff --git a/examples/Export/test.dsp b/examples/Export/test.dsp
deleted file mode 100644
index ff0eb76a4ce..00000000000
--- a/examples/Export/test.dsp
+++ /dev/null
@@ -1,104 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test.mak" CFG="test - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 export_dll.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"../../ace/"
-
-!ELSEIF "$(CFG)" == "test - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test___Win32_Debug"
-# PROP BASE Intermediate_Dir "test___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 export_dlld.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../ace/"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test - Win32 Release"
-# Name "test - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\test.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/Export/test_export.h b/examples/Export/test_export.h
deleted file mode 100644
index 31a5150926e..00000000000
--- a/examples/Export/test_export.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by
-// generate_export_file.pl
-// ------------------------------
-#if !defined (TEST_EXPORT_H)
-#define TEST_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if !defined (TEST_HAS_DLL)
-#define TEST_HAS_DLL 1
-#endif /* ! TEST_HAS_DLL */
-
-#if defined (TEST_HAS_DLL)
-# if (TEST_HAS_DLL == 1)
-# if defined (TEST_BUILD_DLL)
-# define Test_Export ACE_Proper_Export_Flag
-# define TEST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else
-# define Test_Export ACE_Proper_Import_Flag
-# define TEST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* TEST_BUILD_DLL */
-# else
-# define Test_Export
-# define TEST_SINGLETON_DECLARATION(T)
-# define TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* ! TEST_HAS_DLL == 1 */
-#else
-# define Test_Export
-# define TEST_SINGLETON_DECLARATION(T)
-# define TEST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* TEST_HAS_DLL */
-
-#endif /* TEST_EXPORT_H */
-
-// End of auto generated file.