Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# OS_NS_macros.h File Reference

`#include "ace/config-all.h"`

Include dependency graph for OS_NS_macros.h:

This graph shows which files directly or indirectly include this file:

## Defines
#define | ACE_SOCKCALL_RETURN(OP, TYPE, FAILVALUE)
#define | ACE_SOCKCALL(OP, TYPE, FAILVALUE, RESULT)
#define | ACE_ADAPT_RETVAL(OP, RESULT) ((RESULT = (OP)) == FALSE ? -1 : 0)
#define | ACE_FAIL_RETURN(RESULT)

## Detailed Description

Id
  OS_NS_macros.h,v 1.8 2004/12/13 18:53:13 ossama Exp

Author:
  Douglas C. Schmidt <schmidt@cs.wustl.edu>

  Jesper S. M|ller<stophph@diku.dk>

  and a cast of thousands...

Originally in OS.h.

## Define Documentation

#define ACE_ADAPT_RETVAL | ( | OP,
|  | RESULT |  | ) | ((RESULT = (OP)) == FALSE ? -1 : 0)

#define ACE_FAIL_RETURN | ( | RESULT |  | ) |

| Value:
    do { \
      switch (ACE_OS::set_errno_to_last_error ()) { \
      case ERROR_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; \
      case ERROR_FILE_EXISTS:       errno = EEXIST; break; \
      case ERROR_SHARING_VIOLATION: errno = EACCES; break; \
      case ERROR_PATH_NOT_FOUND:    errno = ENOENT; break; \
      } \
      return RESULT; } while (0)

#define ACE_SOCKCALL | ( | OP,
|  | TYPE,
|  | FAILVALUE,
|  | RESULT |  | ) |

| Value:
    do { RESULT = (TYPE) OP; \
          if (RESULT == FAILVALUE) { int ___ = ::WSAGetLastError (); errno = ___; RESULT = FAILVALUE; } \
      } while (0)

#define ACE_SOCKCALL_RETURN | ( | OP,
|  | TYPE,
|  | FAILVALUE |  | ) |

| Value:
    do { TYPE ace_result_ = (TYPE) OP; \
          if (ace_result_ == FAILVALUE) { int ___ = ::WSAGetLastError (); errno = ___; return (TYPE) FAILVALUE; } else return ace_result_; \
      } while (0)