OSSP CVS Repository

ossp - Check-in [1056]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1056
Date: 2001-Oct-02 16:12:27 (local)
2001-Oct-02 14:12:27 (UTC)
User:thl
Branch:
Comment: provide embedding support
Tickets:
Inspections:
Files:
ossp-pkg/sa/sa.h      1.1 -> 1.2     39 inserted, 0 deleted

ossp-pkg/sa/sa.h 1.1 -> 1.2

--- sa.h 2001/10/02 13:27:45     1.1
+++ sa.h 2001/10/02 14:12:27     1.2
@@ -35,6 +35,45 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
+/* embedding support */
+#ifdef SA_PREFIX
+#if defined(__STDC__) || defined(__cplusplus)
+#define __SA_CONCAT(x,y) x ## y
+#define SA_CONCAT(x,y) __SA_CONCAT(x,y)
+#else
+#define __SA_CONCAT(x) x
+#define SA_CONCAT(x,y) __SA_CONCAT(x)y
+#endif
+#define sa_addr_st   SA_CONCAT(SA_PREFIX,sa_addr_st)
+#define sa_addr_t    SA_CONCAT(SA_PREFIX,sa_addr_t)
+#define sa_rc_t      SA_CONCAT(SA_PREFIX,sa_rc_t)
+#define sa_st        SA_CONCAT(SA_PREFIX,sa_st)
+#define sa_t         SA_CONCAT(SA_PREFIX,sa_t)
+#define sa_u2a       SA_CONCAT(SA_PREFIX,sa_u2a)
+#define sa_s2a       SA_CONCAT(SA_PREFIX,sa_s2a)
+#define sa_a2u       SA_CONCAT(SA_PREFIX,sa_a2u)
+#define sa_a2s       SA_CONCAT(SA_PREFIX,sa_a2s)
+#define sa_create    SA_CONCAT(SA_PREFIX,sa_create)
+#define sa_destroy   SA_CONCAT(SA_PREFIX,sa_destroy)
+#define sa_timeout   SA_CONCAT(SA_PREFIX,sa_timeout)
+#define sa_buffers   SA_CONCAT(SA_PREFIX,sa_buffers)
+#define sa_bind      SA_CONCAT(SA_PREFIX,sa_bind)
+#define sa_connect   SA_CONCAT(SA_PREFIX,sa_connect)
+#define sa_listen    SA_CONCAT(SA_PREFIX,sa_listen)
+#define sa_accept    SA_CONCAT(SA_PREFIX,sa_accept)
+#define sa_getremote SA_CONCAT(SA_PREFIX,sa_getremote)
+#define sa_getlocal  SA_CONCAT(SA_PREFIX,sa_getlocal)
+#define sa_getfd     SA_CONCAT(SA_PREFIX,sa_getfd)
+#define sa_shutdown  SA_CONCAT(SA_PREFIX,sa_shutdown)
+#define sa_read      SA_CONCAT(SA_PREFIX,sa_read)
+#define sa_readfrom  SA_CONCAT(SA_PREFIX,sa_readfrom)
+#define sa_readline  SA_CONCAT(SA_PREFIX,sa_readline)
+#define sa_write     SA_CONCAT(SA_PREFIX,sa_write)
+#define sa_writeto   SA_CONCAT(SA_PREFIX,sa_writeto)
+#define sa_printf    SA_CONCAT(SA_PREFIX,sa_printf)
+#define sa_flush     SA_CONCAT(SA_PREFIX,sa_flush)
+#endif
+
 /* socket address abstraction object type */
 struct sa_addr_st;
 typedef struct sa_addr_st sa_addr_t;

CVSTrac 2.0.1