diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-13 05:37:52 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-13 05:37:52 +0000 |
| commit | 29b7d942bfe9a92b5c3124e235fa54b5de31dccf (patch) | |
| tree | 3ea2e607f9ea08c56830ef7b803cd259e3d67c7f /ext/socket/sockport.h | |
| parent | a2af08da0c33d2dcde870b491f62a8bd0c1c6b81 (diff) | |
| download | ruby-29b7d942bfe9a92b5c3124e235fa54b5de31dccf.tar.gz ruby-29b7d942bfe9a92b5c3124e235fa54b5de31dccf.tar.xz ruby-29b7d942bfe9a92b5c3124e235fa54b5de31dccf.zip | |
remove marshal/gtk/kconv
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/sockport.h')
| -rw-r--r-- | ext/socket/sockport.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ext/socket/sockport.h b/ext/socket/sockport.h new file mode 100644 index 000000000..99bec91a1 --- /dev/null +++ b/ext/socket/sockport.h @@ -0,0 +1,43 @@ +/************************************************ + + sockport.h - + + $Author$ + $Date$ + created at: Fri Apr 30 23:19:34 JST 1999 + +************************************************/ + +#ifndef SOCKPORT_H +#define SOCKPORT_H + +#ifndef SA_LEN +# ifdef HAVE_SA_LEN +# define SA_LEN(sa) (sa)->sa_len +# else +# ifdef INET6 +# define SA_LEN(sa) \ + (((sa)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) \ + : sizeof(struct sockaddr)) +# else + /* by tradition, sizeof(struct sockaddr) covers most of the sockaddrs */ +# define SA_LEN(sa) (sizeof(struct sockaddr)) +# endif +# endif +#endif + +#ifdef HAVE_SA_LEN +# define SET_SA_LEN(sa, len) (sa)->sa_len = (len) +#else +# define SET_SA_LEN(sa, len) (len) +#endif + +#ifdef HAVE_SIN_LEN +# define SIN_LEN(si) (si)->sin_len +# define SET_SIN_LEN(si,len) (si)->sin_len = (len) +#else +# define SIN_LEN(si) sizeof(struct sockaddr_in) +# define SET_SIN_LEN(si,len) (len) +#endif + +#endif |
