summaryrefslogtreecommitdiff
path: root/ace/os_include/stropts.h
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-20 14:32:29 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-20 14:32:29 +0000
commit313d763c57f0116ae8a4d516a339356e20578e19 (patch)
tree2f3d376496d8634487d22da4494ba47b13cedee8 /ace/os_include/stropts.h
parent5cb0ff6546c403f37cca5ec8228c1c4c6b08b300 (diff)
downloadATCD-OS-h_refactor.tar.gz
This commit was manufactured by cvs2svn to create branchOS-h_refactor
'OS-h_refactor'.
Diffstat (limited to 'ace/os_include/stropts.h')
-rw-r--r--ace/os_include/stropts.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/ace/os_include/stropts.h b/ace/os_include/stropts.h
new file mode 100644
index 00000000000..eb48065161b
--- /dev/null
+++ b/ace/os_include/stropts.h
@@ -0,0 +1,83 @@
+/* -*- C++ -*- */
+
+//=============================================================================
+/**
+ * @file stropts.h
+ *
+ * $Id$
+ *
+ * @author Douglas C. Schmidt (schmidt@cs.wustl.edu)
+ * @author etc
+ */
+//=============================================================================
+
+#ifndef ACE_OS_INCLUDE_STROPTS_H
+# define ACE_OS_INCLUDE_STROPTS_H
+# include "ace/pre.h"
+
+# include "ace/config-all.h"
+
+# if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+# endif /* ACE_LACKS_PRAGMA_ONCE */
+
+# if !defined (ACE_LACKS_STROPTS_H)
+# if defined (ACE_HAS_STREAMS)
+# if defined (AIX)
+# if !defined (_XOPEN_EXTENDED_SOURCE)
+# define _XOPEN_EXTENDED_SOURCE
+# endif /* !_XOPEN_EXTENDED_SOURCE */
+# include /**/ <stropts.h>
+# undef _XOPEN_EXTENDED_SOURCE
+# endif /* AIX */
+//# else
+//# include /**/ <stropts.h>
+# endif /* ACE_HAS_STREAMS */
+# include /**/ <stropts.h>
+# endif /* ACE_LACKS_STROPTS_H */
+
+# if defined (ACE_LACKS_STRRECVFD)
+struct strrecvfd {};
+# endif /* ACE_LACKS_STRRECVFD */
+
+# if !defined (ACE_HAS_STRBUF_T)
+struct strbuf
+{
+ int maxlen; // no. of bytes in buffer.
+ int len; // no. of bytes returned.
+ void *buf; // pointer to data.
+};
+# endif /* ACE_HAS_STRBUF_T */
+
+extern "C" int isastream (int);
+
+// should find a better place for this, but not
+// OS.h!!!
+# include "ace/OS_Export.h" // and this is why!
+/**
+ * @class ACE_Str_Buf
+ *
+ * @brief Simple wrapper for STREAM pipes strbuf.
+ */
+class ACE_OS_Export ACE_Str_Buf : public strbuf
+{
+public:
+ // = Initialization method
+ /// Constructor.
+ ACE_Str_Buf (void *b = 0, int l = 0, int max = 0)//;
+ {
+ this->maxlen = max;
+ this->len = l;
+ this->buf = (char *) b;
+ }
+
+ /// Constructor.
+ ACE_Str_Buf (strbuf &sb)//;
+ {
+ this->maxlen = sb.maxlen;
+ this->len = sb.len;
+ this->buf = sb.buf;
+ }
+};
+
+#endif /* ACE_OS_INCLUDE_STROPTS_H */