comparison common.h @ 66:c619660c74ab libavutil

CONFIG_WIN32 implies MinGW and Cygwin and possibly more, so use just CONFIG_MINGW or __MINGW32__ instead.
author diego
date Tue, 11 Jul 2006 21:45:45 +0000
parents 2840042b3f5d
children 57690086d387
comparison
equal deleted inserted replaced
65:2840042b3f5d 66:c619660c74ab
93 typedef signed int int32_t; 93 typedef signed int int32_t;
94 typedef unsigned char uint8_t; 94 typedef unsigned char uint8_t;
95 typedef unsigned short uint16_t; 95 typedef unsigned short uint16_t;
96 typedef unsigned int uint32_t; 96 typedef unsigned int uint32_t;
97 97
98 # ifdef CONFIG_WIN32 98 # ifdef __MINGW32__
99 typedef signed __int64 int64_t; 99 typedef signed __int64 int64_t;
100 typedef unsigned __int64 uint64_t; 100 typedef unsigned __int64 uint64_t;
101 # else /* other OS */ 101 # else /* other OS */
102 typedef signed long long int64_t; 102 typedef signed long long int64_t;
103 typedef unsigned long long uint64_t; 103 typedef unsigned long long uint64_t;
176 # else 176 # else
177 # define INT_BIT 32 177 # define INT_BIT 32
178 # endif 178 # endif
179 #endif 179 #endif
180 180
181 #ifdef CONFIG_WIN32 181 #ifdef __MINGW32__
182 182
183 /* windows */ 183 /* windows */
184 184
185 # if !defined(__MINGW32__) && !defined(__CYGWIN__) 185 # if !defined(__MINGW32__) && !defined(__CYGWIN__)
186 # define int64_t_C(c) (c ## i64) 186 # define int64_t_C(c) (c ## i64)
207 # define perror(a) 207 # define perror(a)
208 # endif 208 # endif
209 209
210 # endif 210 # endif
211 211
212 /* CONFIG_WIN32 end */ 212 /* __MINGW32__ end */
213 #elif defined (CONFIG_OS2) 213 #elif defined (CONFIG_OS2)
214 /* OS/2 EMX */ 214 /* OS/2 EMX */
215 215
216 #ifndef int64_t_C 216 #ifndef int64_t_C
217 #define int64_t_C(c) (c ## LL) 217 #define int64_t_C(c) (c ## LL)
243 # ifdef USE_FASTMEMCPY 243 # ifdef USE_FASTMEMCPY
244 # include "fastmemcpy.h" 244 # include "fastmemcpy.h"
245 # endif 245 # endif
246 # endif /* HAVE_AV_CONFIG_H */ 246 # endif /* HAVE_AV_CONFIG_H */
247 247
248 #endif /* !CONFIG_WIN32 && !CONFIG_OS2 */ 248 #endif /* !__MINGW32__ && !CONFIG_OS2 */
249 249
250 #ifdef HAVE_AV_CONFIG_H 250 #ifdef HAVE_AV_CONFIG_H
251 251
252 #if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV) 252 #if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV)
253 # define FF_IMPORT_ATTR __declspec(dllimport) 253 # define FF_IMPORT_ATTR __declspec(dllimport)
586 /* XXX: add ISOC specific test to avoid specific BSD testing. */ 586 /* XXX: add ISOC specific test to avoid specific BSD testing. */
587 /* better than nothing implementation. */ 587 /* better than nothing implementation. */
588 /* btw, rintf() is existing on fbsd too -- alex */ 588 /* btw, rintf() is existing on fbsd too -- alex */
589 static always_inline long int lrintf(float x) 589 static always_inline long int lrintf(float x)
590 { 590 {
591 #ifdef CONFIG_WIN32 591 #ifdef __MINGW32__
592 # ifdef ARCH_X86 592 # ifdef ARCH_X86
593 int32_t i; 593 int32_t i;
594 asm volatile( 594 asm volatile(
595 "fistpl %0\n\t" 595 "fistpl %0\n\t"
596 : "=m" (i) : "t" (x) : "st" 596 : "=m" (i) : "t" (x) : "st"
600 /* XXX: incorrect, but make it compile */ 600 /* XXX: incorrect, but make it compile */
601 return (int)(x + (x < 0 ? -0.5 : 0.5)); 601 return (int)(x + (x < 0 ? -0.5 : 0.5));
602 # endif /* ARCH_X86 */ 602 # endif /* ARCH_X86 */
603 #else 603 #else
604 return (int)(rint(x)); 604 return (int)(rint(x));
605 #endif /* CONFIG_WIN32 */ 605 #endif /* __MINGW32__ */
606 } 606 }
607 #else 607 #else
608 #ifndef _ISOC9X_SOURCE 608 #ifndef _ISOC9X_SOURCE
609 #define _ISOC9X_SOURCE 609 #define _ISOC9X_SOURCE
610 #endif 610 #endif