summaryrefslogtreecommitdiff
path: root/examples/Threads/task_three.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Threads/task_three.cpp')
-rw-r--r--examples/Threads/task_three.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/examples/Threads/task_three.cpp b/examples/Threads/task_three.cpp
index 89db19c8276..4ca4668023d 100644
--- a/examples/Threads/task_three.cpp
+++ b/examples/Threads/task_three.cpp
@@ -16,9 +16,21 @@
#include "ace/Service_Config.h"
#include "ace/Task.h"
#include "ace/stdcpp.h"
+
+// Make sure we have fstream
#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)
-# include <fstream.h>
-# include <iostream.h>
+# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
+# include /**/ <fstream>
+
+# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \
+ (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)
+ using std::ofstream;
+ using std::ios;
+# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
+
+# else /* ACE_HAS_STANDARD_CPP_LIBRARY */
+# include /**/ <fstream.h>
+# endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
#if defined (ACE_HAS_THREADS)