Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-11-27 15:29:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4c0c3a9ada6e444a70a09715e9352f4901fa1cce
4c0c3a9a
1 parent
46894183
refine merged code for allspace.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
35 行增加
和
10 行删除
trunk/src/core/srs_platform.hpp
trunk/src/srs/srs.upp
trunk/src/core/srs_platform.hpp
查看文件 @
4c0c3a9
/*
The MIT License (MIT)
Copyright (c) 2014 allspace
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef SRS_WIN_PORTING_H
#define SRS_WIN_PORTING_H
...
...
@@ -12,11 +35,11 @@
* while the _WIN32 includes both 32-bit and 64-bit
*/
#if !defined(_WIN32) || defined(__CYGWIN__)
#define SOCKET_ETIME ETIME
#define SOCKET_ECONNRESET ECONNRESET
#define SOCKET_ETIME ETIME
#define SOCKET_ECONNRESET ECONNRESET
#define SOCKET int
#define SOCKET_ERRNO()
errno
#define SOCKET_ERRNO()
errno
#define SOCKET_RESET(fd) fd = -1; (void)0
#define SOCKET_CLOSE(fd) \
if (fd > 0) {\
...
...
@@ -25,7 +48,7 @@
} \
(void)0
#define SOCKET_VALID(x) (x > 0)
#define SOCKET_SETUP()
(void)0
#define SOCKET_SETUP() (void)0
#define SOCKET_CLEANUP() (void)0
#else
/*on windows, but not on cygwin*/
#include <sys/stat.h>
...
...
@@ -33,7 +56,7 @@
#include <winsock2.h>
#include <stdint.h>
#ifdef _MSC_VER
//for VS2010
#ifdef _MSC_VER
//for VS2010
#include <io.h>
#include <fcntl.h>
#define S_IRUSR _S_IREAD
...
...
@@ -61,14 +84,14 @@
#define PRId64 "lld"
#define SOCKET_ETIME WSAETIMEDOUT
#define SOCKET_ECONNRESET WSAECONNRESET
#define SOCKET_ERRNO() WSAGetLastError()
#define SOCKET_ETIME WSAETIMEDOUT
#define SOCKET_ECONNRESET WSAECONNRESET
#define SOCKET_ERRNO() WSAGetLastError()
#define SOCKET_RESET(x) x=INVALID_SOCKET
#define SOCKET_CLOSE(x) if(x!=INVALID_SOCKET){::closesocket(x);x=INVALID_SOCKET;}
#define SOCKET_VALID(x) (x!=INVALID_SOCKET)
#define SOCKET_BUFF(x) ((char*)x)
#define SOCKET_SETUP() socket_setup()
#define SOCKET_BUFF(x) ((char*)x)
#define SOCKET_SETUP() socket_setup()
#define SOCKET_CLEANUP() socket_cleanup()
typedef
uint32_t
u_int32_t
;
...
...
trunk/src/srs/srs.upp
查看文件 @
4c0c3a9
...
...
@@ -15,6 +15,8 @@ file
..\core\srs_core.cpp,
..\core\srs_core_autofree.hpp,
..\core\srs_core_autofree.cpp,
..\core\srs_platform.hpp,
..\core\srs_platform.cpp,
kernel readonly separator,
..\kernel\srs_kernel_buffer.hpp,
..\kernel\srs_kernel_buffer.cpp,
...
...
请
注册
或
登录
后发表评论