version 1.7.3.0
[socat.git] / xioopen.h
blob2002be4a62e950e077639fc31c6d901b978bbad4
1 /* source: xioopen.h */
2 /* Copyright Gerhard Rieger 2001-2008 */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __xioopen_h_included
6 #define __xioopen_h_included 1
8 #include "compat.h" /* F_pid */
9 #include "mytypes.h"
10 #include "error.h"
11 #include "utils.h"
12 #include "sysutils.h"
14 #include "sycls.h"
15 #include "sslcls.h"
16 #include "dalan.h"
17 #include "filan.h"
18 #include "xio.h"
19 #include "xioopts.h"
22 #if WITH_HELP
23 #define HELP(x) , x
24 #else
25 #define HELP(x)
26 #endif
30 /* xioinitialize performs asserts on these records */
31 extern const struct optdesc opt_crdly;
32 extern const struct optdesc opt_tabdly;
33 extern const struct optdesc opt_csize;
36 struct addrname {
37 const char *name;
38 const struct addrdesc *desc;
39 } ;
41 extern const char *ddirection[];
42 extern const char *filetypenames[];
43 extern const struct addrname addressnames[];
44 extern const struct optname optionnames[];
46 extern int xioopen_makedual(xiofile_t *file);
48 #define retropt_2bytes(o,c,r) retropt_ushort(o,c,r)
50 /* mode_t might be unsigned short or unsigned int or what else? */
51 #if HAVE_BASIC_MODE_T==1
52 # define retropt_modet(x,y,z) retropt_short(x,y,z)
53 #elif HAVE_BASIC_MODE_T==2
54 # define retropt_modet(x,y,z) retropt_ushort(x,y,z)
55 #elif HAVE_BASIC_MODE_T==3
56 # define retropt_modet(x,y,z) retropt_int(x,y,z)
57 #elif HAVE_BASIC_MODE_T==4
58 # define retropt_modet(x,y,z) retropt_uint(x,y,z)
59 #elif HAVE_BASIC_MODE_T==5
60 # define retropt_modet(x,y,z) retropt_long(x,y,z)
61 #elif HAVE_BASIC_MODE_T==6
62 # define retropt_modet(x,y,z) retropt_ulong(x,y,z)
63 #endif
65 #if HAVE_BASIC_UID_T==1
66 # define retropt_uidt(x,y,z) retropt_short(x,y,z)
67 #elif HAVE_BASIC_UID_T==2
68 # define retropt_uidt(x,y,z) retropt_ushort(x,y,z)
69 #elif HAVE_BASIC_UID_T==3
70 # define retropt_uidt(x,y,z) retropt_int(x,y,z)
71 #elif HAVE_BASIC_UID_T==4
72 # define retropt_uidt(x,y,z) retropt_uint(x,y,z)
73 #elif HAVE_BASIC_UID_T==5
74 # define retropt_uidt(x,y,z) retropt_long(x,y,z)
75 #elif HAVE_BASIC_UID_T==6
76 # define retropt_uidt(x,y,z) retropt_ulong(x,y,z)
77 #endif
79 #if HAVE_BASIC_GID_T==1
80 # define retropt_gidt(x,y,z) retropt_short(x,y,z)
81 #elif HAVE_BASIC_GID_T==2
82 # define retropt_gidt(x,y,z) retropt_ushort(x,y,z)
83 #elif HAVE_BASIC_GID_T==3
84 # define retropt_gidt(x,y,z) retropt_int(x,y,z)
85 #elif HAVE_BASIC_GID_T==4
86 # define retropt_gidt(x,y,z) retropt_uint(x,y,z)
87 #elif HAVE_BASIC_GID_T==5
88 # define retropt_gidt(x,y,z) retropt_long(x,y,z)
89 #elif HAVE_BASIC_GID_T==6
90 # define retropt_gidt(x,y,z) retropt_ulong(x,y,z)
91 #endif
94 #endif /* !defined(__xioopen_h_included) */