diff options
Diffstat (limited to 'ace/os_include/fcntl.h')
-rw-r--r-- | ace/os_include/fcntl.h | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/ace/os_include/fcntl.h b/ace/os_include/fcntl.h index e5aa841ba8a..b6de1b0ee01 100644 --- a/ace/os_include/fcntl.h +++ b/ace/os_include/fcntl.h @@ -2,19 +2,19 @@ //============================================================================= /** - * @file fcntl.h + * @file os_fcntl.h * * file control options * * $Id$ * - * @author Don Hinton <dhinton@ieee.org> + * @author Don Hinton <dhinton@dresystems.com> * @author This code was originally in various places including ace/OS.h. */ //============================================================================= -#ifndef ACE_OS_INCLUDE_FCNTL_H -#define ACE_OS_INCLUDE_FCNTL_H +#ifndef ACE_OS_INCLUDE_OS_FCNTL_H +#define ACE_OS_INCLUDE_OS_FCNTL_H #include "ace/pre.h" @@ -31,29 +31,49 @@ # include /**/ <fcntl.h> #endif /* !ACE_LACKS_FCNTL_H */ -# if defined (__BORLANDC__) -# define _O_CREAT O_CREAT -# define _O_EXCL O_EXCL -# define _O_TRUNC O_TRUNC - // 0x0800 is used for O_APPEND. 0x08 looks free. -# define _O_TEMPORARY 0x08 /* see fcntl.h */ -# define _O_RDWR O_RDWR -# define _O_WRONLY O_WRONLY -# define _O_RDONLY O_RDONLY -# define _O_APPEND O_APPEND -# define _O_BINARY O_BINARY -# define _O_TEXT O_TEXT -# endif /* __BORLANDC__ */ +#if defined (__BORLANDC__) +# define _O_CREAT O_CREAT +# define _O_EXCL O_EXCL +# define _O_TRUNC O_TRUNC + // 0x0800 is used for O_APPEND. 0x08 looks free. +# define _O_TEMPORARY 0x08 /* see fcntl.h */ +# define _O_RDWR O_RDWR +# define _O_WRONLY O_WRONLY +# define _O_RDONLY O_RDONLY +# define _O_APPEND O_APPEND +# define _O_BINARY O_BINARY +# define _O_TEXT O_TEXT +#endif /* __BORLANDC__ */ + +// defined Win32 specific macros for UNIX platforms +#if !defined (O_BINARY) +# define O_BINARY 0 +#endif /* O_BINARY */ +#if !defined (_O_BINARY) +# define _O_BINARY O_BINARY +#endif /* _O_BINARY */ +#if !defined (O_TEXT) +# define O_TEXT 0 +#endif /* O_TEXT */ +#if !defined (_O_TEXT) +# define _O_TEXT O_TEXT +#endif /* _O_TEXT */ +#if !defined (O_RAW) +# define O_RAW 0 +#endif /* O_RAW */ +#if !defined (_O_RAW) +# define _O_RAW O_RAW +#endif /* _O_RAW */ #if defined (ACE_WIN32) # define O_NDELAY 1 #endif /* ACE_WIN32 */ -# if defined (ACE_HAS_POSIX_NONBLOCK) -# define ACE_NONBLOCK O_NONBLOCK -# else -# define ACE_NONBLOCK O_NDELAY -# endif /* ACE_HAS_POSIX_NONBLOCK */ +#if defined (ACE_HAS_POSIX_NONBLOCK) +# define ACE_NONBLOCK O_NONBLOCK +#else +# define ACE_NONBLOCK O_NDELAY +#endif /* ACE_HAS_POSIX_NONBLOCK */ #include "ace/post.h" -#endif /* ACE_OS_INCLUDE_FCNTL_H */ +#endif /* ACE_OS_INCLUDE_OS_FCNTL_H */ |