Back to index

courier  0.68.2
soxwrap.h
Go to the documentation of this file.
00001 #ifndef       soxwrap_h
00002 #define       soxwrap_h
00003 
00004 /*
00005 ** Copyright 2000 Double Precision, Inc.
00006 ** See COPYING for distribution information.
00007 */
00008 
00009 
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013 
00014 #include "soxwrap/soxwrap_config.h"
00015 
00016 #include <sys/types.h>
00017 #include <sys/stat.h>
00018 #include <sys/socket.h>
00019 #if HAVE_SYS_SELECT_H
00020 #include <sys/select.h>
00021 #endif
00022 #if HAVE_SYS_POLL_H
00023 #include <sys/poll.h>
00024 #endif
00025 #include <netinet/in.h>
00026 #include <arpa/inet.h>
00027 #include <fcntl.h>
00028 #include <netdb.h>
00029 #include <unistd.h>
00030 
00031 #define sox_init(s) 0
00032 #define sox_socket socket
00033 
00034 #if HAVE_SOCKS
00035 
00036 #include <socks.h>
00037 
00038 #define sox_getpeername     Rgetpeername
00039 #define sox_getsockname     Rgetsockname
00040 #define sox_accept   Raccept
00041 #define sox_connect  Rconnect
00042 #define sox_bind     Rbind
00043 #define sox_listen   Rlisten
00044 #define sox_recvfrom Rrecvfrom
00045 #define sox_sendto   Rsendto
00046 #define sox_read     Rread
00047 #define sox_write    Rwrite
00048 #define sox_close    Rclose
00049 #define sox_dup             Rdup
00050 #define sox_dup2     Rdup2
00051 #define sox_select   Rselect
00052 #define sox_poll     Rpoll
00053 #define sox_getsockopt      Rgetsockopt
00054 
00055 #else
00056 
00057 #define sox_getpeername     getpeername
00058 #define sox_getsockname     getsockname
00059 #define sox_accept   accept
00060 #define sox_connect  connect
00061 #define sox_bind     bind
00062 #define sox_listen   listen
00063 #define sox_recvfrom recvfrom
00064 #define sox_sendto   sendto
00065 #define sox_read     read
00066 #define sox_write    write
00067 #define sox_close    close
00068 #define sox_dup             dup
00069 #define sox_dup2     dup2
00070 #define sox_select   select
00071 #define sox_poll     poll
00072 #define sox_getsockopt      getsockopt
00073 #endif
00074 
00075 #ifdef __cplusplus
00076 }
00077 #endif
00078 
00079 #endif