summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-16 20:35:47 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-16 20:35:47 +0000
commit694499b2fc01927a5779309b31caf71df1107adc (patch)
treef926f2a4b1471e7ecaf4c31d548b3fe7b6e328ff /ace
parent4a74ec8da792a561dfd894c6b31939f0b36d39ba (diff)
downloadATCD-694499b2fc01927a5779309b31caf71df1107adc.tar.gz
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r--ace/ACE.cpp46
-rw-r--r--ace/ACE.i36
-rw-r--r--ace/ARGV.cpp8
-rw-r--r--ace/Acceptor.cpp17
-rw-r--r--ace/INET_Addr.cpp6
-rw-r--r--ace/Local_Name_Space_T.cpp20
-rw-r--r--ace/Log_Msg.cpp15
-rw-r--r--ace/Log_Record.cpp2
-rw-r--r--ace/OS.cpp14
-rw-r--r--ace/OS.h57
-rw-r--r--ace/OS.i58
-rw-r--r--ace/TLI_Acceptor.cpp11
-rw-r--r--ace/WFMO_Reactor.cpp2
-rw-r--r--ace/ace.idebin0 -> 377254 bytes
-rw-r--r--ace/config-win32-common.h6
15 files changed, 195 insertions, 103 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 35b1594e790..a7bee85c61e 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -142,6 +142,41 @@ ACE::read_adapter (void *args)
return 0;
}
+// Split a string up into 'token'-delimited pieces, ala Perl's "split".
+
+char *
+ACE::strsplit_r (char *str,
+ const char *token,
+ char *&next_start)
+{
+ char *ret = 0;
+
+ if (str != 0)
+ next_start = str;
+
+ if (next_start != 0)
+ {
+ char *tok_loc = ACE_OS::strstr (next_start, token);
+
+ if (tok_loc != 0)
+ {
+ // Return the beginning of the string.
+ ret = next_start;
+
+ // Insure it's terminated.
+ *tok_loc = '\0';
+ next_start = tok_loc + ACE_OS::strlen (token);
+ }
+ else
+ {
+ ret = next_start;
+ next_start = (char *) 0;
+ }
+ }
+
+ return ret;
+}
+
const char *
ACE::execname (const char *old_name)
{
@@ -503,9 +538,9 @@ ACE::ldfind (const char filename[],
// Look at each dynamic lib directory in the search path.
char *nextholder = 0;
- const char *path_entry = ACE::strsplit_r
- (ld_path, ACE_LD_SEARCH_PATH_SEPARATOR_STR, nextholder);
-
+ const char *path_entry = ACE::strsplit_r (ld_path,
+ ACE_LD_SEARCH_PATH_SEPARATOR_STR,
+ nextholder);
int result = 0;
while (path_entry != 0)
@@ -547,8 +582,9 @@ ACE::ldfind (const char filename[],
break;
// Fetch the next item in the path
- path_entry = ACE::strsplit_r
- (0, ACE_LD_SEARCH_PATH_SEPARATOR_STR, nextholder);
+ path_entry = ACE::strsplit_r (0,
+ ACE_LD_SEARCH_PATH_SEPARATOR_STR,
+ nextholder);
}
ACE_OS::free ((void *) ld_path);
diff --git a/ace/ACE.i b/ace/ACE.i
index 2b4a7ddfcb2..fea76a4c0ca 100644
--- a/ace/ACE.i
+++ b/ace/ACE.i
@@ -72,42 +72,6 @@ ACE::strecpy (char *s, const char *t)
return dscan - 1;
}
-// Split a string up into 'token'-delimited pieces, ala Perl's "split".
-
-inline char *
-ACE::strsplit_r (char *str,
- const char *token,
- char *&next_start)
-{
- char *tok_loc;
- char *ret = 0;
-
- if (str != 0)
- next_start = str;
-
- if (next_start != 0)
- {
- tok_loc = strstr (next_start, token);
-
- if (tok_loc != 0)
- {
- // Return the beginning of the string.
- ret = next_start;
-
- // Insure its terminated.
- *tok_loc = '\0';
- next_start = tok_loc + strlen (token);
- }
- else
- {
- ret = next_start;
- next_start = (char *)0;
- }
- }
-
- return ret;
-}
-
// Return flags currently associated with handle.
inline int
diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp
index b4706ce0c73..4ac556c92e2 100644
--- a/ace/ARGV.cpp
+++ b/ace/ARGV.cpp
@@ -125,9 +125,13 @@ ACE_ARGV::string_to_array (void)
// Check for environment variable substitution here.
if (this->substitute_env_args_)
- this->argv_[i] = ACE::strenvdup (arg);
+ ACE_ALLOCATOR_RETURN (this->argv_[i],
+ ACE::strenvdup (arg),
+ -1);
else
- this->argv_[i] = ACE_OS::strdup (arg);
+ ACE_ALLOCATOR_RETURN (this->argv_[i],
+ ACE_OS::strdup (arg),
+ -1);
}
this->argv_[this->argc_] = 0;
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
index d1436a133fe..ebcf6acf924 100644
--- a/ace/Acceptor.cpp
+++ b/ace/Acceptor.cpp
@@ -425,10 +425,13 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
if (this->service_name_ == 0 && service_name != 0)
- this->service_name_ = ACE_OS::strdup (service_name);
+ ACE_ALLOCATOR_RETURN (this->service_name_,
+ ACE_OS::strdup (service_name),
+ -1);
if (this->service_description_ == 0 && service_description != 0)
- this->service_description_ = ACE_OS::strdup (service_description);
-
+ ACE_ALLOCATOR_RETURN (this->service_description_,
+ ACE_OS::strdup (service_description),
+ -1);
this->reactor (reactor);
// Must supply a valid Reactor to Acceptor::open()...
@@ -501,9 +504,13 @@ ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor");
if (service_name != 0)
- this->service_name_ = ACE_OS::strdup (service_name);
+ ACE_ALLOCATOR_RETURN (this->service_name_,
+ ACE_OS::strdup (service_name),
+ -1);
if (service_description != 0)
- this->service_description_ = ACE_OS::strdup (service_description);
+ ACE_ALLOCATOR_RETURN (this->service_description_,
+ ACE_OS::strdup (service_description),
+ -1);
}
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp
index fd058485a2a..736038c6d92 100644
--- a/ace/INET_Addr.cpp
+++ b/ace/INET_Addr.cpp
@@ -97,9 +97,9 @@ ACE_INET_Addr::string_to_addr (const char s[])
{
ACE_TRACE ("ACE_INET_Addr::string_to_addr");
// Need to make a duplicate since we'll be overwriting the string.
- char *t = ACE_OS::strdup (s);
- if (t == 0)
- return -1;
+ char *t;
+
+ ACE_ALLOCATOR_RETURN (t, ACE_OS::strdup (s), -1)
char *ip_addr = ACE_OS::strchr (t, ':');
int result;
diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp
index ef42bb430ac..2ae06e4a64d 100644
--- a/ace/Local_Name_Space_T.cpp
+++ b/ace/Local_Name_Space_T.cpp
@@ -556,12 +556,17 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_types_i (ACE_PWSTRING_SET &
// Check for wildcard case first.
if (ACE_OS::strcmp ("", pattern_rep) == 0)
- compiled_regexp = ACE_OS::strdup ("");
+ ACE_ALLOCATOR_RETURN (compiled_regexp,
+ ACE_OS::strdup (""),
+ -1);
else
- // Compile the regular expression (the 0's cause ACE_OS::compile to allocate space).
+ // Compile the regular expression (the 0's cause ACE_OS::compile
+ // to allocate space).
#if defined (ACE_HAS_REGEX)
compiled_regexp = ACE_OS::compile (pattern_rep, 0, 0);
-#else /* If we don't have regular expressions just use the pattern directly. */
+#else
+ // If we don't have regular expressions just use the pattern
+ // directly.
compiled_regexp = pattern_rep;
#endif /* ACE_HAS_REGEX */
@@ -574,10 +579,13 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_types_i (ACE_PWSTRING_SET &
// Get the type
const char *type = map_entry->int_id_.type ();
- if (ACE_OS::strcmp ("", pattern_rep) == 0 // Everything matches the wildcard.
+ // Everything matches the wildcard.
+ if (ACE_OS::strcmp ("", pattern_rep) == 0
#if defined (ACE_HAS_REGEX)
|| ACE_OS::step (type, compiled_regexp) != 0)
-#else /* If we don't have regular expressions just use strstr() for substring matching. */
+#else
+ // If we don't have regular expressions just use strstr() for
+ // substring matching.
|| ACE_OS::strstr (type, compiled_regexp) != 0)
#endif /* ACE_HAS_REGEX */
@@ -603,7 +611,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_types_i (ACE_PWSTRING_SET &
template <ACE_MEM_POOL_1, class ACE_LOCK> int
ACE_Local_Name_Space <ACE_MEM_POOL_2, ACE_LOCK>::list_name_entries_i (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
+ const ACE_WString &pattern)
{
ACE_TRACE ("ACE_Local_Name_Space::list_name_entries");
ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 8abe96c0b09..25a035a0cbc 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -451,7 +451,9 @@ ACE_Log_Msg::open (const char *prog_name,
{
ACE_NO_HEAP_CHECK;
- ACE_Log_Msg::program_name_ = ACE_OS::strdup (prog_name);
+ ACE_ALLOCATOR_RETURN (ACE_Log_Msg::program_name_,
+ ACE_OS::strdup (prog_name),
+ -1);
}
}
@@ -566,7 +568,8 @@ ACE_Log_Msg::log (const char *format_str,
int abort_prog = 0;
int exit_value = 0;
int result = 0;
- char *format = ACE_OS::strdup (format_str);
+ char *format;
+ ACE_ALLOCATOR_RETURN (format, ACE_OS::strdup (format_str), -1);
char *save_p = format; // Remember pointer for ACE_OS::free()
if (format == 0)
@@ -1163,11 +1166,11 @@ ACE_Log_Msg::local_host (const char *s)
if (s)
{
ACE_OS::free ((void *) ACE_Log_Msg::local_host_);
- {
- ACE_NO_HEAP_CHECK;
+ {
+ ACE_NO_HEAP_CHECK;
- ACE_Log_Msg::local_host_ = ACE_OS::strdup (s);
- }
+ ACE_ALLOCATOR (ACE_Log_Msg::local_host_, ACE_OS::strdup (s));
+ }
}
}
diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp
index d78ccab65b8..cd87be336c3 100644
--- a/ace/Log_Record.cpp
+++ b/ace/Log_Record.cpp
@@ -96,7 +96,7 @@ ACE_Log_Record::ACE_Log_Record (void)
// format.
int
-ACE_Log_Record::print (const char host_name[],
+ACE_Log_Record::print (const char *host_name,
int verbose,
FILE *fp)
{
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 82ead09d1e2..0fa91903045 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -84,6 +84,13 @@ ACE_Time_Value::operator FILETIME () const
#endif
+ACE_Cleanup_Info::ACE_Cleanup_Info (void)
+ : object_ (0),
+ cleanup_hook_ (0),
+ param_ (0)
+{
+}
+
void
ACE_Time_Value::dump (void) const
{
@@ -248,7 +255,12 @@ ACE_OS::uname (struct utsname *name)
char processor[10] = "Unknown";
char subtype[10] = "Unknown";
- switch (sinfo.wProcessorArchitecture)
+#if defined (__BORLANDC__)
+ // Some changes should be made in winbase.h...
+ switch (sinfo.s.wProcessorArchitecture)
+#else
+ switch (sinfo.wProcessorArchitecture)
+#endif /* __BORLAND__ */
{
case PROCESSOR_ARCHITECTURE_INTEL:
ACE_OS::strcpy (processor, "Intel");
diff --git a/ace/OS.h b/ace/OS.h
index 8344c5422db..6c58e2a9b86 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -1905,8 +1905,13 @@ struct utsname
#define ACE_INVALID_SEM_KEY 0
+#if defined(__BORLANDC__)
+#define ACE_SEH_TRY try
+#define ACE_SEH_FINALLY catch(...)
+#else
#define ACE_SEH_TRY __try
#define ACE_SEH_EXCEPT(X) __except(X)
+#endif /* __BORLANDC__ */
#define ACE_SEH_FINALLY __finally
// The "null" device on Win32.
@@ -2010,34 +2015,44 @@ PAGE_NOCACHE */
#include /**/ <process.h>
#include /**/ <io.h>
+#if defined (__BORLANDC__)
+#define _chdir chdir
+#define _ftime ftime
+#define _access access
+#define _getcwd getcwd
+
+#define _timeb timeb
+
+#define _O_CREAT O_CREAT
+#define _O_EXCL O_EXCL
+#define _O_TRUNC O_TRUNC
+#define _O_TEMPORARY 0x0800 // see fcntl.h
+#endif /* __BORLANDC__ */
+
typedef OVERLAPPED ACE_OVERLAPPED;
typedef DWORD ACE_thread_t;
typedef HANDLE ACE_hthread_t;
typedef long pid_t;
typedef DWORD ACE_thread_key_t;
+#if !defined (__BORLANDC__)
typedef DWORD nlink_t;
+#endif /* __BORLANDC__ */
-// 64-bit quad-word definitions
-#if !defined (_MSC_VER) /* Borland? */
-typedef uint64 ACE_QWORD;
-typedef ACE_QWORD ACE_hrtime_t;
-inline ACE_QWORD ACE_MAKE_QWORD (DWORD lo, DWORD hi) { return uint64 (lo, hi); }
-inline DWORD ACE_LOW_DWORD (ACE_QWORD q) { return q.LowPart; }
-inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return q.HighPart; }
-#else
+// 64-bit quad-word definitions.
typedef unsigned __int64 ACE_QWORD;
-typedef signed __int64 ACE_hrtime_t; /* VC++ won't convert unsigned __int64 to double */
-// typedef unsigned __int64 ACE_hrtime_t; /* Why do we need this? */
+// VC++ won't convert unsigned __int64 to double.
+typedef signed __int64 ACE_hrtime_t;
inline ACE_QWORD ACE_MAKE_QWORD (DWORD lo, DWORD hi) { return ACE_QWORD (lo) | (ACE_QWORD (hi) << 32); }
inline DWORD ACE_LOW_DWORD (ACE_QWORD q) { return (DWORD) q; }
inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); }
-#endif /* !defined (_MSC_VER) */
// Win32 dummies to help compilation.
+#if !defined (__BORLANDC__)
typedef int mode_t;
typedef int uid_t;
typedef int gid_t;
+#endif /* __BORLANDC__ */
typedef char *caddr_t;
struct rlimit { };
struct t_call { };
@@ -2834,8 +2849,12 @@ struct sigaction
#define EIDRM 0
#endif /* !EIDRM */
+#if !defined (ENOSYS)
+#define ENOSYS EFAULT /* Operation not supported or unknown error. */
+#endif /* !ENOSYS */
+
#if !defined (ENOTSUP)
-#define ENOTSUP ENOSYS /* Operation not supported . */
+#define ENOTSUP ENOSYS /* Operation not supported. */
#endif /* !ENOTSUP */
#if !defined (WNOHANG)
@@ -3163,7 +3182,7 @@ struct ACE_Cleanup_Info
// = TITLE
// Hold cleanup information for thread/process
{
- ACE_Cleanup_Info (void) : object_ (0), cleanup_hook_ (0), param_ (0) {}
+ ACE_Cleanup_Info (void);
// Default constructor.
void *object_;
@@ -3932,10 +3951,14 @@ public:
size_t len);
static char *strcat (char *s,
const char *t);
- static char *strchr (const char *s,
+ static char *strchr (char *s,
int c);
- static char *strrchr (const char *s,
+ static char *strrchr (char *s,
int c);
+ static const char *strchr (const char *s,
+ int c);
+ static const char *strrchr (const char *s,
+ int c);
static int strcmp (const char *s,
const char *t);
static int strncmp (const char *s,
@@ -3947,8 +3970,10 @@ public:
const char *s2);
static size_t strspn(const char *s1,
const char *s2);
- static char *strstr (const char *s,
+ static char *strstr (char *s,
const char *t);
+ static const char *strstr (const char *s,
+ const char *t);
static char *strdup (const char *s);
static size_t strlen (const char *s);
static char *strncpy (char *s,
diff --git a/ace/OS.i b/ace/OS.i
index 1a8a2515d94..0538fcd7c42 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -864,7 +864,6 @@ ACE_OS::unlink (const char *path)
#endif /* VXWORKS */
}
-
ACE_INLINE char *
ACE_OS::tempnam (const char *dir, const char *pfx)
{
@@ -993,13 +992,6 @@ ACE_OS::strcat (char *s, const char *t)
return ::strcat (s, t);
}
-ACE_INLINE char *
-ACE_OS::strstr (const char *s, const char *t)
-{
- // ACE_TRACE ("ACE_OS::strstr");
- return ::strstr (s, t);
-}
-
ACE_INLINE size_t
ACE_OS::strspn (const char *s, const char *t)
{
@@ -1008,19 +1000,47 @@ ACE_OS::strspn (const char *s, const char *t)
}
ACE_INLINE char *
-ACE_OS::strchr (const char *s, int c)
+ACE_OS::strchr (char *s, int c)
{
// ACE_TRACE ("ACE_OS::strchr");
return ::strchr (s, c);
}
+ACE_INLINE const char *
+ACE_OS::strchr (const char *s, int c)
+{
+ // ACE_TRACE ("ACE_OS::strchr");
+ return (const char *) ::strchr (s, c);
+}
+
+ACE_INLINE const char *
+ACE_OS::strstr (const char *s, const char *t)
+{
+ // ACE_TRACE ("ACE_OS::strstr");
+ return (const char *) ::strstr (s, t);
+}
+
ACE_INLINE char *
-ACE_OS::strrchr (const char *s, int c)
+ACE_OS::strstr (char *s, const char *t)
+{
+ // ACE_TRACE ("ACE_OS::strstr");
+ return ::strstr (s, t);
+}
+
+ACE_INLINE char *
+ACE_OS::strrchr (char *s, int c)
{
// ACE_TRACE ("ACE_OS::strrchr");
return ::strrchr (s, c);
}
+ACE_INLINE const char *
+ACE_OS::strrchr (const char *s, int c)
+{
+ // ACE_TRACE ("ACE_OS::strrchr");
+ return (const char *) ::strrchr (s, c);
+}
+
ACE_INLINE int
ACE_OS::strcmp (const char *s, const char *t)
{
@@ -1950,10 +1970,11 @@ ACE_OS::sema_init (ACE_sema_t *s, u_int count, int type,
#if !defined (ACE_LACKS_NAMED_POSIX_SEM)
if (name)
{
- s->name_ = ACE_OS::strdup (name);
-
- s->sema_ = ::sem_open (s->name_, O_CREAT,
- ACE_DEFAULT_FILE_PERMS, count);
+ ACE_ALLOCATOR_RETURN (s->name_, ACE_OS::strdup (name), -1);
+ s->sema_ = ::sem_open (s->name_,
+ O_CREAT,
+ ACE_DEFAULT_FILE_PERMS,
+ count);
return (int) s->sema_ == -1 ? -1 : 0;
}
else
@@ -7575,7 +7596,12 @@ ACE_INLINE wchar_t *
ACE_OS::strdup (const wchar_t *s)
{
// ACE_TRACE ("ACE_OS::strdup");
+#if defined (__BORLANDC__)
+ wchar_t *buffer = (wchar_t *) malloc (strlen (s) * sizeof (wchar_t) + 1);
+ return ::wcscpy (buffer, s);
+#else
return ::wcsdup (s);
+#endif /* __BORLANDC__ */
}
ACE_INLINE int
@@ -7692,7 +7718,11 @@ ACE_INLINE int
ACE_OS::stat (const wchar_t *file, struct stat *stp)
{
// ACE_TRACE ("ACE_OS::stat");
+#if defined (__BORLANDC__)
+ ACE_OSCALL_RETURN (::_wstat (file, stp), int, -1);
+#else
ACE_OSCALL_RETURN (::_wstat (file, (struct _stat *) stp), int, -1);
+#endif /* __BORLANDC__ */
}
ACE_INLINE int
diff --git a/ace/TLI_Acceptor.cpp b/ace/TLI_Acceptor.cpp
index eb59315f05a..b060a848404 100644
--- a/ace/TLI_Acceptor.cpp
+++ b/ace/TLI_Acceptor.cpp
@@ -274,14 +274,15 @@ ACE_TLI_Acceptor::open (const ACE_Addr &remote_sap,
const char dev[])
{
ACE_TRACE ("ACE_TLI_Acceptor::open");
- int res = 0;
- int one = 1;
+ int res = 0;
+ int one = 1;
this->disp_ = 0;
- if ((this->device_ = ACE_OS::strdup (dev)) == 0)
- res = ACE_INVALID_HANDLE;
- else if (this->ACE_TLI::open (dev, oflag, info) == ACE_INVALID_HANDLE)
+ ACE_ALLOCATOR_RETURN (this->device_,
+ ACE_OS::strdup (dev),
+ ACE_INVALID_HANDLE);
+ if (this->ACE_TLI::open (dev, oflag, info) == ACE_INVALID_HANDLE)
res = ACE_INVALID_HANDLE;
else if (reuse_addr
&& this->set_option (SOL_SOCKET, SO_REUSEADDR,
diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp
index c22383a740a..3e00b80994a 100644
--- a/ace/WFMO_Reactor.cpp
+++ b/ace/WFMO_Reactor.cpp
@@ -1394,7 +1394,7 @@ ACE_WFMO_Reactor_Notify::notify (ACE_Event_Handler *eh,
if (eh != 0)
{
ACE_Message_Block *mb = 0;
- ACE_NEW_RETURN (mb, ACE_Message_Block (sizeof ACE_Notification_Buffer), -1);
+ ACE_NEW_RETURN (mb, ACE_Message_Block (sizeof (ACE_Notification_Buffer)), -1);
ACE_Notification_Buffer *buffer =
(ACE_Notification_Buffer *) mb->base ();
diff --git a/ace/ace.ide b/ace/ace.ide
new file mode 100644
index 00000000000..09ca8c47be2
--- /dev/null
+++ b/ace/ace.ide
Binary files differ
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h
index 64c1cfa6646..c590c8808d2 100644
--- a/ace/config-win32-common.h
+++ b/ace/config-win32-common.h
@@ -29,10 +29,10 @@
#define ACE_LACKS_RLIMIT
// Only MSVC 5.0 definitions
-#if (_MSC_VER >= 1100)
+#if (_MSC_VER >= 1100 || __BORLANDC__ >= 0x500)
#define ACE_HAS_SIG_ATOMIC_T
#define ACE_HAS_TYPENAME_KEYWORD
-#endif /* _MSC_VER >= 1100 */
+#endif /* _MSC_VER >= 1100 || __BORLANDC__ >= 0x500 */
// Optimize ACE_Handle_Set for select().
#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
@@ -53,7 +53,9 @@
// Platform supports POSIX O_NONBLOCK semantics.
//define ACE_HAS_POSIX_NONBLOCK
+#if !defined (__BORLANDC__)
#define ACE_LACKS_MODE_MASKS
+#endif /* __BORLANDC__ */
#define ACE_LACKS_STRRECVFD
// Compiler/platform has correctly prototyped header files.