diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-14 14:48:49 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-14 14:48:49 +0000 |
commit | 57ea31cf4092dd2980746d5caf25f51a76107570 (patch) | |
tree | fa319160f319a03d8d2c87177dd910c2793904ca | |
parent | 70f1ba65174b2f952496d6b131cf8203eb7dfc4b (diff) | |
download | ATCD-57ea31cf4092dd2980746d5caf25f51a76107570.tar.gz |
Updated to use MSVC 5 features and the ability to use Standard C++
libraries.
-rw-r--r-- | ace/IOStream.cpp | 4 | ||||
-rw-r--r-- | ace/IOStream.h | 4 | ||||
-rw-r--r-- | ace/IOStream_T.h | 2 | ||||
-rw-r--r-- | ace/Log_Msg.cpp | 4 | ||||
-rw-r--r-- | ace/Log_Msg.h | 6 | ||||
-rw-r--r-- | ace/Log_Record.cpp | 4 | ||||
-rw-r--r-- | ace/Log_Record.h | 6 | ||||
-rw-r--r-- | ace/OS.h | 17 | ||||
-rw-r--r-- | ace/README | 1 | ||||
-rw-r--r-- | ace/Registry.h | 25 | ||||
-rw-r--r-- | ace/ace.dsp | 295 | ||||
-rw-r--r-- | ace/config-win32-common.h | 104 | ||||
-rw-r--r-- | ace/config-win32.h | 27 | ||||
-rw-r--r-- | ace/stdcpp.h | 100 | ||||
-rw-r--r-- | tests/Hash_Map_Manager_Test.cpp | 2 | ||||
-rw-r--r-- | tests/test_config.h | 3 |
16 files changed, 376 insertions, 228 deletions
diff --git a/ace/IOStream.cpp b/ace/IOStream.cpp index e45ff844d68..91f2b69e127 100644 --- a/ace/IOStream.cpp +++ b/ace/IOStream.cpp @@ -4,11 +4,11 @@ #if !defined (ACE_IOSTREAM_C) #define ACE_IOSTREAM_C -#if !defined (ACE_LACKS_ACE_IOSTREAM) - #define ACE_BUILD_DLL #include "ace/IOStream.h" +#if !defined (ACE_LACKS_ACE_IOSTREAM) + /////////////////////////////////////////////////////////////////////////// /* Here's a simple example of how iostream's non-virtual operators can diff --git a/ace/IOStream.h b/ace/IOStream.h index 8f61252e4cf..e987367b8f4 100644 --- a/ace/IOStream.h +++ b/ace/IOStream.h @@ -24,9 +24,7 @@ #include "ace/INET_Addr.h" #include "ace/Handle_Set.h" -#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) -# include /**/ <iostream.h> -#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ +#include "ace/stdcpp.h" #if defined (ACE_HAS_STRING_CLASS) #if defined (ACE_WIN32) diff --git a/ace/IOStream_T.h b/ace/IOStream_T.h index 0510c671946..15bbe4a31bc 100644 --- a/ace/IOStream_T.h +++ b/ace/IOStream_T.h @@ -23,7 +23,7 @@ #define ACE_IOSTREAM_T_H #include "ace/IOStream.h" -#include <iomanip.h> +#include "ace/stdcpp.h" // for iomanip[.h] #if defined (ACE_HAS_STRING_CLASS) template <class STREAM> STREAM & operator>> (STREAM &stream, ACE_Quoted_String &str); diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 1c5dc42d717..ab253638653 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -2,6 +2,7 @@ // $Id$ #define ACE_BUILD_DLL + // We need this to get the status of ACE_NTRACE... #include "ace/config.h" @@ -43,7 +44,7 @@ static ACE_FIFO_Send_Msg message_queue_; #endif /* ACE_WIN32 */ #if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) -# include /**/ <iostream.h> +# include "ace/stdcpp.h" #endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ ACE_ALLOC_HOOK_DEFINE(ACE_Log_Msg) @@ -472,7 +473,6 @@ ACE_Log_Msg::~ACE_Log_Msg (void) } // Open the sender-side of the Message ACE_Queue. - int ACE_Log_Msg::open (const char *prog_name, u_long flags, diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h index 4c3227f7d45..f59b932a303 100644 --- a/ace/Log_Msg.h +++ b/ace/Log_Msg.h @@ -89,8 +89,10 @@ #include "ace/Log_Record.h" -// In case iostream.h is not #included before this header . . . -class ostream; +// In case ace/stdcpp.h is not #included before this header . . . +#if !defined(ACE_STDCPP_H) + class ostream; +#endif #define ACE_LOG_MSG ACE_Log_Msg::instance () diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp index 17e9e114fc4..92520a70871 100644 --- a/ace/Log_Record.cpp +++ b/ace/Log_Record.cpp @@ -4,9 +4,7 @@ #define ACE_BUILD_DLL #include "ace/Log_Record.h" -#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) -# include /**/ <iostream.h> -#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ +#include "ace/stdcpp.h" ACE_ALLOC_HOOK_DEFINE(ACE_Log_Record) diff --git a/ace/Log_Record.h b/ace/Log_Record.h index 72acdc028f6..480fc968acc 100644 --- a/ace/Log_Record.h +++ b/ace/Log_Record.h @@ -22,8 +22,10 @@ #if !defined (ACE_LOG_RECORD_H) #define ACE_LOG_RECORD_H -// In case iostream.h is not #included before this header . . . -class ostream; +// In case ace/stdcpp.h is not #included before this header . . . +#if !defined(ACE_STDCPP_H) + class ostream; +#endif class ACE_Export ACE_Log_Record { @@ -958,7 +958,11 @@ struct strrecvfd {}; #endif /* ACE_HAS_PROC_FD */ #if defined (ACE_HAS_UNICODE) -#include /**/ <wchar.h> +# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0) +# include /**/ <cwchar> +# else /* ACE_HAS_STANDARD_CPP_LIBRARY */ +# include /**/ <wchar.h> +# endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ #endif /* ACE_HAS_UNICODE */ #if defined (ACE_HAS_BROKEN_WRITEV) @@ -1524,19 +1528,10 @@ typedef int ACE_thread_key_t; #endif /* ACE_HAS_THREADS */ #include /**/ <sys/types.h> -#include /**/ <assert.h> #include /**/ <sys/stat.h> -#include /**/ <limits.h> -#include /**/ <stdio.h> + #include "ace/stdcpp.h" -#include /**/ <new.h> -#include /**/ <ctype.h> -#include /**/ <signal.h> -#include /**/ <string.h> -#include /**/ <stdarg.h> #include /**/ <fcntl.h> -#include /**/ <errno.h> -#include /**/ <stdlib.h> // This must come after signal.h is #included. #if defined (SCO) diff --git a/ace/README b/ace/README index 0fecb1c53ca..cf3b5545666 100644 --- a/ace/README +++ b/ace/README @@ -264,6 +264,7 @@ ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA Compiler's template instantiation mechan ACE_REQUIRES_FUNC_DEFINITIONS Compiler requires a definition for a "hidden" function, e.g., a private, unimplemented copy constructor or assignment operator. The SGI C++ compiler needs this, in template classes, with ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA. ACE_USE_POLL Use the poll() event demultiplexor rather than select(). ACE_USES_ASM_SYMBOL_IN_DLSYM Platform uses assembly symbols instead of C symbols in dlsym() +ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB Platform has its standard c++ library in the namespace std. ACE_WSOCK_VERSION A parameter list indicating the version of WinSock (e.g., "1, 1" is version 1.1). ---------------------------------------- diff --git a/ace/Registry.h b/ace/Registry.h index 50ebe03d91d..9dc5a07e785 100644 --- a/ace/Registry.h +++ b/ace/Registry.h @@ -23,10 +23,22 @@ #if defined (ACE_WIN32) // This only works on Win32 platforms +#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \ + (ACE_HAS_STANDARD_CPP_LIBRARY != 0) +#include <vector> +#include <string> +#else #include "vector.h" #include "bstring.h" +#endif // You must configure the STL components in order to use this wrapper. +#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \ + (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0) + using std::vector; + using std::basic_string; +#endif /* ACE_HAS_STD_NAMESPACE_FOR_STDCPP_LIB */ + class ACE_Export ACE_Registry // = TITLE // A Name Server implementation @@ -41,7 +53,7 @@ class ACE_Export ACE_Registry { public: - typedef std::basic_string<TCHAR> Istring; + typedef basic_string<TCHAR> Istring; // International string struct ACE_Export Name_Component @@ -52,7 +64,7 @@ public: // The <id_> field is used, // but the <kind_> field is currently ignored - typedef std::vector<Name_Component> Name; + typedef vector<Name_Component> Name; // A Name is an ordered collections of components (ids) static LPCTSTR STRING_SEPARATOR; @@ -100,7 +112,7 @@ public: // A binding has a name and a type }; - typedef std::vector<Binding> Binding_List; + typedef vector<Binding> Binding_List; // A list of bindings class Binding_Iterator; @@ -504,5 +516,12 @@ private: }; +#if (_MSC_VER) && (_MSC_VER > 1020) && \ + (ACE_HAS_STANDARD_CPP_LIBRARY != 0) + typedef ACE_Registry::Name_Component Name_Component; + typedef ACE_Registry::Binding Binding; + const int NPOS = ACE_Registry::Istring::npos; +#endif + #endif /* ACE_WIN32 */ #endif /* ACE_REGISTRY_H */ diff --git a/ace/ace.dsp b/ace/ace.dsp index f74977e796b..4ae02d13795 100644 --- a/ace/ace.dsp +++ b/ace/ace.dsp @@ -56,7 +56,7 @@ BSC32=bscmake.exe # 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 /subsystem:windows /dll /machine:I386
-# ADD 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 /subsystem:windows /dll /machine:I386 /out:".\ace-r.dll"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386 /out:".\ace-r.dll"
!ELSEIF "$(CFG)" == "ACE - Win32 Debug"
@@ -82,7 +82,7 @@ BSC32=bscmake.exe # 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 /subsystem:windows /dll /debug /machine:I386
-# ADD 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 /subsystem:windows /dll /debug /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386
!ELSEIF "$(CFG)" == "ACE - Win32 Unicode Debug"
@@ -95,10 +95,9 @@ LINK32=link.exe # PROP Use_Debug_Libraries 1
# PROP Output_Dir ""
# PROP Intermediate_Dir ".\Unicode_Debug"
-# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /MDd /W3 /Gm /GX /Zi /Od /I "..\STL" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /YX /c
-# ADD CPP /nologo /G5 /MDd /W3 /Gm /GX /Zi /Od /Gy /I "..\STL" /I "..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /YX /FD /c
+# ADD CPP /nologo /G5 /MDd /W3 /Gm /GX /Zi /Od /Gy /I "..\STL" /I "..\\" /D "_DEBUG" /D "UNICODE" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
@@ -108,7 +107,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 wsock32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD 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 /subsystem:windows /dll /debug /machine:I386 /out:".\aceu.dll"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:".\aceu.dll"
!ELSEIF "$(CFG)" == "ACE - Win32 Unicode Release"
@@ -124,7 +123,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G5 /MD /W3 /GX /O2 /I "..\STL" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /YX /c
-# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I "..\STL" /I "..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "UNICODE" /YX /FD /c
+# ADD CPP /nologo /G5 /MD /W3 /GX /O2 /I "..\STL" /I "..\\" /D "NDEBUG" /D "UNICODE" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
@@ -134,7 +133,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 wsock32.lib /nologo /subsystem:windows /dll /machine:I386 /out:"ace-r.dll"
-# ADD 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 /subsystem:windows /dll /machine:I386 /out:".\aceu-r.dll"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib /nologo /subsystem:windows /dll /machine:I386 /out:".\aceu-r.dll"
!ENDIF
@@ -712,145 +711,13 @@ SOURCE=.\UPIPE_Stream.cpp SOURCE=.\XtReactor.cpp
# End Source File
# End Group
-# Begin Group "Template Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Auto_Ptr.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Free_List.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_Manager.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Module.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Singleton.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream_Modules.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
+# Begin Group "Header Files"
-SOURCE=.\Timer_Queue_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
-# End Source File
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
-SOURCE=.\Timer_Wheel_T.cpp
-# PROP BASE Exclude_From_Build 1
-# PROP Exclude_From_Build 1
+SOURCE=.\Acceptor.h
# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\ACE.h
@@ -893,6 +760,10 @@ SOURCE=.\config.h # End Source File
# Begin Source File
+SOURCE=.\Connector.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Containers.h
# End Source File
# Begin Source File
@@ -2017,11 +1888,147 @@ SOURCE=.\UPIPE_Stream.i # PROP Default_Filter ""
# Begin Source File
-SOURCE=..\README
+SOURCE=.\Readme
+# End Source File
+# Begin Source File
+
+SOURCE=..\Version
+# End Source File
+# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Auto_Ptr.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Containers.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Dump_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Free_List.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Hash_Map_Manager.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\IOStream_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Local_Name_Space_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Malloc_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Map_Manager.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Message_Queue.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Module.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Singleton.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Strategies_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
-SOURCE=..\VERSION
+SOURCE=.\Stream.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Stream_Modules.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Synch_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Task_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Timer_Hash_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Timer_Heap_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Timer_List_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Timer_Queue_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\Timer_Wheel_T.cpp
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
# End Source File
# End Group
# End Target
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h index 5044def6ad5..4e427535eb4 100644 --- a/ace/config-win32-common.h +++ b/ace/config-win32-common.h @@ -67,8 +67,6 @@ // Platform supports the /proc file system. //define ACE_HAS_PROC_FS -//#define ACE_HAS_STANDARD_CPP_LIBRARY - // Platform supports the rusage struct. #define ACE_HAS_GETRUSAGE @@ -127,12 +125,6 @@ // Platform support linebuffered streaming is broken #define ACE_LACKS_LINEBUFFERED_STREAMBUF -// iostream header lacks ipfx (), isfx (), etc., declarations -// only for MSVC 4.2 and below -#if (_MSC_VER < 1100) -#define ACE_LACKS_IOSTREAM_FX -#endif /* _MSC_VER < 1100 */ - // Template specialization is supported #define ACE_HAS_TEMPLATE_SPECIALIZATION @@ -144,11 +136,66 @@ // ----------------- "derived" defines and includes ----------- -// It seems that this works only with MSVC 4.1 and 4.2 -#if (1010 <= _MSC_VER) && (_MSC_VER <= 1020) - #define ACE_HAS_TEMPLATE_TYPEDEFS +#if (ACE_HAS_STANDARD_CPP_LIBRARY != 0) + #if defined (_MSC_VER) + #if (_MSC_VER > 1020) + // Platform has its Standard C++ library in the namespace std + #if !defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) + #define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 + #endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ + #else /* (_MSC_VER > 1020) */ + #if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) + #undef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB + #endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ + #define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 0 + #endif /* (_MSC_VER > 1020) */ + #endif /* _MSC_VER */ + + // ace/iostream.h does not work with the standard cpp library (yet). + #define ACE_LACKS_ACE_IOSTREAM +#else + // iostream header lacks ipfx (), isfx (), etc., declarations + #define ACE_LACKS_IOSTREAM_FX #endif +#if defined (_MSC_VER) + // While digging the MSVC 4.0 include files, I found how to disable + // MSVC warnings: --Amos Shapira + + // "C4355: 'this' : used in base member initializer list" + #pragma warning(disable:4355) /* disable C4514 warning */ + // #pragma warning(default:4355) // use this to reenable, if desired + + #pragma warning(disable:4201) /* winnt.h uses nameless structs */ + + // It seems that this works with MSVC 4.[1,2] + #if (1010 <= _MSC_VER) && (_MSC_VER <= 1020) + #define ACE_HAS_TEMPLATE_TYPEDEFS + #endif + + // MSVC 5.0 ? + #if (_MSC_VER > 1020) + // Compiler/platform supports typename keyword + #define ACE_HAS_TYPENAME_KEYWORD + + // Compiler/platform defines the sig_atomic_t typedef + #define ACE_HAS_SIG_ATOMIC_T + #endif + + // MSVC 4.0 or greater + #if (_MSC_VER >= 1000) + // Compiler/Platform supports the "using" keyword. + #define ACE_HAS_USING_KEYWORD + #endif + + // MSVC 2.2 or lower + #if (_MSC_VER < 1000) + // This needs to be here since MSVC++ 2.0 seems to have forgotten to + // include it. Does anybody know which MSC_VER MSVC 2.0 has ? + inline void *operator new (unsigned int, void *p) { return p; } + #endif +#endif /* _MSC_VER */ + // MFC itself defines STRICT. #if defined( ACE_HAS_MFC ) && (ACE_HAS_MFC != 0) #if !defined(ACE_HAS_STRICT) @@ -183,11 +230,6 @@ #if !defined(_MT) #define _MT #endif - - // use DLLs instead of static libs -// #if !defined(_DLL) -// #define _DLL -// #endif #endif // We are using STL's min and max (in algobase.h). Therefore the @@ -196,17 +238,6 @@ #define NOMINMAX #endif /* NOMINMAX */ -// While digging the MSVC 4.0 include files, I found how to disable -// MSVC warnings: --Amos Shapira - -#if defined (_MSC_VER) - // "C4355: 'this' : used in base member initializer list" - #pragma warning(disable:4355) /* disable C4514 warning */ - // #pragma warning(default:4355) // use this to reenable, if desired - - #pragma warning(disable:4201) /* winnt.h uses nameless structs */ -#endif /* _MSC_VER */ - #if defined (_UNICODE) #if !defined (UNICODE) #define UNICODE /* UNICODE is used by Windows headers */ @@ -224,7 +255,11 @@ #else #if ! defined (__ACE_INLINE__) #define __ACE_INLINE__ - #endif /* ! __ACE_INLINE__ */ + #else /* __ACE_INLINE__ */ + #if (__ACE_INLINE__ == 0) + #undef __ACE_INLINE__ + #endif + #endif /* __ACE_INLINE__ */ #endif // We are build ACE and want to use MFC (multithreaded) @@ -281,7 +316,7 @@ #endif /* UNICODE */ -#endif /* !defined (_INC_INWDOWS) */ +#endif /* !defined (_INC_WINDOWS) */ // Always use WS2 when available #if (ACE_HAS_WINNT4 != 0) @@ -329,15 +364,4 @@ #define ACE_HAS_CANCEL_IO #endif -#if (_MSC_VER >= 1000) - // Compiler/Platform supports the "using" keyword. - #define ACE_HAS_USING_KEYWORD -#endif - -#if (_MSC_VER < 1000) - // This needs to be here since MSVC++ 2.0 seems to have forgotten to - // include it. Does anybody know which MSC_VER MSVC 2.0 has ? - inline void *operator new (unsigned int, void *p) { return p; } -#endif - #endif /* ACE_WIN32_COMMON_H */ diff --git a/ace/config-win32.h b/ace/config-win32.h index 5bb40caf5e1..853d955e256 100644 --- a/ace/config-win32.h +++ b/ace/config-win32.h @@ -3,14 +3,16 @@ // The following configuration file is designed to work for Windows 95, // Windows NT 3.51 and Windows NT 4.0 platforms using the Microsoft Visual C++ -// compilers 2.0, 4.0, 4.1, and 4.2. -// It should work with MSVC 5.0, but this has not been tested. +// compilers 2.0, 4.0, 4.1, 4.2 and 5.0 #if !defined (ACE_CONFIG_H) #define ACE_CONFIG_H // ----------------------- user configuration defines -------------------- +// Define this if you want to use the standard C++ library +//define ACE_HAS_STANDARD_CPP_LIBRARY = 1 + // Define this if you're running NT 4.x // Setting applies to : building ACE // Runtime restrictions: System must be Windows NT => 4.0 @@ -35,6 +37,27 @@ #define ACE_HAS_MFC 0 #endif +// Define this if you're using MSVC 5.0 and your application relies +// on the standard c++ library. +// Runtime restrictions: You must be using MSVC 5.0 and your application +// must link with the standard libraries. +#if defined (_MSC_VER) && (_MSC_VER >= 1020) + #if !defined (ACE_HAS_STANDARD_CPP_LIBRARY) + #define ACE_HAS_STANDARD_CPP_LIBRARY 0 + #endif +#else + #if defined (ACE_HAS_STANDARD_CPP_LIBRARY) + #undef ACE_HAS_STANDARD_CPP_LIBRARY + #endif + #define ACE_HAS_STANDARD_CPP_LIBRARY 0 +#endif + +// The STL that comes with ACE uses the std namespace. Note however, it is not +// part of the standard C++ library +#if !defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) + #define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 +#endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ + // Uncomment this out if you want to use STRICT type checking. // It is disabled by default because it will break existing application code. // Setting applies to : building ACE, linking with ACE diff --git a/ace/stdcpp.h b/ace/stdcpp.h index f8315b0e936..6280441e8f6 100644 --- a/ace/stdcpp.h +++ b/ace/stdcpp.h @@ -10,7 +10,7 @@ // stdcpp.h // // = AUTHOR -// Irfan and Tim +// Irfan and Tim and Darrell // // = DESCRIPTION // This file contains the portability ugliness for the Standard C++ @@ -19,10 +19,19 @@ // // ============================================================================ +#if !defined (ACE_STDCPP_H) +#define ACE_STDCPP_H + #include "ace/config.h" -#if defined (ACE_WIN32) -# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) +#if !defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) +# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0) + +# if defined (_MSC_VER) +# pragma warning(disable: 4018 4114 4146 4245) +# pragma warning(disable: 4663 4664 4665 4511 4512) +# endif + // For some reason, The Standard C++ Library has decided to save space // and ommit the file extensions. # include /**/ <iomanip> @@ -30,7 +39,44 @@ # include /**/ <iostream> # include /**/ <istream> # include /**/ <ostream> +# include /**/ <fstream> # include /**/ <streambuf> + + +/* As more compilers conform to Draft 2, ACE should be modified to use the + namespace instead of promoting names to the global namespace. For those + compilers that don't support it yet, there could be a global struct that + looks like: + + struct std + { + typedef ostream ::ostream; + + // ... + } +*/ + +// In case iostream.h is not #included before this header . . . +# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \ + (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0) + using std::istream; + using std::ostream; + using std::ofstream; + using std::endl; + using std::flush; + using std::iostream; + using std::cerr; + using std::cout; + using std::cin; + using std::streambuf; + using std::ios; +# endif // ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB + +# if defined (_MSC_VER) +# pragma warning(4: 4018 4114 4146 4245) +# pragma warning(4: 4663 4664 4665 4512 4511) +# endif + # else /* ACE_HAS_STANDARD_CPP_LIBRARY */ # include /**/ <fstream.h> # include /**/ <iomanip.h> @@ -41,9 +87,45 @@ # include /**/ <streamb.h> # include /**/ <strstrea.h> # endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ -#else /* ACE_WIN32 */ -# // Most platforms, except for NT, #include iostream.h. -# if ! defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) -# include /**/ <iostream.h> -# endif /* ! ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ -#endif /* ACE_WIN32 */ +#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ + +// Now + +#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0) +# if defined (_MSC_VER) +# pragma warning(disable: 4018 4114 4146 4245) +# pragma warning(disable: 4663 4664 4665 4511 4512) +# endif /* _MSC_VER */ + +# include /**/ <cassert> +# include /**/ <climits> +# include /**/ <cstdio> +# include /**/ <new> +# include /**/ <cctype> +# include /**/ <csignal> +# include /**/ <cstring> +# include /**/ <cstdarg> +# include /**/ <cerrno> +# include /**/ <cstdlib> + +# if defined (_MSC_VER) +# pragma warning(4: 4018 4114 4146 4245) +# pragma warning(4: 4663 4664 4665 4512 4511) +# endif + +#else /* ACE_HAS_STANDARD_CPP_LIBRARY && ACE_HAS_STANDARD_CPP_LIBRARY */ + +# include /**/ <assert.h> +# include /**/ <limits.h> +# include /**/ <stdio.h> +# include /**/ <new.h> +# include /**/ <ctype.h> +# include /**/ <signal.h> +# include /**/ <string.h> +# include /**/ <stdarg.h> +# include /**/ <errno.h> +# include /**/ <stdlib.h> + +#endif /* ACE_HAS_STANDARD_CPP_LIBRARY && ACE_HAS_STANDARD_CPP_LIBRARY */ + +#endif // ACE_STDCPP_H
\ No newline at end of file diff --git a/tests/Hash_Map_Manager_Test.cpp b/tests/Hash_Map_Manager_Test.cpp index d47deb8e15b..423c9884512 100644 --- a/tests/Hash_Map_Manager_Test.cpp +++ b/tests/Hash_Map_Manager_Test.cpp @@ -18,8 +18,6 @@ // // ============================================================================ -#include <iostream.h> - #include "ace/Hash_Map_Manager.h" #include "ace/SString.h" #include "ace/Synch.h" diff --git a/tests/test_config.h b/tests/test_config.h index a3ca2d9ab78..cf13ce812e9 100644 --- a/tests/test_config.h +++ b/tests/test_config.h @@ -14,8 +14,7 @@ #if !defined (ACE_TEST_CONFIG_H) #define ACE_TEST_CONFIG_H -#include <iostream.h> -#include <fstream.h> +#include "ace/stdcpp.h" #if !defined (ACE_HAS_TEMPLATE_SPECIALIZATION) class KEY |