summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-05-28 19:36:42 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-05-28 19:36:42 +0000
commit3d1641775215ce50f2e6298c4efbbc9858db4977 (patch)
tree8a81fa50fc42b3eb454e40079bba24796b212b66
parent6bc33def5ca188987fb326629f3f0cd15db6a395 (diff)
downloadATCD-3d1641775215ce50f2e6298c4efbbc9858db4977.tar.gz
Mon May 28 19:35:55 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--ACE/ChangeLog12
-rw-r--r--ACE/ace/ACE.cpp14
-rw-r--r--ACE/ace/ACE.inl14
-rw-r--r--ACE/ace/OS_NS_unistd.cpp8
-rw-r--r--ACE/ace/OS_NS_unistd.h3
5 files changed, 31 insertions, 20 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 628d67f32ca..bbd1da3fbbe 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,15 @@
+Mon May 28 19:35:55 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ace/OS_NS_unistd.cpp:
+ Const and layout change
+
+ * ace/OS_NS_unistd.h:
+ Layout change
+
+ * ace/map_errno.{cpp,inl}:
+ The full switch is only required for windows and moved to an
+ inline method, on linux it is just a return
+
Mon May 28 18:50:55 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Mem_Map_Test.cpp:
diff --git a/ACE/ace/ACE.cpp b/ACE/ace/ACE.cpp
index ccb94c4971b..ef85cc94c65 100644
--- a/ACE/ace/ACE.cpp
+++ b/ACE/ace/ACE.cpp
@@ -2928,20 +2928,6 @@ ACE::set_handle_limit (int new_limit,
return 0;
}
-int
-ACE::map_errno (int error)
-{
- switch (error)
- {
-#if defined (ACE_WIN32)
- case WSAEWOULDBLOCK:
- return EAGAIN; // Same as UNIX errno EWOULDBLOCK.
-#endif /* ACE_WIN32 */
- }
-
- return error;
-}
-
// Euclid's greatest common divisor algorithm.
u_long
ACE::gcd (u_long x, u_long y)
diff --git a/ACE/ace/ACE.inl b/ACE/ace/ACE.inl
index 0be37976a9b..354ac480b67 100644
--- a/ACE/ace/ACE.inl
+++ b/ACE/ace/ACE.inl
@@ -321,6 +321,20 @@ ACE::nibble2hex (u_int n)
return hex_chars[n & 0x0f];
}
+ACE_INLINE int
+ACE::map_errno (int error)
+{
+#if defined (ACE_WIN32)
+ switch (error)
+ {
+ case WSAEWOULDBLOCK:
+ return EAGAIN; // Same as UNIX errno EWOULDBLOCK.
+ }
+#endif /* ACE_WIN32 */
+
+ return error;
+}
+
ACE_INLINE u_char
ACE::hex2byte (ACE_TCHAR c)
{
diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp
index d7496463d29..4ad3d24741d 100644
--- a/ACE/ace/OS_NS_unistd.cpp
+++ b/ACE/ace/OS_NS_unistd.cpp
@@ -660,9 +660,9 @@ ACE_OS::pwrite (ACE_HANDLE handle,
if (altered_position == -1)
return -1;
- ssize_t bytes_written = ACE_OS::write (handle,
- buf,
- nbytes);
+ ssize_t const bytes_written = ACE_OS::write (handle,
+ buf,
+ nbytes);
if (bytes_written == -1)
return -1;
@@ -827,7 +827,7 @@ ACE_OS::write_n (ACE_HANDLE handle,
bytes_transferred += n)
{
n = ACE_OS::write (handle,
- (char *) buf + bytes_transferred,
+ (char *) buf + bytes_transferred,
len - bytes_transferred);
if (n == -1 || n == 0)
diff --git a/ACE/ace/OS_NS_unistd.h b/ACE/ace/OS_NS_unistd.h
index ba92d248f5d..2965aaf31c2 100644
--- a/ACE/ace/OS_NS_unistd.h
+++ b/ACE/ace/OS_NS_unistd.h
@@ -141,8 +141,7 @@ namespace ACE_OS
int fsync (ACE_HANDLE handle);
ACE_NAMESPACE_INLINE_FUNCTION
- int ftruncate (ACE_HANDLE,
- ACE_OFF_T);
+ int ftruncate (ACE_HANDLE handle, ACE_OFF_T offset);
ACE_NAMESPACE_INLINE_FUNCTION
char *getcwd (char *, size_t);