diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-10-15 03:48:20 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-10-15 03:48:20 +0000 |
commit | 02dba30b6c6c5b420d25f629024736ebbca0755f (patch) | |
tree | 7ff3dc91b804d0fbf951972b174b58f5a0d269bb /pjlib/src/pjlib-test | |
parent | 4533e1452749d9c4060d63971eabc7a6baeb9e1e (diff) |
Ticket #972: setsockopt compatibility problems on Windows (thanks Yann and John Ridges for the reports)
- set PJ_SOL_IP, PJ_SOL_TCP, and PJ_SOL_UDP to IPPROTO_IP, IPPROTO_TCP, and IPPROTO_UDP respectively on Windows
- also added PJ_TCP_NODELAY and PJ_SO_REUSEADDR
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2946 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pjlib-test')
-rw-r--r-- | pjlib/src/pjlib-test/sock.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pjlib/src/pjlib-test/sock.c b/pjlib/src/pjlib-test/sock.c index ec911177..e6060715 100644 --- a/pjlib/src/pjlib-test/sock.c +++ b/pjlib/src/pjlib-test/sock.c @@ -167,6 +167,22 @@ static int format_test(void) /* pj_gethostaddr() */ + /* Various constants */ +#if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0 + if (PJ_SOL_IP==0xFFFF) return -5500; + if (PJ_SOL_TCP==0xFFFF) return -5510; + if (PJ_SOL_UDP==0xFFFF) return -5520; + if (PJ_SOL_IPV6==0xFFFF) return -5530; + + if (PJ_SO_TYPE==0xFFFF) return -5540; + if (PJ_SO_RCVBUF==0xFFFF) return -5550; + if (PJ_SO_SNDBUF==0xFFFF) return -5560; + if (PJ_TCP_NODELAY==0xFFFF) return -5570; + if (PJ_SO_REUSEADDR==0xFFFF) return -5580; + + if (PJ_MSG_OOB==0xFFFF) return -5590; + if (PJ_MSG_PEEK==0xFFFF) return -5600; +#endif return 0; } |