1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

preprocessor directives indented.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-02-15 22:53:59 +00:00
parent cb31e78379
commit 35f8072e5c

View file

@ -11,79 +11,81 @@
#include <sys/stat.h> #include <sys/stat.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> # include <unistd.h>
#endif #endif
#ifdef HAVE_SYS_UIO_H #ifdef HAVE_SYS_UIO_H
#include <sys/uio.h> # include <sys/uio.h>
#endif #endif
#ifdef HAVE_XTI_H #ifdef HAVE_XTI_H
#include <xti.h> # include <xti.h>
#endif #endif
#ifndef _WIN32 #ifndef _WIN32
#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) # if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
# include <net/socket.h> # include <net/socket.h>
#else # else
# include <sys/socket.h> # include <sys/socket.h>
#endif # endif
#include <netinet/in.h> # include <netinet/in.h>
#ifdef HAVE_NETINET_IN_SYSTM_H # ifdef HAVE_NETINET_IN_SYSTM_H
# include <netinet/in_systm.h> # include <netinet/in_systm.h>
#endif # endif
#ifdef HAVE_NETINET_TCP_H # ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h> # include <netinet/tcp.h>
#endif # endif
#ifdef HAVE_NETINET_UDP_H # ifdef HAVE_NETINET_UDP_H
# include <netinet/udp.h> # include <netinet/udp.h>
#endif # endif
#ifdef HAVE_ARPA_INET_H # ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h> # include <arpa/inet.h>
# endif
# include <netdb.h>
#endif #endif
#include <netdb.h>
#endif
#include <errno.h> #include <errno.h>
#ifdef HAVE_SYS_UN_H #ifdef HAVE_SYS_UN_H
#include <sys/un.h> # include <sys/un.h>
#endif #endif
#if defined(HAVE_FCNTL) #if defined(HAVE_FCNTL)
#ifdef HAVE_SYS_SELECT_H # ifdef HAVE_SYS_SELECT_H
#include <sys/select.h> # include <sys/select.h>
#endif # endif
#ifdef HAVE_SYS_TYPES_H # ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> # include <sys/types.h>
#endif # endif
#ifdef HAVE_SYS_TIME_H # ifdef HAVE_SYS_TIME_H
#include <sys/time.h> # include <sys/time.h>
#endif # endif
#ifdef HAVE_FCNTL_H # ifdef HAVE_FCNTL_H
#include <fcntl.h> # include <fcntl.h>
#endif # endif
#endif #endif
#ifdef HAVE_IFADDRS_H #ifdef HAVE_IFADDRS_H
#include <ifaddrs.h> # include <ifaddrs.h>
#endif #endif
#ifdef HAVE_SYS_IOCTL_H #ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h> # include <sys/ioctl.h>
#endif #endif
#ifdef HAVE_SYS_SOCKIO_H #ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h> # include <sys/sockio.h>
#endif #endif
#ifdef HAVE_NET_IF_H #ifdef HAVE_NET_IF_H
#include <net/if.h> # include <net/if.h>
#endif #endif
#ifdef HAVE_SYS_PARAM_H #ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> # include <sys/param.h>
#endif #endif
#ifdef HAVE_SYS_UCRED_H #ifdef HAVE_SYS_UCRED_H
#include <sys/ucred.h> # include <sys/ucred.h>
#endif #endif
#ifdef HAVE_UCRED_H #ifdef HAVE_UCRED_H
#include <ucred.h> # include <ucred.h>
#endif #endif
#ifndef HAVE_TYPE_SOCKLEN_T #ifndef HAVE_TYPE_SOCKLEN_T
@ -91,7 +93,7 @@ typedef int socklen_t;
#endif #endif
#ifndef EWOULDBLOCK #ifndef EWOULDBLOCK
#define EWOULDBLOCK EAGAIN # define EWOULDBLOCK EAGAIN
#endif #endif
/* /*
@ -104,8 +106,9 @@ typedef int socklen_t;
#define pseudo_AF_FTIP pseudo_AF_RTIP #define pseudo_AF_FTIP pseudo_AF_RTIP
#ifndef HAVE_GETADDRINFO #ifndef HAVE_GETADDRINFO
#include "addrinfo.h" # include "addrinfo.h"
#endif #endif
#include "sockport.h" #include "sockport.h"
#ifndef NI_MAXHOST #ifndef NI_MAXHOST
@ -129,19 +132,19 @@ typedef int socklen_t;
/* /*
* RFC 2553: protocol-independent placeholder for socket addresses * RFC 2553: protocol-independent placeholder for socket addresses
*/ */
#define _SS_MAXSIZE 128 # define _SS_MAXSIZE 128
#define _SS_ALIGNSIZE (sizeof(double)) # define _SS_ALIGNSIZE (sizeof(double))
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) * 2) # define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \ # define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \
_SS_PAD1SIZE - _SS_ALIGNSIZE) _SS_PAD1SIZE - _SS_ALIGNSIZE)
struct sockaddr_storage { struct sockaddr_storage {
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN # ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
unsigned char ss_len; /* address length */ unsigned char ss_len; /* address length */
unsigned char ss_family; /* address family */ unsigned char ss_family; /* address family */
#else # else
unsigned short ss_family; unsigned short ss_family;
#endif # endif
char __ss_pad1[_SS_PAD1SIZE]; char __ss_pad1[_SS_PAD1SIZE];
double __ss_align; /* force desired structure storage alignment */ double __ss_align; /* force desired structure storage alignment */
char __ss_pad2[_SS_PAD2SIZE]; char __ss_pad2[_SS_PAD2SIZE];
@ -154,22 +157,22 @@ struct sockaddr_storage {
* aligns up to __darwin_size_t which is 64bit, but CMSG_DATA is * aligns up to __darwin_size_t which is 64bit, but CMSG_DATA is
* 32bit-aligned. * 32bit-aligned.
*/ */
#undef __DARWIN_ALIGNBYTES # undef __DARWIN_ALIGNBYTES
#define __DARWIN_ALIGNBYTES (sizeof(unsigned int) - 1) # define __DARWIN_ALIGNBYTES (sizeof(unsigned int) - 1)
#endif #endif
#if defined(_AIX) #if defined(_AIX)
#ifndef CMSG_SPACE # ifndef CMSG_SPACE
# define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len)) # define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
#endif # endif
#ifndef CMSG_LEN # ifndef CMSG_LEN
# define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) # define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
#endif # endif
#endif #endif
#ifdef __BEOS__ #ifdef __BEOS__
#undef close # undef close
#define close closesocket # define close closesocket
#endif #endif
#define INET_CLIENT 0 #define INET_CLIENT 0
@ -196,12 +199,12 @@ extern VALUE rb_eSocket;
#ifdef SOCKS #ifdef SOCKS
extern VALUE rb_cSOCKSSocket; extern VALUE rb_cSOCKSSocket;
#ifdef SOCKS5 # ifdef SOCKS5
#include <socks.h> # include <socks.h>
#else # else
void SOCKSinit(); void SOCKSinit();
int Rconnect(); int Rconnect();
#endif # endif
#endif #endif
#include "constdefs.h" #include "constdefs.h"
@ -289,6 +292,7 @@ VALUE rsock_bsock_sendmsg_nonblock(int argc, VALUE *argv, VALUE sock);
#define rsock_bsock_sendmsg rb_f_notimplement #define rsock_bsock_sendmsg rb_f_notimplement
#define rsock_bsock_sendmsg_nonblock rb_f_notimplement #define rsock_bsock_sendmsg_nonblock rb_f_notimplement
#endif #endif
#if defined(HAVE_RECVMSG) #if defined(HAVE_RECVMSG)
VALUE rsock_bsock_recvmsg(int argc, VALUE *argv, VALUE sock); VALUE rsock_bsock_recvmsg(int argc, VALUE *argv, VALUE sock);
VALUE rsock_bsock_recvmsg_nonblock(int argc, VALUE *argv, VALUE sock); VALUE rsock_bsock_recvmsg_nonblock(int argc, VALUE *argv, VALUE sock);