Ticket #6597: 6597-hdhr-win32.2.patch
File 6597-hdhr-win32.2.patch, 4.4 KB (added by , 15 years ago) |
---|
-
libs/libmythhdhomerun/libmythhdhomerun.pro
9 9 target.path = $${LIBDIR} 10 10 INSTALLS = target 11 11 12 mingw:LIBS += -lws2_32 -liphlpapi -lpthread 13 12 14 QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) 13 15 14 16 HEADERS += hdhomerun.h hdhomerun_os.h hdhomerun_types.h -
libs/libmythhdhomerun/hdhomerun_os.h
23 23 24 24 #if defined(__WINDOWS__) 25 25 #define _WINSOCKAPI_ 26 // MinGW lacks wspiapi, so remove dependency by setting minimum WINVER to WinXP 27 #define WINVER 0x0501 26 28 #include <windows.h> 27 29 #include <winsock2.h> 28 30 #include <ws2tcpip.h> 29 #include <wspiapi.h>31 //#include <wspiapi.h> 30 32 #include <stdlib.h> 31 33 #include <stdio.h> 32 34 #include <stdarg.h> … … 78 80 #endif 79 81 80 82 typedef int bool_t; 83 /* Use MinGW includes instead of these... 81 84 typedef signed __int8 int8_t; 82 85 typedef signed __int16 int16_t; 83 86 typedef signed __int32 int32_t; … … 88 91 typedef unsigned __int64 uint64_t; 89 92 typedef HANDLE pthread_t; 90 93 typedef HANDLE pthread_mutex_t; 94 */ 95 #include <stdint.h> 96 #include <pthread.h> 91 97 98 // Avoid #define conflicts by limiting scope to non-c++ 99 #ifndef __cplusplus 92 100 #define socklen_t int 93 101 #define close closesocket 94 102 #define sock_getlasterror WSAGetLastError() 95 103 #define sock_getlasterror_socktimeout (WSAGetLastError() == WSAETIMEDOUT) 96 #define va_copy(x, y) x = y104 //#define va_copy(x, y) x = y 97 105 #define atoll _atoi64 98 106 #define strdup _strdup 99 107 #define strcasecmp _stricmp … … 104 112 #define sleep(sec) Sleep((sec)*1000) 105 113 #define THREAD_FUNC_PREFIX DWORD WINAPI 106 114 #define SIGPIPE SIGABRT 115 #endif 107 116 108 117 static inline uint64_t getcurrenttime(void) 109 118 { … … 118 127 return setsockopt(s, level, optname, (char *)&t, sizeof(t)); 119 128 } 120 129 130 /* MythTV uses pthreads lib instead of these... 121 131 static inline int pthread_create(pthread_t *tid, void *attr, LPTHREAD_START_ROUTINE start, void *arg) 122 132 { 123 133 *tid = CreateThread(NULL, 0, start, arg, 0, NULL); … … 154 164 { 155 165 ReleaseMutex(*mutex); 156 166 } 167 */ 157 168 158 169 #else /* !defined(__WINDOWS__) */ 159 170 -
libs/libmythtv/hdhrchannel.cpp
7 7 // C includes 8 8 #include <unistd.h> 9 9 #include <sys/types.h> 10 #ifndef USING_MINGW 10 11 #include <sys/socket.h> 11 12 #include <netinet/in.h> 12 13 #include <arpa/inet.h> 13 14 #include <netdb.h> 15 #endif 14 16 #include <sys/time.h> 15 17 #include <fcntl.h> 16 18 -
libs/libmythtv/hdhrrecorder.cpp
10 10 #include <fcntl.h> 11 11 #include <unistd.h> 12 12 #include <sys/types.h> 13 #ifndef USING_MINGW 13 14 #include <sys/socket.h> 14 15 #include <netinet/in.h> 15 16 #include <arpa/inet.h> 16 17 #include <netdb.h> 18 #endif 17 19 #include <sys/time.h> 18 20 19 21 // C++ includes -
libs/libmythtv/hdhrsignalmonitor.cpp
7 7 #include <pthread.h> 8 8 #include <fcntl.h> 9 9 #include <unistd.h> 10 #ifndef USING_MINGW 10 11 #include <sys/select.h> 12 #endif 11 13 12 14 #include "mythcontext.h" 13 15 #include "mythdbcon.h" -
libs/libmythtv/libmythtv.pro
581 581 SOURCES += videoout_d3d.cpp 582 582 583 583 LIBS += -lpthread 584 LIBS += -lws2_32 584 585 } 585 586 586 587 # install headers required by mytharchive -
libs/libmythtv/hdhrstreamhandler.cpp
4 4 #include <pthread.h> 5 5 #include <fcntl.h> 6 6 #include <unistd.h> 7 #ifndef USING_MINGW 7 8 #include <sys/select.h> 8 9 #include <sys/ioctl.h> 10 #endif 9 11 10 12 // Qt headers 11 13 #include <QString>