summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_stdlib.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@users.noreply.github.com>2016-09-04 11:30:25 +0200
committerGitHub <noreply@github.com>2016-09-04 11:30:25 +0200
commite13ee56ffabd908059f5bc74c85d22370ea39412 (patch)
treefda21ad0ba4181f3c5a929bc6ad3ab26f663f8d0 /ACE/ace/OS_NS_stdlib.h
parent0ce207c1a728b55cdb5a7cee832d89e6e47ff7b0 (diff)
parentc4f77c4178fbd6546342ddf55a2ffc92af91729c (diff)
downloadATCD-e13ee56ffabd908059f5bc74c85d22370ea39412.tar.gz
Merge pull request #262 from ops/master
Handle system functions that may be defined as macros on some platforms
Diffstat (limited to 'ACE/ace/OS_NS_stdlib.h')
-rw-r--r--ACE/ace/OS_NS_stdlib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_stdlib.h b/ACE/ace/OS_NS_stdlib.h
index c7b89a06fc3..6d5d0baf642 100644
--- a/ACE/ace/OS_NS_stdlib.h
+++ b/ACE/ace/OS_NS_stdlib.h
@@ -77,6 +77,18 @@ inline ACE_INT64 ace_strtoull_helper (const char *s, char **ptr, int base)
}
#endif /* !ACE_LACKS_STRTOULL && !ACE_STRTOULL_EQUIVALENT */
+#if !defined (ACE_LACKS_RAND_R)
+inline int ace_rand_r_helper (unsigned *seed)
+{
+# if defined (rand_r)
+ return rand_r (seed);
+# undef rand_r
+# else
+ return ACE_STD_NAMESPACE::rand_r (seed);
+# endif /* rand_r */
+}
+#endif /* !ACE_LACKS_RAND_R */
+
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE_OS {