Ticket #6597: 6597-hdhr-win32.3.patch
| File 6597-hdhr-win32.3.patch, 4.5 KB (added by , 16 years ago) |
|---|
-
libs/libmythhdhomerun/libmythhdhomerun.pro
8 8 target.path = $${LIBDIR} 9 9 INSTALLS = target 10 10 11 mingw:LIBS += -lws2_32 -liphlpapi -lpthread 12 11 13 QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) 12 14 13 15 HEADERS += hdhomerun.h hdhomerun_os.h hdhomerun_types.h -
libs/libmythhdhomerun/hdhomerun_os_windows.h
31 31 */ 32 32 33 33 #define _WINSOCKAPI_ 34 // MinGW lacks wspiapi, so remove dependency by setting minimum WINVER to WinXP 35 #define WINVER 0x0501 34 36 #include <windows.h> 35 37 #include <winsock2.h> 36 38 #include <ws2tcpip.h> 37 #include <wspiapi.h>39 //#include <wspiapi.h> 38 40 #include <stdlib.h> 39 41 #include <stdio.h> 40 42 #include <stdarg.h> … … 53 55 #endif 54 56 55 57 typedef int bool_t; 58 /* Use MinGW includes instead of these... 56 59 typedef signed __int8 int8_t; 57 60 typedef signed __int16 int16_t; 58 61 typedef signed __int32 int32_t; … … 63 66 typedef unsigned __int64 uint64_t; 64 67 typedef HANDLE pthread_t; 65 68 typedef HANDLE pthread_mutex_t; 69 */ 70 #include <stdint.h> 71 #include <pthread.h> 66 72 73 // Avoid #define conflicts by limiting scope to non-c++ 74 #ifndef __cplusplus 67 75 #define socklen_t int 68 76 #define close closesocket 69 77 #define sock_getlasterror WSAGetLastError() 70 78 #define sock_getlasterror_socktimeout (WSAGetLastError() == WSAETIMEDOUT) 71 #define va_copy(x, y) x = y79 //#define va_copy(x, y) x = y 72 80 #define atoll _atoi64 73 81 #define strdup _strdup 74 82 #define strcasecmp _stricmp … … 89 97 Sleep(sec * 1000); 90 98 return 0; 91 99 } 100 #endif 92 101 93 102 static inline uint64_t getcurrenttime(void) 94 103 { … … 103 112 return setsockopt(s, level, optname, (char *)&t, sizeof(t)); 104 113 } 105 114 115 /* MythTV uses pthreads lib instead of these... 106 116 static inline int pthread_create(pthread_t *tid, void *attr, LPTHREAD_START_ROUTINE start, void *arg) 107 117 { 108 118 *tid = CreateThread(NULL, 0, start, arg, 0, NULL); … … 139 149 { 140 150 ReleaseMutex(*mutex); 141 151 } 152 */ 142 153 143 154 /* 144 155 * The console output format should be set to UTF-8, however in XP and Vista this breaks batch file processing. … … 153 164 SetConsoleOutputCP(cp); 154 165 } 155 166 167 156 168 static inline void console_printf(const char *fmt, ...) 157 169 { 158 170 va_list ap; -
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/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> -
libs/libmythtv/libmythtv.pro
571 571 SOURCES += videoout_d3d.cpp 572 572 573 573 LIBS += -lpthread 574 LIBS += -lws2_32 574 575 } 575 576 576 577 # install headers required by mytharchive
