summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2011-03-09 19:23:26 +0000
committerSteve Huston <shuston@riverace.com>2011-03-09 19:23:26 +0000
commitedbc71d3f8db50fb3260366c2af93e494172865b (patch)
treeab9fe5f98ab2436ba67a3abc56f97f94447ac62e
parent7edf6ca6f56a68f03ff26a468f886bceec7ed5af (diff)
downloadATCD-edbc71d3f8db50fb3260366c2af93e494172865b.tar.gz
ChangeLogTag:Wed Mar 9 19:14:01 UTC 2011 Steve Huston <shuston@riverace.com>
-rw-r--r--ACE/ChangeLog18
-rw-r--r--ACE/NEWS6
-rw-r--r--ACE/ace/OS.h106
-rwxr-xr-xACE/bin/fuzz.pl40
-rw-r--r--ACE/tests/OS_Test.cpp4
5 files changed, 173 insertions, 1 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index bbbf11b7ffb..64e6bf1cbec 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,21 @@
+Wed Mar 9 19:14:01 UTC 2011 Steve Huston <shuston@riverace.com>
+
+ * ace/OS.h: Re-added OS.h due to popular demand. It's been slimmed down
+ from its pre-ACE 6 days, now including primarily the OS_NS_*.h files
+ which can be disabled by setting the preprocessor macro
+ DO_NOT_INCLUDE_OS_H before including OS.h.
+ This file is here to maintain backwards build compatibility with
+ older ACE versions. Using it will slow your compile time over
+ simply including the requisite OS_NS_*.h file(s).
+
+ * bin/fuzz.pl: Added a new test check_for_include_OS_h to be sure no
+ source within ACE includes ace/OS.h.
+
+ * tests/OS_Test.cpp: Added #include "ace/OS.h" to be sure that it
+ at least compiles.
+
+ * NEWS: Note that OS.h is back.
+
Wed Mar 9 16:22:26 UTC 2011 Adam Mitz <mitza@ociweb.com>
* include/makeinclude/rules.local.GNU:
diff --git a/ACE/NEWS b/ACE/NEWS
index cdb32eebf85..8fd0e507bdd 100644
--- a/ACE/NEWS
+++ b/ACE/NEWS
@@ -1,6 +1,12 @@
USER VISIBLE CHANGES BETWEEN ACE-6.0.1 and ACE-6.0.2
====================================================
+. The ACE_wrappers/ace/OS.h file has been restored in order to ensure
+ build-time compatibility with older ACE versions. Its use will still
+ cause your build to incur more processing time than using the needed
+ ace/OS_NS_*.h files; however, you should be able to build OS.h-including
+ code without needing to replace it with OS_NS_* includes.
+
USER VISIBLE CHANGES BETWEEN ACE-6.0.0 and ACE-6.0.1
====================================================
diff --git a/ACE/ace/OS.h b/ACE/ace/OS.h
new file mode 100644
index 00000000000..3d273c1057f
--- /dev/null
+++ b/ACE/ace/OS.h
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file OS.h
+ *
+ * $Id$
+ *
+ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
+ * @author Jesper S. M|ller<stophph@diku.dk>
+ * @author and a cast of thousands...
+ */
+//=============================================================================
+
+#ifndef ACE_OS_H
+#define ACE_OS_H
+
+#include /**/ "ace/pre.h"
+
+#include /**/ "ace/config-all.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+/**
+ * @namespace ACE_OS
+ *
+ * @brief This namespace defines an OS independent programming API that
+ * shields developers from nonportable aspects of writing
+ * efficient system programs on Win32, POSIX and other versions
+ * of UNIX, and various real-time operating systems.
+ *
+ * This namespace encapsulates the differences between various OS
+ * platforms. When porting ACE to a new platform, this class is
+ * the place to focus on. Once this file is ported to a new
+ * platform, pretty much everything else comes for "free." See
+ * <www.cs.wustl.edu/~schmidt/ACE_wrappers/etc/ACE-porting.html>
+ * for instructions on porting ACE. Please see the README file
+ * in this directory for complete information on the meaning of
+ * the various macros.
+ */
+namespace ACE_OS
+{
+ // = A set of wrappers for miscellaneous operations.
+} /* namespace ACE_OS */
+
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+#if !defined (DO_NOT_INCLUDE_OS_H)
+#include "ace/Cleanup.h"
+#include "ace/Object_Manager_Base.h"
+#include "ace/OS_main.h"
+#include "ace/OS_NS_arpa_inet.h"
+#include "ace/OS_NS_ctype.h"
+#include "ace/OS_NS_dirent.h"
+#include "ace/OS_NS_dlfcn.h"
+#include "ace/OS_NS_errno.h"
+#include "ace/OS_NS_fcntl.h"
+#include "ace/OS_NS_math.h"
+#include "ace/OS_NS_netdb.h"
+#include "ace/OS_NS_poll.h"
+#include "ace/OS_NS_pwd.h"
+#include "ace/OS_NS_regex.h"
+#include "ace/OS_NS_signal.h"
+#include "ace/OS_NS_stdio.h"
+#include "ace/OS_NS_stdlib.h"
+#include "ace/OS_NS_string.h"
+#include "ace/OS_NS_strings.h"
+#include "ace/OS_NS_stropts.h"
+#include "ace/OS_NS_sys_mman.h"
+#include "ace/OS_NS_sys_msg.h"
+#include "ace/OS_NS_sys_resource.h"
+#include "ace/OS_NS_sys_select.h"
+#include "ace/OS_NS_sys_shm.h"
+#include "ace/OS_NS_sys_socket.h"
+#include "ace/OS_NS_sys_stat.h"
+#include "ace/OS_NS_sys_time.h"
+#include "ace/OS_NS_sys_uio.h"
+#include "ace/OS_NS_sys_utsname.h"
+#include "ace/OS_NS_sys_wait.h"
+#include "ace/OS_NS_Thread.h"
+#include "ace/OS_NS_time.h"
+#include "ace/OS_NS_unistd.h"
+#include "ace/OS_NS_wchar.h"
+
+// Include the split up ACE_OS classes
+#include "ace/OS_Memory.h"
+#include "ace/OS_TLI.h"
+#include "ace/OS_Errno.h"
+
+// Here are all ACE-specific default constants, needed throughout ACE
+// and its applications. The values can be over written by user
+// specific values in config.h files.
+#include "ace/Default_Constants.h"
+
+// Here are all ACE-specific global declarations needed throughout
+// ACE.
+#include "ace/Global_Macros.h"
+
+#endif /* DO_NOT_INCLUDE_OS_H */
+
+#include /**/ "ace/post.h"
+#endif /* ACE_OS_H */
diff --git a/ACE/bin/fuzz.pl b/ACE/bin/fuzz.pl
index b90aab741f3..28e18f474c4 100755
--- a/ACE/bin/fuzz.pl
+++ b/ACE/bin/fuzz.pl
@@ -2073,6 +2073,42 @@ sub check_for_ORB_init ()
}
}
+# This test checks for the presence of an include for ace/OS.h
+# which should never occur. Only user code is allowed to include OS.h.
+sub check_for_include_OS_h ()
+{
+ print "Running the OS.h inclusion check\n";
+ foreach $file (@files_h, @files_cpp, @files_inl) {
+ if (open (FILE, $file)) {
+ my $disable = 0;
+ print "Looking at file $file\n" if $opt_d;
+ while (<FILE>) {
+ if (/^\s*#\s*include\s*<[(ace)|(TAO)|(CIAO)]\/.*>/) {
+ print_error ("$file:$.: include <ace\/..> used");
+ ++$bad_occurance;
+ }
+ if (/FUZZ\: disable check_for_include_OS_h/) {
+ $disable = 1;
+ next;
+ }
+ elsif (/FUZZ\: enable check_for_include_OS_h/) {
+ $disable = 0;
+ next;
+ }
+ else {
+ if (/^\s*#\s*include\s*"ace\/OS.h"/) {
+ print_error ("$file:$.: include ace/OS.h used");
+ }
+ }
+ }
+ close (FILE);
+ }
+ else {
+ print STDERR "Error: Could not open $file\n";
+ }
+ }
+}
+
##############################################################################
use vars qw/$opt_c $opt_d $opt_h $opt_l $opt_t $opt_m/;
@@ -2125,7 +2161,8 @@ if (!getopts ('cdhl:t:mv') || $opt_h) {
check_for_refcountservantbase
check_for_TAO_Local_RefCounted_Object
check_for_ORB_init
- check_for_trailing_whitespace\n";
+ check_for_trailing_whitespace
+ check_for_include_OS_h\n";
exit (1);
}
@@ -2199,6 +2236,7 @@ check_for_long_file_names () if ($opt_l >= 1);
check_for_improper_main_declaration () if ($opt_l >= 1);
check_for_TAO_Local_RefCounted_Object () if ($opt_l >= 1);
check_for_ORB_init () if ($opt_l >= 1);
+check_for_include_OS_h () if ($opt_l >= 1);
print "\nfuzz.pl - $errors error(s), $warnings warning(s)\n";
diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp
index fd15a3e327c..700d640b8c9 100644
--- a/ACE/tests/OS_Test.cpp
+++ b/ACE/tests/OS_Test.cpp
@@ -15,6 +15,10 @@
#include "test_config.h"
#include "ace/ACE.h"
+//FUZZ: disable check_for_include_OS_h
+#include "ace/OS.h"
+//FUZZ: enable check_for_include_OS_h
+
#include "ace/OS_NS_math.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_strings.h"