summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-06-05 13:46:45 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-06-05 13:46:45 +0000
commit3ef4475e668a30304da7cbcc11d7a1affaeec6d6 (patch)
tree091726bcbd8b60ccb6c963cbf6458fd823e3b083
parent55a7df6a7d689640b0a4fccbbd05a75b42ab3ec3 (diff)
downloadATCD-3ef4475e668a30304da7cbcc11d7a1affaeec6d6.tar.gz
ChangeLogTag: Thu Jun 05 13:45:00 UTC 2008 Simon Massey <sma@prismtech.com>
-rw-r--r--ACE/ChangeLog51
-rw-r--r--ACE/ace/Get_Opt.cpp4
-rw-r--r--ACE/ace/Get_Opt.h20
-rw-r--r--ACE/ace/Get_Opt.inl54
-rw-r--r--ACE/ace/OS_NS_stdio.cpp14
-rw-r--r--ACE/ace/OS_NS_stdio.h16
-rw-r--r--ACE/ace/OS_NS_stdio.inl37
-rw-r--r--ACE/ace/OS_NS_stdlib.inl40
-rw-r--r--ACE/bin/tao_orb_tests.lst2
-rw-r--r--ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.mpc1
-rw-r--r--ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_Unicode_MFC.mpc13
11 files changed, 221 insertions, 31 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 66b8b766d4b..94954fdca12 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,40 @@
+Thu Jun 05 13:45:00 UTC 2008 Simon Massey <sma@prismtech.com>
+
+ * ace/Get_Opt.cpp:
+ * ace/Get_Opt.h:
+ * ace/Get_Opt.inl:
+
+ As a conveniance in wide character builds allow the
+ options string to be specified as a standard narrow
+ string (that is converted internally). This type of
+ use is littered throughout the TAO code.
+
+ * ace/OS_NS_stdio.cpp:
+ * ace/OS_NS_stdio.h:
+ * ace/OS_NS_stdio.inl:
+
+ As a conveniance in wide character builds allow the
+ fopen() call to have parameters of mixed wide/narrow
+ type. This type of use is littered throughout the TAO
+ code.
+
+ * ace/OS_NS_stdlib.inl:
+
+ Correct the mkstemp facades, they were not returning
+ the modified template string under wide character builds,
+ this caused the tao_idl compiler to be unable to find
+ the pre-processed files to rename that it had just created.
+
+ * examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.mpc:
+ * examples/Log_Msg/Log_Msg_MFC/Log_Msg_Unicode_MFC.mpc:
+
+ Deleted the Unicode specific version, normal one suffices
+ after all.
+
+ * bin/tao_orb_tests.lst:
+
+ Disabled problematic LynxOS test.
+
Wed Jun 4 22:45:20 2008 Steve Huston <shuston@riverace.com>
* ace/config-pharlap.h: Added ACE_LACKS_FILELLOCKS. My changes from
@@ -50,9 +87,10 @@ Wed Jun 4 14:36:55 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
Tue Jun 3 16:14:39 UTC 2008 Ken Sedgwick <ken+5a4@bonsai.com>
- * rpmbuild/ace-tao.spec:
- * rpmbuild/ace-tao-unusedarg.patch:
- * rpmbuild/ace-tao-strrecvfd.patch:
+ * rpmbuild/ace-tao.spec:
+ * rpmbuild/ace-tao-unusedarg.patch:
+ * rpmbuild/ace-tao-strrecvfd.patch:
+
Added ace-tao-strrecvfd.patch (related to bug #3291).
Changed make loop construct to abort when subcomponent fails.
Removed PSS from TAO build list.
@@ -67,9 +105,10 @@ Mon Jun 2 15:26:57 UTC 2008 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
Sun Jun 1 02:01:38 UTC 2008 Ken Sedgwick <ken+5a4@bonsai.com>
- * rpmbuild/ace-tao.spec:
- * rpmbuild/ace-tao-etc.tar.gz:
- * rpmbuild/ace-tao-orbsvcs-daemon.patch:
+ * rpmbuild/ace-tao.spec:
+ * rpmbuild/ace-tao-etc.tar.gz:
+ * rpmbuild/ace-tao-orbsvcs-daemon.patch:
+
Added ace-tao-orbsvcs-daemon.patch to workaround
daemonization problems in rpm installed services.
Fixed tao-cosconcurrency command line arguments.
diff --git a/ACE/ace/Get_Opt.cpp b/ACE/ace/Get_Opt.cpp
index be7be6fc8af..6c354287a4d 100644
--- a/ACE/ace/Get_Opt.cpp
+++ b/ACE/ace/Get_Opt.cpp
@@ -91,6 +91,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Get_Opt)
+#ifdef ACE_USES_WCHAR
+void ACE_Get_Opt::ACE_Get_Opt_Init (const ACE_TCHAR *optstring)
+#else
ACE_Get_Opt::ACE_Get_Opt (int argc,
ACE_TCHAR **argv,
const ACE_TCHAR *optstring,
@@ -113,6 +116,7 @@ ACE_Get_Opt::ACE_Get_Opt (int argc,
nonopt_start_ (optind),
nonopt_end_ (optind),
long_option_ (0)
+#endif
{
ACE_TRACE ("ACE_Get_Opt::ACE_Get_Opt");
diff --git a/ACE/ace/Get_Opt.h b/ACE/ace/Get_Opt.h
index 990b656202a..5c8e9c62888 100644
--- a/ACE/ace/Get_Opt.h
+++ b/ACE/ace/Get_Opt.h
@@ -169,6 +169,7 @@ public:
* xxx" will only find "xxx" as the argument for @e c if @a optstring is
* specified as @c "abc:" not @c "abc::".
*/
+#ifndef ACE_USES_WCHAR
ACE_Get_Opt (int argc,
ACE_TCHAR **argv,
const ACE_TCHAR *optstring = ACE_TEXT (""),
@@ -177,6 +178,25 @@ public:
int ordering = PERMUTE_ARGS,
int long_only = 0);
+#else
+private:
+ void ACE_Get_Opt_Init (const ACE_TCHAR *optstring);
+public:
+ ACE_INLINE ACE_Get_Opt (int argc,
+ ACE_TCHAR **argv,
+ const ACE_TCHAR *optstring = ACE_TEXT (""),
+ int skip_args = 1,
+ int report_errors = 0,
+ int ordering = PERMUTE_ARGS,
+ int long_only = 0);
+ ACE_INLINE ACE_Get_Opt (int argc,
+ ACE_TCHAR **argv,
+ const char *optstring,
+ int skip_args = 1,
+ int report_errors = 0,
+ int ordering = PERMUTE_ARGS,
+ int long_only = 0);
+#endif
/// Default dtor.
~ACE_Get_Opt (void);
diff --git a/ACE/ace/Get_Opt.inl b/ACE/ace/Get_Opt.inl
index cbe5f167e55..f4d95eba486 100644
--- a/ACE/ace/Get_Opt.inl
+++ b/ACE/ace/Get_Opt.inl
@@ -40,4 +40,58 @@ ACE_Get_Opt::opt_ind (void)
return this->optind;
}
+#ifdef ACE_USES_WCHAR
+ACE_INLINE ACE_Get_Opt::ACE_Get_Opt (int argc,
+ ACE_TCHAR **argv,
+ const ACE_TCHAR *optstring,
+ int skip_args,
+ int report_errors,
+ int ordering,
+ int long_only)
+ : argc_ (argc),
+ argv_ (argv),
+ optind (skip_args),
+ opterr (report_errors),
+ optarg (0),
+ optstring_ (0),
+ long_only_ (long_only),
+ has_colon_ (0),
+ last_option_ (0),
+ nextchar_ (0),
+ optopt_ (0),
+ ordering_ (ordering),
+ nonopt_start_ (optind),
+ nonopt_end_ (optind),
+ long_option_ (0)
+{
+ ACE_Get_Opt_Init (optstring);
+}
+
+ACE_INLINE ACE_Get_Opt::ACE_Get_Opt (int argc,
+ ACE_TCHAR **argv,
+ const char *optstring,
+ int skip_args,
+ int report_errors,
+ int ordering,
+ int long_only)
+ : argc_ (argc),
+ argv_ (argv),
+ optind (skip_args),
+ opterr (report_errors),
+ optarg (0),
+ optstring_ (),
+ long_only_ (long_only),
+ has_colon_ (0),
+ last_option_ (0),
+ nextchar_ (0),
+ optopt_ (0),
+ ordering_ (ordering),
+ nonopt_start_ (optind),
+ nonopt_end_ (optind),
+ long_option_ (0)
+{
+ ACE_Get_Opt_Init (ACE_TEXT_CHAR_TO_TCHAR (optstring));
+}
+#endif
+
ACE_END_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/OS_NS_stdio.cpp b/ACE/ace/OS_NS_stdio.cpp
index 633dbf3a366..599e14219c0 100644
--- a/ACE/ace/OS_NS_stdio.cpp
+++ b/ACE/ace/OS_NS_stdio.cpp
@@ -212,6 +212,20 @@ ACE_OS::fopen (const char *filename,
#if defined (ACE_HAS_WCHAR)
FILE *
+ACE_OS::fopen (const char *filename,
+ const ACE_ANTI_TCHAR *mode)
+{
+ return ACE_OS::fopen (filename, ACE_TEXT_ANTI_TO_TCHAR (mode));
+}
+
+FILE *
+ACE_OS::fopen (const wchar_t *filename,
+ const ACE_ANTI_TCHAR *mode)
+{
+ return ACE_OS::fopen (filename, ACE_TEXT_ANTI_TO_TCHAR (mode));
+}
+
+FILE *
ACE_OS::fopen (const wchar_t *filename,
const ACE_TCHAR *mode)
{
diff --git a/ACE/ace/OS_NS_stdio.h b/ACE/ace/OS_NS_stdio.h
index e96a08df650..b4699bbb634 100644
--- a/ACE/ace/OS_NS_stdio.h
+++ b/ACE/ace/OS_NS_stdio.h
@@ -303,7 +303,7 @@ namespace ACE_OS {
#else
ACE_NAMESPACE_INLINE_FUNCTION
#endif /* ACE_WIN32 */
- FILE *fopen (const char *filename, const ACE_TCHAR *mode);
+ FILE *fopen (const char *filename, const char *mode);
#if defined (ACE_HAS_WCHAR)
#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
@@ -311,7 +311,19 @@ namespace ACE_OS {
#else
ACE_NAMESPACE_INLINE_FUNCTION
#endif /* ACE_WIN32 */
- FILE *fopen (const wchar_t *filename, const ACE_TCHAR *mode);
+ FILE *fopen (const char *filename, const wchar_t *mode);
+# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+ extern ACE_Export
+# else
+ ACE_NAMESPACE_INLINE_FUNCTION
+# endif /* ACE_WIN32 */
+ FILE *fopen (const wchar_t *filename, const wchar_t *mode);
+# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
+ extern ACE_Export
+# else
+ ACE_NAMESPACE_INLINE_FUNCTION
+# endif /* ACE_WIN32 */
+ FILE *fopen (const wchar_t *filename, const char *mode);
#endif /* ACE_HAS_WCHAR */
#if defined (ACE_WIN32)
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index 6b5fc52ea10..a390349ee25 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -594,26 +594,53 @@ ACE_OS::fgets (wchar_t *buf, int size, FILE *fp)
#if !(defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
// Win32 PC implementation of fopen () is in OS_NS_stdio.cpp.
ACE_INLINE FILE *
-ACE_OS::fopen (const char *filename, const ACE_TCHAR *mode)
+ACE_OS::fopen (const char *filename, const char *mode)
{
ACE_OS_TRACE ("ACE_OS::fopen");
ACE_OSCALL_RETURN
- (::fopen (filename, ACE_TEXT_ALWAYS_CHAR (mode)), FILE *, 0);
+ (::fopen (filename, mode), FILE *, 0);
}
#if defined (ACE_HAS_WCHAR)
+// Win32 PC implementation of fopen () is in OS_NS_stdio.cpp.
+ACE_INLINE FILE *
+ACE_OS::fopen (const char *filename, const wchar_t *mode)
+{
+ ACE_OS_TRACE ("ACE_OS::fopen");
+ ACE_Wide_To_Ascii n_mode (mode);
+ ACE_OSCALL_RETURN
+ (::fopen (filename, n_mode.char_rep ()), FILE *, 0);
+}
+// Win32 PC implementation of fopen () is in OS_NS_stdio.cpp.
+ACE_INLINE FILE *
+ACE_OS::fopen (const wchar_t *filename, const wchar_t *mode)
+{
+ ACE_OS_TRACE ("ACE_OS::fopen");
+#if defined (ACE_HAS_WINCE)
+ ACE_OSCALL_RETURN
+ (::_wfopen (filename, mode), FILE *, 0);
+#else
+ // Non-Windows doesn't use wchar_t file systems.
+ ACE_Wide_To_Ascii n_filename (filename);
+ ACE_Wide_To_Ascii n_mode (mode);
+ ACE_OSCALL_RETURN
+ (::fopen (n_filename.char_rep (), n_mode.char_rep ()), FILE*, 0);
+#endif /* ACE_HAS_WINCE */
+}
+// Win32 PC implementation of fopen () is in OS_NS_stdio.cpp.
ACE_INLINE FILE *
-ACE_OS::fopen (const wchar_t *filename, const ACE_TCHAR *mode)
+ACE_OS::fopen (const wchar_t *filename, const char *mode)
{
ACE_OS_TRACE ("ACE_OS::fopen");
#if defined (ACE_HAS_WINCE)
+ ACE_Ascii_To_Wide n_mode (mode);
ACE_OSCALL_RETURN
- (::_wfopen (filename, ACE_TEXT_ALWAYS_WCHAR (mode)), FILE *, 0);
+ (::_wfopen (filename, n_mode.wchar_rep ()), FILE *, 0);
#else
// Non-Windows doesn't use wchar_t file systems.
ACE_Wide_To_Ascii n_filename (filename);
ACE_OSCALL_RETURN
- (::fopen (n_filename.char_rep (), ACE_TEXT_ALWAYS_CHAR (mode)), FILE*, 0);
+ (::fopen (n_filename.char_rep (), mode), FILE*, 0);
#endif /* ACE_HAS_WINCE */
}
#endif /* ACE_HAS_WCHAR */
diff --git a/ACE/ace/OS_NS_stdlib.inl b/ACE/ace/OS_NS_stdlib.inl
index 0f94d86da1b..05306c99cc0 100644
--- a/ACE/ace/OS_NS_stdlib.inl
+++ b/ACE/ace/OS_NS_stdlib.inl
@@ -183,8 +183,20 @@ ACE_OS::mkstemp (char *s)
{
#if !defined (ACE_LACKS_MKSTEMP)
return ::mkstemp (s);
+#elif defined (ACE_USES_WCHAR)
+ // For wide-char filesystems, we must convert the narrow-char input to
+ // a wide-char string for mkstemp_emulation(), then convert the name
+ // back to narrow-char for the caller.
+ ACE_Ascii_To_Wide wide_s (s);
+ const ACE_HANDLE fh = ACE_OS::mkstemp_emulation (wide_s.wchar_rep ());
+ if (fh != ACE_INVALID_HANDLE)
+ {
+ ACE_Wide_To_Ascii narrow_s (wide_s.wchar_rep ());
+ ACE_OS::strcpy (s, narrow_s.char_rep ());
+ }
+ return fh;
#else
- return ACE_OS::mkstemp_emulation (ACE_TEXT_CHAR_TO_TCHAR (s));
+ return ACE_OS::mkstemp_emulation (s);
#endif /* !ACE_LACKS_MKSTEMP */
}
@@ -193,9 +205,31 @@ ACE_INLINE ACE_HANDLE
ACE_OS::mkstemp (wchar_t *s)
{
# if !defined (ACE_LACKS_MKSTEMP)
- return ::mkstemp (ACE_TEXT_WCHAR_TO_TCHAR (ACE_TEXT_ALWAYS_CHAR (s)));
+ // For wide-char filesystems, we must convert the wide-char input to
+ // a narrow-char string for mkstemp(), then convert the name
+ // back to wide-char for the caller.
+ ACE_Wide_To_Ascii narrow_s (s);
+ const ACE_HANDLE fh = ::mkstemp (narrow_s.char_rep ());
+ if (fh != ACE_INVALID_HANDLE)
+ {
+ ACE_Ascii_To_Wide wide_s (narrow_s.char_rep ());
+ ACE_OS::strcpy (s, wide_s.wchar_rep ());
+ }
+ return fh;
+# elif defined (ACE_USES_WCHAR)
+ return ACE_OS::mkstemp_emulation (s);
# else
- return ACE_OS::mkstemp_emulation (ACE_TEXT_WCHAR_TO_TCHAR (s));
+ // For wide-char filesystems, we must convert the wide-char input to
+ // a narrow-char string for mkstemp_emulation(), then convert the name
+ // back to wide-char for the caller.
+ ACE_Wide_To_Ascii narrow_s (s);
+ const ACE_HANDLE fh = ACE_OS::mkstemp_emulation (narrow_s.char_rep ());
+ if (fh != ACE_INVALID_HANDLE)
+ {
+ ACE_Ascii_To_Wide wide_s (narrow_s.char_rep ());
+ ACE_OS::strcpy (s, wide_s.wchar_rep ());
+ }
+ return fh;
# endif /* !ACE_LACKS_MKSTEMP */
}
#endif /* ACE_HAS_WCHAR */
diff --git a/ACE/bin/tao_orb_tests.lst b/ACE/bin/tao_orb_tests.lst
index 0b1d025ccf3..e59db2d90a5 100644
--- a/ACE/bin/tao_orb_tests.lst
+++ b/ACE/bin/tao_orb_tests.lst
@@ -135,7 +135,7 @@ TAO/tests/RTCORBA/Client_Protocol/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_
TAO/tests/RTCORBA/Collocation/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT
TAO/tests/RTCORBA/Destroy_Thread_Pool/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT
TAO/tests/RTCORBA/Explicit_Binding/run_test.pl: !VxWorks !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !IPV6 !ACE_FOR_TAO !LabVIEW_RT
-TAO/tests/RTCORBA/Linear_Priority/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT
+TAO/tests/RTCORBA/Linear_Priority/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT !LynxOS
TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !ACE_FOR_TAO !OpenVMS_IA64Crash !LabVIEW_RT
TAO/tests/RTCORBA/ORB_init/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !LabVIEW_RT
TAO/tests/RTCORBA/Persistent_IOR/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT
diff --git a/ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.mpc b/ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.mpc
index 2b83b48a922..b9dd3dfacc8 100644
--- a/ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.mpc
+++ b/ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_MFC.mpc
@@ -3,7 +3,6 @@
project : aceexe, ace_mfc {
avoids += wince
- avoids += uses_wchar
exename = Log_Msg_MFC
Source_Files {
Log_Msg_MFC.cpp
diff --git a/ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_Unicode_MFC.mpc b/ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_Unicode_MFC.mpc
deleted file mode 100644
index 30c3ce15bb1..00000000000
--- a/ACE/examples/Log_Msg/Log_Msg_MFC/Log_Msg_Unicode_MFC.mpc
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project : aceexe, ace_mfc, ace_unicode {
- avoids += wince
- exename = Log_Msg_MFC
- Source_Files {
- Log_Msg_MFC.cpp
- Log_Msg_MFCDlg.cpp
- MFC_Log.cpp
- StdAfx.cpp
- }
-}