]> granicus.if.org Git - rtmpdump/commitdiff
Private header file
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sat, 13 Mar 2010 04:42:28 +0000 (04:42 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sat, 13 Mar 2010 04:42:28 +0000 (04:42 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@341 400ebc74-4327-4243-bc38-086b20814532

librtmp/rtmp_sys.h [new file with mode: 0644]

diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h
new file mode 100644 (file)
index 0000000..e24692b
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef __RTMP_SYS_H__
+#define __RTMP_SYS_H__
+/*
+ *      Copyright (C) 2010 Howard Chu
+ *
+ *  This file is part of librtmp.
+ *
+ *  librtmp is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser General Public License as
+ *  published by the Free Software Foundation; either version 2.1,
+ *  or (at your option) any later version.
+ *
+ *  librtmp is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with librtmp see the file COPYING.  If not, write to
+ *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  http://www.gnu.org/copyleft/lgpl.html
+ */
+
+#define CRYPTO
+
+#ifdef WIN32
+#include <winsock.h>
+#define GetSockError() WSAGetLastError()
+#define setsockopt(a,b,c,d,e)  (setsockopt)(a,b,c,(const char *)d,(int)e)
+#define EWOULDBLOCK    WSAETIMEDOUT    /* we don't use nonblocking, but we do use timeouts */
+#define sleep(n)       Sleep(n*1000)
+#define msleep(n)      Sleep(n)
+#define socklen_t      int
+#define SET_RCVTIMEO(tv,s)     int tv = s*1000
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/times.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#define GetSockError() errno
+#undef closesocket
+#define closesocket(s) close(s)
+#define msleep(n)      usleep(n*1000)
+#define SET_RCVTIMEO(tv,s)     struct timeval tv = {s,0}
+#endif
+
+#include "rtmp.h"
+
+#endif