Skip to content

Commit c00ce5e

Browse files
authored
Merge pull request #2340 from sonndinh/ACE-master-ghs
Updated support for Green Hills INTEGRITY and INTEGRITY-178 RTOS
2 parents 83cb7a9 + fa705dd commit c00ce5e

53 files changed

Lines changed: 2065 additions & 433 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
*S_T.inl
1818
*.bmak
1919
*.recipe
20+
*.gpj
21+
*.int
22+
*.custom_build_rule
23+
*.empty_html_file
2024

2125
.depend.*
2226
GNUmakefile*
@@ -32,6 +36,9 @@ lib*.dylib
3236
*~
3337
ipch/
3438
*.vsidx
39+
.vs/
40+
Static_Release/
41+
Static_Debug/
3542

3643
/ACE/ace/config.h
3744
/ACE/bin/MakeProjectCreator/config/default.features

ACE/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ USER VISIBLE CHANGES BETWEEN ACE-8.0.2 and ACE-8.0.3
1818

1919
. Dropped support for Embarcadero C++ Builder bcc32c and bcc64 compilers
2020

21+
. Updated support for Green Hills INTEGRITY and INTEGRITY-178 tuMP RTOS.
22+
Tested on INTEGRITY 11.4.6 and INTEGRITY-178 5.0.0.
23+
2124
USER VISIBLE CHANGES BETWEEN ACE-8.0.1 and ACE-8.0.2
2225
====================================================
2326

ACE/ace/ACE.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ ACE::sendv_n (ACE_HANDLE handle,
216216
ACE_INLINE ssize_t
217217
ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len)
218218
{
219-
#if defined (ACE_WIN32) || defined (ACE_MQX)
219+
#if defined (ACE_WIN32) || defined (ACE_MQX) || defined (__ghs__)
220220
return ACE_OS::send (handle, (const char *) buf, len);
221221
#else
222222
return ACE_OS::write (handle, (const char *) buf, len);
@@ -226,7 +226,7 @@ ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len)
226226
ACE_INLINE ssize_t
227227
ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len)
228228
{
229-
#if defined (ACE_WIN32) || defined (ACE_MQX)
229+
#if defined (ACE_WIN32) || defined (ACE_MQX) || defined (__ghs__)
230230
return ACE_OS::recv (handle, (char *) buf, len);
231231
#else
232232
return ACE_OS::read (handle, (char *) buf, len);

ACE/ace/Asynch_Pseudo_Task.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ ACE_Asynch_Pseudo_Task::svc ()
4949

5050
sigset_t RT_signals;
5151

52-
sigemptyset (&RT_signals);
52+
ACE_OS::sigemptyset (&RT_signals);
5353
for (int si = ACE_SIGRTMIN; si <= ACE_SIGRTMAX; si++)
54-
sigaddset (&RT_signals, si);
54+
ACE_OS::sigaddset (&RT_signals, si);
5555

5656
if (ACE_OS::pthread_sigmask (SIG_BLOCK, &RT_signals, 0) != 0)
5757
ACELIB_ERROR ((LM_ERROR,

ACE/ace/CDR_Size.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ class ACE_Export ACE_SizeCDR
7979
ACE_CDR::Boolean write_wstring (ACE_CDR::ULong length,
8080
const ACE_CDR::WChar *x);
8181
ACE_CDR::Boolean write_string (const std::string &x);
82+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
8283
ACE_CDR::Boolean write_string_view (const std::string_view &x);
84+
#endif
85+
8386
#if !defined(ACE_LACKS_STD_WSTRING)
8487
ACE_CDR::Boolean write_wstring (const std::wstring &x);
8588
#endif
@@ -231,8 +234,10 @@ extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss,
231234
const ACE_CDR::WChar* x);
232235
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss,
233236
const std::string& x);
237+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
234238
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss,
235239
const std::string_view& x);
240+
#endif
236241
#if !defined(ACE_LACKS_STD_WSTRING)
237242
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss,
238243
const std::wstring& x);

ACE/ace/CDR_Size.inl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ ACE_SizeCDR::write_string (const std::string &x)
152152
x.empty () ? 0 : x.c_str ());
153153
}
154154

155+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
155156
ACE_INLINE ACE_CDR::Boolean
156157
ACE_SizeCDR::write_string_view (const std::string_view &x)
157158
{
@@ -160,6 +161,7 @@ ACE_SizeCDR::write_string_view (const std::string_view &x)
160161
return this->write_string (len,
161162
x.empty () ? 0 : x.data ());
162163
}
164+
#endif
163165

164166
#if !defined(ACE_LACKS_STD_WSTRING)
165167
ACE_INLINE ACE_CDR::Boolean
@@ -408,12 +410,14 @@ operator<< (ACE_SizeCDR &ss, const std::string& x)
408410
return ss.good_bit ();
409411
}
410412

413+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
411414
ACE_INLINE ACE_CDR::Boolean
412415
operator<< (ACE_SizeCDR &ss, const std::string_view& x)
413416
{
414417
ss.write_string_view (x);
415418
return ss.good_bit ();
416419
}
420+
#endif
417421

418422
#if !defined(ACE_LACKS_STD_WSTRING)
419423
ACE_INLINE ACE_CDR::Boolean

ACE/ace/CDR_Stream.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1707,14 +1707,18 @@ ACE_InputCDR::read_string (std::string& x)
17071707
// the memory is allocated.
17081708
if (len > 0 && len <= this->length())
17091709
{
1710+
#if !defined (ACE_STD_ALLOCATOR_NOTHROW)
17101711
try
17111712
{
1713+
#endif
17121714
x.resize (len-1); // no need to include the terminating '\0' here
1715+
#if !defined (ACE_STD_ALLOCATOR_NOTHROW)
17131716
}
17141717
catch (const std::bad_alloc&)
17151718
{
17161719
return false;
17171720
}
1721+
#endif
17181722

17191723
if (len == 0 || this->read_char_array (&x[0], len-1))
17201724
{
@@ -1763,15 +1767,18 @@ ACE_InputCDR::read_wstring (std::wstring& x)
17631767
len /=
17641768
ACE_Utils::truncate_cast<ACE_CDR::ULong> (
17651769
ACE_OutputCDR::wchar_maxbytes_);
1766-
1770+
#if !defined (ACE_STD_ALLOCATOR_NOTHROW)
17671771
try
17681772
{
1773+
#endif
17691774
x.resize (len);
1775+
#if !defined (ACE_STD_ALLOCATOR_NOTHROW)
17701776
}
17711777
catch (const std::bad_alloc&)
17721778
{
17731779
return false;
17741780
}
1781+
#endif
17751782

17761783
if (this->read_wchar_array (&x[0], len))
17771784
{
@@ -1780,14 +1787,18 @@ ACE_InputCDR::read_wstring (std::wstring& x)
17801787
}
17811788
else
17821789
{
1790+
#if !defined (ACE_STD_ALLOCATOR_NOTHROW)
17831791
try
17841792
{
1793+
#endif
17851794
x.resize (len-1); // no need to include the terminating '\0' here
1795+
#if !defined (ACE_STD_ALLOCATOR_NOTHROW)
17861796
}
17871797
catch (const std::bad_alloc&)
17881798
{
17891799
return false;
17901800
}
1801+
#endif
17911802

17921803
if (len == 1 || this->read_wchar_array (&x[0], len-1))
17931804
{

ACE/ace/CDR_Stream.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757
#endif /* ACE_HAS_MONITOR_POINTS==1 */
5858

5959
#include <string>
60+
61+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
6062
#include <string_view>
63+
#endif
6164

6265
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
6366

@@ -285,7 +288,9 @@ class ACE_Export ACE_OutputCDR
285288
ACE_CDR::Boolean write_wstring (ACE_CDR::ULong length,
286289
const ACE_CDR::WChar *x);
287290
ACE_CDR::Boolean write_string (const std::string &x);
291+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
288292
ACE_CDR::Boolean write_string_view (const std::string_view &x);
293+
#endif
289294
#if !defined(ACE_LACKS_STD_WSTRING)
290295
ACE_CDR::Boolean write_wstring (const std::wstring &x);
291296
#endif
@@ -1439,8 +1444,10 @@ extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
14391444
ACE_OutputCDR::from_std_string x);
14401445
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
14411446
const std::string& x);
1447+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
14421448
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
14431449
const std::string_view& x);
1450+
#endif
14441451
#if !defined(ACE_LACKS_STD_WSTRING)
14451452
extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
14461453
ACE_OutputCDR::from_std_wstring x);

ACE/ace/CDR_Stream.inl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ ACE_OutputCDR::write_string (const std::string &x)
368368
x.empty () ? 0 : x.c_str ());
369369
}
370370

371+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
371372
ACE_INLINE ACE_CDR::Boolean
372373
ACE_OutputCDR::write_string_view (const std::string_view &x)
373374
{
@@ -376,6 +377,7 @@ ACE_OutputCDR::write_string_view (const std::string_view &x)
376377
return this->write_string (len,
377378
x.empty () ? 0 : x.data ());
378379
}
380+
#endif
379381

380382
#if !defined(ACE_LACKS_STD_WSTRING)
381383
ACE_INLINE ACE_CDR::Boolean
@@ -1394,12 +1396,14 @@ operator<< (ACE_OutputCDR &os, const std::string& x)
13941396
return os.good_bit ();
13951397
}
13961398

1399+
#if !defined (ACE_LACKS_STD_STRING_VIEW)
13971400
ACE_INLINE ACE_CDR::Boolean
13981401
operator<< (ACE_OutputCDR &os, const std::string_view& x)
13991402
{
14001403
os.write_string_view (x);
14011404
return os.good_bit ();
14021405
}
1406+
#endif
14031407

14041408
#if !defined(ACE_LACKS_STD_WSTRING)
14051409
ACE_INLINE ACE_CDR::Boolean

0 commit comments

Comments
 (0)